celitech-sdk 2.0.4 → 2.0.7
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 +3 -3
- package/dist/index.d.ts +204 -211
- package/dist/index.js +128 -31
- package/dist/index.mjs +128 -31
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -182,6 +182,20 @@ declare class ThrowableError extends Error {
|
|
|
182
182
|
* @param response - Optional response data associated with the error
|
|
183
183
|
*/
|
|
184
184
|
constructor(message: string, response?: unknown);
|
|
185
|
+
/**
|
|
186
|
+
* Creates an error instance from a response body.
|
|
187
|
+
* Parsing (which can throw) is kept out of the constructor so that constructing
|
|
188
|
+
* an error while handling an error response never throws. The base implementation
|
|
189
|
+
* simply constructs the instance; subclasses may override to populate typed fields.
|
|
190
|
+
*
|
|
191
|
+
* Contract: every subclass constructor must accept `(message, response?)`. The base
|
|
192
|
+
* uses `new this(message, response)`, so a subclass with a different constructor
|
|
193
|
+
* signature must override `from()`.
|
|
194
|
+
* @param message - The error message
|
|
195
|
+
* @param response - Optional response data associated with the error
|
|
196
|
+
* @returns A new error instance
|
|
197
|
+
*/
|
|
198
|
+
static from(message: string, response?: unknown): ThrowableError;
|
|
185
199
|
/**
|
|
186
200
|
* Throws this error instance.
|
|
187
201
|
* Convenience method for explicitly throwing the error.
|
|
@@ -207,8 +221,10 @@ interface ResponseDefinition {
|
|
|
207
221
|
* Used to throw typed errors based on content type and status code.
|
|
208
222
|
*/
|
|
209
223
|
interface ErrorDefinition {
|
|
210
|
-
/**
|
|
211
|
-
error: new (...args: any[]) => ThrowableError
|
|
224
|
+
/** The error class to instantiate, exposing a static `from` factory */
|
|
225
|
+
error: (new (...args: any[]) => ThrowableError) & {
|
|
226
|
+
from(message: string, response?: unknown): ThrowableError;
|
|
227
|
+
};
|
|
212
228
|
/** The content type of this error response */
|
|
213
229
|
contentType: ContentType;
|
|
214
230
|
/** The HTTP status code this error applies to */
|
|
@@ -469,8 +485,11 @@ interface CursorPaginatedHttpResponse<T = unknown> extends HttpResponse<T> {
|
|
|
469
485
|
declare enum ContentType {
|
|
470
486
|
/** JSON format (application/json) */
|
|
471
487
|
Json = "json",
|
|
472
|
-
/**
|
|
473
|
-
|
|
488
|
+
/**
|
|
489
|
+
* @deprecated XML is handled as text. Use {@link ContentType.Text} instead.
|
|
490
|
+
* Kept as an alias for backward compatibility; will be removed in a future major version.
|
|
491
|
+
*/
|
|
492
|
+
Xml = "text",
|
|
474
493
|
/** PDF document (application/pdf) */
|
|
475
494
|
Pdf = "pdf",
|
|
476
495
|
/** Image file (image/*) */
|
|
@@ -496,6 +515,7 @@ interface RetryOptions {
|
|
|
496
515
|
maxDelayMs?: number;
|
|
497
516
|
backoffFactor?: number;
|
|
498
517
|
jitterMs?: number;
|
|
518
|
+
maxRetryAfterDelayMs?: number;
|
|
499
519
|
statusCodesToRetry?: number[];
|
|
500
520
|
httpMethodsToRetry?: HttpMethod[];
|
|
501
521
|
}
|
|
@@ -726,9 +746,8 @@ declare const listDestinationsOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
726
746
|
}[];
|
|
727
747
|
}>>;
|
|
728
748
|
/**
|
|
729
|
-
*
|
|
730
|
-
* @
|
|
731
|
-
* @property {Destinations[]}
|
|
749
|
+
* @typedef {ListDestinationsOkResponse} listDestinationsOkResponse
|
|
750
|
+
* @property {Destinations[]} destinations
|
|
732
751
|
*/
|
|
733
752
|
type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
|
|
734
753
|
|
|
@@ -775,12 +794,11 @@ declare const destinations: z.ZodLazy<z.ZodObject<{
|
|
|
775
794
|
supportedCountries: string[];
|
|
776
795
|
}>>;
|
|
777
796
|
/**
|
|
778
|
-
*
|
|
779
|
-
* @
|
|
780
|
-
* @property {string} -
|
|
781
|
-
* @property {string} -
|
|
782
|
-
* @property {string} -
|
|
783
|
-
* @property {string[]} - This array indicates the geographical area covered by a specific destination. If the destination represents a single country, the array will include that country. However, if the destination represents a broader regional scope, the array will be populated with the names of the countries belonging to that region.
|
|
797
|
+
* @typedef {Destinations} destinations
|
|
798
|
+
* @property {string} name - Name of the destination
|
|
799
|
+
* @property {string} destination - ISO3 representation of the destination
|
|
800
|
+
* @property {string} destinationIso2 - ISO2 representation of the destination
|
|
801
|
+
* @property {string[]} supportedCountries - This array indicates the geographical area covered by a specific destination. If the destination represents a single country, the array will include that country. However, if the destination represents a broader regional scope, the array will be populated with the names of the countries belonging to that region.
|
|
784
802
|
*/
|
|
785
803
|
type Destinations = z.infer<typeof destinations>;
|
|
786
804
|
|
|
@@ -845,21 +863,22 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
845
863
|
afterCursor: string | null;
|
|
846
864
|
}>>;
|
|
847
865
|
/**
|
|
848
|
-
*
|
|
849
|
-
* @
|
|
850
|
-
* @property {
|
|
851
|
-
* @property {string} - The cursor value representing the end of the current page of results. Use this cursor value as the "afterCursor" parameter in your next request to retrieve the subsequent page of results. It ensures that you continue fetching data from where you left off, facilitating smooth pagination
|
|
866
|
+
* @typedef {ListPackagesOkResponse} listPackagesOkResponse
|
|
867
|
+
* @property {Packages[]} packages
|
|
868
|
+
* @property {string} afterCursor - The cursor value representing the end of the current page of results. Use this cursor value as the "afterCursor" parameter in your next request to retrieve the subsequent page of results. It ensures that you continue fetching data from where you left off, facilitating smooth pagination
|
|
852
869
|
*/
|
|
853
870
|
type ListPackagesOkResponse = z.infer<typeof listPackagesOkResponse>;
|
|
854
871
|
|
|
855
872
|
interface ListPackagesParams {
|
|
856
873
|
destination?: string;
|
|
874
|
+
dataLimitInGb?: number;
|
|
857
875
|
startDate?: string;
|
|
858
876
|
endDate?: string;
|
|
859
877
|
afterCursor?: string;
|
|
860
878
|
limit?: number;
|
|
861
879
|
startTime?: number;
|
|
862
880
|
endTime?: number;
|
|
881
|
+
includeUnlimited?: boolean;
|
|
863
882
|
}
|
|
864
883
|
|
|
865
884
|
/**
|
|
@@ -878,12 +897,14 @@ declare class PackagesService extends BaseService {
|
|
|
878
897
|
/**
|
|
879
898
|
* List Packages
|
|
880
899
|
* @param {string} [params.destination] - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
|
|
900
|
+
* @param {number} [params.dataLimitInGb] - Filter packages by data limit in GB. When provided, only packages with this exact data limit are returned. Use `-1` together with `includeUnlimited=true` to return only unlimited packages. A value of `0` is ignored.
|
|
881
901
|
* @param {string} [params.startDate] - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
|
882
902
|
* @param {string} [params.endDate] - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
|
883
903
|
* @param {string} [params.afterCursor] - To get the next batch of results, use this parameter. It tells the API where to start fetching data after the last item you received. It helps you avoid repeats and efficiently browse through large sets of data.
|
|
884
904
|
* @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
|
|
885
905
|
* @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
|
|
886
906
|
* @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
|
|
907
|
+
* @param {boolean} [params.includeUnlimited] - Whether to include unlimited (date-based) packages in the results. Unlimited packages are excluded by default; set this to `true` to include them. An unlimited package has `dataLimitInGB` and `dataLimitInBytes` equal to `-1`, and is offered for 3 to 30 days with `minDays` equal to `maxDays`.
|
|
887
908
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
888
909
|
* @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
|
|
889
910
|
*/
|
|
@@ -924,16 +945,15 @@ declare const packages: z.ZodLazy<z.ZodObject<{
|
|
|
924
945
|
priceInCents: number;
|
|
925
946
|
}>>;
|
|
926
947
|
/**
|
|
927
|
-
*
|
|
928
|
-
* @
|
|
929
|
-
* @property {string} -
|
|
930
|
-
* @property {string} -
|
|
931
|
-
* @property {
|
|
932
|
-
* @property {number} - Size of the package in
|
|
933
|
-
* @property {number} -
|
|
934
|
-
* @property {number} -
|
|
935
|
-
* @property {number} -
|
|
936
|
-
* @property {number} - Price of the package in cents
|
|
948
|
+
* @typedef {Packages} packages
|
|
949
|
+
* @property {string} id - ID of the package
|
|
950
|
+
* @property {string} destination - ISO3 representation of the package's destination.
|
|
951
|
+
* @property {string} destinationIso2 - ISO2 representation of the package's destination.
|
|
952
|
+
* @property {number} dataLimitInBytes - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
|
|
953
|
+
* @property {number} dataLimitInGb - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
|
|
954
|
+
* @property {number} minDays - Min number of days for the package
|
|
955
|
+
* @property {number} maxDays - Max number of days for the package
|
|
956
|
+
* @property {number} priceInCents - Price of the package in cents
|
|
937
957
|
*/
|
|
938
958
|
type Packages = z.infer<typeof packages>;
|
|
939
959
|
|
|
@@ -980,19 +1000,18 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
|
|
|
980
1000
|
language?: string | undefined;
|
|
981
1001
|
}>>;
|
|
982
1002
|
/**
|
|
983
|
-
*
|
|
984
|
-
* @
|
|
985
|
-
* @property {
|
|
986
|
-
* @property {
|
|
987
|
-
* @property {string} -
|
|
988
|
-
* @property {
|
|
989
|
-
* @property {number} -
|
|
990
|
-
* @property {
|
|
991
|
-
* @property {string} -
|
|
992
|
-
* @property {string} -
|
|
993
|
-
* @property {string} - Customize the
|
|
994
|
-
* @property {
|
|
995
|
-
* @property {CreatePurchaseV2RequestLanguage} - Language of the confirmation email sent to the customer.
|
|
1003
|
+
* @typedef {CreatePurchaseV2Request} createPurchaseV2Request
|
|
1004
|
+
* @property {string} destination - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
|
|
1005
|
+
* @property {number} dataLimitInGb - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).
|
|
1006
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
|
1007
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
|
1008
|
+
* @property {number} duration - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead.
|
|
1009
|
+
* @property {number} quantity - Number of eSIMs to purchase.
|
|
1010
|
+
* @property {string} email - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
|
|
1011
|
+
* @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
|
1012
|
+
* @property {string} networkBrand - 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.
|
|
1013
|
+
* @property {string} emailBrand - 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.
|
|
1014
|
+
* @property {CreatePurchaseV2RequestLanguage} language - Language of the confirmation email sent to the customer.
|
|
996
1015
|
*/
|
|
997
1016
|
type CreatePurchaseV2Request = z.infer<typeof createPurchaseV2Request>;
|
|
998
1017
|
|
|
@@ -1062,10 +1081,9 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1062
1081
|
};
|
|
1063
1082
|
}>>;
|
|
1064
1083
|
/**
|
|
1065
|
-
*
|
|
1066
|
-
* @
|
|
1067
|
-
* @property {
|
|
1068
|
-
* @property {CreatePurchaseV2OkResponseProfile}
|
|
1084
|
+
* @typedef {CreatePurchaseV2OkResponse} createPurchaseV2OkResponse
|
|
1085
|
+
* @property {CreatePurchaseV2OkResponsePurchase} purchase
|
|
1086
|
+
* @property {CreatePurchaseV2OkResponseProfile} profile
|
|
1069
1087
|
*/
|
|
1070
1088
|
type CreatePurchaseV2OkResponse = z.infer<typeof createPurchaseV2OkResponse>;
|
|
1071
1089
|
|
|
@@ -1225,10 +1243,9 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1225
1243
|
}[];
|
|
1226
1244
|
}>>;
|
|
1227
1245
|
/**
|
|
1228
|
-
*
|
|
1229
|
-
* @
|
|
1230
|
-
* @property {
|
|
1231
|
-
* @property {string} - The cursor value representing the end of the current page of results. Use this cursor value as the "afterCursor" parameter in your next request to retrieve the subsequent page of results. It ensures that you continue fetching data from where you left off, facilitating smooth pagination.
|
|
1246
|
+
* @typedef {ListPurchasesOkResponse} listPurchasesOkResponse
|
|
1247
|
+
* @property {Purchases[]} purchases
|
|
1248
|
+
* @property {string} afterCursor - The cursor value representing the end of the current page of results. Use this cursor value as the "afterCursor" parameter in your next request to retrieve the subsequent page of results. It ensures that you continue fetching data from where you left off, facilitating smooth pagination.
|
|
1232
1249
|
*/
|
|
1233
1250
|
type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
|
|
1234
1251
|
|
|
@@ -1288,19 +1305,18 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1288
1305
|
endTime?: number | undefined;
|
|
1289
1306
|
}>>;
|
|
1290
1307
|
/**
|
|
1291
|
-
*
|
|
1292
|
-
* @
|
|
1293
|
-
* @property {
|
|
1294
|
-
* @property {
|
|
1295
|
-
* @property {string} -
|
|
1296
|
-
* @property {string} -
|
|
1297
|
-
* @property {string} -
|
|
1298
|
-
* @property {string} -
|
|
1299
|
-
* @property {string} - Customize the
|
|
1300
|
-
* @property {
|
|
1301
|
-
* @property {
|
|
1302
|
-
* @property {number} - Epoch value representing the
|
|
1303
|
-
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1308
|
+
* @typedef {CreatePurchaseRequest} createPurchaseRequest
|
|
1309
|
+
* @property {string} destination - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
|
|
1310
|
+
* @property {number} dataLimitInGb - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to purchase an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days.
|
|
1311
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
|
1312
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
|
1313
|
+
* @property {string} email - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
|
|
1314
|
+
* @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
|
1315
|
+
* @property {string} networkBrand - 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.
|
|
1316
|
+
* @property {string} emailBrand - 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.
|
|
1317
|
+
* @property {CreatePurchaseRequestLanguage} language - Language of the confirmation email sent to the customer.
|
|
1318
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
|
1319
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1304
1320
|
*/
|
|
1305
1321
|
type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
|
|
1306
1322
|
|
|
@@ -1380,10 +1396,9 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1380
1396
|
};
|
|
1381
1397
|
}>>;
|
|
1382
1398
|
/**
|
|
1383
|
-
*
|
|
1384
|
-
* @
|
|
1385
|
-
* @property {
|
|
1386
|
-
* @property {CreatePurchaseOkResponseProfile}
|
|
1399
|
+
* @typedef {CreatePurchaseOkResponse} createPurchaseOkResponse
|
|
1400
|
+
* @property {CreatePurchaseOkResponsePurchase} purchase
|
|
1401
|
+
* @property {CreatePurchaseOkResponseProfile} profile
|
|
1387
1402
|
*/
|
|
1388
1403
|
type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
|
|
1389
1404
|
|
|
@@ -1427,18 +1442,17 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1427
1442
|
endTime?: number | undefined;
|
|
1428
1443
|
}>>;
|
|
1429
1444
|
/**
|
|
1430
|
-
*
|
|
1431
|
-
* @
|
|
1432
|
-
* @property {
|
|
1433
|
-
* @property {
|
|
1434
|
-
* @property {string} -
|
|
1435
|
-
* @property {
|
|
1436
|
-
* @property {
|
|
1437
|
-
* @property {string} -
|
|
1438
|
-
* @property {string} -
|
|
1439
|
-
* @property {
|
|
1440
|
-
* @property {number} - Epoch value representing the
|
|
1441
|
-
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1445
|
+
* @typedef {TopUpEsimRequest} topUpEsimRequest
|
|
1446
|
+
* @property {string} iccid - ID of the eSIM
|
|
1447
|
+
* @property {number} dataLimitInGb - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB. Use `-1` to top up with an unlimited (date-based) package — provide `startDate`/`endDate` spanning 3 to 30 days (`duration` is not supported for unlimited packages).
|
|
1448
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
|
1449
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
|
1450
|
+
* @property {number} duration - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration. Not supported for unlimited packages (`dataLimitInGB` = -1), which are date-based — provide startDate/endDate instead.
|
|
1451
|
+
* @property {string} email - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
|
|
1452
|
+
* @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
|
|
1453
|
+
* @property {string} emailBrand - 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.
|
|
1454
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
|
1455
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1442
1456
|
*/
|
|
1443
1457
|
type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
|
|
1444
1458
|
|
|
@@ -1508,10 +1522,9 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1508
1522
|
};
|
|
1509
1523
|
}>>;
|
|
1510
1524
|
/**
|
|
1511
|
-
*
|
|
1512
|
-
* @
|
|
1513
|
-
* @property {
|
|
1514
|
-
* @property {TopUpEsimOkResponseProfile}
|
|
1525
|
+
* @typedef {TopUpEsimOkResponse} topUpEsimOkResponse
|
|
1526
|
+
* @property {TopUpEsimOkResponsePurchase} purchase
|
|
1527
|
+
* @property {TopUpEsimOkResponseProfile} profile
|
|
1515
1528
|
*/
|
|
1516
1529
|
type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
|
|
1517
1530
|
|
|
@@ -1540,13 +1553,12 @@ declare const editPurchaseRequest: z.ZodLazy<z.ZodObject<{
|
|
|
1540
1553
|
endTime?: number | undefined;
|
|
1541
1554
|
}>>;
|
|
1542
1555
|
/**
|
|
1543
|
-
*
|
|
1544
|
-
* @
|
|
1545
|
-
* @property {string} -
|
|
1546
|
-
* @property {string} -
|
|
1547
|
-
* @property {
|
|
1548
|
-
* @property {number} - Epoch value representing the
|
|
1549
|
-
* @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1556
|
+
* @typedef {EditPurchaseRequest} editPurchaseRequest
|
|
1557
|
+
* @property {string} purchaseId - ID of the purchase
|
|
1558
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
|
|
1559
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
|
|
1560
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months.
|
|
1561
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
|
|
1550
1562
|
*/
|
|
1551
1563
|
type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
|
|
1552
1564
|
|
|
@@ -1575,13 +1587,12 @@ declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1575
1587
|
newEndTime?: number | null | undefined;
|
|
1576
1588
|
}>>;
|
|
1577
1589
|
/**
|
|
1578
|
-
*
|
|
1579
|
-
* @
|
|
1580
|
-
* @property {string} -
|
|
1581
|
-
* @property {string} -
|
|
1582
|
-
* @property {
|
|
1583
|
-
* @property {number} - Epoch value representing the new
|
|
1584
|
-
* @property {number} - Epoch value representing the new end time of the package's validity
|
|
1590
|
+
* @typedef {EditPurchaseOkResponse} editPurchaseOkResponse
|
|
1591
|
+
* @property {string} purchaseId - ID of the purchase
|
|
1592
|
+
* @property {string} newStartDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1593
|
+
* @property {string} newEndDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1594
|
+
* @property {number} newStartTime - Epoch value representing the new start time of the package's validity
|
|
1595
|
+
* @property {number} newEndTime - Epoch value representing the new end time of the package's validity
|
|
1585
1596
|
*/
|
|
1586
1597
|
type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
|
|
1587
1598
|
|
|
@@ -1604,11 +1615,10 @@ declare const getPurchaseConsumptionOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
1604
1615
|
dataUsageRemainingInGb: number;
|
|
1605
1616
|
}>>;
|
|
1606
1617
|
/**
|
|
1607
|
-
*
|
|
1608
|
-
* @
|
|
1609
|
-
* @property {number} - Remaining balance of the package in
|
|
1610
|
-
* @property {
|
|
1611
|
-
* @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
|
|
1618
|
+
* @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
|
|
1619
|
+
* @property {number} dataUsageRemainingInBytes - Remaining balance of the package in bytes. Returns `-1` for unlimited packages.
|
|
1620
|
+
* @property {number} dataUsageRemainingInGb - Remaining balance of the package in GB. Returns `-1` for unlimited packages.
|
|
1621
|
+
* @property {string} status - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
|
|
1612
1622
|
*/
|
|
1613
1623
|
type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
|
|
1614
1624
|
|
|
@@ -1735,11 +1745,10 @@ declare const createPurchaseV2OkResponsePurchase: z.ZodLazy<z.ZodObject<{
|
|
|
1735
1745
|
createdDate: string;
|
|
1736
1746
|
}>>;
|
|
1737
1747
|
/**
|
|
1738
|
-
*
|
|
1739
|
-
* @
|
|
1740
|
-
* @property {string} - ID of the
|
|
1741
|
-
* @property {string} -
|
|
1742
|
-
* @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1748
|
+
* @typedef {CreatePurchaseV2OkResponsePurchase} createPurchaseV2OkResponsePurchase
|
|
1749
|
+
* @property {string} id - ID of the purchase
|
|
1750
|
+
* @property {string} packageId - ID of the package
|
|
1751
|
+
* @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1743
1752
|
*/
|
|
1744
1753
|
type CreatePurchaseV2OkResponsePurchase = z.infer<typeof createPurchaseV2OkResponsePurchase>;
|
|
1745
1754
|
|
|
@@ -1768,13 +1777,12 @@ declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
|
|
|
1768
1777
|
androidActivationLink: string;
|
|
1769
1778
|
}>>;
|
|
1770
1779
|
/**
|
|
1771
|
-
*
|
|
1772
|
-
* @
|
|
1773
|
-
* @property {string} -
|
|
1774
|
-
* @property {string} -
|
|
1775
|
-
* @property {string} -
|
|
1776
|
-
* @property {string} -
|
|
1777
|
-
* @property {string} - Android Activation Link of the eSIM
|
|
1780
|
+
* @typedef {CreatePurchaseV2OkResponseProfile} createPurchaseV2OkResponseProfile
|
|
1781
|
+
* @property {string} iccid - ID of the eSIM
|
|
1782
|
+
* @property {string} activationCode - QR Code of the eSIM as base64
|
|
1783
|
+
* @property {string} manualActivationCode - Manual Activation Code of the eSIM
|
|
1784
|
+
* @property {string} iosActivationLink - iOS Activation Link of the eSIM
|
|
1785
|
+
* @property {string} androidActivationLink - Android Activation Link of the eSIM
|
|
1778
1786
|
*/
|
|
1779
1787
|
type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkResponseProfile>;
|
|
1780
1788
|
|
|
@@ -1885,21 +1893,20 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
|
|
|
1885
1893
|
referenceId?: string | null | undefined;
|
|
1886
1894
|
}>>;
|
|
1887
1895
|
/**
|
|
1888
|
-
*
|
|
1889
|
-
* @
|
|
1890
|
-
* @property {string} -
|
|
1891
|
-
* @property {string} -
|
|
1892
|
-
* @property {
|
|
1893
|
-
* @property {
|
|
1894
|
-
* @property {
|
|
1895
|
-
* @property {number} - Epoch value representing the
|
|
1896
|
-
* @property {number} - Epoch value representing the
|
|
1897
|
-
* @property {
|
|
1898
|
-
* @property {
|
|
1899
|
-
* @property {
|
|
1900
|
-
* @property {string} - The `
|
|
1901
|
-
* @property {string} - The `
|
|
1902
|
-
* @property {string} - The `referenceId` that was provided by the partner during the purchase or top-up flow. This identifier can be used for analytics and debugging purposes.
|
|
1896
|
+
* @typedef {Purchases} purchases
|
|
1897
|
+
* @property {string} id - ID of the purchase
|
|
1898
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1899
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1900
|
+
* @property {number} duration - Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90. `null` for unlimited (date-based) packages.
|
|
1901
|
+
* @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
1902
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity
|
|
1903
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity
|
|
1904
|
+
* @property {number} createdAt - Epoch value representing the date of creation of the purchase
|
|
1905
|
+
* @property {Package_} package
|
|
1906
|
+
* @property {PurchasesEsim} esim
|
|
1907
|
+
* @property {string} source - The `source` indicates whether the purchase was made from the API, dashboard, landing-page, promo-page or iframe. For purchases made before September 8, 2023, the value will be displayed as 'Not available'.
|
|
1908
|
+
* @property {string} purchaseType - The `purchaseType` indicates whether this is the initial purchase that creates the eSIM (First Purchase) or a subsequent top-up on an existing eSIM (Top-up Purchase).
|
|
1909
|
+
* @property {string} referenceId - The `referenceId` that was provided by the partner during the purchase or top-up flow. This identifier can be used for analytics and debugging purposes.
|
|
1903
1910
|
*/
|
|
1904
1911
|
type Purchases = z.infer<typeof purchases>;
|
|
1905
1912
|
|
|
@@ -1934,15 +1941,14 @@ declare const package_: z.ZodLazy<z.ZodObject<{
|
|
|
1934
1941
|
destinationName: string;
|
|
1935
1942
|
}>>;
|
|
1936
1943
|
/**
|
|
1937
|
-
*
|
|
1938
|
-
* @
|
|
1939
|
-
* @property {
|
|
1940
|
-
* @property {number} - Size of the package in
|
|
1941
|
-
* @property {
|
|
1942
|
-
* @property {string} -
|
|
1943
|
-
* @property {string} -
|
|
1944
|
-
* @property {
|
|
1945
|
-
* @property {number} - Price of the package in cents
|
|
1944
|
+
* @typedef {Package_} package_
|
|
1945
|
+
* @property {string} id - ID of the package
|
|
1946
|
+
* @property {number} dataLimitInBytes - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
|
|
1947
|
+
* @property {number} dataLimitInGb - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
|
|
1948
|
+
* @property {string} destination - ISO3 representation of the package's destination.
|
|
1949
|
+
* @property {string} destinationIso2 - ISO2 representation of the package's destination.
|
|
1950
|
+
* @property {string} destinationName - Name of the package's destination
|
|
1951
|
+
* @property {number} priceInCents - Price of the package in cents
|
|
1946
1952
|
*/
|
|
1947
1953
|
type Package_ = z.infer<typeof package_>;
|
|
1948
1954
|
|
|
@@ -1959,9 +1965,8 @@ declare const purchasesEsim: z.ZodLazy<z.ZodObject<{
|
|
|
1959
1965
|
iccid: string;
|
|
1960
1966
|
}>>;
|
|
1961
1967
|
/**
|
|
1962
|
-
*
|
|
1963
|
-
* @
|
|
1964
|
-
* @property {string} - ID of the eSIM
|
|
1968
|
+
* @typedef {PurchasesEsim} purchasesEsim
|
|
1969
|
+
* @property {string} iccid - ID of the eSIM
|
|
1965
1970
|
*/
|
|
1966
1971
|
type PurchasesEsim = z.infer<typeof purchasesEsim>;
|
|
1967
1972
|
|
|
@@ -1996,15 +2001,14 @@ declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
|
|
|
1996
2001
|
endTime?: number | null | undefined;
|
|
1997
2002
|
}>>;
|
|
1998
2003
|
/**
|
|
1999
|
-
*
|
|
2000
|
-
* @
|
|
2001
|
-
* @property {string} - ID of the
|
|
2002
|
-
* @property {string} -
|
|
2003
|
-
* @property {string} -
|
|
2004
|
-
* @property {string} -
|
|
2005
|
-
* @property {
|
|
2006
|
-
* @property {number} - Epoch value representing the
|
|
2007
|
-
* @property {number} - Epoch value representing the end time of the package's validity
|
|
2004
|
+
* @typedef {CreatePurchaseOkResponsePurchase} createPurchaseOkResponsePurchase
|
|
2005
|
+
* @property {string} id - ID of the purchase
|
|
2006
|
+
* @property {string} packageId - ID of the package
|
|
2007
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2008
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2009
|
+
* @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2010
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity
|
|
2011
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity
|
|
2008
2012
|
*/
|
|
2009
2013
|
type CreatePurchaseOkResponsePurchase = z.infer<typeof createPurchaseOkResponsePurchase>;
|
|
2010
2014
|
|
|
@@ -2027,11 +2031,10 @@ declare const createPurchaseOkResponseProfile: z.ZodLazy<z.ZodObject<{
|
|
|
2027
2031
|
manualActivationCode: string;
|
|
2028
2032
|
}>>;
|
|
2029
2033
|
/**
|
|
2030
|
-
*
|
|
2031
|
-
* @
|
|
2032
|
-
* @property {string} -
|
|
2033
|
-
* @property {string} -
|
|
2034
|
-
* @property {string} - Manual Activation Code of the eSIM
|
|
2034
|
+
* @typedef {CreatePurchaseOkResponseProfile} createPurchaseOkResponseProfile
|
|
2035
|
+
* @property {string} iccid - ID of the eSIM
|
|
2036
|
+
* @property {string} activationCode - QR Code of the eSIM as base64
|
|
2037
|
+
* @property {string} manualActivationCode - Manual Activation Code of the eSIM
|
|
2035
2038
|
*/
|
|
2036
2039
|
type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponseProfile>;
|
|
2037
2040
|
|
|
@@ -2074,15 +2077,14 @@ declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
|
|
|
2074
2077
|
endTime?: number | null | undefined;
|
|
2075
2078
|
}>>;
|
|
2076
2079
|
/**
|
|
2077
|
-
*
|
|
2078
|
-
* @
|
|
2079
|
-
* @property {string} - ID of the
|
|
2080
|
-
* @property {string} -
|
|
2081
|
-
* @property {string} -
|
|
2082
|
-
* @property {string} -
|
|
2083
|
-
* @property {
|
|
2084
|
-
* @property {number} - Epoch value representing the
|
|
2085
|
-
* @property {number} - Epoch value representing the end time of the package's validity
|
|
2080
|
+
* @typedef {TopUpEsimOkResponsePurchase} topUpEsimOkResponsePurchase
|
|
2081
|
+
* @property {string} id - ID of the purchase
|
|
2082
|
+
* @property {string} packageId - ID of the package
|
|
2083
|
+
* @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2084
|
+
* @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2085
|
+
* @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2086
|
+
* @property {number} startTime - Epoch value representing the start time of the package's validity
|
|
2087
|
+
* @property {number} endTime - Epoch value representing the end time of the package's validity
|
|
2086
2088
|
*/
|
|
2087
2089
|
type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurchase>;
|
|
2088
2090
|
|
|
@@ -2099,9 +2101,8 @@ declare const topUpEsimOkResponseProfile: z.ZodLazy<z.ZodObject<{
|
|
|
2099
2101
|
iccid: string;
|
|
2100
2102
|
}>>;
|
|
2101
2103
|
/**
|
|
2102
|
-
*
|
|
2103
|
-
* @
|
|
2104
|
-
* @property {string} - ID of the eSIM
|
|
2104
|
+
* @typedef {TopUpEsimOkResponseProfile} topUpEsimOkResponseProfile
|
|
2105
|
+
* @property {string} iccid - ID of the eSIM
|
|
2105
2106
|
*/
|
|
2106
2107
|
type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfile>;
|
|
2107
2108
|
|
|
@@ -2158,9 +2159,8 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2158
2159
|
};
|
|
2159
2160
|
}>>;
|
|
2160
2161
|
/**
|
|
2161
|
-
*
|
|
2162
|
-
* @
|
|
2163
|
-
* @property {GetEsimOkResponseEsim}
|
|
2162
|
+
* @typedef {GetEsimOkResponse} getEsimOkResponse
|
|
2163
|
+
* @property {GetEsimOkResponseEsim} esim
|
|
2164
2164
|
*/
|
|
2165
2165
|
type GetEsimOkResponse = z.infer<typeof getEsimOkResponse>;
|
|
2166
2166
|
|
|
@@ -2206,9 +2206,8 @@ declare const getEsimDeviceOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2206
2206
|
};
|
|
2207
2207
|
}>>;
|
|
2208
2208
|
/**
|
|
2209
|
-
*
|
|
2210
|
-
* @
|
|
2211
|
-
* @property {Device}
|
|
2209
|
+
* @typedef {GetEsimDeviceOkResponse} getEsimDeviceOkResponse
|
|
2210
|
+
* @property {Device} device
|
|
2212
2211
|
*/
|
|
2213
2212
|
type GetEsimDeviceOkResponse = z.infer<typeof getEsimDeviceOkResponse>;
|
|
2214
2213
|
|
|
@@ -2268,9 +2267,8 @@ declare const getEsimHistoryOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2268
2267
|
};
|
|
2269
2268
|
}>>;
|
|
2270
2269
|
/**
|
|
2271
|
-
*
|
|
2272
|
-
* @
|
|
2273
|
-
* @property {GetEsimHistoryOkResponseEsim}
|
|
2270
|
+
* @typedef {GetEsimHistoryOkResponse} getEsimHistoryOkResponse
|
|
2271
|
+
* @property {GetEsimHistoryOkResponseEsim} esim
|
|
2274
2272
|
*/
|
|
2275
2273
|
type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
|
|
2276
2274
|
|
|
@@ -2355,15 +2353,14 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
|
|
|
2355
2353
|
isTopUpAllowed: boolean;
|
|
2356
2354
|
}>>;
|
|
2357
2355
|
/**
|
|
2358
|
-
*
|
|
2359
|
-
* @
|
|
2360
|
-
* @property {string} -
|
|
2361
|
-
* @property {string}
|
|
2362
|
-
* @property {string} -
|
|
2363
|
-
* @property {string} -
|
|
2364
|
-
* @property {string} - Status of the eSIM, possible values are '
|
|
2365
|
-
* @property {
|
|
2366
|
-
* @property {boolean} - Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
|
|
2356
|
+
* @typedef {GetEsimOkResponseEsim} getEsimOkResponseEsim
|
|
2357
|
+
* @property {string} iccid - ID of the eSIM
|
|
2358
|
+
* @property {string} smdpAddress - SM-DP+ Address
|
|
2359
|
+
* @property {string} activationCode - QR Code of the eSIM as base64
|
|
2360
|
+
* @property {string} manualActivationCode - The manual activation code
|
|
2361
|
+
* @property {string} status - Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
|
|
2362
|
+
* @property {string} connectivityStatus - Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
|
|
2363
|
+
* @property {boolean} isTopUpAllowed - Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
|
|
2367
2364
|
*/
|
|
2368
2365
|
type GetEsimOkResponseEsim = z.infer<typeof getEsimOkResponseEsim>;
|
|
2369
2366
|
|
|
@@ -2389,12 +2386,11 @@ declare const device: z.ZodLazy<z.ZodObject<{
|
|
|
2389
2386
|
eid: string;
|
|
2390
2387
|
}>>;
|
|
2391
2388
|
/**
|
|
2392
|
-
*
|
|
2393
|
-
* @
|
|
2394
|
-
* @property {string} - Name of the
|
|
2395
|
-
* @property {string} -
|
|
2396
|
-
* @property {string} -
|
|
2397
|
-
* @property {string} - Serial Number of the eSIM
|
|
2389
|
+
* @typedef {Device} device
|
|
2390
|
+
* @property {string} oem - Name of the OEM
|
|
2391
|
+
* @property {string} hardwareName - Name of the Device
|
|
2392
|
+
* @property {string} hardwareModel - Model of the Device
|
|
2393
|
+
* @property {string} eid - Serial Number of the eSIM
|
|
2398
2394
|
*/
|
|
2399
2395
|
type Device = z.infer<typeof device>;
|
|
2400
2396
|
|
|
@@ -2434,10 +2430,9 @@ declare const getEsimHistoryOkResponseEsim: z.ZodLazy<z.ZodObject<{
|
|
|
2434
2430
|
}[];
|
|
2435
2431
|
}>>;
|
|
2436
2432
|
/**
|
|
2437
|
-
*
|
|
2438
|
-
* @
|
|
2439
|
-
* @property {
|
|
2440
|
-
* @property {History[]}
|
|
2433
|
+
* @typedef {GetEsimHistoryOkResponseEsim} getEsimHistoryOkResponseEsim
|
|
2434
|
+
* @property {string} iccid - ID of the eSIM
|
|
2435
|
+
* @property {History[]} history
|
|
2441
2436
|
*/
|
|
2442
2437
|
type GetEsimHistoryOkResponseEsim = z.infer<typeof getEsimHistoryOkResponseEsim>;
|
|
2443
2438
|
|
|
@@ -2460,11 +2455,10 @@ declare const history: z.ZodLazy<z.ZodObject<{
|
|
|
2460
2455
|
date?: number | undefined;
|
|
2461
2456
|
}>>;
|
|
2462
2457
|
/**
|
|
2463
|
-
*
|
|
2464
|
-
* @
|
|
2465
|
-
* @property {string} - The
|
|
2466
|
-
* @property {
|
|
2467
|
-
* @property {number} - Epoch value representing the date when the eSIM status changed
|
|
2458
|
+
* @typedef {History} history
|
|
2459
|
+
* @property {string} status - The status of the eSIM at a given time, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
|
|
2460
|
+
* @property {string} statusDate - The date when the eSIM status changed in the format 'yyyy-MM-ddThh:mm:ssZZ'
|
|
2461
|
+
* @property {number} date - Epoch value representing the date when the eSIM status changed
|
|
2468
2462
|
*/
|
|
2469
2463
|
type History = z.infer<typeof history>;
|
|
2470
2464
|
|
|
@@ -2481,9 +2475,8 @@ declare const tokenOkResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2481
2475
|
token: string;
|
|
2482
2476
|
}>>;
|
|
2483
2477
|
/**
|
|
2484
|
-
*
|
|
2485
|
-
* @
|
|
2486
|
-
* @property {string} - The generated token
|
|
2478
|
+
* @typedef {TokenOkResponse} tokenOkResponse
|
|
2479
|
+
* @property {string} token - The generated token
|
|
2487
2480
|
*/
|
|
2488
2481
|
type TokenOkResponse = z.infer<typeof tokenOkResponse>;
|
|
2489
2482
|
|
|
@@ -2530,12 +2523,11 @@ declare const oAuthTokenRequest: z.ZodLazy<z.ZodObject<{
|
|
|
2530
2523
|
scope: string;
|
|
2531
2524
|
}>>;
|
|
2532
2525
|
/**
|
|
2533
|
-
*
|
|
2534
|
-
* @
|
|
2535
|
-
* @property {
|
|
2536
|
-
* @property {string}
|
|
2537
|
-
* @property {string}
|
|
2538
|
-
* @property {string}
|
|
2526
|
+
* @typedef {OAuthTokenRequest} oAuthTokenRequest
|
|
2527
|
+
* @property {GrantType} grantType
|
|
2528
|
+
* @property {string} clientId
|
|
2529
|
+
* @property {string} clientSecret
|
|
2530
|
+
* @property {string} scope
|
|
2539
2531
|
*/
|
|
2540
2532
|
type OAuthTokenRequest = z.infer<typeof oAuthTokenRequest>;
|
|
2541
2533
|
|
|
@@ -2555,10 +2547,9 @@ declare const oAuthTokenResponse: z.ZodLazy<z.ZodObject<{
|
|
|
2555
2547
|
expiresIn?: number | null | undefined;
|
|
2556
2548
|
}>>;
|
|
2557
2549
|
/**
|
|
2558
|
-
*
|
|
2559
|
-
* @
|
|
2560
|
-
* @property {
|
|
2561
|
-
* @property {number}
|
|
2550
|
+
* @typedef {OAuthTokenResponse} oAuthTokenResponse
|
|
2551
|
+
* @property {string} accessToken
|
|
2552
|
+
* @property {number} expiresIn
|
|
2562
2553
|
*/
|
|
2563
2554
|
type OAuthTokenResponse = z.infer<typeof oAuthTokenResponse>;
|
|
2564
2555
|
|
|
@@ -2591,6 +2582,7 @@ declare class BadRequest extends ThrowableError {
|
|
|
2591
2582
|
message: string;
|
|
2592
2583
|
protected response?: unknown;
|
|
2593
2584
|
constructor(message: string, response?: unknown);
|
|
2585
|
+
static from(message: string, response?: unknown): BadRequest;
|
|
2594
2586
|
throw(): void;
|
|
2595
2587
|
}
|
|
2596
2588
|
|
|
@@ -2598,6 +2590,7 @@ declare class Unauthorized extends ThrowableError {
|
|
|
2598
2590
|
message: string;
|
|
2599
2591
|
protected response?: unknown;
|
|
2600
2592
|
constructor(message: string, response?: unknown);
|
|
2593
|
+
static from(message: string, response?: unknown): Unauthorized;
|
|
2601
2594
|
throw(): void;
|
|
2602
2595
|
}
|
|
2603
2596
|
|