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.
- package/.github/workflows/publish_npmjs.yml +1 -0
- package/.manifest.json +12 -12
- package/README.md +2 -2
- package/dist/http/client.d.ts +14 -0
- package/dist/http/client.d.ts.map +1 -0
- package/dist/http/client.js +36 -0
- package/dist/http/client.js.map +1 -0
- package/dist/http/environment.d.ts +4 -0
- package/dist/http/environment.d.ts.map +1 -0
- package/dist/http/environment.js +8 -0
- package/dist/http/environment.js.map +1 -0
- package/dist/http/error.d.ts +7 -0
- package/dist/http/error.d.ts.map +1 -0
- package/dist/http/error.js +12 -0
- package/dist/http/error.js.map +1 -0
- package/dist/http/handlers/handler-chain.d.ts +8 -0
- package/dist/http/handlers/handler-chain.d.ts.map +1 -0
- package/dist/http/handlers/handler-chain.js +34 -0
- package/dist/http/handlers/handler-chain.js.map +1 -0
- package/dist/http/handlers/hook-handler.d.ts +12 -0
- package/dist/http/handlers/hook-handler.d.ts.map +1 -0
- package/dist/http/handlers/hook-handler.js +49 -0
- package/dist/http/handlers/hook-handler.js.map +1 -0
- package/dist/http/handlers/request-validation-handler.d.ts +9 -0
- package/dist/http/handlers/request-validation-handler.d.ts.map +1 -0
- package/dist/http/handlers/request-validation-handler.js +78 -0
- package/dist/http/handlers/request-validation-handler.js.map +1 -0
- package/dist/http/handlers/response-validation-handler.d.ts +11 -0
- package/dist/http/handlers/response-validation-handler.d.ts.map +1 -0
- package/dist/http/handlers/response-validation-handler.js +89 -0
- package/dist/http/handlers/response-validation-handler.js.map +1 -0
- package/dist/http/handlers/retry-handler.d.ts +9 -0
- package/dist/http/handlers/retry-handler.d.ts.map +1 -0
- package/dist/http/handlers/retry-handler.js +47 -0
- package/dist/http/handlers/retry-handler.js.map +1 -0
- package/dist/http/handlers/terminating-handler.d.ts +8 -0
- package/dist/http/handlers/terminating-handler.d.ts.map +1 -0
- package/dist/http/handlers/terminating-handler.js +45 -0
- package/dist/http/handlers/terminating-handler.js.map +1 -0
- package/dist/http/hooks/custom-hook.d.ts +9 -0
- package/dist/http/hooks/custom-hook.d.ts.map +1 -0
- package/dist/http/hooks/custom-hook.js +84 -0
- package/dist/http/hooks/custom-hook.js.map +1 -0
- package/dist/http/hooks/hook.d.ts +31 -0
- package/dist/http/hooks/hook.d.ts.map +1 -0
- package/dist/http/hooks/hook.js +3 -0
- package/dist/http/hooks/hook.js.map +1 -0
- package/dist/http/index.d.ts +5 -0
- package/dist/http/index.d.ts.map +1 -0
- package/dist/http/index.js +21 -0
- package/dist/http/index.js.map +1 -0
- package/dist/http/serializer.d.ts +13 -0
- package/dist/http/serializer.d.ts.map +1 -0
- package/dist/http/serializer.js +150 -0
- package/dist/http/serializer.js.map +1 -0
- package/dist/http/transport/request-builder.d.ts +24 -0
- package/dist/http/transport/request-builder.d.ts.map +1 -0
- package/dist/http/transport/request-builder.js +130 -0
- package/dist/http/transport/request-builder.js.map +1 -0
- package/dist/http/transport/request.d.ts +53 -0
- package/dist/http/transport/request.d.ts.map +1 -0
- package/dist/http/transport/request.js +116 -0
- package/dist/http/transport/request.js.map +1 -0
- package/dist/http/types.d.ts +60 -0
- package/dist/http/types.d.ts.map +1 -0
- package/dist/http/types.js +16 -0
- package/dist/http/types.js.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +52 -0
- package/dist/index.js.map +1 -0
- package/dist/services/base-service.d.ts +14 -0
- package/dist/services/base-service.d.ts.map +1 -0
- package/dist/services/base-service.js +27 -0
- package/dist/services/base-service.js.map +1 -0
- package/dist/services/destinations/destinations.d.ts +12 -0
- package/dist/services/destinations/destinations.d.ts.map +1 -0
- package/dist/services/destinations/destinations.js +43 -0
- package/dist/services/destinations/destinations.js.map +1 -0
- package/dist/services/destinations/index.d.ts +2 -0
- package/dist/services/destinations/index.d.ts.map +1 -0
- package/dist/services/destinations/index.js +18 -0
- package/dist/services/destinations/index.js.map +1 -0
- package/dist/services/destinations/models/destinations.d.ts +76 -0
- package/dist/services/destinations/models/destinations.d.ts.map +1 -0
- package/dist/services/destinations/models/destinations.js +49 -0
- package/dist/services/destinations/models/destinations.js.map +1 -0
- package/dist/services/destinations/models/index.d.ts +3 -0
- package/dist/services/destinations/models/index.d.ts.map +1 -0
- package/dist/services/destinations/models/index.js +19 -0
- package/dist/services/destinations/models/index.js.map +1 -0
- package/dist/services/destinations/models/list-destinations-ok-response.d.ts +140 -0
- package/dist/services/destinations/models/list-destinations-ok-response.d.ts.map +1 -0
- package/dist/services/destinations/models/list-destinations-ok-response.js +36 -0
- package/dist/services/destinations/models/list-destinations-ok-response.js.map +1 -0
- package/dist/services/e-sim/e-sim.d.ts +35 -0
- package/dist/services/e-sim/e-sim.d.ts.map +1 -0
- package/dist/services/e-sim/e-sim.js +120 -0
- package/dist/services/e-sim/e-sim.js.map +1 -0
- package/dist/services/e-sim/index.d.ts +2 -0
- package/dist/services/e-sim/index.d.ts.map +1 -0
- package/dist/services/e-sim/index.js +18 -0
- package/dist/services/e-sim/index.js.map +1 -0
- package/dist/services/e-sim/models/device.d.ts +90 -0
- package/dist/services/e-sim/models/device.d.ts.map +1 -0
- package/dist/services/e-sim/models/device.js +54 -0
- package/dist/services/e-sim/models/device.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts +163 -0
- package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-device-ok-response.js +36 -0
- package/dist/services/e-sim/models/get-esim-device-ok-response.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts +154 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js +40 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts +249 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response.js +36 -0
- package/dist/services/e-sim/models/get-esim-history-ok-response.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts +76 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js +49 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts +140 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response.js +36 -0
- package/dist/services/e-sim/models/get-esim-mac-ok-response.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts +90 -0
- package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-ok-response-esim.js +54 -0
- package/dist/services/e-sim/models/get-esim-ok-response-esim.js.map +1 -0
- package/dist/services/e-sim/models/get-esim-ok-response.d.ts +163 -0
- package/dist/services/e-sim/models/get-esim-ok-response.d.ts.map +1 -0
- package/dist/services/e-sim/models/get-esim-ok-response.js +36 -0
- package/dist/services/e-sim/models/get-esim-ok-response.js.map +1 -0
- package/dist/services/e-sim/models/history.d.ts +76 -0
- package/dist/services/e-sim/models/history.d.ts.map +1 -0
- package/dist/services/e-sim/models/history.js +45 -0
- package/dist/services/e-sim/models/history.js.map +1 -0
- package/dist/services/e-sim/models/index.d.ts +10 -0
- package/dist/services/e-sim/models/index.d.ts.map +1 -0
- package/dist/services/e-sim/models/index.js +26 -0
- package/dist/services/e-sim/models/index.js.map +1 -0
- package/dist/services/e-sim/request-params.d.ts +4 -0
- package/dist/services/e-sim/request-params.d.ts.map +1 -0
- package/dist/services/e-sim/request-params.js +3 -0
- package/dist/services/e-sim/request-params.js.map +1 -0
- package/dist/services/packages/index.d.ts +2 -0
- package/dist/services/packages/index.d.ts.map +1 -0
- package/dist/services/packages/index.js +18 -0
- package/dist/services/packages/index.js.map +1 -0
- package/dist/services/packages/models/index.d.ts +3 -0
- package/dist/services/packages/models/index.d.ts.map +1 -0
- package/dist/services/packages/models/index.js +19 -0
- package/dist/services/packages/models/index.js.map +1 -0
- package/dist/services/packages/models/list-packages-ok-response.d.ts +223 -0
- package/dist/services/packages/models/list-packages-ok-response.d.ts.map +1 -0
- package/dist/services/packages/models/list-packages-ok-response.js +42 -0
- package/dist/services/packages/models/list-packages-ok-response.js.map +1 -0
- package/dist/services/packages/models/packages.d.ts +118 -0
- package/dist/services/packages/models/packages.d.ts.map +1 -0
- package/dist/services/packages/models/packages.js +64 -0
- package/dist/services/packages/models/packages.js.map +1 -0
- package/dist/services/packages/packages.d.ts +21 -0
- package/dist/services/packages/packages.d.ts.map +1 -0
- package/dist/services/packages/packages.js +59 -0
- package/dist/services/packages/packages.js.map +1 -0
- package/dist/services/packages/request-params.d.ts +11 -0
- package/dist/services/packages/request-params.d.ts.map +1 -0
- package/dist/services/packages/request-params.js +3 -0
- package/dist/services/packages/request-params.js.map +1 -0
- package/dist/services/purchases/index.d.ts +2 -0
- package/dist/services/purchases/index.d.ts.map +1 -0
- package/dist/services/purchases/index.js +18 -0
- package/dist/services/purchases/index.js.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts +62 -0
- package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response-profile.js +39 -0
- package/dist/services/purchases/models/create-purchase-ok-response-profile.js.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts +132 -0
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.js +69 -0
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.js.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response.d.ts +315 -0
- package/dist/services/purchases/models/create-purchase-ok-response.d.ts.map +1 -0
- package/dist/services/purchases/models/create-purchase-ok-response.js +46 -0
- package/dist/services/purchases/models/create-purchase-ok-response.js.map +1 -0
- package/dist/services/purchases/models/create-purchase-request.d.ts +160 -0
- package/dist/services/purchases/models/create-purchase-request.d.ts.map +1 -0
- package/dist/services/purchases/models/create-purchase-request.js +79 -0
- package/dist/services/purchases/models/create-purchase-request.js.map +1 -0
- package/dist/services/purchases/models/edit-purchase-ok-response.d.ts +104 -0
- package/dist/services/purchases/models/edit-purchase-ok-response.d.ts.map +1 -0
- package/dist/services/purchases/models/edit-purchase-ok-response.js +59 -0
- package/dist/services/purchases/models/edit-purchase-ok-response.js.map +1 -0
- package/dist/services/purchases/models/edit-purchase-request.d.ts +104 -0
- package/dist/services/purchases/models/edit-purchase-request.d.ts.map +1 -0
- package/dist/services/purchases/models/edit-purchase-request.js +59 -0
- package/dist/services/purchases/models/edit-purchase-request.js.map +1 -0
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts +62 -0
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts.map +1 -0
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.js +41 -0
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.js.map +1 -0
- package/dist/services/purchases/models/index.d.ts +16 -0
- package/dist/services/purchases/models/index.d.ts.map +1 -0
- package/dist/services/purchases/models/index.js +32 -0
- package/dist/services/purchases/models/index.js.map +1 -0
- package/dist/services/purchases/models/list-purchases-ok-response.d.ts +622 -0
- package/dist/services/purchases/models/list-purchases-ok-response.d.ts.map +1 -0
- package/dist/services/purchases/models/list-purchases-ok-response.js +42 -0
- package/dist/services/purchases/models/list-purchases-ok-response.js.map +1 -0
- package/dist/services/purchases/models/package_.d.ts +104 -0
- package/dist/services/purchases/models/package_.d.ts.map +1 -0
- package/dist/services/purchases/models/package_.js +59 -0
- package/dist/services/purchases/models/package_.js.map +1 -0
- package/dist/services/purchases/models/purchases-esim.d.ts +48 -0
- package/dist/services/purchases/models/purchases-esim.d.ts.map +1 -0
- package/dist/services/purchases/models/purchases-esim.js +35 -0
- package/dist/services/purchases/models/purchases-esim.js.map +1 -0
- package/dist/services/purchases/models/purchases.d.ts +372 -0
- package/dist/services/purchases/models/purchases.d.ts.map +1 -0
- package/dist/services/purchases/models/purchases.js +91 -0
- package/dist/services/purchases/models/purchases.js.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts +48 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.js +35 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.js.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts +132 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js +69 -0
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response.d.ts +292 -0
- package/dist/services/purchases/models/top-up-esim-ok-response.d.ts.map +1 -0
- package/dist/services/purchases/models/top-up-esim-ok-response.js +46 -0
- package/dist/services/purchases/models/top-up-esim-ok-response.js.map +1 -0
- package/dist/services/purchases/models/top-up-esim-request.d.ts +146 -0
- package/dist/services/purchases/models/top-up-esim-request.d.ts.map +1 -0
- package/dist/services/purchases/models/top-up-esim-request.js +74 -0
- package/dist/services/purchases/models/top-up-esim-request.js.map +1 -0
- package/dist/services/purchases/purchases.d.ts +49 -0
- package/dist/services/purchases/purchases.d.ts.map +1 -0
- package/dist/services/purchases/purchases.js +162 -0
- package/dist/services/purchases/purchases.js.map +1 -0
- package/dist/services/purchases/request-params.d.ts +11 -0
- package/dist/services/purchases/request-params.d.ts.map +1 -0
- package/dist/services/purchases/request-params.js +3 -0
- package/dist/services/purchases/request-params.js.map +1 -0
- package/examples/package.json +1 -1
- package/package.json +1 -1
- package/src/http/handlers/hook-handler.ts +6 -4
- package/src/http/handlers/response-validation-handler.ts +1 -1
- package/src/http/handlers/retry-handler.ts +8 -5
- package/src/http/hooks/hook.ts +3 -2
- package/src/http/serializer.ts +7 -4
- package/src/http/transport/request-builder.ts +145 -0
- package/src/http/transport/request.ts +45 -36
- package/src/services/destinations/destinations.ts +14 -11
- package/src/services/destinations/models/destinations.ts +3 -3
- package/src/services/destinations/models/list-destinations-ok-response.ts +3 -3
- package/src/services/e-sim/e-sim.ts +57 -45
- package/src/services/e-sim/models/device.ts +3 -3
- package/src/services/e-sim/models/get-esim-device-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-history-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-history-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-mac-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-mac-ok-response.ts +3 -3
- package/src/services/e-sim/models/get-esim-ok-response-esim.ts +3 -3
- package/src/services/e-sim/models/get-esim-ok-response.ts +3 -3
- package/src/services/e-sim/models/history.ts +3 -3
- package/src/services/packages/models/list-packages-ok-response.ts +3 -3
- package/src/services/packages/models/packages.ts +3 -3
- package/src/services/packages/packages.ts +22 -19
- package/src/services/purchases/models/create-purchase-ok-response-profile.ts +3 -3
- package/src/services/purchases/models/create-purchase-ok-response-purchase.ts +3 -3
- package/src/services/purchases/models/create-purchase-ok-response.ts +3 -3
- package/src/services/purchases/models/create-purchase-request.ts +3 -3
- package/src/services/purchases/models/edit-purchase-ok-response.ts +3 -3
- package/src/services/purchases/models/edit-purchase-request.ts +3 -3
- package/src/services/purchases/models/get-purchase-consumption-ok-response.ts +3 -3
- package/src/services/purchases/models/list-purchases-ok-response.ts +3 -3
- package/src/services/purchases/models/package_.ts +3 -3
- package/src/services/purchases/models/purchases-esim.ts +3 -3
- package/src/services/purchases/models/purchases.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response-profile.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response-purchase.ts +3 -3
- package/src/services/purchases/models/top-up-esim-ok-response.ts +3 -3
- package/src/services/purchases/models/top-up-esim-request.ts +3 -3
- package/src/services/purchases/purchases.ts +81 -66
- 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 {
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
|
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
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
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
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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 {
|
|
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
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
61
|
+
export const createPurchaseOkResponsePurchaseRequest = z.lazy(() => {
|
|
62
62
|
return z
|
|
63
63
|
.object({
|
|
64
64
|
id: z.string().nullish(),
|