celitech-sdk 1.1.85 → 1.1.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (340) hide show
  1. package/README.md +24 -18
  2. package/dist/index.d.ts +1503 -12
  3. package/dist/index.js +2152 -76
  4. package/dist/index.mjs +2114 -0
  5. package/package.json +25 -6
  6. package/.devcontainer/devcontainer.json +0 -24
  7. package/.github/workflows/publish_npmjs.yml +0 -32
  8. package/.manifest.json +0 -256
  9. package/dist/http/client.d.ts +0 -14
  10. package/dist/http/client.d.ts.map +0 -1
  11. package/dist/http/client.js +0 -36
  12. package/dist/http/client.js.map +0 -1
  13. package/dist/http/environment.d.ts +0 -4
  14. package/dist/http/environment.d.ts.map +0 -1
  15. package/dist/http/environment.js +0 -8
  16. package/dist/http/environment.js.map +0 -1
  17. package/dist/http/error.d.ts +0 -7
  18. package/dist/http/error.d.ts.map +0 -1
  19. package/dist/http/error.js +0 -12
  20. package/dist/http/error.js.map +0 -1
  21. package/dist/http/handlers/handler-chain.d.ts +0 -8
  22. package/dist/http/handlers/handler-chain.d.ts.map +0 -1
  23. package/dist/http/handlers/handler-chain.js +0 -34
  24. package/dist/http/handlers/handler-chain.js.map +0 -1
  25. package/dist/http/handlers/hook-handler.d.ts +0 -12
  26. package/dist/http/handlers/hook-handler.d.ts.map +0 -1
  27. package/dist/http/handlers/hook-handler.js +0 -49
  28. package/dist/http/handlers/hook-handler.js.map +0 -1
  29. package/dist/http/handlers/request-validation-handler.d.ts +0 -9
  30. package/dist/http/handlers/request-validation-handler.d.ts.map +0 -1
  31. package/dist/http/handlers/request-validation-handler.js +0 -78
  32. package/dist/http/handlers/request-validation-handler.js.map +0 -1
  33. package/dist/http/handlers/response-validation-handler.d.ts +0 -11
  34. package/dist/http/handlers/response-validation-handler.d.ts.map +0 -1
  35. package/dist/http/handlers/response-validation-handler.js +0 -89
  36. package/dist/http/handlers/response-validation-handler.js.map +0 -1
  37. package/dist/http/handlers/retry-handler.d.ts +0 -9
  38. package/dist/http/handlers/retry-handler.d.ts.map +0 -1
  39. package/dist/http/handlers/retry-handler.js +0 -47
  40. package/dist/http/handlers/retry-handler.js.map +0 -1
  41. package/dist/http/handlers/terminating-handler.d.ts +0 -8
  42. package/dist/http/handlers/terminating-handler.d.ts.map +0 -1
  43. package/dist/http/handlers/terminating-handler.js +0 -45
  44. package/dist/http/handlers/terminating-handler.js.map +0 -1
  45. package/dist/http/hooks/custom-hook.d.ts +0 -8
  46. package/dist/http/hooks/custom-hook.d.ts.map +0 -1
  47. package/dist/http/hooks/custom-hook.js +0 -37
  48. package/dist/http/hooks/custom-hook.js.map +0 -1
  49. package/dist/http/hooks/hook.d.ts +0 -31
  50. package/dist/http/hooks/hook.d.ts.map +0 -1
  51. package/dist/http/hooks/hook.js +0 -3
  52. package/dist/http/hooks/hook.js.map +0 -1
  53. package/dist/http/serializer.d.ts +0 -13
  54. package/dist/http/serializer.d.ts.map +0 -1
  55. package/dist/http/serializer.js +0 -150
  56. package/dist/http/serializer.js.map +0 -1
  57. package/dist/http/transport/request-builder.d.ts +0 -24
  58. package/dist/http/transport/request-builder.d.ts.map +0 -1
  59. package/dist/http/transport/request-builder.js +0 -130
  60. package/dist/http/transport/request-builder.js.map +0 -1
  61. package/dist/http/transport/request.d.ts +0 -53
  62. package/dist/http/transport/request.d.ts.map +0 -1
  63. package/dist/http/transport/request.js +0 -116
  64. package/dist/http/transport/request.js.map +0 -1
  65. package/dist/http/types.d.ts +0 -60
  66. package/dist/http/types.d.ts.map +0 -1
  67. package/dist/http/types.js +0 -16
  68. package/dist/http/types.js.map +0 -1
  69. package/dist/index.d.ts.map +0 -1
  70. package/dist/index.js.map +0 -1
  71. package/dist/services/base-service.d.ts +0 -14
  72. package/dist/services/base-service.d.ts.map +0 -1
  73. package/dist/services/base-service.js +0 -27
  74. package/dist/services/base-service.js.map +0 -1
  75. package/dist/services/destinations/destinations.d.ts +0 -11
  76. package/dist/services/destinations/destinations.d.ts.map +0 -1
  77. package/dist/services/destinations/destinations.js +0 -43
  78. package/dist/services/destinations/destinations.js.map +0 -1
  79. package/dist/services/destinations/index.d.ts +0 -3
  80. package/dist/services/destinations/index.d.ts.map +0 -1
  81. package/dist/services/destinations/index.js +0 -21
  82. package/dist/services/destinations/index.js.map +0 -1
  83. package/dist/services/destinations/models/destinations.d.ts +0 -76
  84. package/dist/services/destinations/models/destinations.d.ts.map +0 -1
  85. package/dist/services/destinations/models/destinations.js +0 -49
  86. package/dist/services/destinations/models/destinations.js.map +0 -1
  87. package/dist/services/destinations/models/index.d.ts +0 -3
  88. package/dist/services/destinations/models/index.d.ts.map +0 -1
  89. package/dist/services/destinations/models/index.js +0 -3
  90. package/dist/services/destinations/models/index.js.map +0 -1
  91. package/dist/services/destinations/models/list-destinations-ok-response.d.ts +0 -140
  92. package/dist/services/destinations/models/list-destinations-ok-response.d.ts.map +0 -1
  93. package/dist/services/destinations/models/list-destinations-ok-response.js +0 -36
  94. package/dist/services/destinations/models/list-destinations-ok-response.js.map +0 -1
  95. package/dist/services/e-sim/e-sim.d.ts +0 -34
  96. package/dist/services/e-sim/e-sim.d.ts.map +0 -1
  97. package/dist/services/e-sim/e-sim.js +0 -120
  98. package/dist/services/e-sim/e-sim.js.map +0 -1
  99. package/dist/services/e-sim/index.d.ts +0 -3
  100. package/dist/services/e-sim/index.d.ts.map +0 -1
  101. package/dist/services/e-sim/index.js +0 -21
  102. package/dist/services/e-sim/index.js.map +0 -1
  103. package/dist/services/e-sim/models/device.d.ts +0 -90
  104. package/dist/services/e-sim/models/device.d.ts.map +0 -1
  105. package/dist/services/e-sim/models/device.js +0 -54
  106. package/dist/services/e-sim/models/device.js.map +0 -1
  107. package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts +0 -163
  108. package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts.map +0 -1
  109. package/dist/services/e-sim/models/get-esim-device-ok-response.js +0 -36
  110. package/dist/services/e-sim/models/get-esim-device-ok-response.js.map +0 -1
  111. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts +0 -154
  112. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts.map +0 -1
  113. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js +0 -40
  114. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js.map +0 -1
  115. package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts +0 -249
  116. package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts.map +0 -1
  117. package/dist/services/e-sim/models/get-esim-history-ok-response.js +0 -36
  118. package/dist/services/e-sim/models/get-esim-history-ok-response.js.map +0 -1
  119. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts +0 -76
  120. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts.map +0 -1
  121. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js +0 -49
  122. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js.map +0 -1
  123. package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts +0 -140
  124. package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts.map +0 -1
  125. package/dist/services/e-sim/models/get-esim-mac-ok-response.js +0 -36
  126. package/dist/services/e-sim/models/get-esim-mac-ok-response.js.map +0 -1
  127. package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts +0 -90
  128. package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts.map +0 -1
  129. package/dist/services/e-sim/models/get-esim-ok-response-esim.js +0 -54
  130. package/dist/services/e-sim/models/get-esim-ok-response-esim.js.map +0 -1
  131. package/dist/services/e-sim/models/get-esim-ok-response.d.ts +0 -163
  132. package/dist/services/e-sim/models/get-esim-ok-response.d.ts.map +0 -1
  133. package/dist/services/e-sim/models/get-esim-ok-response.js +0 -36
  134. package/dist/services/e-sim/models/get-esim-ok-response.js.map +0 -1
  135. package/dist/services/e-sim/models/history.d.ts +0 -76
  136. package/dist/services/e-sim/models/history.d.ts.map +0 -1
  137. package/dist/services/e-sim/models/history.js +0 -45
  138. package/dist/services/e-sim/models/history.js.map +0 -1
  139. package/dist/services/e-sim/models/index.d.ts +0 -10
  140. package/dist/services/e-sim/models/index.d.ts.map +0 -1
  141. package/dist/services/e-sim/models/index.js +0 -3
  142. package/dist/services/e-sim/models/index.js.map +0 -1
  143. package/dist/services/e-sim/request-params.d.ts +0 -4
  144. package/dist/services/e-sim/request-params.d.ts.map +0 -1
  145. package/dist/services/e-sim/request-params.js +0 -3
  146. package/dist/services/e-sim/request-params.js.map +0 -1
  147. package/dist/services/packages/index.d.ts +0 -3
  148. package/dist/services/packages/index.d.ts.map +0 -1
  149. package/dist/services/packages/index.js +0 -21
  150. package/dist/services/packages/index.js.map +0 -1
  151. package/dist/services/packages/models/index.d.ts +0 -3
  152. package/dist/services/packages/models/index.d.ts.map +0 -1
  153. package/dist/services/packages/models/index.js +0 -3
  154. package/dist/services/packages/models/index.js.map +0 -1
  155. package/dist/services/packages/models/list-packages-ok-response.d.ts +0 -223
  156. package/dist/services/packages/models/list-packages-ok-response.d.ts.map +0 -1
  157. package/dist/services/packages/models/list-packages-ok-response.js +0 -42
  158. package/dist/services/packages/models/list-packages-ok-response.js.map +0 -1
  159. package/dist/services/packages/models/packages.d.ts +0 -118
  160. package/dist/services/packages/models/packages.d.ts.map +0 -1
  161. package/dist/services/packages/models/packages.js +0 -64
  162. package/dist/services/packages/models/packages.js.map +0 -1
  163. package/dist/services/packages/packages.d.ts +0 -20
  164. package/dist/services/packages/packages.d.ts.map +0 -1
  165. package/dist/services/packages/packages.js +0 -59
  166. package/dist/services/packages/packages.js.map +0 -1
  167. package/dist/services/packages/request-params.d.ts +0 -11
  168. package/dist/services/packages/request-params.d.ts.map +0 -1
  169. package/dist/services/packages/request-params.js +0 -3
  170. package/dist/services/packages/request-params.js.map +0 -1
  171. package/dist/services/purchases/index.d.ts +0 -3
  172. package/dist/services/purchases/index.d.ts.map +0 -1
  173. package/dist/services/purchases/index.js +0 -21
  174. package/dist/services/purchases/index.js.map +0 -1
  175. package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts +0 -62
  176. package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts.map +0 -1
  177. package/dist/services/purchases/models/create-purchase-ok-response-profile.js +0 -39
  178. package/dist/services/purchases/models/create-purchase-ok-response-profile.js.map +0 -1
  179. package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts +0 -132
  180. package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts.map +0 -1
  181. package/dist/services/purchases/models/create-purchase-ok-response-purchase.js +0 -69
  182. package/dist/services/purchases/models/create-purchase-ok-response-purchase.js.map +0 -1
  183. package/dist/services/purchases/models/create-purchase-ok-response.d.ts +0 -315
  184. package/dist/services/purchases/models/create-purchase-ok-response.d.ts.map +0 -1
  185. package/dist/services/purchases/models/create-purchase-ok-response.js +0 -46
  186. package/dist/services/purchases/models/create-purchase-ok-response.js.map +0 -1
  187. package/dist/services/purchases/models/create-purchase-request.d.ts +0 -160
  188. package/dist/services/purchases/models/create-purchase-request.d.ts.map +0 -1
  189. package/dist/services/purchases/models/create-purchase-request.js +0 -79
  190. package/dist/services/purchases/models/create-purchase-request.js.map +0 -1
  191. package/dist/services/purchases/models/edit-purchase-ok-response.d.ts +0 -104
  192. package/dist/services/purchases/models/edit-purchase-ok-response.d.ts.map +0 -1
  193. package/dist/services/purchases/models/edit-purchase-ok-response.js +0 -59
  194. package/dist/services/purchases/models/edit-purchase-ok-response.js.map +0 -1
  195. package/dist/services/purchases/models/edit-purchase-request.d.ts +0 -104
  196. package/dist/services/purchases/models/edit-purchase-request.d.ts.map +0 -1
  197. package/dist/services/purchases/models/edit-purchase-request.js +0 -59
  198. package/dist/services/purchases/models/edit-purchase-request.js.map +0 -1
  199. package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts +0 -62
  200. package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts.map +0 -1
  201. package/dist/services/purchases/models/get-purchase-consumption-ok-response.js +0 -41
  202. package/dist/services/purchases/models/get-purchase-consumption-ok-response.js.map +0 -1
  203. package/dist/services/purchases/models/index.d.ts +0 -16
  204. package/dist/services/purchases/models/index.d.ts.map +0 -1
  205. package/dist/services/purchases/models/index.js +0 -3
  206. package/dist/services/purchases/models/index.js.map +0 -1
  207. package/dist/services/purchases/models/list-purchases-ok-response.d.ts +0 -622
  208. package/dist/services/purchases/models/list-purchases-ok-response.d.ts.map +0 -1
  209. package/dist/services/purchases/models/list-purchases-ok-response.js +0 -42
  210. package/dist/services/purchases/models/list-purchases-ok-response.js.map +0 -1
  211. package/dist/services/purchases/models/package_.d.ts +0 -104
  212. package/dist/services/purchases/models/package_.d.ts.map +0 -1
  213. package/dist/services/purchases/models/package_.js +0 -59
  214. package/dist/services/purchases/models/package_.js.map +0 -1
  215. package/dist/services/purchases/models/purchases-esim.d.ts +0 -48
  216. package/dist/services/purchases/models/purchases-esim.d.ts.map +0 -1
  217. package/dist/services/purchases/models/purchases-esim.js +0 -35
  218. package/dist/services/purchases/models/purchases-esim.js.map +0 -1
  219. package/dist/services/purchases/models/purchases.d.ts +0 -372
  220. package/dist/services/purchases/models/purchases.d.ts.map +0 -1
  221. package/dist/services/purchases/models/purchases.js +0 -91
  222. package/dist/services/purchases/models/purchases.js.map +0 -1
  223. package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts +0 -48
  224. package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts.map +0 -1
  225. package/dist/services/purchases/models/top-up-esim-ok-response-profile.js +0 -35
  226. package/dist/services/purchases/models/top-up-esim-ok-response-profile.js.map +0 -1
  227. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts +0 -132
  228. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts.map +0 -1
  229. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js +0 -69
  230. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js.map +0 -1
  231. package/dist/services/purchases/models/top-up-esim-ok-response.d.ts +0 -292
  232. package/dist/services/purchases/models/top-up-esim-ok-response.d.ts.map +0 -1
  233. package/dist/services/purchases/models/top-up-esim-ok-response.js +0 -46
  234. package/dist/services/purchases/models/top-up-esim-ok-response.js.map +0 -1
  235. package/dist/services/purchases/models/top-up-esim-request.d.ts +0 -146
  236. package/dist/services/purchases/models/top-up-esim-request.d.ts.map +0 -1
  237. package/dist/services/purchases/models/top-up-esim-request.js +0 -74
  238. package/dist/services/purchases/models/top-up-esim-request.js.map +0 -1
  239. package/dist/services/purchases/purchases.d.ts +0 -48
  240. package/dist/services/purchases/purchases.d.ts.map +0 -1
  241. package/dist/services/purchases/purchases.js +0 -162
  242. package/dist/services/purchases/purchases.js.map +0 -1
  243. package/dist/services/purchases/request-params.d.ts +0 -11
  244. package/dist/services/purchases/request-params.d.ts.map +0 -1
  245. package/dist/services/purchases/request-params.js +0 -3
  246. package/dist/services/purchases/request-params.js.map +0 -1
  247. package/documentation/models/CreatePurchaseOkResponse.md +0 -31
  248. package/documentation/models/CreatePurchaseRequest.md +0 -15
  249. package/documentation/models/EditPurchaseOkResponse.md +0 -11
  250. package/documentation/models/EditPurchaseRequest.md +0 -11
  251. package/documentation/models/GetEsimDeviceOkResponse.md +0 -18
  252. package/documentation/models/GetEsimHistoryOkResponse.md +0 -26
  253. package/documentation/models/GetEsimMacOkResponse.md +0 -17
  254. package/documentation/models/GetEsimOkResponse.md +0 -18
  255. package/documentation/models/GetPurchaseConsumptionOkResponse.md +0 -8
  256. package/documentation/models/ListDestinationsOkResponse.md +0 -17
  257. package/documentation/models/ListPackagesOkResponse.md +0 -21
  258. package/documentation/models/ListPurchasesOkResponse.md +0 -46
  259. package/documentation/models/TopUpEsimOkResponse.md +0 -30
  260. package/documentation/models/TopUpEsimRequest.md +0 -14
  261. package/documentation/services/DestinationsService.md +0 -35
  262. package/documentation/services/ESimService.md +0 -148
  263. package/documentation/services/PackagesService.md +0 -48
  264. package/documentation/services/PurchasesService.md +0 -222
  265. package/documentation/snippets/destinations-get.md +0 -14
  266. package/documentation/snippets/esim-get.md +0 -16
  267. package/documentation/snippets/esim-{iccid}-device-get.md +0 -14
  268. package/documentation/snippets/esim-{iccid}-history-get.md +0 -14
  269. package/documentation/snippets/esim-{iccid}-mac-get.md +0 -14
  270. package/documentation/snippets/packages-get.md +0 -14
  271. package/documentation/snippets/purchases-edit-post.md +0 -23
  272. package/documentation/snippets/purchases-get.md +0 -14
  273. package/documentation/snippets/purchases-post.md +0 -27
  274. package/documentation/snippets/purchases-topup-post.md +0 -26
  275. package/documentation/snippets/purchases-{purchaseId}-consumption-get.md +0 -14
  276. package/examples/README.md +0 -27
  277. package/examples/package.json +0 -18
  278. package/examples/src/index.ts +0 -12
  279. package/examples/tsconfig.json +0 -22
  280. package/src/http/client.ts +0 -46
  281. package/src/http/environment.ts +0 -3
  282. package/src/http/error.ts +0 -12
  283. package/src/http/handlers/handler-chain.ts +0 -22
  284. package/src/http/handlers/hook-handler.ts +0 -47
  285. package/src/http/handlers/request-validation-handler.ts +0 -72
  286. package/src/http/handlers/response-validation-handler.ts +0 -106
  287. package/src/http/handlers/retry-handler.ts +0 -40
  288. package/src/http/handlers/terminating-handler.ts +0 -38
  289. package/src/http/hooks/custom-hook.ts +0 -32
  290. package/src/http/hooks/hook.ts +0 -40
  291. package/src/http/serializer.ts +0 -183
  292. package/src/http/transport/request-builder.ts +0 -145
  293. package/src/http/transport/request.ts +0 -178
  294. package/src/http/types.ts +0 -70
  295. package/src/index.ts +0 -73
  296. package/src/services/base-service.ts +0 -29
  297. package/src/services/destinations/destinations.ts +0 -28
  298. package/src/services/destinations/index.ts +0 -2
  299. package/src/services/destinations/models/destinations.ts +0 -57
  300. package/src/services/destinations/models/index.ts +0 -2
  301. package/src/services/destinations/models/list-destinations-ok-response.ts +0 -42
  302. package/src/services/e-sim/e-sim.ts +0 -103
  303. package/src/services/e-sim/index.ts +0 -2
  304. package/src/services/e-sim/models/device.ts +0 -63
  305. package/src/services/e-sim/models/get-esim-device-ok-response.ts +0 -42
  306. package/src/services/e-sim/models/get-esim-history-ok-response-esim.ts +0 -47
  307. package/src/services/e-sim/models/get-esim-history-ok-response.ts +0 -46
  308. package/src/services/e-sim/models/get-esim-mac-ok-response-esim.ts +0 -57
  309. package/src/services/e-sim/models/get-esim-mac-ok-response.ts +0 -46
  310. package/src/services/e-sim/models/get-esim-ok-response-esim.ts +0 -63
  311. package/src/services/e-sim/models/get-esim-ok-response.ts +0 -46
  312. package/src/services/e-sim/models/history.ts +0 -53
  313. package/src/services/e-sim/models/index.ts +0 -9
  314. package/src/services/e-sim/request-params.ts +0 -3
  315. package/src/services/packages/index.ts +0 -2
  316. package/src/services/packages/models/index.ts +0 -2
  317. package/src/services/packages/models/list-packages-ok-response.ts +0 -49
  318. package/src/services/packages/models/packages.ts +0 -75
  319. package/src/services/packages/packages.ts +0 -48
  320. package/src/services/packages/request-params.ts +0 -10
  321. package/src/services/purchases/index.ts +0 -2
  322. package/src/services/purchases/models/create-purchase-ok-response-profile.ts +0 -46
  323. package/src/services/purchases/models/create-purchase-ok-response-purchase.ts +0 -81
  324. package/src/services/purchases/models/create-purchase-ok-response.ts +0 -61
  325. package/src/services/purchases/models/create-purchase-request.ts +0 -93
  326. package/src/services/purchases/models/edit-purchase-ok-response.ts +0 -69
  327. package/src/services/purchases/models/edit-purchase-request.ts +0 -69
  328. package/src/services/purchases/models/get-purchase-consumption-ok-response.ts +0 -48
  329. package/src/services/purchases/models/index.ts +0 -15
  330. package/src/services/purchases/models/list-purchases-ok-response.ts +0 -49
  331. package/src/services/purchases/models/package_.ts +0 -69
  332. package/src/services/purchases/models/purchases-esim.ts +0 -41
  333. package/src/services/purchases/models/purchases.ts +0 -107
  334. package/src/services/purchases/models/top-up-esim-ok-response-profile.ts +0 -41
  335. package/src/services/purchases/models/top-up-esim-ok-response-purchase.ts +0 -81
  336. package/src/services/purchases/models/top-up-esim-ok-response.ts +0 -61
  337. package/src/services/purchases/models/top-up-esim-request.ts +0 -87
  338. package/src/services/purchases/purchases.ts +0 -159
  339. package/src/services/purchases/request-params.ts +0 -10
  340. package/tsconfig.json +0 -22
