[{"data":1,"prerenderedAt":2124},["ShallowReactive",2],{"navigation":3,"\u002Fnumbers":43,"\u002Fnumbers-surround":2119},[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":2113,"extension":2114,"meta":2115,"navigation":2116,"path":10,"seo":2117,"stem":11,"__hash__":2118},"docs\u002Fnumbers.md",{"type":46,"value":47,"toc":2100},"minimark",[48,103,107,114,190,250,301,314,316,319,384,450,508,532,535,541,602,631,683,688,691,694,763,848,929,1017,1020,1023,1081,1147,1155,1158,1161,1295,1440,1458,1523,1545,1548,1640,1642,1645,1674,1696,1707,1709,1716,1744,1765,1776,1778,1781,1809,1830,1840,1842,1848,1880,1944,1987,1990,1993,2028,2089,2096],[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,99,102],"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",". Every method is ",[53,100,101],{},"async throws",".",[104,105,106],"h2",{"id":106},"price",[49,108,109,110,113],{},"Price of one number, USD; ",[53,111,112],{},"nil"," when the country has no price for the service.",[115,116,121],"pre",{"className":117,"code":118,"language":119,"meta":120,"style":120},"language-swift shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","func price(_ service: String, country: Int = 7) async throws -> Double?\n","swift","",[53,122,123],{"__ignoreMap":120},[124,125,127,131,135,139,142,146,150,154,156,160,162,165,168,172,175,178,181,184,187],"span",{"class":126,"line":12},"line",[124,128,130],{"class":129},"spNyl","func",[124,132,134],{"class":133},"s2Zo4"," price",[124,136,138],{"class":137},"sMK4o","(",[124,140,141],{"class":133},"_",[124,143,145],{"class":144},"sHdIc"," service",[124,147,149],{"class":148},"sTEyZ",": ",[124,151,153],{"class":152},"sBMFI","String",[124,155,83],{"class":148},[124,157,159],{"class":158},"sjYur","country",[124,161,149],{"class":148},[124,163,164],{"class":152},"Int",[124,166,167],{"class":137}," =",[124,169,171],{"class":170},"sbssI"," 7",[124,173,174],{"class":137},")",[124,176,177],{"class":129}," async",[124,179,180],{"class":129}," throws",[124,182,183],{"class":137}," ->",[124,185,186],{"class":152}," Double",[124,188,189],{"class":137},"?\n",[191,192,193,212],"table",{},[194,195,196],"thead",{},[197,198,199,203,206,209],"tr",{},[200,201,202],"th",{},"Param",[200,204,205],{},"Type",[200,207,208],{},"Default",[200,210,211],{},"Description",[213,214,215,233],"tbody",{},[197,216,217,223,227,230],{},[218,219,220],"td",{},[53,221,222],{},"service",[218,224,225],{},[53,226,153],{},[218,228,229],{},"—",[218,231,232],{},"Service slug.",[197,234,235,239,243,247],{},[218,236,237],{},[53,238,159],{},[218,240,241],{},[53,242,164],{},[218,244,245],{},[53,246,82],{},[218,248,249],{},"Country code.",[115,251,253],{"className":117,"code":252,"language":119,"meta":120,"style":120},"let usd = try await client.numbers.price(\"google\", country: 44)\n",[53,254,255],{"__ignoreMap":120},[124,256,257,260,263,266,270,273,276,278,280,283,286,288,290,292,295,298],{"class":126,"line":12},[124,258,259],{"class":170},"let",[124,261,262],{"class":148}," usd ",[124,264,265],{"class":137},"=",[124,267,269],{"class":268},"s7zQu"," try",[124,271,272],{"class":268}," await",[124,274,275],{"class":148}," client.numbers.",[124,277,106],{"class":133},[124,279,138],{"class":137},[124,281,282],{"class":137},"\"",[124,284,90],{"class":285},"sfazB",[124,287,282],{"class":137},[124,289,83],{"class":148},[124,291,159],{"class":133},[124,293,294],{"class":137},":",[124,296,297],{"class":170}," 44",[124,299,300],{"class":137},")\n",[49,302,303,304,307,308,83,311,102],{},"Errors: ",[53,305,306],{},".api"," ",[53,309,310],{},"ERROR_NO_SERVICE",[53,312,313],{},"UNDEFINED_COUNTRY",[104,315,59],{"id":59},[49,317,318],{},"Order a number; returns the operation id. Freezes the price on the balance.",[115,320,322],{"className":117,"code":321,"language":119,"meta":120,"style":120},"func get(_ service: String, country: Int = 7, reject: [String] = []) async throws -> Int\n",[53,323,324],{"__ignoreMap":120},[124,325,326,328,331,333,335,337,339,341,343,345,347,349,351,353,355,358,360,363,365,368,370,373,375,377,379,381],{"class":126,"line":12},[124,327,130],{"class":129},[124,329,330],{"class":133}," get",[124,332,138],{"class":137},[124,334,141],{"class":133},[124,336,145],{"class":144},[124,338,149],{"class":148},[124,340,153],{"class":152},[124,342,83],{"class":148},[124,344,159],{"class":158},[124,346,149],{"class":148},[124,348,164],{"class":152},[124,350,167],{"class":137},[124,352,171],{"class":170},[124,354,83],{"class":148},[124,356,357],{"class":158},"reject",[124,359,149],{"class":148},[124,361,362],{"class":137},"[",[124,364,153],{"class":152},[124,366,367],{"class":137},"]",[124,369,167],{"class":137},[124,371,372],{"class":148}," []",[124,374,174],{"class":137},[124,376,177],{"class":129},[124,378,180],{"class":129},[124,380,183],{"class":137},[124,382,383],{"class":152}," Int\n",[191,385,386,398],{},[194,387,388],{},[197,389,390,392,394,396],{},[200,391,202],{},[200,393,205],{},[200,395,208],{},[200,397,211],{},[213,399,400,414,430],{},[197,401,402,406,410,412],{},[218,403,404],{},[53,405,222],{},[218,407,408],{},[53,409,153],{},[218,411,229],{},[218,413,232],{},[197,415,416,420,424,428],{},[218,417,418],{},[53,419,159],{},[218,421,422],{},[53,423,164],{},[218,425,426],{},[53,427,82],{},[218,429,249],{},[197,431,432,436,441,444],{},[218,433,434],{},[53,435,357],{},[218,437,438],{},[53,439,440],{},"[String]",[218,442,443],{},"profile list",[218,445,446,447,102],{},"Number prefixes to skip, e.g. ",[53,448,449],{},"[\"4470\"]",[115,451,453],{"className":117,"code":452,"language":119,"meta":120,"style":120},"let tzid = try await client.numbers.get(\"google\", country: 44, reject: [\"4470\"])\n",[53,454,455],{"__ignoreMap":120},[124,456,457,459,462,464,466,468,470,472,474,476,478,480,482,484,486,488,490,492,494,497,499,502,504,506],{"class":126,"line":12},[124,458,259],{"class":170},[124,460,461],{"class":148}," tzid ",[124,463,265],{"class":137},[124,465,269],{"class":268},[124,467,272],{"class":268},[124,469,275],{"class":148},[124,471,59],{"class":129},[124,473,138],{"class":137},[124,475,282],{"class":137},[124,477,90],{"class":285},[124,479,282],{"class":137},[124,481,83],{"class":148},[124,483,159],{"class":133},[124,485,294],{"class":137},[124,487,297],{"class":170},[124,489,83],{"class":148},[124,491,357],{"class":133},[124,493,294],{"class":137},[124,495,496],{"class":148}," [",[124,498,282],{"class":137},[124,500,501],{"class":285},"4470",[124,503,282],{"class":137},[124,505,367],{"class":148},[124,507,300],{"class":137},[49,509,303,510,513,514,307,516,83,519,83,521,83,523,83,526,83,529,102],{},[53,511,512],{},".noNumber","; ",[53,515,306],{},[53,517,518],{},"WARNING_LOW_BALANCE",[53,520,310],{},[53,522,313],{},[53,524,525],{},"EXCEEDED_CONCURRENT_OPERATIONS",[53,527,528],{},"INTERVAL_CONCURRENT_REQUESTS_ERROR",[53,530,531],{},"TRY_AGAIN_LATER",[104,533,62],{"id":534},"getwithnumber",[49,536,537,538,540],{},"Same as ",[53,539,59],{},", but returns the number right away.",[115,542,544],{"className":117,"code":543,"language":119,"meta":120,"style":120},"func getWithNumber(_ service: String, country: Int = 7, reject: [String] = []) async throws -> NumberOrder\n",[53,545,546],{"__ignoreMap":120},[124,547,548,550,553,555,557,559,561,563,565,567,569,571,573,575,577,579,581,583,585,587,589,591,593,595,597,599],{"class":126,"line":12},[124,549,130],{"class":129},[124,551,552],{"class":133}," getWithNumber",[124,554,138],{"class":137},[124,556,141],{"class":133},[124,558,145],{"class":144},[124,560,149],{"class":148},[124,562,153],{"class":152},[124,564,83],{"class":148},[124,566,159],{"class":158},[124,568,149],{"class":148},[124,570,164],{"class":152},[124,572,167],{"class":137},[124,574,171],{"class":170},[124,576,83],{"class":148},[124,578,357],{"class":158},[124,580,149],{"class":148},[124,582,362],{"class":137},[124,584,153],{"class":152},[124,586,367],{"class":137},[124,588,167],{"class":137},[124,590,372],{"class":148},[124,592,174],{"class":137},[124,594,177],{"class":129},[124,596,180],{"class":129},[124,598,183],{"class":137},[124,600,601],{"class":148}," NumberOrder\n",[49,603,604,149,607,83,609,612,613,616,617,83,619,622,623,83,625,83,628,102],{},[53,605,606],{},"NumberOrder",[53,608,55],{},[53,610,611],{},"number"," (with ",[53,614,615],{},"+","), ",[53,618,159],{},[53,620,621],{},"time"," (seconds left), ",[53,624,222],{},[53,626,627],{},"title?",[53,629,630],{},"guardIntervalRemainingSeconds?",[115,632,634],{"className":117,"code":633,"language":119,"meta":120,"style":120},"let order = try await client.numbers.getWithNumber(\"google\", country: 44)\nprint(order.tzid, order.number)\n",[53,635,636,671],{"__ignoreMap":120},[124,637,638,640,643,645,647,649,651,653,655,657,659,661,663,665,667,669],{"class":126,"line":12},[124,639,259],{"class":170},[124,641,642],{"class":148}," order ",[124,644,265],{"class":137},[124,646,269],{"class":268},[124,648,272],{"class":268},[124,650,275],{"class":148},[124,652,62],{"class":133},[124,654,138],{"class":137},[124,656,282],{"class":137},[124,658,90],{"class":285},[124,660,282],{"class":137},[124,662,83],{"class":148},[124,664,159],{"class":133},[124,666,294],{"class":137},[124,668,297],{"class":170},[124,670,300],{"class":137},[124,672,673,676,678,681],{"class":126,"line":17},[124,674,675],{"class":133},"print",[124,677,138],{"class":137},[124,679,680],{"class":148},"order.tzid, order.number",[124,682,300],{"class":137},[49,684,685,686,102],{},"Errors: as ",[53,687,59],{},[104,689,690],{"id":690},"state",[49,692,693],{},"All operations of the account; empty when there are none.",[115,695,697],{"className":117,"code":696,"language":119,"meta":120,"style":120},"func state(messageToCode: Bool = true, orderBy: OrderBy = .asc, msgList: Bool = false) async throws -> [NumberOperation]\n",[53,698,699],{"__ignoreMap":120},[124,700,701,703,706,708,711,713,716,718,722,724,727,730,732,735,738,740,742,744,747,749,751,753,755,757,760],{"class":126,"line":12},[124,702,130],{"class":129},[124,704,705],{"class":133}," state",[124,707,138],{"class":137},[124,709,710],{"class":158},"messageToCode",[124,712,149],{"class":148},[124,714,715],{"class":152},"Bool",[124,717,167],{"class":137},[124,719,721],{"class":720},"sfNiH"," true",[124,723,83],{"class":148},[124,725,726],{"class":158},"orderBy",[124,728,729],{"class":148},": OrderBy ",[124,731,265],{"class":137},[124,733,734],{"class":148}," .asc, ",[124,736,737],{"class":158},"msgList",[124,739,149],{"class":148},[124,741,715],{"class":152},[124,743,167],{"class":137},[124,745,746],{"class":720}," false",[124,748,174],{"class":137},[124,750,177],{"class":129},[124,752,180],{"class":129},[124,754,183],{"class":137},[124,756,496],{"class":137},[124,758,759],{"class":148},"NumberOperation",[124,761,762],{"class":137},"]\n",[191,764,765,777],{},[194,766,767],{},[197,768,769,771,773,775],{},[200,770,202],{},[200,772,205],{},[200,774,208],{},[200,776,211],{},[213,778,779,804,829],{},[197,780,781,785,789,794],{},[218,782,783],{},[53,784,710],{},[218,786,787],{},[53,788,715],{},[218,790,791],{},[53,792,793],{},"true",[218,795,796,799,800,803],{},[53,797,798],{},"msg"," is the code only; ",[53,801,802],{},"false"," — the full SMS text.",[197,805,806,810,815,820],{},[218,807,808],{},[53,809,726],{},[218,811,812],{},[53,813,814],{},"OrderBy",[218,816,817],{},[53,818,819],{},".asc",[218,821,822,823,83,825,828],{},"Order of operations (",[53,824,819],{},[53,826,827],{},".desc",").",[197,830,831,835,839,843],{},[218,832,833],{},[53,834,737],{},[218,836,837],{},[53,838,715],{},[218,840,841],{},[53,842,802],{},[218,844,845,847],{},[53,846,798],{}," is a list of all SMS.",[49,849,850,149,852,83,854,83,857,83,860,83,863,83,866,83,869,83,872,83,875,877,878,881,882,885,886,888,889,892,893,896,897,900,901,904,905,908,909,881,911,914,915,918,919,922,923,925,926,928],{},[53,851,759],{},[53,853,55],{},[53,855,856],{},"response?",[53,858,859],{},"number?",[53,861,862],{},"service?",[53,864,865],{},"country?",[53,867,868],{},"sum?",[53,870,871],{},"time?",[53,873,874],{},"msg?",[53,876,630],{},", …\n",[53,879,880],{},"response"," is an ",[53,883,884],{},"OperationStatus"," (",[53,887,112],{}," when the server sends none: no number could be issued): ",[53,890,891],{},".tzInPool"," (number being assigned), ",[53,894,895],{},".tzNumWait"," (waiting for SMS), ",[53,898,899],{},".tzNumAnswer"," (SMS arrived), ",[53,902,903],{},".tzOverOk"," (finished), ",[53,906,907],{},".errorNoItems"," (failed). ",[53,910,798],{},[53,912,913],{},"OperationMessage"," — ",[53,916,917],{},".text(String)"," by default, ",[53,920,921],{},".list([OperationSms])"," with ",[53,924,737],{}," — and ",[53,927,112],{}," until the first SMS. The server caches answers for a few seconds.",[115,930,932],{"className":117,"code":931,"language":119,"meta":120,"style":120},"for op in try await client.numbers.state(orderBy: .desc) {\n    print(op.tzid, op.response?.rawValue ?? \"-\", op.msg?.text ?? \"-\")\n}\n",[53,933,934,967,1012],{"__ignoreMap":120},[124,935,936,939,942,945,947,949,951,953,955,957,959,962,964],{"class":126,"line":12},[124,937,938],{"class":268},"for",[124,940,941],{"class":148}," op ",[124,943,944],{"class":268},"in",[124,946,269],{"class":268},[124,948,272],{"class":268},[124,950,275],{"class":148},[124,952,690],{"class":133},[124,954,138],{"class":137},[124,956,726],{"class":133},[124,958,294],{"class":137},[124,960,961],{"class":148}," .desc",[124,963,174],{"class":137},[124,965,966],{"class":137}," {\n",[124,968,969,972,974,977,980,983,986,989,992,994,997,999,1002,1004,1006,1008,1010],{"class":126,"line":17},[124,970,971],{"class":133},"    print",[124,973,138],{"class":137},[124,975,976],{"class":148},"op.tzid, op.response",[124,978,979],{"class":137},"?",[124,981,982],{"class":148},".rawValue ",[124,984,985],{"class":137},"??",[124,987,988],{"class":137}," \"",[124,990,991],{"class":285},"-",[124,993,282],{"class":137},[124,995,996],{"class":148},", op.msg",[124,998,979],{"class":137},[124,1000,1001],{"class":148},".text ",[124,1003,985],{"class":137},[124,1005,988],{"class":137},[124,1007,991],{"class":285},[124,1009,282],{"class":137},[124,1011,300],{"class":137},[124,1013,1014],{"class":126,"line":22},[124,1015,1016],{"class":137},"}\n",[104,1018,66],{"id":1019},"stateone",[49,1021,1022],{},"One operation.",[115,1024,1026],{"className":117,"code":1025,"language":119,"meta":120,"style":120},"func stateOne(_ tzid: Int, messageToCode: Bool = true, msgList: Bool = false) async throws -> NumberOperation\n",[53,1027,1028],{"__ignoreMap":120},[124,1029,1030,1032,1035,1037,1039,1042,1044,1046,1048,1050,1052,1054,1056,1058,1060,1062,1064,1066,1068,1070,1072,1074,1076,1078],{"class":126,"line":12},[124,1031,130],{"class":129},[124,1033,1034],{"class":133}," stateOne",[124,1036,138],{"class":137},[124,1038,141],{"class":133},[124,1040,1041],{"class":144}," tzid",[124,1043,149],{"class":148},[124,1045,164],{"class":152},[124,1047,83],{"class":148},[124,1049,710],{"class":158},[124,1051,149],{"class":148},[124,1053,715],{"class":152},[124,1055,167],{"class":137},[124,1057,721],{"class":720},[124,1059,83],{"class":148},[124,1061,737],{"class":158},[124,1063,149],{"class":148},[124,1065,715],{"class":152},[124,1067,167],{"class":137},[124,1069,746],{"class":720},[124,1071,174],{"class":137},[124,1073,177],{"class":129},[124,1075,180],{"class":129},[124,1077,183],{"class":137},[124,1079,1080],{"class":148}," NumberOperation\n",[115,1082,1084],{"className":117,"code":1083,"language":119,"meta":120,"style":120},"let op = try await client.numbers.stateOne(tzid)\nif op.response == .tzNumAnswer { print(op.msg?.text ?? \"\") }\n",[53,1085,1086,1108],{"__ignoreMap":120},[124,1087,1088,1090,1092,1094,1096,1098,1100,1102,1104,1106],{"class":126,"line":12},[124,1089,259],{"class":170},[124,1091,941],{"class":148},[124,1093,265],{"class":137},[124,1095,269],{"class":268},[124,1097,272],{"class":268},[124,1099,275],{"class":148},[124,1101,66],{"class":133},[124,1103,138],{"class":137},[124,1105,55],{"class":148},[124,1107,300],{"class":137},[124,1109,1110,1113,1116,1119,1122,1125,1128,1130,1133,1135,1137,1139,1142,1144],{"class":126,"line":17},[124,1111,1112],{"class":268},"if",[124,1114,1115],{"class":148}," op.response ",[124,1117,1118],{"class":137},"==",[124,1120,1121],{"class":148}," .tzNumAnswer ",[124,1123,1124],{"class":137},"{",[124,1126,1127],{"class":133}," print",[124,1129,138],{"class":137},[124,1131,1132],{"class":148},"op.msg",[124,1134,979],{"class":137},[124,1136,1001],{"class":148},[124,1138,985],{"class":137},[124,1140,1141],{"class":137}," \"\"",[124,1143,174],{"class":137},[124,1145,1146],{"class":137}," }\n",[49,1148,303,1149,307,1151,1154],{},[53,1150,306],{},[53,1152,1153],{},"ERROR_NO_OPERATIONS"," when the operation does not exist (any more).",[104,1156,70],{"id":1157},"waitcode",[49,1159,1160],{},"Poll the operation until a code arrives, then close it and return the code.",[115,1162,1164],{"className":117,"code":1163,"language":119,"meta":120,"style":120},"func waitCode(\n    _ tzid: Int,\n    interval: TimeInterval = 5,\n    timeout: TimeInterval = 600,\n    keepOpen: Bool = false,\n    fullMessage: Bool = false,\n    since: String? = nil,\n    clock: WaitClock = .system\n) async throws -> String\n",[53,1165,1166,1176,1190,1205,1219,1234,1249,1267,1281],{"__ignoreMap":120},[124,1167,1168,1170,1173],{"class":126,"line":12},[124,1169,130],{"class":129},[124,1171,1172],{"class":133}," waitCode",[124,1174,1175],{"class":137},"(\n",[124,1177,1178,1181,1183,1185,1187],{"class":126,"line":17},[124,1179,1180],{"class":133},"    _",[124,1182,1041],{"class":144},[124,1184,149],{"class":148},[124,1186,164],{"class":152},[124,1188,1189],{"class":148},",\n",[124,1191,1192,1195,1198,1200,1203],{"class":126,"line":22},[124,1193,1194],{"class":158},"    interval",[124,1196,1197],{"class":148},": TimeInterval ",[124,1199,265],{"class":137},[124,1201,1202],{"class":170}," 5",[124,1204,1189],{"class":148},[124,1206,1207,1210,1212,1214,1217],{"class":126,"line":27},[124,1208,1209],{"class":158},"    timeout",[124,1211,1197],{"class":148},[124,1213,265],{"class":137},[124,1215,1216],{"class":170}," 600",[124,1218,1189],{"class":148},[124,1220,1221,1224,1226,1228,1230,1232],{"class":126,"line":32},[124,1222,1223],{"class":158},"    keepOpen",[124,1225,149],{"class":148},[124,1227,715],{"class":152},[124,1229,167],{"class":137},[124,1231,746],{"class":720},[124,1233,1189],{"class":148},[124,1235,1236,1239,1241,1243,1245,1247],{"class":126,"line":37},[124,1237,1238],{"class":158},"    fullMessage",[124,1240,149],{"class":148},[124,1242,715],{"class":152},[124,1244,167],{"class":137},[124,1246,746],{"class":720},[124,1248,1189],{"class":148},[124,1250,1251,1254,1256,1258,1260,1262,1265],{"class":126,"line":42},[124,1252,1253],{"class":158},"    since",[124,1255,149],{"class":148},[124,1257,153],{"class":152},[124,1259,979],{"class":137},[124,1261,167],{"class":137},[124,1263,1264],{"class":137}," nil",[124,1266,1189],{"class":148},[124,1268,1270,1273,1276,1278],{"class":126,"line":1269},8,[124,1271,1272],{"class":158},"    clock",[124,1274,1275],{"class":148},": WaitClock ",[124,1277,265],{"class":137},[124,1279,1280],{"class":148}," .system\n",[124,1282,1284,1286,1288,1290,1292],{"class":126,"line":1283},9,[124,1285,174],{"class":137},[124,1287,177],{"class":129},[124,1289,180],{"class":129},[124,1291,183],{"class":137},[124,1293,1294],{"class":152}," String\n",[191,1296,1297,1309],{},[194,1298,1299],{},[197,1300,1301,1303,1305,1307],{},[200,1302,202],{},[200,1304,205],{},[200,1306,208],{},[200,1308,211],{},[213,1310,1311,1331,1350,1376,1394,1413],{},[197,1312,1313,1318,1323,1328],{},[218,1314,1315],{},[53,1316,1317],{},"interval",[218,1319,1320],{},[53,1321,1322],{},"TimeInterval",[218,1324,1325],{},[53,1326,1327],{},"5",[218,1329,1330],{},"Poll interval, seconds.",[197,1332,1333,1338,1342,1347],{},[218,1334,1335],{},[53,1336,1337],{},"timeout",[218,1339,1340],{},[53,1341,1322],{},[218,1343,1344],{},[53,1345,1346],{},"600",[218,1348,1349],{},"Give up after, seconds.",[197,1351,1352,1357,1361,1365],{},[218,1353,1354],{},[53,1355,1356],{},"keepOpen",[218,1358,1359],{},[53,1360,715],{},[218,1362,1363],{},[53,1364,802],{},[218,1366,1367,1368,1371,1372,1375],{},"Call ",[53,1369,1370],{},"next(tzid)"," instead of ",[53,1373,1374],{},"close(tzid)",", to wait for another SMS.",[197,1377,1378,1383,1387,1391],{},[218,1379,1380],{},[53,1381,1382],{},"fullMessage",[218,1384,1385],{},[53,1386,715],{},[218,1388,1389],{},[53,1390,802],{},[218,1392,1393],{},"Return the full SMS text instead of the code.",[197,1395,1396,1401,1406,1410],{},[218,1397,1398],{},[53,1399,1400],{},"since",[218,1402,1403],{},[53,1404,1405],{},"String?",[218,1407,1408],{},[53,1409,112],{},[218,1411,1412],{},"Ignore this value (the previous code).",[197,1414,1415,1420,1425,1430],{},[218,1416,1417],{},[53,1418,1419],{},"clock",[218,1421,1422],{},[53,1423,1424],{},"WaitClock",[218,1426,1427],{},[53,1428,1429],{},".system",[218,1431,1432,1435,1436,1439],{},[53,1433,1434],{},"now"," and ",[53,1437,1438],{},"sleep","; inject a fake one in tests.",[49,1441,1442,1443,1446,1447,307,1449,1451,1452,1435,1455,1457],{},"Transient errors are retried until the timeout: ",[53,1444,1445],{},".transport",", and ",[53,1448,306],{},[53,1450,531],{}," (the HTTP 429 rate limit), ",[53,1453,1454],{},"ERROR_UNDEFINED",[53,1456,528],{},". Any other API error is thrown at once. Task cancellation stops the wait.",[115,1459,1461],{"className":117,"code":1460,"language":119,"meta":120,"style":120},"let first = try await client.numbers.waitCode(tzid, keepOpen: true)\nlet second = try await client.numbers.waitCode(tzid, since: first)\n",[53,1462,1463,1493],{"__ignoreMap":120},[124,1464,1465,1467,1470,1472,1474,1476,1478,1480,1482,1485,1487,1489,1491],{"class":126,"line":12},[124,1466,259],{"class":170},[124,1468,1469],{"class":148}," first ",[124,1471,265],{"class":137},[124,1473,269],{"class":268},[124,1475,272],{"class":268},[124,1477,275],{"class":148},[124,1479,70],{"class":133},[124,1481,138],{"class":137},[124,1483,1484],{"class":148},"tzid, ",[124,1486,1356],{"class":133},[124,1488,294],{"class":137},[124,1490,721],{"class":720},[124,1492,300],{"class":137},[124,1494,1495,1497,1500,1502,1504,1506,1508,1510,1512,1514,1516,1518,1521],{"class":126,"line":17},[124,1496,259],{"class":170},[124,1498,1499],{"class":148}," second ",[124,1501,265],{"class":137},[124,1503,269],{"class":268},[124,1505,272],{"class":268},[124,1507,275],{"class":148},[124,1509,70],{"class":133},[124,1511,138],{"class":137},[124,1513,1484],{"class":148},[124,1515,1400],{"class":133},[124,1517,294],{"class":137},[124,1519,1520],{"class":148}," first",[124,1522,300],{"class":137},[49,1524,303,1525,513,1528,1530,1531,67,1534,1537,1538,6,1540,6,1542,102],{},[53,1526,1527],{},".waitTimeout",[53,1529,306],{}," with code ",[53,1532,1533],{},"TZ_OVER_OK",[53,1535,1536],{},"ERROR_NO_ITEMS"," when the operation ended without a new code; any other API error from ",[53,1539,66],{},[53,1541,74],{},[53,1543,1544],{},"next",[49,1546,1547],{},"A fake clock for tests: nothing really waits.",[115,1549,1551],{"className":117,"code":1550,"language":119,"meta":120,"style":120},"import OnlineSim\n\nlet instant = WaitClock(now: { 0 }, sleep: { _ in })\nlet code = try await client.numbers.waitCode(tzid, clock: instant)\n",[53,1552,1553,1561,1567,1610],{"__ignoreMap":120},[124,1554,1555,1558],{"class":126,"line":12},[124,1556,1557],{"class":268},"import",[124,1559,1560],{"class":152}," OnlineSim\n",[124,1562,1563],{"class":126,"line":17},[124,1564,1566],{"emptyLinePlaceholder":1565},true,"\n",[124,1568,1569,1571,1574,1576,1579,1581,1583,1585,1588,1591,1594,1596,1598,1600,1602,1605,1607],{"class":126,"line":22},[124,1570,259],{"class":170},[124,1572,1573],{"class":148}," instant ",[124,1575,265],{"class":137},[124,1577,1578],{"class":133}," WaitClock",[124,1580,138],{"class":137},[124,1582,1434],{"class":133},[124,1584,294],{"class":137},[124,1586,1587],{"class":137}," {",[124,1589,1590],{"class":170}," 0",[124,1592,1593],{"class":137}," }",[124,1595,83],{"class":148},[124,1597,1438],{"class":133},[124,1599,294],{"class":137},[124,1601,1587],{"class":137},[124,1603,1604],{"class":148}," _ ",[124,1606,944],{"class":268},[124,1608,1609],{"class":137}," })\n",[124,1611,1612,1614,1617,1619,1621,1623,1625,1627,1629,1631,1633,1635,1638],{"class":126,"line":27},[124,1613,259],{"class":170},[124,1615,1616],{"class":148}," code ",[124,1618,265],{"class":137},[124,1620,269],{"class":268},[124,1622,272],{"class":268},[124,1624,275],{"class":148},[124,1626,70],{"class":133},[124,1628,138],{"class":137},[124,1630,1484],{"class":148},[124,1632,1419],{"class":133},[124,1634,294],{"class":137},[124,1636,1637],{"class":148}," instant",[124,1639,300],{"class":137},[104,1641,1544],{"id":1544},[49,1643,1644],{},"Switch the operation to its next SMS and keep it open (for services that send several SMS).",[115,1646,1648],{"className":117,"code":1647,"language":119,"meta":120,"style":120},"func next(_ tzid: Int) async throws\n",[53,1649,1650],{"__ignoreMap":120},[124,1651,1652,1654,1657,1659,1661,1663,1665,1667,1669,1671],{"class":126,"line":12},[124,1653,130],{"class":129},[124,1655,1656],{"class":133}," next",[124,1658,138],{"class":137},[124,1660,141],{"class":133},[124,1662,1041],{"class":144},[124,1664,149],{"class":148},[124,1666,164],{"class":152},[124,1668,174],{"class":137},[124,1670,177],{"class":129},[124,1672,1673],{"class":129}," throws\n",[115,1675,1677],{"className":117,"code":1676,"language":119,"meta":120,"style":120},"try await client.numbers.next(tzid)\n",[53,1678,1679],{"__ignoreMap":120},[124,1680,1681,1684,1686,1688,1690,1692,1694],{"class":126,"line":12},[124,1682,1683],{"class":268},"try",[124,1685,272],{"class":268},[124,1687,275],{"class":148},[124,1689,1544],{"class":133},[124,1691,138],{"class":137},[124,1693,55],{"class":148},[124,1695,300],{"class":137},[49,1697,303,1698,307,1700,1703,1704,102],{},[53,1699,306],{},[53,1701,1702],{},"ERROR_WRONG_TZID"," (not an operation of your account), ",[53,1705,1706],{},"ERROR_NO_TZID",[104,1708,74],{"id":74},[49,1710,1711,1712,1715],{},"Finish the operation. An operation without SMS can be closed only after its guard interval (",[53,1713,1714],{},"guardIntervalRemainingSeconds","); every attempt locks the tzid for 5 s.",[115,1717,1719],{"className":117,"code":1718,"language":119,"meta":120,"style":120},"func close(_ tzid: Int) async throws\n",[53,1720,1721],{"__ignoreMap":120},[124,1722,1723,1725,1728,1730,1732,1734,1736,1738,1740,1742],{"class":126,"line":12},[124,1724,130],{"class":129},[124,1726,1727],{"class":133}," close",[124,1729,138],{"class":137},[124,1731,141],{"class":133},[124,1733,1041],{"class":144},[124,1735,149],{"class":148},[124,1737,164],{"class":152},[124,1739,174],{"class":137},[124,1741,177],{"class":129},[124,1743,1673],{"class":129},[115,1745,1747],{"className":117,"code":1746,"language":119,"meta":120,"style":120},"try await client.numbers.close(tzid)\n",[53,1748,1749],{"__ignoreMap":120},[124,1750,1751,1753,1755,1757,1759,1761,1763],{"class":126,"line":12},[124,1752,1683],{"class":268},[124,1754,272],{"class":268},[124,1756,275],{"class":148},[124,1758,74],{"class":133},[124,1760,138],{"class":137},[124,1762,55],{"class":148},[124,1764,300],{"class":137},[49,1766,303,1767,307,1769,83,1772,83,1774,102],{},[53,1768,306],{},[53,1770,1771],{},"NO_COMPLETE_TZID",[53,1773,528],{},[53,1775,1702],{},[104,1777,78],{"id":78},[49,1779,1780],{},"Finish the operation and report the number as bad. Only before any SMS arrived.",[115,1782,1784],{"className":117,"code":1783,"language":119,"meta":120,"style":120},"func ban(_ tzid: Int) async throws\n",[53,1785,1786],{"__ignoreMap":120},[124,1787,1788,1790,1793,1795,1797,1799,1801,1803,1805,1807],{"class":126,"line":12},[124,1789,130],{"class":129},[124,1791,1792],{"class":133}," ban",[124,1794,138],{"class":137},[124,1796,141],{"class":133},[124,1798,1041],{"class":144},[124,1800,149],{"class":148},[124,1802,164],{"class":152},[124,1804,174],{"class":137},[124,1806,177],{"class":129},[124,1808,1673],{"class":129},[115,1810,1812],{"className":117,"code":1811,"language":119,"meta":120,"style":120},"try await client.numbers.ban(tzid)\n",[53,1813,1814],{"__ignoreMap":120},[124,1815,1816,1818,1820,1822,1824,1826,1828],{"class":126,"line":12},[124,1817,1683],{"class":268},[124,1819,272],{"class":268},[124,1821,275],{"class":148},[124,1823,78],{"class":133},[124,1825,138],{"class":137},[124,1827,55],{"class":148},[124,1829,300],{"class":137},[49,1831,685,1832,513,1834,1530,1836,1839],{},[53,1833,74],{},[53,1835,306],{},[53,1837,1838],{},"\"0\""," when the operation already has an SMS — nothing is changed then.",[104,1841,97],{"id":97},[49,1843,1844,1845,102],{},"Services, prices and stock of every country, keyed by country code. No API key needed. The answer is large (a few MB); prefer ",[53,1846,1847],{},"tariffsOne",[115,1849,1851],{"className":117,"code":1850,"language":119,"meta":120,"style":120},"func tariffs() async throws -> [Int: CountryStat]\n",[53,1852,1853],{"__ignoreMap":120},[124,1854,1855,1857,1860,1863,1865,1867,1869,1871,1873,1875,1878],{"class":126,"line":12},[124,1856,130],{"class":129},[124,1858,1859],{"class":133}," tariffs",[124,1861,1862],{"class":137},"()",[124,1864,177],{"class":129},[124,1866,180],{"class":129},[124,1868,183],{"class":137},[124,1870,496],{"class":137},[124,1872,164],{"class":152},[124,1874,294],{"class":137},[124,1876,1877],{"class":148}," CountryStat",[124,1879,762],{"class":137},[49,1881,1882,149,1885,83,1888,83,1891,83,1894,83,1896,83,1899,83,1902,83,1905,513,1908,1910,1911,1914,1915,885,1918,83,1921,83,1924,83,1926,83,1928,83,1931,83,1933,1936,1937,1940,1941,1943],{},[53,1883,1884],{},"CountryStat",[53,1886,1887],{},"name",[53,1889,1890],{},"localeName?",[53,1892,1893],{},"position",[53,1895,53],{},[53,1897,1898],{},"other?",[53,1900,1901],{},"isNew",[53,1903,1904],{},"isEnabled",[53,1906,1907],{},"services",[53,1909,1907],{}," maps ",[53,1912,1913],{},"service_\u003Cslug>"," to ",[53,1916,1917],{},"ServiceStat",[53,1919,1920],{},"count?",[53,1922,1923],{},"isPopular",[53,1925,53],{},[53,1927,106],{},[53,1929,1930],{},"id",[53,1932,222],{},[53,1934,1935],{},"slug","). ",[53,1938,1939],{},"count"," is ",[53,1942,112],{}," when the server does not know the stock.",[115,1945,1947],{"className":117,"code":1946,"language":119,"meta":120,"style":120},"let all = try await client.numbers.tariffs()\nprint(all.count, \"countries\")\n",[53,1948,1949,1969],{"__ignoreMap":120},[124,1950,1951,1953,1956,1958,1960,1962,1964,1966],{"class":126,"line":12},[124,1952,259],{"class":170},[124,1954,1955],{"class":148}," all ",[124,1957,265],{"class":137},[124,1959,269],{"class":268},[124,1961,272],{"class":268},[124,1963,275],{"class":148},[124,1965,97],{"class":133},[124,1967,1968],{"class":137},"()\n",[124,1970,1971,1973,1975,1978,1980,1983,1985],{"class":126,"line":17},[124,1972,675],{"class":133},[124,1974,138],{"class":137},[124,1976,1977],{"class":148},"all.count, ",[124,1979,282],{"class":137},[124,1981,1982],{"class":285},"countries",[124,1984,282],{"class":137},[124,1986,300],{"class":137},[104,1988,1847],{"id":1989},"tariffsone",[49,1991,1992],{},"Services, prices and stock of one country.",[115,1994,1996],{"className":117,"code":1995,"language":119,"meta":120,"style":120},"func tariffsOne(country: Int = 7) async throws -> CountryStat\n",[53,1997,1998],{"__ignoreMap":120},[124,1999,2000,2002,2005,2007,2009,2011,2013,2015,2017,2019,2021,2023,2025],{"class":126,"line":12},[124,2001,130],{"class":129},[124,2003,2004],{"class":133}," tariffsOne",[124,2006,138],{"class":137},[124,2008,159],{"class":158},[124,2010,149],{"class":148},[124,2012,164],{"class":152},[124,2014,167],{"class":137},[124,2016,171],{"class":170},[124,2018,174],{"class":137},[124,2020,177],{"class":129},[124,2022,180],{"class":129},[124,2024,183],{"class":137},[124,2026,2027],{"class":148}," CountryStat\n",[115,2029,2031],{"className":117,"code":2030,"language":119,"meta":120,"style":120},"let uk = try await client.numbers.tariffsOne(country: 44)\nfor service in uk.services.values { print(service.slug, service.price, service.count ?? 0) }\n",[53,2032,2033,2060],{"__ignoreMap":120},[124,2034,2035,2037,2040,2042,2044,2046,2048,2050,2052,2054,2056,2058],{"class":126,"line":12},[124,2036,259],{"class":170},[124,2038,2039],{"class":148}," uk ",[124,2041,265],{"class":137},[124,2043,269],{"class":268},[124,2045,272],{"class":268},[124,2047,275],{"class":148},[124,2049,1847],{"class":133},[124,2051,138],{"class":137},[124,2053,159],{"class":133},[124,2055,294],{"class":137},[124,2057,297],{"class":170},[124,2059,300],{"class":137},[124,2061,2062,2064,2067,2069,2072,2074,2076,2078,2081,2083,2085,2087],{"class":126,"line":17},[124,2063,938],{"class":268},[124,2065,2066],{"class":148}," service ",[124,2068,944],{"class":268},[124,2070,2071],{"class":148}," uk.services.values ",[124,2073,1124],{"class":137},[124,2075,1127],{"class":133},[124,2077,138],{"class":137},[124,2079,2080],{"class":148},"service.slug, service.price, service.count ",[124,2082,985],{"class":137},[124,2084,1590],{"class":170},[124,2086,174],{"class":137},[124,2088,1146],{"class":137},[49,2090,303,2091,307,2093,102],{},[53,2092,306],{},[53,2094,2095],{},"NO_COUNTRY",[2097,2098,2099],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sjYur, html code.shiki .sjYur{--shiki-light:#6182B8;--shiki-light-font-style:italic;--shiki-default:#82AAFF;--shiki-default-font-style:italic;--shiki-dark:#82AAFF;--shiki-dark-font-style:italic}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":120,"searchDepth":17,"depth":17,"links":2101},[2102,2103,2104,2105,2106,2107,2108,2109,2110,2111,2112],{"id":106,"depth":17,"text":106},{"id":59,"depth":17,"text":59},{"id":534,"depth":17,"text":62},{"id":690,"depth":17,"text":690},{"id":1019,"depth":17,"text":66},{"id":1157,"depth":17,"text":70},{"id":1544,"depth":17,"text":1544},{"id":74,"depth":17,"text":74},{"id":78,"depth":17,"text":78},{"id":97,"depth":17,"text":97},{"id":1989,"depth":17,"text":1847},"Order a number, read its SMS, close it — client.numbers.","md",{},{"order":12},{"title":9,"description":2113},"IB3bpCn4ATpPpuPuL1z_PdVxrKBzjFpOhlW-Qo-EjWk",[2120,2122],{"title":24,"path":25,"stem":26,"description":2121,"order":27},"Public numbers and their SMS — client.free. No API key needed.",{"title":14,"path":15,"stem":16,"description":2123,"order":17},"Rent a number for days and receive every SMS sent to it — client.rent.",1795164593467]