celitech-sdk 1.1.85 → 1.1.87
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +24 -18
- package/dist/index.d.ts +1503 -12
- package/dist/index.js +2152 -76
- package/dist/index.mjs +2114 -0
- package/package.json +25 -6
- package/.devcontainer/devcontainer.json +0 -24
- package/.github/workflows/publish_npmjs.yml +0 -32
- package/.manifest.json +0 -256
- package/dist/http/client.d.ts +0 -14
- package/dist/http/client.d.ts.map +0 -1
- package/dist/http/client.js +0 -36
- package/dist/http/client.js.map +0 -1
- package/dist/http/environment.d.ts +0 -4
- package/dist/http/environment.d.ts.map +0 -1
- package/dist/http/environment.js +0 -8
- package/dist/http/environment.js.map +0 -1
- package/dist/http/error.d.ts +0 -7
- package/dist/http/error.d.ts.map +0 -1
- package/dist/http/error.js +0 -12
- package/dist/http/error.js.map +0 -1
- package/dist/http/handlers/handler-chain.d.ts +0 -8
- package/dist/http/handlers/handler-chain.d.ts.map +0 -1
- package/dist/http/handlers/handler-chain.js +0 -34
- package/dist/http/handlers/handler-chain.js.map +0 -1
- package/dist/http/handlers/hook-handler.d.ts +0 -12
- package/dist/http/handlers/hook-handler.d.ts.map +0 -1
- package/dist/http/handlers/hook-handler.js +0 -49
- package/dist/http/handlers/hook-handler.js.map +0 -1
- package/dist/http/handlers/request-validation-handler.d.ts +0 -9
- package/dist/http/handlers/request-validation-handler.d.ts.map +0 -1
- package/dist/http/handlers/request-validation-handler.js +0 -78
- package/dist/http/handlers/request-validation-handler.js.map +0 -1
- package/dist/http/handlers/response-validation-handler.d.ts +0 -11
- package/dist/http/handlers/response-validation-handler.d.ts.map +0 -1
- package/dist/http/handlers/response-validation-handler.js +0 -89
- package/dist/http/handlers/response-validation-handler.js.map +0 -1
- package/dist/http/handlers/retry-handler.d.ts +0 -9
- package/dist/http/handlers/retry-handler.d.ts.map +0 -1
- package/dist/http/handlers/retry-handler.js +0 -47
- package/dist/http/handlers/retry-handler.js.map +0 -1
- package/dist/http/handlers/terminating-handler.d.ts +0 -8
- package/dist/http/handlers/terminating-handler.d.ts.map +0 -1
- package/dist/http/handlers/terminating-handler.js +0 -45
- package/dist/http/handlers/terminating-handler.js.map +0 -1
- package/dist/http/hooks/custom-hook.d.ts +0 -8
- package/dist/http/hooks/custom-hook.d.ts.map +0 -1
- package/dist/http/hooks/custom-hook.js +0 -37
- package/dist/http/hooks/custom-hook.js.map +0 -1
- package/dist/http/hooks/hook.d.ts +0 -31
- package/dist/http/hooks/hook.d.ts.map +0 -1
- package/dist/http/hooks/hook.js +0 -3
- package/dist/http/hooks/hook.js.map +0 -1
- package/dist/http/serializer.d.ts +0 -13
- package/dist/http/serializer.d.ts.map +0 -1
- package/dist/http/serializer.js +0 -150
- package/dist/http/serializer.js.map +0 -1
- package/dist/http/transport/request-builder.d.ts +0 -24
- package/dist/http/transport/request-builder.d.ts.map +0 -1
- package/dist/http/transport/request-builder.js +0 -130
- package/dist/http/transport/request-builder.js.map +0 -1
- package/dist/http/transport/request.d.ts +0 -53
- package/dist/http/transport/request.d.ts.map +0 -1
- package/dist/http/transport/request.js +0 -116
- package/dist/http/transport/request.js.map +0 -1
- package/dist/http/types.d.ts +0 -60
- package/dist/http/types.d.ts.map +0 -1
- package/dist/http/types.js +0 -16
- package/dist/http/types.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/services/base-service.d.ts +0 -14
- package/dist/services/base-service.d.ts.map +0 -1
- package/dist/services/base-service.js +0 -27
- package/dist/services/base-service.js.map +0 -1
- package/dist/services/destinations/destinations.d.ts +0 -11
- package/dist/services/destinations/destinations.d.ts.map +0 -1
- package/dist/services/destinations/destinations.js +0 -43
- package/dist/services/destinations/destinations.js.map +0 -1
- package/dist/services/destinations/index.d.ts +0 -3
- package/dist/services/destinations/index.d.ts.map +0 -1
- package/dist/services/destinations/index.js +0 -21
- package/dist/services/destinations/index.js.map +0 -1
- package/dist/services/destinations/models/destinations.d.ts +0 -76
- package/dist/services/destinations/models/destinations.d.ts.map +0 -1
- package/dist/services/destinations/models/destinations.js +0 -49
- package/dist/services/destinations/models/destinations.js.map +0 -1
- package/dist/services/destinations/models/index.d.ts +0 -3
- package/dist/services/destinations/models/index.d.ts.map +0 -1
- package/dist/services/destinations/models/index.js +0 -3
- package/dist/services/destinations/models/index.js.map +0 -1
- package/dist/services/destinations/models/list-destinations-ok-response.d.ts +0 -140
- package/dist/services/destinations/models/list-destinations-ok-response.d.ts.map +0 -1
- package/dist/services/destinations/models/list-destinations-ok-response.js +0 -36
- package/dist/services/destinations/models/list-destinations-ok-response.js.map +0 -1
- package/dist/services/e-sim/e-sim.d.ts +0 -34
- package/dist/services/e-sim/e-sim.d.ts.map +0 -1
- package/dist/services/e-sim/e-sim.js +0 -120
- package/dist/services/e-sim/e-sim.js.map +0 -1
- package/dist/services/e-sim/index.d.ts +0 -3
- package/dist/services/e-sim/index.d.ts.map +0 -1
- package/dist/services/e-sim/index.js +0 -21
- package/dist/services/e-sim/index.js.map +0 -1
- package/dist/services/e-sim/models/device.d.ts +0 -90
- package/dist/services/e-sim/models/device.d.ts.map +0 -1
- package/dist/services/e-sim/models/device.js +0 -54
- package/dist/services/e-sim/models/device.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts +0 -163
- package/dist/services/e-sim/models/get-esim-device-ok-response.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-device-ok-response.js +0 -36
- package/dist/services/e-sim/models/get-esim-device-ok-response.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts +0 -154
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js +0 -40
- package/dist/services/e-sim/models/get-esim-history-ok-response-esim.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts +0 -249
- package/dist/services/e-sim/models/get-esim-history-ok-response.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-history-ok-response.js +0 -36
- package/dist/services/e-sim/models/get-esim-history-ok-response.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts +0 -76
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js +0 -49
- package/dist/services/e-sim/models/get-esim-mac-ok-response-esim.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts +0 -140
- package/dist/services/e-sim/models/get-esim-mac-ok-response.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-mac-ok-response.js +0 -36
- package/dist/services/e-sim/models/get-esim-mac-ok-response.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts +0 -90
- package/dist/services/e-sim/models/get-esim-ok-response-esim.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-ok-response-esim.js +0 -54
- package/dist/services/e-sim/models/get-esim-ok-response-esim.js.map +0 -1
- package/dist/services/e-sim/models/get-esim-ok-response.d.ts +0 -163
- package/dist/services/e-sim/models/get-esim-ok-response.d.ts.map +0 -1
- package/dist/services/e-sim/models/get-esim-ok-response.js +0 -36
- package/dist/services/e-sim/models/get-esim-ok-response.js.map +0 -1
- package/dist/services/e-sim/models/history.d.ts +0 -76
- package/dist/services/e-sim/models/history.d.ts.map +0 -1
- package/dist/services/e-sim/models/history.js +0 -45
- package/dist/services/e-sim/models/history.js.map +0 -1
- package/dist/services/e-sim/models/index.d.ts +0 -10
- package/dist/services/e-sim/models/index.d.ts.map +0 -1
- package/dist/services/e-sim/models/index.js +0 -3
- package/dist/services/e-sim/models/index.js.map +0 -1
- package/dist/services/e-sim/request-params.d.ts +0 -4
- package/dist/services/e-sim/request-params.d.ts.map +0 -1
- package/dist/services/e-sim/request-params.js +0 -3
- package/dist/services/e-sim/request-params.js.map +0 -1
- package/dist/services/packages/index.d.ts +0 -3
- package/dist/services/packages/index.d.ts.map +0 -1
- package/dist/services/packages/index.js +0 -21
- package/dist/services/packages/index.js.map +0 -1
- package/dist/services/packages/models/index.d.ts +0 -3
- package/dist/services/packages/models/index.d.ts.map +0 -1
- package/dist/services/packages/models/index.js +0 -3
- package/dist/services/packages/models/index.js.map +0 -1
- package/dist/services/packages/models/list-packages-ok-response.d.ts +0 -223
- package/dist/services/packages/models/list-packages-ok-response.d.ts.map +0 -1
- package/dist/services/packages/models/list-packages-ok-response.js +0 -42
- package/dist/services/packages/models/list-packages-ok-response.js.map +0 -1
- package/dist/services/packages/models/packages.d.ts +0 -118
- package/dist/services/packages/models/packages.d.ts.map +0 -1
- package/dist/services/packages/models/packages.js +0 -64
- package/dist/services/packages/models/packages.js.map +0 -1
- package/dist/services/packages/packages.d.ts +0 -20
- package/dist/services/packages/packages.d.ts.map +0 -1
- package/dist/services/packages/packages.js +0 -59
- package/dist/services/packages/packages.js.map +0 -1
- package/dist/services/packages/request-params.d.ts +0 -11
- package/dist/services/packages/request-params.d.ts.map +0 -1
- package/dist/services/packages/request-params.js +0 -3
- package/dist/services/packages/request-params.js.map +0 -1
- package/dist/services/purchases/index.d.ts +0 -3
- package/dist/services/purchases/index.d.ts.map +0 -1
- package/dist/services/purchases/index.js +0 -21
- package/dist/services/purchases/index.js.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts +0 -62
- package/dist/services/purchases/models/create-purchase-ok-response-profile.d.ts.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response-profile.js +0 -39
- package/dist/services/purchases/models/create-purchase-ok-response-profile.js.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts +0 -132
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.d.ts.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.js +0 -69
- package/dist/services/purchases/models/create-purchase-ok-response-purchase.js.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response.d.ts +0 -315
- package/dist/services/purchases/models/create-purchase-ok-response.d.ts.map +0 -1
- package/dist/services/purchases/models/create-purchase-ok-response.js +0 -46
- package/dist/services/purchases/models/create-purchase-ok-response.js.map +0 -1
- package/dist/services/purchases/models/create-purchase-request.d.ts +0 -160
- package/dist/services/purchases/models/create-purchase-request.d.ts.map +0 -1
- package/dist/services/purchases/models/create-purchase-request.js +0 -79
- package/dist/services/purchases/models/create-purchase-request.js.map +0 -1
- package/dist/services/purchases/models/edit-purchase-ok-response.d.ts +0 -104
- package/dist/services/purchases/models/edit-purchase-ok-response.d.ts.map +0 -1
- package/dist/services/purchases/models/edit-purchase-ok-response.js +0 -59
- package/dist/services/purchases/models/edit-purchase-ok-response.js.map +0 -1
- package/dist/services/purchases/models/edit-purchase-request.d.ts +0 -104
- package/dist/services/purchases/models/edit-purchase-request.d.ts.map +0 -1
- package/dist/services/purchases/models/edit-purchase-request.js +0 -59
- package/dist/services/purchases/models/edit-purchase-request.js.map +0 -1
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts +0 -62
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.d.ts.map +0 -1
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.js +0 -41
- package/dist/services/purchases/models/get-purchase-consumption-ok-response.js.map +0 -1
- package/dist/services/purchases/models/index.d.ts +0 -16
- package/dist/services/purchases/models/index.d.ts.map +0 -1
- package/dist/services/purchases/models/index.js +0 -3
- package/dist/services/purchases/models/index.js.map +0 -1
- package/dist/services/purchases/models/list-purchases-ok-response.d.ts +0 -622
- package/dist/services/purchases/models/list-purchases-ok-response.d.ts.map +0 -1
- package/dist/services/purchases/models/list-purchases-ok-response.js +0 -42
- package/dist/services/purchases/models/list-purchases-ok-response.js.map +0 -1
- package/dist/services/purchases/models/package_.d.ts +0 -104
- package/dist/services/purchases/models/package_.d.ts.map +0 -1
- package/dist/services/purchases/models/package_.js +0 -59
- package/dist/services/purchases/models/package_.js.map +0 -1
- package/dist/services/purchases/models/purchases-esim.d.ts +0 -48
- package/dist/services/purchases/models/purchases-esim.d.ts.map +0 -1
- package/dist/services/purchases/models/purchases-esim.js +0 -35
- package/dist/services/purchases/models/purchases-esim.js.map +0 -1
- package/dist/services/purchases/models/purchases.d.ts +0 -372
- package/dist/services/purchases/models/purchases.d.ts.map +0 -1
- package/dist/services/purchases/models/purchases.js +0 -91
- package/dist/services/purchases/models/purchases.js.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts +0 -48
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.d.ts.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.js +0 -35
- package/dist/services/purchases/models/top-up-esim-ok-response-profile.js.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts +0 -132
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.d.ts.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js +0 -69
- package/dist/services/purchases/models/top-up-esim-ok-response-purchase.js.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response.d.ts +0 -292
- package/dist/services/purchases/models/top-up-esim-ok-response.d.ts.map +0 -1
- package/dist/services/purchases/models/top-up-esim-ok-response.js +0 -46
- package/dist/services/purchases/models/top-up-esim-ok-response.js.map +0 -1
- package/dist/services/purchases/models/top-up-esim-request.d.ts +0 -146
- package/dist/services/purchases/models/top-up-esim-request.d.ts.map +0 -1
- package/dist/services/purchases/models/top-up-esim-request.js +0 -74
- package/dist/services/purchases/models/top-up-esim-request.js.map +0 -1
- package/dist/services/purchases/purchases.d.ts +0 -48
- package/dist/services/purchases/purchases.d.ts.map +0 -1
- package/dist/services/purchases/purchases.js +0 -162
- package/dist/services/purchases/purchases.js.map +0 -1
- package/dist/services/purchases/request-params.d.ts +0 -11
- package/dist/services/purchases/request-params.d.ts.map +0 -1
- package/dist/services/purchases/request-params.js +0 -3
- package/dist/services/purchases/request-params.js.map +0 -1
- package/documentation/models/CreatePurchaseOkResponse.md +0 -31
- package/documentation/models/CreatePurchaseRequest.md +0 -15
- package/documentation/models/EditPurchaseOkResponse.md +0 -11
- package/documentation/models/EditPurchaseRequest.md +0 -11
- package/documentation/models/GetEsimDeviceOkResponse.md +0 -18
- package/documentation/models/GetEsimHistoryOkResponse.md +0 -26
- package/documentation/models/GetEsimMacOkResponse.md +0 -17
- package/documentation/models/GetEsimOkResponse.md +0 -18
- package/documentation/models/GetPurchaseConsumptionOkResponse.md +0 -8
- package/documentation/models/ListDestinationsOkResponse.md +0 -17
- package/documentation/models/ListPackagesOkResponse.md +0 -21
- package/documentation/models/ListPurchasesOkResponse.md +0 -46
- package/documentation/models/TopUpEsimOkResponse.md +0 -30
- package/documentation/models/TopUpEsimRequest.md +0 -14
- package/documentation/services/DestinationsService.md +0 -35
- package/documentation/services/ESimService.md +0 -148
- package/documentation/services/PackagesService.md +0 -48
- package/documentation/services/PurchasesService.md +0 -222
- package/documentation/snippets/destinations-get.md +0 -14
- package/documentation/snippets/esim-get.md +0 -16
- package/documentation/snippets/esim-{iccid}-device-get.md +0 -14
- package/documentation/snippets/esim-{iccid}-history-get.md +0 -14
- package/documentation/snippets/esim-{iccid}-mac-get.md +0 -14
- package/documentation/snippets/packages-get.md +0 -14
- package/documentation/snippets/purchases-edit-post.md +0 -23
- package/documentation/snippets/purchases-get.md +0 -14
- package/documentation/snippets/purchases-post.md +0 -27
- package/documentation/snippets/purchases-topup-post.md +0 -26
- package/documentation/snippets/purchases-{purchaseId}-consumption-get.md +0 -14
- package/examples/README.md +0 -27
- package/examples/package.json +0 -18
- package/examples/src/index.ts +0 -12
- package/examples/tsconfig.json +0 -22
- package/src/http/client.ts +0 -46
- package/src/http/environment.ts +0 -3
- package/src/http/error.ts +0 -12
- package/src/http/handlers/handler-chain.ts +0 -22
- package/src/http/handlers/hook-handler.ts +0 -47
- package/src/http/handlers/request-validation-handler.ts +0 -72
- package/src/http/handlers/response-validation-handler.ts +0 -106
- package/src/http/handlers/retry-handler.ts +0 -40
- package/src/http/handlers/terminating-handler.ts +0 -38
- package/src/http/hooks/custom-hook.ts +0 -32
- package/src/http/hooks/hook.ts +0 -40
- package/src/http/serializer.ts +0 -183
- package/src/http/transport/request-builder.ts +0 -145
- package/src/http/transport/request.ts +0 -178
- package/src/http/types.ts +0 -70
- package/src/index.ts +0 -73
- package/src/services/base-service.ts +0 -29
- package/src/services/destinations/destinations.ts +0 -28
- package/src/services/destinations/index.ts +0 -2
- package/src/services/destinations/models/destinations.ts +0 -57
- package/src/services/destinations/models/index.ts +0 -2
- package/src/services/destinations/models/list-destinations-ok-response.ts +0 -42
- package/src/services/e-sim/e-sim.ts +0 -103
- package/src/services/e-sim/index.ts +0 -2
- package/src/services/e-sim/models/device.ts +0 -63
- package/src/services/e-sim/models/get-esim-device-ok-response.ts +0 -42
- package/src/services/e-sim/models/get-esim-history-ok-response-esim.ts +0 -47
- package/src/services/e-sim/models/get-esim-history-ok-response.ts +0 -46
- package/src/services/e-sim/models/get-esim-mac-ok-response-esim.ts +0 -57
- package/src/services/e-sim/models/get-esim-mac-ok-response.ts +0 -46
- package/src/services/e-sim/models/get-esim-ok-response-esim.ts +0 -63
- package/src/services/e-sim/models/get-esim-ok-response.ts +0 -46
- package/src/services/e-sim/models/history.ts +0 -53
- package/src/services/e-sim/models/index.ts +0 -9
- package/src/services/e-sim/request-params.ts +0 -3
- package/src/services/packages/index.ts +0 -2
- package/src/services/packages/models/index.ts +0 -2
- package/src/services/packages/models/list-packages-ok-response.ts +0 -49
- package/src/services/packages/models/packages.ts +0 -75
- package/src/services/packages/packages.ts +0 -48
- package/src/services/packages/request-params.ts +0 -10
- package/src/services/purchases/index.ts +0 -2
- package/src/services/purchases/models/create-purchase-ok-response-profile.ts +0 -46
- package/src/services/purchases/models/create-purchase-ok-response-purchase.ts +0 -81
- package/src/services/purchases/models/create-purchase-ok-response.ts +0 -61
- package/src/services/purchases/models/create-purchase-request.ts +0 -93
- package/src/services/purchases/models/edit-purchase-ok-response.ts +0 -69
- package/src/services/purchases/models/edit-purchase-request.ts +0 -69
- package/src/services/purchases/models/get-purchase-consumption-ok-response.ts +0 -48
- package/src/services/purchases/models/index.ts +0 -15
- package/src/services/purchases/models/list-purchases-ok-response.ts +0 -49
- package/src/services/purchases/models/package_.ts +0 -69
- package/src/services/purchases/models/purchases-esim.ts +0 -41
- package/src/services/purchases/models/purchases.ts +0 -107
- package/src/services/purchases/models/top-up-esim-ok-response-profile.ts +0 -41
- package/src/services/purchases/models/top-up-esim-ok-response-purchase.ts +0 -81
- package/src/services/purchases/models/top-up-esim-ok-response.ts +0 -61
- package/src/services/purchases/models/top-up-esim-request.ts +0 -87
- package/src/services/purchases/purchases.ts +0 -159
- package/src/services/purchases/request-params.ts +0 -10
- package/tsconfig.json +0 -22
@@ -1,75 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const packages = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
id: z.string().optional(),
|
9
|
-
destination: z.string().optional(),
|
10
|
-
dataLimitInBytes: z.number().optional(),
|
11
|
-
minDays: z.number().optional(),
|
12
|
-
maxDays: z.number().optional(),
|
13
|
-
priceInCents: z.number().optional(),
|
14
|
-
});
|
15
|
-
});
|
16
|
-
|
17
|
-
/**
|
18
|
-
*
|
19
|
-
* @typedef {Packages} packages
|
20
|
-
* @property {string} - ID of the package
|
21
|
-
* @property {string} - ISO representation of the package's destination
|
22
|
-
* @property {number} - Size of the package in Bytes
|
23
|
-
* @property {number} - Min number of days for the package
|
24
|
-
* @property {number} - Max number of days for the package
|
25
|
-
* @property {number} - Price of the package in cents
|
26
|
-
*/
|
27
|
-
export type Packages = z.infer<typeof packages>;
|
28
|
-
|
29
|
-
/**
|
30
|
-
* The shape of the model mapping from the api schema into the application shape.
|
31
|
-
* Is equal to application shape if all property names match the api schema
|
32
|
-
*/
|
33
|
-
export const packagesResponse = z.lazy(() => {
|
34
|
-
return z
|
35
|
-
.object({
|
36
|
-
id: z.string().optional(),
|
37
|
-
destination: z.string().optional(),
|
38
|
-
dataLimitInBytes: z.number().optional(),
|
39
|
-
minDays: z.number().optional(),
|
40
|
-
maxDays: z.number().optional(),
|
41
|
-
priceInCents: z.number().optional(),
|
42
|
-
})
|
43
|
-
.transform((data) => ({
|
44
|
-
id: data['id'],
|
45
|
-
destination: data['destination'],
|
46
|
-
dataLimitInBytes: data['dataLimitInBytes'],
|
47
|
-
minDays: data['minDays'],
|
48
|
-
maxDays: data['maxDays'],
|
49
|
-
priceInCents: data['priceInCents'],
|
50
|
-
}));
|
51
|
-
});
|
52
|
-
|
53
|
-
/**
|
54
|
-
* The shape of the model mapping from the application shape into the api schema.
|
55
|
-
* Is equal to application shape if all property names match the api schema
|
56
|
-
*/
|
57
|
-
export const packagesRequest = z.lazy(() => {
|
58
|
-
return z
|
59
|
-
.object({
|
60
|
-
id: z.string().nullish(),
|
61
|
-
destination: z.string().nullish(),
|
62
|
-
dataLimitInBytes: z.number().nullish(),
|
63
|
-
minDays: z.number().nullish(),
|
64
|
-
maxDays: z.number().nullish(),
|
65
|
-
priceInCents: z.number().nullish(),
|
66
|
-
})
|
67
|
-
.transform((data) => ({
|
68
|
-
id: data['id'],
|
69
|
-
destination: data['destination'],
|
70
|
-
dataLimitInBytes: data['dataLimitInBytes'],
|
71
|
-
minDays: data['minDays'],
|
72
|
-
maxDays: data['maxDays'],
|
73
|
-
priceInCents: data['priceInCents'],
|
74
|
-
}));
|
75
|
-
});
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { BaseService } from '../base-service';
|
3
|
-
import { ContentType, HttpResponse, RequestConfig } from '../../http/types';
|
4
|
-
import { RequestBuilder } from '../../http/transport/request-builder';
|
5
|
-
import { ListPackagesOkResponse, listPackagesOkResponseResponse } from './models/list-packages-ok-response';
|
6
|
-
import { ListPackagesParams } from './request-params';
|
7
|
-
|
8
|
-
export class PackagesService extends BaseService {
|
9
|
-
/**
|
10
|
-
* List Packages
|
11
|
-
* @param {string} [destination] - ISO representation of the package's destination.
|
12
|
-
* @param {string} [startDate] - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
13
|
-
* @param {string} [endDate] - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
14
|
-
* @param {string} [afterCursor] - To get the next batch of results, use this parameter. It tells the API where to start fetching data after the last item you received. It helps you avoid repeats and efficiently browse through large sets of data.
|
15
|
-
* @param {number} [limit] - Maximum number of packages to be returned in the response. The value must be greater than 0 and less than or equal to 160. If not provided, the default value is 20
|
16
|
-
* @param {number} [startTime] - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months
|
17
|
-
* @param {number} [endTime] - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time
|
18
|
-
* @param {number} [duration] - Duration in seconds for the package's validity. If this parameter is present, it will override the startTime and endTime parameters. The maximum duration for a package's validity period is 90 days
|
19
|
-
* @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
|
20
|
-
*/
|
21
|
-
async listPackages(
|
22
|
-
params?: ListPackagesParams,
|
23
|
-
requestConfig?: RequestConfig,
|
24
|
-
): Promise<HttpResponse<ListPackagesOkResponse>> {
|
25
|
-
const request = new RequestBuilder<ListPackagesOkResponse>()
|
26
|
-
.setConfig(this.config)
|
27
|
-
.setBaseUrl(this.config)
|
28
|
-
.setMethod('GET')
|
29
|
-
.setPath('/packages')
|
30
|
-
.setRequestSchema(z.any())
|
31
|
-
.setResponseSchema(listPackagesOkResponseResponse)
|
32
|
-
.setRequestContentType(ContentType.Json)
|
33
|
-
.setResponseContentType(ContentType.Json)
|
34
|
-
.setRetryAttempts(this.config, requestConfig)
|
35
|
-
.setRetryDelayMs(this.config, requestConfig)
|
36
|
-
.setResponseValidation(this.config, requestConfig)
|
37
|
-
.addQueryParam('destination', params?.destination)
|
38
|
-
.addQueryParam('startDate', params?.startDate)
|
39
|
-
.addQueryParam('endDate', params?.endDate)
|
40
|
-
.addQueryParam('afterCursor', params?.afterCursor)
|
41
|
-
.addQueryParam('limit', params?.limit)
|
42
|
-
.addQueryParam('startTime', params?.startTime)
|
43
|
-
.addQueryParam('endTime', params?.endTime)
|
44
|
-
.addQueryParam('duration', params?.duration)
|
45
|
-
.build();
|
46
|
-
return this.client.call<ListPackagesOkResponse>(request);
|
47
|
-
}
|
48
|
-
}
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const createPurchaseOkResponseProfile = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
iccid: z.string().min(18).max(22).optional(),
|
9
|
-
activationCode: z.string().min(1000).max(8000).optional(),
|
10
|
-
});
|
11
|
-
});
|
12
|
-
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @typedef {CreatePurchaseOkResponseProfile} createPurchaseOkResponseProfile
|
16
|
-
* @property {string} - ID of the eSIM
|
17
|
-
* @property {string} - QR Code of the eSIM as base64
|
18
|
-
*/
|
19
|
-
export type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponseProfile>;
|
20
|
-
|
21
|
-
/**
|
22
|
-
* The shape of the model mapping from the api schema into the application shape.
|
23
|
-
* Is equal to application shape if all property names match the api schema
|
24
|
-
*/
|
25
|
-
export const createPurchaseOkResponseProfileResponse = z.lazy(() => {
|
26
|
-
return z
|
27
|
-
.object({
|
28
|
-
iccid: z.string().min(18).max(22).optional(),
|
29
|
-
activationCode: z.string().min(1000).max(8000).optional(),
|
30
|
-
})
|
31
|
-
.transform((data) => ({
|
32
|
-
iccid: data['iccid'],
|
33
|
-
activationCode: data['activationCode'],
|
34
|
-
}));
|
35
|
-
});
|
36
|
-
|
37
|
-
/**
|
38
|
-
* The shape of the model mapping from the application shape into the api schema.
|
39
|
-
* Is equal to application shape if all property names match the api schema
|
40
|
-
*/
|
41
|
-
export const createPurchaseOkResponseProfileRequest = z.lazy(() => {
|
42
|
-
return z.object({ iccid: z.string().nullish(), activationCode: z.string().nullish() }).transform((data) => ({
|
43
|
-
iccid: data['iccid'],
|
44
|
-
activationCode: data['activationCode'],
|
45
|
-
}));
|
46
|
-
});
|
@@ -1,81 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const createPurchaseOkResponsePurchase = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
id: z.string().optional(),
|
9
|
-
packageId: z.string().optional(),
|
10
|
-
startDate: z.string().optional(),
|
11
|
-
endDate: z.string().optional(),
|
12
|
-
createdDate: z.string().optional(),
|
13
|
-
startTime: z.number().optional(),
|
14
|
-
endTime: z.number().optional(),
|
15
|
-
});
|
16
|
-
});
|
17
|
-
|
18
|
-
/**
|
19
|
-
*
|
20
|
-
* @typedef {CreatePurchaseOkResponsePurchase} createPurchaseOkResponsePurchase
|
21
|
-
* @property {string} - ID of the purchase
|
22
|
-
* @property {string} - ID of the package
|
23
|
-
* @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
24
|
-
* @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
25
|
-
* @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
26
|
-
* @property {number} - Epoch value representing the start time of the package's validity
|
27
|
-
* @property {number} - Epoch value representing the end time of the package's validity
|
28
|
-
*/
|
29
|
-
export type CreatePurchaseOkResponsePurchase = z.infer<typeof createPurchaseOkResponsePurchase>;
|
30
|
-
|
31
|
-
/**
|
32
|
-
* The shape of the model mapping from the api schema into the application shape.
|
33
|
-
* Is equal to application shape if all property names match the api schema
|
34
|
-
*/
|
35
|
-
export const createPurchaseOkResponsePurchaseResponse = z.lazy(() => {
|
36
|
-
return z
|
37
|
-
.object({
|
38
|
-
id: z.string().optional(),
|
39
|
-
packageId: z.string().optional(),
|
40
|
-
startDate: z.string().optional(),
|
41
|
-
endDate: z.string().optional(),
|
42
|
-
createdDate: z.string().optional(),
|
43
|
-
startTime: z.number().optional(),
|
44
|
-
endTime: z.number().optional(),
|
45
|
-
})
|
46
|
-
.transform((data) => ({
|
47
|
-
id: data['id'],
|
48
|
-
packageId: data['packageId'],
|
49
|
-
startDate: data['startDate'],
|
50
|
-
endDate: data['endDate'],
|
51
|
-
createdDate: data['createdDate'],
|
52
|
-
startTime: data['startTime'],
|
53
|
-
endTime: data['endTime'],
|
54
|
-
}));
|
55
|
-
});
|
56
|
-
|
57
|
-
/**
|
58
|
-
* The shape of the model mapping from the application shape into the api schema.
|
59
|
-
* Is equal to application shape if all property names match the api schema
|
60
|
-
*/
|
61
|
-
export const createPurchaseOkResponsePurchaseRequest = z.lazy(() => {
|
62
|
-
return z
|
63
|
-
.object({
|
64
|
-
id: z.string().nullish(),
|
65
|
-
packageId: z.string().nullish(),
|
66
|
-
startDate: z.string().nullish(),
|
67
|
-
endDate: z.string().nullish(),
|
68
|
-
createdDate: z.string().nullish(),
|
69
|
-
startTime: z.number().nullish(),
|
70
|
-
endTime: z.number().nullish(),
|
71
|
-
})
|
72
|
-
.transform((data) => ({
|
73
|
-
id: data['id'],
|
74
|
-
packageId: data['packageId'],
|
75
|
-
startDate: data['startDate'],
|
76
|
-
endDate: data['endDate'],
|
77
|
-
createdDate: data['createdDate'],
|
78
|
-
startTime: data['startTime'],
|
79
|
-
endTime: data['endTime'],
|
80
|
-
}));
|
81
|
-
});
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import {
|
3
|
-
createPurchaseOkResponsePurchase,
|
4
|
-
createPurchaseOkResponsePurchaseRequest,
|
5
|
-
createPurchaseOkResponsePurchaseResponse,
|
6
|
-
} from './create-purchase-ok-response-purchase';
|
7
|
-
import {
|
8
|
-
createPurchaseOkResponseProfile,
|
9
|
-
createPurchaseOkResponseProfileRequest,
|
10
|
-
createPurchaseOkResponseProfileResponse,
|
11
|
-
} from './create-purchase-ok-response-profile';
|
12
|
-
|
13
|
-
/**
|
14
|
-
* The shape of the model inside the application code - what the users use
|
15
|
-
*/
|
16
|
-
export const createPurchaseOkResponse = z.lazy(() => {
|
17
|
-
return z.object({
|
18
|
-
purchase: createPurchaseOkResponsePurchase.optional(),
|
19
|
-
profile: createPurchaseOkResponseProfile.optional(),
|
20
|
-
});
|
21
|
-
});
|
22
|
-
|
23
|
-
/**
|
24
|
-
*
|
25
|
-
* @typedef {CreatePurchaseOkResponse} createPurchaseOkResponse
|
26
|
-
* @property {CreatePurchaseOkResponsePurchase}
|
27
|
-
* @property {CreatePurchaseOkResponseProfile}
|
28
|
-
*/
|
29
|
-
export type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
|
30
|
-
|
31
|
-
/**
|
32
|
-
* The shape of the model mapping from the api schema into the application shape.
|
33
|
-
* Is equal to application shape if all property names match the api schema
|
34
|
-
*/
|
35
|
-
export const createPurchaseOkResponseResponse = z.lazy(() => {
|
36
|
-
return z
|
37
|
-
.object({
|
38
|
-
purchase: createPurchaseOkResponsePurchaseResponse.optional(),
|
39
|
-
profile: createPurchaseOkResponseProfileResponse.optional(),
|
40
|
-
})
|
41
|
-
.transform((data) => ({
|
42
|
-
purchase: data['purchase'],
|
43
|
-
profile: data['profile'],
|
44
|
-
}));
|
45
|
-
});
|
46
|
-
|
47
|
-
/**
|
48
|
-
* The shape of the model mapping from the application shape into the api schema.
|
49
|
-
* Is equal to application shape if all property names match the api schema
|
50
|
-
*/
|
51
|
-
export const createPurchaseOkResponseRequest = z.lazy(() => {
|
52
|
-
return z
|
53
|
-
.object({
|
54
|
-
purchase: createPurchaseOkResponsePurchaseRequest.nullish(),
|
55
|
-
profile: createPurchaseOkResponseProfileRequest.nullish(),
|
56
|
-
})
|
57
|
-
.transform((data) => ({
|
58
|
-
purchase: data['purchase'],
|
59
|
-
profile: data['profile'],
|
60
|
-
}));
|
61
|
-
});
|
@@ -1,93 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const createPurchaseRequest = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
destination: z.string(),
|
9
|
-
dataLimitInGb: z.number(),
|
10
|
-
startDate: z.string(),
|
11
|
-
endDate: z.string(),
|
12
|
-
email: z.string().optional(),
|
13
|
-
referenceId: z.string().optional(),
|
14
|
-
networkBrand: z.string().optional(),
|
15
|
-
startTime: z.number().optional(),
|
16
|
-
endTime: z.number().optional(),
|
17
|
-
});
|
18
|
-
});
|
19
|
-
|
20
|
-
/**
|
21
|
-
*
|
22
|
-
* @typedef {CreatePurchaseRequest} createPurchaseRequest
|
23
|
-
* @property {string} - ISO representation of the package's destination
|
24
|
-
* @property {number} - Size of the package in GB. The available options are 1, 2, 3, 5, 8, 20GB
|
25
|
-
* @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
26
|
-
* @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
27
|
-
* @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
|
28
|
-
* @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
29
|
-
* @property {string} - Customize the network brand of the issued eSIM. This parameter is accessible to platforms with Diamond tier and requires an alphanumeric string of up to 15 characters
|
30
|
-
* @property {number} - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
31
|
-
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
32
|
-
*/
|
33
|
-
export type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
|
34
|
-
|
35
|
-
/**
|
36
|
-
* The shape of the model mapping from the api schema into the application shape.
|
37
|
-
* Is equal to application shape if all property names match the api schema
|
38
|
-
*/
|
39
|
-
export const createPurchaseRequestResponse = z.lazy(() => {
|
40
|
-
return z
|
41
|
-
.object({
|
42
|
-
destination: z.string(),
|
43
|
-
dataLimitInGB: z.number(),
|
44
|
-
startDate: z.string(),
|
45
|
-
endDate: z.string(),
|
46
|
-
email: z.string().optional(),
|
47
|
-
referenceId: z.string().optional(),
|
48
|
-
networkBrand: z.string().optional(),
|
49
|
-
startTime: z.number().optional(),
|
50
|
-
endTime: z.number().optional(),
|
51
|
-
})
|
52
|
-
.transform((data) => ({
|
53
|
-
destination: data['destination'],
|
54
|
-
dataLimitInGb: data['dataLimitInGB'],
|
55
|
-
startDate: data['startDate'],
|
56
|
-
endDate: data['endDate'],
|
57
|
-
email: data['email'],
|
58
|
-
referenceId: data['referenceId'],
|
59
|
-
networkBrand: data['networkBrand'],
|
60
|
-
startTime: data['startTime'],
|
61
|
-
endTime: data['endTime'],
|
62
|
-
}));
|
63
|
-
});
|
64
|
-
|
65
|
-
/**
|
66
|
-
* The shape of the model mapping from the application shape into the api schema.
|
67
|
-
* Is equal to application shape if all property names match the api schema
|
68
|
-
*/
|
69
|
-
export const createPurchaseRequestRequest = z.lazy(() => {
|
70
|
-
return z
|
71
|
-
.object({
|
72
|
-
destination: z.string().nullish(),
|
73
|
-
dataLimitInGb: z.number().nullish(),
|
74
|
-
startDate: z.string().nullish(),
|
75
|
-
endDate: z.string().nullish(),
|
76
|
-
email: z.string().nullish(),
|
77
|
-
referenceId: z.string().nullish(),
|
78
|
-
networkBrand: z.string().nullish(),
|
79
|
-
startTime: z.number().nullish(),
|
80
|
-
endTime: z.number().nullish(),
|
81
|
-
})
|
82
|
-
.transform((data) => ({
|
83
|
-
destination: data['destination'],
|
84
|
-
dataLimitInGB: data['dataLimitInGb'],
|
85
|
-
startDate: data['startDate'],
|
86
|
-
endDate: data['endDate'],
|
87
|
-
email: data['email'],
|
88
|
-
referenceId: data['referenceId'],
|
89
|
-
networkBrand: data['networkBrand'],
|
90
|
-
startTime: data['startTime'],
|
91
|
-
endTime: data['endTime'],
|
92
|
-
}));
|
93
|
-
});
|
@@ -1,69 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const editPurchaseOkResponse = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
purchaseId: z.string().optional(),
|
9
|
-
newStartDate: z.string().optional(),
|
10
|
-
newEndDate: z.string().optional(),
|
11
|
-
newStartTime: z.number().optional(),
|
12
|
-
newEndTime: z.number().optional(),
|
13
|
-
});
|
14
|
-
});
|
15
|
-
|
16
|
-
/**
|
17
|
-
*
|
18
|
-
* @typedef {EditPurchaseOkResponse} editPurchaseOkResponse
|
19
|
-
* @property {string} - ID of the purchase
|
20
|
-
* @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
21
|
-
* @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
22
|
-
* @property {number} - Epoch value representing the new start time of the package's validity
|
23
|
-
* @property {number} - Epoch value representing the new end time of the package's validity
|
24
|
-
*/
|
25
|
-
export type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
|
26
|
-
|
27
|
-
/**
|
28
|
-
* The shape of the model mapping from the api schema into the application shape.
|
29
|
-
* Is equal to application shape if all property names match the api schema
|
30
|
-
*/
|
31
|
-
export const editPurchaseOkResponseResponse = z.lazy(() => {
|
32
|
-
return z
|
33
|
-
.object({
|
34
|
-
purchaseId: z.string().optional(),
|
35
|
-
newStartDate: z.string().optional(),
|
36
|
-
newEndDate: z.string().optional(),
|
37
|
-
newStartTime: z.number().optional(),
|
38
|
-
newEndTime: z.number().optional(),
|
39
|
-
})
|
40
|
-
.transform((data) => ({
|
41
|
-
purchaseId: data['purchaseId'],
|
42
|
-
newStartDate: data['newStartDate'],
|
43
|
-
newEndDate: data['newEndDate'],
|
44
|
-
newStartTime: data['newStartTime'],
|
45
|
-
newEndTime: data['newEndTime'],
|
46
|
-
}));
|
47
|
-
});
|
48
|
-
|
49
|
-
/**
|
50
|
-
* The shape of the model mapping from the application shape into the api schema.
|
51
|
-
* Is equal to application shape if all property names match the api schema
|
52
|
-
*/
|
53
|
-
export const editPurchaseOkResponseRequest = z.lazy(() => {
|
54
|
-
return z
|
55
|
-
.object({
|
56
|
-
purchaseId: z.string().nullish(),
|
57
|
-
newStartDate: z.string().nullish(),
|
58
|
-
newEndDate: z.string().nullish(),
|
59
|
-
newStartTime: z.number().nullish(),
|
60
|
-
newEndTime: z.number().nullish(),
|
61
|
-
})
|
62
|
-
.transform((data) => ({
|
63
|
-
purchaseId: data['purchaseId'],
|
64
|
-
newStartDate: data['newStartDate'],
|
65
|
-
newEndDate: data['newEndDate'],
|
66
|
-
newStartTime: data['newStartTime'],
|
67
|
-
newEndTime: data['newEndTime'],
|
68
|
-
}));
|
69
|
-
});
|
@@ -1,69 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const editPurchaseRequest = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
purchaseId: z.string(),
|
9
|
-
startDate: z.string(),
|
10
|
-
endDate: z.string(),
|
11
|
-
startTime: z.number().optional(),
|
12
|
-
endTime: z.number().optional(),
|
13
|
-
});
|
14
|
-
});
|
15
|
-
|
16
|
-
/**
|
17
|
-
*
|
18
|
-
* @typedef {EditPurchaseRequest} editPurchaseRequest
|
19
|
-
* @property {string} - ID of the purchase
|
20
|
-
* @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
21
|
-
* @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
22
|
-
* @property {number} - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
23
|
-
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
24
|
-
*/
|
25
|
-
export type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
|
26
|
-
|
27
|
-
/**
|
28
|
-
* The shape of the model mapping from the api schema into the application shape.
|
29
|
-
* Is equal to application shape if all property names match the api schema
|
30
|
-
*/
|
31
|
-
export const editPurchaseRequestResponse = z.lazy(() => {
|
32
|
-
return z
|
33
|
-
.object({
|
34
|
-
purchaseId: z.string(),
|
35
|
-
startDate: z.string(),
|
36
|
-
endDate: z.string(),
|
37
|
-
startTime: z.number().optional(),
|
38
|
-
endTime: z.number().optional(),
|
39
|
-
})
|
40
|
-
.transform((data) => ({
|
41
|
-
purchaseId: data['purchaseId'],
|
42
|
-
startDate: data['startDate'],
|
43
|
-
endDate: data['endDate'],
|
44
|
-
startTime: data['startTime'],
|
45
|
-
endTime: data['endTime'],
|
46
|
-
}));
|
47
|
-
});
|
48
|
-
|
49
|
-
/**
|
50
|
-
* The shape of the model mapping from the application shape into the api schema.
|
51
|
-
* Is equal to application shape if all property names match the api schema
|
52
|
-
*/
|
53
|
-
export const editPurchaseRequestRequest = z.lazy(() => {
|
54
|
-
return z
|
55
|
-
.object({
|
56
|
-
purchaseId: z.string().nullish(),
|
57
|
-
startDate: z.string().nullish(),
|
58
|
-
endDate: z.string().nullish(),
|
59
|
-
startTime: z.number().nullish(),
|
60
|
-
endTime: z.number().nullish(),
|
61
|
-
})
|
62
|
-
.transform((data) => ({
|
63
|
-
purchaseId: data['purchaseId'],
|
64
|
-
startDate: data['startDate'],
|
65
|
-
endDate: data['endDate'],
|
66
|
-
startTime: data['startTime'],
|
67
|
-
endTime: data['endTime'],
|
68
|
-
}));
|
69
|
-
});
|
@@ -1,48 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
|
3
|
-
/**
|
4
|
-
* The shape of the model inside the application code - what the users use
|
5
|
-
*/
|
6
|
-
export const getPurchaseConsumptionOkResponse = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
dataUsageRemainingInBytes: z.number().optional(),
|
9
|
-
status: z.string().optional(),
|
10
|
-
});
|
11
|
-
});
|
12
|
-
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
|
16
|
-
* @property {number} - Remaining balance of the package in bytes
|
17
|
-
* @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
|
18
|
-
*/
|
19
|
-
export type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
|
20
|
-
|
21
|
-
/**
|
22
|
-
* The shape of the model mapping from the api schema into the application shape.
|
23
|
-
* Is equal to application shape if all property names match the api schema
|
24
|
-
*/
|
25
|
-
export const getPurchaseConsumptionOkResponseResponse = z.lazy(() => {
|
26
|
-
return z
|
27
|
-
.object({
|
28
|
-
dataUsageRemainingInBytes: z.number().optional(),
|
29
|
-
status: z.string().optional(),
|
30
|
-
})
|
31
|
-
.transform((data) => ({
|
32
|
-
dataUsageRemainingInBytes: data['dataUsageRemainingInBytes'],
|
33
|
-
status: data['status'],
|
34
|
-
}));
|
35
|
-
});
|
36
|
-
|
37
|
-
/**
|
38
|
-
* The shape of the model mapping from the application shape into the api schema.
|
39
|
-
* Is equal to application shape if all property names match the api schema
|
40
|
-
*/
|
41
|
-
export const getPurchaseConsumptionOkResponseRequest = z.lazy(() => {
|
42
|
-
return z
|
43
|
-
.object({ dataUsageRemainingInBytes: z.number().nullish(), status: z.string().nullish() })
|
44
|
-
.transform((data) => ({
|
45
|
-
dataUsageRemainingInBytes: data['dataUsageRemainingInBytes'],
|
46
|
-
status: data['status'],
|
47
|
-
}));
|
48
|
-
});
|
@@ -1,15 +0,0 @@
|
|
1
|
-
export type { ListPurchasesOkResponse } from './list-purchases-ok-response';
|
2
|
-
export type { CreatePurchaseRequest } from './create-purchase-request';
|
3
|
-
export type { CreatePurchaseOkResponse } from './create-purchase-ok-response';
|
4
|
-
export type { TopUpEsimRequest } from './top-up-esim-request';
|
5
|
-
export type { TopUpEsimOkResponse } from './top-up-esim-ok-response';
|
6
|
-
export type { EditPurchaseRequest } from './edit-purchase-request';
|
7
|
-
export type { EditPurchaseOkResponse } from './edit-purchase-ok-response';
|
8
|
-
export type { GetPurchaseConsumptionOkResponse } from './get-purchase-consumption-ok-response';
|
9
|
-
export type { Purchases } from './purchases';
|
10
|
-
export type { Package_ } from './package_';
|
11
|
-
export type { PurchasesEsim } from './purchases-esim';
|
12
|
-
export type { CreatePurchaseOkResponsePurchase } from './create-purchase-ok-response-purchase';
|
13
|
-
export type { CreatePurchaseOkResponseProfile } from './create-purchase-ok-response-profile';
|
14
|
-
export type { TopUpEsimOkResponsePurchase } from './top-up-esim-ok-response-purchase';
|
15
|
-
export type { TopUpEsimOkResponseProfile } from './top-up-esim-ok-response-profile';
|
@@ -1,49 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { purchases, purchasesRequest, purchasesResponse } from './purchases';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* The shape of the model inside the application code - what the users use
|
6
|
-
*/
|
7
|
-
export const listPurchasesOkResponse = z.lazy(() => {
|
8
|
-
return z.object({
|
9
|
-
purchases: z.array(purchases).optional(),
|
10
|
-
afterCursor: z.string().optional().nullable(),
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
/**
|
15
|
-
*
|
16
|
-
* @typedef {ListPurchasesOkResponse} listPurchasesOkResponse
|
17
|
-
* @property {Purchases[]}
|
18
|
-
* @property {string} - The cursor value representing the end of the current page of results. Use this cursor value as the "afterCursor" parameter in your next request to retrieve the subsequent page of results. It ensures that you continue fetching data from where you left off, facilitating smooth pagination.
|
19
|
-
*/
|
20
|
-
export type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
|
21
|
-
|
22
|
-
/**
|
23
|
-
* The shape of the model mapping from the api schema into the application shape.
|
24
|
-
* Is equal to application shape if all property names match the api schema
|
25
|
-
*/
|
26
|
-
export const listPurchasesOkResponseResponse = z.lazy(() => {
|
27
|
-
return z
|
28
|
-
.object({
|
29
|
-
purchases: z.array(purchasesResponse).optional(),
|
30
|
-
afterCursor: z.string().optional().nullable(),
|
31
|
-
})
|
32
|
-
.transform((data) => ({
|
33
|
-
purchases: data['purchases'],
|
34
|
-
afterCursor: data['afterCursor'],
|
35
|
-
}));
|
36
|
-
});
|
37
|
-
|
38
|
-
/**
|
39
|
-
* The shape of the model mapping from the application shape into the api schema.
|
40
|
-
* Is equal to application shape if all property names match the api schema
|
41
|
-
*/
|
42
|
-
export const listPurchasesOkResponseRequest = z.lazy(() => {
|
43
|
-
return z
|
44
|
-
.object({ purchases: z.array(purchasesRequest).nullish(), afterCursor: z.string().nullish() })
|
45
|
-
.transform((data) => ({
|
46
|
-
purchases: data['purchases'],
|
47
|
-
afterCursor: data['afterCursor'],
|
48
|
-
}));
|
49
|
-
});
|