@@ -1,69 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The shape of the model inside the application code - what the users use
5
- */
6
- export const package_ = z.lazy(() => {
7
- return z.object({
8
- id: z.string().optional(),
9
- dataLimitInBytes: z.number().optional(),
10
- destination: z.string().optional(),
11
- destinationName: z.string().optional(),
12
- priceInCents: z.number().optional(),
13
- });
14
- });
15
-
16
- /**
17
- *
18
- * @typedef {Package_} package_
19
- * @property {string} - ID of the package
20
- * @property {number} - Size of the package in Bytes
21
- * @property {string} - ISO representation of the package's destination
22
- * @property {string} - Name of the package's destination
23
- * @property {number} - Price of the package in cents
24
- */
25
- export type Package_ = z.infer<typeof package_>;
26
-
27
- /**
28
- * The shape of the model mapping from the api schema into the application shape.
29
- * Is equal to application shape if all property names match the api schema
30
- */
31
- export const packageResponse = z.lazy(() => {
32
- return z
33
- .object({
34
- id: z.string().optional(),
35
- dataLimitInBytes: z.number().optional(),
36
- destination: z.string().optional(),
37
- destinationName: z.string().optional(),
38
- priceInCents: z.number().optional(),
39
- })
40
- .transform((data) => ({
41
- id: data['id'],
42
- dataLimitInBytes: data['dataLimitInBytes'],
43
- destination: data['destination'],
44
- destinationName: data['destinationName'],
45
- priceInCents: data['priceInCents'],
46
- }));
47
- });
48
-
49
- /**
50
- * The shape of the model mapping from the application shape into the api schema.
51
- * Is equal to application shape if all property names match the api schema
52
- */
53
- export const packageRequest = z.lazy(() => {
54
- return z
55
- .object({
56
- id: z.string().nullish(),
57
- dataLimitInBytes: z.number().nullish(),
58
- destination: z.string().nullish(),
59
- destinationName: z.string().nullish(),
60
- priceInCents: z.number().nullish(),
61
- })
62
- .transform((data) => ({
63
- id: data['id'],
64
- dataLimitInBytes: data['dataLimitInBytes'],
65
- destination: data['destination'],
66
- destinationName: data['destinationName'],
67
- priceInCents: data['priceInCents'],
68
- }));
69
- });
@@ -1,41 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The shape of the model inside the application code - what the users use
5
- */
6
- export const purchasesEsim = z.lazy(() => {
7
- return z.object({
8
- iccid: z.string().min(18).max(22).optional(),
9
- });
10
- });
11
-
12
- /**
13
- *
14
- * @typedef {PurchasesEsim} purchasesEsim
15
- * @property {string} - ID of the eSIM
16
- */
17
- export type PurchasesEsim = z.infer<typeof purchasesEsim>;
18
-
19
- /**
20
- * The shape of the model mapping from the api schema into the application shape.
21
- * Is equal to application shape if all property names match the api schema
22
- */
23
- export const purchasesEsimResponse = z.lazy(() => {
24
- return z
25
- .object({
26
- iccid: z.string().min(18).max(22).optional(),
27
- })
28
- .transform((data) => ({
29
- iccid: data['iccid'],
30
- }));
31
- });
32
-
33
- /**
34
- * The shape of the model mapping from the application shape into the api schema.
35
- * Is equal to application shape if all property names match the api schema
36
- */
37
- export const purchasesEsimRequest = z.lazy(() => {
38
- return z.object({ iccid: z.string().nullish() }).transform((data) => ({
39
- iccid: data['iccid'],
40
- }));
41
- });
@@ -1,107 +0,0 @@
1
- import { z } from 'zod';
2
- import { packageRequest, packageResponse, package_ } from './package_';
3
- import { purchasesEsim, purchasesEsimRequest, purchasesEsimResponse } from './purchases-esim';
4
-
5
- /**
6
- * The shape of the model inside the application code - what the users use
7
- */
8
- export const purchases = z.lazy(() => {
9
- return z.object({
10
- id: z.string().optional(),
11
- startDate: z.string().optional(),
12
- endDate: z.string().optional(),
13
- createdDate: z.string().optional(),
14
- startTime: z.number().optional(),
15
- endTime: z.number().optional(),
16
- createdAt: z.number().optional(),
17
- package: package_.optional(),
18
- esim: purchasesEsim.optional(),
19
- source: z.string().optional(),
20
- referenceId: z.string().optional(),
21
- });
22
- });
23
-
24
- /**
25
- *
26
- * @typedef {Purchases} purchases
27
- * @property {string} - ID of the purchase
28
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
29
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
30
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
31
- * @property {number} - Epoch value representing the start time of the package's validity
32
- * @property {number} - Epoch value representing the end time of the package's validity
33
- * @property {number} - Epoch value representing the date of creation of the purchase
34
- * @property {Package_}
35
- * @property {PurchasesEsim}
36
- * @property {string} - The source indicates where the eSIM was purchased, which can be from the API, dashboard, landing-page or promo-page. For purchases made before September 8, 2023, the value will be displayed as 'Not available'.
37
- * @property {string} - The referenceId that was provided by the partner during the purchase or topup flow. This identifier can be used for analytics and debugging purposes.
38
- */
39
- export type Purchases = z.infer<typeof purchases>;
40
-
41
- /**
42
- * The shape of the model mapping from the api schema into the application shape.
43
- * Is equal to application shape if all property names match the api schema
44
- */
45
- export const purchasesResponse = z.lazy(() => {
46
- return z
47
- .object({
48
- id: z.string().optional(),
49
- startDate: z.string().optional(),
50
- endDate: z.string().optional(),
51
- createdDate: z.string().optional(),
52
- startTime: z.number().optional(),
53
- endTime: z.number().optional(),
54
- createdAt: z.number().optional(),
55
- package: packageResponse.optional(),
56
- esim: purchasesEsimResponse.optional(),
57
- source: z.string().optional(),
58
- referenceId: z.string().optional(),
59
- })
60
- .transform((data) => ({
61
- id: data['id'],
62
- startDate: data['startDate'],
63
- endDate: data['endDate'],
64
- createdDate: data['createdDate'],
65
- startTime: data['startTime'],
66
- endTime: data['endTime'],
67
- createdAt: data['createdAt'],
68
- package: data['package'],
69
- esim: data['esim'],
70
- source: data['source'],
71
- referenceId: data['referenceId'],
72
- }));
73
- });
74
-
75
- /**
76
- * The shape of the model mapping from the application shape into the api schema.
77
- * Is equal to application shape if all property names match the api schema
78
- */
79
- export const purchasesRequest = z.lazy(() => {
80
- return z
81
- .object({
82
- id: z.string().nullish(),
83
- startDate: z.string().nullish(),
84
- endDate: z.string().nullish(),
85
- createdDate: z.string().nullish(),
86
- startTime: z.number().nullish(),
87
- endTime: z.number().nullish(),
88
- createdAt: z.number().nullish(),
89
- package: packageRequest.nullish(),
90
- esim: purchasesEsimRequest.nullish(),
91
- source: z.string().nullish(),
92
- referenceId: z.string().nullish(),
93
- })
94
- .transform((data) => ({
95
- id: data['id'],
96
- startDate: data['startDate'],
97
- endDate: data['endDate'],
98
- createdDate: data['createdDate'],
99
- startTime: data['startTime'],
100
- endTime: data['endTime'],
101
- createdAt: data['createdAt'],
102
- package: data['package'],
103
- esim: data['esim'],
104
- source: data['source'],
105
- referenceId: data['referenceId'],
106
- }));
107
- });
@@ -1,41 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The shape of the model inside the application code - what the users use
5
- */
6
- export const topUpEsimOkResponseProfile = z.lazy(() => {
7
- return z.object({
8
- iccid: z.string().min(18).max(22).optional(),
9
- });
10
- });
11
-
12
- /**
13
- *
14
- * @typedef {TopUpEsimOkResponseProfile} topUpEsimOkResponseProfile
15
- * @property {string} - ID of the eSIM
16
- */
17
- export type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfile>;
18
-
19
- /**
20
- * The shape of the model mapping from the api schema into the application shape.
21
- * Is equal to application shape if all property names match the api schema
22
- */
23
- export const topUpEsimOkResponseProfileResponse = z.lazy(() => {
24
- return z
25
- .object({
26
- iccid: z.string().min(18).max(22).optional(),
27
- })
28
- .transform((data) => ({
29
- iccid: data['iccid'],
30
- }));
31
- });
32
-
33
- /**
34
- * The shape of the model mapping from the application shape into the api schema.
35
- * Is equal to application shape if all property names match the api schema
36
- */
37
- export const topUpEsimOkResponseProfileRequest = z.lazy(() => {
38
- return z.object({ iccid: z.string().nullish() }).transform((data) => ({
39
- iccid: data['iccid'],
40
- }));
41
- });
@@ -1,81 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The shape of the model inside the application code - what the users use
5
- */
6
- export const topUpEsimOkResponsePurchase = z.lazy(() => {
7
- return z.object({
8
- id: z.string().optional(),
9
- packageId: z.string().optional(),
10
- startDate: z.string().optional(),
11
- endDate: z.string().optional(),
12
- createdDate: z.string().optional(),
13
- startTime: z.number().optional(),
14
- endTime: z.number().optional(),
15
- });
16
- });
17
-
18
- /**
19
- *
20
- * @typedef {TopUpEsimOkResponsePurchase} topUpEsimOkResponsePurchase
21
- * @property {string} - ID of the purchase
22
- * @property {string} - ID of the package
23
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
24
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
25
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
26
- * @property {number} - Epoch value representing the start time of the package's validity
27
- * @property {number} - Epoch value representing the end time of the package's validity
28
- */
29
- export type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurchase>;
30
-
31
- /**
32
- * The shape of the model mapping from the api schema into the application shape.
33
- * Is equal to application shape if all property names match the api schema
34
- */
35
- export const topUpEsimOkResponsePurchaseResponse = z.lazy(() => {
36
- return z
37
- .object({
38
- id: z.string().optional(),
39
- packageId: z.string().optional(),
40
- startDate: z.string().optional(),
41
- endDate: z.string().optional(),
42
- createdDate: z.string().optional(),
43
- startTime: z.number().optional(),
44
- endTime: z.number().optional(),
45
- })
46
- .transform((data) => ({
47
- id: data['id'],
48
- packageId: data['packageId'],
49
- startDate: data['startDate'],
50
- endDate: data['endDate'],
51
- createdDate: data['createdDate'],
52
- startTime: data['startTime'],
53
- endTime: data['endTime'],
54
- }));
55
- });
56
-
57
- /**
58
- * The shape of the model mapping from the application shape into the api schema.
59
- * Is equal to application shape if all property names match the api schema
60
- */
61
- export const topUpEsimOkResponsePurchaseRequest = z.lazy(() => {
62
- return z
63
- .object({
64
- id: z.string().nullish(),
65
- packageId: z.string().nullish(),
66
- startDate: z.string().nullish(),
67
- endDate: z.string().nullish(),
68
- createdDate: z.string().nullish(),
69
- startTime: z.number().nullish(),
70
- endTime: z.number().nullish(),
71
- })
72
- .transform((data) => ({
73
- id: data['id'],
74
- packageId: data['packageId'],
75
- startDate: data['startDate'],
76
- endDate: data['endDate'],
77
- createdDate: data['createdDate'],
78
- startTime: data['startTime'],
79
- endTime: data['endTime'],
80
- }));
81
- });
@@ -1,61 +0,0 @@
1
- import { z } from 'zod';
2
- import {
3
- topUpEsimOkResponsePurchase,
4
- topUpEsimOkResponsePurchaseRequest,
5
- topUpEsimOkResponsePurchaseResponse,
6
- } from './top-up-esim-ok-response-purchase';
7
- import {
8
- topUpEsimOkResponseProfile,
9
- topUpEsimOkResponseProfileRequest,
10
- topUpEsimOkResponseProfileResponse,
11
- } from './top-up-esim-ok-response-profile';
12
-
13
- /**
14
- * The shape of the model inside the application code - what the users use
15
- */
16
- export const topUpEsimOkResponse = z.lazy(() => {
17
- return z.object({
18
- purchase: topUpEsimOkResponsePurchase.optional(),
19
- profile: topUpEsimOkResponseProfile.optional(),
20
- });
21
- });
22
-
23
- /**
24
- *
25
- * @typedef {TopUpEsimOkResponse} topUpEsimOkResponse
26
- * @property {TopUpEsimOkResponsePurchase}
27
- * @property {TopUpEsimOkResponseProfile}
28
- */
29
- export type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
30
-
31
- /**
32
- * The shape of the model mapping from the api schema into the application shape.
33
- * Is equal to application shape if all property names match the api schema
34
- */
35
- export const topUpEsimOkResponseResponse = z.lazy(() => {
36
- return z
37
- .object({
38
- purchase: topUpEsimOkResponsePurchaseResponse.optional(),
39
- profile: topUpEsimOkResponseProfileResponse.optional(),
40
- })
41
- .transform((data) => ({
42
- purchase: data['purchase'],
43
- profile: data['profile'],
44
- }));
45
- });
46
-
47
- /**
48
- * The shape of the model mapping from the application shape into the api schema.
49
- * Is equal to application shape if all property names match the api schema
50
- */
51
- export const topUpEsimOkResponseRequest = z.lazy(() => {
52
- return z
53
- .object({
54
- purchase: topUpEsimOkResponsePurchaseRequest.nullish(),
55
- profile: topUpEsimOkResponseProfileRequest.nullish(),
56
- })
57
- .transform((data) => ({
58
- purchase: data['purchase'],
59
- profile: data['profile'],
60
- }));
61
- });
@@ -1,87 +0,0 @@
1
- import { z } from 'zod';
2
-
3
- /**
4
- * The shape of the model inside the application code - what the users use
5
- */
6
- export const topUpEsimRequest = z.lazy(() => {
7
- return z.object({
8
- iccid: z.string().min(18).max(22),
9
- dataLimitInGb: z.number(),
10
- startDate: z.string(),
11
- endDate: z.string(),
12
- email: z.string().optional(),
13
- referenceId: z.string().optional(),
14
- startTime: z.number().optional(),
15
- endTime: z.number().optional(),
16
- });
17
- });
18
-
19
- /**
20
- *
21
- * @typedef {TopUpEsimRequest} topUpEsimRequest
22
- * @property {string} - ID of the eSIM
23
- * @property {number} - Size of the package in GB. The available options are 1, 2, 3, 5, 8, 20GB
24
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
25
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
26
- * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps)
27
- * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
28
- * @property {number} - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
29
- * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
30
- */
31
- export type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
32
-
33
- /**
34
- * The shape of the model mapping from the api schema into the application shape.
35
- * Is equal to application shape if all property names match the api schema
36
- */
37
- export const topUpEsimRequestResponse = z.lazy(() => {
38
- return z
39
- .object({
40
- iccid: z.string().min(18).max(22),
41
- dataLimitInGB: z.number(),
42
- startDate: z.string(),
43
- endDate: z.string(),
44
- email: z.string().optional(),
45
- referenceId: z.string().optional(),
46
- startTime: z.number().optional(),
47
- endTime: z.number().optional(),
48
- })
49
- .transform((data) => ({
50
- iccid: data['iccid'],
51
- dataLimitInGb: data['dataLimitInGB'],
52
- startDate: data['startDate'],
53
- endDate: data['endDate'],
54
- email: data['email'],
55
- referenceId: data['referenceId'],
56
- startTime: data['startTime'],
57
- endTime: data['endTime'],
58
- }));
59
- });
60
-
61
- /**
62
- * The shape of the model mapping from the application shape into the api schema.
63
- * Is equal to application shape if all property names match the api schema
64
- */
65
- export const topUpEsimRequestRequest = z.lazy(() => {
66
- return z
67
- .object({
68
- iccid: z.string().nullish(),
69
- dataLimitInGb: z.number().nullish(),
70
- startDate: z.string().nullish(),
71
- endDate: z.string().nullish(),
72
- email: z.string().nullish(),
73
- referenceId: z.string().nullish(),
74
- startTime: z.number().nullish(),
75
- endTime: z.number().nullish(),
76
- })
77
- .transform((data) => ({
78
- iccid: data['iccid'],
79
- dataLimitInGB: data['dataLimitInGb'],
80
- startDate: data['startDate'],
81
- endDate: data['endDate'],
82
- email: data['email'],
83
- referenceId: data['referenceId'],
84
- startTime: data['startTime'],
85
- endTime: data['endTime'],
86
- }));
87
- });
@@ -1,159 +0,0 @@
1
- import { z } from 'zod';
2
- import { BaseService } from '../base-service';
3
- import { ContentType, HttpResponse, RequestConfig } from '../../http/types';
4
- import { RequestBuilder } from '../../http/transport/request-builder';
5
- import { ListPurchasesOkResponse, listPurchasesOkResponseResponse } from './models/list-purchases-ok-response';
6
- import { ListPurchasesParams } from './request-params';
7
- import { CreatePurchaseRequest, createPurchaseRequestRequest } from './models/create-purchase-request';
8
- import { CreatePurchaseOkResponse, createPurchaseOkResponseResponse } from './models/create-purchase-ok-response';
9
- import { TopUpEsimRequest, topUpEsimRequestRequest } from './models/top-up-esim-request';
10
- import { TopUpEsimOkResponse, topUpEsimOkResponseResponse } from './models/top-up-esim-ok-response';
11
- import { EditPurchaseRequest, editPurchaseRequestRequest } from './models/edit-purchase-request';
12
- import { EditPurchaseOkResponse, editPurchaseOkResponseResponse } from './models/edit-purchase-ok-response';
13
- import {
14
- GetPurchaseConsumptionOkResponse,
15
- getPurchaseConsumptionOkResponseResponse,
16
- } from './models/get-purchase-consumption-ok-response';
17
-
18
- export class PurchasesService extends BaseService {
19
- /**
20
- * This endpoint can be used to list all the successful purchases made between a given interval.
21
- * @param {string} [iccid] - ID of the eSIM
22
- * @param {string} [afterDate] - Start date of the interval for filtering purchases in the format 'yyyy-MM-dd'
23
- * @param {string} [beforeDate] - End date of the interval for filtering purchases in the format 'yyyy-MM-dd'
24
- * @param {string} [referenceId] - The referenceId that was provided by the partner during the purchase or topup flow.
25
- * @param {string} [afterCursor] - To get the next batch of results, use this parameter. It tells the API where to start fetching data after the last item you received. It helps you avoid repeats and efficiently browse through large sets of data.
26
- * @param {number} [limit] - Maximum number of purchases to be returned in the response. The value must be greater than 0 and less than or equal to 100. If not provided, the default value is 20
27
- * @param {number} [after] - Epoch value representing the start of the time interval for filtering purchases
28
- * @param {number} [before] - Epoch value representing the end of the time interval for filtering purchases
29
- * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
30
- */
31
- async listPurchases(
32
- params?: ListPurchasesParams,
33
- requestConfig?: RequestConfig,
34
- ): Promise<HttpResponse<ListPurchasesOkResponse>> {
35
- const request = new RequestBuilder<ListPurchasesOkResponse>()
36
- .setConfig(this.config)
37
- .setBaseUrl(this.config)
38
- .setMethod('GET')
39
- .setPath('/purchases')
40
- .setRequestSchema(z.any())
41
- .setResponseSchema(listPurchasesOkResponseResponse)
42
- .setRequestContentType(ContentType.Json)
43
- .setResponseContentType(ContentType.Json)
44
- .setRetryAttempts(this.config, requestConfig)
45
- .setRetryDelayMs(this.config, requestConfig)
46
- .setResponseValidation(this.config, requestConfig)
47
- .addQueryParam('iccid', params?.iccid)
48
- .addQueryParam('afterDate', params?.afterDate)
49
- .addQueryParam('beforeDate', params?.beforeDate)
50
- .addQueryParam('referenceId', params?.referenceId)
51
- .addQueryParam('afterCursor', params?.afterCursor)
52
- .addQueryParam('limit', params?.limit)
53
- .addQueryParam('after', params?.after)
54
- .addQueryParam('before', params?.before)
55
- .build();
56
- return this.client.call<ListPurchasesOkResponse>(request);
57
- }
58
-
59
- /**
60
- * This endpoint is used to purchase a new eSIM by providing the package details.
61
- * @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} Successful Response
62
- */
63
- async createPurchase(
64
- body: CreatePurchaseRequest,
65
- requestConfig?: RequestConfig,
66
- ): Promise<HttpResponse<CreatePurchaseOkResponse>> {
67
- const request = new RequestBuilder<CreatePurchaseOkResponse>()
68
- .setConfig(this.config)
69
- .setBaseUrl(this.config)
70
- .setMethod('POST')
71
- .setPath('/purchases')
72
- .setRequestSchema(createPurchaseRequestRequest)
73
- .setResponseSchema(createPurchaseOkResponseResponse)
74
- .setRequestContentType(ContentType.Json)
75
- .setResponseContentType(ContentType.Json)
76
- .setRetryAttempts(this.config, requestConfig)
77
- .setRetryDelayMs(this.config, requestConfig)
78
- .setResponseValidation(this.config, requestConfig)
79
- .addHeaderParam('Content-Type', 'application/json')
80
- .addBody(body)
81
- .build();
82
- return this.client.call<CreatePurchaseOkResponse>(request);
83
- }
84
-
85
- /**
86
- * This endpoint is used to top-up an eSIM with the previously associated destination by providing an existing ICCID and the package details. The top-up is not feasible for eSIMs in "DELETED" or "ERROR" state.
87
- * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
88
- */
89
- async topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>> {
90
- const request = new RequestBuilder<TopUpEsimOkResponse>()
91
- .setConfig(this.config)
92
- .setBaseUrl(this.config)
93
- .setMethod('POST')
94
- .setPath('/purchases/topup')
95
- .setRequestSchema(topUpEsimRequestRequest)
96
- .setResponseSchema(topUpEsimOkResponseResponse)
97
- .setRequestContentType(ContentType.Json)
98
- .setResponseContentType(ContentType.Json)
99
- .setRetryAttempts(this.config, requestConfig)
100
- .setRetryDelayMs(this.config, requestConfig)
101
- .setResponseValidation(this.config, requestConfig)
102
- .addHeaderParam('Content-Type', 'application/json')
103
- .addBody(body)
104
- .build();
105
- return this.client.call<TopUpEsimOkResponse>(request);
106
- }
107
-
108
- /**
109
- * This endpoint allows you to modify the dates of an existing package with a future activation start time. Editing can only be performed for packages that have not been activated, and it cannot change the package size. The modification must not change the package duration category to ensure pricing consistency.
110
- * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
111
- */
112
- async editPurchase(
113
- body: EditPurchaseRequest,
114
- requestConfig?: RequestConfig,
115
- ): Promise<HttpResponse<EditPurchaseOkResponse>> {
116
- const request = new RequestBuilder<EditPurchaseOkResponse>()
117
- .setConfig(this.config)
118
- .setBaseUrl(this.config)
119
- .setMethod('POST')
120
- .setPath('/purchases/edit')
121
- .setRequestSchema(editPurchaseRequestRequest)
122
- .setResponseSchema(editPurchaseOkResponseResponse)
123
- .setRequestContentType(ContentType.Json)
124
- .setResponseContentType(ContentType.Json)
125
- .setRetryAttempts(this.config, requestConfig)
126
- .setRetryDelayMs(this.config, requestConfig)
127
- .setResponseValidation(this.config, requestConfig)
128
- .addHeaderParam('Content-Type', 'application/json')
129
- .addBody(body)
130
- .build();
131
- return this.client.call<EditPurchaseOkResponse>(request);
132
- }
133
-
134
- /**
135
- * This endpoint can be called for consumption notifications (e.g. every 1 hour or when the user clicks a button). It returns the data balance (consumption) of purchased packages.
136
- * @param {string} purchaseId - ID of the purchase
137
- * @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} Successful Response
138
- */
139
- async getPurchaseConsumption(
140
- purchaseId: string,
141
- requestConfig?: RequestConfig,
142
- ): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>> {
143
- const request = new RequestBuilder<GetPurchaseConsumptionOkResponse>()
144
- .setConfig(this.config)
145
- .setBaseUrl(this.config)
146
- .setMethod('GET')
147
- .setPath('/purchases/{purchaseId}/consumption')
148
- .setRequestSchema(z.any())
149
- .setResponseSchema(getPurchaseConsumptionOkResponseResponse)
150
- .setRequestContentType(ContentType.Json)
151
- .setResponseContentType(ContentType.Json)
152
- .setRetryAttempts(this.config, requestConfig)
153
- .setRetryDelayMs(this.config, requestConfig)
154
- .setResponseValidation(this.config, requestConfig)
155
- .addPathParam('purchaseId', purchaseId)
156
- .build();
157
- return this.client.call<GetPurchaseConsumptionOkResponse>(request);
158
- }
159
- }
@@ -1,10 +0,0 @@
1
- export interface ListPurchasesParams {
2
- iccid?: string;
3
- afterDate?: string;
4
- beforeDate?: string;
5
- referenceId?: string;
6
- afterCursor?: string;
7
- limit?: number;
8
- after?: number;
9
- before?: number;
10
- }
package/tsconfig.json DELETED
@@ -1,22 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es6",
4
- "module": "commonjs",
5
- "esModuleInterop": true,
6
- "forceConsistentCasingInFileNames": true,
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "outDir": "./dist",
10
- "rootDir": "./src",
11
- "noImplicitAny": true,
12
- "baseUrl": "./",
13
- "declaration": true,
14
- "moduleResolution": "node",
15
- "isolatedModules": true,
16
- "allowSyntheticDefaultImports": true,
17
- "declarationMap": true,
18
- "lib": ["es2017", "dom"],
19
- "sourceMap": true
20
- },
21
- "include": ["src/"]
22
- }