celitech-sdk 2.0.6 → 2.0.10

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/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.
@@ -195,7 +209,7 @@ declare class ThrowableError extends Error {
195
209
  * Used to match and validate responses based on content type and status code.
196
210
  */
197
211
  interface ResponseDefinition {
198
- /** Zod schema for validating the response body */
212
+ /** Schema for validating the response body */
199
213
  schema: ZodType;
200
214
  /** The content type of this response (e.g., 'application/json') */
201
215
  contentType: ContentType;
@@ -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
- /** Constructor for the error class to instantiate */
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 */
@@ -273,7 +289,7 @@ interface RequestPagination<Page> {
273
289
  pageSize?: number;
274
290
  /** JSON path to extract page data from response */
275
291
  pagePath: string[];
276
- /** Zod schema for validating page data */
292
+ /** Schema for validating page data */
277
293
  pageSchema?: ZodType<Page, any, any>;
278
294
  }
279
295
  /**
@@ -285,12 +301,12 @@ interface RequestPagination<Page> {
285
301
  interface RequestCursorPagination<Page> {
286
302
  /** JSON path to extract page data from response */
287
303
  pagePath: string[];
288
- /** Zod schema for validating page data */
304
+ /** Schema for validating page data */
289
305
  pageSchema?: ZodType<Page, any, any>;
290
306
  /** JSON path to extract next cursor from response */
291
307
  cursorPath: string[];
292
- /** Zod schema for validating cursor value */
293
- cursorSchema?: ZodType<string | null | undefined>;
308
+ /** Schema for validating cursor value */
309
+ cursorSchema?: ZodType<any, any, any>;
294
310
  }
295
311
 
296
312
  /**
@@ -387,8 +403,11 @@ declare class Request<PageSchema = unknown[]> {
387
403
  * Handles both cursor-based and limit-offset pagination strategies.
388
404
  *
389
405
  * @param cursor - The cursor value for cursor-based pagination (optional for limit-offset)
406
+ * @param offsetIncrement - Fallback increment for offset pagination with no declared `pageSize`
407
+ * (stepless offset — gap doc row 200), where the caller only learns the increment after fetching
408
+ * a page (its item count). Ignored whenever `pageSize` is set, which always wins.
390
409
  */
391
- nextPage(cursor?: string): void;
410
+ nextPage(cursor?: string, offsetIncrement?: number): void;
392
411
  private constructPath;
393
412
  private getOffsetParam;
394
413
  private getCursorParam;
@@ -469,8 +488,11 @@ interface CursorPaginatedHttpResponse<T = unknown> extends HttpResponse<T> {
469
488
  declare enum ContentType {
470
489
  /** JSON format (application/json) */
471
490
  Json = "json",
472
- /** XML format (application/xml, text/xml) */
473
- Xml = "xml",
491
+ /**
492
+ * @deprecated XML is handled as text. Use {@link ContentType.Text} instead.
493
+ * Kept as an alias for backward compatibility; will be removed in a future major version.
494
+ */
495
+ Xml = "text",
474
496
  /** PDF document (application/pdf) */
475
497
  Pdf = "pdf",
476
498
  /** Image file (image/*) */
@@ -496,11 +518,13 @@ interface RetryOptions {
496
518
  maxDelayMs?: number;
497
519
  backoffFactor?: number;
498
520
  jitterMs?: number;
521
+ maxRetryAfterDelayMs?: number;
499
522
  statusCodesToRetry?: number[];
500
523
  httpMethodsToRetry?: HttpMethod[];
501
524
  }
502
525
  interface ValidationOptions {
503
526
  responseValidation?: boolean;
527
+ requestValidation?: boolean;
504
528
  }
505
529
 
506
530
  /**
@@ -679,6 +703,7 @@ declare class BaseService {
679
703
  * @returns Merged configuration with all overrides applied
680
704
  */
681
705
  protected getResolvedConfig(methodConfig?: Partial<SdkConfig>, requestConfig?: Partial<SdkConfig>): SdkConfig;
706
+ protected toBase64(str: string): string;
682
707
  set baseUrl(baseUrl: string);
683
708
  set environment(environment: Environment);
684
709
  set timeoutMs(timeoutMs: number);
@@ -726,9 +751,8 @@ declare const listDestinationsOkResponse: z.ZodLazy<z.ZodObject<{
726
751
  }[];
727
752
  }>>;
728
753
  /**
729
- *
730
- * @typedef {ListDestinationsOkResponse} listDestinationsOkResponse
731
- * @property {Destinations[]}
754
+ * @typedef {ListDestinationsOkResponse} listDestinationsOkResponse
755
+ * @property {Destinations[]} destinations
732
756
  */
733
757
  type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
734
758
 
@@ -775,12 +799,11 @@ declare const destinations: z.ZodLazy<z.ZodObject<{
775
799
  supportedCountries: string[];
776
800
  }>>;
777
801
  /**
778
- *
779
- * @typedef {Destinations} destinations
780
- * @property {string} - Name of the destination
781
- * @property {string} - ISO3 representation of the destination
782
- * @property {string} - ISO2 representation of the destination
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.
802
+ * @typedef {Destinations} destinations
803
+ * @property {string} name - Name of the destination
804
+ * @property {string} destination - ISO3 representation of the destination
805
+ * @property {string} destinationIso2 - ISO2 representation of the destination
806
+ * @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
807
  */
785
808
  type Destinations = z.infer<typeof destinations>;
786
809
 
@@ -845,10 +868,9 @@ declare const listPackagesOkResponse: z.ZodLazy<z.ZodObject<{
845
868
  afterCursor: string | null;
846
869
  }>>;
847
870
  /**
848
- *
849
- * @typedef {ListPackagesOkResponse} listPackagesOkResponse
850
- * @property {Packages[]}
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
871
+ * @typedef {ListPackagesOkResponse} listPackagesOkResponse
872
+ * @property {Packages[]} packages
873
+ * @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
874
  */
853
875
  type ListPackagesOkResponse = z.infer<typeof listPackagesOkResponse>;
854
876
 
@@ -928,16 +950,15 @@ declare const packages: z.ZodLazy<z.ZodObject<{
928
950
  priceInCents: number;
929
951
  }>>;
930
952
  /**
931
- *
932
- * @typedef {Packages} packages
933
- * @property {string} - ID of the package
934
- * @property {string} - ISO3 representation of the package's destination.
935
- * @property {string} - ISO2 representation of the package's destination.
936
- * @property {number} - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
937
- * @property {number} - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
938
- * @property {number} - Min number of days for the package
939
- * @property {number} - Max number of days for the package
940
- * @property {number} - Price of the package in cents
953
+ * @typedef {Packages} packages
954
+ * @property {string} id - ID of the package
955
+ * @property {string} destination - ISO3 representation of the package's destination.
956
+ * @property {string} destinationIso2 - ISO2 representation of the package's destination.
957
+ * @property {number} dataLimitInBytes - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
958
+ * @property {number} dataLimitInGb - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
959
+ * @property {number} minDays - Min number of days for the package
960
+ * @property {number} maxDays - Max number of days for the package
961
+ * @property {number} priceInCents - Price of the package in cents
941
962
  */
942
963
  type Packages = z.infer<typeof packages>;
943
964
 
@@ -984,19 +1005,18 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
984
1005
  language?: string | undefined;
985
1006
  }>>;
986
1007
  /**
987
- *
988
- * @typedef {CreatePurchaseV2Request} createPurchaseV2Request
989
- * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
990
- * @property {number} - 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).
991
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
992
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
993
- * @property {number} - 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.
994
- * @property {number} - Number of eSIMs to purchase.
995
- * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
996
- * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
997
- * @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.
998
- * @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.
999
- * @property {CreatePurchaseV2RequestLanguage} - Language of the confirmation email sent to the customer.
1008
+ * @typedef {CreatePurchaseV2Request} createPurchaseV2Request
1009
+ * @property {string} destination - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
1010
+ * @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).
1011
+ * @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.
1012
+ * @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.
1013
+ * @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.
1014
+ * @property {number} quantity - Number of eSIMs to purchase.
1015
+ * @property {string} email - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
1016
+ * @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes. Letters, digits, `-`, `_`, `.`, `@` and `+` are allowed (so an email address works), up to 255 characters.
1017
+ * @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.
1018
+ * @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.
1019
+ * @property {CreatePurchaseV2RequestLanguage} language - Language of the confirmation email sent to the customer.
1000
1020
  */
1001
1021
  type CreatePurchaseV2Request = z.infer<typeof createPurchaseV2Request>;
1002
1022
 
@@ -1066,13 +1086,37 @@ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
1066
1086
  };
