celitech-sdk 2.0.2 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,11 @@
1
- # Celitech TypeScript SDK 2.0.2
1
+ # Celitech TypeScript SDK 2.0.6
2
2
 
3
3
  Welcome to the Celitech SDK documentation. This guide will help you get started with integrating and using the Celitech SDK in your project.
4
4
 
5
5
  ## Versions
6
6
 
7
- - API version: `2.0.2`
8
- - SDK version: `2.0.2`
7
+ - API version: `2.0.6`
8
+ - SDK version: `2.0.6`
9
9
 
10
10
  ## About the API
11
11
 
package/dist/index.d.ts CHANGED
@@ -854,12 +854,14 @@ type ListPackagesOkResponse = z.infer<typeof listPackagesOkResponse>;
854
854
 
855
855
  interface ListPackagesParams {
856
856
  destination?: string;
857
+ dataLimitInGb?: number;
857
858
  startDate?: string;
858
859
  endDate?: string;
859
860
  afterCursor?: string;
860
861
  limit?: number;
861
862
  startTime?: number;
862
863
  endTime?: number;
864
+ includeUnlimited?: boolean;
863
865
  }
864
866
 
865
867
  /**
@@ -878,12 +880,14 @@ declare class PackagesService extends BaseService {
878
880
  /**
879
881
  * List Packages
880
882
  * @param {string} [params.destination] - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
883
+ * @param {number} [params.dataLimitInGb] - Filter packages by data limit in GB. When provided, only packages with this exact data limit are returned. Use `-1` together with `includeUnlimited=true` to return only unlimited packages. A value of `0` is ignored.
881
884
  * @param {string} [params.startDate] - Start date of the package's validity in the format 'yyyy-MM-dd'. This date can be set to the current day or any day within the next 12 months.
882
885
  * @param {string} [params.endDate] - End date of the package's validity in the format 'yyyy-MM-dd'. End date can be maximum 90 days after Start date.
883
886
  * @param {string} [params.afterCursor] - To get the next batch of results, use this parameter. It tells the API where to start fetching data after the last item you received. It helps you avoid repeats and efficiently browse through large sets of data.
884
887
  * @param {number} [params.limit] - Maximum number of packages to be returned in the response. The value must be greater than 0 and less than or equal to 160. If not provided, the default value is 20
885
888
  * @param {number} [params.startTime] - Epoch value representing the start time of the package's validity. This timestamp can be set to the current time or any time within the next 12 months
886
889
  * @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
890
+ * @param {boolean} [params.includeUnlimited] - Whether to include unlimited (date-based) packages in the results. Unlimited packages are excluded by default; set this to `true` to include them. An unlimited package has `dataLimitInGB` and `dataLimitInBytes` equal to `-1`, and is offered for 3 to 30 days with `minDays` equal to `maxDays`.
887
891
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
888
892
  * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
889
893
  */
