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
@@ -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 { ListDestinationsOkResponse, listDestinationsOkResponseResponse } from './models/list-destinations-ok-response';
7
7
 
8
8
  export class DestinationsService extends BaseService {
@@ -11,16 +11,19 @@ export class DestinationsService extends BaseService {
11
11
  * @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} Successful Response
12
12
  */
13
13
  async listDestinations(requestConfig?: RequestConfig): Promise<HttpResponse<ListDestinationsOkResponse>> {
14
- const request = new Request({
15
- method: 'GET',
16
- path: '/destinations',
17
- config: this.config,
18
- responseSchema: listDestinationsOkResponseResponse,
19
- requestSchema: z.any(),
20
- requestContentType: ContentType.Json,
21
- responseContentType: ContentType.Json,
22
- requestConfig,
23
- });
14
+ const request = new RequestBuilder<ListDestinationsOkResponse>()
15
+ .setConfig(this.config)
16
+ .setBaseUrl(this.config)
17
+ .setMethod('GET')
18
+ .setPath('/destinations')
19
+ .setRequestSchema(z.any())
20
+ .setResponseSchema(listDestinationsOkResponseResponse)
21
+ .setRequestContentType(ContentType.Json)
22
+ .setResponseContentType(ContentType.Json)
23
+ .setRetryAttempts(this.config, requestConfig)
24
+ .setRetryDelayMs(this.config, requestConfig)
25
+ .setResponseValidation(this.config, requestConfig)
26
+ .build();
24
27
  return this.client.call<ListDestinationsOkResponse>(request);
25
28
  }
26
29
  }