1067
1087
  }>>;
1068
1088
  /**
1069
- *
1070
- * @typedef {CreatePurchaseV2OkResponse} createPurchaseV2OkResponse
1071
- * @property {CreatePurchaseV2OkResponsePurchase}
1072
- * @property {CreatePurchaseV2OkResponseProfile}
1089
+ * @typedef {CreatePurchaseV2OkResponse} createPurchaseV2OkResponse
1090
+ * @property {CreatePurchaseV2OkResponsePurchase} purchase
1091
+ * @property {CreatePurchaseV2OkResponseProfile} profile
1073
1092
  */
1074
1093
  type CreatePurchaseV2OkResponse = z.infer<typeof createPurchaseV2OkResponse>;
1075
1094
 
1095
+ interface CreatePurchaseV2Params {
1096
+ idempotencyKey?: string;
1097
+ }
1098
+ interface ListPurchasesParams {
1099
+ purchaseId?: string;
1100
+ iccid?: string;
1101
+ afterDate?: string;
1102
+ beforeDate?: string;
1103
+ email?: string;
1104
+ referenceId?: string;
1105
+ afterCursor?: string;
1106
+ limit?: number;
1107
+ after?: number;
1108
+ before?: number;
1109
+ }
1110
+ interface CreatePurchaseParams {
1111
+ idempotencyKey?: string;
1112
+ }
1113
+ interface TopUpEsimParams {
1114
+ idempotencyKey?: string;
1115
+ }
1116
+ interface EditPurchaseParams {
1117
+ idempotencyKey?: string;
1118
+ }
1119
+
1076
1120
  /**
1077
1121
  * Zod schema for the ListPurchasesOkResponse model.
1078
1122
  * Defines the structure and validation rules for this data type.
@@ -1229,26 +1273,12 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
1229
1273
  }[];
1230
1274
  }>>;
1231
1275
  /**
1232
- *
1233
- * @typedef {ListPurchasesOkResponse} listPurchasesOkResponse
1234
- * @property {Purchases[]}
1235
- * @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.
1276
+ * @typedef {ListPurchasesOkResponse} listPurchasesOkResponse
1277
+ * @property {Purchases[]} purchases
1278
+ * @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.
1236
1279
  */
