celitech-sdk 1.1.71 → 1.1.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/.github/workflows/publish_npmjs.yml +1 -0
  2. package/.manifest.json +12 -12
  3. package/README.md +2 -2
  4. package/dist/http/client.d.ts +14 -0
  5. package/dist/http/client.d.ts.map +1 -0
  6. package/dist/http/client.js +36 -0
  7. package/dist/http/client.js.map +1 -0
  8. package/dist/http/environment.d.ts +4 -0
  9. package/dist/http/environment.d.ts.map +1 -0
  10. package/dist/http/environment.js +8 -0
  11. package/dist/http/environment.js.map +1 -0
  12. package/dist/http/error.d.ts +7 -0
  13. package/dist/http/error.d.ts.map +1 -0
  14. package/dist/http/error.js +12 -0
  15. package/dist/http/error.js.map +1 -0
  16. package/dist/http/handlers/handler-chain.d.ts +8 -0
  17. package/dist/http/handlers/handler-chain.d.ts.map +1 -0
  18. package/dist/http/handlers/handler-chain.js +34 -0
  19. package/dist/http/handlers/handler-chain.js.map +1 -0
  20. package/dist/http/handlers/hook-handler.d.ts +12 -0
  21. package/dist/http/handlers/hook-handler.d.ts.map +1 -0
  22. package/dist/http/handlers/hook-handler.js +49 -0
  23. package/dist/http/handlers/hook-handler.js.map +1 -0
  24. package/dist/http/handlers/request-validation-handler.d.ts +9 -0
  25. package/dist/http/handlers/request-validation-handler.d.ts.map +1 -0
  26. package/dist/http/handlers/request-validation-handler.js +78 -0
  27. package/dist/http/handlers/request-validation-handler.js.map +1 -0
  28. package/dist/http/handlers/response-validation-handler.d.ts +11 -0
  29. package/dist/http/handlers/response-validation-handler.d.ts.map +1 -0
  30. package/dist/http/handlers/response-validation-handler.js +89 -0
  31. package/dist/http/handlers/response-validation-handler.js.map +1 -0
  32. package/dist/http/handlers/retry-handler.d.ts +9 -0
  33. package/dist/http/handlers/retry-handler.d.ts.map +1 -0
  34. package/dist/http/handlers/retry-handler.js +47 -0
  35. package/dist/http/handlers/retry-handler.js.map +1 -0
  36. package/dist/http/handlers/terminating-handler.d.ts +8 -0
  37. package/dist/http/handlers/terminating-handler.d.ts.map +1 -0
  38. package/dist/http/handlers/terminating-handler.js +45 -0
  39. package/dist/http/handlers/terminating-handler.js.map +1 -0
  40. package/dist/http/hooks/custom-hook.d.ts +9 -0
  41. package/dist/http/hooks/custom-hook.d.ts.map +1 -0
  42. package/dist/http/hooks/custom-hook.js +84 -0
  43. package/dist/http/hooks/custom-hook.js.map +1 -0
  44. package/dist/http/hooks/hook.d.ts +31 -0
  45. package/dist/http/hooks/hook.d.ts.map +1 -0
  46. package/dist/http/hooks/hook.js +3 -0
  47. package/dist/http/hooks/hook.js.map +1 -0
  48. package/dist/http/index.d.ts +5 -0
  49. package/dist/http/index.d.ts.map +1 -0
  50. package/dist/http/index.js +21 -0
  51. package/dist/http/index.js.map +1 -0
  52. package/dist/http/serializer.d.ts +13 -0
  53. package/dist/http/serializer.d.ts.map +1 -0
  54. package/dist/http/serializer.js +150 -0
  55. package/dist/http/serializer.js.map +1 -0
  56. package/dist/http/transport/request-builder.d.ts +24 -0
  57. package/dist/http/transport/request-builder.d.ts.map +1 -0
  58. package/dist/http/transport/request-builder.js +130 -0
  59. package/dist/http/transport/request-builder.js.map +1 -0
  60. package/dist/http/transport/request.d.ts +53 -0
  61. package/dist/http/transport/request.d.ts.map +1 -0
  62. package/dist/http/transport/request.js +116 -0
  63. package/dist/http/transport/request.js.map +1 -0
  64. package/dist/http/types.d.ts +60 -0
  65. package/dist/http/types.d.ts.map +1 -0
  66. package/dist/http/types.js +16 -0
  67. package/dist/http/types.js.map +1 -0
  68. package/dist/index.d.ts +20 -0
  69. package/dist/index.d.ts.map +1 -0
  70. package/dist/index.js +52 -0
  71. package/dist/index.js.map +1 -0
  72. package/dist/services/base-service.d.ts +14 -0
  73. package/dist/services/base-service.d.ts.map +1 -0
  74. package/dist/services/base-service.js +27 -0
  75. package/dist/services/base-service.js.map +1 -0
  76. package/dist/services/destinations/destinations.d.ts +12 -0
  77. package/dist/services/destinations/destinations.d.ts.map +1 -0
  78. package/dist/services/destinations/destinations.js +43 -0
  79. package/dist/services/destinations/destinations.js.map +1 -0
  80. package/dist/services/destinations/index.d.ts +2 -0
  81. package/dist/services/destinations/index.d.ts.map +1 -0
  82. package/dist/services/destinations/index.js +18 -0
  83. package/dist/services/destinations/index.js.map +1 -0
  84. package/dist/services/destinations/models/destinations.d.ts +76 -0
  85. package/dist/services/destinations/models/destinations.d.ts.map +1 -0
  86. package/dist/services/destinations/models/destinations.js +49 -0
  87. package/dist/services/destinations/models/destinations.js.map +1 -0
  88. package/dist/services/destinations/models/index.d.ts +3 -0
  89. package/dist/services/destinations/models/index.d.ts.map +1 -0
  90. package/dist/services/destinations/models/index.js +19 -0
  91. package/dist/services/destinations/models/index.js.map +1 -0
  92. package/dist/services/destinations/models/list-destinations-ok-response.d.ts +140 -0
  93. package/dist/services/destinations/models/list-destinations-ok-response.d.ts.map +1 -0
  94. package/dist/services/destinations/models/list-destinations-ok-response.js +36 -0
  95. package/dist/services/destinations/models/list-destinations-ok-response.js.map +1 -0
  96. package/dist/services/e-sim/e-sim.d.ts +35 -0
  97. package/dist/services/e-sim/e-sim.d.ts.map +1 -0
  98. package/dist/services/e-sim/e-sim.js +120 -0
  99. package/dist/services/e-sim/e-sim.js.map +1 -0
  100. package/dist/services/e-sim/index.d.ts +2 -0
  101. package/dist/services/e-sim/index.d.ts.map +1 -0
  102. package/dist/services/e-sim/index.js +18 -0
  103. package/dist/services/e-sim/index.js.map +1 -0
  104. package/dist/services/e-sim/models/device.d.ts +90 -0
  105. package/dist/services/e-sim/models/device.d.ts.map +1 -0
  106. package/dist/services/e-sim/models/device.js +54 -0
  107. package/dist/services/e-sim/models/device.js.map +1 -0
  108. package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts +163 -0
  109. package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts.map +1 -0
  110. package/dist/services/e-sim/models/get-esim-device-ok-response.js +36 -0
  111. package/dist/services/e-sim/models/get-esim-device-ok-response.js.map +1 -0
  112. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts +154 -0
  113. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts.map +1 -0
  114. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js +40 -0
  115. package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js.map +1 -0
  116. package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts +249 -0
  117. package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts.map +1 -0
  118. package/dist/services/e-sim/models/get-esim-history-ok-response.js +36 -0
  119. package/dist/services/e-sim/models/get-esim-history-ok-response.js.map +1 -0
  120. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts +76 -0
  121. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts.map +1 -0
  122. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js +49 -0
  123. package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js.map +1 -0
  124. package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts +140 -0
  125. package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts.map +1 -0
  126. package/dist/services/e-sim/models/get-esim-mac-ok-response.js +36 -0
  127. package/dist/services/e-sim/models/get-esim-mac-ok-response.js.map +1 -0
  128. package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts +90 -0
  129. package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts.map +1 -0
  130. package/dist/services/e-sim/models/get-esim-ok-response-esim.js +54 -0
  131. package/dist/services/e-sim/models/get-esim-ok-response-esim.js.map +1 -0
  132. package/dist/services/e-sim/models/get-esim-ok-response.d.ts +163 -0
  133. package/dist/services/e-sim/models/get-esim-ok-response.d.ts.map +1 -0
  134. package/dist/services/e-sim/models/get-esim-ok-response.js +36 -0
  135. package/dist/services/e-sim/models/get-esim-ok-response.js.map +1 -0
  136. package/dist/services/e-sim/models/history.d.ts +76 -0
  137. package/dist/services/e-sim/models/history.d.ts.map +1 -0
  138. package/dist/services/e-sim/models/history.js +45 -0
  139. package/dist/services/e-sim/models/history.js.map +1 -0
  140. package/dist/services/e-sim/models/index.d.ts +10 -0
  141. package/dist/services/e-sim/models/index.d.ts.map +1 -0
  142. package/dist/services/e-sim/models/index.js +26 -0
  143. package/dist/services/e-sim/models/index.js.map +1 -0
  144. package/dist/services/e-sim/request-params.d.ts +4 -0
  145. package/dist/services/e-sim/request-params.d.ts.map +1 -0
  146. package/dist/services/e-sim/request-params.js +3 -0
  147. package/dist/services/e-sim/request-params.js.map +1 -0
  148. package/dist/services/packages/index.d.ts +2 -0
  149. package/dist/services/packages/index.d.ts.map +1 -0
  150. package/dist/services/packages/index.js +18 -0
  151. package/dist/services/packages/index.js.map +1 -0
  152. package/dist/services/packages/models/index.d.ts +3 -0
  153. package/dist/services/packages/models/index.d.ts.map +1 -0
  154. package/dist/services/packages/models/index.js +19 -0
  155. package/dist/services/packages/models/index.js.map +1 -0
  156. package/dist/services/packages/models/list-packages-ok-response.d.ts +223 -0
  157. package/dist/services/packages/models/list-packages-ok-response.d.ts.map +1 -0
  158. package/dist/services/packages/models/list-packages-ok-response.js +42 -0
  159. package/dist/services/packages/models/list-packages-ok-response.js.map +1 -0
  160. package/dist/services/packages/models/packages.d.ts +118 -0
  161. package/dist/services/packages/models/packages.d.ts.map +1 -0
  162. package/dist/services/packages/models/packages.js +64 -0
  163. package/dist/services/packages/models/packages.js.map +1 -0
  164. package/dist/services/packages/packages.d.ts +21 -0
  165. package/dist/services/packages/packages.d.ts.map +1 -0
  166. package/dist/services/packages/packages.js +59 -0
  167. package/dist/services/packages/packages.js.map +1 -0
  168. package/dist/services/packages/request-params.d.ts +11 -0
  169. package/dist/services/packages/request-params.d.ts.map +1 -0
  170. package/dist/services/packages/request-params.js +3 -0
  171. package/dist/services/packages/request-params.js.map +1 -0
  172. package/dist/services/purchases/index.d.ts +2 -0
  173. package/dist/services/purchases/index.d.ts.map +1 -0
  174. package/dist/services/purchases/index.js +18 -0
  175. package/dist/services/purchases/index.js.map +1 -0
  176. package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts +62 -0
  177. package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts.map +1 -0
  178. package/dist/services/purchases/models/create-purchase-ok-response-profile.js +39 -0
  179. package/dist/services/purchases/models/create-purchase-ok-response-profile.js.map +1 -0
  180. package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts +132 -0
  181. package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts.map +1 -0
  182. package/dist/services/purchases/models/create-purchase-ok-response-purchase.js +69 -0
  183. package/dist/services/purchases/models/create-purchase-ok-response-purchase.js.map +1 -0
  184. package/dist/services/purchases/models/create-purchase-ok-response.d.ts +315 -0
  185. package/dist/services/purchases/models/create-purchase-ok-response.d.ts.map +1 -0
  186. package/dist/services/purchases/models/create-purchase-ok-response.js +46 -0
  187. package/dist/services/purchases/models/create-purchase-ok-response.js.map +1 -0
  188. package/dist/services/purchases/models/create-purchase-request.d.ts +160 -0
  189. package/dist/services/purchases/models/create-purchase-request.d.ts.map +1 -0
  190. package/dist/services/purchases/models/create-purchase-request.js +79 -0
  191. package/dist/services/purchases/models/create-purchase-request.js.map +1 -0
  192. package/dist/services/purchases/models/edit-purchase-ok-response.d.ts +104 -0
  193. package/dist/services/purchases/models/edit-purchase-ok-response.d.ts.map +1 -0
  194. package/dist/services/purchases/models/edit-purchase-ok-response.js +59 -0
  195. package/dist/services/purchases/models/edit-purchase-ok-response.js.map +1 -0
  196. package/dist/services/purchases/models/edit-purchase-request.d.ts +104 -0
  197. package/dist/services/purchases/models/edit-purchase-request.d.ts.map +1 -0
  198. package/dist/services/purchases/models/edit-purchase-request.js +59 -0
  199. package/dist/services/purchases/models/edit-purchase-request.js.map +1 -0
  200. package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts +62 -0
  201. package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts.map +1 -0
  202. package/dist/services/purchases/models/get-purchase-consumption-ok-response.js +41 -0
  203. package/dist/services/purchases/models/get-purchase-consumption-ok-response.js.map +1 -0
  204. package/dist/services/purchases/models/index.d.ts +16 -0
  205. package/dist/services/purchases/models/index.d.ts.map +1 -0
  206. package/dist/services/purchases/models/index.js +32 -0
  207. package/dist/services/purchases/models/index.js.map +1 -0
  208. package/dist/services/purchases/models/list-purchases-ok-response.d.ts +622 -0
  209. package/dist/services/purchases/models/list-purchases-ok-response.d.ts.map +1 -0
  210. package/dist/services/purchases/models/list-purchases-ok-response.js +42 -0
  211. package/dist/services/purchases/models/list-purchases-ok-response.js.map +1 -0
  212. package/dist/services/purchases/models/package_.d.ts +104 -0
  213. package/dist/services/purchases/models/package_.d.ts.map +1 -0
  214. package/dist/services/purchases/models/package_.js +59 -0
  215. package/dist/services/purchases/models/package_.js.map +1 -0
  216. package/dist/services/purchases/models/purchases-esim.d.ts +48 -0
  217. package/dist/services/purchases/models/purchases-esim.d.ts.map +1 -0
  218. package/dist/services/purchases/models/purchases-esim.js +35 -0
  219. package/dist/services/purchases/models/purchases-esim.js.map +1 -0
  220. package/dist/services/purchases/models/purchases.d.ts +372 -0
  221. package/dist/services/purchases/models/purchases.d.ts.map +1 -0
  222. package/dist/services/purchases/models/purchases.js +91 -0
  223. package/dist/services/purchases/models/purchases.js.map +1 -0
  224. package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts +48 -0
  225. package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts.map +1 -0
  226. package/dist/services/purchases/models/top-up-esim-ok-response-profile.js +35 -0
  227. package/dist/services/purchases/models/top-up-esim-ok-response-profile.js.map +1 -0
  228. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts +132 -0
  229. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts.map +1 -0
  230. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js +69 -0
  231. package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js.map +1 -0
  232. package/dist/services/purchases/models/top-up-esim-ok-response.d.ts +292 -0
  233. package/dist/services/purchases/models/top-up-esim-ok-response.d.ts.map +1 -0
  234. package/dist/services/purchases/models/top-up-esim-ok-response.js +46 -0
  235. package/dist/services/purchases/models/top-up-esim-ok-response.js.map +1 -0
  236. package/dist/services/purchases/models/top-up-esim-request.d.ts +146 -0
  237. package/dist/services/purchases/models/top-up-esim-request.d.ts.map +1 -0
  238. package/dist/services/purchases/models/top-up-esim-request.js +74 -0
  239. package/dist/services/purchases/models/top-up-esim-request.js.map +1 -0
  240. package/dist/services/purchases/purchases.d.ts +49 -0
  241. package/dist/services/purchases/purchases.d.ts.map +1 -0
  242. package/dist/services/purchases/purchases.js +162 -0
  243. package/dist/services/purchases/purchases.js.map +1 -0
  244. package/dist/services/purchases/request-params.d.ts +11 -0
  245. package/dist/services/purchases/request-params.d.ts.map +1 -0
  246. package/dist/services/purchases/request-params.js +3 -0
  247. package/dist/services/purchases/request-params.js.map +1 -0
  248. package/examples/package.json +1 -1
  249. package/package.json +1 -1
  250. package/src/http/handlers/hook-handler.ts +6 -4
  251. package/src/http/handlers/response-validation-handler.ts +1 -1
  252. package/src/http/handlers/retry-handler.ts +8 -5
  253. package/src/http/hooks/hook.ts +3 -2
  254. package/src/http/serializer.ts +7 -4
  255. package/src/http/transport/request-builder.ts +145 -0
  256. package/src/http/transport/request.ts +45 -36
  257. package/src/services/destinations/destinations.ts +14 -11
  258. package/src/services/destinations/models/destinations.ts +3 -3
  259. package/src/services/destinations/models/list-destinations-ok-response.ts +3 -3
  260. package/src/services/e-sim/e-sim.ts +57 -45
  261. package/src/services/e-sim/models/device.ts +3 -3
  262. package/src/services/e-sim/models/get-esim-device-ok-response.ts +3 -3
  263. package/src/services/e-sim/models/get-esim-history-ok-response-esim.ts +3 -3
  264. package/src/services/e-sim/models/get-esim-history-ok-response.ts +3 -3
  265. package/src/services/e-sim/models/get-esim-mac-ok-response-esim.ts +3 -3
  266. package/src/services/e-sim/models/get-esim-mac-ok-response.ts +3 -3
  267. package/src/services/e-sim/models/get-esim-ok-response-esim.ts +3 -3
  268. package/src/services/e-sim/models/get-esim-ok-response.ts +3 -3
  269. package/src/services/e-sim/models/history.ts +3 -3
  270. package/src/services/packages/models/list-packages-ok-response.ts +3 -3
  271. package/src/services/packages/models/packages.ts +3 -3
  272. package/src/services/packages/packages.ts +22 -19
  273. package/src/services/purchases/models/create-purchase-ok-response-profile.ts +3 -3
  274. package/src/services/purchases/models/create-purchase-ok-response-purchase.ts +3 -3
  275. package/src/services/purchases/models/create-purchase-ok-response.ts +3 -3
  276. package/src/services/purchases/models/create-purchase-request.ts +3 -3
  277. package/src/services/purchases/models/edit-purchase-ok-response.ts +3 -3
  278. package/src/services/purchases/models/edit-purchase-request.ts +3 -3
  279. package/src/services/purchases/models/get-purchase-consumption-ok-response.ts +3 -3
  280. package/src/services/purchases/models/list-purchases-ok-response.ts +3 -3
  281. package/src/services/purchases/models/package_.ts +3 -3
  282. package/src/services/purchases/models/purchases-esim.ts +3 -3
  283. package/src/services/purchases/models/purchases.ts +3 -3
  284. package/src/services/purchases/models/top-up-esim-ok-response-profile.ts +3 -3
  285. package/src/services/purchases/models/top-up-esim-ok-response-purchase.ts +3 -3
  286. package/src/services/purchases/models/top-up-esim-ok-response.ts +3 -3
  287. package/src/services/purchases/models/top-up-esim-request.ts +3 -3
  288. package/src/services/purchases/purchases.ts +81 -66
  289. package/.github/PROTECTED_BRANCHES.txt +0 -1
