celitech-sdk 1.3.38 → 1.3.43

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
@@ -4,7 +4,7 @@ declare enum Environment {
4
4
  DEFAULT = "https://api.celitech.net/v1"
5
5
  }
6
6
 
7
- type HttpMethod$1 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
7
+ type HttpMethod$1 = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
8
8
  interface HttpRequest {
9
9
  baseUrl: string;
10
10
  method: HttpMethod$1;
@@ -59,11 +59,23 @@ declare class OAuthTokenManager {
59
59
  getToken(scopes: Set<string>, config: SdkConfig): Promise<OAuthToken>;
60
60
  }
61
61
 
62
+ declare class ThrowableError extends Error {
63
+ message: string;
64
+ protected response?: unknown;
65
+ constructor(message: string, response?: unknown);
66
+ throw(): void;
67
+ }
68
+
62
69
  interface ResponseDefinition {
63
70
  schema: ZodType;
64
71
  contentType: ContentType;
65
72
  status: number;
66
73
  }
74
+ interface ErrorDefinition {
75
+ error: new (...args: any[]) => ThrowableError;
76
+ contentType: ContentType;
77
+ status: number;
78
+ }
67
79
  interface CreateRequestParameters<Page = unknown[]> {
68
80
  baseUrl: string;
69
81
  method: HttpMethod;
@@ -74,6 +86,7 @@ interface CreateRequestParameters<Page = unknown[]> {
74
86
  path: string;
75
87
  config: SdkConfig;
76
88
  responses: ResponseDefinition[];
89
+ errors: ErrorDefinition[];
77
90
  requestSchema: ZodType;
78
91
  requestContentType: ContentType;
79
92
  validation: ValidationOptions;
@@ -96,6 +109,7 @@ interface RequestPagination<Page> {
96
109
  pagePath: string[];
97
110
  pageSchema?: ZodType<Page, any, any>;
98
111
  }
112
+
99
113
  declare class Request<PageSchema = unknown[]> {
100
114
  baseUrl: string;
101
115
  headers: Map<string, RequestParameter>;
@@ -106,6 +120,7 @@ declare class Request<PageSchema = unknown[]> {
106
120
  path: string;
107
121
  config: SdkConfig;
108
122
  responses: ResponseDefinition[];
123
+ errors: ErrorDefinition[];
109
124
  requestSchema: ZodType;
110
125
  requestContentType: ContentType;
111
126
  validation: ValidationOptions;
@@ -129,17 +144,26 @@ declare class Request<PageSchema = unknown[]> {
129
144
  private getAllParams;
130
145
  }
131
146
 
132
- type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD';
133
- interface SdkConfig {
147
+ type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE' | 'HEAD' | 'OPTIONS';
148
+ interface BaseConfig {
149
+ retry?: RetryOptions;
150
+ validation?: ValidationOptions;
134
151
  baseUrl?: string;
135
152
  environment?: Environment;
136
153
  timeoutMs?: number;
154
+ oAuthBaseUrl?: string;
155
+ }
156
+ interface ClientCredentialAuthConfig extends BaseConfig {
137
157
  clientId: string;
138
158
  clientSecret: string;
139
- oAuthBaseUrl?: string;
140
- retry?: RetryOptions;
141
- validation?: ValidationOptions;
159
+ accessToken?: never;
160
+ }
161
+ interface TokenAuthConfig extends BaseConfig {
162
+ clientId?: never;
163
+ clientSecret?: never;
164
+ accessToken: string;
142
165
  }
166
+ type SdkConfig = ClientCredentialAuthConfig | TokenAuthConfig;
143
167
  interface HttpMetadata {
144
168
  status: number;
145
169
  statusText: string;
@@ -166,6 +190,7 @@ declare enum ContentType {
166
190
  interface RequestConfig {
167
191
  retry?: RetryOptions;
168
192
  validation?: ValidationOptions;
193
+ baseUrl?: string;
169
194
  }
170
195
  interface RetryOptions {
171
196
  attempts: number;
@@ -211,6 +236,7 @@ declare class BaseService {
211
236
  set clientId(clientId: string);
212
237
  set clientSecret(clientSecret: string);
213
238
  set oAuthBaseUrl(oAuthBaseUrl: string);
239
+ set accessToken(accessToken: string);
214
240
  }
215
241
 
216
242
  /**
@@ -266,6 +292,7 @@ type GetAccessTokenOkResponse = z.infer<typeof getAccessTokenOkResponse>;
266
292
  declare class OAuthService extends BaseService {
267
293
  /**
268
294
  * This endpoint was added by liblab
295
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
269
296
  * @returns {Promise<HttpResponse<GetAccessTokenOkResponse>>} Successful Response
270
297
  */
271
298
  getAccessToken(body: GetAccessTokenRequest, requestConfig?: RequestConfig): Promise<HttpResponse<GetAccessTokenOkResponse>>;
@@ -315,6 +342,7 @@ type ListDestinationsOkResponse = z.infer<typeof listDestinationsOkResponse>;
315
342
  declare class DestinationsService extends BaseService {
316
343
  /**
317
344
  * List Destinations
345
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
318
346
  * @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} Successful Response
319
347
  */
320
348
  listDestinations(requestConfig?: RequestConfig): Promise<HttpResponse<ListDestinationsOkResponse>>;
@@ -345,6 +373,20 @@ declare const destinations: z.ZodLazy<z.ZodObject<{
345
373
  */
346
374
  type Destinations = z.infer<typeof destinations>;
347
375
 
376
+ declare class __ extends ThrowableError {
377
+ message: string;
378
+ protected response?: unknown;
379
+ constructor(message: string, response?: unknown);
380
+ throw(): void;
381
+ }
382
+
383
+ declare class _1 extends ThrowableError {
384
+ message: string;
385
+ protected response?: unknown;
386
+ constructor(message: string, response?: unknown);
387
+ throw(): void;
388
+ }
389
+
348
390
  /**
349
391
  * The shape of the model inside the application code - what the users use
350
392
  */
@@ -405,6 +447,8 @@ interface ListPackagesParams {
405
447
  destination?: string;
406
448
  startDate?: string;
407
449
  endDate?: string;
450
+ dataLimitInGb?: number;
451
+ includeUnlimited?: boolean;
408
452
  afterCursor?: string;
409
453
  limit?: number;
410
454
  startTime?: number;
@@ -414,17 +458,25 @@ interface ListPackagesParams {
414
458
 
415
459
  declare class PackagesService extends BaseService {
416
460
  /**
417
- * List Packages
418
- * @param {string} [destination] - ISO representation of the package's destination.
419
- * @param {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.
420
- * @param {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.
421
- * @param {string} [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.
422
- * @param {number} [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
423
- * @param {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
424
- * @param {number} [endTime] - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time
425
- * @param {number} [duration] - Duration in seconds for the package's validity. If this parameter is present, it will override the startTime and endTime parameters. The maximum duration for a package's validity period is 90 days
426
- * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
427
- */
461
+ * List Packages
462
+ * @param {string} [params.destination] - ISO representation of the package's destination.
463
+ * @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.
464
+ * @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.
465
+ * @param {number} [params.dataLimitInGb] - Size of the package in GB.
466
+
467
+ For **limited packages**, the available options are: **0.5, 1, 2, 3, 5, 8, 20GB**.
468
+
469
+ For **unlimited packages** (available to Region-3), please use **-1** as an identifier.
470
+
471
+ * @param {boolean} [params.includeUnlimited] - A boolean flag to include the **unlimited packages** in the response. The flag is false by default.
472
+ * @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.
473
+ * @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
474
+ * @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
475
+ * @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
476
+ * @param {number} [params.duration] - Duration in seconds for the package's validity. If this parameter is present, it will override the startTime and endTime parameters. The maximum duration for a package's validity period is 90 days
477
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
478
+ * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
479
+ */
428
480
  listPackages(params?: ListPackagesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListPackagesOkResponse>>;
429
481
  }
430
482
 
@@ -457,25 +509,148 @@ declare const packages: z.ZodLazy<z.ZodObject<{
457
509
  *
458
510
  * @typedef {Packages} packages
459
511
  * @property {string} - ID of the package
460
- * @property {string} - ISO representation of the package's destination
461
- * @property {number} - Size of the package in Bytes
512
+ * @property {string} - ISO representation of the package's destination.
513
+ * @property {number} - Size of the package in bytes. For ``limited packages``, this field will return the data limit in bytes. For ``unlimited packages``, it will return ``-1`` as an identifier.
514
+
462
515
  * @property {number} - Min number of days for the package
463
516
  * @property {number} - Max number of days for the package
464
517
  * @property {number} - Price of the package in cents
465
518
  */
466
519
  type Packages = z.infer<typeof packages>;
467
520
 
521
+ declare class _2 extends ThrowableError {
522
+ message: string;
523
+ protected response?: unknown;
524
+ constructor(message: string, response?: unknown);
525
+ throw(): void;
526
+ }
527
+
528
+ declare class _3 extends ThrowableError {
529
+ message: string;
530
+ protected response?: unknown;
531
+ constructor(message: string, response?: unknown);
532
+ throw(): void;
533
+ }
534
+
535
+ /**
536
+ * The shape of the model inside the application code - what the users use
537
+ */
538
+ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
539
+ destination: z.ZodString;
540
+ dataLimitInGb: z.ZodNumber;
541
+ quantity: z.ZodNumber;
542
+ email: z.ZodOptional<z.ZodString>;
543
+ referenceId: z.ZodOptional<z.ZodString>;
544
+ networkBrand: z.ZodOptional<z.ZodString>;
545
+ emailBrand: z.ZodOptional<z.ZodString>;
546
+ }, "strip", z.ZodTypeAny, {
547
+ destination: string;
548
+ dataLimitInGb: number;
549
+ quantity: number;
550
+ email?: string | undefined;
551
+ referenceId?: string | undefined;
552
+ networkBrand?: string | undefined;
553
+ emailBrand?: string | undefined;
554
+ }, {
555
+ destination: string;
556
+ dataLimitInGb: number;
557
+ quantity: number;
558
+ email?: string | undefined;
559
+ referenceId?: string | undefined;
560
+ networkBrand?: string | undefined;
561
+ emailBrand?: string | undefined;
562
+ }>>;
563
+ /**
564
+ *
565
+ * @typedef {CreatePurchaseV2Request} createPurchaseV2Request
566
+ * @property {string} - ISO representation of the package's destination.
567
+ * @property {number} - Size of the package in GB.
568
+
569
+ For ``limited packages``, the available options are: ``0.5, 1, 2, 3, 5, 8, 20GB`` (supports `duration` or `startDate` / `endDate`).
570
+
571
+ For ``unlimited packages`` (available to Region-3), please use ``-1`` as an identifier (supports `duration` only).
572
+
573
+ * @property {number} - Number of eSIMs to purchase.
574
+ * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
575
+ * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
576
+ * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters and numbers. This feature is available to platforms with Diamond tier only.
577
+ * @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.
578
+ */
579
+ type CreatePurchaseV2Request = z.infer<typeof createPurchaseV2Request>;
580
+
581
+ /**
582
+ * The shape of the model inside the application code - what the users use
583
+ */
584
+ declare const createPurchaseV2OkResponse: z.ZodLazy<z.ZodObject<{
585
+ purchase: z.ZodOptional<z.ZodLazy<z.ZodObject<{
586
+ id: z.ZodOptional<z.ZodString>;
587
+ packageId: z.ZodOptional<z.ZodString>;
588
+ createdDate: z.ZodOptional<z.ZodString>;
589
+ }, "strip", z.ZodTypeAny, {
590
+ id?: string | undefined;
591
+ packageId?: string | undefined;
592
+ createdDate?: string | undefined;
593
+ }, {
594
+ id?: string | undefined;
595
+ packageId?: string | undefined;
596
+ createdDate?: string | undefined;
597
+ }>>>;
598
+ profile: z.ZodOptional<z.ZodLazy<z.ZodObject<{
599
+ iccid: z.ZodOptional<z.ZodString>;
600
+ activationCode: z.ZodOptional<z.ZodString>;
601
+ manualActivationCode: z.ZodOptional<z.ZodString>;
602
+ }, "strip", z.ZodTypeAny, {
603
+ iccid?: string | undefined;
604
+ activationCode?: string | undefined;
605
+ manualActivationCode?: string | undefined;
606
+ }, {
607
+ iccid?: string | undefined;
608
+ activationCode?: string | undefined;
609
+ manualActivationCode?: string | undefined;
610
+ }>>>;
611
+ }, "strip", z.ZodTypeAny, {
612
+ purchase?: {
613
+ id?: string | undefined;
614
+ packageId?: string | undefined;
615
+ createdDate?: string | undefined;
616
+ } | undefined;
617
+ profile?: {
618
+ iccid?: string | undefined;
619
+ activationCode?: string | undefined;
620
+ manualActivationCode?: string | undefined;
621
+ } | undefined;
622
+ }, {
623
+ purchase?: {
624
+ id?: string | undefined;
625
+ packageId?: string | undefined;
626
+ createdDate?: string | undefined;
627
+ } | undefined;
628
+ profile?: {
629
+ iccid?: string | undefined;
630
+ activationCode?: string | undefined;
631
+ manualActivationCode?: string | undefined;
632
+ } | undefined;
633
+ }>>;
634
+ /**
635
+ *
636
+ * @typedef {CreatePurchaseV2OkResponse} createPurchaseV2OkResponse
637
+ * @property {CreatePurchaseV2OkResponsePurchase}
638
+ * @property {CreatePurchaseV2OkResponseProfile}
639
+ */
640
+ type CreatePurchaseV2OkResponse = z.infer<typeof createPurchaseV2OkResponse>;
641
+
468
642
  /**
469
643
  * The shape of the model inside the application code - what the users use
470
644
  */
471
645
  declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
472
646
  purchases: z.ZodOptional<z.ZodArray<z.ZodLazy<z.ZodObject<{
473
647
  id: z.ZodOptional<z.ZodString>;
474
- startDate: z.ZodOptional<z.ZodString>;
475
- endDate: z.ZodOptional<z.ZodString>;
648
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
649
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
650
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
476
651
  createdDate: z.ZodOptional<z.ZodString>;
477
- startTime: z.ZodOptional<z.ZodNumber>;
478
- endTime: z.ZodOptional<z.ZodNumber>;
652
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
653
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
479
654
  createdAt: z.ZodOptional<z.ZodNumber>;
480
655
  package: z.ZodOptional<z.ZodLazy<z.ZodObject<{
481
656
  id: z.ZodOptional<z.ZodString>;
@@ -504,14 +679,16 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
504
679
  iccid?: string | undefined;
505
680
  }>>>;
506
681
  source: z.ZodOptional<z.ZodString>;
682
+ purchaseType: z.ZodOptional<z.ZodString>;
507
683
  referenceId: z.ZodOptional<z.ZodString>;
508
684
  }, "strip", z.ZodTypeAny, {
509
685
  id?: string | undefined;
510
- startDate?: string | undefined;
511
- endDate?: string | undefined;
686
+ startDate?: string | null | undefined;
687
+ endDate?: string | null | undefined;
688
+ duration?: number | null | undefined;
512
689
  createdDate?: string | undefined;
513
- startTime?: number | undefined;
514
- endTime?: number | undefined;
690
+ startTime?: number | null | undefined;
691
+ endTime?: number | null | undefined;
515
692
  createdAt?: number | undefined;
516
693
  package?: {
517
694
  id?: string | undefined;
@@ -524,14 +701,16 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
524
701
  iccid?: string | undefined;
525
702
  } | undefined;
526
703
  source?: string | undefined;
704
+ purchaseType?: string | undefined;
527
705
  referenceId?: string | undefined;
528
706
  }, {
529
707
  id?: string | undefined;
530
- startDate?: string | undefined;
531
- endDate?: string | undefined;
708
+ startDate?: string | null | undefined;
709
+ endDate?: string | null | undefined;
710
+ duration?: number | null | undefined;
532
711
  createdDate?: string | undefined;
533
- startTime?: number | undefined;
534
- endTime?: number | undefined;
712
+ startTime?: number | null | undefined;
713
+ endTime?: number | null | undefined;
535
714
  createdAt?: number | undefined;
536
715
  package?: {
537
716
  id?: string | undefined;
@@ -544,17 +723,19 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
544
723
  iccid?: string | undefined;
545
724
  } | undefined;
546
725
  source?: string | undefined;
726
+ purchaseType?: string | undefined;
547
727
  referenceId?: string | undefined;
548
728
  }>>, "many">>;
549
729
  afterCursor: z.ZodNullable<z.ZodOptional<z.ZodString>>;
550
730
  }, "strip", z.ZodTypeAny, {
551
731
  purchases?: {
552
732
  id?: string | undefined;
553
- startDate?: string | undefined;
554
- endDate?: string | undefined;
733
+ startDate?: string | null | undefined;
734
+ endDate?: string | null | undefined;
735
+ duration?: number | null | undefined;
555
736
  createdDate?: string | undefined;
556
- startTime?: number | undefined;
557
- endTime?: number | undefined;
737
+ startTime?: number | null | undefined;
738
+ endTime?: number | null | undefined;
558
739
  createdAt?: number | undefined;
559
740
  package?: {
560
741
  id?: string | undefined;
@@ -567,17 +748,19 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
567
748
  iccid?: string | undefined;
568
749
  } | undefined;
569
750
  source?: string | undefined;
751
+ purchaseType?: string | undefined;
570
752
  referenceId?: string | undefined;
571
753
  }[] | undefined;
572
754
  afterCursor?: string | null | undefined;
573
755
  }, {
574
756
  purchases?: {
575
757
  id?: string | undefined;
576
- startDate?: string | undefined;
577
- endDate?: string | undefined;
758
+ startDate?: string | null | undefined;
759
+ endDate?: string | null | undefined;
760
+ duration?: number | null | undefined;
578
761
  createdDate?: string | undefined;
579
- startTime?: number | undefined;
580
- endTime?: number | undefined;
762
+ startTime?: number | null | undefined;
763
+ endTime?: number | null | undefined;
581
764
  createdAt?: number | undefined;
582
765
  package?: {
583
766
  id?: string | undefined;
@@ -590,6 +773,7 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
590
773
  iccid?: string | undefined;
591
774
  } | undefined;
592
775
  source?: string | undefined;
776
+ purchaseType?: string | undefined;
593
777
  referenceId?: string | undefined;
594
778
  }[] | undefined;
595
779
  afterCursor?: string | null | undefined;
@@ -624,6 +808,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
624
808
  email: z.ZodOptional<z.ZodString>;
625
809
  referenceId: z.ZodOptional<z.ZodString>;
626
810
  networkBrand: z.ZodOptional<z.ZodString>;
811
+ emailBrand: z.ZodOptional<z.ZodString>;
627
812
  startTime: z.ZodOptional<z.ZodNumber>;
628
813
  endTime: z.ZodOptional<z.ZodNumber>;
629
814
  }, "strip", z.ZodTypeAny, {
@@ -634,6 +819,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
634
819
  email?: string | undefined;
635
820
  referenceId?: string | undefined;
636
821
  networkBrand?: string | undefined;
822
+ emailBrand?: string | undefined;
637
823
  startTime?: number | undefined;
638
824
  endTime?: number | undefined;
639
825
  }, {
@@ -644,19 +830,21 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
644
830
  email?: string | undefined;
645
831
  referenceId?: string | undefined;
646
832
  networkBrand?: string | undefined;
833
+ emailBrand?: string | undefined;
647
834
  startTime?: number | undefined;
648
835
  endTime?: number | undefined;
649
836
  }>>;
650
837
  /**
651
838
  *
652
839
  * @typedef {CreatePurchaseRequest} createPurchaseRequest
653
- * @property {string} - ISO representation of the package's destination
654
- * @property {number} - Size of the package in GB. The available options are 1, 2, 3, 5, 8, 20GB
840
+ * @property {string} - ISO representation of the package's destination.
841
+ * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20GB
655
842
  * @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.
656
843
  * @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.
657
844
  * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
658
845
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
659
- * @property {string} - Customize the network brand of the issued eSIM. This parameter is accessible to platforms with Diamond tier and requires an alphanumeric string of up to 15 characters
846
+ * @property {string} - Customize the network brand of the issued eSIM. The `networkBrand` parameter cannot exceed 15 characters in length and must contain only letters and numbers. This feature is available to platforms with Diamond tier only.
847
+ * @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.
660
848
  * @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.
661
849
  * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
662
850
  */
@@ -669,27 +857,27 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
669
857
  purchase: z.ZodOptional<z.ZodLazy<z.ZodObject<{
670
858
  id: z.ZodOptional<z.ZodString>;
671
859
  packageId: z.ZodOptional<z.ZodString>;
672
- startDate: z.ZodOptional<z.ZodString>;
673
- endDate: z.ZodOptional<z.ZodString>;
860
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
861
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
674
862
  createdDate: z.ZodOptional<z.ZodString>;
675
- startTime: z.ZodOptional<z.ZodNumber>;
676
- endTime: z.ZodOptional<z.ZodNumber>;
863
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
864
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
677
865
  }, "strip", z.ZodTypeAny, {
678
866
  id?: string | undefined;
679
867
  packageId?: string | undefined;
680
- startDate?: string | undefined;
681
- endDate?: string | undefined;
868
+ startDate?: string | null | undefined;
869
+ endDate?: string | null | undefined;
682
870
  createdDate?: string | undefined;
683
- startTime?: number | undefined;
684
- endTime?: number | undefined;
871
+ startTime?: number | null | undefined;
872
+ endTime?: number | null | undefined;
685
873
  }, {
686
874
  id?: string | undefined;
687
875
  packageId?: string | undefined;
688
- startDate?: string | undefined;
689
- endDate?: string | undefined;
876
+ startDate?: string | null | undefined;
877
+ endDate?: string | null | undefined;
690
878
  createdDate?: string | undefined;
691
- startTime?: number | undefined;
692
- endTime?: number | undefined;
879
+ startTime?: number | null | undefined;
880
+ endTime?: number | null | undefined;
693
881
  }>>>;
694
882
  profile: z.ZodOptional<z.ZodLazy<z.ZodObject<{
695
883
  iccid: z.ZodOptional<z.ZodString>;
@@ -708,11 +896,11 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
708
896
  purchase?: {
709
897
  id?: string | undefined;
710
898
  packageId?: string | undefined;
711
- startDate?: string | undefined;
712
- endDate?: string | undefined;
899
+ startDate?: string | null | undefined;
900
+ endDate?: string | null | undefined;
713
901
  createdDate?: string | undefined;
714
- startTime?: number | undefined;
715
- endTime?: number | undefined;
902
+ startTime?: number | null | undefined;
903
+ endTime?: number | null | undefined;
716
904
  } | undefined;
717
905
  profile?: {
718
906
  iccid?: string | undefined;
@@ -723,11 +911,11 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
723
911
  purchase?: {
724
912
  id?: string | undefined;
725
913
  packageId?: string | undefined;
726
- startDate?: string | undefined;
727
- endDate?: string | undefined;
914
+ startDate?: string | null | undefined;
915
+ endDate?: string | null | undefined;
728
916
  createdDate?: string | undefined;
729
- startTime?: number | undefined;
730
- endTime?: number | undefined;
917
+ startTime?: number | null | undefined;
918
+ endTime?: number | null | undefined;
731
919
  } | undefined;
732
920
  profile?: {
733
921
  iccid?: string | undefined;
@@ -749,28 +937,25 @@ type CreatePurchaseOkResponse = z.infer<typeof createPurchaseOkResponse>;
749
937
  declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
750
938
  iccid: z.ZodString;
751
939
  dataLimitInGb: z.ZodNumber;
752
- startDate: z.ZodString;
753
- endDate: z.ZodString;
754
940
  email: z.ZodOptional<z.ZodString>;
755
941
  referenceId: z.ZodOptional<z.ZodString>;
942
+ emailBrand: z.ZodOptional<z.ZodString>;
756
943
  startTime: z.ZodOptional<z.ZodNumber>;
757
944
  endTime: z.ZodOptional<z.ZodNumber>;
758
945
  }, "strip", z.ZodTypeAny, {
759
- startDate: string;
760
- endDate: string;
761
- iccid: string;
762
946
  dataLimitInGb: number;
947
+ iccid: string;
763
948
  email?: string | undefined;
764
949
  referenceId?: string | undefined;
950
+ emailBrand?: string | undefined;
765
951
  startTime?: number | undefined;
766
952
  endTime?: number | undefined;
767
953
  }, {
768
- startDate: string;
769
- endDate: string;
770
- iccid: string;
771
954
  dataLimitInGb: number;
955
+ iccid: string;
772
956
  email?: string | undefined;
773
957
  referenceId?: string | undefined;
958
+ emailBrand?: string | undefined;
774
959
  startTime?: number | undefined;
775
960
  endTime?: number | undefined;
776
961
  }>>;
@@ -778,11 +963,15 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
778
963
  *
779
964
  * @typedef {TopUpEsimRequest} topUpEsimRequest
780
965
  * @property {string} - ID of the eSIM
781
- * @property {number} - Size of the package in GB. The available options are 1, 2, 3, 5, 8, 20GB
782
- * @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.
783
- * @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.
784
- * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps)
966
+ * @property {number} - Size of the package in GB.
967
+
968
+ For ``limited packages``, the available options are: ``0.5, 1, 2, 3, 5, 8, 20GB`` (supports `duration` or `startDate` / `endDate`).
969
+
970
+ For ``unlimited packages`` (available to Region-3), please use ``-1`` as an identifier (supports `duration` only).
971
+
972
+ * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
785
973
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
974
+ * @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.
786
975
  * @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.
787
976
  * @property {number} - Epoch value representing the end time of the package's validity. End time can be maximum 90 days after Start time.
788
977
  */
@@ -795,27 +984,30 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
795
984
  purchase: z.ZodOptional<z.ZodLazy<z.ZodObject<{
796
985
  id: z.ZodOptional<z.ZodString>;
797
986
  packageId: z.ZodOptional<z.ZodString>;
798
- startDate: z.ZodOptional<z.ZodString>;
799
- endDate: z.ZodOptional<z.ZodString>;
987
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
988
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
989
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
800
990
  createdDate: z.ZodOptional<z.ZodString>;
801
- startTime: z.ZodOptional<z.ZodNumber>;
802
- endTime: z.ZodOptional<z.ZodNumber>;
991
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
992
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
803
993
  }, "strip", z.ZodTypeAny, {
804
994
  id?: string | undefined;
805
995
  packageId?: string | undefined;
806
- startDate?: string | undefined;
807
- endDate?: string | undefined;
996
+ startDate?: string | null | undefined;
997
+ endDate?: string | null | undefined;
998
+ duration?: number | null | undefined;
808
999
  createdDate?: string | undefined;
809
- startTime?: number | undefined;
810
- endTime?: number | undefined;
1000
+ startTime?: number | null | undefined;
1001
+ endTime?: number | null | undefined;
811
1002
  }, {
812
1003
  id?: string | undefined;
813
1004
  packageId?: string | undefined;
814
- startDate?: string | undefined;
815
- endDate?: string | undefined;
1005
+ startDate?: string | null | undefined;
1006
+ endDate?: string | null | undefined;
1007
+ duration?: number | null | undefined;
816
1008
  createdDate?: string | undefined;
817
- startTime?: number | undefined;
818
- endTime?: number | undefined;
1009
+ startTime?: number | null | undefined;
1010
+ endTime?: number | null | undefined;
819
1011
  }>>>;
820
1012
  profile: z.ZodOptional<z.ZodLazy<z.ZodObject<{
821
1013
  iccid: z.ZodOptional<z.ZodString>;
@@ -828,11 +1020,12 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
828
1020
  purchase?: {
829
1021
  id?: string | undefined;
830
1022
  packageId?: string | undefined;
831
- startDate?: string | undefined;
832
- endDate?: string | undefined;
1023
+ startDate?: string | null | undefined;
1024
+ endDate?: string | null | undefined;
1025
+ duration?: number | null | undefined;
833
1026
  createdDate?: string | undefined;
834
- startTime?: number | undefined;
835
- endTime?: number | undefined;
1027
+ startTime?: number | null | undefined;
1028
+ endTime?: number | null | undefined;
836
1029
  } | undefined;
837
1030
  profile?: {
838
1031
  iccid?: string | undefined;
@@ -841,11 +1034,12 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
841
1034
  purchase?: {
842
1035
  id?: string | undefined;
843
1036
  packageId?: string | undefined;
844
- startDate?: string | undefined;
845
- endDate?: string | undefined;
1037
+ startDate?: string | null | undefined;
1038
+ endDate?: string | null | undefined;
1039
+ duration?: number | null | undefined;
846
1040
  createdDate?: string | undefined;
847
- startTime?: number | undefined;
848
- endTime?: number | undefined;
1041
+ startTime?: number | null | undefined;
1042
+ endTime?: number | null | undefined;
849
1043
  } | undefined;
850
1044
  profile?: {
851
1045
  iccid?: string | undefined;
@@ -897,22 +1091,22 @@ type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
897
1091
  */
898
1092
  declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
899
1093
  purchaseId: z.ZodOptional<z.ZodString>;
900
- newStartDate: z.ZodOptional<z.ZodString>;
901
- newEndDate: z.ZodOptional<z.ZodString>;
902
- newStartTime: z.ZodOptional<z.ZodNumber>;
903
- newEndTime: z.ZodOptional<z.ZodNumber>;
1094
+ newStartDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1095
+ newEndDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1096
+ newStartTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1097
+ newEndTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
904
1098
  }, "strip", z.ZodTypeAny, {
905
1099
  purchaseId?: string | undefined;
906
- newStartDate?: string | undefined;
907
- newEndDate?: string | undefined;
908
- newStartTime?: number | undefined;
909
- newEndTime?: number | undefined;
1100
+ newStartDate?: string | null | undefined;
1101
+ newEndDate?: string | null | undefined;
1102
+ newStartTime?: number | null | undefined;
1103
+ newEndTime?: number | null | undefined;
910
1104
  }, {
911
1105
  purchaseId?: string | undefined;
912
- newStartDate?: string | undefined;
913
- newEndDate?: string | undefined;
914
- newStartTime?: number | undefined;
915
- newEndTime?: number | undefined;
1106
+ newStartDate?: string | null | undefined;
1107
+ newEndDate?: string | null | undefined;
1108
+ newStartTime?: number | null | undefined;
1109
+ newEndTime?: number | null | undefined;
916
1110
  }>>;
917
1111
  /**
918
1112
  *
@@ -941,58 +1135,123 @@ declare const getPurchaseConsumptionOkResponse: z.ZodLazy<z.ZodObject<{
941
1135
  /**
942
1136
  *
943
1137
  * @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
944
- * @property {number} - Remaining balance of the package in bytes
1138
+ * @property {number} - Remaining balance of the package in byte.
1139
+ For ``limited packages``, this field indicates the remaining data in bytes.
1140
+ For ``unlimited packages``, it will return ``-1`` as an identifier.
1141
+
945
1142
  * @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
946
1143
  */
947
1144
  type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
948
1145
 
949
1146
  declare class PurchasesService extends BaseService {
1147
+ /**
1148
+ * This endpoint is used to purchase a new eSIM by providing the package details.
1149
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1150
+ * @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} Successful Response
1151
+ */
1152
+ createPurchaseV2(body: CreatePurchaseV2Request, requestConfig?: RequestConfig): Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>;
950
1153
  /**
951
1154
  * This endpoint can be used to list all the successful purchases made between a given interval.
952
- * @param {string} [iccid] - ID of the eSIM
953
- * @param {string} [afterDate] - Start date of the interval for filtering purchases in the format 'yyyy-MM-dd'
954
- * @param {string} [beforeDate] - End date of the interval for filtering purchases in the format 'yyyy-MM-dd'
955
- * @param {string} [referenceId] - The referenceId that was provided by the partner during the purchase or topup flow.
956
- * @param {string} [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.
957
- * @param {number} [limit] - Maximum number of purchases to be returned in the response. The value must be greater than 0 and less than or equal to 100. If not provided, the default value is 20
958
- * @param {number} [after] - Epoch value representing the start of the time interval for filtering purchases
959
- * @param {number} [before] - Epoch value representing the end of the time interval for filtering purchases
1155
+ * @param {string} [params.iccid] - ID of the eSIM
1156
+ * @param {string} [params.afterDate] - Start date of the interval for filtering purchases in the format 'yyyy-MM-dd'
1157
+ * @param {string} [params.beforeDate] - End date of the interval for filtering purchases in the format 'yyyy-MM-dd'
1158
+ * @param {string} [params.referenceId] - The referenceId that was provided by the partner during the purchase or topup flow.
1159
+ * @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.
1160
+ * @param {number} [params.limit] - Maximum number of purchases to be returned in the response. The value must be greater than 0 and less than or equal to 100. If not provided, the default value is 20
1161
+ * @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
1162
+ * @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
1163
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
960
1164
  * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
961
1165
  */
962
1166
  listPurchases(params?: ListPurchasesParams, requestConfig?: RequestConfig): Promise<HttpResponse<ListPurchasesOkResponse>>;
963
1167
  /**
964
1168
  * This endpoint is used to purchase a new eSIM by providing the package details.
1169
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
965
1170
  * @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} Successful Response
966
1171
  */
967
1172
  createPurchase(body: CreatePurchaseRequest, requestConfig?: RequestConfig): Promise<HttpResponse<CreatePurchaseOkResponse>>;
968
1173
  /**
969
- * This endpoint is used to top-up an eSIM with the previously associated destination by providing an existing ICCID and the package details. The top-up is not feasible for eSIMs in "DELETED" or "ERROR" state.
1174
+ * This endpoint is used to top-up an eSIM with the previously associated destination by providing an existing ICCID and the package details. The top-up is only feasible for eSIMs in "ENABLED" or "INSTALLED" state. You can check this state using the Get eSIM Status endpoint.
1175
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
970
1176
  * @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
971
1177
  */
972
1178
  topUpEsim(body: TopUpEsimRequest, requestConfig?: RequestConfig): Promise<HttpResponse<TopUpEsimOkResponse>>;
973
1179
  /**
974
- * This endpoint allows you to modify the dates of an existing package with a future activation start time. Editing can only be performed for packages that have not been activated, and it cannot change the package size. The modification must not change the package duration category to ensure pricing consistency.
1180
+ * This endpoint allows you to modify the dates of an existing package with a future activation start time. Editing can only be performed for packages that have not been activated, and it cannot change the package size. The modification must not change the package duration category to ensure pricing consistency. Duration based packages cannot be edited.
1181
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
975
1182
  * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
976
1183
  */
977
1184
  editPurchase(body: EditPurchaseRequest, requestConfig?: RequestConfig): Promise<HttpResponse<EditPurchaseOkResponse>>;
978
1185
  /**
979
1186
  * 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.
980
1187
  * @param {string} purchaseId - ID of the purchase
1188
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
981
1189
  * @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} Successful Response
982
1190
  */
983
1191
  getPurchaseConsumption(purchaseId: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>;
984
1192
  }
985
1193
 
1194
+ /**
1195
+ * The shape of the model inside the application code - what the users use
1196
+ */
1197
+ declare const createPurchaseV2OkResponsePurchase: z.ZodLazy<z.ZodObject<{
1198
+ id: z.ZodOptional<z.ZodString>;
1199
+ packageId: z.ZodOptional<z.ZodString>;
1200
+ createdDate: z.ZodOptional<z.ZodString>;
1201
+ }, "strip", z.ZodTypeAny, {
1202
+ id?: string | undefined;
1203
+ packageId?: string | undefined;
1204
+ createdDate?: string | undefined;
1205
+ }, {
1206
+ id?: string | undefined;
1207
+ packageId?: string | undefined;
1208
+ createdDate?: string | undefined;
1209
+ }>>;
1210
+ /**
1211
+ *
1212
+ * @typedef {CreatePurchaseV2OkResponsePurchase} createPurchaseV2OkResponsePurchase
1213
+ * @property {string} - ID of the purchase
1214
+ * @property {string} - ID of the package
1215
+ * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1216
+ */
1217
+ type CreatePurchaseV2OkResponsePurchase = z.infer<typeof createPurchaseV2OkResponsePurchase>;
1218
+
1219
+ /**
1220
+ * The shape of the model inside the application code - what the users use
1221
+ */
1222
+ declare const createPurchaseV2OkResponseProfile: z.ZodLazy<z.ZodObject<{
1223
+ iccid: z.ZodOptional<z.ZodString>;
1224
+ activationCode: z.ZodOptional<z.ZodString>;
1225
+ manualActivationCode: z.ZodOptional<z.ZodString>;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ iccid?: string | undefined;
1228
+ activationCode?: string | undefined;
1229
+ manualActivationCode?: string | undefined;
1230
+ }, {
1231
+ iccid?: string | undefined;
1232
+ activationCode?: string | undefined;
1233
+ manualActivationCode?: string | undefined;
1234
+ }>>;
1235
+ /**
1236
+ *
1237
+ * @typedef {CreatePurchaseV2OkResponseProfile} createPurchaseV2OkResponseProfile
1238
+ * @property {string} - ID of the eSIM
1239
+ * @property {string} - QR Code of the eSIM as base64
1240
+ * @property {string} - Manual Activation Code of the eSIM
1241
+ */
1242
+ type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkResponseProfile>;
1243
+
986
1244
  /**
987
1245
  * The shape of the model inside the application code - what the users use
988
1246
  */
989
1247
  declare const purchases: z.ZodLazy<z.ZodObject<{
990
1248
  id: z.ZodOptional<z.ZodString>;
991
- startDate: z.ZodOptional<z.ZodString>;
992
- endDate: z.ZodOptional<z.ZodString>;
1249
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1250
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1251
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
993
1252
  createdDate: z.ZodOptional<z.ZodString>;
994
- startTime: z.ZodOptional<z.ZodNumber>;
995
- endTime: z.ZodOptional<z.ZodNumber>;
1253
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1254
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
996
1255
  createdAt: z.ZodOptional<z.ZodNumber>;
997
1256
  package: z.ZodOptional<z.ZodLazy<z.ZodObject<{
998
1257
  id: z.ZodOptional<z.ZodString>;
@@ -1021,14 +1280,16 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1021
1280
  iccid?: string | undefined;
1022
1281
  }>>>;
1023
1282
  source: z.ZodOptional<z.ZodString>;
1283
+ purchaseType: z.ZodOptional<z.ZodString>;
1024
1284
  referenceId: z.ZodOptional<z.ZodString>;
1025
1285
  }, "strip", z.ZodTypeAny, {
1026
1286
  id?: string | undefined;
1027
- startDate?: string | undefined;
1028
- endDate?: string | undefined;
1287
+ startDate?: string | null | undefined;
1288
+ endDate?: string | null | undefined;
1289
+ duration?: number | null | undefined;
1029
1290
  createdDate?: string | undefined;
1030
- startTime?: number | undefined;
1031
- endTime?: number | undefined;
1291
+ startTime?: number | null | undefined;
1292
+ endTime?: number | null | undefined;
1032
1293
  createdAt?: number | undefined;
1033
1294
  package?: {
1034
1295
  id?: string | undefined;
@@ -1041,14 +1302,16 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1041
1302
  iccid?: string | undefined;
1042
1303
  } | undefined;
1043
1304
  source?: string | undefined;
1305
+ purchaseType?: string | undefined;
1044
1306
  referenceId?: string | undefined;
1045
1307
  }, {
1046
1308
  id?: string | undefined;
1047
- startDate?: string | undefined;
1048
- endDate?: string | undefined;
1309
+ startDate?: string | null | undefined;
1310
+ endDate?: string | null | undefined;
1311
+ duration?: number | null | undefined;
1049
1312
  createdDate?: string | undefined;
1050
- startTime?: number | undefined;
1051
- endTime?: number | undefined;
1313
+ startTime?: number | null | undefined;
1314
+ endTime?: number | null | undefined;
1052
1315
  createdAt?: number | undefined;
1053
1316
  package?: {
1054
1317
  id?: string | undefined;
@@ -1061,6 +1324,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1061
1324
  iccid?: string | undefined;
1062
1325
  } | undefined;
1063
1326
  source?: string | undefined;
1327
+ purchaseType?: string | undefined;
1064
1328
  referenceId?: string | undefined;
1065
1329
  }>>;
1066
1330
  /**
@@ -1069,14 +1333,16 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1069
1333
  * @property {string} - ID of the purchase
1070
1334
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1071
1335
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1336
+ * @property {number} - It designates the number of days the eSIM is valid for within 90-day validity from issuance date.
1072
1337
  * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1073
1338
  * @property {number} - Epoch value representing the start time of the package's validity
1074
1339
  * @property {number} - Epoch value representing the end time of the package's validity
1075
1340
  * @property {number} - Epoch value representing the date of creation of the purchase
1076
1341
  * @property {Package_}
1077
1342
  * @property {PurchasesEsim}
1078
- * @property {string} - The source indicates where the eSIM was purchased, which can be from the API, dashboard, landing-page or promo-page. For purchases made before September 8, 2023, the value will be displayed as 'Not available'.
1079
- * @property {string} - The referenceId that was provided by the partner during the purchase or topup flow. This identifier can be used for analytics and debugging purposes.
1343
+ * @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'.
1344
+ * @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).
1345
+ * @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.
1080
1346
  */
1081
1347
  type Purchases = z.infer<typeof purchases>;
1082
1348
 
@@ -1106,8 +1372,9 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1106
1372
  *
1107
1373
  * @typedef {Package_} package_
1108
1374
  * @property {string} - ID of the package
1109
- * @property {number} - Size of the package in Bytes
1110
- * @property {string} - ISO representation of the package's destination
1375
+ * @property {number} - Size of the package in bytes. For ``limited packages``, this field will return the data limit in bytes. For ``unlimited packages``, it will return ``-1`` as an identifier.
1376
+
1377
+ * @property {string} - ISO representation of the package's destination.
1111
1378
  * @property {string} - Name of the package's destination
1112
1379
  * @property {number} - Price of the package in cents
1113
1380
  */
@@ -1136,27 +1403,27 @@ type PurchasesEsim = z.infer<typeof purchasesEsim>;
1136
1403
  declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1137
1404
  id: z.ZodOptional<z.ZodString>;
1138
1405
  packageId: z.ZodOptional<z.ZodString>;
1139
- startDate: z.ZodOptional<z.ZodString>;
1140
- endDate: z.ZodOptional<z.ZodString>;
1406
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1407
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1141
1408
  createdDate: z.ZodOptional<z.ZodString>;
1142
- startTime: z.ZodOptional<z.ZodNumber>;
1143
- endTime: z.ZodOptional<z.ZodNumber>;
1409
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1410
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1144
1411
  }, "strip", z.ZodTypeAny, {
1145
1412
  id?: string | undefined;
1146
1413
  packageId?: string | undefined;
1147
- startDate?: string | undefined;
1148
- endDate?: string | undefined;
1414
+ startDate?: string | null | undefined;
1415
+ endDate?: string | null | undefined;
1149
1416
  createdDate?: string | undefined;
1150
- startTime?: number | undefined;
1151
- endTime?: number | undefined;
1417
+ startTime?: number | null | undefined;
1418
+ endTime?: number | null | undefined;
1152
1419
  }, {
1153
1420
  id?: string | undefined;
1154
1421
  packageId?: string | undefined;
1155
- startDate?: string | undefined;
1156
- endDate?: string | undefined;
1422
+ startDate?: string | null | undefined;
1423
+ endDate?: string | null | undefined;
1157
1424
  createdDate?: string | undefined;
1158
- startTime?: number | undefined;
1159
- endTime?: number | undefined;
1425
+ startTime?: number | null | undefined;
1426
+ endTime?: number | null | undefined;
1160
1427
  }>>;
1161
1428
  /**
1162
1429
  *
@@ -1202,27 +1469,30 @@ type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponsePr
1202
1469
  declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1203
1470
  id: z.ZodOptional<z.ZodString>;
1204
1471
  packageId: z.ZodOptional<z.ZodString>;
1205
- startDate: z.ZodOptional<z.ZodString>;
1206
- endDate: z.ZodOptional<z.ZodString>;
1472
+ startDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1473
+ endDate: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1474
+ duration: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1207
1475
  createdDate: z.ZodOptional<z.ZodString>;
1208
- startTime: z.ZodOptional<z.ZodNumber>;
1209
- endTime: z.ZodOptional<z.ZodNumber>;
1476
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1477
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1210
1478
  }, "strip", z.ZodTypeAny, {
1211
1479
  id?: string | undefined;
1212
1480
  packageId?: string | undefined;
1213
- startDate?: string | undefined;
1214
- endDate?: string | undefined;
1481
+ startDate?: string | null | undefined;
1482
+ endDate?: string | null | undefined;
1483
+ duration?: number | null | undefined;
1215
1484
  createdDate?: string | undefined;
1216
- startTime?: number | undefined;
1217
- endTime?: number | undefined;
1485
+ startTime?: number | null | undefined;
1486
+ endTime?: number | null | undefined;
1218
1487
  }, {
1219
1488
  id?: string | undefined;
1220
1489
  packageId?: string | undefined;
1221
- startDate?: string | undefined;
1222
- endDate?: string | undefined;
1490
+ startDate?: string | null | undefined;
1491
+ endDate?: string | null | undefined;
1492
+ duration?: number | null | undefined;
1223
1493
  createdDate?: string | undefined;
1224
- startTime?: number | undefined;
1225
- endTime?: number | undefined;
1494
+ startTime?: number | null | undefined;
1495
+ endTime?: number | null | undefined;
1226
1496
  }>>;
1227
1497
  /**
1228
1498
  *
@@ -1231,6 +1501,7 @@ declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1231
1501
  * @property {string} - ID of the package
1232
1502
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1233
1503
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1504
+ * @property {number} - It designates the number of days the eSIM is valid for within 90-day validity from issuance date.
1234
1505
  * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1235
1506
  * @property {number} - Epoch value representing the start time of the package's validity
1236
1507
  * @property {number} - Epoch value representing the end time of the package's validity
@@ -1254,6 +1525,90 @@ declare const topUpEsimOkResponseProfile: z.ZodLazy<z.ZodObject<{
1254
1525
  */
1255
1526
  type TopUpEsimOkResponseProfile = z.infer<typeof topUpEsimOkResponseProfile>;
1256
1527
 
1528
+ declare class _4 extends ThrowableError {
1529
+ message: string;
1530
+ protected response?: unknown;
1531
+ constructor(message: string, response?: unknown);
1532
+ throw(): void;
1533
+ }
1534
+
1535
+ declare class _5 extends ThrowableError {
1536
+ message: string;
1537
+ protected response?: unknown;
1538
+ constructor(message: string, response?: unknown);
1539
+ throw(): void;
1540
+ }
1541
+
1542
+ declare class _6 extends ThrowableError {
1543
+ message: string;
1544
+ protected response?: unknown;
1545
+ constructor(message: string, response?: unknown);
1546
+ throw(): void;
1547
+ }
1548
+
1549
+ declare class _7 extends ThrowableError {
1550
+ message: string;
1551
+ protected response?: unknown;
1552
+ constructor(message: string, response?: unknown);
1553
+ throw(): void;
1554
+ }
1555
+
1556
+ declare class _8 extends ThrowableError {
1557
+ message: string;
1558
+ protected response?: unknown;
1559
+ constructor(message: string, response?: unknown);
1560
+ throw(): void;
1561
+ }
1562
+
1563
+ declare class _9 extends ThrowableError {
1564
+ message: string;
1565
+ protected response?: unknown;
1566
+ constructor(message: string, response?: unknown);
1567
+ throw(): void;
1568
+ }
1569
+
1570
+ declare class _10 extends ThrowableError {
1571
+ message: string;
1572
+ protected response?: unknown;
1573
+ constructor(message: string, response?: unknown);
1574
+ throw(): void;
1575
+ }
1576
+
1577
+ declare class _11 extends ThrowableError {
1578
+ message: string;
1579
+ protected response?: unknown;
1580
+ constructor(message: string, response?: unknown);
1581
+ throw(): void;
1582
+ }
1583
+
1584
+ declare class _12 extends ThrowableError {
1585
+ message: string;
1586
+ protected response?: unknown;
1587
+ constructor(message: string, response?: unknown);
1588
+ throw(): void;
1589
+ }
1590
+
1591
+ declare class _13 extends ThrowableError {
1592
+ message: string;
1593
+ protected response?: unknown;
1594
+ constructor(message: string, response?: unknown);
1595
+ throw(): void;
1596
+ }
1597
+
1598
+ declare class _14 extends ThrowableError {
1599
+ message: string;
1600
+ protected response?: unknown;
1601
+ constructor(message: string, response?: unknown);
1602
+ throw(): void;
1603
+ }
1604
+
1605
+ declare class _15 extends ThrowableError {
1606
+ message: string;
1607
+ protected response?: unknown;
1608
+ constructor(message: string, response?: unknown);
1609
+ throw(): void;
1610
+ }
1611
+
1257
1612
  /**
1258
1613
  * The shape of the model inside the application code - what the users use
1259
1614
  */
@@ -1443,24 +1798,28 @@ declare class ESimService extends BaseService {
1443
1798
  /**
1444
1799
  * Get eSIM Status
1445
1800
  * @param {string} iccid - ID of the eSIM
1801
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1446
1802
  * @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
1447
1803
  */
1448
1804
  getEsim(params: GetEsimParams, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimOkResponse>>;
1449
1805
  /**
1450
1806
  * Get eSIM Device
1451
1807
  * @param {string} iccid - ID of the eSIM
1808
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1452
1809
  * @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
1453
1810
  */
1454
1811
  getEsimDevice(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimDeviceOkResponse>>;
1455
1812
  /**
1456
1813
  * Get eSIM History
1457
1814
  * @param {string} iccid - ID of the eSIM
1815
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1458
1816
  * @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
1459
1817
  */
1460
1818
  getEsimHistory(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimHistoryOkResponse>>;
1461
1819
  /**
1462
1820
  * Get eSIM MAC
1463
1821
  * @param {string} iccid - ID of the eSIM
1822
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1464
1823
  * @returns {Promise<HttpResponse<GetEsimMacOkResponse>>} Successful Response
1465
1824
  */
1466
1825
  getEsimMac(iccid: string, requestConfig?: RequestConfig): Promise<HttpResponse<GetEsimMacOkResponse>>;
@@ -1615,6 +1974,62 @@ declare const getEsimMacOkResponseEsim: z.ZodLazy<z.ZodObject<{
1615
1974
  */
1616
1975
  type GetEsimMacOkResponseEsim = z.infer<typeof getEsimMacOkResponseEsim>;
1617
1976
 
1977
+ declare class _16 extends ThrowableError {
1978
+ message: string;
1979
+ protected response?: unknown;
1980
+ constructor(message: string, response?: unknown);
1981
+ throw(): void;
1982
+ }
1983
+
1984
+ declare class _17 extends ThrowableError {
1985
+ message: string;
1986
+ protected response?: unknown;
1987
+ constructor(message: string, response?: unknown);
1988
+ throw(): void;
1989
+ }
1990
+
1991
+ declare class _18 extends ThrowableError {
1992
+ message: string;
1993
+ protected response?: unknown;
1994
+ constructor(message: string, response?: unknown);
1995
+ throw(): void;
1996
+ }
1997
+
1998
+ declare class _19 extends ThrowableError {
1999
+ message: string;
2000
+ protected response?: unknown;
2001
+ constructor(message: string, response?: unknown);
2002
+ throw(): void;
2003
+ }
2004
+
2005
+ declare class _20 extends ThrowableError {
2006
+ message: string;
2007
+ protected response?: unknown;
2008
+ constructor(message: string, response?: unknown);
2009
+ throw(): void;
2010
+ }
2011
+
2012
+ declare class _21 extends ThrowableError {
2013
+ message: string;
2014
+ protected response?: unknown;
2015
+ constructor(message: string, response?: unknown);
2016
+ throw(): void;
2017
+ }
2018
+
2019
+ declare class _22 extends ThrowableError {
2020
+ message: string;
2021
+ protected response?: unknown;
2022
+ constructor(message: string, response?: unknown);
2023
+ throw(): void;
2024
+ }
2025
+
2026
+ declare class _23 extends ThrowableError {
2027
+ message: string;
2028
+ protected response?: unknown;
2029
+ constructor(message: string, response?: unknown);
2030
+ throw(): void;
2031
+ }
2032
+
1618
2033
  /**
1619
2034
  * The shape of the model inside the application code - what the users use
1620
2035
  */
@@ -1635,11 +2050,26 @@ type TokenOkResponse = z.infer<typeof tokenOkResponse>;
1635
2050
  declare class IFrameService extends BaseService {
1636
2051
  /**
1637
2052
  * Generate a new token to be used in the iFrame
2053
+ * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1638
2054
  * @returns {Promise<HttpResponse<TokenOkResponse>>} Successful Response
1639
2055
  */
1640
2056
  token(requestConfig?: RequestConfig): Promise<HttpResponse<TokenOkResponse>>;
1641
2057
  }
1642
2058
 
2059
+ declare class _24 extends ThrowableError {
2060
+ message: string;
2061
+ protected response?: unknown;
2062
+ constructor(message: string, response?: unknown);
2063
+ throw(): void;
2064
+ }
2065
+
2066
+ declare class _25 extends ThrowableError {
2067
+ message: string;
2068
+ protected response?: unknown;
2069
+ constructor(message: string, response?: unknown);
2070
+ throw(): void;
2071
+ }
2072
+
1643
2073
  declare class Celitech {
1644
2074
  config: SdkConfig;
1645
2075
  readonly oAuth: OAuthService;
@@ -1656,6 +2086,7 @@ declare class Celitech {
1656
2086
  set clientId(clientId: string);
1657
2087
  set clientSecret(clientSecret: string);
1658
2088
  set oAuthBaseUrl(oAuthBaseUrl: string);
2089
+ set accessToken(accessToken: string);
1659
2090
  }
1660
2091
 
1661
- export { Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment, GetAccessTokenOkResponse, GetAccessTokenRequest, GetEsimDeviceOkResponse, GetEsimHistoryOkResponse, GetEsimHistoryOkResponseEsim, GetEsimMacOkResponse, GetEsimMacOkResponseEsim, GetEsimOkResponse, GetEsimOkResponseEsim, GetPurchaseConsumptionOkResponse, GrantType, History, HttpError, HttpMetadata, HttpMethod, HttpResponse, IFrameService, ListDestinationsOkResponse, ListPackagesOkResponse, ListPurchasesOkResponse, OAuthService, Package_, Packages, PackagesService, Purchases, PurchasesEsim, PurchasesService, RequestConfig, RetryOptions, SdkConfig, TokenOkResponse, TopUpEsimOkResponse, TopUpEsimOkResponseProfile, TopUpEsimOkResponsePurchase, TopUpEsimRequest, ValidationOptions };
2092
+ export { Celitech, CreatePurchaseOkResponse, CreatePurchaseOkResponseProfile, CreatePurchaseOkResponsePurchase, CreatePurchaseRequest, CreatePurchaseV2OkResponse, CreatePurchaseV2OkResponseProfile, CreatePurchaseV2OkResponsePurchase, CreatePurchaseV2Request, Destinations, DestinationsService, Device, ESimService, EditPurchaseOkResponse, EditPurchaseRequest, Environment, GetAccessTokenOkResponse, GetAccessTokenRequest, GetEsimDeviceOkResponse, GetEsimHistoryOkResponse, GetEsimHistoryOkResponseEsim, GetEsimMacOkResponse, GetEsimMacOkResponseEsim, GetEsimOkResponse, GetEsimOkResponseEsim, GetPurchaseConsumptionOkResponse, GrantType, History, HttpError, HttpMetadata, HttpMethod, HttpResponse, IFrameService, ListDestinationsOkResponse, ListPackagesOkResponse, ListPurchasesOkResponse, OAuthService, Package_, Packages, PackagesService, Purchases, PurchasesEsim, PurchasesService, RequestConfig, RetryOptions, SdkConfig, TokenOkResponse, TopUpEsimOkResponse, TopUpEsimOkResponseProfile, TopUpEsimOkResponsePurchase, TopUpEsimRequest, ValidationOptions, _1, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _2, _20, _21, _22, _23, _24, _25, _3, _4, _5, _6, _7, _8, _9, __ };