1237
1280
  type ListPurchasesOkResponse = z.infer<typeof listPurchasesOkResponse>;
1238
1281
 
1239
- interface ListPurchasesParams {
1240
- purchaseId?: string;
1241
- iccid?: string;
1242
- afterDate?: string;
1243
- beforeDate?: string;
1244
- email?: string;
1245
- referenceId?: string;
1246
- afterCursor?: string;
1247
- limit?: number;
1248
- after?: number;
1249
- before?: number;
1250
- }
1251
-
1252
1282
  /**
1253
1283
  * Zod schema for the CreatePurchaseRequest model.
1254
1284
  * Defines the structure and validation rules for this data type.
@@ -1292,19 +1322,18 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
1292
1322
  endTime?: number | undefined;
1293
1323
  }>>;
1294
1324
  /**
1295
- *
1296
- * @typedef {CreatePurchaseRequest} createPurchaseRequest
1297
- * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
1298
- * @property {number} - 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.
1299
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
1300
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
1301
- * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
1302
- * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
1303
- * @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.
1304
- * @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.
1305
- * @property {CreatePurchaseRequestLanguage} - Language of the confirmation email sent to the customer.
1306
- * @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.
1307
- * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1325
+ * @typedef {CreatePurchaseRequest} createPurchaseRequest
1326
+ * @property {string} destination - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
1327
+ * @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.
1328
+ * @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.
1329
+ * @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.
1330
+ * @property {string} email - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
1331
+ * @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes. Letters, digits, `-`, `_`, `.`, `@` and `+` are allowed (so an email address works), up to 255 characters.
1332
+ * @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.
1333
+ * @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.
1334
+ * @property {CreatePurchaseRequestLanguage} language - Language of the confirmation email sent to the customer.
1335
+ * @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.
1336
+ * @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1308
1337
  */
1309
1338
  type CreatePurchaseRequest = z.infer<typeof createPurchaseRequest>;
1310
1339
 
@@ -1384,10 +1413,9 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
1384
1413
  };
1385
1414
  }>>;
1386
1415
  /**
1387
- *
1388
- * @typedef {CreatePurchaseOkResponse} createPurchaseOkResponse
1389
- * @property {CreatePurchaseOkResponsePurchase}
1390
- * @property {CreatePurchaseOkResponseProfile}
1416
+ * @typedef {CreatePurchaseOkResponse} createPurchaseOkResponse
1417
+ * @property {CreatePurchaseOkResponsePurchase} purchase
1418
+ * @property {CreatePurchaseOkResponseProfile} profile
1391
1419
  */
1392
1420
  type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
1393
1421
 
@@ -1431,18 +1459,17 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
1431
1459
  endTime?: number | undefined;
1432
1460
  }>>;
1433
1461
  /**
1434
- *
1435
- * @typedef {TopUpEsimRequest} topUpEsimRequest
1436
- * @property {string} - ID of the eSIM
1437
- * @property {number} - 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).
1438
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
1439
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
1440
- * @property {number} - 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.
1441
- * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
1442
- * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
1443
- * @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.
1444
- * @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.
1445
- * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1462
+ * @typedef {TopUpEsimRequest} topUpEsimRequest
1463
+ * @property {string} iccid - ID of the eSIM
1464
+ * @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).
1465
+ * @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.
1466
+ * @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.
1467
+ * @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.
1468
+ * @property {string} email - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
1469
+ * @property {string} referenceId - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes. Letters, digits, `-`, `_`, `.`, `@` and `+` are allowed (so an email address works), up to 255 characters.
1470
+ * @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.
1471
+ * @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.
1472
+ * @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1446
1473
  */
1447
1474
  type TopUpEsimRequest = z.infer<typeof topUpEsimRequest>;
1448
1475
 
@@ -1512,10 +1539,9 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
1512
1539
  };
1513
1540
  }>>;
1514
1541
  /**
1515
- *
1516
- * @typedef {TopUpEsimOkResponse} topUpEsimOkResponse
1517
- * @property {TopUpEsimOkResponsePurchase}
1518
- * @property {TopUpEsimOkResponseProfile}
1542
+ * @typedef {TopUpEsimOkResponse} topUpEsimOkResponse
1543
+ * @property {TopUpEsimOkResponsePurchase} purchase
1544
+ * @property {TopUpEsimOkResponseProfile} profile
1519
1545
  */
1520
1546
  type TopUpEsimOkResponse = z.infer<typeof topUpEsimOkResponse>;
1521
1547
 
@@ -1544,13 +1570,12 @@ declare const editPurchaseRequest: z.ZodLazy<z.ZodObject<{
1544
1570
  endTime?: number | undefined;
1545
1571
  }>>;
1546
1572
  /**
1547
- *
1548
- * @typedef {EditPurchaseRequest} editPurchaseRequest
1549
- * @property {string} - ID of the purchase
1550
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
1551
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
1552
- * @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.
1553
- * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1573
+ * @typedef {EditPurchaseRequest} editPurchaseRequest
1574
+ * @property {string} purchaseId - ID of the purchase
1575
+ * @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.
1576
+ * @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.
1577
+ * @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.
1578
+ * @property {number} endTime - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
1554
1579
  */
1555
1580
  type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
1556
1581
 
@@ -1579,13 +1604,12 @@ declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
1579
1604
  newEndTime?: number | null | undefined;
1580
1605
  }>>;
