celitech-sdk 1.3.43 → 1.3.46

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.mjs CHANGED
@@ -1095,14 +1095,14 @@ var RequestBuilder = class {
1095
1095
  baseUrl: "https://api.celitech.net/v1" /* DEFAULT */,
1096
1096
  method: "GET",
1097
1097
  path: "",
1098
- config: { clientId: "", clientSecret: "" },
1098
+ config: {},
1099
1099
  responses: [],
1100
1100
  errors: [],
1101
1101
  requestSchema: z.any(),
1102
1102
  requestContentType: "json" /* Json */,
1103
1103
  retry: {
1104
- attempts: 1,
1105
- delayMs: 0
1104
+ attempts: 3,
1105
+ delayMs: 150
1106
1106
  },
1107
1107
  validation: {
1108
1108
  responseValidation: true
@@ -1711,13 +1711,6 @@ var PackagesService = class extends BaseService {
1711
1711
  * @param {string} [params.destination] - ISO representation of the package's destination.
1712
1712
  * @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.
1713
1713
  * @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.
1714
- * @param {number} [params.dataLimitInGb] - Size of the package in GB.
1715
-
1716
- For **limited packages**, the available options are: **0.5, 1, 2, 3, 5, 8, 20GB**.
1717
-
1718
- For **unlimited packages** (available to Region-3), please use **-1** as an identifier.
1719
-
1720
- * @param {boolean} [params.includeUnlimited] - A boolean flag to include the **unlimited packages** in the response. The flag is false by default.
1721
1714
  * @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.
1722
1715
  * @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
1723
1716
  * @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
@@ -1748,12 +1741,6 @@ var PackagesService = class extends BaseService {
1748
1741
  }).addQueryParam({
1749
1742
  key: "endDate",
1750
1743
  value: params == null ? void 0 : params.endDate
1751
- }).addQueryParam({
1752
- key: "dataLimitInGB",
1753
- value: params == null ? void 0 : params.dataLimitInGb
1754
- }).addQueryParam({
1755
- key: "includeUnlimited",
1756
- value: params == null ? void 0 : params.includeUnlimited
1757
1744
  }).addQueryParam({
1758
1745
  key: "afterCursor",
1759
1746
  value: params == null ? void 0 : params.afterCursor
@@ -1783,6 +1770,8 @@ var createPurchaseV2Request = z14.lazy(() => {
1783
1770
  return z14.object({
1784
1771
  destination: z14.string(),
1785
1772
  dataLimitInGb: z14.number(),
1773
+ startDate: z14.string(),
1774
+ endDate: z14.string(),
1786
1775
  quantity: z14.number().gte(1).lte(5),
1787
1776
  email: z14.string().optional(),
1788
1777
  referenceId: z14.string().optional(),
@@ -1794,6 +1783,8 @@ var createPurchaseV2RequestResponse = z14.lazy(() => {
1794
1783
  return z14.object({
1795
1784
  destination: z14.string(),
1796
1785
  dataLimitInGB: z14.number(),
1786
+ startDate: z14.string(),
1787
+ endDate: z14.string(),
1797
1788
  quantity: z14.number().gte(1).lte(5),
1798
1789
  email: z14.string().optional(),
1799
1790
  referenceId: z14.string().optional(),
@@ -1802,6 +1793,8 @@ var createPurchaseV2RequestResponse = z14.lazy(() => {
1802
1793
  }).transform((data) => ({
1803
1794
  destination: data["destination"],
1804
1795
  dataLimitInGb: data["dataLimitInGB"],
1796
+ startDate: data["startDate"],
1797
+ endDate: data["endDate"],
1805
1798
  quantity: data["quantity"],
1806
1799
  email: data["email"],
1807
1800
  referenceId: data["referenceId"],
@@ -1813,6 +1806,8 @@ var createPurchaseV2RequestRequest = z14.lazy(() => {
1813
1806
  return z14.object({
1814
1807
  destination: z14.string(),
1815
1808
  dataLimitInGb: z14.number(),
1809
+ startDate: z14.string(),
1810
+ endDate: z14.string(),
1816
1811
  quantity: z14.number().gte(1).lte(5),
1817
1812
  email: z14.string().optional(),
1818
1813
  referenceId: z14.string().optional(),
@@ -1821,6 +1816,8 @@ var createPurchaseV2RequestRequest = z14.lazy(() => {
1821
1816
  }).transform((data) => ({
1822
1817
  destination: data["destination"],
1823
1818
  dataLimitInGB: data["dataLimitInGb"],
1819
+ startDate: data["startDate"],
1820
+ endDate: data["endDate"],
1824
1821
  quantity: data["quantity"],
1825
1822
  email: data["email"],
1826
1823
  referenceId: data["referenceId"],
@@ -2040,12 +2037,11 @@ var purchasesEsimRequest = z21.lazy(() => {
2040
2037
  var purchases = z22.lazy(() => {
2041
2038
  return z22.object({
2042
2039
  id: z22.string().optional(),
2043
- startDate: z22.string().optional().nullable(),
2044
- endDate: z22.string().optional().nullable(),
2045
- duration: z22.number().optional().nullable(),
2040
+ startDate: z22.string().optional(),
2041
+ endDate: z22.string().optional(),
2046
2042
  createdDate: z22.string().optional(),
2047
- startTime: z22.number().optional().nullable(),
2048
- endTime: z22.number().optional().nullable(),
2043
+ startTime: z22.number().optional(),
2044
+ endTime: z22.number().optional(),
2049
2045
  createdAt: z22.number().optional(),
2050
2046
  package: package_.optional(),
2051
2047
  esim: purchasesEsim.optional(),
@@ -2057,12 +2053,11 @@ var purchases = z22.lazy(() => {
2057
2053
  var purchasesResponse = z22.lazy(() => {
2058
2054
  return z22.object({
2059
2055
  id: z22.string().optional(),
2060
- startDate: z22.string().optional().nullable(),
2061
- endDate: z22.string().optional().nullable(),
2062
- duration: z22.number().optional().nullable(),
2056
+ startDate: z22.string().optional(),
2057
+ endDate: z22.string().optional(),
2063
2058
  createdDate: z22.string().optional(),
2064
- startTime: z22.number().optional().nullable(),
2065
- endTime: z22.number().optional().nullable(),
2059
+ startTime: z22.number().optional(),
2060
+ endTime: z22.number().optional(),
2066
2061
  createdAt: z22.number().optional(),
2067
2062
  package: packageResponse.optional(),
2068
2063
  esim: purchasesEsimResponse.optional(),
@@ -2073,7 +2068,6 @@ var purchasesResponse = z22.lazy(() => {
2073
2068
  id: data["id"],
2074
2069
  startDate: data["startDate"],
2075
2070
  endDate: data["endDate"],
2076
- duration: data["duration"],
2077
2071
  createdDate: data["createdDate"],
2078
2072
  startTime: data["startTime"],
2079
2073
  endTime: data["endTime"],
@@ -2088,12 +2082,11 @@ var purchasesResponse = z22.lazy(() => {
2088
2082
  var purchasesRequest = z22.lazy(() => {
2089
2083
  return z22.object({
2090
2084
  id: z22.string().optional(),
2091
- startDate: z22.string().optional().nullable(),
2092
- endDate: z22.string().optional().nullable(),
2093
- duration: z22.number().optional().nullable(),
2085
+ startDate: z22.string().optional(),
2086
+ endDate: z22.string().optional(),
2094
2087
  createdDate: z22.string().optional(),
2095
- startTime: z22.number().optional().nullable(),
2096
- endTime: z22.number().optional().nullable(),
2088
+ startTime: z22.number().optional(),
2089
+ endTime: z22.number().optional(),
2097
2090
  createdAt: z22.number().optional(),
2098
2091
  package: packageRequest.optional(),
2099
2092
  esim: purchasesEsimRequest.optional(),
@@ -2104,7 +2097,6 @@ var purchasesRequest = z22.lazy(() => {
2104
2097
  id: data["id"],
2105
2098
  startDate: data["startDate"],
2106
2099
  endDate: data["endDate"],
2107
- duration: data["duration"],
2108
2100
  createdDate: data["createdDate"],
2109
2101
  startTime: data["startTime"],
2110
2102
  endTime: data["endTime"],
@@ -2263,22 +2255,22 @@ var createPurchaseOkResponsePurchase = z27.lazy(() => {
2263
2255
  return z27.object({
2264
2256
  id: z27.string().optional(),
2265
2257
  packageId: z27.string().optional(),
2266
- startDate: z27.string().optional().nullable(),
2267
- endDate: z27.string().optional().nullable(),
2258
+ startDate: z27.string().optional(),
2259
+ endDate: z27.string().optional(),
2268
2260
  createdDate: z27.string().optional(),
2269
- startTime: z27.number().optional().nullable(),
2270
- endTime: z27.number().optional().nullable()
2261
+ startTime: z27.number().optional(),
2262
+ endTime: z27.number().optional()
2271
2263
  });
2272
2264
  });
2273
2265
  var createPurchaseOkResponsePurchaseResponse = z27.lazy(() => {
2274
2266
  return z27.object({
2275
2267
  id: z27.string().optional(),
2276
2268
  packageId: z27.string().optional(),
2277
- startDate: z27.string().optional().nullable(),
2278
- endDate: z27.string().optional().nullable(),
2269
+ startDate: z27.string().optional(),
2270
+ endDate: z27.string().optional(),
2279
2271
  createdDate: z27.string().optional(),
2280
- startTime: z27.number().optional().nullable(),
2281
- endTime: z27.number().optional().nullable()
2272
+ startTime: z27.number().optional(),
2273
+ endTime: z27.number().optional()
2282
2274
  }).transform((data) => ({
2283
2275
  id: data["id"],
2284
2276
  packageId: data["packageId"],
@@ -2293,11 +2285,11 @@ var createPurchaseOkResponsePurchaseRequest = z27.lazy(() => {
2293
2285
  return z27.object({
2294
2286
  id: z27.string().optional(),
2295
2287
  packageId: z27.string().optional(),
2296
- startDate: z27.string().optional().nullable(),
2297
- endDate: z27.string().optional().nullable(),
2288
+ startDate: z27.string().optional(),
2289
+ endDate: z27.string().optional(),
2298
2290
  createdDate: z27.string().optional(),
2299
- startTime: z27.number().optional().nullable(),
2300
- endTime: z27.number().optional().nullable()
2291
+ startTime: z27.number().optional(),
2292
+ endTime: z27.number().optional()
2301
2293
  }).transform((data) => ({
2302
2294
  id: data["id"],
2303
2295
  packageId: data["packageId"],
@@ -2417,6 +2409,8 @@ var topUpEsimRequest = z32.lazy(() => {
2417
2409
  return z32.object({
2418
2410
  iccid: z32.string().min(18).max(22),
2419
2411
  dataLimitInGb: z32.number(),
2412
+ startDate: z32.string(),
2413
+ endDate: z32.string(),
2420
2414
  email: z32.string().optional(),
2421
2415
  referenceId: z32.string().optional(),
2422
2416
  emailBrand: z32.string().optional(),
@@ -2428,6 +2422,8 @@ var topUpEsimRequestResponse = z32.lazy(() => {
2428
2422
  return z32.object({
2429
2423
  iccid: z32.string().min(18).max(22),
2430
2424
  dataLimitInGB: z32.number(),
2425
+ startDate: z32.string(),
2426
+ endDate: z32.string(),
2431
2427
  email: z32.string().optional(),
2432
2428
  referenceId: z32.string().optional(),
2433
2429
  emailBrand: z32.string().optional(),
@@ -2436,6 +2432,8 @@ var topUpEsimRequestResponse = z32.lazy(() => {
2436
2432
  }).transform((data) => ({
2437
2433
  iccid: data["iccid"],
2438
2434
  dataLimitInGb: data["dataLimitInGB"],
2435
+ startDate: data["startDate"],
2436
+ endDate: data["endDate"],
2439
2437
  email: data["email"],
2440
2438
  referenceId: data["referenceId"],
2441
2439
  emailBrand: data["emailBrand"],
@@ -2447,6 +2445,8 @@ var topUpEsimRequestRequest = z32.lazy(() => {
2447
2445
  return z32.object({
2448
2446
  iccid: z32.string().min(18).max(22),
2449
2447
  dataLimitInGb: z32.number(),
2448
+ startDate: z32.string(),
2449
+ endDate: z32.string(),
2450
2450
  email: z32.string().optional(),
2451
2451
  referenceId: z32.string().optional(),
2452
2452
  emailBrand: z32.string().optional(),
@@ -2455,6 +2455,8 @@ var topUpEsimRequestRequest = z32.lazy(() => {
2455
2455
  }).transform((data) => ({
2456
2456
  iccid: data["iccid"],
2457
2457
  dataLimitInGB: data["dataLimitInGb"],
2458
+ startDate: data["startDate"],
2459
+ endDate: data["endDate"],
2458
2460
  email: data["email"],
2459
2461
  referenceId: data["referenceId"],
2460
2462
  emailBrand: data["emailBrand"],
@@ -2472,30 +2474,27 @@ var topUpEsimOkResponsePurchase = z33.lazy(() => {
2472
2474
  return z33.object({
2473
2475
  id: z33.string().optional(),
2474
2476
  packageId: z33.string().optional(),
2475
- startDate: z33.string().optional().nullable(),
2476
- endDate: z33.string().optional().nullable(),
2477
- duration: z33.number().optional().nullable(),
2477
+ startDate: z33.string().optional(),
2478
+ endDate: z33.string().optional(),
2478
2479
  createdDate: z33.string().optional(),
2479
- startTime: z33.number().optional().nullable(),
2480
- endTime: z33.number().optional().nullable()
2480
+ startTime: z33.number().optional(),
2481
+ endTime: z33.number().optional()
2481
2482
  });
2482
2483
  });
2483
2484
  var topUpEsimOkResponsePurchaseResponse = z33.lazy(() => {
2484
2485
  return z33.object({
2485
2486
  id: z33.string().optional(),
2486
2487
  packageId: z33.string().optional(),
2487
- startDate: z33.string().optional().nullable(),
2488
- endDate: z33.string().optional().nullable(),
2489
- duration: z33.number().optional().nullable(),
2488
+ startDate: z33.string().optional(),
2489
+ endDate: z33.string().optional(),
2490
2490
  createdDate: z33.string().optional(),
2491
- startTime: z33.number().optional().nullable(),
2492
- endTime: z33.number().optional().nullable()
2491
+ startTime: z33.number().optional(),
2492
+ endTime: z33.number().optional()
2493
2493
  }).transform((data) => ({
2494
2494
  id: data["id"],
2495
2495
  packageId: data["packageId"],
2496
2496
  startDate: data["startDate"],
2497
2497
  endDate: data["endDate"],
2498
- duration: data["duration"],
2499
2498
  createdDate: data["createdDate"],
2500
2499
  startTime: data["startTime"],
2501
2500
  endTime: data["endTime"]
@@ -2505,18 +2504,16 @@ var topUpEsimOkResponsePurchaseRequest = z33.lazy(() => {
2505
2504
  return z33.object({
2506
2505
  id: z33.string().optional(),
2507
2506
  packageId: z33.string().optional(),
2508
- startDate: z33.string().optional().nullable(),
2509
- endDate: z33.string().optional().nullable(),
2510
- duration: z33.number().optional().nullable(),
2507
+ startDate: z33.string().optional(),
2508
+ endDate: z33.string().optional(),
2511
2509
  createdDate: z33.string().optional(),
2512
- startTime: z33.number().optional().nullable(),
2513
- endTime: z33.number().optional().nullable()
2510
+ startTime: z33.number().optional(),
2511
+ endTime: z33.number().optional()
2514
2512
  }).transform((data) => ({
2515
2513
  id: data["id"],
2516
2514
  packageId: data["packageId"],
2517
2515
  startDate: data["startDate"],
2518
2516
  endDate: data["endDate"],
2519
- duration: data["duration"],
2520
2517
  createdDate: data["createdDate"],
2521
2518
  startTime: data["startTime"],
2522
2519
  endTime: data["endTime"]
@@ -2662,19 +2659,19 @@ import { z as z39 } from "zod";
2662
2659
  var editPurchaseOkResponse = z39.lazy(() => {
2663
2660
  return z39.object({
2664
2661
  purchaseId: z39.string().optional(),
2665
- newStartDate: z39.string().optional().nullable(),
2666
- newEndDate: z39.string().optional().nullable(),
2667
- newStartTime: z39.number().optional().nullable(),
2668
- newEndTime: z39.number().optional().nullable()
2662
+ newStartDate: z39.string().optional(),
2663
+ newEndDate: z39.string().optional(),
2664
+ newStartTime: z39.number().optional(),
2665
+ newEndTime: z39.number().optional()
2669
2666
  });
2670
2667
  });
2671
2668
  var editPurchaseOkResponseResponse = z39.lazy(() => {
2672
2669
  return z39.object({
2673
2670
  purchaseId: z39.string().optional(),
2674
- newStartDate: z39.string().optional().nullable(),
2675
- newEndDate: z39.string().optional().nullable(),
2676
- newStartTime: z39.number().optional().nullable(),
2677
- newEndTime: z39.number().optional().nullable()
2671
+ newStartDate: z39.string().optional(),
2672
+ newEndDate: z39.string().optional(),
2673
+ newStartTime: z39.number().optional(),
2674
+ newEndTime: z39.number().optional()
2678
2675
  }).transform((data) => ({
2679
2676
  purchaseId: data["purchaseId"],
2680
2677
  newStartDate: data["newStartDate"],
@@ -2686,10 +2683,10 @@ var editPurchaseOkResponseResponse = z39.lazy(() => {
2686
2683
  var editPurchaseOkResponseRequest = z39.lazy(() => {
2687
2684
  return z39.object({
2688
2685
  purchaseId: z39.string().optional(),
2689
- newStartDate: z39.string().optional().nullable(),
2690
- newEndDate: z39.string().optional().nullable(),
2691
- newStartTime: z39.number().optional().nullable(),
2692
- newEndTime: z39.number().optional().nullable()
2686
+ newStartDate: z39.string().optional(),
2687
+ newEndDate: z39.string().optional(),
2688
+ newStartTime: z39.number().optional(),
2689
+ newEndTime: z39.number().optional()
2693
2690
  }).transform((data) => ({
2694
2691
  purchaseId: data["purchaseId"],
2695
2692
  newStartDate: data["newStartDate"],
@@ -2933,7 +2930,7 @@ var PurchasesService = class extends BaseService {
2933
2930
  return this.client.call(request);
2934
2931
  }
2935
2932
  /**
2936
- * 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.
2933
+ * 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.
2937
2934
  * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
2938
2935
  * @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
2939
2936
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "celitech-sdk",
3
- "version": "1.3.43",
3
+ "version": "1.3.46",
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",