@@ -929,8 +933,8 @@ declare const packages: z.ZodLazy<z.ZodObject<{
929
933
  * @property {string} - ID of the package
930
934
  * @property {string} - ISO3 representation of the package's destination.
931
935
  * @property {string} - ISO2 representation of the package's destination.
932
- * @property {number} - Size of the package in Bytes
933
- * @property {number} - Size of the package in GB
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.
934
938
  * @property {number} - Min number of days for the package
935
939
  * @property {number} - Max number of days for the package
936
940
  * @property {number} - Price of the package in cents
@@ -983,10 +987,10 @@ declare const createPurchaseV2Request: z.ZodLazy<z.ZodObject<{
983
987
  *
984
988
  * @typedef {CreatePurchaseV2Request} createPurchaseV2Request
985
989
  * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
986
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
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).
987
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.
988
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.
989
- * @property {number} - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.
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.
990
994
  * @property {number} - Number of eSIMs to purchase.
991
995
  * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
992
996
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
@@ -1291,7 +1295,7 @@ declare const createPurchaseRequest: z.ZodLazy<z.ZodObject<{
1291
1295
  *
1292
1296
  * @typedef {CreatePurchaseRequest} createPurchaseRequest
1293
1297
  * @property {string} - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
1294
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
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.
1295
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.
1296
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.
1297
1301
  * @property {string} - Email address where the purchase confirmation email will be sent (including QR Code & activation steps)
@@ -1430,10 +1434,10 @@ declare const topUpEsimRequest: z.ZodLazy<z.ZodObject<{
1430
1434
  *
1431
1435
  * @typedef {TopUpEsimRequest} topUpEsimRequest
1432
1436
  * @property {string} - ID of the eSIM
1433
- * @property {number} - Size of the package in GB. The available options are 0.5, 1, 2, 3, 5, 8, 20, 50GB
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).
1434
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.
1435
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.
1436
- * @property {number} - Duration of the package in days. Available values are 1, 2, 7, 14, 30, or 90. Either provide startDate/endDate or duration.
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.
1437
1441
  * @property {string} - Email address where the purchase confirmation email will be sent (excluding QR Code & activation steps).
1438
1442
  * @property {string} - An identifier provided by the partner to link this purchase to their booking or transaction for analytics and debugging purposes.
1439
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.
@@ -1606,8 +1610,8 @@ declare const getPurchaseConsumptionOkResponse: z.ZodLazy<z.ZodObject<{
1606
1610
  /**
1607
1611
  *
1608
1612
  * @typedef {GetPurchaseConsumptionOkResponse} getPurchaseConsumptionOkResponse
1609
- * @property {number} - Remaining balance of the package in bytes
1610
- * @property {number} - Remaining balance of the package in GB
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.
1611
1615
  * @property {string} - Status of the connectivity, possible values are 'ACTIVE' or 'NOT_ACTIVE'
1612
1616
  */
1613
1617
  type GetPurchaseConsumptionOkResponse = z.infer<typeof getPurchaseConsumptionOkResponse>;
@@ -1890,7 +1894,7 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1890
1894
  * @property {string} - ID of the purchase
1891
1895
  * @property {string} - Start date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1892
1896
  * @property {string} - End date of the package's validity in the format 'yyyy-MM-ddThh:mm:ssZZ'
1893
- * @property {number} - Duration of the package in days. Possible values are 1, 2, 7, 14, 30, or 90.
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.
1894
1898
  * @property {string} - Creation date of the purchase in the format 'yyyy-MM-ddThh:mm:ssZZ'
1895
1899
  * @property {number} - Epoch value representing the start time of the package's validity
1896
1900
  * @property {number} - Epoch value representing the end time of the package's validity
@@ -1937,8 +1941,8 @@ declare const package_: z.ZodLazy<z.ZodObject<{
1937
1941
  *
1938
1942
  * @typedef {Package_} package_
1939
1943
  * @property {string} - ID of the package
1940
- * @property {number} - Size of the package in Bytes
1941
- * @property {number} - Size of the package in GB
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.
1942
1946
  * @property {string} - ISO3 representation of the package's destination.
1943
1947
  * @property {string} - ISO2 representation of the package's destination.
1944
1948
  * @property {string} - Name of the package's destination
package/dist/index.js CHANGED
@@ -1938,7 +1938,7 @@ var RequestBuilder = class {
1938
1938
  };
1939
1939
  this.addHeaderParam({
1940
1940
  key: "User-Agent",
1941
- value: "postman-codegen/1.4.0 celitech-sdk/2.0.2 (typescript)"
1941
+ value: "postman-codegen/1.7.0 celitech-sdk/2.0.6 (typescript)"
1942
1942
  });
1943
1943
  }
1944
1944
  setConfig(config) {
@@ -2633,12 +2633,14 @@ var PackagesService = class extends BaseService {
2633
2633
  /**
2634
2634
  * List Packages
2635
2635
  * @param {string} [params.destination] - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
2636
+ * @param {number} [params.dataLimitInGb] - Filter packages by data limit in GB. When provided, only packages with this exact data limit are returned. Use `-1` together with `includeUnlimited=true` to return only unlimited packages. A value of `0` is ignored.
2636
2637
  * @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.
2637
2638
  * @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.
2638
2639
  * @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.
2639
2640
  * @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
2640
2641
  * @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
2641
2642
  * @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
2643
+ * @param {boolean} [params.includeUnlimited] - Whether to include unlimited (date-based) packages in the results. Unlimited packages are excluded by default; set this to `true` to include them. An unlimited package has `dataLimitInGB` and `dataLimitInBytes` equal to `-1`, and is offered for 3 to 30 days with `minDays` equal to `maxDays`.
2642
2644
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
2643
2645
  * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
2644
2646
  */
@@ -2646,12 +2648,14 @@ var PackagesService = class extends BaseService {
2646
2648
  const resolvedConfig = this.getResolvedConfig(this.listPackagesConfig, requestConfig);
2647
2649
  import_zod13.z.object({
2648
2650
  destination: import_zod13.z.string().optional(),
2651
+ dataLimitInGb: import_zod13.z.number().optional(),
2649
2652
  startDate: import_zod13.z.string().optional(),
2650
2653
  endDate: import_zod13.z.string().optional(),
2651
2654
  afterCursor: import_zod13.z.string().optional(),
2652
2655
  limit: import_zod13.z.number().optional(),
2653
2656
  startTime: import_zod13.z.number().optional(),
2654
- endTime: import_zod13.z.number().optional()
2657
+ endTime: import_zod13.z.number().optional(),
2658
+ includeUnlimited: import_zod13.z.boolean().optional()
2655
2659
  }).parse(params != null ? params : {});
2656
2660
  const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(import_zod13.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
2657
2661
  schema: listPackagesOkResponseResponse,
@@ -2668,6 +2672,9 @@ var PackagesService = class extends BaseService {
2668
2672
  }).addQueryParam({
2669
2673
  key: "destination",
2670
2674
  value: params == null ? void 0 : params.destination
2675
+ }).addQueryParam({
2676
+ key: "dataLimitInGB",
2677
+ value: params == null ? void 0 : params.dataLimitInGb
2671
2678
  }).addQueryParam({
2672
2679
  key: "startDate",
2673
2680
  value: params == null ? void 0 : params.startDate
@@ -2686,6 +2693,9 @@ var PackagesService = class extends BaseService {
2686
2693
  }).addQueryParam({
2687
2694
  key: "endTime",
2688
2695
  value: params == null ? void 0 : params.endTime
2696
+ }).addQueryParam({
2697
+ key: "includeUnlimited",
2698
+ value: params == null ? void 0 : params.includeUnlimited
2689
2699
  }).build();
2690
2700
  return this.client.callDirect(request);
2691
2701
  }
package/dist/index.mjs CHANGED
@@ -1892,7 +1892,7 @@ var RequestBuilder = class {
1892
1892
  };
1893
1893
  this.addHeaderParam({
1894
1894
  key: "User-Agent",
1895
- value: "postman-codegen/1.4.0 celitech-sdk/2.0.2 (typescript)"
1895
+ value: "postman-codegen/1.7.0 celitech-sdk/2.0.6 (typescript)"
1896
1896
  });
1897
1897
  }
1898
1898
  setConfig(config) {
@@ -2587,12 +2587,14 @@ var PackagesService = class extends BaseService {
2587
2587
  /**
2588
2588
  * List Packages
2589
2589
  * @param {string} [params.destination] - ISO representation of the package's destination. Supports both ISO2 (e.g., 'FR') and ISO3 (e.g., 'FRA') country codes.
2590
+ * @param {number} [params.dataLimitInGb] - Filter packages by data limit in GB. When provided, only packages with this exact data limit are returned. Use `-1` together with `includeUnlimited=true` to return only unlimited packages. A value of `0` is ignored.
2590
2591
  * @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.
2591
2592
  * @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.
2592
2593
  * @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.
2593
2594
  * @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
2594
2595
  * @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
2595
2596
  * @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
2597
+ * @param {boolean} [params.includeUnlimited] - Whether to include unlimited (date-based) packages in the results. Unlimited packages are excluded by default; set this to `true` to include them. An unlimited package has `dataLimitInGB` and `dataLimitInBytes` equal to `-1`, and is offered for 3 to 30 days with `minDays` equal to `maxDays`.
2596
2598
  * @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
2597
2599
  * @returns {Promise<HttpResponse<ListPackagesOkResponse>>} - Successful Response
2598
2600
  */
@@ -2600,12 +2602,14 @@ var PackagesService = class extends BaseService {
2600
2602
  const resolvedConfig = this.getResolvedConfig(this.listPackagesConfig, requestConfig);
2601
2603
  z11.object({
2602
2604
  destination: z11.string().optional(),
2605
+ dataLimitInGb: z11.number().optional(),
2603
2606
  startDate: z11.string().optional(),
2604
2607
  endDate: z11.string().optional(),
2605
2608
  afterCursor: z11.string().optional(),
2606
2609
  limit: z11.number().optional(),
2607
2610
  startTime: z11.number().optional(),
2608
- endTime: z11.number().optional()
2611
+ endTime: z11.number().optional(),
2612
+ includeUnlimited: z11.boolean().optional()
2609
2613
  }).parse(params != null ? params : {});
2610
2614
  const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(z11.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
2611
2615
  schema: listPackagesOkResponseResponse,
@@ -2622,6 +2626,9 @@ var PackagesService = class extends BaseService {
2622
2626
  }).addQueryParam({
2623
2627
  key: "destination",
2624
2628
  value: params == null ? void 0 : params.destination
2629
+ }).addQueryParam({
2630
+ key: "dataLimitInGB",
2631
+ value: params == null ? void 0 : params.dataLimitInGb
2625
2632
  }).addQueryParam({
2626
2633
  key: "startDate",
2627
2634
  value: params == null ? void 0 : params.startDate
@@ -2640,6 +2647,9 @@ var PackagesService = class extends BaseService {
2640
2647
  }).addQueryParam({
2641
2648
  key: "endTime",
2642
2649
  value: params == null ? void 0 : params.endTime
2650
+ }).addQueryParam({
2651
+ key: "includeUnlimited",
2652
+ value: params == null ? void 0 : params.includeUnlimited
2643
2653
  }).build();
2644
2654
  return this.client.callDirect(request);
2645
2655
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "celitech-sdk",
3
- "version": "2.0.2",
3
+ "version": "2.0.6",
4
4
  "description": "Welcome to the CELITECH API documentation! Useful links: [Homepage](https://www.celitech.com) | [Support email](mailto:support@celitech.com) | [Blog](https://www.celitech.com/blog/)",
5
5
  "source": "./src/index.ts",
6
6
  "main": "./dist/index.js",
@@ -36,7 +36,7 @@
36
36
  "tsup": "^6.7.0"
37
37
  },
38
38
  "dependencies": {
39
- "zod": "3.22.0"
39
+ "zod": "3.22.3"
40
40
  },
41
41
  "exports": {
42
42
  ".": {