celitech-sdk 1.1.46
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +19 -0
- package/README.md +466 -0
- package/dist/commonjs/BaseService.d.ts +11 -0
- package/dist/commonjs/BaseService.d.ts.map +1 -0
- package/dist/commonjs/BaseService.js +30 -0
- package/dist/commonjs/BaseService.js.map +1 -0
- package/dist/commonjs/hooks/CustomHook.d.ts +59 -0
- package/dist/commonjs/hooks/CustomHook.d.ts.map +1 -0
- package/dist/commonjs/hooks/CustomHook.js +74 -0
- package/dist/commonjs/hooks/CustomHook.js.map +1 -0
- package/dist/commonjs/hooks/Hook.d.ts +24 -0
- package/dist/commonjs/hooks/Hook.d.ts.map +1 -0
- package/dist/commonjs/hooks/Hook.js +3 -0
- package/dist/commonjs/hooks/Hook.js.map +1 -0
- package/dist/commonjs/http/Environment.d.ts +4 -0
- package/dist/commonjs/http/Environment.d.ts.map +1 -0
- package/dist/commonjs/http/Environment.js +8 -0
- package/dist/commonjs/http/Environment.js.map +1 -0
- package/dist/commonjs/http/HTTPClient.d.ts +13 -0
- package/dist/commonjs/http/HTTPClient.d.ts.map +1 -0
- package/dist/commonjs/http/HTTPClient.js +3 -0
- package/dist/commonjs/http/HTTPClient.js.map +1 -0
- package/dist/commonjs/http/HTTPLibrary.d.ts +23 -0
- package/dist/commonjs/http/HTTPLibrary.d.ts.map +1 -0
- package/dist/commonjs/http/HTTPLibrary.js +143 -0
- package/dist/commonjs/http/HTTPLibrary.js.map +1 -0
- package/dist/commonjs/http/QuerySerializer.d.ts +6 -0
- package/dist/commonjs/http/QuerySerializer.d.ts.map +1 -0
- package/dist/commonjs/http/QuerySerializer.js +70 -0
- package/dist/commonjs/http/QuerySerializer.js.map +1 -0
- package/dist/commonjs/http/errors/BadGateway.d.ts +7 -0
- package/dist/commonjs/http/errors/BadGateway.d.ts.map +1 -0
- package/dist/commonjs/http/errors/BadGateway.js +12 -0
- package/dist/commonjs/http/errors/BadGateway.js.map +1 -0
- package/dist/commonjs/http/errors/BadRequest.d.ts +7 -0
- package/dist/commonjs/http/errors/BadRequest.d.ts.map +1 -0
- package/dist/commonjs/http/errors/BadRequest.js +12 -0
- package/dist/commonjs/http/errors/BadRequest.js.map +1 -0
- package/dist/commonjs/http/errors/Conflict.d.ts +7 -0
- package/dist/commonjs/http/errors/Conflict.d.ts.map +1 -0
- package/dist/commonjs/http/errors/Conflict.js +12 -0
- package/dist/commonjs/http/errors/Conflict.js.map +1 -0
- package/dist/commonjs/http/errors/ExpectationFailed.d.ts +7 -0
- package/dist/commonjs/http/errors/ExpectationFailed.d.ts.map +1 -0
- package/dist/commonjs/http/errors/ExpectationFailed.js +12 -0
- package/dist/commonjs/http/errors/ExpectationFailed.js.map +1 -0
- package/dist/commonjs/http/errors/FailedDependency.d.ts +7 -0
- package/dist/commonjs/http/errors/FailedDependency.d.ts.map +1 -0
- package/dist/commonjs/http/errors/FailedDependency.js +12 -0
- package/dist/commonjs/http/errors/FailedDependency.js.map +1 -0
- package/dist/commonjs/http/errors/Forbidden.d.ts +7 -0
- package/dist/commonjs/http/errors/Forbidden.d.ts.map +1 -0
- package/dist/commonjs/http/errors/Forbidden.js +12 -0
- package/dist/commonjs/http/errors/Forbidden.js.map +1 -0
- package/dist/commonjs/http/errors/GatewayTimeout.d.ts +7 -0
- package/dist/commonjs/http/errors/GatewayTimeout.d.ts.map +1 -0
- package/dist/commonjs/http/errors/GatewayTimeout.js +12 -0
- package/dist/commonjs/http/errors/GatewayTimeout.js.map +1 -0
- package/dist/commonjs/http/errors/Gone.d.ts +7 -0
- package/dist/commonjs/http/errors/Gone.d.ts.map +1 -0
- package/dist/commonjs/http/errors/Gone.js +12 -0
- package/dist/commonjs/http/errors/Gone.js.map +1 -0
- package/dist/commonjs/http/errors/HttpVersionNotSupported.d.ts +7 -0
- package/dist/commonjs/http/errors/HttpVersionNotSupported.d.ts.map +1 -0
- package/dist/commonjs/http/errors/HttpVersionNotSupported.js +12 -0
- package/dist/commonjs/http/errors/HttpVersionNotSupported.js.map +1 -0
- package/dist/commonjs/http/errors/InternalServerError.d.ts +7 -0
- package/dist/commonjs/http/errors/InternalServerError.d.ts.map +1 -0
- package/dist/commonjs/http/errors/InternalServerError.js +12 -0
- package/dist/commonjs/http/errors/InternalServerError.js.map +1 -0
- package/dist/commonjs/http/errors/LengthRequired.d.ts +7 -0
- package/dist/commonjs/http/errors/LengthRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/LengthRequired.js +12 -0
- package/dist/commonjs/http/errors/LengthRequired.js.map +1 -0
- package/dist/commonjs/http/errors/Locked.d.ts +7 -0
- package/dist/commonjs/http/errors/Locked.d.ts.map +1 -0
- package/dist/commonjs/http/errors/Locked.js +12 -0
- package/dist/commonjs/http/errors/Locked.js.map +1 -0
- package/dist/commonjs/http/errors/LoopDetected.d.ts +7 -0
- package/dist/commonjs/http/errors/LoopDetected.d.ts.map +1 -0
- package/dist/commonjs/http/errors/LoopDetected.js +12 -0
- package/dist/commonjs/http/errors/LoopDetected.js.map +1 -0
- package/dist/commonjs/http/errors/MethodNotAllowed.d.ts +8 -0
- package/dist/commonjs/http/errors/MethodNotAllowed.d.ts.map +1 -0
- package/dist/commonjs/http/errors/MethodNotAllowed.js +13 -0
- package/dist/commonjs/http/errors/MethodNotAllowed.js.map +1 -0
- package/dist/commonjs/http/errors/MisdirectedRequest.d.ts +7 -0
- package/dist/commonjs/http/errors/MisdirectedRequest.d.ts.map +1 -0
- package/dist/commonjs/http/errors/MisdirectedRequest.js +12 -0
- package/dist/commonjs/http/errors/MisdirectedRequest.js.map +1 -0
- package/dist/commonjs/http/errors/NetworkAuthenticationRequired.d.ts +7 -0
- package/dist/commonjs/http/errors/NetworkAuthenticationRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/NetworkAuthenticationRequired.js +12 -0
- package/dist/commonjs/http/errors/NetworkAuthenticationRequired.js.map +1 -0
- package/dist/commonjs/http/errors/NotAcceptable.d.ts +7 -0
- package/dist/commonjs/http/errors/NotAcceptable.d.ts.map +1 -0
- package/dist/commonjs/http/errors/NotAcceptable.js +12 -0
- package/dist/commonjs/http/errors/NotAcceptable.js.map +1 -0
- package/dist/commonjs/http/errors/NotExtended.d.ts +7 -0
- package/dist/commonjs/http/errors/NotExtended.d.ts.map +1 -0
- package/dist/commonjs/http/errors/NotExtended.js +12 -0
- package/dist/commonjs/http/errors/NotExtended.js.map +1 -0
- package/dist/commonjs/http/errors/NotFound.d.ts +7 -0
- package/dist/commonjs/http/errors/NotFound.d.ts.map +1 -0
- package/dist/commonjs/http/errors/NotFound.js +12 -0
- package/dist/commonjs/http/errors/NotFound.js.map +1 -0
- package/dist/commonjs/http/errors/NotImplemented.d.ts +7 -0
- package/dist/commonjs/http/errors/NotImplemented.d.ts.map +1 -0
- package/dist/commonjs/http/errors/NotImplemented.js +12 -0
- package/dist/commonjs/http/errors/NotImplemented.js.map +1 -0
- package/dist/commonjs/http/errors/PayloadTooLarge.d.ts +8 -0
- package/dist/commonjs/http/errors/PayloadTooLarge.d.ts.map +1 -0
- package/dist/commonjs/http/errors/PayloadTooLarge.js +13 -0
- package/dist/commonjs/http/errors/PayloadTooLarge.js.map +1 -0
- package/dist/commonjs/http/errors/PaymentRequired.d.ts +7 -0
- package/dist/commonjs/http/errors/PaymentRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/PaymentRequired.js +12 -0
- package/dist/commonjs/http/errors/PaymentRequired.js.map +1 -0
- package/dist/commonjs/http/errors/PreconditionFailed.d.ts +7 -0
- package/dist/commonjs/http/errors/PreconditionFailed.d.ts.map +1 -0
- package/dist/commonjs/http/errors/PreconditionFailed.js +12 -0
- package/dist/commonjs/http/errors/PreconditionFailed.js.map +1 -0
- package/dist/commonjs/http/errors/PreconditionRequired.d.ts +7 -0
- package/dist/commonjs/http/errors/PreconditionRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/PreconditionRequired.js +12 -0
- package/dist/commonjs/http/errors/PreconditionRequired.js.map +1 -0
- package/dist/commonjs/http/errors/ProxyAuthenticationRequired.d.ts +8 -0
- package/dist/commonjs/http/errors/ProxyAuthenticationRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/ProxyAuthenticationRequired.js +13 -0
- package/dist/commonjs/http/errors/ProxyAuthenticationRequired.js.map +1 -0
- package/dist/commonjs/http/errors/RangeNotSatisfiable.d.ts +7 -0
- package/dist/commonjs/http/errors/RangeNotSatisfiable.d.ts.map +1 -0
- package/dist/commonjs/http/errors/RangeNotSatisfiable.js +12 -0
- package/dist/commonjs/http/errors/RangeNotSatisfiable.js.map +1 -0
- package/dist/commonjs/http/errors/RequestHeaderFieldsTooLarge.d.ts +7 -0
- package/dist/commonjs/http/errors/RequestHeaderFieldsTooLarge.d.ts.map +1 -0
- package/dist/commonjs/http/errors/RequestHeaderFieldsTooLarge.js +12 -0
- package/dist/commonjs/http/errors/RequestHeaderFieldsTooLarge.js.map +1 -0
- package/dist/commonjs/http/errors/RequestTimeout.d.ts +7 -0
- package/dist/commonjs/http/errors/RequestTimeout.d.ts.map +1 -0
- package/dist/commonjs/http/errors/RequestTimeout.js +12 -0
- package/dist/commonjs/http/errors/RequestTimeout.js.map +1 -0
- package/dist/commonjs/http/errors/ServiceUnavailable.d.ts +8 -0
- package/dist/commonjs/http/errors/ServiceUnavailable.d.ts.map +1 -0
- package/dist/commonjs/http/errors/ServiceUnavailable.js +13 -0
- package/dist/commonjs/http/errors/ServiceUnavailable.js.map +1 -0
- package/dist/commonjs/http/errors/TooEarly.d.ts +7 -0
- package/dist/commonjs/http/errors/TooEarly.d.ts.map +1 -0
- package/dist/commonjs/http/errors/TooEarly.js +12 -0
- package/dist/commonjs/http/errors/TooEarly.js.map +1 -0
- package/dist/commonjs/http/errors/TooManyRequests.d.ts +8 -0
- package/dist/commonjs/http/errors/TooManyRequests.d.ts.map +1 -0
- package/dist/commonjs/http/errors/TooManyRequests.js +13 -0
- package/dist/commonjs/http/errors/TooManyRequests.js.map +1 -0
- package/dist/commonjs/http/errors/Unauthorized.d.ts +8 -0
- package/dist/commonjs/http/errors/Unauthorized.d.ts.map +1 -0
- package/dist/commonjs/http/errors/Unauthorized.js +13 -0
- package/dist/commonjs/http/errors/Unauthorized.js.map +1 -0
- package/dist/commonjs/http/errors/UnavailableForLegalReasons.d.ts +7 -0
- package/dist/commonjs/http/errors/UnavailableForLegalReasons.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UnavailableForLegalReasons.js +12 -0
- package/dist/commonjs/http/errors/UnavailableForLegalReasons.js.map +1 -0
- package/dist/commonjs/http/errors/UnprocessableEntity.d.ts +7 -0
- package/dist/commonjs/http/errors/UnprocessableEntity.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UnprocessableEntity.js +12 -0
- package/dist/commonjs/http/errors/UnprocessableEntity.js.map +1 -0
- package/dist/commonjs/http/errors/UnsufficientStorage.d.ts +7 -0
- package/dist/commonjs/http/errors/UnsufficientStorage.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UnsufficientStorage.js +12 -0
- package/dist/commonjs/http/errors/UnsufficientStorage.js.map +1 -0
- package/dist/commonjs/http/errors/UnsupportedMediaType.d.ts +7 -0
- package/dist/commonjs/http/errors/UnsupportedMediaType.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UnsupportedMediaType.js +12 -0
- package/dist/commonjs/http/errors/UnsupportedMediaType.js.map +1 -0
- package/dist/commonjs/http/errors/UpgradeRequired.d.ts +7 -0
- package/dist/commonjs/http/errors/UpgradeRequired.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UpgradeRequired.js +12 -0
- package/dist/commonjs/http/errors/UpgradeRequired.js.map +1 -0
- package/dist/commonjs/http/errors/UriTooLong.d.ts +7 -0
- package/dist/commonjs/http/errors/UriTooLong.d.ts.map +1 -0
- package/dist/commonjs/http/errors/UriTooLong.js +12 -0
- package/dist/commonjs/http/errors/UriTooLong.js.map +1 -0
- package/dist/commonjs/http/errors/VariantAlsoNegotiates.d.ts +7 -0
- package/dist/commonjs/http/errors/VariantAlsoNegotiates.d.ts.map +1 -0
- package/dist/commonjs/http/errors/VariantAlsoNegotiates.js +12 -0
- package/dist/commonjs/http/errors/VariantAlsoNegotiates.js.map +1 -0
- package/dist/commonjs/http/errors/base.d.ts +23 -0
- package/dist/commonjs/http/errors/base.d.ts.map +1 -0
- package/dist/commonjs/http/errors/base.js +36 -0
- package/dist/commonjs/http/errors/base.js.map +1 -0
- package/dist/commonjs/http/errors/index.d.ts +42 -0
- package/dist/commonjs/http/errors/index.d.ts.map +1 -0
- package/dist/commonjs/http/errors/index.js +87 -0
- package/dist/commonjs/http/errors/index.js.map +1 -0
- package/dist/commonjs/http/httpExceptions.d.ts +14 -0
- package/dist/commonjs/http/httpExceptions.d.ts.map +1 -0
- package/dist/commonjs/http/httpExceptions.js +92 -0
- package/dist/commonjs/http/httpExceptions.js.map +1 -0
- package/dist/commonjs/index.d.ts +26 -0
- package/dist/commonjs/index.d.ts.map +1 -0
- package/dist/commonjs/index.js +63 -0
- package/dist/commonjs/index.js.map +1 -0
- package/dist/commonjs/models.d.ts +15 -0
- package/dist/commonjs/models.d.ts.map +1 -0
- package/dist/commonjs/models.js +3 -0
- package/dist/commonjs/models.js.map +1 -0
- package/dist/commonjs/services/destinations/Destinations.d.ts +12 -0
- package/dist/commonjs/services/destinations/Destinations.d.ts.map +1 -0
- package/dist/commonjs/services/destinations/Destinations.js +32 -0
- package/dist/commonjs/services/destinations/Destinations.js.map +1 -0
- package/dist/commonjs/services/destinations/index.d.ts +2 -0
- package/dist/commonjs/services/destinations/index.d.ts.map +1 -0
- package/dist/commonjs/services/destinations/index.js +3 -0
- package/dist/commonjs/services/destinations/index.js.map +1 -0
- package/dist/commonjs/services/destinations/models/ListDestinationsResponse.d.ts +14 -0
- package/dist/commonjs/services/destinations/models/ListDestinationsResponse.d.ts.map +1 -0
- package/dist/commonjs/services/destinations/models/ListDestinationsResponse.js +3 -0
- package/dist/commonjs/services/destinations/models/ListDestinationsResponse.js.map +1 -0
- package/dist/commonjs/services/eSim/ESim.d.ts +40 -0
- package/dist/commonjs/services/eSim/ESim.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/ESim.js +113 -0
- package/dist/commonjs/services/eSim/ESim.js.map +1 -0
- package/dist/commonjs/services/eSim/index.d.ts +5 -0
- package/dist/commonjs/services/eSim/index.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/index.js +3 -0
- package/dist/commonjs/services/eSim/index.js.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimDeviceResponse.d.ts +23 -0
- package/dist/commonjs/services/eSim/models/GetEsimDeviceResponse.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimDeviceResponse.js +3 -0
- package/dist/commonjs/services/eSim/models/GetEsimDeviceResponse.js.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimHistoryResponse.d.ts +26 -0
- package/dist/commonjs/services/eSim/models/GetEsimHistoryResponse.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimHistoryResponse.js +3 -0
- package/dist/commonjs/services/eSim/models/GetEsimHistoryResponse.js.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimMacResponse.d.ts +19 -0
- package/dist/commonjs/services/eSim/models/GetEsimMacResponse.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimMacResponse.js +3 -0
- package/dist/commonjs/services/eSim/models/GetEsimMacResponse.js.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimResponse.d.ts +23 -0
- package/dist/commonjs/services/eSim/models/GetEsimResponse.d.ts.map +1 -0
- package/dist/commonjs/services/eSim/models/GetEsimResponse.js +3 -0
- package/dist/commonjs/services/eSim/models/GetEsimResponse.js.map +1 -0
- package/dist/commonjs/services/packages/Packages.d.ts +30 -0
- package/dist/commonjs/services/packages/Packages.d.ts.map +1 -0
- package/dist/commonjs/services/packages/Packages.js +69 -0
- package/dist/commonjs/services/packages/Packages.js.map +1 -0
- package/dist/commonjs/services/packages/index.d.ts +2 -0
- package/dist/commonjs/services/packages/index.d.ts.map +1 -0
- package/dist/commonjs/services/packages/index.js +3 -0
- package/dist/commonjs/services/packages/index.js.map +1 -0
- package/dist/commonjs/services/packages/models/ListPackagesResponse.d.ts +30 -0
- package/dist/commonjs/services/packages/models/ListPackagesResponse.d.ts.map +1 -0
- package/dist/commonjs/services/packages/models/ListPackagesResponse.js +3 -0
- package/dist/commonjs/services/packages/models/ListPackagesResponse.js.map +1 -0
- package/dist/commonjs/services/purchases/Purchases.d.ts +64 -0
- package/dist/commonjs/services/purchases/Purchases.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/Purchases.js +146 -0
- package/dist/commonjs/services/purchases/Purchases.js.map +1 -0
- package/dist/commonjs/services/purchases/index.d.ts +9 -0
- package/dist/commonjs/services/purchases/index.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/index.js +3 -0
- package/dist/commonjs/services/purchases/index.js.map +1 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseRequest.d.ts +37 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseRequest.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseRequest.js +3 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseRequest.js.map +1 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseResponse.d.ts +48 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseResponse.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseResponse.js +3 -0
- package/dist/commonjs/services/purchases/models/CreatePurchaseResponse.js.map +1 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseRequest.d.ts +25 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseRequest.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseRequest.js +3 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseRequest.js.map +1 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseResponse.d.ts +25 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseResponse.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseResponse.js +3 -0
- package/dist/commonjs/services/purchases/models/EditPurchaseResponse.js.map +1 -0
- package/dist/commonjs/services/purchases/models/GetPurchaseConsumptionResponse.d.ts +11 -0
- package/dist/commonjs/services/purchases/models/GetPurchaseConsumptionResponse.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/GetPurchaseConsumptionResponse.js +3 -0
- package/dist/commonjs/services/purchases/models/GetPurchaseConsumptionResponse.js.map +1 -0
- package/dist/commonjs/services/purchases/models/ListPurchasesResponse.d.ts +72 -0
- package/dist/commonjs/services/purchases/models/ListPurchasesResponse.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/ListPurchasesResponse.js +3 -0
- package/dist/commonjs/services/purchases/models/ListPurchasesResponse.js.map +1 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimRequest.d.ts +33 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimRequest.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimRequest.js +3 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimRequest.js.map +1 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimResponse.d.ts +44 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimResponse.d.ts.map +1 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimResponse.js +3 -0
- package/dist/commonjs/services/purchases/models/TopUpEsimResponse.js.map +1 -0
- package/dist/esm/BaseService.d.ts +11 -0
- package/dist/esm/BaseService.d.ts.map +1 -0
- package/dist/esm/BaseService.js +24 -0
- package/dist/esm/BaseService.js.map +1 -0
- package/dist/esm/hooks/CustomHook.d.ts +59 -0
- package/dist/esm/hooks/CustomHook.d.ts.map +1 -0
- package/dist/esm/hooks/CustomHook.js +68 -0
- package/dist/esm/hooks/CustomHook.js.map +1 -0
- package/dist/esm/hooks/Hook.d.ts +24 -0
- package/dist/esm/hooks/Hook.d.ts.map +1 -0
- package/dist/esm/hooks/Hook.js +2 -0
- package/dist/esm/hooks/Hook.js.map +1 -0
- package/dist/esm/http/Environment.d.ts +4 -0
- package/dist/esm/http/Environment.d.ts.map +1 -0
- package/dist/esm/http/Environment.js +5 -0
- package/dist/esm/http/Environment.js.map +1 -0
- package/dist/esm/http/HTTPClient.d.ts +13 -0
- package/dist/esm/http/HTTPClient.d.ts.map +1 -0
- package/dist/esm/http/HTTPClient.js +2 -0
- package/dist/esm/http/HTTPClient.js.map +1 -0
- package/dist/esm/http/HTTPLibrary.d.ts +23 -0
- package/dist/esm/http/HTTPLibrary.d.ts.map +1 -0
- package/dist/esm/http/HTTPLibrary.js +137 -0
- package/dist/esm/http/HTTPLibrary.js.map +1 -0
- package/dist/esm/http/QuerySerializer.d.ts +6 -0
- package/dist/esm/http/QuerySerializer.d.ts.map +1 -0
- package/dist/esm/http/QuerySerializer.js +65 -0
- package/dist/esm/http/QuerySerializer.js.map +1 -0
- package/dist/esm/http/errors/BadGateway.d.ts +7 -0
- package/dist/esm/http/errors/BadGateway.d.ts.map +1 -0
- package/dist/esm/http/errors/BadGateway.js +9 -0
- package/dist/esm/http/errors/BadGateway.js.map +1 -0
- package/dist/esm/http/errors/BadRequest.d.ts +7 -0
- package/dist/esm/http/errors/BadRequest.d.ts.map +1 -0
- package/dist/esm/http/errors/BadRequest.js +9 -0
- package/dist/esm/http/errors/BadRequest.js.map +1 -0
- package/dist/esm/http/errors/Conflict.d.ts +7 -0
- package/dist/esm/http/errors/Conflict.d.ts.map +1 -0
- package/dist/esm/http/errors/Conflict.js +9 -0
- package/dist/esm/http/errors/Conflict.js.map +1 -0
- package/dist/esm/http/errors/ExpectationFailed.d.ts +7 -0
- package/dist/esm/http/errors/ExpectationFailed.d.ts.map +1 -0
- package/dist/esm/http/errors/ExpectationFailed.js +9 -0
- package/dist/esm/http/errors/ExpectationFailed.js.map +1 -0
- package/dist/esm/http/errors/FailedDependency.d.ts +7 -0
- package/dist/esm/http/errors/FailedDependency.d.ts.map +1 -0
- package/dist/esm/http/errors/FailedDependency.js +9 -0
- package/dist/esm/http/errors/FailedDependency.js.map +1 -0
- package/dist/esm/http/errors/Forbidden.d.ts +7 -0
- package/dist/esm/http/errors/Forbidden.d.ts.map +1 -0
- package/dist/esm/http/errors/Forbidden.js +9 -0
- package/dist/esm/http/errors/Forbidden.js.map +1 -0
- package/dist/esm/http/errors/GatewayTimeout.d.ts +7 -0
- package/dist/esm/http/errors/GatewayTimeout.d.ts.map +1 -0
- package/dist/esm/http/errors/GatewayTimeout.js +9 -0
- package/dist/esm/http/errors/GatewayTimeout.js.map +1 -0
- package/dist/esm/http/errors/Gone.d.ts +7 -0
- package/dist/esm/http/errors/Gone.d.ts.map +1 -0
- package/dist/esm/http/errors/Gone.js +9 -0
- package/dist/esm/http/errors/Gone.js.map +1 -0
- package/dist/esm/http/errors/HttpVersionNotSupported.d.ts +7 -0
- package/dist/esm/http/errors/HttpVersionNotSupported.d.ts.map +1 -0
- package/dist/esm/http/errors/HttpVersionNotSupported.js +9 -0
- package/dist/esm/http/errors/HttpVersionNotSupported.js.map +1 -0
- package/dist/esm/http/errors/InternalServerError.d.ts +7 -0
- package/dist/esm/http/errors/InternalServerError.d.ts.map +1 -0
- package/dist/esm/http/errors/InternalServerError.js +9 -0
- package/dist/esm/http/errors/InternalServerError.js.map +1 -0
- package/dist/esm/http/errors/LengthRequired.d.ts +7 -0
- package/dist/esm/http/errors/LengthRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/LengthRequired.js +9 -0
- package/dist/esm/http/errors/LengthRequired.js.map +1 -0
- package/dist/esm/http/errors/Locked.d.ts +7 -0
- package/dist/esm/http/errors/Locked.d.ts.map +1 -0
- package/dist/esm/http/errors/Locked.js +9 -0
- package/dist/esm/http/errors/Locked.js.map +1 -0
- package/dist/esm/http/errors/LoopDetected.d.ts +7 -0
- package/dist/esm/http/errors/LoopDetected.d.ts.map +1 -0
- package/dist/esm/http/errors/LoopDetected.js +9 -0
- package/dist/esm/http/errors/LoopDetected.js.map +1 -0
- package/dist/esm/http/errors/MethodNotAllowed.d.ts +8 -0
- package/dist/esm/http/errors/MethodNotAllowed.d.ts.map +1 -0
- package/dist/esm/http/errors/MethodNotAllowed.js +10 -0
- package/dist/esm/http/errors/MethodNotAllowed.js.map +1 -0
- package/dist/esm/http/errors/MisdirectedRequest.d.ts +7 -0
- package/dist/esm/http/errors/MisdirectedRequest.d.ts.map +1 -0
- package/dist/esm/http/errors/MisdirectedRequest.js +9 -0
- package/dist/esm/http/errors/MisdirectedRequest.js.map +1 -0
- package/dist/esm/http/errors/NetworkAuthenticationRequired.d.ts +7 -0
- package/dist/esm/http/errors/NetworkAuthenticationRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/NetworkAuthenticationRequired.js +9 -0
- package/dist/esm/http/errors/NetworkAuthenticationRequired.js.map +1 -0
- package/dist/esm/http/errors/NotAcceptable.d.ts +7 -0
- package/dist/esm/http/errors/NotAcceptable.d.ts.map +1 -0
- package/dist/esm/http/errors/NotAcceptable.js +9 -0
- package/dist/esm/http/errors/NotAcceptable.js.map +1 -0
- package/dist/esm/http/errors/NotExtended.d.ts +7 -0
- package/dist/esm/http/errors/NotExtended.d.ts.map +1 -0
- package/dist/esm/http/errors/NotExtended.js +9 -0
- package/dist/esm/http/errors/NotExtended.js.map +1 -0
- package/dist/esm/http/errors/NotFound.d.ts +7 -0
- package/dist/esm/http/errors/NotFound.d.ts.map +1 -0
- package/dist/esm/http/errors/NotFound.js +9 -0
- package/dist/esm/http/errors/NotFound.js.map +1 -0
- package/dist/esm/http/errors/NotImplemented.d.ts +7 -0
- package/dist/esm/http/errors/NotImplemented.d.ts.map +1 -0
- package/dist/esm/http/errors/NotImplemented.js +9 -0
- package/dist/esm/http/errors/NotImplemented.js.map +1 -0
- package/dist/esm/http/errors/PayloadTooLarge.d.ts +8 -0
- package/dist/esm/http/errors/PayloadTooLarge.d.ts.map +1 -0
- package/dist/esm/http/errors/PayloadTooLarge.js +10 -0
- package/dist/esm/http/errors/PayloadTooLarge.js.map +1 -0
- package/dist/esm/http/errors/PaymentRequired.d.ts +7 -0
- package/dist/esm/http/errors/PaymentRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/PaymentRequired.js +9 -0
- package/dist/esm/http/errors/PaymentRequired.js.map +1 -0
- package/dist/esm/http/errors/PreconditionFailed.d.ts +7 -0
- package/dist/esm/http/errors/PreconditionFailed.d.ts.map +1 -0
- package/dist/esm/http/errors/PreconditionFailed.js +9 -0
- package/dist/esm/http/errors/PreconditionFailed.js.map +1 -0
- package/dist/esm/http/errors/PreconditionRequired.d.ts +7 -0
- package/dist/esm/http/errors/PreconditionRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/PreconditionRequired.js +9 -0
- package/dist/esm/http/errors/PreconditionRequired.js.map +1 -0
- package/dist/esm/http/errors/ProxyAuthenticationRequired.d.ts +8 -0
- package/dist/esm/http/errors/ProxyAuthenticationRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/ProxyAuthenticationRequired.js +10 -0
- package/dist/esm/http/errors/ProxyAuthenticationRequired.js.map +1 -0
- package/dist/esm/http/errors/RangeNotSatisfiable.d.ts +7 -0
- package/dist/esm/http/errors/RangeNotSatisfiable.d.ts.map +1 -0
- package/dist/esm/http/errors/RangeNotSatisfiable.js +9 -0
- package/dist/esm/http/errors/RangeNotSatisfiable.js.map +1 -0
- package/dist/esm/http/errors/RequestHeaderFieldsTooLarge.d.ts +7 -0
- package/dist/esm/http/errors/RequestHeaderFieldsTooLarge.d.ts.map +1 -0
- package/dist/esm/http/errors/RequestHeaderFieldsTooLarge.js +9 -0
- package/dist/esm/http/errors/RequestHeaderFieldsTooLarge.js.map +1 -0
- package/dist/esm/http/errors/RequestTimeout.d.ts +7 -0
- package/dist/esm/http/errors/RequestTimeout.d.ts.map +1 -0
- package/dist/esm/http/errors/RequestTimeout.js +9 -0
- package/dist/esm/http/errors/RequestTimeout.js.map +1 -0
- package/dist/esm/http/errors/ServiceUnavailable.d.ts +8 -0
- package/dist/esm/http/errors/ServiceUnavailable.d.ts.map +1 -0
- package/dist/esm/http/errors/ServiceUnavailable.js +10 -0
- package/dist/esm/http/errors/ServiceUnavailable.js.map +1 -0
- package/dist/esm/http/errors/TooEarly.d.ts +7 -0
- package/dist/esm/http/errors/TooEarly.d.ts.map +1 -0
- package/dist/esm/http/errors/TooEarly.js +9 -0
- package/dist/esm/http/errors/TooEarly.js.map +1 -0
- package/dist/esm/http/errors/TooManyRequests.d.ts +8 -0
- package/dist/esm/http/errors/TooManyRequests.d.ts.map +1 -0
- package/dist/esm/http/errors/TooManyRequests.js +10 -0
- package/dist/esm/http/errors/TooManyRequests.js.map +1 -0
- package/dist/esm/http/errors/Unauthorized.d.ts +8 -0
- package/dist/esm/http/errors/Unauthorized.d.ts.map +1 -0
- package/dist/esm/http/errors/Unauthorized.js +10 -0
- package/dist/esm/http/errors/Unauthorized.js.map +1 -0
- package/dist/esm/http/errors/UnavailableForLegalReasons.d.ts +7 -0
- package/dist/esm/http/errors/UnavailableForLegalReasons.d.ts.map +1 -0
- package/dist/esm/http/errors/UnavailableForLegalReasons.js +9 -0
- package/dist/esm/http/errors/UnavailableForLegalReasons.js.map +1 -0
- package/dist/esm/http/errors/UnprocessableEntity.d.ts +7 -0
- package/dist/esm/http/errors/UnprocessableEntity.d.ts.map +1 -0
- package/dist/esm/http/errors/UnprocessableEntity.js +9 -0
- package/dist/esm/http/errors/UnprocessableEntity.js.map +1 -0
- package/dist/esm/http/errors/UnsufficientStorage.d.ts +7 -0
- package/dist/esm/http/errors/UnsufficientStorage.d.ts.map +1 -0
- package/dist/esm/http/errors/UnsufficientStorage.js +9 -0
- package/dist/esm/http/errors/UnsufficientStorage.js.map +1 -0
- package/dist/esm/http/errors/UnsupportedMediaType.d.ts +7 -0
- package/dist/esm/http/errors/UnsupportedMediaType.d.ts.map +1 -0
- package/dist/esm/http/errors/UnsupportedMediaType.js +9 -0
- package/dist/esm/http/errors/UnsupportedMediaType.js.map +1 -0
- package/dist/esm/http/errors/UpgradeRequired.d.ts +7 -0
- package/dist/esm/http/errors/UpgradeRequired.d.ts.map +1 -0
- package/dist/esm/http/errors/UpgradeRequired.js +9 -0
- package/dist/esm/http/errors/UpgradeRequired.js.map +1 -0
- package/dist/esm/http/errors/UriTooLong.d.ts +7 -0
- package/dist/esm/http/errors/UriTooLong.d.ts.map +1 -0
- package/dist/esm/http/errors/UriTooLong.js +9 -0
- package/dist/esm/http/errors/UriTooLong.js.map +1 -0
- package/dist/esm/http/errors/VariantAlsoNegotiates.d.ts +7 -0
- package/dist/esm/http/errors/VariantAlsoNegotiates.d.ts.map +1 -0
- package/dist/esm/http/errors/VariantAlsoNegotiates.js +9 -0
- package/dist/esm/http/errors/VariantAlsoNegotiates.js.map +1 -0
- package/dist/esm/http/errors/base.d.ts +23 -0
- package/dist/esm/http/errors/base.d.ts.map +1 -0
- package/dist/esm/http/errors/base.js +28 -0
- package/dist/esm/http/errors/base.js.map +1 -0
- package/dist/esm/http/errors/index.d.ts +42 -0
- package/dist/esm/http/errors/index.d.ts.map +1 -0
- package/dist/esm/http/errors/index.js +42 -0
- package/dist/esm/http/errors/index.js.map +1 -0
- package/dist/esm/http/httpExceptions.d.ts +14 -0
- package/dist/esm/http/httpExceptions.d.ts.map +1 -0
- package/dist/esm/http/httpExceptions.js +86 -0
- package/dist/esm/http/httpExceptions.js.map +1 -0
- package/dist/esm/index.d.ts +26 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +33 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/models.d.ts +15 -0
- package/dist/esm/models.d.ts.map +1 -0
- package/dist/esm/models.js +2 -0
- package/dist/esm/models.js.map +1 -0
- package/dist/esm/services/destinations/Destinations.d.ts +12 -0
- package/dist/esm/services/destinations/Destinations.d.ts.map +1 -0
- package/dist/esm/services/destinations/Destinations.js +25 -0
- package/dist/esm/services/destinations/Destinations.js.map +1 -0
- package/dist/esm/services/destinations/index.d.ts +2 -0
- package/dist/esm/services/destinations/index.d.ts.map +1 -0
- package/dist/esm/services/destinations/index.js +2 -0
- package/dist/esm/services/destinations/index.js.map +1 -0
- package/dist/esm/services/destinations/models/ListDestinationsResponse.d.ts +14 -0
- package/dist/esm/services/destinations/models/ListDestinationsResponse.d.ts.map +1 -0
- package/dist/esm/services/destinations/models/ListDestinationsResponse.js +2 -0
- package/dist/esm/services/destinations/models/ListDestinationsResponse.js.map +1 -0
- package/dist/esm/services/eSim/ESim.d.ts +40 -0
- package/dist/esm/services/eSim/ESim.d.ts.map +1 -0
- package/dist/esm/services/eSim/ESim.js +106 -0
- package/dist/esm/services/eSim/ESim.js.map +1 -0
- package/dist/esm/services/eSim/index.d.ts +5 -0
- package/dist/esm/services/eSim/index.d.ts.map +1 -0
- package/dist/esm/services/eSim/index.js +2 -0
- package/dist/esm/services/eSim/index.js.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimDeviceResponse.d.ts +23 -0
- package/dist/esm/services/eSim/models/GetEsimDeviceResponse.d.ts.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimDeviceResponse.js +2 -0
- package/dist/esm/services/eSim/models/GetEsimDeviceResponse.js.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimHistoryResponse.d.ts +26 -0
- package/dist/esm/services/eSim/models/GetEsimHistoryResponse.d.ts.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimHistoryResponse.js +2 -0
- package/dist/esm/services/eSim/models/GetEsimHistoryResponse.js.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimMacResponse.d.ts +19 -0
- package/dist/esm/services/eSim/models/GetEsimMacResponse.d.ts.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimMacResponse.js +2 -0
- package/dist/esm/services/eSim/models/GetEsimMacResponse.js.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimResponse.d.ts +23 -0
- package/dist/esm/services/eSim/models/GetEsimResponse.d.ts.map +1 -0
- package/dist/esm/services/eSim/models/GetEsimResponse.js +2 -0
- package/dist/esm/services/eSim/models/GetEsimResponse.js.map +1 -0
- package/dist/esm/services/packages/Packages.d.ts +30 -0
- package/dist/esm/services/packages/Packages.d.ts.map +1 -0
- package/dist/esm/services/packages/Packages.js +62 -0
- package/dist/esm/services/packages/Packages.js.map +1 -0
- package/dist/esm/services/packages/index.d.ts +2 -0
- package/dist/esm/services/packages/index.d.ts.map +1 -0
- package/dist/esm/services/packages/index.js +2 -0
- package/dist/esm/services/packages/index.js.map +1 -0
- package/dist/esm/services/packages/models/ListPackagesResponse.d.ts +30 -0
- package/dist/esm/services/packages/models/ListPackagesResponse.d.ts.map +1 -0
- package/dist/esm/services/packages/models/ListPackagesResponse.js +2 -0
- package/dist/esm/services/packages/models/ListPackagesResponse.js.map +1 -0
- package/dist/esm/services/purchases/Purchases.d.ts +64 -0
- package/dist/esm/services/purchases/Purchases.d.ts.map +1 -0
- package/dist/esm/services/purchases/Purchases.js +139 -0
- package/dist/esm/services/purchases/Purchases.js.map +1 -0
- package/dist/esm/services/purchases/index.d.ts +9 -0
- package/dist/esm/services/purchases/index.d.ts.map +1 -0
- package/dist/esm/services/purchases/index.js +2 -0
- package/dist/esm/services/purchases/index.js.map +1 -0
- package/dist/esm/services/purchases/models/CreatePurchaseRequest.d.ts +37 -0
- package/dist/esm/services/purchases/models/CreatePurchaseRequest.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/CreatePurchaseRequest.js +2 -0
- package/dist/esm/services/purchases/models/CreatePurchaseRequest.js.map +1 -0
- package/dist/esm/services/purchases/models/CreatePurchaseResponse.d.ts +48 -0
- package/dist/esm/services/purchases/models/CreatePurchaseResponse.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/CreatePurchaseResponse.js +2 -0
- package/dist/esm/services/purchases/models/CreatePurchaseResponse.js.map +1 -0
- package/dist/esm/services/purchases/models/EditPurchaseRequest.d.ts +25 -0
- package/dist/esm/services/purchases/models/EditPurchaseRequest.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/EditPurchaseRequest.js +2 -0
- package/dist/esm/services/purchases/models/EditPurchaseRequest.js.map +1 -0
- package/dist/esm/services/purchases/models/EditPurchaseResponse.d.ts +25 -0
- package/dist/esm/services/purchases/models/EditPurchaseResponse.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/EditPurchaseResponse.js +2 -0
- package/dist/esm/services/purchases/models/EditPurchaseResponse.js.map +1 -0
- package/dist/esm/services/purchases/models/GetPurchaseConsumptionResponse.d.ts +11 -0
- package/dist/esm/services/purchases/models/GetPurchaseConsumptionResponse.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/GetPurchaseConsumptionResponse.js +2 -0
- package/dist/esm/services/purchases/models/GetPurchaseConsumptionResponse.js.map +1 -0
- package/dist/esm/services/purchases/models/ListPurchasesResponse.d.ts +72 -0
- package/dist/esm/services/purchases/models/ListPurchasesResponse.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/ListPurchasesResponse.js +2 -0
- package/dist/esm/services/purchases/models/ListPurchasesResponse.js.map +1 -0
- package/dist/esm/services/purchases/models/TopUpEsimRequest.d.ts +33 -0
- package/dist/esm/services/purchases/models/TopUpEsimRequest.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/TopUpEsimRequest.js +2 -0
- package/dist/esm/services/purchases/models/TopUpEsimRequest.js.map +1 -0
- package/dist/esm/services/purchases/models/TopUpEsimResponse.d.ts +44 -0
- package/dist/esm/services/purchases/models/TopUpEsimResponse.d.ts.map +1 -0
- package/dist/esm/services/purchases/models/TopUpEsimResponse.js +2 -0
- package/dist/esm/services/purchases/models/TopUpEsimResponse.js.map +1 -0
- package/dist/umd/BaseService.d.ts +11 -0
- package/dist/umd/BaseService.d.ts.map +1 -0
- package/dist/umd/BaseService.js +40 -0
- package/dist/umd/BaseService.js.map +1 -0
- package/dist/umd/hooks/CustomHook.d.ts +59 -0
- package/dist/umd/hooks/CustomHook.d.ts.map +1 -0
- package/dist/umd/hooks/CustomHook.js +84 -0
- package/dist/umd/hooks/CustomHook.js.map +1 -0
- package/dist/umd/hooks/Hook.d.ts +24 -0
- package/dist/umd/hooks/Hook.d.ts.map +1 -0
- package/dist/umd/hooks/Hook.js +13 -0
- package/dist/umd/hooks/Hook.js.map +1 -0
- package/dist/umd/http/Environment.d.ts +4 -0
- package/dist/umd/http/Environment.d.ts.map +1 -0
- package/dist/umd/http/Environment.js +18 -0
- package/dist/umd/http/Environment.js.map +1 -0
- package/dist/umd/http/HTTPClient.d.ts +13 -0
- package/dist/umd/http/HTTPClient.d.ts.map +1 -0
- package/dist/umd/http/HTTPClient.js +13 -0
- package/dist/umd/http/HTTPClient.js.map +1 -0
- package/dist/umd/http/HTTPLibrary.d.ts +23 -0
- package/dist/umd/http/HTTPLibrary.d.ts.map +1 -0
- package/dist/umd/http/HTTPLibrary.js +153 -0
- package/dist/umd/http/HTTPLibrary.js.map +1 -0
- package/dist/umd/http/QuerySerializer.d.ts +6 -0
- package/dist/umd/http/QuerySerializer.d.ts.map +1 -0
- package/dist/umd/http/QuerySerializer.js +80 -0
- package/dist/umd/http/QuerySerializer.js.map +1 -0
- package/dist/umd/http/errors/BadGateway.d.ts +7 -0
- package/dist/umd/http/errors/BadGateway.d.ts.map +1 -0
- package/dist/umd/http/errors/BadGateway.js +22 -0
- package/dist/umd/http/errors/BadGateway.js.map +1 -0
- package/dist/umd/http/errors/BadRequest.d.ts +7 -0
- package/dist/umd/http/errors/BadRequest.d.ts.map +1 -0
- package/dist/umd/http/errors/BadRequest.js +22 -0
- package/dist/umd/http/errors/BadRequest.js.map +1 -0
- package/dist/umd/http/errors/Conflict.d.ts +7 -0
- package/dist/umd/http/errors/Conflict.d.ts.map +1 -0
- package/dist/umd/http/errors/Conflict.js +22 -0
- package/dist/umd/http/errors/Conflict.js.map +1 -0
- package/dist/umd/http/errors/ExpectationFailed.d.ts +7 -0
- package/dist/umd/http/errors/ExpectationFailed.d.ts.map +1 -0
- package/dist/umd/http/errors/ExpectationFailed.js +22 -0
- package/dist/umd/http/errors/ExpectationFailed.js.map +1 -0
- package/dist/umd/http/errors/FailedDependency.d.ts +7 -0
- package/dist/umd/http/errors/FailedDependency.d.ts.map +1 -0
- package/dist/umd/http/errors/FailedDependency.js +22 -0
- package/dist/umd/http/errors/FailedDependency.js.map +1 -0
- package/dist/umd/http/errors/Forbidden.d.ts +7 -0
- package/dist/umd/http/errors/Forbidden.d.ts.map +1 -0
- package/dist/umd/http/errors/Forbidden.js +22 -0
- package/dist/umd/http/errors/Forbidden.js.map +1 -0
- package/dist/umd/http/errors/GatewayTimeout.d.ts +7 -0
- package/dist/umd/http/errors/GatewayTimeout.d.ts.map +1 -0
- package/dist/umd/http/errors/GatewayTimeout.js +22 -0
- package/dist/umd/http/errors/GatewayTimeout.js.map +1 -0
- package/dist/umd/http/errors/Gone.d.ts +7 -0
- package/dist/umd/http/errors/Gone.d.ts.map +1 -0
- package/dist/umd/http/errors/Gone.js +22 -0
- package/dist/umd/http/errors/Gone.js.map +1 -0
- package/dist/umd/http/errors/HttpVersionNotSupported.d.ts +7 -0
- package/dist/umd/http/errors/HttpVersionNotSupported.d.ts.map +1 -0
- package/dist/umd/http/errors/HttpVersionNotSupported.js +22 -0
- package/dist/umd/http/errors/HttpVersionNotSupported.js.map +1 -0
- package/dist/umd/http/errors/InternalServerError.d.ts +7 -0
- package/dist/umd/http/errors/InternalServerError.d.ts.map +1 -0
- package/dist/umd/http/errors/InternalServerError.js +22 -0
- package/dist/umd/http/errors/InternalServerError.js.map +1 -0
- package/dist/umd/http/errors/LengthRequired.d.ts +7 -0
- package/dist/umd/http/errors/LengthRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/LengthRequired.js +22 -0
- package/dist/umd/http/errors/LengthRequired.js.map +1 -0
- package/dist/umd/http/errors/Locked.d.ts +7 -0
- package/dist/umd/http/errors/Locked.d.ts.map +1 -0
- package/dist/umd/http/errors/Locked.js +22 -0
- package/dist/umd/http/errors/Locked.js.map +1 -0
- package/dist/umd/http/errors/LoopDetected.d.ts +7 -0
- package/dist/umd/http/errors/LoopDetected.d.ts.map +1 -0
- package/dist/umd/http/errors/LoopDetected.js +22 -0
- package/dist/umd/http/errors/LoopDetected.js.map +1 -0
- package/dist/umd/http/errors/MethodNotAllowed.d.ts +8 -0
- package/dist/umd/http/errors/MethodNotAllowed.d.ts.map +1 -0
- package/dist/umd/http/errors/MethodNotAllowed.js +23 -0
- package/dist/umd/http/errors/MethodNotAllowed.js.map +1 -0
- package/dist/umd/http/errors/MisdirectedRequest.d.ts +7 -0
- package/dist/umd/http/errors/MisdirectedRequest.d.ts.map +1 -0
- package/dist/umd/http/errors/MisdirectedRequest.js +22 -0
- package/dist/umd/http/errors/MisdirectedRequest.js.map +1 -0
- package/dist/umd/http/errors/NetworkAuthenticationRequired.d.ts +7 -0
- package/dist/umd/http/errors/NetworkAuthenticationRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/NetworkAuthenticationRequired.js +22 -0
- package/dist/umd/http/errors/NetworkAuthenticationRequired.js.map +1 -0
- package/dist/umd/http/errors/NotAcceptable.d.ts +7 -0
- package/dist/umd/http/errors/NotAcceptable.d.ts.map +1 -0
- package/dist/umd/http/errors/NotAcceptable.js +22 -0
- package/dist/umd/http/errors/NotAcceptable.js.map +1 -0
- package/dist/umd/http/errors/NotExtended.d.ts +7 -0
- package/dist/umd/http/errors/NotExtended.d.ts.map +1 -0
- package/dist/umd/http/errors/NotExtended.js +22 -0
- package/dist/umd/http/errors/NotExtended.js.map +1 -0
- package/dist/umd/http/errors/NotFound.d.ts +7 -0
- package/dist/umd/http/errors/NotFound.d.ts.map +1 -0
- package/dist/umd/http/errors/NotFound.js +22 -0
- package/dist/umd/http/errors/NotFound.js.map +1 -0
- package/dist/umd/http/errors/NotImplemented.d.ts +7 -0
- package/dist/umd/http/errors/NotImplemented.d.ts.map +1 -0
- package/dist/umd/http/errors/NotImplemented.js +22 -0
- package/dist/umd/http/errors/NotImplemented.js.map +1 -0
- package/dist/umd/http/errors/PayloadTooLarge.d.ts +8 -0
- package/dist/umd/http/errors/PayloadTooLarge.d.ts.map +1 -0
- package/dist/umd/http/errors/PayloadTooLarge.js +23 -0
- package/dist/umd/http/errors/PayloadTooLarge.js.map +1 -0
- package/dist/umd/http/errors/PaymentRequired.d.ts +7 -0
- package/dist/umd/http/errors/PaymentRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/PaymentRequired.js +22 -0
- package/dist/umd/http/errors/PaymentRequired.js.map +1 -0
- package/dist/umd/http/errors/PreconditionFailed.d.ts +7 -0
- package/dist/umd/http/errors/PreconditionFailed.d.ts.map +1 -0
- package/dist/umd/http/errors/PreconditionFailed.js +22 -0
- package/dist/umd/http/errors/PreconditionFailed.js.map +1 -0
- package/dist/umd/http/errors/PreconditionRequired.d.ts +7 -0
- package/dist/umd/http/errors/PreconditionRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/PreconditionRequired.js +22 -0
- package/dist/umd/http/errors/PreconditionRequired.js.map +1 -0
- package/dist/umd/http/errors/ProxyAuthenticationRequired.d.ts +8 -0
- package/dist/umd/http/errors/ProxyAuthenticationRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/ProxyAuthenticationRequired.js +23 -0
- package/dist/umd/http/errors/ProxyAuthenticationRequired.js.map +1 -0
- package/dist/umd/http/errors/RangeNotSatisfiable.d.ts +7 -0
- package/dist/umd/http/errors/RangeNotSatisfiable.d.ts.map +1 -0
- package/dist/umd/http/errors/RangeNotSatisfiable.js +22 -0
- package/dist/umd/http/errors/RangeNotSatisfiable.js.map +1 -0
- package/dist/umd/http/errors/RequestHeaderFieldsTooLarge.d.ts +7 -0
- package/dist/umd/http/errors/RequestHeaderFieldsTooLarge.d.ts.map +1 -0
- package/dist/umd/http/errors/RequestHeaderFieldsTooLarge.js +22 -0
- package/dist/umd/http/errors/RequestHeaderFieldsTooLarge.js.map +1 -0
- package/dist/umd/http/errors/RequestTimeout.d.ts +7 -0
- package/dist/umd/http/errors/RequestTimeout.d.ts.map +1 -0
- package/dist/umd/http/errors/RequestTimeout.js +22 -0
- package/dist/umd/http/errors/RequestTimeout.js.map +1 -0
- package/dist/umd/http/errors/ServiceUnavailable.d.ts +8 -0
- package/dist/umd/http/errors/ServiceUnavailable.d.ts.map +1 -0
- package/dist/umd/http/errors/ServiceUnavailable.js +23 -0
- package/dist/umd/http/errors/ServiceUnavailable.js.map +1 -0
- package/dist/umd/http/errors/TooEarly.d.ts +7 -0
- package/dist/umd/http/errors/TooEarly.d.ts.map +1 -0
- package/dist/umd/http/errors/TooEarly.js +22 -0
- package/dist/umd/http/errors/TooEarly.js.map +1 -0
- package/dist/umd/http/errors/TooManyRequests.d.ts +8 -0
- package/dist/umd/http/errors/TooManyRequests.d.ts.map +1 -0
- package/dist/umd/http/errors/TooManyRequests.js +23 -0
- package/dist/umd/http/errors/TooManyRequests.js.map +1 -0
- package/dist/umd/http/errors/Unauthorized.d.ts +8 -0
- package/dist/umd/http/errors/Unauthorized.d.ts.map +1 -0
- package/dist/umd/http/errors/Unauthorized.js +23 -0
- package/dist/umd/http/errors/Unauthorized.js.map +1 -0
- package/dist/umd/http/errors/UnavailableForLegalReasons.d.ts +7 -0
- package/dist/umd/http/errors/UnavailableForLegalReasons.d.ts.map +1 -0
- package/dist/umd/http/errors/UnavailableForLegalReasons.js +22 -0
- package/dist/umd/http/errors/UnavailableForLegalReasons.js.map +1 -0
- package/dist/umd/http/errors/UnprocessableEntity.d.ts +7 -0
- package/dist/umd/http/errors/UnprocessableEntity.d.ts.map +1 -0
- package/dist/umd/http/errors/UnprocessableEntity.js +22 -0
- package/dist/umd/http/errors/UnprocessableEntity.js.map +1 -0
- package/dist/umd/http/errors/UnsufficientStorage.d.ts +7 -0
- package/dist/umd/http/errors/UnsufficientStorage.d.ts.map +1 -0
- package/dist/umd/http/errors/UnsufficientStorage.js +22 -0
- package/dist/umd/http/errors/UnsufficientStorage.js.map +1 -0
- package/dist/umd/http/errors/UnsupportedMediaType.d.ts +7 -0
- package/dist/umd/http/errors/UnsupportedMediaType.d.ts.map +1 -0
- package/dist/umd/http/errors/UnsupportedMediaType.js +22 -0
- package/dist/umd/http/errors/UnsupportedMediaType.js.map +1 -0
- package/dist/umd/http/errors/UpgradeRequired.d.ts +7 -0
- package/dist/umd/http/errors/UpgradeRequired.d.ts.map +1 -0
- package/dist/umd/http/errors/UpgradeRequired.js +22 -0
- package/dist/umd/http/errors/UpgradeRequired.js.map +1 -0
- package/dist/umd/http/errors/UriTooLong.d.ts +7 -0
- package/dist/umd/http/errors/UriTooLong.d.ts.map +1 -0
- package/dist/umd/http/errors/UriTooLong.js +22 -0
- package/dist/umd/http/errors/UriTooLong.js.map +1 -0
- package/dist/umd/http/errors/VariantAlsoNegotiates.d.ts +7 -0
- package/dist/umd/http/errors/VariantAlsoNegotiates.d.ts.map +1 -0
- package/dist/umd/http/errors/VariantAlsoNegotiates.js +22 -0
- package/dist/umd/http/errors/VariantAlsoNegotiates.js.map +1 -0
- package/dist/umd/http/errors/base.d.ts +23 -0
- package/dist/umd/http/errors/base.d.ts.map +1 -0
- package/dist/umd/http/errors/base.js +46 -0
- package/dist/umd/http/errors/base.js.map +1 -0
- package/dist/umd/http/errors/index.d.ts +42 -0
- package/dist/umd/http/errors/index.d.ts.map +1 -0
- package/dist/umd/http/errors/index.js +97 -0
- package/dist/umd/http/errors/index.js.map +1 -0
- package/dist/umd/http/httpExceptions.d.ts +14 -0
- package/dist/umd/http/httpExceptions.d.ts.map +1 -0
- package/dist/umd/http/httpExceptions.js +102 -0
- package/dist/umd/http/httpExceptions.js.map +1 -0
- package/dist/umd/index.d.ts +26 -0
- package/dist/umd/index.d.ts.map +1 -0
- package/dist/umd/index.js +73 -0
- package/dist/umd/index.js.map +1 -0
- package/dist/umd/models.d.ts +15 -0
- package/dist/umd/models.d.ts.map +1 -0
- package/dist/umd/models.js +13 -0
- package/dist/umd/models.js.map +1 -0
- package/dist/umd/services/destinations/Destinations.d.ts +12 -0
- package/dist/umd/services/destinations/Destinations.d.ts.map +1 -0
- package/dist/umd/services/destinations/Destinations.js +42 -0
- package/dist/umd/services/destinations/Destinations.js.map +1 -0
- package/dist/umd/services/destinations/index.d.ts +2 -0
- package/dist/umd/services/destinations/index.d.ts.map +1 -0
- package/dist/umd/services/destinations/index.js +13 -0
- package/dist/umd/services/destinations/index.js.map +1 -0
- package/dist/umd/services/destinations/models/ListDestinationsResponse.d.ts +14 -0
- package/dist/umd/services/destinations/models/ListDestinationsResponse.d.ts.map +1 -0
- package/dist/umd/services/destinations/models/ListDestinationsResponse.js +13 -0
- package/dist/umd/services/destinations/models/ListDestinationsResponse.js.map +1 -0
- package/dist/umd/services/eSim/ESim.d.ts +40 -0
- package/dist/umd/services/eSim/ESim.d.ts.map +1 -0
- package/dist/umd/services/eSim/ESim.js +123 -0
- package/dist/umd/services/eSim/ESim.js.map +1 -0
- package/dist/umd/services/eSim/index.d.ts +5 -0
- package/dist/umd/services/eSim/index.d.ts.map +1 -0
- package/dist/umd/services/eSim/index.js +13 -0
- package/dist/umd/services/eSim/index.js.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimDeviceResponse.d.ts +23 -0
- package/dist/umd/services/eSim/models/GetEsimDeviceResponse.d.ts.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimDeviceResponse.js +13 -0
- package/dist/umd/services/eSim/models/GetEsimDeviceResponse.js.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimHistoryResponse.d.ts +26 -0
- package/dist/umd/services/eSim/models/GetEsimHistoryResponse.d.ts.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimHistoryResponse.js +13 -0
- package/dist/umd/services/eSim/models/GetEsimHistoryResponse.js.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimMacResponse.d.ts +19 -0
- package/dist/umd/services/eSim/models/GetEsimMacResponse.d.ts.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimMacResponse.js +13 -0
- package/dist/umd/services/eSim/models/GetEsimMacResponse.js.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimResponse.d.ts +23 -0
- package/dist/umd/services/eSim/models/GetEsimResponse.d.ts.map +1 -0
- package/dist/umd/services/eSim/models/GetEsimResponse.js +13 -0
- package/dist/umd/services/eSim/models/GetEsimResponse.js.map +1 -0
- package/dist/umd/services/packages/Packages.d.ts +30 -0
- package/dist/umd/services/packages/Packages.d.ts.map +1 -0
- package/dist/umd/services/packages/Packages.js +79 -0
- package/dist/umd/services/packages/Packages.js.map +1 -0
- package/dist/umd/services/packages/index.d.ts +2 -0
- package/dist/umd/services/packages/index.d.ts.map +1 -0
- package/dist/umd/services/packages/index.js +13 -0
- package/dist/umd/services/packages/index.js.map +1 -0
- package/dist/umd/services/packages/models/ListPackagesResponse.d.ts +30 -0
- package/dist/umd/services/packages/models/ListPackagesResponse.d.ts.map +1 -0
- package/dist/umd/services/packages/models/ListPackagesResponse.js +13 -0
- package/dist/umd/services/packages/models/ListPackagesResponse.js.map +1 -0
- package/dist/umd/services/purchases/Purchases.d.ts +64 -0
- package/dist/umd/services/purchases/Purchases.d.ts.map +1 -0
- package/dist/umd/services/purchases/Purchases.js +156 -0
- package/dist/umd/services/purchases/Purchases.js.map +1 -0
- package/dist/umd/services/purchases/index.d.ts +9 -0
- package/dist/umd/services/purchases/index.d.ts.map +1 -0
- package/dist/umd/services/purchases/index.js +13 -0
- package/dist/umd/services/purchases/index.js.map +1 -0
- package/dist/umd/services/purchases/models/CreatePurchaseRequest.d.ts +37 -0
- package/dist/umd/services/purchases/models/CreatePurchaseRequest.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/CreatePurchaseRequest.js +13 -0
- package/dist/umd/services/purchases/models/CreatePurchaseRequest.js.map +1 -0
- package/dist/umd/services/purchases/models/CreatePurchaseResponse.d.ts +48 -0
- package/dist/umd/services/purchases/models/CreatePurchaseResponse.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/CreatePurchaseResponse.js +13 -0
- package/dist/umd/services/purchases/models/CreatePurchaseResponse.js.map +1 -0
- package/dist/umd/services/purchases/models/EditPurchaseRequest.d.ts +25 -0
- package/dist/umd/services/purchases/models/EditPurchaseRequest.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/EditPurchaseRequest.js +13 -0
- package/dist/umd/services/purchases/models/EditPurchaseRequest.js.map +1 -0
- package/dist/umd/services/purchases/models/EditPurchaseResponse.d.ts +25 -0
- package/dist/umd/services/purchases/models/EditPurchaseResponse.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/EditPurchaseResponse.js +13 -0
- package/dist/umd/services/purchases/models/EditPurchaseResponse.js.map +1 -0
- package/dist/umd/services/purchases/models/GetPurchaseConsumptionResponse.d.ts +11 -0
- package/dist/umd/services/purchases/models/GetPurchaseConsumptionResponse.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/GetPurchaseConsumptionResponse.js +13 -0
- package/dist/umd/services/purchases/models/GetPurchaseConsumptionResponse.js.map +1 -0
- package/dist/umd/services/purchases/models/ListPurchasesResponse.d.ts +72 -0
- package/dist/umd/services/purchases/models/ListPurchasesResponse.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/ListPurchasesResponse.js +13 -0
- package/dist/umd/services/purchases/models/ListPurchasesResponse.js.map +1 -0
- package/dist/umd/services/purchases/models/TopUpEsimRequest.d.ts +33 -0
- package/dist/umd/services/purchases/models/TopUpEsimRequest.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/TopUpEsimRequest.js +13 -0
- package/dist/umd/services/purchases/models/TopUpEsimRequest.js.map +1 -0
- package/dist/umd/services/purchases/models/TopUpEsimResponse.d.ts +44 -0
- package/dist/umd/services/purchases/models/TopUpEsimResponse.d.ts.map +1 -0
- package/dist/umd/services/purchases/models/TopUpEsimResponse.js +13 -0
- package/dist/umd/services/purchases/models/TopUpEsimResponse.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
Copyright (c) 2024
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in all
|
11
|
+
copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
14
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
15
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
16
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
17
|
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
18
|
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
|
19
|
+
OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
@@ -0,0 +1,466 @@
|
|
1
|
+
# Celitech Typescript SDK 1.1.46
|
2
|
+
|
3
|
+
The Typescript SDK for Celitech.
|
4
|
+
|
5
|
+
- API version: 1.1.46
|
6
|
+
- SDK version: 1.1.46
|
7
|
+
|
8
|
+
## Table of Contents
|
9
|
+
|
10
|
+
- [About the API](#requirements)
|
11
|
+
- [Installation](#installation)
|
12
|
+
- [Environment Variables](#environment-variables)
|
13
|
+
- [API Endpoint Services](#api-endpoint-services)
|
14
|
+
- [API Models](#api-models)
|
15
|
+
- [Sample Usage](#sample-usage)
|
16
|
+
- [Celitech Services](#celitech-services)
|
17
|
+
- [License](#license)
|
18
|
+
|
19
|
+
## About the API
|
20
|
+
|
21
|
+
Welcome to the CELITECH API documentation! Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)
|
22
|
+
|
23
|
+
## Installation
|
24
|
+
|
25
|
+
```sh
|
26
|
+
npm install celitech-sdk
|
27
|
+
```
|
28
|
+
|
29
|
+
## Environment Variables
|
30
|
+
|
31
|
+
You will need the following environment variables in order to access all the features of this SDK:
|
32
|
+
|
33
|
+
| Name | Description |
|
34
|
+
| :------------ | :---------------------- |
|
35
|
+
| CLIENT_ID | Client ID parameter |
|
36
|
+
| CLIENT_SECRET | Client Secret parameter |
|
37
|
+
|
38
|
+
You can set these environment variables on the command line or you can use
|
39
|
+
whatever tooling your project has in place to manage environment variables. If
|
40
|
+
you are using a `.env` file, we have provided a template with the variable names
|
41
|
+
in the `.env.example` file in the same directory as this readme.
|
42
|
+
|
43
|
+
## Sample Usage
|
44
|
+
|
45
|
+
Here is a simple program demonstrating usage of this SDK. It can also be found in the `examples/src/index.ts` file in this directory.
|
46
|
+
|
47
|
+
When running the sample make sure to use `npm install` to install all the dependencies.
|
48
|
+
|
49
|
+
```Typescript
|
50
|
+
import { Celitech } from 'celitech-sdk';
|
51
|
+
|
52
|
+
|
53
|
+
const sdk = new Celitech();
|
54
|
+
|
55
|
+
(async () => {
|
56
|
+
try {
|
57
|
+
const result = await sdk.destinations
|
58
|
+
.listDestinations();
|
59
|
+
console.log(result);
|
60
|
+
} catch (err) {
|
61
|
+
const error = err as Error;
|
62
|
+
console.error(error.message);
|
63
|
+
}
|
64
|
+
})();
|
65
|
+
|
66
|
+
|
67
|
+
```
|
68
|
+
|
69
|
+
# Celitech Services
|
70
|
+
|
71
|
+
A list of all services and services methods.
|
72
|
+
|
73
|
+
- Services
|
74
|
+
|
75
|
+
- [Destinations](#destinations)
|
76
|
+
|
77
|
+
- [Packages](#packages)
|
78
|
+
|
79
|
+
- [Purchases](#purchases)
|
80
|
+
|
81
|
+
- [ESim](#esim)
|
82
|
+
|
83
|
+
- [All Methods](#all-methods)
|
84
|
+
|
85
|
+
## Destinations
|
86
|
+
|
87
|
+
| Method | Description |
|
88
|
+
| :------------------------------------ | :---------------- |
|
89
|
+
| [listDestinations](#listdestinations) | List Destinations |
|
90
|
+
|
91
|
+
## Packages
|
92
|
+
|
93
|
+
| Method | Description |
|
94
|
+
| :---------------------------- | :------------ |
|
95
|
+
| [listPackages](#listpackages) | List Packages |
|
96
|
+
|
97
|
+
## Purchases
|
98
|
+
|
99
|
+
| Method | Description |
|
100
|
+
| :------------------------------------------------ | :----------------------- |
|
101
|
+
| [createPurchase](#createpurchase) | Create Purchase |
|
102
|
+
| [listPurchases](#listpurchases) | List Purchases |
|
103
|
+
| [topUpEsim](#topupesim) | Top-up eSIM |
|
104
|
+
| [editPurchase](#editpurchase) | Edit Purchase |
|
105
|
+
| [getPurchaseConsumption](#getpurchaseconsumption) | Get Purchase Consumption |
|
106
|
+
|
107
|
+
## ESim
|
108
|
+
|
109
|
+
| Method | Description |
|
110
|
+
| :-------------------------------- | :--------------- |
|
111
|
+
| [getEsim](#getesim) | Get eSIM Status |
|
112
|
+
| [getEsimDevice](#getesimdevice) | Get eSIM Device |
|
113
|
+
| [getEsimHistory](#getesimhistory) | Get eSIM History |
|
114
|
+
| [getEsimMac](#getesimmac) | Get eSIM MAC |
|
115
|
+
|
116
|
+
## All Methods
|
117
|
+
|
118
|
+
### **listDestinations**
|
119
|
+
|
120
|
+
List Destinations
|
121
|
+
|
122
|
+
- HTTP Method: GET
|
123
|
+
- Endpoint: /destinations
|
124
|
+
|
125
|
+
**Return Type**
|
126
|
+
|
127
|
+
ListDestinationsResponse
|
128
|
+
|
129
|
+
**Example Usage Code Snippet**
|
130
|
+
|
131
|
+
```Typescript
|
132
|
+
import { Celitech } from 'celitech-sdk';
|
133
|
+
|
134
|
+
const sdk = new Celitech();
|
135
|
+
|
136
|
+
(async () => {
|
137
|
+
const result = await sdk.destinations.listDestinations();
|
138
|
+
console.log(result);
|
139
|
+
})();
|
140
|
+
|
141
|
+
```
|
142
|
+
|
143
|
+
### **listPackages**
|
144
|
+
|
145
|
+
List Packages
|
146
|
+
|
147
|
+
- HTTP Method: GET
|
148
|
+
- Endpoint: /packages
|
149
|
+
|
150
|
+
**Optional Parameters**
|
151
|
+
|
152
|
+
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
|
153
|
+
|
154
|
+
| Name | Type | Description |
|
155
|
+
| :---------- | :----- | :---------- |
|
156
|
+
| destination | string | |
|
157
|
+
| startDate | string | |
|
158
|
+
| endDate | string | |
|
159
|
+
| afterCursor | string | |
|
160
|
+
| limit | number | |
|
161
|
+
| startTime | number | |
|
162
|
+
| endTime | number | |
|
163
|
+
| duration | number | |
|
164
|
+
|
165
|
+
**Return Type**
|
166
|
+
|
167
|
+
ListPackagesResponse
|
168
|
+
|
169
|
+
**Example Usage Code Snippet**
|
170
|
+
|
171
|
+
```Typescript
|
172
|
+
import { Celitech } from 'celitech-sdk';
|
173
|
+
|
174
|
+
const sdk = new Celitech();
|
175
|
+
|
176
|
+
(async () => {
|
177
|
+
const result = await sdk.packages.listPackages();
|
178
|
+
console.log(result);
|
179
|
+
})();
|
180
|
+
|
181
|
+
```
|
182
|
+
|
183
|
+
### **createPurchase**
|
184
|
+
|
185
|
+
Create Purchase
|
186
|
+
|
187
|
+
- HTTP Method: POST
|
188
|
+
- Endpoint: /purchases
|
189
|
+
|
190
|
+
**Required Parameters**
|
191
|
+
|
192
|
+
| input | object | Request body. |
|
193
|
+
|
194
|
+
**Return Type**
|
195
|
+
|
196
|
+
CreatePurchaseResponse
|
197
|
+
|
198
|
+
**Example Usage Code Snippet**
|
199
|
+
|
200
|
+
```Typescript
|
201
|
+
import { Celitech } from 'celitech-sdk';
|
202
|
+
|
203
|
+
const sdk = new Celitech();
|
204
|
+
|
205
|
+
(async () => {
|
206
|
+
const result = await sdk.purchases.createPurchase();
|
207
|
+
console.log(result);
|
208
|
+
})();
|
209
|
+
|
210
|
+
```
|
211
|
+
|
212
|
+
### **listPurchases**
|
213
|
+
|
214
|
+
List Purchases
|
215
|
+
|
216
|
+
- HTTP Method: GET
|
217
|
+
- Endpoint: /purchases
|
218
|
+
|
219
|
+
**Optional Parameters**
|
220
|
+
|
221
|
+
Optional parameters are passed as part of the last parameter to the method. Ex. {optionalParam1 : 'value1', optionalParam2: 'value2'}
|
222
|
+
|
223
|
+
| Name | Type | Description |
|
224
|
+
| :---------- | :----- | :------------------------------------------------------------------------------ |
|
225
|
+
| iccid | string | |
|
226
|
+
| afterDate | string | Start date of the interval for filtering purchases in the format 'yyyy-MM-dd' |
|
227
|
+
| beforeDate | string | End date of the interval for filtering purchases in the format 'yyyy-MM-dd' |
|
228
|
+
| afterCursor | string | |
|
229
|
+
| limit | number | |
|
230
|
+
| after | number | Epoch value representing the start of the time interval for filtering purchases |
|
231
|
+
| before | number | Epoch value representing the end of the time interval for filtering purchases |
|
232
|
+
|
233
|
+
**Return Type**
|
234
|
+
|
235
|
+
ListPurchasesResponse
|
236
|
+
|
237
|
+
**Example Usage Code Snippet**
|
238
|
+
|
239
|
+
```Typescript
|
240
|
+
import { Celitech } from 'celitech-sdk';
|
241
|
+
|
242
|
+
const sdk = new Celitech();
|
243
|
+
|
244
|
+
(async () => {
|
245
|
+
const result = await sdk.purchases.listPurchases();
|
246
|
+
console.log(result);
|
247
|
+
})();
|
248
|
+
|
249
|
+
```
|
250
|
+
|
251
|
+
### **topUpEsim**
|
252
|
+
|
253
|
+
Top-up eSIM
|
254
|
+
|
255
|
+
- HTTP Method: POST
|
256
|
+
- Endpoint: /purchases/topup
|
257
|
+
|
258
|
+
**Required Parameters**
|
259
|
+
|
260
|
+
| input | object | Request body. |
|
261
|
+
|
262
|
+
**Return Type**
|
263
|
+
|
264
|
+
TopUpEsimResponse
|
265
|
+
|
266
|
+
**Example Usage Code Snippet**
|
267
|
+
|
268
|
+
```Typescript
|
269
|
+
import { Celitech } from 'celitech-sdk';
|
270
|
+
|
271
|
+
const sdk = new Celitech();
|
272
|
+
|
273
|
+
(async () => {
|
274
|
+
const result = await sdk.purchases.topUpEsim();
|
275
|
+
console.log(result);
|
276
|
+
})();
|
277
|
+
|
278
|
+
```
|
279
|
+
|
280
|
+
### **editPurchase**
|
281
|
+
|
282
|
+
Edit Purchase
|
283
|
+
|
284
|
+
- HTTP Method: POST
|
285
|
+
- Endpoint: /purchases/edit
|
286
|
+
|
287
|
+
**Required Parameters**
|
288
|
+
|
289
|
+
| input | object | Request body. |
|
290
|
+
|
291
|
+
**Return Type**
|
292
|
+
|
293
|
+
EditPurchaseResponse
|
294
|
+
|
295
|
+
**Example Usage Code Snippet**
|
296
|
+
|
297
|
+
```Typescript
|
298
|
+
import { Celitech } from 'celitech-sdk';
|
299
|
+
|
300
|
+
const sdk = new Celitech();
|
301
|
+
|
302
|
+
(async () => {
|
303
|
+
const result = await sdk.purchases.editPurchase();
|
304
|
+
console.log(result);
|
305
|
+
})();
|
306
|
+
|
307
|
+
```
|
308
|
+
|
309
|
+
### **getPurchaseConsumption**
|
310
|
+
|
311
|
+
Get Purchase Consumption
|
312
|
+
|
313
|
+
- HTTP Method: GET
|
314
|
+
- Endpoint: /purchases/{purchaseId}/consumption
|
315
|
+
|
316
|
+
**Required Parameters**
|
317
|
+
|
318
|
+
| Name | Type | Description |
|
319
|
+
| :--------- | :----- | :---------- |
|
320
|
+
| purchaseId | string | |
|
321
|
+
|
322
|
+
**Return Type**
|
323
|
+
|
324
|
+
GetPurchaseConsumptionResponse
|
325
|
+
|
326
|
+
**Example Usage Code Snippet**
|
327
|
+
|
328
|
+
```Typescript
|
329
|
+
import { Celitech } from 'celitech-sdk';
|
330
|
+
|
331
|
+
const sdk = new Celitech();
|
332
|
+
|
333
|
+
(async () => {
|
334
|
+
const result = await sdk.purchases.getPurchaseConsumption('4973fa15-6979-4daa-9cf3-672620df819c');
|
335
|
+
console.log(result);
|
336
|
+
})();
|
337
|
+
|
338
|
+
```
|
339
|
+
|
340
|
+
### **getEsim**
|
341
|
+
|
342
|
+
Get eSIM Status
|
343
|
+
|
344
|
+
- HTTP Method: GET
|
345
|
+
- Endpoint: /esim
|
346
|
+
|
347
|
+
**Required Parameters**
|
348
|
+
|
349
|
+
| Name | Type | Description |
|
350
|
+
| :---- | :----- | :---------- |
|
351
|
+
| iccid | string | |
|
352
|
+
|
353
|
+
**Return Type**
|
354
|
+
|
355
|
+
GetEsimResponse
|
356
|
+
|
357
|
+
**Example Usage Code Snippet**
|
358
|
+
|
359
|
+
```Typescript
|
360
|
+
import { Celitech } from 'celitech-sdk';
|
361
|
+
|
362
|
+
const sdk = new Celitech();
|
363
|
+
|
364
|
+
(async () => {
|
365
|
+
const result = await sdk.eSim.getEsim('1111222233334444555');
|
366
|
+
console.log(result);
|
367
|
+
})();
|
368
|
+
|
369
|
+
```
|
370
|
+
|
371
|
+
### **getEsimDevice**
|
372
|
+
|
373
|
+
Get eSIM Device
|
374
|
+
|
375
|
+
- HTTP Method: GET
|
376
|
+
- Endpoint: /esim/{iccid}/device
|
377
|
+
|
378
|
+
**Required Parameters**
|
379
|
+
|
380
|
+
| Name | Type | Description |
|
381
|
+
| :---- | :----- | :---------- |
|
382
|
+
| iccid | string | |
|
383
|
+
|
384
|
+
**Return Type**
|
385
|
+
|
386
|
+
GetEsimDeviceResponse
|
387
|
+
|
388
|
+
**Example Usage Code Snippet**
|
389
|
+
|
390
|
+
```Typescript
|
391
|
+
import { Celitech } from 'celitech-sdk';
|
392
|
+
|
393
|
+
const sdk = new Celitech();
|
394
|
+
|
395
|
+
(async () => {
|
396
|
+
const result = await sdk.eSim.getEsimDevice('1111222233334444555');
|
397
|
+
console.log(result);
|
398
|
+
})();
|
399
|
+
|
400
|
+
```
|
401
|
+
|
402
|
+
### **getEsimHistory**
|
403
|
+
|
404
|
+
Get eSIM History
|
405
|
+
|
406
|
+
- HTTP Method: GET
|
407
|
+
- Endpoint: /esim/{iccid}/history
|
408
|
+
|
409
|
+
**Required Parameters**
|
410
|
+
|
411
|
+
| Name | Type | Description |
|
412
|
+
| :---- | :----- | :---------- |
|
413
|
+
| iccid | string | |
|
414
|
+
|
415
|
+
**Return Type**
|
416
|
+
|
417
|
+
GetEsimHistoryResponse
|
418
|
+
|
419
|
+
**Example Usage Code Snippet**
|
420
|
+
|
421
|
+
```Typescript
|
422
|
+
import { Celitech } from 'celitech-sdk';
|
423
|
+
|
424
|
+
const sdk = new Celitech();
|
425
|
+
|
426
|
+
(async () => {
|
427
|
+
const result = await sdk.eSim.getEsimHistory('1111222233334444555');
|
428
|
+
console.log(result);
|
429
|
+
})();
|
430
|
+
|
431
|
+
```
|
432
|
+
|
433
|
+
### **getEsimMac**
|
434
|
+
|
435
|
+
Get eSIM MAC
|
436
|
+
|
437
|
+
- HTTP Method: GET
|
438
|
+
- Endpoint: /esim/{iccid}/mac
|
439
|
+
|
440
|
+
**Required Parameters**
|
441
|
+
|
442
|
+
| Name | Type | Description |
|
443
|
+
| :---- | :----- | :---------- |
|
444
|
+
| iccid | string | |
|
445
|
+
|
446
|
+
**Return Type**
|
447
|
+
|
448
|
+
GetEsimMacResponse
|
449
|
+
|
450
|
+
**Example Usage Code Snippet**
|
451
|
+
|
452
|
+
```Typescript
|
453
|
+
import { Celitech } from 'celitech-sdk';
|
454
|
+
|
455
|
+
const sdk = new Celitech();
|
456
|
+
|
457
|
+
(async () => {
|
458
|
+
const result = await sdk.eSim.getEsimMac('1111222233334444555');
|
459
|
+
console.log(result);
|
460
|
+
})();
|
461
|
+
|
462
|
+
```
|
463
|
+
|
464
|
+
## License
|
465
|
+
|
466
|
+
License: MIT. See license in LICENSE.
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import HTTPLibrary from './http/HTTPLibrary';
|
2
|
+
export default class BaseService {
|
3
|
+
baseUrl: string;
|
4
|
+
httpClient: HTTPLibrary;
|
5
|
+
setBaseUrl(url: string): void;
|
6
|
+
static patternMatching(value: string, pattern: string, variableName: string): string;
|
7
|
+
static urlEncode: (input: {
|
8
|
+
[key: string]: any;
|
9
|
+
}) => string;
|
10
|
+
}
|
11
|
+
//# sourceMappingURL=BaseService.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BaseService.d.ts","sourceRoot":"","sources":["../../src/BaseService.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,WAAW;IACvB,OAAO,EAAE,MAAM,CAAuB;IAEtC,UAAU,cAAqB;IAEtC,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM;IAUpF,MAAM,CAAC,SAAS;;UAAoC,MAAM,CAG3C;CAChB"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const Environment_1 = require("./http/Environment");
|
7
|
+
const HTTPLibrary_1 = __importDefault(require("./http/HTTPLibrary"));
|
8
|
+
class BaseService {
|
9
|
+
constructor() {
|
10
|
+
this.baseUrl = Environment_1.Environment.DEFAULT;
|
11
|
+
this.httpClient = new HTTPLibrary_1.default();
|
12
|
+
}
|
13
|
+
setBaseUrl(url) {
|
14
|
+
this.baseUrl = url;
|
15
|
+
}
|
16
|
+
static patternMatching(value, pattern, variableName) {
|
17
|
+
if (!value) {
|
18
|
+
throw new Error(`${variableName} cannot be null or undefined`);
|
19
|
+
}
|
20
|
+
if (!value.match(new RegExp(pattern))) {
|
21
|
+
throw new Error(`Invalid value for ${variableName}: must match ${pattern}`);
|
22
|
+
}
|
23
|
+
return value;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
exports.default = BaseService;
|
27
|
+
BaseService.urlEncode = (input) => Object.keys(input)
|
28
|
+
.map((key) => `${key}=${encodeURIComponent(input[key])}`)
|
29
|
+
.join('&');
|
30
|
+
//# sourceMappingURL=BaseService.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"BaseService.js","sourceRoot":"","sources":["../../src/BaseService.ts"],"names":[],"mappings":";;;;;AAAA,oDAAiD;AACjD,qEAA6C;AAE7C,MAAqB,WAAW;IAAhC;QACS,YAAO,GAAW,yBAAW,CAAC,OAAO,CAAC;QAEtC,eAAU,GAAG,IAAI,qBAAW,EAAE,CAAC;IAoBxC,CAAC;IAlBC,UAAU,CAAC,GAAW;QACpB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,eAAe,CAAC,KAAa,EAAE,OAAe,EAAE,YAAoB;QACzE,IAAI,CAAC,KAAK,EAAE;YACV,MAAM,IAAI,KAAK,CAAC,GAAG,YAAY,8BAA8B,CAAC,CAAC;SAChE;QACD,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,EAAE;YACrC,MAAM,IAAI,KAAK,CAAC,qBAAqB,YAAY,gBAAgB,OAAO,EAAE,CAAC,CAAC;SAC7E;QACD,OAAO,KAAK,CAAC;IACf,CAAC;;AAjBH,8BAuBC;AAJQ,qBAAS,GAAG,CAAC,KAA6B,EAAU,EAAE,CAC3D,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;KACf,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;KACxD,IAAI,CAAC,GAAG,CAAC,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* Request to the API
|
3
|
+
*/
|
4
|
+
export interface Request {
|
5
|
+
method: string;
|
6
|
+
url: string;
|
7
|
+
input?: object;
|
8
|
+
headers: object;
|
9
|
+
}
|
10
|
+
/**
|
11
|
+
* Response from the API
|
12
|
+
*/
|
13
|
+
export interface Response {
|
14
|
+
data: object;
|
15
|
+
headers: object;
|
16
|
+
status: number;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* Exception thrown by the API
|
20
|
+
*/
|
21
|
+
export interface Exception extends Error {
|
22
|
+
title: string;
|
23
|
+
type?: string;
|
24
|
+
detail?: string;
|
25
|
+
instance?: string;
|
26
|
+
statusCode: number;
|
27
|
+
}
|
28
|
+
/**
|
29
|
+
* Standard Hook interface
|
30
|
+
*/
|
31
|
+
export interface Hook {
|
32
|
+
/**
|
33
|
+
* Called before the request is sent to the API
|
34
|
+
* @param request
|
35
|
+
*/
|
36
|
+
beforeRequest(request: Request): Promise<void>;
|
37
|
+
/**
|
38
|
+
* Called after the response is received from the API
|
39
|
+
* @param request
|
40
|
+
* @param response
|
41
|
+
*/
|
42
|
+
afterResponse(request: Request, response: Response): Promise<void>;
|
43
|
+
/**
|
44
|
+
* Called when an error occurs
|
45
|
+
* @param error
|
46
|
+
*/
|
47
|
+
onError(error: Exception): Promise<void>;
|
48
|
+
}
|
49
|
+
/**
|
50
|
+
* Custom Hook - This is a sample hook that can be used as a template for your own hook
|
51
|
+
* This hook will sign the request with a HMAC signature
|
52
|
+
*/
|
53
|
+
export default class CustomHook implements Hook {
|
54
|
+
beforeRequest(request: Request): Promise<void>;
|
55
|
+
doPost(request: Request, input: any, urlEndpoint: string): Promise<any>;
|
56
|
+
afterResponse(request: Request, response: Response): Promise<void>;
|
57
|
+
onError(error: Exception): Promise<void>;
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=CustomHook.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CustomHook.d.ts","sourceRoot":"","sources":["../../../src/hooks/CustomHook.ts"],"names":[],"mappings":"AAMA;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACnB;;;OAGG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/C;;;;OAIG;IACH,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnE;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,UAAW,YAAW,IAAI;IACvC,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAyC9C,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAqBvE,aAAa,CAAC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlE,OAAO,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC;CAG/C"}
|
@@ -0,0 +1,74 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
const HTTPLibrary_1 = __importDefault(require("../http/HTTPLibrary"));
|
7
|
+
let CURRENT_TOKEN = '';
|
8
|
+
let CURRENT_EXPIRY = -1;
|
9
|
+
/**
|
10
|
+
* Custom Hook - This is a sample hook that can be used as a template for your own hook
|
11
|
+
* This hook will sign the request with a HMAC signature
|
12
|
+
*/
|
13
|
+
class CustomHook {
|
14
|
+
async beforeRequest(request) {
|
15
|
+
if (request.url.endsWith('/oauth/token'))
|
16
|
+
return;
|
17
|
+
// Get the client_id and client_secret from environment variables
|
18
|
+
const clientId = process.env.CLIENT_ID || '';
|
19
|
+
const clientSecret = process.env.CLIENT_SECRET || '';
|
20
|
+
if (!clientId || !clientSecret) {
|
21
|
+
console.error('Missing CLIENT_ID and/or CLIENT_SECRET environment variables');
|
22
|
+
return;
|
23
|
+
}
|
24
|
+
else {
|
25
|
+
// Check if CURRENT_TOKEN is missing or CURRENT_EXPIRY is in the past
|
26
|
+
if (!CURRENT_TOKEN || CURRENT_EXPIRY < Date.now()) {
|
27
|
+
// Prepare the request payload for fecthing a fresh Oauth token
|
28
|
+
const input = {
|
29
|
+
client_id: clientId || '',
|
30
|
+
client_secret: clientSecret || '',
|
31
|
+
grant_type: 'client_credentials',
|
32
|
+
};
|
33
|
+
// Fetch a fresh Oauth token
|
34
|
+
// Retrieve the new access token and expiry, and set them to the global variables
|
35
|
+
const tokenResponse = await this.doPost(request, input, '/oauth2/token');
|
36
|
+
const { expires_in, access_token } = tokenResponse.data;
|
37
|
+
if (!expires_in || !access_token) {
|
38
|
+
console.error('There is an issue with getting the oauth token');
|
39
|
+
return;
|
40
|
+
}
|
41
|
+
CURRENT_EXPIRY = Date.now() + expires_in * 1000;
|
42
|
+
CURRENT_TOKEN = access_token;
|
43
|
+
}
|
44
|
+
// Set the Bearer token in the request header
|
45
|
+
const authorization = `Bearer ${CURRENT_TOKEN}`;
|
46
|
+
request.headers = {
|
47
|
+
...request.headers,
|
48
|
+
Authorization: authorization,
|
49
|
+
};
|
50
|
+
}
|
51
|
+
}
|
52
|
+
async doPost(request, input, urlEndpoint) {
|
53
|
+
const indexOfDotNet = request.url.indexOf('.com');
|
54
|
+
const fullUrl = 'https://auth.celitech.net/oauth2/token';
|
55
|
+
try {
|
56
|
+
const resp = await new HTTPLibrary_1.default().post(fullUrl, input, {
|
57
|
+
'Content-type': 'application/x-www-form-urlencoded',
|
58
|
+
}, true);
|
59
|
+
return resp;
|
60
|
+
}
|
61
|
+
catch (error) {
|
62
|
+
console.error('Error in posting the request:', error);
|
63
|
+
return null;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
async afterResponse(request, response) {
|
67
|
+
// no-op
|
68
|
+
}
|
69
|
+
async onError(error) {
|
70
|
+
console.error('an error occurred!');
|
71
|
+
}
|
72
|
+
}
|
73
|
+
exports.default = CustomHook;
|
74
|
+
//# sourceMappingURL=CustomHook.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"CustomHook.js","sourceRoot":"","sources":["../../../src/hooks/CustomHook.ts"],"names":[],"mappings":";;;;;AACA,sEAA8C;AAE9C,IAAI,aAAa,GAAG,EAAE,CAAC;AACvB,IAAI,cAAc,GAAG,CAAC,CAAC,CAAC;AAwDxB;;;GAGG;AACH,MAAqB,UAAU;IAC7B,KAAK,CAAC,aAAa,CAAC,OAAgB;QAClC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,cAAc,CAAC;YAAE,OAAO;QAEjD,iEAAiE;QACjE,MAAM,QAAQ,GAAW,OAAO,CAAC,GAAG,CAAC,SAAS,IAAI,EAAE,CAAC;QACrD,MAAM,YAAY,GAAW,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,EAAE,CAAC;QAC7D,IAAI,CAAC,QAAQ,IAAI,CAAC,YAAY,EAAE;YAC9B,OAAO,CAAC,KAAK,CAAC,8DAA8D,CAAC,CAAC;YAC9E,OAAO;SACR;aAAM;YACL,qEAAqE;YACrE,IAAI,CAAC,aAAa,IAAI,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE;gBACjD,+DAA+D;gBAC/D,MAAM,KAAK,GAAG;oBACZ,SAAS,EAAE,QAAQ,IAAI,EAAE;oBACzB,aAAa,EAAE,YAAY,IAAI,EAAE;oBACjC,UAAU,EAAE,oBAAoB;iBACjC,CAAC;gBAEF,4BAA4B;gBAC5B,iFAAiF;gBACjF,MAAM,aAAa,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,eAAe,CAAC,CAAC;gBACzE,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,GAAG,aAAa,CAAC,IAAI,CAAC;gBAExD,IAAI,CAAC,UAAU,IAAI,CAAC,YAAY,EAAE;oBAChC,OAAO,CAAC,KAAK,CAAC,gDAAgD,CAAC,CAAC;oBAChE,OAAO;iBACR;gBACD,cAAc,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,GAAG,IAAI,CAAC;gBAChD,aAAa,GAAG,YAAY,CAAC;aAC9B;YAED,6CAA6C;YAC7C,MAAM,aAAa,GAAG,UAAU,aAAa,EAAE,CAAC;YAChD,OAAO,CAAC,OAAO,GAAG;gBAChB,GAAG,OAAO,CAAC,OAAO;gBAClB,aAAa,EAAE,aAAa;aAC7B,CAAC;SACH;IACH,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,OAAgB,EAAE,KAAU,EAAE,WAAmB;QAC5D,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,wCAAwC,CAAC;QAEzD,IAAI;YACF,MAAM,IAAI,GAAG,MAAM,IAAI,qBAAW,EAAE,CAAC,IAAI,CACvC,OAAO,EACP,KAAK,EACL;gBACE,cAAc,EAAE,mCAAmC;aACpD,EACD,IAAI,CACL,CAAC;YAEF,OAAO,IAAI,CAAC;SACb;QAAC,OAAO,KAAK,EAAE;YACd,OAAO,CAAC,KAAK,CAAC,+BAA+B,EAAE,KAAK,CAAC,CAAC;YACtD,OAAO,IAAI,CAAC;SACb;IACH,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,OAAgB,EAAE,QAAkB;QACtD,QAAQ;IACV,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAgB;QAC5B,OAAO,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;IACtC,CAAC;CACF;AAtED,6BAsEC"}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export interface Request {
|
2
|
+
method: string;
|
3
|
+
url: string;
|
4
|
+
input?: object;
|
5
|
+
headers: object;
|
6
|
+
}
|
7
|
+
export interface Response {
|
8
|
+
data: object;
|
9
|
+
headers: object;
|
10
|
+
status: number;
|
11
|
+
}
|
12
|
+
export interface Exception extends Error {
|
13
|
+
title: string;
|
14
|
+
type?: string;
|
15
|
+
detail?: string;
|
16
|
+
instance?: string;
|
17
|
+
statusCode: number;
|
18
|
+
}
|
19
|
+
export interface Hook {
|
20
|
+
beforeRequest(request: Request): Promise<void>;
|
21
|
+
afterResponse(request: Request, response: Response): Promise<void>;
|
22
|
+
onError(error: Exception): Promise<void>;
|
23
|
+
}
|
24
|
+
//# sourceMappingURL=Hook.d.ts.map
|