@@ -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 destinations: any = z.lazy(() => {
6
+ export const destinations = z.lazy(() => {
7
7
  return z.object({
8
8
  name: z.string().optional(),
9
9
  destination: z.string().optional(),
@@ -24,7 +24,7 @@ export type Destinations = z.infer<typeof destinations>;
24
24
  * The shape of the model mapping from the api schema into the application shape.
25
25
  * Is equal to application shape if all property names match the api schema
26
26
  */
27
- export const destinationsResponse: any = z.lazy(() => {
27
+ export const destinationsResponse = z.lazy(() => {
28
28
  return z
29
29
  .object({
30
30
  name: z.string().optional(),
@@ -42,7 +42,7 @@ export const destinationsResponse: any = z.lazy(() => {
42
42
  * The shape of the model mapping from the application shape into the api schema.
43
43
  * Is equal to application shape if all property names match the api schema
44
44
  */
45
- export const destinationsRequest: any = z.lazy(() => {
45
+ export const destinationsRequest = z.lazy(() => {
46
46
  return z
47
47
  .object({
48
48
  name: z.string().nullish(),
@@ -4,7 +4,7 @@ import { destinations, destinationsRequest, destinationsResponse } from './desti
4
4
  /**
5
5
  * The shape of the model inside the application code - what the users use
6
6
  */
7
- export const listDestinationsOkResponse: any = z.lazy(() => {
7
+ export const listDestinationsOkResponse = z.lazy(() => {
8
8
  return z.object({
9
9
  destinations: z.array(destinations).optional(),
10
10
  });
@@ -21,7 +21,7 @@ export type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkRespon
21
21
  * The shape of the model mapping from the api schema into the application shape.
22
22
  * Is equal to application shape if all property names match the api schema
23
23
  */
24
- export const listDestinationsOkResponseResponse: any = z.lazy(() => {
24
+ export const listDestinationsOkResponseResponse = z.lazy(() => {
25
25
  return z
26
26
  .object({
27
27
  destinations: z.array(destinationsResponse).optional(),
@@ -35,7 +35,7 @@ export const listDestinationsOkResponseResponse: any = z.lazy(() => {
35
35
  * The shape of the model mapping from the application shape into the api schema.
36
36
  * Is equal to application shape if all property names match the api schema
37
37
  */
38
- export const listDestinationsOkResponseRequest: any = z.lazy(() => {
38
+ export const listDestinationsOkResponseRequest = z.lazy(() => {
39
39
  return z.object({ destinations: z.array(destinationsRequest).nullish() }).transform((data) => ({
40
40
  destinations: data['destinations'],
41
41
  }));
@@ -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 { GetEsimOkResponse, getEsimOkResponseResponse } from './models/get-esim-ok-response';
7
7
  import { GetEsimParams } from './request-params';
8
8
  import { GetEsimDeviceOkResponse, getEsimDeviceOkResponseResponse } from './models/get-esim-device-ok-response';
@@ -16,17 +16,20 @@ export class ESimService extends BaseService {
16
16
  * @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
17
17
  */
18
18
  async getEsim(params: GetEsimParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimOkResponse>> {
19
- const request = new Request({
20
- method: 'GET',
21
- path: '/esim',
22
- config: this.config,
23
- responseSchema: getEsimOkResponseResponse,
24
- requestSchema: z.any(),
25
- requestContentType: ContentType.Json,
26
- responseContentType: ContentType.Json,
27
- requestConfig,
28
- });
29
- request.addQueryParam('iccid', params?.iccid);
19
+ const request = new RequestBuilder<GetEsimOkResponse>()
20
+ .setConfig(this.config)
21
+ .setBaseUrl(this.config)
22
+ .setMethod('GET')
23
+ .setPath('/esim')
24
+ .setRequestSchema(z.any())
25
+ .setResponseSchema(getEsimOkResponseResponse)
26
+ .setRequestContentType(ContentType.Json)
27
+ .setResponseContentType(ContentType.Json)
28
+ .setRetryAttempts(this.config, requestConfig)
29
+ .setRetryDelayMs(this.config, requestConfig)
30
+ .setResponseValidation(this.config, requestConfig)
31
+ .addQueryParam('iccid', params?.iccid)
32
+ .build();
30
33
  return this.client.call<GetEsimOkResponse>(request);
31
34
  }
32
35
 
@@ -36,17 +39,20 @@ export class ESimService extends BaseService {
36
39
  * @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
37
40
  */
38
41
  async getEsimDevice(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimDeviceOkResponse>> {
39
- const request = new Request({
40
- method: 'GET',
41
- path: '/esim/{iccid}/device',
42
- config: this.config,
43
- responseSchema: getEsimDeviceOkResponseResponse,
44
- requestSchema: z.any(),
45
- requestContentType: ContentType.Json,
46
- responseContentType: ContentType.Json,
47
- requestConfig,
48
- });
49
- request.addPathParam('iccid', iccid);
42
+ const request = new RequestBuilder<GetEsimDeviceOkResponse>()
43
+ .setConfig(this.config)
44
+ .setBaseUrl(this.config)
45
+ .setMethod('GET')
46
+ .setPath('/esim/{iccid}/device')
47
+ .setRequestSchema(z.any())
48
+ .setResponseSchema(getEsimDeviceOkResponseResponse)
49
+ .setRequestContentType(ContentType.Json)
50
+ .setResponseContentType(ContentType.Json)
51
+ .setRetryAttempts(this.config, requestConfig)
52
+ .setRetryDelayMs(this.config, requestConfig)
53
+ .setResponseValidation(this.config, requestConfig)
54
+ .addPathParam('iccid', iccid)
55
+ .build();
50
56
  return this.client.call<GetEsimDeviceOkResponse>(request);
51
57
  }
52
58
 
@@ -56,17 +62,20 @@ export class ESimService extends BaseService {
56
62
  * @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
57
63
  */
58
64
  async getEsimHistory(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimHistoryOkResponse>> {
59
- const request = new Request({
60
- method: 'GET',
61
- path: '/esim/{iccid}/history',
62
- config: this.config,
63
- responseSchema: getEsimHistoryOkResponseResponse,
64
- requestSchema: z.any(),
65
- requestContentType: ContentType.Json,
66
- responseContentType: ContentType.Json,
67
- requestConfig,
68
- });
69
- request.addPathParam('iccid', iccid);
65
+ const request = new RequestBuilder<GetEsimHistoryOkResponse>()
66
+ .setConfig(this.config)
67
+ .setBaseUrl(this.config)
68
+ .setMethod('GET')
69
+ .setPath('/esim/{iccid}/history')
70
+ .setRequestSchema(z.any())
71
+ .setResponseSchema(getEsimHistoryOkResponseResponse)
72
+ .setRequestContentType(ContentType.Json)
73
+ .setResponseContentType(ContentType.Json)
74
+ .setRetryAttempts(this.config, requestConfig)
75
+ .setRetryDelayMs(this.config, requestConfig)
76
+ .setResponseValidation(this.config, requestConfig)
77
+ .addPathParam('iccid', iccid)
78
+ .build();
70
79
  return this.client.call<GetEsimHistoryOkResponse>(request);
71
80
  }
72
81
 
@@ -76,17 +85,20 @@ export class ESimService extends BaseService {
76
85
  * @returns {Promise<HttpResponse<GetEsimMacOkResponse>>} Successful Response
77
86
  */
78
87
  async getEsimMac(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimMacOkResponse>> {
79
- const request = new Request({
80
- method: 'GET',
81
- path: '/esim/{iccid}/mac',
82
- config: this.config,
83
- responseSchema: getEsimMacOkResponseResponse,
84
- requestSchema: z.any(),
85
- requestContentType: ContentType.Json,
86
- responseContentType: ContentType.Json,
87
- requestConfig,
88
- });
89
- request.addPathParam('iccid', iccid);
88
+ const request = new RequestBuilder<GetEsimMacOkResponse>()
89
+ .setConfig(this.config)
90
+ .setBaseUrl(this.config)
91
+ .setMethod('GET')
92
+ .setPath('/esim/{iccid}/mac')
93
+ .setRequestSchema(z.any())
94
+ .setResponseSchema(getEsimMacOkResponseResponse)
95
+ .setRequestContentType(ContentType.Json)
96
+ .setResponseContentType(ContentType.Json)
97
+ .setRetryAttempts(this.config, requestConfig)
98
+ .setRetryDelayMs(this.config, requestConfig)
99
+ .setResponseValidation(this.config, requestConfig)
100
+ .addPathParam('iccid', iccid)
101
+ .build();
90
102
  return this.client.call<GetEsimMacOkResponse>(request);
91
103
  }
92
104
  }
@@ -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 device: any = z.lazy(() => {
6
+ export const device = z.lazy(() => {
7
7
  return z.object({
8
8
  oem: z.string().optional(),
9
9
  hardwareName: z.string().optional(),
@@ -26,7 +26,7 @@ export type Device = z.infer<typeof device>;
26
26
  * The shape of the model mapping from the api schema into the application shape.
27
27
  * Is equal to application shape if all property names match the api schema
28
28
  */
29
- export const deviceResponse: any = z.lazy(() => {
29
+ export const deviceResponse = z.lazy(() => {
30
30
  return z
31
31
  .object({
32
32
  oem: z.string().optional(),
@@ -46,7 +46,7 @@ export const deviceResponse: any = z.lazy(() => {
46
46
  * The shape of the model mapping from the application shape into the api schema.
47
47
  * Is equal to application shape if all property names match the api schema
48
48
  */
49
- export const deviceRequest: any = z.lazy(() => {
49
+ export const deviceRequest = z.lazy(() => {
50
50
  return z
51
51
  .object({
52
52
  oem: z.string().nullish(),
@@ -4,7 +4,7 @@ import { device, deviceRequest, deviceResponse } from './device';
4
4
  /**
5
5
  * The shape of the model inside the application code - what the users use
6
6
  */
7
- export const getEsimDeviceOkResponse: any = z.lazy(() => {
7
+ export const getEsimDeviceOkResponse = z.lazy(() => {
8
8
  return z.object({
9
9
  device: device.optional(),
10
10
  });
@@ -21,7 +21,7 @@ export type GetEsimDeviceOkResponse = z.infer<typeof getEsimDeviceOkResponse>;
21
21
  * The shape of the model mapping from the api schema into the application shape.
22
22
  * Is equal to application shape if all property names match the api schema
23
23
  */
24
- export const getEsimDeviceOkResponseResponse: any = z.lazy(() => {
24
+ export const getEsimDeviceOkResponseResponse = z.lazy(() => {
25
25
  return z
26
26
  .object({
27
27
  device: deviceResponse.optional(),
@@ -35,7 +35,7 @@ export const getEsimDeviceOkResponseResponse: any = z.lazy(() => {
35
35
  * The shape of the model mapping from the application shape into the api schema.
36
36
  * Is equal to application shape if all property names match the api schema
37
37
  */
38
- export const getEsimDeviceOkResponseRequest: any = z.lazy(() => {
38
+ export const getEsimDeviceOkResponseRequest = z.lazy(() => {
39
39
  return z.object({ device: deviceRequest.nullish() }).transform((data) => ({
40
40
  device: data['device'],
41
41
  }));
@@ -4,7 +4,7 @@ import { history, historyRequest, historyResponse } from './history';
4
4
  /**
5
5
  * The shape of the model inside the application code - what the users use
6
6
  */
7
- export const getEsimHistoryOkResponseEsim: any = z.lazy(() => {
7
+ export const getEsimHistoryOkResponseEsim = z.lazy(() => {
8
8
  return z.object({
9
9
  iccid: z.string().min(18).max(22).optional(),
10
10
  history: z.array(history).optional(),
@@ -23,7 +23,7 @@ export type GetEsimHistoryOkResponseEsim = z.infer<typeof getEsimHistoryOkRespon
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 getEsimHistoryOkResponseEsimResponse: any = z.lazy(() => {
26
+ export const getEsimHistoryOkResponseEsimResponse = z.lazy(() => {
27
27
  return z
28
28
  .object({
29
29
  iccid: z.string().min(18).max(22).optional(),
@@ -39,7 +39,7 @@ export const getEsimHistoryOkResponseEsimResponse: 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 getEsimHistoryOkResponseEsimRequest: any = z.lazy(() => {
42
+ export const getEsimHistoryOkResponseEsimRequest = z.lazy(() => {
43
43
  return z.object({ iccid: z.string().nullish(), history: z.array(historyRequest).nullish() }).transform((data) => ({
44
44
  iccid: data['iccid'],
45
45
  history: data['history'],
@@ -8,7 +8,7 @@ import {
8
8
  /**
9
9
  * The shape of the model inside the application code - what the users use
10
10
  */
11
- export const getEsimHistoryOkResponse: any = z.lazy(() => {
11
+ export const getEsimHistoryOkResponse = z.lazy(() => {
12
12
  return z.object({
13
13
  esim: getEsimHistoryOkResponseEsim.optional(),
14
14
  });
@@ -25,7 +25,7 @@ export type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
25
25
  * The shape of the model mapping from the api schema into the application shape.
26
26
  * Is equal to application shape if all property names match the api schema
27
27
  */
28
- export const getEsimHistoryOkResponseResponse: any = z.lazy(() => {
28
+ export const getEsimHistoryOkResponseResponse = z.lazy(() => {
29
29
  return z
30
30
  .object({
31
31
  esim: getEsimHistoryOkResponseEsimResponse.optional(),
@@ -39,7 +39,7 @@ export const getEsimHistoryOkResponseResponse: 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 getEsimHistoryOkResponseRequest: any = z.lazy(() => {
42
+ export const getEsimHistoryOkResponseRequest = z.lazy(() => {
43
43
  return z.object({ esim: getEsimHistoryOkResponseEsimRequest.nullish() }).transform((data) => ({
44
44
  esim: data['esim'],
45
45
  }));
@@ -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 getEsimMacOkResponseEsim: any = z.lazy(() => {
6
+ export const getEsimMacOkResponseEsim = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22).optional(),
9
9
  smdpAddress: z.string().optional(),
@@ -24,7 +24,7 @@ export type GetEsimMacOkResponseEsim = z.infer<typeof getEsimMacOkResponseEsim>;
24
24
  * The shape of the model mapping from the api schema into the application shape.
25
25
  * Is equal to application shape if all property names match the api schema
26
26
  */
27
- export const getEsimMacOkResponseEsimResponse: any = z.lazy(() => {
27
+ export const getEsimMacOkResponseEsimResponse = z.lazy(() => {
28
28
  return z
29
29
  .object({
30
30
  iccid: z.string().min(18).max(22).optional(),
@@ -42,7 +42,7 @@ export const getEsimMacOkResponseEsimResponse: any = z.lazy(() => {
42
42
  * The shape of the model mapping from the application shape into the api schema.
43
43
  * Is equal to application shape if all property names match the api schema
44
44
  */
45
- export const getEsimMacOkResponseEsimRequest: any = z.lazy(() => {
45
+ export const getEsimMacOkResponseEsimRequest = z.lazy(() => {
46
46
  return z
47
47
  .object({
48
48
  iccid: z.string().nullish(),
@@ -8,7 +8,7 @@ import {
8
8
  /**
9
9
  * The shape of the model inside the application code - what the users use
10
10
  */
11
- export const getEsimMacOkResponse: any = z.lazy(() => {
11
+ export const getEsimMacOkResponse = z.lazy(() => {
12
12
  return z.object({
13
13
  esim: getEsimMacOkResponseEsim.optional(),
14
14
  });
@@ -25,7 +25,7 @@ export type GetEsimMacOkResponse = z.infer<typeof getEsimMacOkResponse>;
25
25
  * The shape of the model mapping from the api schema into the application shape.
26
26
  * Is equal to application shape if all property names match the api schema
27
27
  */
28
- export const getEsimMacOkResponseResponse: any = z.lazy(() => {
28
+ export const getEsimMacOkResponseResponse = z.lazy(() => {
29
29
  return z
30
30
  .object({
31
31
  esim: getEsimMacOkResponseEsimResponse.optional(),
@@ -39,7 +39,7 @@ export const getEsimMacOkResponseResponse: 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 getEsimMacOkResponseRequest: any = z.lazy(() => {
42
+ export const getEsimMacOkResponseRequest = z.lazy(() => {
43
43
  return z.object({ esim: getEsimMacOkResponseEsimRequest.nullish() }).transform((data) => ({
44
44
  esim: data['esim'],
45
45
  }));
@@ -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 getEsimOkResponseEsim: any = z.lazy(() => {
6
+ export const getEsimOkResponseEsim = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22).optional(),
9
9
  smdpAddress: z.string().optional(),
@@ -26,7 +26,7 @@ export type GetEsimOkResponseEsim = z.infer<typeof getEsimOkResponseEsim>;
26
26
  * The shape of the model mapping from the api schema into the application shape.
27
27
  * Is equal to application shape if all property names match the api schema
28
28
  */
29
- export const getEsimOkResponseEsimResponse: any = z.lazy(() => {
29
+ export const getEsimOkResponseEsimResponse = z.lazy(() => {
30
30
  return z
31
31
  .object({
32
32
  iccid: z.string().min(18).max(22).optional(),
@@ -46,7 +46,7 @@ export const getEsimOkResponseEsimResponse: any = z.lazy(() => {
46
46
  * The shape of the model mapping from the application shape into the api schema.
47
47
  * Is equal to application shape if all property names match the api schema
48
48
  */
49
- export const getEsimOkResponseEsimRequest: any = z.lazy(() => {
49
+ export const getEsimOkResponseEsimRequest = z.lazy(() => {
50
50
  return z
51
51
  .object({
52
52
  iccid: z.string().nullish(),
@@ -8,7 +8,7 @@ import {
8
8
  /**
9
9
  * The shape of the model inside the application code - what the users use
10
10
  */
11
- export const getEsimOkResponse: any = z.lazy(() => {
11
+ export const getEsimOkResponse = z.lazy(() => {
12
12
  return z.object({
13
13
  esim: getEsimOkResponseEsim.optional(),
14
14
  });
@@ -25,7 +25,7 @@ export type GetEsimOkResponse = z.infer<typeof getEsimOkResponse>;
25
25
  * The shape of the model mapping from the api schema into the application shape.
26
26
  * Is equal to application shape if all property names match the api schema
27
27
  */
28
- export const getEsimOkResponseResponse: any = z.lazy(() => {
28
+ export const getEsimOkResponseResponse = z.lazy(() => {
29
29
  return z
30
30
  .object({
31
31
  esim: getEsimOkResponseEsimResponse.optional(),
@@ -39,7 +39,7 @@ export const getEsimOkResponseResponse: 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 getEsimOkResponseRequest: any = z.lazy(() => {
42
+ export const getEsimOkResponseRequest = z.lazy(() => {
43
43
  return z.object({ esim: getEsimOkResponseEsimRequest.nullish() }).transform((data) => ({
44
44
  esim: data['esim'],
45
45
  }));
@@ -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 history: any = z.lazy(() => {
6
+ export const history = z.lazy(() => {
7
7
  return z.object({
8
8
  status: z.string().optional(),
9
9
  statusDate: z.string().optional(),
@@ -24,7 +24,7 @@ export type History = z.infer<typeof history>;
24
24
  * The shape of the model mapping from the api schema into the application shape.
25
25
  * Is equal to application shape if all property names match the api schema
26
26
  */
27
- export const historyResponse: any = z.lazy(() => {
27
+ export const historyResponse = z.lazy(() => {
28
28
  return z
29
29
  .object({
30
30
  status: z.string().optional(),
@@ -42,7 +42,7 @@ export const historyResponse: any = z.lazy(() => {
42
42
  * The shape of the model mapping from the application shape into the api schema.
43
43
  * Is equal to application shape if all property names match the api schema
44
44
  */
45
- export const historyRequest: any = z.lazy(() => {
45
+ export const historyRequest = z.lazy(() => {
46
46
  return z
47
47
  .object({ status: z.string().nullish(), statusDate: z.string().nullish(), date: z.number().nullish() })
48
48
  .transform((data) => ({
@@ -4,7 +4,7 @@ import { packages, packagesRequest, packagesResponse } from './packages';
4
4
  /**
5
5
  * The shape of the model inside the application code - what the users use
6
6
  */
7
- export const listPackagesOkResponse: any = z.lazy(() => {
7
+ export const listPackagesOkResponse = z.lazy(() => {
8
8
  return z.object({
9
9
  packages: z.array(packages).optional(),
10
10
  afterCursor: z.string().optional().nullable(),
@@ -23,7 +23,7 @@ export type ListPackagesOkResponse = z.infer<typeof listPackagesOkResponse>;
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 listPackagesOkResponseResponse: any = z.lazy(() => {
26
+ export const listPackagesOkResponseResponse = z.lazy(() => {
27
27
  return z
28
28
  .object({
29
29
  packages: z.array(packagesResponse).optional(),
@@ -39,7 +39,7 @@ export const listPackagesOkResponseResponse: 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 listPackagesOkResponseRequest: any = z.lazy(() => {
42
+ export const listPackagesOkResponseRequest = z.lazy(() => {
43
43
  return z
44
44
  .object({ packages: z.array(packagesRequest).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 packages: any = z.lazy(() => {
6
+ export const packages = z.lazy(() => {
7
7
  return z.object({
8
8
  id: z.string().optional(),
9
9
  destination: z.string().optional(),
@@ -30,7 +30,7 @@ export type Packages = z.infer<typeof packages>;
30
30
  * The shape of the model mapping from the api schema into the application shape.
31
31
  * Is equal to application shape if all property names match the api schema
32
32
  */
33
- export const packagesResponse: any = z.lazy(() => {
33
+ export const packagesResponse = z.lazy(() => {
34
34
  return z
35
35
  .object({
36
36
  id: z.string().optional(),
@@ -54,7 +54,7 @@ export const packagesResponse: any = z.lazy(() => {
54
54
  * The shape of the model mapping from the application shape into the api schema.
55
55
  * Is equal to application shape if all property names match the api schema
56
56
  */
57
- export const packagesRequest: any = z.lazy(() => {
57
+ export const packagesRequest = z.lazy(() => {
58
58
  return z
59
59
  .object({
60
60
  id: 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 { ListPackagesOkResponse, listPackagesOkResponseResponse } from './models/list-packages-ok-response';
7
7
  import { ListPackagesParams } from './request-params';
8
8
 
@@ -23,24 +23,27 @@ export class PackagesService extends BaseService {
23
23
  params?: ListPackagesParams,
24
24
  requestConfig?: RequestConfig,
25
25
  ): Promise<HttpResponse<ListPackagesOkResponse>> {
26
- const request = new Request({
27
- method: 'GET',
28
- path: '/packages',
29
- config: this.config,
30
- responseSchema: listPackagesOkResponseResponse,
31
- requestSchema: z.any(),
32
- requestContentType: ContentType.Json,
33
- responseContentType: ContentType.Json,
34
- requestConfig,
35
- });
36
- request.addQueryParam('destination', params?.destination);
37
- request.addQueryParam('startDate', params?.startDate);
38
- request.addQueryParam('endDate', params?.endDate);
39
- request.addQueryParam('afterCursor', params?.afterCursor);
40
- request.addQueryParam('limit', params?.limit);
41
- request.addQueryParam('startTime', params?.startTime);
42
- request.addQueryParam('endTime', params?.endTime);
43
- request.addQueryParam('duration', params?.duration);
26
+ const request = new RequestBuilder<ListPackagesOkResponse>()
27
+ .setConfig(this.config)
28
+ .setBaseUrl(this.config)
29
+ .setMethod('GET')
30
+ .setPath('/packages')
31
+ .setRequestSchema(z.any())
32
+ .setResponseSchema(listPackagesOkResponseResponse)
33
+ .setRequestContentType(ContentType.Json)
34
+ .setResponseContentType(ContentType.Json)
35
+ .setRetryAttempts(this.config, requestConfig)
36
+ .setRetryDelayMs(this.config, requestConfig)
37
+ .setResponseValidation(this.config, requestConfig)
38
+ .addQueryParam('destination', params?.destination)
39
+ .addQueryParam('startDate', params?.startDate)
40
+ .addQueryParam('endDate', params?.endDate)
41
+ .addQueryParam('afterCursor', params?.afterCursor)
42
+ .addQueryParam('limit', params?.limit)
43
+ .addQueryParam('startTime', params?.startTime)
44
+ .addQueryParam('endTime', params?.endTime)
45
+ .addQueryParam('duration', params?.duration)
46
+ .build();
44
47
  return this.client.call<ListPackagesOkResponse>(request);
45
48
  }
46
49
  }
@@ -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 createPurchaseOkResponseProfile: any = z.lazy(() => {
6
+ export const createPurchaseOkResponseProfile = z.lazy(() => {
7
7
  return z.object({
8
8
  iccid: z.string().min(18).max(22).optional(),
9
9
  activationCode: z.string().min(1000).max(8000).optional(),
@@ -22,7 +22,7 @@ export type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkRes
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 createPurchaseOkResponseProfileResponse: any = z.lazy(() => {
25
+ export const createPurchaseOkResponseProfileResponse = z.lazy(() => {
26
26
  return z
27
27
  .object({
28
28
  iccid: z.string().min(18).max(22).optional(),
@@ -38,7 +38,7 @@ export const createPurchaseOkResponseProfileResponse: 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 createPurchaseOkResponseProfileRequest: any = z.lazy(() => {
41
+ export const createPurchaseOkResponseProfileRequest = z.lazy(() => {
42
42
  return z.object({ iccid: z.string().nullish(), activationCode: z.string().nullish() }).transform((data) => ({
43
43
  iccid: data['iccid'],
44
44
  activationCode: data['activationCode'],
@@ -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 createPurchaseOkResponsePurchase: any = z.lazy(() => {
6
+ export const createPurchaseOkResponsePurchase = 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 CreatePurchaseOkResponsePurchase = z.infer<typeof createPurchaseOkRe
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 createPurchaseOkResponsePurchaseResponse: any = z.lazy(() => {
35
+ export const createPurchaseOkResponsePurchaseResponse = z.lazy(() => {
36
36
  return z
37
37
  .object({
38
38
  id: z.string().optional(),
@@ -58,7 +58,7 @@ export const createPurchaseOkResponsePurchaseResponse: 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 createPurchaseOkResponsePurchaseRequest: any = z.lazy(() => {
61
+ export const createPurchaseOkResponsePurchaseRequest = z.lazy(() => {
62
62
  return z
63
63
  .object({
64
64
  id: z.string().nullish(),