celitech-sdk 1.1.84 → 1.1.86
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -18
- package/dist/index.d.ts +1503 -12
- package/dist/index.js +2140 -76
- package/dist/index.mjs +2102 -0
- package/package.json +22 -5
- 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 -9
- package/dist/http/hooks/custom-hook.d.ts.map +0 -1
- package/dist/http/hooks/custom-hook.js +0 -89
- 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 -2
- package/dist/services/destinations/index.d.ts.map +0 -1
- package/dist/services/destinations/index.js +0 -6
- 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 -2
- package/dist/services/e-sim/index.d.ts.map +0 -1
- package/dist/services/e-sim/index.js +0 -6
- 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 -2
- package/dist/services/packages/index.d.ts.map +0 -1
- package/dist/services/packages/index.js +0 -6
- 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 -2
- package/dist/services/purchases/index.d.ts.map +0 -1
- package/dist/services/purchases/index.js +0 -6
- 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 -219
- 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 -22
- package/documentation/snippets/purchases-get.md +0 -14
- package/documentation/snippets/purchases-post.md +0 -26
- package/documentation/snippets/purchases-topup-post.md +0 -25
- 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 -100
- 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 -1
- 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 -1
- 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 -1
- 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 -1
- 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,57 +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 destinations = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
name: z.string().optional(),
|
9
|
-
destination: z.string().optional(),
|
10
|
-
supportedCountries: z.array(z.string()).optional(),
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
/**
|
15
|
-
*
|
16
|
-
* @typedef {Destinations} destinations
|
17
|
-
* @property {string} - Name of the destination
|
18
|
-
* @property {string} - ISO representation of the destination
|
19
|
-
* @property {string[]} - This array indicates the geographical area covered by a specific destination. If the destination represents a single country, the array will include that country. However, if the destination represents a broader regional scope, the array will be populated with the names of the countries belonging to that region.
|
20
|
-
*/
|
21
|
-
export type Destinations = z.infer<typeof destinations>;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* The shape of the model mapping from the api schema into the application shape.
|
25
|
-
* Is equal to application shape if all property names match the api schema
|
26
|
-
*/
|
27
|
-
export const destinationsResponse = z.lazy(() => {
|
28
|
-
return z
|
29
|
-
.object({
|
30
|
-
name: z.string().optional(),
|
31
|
-
destination: z.string().optional(),
|
32
|
-
supportedCountries: z.array(z.string()).optional(),
|
33
|
-
})
|
34
|
-
.transform((data) => ({
|
35
|
-
name: data['name'],
|
36
|
-
destination: data['destination'],
|
37
|
-
supportedCountries: data['supportedCountries'],
|
38
|
-
}));
|
39
|
-
});
|
40
|
-
|
41
|
-
/**
|
42
|
-
* The shape of the model mapping from the application shape into the api schema.
|
43
|
-
* Is equal to application shape if all property names match the api schema
|
44
|
-
*/
|
45
|
-
export const destinationsRequest = z.lazy(() => {
|
46
|
-
return z
|
47
|
-
.object({
|
48
|
-
name: z.string().nullish(),
|
49
|
-
destination: z.string().nullish(),
|
50
|
-
supportedCountries: z.array(z.string()).nullish(),
|
51
|
-
})
|
52
|
-
.transform((data) => ({
|
53
|
-
name: data['name'],
|
54
|
-
destination: data['destination'],
|
55
|
-
supportedCountries: data['supportedCountries'],
|
56
|
-
}));
|
57
|
-
});
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { destinations, destinationsRequest, destinationsResponse } from './destinations';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* The shape of the model inside the application code - what the users use
|
6
|
-
*/
|
7
|
-
export const listDestinationsOkResponse = z.lazy(() => {
|
8
|
-
return z.object({
|
9
|
-
destinations: z.array(destinations).optional(),
|
10
|
-
});
|
11
|
-
});
|
12
|
-
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @typedef {ListDestinationsOkResponse} listDestinationsOkResponse
|
16
|
-
* @property {Destinations[]}
|
17
|
-
*/
|
18
|
-
export type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
|
19
|
-
|
20
|
-
/**
|
21
|
-
* The shape of the model mapping from the api schema into the application shape.
|
22
|
-
* Is equal to application shape if all property names match the api schema
|
23
|
-
*/
|
24
|
-
export const listDestinationsOkResponseResponse = z.lazy(() => {
|
25
|
-
return z
|
26
|
-
.object({
|
27
|
-
destinations: z.array(destinationsResponse).optional(),
|
28
|
-
})
|
29
|
-
.transform((data) => ({
|
30
|
-
destinations: data['destinations'],
|
31
|
-
}));
|
32
|
-
});
|
33
|
-
|
34
|
-
/**
|
35
|
-
* The shape of the model mapping from the application shape into the api schema.
|
36
|
-
* Is equal to application shape if all property names match the api schema
|
37
|
-
*/
|
38
|
-
export const listDestinationsOkResponseRequest = z.lazy(() => {
|
39
|
-
return z.object({ destinations: z.array(destinationsRequest).nullish() }).transform((data) => ({
|
40
|
-
destinations: data['destinations'],
|
41
|
-
}));
|
42
|
-
});
|
@@ -1,103 +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 { GetEsimOkResponse, getEsimOkResponseResponse } from './models/get-esim-ok-response';
|
6
|
-
import { GetEsimParams } from './request-params';
|
7
|
-
import { GetEsimDeviceOkResponse, getEsimDeviceOkResponseResponse } from './models/get-esim-device-ok-response';
|
8
|
-
import { GetEsimHistoryOkResponse, getEsimHistoryOkResponseResponse } from './models/get-esim-history-ok-response';
|
9
|
-
import { GetEsimMacOkResponse, getEsimMacOkResponseResponse } from './models/get-esim-mac-ok-response';
|
10
|
-
|
11
|
-
export class ESimService extends BaseService {
|
12
|
-
/**
|
13
|
-
* Get eSIM Status
|
14
|
-
* @param {string} iccid - ID of the eSIM
|
15
|
-
* @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
|
16
|
-
*/
|
17
|
-
async getEsim(params: GetEsimParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimOkResponse>> {
|
18
|
-
const request = new RequestBuilder<GetEsimOkResponse>()
|
19
|
-
.setConfig(this.config)
|
20
|
-
.setBaseUrl(this.config)
|
21
|
-
.setMethod('GET')
|
22
|
-
.setPath('/esim')
|
23
|
-
.setRequestSchema(z.any())
|
24
|
-
.setResponseSchema(getEsimOkResponseResponse)
|
25
|
-
.setRequestContentType(ContentType.Json)
|
26
|
-
.setResponseContentType(ContentType.Json)
|
27
|
-
.setRetryAttempts(this.config, requestConfig)
|
28
|
-
.setRetryDelayMs(this.config, requestConfig)
|
29
|
-
.setResponseValidation(this.config, requestConfig)
|
30
|
-
.addQueryParam('iccid', params?.iccid)
|
31
|
-
.build();
|
32
|
-
return this.client.call<GetEsimOkResponse>(request);
|
33
|
-
}
|
34
|
-
|
35
|
-
/**
|
36
|
-
* Get eSIM Device
|
37
|
-
* @param {string} iccid - ID of the eSIM
|
38
|
-
* @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
|
39
|
-
*/
|
40
|
-
async getEsimDevice(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimDeviceOkResponse>> {
|
41
|
-
const request = new RequestBuilder<GetEsimDeviceOkResponse>()
|
42
|
-
.setConfig(this.config)
|
43
|
-
.setBaseUrl(this.config)
|
44
|
-
.setMethod('GET')
|
45
|
-
.setPath('/esim/{iccid}/device')
|
46
|
-
.setRequestSchema(z.any())
|
47
|
-
.setResponseSchema(getEsimDeviceOkResponseResponse)
|
48
|
-
.setRequestContentType(ContentType.Json)
|
49
|
-
.setResponseContentType(ContentType.Json)
|
50
|
-
.setRetryAttempts(this.config, requestConfig)
|
51
|
-
.setRetryDelayMs(this.config, requestConfig)
|
52
|
-
.setResponseValidation(this.config, requestConfig)
|
53
|
-
.addPathParam('iccid', iccid)
|
54
|
-
.build();
|
55
|
-
return this.client.call<GetEsimDeviceOkResponse>(request);
|
56
|
-
}
|
57
|
-
|
58
|
-
/**
|
59
|
-
* Get eSIM History
|
60
|
-
* @param {string} iccid - ID of the eSIM
|
61
|
-
* @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
|
62
|
-
*/
|
63
|
-
async getEsimHistory(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimHistoryOkResponse>> {
|
64
|
-
const request = new RequestBuilder<GetEsimHistoryOkResponse>()
|
65
|
-
.setConfig(this.config)
|
66
|
-
.setBaseUrl(this.config)
|
67
|
-
.setMethod('GET')
|
68
|
-
.setPath('/esim/{iccid}/history')
|
69
|
-
.setRequestSchema(z.any())
|
70
|
-
.setResponseSchema(getEsimHistoryOkResponseResponse)
|
71
|
-
.setRequestContentType(ContentType.Json)
|
72
|
-
.setResponseContentType(ContentType.Json)
|
73
|
-
.setRetryAttempts(this.config, requestConfig)
|
74
|
-
.setRetryDelayMs(this.config, requestConfig)
|
75
|
-
.setResponseValidation(this.config, requestConfig)
|
76
|
-
.addPathParam('iccid', iccid)
|
77
|
-
.build();
|
78
|
-
return this.client.call<GetEsimHistoryOkResponse>(request);
|
79
|
-
}
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Get eSIM MAC
|
83
|
-
* @param {string} iccid - ID of the eSIM
|
84
|
-
* @returns {Promise<HttpResponse<GetEsimMacOkResponse>>} Successful Response
|
85
|
-
*/
|
86
|
-
async getEsimMac(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimMacOkResponse>> {
|
87
|
-
const request = new RequestBuilder<GetEsimMacOkResponse>()
|
88
|
-
.setConfig(this.config)
|
89
|
-
.setBaseUrl(this.config)
|
90
|
-
.setMethod('GET')
|
91
|
-
.setPath('/esim/{iccid}/mac')
|
92
|
-
.setRequestSchema(z.any())
|
93
|
-
.setResponseSchema(getEsimMacOkResponseResponse)
|
94
|
-
.setRequestContentType(ContentType.Json)
|
95
|
-
.setResponseContentType(ContentType.Json)
|
96
|
-
.setRetryAttempts(this.config, requestConfig)
|
97
|
-
.setRetryDelayMs(this.config, requestConfig)
|
98
|
-
.setResponseValidation(this.config, requestConfig)
|
99
|
-
.addPathParam('iccid', iccid)
|
100
|
-
.build();
|
101
|
-
return this.client.call<GetEsimMacOkResponse>(request);
|
102
|
-
}
|
103
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export { ESimService } from './e-sim';
|
@@ -1,63 +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 device = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
oem: z.string().optional(),
|
9
|
-
hardwareName: z.string().optional(),
|
10
|
-
hardwareModel: z.string().optional(),
|
11
|
-
eid: z.string().optional(),
|
12
|
-
});
|
13
|
-
});
|
14
|
-
|
15
|
-
/**
|
16
|
-
*
|
17
|
-
* @typedef {Device} device
|
18
|
-
* @property {string} - Name of the OEM
|
19
|
-
* @property {string} - Name of the Device
|
20
|
-
* @property {string} - Model of the Device
|
21
|
-
* @property {string} - Serial Number of the eSIM
|
22
|
-
*/
|
23
|
-
export type Device = z.infer<typeof device>;
|
24
|
-
|
25
|
-
/**
|
26
|
-
* The shape of the model mapping from the api schema into the application shape.
|
27
|
-
* Is equal to application shape if all property names match the api schema
|
28
|
-
*/
|
29
|
-
export const deviceResponse = z.lazy(() => {
|
30
|
-
return z
|
31
|
-
.object({
|
32
|
-
oem: z.string().optional(),
|
33
|
-
hardwareName: z.string().optional(),
|
34
|
-
hardwareModel: z.string().optional(),
|
35
|
-
eid: z.string().optional(),
|
36
|
-
})
|
37
|
-
.transform((data) => ({
|
38
|
-
oem: data['oem'],
|
39
|
-
hardwareName: data['hardwareName'],
|
40
|
-
hardwareModel: data['hardwareModel'],
|
41
|
-
eid: data['eid'],
|
42
|
-
}));
|
43
|
-
});
|
44
|
-
|
45
|
-
/**
|
46
|
-
* The shape of the model mapping from the application shape into the api schema.
|
47
|
-
* Is equal to application shape if all property names match the api schema
|
48
|
-
*/
|
49
|
-
export const deviceRequest = z.lazy(() => {
|
50
|
-
return z
|
51
|
-
.object({
|
52
|
-
oem: z.string().nullish(),
|
53
|
-
hardwareName: z.string().nullish(),
|
54
|
-
hardwareModel: z.string().nullish(),
|
55
|
-
eid: z.string().nullish(),
|
56
|
-
})
|
57
|
-
.transform((data) => ({
|
58
|
-
oem: data['oem'],
|
59
|
-
hardwareName: data['hardwareName'],
|
60
|
-
hardwareModel: data['hardwareModel'],
|
61
|
-
eid: data['eid'],
|
62
|
-
}));
|
63
|
-
});
|
@@ -1,42 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { device, deviceRequest, deviceResponse } from './device';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* The shape of the model inside the application code - what the users use
|
6
|
-
*/
|
7
|
-
export const getEsimDeviceOkResponse = z.lazy(() => {
|
8
|
-
return z.object({
|
9
|
-
device: device.optional(),
|
10
|
-
});
|
11
|
-
});
|
12
|
-
|
13
|
-
/**
|
14
|
-
*
|
15
|
-
* @typedef {GetEsimDeviceOkResponse} getEsimDeviceOkResponse
|
16
|
-
* @property {Device}
|
17
|
-
*/
|
18
|
-
export type GetEsimDeviceOkResponse = z.infer<typeof getEsimDeviceOkResponse>;
|
19
|
-
|
20
|
-
/**
|
21
|
-
* The shape of the model mapping from the api schema into the application shape.
|
22
|
-
* Is equal to application shape if all property names match the api schema
|
23
|
-
*/
|
24
|
-
export const getEsimDeviceOkResponseResponse = z.lazy(() => {
|
25
|
-
return z
|
26
|
-
.object({
|
27
|
-
device: deviceResponse.optional(),
|
28
|
-
})
|
29
|
-
.transform((data) => ({
|
30
|
-
device: data['device'],
|
31
|
-
}));
|
32
|
-
});
|
33
|
-
|
34
|
-
/**
|
35
|
-
* The shape of the model mapping from the application shape into the api schema.
|
36
|
-
* Is equal to application shape if all property names match the api schema
|
37
|
-
*/
|
38
|
-
export const getEsimDeviceOkResponseRequest = z.lazy(() => {
|
39
|
-
return z.object({ device: deviceRequest.nullish() }).transform((data) => ({
|
40
|
-
device: data['device'],
|
41
|
-
}));
|
42
|
-
});
|
@@ -1,47 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import { history, historyRequest, historyResponse } from './history';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* The shape of the model inside the application code - what the users use
|
6
|
-
*/
|
7
|
-
export const getEsimHistoryOkResponseEsim = z.lazy(() => {
|
8
|
-
return z.object({
|
9
|
-
iccid: z.string().min(18).max(22).optional(),
|
10
|
-
history: z.array(history).optional(),
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
/**
|
15
|
-
*
|
16
|
-
* @typedef {GetEsimHistoryOkResponseEsim} getEsimHistoryOkResponseEsim
|
17
|
-
* @property {string} - ID of the eSIM
|
18
|
-
* @property {History[]}
|
19
|
-
*/
|
20
|
-
export type GetEsimHistoryOkResponseEsim = z.infer<typeof getEsimHistoryOkResponseEsim>;
|
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 getEsimHistoryOkResponseEsimResponse = z.lazy(() => {
|
27
|
-
return z
|
28
|
-
.object({
|
29
|
-
iccid: z.string().min(18).max(22).optional(),
|
30
|
-
history: z.array(historyResponse).optional(),
|
31
|
-
})
|
32
|
-
.transform((data) => ({
|
33
|
-
iccid: data['iccid'],
|
34
|
-
history: data['history'],
|
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 getEsimHistoryOkResponseEsimRequest = z.lazy(() => {
|
43
|
-
return z.object({ iccid: z.string().nullish(), history: z.array(historyRequest).nullish() }).transform((data) => ({
|
44
|
-
iccid: data['iccid'],
|
45
|
-
history: data['history'],
|
46
|
-
}));
|
47
|
-
});
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import {
|
3
|
-
getEsimHistoryOkResponseEsim,
|
4
|
-
getEsimHistoryOkResponseEsimRequest,
|
5
|
-
getEsimHistoryOkResponseEsimResponse,
|
6
|
-
} from './get-esim-history-ok-response-esim';
|
7
|
-
|
8
|
-
/**
|
9
|
-
* The shape of the model inside the application code - what the users use
|
10
|
-
*/
|
11
|
-
export const getEsimHistoryOkResponse = z.lazy(() => {
|
12
|
-
return z.object({
|
13
|
-
esim: getEsimHistoryOkResponseEsim.optional(),
|
14
|
-
});
|
15
|
-
});
|
16
|
-
|
17
|
-
/**
|
18
|
-
*
|
19
|
-
* @typedef {GetEsimHistoryOkResponse} getEsimHistoryOkResponse
|
20
|
-
* @property {GetEsimHistoryOkResponseEsim}
|
21
|
-
*/
|
22
|
-
export type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
|
23
|
-
|
24
|
-
/**
|
25
|
-
* The shape of the model mapping from the api schema into the application shape.
|
26
|
-
* Is equal to application shape if all property names match the api schema
|
27
|
-
*/
|
28
|
-
export const getEsimHistoryOkResponseResponse = z.lazy(() => {
|
29
|
-
return z
|
30
|
-
.object({
|
31
|
-
esim: getEsimHistoryOkResponseEsimResponse.optional(),
|
32
|
-
})
|
33
|
-
.transform((data) => ({
|
34
|
-
esim: data['esim'],
|
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 getEsimHistoryOkResponseRequest = z.lazy(() => {
|
43
|
-
return z.object({ esim: getEsimHistoryOkResponseEsimRequest.nullish() }).transform((data) => ({
|
44
|
-
esim: data['esim'],
|
45
|
-
}));
|
46
|
-
});
|
@@ -1,57 +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 getEsimMacOkResponseEsim = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
iccid: z.string().min(18).max(22).optional(),
|
9
|
-
smdpAddress: z.string().optional(),
|
10
|
-
manualActivationCode: z.string().optional(),
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
/**
|
15
|
-
*
|
16
|
-
* @typedef {GetEsimMacOkResponseEsim} getEsimMacOkResponseEsim
|
17
|
-
* @property {string} - ID of the eSIM
|
18
|
-
* @property {string} - SM-DP+ Address
|
19
|
-
* @property {string} - The manual activation code
|
20
|
-
*/
|
21
|
-
export type GetEsimMacOkResponseEsim = z.infer<typeof getEsimMacOkResponseEsim>;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* The shape of the model mapping from the api schema into the application shape.
|
25
|
-
* Is equal to application shape if all property names match the api schema
|
26
|
-
*/
|
27
|
-
export const getEsimMacOkResponseEsimResponse = z.lazy(() => {
|
28
|
-
return z
|
29
|
-
.object({
|
30
|
-
iccid: z.string().min(18).max(22).optional(),
|
31
|
-
smdpAddress: z.string().optional(),
|
32
|
-
manualActivationCode: z.string().optional(),
|
33
|
-
})
|
34
|
-
.transform((data) => ({
|
35
|
-
iccid: data['iccid'],
|
36
|
-
smdpAddress: data['smdpAddress'],
|
37
|
-
manualActivationCode: data['manualActivationCode'],
|
38
|
-
}));
|
39
|
-
});
|
40
|
-
|
41
|
-
/**
|
42
|
-
* The shape of the model mapping from the application shape into the api schema.
|
43
|
-
* Is equal to application shape if all property names match the api schema
|
44
|
-
*/
|
45
|
-
export const getEsimMacOkResponseEsimRequest = z.lazy(() => {
|
46
|
-
return z
|
47
|
-
.object({
|
48
|
-
iccid: z.string().nullish(),
|
49
|
-
smdpAddress: z.string().nullish(),
|
50
|
-
manualActivationCode: z.string().nullish(),
|
51
|
-
})
|
52
|
-
.transform((data) => ({
|
53
|
-
iccid: data['iccid'],
|
54
|
-
smdpAddress: data['smdpAddress'],
|
55
|
-
manualActivationCode: data['manualActivationCode'],
|
56
|
-
}));
|
57
|
-
});
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import {
|
3
|
-
getEsimMacOkResponseEsim,
|
4
|
-
getEsimMacOkResponseEsimRequest,
|
5
|
-
getEsimMacOkResponseEsimResponse,
|
6
|
-
} from './get-esim-mac-ok-response-esim';
|
7
|
-
|
8
|
-
/**
|
9
|
-
* The shape of the model inside the application code - what the users use
|
10
|
-
*/
|
11
|
-
export const getEsimMacOkResponse = z.lazy(() => {
|
12
|
-
return z.object({
|
13
|
-
esim: getEsimMacOkResponseEsim.optional(),
|
14
|
-
});
|
15
|
-
});
|
16
|
-
|
17
|
-
/**
|
18
|
-
*
|
19
|
-
* @typedef {GetEsimMacOkResponse} getEsimMacOkResponse
|
20
|
-
* @property {GetEsimMacOkResponseEsim}
|
21
|
-
*/
|
22
|
-
export type GetEsimMacOkResponse = z.infer<typeof getEsimMacOkResponse>;
|
23
|
-
|
24
|
-
/**
|
25
|
-
* The shape of the model mapping from the api schema into the application shape.
|
26
|
-
* Is equal to application shape if all property names match the api schema
|
27
|
-
*/
|
28
|
-
export const getEsimMacOkResponseResponse = z.lazy(() => {
|
29
|
-
return z
|
30
|
-
.object({
|
31
|
-
esim: getEsimMacOkResponseEsimResponse.optional(),
|
32
|
-
})
|
33
|
-
.transform((data) => ({
|
34
|
-
esim: data['esim'],
|
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 getEsimMacOkResponseRequest = z.lazy(() => {
|
43
|
-
return z.object({ esim: getEsimMacOkResponseEsimRequest.nullish() }).transform((data) => ({
|
44
|
-
esim: data['esim'],
|
45
|
-
}));
|
46
|
-
});
|
@@ -1,63 +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 getEsimOkResponseEsim = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
iccid: z.string().min(18).max(22).optional(),
|
9
|
-
smdpAddress: z.string().optional(),
|
10
|
-
manualActivationCode: z.string().optional(),
|
11
|
-
status: z.string().optional(),
|
12
|
-
});
|
13
|
-
});
|
14
|
-
|
15
|
-
/**
|
16
|
-
*
|
17
|
-
* @typedef {GetEsimOkResponseEsim} getEsimOkResponseEsim
|
18
|
-
* @property {string} - ID of the eSIM
|
19
|
-
* @property {string} - SM-DP+ Address
|
20
|
-
* @property {string} - The manual activation code
|
21
|
-
* @property {string} - Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
|
22
|
-
*/
|
23
|
-
export type GetEsimOkResponseEsim = z.infer<typeof getEsimOkResponseEsim>;
|
24
|
-
|
25
|
-
/**
|
26
|
-
* The shape of the model mapping from the api schema into the application shape.
|
27
|
-
* Is equal to application shape if all property names match the api schema
|
28
|
-
*/
|
29
|
-
export const getEsimOkResponseEsimResponse = z.lazy(() => {
|
30
|
-
return z
|
31
|
-
.object({
|
32
|
-
iccid: z.string().min(18).max(22).optional(),
|
33
|
-
smdpAddress: z.string().optional(),
|
34
|
-
manualActivationCode: z.string().optional(),
|
35
|
-
status: z.string().optional(),
|
36
|
-
})
|
37
|
-
.transform((data) => ({
|
38
|
-
iccid: data['iccid'],
|
39
|
-
smdpAddress: data['smdpAddress'],
|
40
|
-
manualActivationCode: data['manualActivationCode'],
|
41
|
-
status: data['status'],
|
42
|
-
}));
|
43
|
-
});
|
44
|
-
|
45
|
-
/**
|
46
|
-
* The shape of the model mapping from the application shape into the api schema.
|
47
|
-
* Is equal to application shape if all property names match the api schema
|
48
|
-
*/
|
49
|
-
export const getEsimOkResponseEsimRequest = z.lazy(() => {
|
50
|
-
return z
|
51
|
-
.object({
|
52
|
-
iccid: z.string().nullish(),
|
53
|
-
smdpAddress: z.string().nullish(),
|
54
|
-
manualActivationCode: z.string().nullish(),
|
55
|
-
status: z.string().nullish(),
|
56
|
-
})
|
57
|
-
.transform((data) => ({
|
58
|
-
iccid: data['iccid'],
|
59
|
-
smdpAddress: data['smdpAddress'],
|
60
|
-
manualActivationCode: data['manualActivationCode'],
|
61
|
-
status: data['status'],
|
62
|
-
}));
|
63
|
-
});
|
@@ -1,46 +0,0 @@
|
|
1
|
-
import { z } from 'zod';
|
2
|
-
import {
|
3
|
-
getEsimOkResponseEsim,
|
4
|
-
getEsimOkResponseEsimRequest,
|
5
|
-
getEsimOkResponseEsimResponse,
|
6
|
-
} from './get-esim-ok-response-esim';
|
7
|
-
|
8
|
-
/**
|
9
|
-
* The shape of the model inside the application code - what the users use
|
10
|
-
*/
|
11
|
-
export const getEsimOkResponse = z.lazy(() => {
|
12
|
-
return z.object({
|
13
|
-
esim: getEsimOkResponseEsim.optional(),
|
14
|
-
});
|
15
|
-
});
|
16
|
-
|
17
|
-
/**
|
18
|
-
*
|
19
|
-
* @typedef {GetEsimOkResponse} getEsimOkResponse
|
20
|
-
* @property {GetEsimOkResponseEsim}
|
21
|
-
*/
|
22
|
-
export type GetEsimOkResponse = z.infer<typeof getEsimOkResponse>;
|
23
|
-
|
24
|
-
/**
|
25
|
-
* The shape of the model mapping from the api schema into the application shape.
|
26
|
-
* Is equal to application shape if all property names match the api schema
|
27
|
-
*/
|
28
|
-
export const getEsimOkResponseResponse = z.lazy(() => {
|
29
|
-
return z
|
30
|
-
.object({
|
31
|
-
esim: getEsimOkResponseEsimResponse.optional(),
|
32
|
-
})
|
33
|
-
.transform((data) => ({
|
34
|
-
esim: data['esim'],
|
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 getEsimOkResponseRequest = z.lazy(() => {
|
43
|
-
return z.object({ esim: getEsimOkResponseEsimRequest.nullish() }).transform((data) => ({
|
44
|
-
esim: data['esim'],
|
45
|
-
}));
|
46
|
-
});
|
@@ -1,53 +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 history = z.lazy(() => {
|
7
|
-
return z.object({
|
8
|
-
status: z.string().optional(),
|
9
|
-
statusDate: z.string().optional(),
|
10
|
-
date: z.number().optional(),
|
11
|
-
});
|
12
|
-
});
|
13
|
-
|
14
|
-
/**
|
15
|
-
*
|
16
|
-
* @typedef {History} history
|
17
|
-
* @property {string} - The status of the eSIM at a given time, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
|
18
|
-
* @property {string} - The date when the eSIM status changed in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
19
|
-
* @property {number} - Epoch value representing the date when the eSIM status changed
|
20
|
-
*/
|
21
|
-
export type History = z.infer<typeof history>;
|
22
|
-
|
23
|
-
/**
|
24
|
-
* The shape of the model mapping from the api schema into the application shape.
|
25
|
-
* Is equal to application shape if all property names match the api schema
|
26
|
-
*/
|
27
|
-
export const historyResponse = z.lazy(() => {
|
28
|
-
return z
|
29
|
-
.object({
|
30
|
-
status: z.string().optional(),
|
31
|
-
statusDate: z.string().optional(),
|
32
|
-
date: z.number().optional(),
|
33
|
-
})
|
34
|
-
.transform((data) => ({
|
35
|
-
status: data['status'],
|
36
|
-
statusDate: data['statusDate'],
|
37
|
-
date: data['date'],
|
38
|
-
}));
|
39
|
-
});
|
40
|
-
|
41
|
-
/**
|
42
|
-
* The shape of the model mapping from the application shape into the api schema.
|
43
|
-
* Is equal to application shape if all property names match the api schema
|
44
|
-
*/
|
45
|
-
export const historyRequest = z.lazy(() => {
|
46
|
-
return z
|
47
|
-
.object({ status: z.string().nullish(), statusDate: z.string().nullish(), date: z.number().nullish() })
|
48
|
-
.transform((data) => ({
|
49
|
-
status: data['status'],
|
50
|
-
statusDate: data['statusDate'],
|
51
|
-
date: data['date'],
|
52
|
-
}));
|
53
|
-
});
|