1581
1606
  /**
1582
- *
1583
- * @typedef {EditPurchaseOkResponse} editPurchaseOkResponse
1584
- * @property {string} - ID of the purchase
1585
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1586
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1587
- * @property {number} - Epoch value representing the new start time of the package's validity
1588
- * @property {number} - Epoch value representing the new end time of the package's validity
1607
+ * @typedef {EditPurchaseOkResponse} editPurchaseOkResponse
1608
+ * @property {string} purchaseId - ID of the purchase
1609
+ * @property {string} newStartDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1610
+ * @property {string} newEndDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1611
+ * @property {number} newStartTime - Epoch value representing the new start time of the package's validity
1612
+ * @property {number} newEndTime - Epoch value representing the new end time of the package's validity
1589
1613
  */
1590
1614
  type EditPurchaseOkResponse = z.infer<typeof editPurchaseOkResponse>;
1591
1615
 
@@ -1608,11 +1632,10 @@ declare const getPurchaseConsumptionOkResponse: z.ZodLazy<z.ZodObject<{
1608
1632
  dataUsageRemainingInGb: number;
1609
1633
  }>>;
1610
1634
  /**
1611
- *
1612
- * @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
1613
- * @property {number} - Remaining balance of the package in bytes. Returns `-1` for unlimited packages.
1614
- * @property {number} - Remaining balance of the package in GB. Returns `-1` for unlimited packages.
1615
- * @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
1635
+ * @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
1636
+ * @property {number} dataUsageRemainingInBytes - Remaining balance of the package in bytes. Returns `-1` for unlimited packages.
1637
+ * @property {number} dataUsageRemainingInGb - Remaining balance of the package in GB. Returns `-1` for unlimited packages.
1638
+ * @property {string} status - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
1616
1639
  */
1617
1640
  type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
1618
1641
 
