[{"data":1,"prerenderedAt":1803},["ShallowReactive",2],{"navigation":3,"\u002Fnumbers":43,"\u002Fnumbers-surround":1798},[4,8,13,18,23,28,33,38],{"title":5,"path":6,"stem":7},"Getting started","\u002F","index",{"title":9,"path":10,"stem":11,"order":12},"Numbers","\u002Fnumbers","numbers",1,{"title":14,"path":15,"stem":16,"order":17},"Rent","\u002Frent","rent",2,{"title":19,"path":20,"stem":21,"order":22},"User","\u002Fuser","user",3,{"title":24,"path":25,"stem":26,"order":27},"Free numbers","\u002Ffree","free",4,{"title":29,"path":30,"stem":31,"order":32},"Webhooks","\u002Fwebhooks","webhooks",5,{"title":34,"path":35,"stem":36,"order":37},"Testing","\u002Ftesting","testing",6,{"title":39,"path":40,"stem":41,"order":42},"Changelog","\u002Fchangelog","changelog",7,{"id":44,"title":9,"body":45,"description":1792,"extension":1793,"meta":1794,"navigation":1795,"path":10,"seo":1796,"stem":11,"__hash__":1797},"docs\u002Fnumbers.md",{"type":46,"value":47,"toc":1779},"minimark",[48,99,103,110,163,226,276,289,291,294,360,427,493,517,520,526,582,602,652,657,660,667,732,820,856,956,959,962,1005,1070,1078,1081,1084,1112,1248,1258,1342,1365,1367,1370,1390,1412,1414,1421,1440,1461,1473,1475,1478,1497,1518,1522,1524,1530,1561,1580,1645,1648,1651,1677,1768,1775],[49,50,51,52,56,57,6,60,63,64,67,68,71,72,75,76,79,80,83,84,87,88,83,91,94,95,98],"p",{},"An operation (",[53,54,55],"code",{},"tzid",") is one ordered number. Order it with ",[53,58,59],{},"get",[53,61,62],{},"getWithNumber",", read the SMS with ",[53,65,66],{},"stateOne"," or ",[53,69,70],{},"waitCode",", finish it with ",[53,73,74],{},"close"," (or ",[53,77,78],{},"ban","). Countries are phone codes (",[53,81,82],{},"7",", ",[53,85,86],{},"44",", …), services are slugs (",[53,89,90],{},"google",[53,92,93],{},"vkcom",", …) as returned by ",[53,96,97],{},"tariffs",".",[100,101,102],"h2",{"id":102},"price",[49,104,105,106,109],{},"Price of one number, USD; ",[53,107,108],{},"null"," when the country has no price for the service.",[111,112,117],"pre",{"className":113,"code":114,"language":115,"meta":116,"style":116},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","price(service: string, country = 7): Promise\u003Cnumber | null>\n","ts","",[53,118,119],{"__ignoreMap":116},[120,121,123,126,130,134,137,140,144,147,151,154,157,160],"span",{"class":122,"line":12},"line",[120,124,102],{"class":125},"s2Zo4",[120,127,129],{"class":128},"sTEyZ","(service: string",[120,131,133],{"class":132},"sMK4o",",",[120,135,136],{"class":128}," country ",[120,138,139],{"class":132},"=",[120,141,143],{"class":142},"sbssI"," 7",[120,145,146],{"class":128},"): ",[120,148,150],{"class":149},"sBMFI","Promise",[120,152,153],{"class":132},"\u003C",[120,155,156],{"class":128},"number ",[120,158,159],{"class":132},"|",[120,161,162],{"class":132}," null>\n",[164,165,166,185],"table",{},[167,168,169],"thead",{},[170,171,172,176,179,182],"tr",{},[173,174,175],"th",{},"Param",[173,177,178],{},"Type",[173,180,181],{},"Default",[173,183,184],{},"Description",[186,187,188,207],"tbody",{},[170,189,190,196,201,204],{},[191,192,193],"td",{},[53,194,195],{},"service",[191,197,198],{},[53,199,200],{},"string",[191,202,203],{},"—",[191,205,206],{},"Service slug.",[170,208,209,214,219,223],{},[191,210,211],{},[53,212,213],{},"country",[191,215,216],{},[53,217,218],{},"number",[191,220,221],{},[53,222,82],{},[191,224,225],{},"Country code.",[111,227,229],{"className":113,"code":228,"language":115,"meta":116,"style":116},"const usd = await client.numbers.price('google', 44)\n",[53,230,231],{"__ignoreMap":116},[120,232,233,237,240,242,246,249,251,253,255,257,260,263,266,268,270,273],{"class":122,"line":12},[120,234,236],{"class":235},"spNyl","const",[120,238,239],{"class":128}," usd ",[120,241,139],{"class":132},[120,243,245],{"class":244},"s7zQu"," await",[120,247,248],{"class":128}," client",[120,250,98],{"class":132},[120,252,11],{"class":128},[120,254,98],{"class":132},[120,256,102],{"class":125},[120,258,259],{"class":128},"(",[120,261,262],{"class":132},"'",[120,264,90],{"class":265},"sfazB",[120,267,262],{"class":132},[120,269,133],{"class":132},[120,271,272],{"class":142}," 44",[120,274,275],{"class":128},")\n",[49,277,278,279,282,283,83,286,98],{},"Errors: ",[53,280,281],{},"ApiError"," ",[53,284,285],{},"ERROR_NO_SERVICE",[53,287,288],{},"UNDEFINED_COUNTRY",[100,290,59],{"id":59},[49,292,293],{},"Order a number; returns the operation id. Freezes the price on the balance.",[111,295,297],{"className":113,"code":296,"language":115,"meta":116,"style":116},"get(service: string, country = 7, options?: { reject?: Array\u003Cstring | number> }): Promise\u003Cnumber>\n",[53,298,299],{"__ignoreMap":116},[120,300,301,303,305,307,309,311,313,315,318,321,324,327,330,333,335,338,340,343,346,349,351,353,355,357],{"class":122,"line":12},[120,302,59],{"class":125},[120,304,129],{"class":128},[120,306,133],{"class":132},[120,308,136],{"class":128},[120,310,139],{"class":132},[120,312,143],{"class":142},[120,314,133],{"class":132},[120,316,317],{"class":128}," options",[120,319,320],{"class":132},"?:",[120,322,323],{"class":132}," {",[120,325,326],{"class":128}," reject?",[120,328,329],{"class":132},":",[120,331,332],{"class":128}," Array",[120,334,153],{"class":132},[120,336,337],{"class":128},"string ",[120,339,159],{"class":132},[120,341,342],{"class":128}," number",[120,344,345],{"class":132},">",[120,347,348],{"class":132}," }",[120,350,146],{"class":128},[120,352,150],{"class":149},[120,354,153],{"class":132},[120,356,218],{"class":128},[120,358,359],{"class":132},">\n",[164,361,362,374],{},[167,363,364],{},[170,365,366,368,370,372],{},[173,367,175],{},[173,369,178],{},[173,371,181],{},[173,373,184],{},[186,375,376,390,406],{},[170,377,378,382,386,388],{},[191,379,380],{},[53,381,195],{},[191,383,384],{},[53,385,200],{},[191,387,203],{},[191,389,206],{},[170,391,392,396,400,404],{},[191,393,394],{},[53,395,213],{},[191,397,398],{},[53,399,218],{},[191,401,402],{},[53,403,82],{},[191,405,225],{},[170,407,408,413,418,421],{},[191,409,410],{},[53,411,412],{},"options.reject",[191,414,415],{},[53,416,417],{},"Array\u003Cstring | number>",[191,419,420],{},"profile list",[191,422,423,424,98],{},"Number prefixes to skip, e.g. ",[53,425,426],{},"['4470']",[111,428,430],{"className":113,"code":429,"language":115,"meta":116,"style":116},"const tzid = await client.numbers.get('google', 44, { reject: ['4470'] })\n",[53,431,432],{"__ignoreMap":116},[120,433,434,436,439,441,443,445,447,449,451,453,455,457,459,461,463,465,467,469,473,475,478,480,483,485,488,491],{"class":122,"line":12},[120,435,236],{"class":235},[120,437,438],{"class":128}," tzid ",[120,440,139],{"class":132},[120,442,245],{"class":244},[120,444,248],{"class":128},[120,446,98],{"class":132},[120,448,11],{"class":128},[120,450,98],{"class":132},[120,452,59],{"class":125},[120,454,259],{"class":128},[120,456,262],{"class":132},[120,458,90],{"class":265},[120,460,262],{"class":132},[120,462,133],{"class":132},[120,464,272],{"class":142},[120,466,133],{"class":132},[120,468,323],{"class":132},[120,470,472],{"class":471},"swJcz"," reject",[120,474,329],{"class":132},[120,476,477],{"class":128}," [",[120,479,262],{"class":132},[120,481,482],{"class":265},"4470",[120,484,262],{"class":132},[120,486,487],{"class":128},"] ",[120,489,490],{"class":132},"}",[120,492,275],{"class":128},[49,494,278,495,498,499,282,501,83,504,83,506,83,508,83,511,83,514,98],{},[53,496,497],{},"NoNumberError","; ",[53,500,281],{},[53,502,503],{},"WARNING_LOW_BALANCE",[53,505,285],{},[53,507,288],{},[53,509,510],{},"EXCEEDED_CONCURRENT_OPERATIONS",[53,512,513],{},"INTERVAL_CONCURRENT_REQUESTS_ERROR",[53,515,516],{},"TRY_AGAIN_LATER",[100,518,62],{"id":519},"getwithnumber",[49,521,522,523,525],{},"Same as ",[53,524,59],{},", but returns the number right away.",[111,527,529],{"className":113,"code":528,"language":115,"meta":116,"style":116},"getWithNumber(service: string, country = 7, options?: { reject?: Array\u003Cstring | number> }): Promise\u003CNumberOrder>\n",[53,530,531],{"__ignoreMap":116},[120,532,533,535,537,539,541,543,545,547,549,551,553,555,557,559,561,563,565,567,569,571,573,575,577,580],{"class":122,"line":12},[120,534,62],{"class":125},[120,536,129],{"class":128},[120,538,133],{"class":132},[120,540,136],{"class":128},[120,542,139],{"class":132},[120,544,143],{"class":142},[120,546,133],{"class":132},[120,548,317],{"class":128},[120,550,320],{"class":132},[120,552,323],{"class":132},[120,554,326],{"class":128},[120,556,329],{"class":132},[120,558,332],{"class":128},[120,560,153],{"class":132},[120,562,337],{"class":128},[120,564,159],{"class":132},[120,566,342],{"class":128},[120,568,345],{"class":132},[120,570,348],{"class":132},[120,572,146],{"class":128},[120,574,150],{"class":149},[120,576,153],{"class":132},[120,578,579],{"class":128},"NumberOrder",[120,581,359],{"class":132},[49,583,584,585,587,588,591,592,594,595,83,598,601],{},"Returns ",[53,586,579],{},": ",[53,589,590],{},"{ tzid, number, country, time, service, title?, guard_interval_remaining_seconds? }"," — ",[53,593,218],{}," with ",[53,596,597],{},"+",[53,599,600],{},"time"," in seconds left.",[111,603,605],{"className":113,"code":604,"language":115,"meta":116,"style":116},"const { tzid, number } = await client.numbers.getWithNumber('google', 44)\n",[53,606,607],{"__ignoreMap":116},[120,608,609,611,613,616,618,621,623,626,628,630,632,634,636,638,640,642,644,646,648,650],{"class":122,"line":12},[120,610,236],{"class":235},[120,612,323],{"class":132},[120,614,615],{"class":128}," tzid",[120,617,133],{"class":132},[120,619,620],{"class":128}," number ",[120,622,490],{"class":132},[120,624,625],{"class":132}," =",[120,627,245],{"class":244},[120,629,248],{"class":128},[120,631,98],{"class":132},[120,633,11],{"class":128},[120,635,98],{"class":132},[120,637,62],{"class":125},[120,639,259],{"class":128},[120,641,262],{"class":132},[120,643,90],{"class":265},[120,645,262],{"class":132},[120,647,133],{"class":132},[120,649,272],{"class":142},[120,651,275],{"class":128},[49,653,654,655,98],{},"Errors: as ",[53,656,59],{},[100,658,659],{"id":659},"state",[49,661,662,663,666],{},"All operations of the account; ",[53,664,665],{},"[]"," when there are none.",[111,668,670],{"className":113,"code":669,"language":115,"meta":116,"style":116},"state(options?: { messageToCode?: boolean; orderBy?: 'asc' | 'desc'; msgList?: boolean }): Promise\u003COperation[]>\n",[53,671,672],{"__ignoreMap":116},[120,673,674,676,679,681,683,686,688,691,693,696,699,701,704,706,709,711,714,716,719,721,723,725,727,730],{"class":122,"line":12},[120,675,659],{"class":125},[120,677,678],{"class":128},"(options",[120,680,320],{"class":132},[120,682,323],{"class":132},[120,684,685],{"class":128}," messageToCode?",[120,687,329],{"class":132},[120,689,690],{"class":128}," boolean; orderBy",[120,692,320],{"class":132},[120,694,695],{"class":132}," '",[120,697,698],{"class":265},"asc",[120,700,262],{"class":132},[120,702,703],{"class":132}," |",[120,705,695],{"class":132},[120,707,708],{"class":265},"desc",[120,710,262],{"class":132},[120,712,713],{"class":128},"; msgList",[120,715,320],{"class":132},[120,717,718],{"class":128}," boolean ",[120,720,490],{"class":132},[120,722,146],{"class":128},[120,724,150],{"class":149},[120,726,153],{"class":132},[120,728,729],{"class":128},"Operation[]",[120,731,359],{"class":132},[164,733,734,747],{},[167,735,736],{},[170,737,738,741,743,745],{},[173,739,740],{},"Option",[173,742,178],{},[173,744,181],{},[173,746,184],{},[186,748,749,776,796],{},[170,750,751,756,761,766],{},[191,752,753],{},[53,754,755],{},"messageToCode",[191,757,758],{},[53,759,760],{},"boolean",[191,762,763],{},[53,764,765],{},"true",[191,767,768,771,772,775],{},[53,769,770],{},"msg"," is the code only; ",[53,773,774],{},"false"," — the full SMS text.",[170,777,778,783,788,793],{},[191,779,780],{},[53,781,782],{},"orderBy",[191,784,785],{},[53,786,787],{},"'asc' | 'desc'",[191,789,790],{},[53,791,792],{},"'asc'",[191,794,795],{},"Order of operations.",[170,797,798,803,807,811],{},[191,799,800],{},[53,801,802],{},"msgList",[191,804,805],{},[53,806,760],{},[191,808,809],{},[53,810,774],{},[191,812,813,815,816,819],{},[53,814,770],{}," is a list of all SMS (",[53,817,818],{},"OperationSms[]",").",[49,821,822,587,825,828,829,832,833,836,837,840,841,844,845,848,849,852,853,855],{},[53,823,824],{},"Operation",[53,826,827],{},"{ tzid, response, number?, service?, country?, sum?, time?, msg?, guard_interval_remaining_seconds?, … }",".\n",[53,830,831],{},"response"," is the state: ",[53,834,835],{},"TZ_INPOOL"," (number being assigned), ",[53,838,839],{},"TZ_NUM_WAIT"," (waiting for SMS), ",[53,842,843],{},"TZ_NUM_ANSWER"," (SMS arrived), ",[53,846,847],{},"TZ_OVER_OK"," (finished), ",[53,850,851],{},"ERROR_NO_ITEMS"," (failed). ",[53,854,770],{}," is absent until the first SMS. The server caches answers for a few seconds.",[111,857,859],{"className":113,"code":858,"language":115,"meta":116,"style":116},"for (const op of await client.numbers.state({ orderBy: 'desc' })) {\n  console.log(op.tzid, op.response, op.msg)\n}\n",[53,860,861,913,951],{"__ignoreMap":116},[120,862,863,866,869,871,874,877,879,881,883,885,887,889,891,894,897,899,901,903,905,907,910],{"class":122,"line":12},[120,864,865],{"class":244},"for",[120,867,868],{"class":128}," (",[120,870,236],{"class":235},[120,872,873],{"class":128}," op ",[120,875,876],{"class":132},"of",[120,878,245],{"class":244},[120,880,248],{"class":128},[120,882,98],{"class":132},[120,884,11],{"class":128},[120,886,98],{"class":132},[120,888,659],{"class":125},[120,890,259],{"class":128},[120,892,893],{"class":132},"{",[120,895,896],{"class":471}," orderBy",[120,898,329],{"class":132},[120,900,695],{"class":132},[120,902,708],{"class":265},[120,904,262],{"class":132},[120,906,348],{"class":132},[120,908,909],{"class":128},")) ",[120,911,912],{"class":132},"{\n",[120,914,915,918,920,923,925,928,930,932,934,937,939,941,943,945,947,949],{"class":122,"line":17},[120,916,917],{"class":128},"  console",[120,919,98],{"class":132},[120,921,922],{"class":125},"log",[120,924,259],{"class":471},[120,926,927],{"class":128},"op",[120,929,98],{"class":132},[120,931,55],{"class":128},[120,933,133],{"class":132},[120,935,936],{"class":128}," op",[120,938,98],{"class":132},[120,940,831],{"class":128},[120,942,133],{"class":132},[120,944,936],{"class":128},[120,946,98],{"class":132},[120,948,770],{"class":128},[120,950,275],{"class":471},[120,952,953],{"class":122,"line":22},[120,954,955],{"class":132},"}\n",[100,957,66],{"id":958},"stateone",[49,960,961],{},"One operation.",[111,963,965],{"className":113,"code":964,"language":115,"meta":116,"style":116},"stateOne(tzid: number, options?: { messageToCode?: boolean; msgList?: boolean }): Promise\u003COperation>\n",[53,966,967],{"__ignoreMap":116},[120,968,969,971,974,976,978,980,982,984,986,989,991,993,995,997,999,1001,1003],{"class":122,"line":12},[120,970,66],{"class":125},[120,972,973],{"class":128},"(tzid: number",[120,975,133],{"class":132},[120,977,317],{"class":128},[120,979,320],{"class":132},[120,981,323],{"class":132},[120,983,685],{"class":128},[120,985,329],{"class":132},[120,987,988],{"class":128}," boolean; msgList",[120,990,320],{"class":132},[120,992,718],{"class":128},[120,994,490],{"class":132},[120,996,146],{"class":128},[120,998,150],{"class":149},[120,1000,153],{"class":132},[120,1002,824],{"class":128},[120,1004,359],{"class":132},[111,1006,1008],{"className":113,"code":1007,"language":115,"meta":116,"style":116},"const op = await client.numbers.stateOne(tzid)\nif (op.response === 'TZ_NUM_ANSWER') console.log(op.msg)\n",[53,1009,1010,1033],{"__ignoreMap":116},[120,1011,1012,1014,1016,1018,1020,1022,1024,1026,1028,1030],{"class":122,"line":12},[120,1013,236],{"class":235},[120,1015,873],{"class":128},[120,1017,139],{"class":132},[120,1019,245],{"class":244},[120,1021,248],{"class":128},[120,1023,98],{"class":132},[120,1025,11],{"class":128},[120,1027,98],{"class":132},[120,1029,66],{"class":125},[120,1031,1032],{"class":128},"(tzid)\n",[120,1034,1035,1038,1041,1043,1046,1049,1051,1053,1055,1058,1060,1062,1065,1067],{"class":122,"line":17},[120,1036,1037],{"class":244},"if",[120,1039,1040],{"class":128}," (op",[120,1042,98],{"class":132},[120,1044,1045],{"class":128},"response ",[120,1047,1048],{"class":132},"===",[120,1050,695],{"class":132},[120,1052,843],{"class":265},[120,1054,262],{"class":132},[120,1056,1057],{"class":128},") console",[120,1059,98],{"class":132},[120,1061,922],{"class":125},[120,1063,1064],{"class":128},"(op",[120,1066,98],{"class":132},[120,1068,1069],{"class":128},"msg)\n",[49,1071,278,1072,282,1074,1077],{},[53,1073,281],{},[53,1075,1076],{},"ERROR_NO_OPERATIONS"," when the operation does not exist (any more).",[100,1079,70],{"id":1080},"waitcode",[49,1082,1083],{},"Poll the operation until a code arrives, then close it and return the code.",[111,1085,1087],{"className":113,"code":1086,"language":115,"meta":116,"style":116},"waitCode(tzid: number, options?: WaitCodeOptions): Promise\u003Cstring>\n",[53,1088,1089],{"__ignoreMap":116},[120,1090,1091,1093,1095,1097,1099,1101,1104,1106,1108,1110],{"class":122,"line":12},[120,1092,70],{"class":125},[120,1094,973],{"class":128},[120,1096,133],{"class":132},[120,1098,317],{"class":128},[120,1100,320],{"class":132},[120,1102,1103],{"class":128}," WaitCodeOptions): ",[120,1105,150],{"class":149},[120,1107,153],{"class":132},[120,1109,200],{"class":128},[120,1111,359],{"class":132},[164,1113,1114,1126],{},[167,1115,1116],{},[170,1117,1118,1120,1122,1124],{},[173,1119,740],{},[173,1121,178],{},[173,1123,181],{},[173,1125,184],{},[186,1127,1128,1147,1166,1192,1210,1229],{},[170,1129,1130,1135,1139,1144],{},[191,1131,1132],{},[53,1133,1134],{},"interval",[191,1136,1137],{},[53,1138,218],{},[191,1140,1141],{},[53,1142,1143],{},"5000",[191,1145,1146],{},"Poll interval, ms.",[170,1148,1149,1154,1158,1163],{},[191,1150,1151],{},[53,1152,1153],{},"timeout",[191,1155,1156],{},[53,1157,218],{},[191,1159,1160],{},[53,1161,1162],{},"600000",[191,1164,1165],{},"Give up after, ms.",[170,1167,1168,1173,1177,1181],{},[191,1169,1170],{},[53,1171,1172],{},"keepOpen",[191,1174,1175],{},[53,1176,760],{},[191,1178,1179],{},[53,1180,774],{},[191,1182,1183,1184,1187,1188,1191],{},"Call ",[53,1185,1186],{},"next(tzid)"," instead of ",[53,1189,1190],{},"close(tzid)",", to wait for another SMS.",[170,1193,1194,1199,1203,1207],{},[191,1195,1196],{},[53,1197,1198],{},"fullMessage",[191,1200,1201],{},[53,1202,760],{},[191,1204,1205],{},[53,1206,774],{},[191,1208,1209],{},"Return the full SMS text instead of the code.",[170,1211,1212,1217,1222,1226],{},[191,1213,1214],{},[53,1215,1216],{},"since",[191,1218,1219],{},[53,1220,1221],{},"string | null",[191,1223,1224],{},[53,1225,108],{},[191,1227,1228],{},"Ignore this value (the previous code).",[170,1230,1231,1239,1242,1245],{},[191,1232,1233,83,1236],{},[53,1234,1235],{},"sleep",[53,1237,1238],{},"now",[191,1240,1241],{},"functions",[191,1243,1244],{},"real timers",[191,1246,1247],{},"Injectable for tests.",[49,1249,1250,1251,1254,1255,1257],{},"A transient ",[53,1252,1253],{},"TransportError"," is retried until the timeout; any ",[53,1256,281],{}," is thrown at once.",[111,1259,1261],{"className":113,"code":1260,"language":115,"meta":116,"style":116},"const first = await client.numbers.waitCode(tzid, { keepOpen: true })\nconst second = await client.numbers.waitCode(tzid, { since: first })\n",[53,1262,1263,1304],{"__ignoreMap":116},[120,1264,1265,1267,1270,1272,1274,1276,1278,1280,1282,1284,1287,1289,1291,1294,1296,1300,1302],{"class":122,"line":12},[120,1266,236],{"class":235},[120,1268,1269],{"class":128}," first ",[120,1271,139],{"class":132},[120,1273,245],{"class":244},[120,1275,248],{"class":128},[120,1277,98],{"class":132},[120,1279,11],{"class":128},[120,1281,98],{"class":132},[120,1283,70],{"class":125},[120,1285,1286],{"class":128},"(tzid",[120,1288,133],{"class":132},[120,1290,323],{"class":132},[120,1292,1293],{"class":471}," keepOpen",[120,1295,329],{"class":132},[120,1297,1299],{"class":1298},"sfNiH"," true",[120,1301,348],{"class":132},[120,1303,275],{"class":128},[120,1305,1306,1308,1311,1313,1315,1317,1319,1321,1323,1325,1327,1329,1331,1334,1336,1338,1340],{"class":122,"line":17},[120,1307,236],{"class":235},[120,1309,1310],{"class":128}," second ",[120,1312,139],{"class":132},[120,1314,245],{"class":244},[120,1316,248],{"class":128},[120,1318,98],{"class":132},[120,1320,11],{"class":128},[120,1322,98],{"class":132},[120,1324,70],{"class":125},[120,1326,1286],{"class":128},[120,1328,133],{"class":132},[120,1330,323],{"class":132},[120,1332,1333],{"class":471}," since",[120,1335,329],{"class":132},[120,1337,1269],{"class":128},[120,1339,490],{"class":132},[120,1341,275],{"class":128},[49,1343,278,1344,498,1347,1349,1350,67,1352,1354,1355,1357,1358,6,1360,6,1362,98],{},[53,1345,1346],{},"TimeoutError",[53,1348,281],{}," with code ",[53,1351,847],{},[53,1353,851],{}," when the operation ended without a new code; any other ",[53,1356,281],{}," from ",[53,1359,66],{},[53,1361,74],{},[53,1363,1364],{},"next",[100,1366,1364],{"id":1364},[49,1368,1369],{},"Switch the operation to its next SMS and keep it open (for services that send several SMS).",[111,1371,1373],{"className":113,"code":1372,"language":115,"meta":116,"style":116},"next(tzid: number): Promise\u003Ctrue>\n",[53,1374,1375],{"__ignoreMap":116},[120,1376,1377,1379,1382,1384,1386,1388],{"class":122,"line":12},[120,1378,1364],{"class":125},[120,1380,1381],{"class":128},"(tzid: number): ",[120,1383,150],{"class":149},[120,1385,153],{"class":132},[120,1387,765],{"class":1298},[120,1389,359],{"class":132},[111,1391,1393],{"className":113,"code":1392,"language":115,"meta":116,"style":116},"await client.numbers.next(tzid)\n",[53,1394,1395],{"__ignoreMap":116},[120,1396,1397,1400,1402,1404,1406,1408,1410],{"class":122,"line":12},[120,1398,1399],{"class":244},"await",[120,1401,248],{"class":128},[120,1403,98],{"class":132},[120,1405,11],{"class":128},[120,1407,98],{"class":132},[120,1409,1364],{"class":125},[120,1411,1032],{"class":128},[100,1413,74],{"id":74},[49,1415,1416,1417,1420],{},"Finish the operation. An operation without SMS can be closed only after its guard interval (",[53,1418,1419],{},"guard_interval_remaining_seconds","); every attempt locks the tzid for 5 s.",[111,1422,1424],{"className":113,"code":1423,"language":115,"meta":116,"style":116},"close(tzid: number): Promise\u003Ctrue>\n",[53,1425,1426],{"__ignoreMap":116},[120,1427,1428,1430,1432,1434,1436,1438],{"class":122,"line":12},[120,1429,74],{"class":125},[120,1431,1381],{"class":128},[120,1433,150],{"class":149},[120,1435,153],{"class":132},[120,1437,765],{"class":1298},[120,1439,359],{"class":132},[111,1441,1443],{"className":113,"code":1442,"language":115,"meta":116,"style":116},"await client.numbers.close(tzid)\n",[53,1444,1445],{"__ignoreMap":116},[120,1446,1447,1449,1451,1453,1455,1457,1459],{"class":122,"line":12},[120,1448,1399],{"class":244},[120,1450,248],{"class":128},[120,1452,98],{"class":132},[120,1454,11],{"class":128},[120,1456,98],{"class":132},[120,1458,74],{"class":125},[120,1460,1032],{"class":128},[49,1462,278,1463,282,1465,83,1468,83,1470,98],{},[53,1464,281],{},[53,1466,1467],{},"NO_COMPLETE_TZID",[53,1469,513],{},[53,1471,1472],{},"ERROR_WRONG_TZID",[100,1474,78],{"id":78},[49,1476,1477],{},"Finish the operation and report the number as bad. Only before any SMS arrived.",[111,1479,1481],{"className":113,"code":1480,"language":115,"meta":116,"style":116},"ban(tzid: number): Promise\u003Ctrue>\n",[53,1482,1483],{"__ignoreMap":116},[120,1484,1485,1487,1489,1491,1493,1495],{"class":122,"line":12},[120,1486,78],{"class":125},[120,1488,1381],{"class":128},[120,1490,150],{"class":149},[120,1492,153],{"class":132},[120,1494,765],{"class":1298},[120,1496,359],{"class":132},[111,1498,1500],{"className":113,"code":1499,"language":115,"meta":116,"style":116},"await client.numbers.ban(tzid)\n",[53,1501,1502],{"__ignoreMap":116},[120,1503,1504,1506,1508,1510,1512,1514,1516],{"class":122,"line":12},[120,1505,1399],{"class":244},[120,1507,248],{"class":128},[120,1509,98],{"class":132},[120,1511,11],{"class":128},[120,1513,98],{"class":132},[120,1515,78],{"class":125},[120,1517,1032],{"class":128},[49,1519,654,1520,98],{},[53,1521,74],{},[100,1523,97],{"id":97},[49,1525,1526,1527,98],{},"Services, prices and stock of every country, keyed by country code. No API key needed. The answer is large (a few MB); prefer ",[53,1528,1529],{},"tariffsOne",[111,1531,1533],{"className":113,"code":1532,"language":115,"meta":116,"style":116},"tariffs(): Promise\u003CRecord\u003Cstring, CountryStat>>\n",[53,1534,1535],{"__ignoreMap":116},[120,1536,1537,1539,1542,1544,1546,1549,1551,1553,1555,1558],{"class":122,"line":12},[120,1538,97],{"class":125},[120,1540,1541],{"class":128},"(): ",[120,1543,150],{"class":149},[120,1545,153],{"class":132},[120,1547,1548],{"class":128},"Record",[120,1550,153],{"class":132},[120,1552,200],{"class":128},[120,1554,133],{"class":132},[120,1556,1557],{"class":128}," CountryStat",[120,1559,1560],{"class":132},">>\n",[49,1562,1563,587,1566,498,1569,1572,1573,1576,1577,98],{},[53,1564,1565],{},"CountryStat",[53,1567,1568],{},"{ name, locale_name?, position, code, other?, new, enabled, services }",[53,1570,1571],{},"services"," maps ",[53,1574,1575],{},"service_\u003Cslug>"," to ",[53,1578,1579],{},"{ count, popular, code, price, id, service, slug }",[111,1581,1583],{"className":113,"code":1582,"language":115,"meta":116,"style":116},"const all = await client.numbers.tariffs()\nconsole.log(Object.keys(all).length, 'countries')\n",[53,1584,1585,1609],{"__ignoreMap":116},[120,1586,1587,1589,1592,1594,1596,1598,1600,1602,1604,1606],{"class":122,"line":12},[120,1588,236],{"class":235},[120,1590,1591],{"class":128}," all ",[120,1593,139],{"class":132},[120,1595,245],{"class":244},[120,1597,248],{"class":128},[120,1599,98],{"class":132},[120,1601,11],{"class":128},[120,1603,98],{"class":132},[120,1605,97],{"class":125},[120,1607,1608],{"class":128},"()\n",[120,1610,1611,1614,1616,1618,1621,1623,1626,1629,1631,1634,1636,1638,1641,1643],{"class":122,"line":17},[120,1612,1613],{"class":128},"console",[120,1615,98],{"class":132},[120,1617,922],{"class":125},[120,1619,1620],{"class":128},"(Object",[120,1622,98],{"class":132},[120,1624,1625],{"class":125},"keys",[120,1627,1628],{"class":128},"(all)",[120,1630,98],{"class":132},[120,1632,1633],{"class":128},"length",[120,1635,133],{"class":132},[120,1637,695],{"class":132},[120,1639,1640],{"class":265},"countries",[120,1642,262],{"class":132},[120,1644,275],{"class":128},[100,1646,1529],{"id":1647},"tariffsone",[49,1649,1650],{},"Services, prices and stock of one country.",[111,1652,1654],{"className":113,"code":1653,"language":115,"meta":116,"style":116},"tariffsOne(country = 7): Promise\u003CCountryStat>\n",[53,1655,1656],{"__ignoreMap":116},[120,1657,1658,1660,1663,1665,1667,1669,1671,1673,1675],{"class":122,"line":12},[120,1659,1529],{"class":125},[120,1661,1662],{"class":128},"(country ",[120,1664,139],{"class":132},[120,1666,143],{"class":142},[120,1668,146],{"class":128},[120,1670,150],{"class":149},[120,1672,153],{"class":132},[120,1674,1565],{"class":128},[120,1676,359],{"class":132},[111,1678,1680],{"className":113,"code":1679,"language":115,"meta":116,"style":116},"const uk = await client.numbers.tariffsOne(44)\nfor (const s of Object.values(uk.services)) console.log(s.slug, s.price, s.count)\n",[53,1681,1682,1709],{"__ignoreMap":116},[120,1683,1684,1686,1689,1691,1693,1695,1697,1699,1701,1703,1705,1707],{"class":122,"line":12},[120,1685,236],{"class":235},[120,1687,1688],{"class":128}," uk ",[120,1690,139],{"class":132},[120,1692,245],{"class":244},[120,1694,248],{"class":128},[120,1696,98],{"class":132},[120,1698,11],{"class":128},[120,1700,98],{"class":132},[120,1702,1529],{"class":125},[120,1704,259],{"class":128},[120,1706,86],{"class":142},[120,1708,275],{"class":128},[120,1710,1711,1713,1715,1717,1720,1722,1725,1727,1730,1733,1735,1738,1740,1742,1745,1747,1750,1752,1755,1757,1759,1761,1763,1765],{"class":122,"line":17},[120,1712,865],{"class":244},[120,1714,868],{"class":128},[120,1716,236],{"class":235},[120,1718,1719],{"class":128}," s ",[120,1721,876],{"class":132},[120,1723,1724],{"class":128}," Object",[120,1726,98],{"class":132},[120,1728,1729],{"class":125},"values",[120,1731,1732],{"class":128},"(uk",[120,1734,98],{"class":132},[120,1736,1737],{"class":128},"services)) console",[120,1739,98],{"class":132},[120,1741,922],{"class":125},[120,1743,1744],{"class":128},"(s",[120,1746,98],{"class":132},[120,1748,1749],{"class":128},"slug",[120,1751,133],{"class":132},[120,1753,1754],{"class":128}," s",[120,1756,98],{"class":132},[120,1758,102],{"class":128},[120,1760,133],{"class":132},[120,1762,1754],{"class":128},[120,1764,98],{"class":132},[120,1766,1767],{"class":128},"count)\n",[49,1769,278,1770,282,1772,98],{},[53,1771,281],{},[53,1773,1774],{},"NO_COUNTRY",[1776,1777,1778],"style",{},"html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":116,"searchDepth":17,"depth":17,"links":1780},[1781,1782,1783,1784,1785,1786,1787,1788,1789,1790,1791],{"id":102,"depth":17,"text":102},{"id":59,"depth":17,"text":59},{"id":519,"depth":17,"text":62},{"id":659,"depth":17,"text":659},{"id":958,"depth":17,"text":66},{"id":1080,"depth":17,"text":70},{"id":1364,"depth":17,"text":1364},{"id":74,"depth":17,"text":74},{"id":78,"depth":17,"text":78},{"id":97,"depth":17,"text":97},{"id":1647,"depth":17,"text":1529},"Order a number, read its SMS, close it — client.numbers.","md",{},{"order":12},{"title":9,"description":1792},"OjWWfmyHbWf3Pc_-OuycAVh2ubKacsTcE_bW3s2bLTg",[1799,1801],{"title":24,"path":25,"stem":26,"description":1800,"order":27},"Public numbers and their SMS — client.free. No API key needed.",{"title":14,"path":15,"stem":16,"description":1802,"order":17},"Rent a number for days and receive every SMS sent to it — client.rent.",1795107813730]