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
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
/**
|
|
14
14
|
* The shape of the model inside the application code - what the users use
|
|
15
15
|
*/
|
|
16
|
-
export const createPurchaseOkResponse
|
|
16
|
+
export const createPurchaseOkResponse = z.lazy(() => {
|
|
17
17
|
return z.object({
|
|
18
18
|
purchase: createPurchaseOkResponsePurchase.optional(),
|
|
19
19
|
profile: createPurchaseOkResponseProfile.optional(),
|
|
@@ -32,7 +32,7 @@ export type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
|
|
|
32
32
|
* The shape of the model mapping from the api schema into the application shape.
|
|
33
33
|
* Is equal to application shape if all property names match the api schema
|
|
34
34
|
*/
|
|
35
|
-
export const createPurchaseOkResponseResponse
|
|
35
|
+
export const createPurchaseOkResponseResponse = z.lazy(() => {
|
|
36
36
|
return z
|
|
37
37
|
.object({
|
|
38
38
|
purchase: createPurchaseOkResponsePurchaseResponse.optional(),
|
|
@@ -48,7 +48,7 @@ export const createPurchaseOkResponseResponse: any = z.lazy(() => {
|
|
|
48
48
|
* The shape of the model mapping from the application shape into the api schema.
|
|
49
49
|
* Is equal to application shape if all property names match the api schema
|
|
50
50
|
*/
|
|
51
|
-
export const createPurchaseOkResponseRequest
|
|
51
|
+
export const createPurchaseOkResponseRequest = z.lazy(() => {
|
|
52
52
|
return z
|
|
53
53
|
.object({
|
|
54
54
|
purchase: createPurchaseOkResponsePurchaseRequest.nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const createPurchaseRequest
|
|
6
|
+
export const createPurchaseRequest = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
destination: z.string(),
|
|
9
9
|
dataLimitInGb: z.number(),
|
|
@@ -36,7 +36,7 @@ export type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
|
|
|
36
36
|
* The shape of the model mapping from the api schema into the application shape.
|
|
37
37
|
* Is equal to application shape if all property names match the api schema
|
|
38
38
|
*/
|
|
39
|
-
export const createPurchaseRequestResponse
|
|
39
|
+
export const createPurchaseRequestResponse = z.lazy(() => {
|
|
40
40
|
return z
|
|
41
41
|
.object({
|
|
42
42
|
destination: z.string(),
|
|
@@ -66,7 +66,7 @@ export const createPurchaseRequestResponse: any = z.lazy(() => {
|
|
|
66
66
|
* The shape of the model mapping from the application shape into the api schema.
|
|
67
67
|
* Is equal to application shape if all property names match the api schema
|
|
68
68
|
*/
|
|
69
|
-
export const createPurchaseRequestRequest
|
|
69
|
+
export const createPurchaseRequestRequest = z.lazy(() => {
|
|
70
70
|
return z
|
|
71
71
|
.object({
|
|
72
72
|
destination: z.string().nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const editPurchaseOkResponse
|
|
6
|
+
export const editPurchaseOkResponse = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
purchaseId: z.string().optional(),
|
|
9
9
|
newStartDate: z.string().optional(),
|
|
@@ -28,7 +28,7 @@ export type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
|
|
|
28
28
|
* The shape of the model mapping from the api schema into the application shape.
|
|
29
29
|
* Is equal to application shape if all property names match the api schema
|
|
30
30
|
*/
|
|
31
|
-
export const editPurchaseOkResponseResponse
|
|
31
|
+
export const editPurchaseOkResponseResponse = z.lazy(() => {
|
|
32
32
|
return z
|
|
33
33
|
.object({
|
|
34
34
|
purchaseId: z.string().optional(),
|
|
@@ -50,7 +50,7 @@ export const editPurchaseOkResponseResponse: any = z.lazy(() => {
|
|
|
50
50
|
* The shape of the model mapping from the application shape into the api schema.
|
|
51
51
|
* Is equal to application shape if all property names match the api schema
|
|
52
52
|
*/
|
|
53
|
-
export const editPurchaseOkResponseRequest
|
|
53
|
+
export const editPurchaseOkResponseRequest = z.lazy(() => {
|
|
54
54
|
return z
|
|
55
55
|
.object({
|
|
56
56
|
purchaseId: z.string().nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const editPurchaseRequest
|
|
6
|
+
export const editPurchaseRequest = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
purchaseId: z.string(),
|
|
9
9
|
startDate: z.string(),
|
|
@@ -28,7 +28,7 @@ export type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
|
|
|
28
28
|
* The shape of the model mapping from the api schema into the application shape.
|
|
29
29
|
* Is equal to application shape if all property names match the api schema
|
|
30
30
|
*/
|
|
31
|
-
export const editPurchaseRequestResponse
|
|
31
|
+
export const editPurchaseRequestResponse = z.lazy(() => {
|
|
32
32
|
return z
|
|
33
33
|
.object({
|
|
34
34
|
purchaseId: z.string(),
|
|
@@ -50,7 +50,7 @@ export const editPurchaseRequestResponse: any = z.lazy(() => {
|
|
|
50
50
|
* The shape of the model mapping from the application shape into the api schema.
|
|
51
51
|
* Is equal to application shape if all property names match the api schema
|
|
52
52
|
*/
|
|
53
|
-
export const editPurchaseRequestRequest
|
|
53
|
+
export const editPurchaseRequestRequest = z.lazy(() => {
|
|
54
54
|
return z
|
|
55
55
|
.object({
|
|
56
56
|
purchaseId: z.string().nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const getPurchaseConsumptionOkResponse
|
|
6
|
+
export const getPurchaseConsumptionOkResponse = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
dataUsageRemainingInBytes: z.number().optional(),
|
|
9
9
|
status: z.string().optional(),
|
|
@@ -22,7 +22,7 @@ export type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsump
|
|
|
22
22
|
* The shape of the model mapping from the api schema into the application shape.
|
|
23
23
|
* Is equal to application shape if all property names match the api schema
|
|
24
24
|
*/
|
|
25
|
-
export const getPurchaseConsumptionOkResponseResponse
|
|
25
|
+
export const getPurchaseConsumptionOkResponseResponse = z.lazy(() => {
|
|
26
26
|
return z
|
|
27
27
|
.object({
|
|
28
28
|
dataUsageRemainingInBytes: z.number().optional(),
|
|
@@ -38,7 +38,7 @@ export const getPurchaseConsumptionOkResponseResponse: any = z.lazy(() => {
|
|
|
38
38
|
* The shape of the model mapping from the application shape into the api schema.
|
|
39
39
|
* Is equal to application shape if all property names match the api schema
|
|
40
40
|
*/
|
|
41
|
-
export const getPurchaseConsumptionOkResponseRequest
|
|
41
|
+
export const getPurchaseConsumptionOkResponseRequest = z.lazy(() => {
|
|
42
42
|
return z
|
|
43
43
|
.object({ dataUsageRemainingInBytes: z.number().nullish(), status: z.string().nullish() })
|
|
44
44
|
.transform((data) => ({
|
|
@@ -4,7 +4,7 @@ import { purchases, purchasesRequest, purchasesResponse } from './purchases';
|
|
|
4
4
|
/**
|
|
5
5
|
* The shape of the model inside the application code - what the users use
|
|
6
6
|
*/
|
|
7
|
-
export const listPurchasesOkResponse
|
|
7
|
+
export const listPurchasesOkResponse = z.lazy(() => {
|
|
8
8
|
return z.object({
|
|
9
9
|
purchases: z.array(purchases).optional(),
|
|
10
10
|
afterCursor: z.string().optional().nullable(),
|
|
@@ -23,7 +23,7 @@ export type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
|
|
|
23
23
|
* The shape of the model mapping from the api schema into the application shape.
|
|
24
24
|
* Is equal to application shape if all property names match the api schema
|
|
25
25
|
*/
|
|
26
|
-
export const listPurchasesOkResponseResponse
|
|
26
|
+
export const listPurchasesOkResponseResponse = z.lazy(() => {
|
|
27
27
|
return z
|
|
28
28
|
.object({
|
|
29
29
|
purchases: z.array(purchasesResponse).optional(),
|
|
@@ -39,7 +39,7 @@ export const listPurchasesOkResponseResponse: any = z.lazy(() => {
|
|
|
39
39
|
* The shape of the model mapping from the application shape into the api schema.
|
|
40
40
|
* Is equal to application shape if all property names match the api schema
|
|
41
41
|
*/
|
|
42
|
-
export const listPurchasesOkResponseRequest
|
|
42
|
+
export const listPurchasesOkResponseRequest = z.lazy(() => {
|
|
43
43
|
return z
|
|
44
44
|
.object({ purchases: z.array(purchasesRequest).nullish(), afterCursor: z.string().nullish() })
|
|
45
45
|
.transform((data) => ({
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const package_
|
|
6
|
+
export const package_ = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
id: z.string().optional(),
|
|
9
9
|
dataLimitInBytes: z.number().optional(),
|
|
@@ -28,7 +28,7 @@ export type Package_ = z.infer<typeof package_>;
|
|
|
28
28
|
* The shape of the model mapping from the api schema into the application shape.
|
|
29
29
|
* Is equal to application shape if all property names match the api schema
|
|
30
30
|
*/
|
|
31
|
-
export const packageResponse
|
|
31
|
+
export const packageResponse = z.lazy(() => {
|
|
32
32
|
return z
|
|
33
33
|
.object({
|
|
34
34
|
id: z.string().optional(),
|
|
@@ -50,7 +50,7 @@ export const packageResponse: any = z.lazy(() => {
|
|
|
50
50
|
* The shape of the model mapping from the application shape into the api schema.
|
|
51
51
|
* Is equal to application shape if all property names match the api schema
|
|
52
52
|
*/
|
|
53
|
-
export const packageRequest
|
|
53
|
+
export const packageRequest = z.lazy(() => {
|
|
54
54
|
return z
|
|
55
55
|
.object({
|
|
56
56
|
id: z.string().nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const purchasesEsim
|
|
6
|
+
export const purchasesEsim = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
iccid: z.string().min(18).max(22).optional(),
|
|
9
9
|
});
|
|
@@ -20,7 +20,7 @@ export type PurchasesEsim = z.infer<typeof purchasesEsim>;
|
|
|
20
20
|
* The shape of the model mapping from the api schema into the application shape.
|
|
21
21
|
* Is equal to application shape if all property names match the api schema
|
|
22
22
|
*/
|
|
23
|
-
export const purchasesEsimResponse
|
|
23
|
+
export const purchasesEsimResponse = z.lazy(() => {
|
|
24
24
|
return z
|
|
25
25
|
.object({
|
|
26
26
|
iccid: z.string().min(18).max(22).optional(),
|
|
@@ -34,7 +34,7 @@ export const purchasesEsimResponse: any = z.lazy(() => {
|
|
|
34
34
|
* The shape of the model mapping from the application shape into the api schema.
|
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
|
36
36
|
*/
|
|
37
|
-
export const purchasesEsimRequest
|
|
37
|
+
export const purchasesEsimRequest = z.lazy(() => {
|
|
38
38
|
return z.object({ iccid: z.string().nullish() }).transform((data) => ({
|
|
39
39
|
iccid: data['iccid'],
|
|
40
40
|
}));
|
|
@@ -5,7 +5,7 @@ import { purchasesEsim, purchasesEsimRequest, purchasesEsimResponse } from './pu
|
|
|
5
5
|
/**
|
|
6
6
|
* The shape of the model inside the application code - what the users use
|
|
7
7
|
*/
|
|
8
|
-
export const purchases
|
|
8
|
+
export const purchases = z.lazy(() => {
|
|
9
9
|
return z.object({
|
|
10
10
|
id: z.string().optional(),
|
|
11
11
|
startDate: z.string().optional(),
|
|
@@ -42,7 +42,7 @@ export type Purchases = z.infer<typeof purchases>;
|
|
|
42
42
|
* The shape of the model mapping from the api schema into the application shape.
|
|
43
43
|
* Is equal to application shape if all property names match the api schema
|
|
44
44
|
*/
|
|
45
|
-
export const purchasesResponse
|
|
45
|
+
export const purchasesResponse = z.lazy(() => {
|
|
46
46
|
return z
|
|
47
47
|
.object({
|
|
48
48
|
id: z.string().optional(),
|
|
@@ -76,7 +76,7 @@ export const purchasesResponse: any = z.lazy(() => {
|
|
|
76
76
|
* The shape of the model mapping from the application shape into the api schema.
|
|
77
77
|
* Is equal to application shape if all property names match the api schema
|
|
78
78
|
*/
|
|
79
|
-
export const purchasesRequest
|
|
79
|
+
export const purchasesRequest = z.lazy(() => {
|
|
80
80
|
return z
|
|
81
81
|
.object({
|
|
82
82
|
id: z.string().nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const topUpEsimOkResponseProfile
|
|
6
|
+
export const topUpEsimOkResponseProfile = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
iccid: z.string().min(18).max(22).optional(),
|
|
9
9
|
});
|
|
@@ -20,7 +20,7 @@ export type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfi
|
|
|
20
20
|
* The shape of the model mapping from the api schema into the application shape.
|
|
21
21
|
* Is equal to application shape if all property names match the api schema
|
|
22
22
|
*/
|
|
23
|
-
export const topUpEsimOkResponseProfileResponse
|
|
23
|
+
export const topUpEsimOkResponseProfileResponse = z.lazy(() => {
|
|
24
24
|
return z
|
|
25
25
|
.object({
|
|
26
26
|
iccid: z.string().min(18).max(22).optional(),
|
|
@@ -34,7 +34,7 @@ export const topUpEsimOkResponseProfileResponse: any = z.lazy(() => {
|
|
|
34
34
|
* The shape of the model mapping from the application shape into the api schema.
|
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
|
36
36
|
*/
|
|
37
|
-
export const topUpEsimOkResponseProfileRequest
|
|
37
|
+
export const topUpEsimOkResponseProfileRequest = z.lazy(() => {
|
|
38
38
|
return z.object({ iccid: z.string().nullish() }).transform((data) => ({
|
|
39
39
|
iccid: data['iccid'],
|
|
40
40
|
}));
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const topUpEsimOkResponsePurchase
|
|
6
|
+
export const topUpEsimOkResponsePurchase = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
id: z.string().optional(),
|
|
9
9
|
packageId: z.string().optional(),
|
|
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurc
|
|
|
32
32
|
* The shape of the model mapping from the api schema into the application shape.
|
|
33
33
|
* Is equal to application shape if all property names match the api schema
|
|
34
34
|
*/
|
|
35
|
-
export const topUpEsimOkResponsePurchaseResponse
|
|
35
|
+
export const topUpEsimOkResponsePurchaseResponse = z.lazy(() => {
|
|
36
36
|
return z
|
|
37
37
|
.object({
|
|
38
38
|
id: z.string().optional(),
|
|
@@ -58,7 +58,7 @@ export const topUpEsimOkResponsePurchaseResponse: any = z.lazy(() => {
|
|
|
58
58
|
* The shape of the model mapping from the application shape into the api schema.
|
|
59
59
|
* Is equal to application shape if all property names match the api schema
|
|
60
60
|
*/
|
|
61
|
-
export const topUpEsimOkResponsePurchaseRequest
|
|
61
|
+
export const topUpEsimOkResponsePurchaseRequest = z.lazy(() => {
|
|
62
62
|
return z
|
|
63
63
|
.object({
|
|
64
64
|
id: z.string().nullish(),
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
/**
|
|
14
14
|
* The shape of the model inside the application code - what the users use
|
|
15
15
|
*/
|
|
16
|
-
export const topUpEsimOkResponse
|
|
16
|
+
export const topUpEsimOkResponse = z.lazy(() => {
|
|
17
17
|
return z.object({
|
|
18
18
|
purchase: topUpEsimOkResponsePurchase.optional(),
|
|
19
19
|
profile: topUpEsimOkResponseProfile.optional(),
|
|
@@ -32,7 +32,7 @@ export type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
|
|
|
32
32
|
* The shape of the model mapping from the api schema into the application shape.
|
|
33
33
|
* Is equal to application shape if all property names match the api schema
|
|
34
34
|
*/
|
|
35
|
-
export const topUpEsimOkResponseResponse
|
|
35
|
+
export const topUpEsimOkResponseResponse = z.lazy(() => {
|
|
36
36
|
return z
|
|
37
37
|
.object({
|
|
38
38
|
purchase: topUpEsimOkResponsePurchaseResponse.optional(),
|
|
@@ -48,7 +48,7 @@ export const topUpEsimOkResponseResponse: any = z.lazy(() => {
|
|
|
48
48
|
* The shape of the model mapping from the application shape into the api schema.
|
|
49
49
|
* Is equal to application shape if all property names match the api schema
|
|
50
50
|
*/
|
|
51
|
-
export const topUpEsimOkResponseRequest
|
|
51
|
+
export const topUpEsimOkResponseRequest = z.lazy(() => {
|
|
52
52
|
return z
|
|
53
53
|
.object({
|
|
54
54
|
purchase: topUpEsimOkResponsePurchaseRequest.nullish(),
|
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
/**
|
|
4
4
|
* The shape of the model inside the application code - what the users use
|
|
5
5
|
*/
|
|
6
|
-
export const topUpEsimRequest
|
|
6
|
+
export const topUpEsimRequest = z.lazy(() => {
|
|
7
7
|
return z.object({
|
|
8
8
|
iccid: z.string().min(18).max(22),
|
|
9
9
|
dataLimitInGb: z.number(),
|
|
@@ -34,7 +34,7 @@ export type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
|
|
|
34
34
|
* The shape of the model mapping from the api schema into the application shape.
|
|
35
35
|
* Is equal to application shape if all property names match the api schema
|
|
36
36
|
*/
|
|
37
|
-
export const topUpEsimRequestResponse
|
|
37
|
+
export const topUpEsimRequestResponse = z.lazy(() => {
|
|
38
38
|
return z
|
|
39
39
|
.object({
|
|
40
40
|
iccid: z.string().min(18).max(22),
|
|
@@ -62,7 +62,7 @@ export const topUpEsimRequestResponse: any = z.lazy(() => {
|
|
|
62
62
|
* The shape of the model mapping from the application shape into the api schema.
|
|
63
63
|
* Is equal to application shape if all property names match the api schema
|
|
64
64
|
*/
|
|
65
|
-
export const topUpEsimRequestRequest
|
|
65
|
+
export const topUpEsimRequestRequest = z.lazy(() => {
|
|
66
66
|
return z
|
|
67
67
|
.object({
|
|
68
68
|
iccid: z.string().nullish(),
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { BaseService } from '../base-service';
|
|
3
3
|
import { ContentType, HttpResponse } from '../../http';
|
|
4
4
|
import { RequestConfig } from '../../http/types';
|
|
5
|
-
import {
|
|
5
|
+
import { RequestBuilder } from '../../http/transport/request-builder';
|
|
6
6
|
import { ListPurchasesOkResponse, listPurchasesOkResponseResponse } from './models/list-purchases-ok-response';
|
|
7
7
|
import { ListPurchasesParams } from './request-params';
|
|
8
8
|
import { CreatePurchaseRequest, createPurchaseRequestRequest } from './models/create-purchase-request';
|
|
@@ -33,24 +33,27 @@ export class PurchasesService extends BaseService {
|
|
|
33
33
|
params?: ListPurchasesParams,
|
|
34
34
|
requestConfig?: RequestConfig,
|
|
35
35
|
): Promise<HttpResponse<ListPurchasesOkResponse>> {
|
|
36
|
-
const request = new
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
36
|
+
const request = new RequestBuilder<ListPurchasesOkResponse>()
|
|
37
|
+
.setConfig(this.config)
|
|
38
|
+
.setBaseUrl(this.config)
|
|
39
|
+
.setMethod('GET')
|
|
40
|
+
.setPath('/purchases')
|
|
41
|
+
.setRequestSchema(z.any())
|
|
42
|
+
.setResponseSchema(listPurchasesOkResponseResponse)
|
|
43
|
+
.setRequestContentType(ContentType.Json)
|
|
44
|
+
.setResponseContentType(ContentType.Json)
|
|
45
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
46
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
47
|
+
.setResponseValidation(this.config, requestConfig)
|
|
48
|
+
.addQueryParam('iccid', params?.iccid)
|
|
49
|
+
.addQueryParam('afterDate', params?.afterDate)
|
|
50
|
+
.addQueryParam('beforeDate', params?.beforeDate)
|
|
51
|
+
.addQueryParam('referenceId', params?.referenceId)
|
|
52
|
+
.addQueryParam('afterCursor', params?.afterCursor)
|
|
53
|
+
.addQueryParam('limit', params?.limit)
|
|
54
|
+
.addQueryParam('after', params?.after)
|
|
55
|
+
.addQueryParam('before', params?.before)
|
|
56
|
+
.build();
|
|
54
57
|
return this.client.call<ListPurchasesOkResponse>(request);
|
|
55
58
|
}
|
|
56
59
|
|
|
@@ -62,18 +65,21 @@ export class PurchasesService extends BaseService {
|
|
|
62
65
|
body: CreatePurchaseRequest,
|
|
63
66
|
requestConfig?: RequestConfig,
|
|
64
67
|
): Promise<HttpResponse<CreatePurchaseOkResponse>> {
|
|
65
|
-
const request = new
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
requestConfig
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
const request = new RequestBuilder<CreatePurchaseOkResponse>()
|
|
69
|
+
.setConfig(this.config)
|
|
70
|
+
.setBaseUrl(this.config)
|
|
71
|
+
.setMethod('POST')
|
|
72
|
+
.setPath('/purchases')
|
|
73
|
+
.setRequestSchema(createPurchaseRequestRequest)
|
|
74
|
+
.setResponseSchema(createPurchaseOkResponseResponse)
|
|
75
|
+
.setRequestContentType(ContentType.Json)
|
|
76
|
+
.setResponseContentType(ContentType.Json)
|
|
77
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
78
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
79
|
+
.setResponseValidation(this.config, requestConfig)
|
|
80
|
+
.addHeaderParam('Content-Type', 'application/json')
|
|
81
|
+
.addBody(body)
|
|
82
|
+
.build();
|
|
77
83
|
return this.client.call<CreatePurchaseOkResponse>(request);
|
|
78
84
|
}
|
|
79
85
|
|
|
@@ -82,18 +88,21 @@ export class PurchasesService extends BaseService {
|
|
|
82
88
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
|
|
83
89
|
*/
|
|
84
90
|
async topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>> {
|
|
85
|
-
const request = new
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
requestConfig
|
|
95
|
-
|
|
96
|
-
|
|
91
|
+
const request = new RequestBuilder<TopUpEsimOkResponse>()
|
|
92
|
+
.setConfig(this.config)
|
|
93
|
+
.setBaseUrl(this.config)
|
|
94
|
+
.setMethod('POST')
|
|
95
|
+
.setPath('/purchases/topup')
|
|
96
|
+
.setRequestSchema(topUpEsimRequestRequest)
|
|
97
|
+
.setResponseSchema(topUpEsimOkResponseResponse)
|
|
98
|
+
.setRequestContentType(ContentType.Json)
|
|
99
|
+
.setResponseContentType(ContentType.Json)
|
|
100
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
101
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
102
|
+
.setResponseValidation(this.config, requestConfig)
|
|
103
|
+
.addHeaderParam('Content-Type', 'application/json')
|
|
104
|
+
.addBody(body)
|
|
105
|
+
.build();
|
|
97
106
|
return this.client.call<TopUpEsimOkResponse>(request);
|
|
98
107
|
}
|
|
99
108
|
|
|
@@ -105,18 +114,21 @@ export class PurchasesService extends BaseService {
|
|
|
105
114
|
body: EditPurchaseRequest,
|
|
106
115
|
requestConfig?: RequestConfig,
|
|
107
116
|
): Promise<HttpResponse<EditPurchaseOkResponse>> {
|
|
108
|
-
const request = new
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
requestConfig
|
|
118
|
-
|
|
119
|
-
|
|
117
|
+
const request = new RequestBuilder<EditPurchaseOkResponse>()
|
|
118
|
+
.setConfig(this.config)
|
|
119
|
+
.setBaseUrl(this.config)
|
|
120
|
+
.setMethod('POST')
|
|
121
|
+
.setPath('/purchases/edit')
|
|
122
|
+
.setRequestSchema(editPurchaseRequestRequest)
|
|
123
|
+
.setResponseSchema(editPurchaseOkResponseResponse)
|
|
124
|
+
.setRequestContentType(ContentType.Json)
|
|
125
|
+
.setResponseContentType(ContentType.Json)
|
|
126
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
127
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
128
|
+
.setResponseValidation(this.config, requestConfig)
|
|
129
|
+
.addHeaderParam('Content-Type', 'application/json')
|
|
130
|
+
.addBody(body)
|
|
131
|
+
.build();
|
|
120
132
|
return this.client.call<EditPurchaseOkResponse>(request);
|
|
121
133
|
}
|
|
122
134
|
|
|
@@ -129,17 +141,20 @@ export class PurchasesService extends BaseService {
|
|
|
129
141
|
purchaseId: string,
|
|
130
142
|
requestConfig?: RequestConfig,
|
|
131
143
|
): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>> {
|
|
132
|
-
const request = new
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
144
|
+
const request = new RequestBuilder<GetPurchaseConsumptionOkResponse>()
|
|
145
|
+
.setConfig(this.config)
|
|
146
|
+
.setBaseUrl(this.config)
|
|
147
|
+
.setMethod('GET')
|
|
148
|
+
.setPath('/purchases/{purchaseId}/consumption')
|
|
149
|
+
.setRequestSchema(z.any())
|
|
150
|
+
.setResponseSchema(getPurchaseConsumptionOkResponseResponse)
|
|
151
|
+
.setRequestContentType(ContentType.Json)
|
|
152
|
+
.setResponseContentType(ContentType.Json)
|
|
153
|
+
.setRetryAttempts(this.config, requestConfig)
|
|
154
|
+
.setRetryDelayMs(this.config, requestConfig)
|
|
155
|
+
.setResponseValidation(this.config, requestConfig)
|
|
156
|
+
.addPathParam('purchaseId', purchaseId)
|
|
157
|
+
.build();
|
|
143
158
|
return this.client.call<GetPurchaseConsumptionOkResponse>(request);
|
|
144
159
|
}
|
|
145
160
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
main
|