@@ -1666,10 +1689,11 @@ declare class PurchasesService extends BaseService {
1666
1689
  setGetPurchaseConsumptionConfig(config: Partial<SdkConfig>): this;
1667
1690
  /**
1668
1691
  * This endpoint is used to purchase a new eSIM by providing the package details.
1692
+ * @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
1669
1693
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
1670
1694
  * @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} - Successful Response
1671
1695
  */
1672
- createPurchaseV2(body: CreatePurchaseV2Request, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseV2OkResponse[]>;
1696
+ createPurchaseV2(body: CreatePurchaseV2Request, params?: CreatePurchaseV2Params, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseV2OkResponse[]>;
1673
1697
  /**
1674
1698
  * This endpoint can be used to list all the successful purchases made between a given interval.
1675
1699
  * @param {string} [params.purchaseId] - ID of the purchase
@@ -1688,16 +1712,18 @@ declare class PurchasesService extends BaseService {
1688
1712
  listPurchases(params?: ListPurchasesParams, requestConfig?: Partial<SdkConfig>): Promise<ListPurchasesOkResponse>;
1689
1713
  /**
1690
1714
  * This endpoint is used to purchase a new eSIM by providing the package details.
1715
+ * @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
1691
1716
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
1692
1717
  * @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} - Successful Response
1693
1718
  */
1694
- createPurchase(body: CreatePurchaseRequest, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseOkResponse>;
1719
+ createPurchase(body: CreatePurchaseRequest, params?: CreatePurchaseParams, requestConfig?: Partial<SdkConfig>): Promise<CreatePurchaseOkResponse>;
1695
1720
  /**
1696
1721
  * 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.
1722
+ * @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
1697
1723
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
1698
1724
  * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} - Successful Response
1699
1725
  */
1700
- topUpEsim(body: TopUpEsimRequest, requestConfig?: Partial<SdkConfig>): Promise<TopUpEsimOkResponse>;
1726
+ topUpEsim(body: TopUpEsimRequest, params?: TopUpEsimParams, requestConfig?: Partial<SdkConfig>): Promise<TopUpEsimOkResponse>;
1701
1727
  /**
1702
1728
  * This endpoint allows you to modify the validity dates of an existing purchase.
1703
1729
  **Behavior:**
@@ -1707,10 +1733,11 @@ declare class PurchasesService extends BaseService {
1707
1733
 
1708
1734
  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.
1709
1735
 
1736
+ * @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
1710
1737
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
1711
1738
  * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} - Successful Response
1712
1739
  */
1713
- editPurchase(body: EditPurchaseRequest, requestConfig?: Partial<SdkConfig>): Promise<EditPurchaseOkResponse>;
1740
+ editPurchase(body: EditPurchaseRequest, params?: EditPurchaseParams, requestConfig?: Partial<SdkConfig>): Promise<EditPurchaseOkResponse>;
1714
1741
  /**
1715
1742
  * 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.
1716
1743
  * @param {string} purchaseId - ID of the purchase
@@ -1739,11 +1766,10 @@ declare const createPurchaseV2OkResponsePurchase: z.ZodLazy<z.ZodObject<{
1739
1766
  createdDate: string;
1740
1767
  }>>;
1741
1768
  /**
1742
- *
1743
- * @typedef {CreatePurchaseV2OkResponsePurchase} createPurchaseV2OkResponsePurchase
1744
- * @property {string} - ID of the purchase
1745
- * @property {string} - ID of the package
1746
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1769
+ * @typedef {CreatePurchaseV2OkResponsePurchase} createPurchaseV2OkResponsePurchase
1770
+ * @property {string} id - ID of the purchase
1771
+ * @property {string} packageId - ID of the package
1772
+ * @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1747
1773
  */
1748
1774
  type CreatePurchaseV2OkResponsePurchase = z.infer<typeof createPurchaseV2OkResponsePurchase>;
1749
1775
 
@@ -1772,13 +1798,12 @@ declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
1772
1798
  androidActivationLink: string;
1773
1799
  }>>;
1774
1800
  /**
1775
- *
1776
- * @typedef {CreatePurchaseV2OkResponseProfile} createPurchaseV2OkResponseProfile
1777
- * @property {string} - ID of the eSIM
1778
- * @property {string} - QR Code of the eSIM as base64
1779
- * @property {string} - Manual Activation Code of the eSIM
1780
- * @property {string} - iOS Activation Link of the eSIM
1781
- * @property {string} - Android Activation Link of the eSIM
1801
+ * @typedef {CreatePurchaseV2OkResponseProfile} createPurchaseV2OkResponseProfile
1802
+ * @property {string} iccid - ID of the eSIM
1803
+ * @property {string} activationCode - QR Code of the eSIM as base64
1804
+ * @property {string} manualActivationCode - Manual Activation Code of the eSIM
1805
+ * @property {string} iosActivationLink - iOS Activation Link of the eSIM
1806
+ * @property {string} androidActivationLink - Android Activation Link of the eSIM
1782
1807
  */
1783
1808
  type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkResponseProfile>;
1784
1809
 
@@ -1889,21 +1914,20 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1889
1914
  referenceId?: string | null | undefined;
1890
1915
  }>>;
1891
1916
  /**
1892
- *
1893
- * @typedef {Purchases} purchases
1894
- * @property {string} - ID of the purchase
1895
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1896
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1897
- * @property {number} - Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90. `null` for unlimited (date-based) packages.
1898
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1899
- * @property {number} - Epoch value representing the start time of the package's validity
1900
- * @property {number} - Epoch value representing the end time of the package's validity
1901
- * @property {number} - Epoch value representing the date of creation of the purchase
1902
- * @property {Package_}
1903
- * @property {PurchasesEsim}
1904
- * @property {string} - 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'.
1905
- * @property {string} - 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).
1906
- * @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.
1917
+ * @typedef {Purchases} purchases
1918
+ * @property {string} id - ID of the purchase
1919
+ * @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1920
+ * @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1921
+ * @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.
1922
+ * @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1923
+ * @property {number} startTime - Epoch value representing the start time of the package's validity
1924
+ * @property {number} endTime - Epoch value representing the end time of the package's validity
1925
+ * @property {number} createdAt - Epoch value representing the date of creation of the purchase
1926
+ * @property {Package_} package
1927
+ * @property {PurchasesEsim} esim
1928
+ * @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'.
1929
+ * @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).
1930
+ * @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.
1907
1931
  */
1908
1932
  type Purchases = z.infer<typeof purchases>;
1909
1933
 
@@ -1938,15 +1962,14 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1938
1962
  destinationName: string;
1939
1963
  }>>;
1940
1964
  /**
1941
- *
1942
- * @typedef {Package_} package_
1943
- * @property {string} - ID of the package
1944
- * @property {number} - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
1945
- * @property {number} - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
1946
- * @property {string} - ISO3 representation of the package's destination.
1947
- * @property {string} - ISO2 representation of the package's destination.
1948
- * @property {string} - Name of the package's destination
1949
- * @property {number} - Price of the package in cents
1965
+ * @typedef {Package_} package_
1966
+ * @property {string} id - ID of the package
1967
+ * @property {number} dataLimitInBytes - Size of the package in Bytes. A value of `-1` indicates an unlimited package.
1968
+ * @property {number} dataLimitInGb - Size of the package in GB. A value of `-1` indicates an unlimited (date-based) package.
1969
+ * @property {string} destination - ISO3 representation of the package's destination.
1970
+ * @property {string} destinationIso2 - ISO2 representation of the package's destination.
1971
+ * @property {string} destinationName - Name of the package's destination
1972
+ * @property {number} priceInCents - Price of the package in cents
1950
1973
  */
1951
1974
  type Package_ = z.infer<typeof package_>;
1952
1975
 
@@ -1963,9 +1986,8 @@ declare const purchasesEsim: z.ZodLazy<z.ZodObject<{
1963
1986
  iccid: string;
1964
1987
  }>>;
1965
1988
  /**
1966
- *
1967
- * @typedef {PurchasesEsim} purchasesEsim
1968
- * @property {string} - ID of the eSIM
1989
+ * @typedef {PurchasesEsim} purchasesEsim
1990
+ * @property {string} iccid - ID of the eSIM
1969
1991
  */
1970
1992
  type PurchasesEsim = z.infer<typeof purchasesEsim>;
1971
1993
 
@@ -2000,15 +2022,14 @@ declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
2000
2022
  endTime?: number | null | undefined;
2001
2023
  }>>;
2002
2024
  /**
2003
- *
2004
- * @typedef {CreatePurchaseOkResponsePurchase} createPurchaseOkResponsePurchase
2005
- * @property {string} - ID of the purchase
2006
- * @property {string} - ID of the package
2007
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2008
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2009
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
2010
- * @property {number} - Epoch value representing the start time of the package's validity
2011
- * @property {number} - Epoch value representing the end time of the package's validity
2025
+ * @typedef {CreatePurchaseOkResponsePurchase} createPurchaseOkResponsePurchase
2026
+ * @property {string} id - ID of the purchase
2027
+ * @property {string} packageId - ID of the package
2028
+ * @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2029
+ * @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2030
+ * @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
2031
+ * @property {number} startTime - Epoch value representing the start time of the package's validity
2032
+ * @property {number} endTime - Epoch value representing the end time of the package's validity
2012
2033
  */