@@ -13,7 +13,7 @@ import {
13
13
  /**
14
14
  * The shape of the model inside the application code - what the users use
15
15
  */
16
- export const createPurchaseOkResponse: any = z.lazy(() => {
16
+ export const createPurchaseOkResponse = z.lazy(() => {
17
17
  return z.object({
18
18
  purchase: createPurchaseOkResponsePurchase.optional(),
19
19
  profile: createPurchaseOkResponseProfile.optional(),
@@ -32,7 +32,7 @@ export type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
32
32
  * The shape of the model mapping from the api schema into the application shape.
33
33
  * Is equal to application shape if all property names match the api schema
34
34
  */
35
- export const createPurchaseOkResponseResponse: any = z.lazy(() => {
35
+ export const createPurchaseOkResponseResponse = z.lazy(() => {
36
36
  return z
37
37
  .object({
38
38
  purchase: createPurchaseOkResponsePurchaseResponse.optional(),
@@ -48,7 +48,7 @@ export const createPurchaseOkResponseResponse: any = z.lazy(() => {
48
48
  * The shape of the model mapping from the application shape into the api schema.
49
49
  * Is equal to application shape if all property names match the api schema
50
50
  */
51
- export const createPurchaseOkResponseRequest: any = z.lazy(() => {
51
+ export const createPurchaseOkResponseRequest = z.lazy(() => {
52
52
  return z
53
53
  .object({
54
54
  purchase: createPurchaseOkResponsePurchaseRequest.nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const createPurchaseRequest: any = z.lazy(() => {
6
+ export const createPurchaseRequest = z.lazy(() => {
7
7
  return z.object({
8
8
  destination: z.string(),
9
9
  dataLimitInGb: z.number(),
@@ -36,7 +36,7 @@ export type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
36
36
  * The shape of the model mapping from the api schema into the application shape.
37
37
  * Is equal to application shape if all property names match the api schema
38
38
  */
39
- export const createPurchaseRequestResponse: any = z.lazy(() => {
39
+ export const createPurchaseRequestResponse = z.lazy(() => {
40
40
  return z
41
41
  .object({
42
42
  destination: z.string(),
@@ -66,7 +66,7 @@ export const createPurchaseRequestResponse: any = z.lazy(() => {
66
66
  * The shape of the model mapping from the application shape into the api schema.
67
67
  * Is equal to application shape if all property names match the api schema
68
68
  */
69
- export const createPurchaseRequestRequest: any = z.lazy(() => {
69
+ export const createPurchaseRequestRequest = z.lazy(() => {
70
70
  return z
71
71
  .object({
72
72
  destination: z.string().nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const editPurchaseOkResponse: any = z.lazy(() => {
6
+ export const editPurchaseOkResponse = z.lazy(() => {
7
7
  return z.object({
8
8
  purchaseId: z.string().optional(),
9
9
  newStartDate: z.string().optional(),
@@ -28,7 +28,7 @@ export type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
28
28
  * The shape of the model mapping from the api schema into the application shape.
29
29
  * Is equal to application shape if all property names match the api schema
30
30
  */
31
- export const editPurchaseOkResponseResponse: any = z.lazy(() => {
31
+ export const editPurchaseOkResponseResponse = z.lazy(() => {
32
32
  return z
33
33
  .object({
34
34
  purchaseId: z.string().optional(),
@@ -50,7 +50,7 @@ export const editPurchaseOkResponseResponse: any = z.lazy(() => {
50
50
  * The shape of the model mapping from the application shape into the api schema.
51
51
  * Is equal to application shape if all property names match the api schema
52
52
  */
53
- export const editPurchaseOkResponseRequest: any = z.lazy(() => {
53
+ export const editPurchaseOkResponseRequest = z.lazy(() => {
54
54
  return z
55
55
  .object({
56
56
  purchaseId: z.string().nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const editPurchaseRequest: any = z.lazy(() => {
6
+ export const editPurchaseRequest = z.lazy(() => {
7
7
  return z.object({
8
8
  purchaseId: z.string(),
9
9
  startDate: z.string(),
@@ -28,7 +28,7 @@ export type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
28
28
  * The shape of the model mapping from the api schema into the application shape.
29
29
  * Is equal to application shape if all property names match the api schema
30
30
  */
31
- export const editPurchaseRequestResponse: any = z.lazy(() => {
31
+ export const editPurchaseRequestResponse = z.lazy(() => {
32
32
  return z
33
33
  .object({
34
34
  purchaseId: z.string(),
@@ -50,7 +50,7 @@ export const editPurchaseRequestResponse: any = z.lazy(() => {
50
50
  * The shape of the model mapping from the application shape into the api schema.
51
51
  * Is equal to application shape if all property names match the api schema
52
52
  */
53
- export const editPurchaseRequestRequest: any = z.lazy(() => {
53
+ export const editPurchaseRequestRequest = z.lazy(() => {
54
54
  return z
55
55
  .object({
56
56
  purchaseId: z.string().nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const getPurchaseConsumptionOkResponse: any = z.lazy(() => {
6
+ export const getPurchaseConsumptionOkResponse = z.lazy(() => {
7
7
  return z.object({
8
8
  dataUsageRemainingInBytes: z.number().optional(),
9
9
  status: z.string().optional(),
@@ -22,7 +22,7 @@ export type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsump
22
22
  * The shape of the model mapping from the api schema into the application shape.
23
23
  * Is equal to application shape if all property names match the api schema
24
24
  */
25
- export const getPurchaseConsumptionOkResponseResponse: any = z.lazy(() => {
25
+ export const getPurchaseConsumptionOkResponseResponse = z.lazy(() => {
26
26
  return z
27
27
  .object({
28
28
  dataUsageRemainingInBytes: z.number().optional(),
@@ -38,7 +38,7 @@ export const getPurchaseConsumptionOkResponseResponse: any = z.lazy(() => {
38
38
  * The shape of the model mapping from the application shape into the api schema.
39
39
  * Is equal to application shape if all property names match the api schema
40
40
  */
41
- export const getPurchaseConsumptionOkResponseRequest: any = z.lazy(() => {
41
+ export const getPurchaseConsumptionOkResponseRequest = z.lazy(() => {
42
42
  return z
43
43
  .object({ dataUsageRemainingInBytes: z.number().nullish(), status: z.string().nullish() })
44
44
  .transform((data) => ({
@@ -4,7 +4,7 @@ import { purchases, purchasesRequest, purchasesResponse } from './purchases';
4
4
  /**
5
5
  * The shape of the model inside the application code - what the users use
6
6
  */
7
- export const listPurchasesOkResponse: any = z.lazy(() => {
7
+ export const listPurchasesOkResponse = z.lazy(() => {
8
8
  return z.object({
9
9
  purchases: z.array(purchases).optional(),
10
10
  afterCursor: z.string().optional().nullable(),
@@ -23,7 +23,7 @@ export type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
23
23
  * The shape of the model mapping from the api schema into the application shape.
24
24
  * Is equal to application shape if all property names match the api schema
25
25
  */
26
- export const listPurchasesOkResponseResponse: any = z.lazy(() => {
26
+ export const listPurchasesOkResponseResponse = z.lazy(() => {
27
27
  return z
28
28
  .object({
29
29
  purchases: z.array(purchasesResponse).optional(),
@@ -39,7 +39,7 @@ export const listPurchasesOkResponseResponse: any = z.lazy(() => {
39
39
  * The shape of the model mapping from the application shape into the api schema.
40
40
  * Is equal to application shape if all property names match the api schema
41
41
  */
42
- export const listPurchasesOkResponseRequest: any = z.lazy(() => {
42
+ export const listPurchasesOkResponseRequest = z.lazy(() => {
43
43
  return z
44
44
  .object({ purchases: z.array(purchasesRequest).nullish(), afterCursor: z.string().nullish() })
45
45
  .transform((data) => ({
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const package_: any = z.lazy(() => {
6
+ export const package_ = z.lazy(() => {
7
7
  return z.object({
8
8
  id: z.string().optional(),
9
9
  dataLimitInBytes: z.number().optional(),
@@ -28,7 +28,7 @@ export type Package_ = z.infer<typeof package_>;
28
28
  * The shape of the model mapping from the api schema into the application shape.
29
29
  * Is equal to application shape if all property names match the api schema
30
30
  */
31
- export const packageResponse: any = z.lazy(() => {
31
+ export const packageResponse = z.lazy(() => {
32
32
  return z
33
33
  .object({
34
34
  id: z.string().optional(),
@@ -50,7 +50,7 @@ export const packageResponse: any = z.lazy(() => {
50
50
  * The shape of the model mapping from the application shape into the api schema.
51
51
  * Is equal to application shape if all property names match the api schema
52
52
  */
53
- export const packageRequest: any = z.lazy(() => {
53
+ export const packageRequest = z.lazy(() => {
54
54
  return z
55
55
  .object({
56
56
  id: z.string().nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const purchasesEsim: any = z.lazy(() => {
6
+ export const purchasesEsim = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22).optional(),
9
9
  });
@@ -20,7 +20,7 @@ export type PurchasesEsim = z.infer<typeof purchasesEsim>;
20
20
  * The shape of the model mapping from the api schema into the application shape.
21
21
  * Is equal to application shape if all property names match the api schema
22
22
  */
23
- export const purchasesEsimResponse: any = z.lazy(() => {
23
+ export const purchasesEsimResponse = z.lazy(() => {
24
24
  return z
25
25
  .object({
26
26
  iccid: z.string().min(18).max(22).optional(),
@@ -34,7 +34,7 @@ export const purchasesEsimResponse: any = z.lazy(() => {
34
34
  * The shape of the model mapping from the application shape into the api schema.
35
35
  * Is equal to application shape if all property names match the api schema
36
36
  */
37
- export const purchasesEsimRequest: any = z.lazy(() => {
37
+ export const purchasesEsimRequest = z.lazy(() => {
38
38
  return z.object({ iccid: z.string().nullish() }).transform((data) => ({
39
39
  iccid: data['iccid'],
40
40
  }));
@@ -5,7 +5,7 @@ import { purchasesEsim, purchasesEsimRequest, purchasesEsimResponse } from './pu
5
5
  /**
6
6
  * The shape of the model inside the application code - what the users use
7
7
  */
8
- export const purchases: any = z.lazy(() => {
8
+ export const purchases = z.lazy(() => {
9
9
  return z.object({
10
10
  id: z.string().optional(),
11
11
  startDate: z.string().optional(),
@@ -42,7 +42,7 @@ export type Purchases = z.infer<typeof purchases>;
42
42
  * The shape of the model mapping from the api schema into the application shape.
43
43
  * Is equal to application shape if all property names match the api schema
44
44
  */
45
- export const purchasesResponse: any = z.lazy(() => {
45
+ export const purchasesResponse = z.lazy(() => {
46
46
  return z
47
47
  .object({
48
48
  id: z.string().optional(),
@@ -76,7 +76,7 @@ export const purchasesResponse: any = z.lazy(() => {
76
76
  * The shape of the model mapping from the application shape into the api schema.
77
77
  * Is equal to application shape if all property names match the api schema
78
78
  */
79
- export const purchasesRequest: any = z.lazy(() => {
79
+ export const purchasesRequest = z.lazy(() => {
80
80
  return z
81
81
  .object({
82
82
  id: z.string().nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const topUpEsimOkResponseProfile: any = z.lazy(() => {
6
+ export const topUpEsimOkResponseProfile = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22).optional(),
9
9
  });
@@ -20,7 +20,7 @@ export type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfi
20
20
  * The shape of the model mapping from the api schema into the application shape.
21
21
  * Is equal to application shape if all property names match the api schema
22
22
  */
23
- export const topUpEsimOkResponseProfileResponse: any = z.lazy(() => {
23
+ export const topUpEsimOkResponseProfileResponse = z.lazy(() => {
24
24
  return z
25
25
  .object({
26
26
  iccid: z.string().min(18).max(22).optional(),
@@ -34,7 +34,7 @@ export const topUpEsimOkResponseProfileResponse: any = z.lazy(() => {
34
34
  * The shape of the model mapping from the application shape into the api schema.
35
35
  * Is equal to application shape if all property names match the api schema
36
36
  */
37
- export const topUpEsimOkResponseProfileRequest: any = z.lazy(() => {
37
+ export const topUpEsimOkResponseProfileRequest = z.lazy(() => {
38
38
  return z.object({ iccid: z.string().nullish() }).transform((data) => ({
39
39
  iccid: data['iccid'],
40
40
  }));
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const topUpEsimOkResponsePurchase: any = z.lazy(() => {
6
+ export const topUpEsimOkResponsePurchase = z.lazy(() => {
7
7
  return z.object({
8
8
  id: z.string().optional(),
9
9
  packageId: z.string().optional(),
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurc
32
32
  * The shape of the model mapping from the api schema into the application shape.
33
33
  * Is equal to application shape if all property names match the api schema
34
34
  */
35
- export const topUpEsimOkResponsePurchaseResponse: any = z.lazy(() => {
35
+ export const topUpEsimOkResponsePurchaseResponse = z.lazy(() => {
36
36
  return z
37
37
  .object({
38
38
  id: z.string().optional(),
@@ -58,7 +58,7 @@ export const topUpEsimOkResponsePurchaseResponse: any = z.lazy(() => {
58
58
  * The shape of the model mapping from the application shape into the api schema.
59
59
  * Is equal to application shape if all property names match the api schema
60
60
  */
61
- export const topUpEsimOkResponsePurchaseRequest: any = z.lazy(() => {
61
+ export const topUpEsimOkResponsePurchaseRequest = z.lazy(() => {
62
62
  return z
63
63
  .object({
64
64
  id: z.string().nullish(),
@@ -13,7 +13,7 @@ import {
13
13
  /**
14
14
  * The shape of the model inside the application code - what the users use
15
15
  */
16
- export const topUpEsimOkResponse: any = z.lazy(() => {
16
+ export const topUpEsimOkResponse = z.lazy(() => {
17
17
  return z.object({
18
18
  purchase: topUpEsimOkResponsePurchase.optional(),
19
19
  profile: topUpEsimOkResponseProfile.optional(),
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
32
32
  * The shape of the model mapping from the api schema into the application shape.
33
33
  * Is equal to application shape if all property names match the api schema
34
34
  */
35
- export const topUpEsimOkResponseResponse: any = z.lazy(() => {
35
+ export const topUpEsimOkResponseResponse = z.lazy(() => {
36
36
  return z
37
37
  .object({
38
38
  purchase: topUpEsimOkResponsePurchaseResponse.optional(),
@@ -48,7 +48,7 @@ export const topUpEsimOkResponseResponse: any = z.lazy(() => {
48
48
  * The shape of the model mapping from the application shape into the api schema.
49
49
  * Is equal to application shape if all property names match the api schema
50
50
  */
51
- export const topUpEsimOkResponseRequest: any = z.lazy(() => {
51
+ export const topUpEsimOkResponseRequest = z.lazy(() => {
52
52
  return z
53
53
  .object({
54
54
  purchase: topUpEsimOkResponsePurchaseRequest.nullish(),
@@ -3,7 +3,7 @@ import { z } from 'zod';
3
3
  /**
4
4
  * The shape of the model inside the application code - what the users use
5
5
  */
6
- export const topUpEsimRequest: any = z.lazy(() => {
6
+ export const topUpEsimRequest = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22),
9
9
  dataLimitInGb: z.number(),
@@ -34,7 +34,7 @@ export type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
34
34
  * The shape of the model mapping from the api schema into the application shape.
35
35
  * Is equal to application shape if all property names match the api schema
36
36
  */
37
- export const topUpEsimRequestResponse: any = z.lazy(() => {
37
+ export const topUpEsimRequestResponse = z.lazy(() => {
38
38
  return z
39
39
  .object({
40
40
  iccid: z.string().min(18).max(22),
@@ -62,7 +62,7 @@ export const topUpEsimRequestResponse: any = z.lazy(() => {
62
62
  * The shape of the model mapping from the application shape into the api schema.
63
63
  * Is equal to application shape if all property names match the api schema
64
64
  */
65
- export const topUpEsimRequestRequest: any = z.lazy(() => {
65
+ export const topUpEsimRequestRequest = z.lazy(() => {
66
66
  return z
67
67
  .object({
68
68
  iccid: z.string().nullish(),
@@ -2,7 +2,7 @@ import { z } from 'zod';
2
2
  import { BaseService } from '../base-service';
3
3
  import { ContentType, HttpResponse } from '../../http';
4
4
  import { RequestConfig } from '../../http/types';
5
- import { Request } from '../../http/transport/request';
5
+ import { RequestBuilder } from '../../http/transport/request-builder';
6
6
  import { ListPurchasesOkResponse, listPurchasesOkResponseResponse } from './models/list-purchases-ok-response';
7
7
  import { ListPurchasesParams } from './request-params';
8
8
  import { CreatePurchaseRequest, createPurchaseRequestRequest } from './models/create-purchase-request';
@@ -33,24 +33,27 @@ export class PurchasesService extends BaseService {
33
33
  params?: ListPurchasesParams,
34
34
  requestConfig?: RequestConfig,
35
35
  ): Promise<HttpResponse<ListPurchasesOkResponse>> {
36
- const request = new Request({
37
- method: 'GET',
38
- path: '/purchases',
39
- config: this.config,
40
- responseSchema: listPurchasesOkResponseResponse,
41
- requestSchema: z.any(),
42
- requestContentType: ContentType.Json,
43
- responseContentType: ContentType.Json,
44
- requestConfig,
45
- });
46
- request.addQueryParam('iccid', params?.iccid);
47
- request.addQueryParam('afterDate', params?.afterDate);
48
- request.addQueryParam('beforeDate', params?.beforeDate);
49
- request.addQueryParam('referenceId', params?.referenceId);
50
- request.addQueryParam('afterCursor', params?.afterCursor);
51
- request.addQueryParam('limit', params?.limit);
52
- request.addQueryParam('after', params?.after);
53
- request.addQueryParam('before', params?.before);
36
+ const request = new RequestBuilder<ListPurchasesOkResponse>()
37
+ .setConfig(this.config)
38
+ .setBaseUrl(this.config)
39
+ .setMethod('GET')
40
+ .setPath('/purchases')
41
+ .setRequestSchema(z.any())
42
+ .setResponseSchema(listPurchasesOkResponseResponse)
43
+ .setRequestContentType(ContentType.Json)
44
+ .setResponseContentType(ContentType.Json)
45
+ .setRetryAttempts(this.config, requestConfig)
46
+ .setRetryDelayMs(this.config, requestConfig)
47
+ .setResponseValidation(this.config, requestConfig)
48
+ .addQueryParam('iccid', params?.iccid)
49
+ .addQueryParam('afterDate', params?.afterDate)
50
+ .addQueryParam('beforeDate', params?.beforeDate)
51
+ .addQueryParam('referenceId', params?.referenceId)
52
+ .addQueryParam('afterCursor', params?.afterCursor)
53
+ .addQueryParam('limit', params?.limit)
54
+ .addQueryParam('after', params?.after)
55
+ .addQueryParam('before', params?.before)
56
+ .build();
54
57
  return this.client.call<ListPurchasesOkResponse>(request);
55
58
  }
56
59
 
@@ -62,18 +65,21 @@ export class PurchasesService extends BaseService {
62
65
  body: CreatePurchaseRequest,
63
66
  requestConfig?: RequestConfig,
64
67
  ): Promise<HttpResponse<CreatePurchaseOkResponse>> {
65
- const request = new Request({
66
- method: 'POST',
67
- body,
68
- path: '/purchases',
69
- config: this.config,
70
- responseSchema: createPurchaseOkResponseResponse,
71
- requestSchema: createPurchaseRequestRequest,
72
- requestContentType: ContentType.Json,
73
- responseContentType: ContentType.Json,
74
- requestConfig,
75
- });
76
- request.addHeaderParam('Content-Type', 'application/json');
68
+ const request = new RequestBuilder<CreatePurchaseOkResponse>()
69
+ .setConfig(this.config)
70
+ .setBaseUrl(this.config)
71
+ .setMethod('POST')
72
+ .setPath('/purchases')
73
+ .setRequestSchema(createPurchaseRequestRequest)
74
+ .setResponseSchema(createPurchaseOkResponseResponse)
75
+ .setRequestContentType(ContentType.Json)
76
+ .setResponseContentType(ContentType.Json)
77
+ .setRetryAttempts(this.config, requestConfig)
78
+ .setRetryDelayMs(this.config, requestConfig)
79
+ .setResponseValidation(this.config, requestConfig)
80
+ .addHeaderParam('Content-Type', 'application/json')
81
+ .addBody(body)
82
+ .build();
77
83
  return this.client.call<CreatePurchaseOkResponse>(request);
78
84
  }
79
85
 
@@ -82,18 +88,21 @@ export class PurchasesService extends BaseService {
82
88
  * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
83
89
  */
84
90
  async topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>> {
85
- const request = new Request({
86
- method: 'POST',
87
- body,
88
- path: '/purchases/topup',
89
- config: this.config,
90
- responseSchema: topUpEsimOkResponseResponse,
91
- requestSchema: topUpEsimRequestRequest,
92
- requestContentType: ContentType.Json,
93
- responseContentType: ContentType.Json,
94
- requestConfig,
95
- });
96
- request.addHeaderParam('Content-Type', 'application/json');
91
+ const request = new RequestBuilder<TopUpEsimOkResponse>()
92
+ .setConfig(this.config)
93
+ .setBaseUrl(this.config)
94
+ .setMethod('POST')
95
+ .setPath('/purchases/topup')
96
+ .setRequestSchema(topUpEsimRequestRequest)
97
+ .setResponseSchema(topUpEsimOkResponseResponse)
98
+ .setRequestContentType(ContentType.Json)
99
+ .setResponseContentType(ContentType.Json)
100
+ .setRetryAttempts(this.config, requestConfig)
101
+ .setRetryDelayMs(this.config, requestConfig)
102
+ .setResponseValidation(this.config, requestConfig)
103
+ .addHeaderParam('Content-Type', 'application/json')
104
+ .addBody(body)
105
+ .build();
97
106
  return this.client.call<TopUpEsimOkResponse>(request);
98
107
  }
99
108
 
@@ -105,18 +114,21 @@ export class PurchasesService extends BaseService {
105
114
  body: EditPurchaseRequest,
106
115
  requestConfig?: RequestConfig,
107
116
  ): Promise<HttpResponse<EditPurchaseOkResponse>> {
108
- const request = new Request({
109
- method: 'POST',
110
- body,
111
- path: '/purchases/edit',
112
- config: this.config,
113
- responseSchema: editPurchaseOkResponseResponse,
114
- requestSchema: editPurchaseRequestRequest,
115
- requestContentType: ContentType.Json,
116
- responseContentType: ContentType.Json,
117
- requestConfig,
118
- });
119
- request.addHeaderParam('Content-Type', 'application/json');
117
+ const request = new RequestBuilder<EditPurchaseOkResponse>()
118
+ .setConfig(this.config)
119
+ .setBaseUrl(this.config)
120
+ .setMethod('POST')
121
+ .setPath('/purchases/edit')
122
+ .setRequestSchema(editPurchaseRequestRequest)
123
+ .setResponseSchema(editPurchaseOkResponseResponse)
124
+ .setRequestContentType(ContentType.Json)
125
+ .setResponseContentType(ContentType.Json)
126
+ .setRetryAttempts(this.config, requestConfig)
127
+ .setRetryDelayMs(this.config, requestConfig)
128
+ .setResponseValidation(this.config, requestConfig)
129
+ .addHeaderParam('Content-Type', 'application/json')
130
+ .addBody(body)
131
+ .build();
120
132
  return this.client.call<EditPurchaseOkResponse>(request);
121
133
  }
122
134
 
@@ -129,17 +141,20 @@ export class PurchasesService extends BaseService {
129
141
  purchaseId: string,
130
142
  requestConfig?: RequestConfig,
131
143
  ): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>> {
132
- const request = new Request({
133
- method: 'GET',
134
- path: '/purchases/{purchaseId}/consumption',
135
- config: this.config,
136
- responseSchema: getPurchaseConsumptionOkResponseResponse,
137
- requestSchema: z.any(),
138
- requestContentType: ContentType.Json,
139
- responseContentType: ContentType.Json,
140
- requestConfig,
141
- });
142
- request.addPathParam('purchaseId', purchaseId);
144
+ const request = new RequestBuilder<GetPurchaseConsumptionOkResponse>()
145
+ .setConfig(this.config)
146
+ .setBaseUrl(this.config)
147
+ .setMethod('GET')
148
+ .setPath('/purchases/{purchaseId}/consumption')
149
+ .setRequestSchema(z.any())
150
+ .setResponseSchema(getPurchaseConsumptionOkResponseResponse)
151
+ .setRequestContentType(ContentType.Json)
152
+ .setResponseContentType(ContentType.Json)
153
+ .setRetryAttempts(this.config, requestConfig)
154
+ .setRetryDelayMs(this.config, requestConfig)
155
+ .setResponseValidation(this.config, requestConfig)
156
+ .addPathParam('purchaseId', purchaseId)
157
+ .build();
143
158
  return this.client.call<GetPurchaseConsumptionOkResponse>(request);
144
159
  }
145
160
  }
@@ -1 +0,0 @@
1
- main