celitech-sdk 1.3.63 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -9
- package/dist/index.d.ts +213 -62
- package/dist/index.js +479 -164
- package/dist/index.mjs +477 -164
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
# Celitech TypeScript SDK
|
|
1
|
+
# Celitech TypeScript SDK 2.0.0
|
|
2
2
|
|
|
3
3
|
Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
|
|
4
4
|
|
|
5
|
-
[](https://liblab.com/?utm_source=readme)
|
|
6
|
-
|
|
7
5
|
## Versions
|
|
8
6
|
|
|
9
|
-
- API version: `
|
|
10
|
-
- SDK version: `
|
|
7
|
+
- API version: `2.0.0`
|
|
8
|
+
- SDK version: `2.0.0`
|
|
11
9
|
|
|
12
10
|
## About the API
|
|
13
11
|
|
|
@@ -53,15 +51,15 @@ yarn add celitech-sdk
|
|
|
53
51
|
|
|
54
52
|
### OAuth Authentication
|
|
55
53
|
|
|
56
|
-
The Celitech API uses OAuth for authentication.
|
|
54
|
+
The Celitech API uses OAuth 2.0 for authentication.
|
|
57
55
|
|
|
58
|
-
You need to provide
|
|
56
|
+
You need to provide your OAuth credentials when initializing the SDK. Tokens are automatically fetched, cached, and refreshed — you do not need to manage them yourself.
|
|
59
57
|
|
|
60
58
|
```ts
|
|
61
59
|
const sdk = new Celitech({ clientId: 'CLIENT_ID', clientSecret: 'CLIENT_SECRET' });
|
|
62
60
|
```
|
|
63
61
|
|
|
64
|
-
If you need to set or update the OAuth
|
|
62
|
+
If you need to set or update the OAuth credentials after the SDK initialization, you can use:
|
|
65
63
|
|
|
66
64
|
```ts
|
|
67
65
|
const sdk = new Celitech();
|
|
@@ -103,7 +101,7 @@ import { Celitech } from 'celitech-sdk';
|
|
|
103
101
|
clientSecret: 'CLIENT_SECRET',
|
|
104
102
|
});
|
|
105
103
|
|
|
106
|
-
const
|
|
104
|
+
const data = await celitech.destinations.listDestinations();
|
|
107
105
|
|
|
108
106
|
console.log(data);
|
|
109
107
|
})();
|
|
@@ -161,6 +159,7 @@ The SDK includes several models that represent the data structures used in API r
|
|
|
161
159
|
| TokenOkResponse | |
|
|
162
160
|
| BadRequest | |
|
|
163
161
|
| Unauthorized | |
|
|
162
|
+
| GrantType | |
|
|
164
163
|
|
|
165
164
|
</details>
|
|
166
165
|
|
package/dist/index.d.ts
CHANGED
|
@@ -172,6 +172,10 @@ declare class OAuthTokenManager {
|
|
|
172
172
|
declare class ThrowableError extends Error {
|
|
173
173
|
message: string;
|
|
174
174
|
protected response?: unknown;
|
|
175
|
+
/**
|
|
176
|
+
* Optional metadata about the HTTP response that triggered this error.
|
|
177
|
+
*/
|
|
178
|
+
metadata?: HttpMetadata;
|
|
175
179
|
/**
|
|
176
180
|
* Creates a new throwable error.
|
|
177
181
|
* @param message - The error message
|
|
@@ -230,8 +234,6 @@ interface CreateRequestParameters<Page = unknown[]> {
|
|
|
230
234
|
errors: ErrorDefinition[];
|
|
231
235
|
requestSchema: ZodType;
|
|
232
236
|
requestContentType: ContentType;
|
|
233
|
-
validation: ValidationOptions;
|
|
234
|
-
retry: RetryOptions;
|
|
235
237
|
pagination?: RequestPagination<Page> | RequestCursorPagination<Page>;
|
|
236
238
|
filename?: string;
|
|
237
239
|
filenames?: string[];
|
|
@@ -312,8 +314,6 @@ declare class Request<PageSchema = unknown[]> {
|
|
|
312
314
|
errors: ErrorDefinition[];
|
|
313
315
|
requestSchema: ZodType;
|
|
314
316
|
requestContentType: ContentType;
|
|
315
|
-
validation: ValidationOptions;
|
|
316
|
-
retry: RetryOptions;
|
|
317
317
|
pagination?: RequestPagination<PageSchema> | RequestCursorPagination<PageSchema>;
|
|
318
318
|
filename?: string;
|
|
319
319
|
filenames?: string[];
|
|
@@ -490,14 +490,14 @@ declare enum ContentType {
|
|
|
490
490
|
/** No content (HTTP 204) */
|
|
491
491
|
NoContent = "noContent"
|
|
492
492
|
}
|
|
493
|
-
interface RequestConfig {
|
|
494
|
-
retry?: RetryOptions;
|
|
495
|
-
validation?: ValidationOptions;
|
|
496
|
-
baseUrl?: string;
|
|
497
|
-
}
|
|
498
493
|
interface RetryOptions {
|
|
499
494
|
attempts: number;
|
|
500
495
|
delayMs?: number;
|
|
496
|
+
maxDelayMs?: number;
|
|
497
|
+
backoffFactor?: number;
|
|
498
|
+
jitterMs?: number;
|
|
499
|
+
statusCodesToRetry?: number[];
|
|
500
|
+
httpMethodsToRetry?: HttpMethod[];
|
|
501
501
|
}
|
|
502
502
|
interface ValidationOptions {
|
|
503
503
|
responseValidation?: boolean;
|
|
@@ -577,6 +577,13 @@ declare class HttpClient {
|
|
|
577
577
|
* @returns A promise that resolves to the HTTP response
|
|
578
578
|
*/
|
|
579
579
|
call<T>(request: Request): Promise<HttpResponse<T>>;
|
|
580
|
+
/**
|
|
581
|
+
* Executes a standard HTTP request and returns only the data directly.
|
|
582
|
+
* @template T - The expected response data type
|
|
583
|
+
* @param request - The HTTP request to execute
|
|
584
|
+
* @returns A promise that resolves to the response data
|
|
585
|
+
*/
|
|
586
|
+
callDirect<T>(request: Request): Promise<T>;
|
|
580
587
|
/**
|
|
581
588
|
* Executes a streaming HTTP request that yields responses incrementally.
|
|
582
589
|
* @template T - The expected response data type for each chunk
|
|
@@ -642,7 +649,36 @@ declare class BaseService {
|
|
|
642
649
|
protected tokenManager: OAuthTokenManager;
|
|
643
650
|
/** The HTTP client instance used to make API requests */
|
|
644
651
|
client: HttpClient;
|
|
652
|
+
/** Service-level configuration overrides */
|
|
653
|
+
protected serviceConfig?: Partial<SdkConfig>;
|
|
645
654
|
constructor(config: SdkConfig, tokenManager: OAuthTokenManager);
|
|
655
|
+
/**
|
|
656
|
+
* Sets service-level configuration that applies to all methods in this service.
|
|
657
|
+
* @param config - Partial configuration to override SDK-level defaults
|
|
658
|
+
* @returns This service instance for method chaining
|
|
659
|
+
*/
|
|
660
|
+
setConfig(config: Partial<SdkConfig>): this;
|
|
661
|
+
/**
|
|
662
|
+
* Recursively merges two objects. Plain nested objects are merged key-by-key so a
|
|
663
|
+
* partial override (e.g. `{ retry: { attempts: 5 } }`) only overwrites the specified
|
|
664
|
+
* keys instead of replacing the whole nested object. Arrays and non-plain values are
|
|
665
|
+
* replaced wholesale.
|
|
666
|
+
*
|
|
667
|
+
* Override keys with the value `undefined` are skipped so the base value is preserved,
|
|
668
|
+
* matching the common JS merge idiom (e.g. lodash.merge). To explicitly clear a key,
|
|
669
|
+
* assign `null` or omit the key from the override entirely.
|
|
670
|
+
*/
|
|
671
|
+
private static deepMerge;
|
|
672
|
+
private static isPlainObject;
|
|
673
|
+
/**
|
|
674
|
+
* Resolves configuration from the hierarchy: requestConfig > methodConfig > serviceConfig > sdkConfig
|
|
675
|
+
* Deep-merges all config levels so partial nested overrides (e.g. `{ retry: { attempts: 5 } }`)
|
|
676
|
+
* preserve unoverridden sibling keys from the SDK default.
|
|
677
|
+
* @param methodConfig - Method-level configuration override
|
|
678
|
+
* @param requestConfig - Request-level configuration override
|
|
679
|
+
* @returns Merged configuration with all overrides applied
|
|
680
|
+
*/
|
|
681
|
+
protected getResolvedConfig(methodConfig?: Partial<SdkConfig>, requestConfig?: Partial<SdkConfig>): SdkConfig;
|
|
646
682
|
set baseUrl(baseUrl: string);
|
|
647
683
|
set environment(environment: Environment);
|
|
648
684
|
set timeoutMs(timeoutMs: number);
|
|
@@ -702,12 +738,19 @@ type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
|
|
|
702
738
|
* All methods return promises and handle request/response serialization automatically.
|
|
703
739
|
*/
|
|
704
740
|
declare class DestinationsService extends BaseService {
|
|
741
|
+
protected listDestinationsConfig?: Partial<SdkConfig>;
|
|
742
|
+
/**
|
|
743
|
+
* Sets method-level configuration for listDestinations.
|
|
744
|
+
* @param config - Partial configuration to override service-level defaults
|
|
745
|
+
* @returns This service instance for method chaining
|
|
746
|
+
*/
|
|
747
|
+
setListDestinationsConfig(config: Partial<SdkConfig>): this;
|
|
705
748
|
/**
|
|
706
749
|
* List Destinations
|
|
707
|
-
* @param {
|
|
750
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
708
751
|
* @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} - Successful Response
|
|
709
752
|
*/
|
|
710
|
-
listDestinations(requestConfig?:
|
|
753
|
+
listDestinations(requestConfig?: Partial<SdkConfig>): Promise<ListDestinationsOkResponse>;
|
|
711
754
|
}
|
|
712
755
|
|
|
713
756
|
/**
|
|
@@ -825,6 +868,13 @@ interface ListPackagesParams {
|
|
|
825
868
|
* All methods return promises and handle request/response serialization automatically.
|
|
826
869
|
*/
|
|
827
870
|
declare class PackagesService extends BaseService {
|
|
871
|
+
protected listPackagesConfig?: Partial<SdkConfig>;
|
|
872
|
+
/**
|
|
873
|
+
* Sets method-level configuration for listPackages.
|
|
874
|
+
* @param config - Partial configuration to override service-level defaults
|
|
875
|
+
* @returns This service instance for method chaining
|
|
876
|
+
*/
|
|
877
|
+
setListPackagesConfig(config: Partial<SdkConfig>): this;
|
|
828
878
|
/**
|
|
829
879
|
* List Packages
|
|
830
880
|
* @param {string} [params.destination] - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
|
|
@@ -834,10 +884,10 @@ declare class PackagesService extends BaseService {
|
|
|
834
884
|
* @param {number} [params.limit] - Maximum number of packages to be returned in the response. The value must be greater than 0 and less than or equal to 160. If not provided, the default value is 20
|
|
835
885
|
* @param {number} [params.startTime] - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months
|
|
836
886
|
* @param {number} [params.endTime] - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time
|
|
837
|
-
* @param {
|
|
887
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
838
888
|
* @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
|
|
839
889
|
*/
|
|
840
|
-
listPackages(params?: ListPackagesParams, requestConfig?:
|
|
890
|
+
listPackages(params?: ListPackagesParams, requestConfig?: Partial<SdkConfig>): Promise<ListPackagesOkResponse>;
|
|
841
891
|
}
|
|
842
892
|
|
|
843
893
|
/**
|
|
@@ -903,6 +953,7 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
|
|
|
903
953
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
904
954
|
networkBrand: z.ZodOptional<z.ZodString>;
|
|
905
955
|
emailBrand: z.ZodOptional<z.ZodString>;
|
|
956
|
+
language: z.ZodOptional<z.ZodString>;
|
|
906
957
|
}, "strip", z.ZodTypeAny, {
|
|
907
958
|
destination: string;
|
|
908
959
|
dataLimitInGb: number;
|
|
@@ -914,6 +965,7 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
|
|
|
914
965
|
referenceId?: string | undefined;
|
|
915
966
|
networkBrand?: string | undefined;
|
|
916
967
|
emailBrand?: string | undefined;
|
|
968
|
+
language?: string | undefined;
|
|
917
969
|
}, {
|
|
918
970
|
destination: string;
|
|
919
971
|
dataLimitInGb: number;
|
|
@@ -925,6 +977,7 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
|
|
|
925
977
|
referenceId?: string | undefined;
|
|
926
978
|
networkBrand?: string | undefined;
|
|
927
979
|
emailBrand?: string | undefined;
|
|
980
|
+
language?: string | undefined;
|
|
928
981
|
}>>;
|
|
929
982
|
/**
|
|
930
983
|
*
|
|
@@ -939,6 +992,7 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
|
|
|
939
992
|
* @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
|
940
993
|
* @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only.
|
|
941
994
|
* @property {string} - Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.
|
|
995
|
+
* @property {CreatePurchaseV2RequestLanguage} - Language of the confirmation email sent to the customer.
|
|
942
996
|
*/
|
|
943
997
|
type CreatePurchaseV2Request = z.infer<typeof createPurchaseV2Request>;
|
|
944
998
|
|
|
@@ -1205,6 +1259,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1205
1259
|
referenceId: z.ZodOptional<z.ZodString>;
|
|
1206
1260
|
networkBrand: z.ZodOptional<z.ZodString>;
|
|
1207
1261
|
emailBrand: z.ZodOptional<z.ZodString>;
|
|
1262
|
+
language: z.ZodOptional<z.ZodString>;
|
|
1208
1263
|
startTime: z.ZodOptional<z.ZodNumber>;
|
|
1209
1264
|
endTime: z.ZodOptional<z.ZodNumber>;
|
|
1210
1265
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1216,6 +1271,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1216
1271
|
referenceId?: string | undefined;
|
|
1217
1272
|
networkBrand?: string | undefined;
|
|
1218
1273
|
emailBrand?: string | undefined;
|
|
1274
|
+
language?: string | undefined;
|
|
1219
1275
|
startTime?: number | undefined;
|
|
1220
1276
|
endTime?: number | undefined;
|
|
1221
1277
|
}, {
|
|
@@ -1227,6 +1283,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1227
1283
|
referenceId?: string | undefined;
|
|
1228
1284
|
networkBrand?: string | undefined;
|
|
1229
1285
|
emailBrand?: string | undefined;
|
|
1286
|
+
language?: string | undefined;
|
|
1230
1287
|
startTime?: number | undefined;
|
|
1231
1288
|
endTime?: number | undefined;
|
|
1232
1289
|
}>>;
|
|
@@ -1241,6 +1298,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1241
1298
|
* @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
|
1242
1299
|
* @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters, numbers, dots (.), ampersands (&), and spaces. This feature is available to platforms with Diamond tier only.
|
|
1243
1300
|
* @property {string} - Customize the email subject brand. The `emailBrand` parameter cannot exceed 25 characters in length and must contain only letters, numbers, and spaces. This feature is available to platforms with Diamond tier only.
|
|
1301
|
+
* @property {CreatePurchaseRequestLanguage} - Language of the confirmation email sent to the customer.
|
|
1244
1302
|
* @property {number} - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
|
1245
1303
|
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1246
1304
|
*/
|
|
@@ -1560,12 +1618,54 @@ type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkR
|
|
|
1560
1618
|
* All methods return promises and handle request/response serialization automatically.
|
|
1561
1619
|
*/
|
|
1562
1620
|
declare class PurchasesService extends BaseService {
|
|
1621
|
+
protected createPurchaseV2Config?: Partial<SdkConfig>;
|
|
1622
|
+
protected listPurchasesConfig?: Partial<SdkConfig>;
|
|
1623
|
+
protected createPurchaseConfig?: Partial<SdkConfig>;
|
|
1624
|
+
protected topUpEsimConfig?: Partial<SdkConfig>;
|
|
1625
|
+
protected editPurchaseConfig?: Partial<SdkConfig>;
|
|
1626
|
+
protected getPurchaseConsumptionConfig?: Partial<SdkConfig>;
|
|
1627
|
+
/**
|
|
1628
|
+
* Sets method-level configuration for createPurchaseV2.
|
|
1629
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1630
|
+
* @returns This service instance for method chaining
|
|
1631
|
+
*/
|
|
1632
|
+
setCreatePurchaseV2Config(config: Partial<SdkConfig>): this;
|
|
1633
|
+
/**
|
|
1634
|
+
* Sets method-level configuration for listPurchases.
|
|
1635
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1636
|
+
* @returns This service instance for method chaining
|
|
1637
|
+
*/
|
|
1638
|
+
setListPurchasesConfig(config: Partial<SdkConfig>): this;
|
|
1639
|
+
/**
|
|
1640
|
+
* Sets method-level configuration for createPurchase.
|
|
1641
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1642
|
+
* @returns This service instance for method chaining
|
|
1643
|
+
*/
|
|
1644
|
+
setCreatePurchaseConfig(config: Partial<SdkConfig>): this;
|
|
1645
|
+
/**
|
|
1646
|
+
* Sets method-level configuration for topUpEsim.
|
|
1647
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1648
|
+
* @returns This service instance for method chaining
|
|
1649
|
+
*/
|
|
1650
|
+
setTopUpEsimConfig(config: Partial<SdkConfig>): this;
|
|
1651
|
+
/**
|
|
1652
|
+
* Sets method-level configuration for editPurchase.
|
|
1653
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1654
|
+
* @returns This service instance for method chaining
|
|
1655
|
+
*/
|
|
1656
|
+
setEditPurchaseConfig(config: Partial<SdkConfig>): this;
|
|
1657
|
+
/**
|
|
1658
|
+
* Sets method-level configuration for getPurchaseConsumption.
|
|
1659
|
+
* @param config - Partial configuration to override service-level defaults
|
|
1660
|
+
* @returns This service instance for method chaining
|
|
1661
|
+
*/
|
|
1662
|
+
setGetPurchaseConsumptionConfig(config: Partial<SdkConfig>): this;
|
|
1563
1663
|
/**
|
|
1564
1664
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
1565
|
-
* @param {
|
|
1665
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1566
1666
|
* @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} - Successful Response
|
|
1567
1667
|
*/
|
|
1568
|
-
createPurchaseV2(body: CreatePurchaseV2Request, requestConfig?:
|
|
1668
|
+
createPurchaseV2(body: CreatePurchaseV2Request, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseV2OkResponse[]>;
|
|
1569
1669
|
/**
|
|
1570
1670
|
* This endpoint can be used to list all the successful purchases made between a given interval.
|
|
1571
1671
|
* @param {string} [params.purchaseId] - ID of the purchase
|
|
@@ -1578,22 +1678,22 @@ declare class PurchasesService extends BaseService {
|
|
|
1578
1678
|
* @param {number} [params.limit] - Maximum number of purchases to be returned in the response. The value must be greater than 0 and less than or equal to 100. If not provided, the default value is 20
|
|
1579
1679
|
* @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
|
|
1580
1680
|
* @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
|
|
1581
|
-
* @param {
|
|
1681
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1582
1682
|
* @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} - Successful Response
|
|
1583
1683
|
*/
|
|
1584
|
-
listPurchases(params?: ListPurchasesParams, requestConfig?:
|
|
1684
|
+
listPurchases(params?: ListPurchasesParams, requestConfig?: Partial<SdkConfig>): Promise<ListPurchasesOkResponse>;
|
|
1585
1685
|
/**
|
|
1586
1686
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
1587
|
-
* @param {
|
|
1687
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1588
1688
|
* @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} - Successful Response
|
|
1589
1689
|
*/
|
|
1590
|
-
createPurchase(body: CreatePurchaseRequest, requestConfig?:
|
|
1690
|
+
createPurchase(body: CreatePurchaseRequest, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseOkResponse>;
|
|
1591
1691
|
/**
|
|
1592
1692
|
* This endpoint is used to top-up an existing eSIM with the previously associated destination by providing its ICCID and package details. To determine if an eSIM can be topped up, use the Get eSIM endpoint, which returns the `isTopUpAllowed` flag.
|
|
1593
|
-
* @param {
|
|
1693
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1594
1694
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} - Successful Response
|
|
1595
1695
|
*/
|
|
1596
|
-
topUpEsim(body: TopUpEsimRequest, requestConfig?:
|
|
1696
|
+
topUpEsim(body: TopUpEsimRequest, requestConfig?: Partial<SdkConfig>): Promise<TopUpEsimOkResponse>;
|
|
1597
1697
|
/**
|
|
1598
1698
|
* This endpoint allows you to modify the validity dates of an existing purchase.
|
|
1599
1699
|
**Behavior:**
|
|
@@ -1603,17 +1703,17 @@ declare class PurchasesService extends BaseService {
|
|
|
1603
1703
|
|
|
1604
1704
|
The end date can be extended or shortened as long as it adheres to the same pricing category and does not exceed the allowed duration limits.
|
|
1605
1705
|
|
|
1606
|
-
* @param {
|
|
1706
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1607
1707
|
* @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} - Successful Response
|
|
1608
1708
|
*/
|
|
1609
|
-
editPurchase(body: EditPurchaseRequest, requestConfig?:
|
|
1709
|
+
editPurchase(body: EditPurchaseRequest, requestConfig?: Partial<SdkConfig>): Promise<EditPurchaseOkResponse>;
|
|
1610
1710
|
/**
|
|
1611
1711
|
* This endpoint can be called for consumption notifications (e.g. every 1 hour or when the user clicks a button). It returns the data balance (consumption) of purchased packages.
|
|
1612
1712
|
* @param {string} purchaseId - ID of the purchase
|
|
1613
|
-
* @param {
|
|
1713
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
1614
1714
|
* @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} - Successful Response
|
|
1615
1715
|
*/
|
|
1616
|
-
getPurchaseConsumption(purchaseId: string, requestConfig?:
|
|
1716
|
+
getPurchaseConsumption(purchaseId: string, requestConfig?: Partial<SdkConfig>): Promise<GetPurchaseConsumptionOkResponse>;
|
|
1617
1717
|
}
|
|
1618
1718
|
|
|
1619
1719
|
/**
|
|
@@ -1678,6 +1778,14 @@ declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
|
|
|
1678
1778
|
*/
|
|
1679
1779
|
type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkResponseProfile>;
|
|
1680
1780
|
|
|
1781
|
+
declare enum CreatePurchaseV2RequestLanguage {
|
|
1782
|
+
EN = "en",
|
|
1783
|
+
ES = "es",
|
|
1784
|
+
FR = "fr",
|
|
1785
|
+
DE = "de",
|
|
1786
|
+
PT_BR = "pt-br"
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1681
1789
|
/**
|
|
1682
1790
|
* Zod schema for the Purchases model.
|
|
1683
1791
|
* Defines the structure and validation rules for this data type.
|
|
@@ -1927,6 +2035,14 @@ declare const createPurchaseOkResponseProfile: z.ZodLazy<z.ZodObject<{
|
|
|
1927
2035
|
*/
|
|
1928
2036
|
type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponseProfile>;
|
|
1929
2037
|
|
|
2038
|
+
declare enum CreatePurchaseRequestLanguage {
|
|
2039
|
+
EN = "en",
|
|
2040
|
+
ES = "es",
|
|
2041
|
+
FR = "fr",
|
|
2042
|
+
DE = "de",
|
|
2043
|
+
PT_BR = "pt-br"
|
|
2044
|
+
}
|
|
2045
|
+
|
|
1930
2046
|
/**
|
|
1931
2047
|
* Zod schema for the TopUpEsimOkResponsePurchase model.
|
|
1932
2048
|
* Defines the structure and validation rules for this data type.
|
|
@@ -2164,27 +2280,48 @@ type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
|
|
|
2164
2280
|
* All methods return promises and handle request/response serialization automatically.
|
|
2165
2281
|
*/
|
|
2166
2282
|
declare class ESimService extends BaseService {
|
|
2283
|
+
protected getEsimConfig?: Partial<SdkConfig>;
|
|
2284
|
+
protected getEsimDeviceConfig?: Partial<SdkConfig>;
|
|
2285
|
+
protected getEsimHistoryConfig?: Partial<SdkConfig>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Sets method-level configuration for getEsim.
|
|
2288
|
+
* @param config - Partial configuration to override service-level defaults
|
|
2289
|
+
* @returns This service instance for method chaining
|
|
2290
|
+
*/
|
|
2291
|
+
setGetEsimConfig(config: Partial<SdkConfig>): this;
|
|
2292
|
+
/**
|
|
2293
|
+
* Sets method-level configuration for getEsimDevice.
|
|
2294
|
+
* @param config - Partial configuration to override service-level defaults
|
|
2295
|
+
* @returns This service instance for method chaining
|
|
2296
|
+
*/
|
|
2297
|
+
setGetEsimDeviceConfig(config: Partial<SdkConfig>): this;
|
|
2298
|
+
/**
|
|
2299
|
+
* Sets method-level configuration for getEsimHistory.
|
|
2300
|
+
* @param config - Partial configuration to override service-level defaults
|
|
2301
|
+
* @returns This service instance for method chaining
|
|
2302
|
+
*/
|
|
2303
|
+
setGetEsimHistoryConfig(config: Partial<SdkConfig>): this;
|
|
2167
2304
|
/**
|
|
2168
2305
|
* Get eSIM
|
|
2169
2306
|
* @param {string} params.iccid - ID of the eSIM
|
|
2170
|
-
* @param {
|
|
2307
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
2171
2308
|
* @returns {Promise<HttpResponse<GetEsimOkResponse>>} - Successful Response
|
|
2172
2309
|
*/
|
|
2173
|
-
getEsim(params: GetEsimParams, requestConfig?:
|
|
2310
|
+
getEsim(params: GetEsimParams, requestConfig?: Partial<SdkConfig>): Promise<GetEsimOkResponse>;
|
|
2174
2311
|
/**
|
|
2175
2312
|
* Get eSIM Device
|
|
2176
2313
|
* @param {string} iccid - ID of the eSIM
|
|
2177
|
-
* @param {
|
|
2314
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
2178
2315
|
* @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} - Successful Response
|
|
2179
2316
|
*/
|
|
2180
|
-
getEsimDevice(iccid: string, requestConfig?:
|
|
2317
|
+
getEsimDevice(iccid: string, requestConfig?: Partial<SdkConfig>): Promise<GetEsimDeviceOkResponse>;
|
|
2181
2318
|
/**
|
|
2182
2319
|
* Get eSIM History
|
|
2183
2320
|
* @param {string} iccid - ID of the eSIM
|
|
2184
|
-
* @param {
|
|
2321
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
2185
2322
|
* @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} - Successful Response
|
|
2186
2323
|
*/
|
|
2187
|
-
getEsimHistory(iccid: string, requestConfig?:
|
|
2324
|
+
getEsimHistory(iccid: string, requestConfig?: Partial<SdkConfig>): Promise<GetEsimHistoryOkResponse>;
|
|
2188
2325
|
}
|
|
2189
2326
|
|
|
2190
2327
|
/**
|
|
@@ -2356,67 +2493,74 @@ type TokenOkResponse = z.infer<typeof tokenOkResponse>;
|
|
|
2356
2493
|
* All methods return promises and handle request/response serialization automatically.
|
|
2357
2494
|
*/
|
|
2358
2495
|
declare class IFrameService extends BaseService {
|
|
2496
|
+
protected tokenConfig?: Partial<SdkConfig>;
|
|
2497
|
+
/**
|
|
2498
|
+
* Sets method-level configuration for token.
|
|
2499
|
+
* @param config - Partial configuration to override service-level defaults
|
|
2500
|
+
* @returns This service instance for method chaining
|
|
2501
|
+
*/
|
|
2502
|
+
setTokenConfig(config: Partial<SdkConfig>): this;
|
|
2359
2503
|
/**
|
|
2360
2504
|
* Generate a new token to be used in the iFrame
|
|
2361
|
-
* @param {
|
|
2505
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
2362
2506
|
* @returns {Promise<HttpResponse<TokenOkResponse>>} - Successful Response
|
|
2363
2507
|
*/
|
|
2364
|
-
token(requestConfig?:
|
|
2508
|
+
token(requestConfig?: Partial<SdkConfig>): Promise<TokenOkResponse>;
|
|
2365
2509
|
}
|
|
2366
2510
|
|
|
2367
2511
|
/**
|
|
2368
|
-
* Zod schema for the
|
|
2512
|
+
* Zod schema for the OAuthTokenRequest model.
|
|
2369
2513
|
* Defines the structure and validation rules for this data type.
|
|
2370
2514
|
* This is the shape used in application code - what developers interact with.
|
|
2371
2515
|
*/
|
|
2372
|
-
declare const
|
|
2373
|
-
grantType: z.
|
|
2374
|
-
clientId: z.
|
|
2375
|
-
clientSecret: z.
|
|
2516
|
+
declare const oAuthTokenRequest: z.ZodLazy<z.ZodObject<{
|
|
2517
|
+
grantType: z.ZodString;
|
|
2518
|
+
clientId: z.ZodString;
|
|
2519
|
+
clientSecret: z.ZodString;
|
|
2520
|
+
scope: z.ZodString;
|
|
2376
2521
|
}, "strip", z.ZodTypeAny, {
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2522
|
+
clientId: string;
|
|
2523
|
+
clientSecret: string;
|
|
2524
|
+
grantType: string;
|
|
2525
|
+
scope: string;
|
|
2380
2526
|
}, {
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2527
|
+
clientId: string;
|
|
2528
|
+
clientSecret: string;
|
|
2529
|
+
grantType: string;
|
|
2530
|
+
scope: string;
|
|
2384
2531
|
}>>;
|
|
2385
2532
|
/**
|
|
2386
2533
|
*
|
|
2387
|
-
* @typedef {
|
|
2534
|
+
* @typedef {OAuthTokenRequest} oAuthTokenRequest
|
|
2388
2535
|
* @property {GrantType}
|
|
2389
2536
|
* @property {string}
|
|
2390
2537
|
* @property {string}
|
|
2538
|
+
* @property {string}
|
|
2391
2539
|
*/
|
|
2392
|
-
type
|
|
2540
|
+
type OAuthTokenRequest = z.infer<typeof oAuthTokenRequest>;
|
|
2393
2541
|
|
|
2394
2542
|
/**
|
|
2395
|
-
* Zod schema for the
|
|
2543
|
+
* Zod schema for the OAuthTokenResponse model.
|
|
2396
2544
|
* Defines the structure and validation rules for this data type.
|
|
2397
2545
|
* This is the shape used in application code - what developers interact with.
|
|
2398
2546
|
*/
|
|
2399
|
-
declare const
|
|
2547
|
+
declare const oAuthTokenResponse: z.ZodLazy<z.ZodObject<{
|
|
2400
2548
|
accessToken: z.ZodOptional<z.ZodString>;
|
|
2401
|
-
|
|
2402
|
-
expiresIn: z.ZodOptional<z.ZodNumber>;
|
|
2549
|
+
expiresIn: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
|
|
2403
2550
|
}, "strip", z.ZodTypeAny, {
|
|
2404
2551
|
accessToken?: string | undefined;
|
|
2405
|
-
|
|
2406
|
-
expiresIn?: number | undefined;
|
|
2552
|
+
expiresIn?: number | null | undefined;
|
|
2407
2553
|
}, {
|
|
2408
2554
|
accessToken?: string | undefined;
|
|
2409
|
-
|
|
2410
|
-
expiresIn?: number | undefined;
|
|
2555
|
+
expiresIn?: number | null | undefined;
|
|
2411
2556
|
}>>;
|
|
2412
2557
|
/**
|
|
2413
2558
|
*
|
|
2414
|
-
* @typedef {
|
|
2415
|
-
* @property {string}
|
|
2559
|
+
* @typedef {OAuthTokenResponse} oAuthTokenResponse
|
|
2416
2560
|
* @property {string}
|
|
2417
2561
|
* @property {number}
|
|
2418
2562
|
*/
|
|
2419
|
-
type
|
|
2563
|
+
type OAuthTokenResponse = z.infer<typeof oAuthTokenResponse>;
|
|
2420
2564
|
|
|
2421
2565
|
/**
|
|
2422
2566
|
* Service class for OAuthService operations.
|
|
@@ -2424,12 +2568,19 @@ type GetAccessTokenOkResponse = z.infer<typeof getAccessTokenOkResponse>;
|
|
|
2424
2568
|
* All methods return promises and handle request/response serialization automatically.
|
|
2425
2569
|
*/
|
|
2426
2570
|
declare class OAuthService extends BaseService {
|
|
2571
|
+
protected getAccessTokenConfig?: Partial<SdkConfig>;
|
|
2427
2572
|
/**
|
|
2428
|
-
*
|
|
2429
|
-
* @param
|
|
2430
|
-
* @returns
|
|
2573
|
+
* Sets method-level configuration for getAccessToken.
|
|
2574
|
+
* @param config - Partial configuration to override service-level defaults
|
|
2575
|
+
* @returns This service instance for method chaining
|
|
2576
|
+
*/
|
|
2577
|
+
setGetAccessTokenConfig(config: Partial<SdkConfig>): this;
|
|
2578
|
+
/**
|
|
2579
|
+
*
|
|
2580
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
2581
|
+
* @returns {Promise<HttpResponse<OAuthTokenResponse>>} - OAuth token
|
|
2431
2582
|
*/
|
|
2432
|
-
getAccessToken(body:
|
|
2583
|
+
getAccessToken(body: OAuthTokenRequest, requestConfig?: Partial<SdkConfig>): Promise<OAuthTokenResponse>;
|
|
2433
2584
|
}
|
|
2434
2585
|
|
|
2435
2586
|
declare enum GrantType {
|
|
@@ -2468,4 +2619,4 @@ declare class Celitech {
|
|
|
2468
2619
|
set accessToken(accessToken: string);
|
|
2469
2620
|
}
|
|
2470
2621
|
|
|
2471
|
-
export { BadRequest, Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, CreatePurchaseV2OkResponse, CreatePurchaseV2OkResponseProfile, CreatePurchaseV2OkResponsePurchase, CreatePurchaseV2Request, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment,
|
|
2622
|
+
export { BadRequest, Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, CreatePurchaseRequestLanguage, CreatePurchaseV2OkResponse, CreatePurchaseV2OkResponseProfile, CreatePurchaseV2OkResponsePurchase, CreatePurchaseV2Request, CreatePurchaseV2RequestLanguage, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment, GetEsimDeviceOkResponse, GetEsimHistoryOkResponse, GetEsimHistoryOkResponseEsim, GetEsimOkResponse, GetEsimOkResponseEsim, GetPurchaseConsumptionOkResponse, GrantType, History, HttpError, HttpMetadata, HttpMethod, HttpResponse, IFrameService, ListDestinationsOkResponse, ListPackagesOkResponse, ListPurchasesOkResponse, OAuthService, OAuthTokenRequest, OAuthTokenResponse, Package_, Packages, PackagesService, Purchases, PurchasesEsim, PurchasesService, RetryOptions, SdkConfig, TokenOkResponse, TopUpEsimOkResponse, TopUpEsimOkResponseProfile, TopUpEsimOkResponsePurchase, TopUpEsimRequest, Unauthorized, ValidationOptions };
|