2013
2034
  type CreatePurchaseOkResponsePurchase = z.infer<typeof createPurchaseOkResponsePurchase>;
2014
2035
 
@@ -2031,11 +2052,10 @@ declare const createPurchaseOkResponseProfile: z.ZodLazy<z.ZodObject<{
2031
2052
  manualActivationCode: string;
2032
2053
  }>>;
2033
2054
  /**
2034
- *
2035
- * @typedef {CreatePurchaseOkResponseProfile} createPurchaseOkResponseProfile
2036
- * @property {string} - ID of the eSIM
2037
- * @property {string} - QR Code of the eSIM as base64
2038
- * @property {string} - Manual Activation Code of the eSIM
2055
+ * @typedef {CreatePurchaseOkResponseProfile} createPurchaseOkResponseProfile
2056
+ * @property {string} iccid - ID of the eSIM
2057
+ * @property {string} activationCode - QR Code of the eSIM as base64
2058
+ * @property {string} manualActivationCode - Manual Activation Code of the eSIM
2039
2059
  */
2040
2060
  type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponseProfile>;
2041
2061
 
@@ -2078,15 +2098,14 @@ declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
2078
2098
  endTime?: number | null | undefined;
2079
2099
  }>>;
2080
2100
  /**
2081
- *
2082
- * @typedef {TopUpEsimOkResponsePurchase} topUpEsimOkResponsePurchase
2083
- * @property {string} - ID of the purchase
2084
- * @property {string} - ID of the package
2085
- * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2086
- * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2087
- * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
2088
- * @property {number} - Epoch value representing the start time of the package's validity
2089
- * @property {number} - Epoch value representing the end time of the package's validity
2101
+ * @typedef {TopUpEsimOkResponsePurchase} topUpEsimOkResponsePurchase
2102
+ * @property {string} id - ID of the purchase
2103
+ * @property {string} packageId - ID of the package
2104
+ * @property {string} startDate - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2105
+ * @property {string} endDate - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
2106
+ * @property {string} createdDate - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
2107
+ * @property {number} startTime - Epoch value representing the start time of the package's validity
2108
+ * @property {number} endTime - Epoch value representing the end time of the package's validity
2090
2109
  */
2091
2110
  type TopUpEsimOkResponsePurchase = z.infer<typeof topUpEsimOkResponsePurchase>;
2092
2111
 
@@ -2103,9 +2122,8 @@ declare const topUpEsimOkResponseProfile: z.ZodLazy<z.ZodObject<{
2103
2122
  iccid: string;
2104
2123
  }>>;
2105
2124
  /**
2106
- *
2107
- * @typedef {TopUpEsimOkResponseProfile} topUpEsimOkResponseProfile
2108
- * @property {string} - ID of the eSIM
2125
+ * @typedef {TopUpEsimOkResponseProfile} topUpEsimOkResponseProfile
2126
+ * @property {string} iccid - ID of the eSIM
2109
2127
  */
2110
2128
  type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfile>;
2111
2129
 
@@ -2162,15 +2180,17 @@ declare const getEsimOkResponse: z.ZodLazy<z.ZodObject<{
2162
2180
  };
2163
2181
  }>>;
2164
2182
  /**
2165
- *
2166
- * @typedef {GetEsimOkResponse} getEsimOkResponse
2167
- * @property {GetEsimOkResponseEsim}
2183
+ * @typedef {GetEsimOkResponse} getEsimOkResponse
2184
+ * @property {GetEsimOkResponseEsim} esim
2168
2185
  */
2169
2186
  type GetEsimOkResponse = z.infer<typeof getEsimOkResponse>;
2170
2187
 
2171
2188
  interface GetEsimParams {
2172
2189
  iccid: string;
2173
2190
  }
2191
+ interface SuspendEsimParams {
2192
+ idempotencyKey?: string;
2193
+ }
2174
2194
 
2175
2195
  /**
2176
2196
  * Zod schema for the GetEsimDeviceOkResponse model.
@@ -2210,9 +2230,8 @@ declare const getEsimDeviceOkResponse: z.ZodLazy<z.ZodObject<{
2210
2230
  };
2211
2231
  }>>;
2212
2232
  /**
2213
- *
2214
- * @typedef {GetEsimDeviceOkResponse} getEsimDeviceOkResponse
2215
- * @property {Device}
2233
+ * @typedef {GetEsimDeviceOkResponse} getEsimDeviceOkResponse
2234
+ * @property {Device} device
2216
2235
  */
2217
2236
  type GetEsimDeviceOkResponse = z.infer<typeof getEsimDeviceOkResponse>;
2218
2237
 
@@ -2272,12 +2291,29 @@ declare const getEsimHistoryOkResponse: z.ZodLazy<z.ZodObject<{
2272
2291
  };
2273
2292
  }>>;
2274
2293
  /**
2275
- *
2276
- * @typedef {GetEsimHistoryOkResponse} getEsimHistoryOkResponse
2277
- * @property {GetEsimHistoryOkResponseEsim}
2294
+ * @typedef {GetEsimHistoryOkResponse} getEsimHistoryOkResponse
2295
+ * @property {GetEsimHistoryOkResponseEsim} esim
2278
2296
  */
2279
2297
  type GetEsimHistoryOkResponse = z.infer<typeof getEsimHistoryOkResponse>;
2280
2298
 
2299
+ /**
2300
+ * Zod schema for the SuspendEsimOkResponse model.
2301
+ * Defines the structure and validation rules for this data type.
2302
+ * This is the shape used in application code - what developers interact with.
2303
+ */
2304
+ declare const suspendEsimOkResponse: z.ZodLazy<z.ZodObject<{
2305
+ message: z.ZodString;
2306
+ }, "strip", z.ZodTypeAny, {
2307
+ message: string;
2308
+ }, {
2309
+ message: string;
2310
+ }>>;
2311
+ /**
2312
+ * @typedef {SuspendEsimOkResponse} suspendEsimOkResponse
2313
+ * @property {string} message - Confirmation message
2314
+ */
2315
+ type SuspendEsimOkResponse = z.infer<typeof suspendEsimOkResponse>;
2316
+
2281
2317
  /**
2282
2318
  * Service class for ESimService operations.
2283
2319
  * Provides methods to interact with ESimService-related API endpoints.
@@ -2287,6 +2323,7 @@ declare class ESimService extends BaseService {
2287
2323
  protected getEsimConfig?: Partial<SdkConfig>;
2288
2324
  protected getEsimDeviceConfig?: Partial<SdkConfig>;
2289
2325
  protected getEsimHistoryConfig?: Partial<SdkConfig>;
2326
+ protected suspendEsimConfig?: Partial<SdkConfig>;
2290
2327
  /**
2291
2328
  * Sets method-level configuration for getEsim.
2292
2329
  * @param config - Partial configuration to override service-level defaults
@@ -2305,6 +2342,12 @@ declare class ESimService extends BaseService {
2305
2342
  * @returns This service instance for method chaining
2306
2343
  */
2307
2344
  setGetEsimHistoryConfig(config: Partial<SdkConfig>): this;
2345
+ /**
2346
+ * Sets method-level configuration for suspendEsim.
2347
+ * @param config - Partial configuration to override service-level defaults
2348
+ * @returns This service instance for method chaining
2349
+ */
2350
+ setSuspendEsimConfig(config: Partial<SdkConfig>): this;
2308
2351
  /**
2309
2352
  * Get eSIM
2310
2353
  * @param {string} params.iccid - ID of the eSIM
@@ -2326,6 +2369,14 @@ declare class ESimService extends BaseService {
2326
2369
  * @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} - Successful Response
2327
2370
  */
2328
2371
  getEsimHistory(iccid: string, requestConfig?: Partial<SdkConfig>): Promise<GetEsimHistoryOkResponse>;
2372
+ /**
2373
+ * Suspends an eSIM to prevent abuse. All of the eSIM's packages are terminated and its connectivity is switched off. The eSIM is not refunded: the charge stays.
2374
+ * @param {string} iccid - ID of the eSIM
2375
+ * @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
2376
+ * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
2377
+ * @returns {Promise<HttpResponse<SuspendEsimOkResponse>>} - Successful Response
2378
+ */
2379
+ suspendEsim(iccid: string, params?: SuspendEsimParams, requestConfig?: Partial<SdkConfig>): Promise<SuspendEsimOkResponse>;
2329
2380
  }
2330
2381
 
2331
2382
  /**
@@ -2359,15 +2410,14 @@ declare const getEsimOkResponseEsim: z.ZodLazy<z.ZodObject<{
2359
2410
  isTopUpAllowed: boolean;
2360
2411
  }>>;
2361
2412
  /**
2362
- *
2363
- * @typedef {GetEsimOkResponseEsim} getEsimOkResponseEsim
2364
- * @property {string} - ID of the eSIM
2365
- * @property {string} - SM-DP+ Address
2366
- * @property {string} - QR Code of the eSIM as base64
2367
- * @property {string} - The manual activation code
2368
- * @property {string} - Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
2369
- * @property {string} - Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
2370
- * @property {boolean} - Indicates whether the eSIM is currently eligible for a top-up. This flag should be checked before attempting a top-up request.
2413
+ * @typedef {GetEsimOkResponseEsim} getEsimOkResponseEsim
2414
+ * @property {string} iccid - ID of the eSIM
2415
+ * @property {string} smdpAddress - SM-DP+ Address
2416
+ * @property {string} activationCode - QR Code of the eSIM as base64
2417
+ * @property {string} manualActivationCode - The manual activation code
2418
+ * @property {string} status - Status of the eSIM, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
2419
+ * @property {string} connectivityStatus - Status of the eSIM connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
2420
+ * @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.
2371
2421
  */
2372
2422
  type GetEsimOkResponseEsim = z.infer<typeof getEsimOkResponseEsim>;
2373
2423
 
@@ -2393,12 +2443,11 @@ declare const device: z.ZodLazy<z.ZodObject<{
2393
2443
  eid: string;
2394
2444
  }>>;
2395
2445
  /**
2396
- *
2397
- * @typedef {Device} device
2398
- * @property {string} - Name of the OEM
2399
- * @property {string} - Name of the Device
2400
- * @property {string} - Model of the Device
2401
- * @property {string} - Serial Number of the eSIM
2446
+ * @typedef {Device} device
2447
+ * @property {string} oem - Name of the OEM
2448
+ * @property {string} hardwareName - Name of the Device
2449
+ * @property {string} hardwareModel - Model of the Device
2450
+ * @property {string} eid - Serial Number of the eSIM
2402
2451
  */
2403
2452
  type Device = z.infer<typeof device>;
2404
2453
 
@@ -2438,10 +2487,9 @@ declare const getEsimHistoryOkResponseEsim: z.ZodLazy<z.ZodObject<{
2438
2487
  }[];
2439
2488
  }>>;
2440
2489
  /**
2441
- *
2442
- * @typedef {GetEsimHistoryOkResponseEsim} getEsimHistoryOkResponseEsim
2443
- * @property {string} - ID of the eSIM
2444
- * @property {History[]}
2490
+ * @typedef {GetEsimHistoryOkResponseEsim} getEsimHistoryOkResponseEsim
2491
+ * @property {string} iccid - ID of the eSIM
2492
+ * @property {History[]} history
2445
2493
  */
2446
2494
  type GetEsimHistoryOkResponseEsim = z.infer<typeof getEsimHistoryOkResponseEsim>;
2447
2495
 
@@ -2464,11 +2512,10 @@ declare const history: z.ZodLazy<z.ZodObject<{
2464
2512
  date?: number | undefined;
2465
2513
  }>>;
2466
2514
  /**
2467
- *
2468
- * @typedef {History} history
2469
- * @property {string} - The status of the eSIM at a given time, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
2470
- * @property {string} - The date when the eSIM status changed in the format 'yyyy-MM-ddThh:mm:ssZZ'
2471
- * @property {number} - Epoch value representing the date when the eSIM status changed
2515
+ * @typedef {History} history
2516
+ * @property {string} status - The status of the eSIM at a given time, possible values are 'RELEASED', 'DOWNLOADED', 'INSTALLED', 'ENABLED', 'DELETED', or 'ERROR'
2517
+ * @property {string} statusDate - The date when the eSIM status changed in the format 'yyyy-MM-ddThh:mm:ssZZ'
2518
+ * @property {number} date - Epoch value representing the date when the eSIM status changed
2472
2519
  */
2473
2520
  type History = z.infer<typeof history>;
2474
2521
 
@@ -2485,9 +2532,8 @@ declare const tokenOkResponse: z.ZodLazy<z.ZodObject<{
2485
2532
  token: string;
2486
2533
  }>>;
2487
2534
  /**
2488
- *
2489
- * @typedef {TokenOkResponse} tokenOkResponse
2490
- * @property {string} - The generated token
2535
+ * @typedef {TokenOkResponse} tokenOkResponse
2536
+ * @property {string} token - The generated token
2491
2537
  */
2492
2538
  type TokenOkResponse = z.infer<typeof tokenOkResponse>;
2493
2539
 
@@ -2534,12 +2580,11 @@ declare const oAuthTokenRequest: z.ZodLazy<z.ZodObject<{
2534
2580
  scope: string;
2535
2581
  }>>;
2536
2582
  /**
2537
- *
2538
- * @typedef {OAuthTokenRequest} oAuthTokenRequest
2539
- * @property {GrantType}
2540
- * @property {string}
2541
- * @property {string}
2542
- * @property {string}
2583
+ * @typedef {OAuthTokenRequest} oAuthTokenRequest
2584
+ * @property {GrantType} grantType
2585
+ * @property {string} clientId
2586
+ * @property {string} clientSecret
2587
+ * @property {string} scope
2543
2588
  */
2544
2589
  type OAuthTokenRequest = z.infer<typeof oAuthTokenRequest>;
2545
2590
 
@@ -2559,10 +2604,9 @@ declare const oAuthTokenResponse: z.ZodLazy<z.ZodObject<{
2559
2604
  expiresIn?: number | null | undefined;
2560
2605
  }>>;
2561
2606
  /**
2562
- *
2563
- * @typedef {OAuthTokenResponse} oAuthTokenResponse
2564
- * @property {string}
2565
- * @property {number}
2607
+ * @typedef {OAuthTokenResponse} oAuthTokenResponse
2608
+ * @property {string} accessToken
2609
+ * @property {number} expiresIn
2566
2610
  */
2567
2611
  type OAuthTokenResponse = z.infer<typeof oAuthTokenResponse>;
2568
2612
 
@@ -2591,17 +2635,11 @@ declare enum GrantType {
2591
2635
  CLIENT_CREDENTIALS = "client_credentials"
2592
2636
  }
2593
2637
 
2594
- declare class BadRequest extends ThrowableError {
2595
- message: string;
2596
- protected response?: unknown;
2597
- constructor(message: string, response?: unknown);
2598
- throw(): void;
2599
- }
2600
-
2601
- declare class Unauthorized extends ThrowableError {
2638
+ declare class ErrorResponse extends ThrowableError {
2602
2639
  message: string;
2603
2640
  protected response?: unknown;
2604
2641
  constructor(message: string, response?: unknown);
2642
+ static from(message: string, response?: unknown): ErrorResponse;
2605
2643
  throw(): void;
2606
2644
  }
2607
2645
 
@@ -2623,4 +2661,4 @@ declare class Celitech {
2623
2661
  set accessToken(accessToken: string);
2624
2662
  }
2625
2663
 
2626
- 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 };
2664
+ export { Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, CreatePurchaseRequestLanguage, CreatePurchaseV2OkResponse, CreatePurchaseV2OkResponseProfile, CreatePurchaseV2OkResponsePurchase, CreatePurchaseV2Request, CreatePurchaseV2RequestLanguage, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment, ErrorResponse, 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, SuspendEsimOkResponse, TokenOkResponse, TopUpEsimOkResponse, TopUpEsimOkResponseProfile, TopUpEsimOkResponsePurchase, TopUpEsimRequest, ValidationOptions };