celitech-sdk 1.3.58 → 1.3.60

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,4 +1,4 @@
1
- # Celitech TypeScript SDK 1.3.58
1
+ # Celitech TypeScript SDK 1.3.60
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
 
@@ -6,8 +6,8 @@ Welcome to the Celitech SDK documentation. This guide will help you get started
6
6
 
7
7
  ## Versions
8
8
 
9
- - API version: `1.3.58`
10
- - SDK version: `1.3.58`
9
+ - API version: `1.3.60`
10
+ - SDK version: `1.3.60`
11
11
 
12
12
  ## About the API
13
13
 
@@ -37,12 +37,18 @@ This SDK is compatible with the following versions: `TypeScript >= 4.8.4`
37
37
 
38
38
  ## Installation
39
39
 
40
- To get started with the SDK, we recommend installing using `npm`:
40
+ To get started with the SDK, we recommend installing using `npm` or `yarn`:
41
41
 
42
42
  ```bash
43
43
  npm install celitech-sdk
44
44
  ```
45
45
 
46
+ or
47
+
48
+ ```bash
49
+ yarn add celitech-sdk
50
+ ```
51
+
46
52
  ## Authentication
47
53
 
48
54
  ### OAuth Authentication
@@ -112,11 +118,11 @@ The SDK provides various services to interact with the API.
112
118
 
113
119
  | Name |
114
120
  | :------------------------------------------------------------------- |
115
- | [DestinationsService](documentation/services/DestinationsService.md) |
116
- | [PackagesService](documentation/services/PackagesService.md) |
117
- | [PurchasesService](documentation/services/PurchasesService.md) |
118
- | [ESimService](documentation/services/ESimService.md) |
119
- | [IFrameService](documentation/services/IFrameService.md) |
121
+ | DestinationsService |
122
+ | PackagesService |
123
+ | PurchasesService |
124
+ | ESimService |
125
+ | IFrameService |
120
126
 
121
127
  </details>
122
128
 
@@ -129,32 +135,32 @@ The SDK includes several models that represent the data structures used in API r
129
135
 
130
136
  | Name | Description |
131
137
  | :------------------------------------------------------------------------------------------- | :---------- |
132
- | [ListDestinationsOkResponse](documentation/models/ListDestinationsOkResponse.md) | |
133
- | [BadRequest](documentation/models/BadRequest.md) | |
134
- | [Unauthorized](documentation/models/Unauthorized.md) | |
135
- | [ListPackagesOkResponse](documentation/models/ListPackagesOkResponse.md) | |
136
- | [BadRequest](documentation/models/BadRequest.md) | |
137
- | [Unauthorized](documentation/models/Unauthorized.md) | |
138
- | [CreatePurchaseV2Request](documentation/models/CreatePurchaseV2Request.md) | |
139
- | [CreatePurchaseV2OkResponse](documentation/models/CreatePurchaseV2OkResponse.md) | |
140
- | [BadRequest](documentation/models/BadRequest.md) | |
141
- | [Unauthorized](documentation/models/Unauthorized.md) | |
142
- | [ListPurchasesOkResponse](documentation/models/ListPurchasesOkResponse.md) | |
143
- | [CreatePurchaseRequest](documentation/models/CreatePurchaseRequest.md) | |
144
- | [CreatePurchaseOkResponse](documentation/models/CreatePurchaseOkResponse.md) | |
145
- | [TopUpEsimRequest](documentation/models/TopUpEsimRequest.md) | |
146
- | [TopUpEsimOkResponse](documentation/models/TopUpEsimOkResponse.md) | |
147
- | [EditPurchaseRequest](documentation/models/EditPurchaseRequest.md) | |
148
- | [EditPurchaseOkResponse](documentation/models/EditPurchaseOkResponse.md) | |
149
- | [GetPurchaseConsumptionOkResponse](documentation/models/GetPurchaseConsumptionOkResponse.md) | |
150
- | [GetEsimOkResponse](documentation/models/GetEsimOkResponse.md) | |
151
- | [BadRequest](documentation/models/BadRequest.md) | |
152
- | [Unauthorized](documentation/models/Unauthorized.md) | |
153
- | [GetEsimDeviceOkResponse](documentation/models/GetEsimDeviceOkResponse.md) | |
154
- | [GetEsimHistoryOkResponse](documentation/models/GetEsimHistoryOkResponse.md) | |
155
- | [TokenOkResponse](documentation/models/TokenOkResponse.md) | |
156
- | [BadRequest](documentation/models/BadRequest.md) | |
157
- | [Unauthorized](documentation/models/Unauthorized.md) | |
138
+ | ListDestinationsOkResponse | |
139
+ | BadRequest | |
140
+ | Unauthorized | |
141
+ | ListPackagesOkResponse | |
142
+ | BadRequest | |
143
+ | Unauthorized | |
144
+ | CreatePurchaseV2Request | |
145
+ | CreatePurchaseV2OkResponse | |
146
+ | BadRequest | |
147
+ | Unauthorized | |
148
+ | ListPurchasesOkResponse | |
149
+ | CreatePurchaseRequest | |
150
+ | CreatePurchaseOkResponse | |
151
+ | TopUpEsimRequest | |
152
+ | TopUpEsimOkResponse | |
153
+ | EditPurchaseRequest | |
154
+ | EditPurchaseOkResponse | |
155
+ | GetPurchaseConsumptionOkResponse | |
156
+ | GetEsimOkResponse | |
157
+ | BadRequest | |
158
+ | Unauthorized | |
159
+ | GetEsimDeviceOkResponse | |
160
+ | GetEsimHistoryOkResponse | |
161
+ | TokenOkResponse | |
162
+ | BadRequest | |
163
+ | Unauthorized | |
158
164
 
159
165
  </details>
160
166
 
package/dist/index.d.ts CHANGED
@@ -569,11 +569,11 @@ type CreatePurchaseV2OkResponse = z.infer<typeof createPurchaseV2OkResponse>;
569
569
  declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
570
570
  purchases: z.ZodArray<z.ZodLazy<z.ZodObject<{
571
571
  id: z.ZodString;
572
- startDate: z.ZodString;
573
- endDate: z.ZodString;
572
+ startDate: z.ZodNullable<z.ZodString>;
573
+ endDate: z.ZodNullable<z.ZodString>;
574
574
  createdDate: z.ZodString;
575
- startTime: z.ZodOptional<z.ZodNumber>;
576
- endTime: z.ZodOptional<z.ZodNumber>;
575
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
576
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
577
577
  createdAt: z.ZodOptional<z.ZodNumber>;
578
578
  package: z.ZodLazy<z.ZodObject<{
579
579
  id: z.ZodString;
@@ -609,8 +609,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
609
609
  referenceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
610
610
  }, "strip", z.ZodTypeAny, {
611
611
  id: string;
612
- startDate: string;
613
- endDate: string;
612
+ startDate: string | null;
613
+ endDate: string | null;
614
614
  createdDate: string;
615
615
  package: {
616
616
  destination: string;
@@ -625,14 +625,14 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
625
625
  };
626
626
  source: string;
627
627
  purchaseType: string;
628
- startTime?: number | undefined;
629
- endTime?: number | undefined;
628
+ startTime?: number | null | undefined;
629
+ endTime?: number | null | undefined;
630
630
  createdAt?: number | undefined;
631
631
  referenceId?: string | null | undefined;
632
632
  }, {
633
633
  id: string;
634
- startDate: string;
635
- endDate: string;
634
+ startDate: string | null;
635
+ endDate: string | null;
636
636
  createdDate: string;
637
637
  package: {
638
638
  destination: string;
@@ -647,8 +647,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
647
647
  };
648
648
  source: string;
649
649
  purchaseType: string;
650
- startTime?: number | undefined;
651
- endTime?: number | undefined;
650
+ startTime?: number | null | undefined;
651
+ endTime?: number | null | undefined;
652
652
  createdAt?: number | undefined;
653
653
  referenceId?: string | null | undefined;
654
654
  }>>, "many">;
@@ -657,8 +657,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
657
657
  afterCursor: string | null;
658
658
  purchases: {
659
659
  id: string;
660
- startDate: string;
661
- endDate: string;
660
+ startDate: string | null;
661
+ endDate: string | null;
662
662
  createdDate: string;
663
663
  package: {
664
664
  destination: string;
@@ -673,8 +673,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
673
673
  };
674
674
  source: string;
675
675
  purchaseType: string;
676
- startTime?: number | undefined;
677
- endTime?: number | undefined;
676
+ startTime?: number | null | undefined;
677
+ endTime?: number | null | undefined;
678
678
  createdAt?: number | undefined;
679
679
  referenceId?: string | null | undefined;
680
680
  }[];
@@ -682,8 +682,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
682
682
  afterCursor: string | null;
683
683
  purchases: {
684
684
  id: string;
685
- startDate: string;
686
- endDate: string;
685
+ startDate: string | null;
686
+ endDate: string | null;
687
687
  createdDate: string;
688
688
  package: {
689
689
  destination: string;
@@ -698,8 +698,8 @@ declare const listPurchasesOkResponse: z.ZodLazy<z.ZodObject<{
698
698
  };
699
699
  source: string;
700
700
  purchaseType: string;
701
- startTime?: number | undefined;
702
- endTime?: number | undefined;
701
+ startTime?: number | null | undefined;
702
+ endTime?: number | null | undefined;
703
703
  createdAt?: number | undefined;
704
704
  referenceId?: string | null | undefined;
705
705
  }[];
@@ -722,6 +722,7 @@ interface ListPurchasesParams {
722
722
  limit?: number;
723
723
  after?: number;
724
724
  before?: number;
725
+ purchaseId?: string;
725
726
  }
726
727
 
727
728
  /**
@@ -784,27 +785,27 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
784
785
  purchase: z.ZodLazy<z.ZodObject<{
785
786
  id: z.ZodString;
786
787
  packageId: z.ZodString;
787
- startDate: z.ZodString;
788
- endDate: z.ZodString;
788
+ startDate: z.ZodNullable<z.ZodString>;
789
+ endDate: z.ZodNullable<z.ZodString>;
789
790
  createdDate: z.ZodString;
790
- startTime: z.ZodOptional<z.ZodNumber>;
791
- endTime: z.ZodOptional<z.ZodNumber>;
791
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
792
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
792
793
  }, "strip", z.ZodTypeAny, {
793
794
  id: string;
794
- startDate: string;
795
- endDate: string;
795
+ startDate: string | null;
796
+ endDate: string | null;
796
797
  packageId: string;
797
798
  createdDate: string;
798
- startTime?: number | undefined;
799
- endTime?: number | undefined;
799
+ startTime?: number | null | undefined;
800
+ endTime?: number | null | undefined;
800
801
  }, {
801
802
  id: string;
802
- startDate: string;
803
- endDate: string;
803
+ startDate: string | null;
804
+ endDate: string | null;
804
805
  packageId: string;
805
806
  createdDate: string;
806
- startTime?: number | undefined;
807
- endTime?: number | undefined;
807
+ startTime?: number | null | undefined;
808
+ endTime?: number | null | undefined;
808
809
  }>>;
809
810
  profile: z.ZodLazy<z.ZodObject<{
810
811
  iccid: z.ZodString;
@@ -822,12 +823,12 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
822
823
  }, "strip", z.ZodTypeAny, {
823
824
  purchase: {
824
825
  id: string;
825
- startDate: string;
826
- endDate: string;
826
+ startDate: string | null;
827
+ endDate: string | null;
827
828
  packageId: string;
828
829
  createdDate: string;
829
- startTime?: number | undefined;
830
- endTime?: number | undefined;
830
+ startTime?: number | null | undefined;
831
+ endTime?: number | null | undefined;
831
832
  };
832
833
  profile: {
833
834
  iccid: string;
@@ -837,12 +838,12 @@ declare const createPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
837
838
  }, {
838
839
  purchase: {
839
840
  id: string;
840
- startDate: string;
841
- endDate: string;
841
+ startDate: string | null;
842
+ endDate: string | null;
842
843
  packageId: string;
843
844
  createdDate: string;
844
- startTime?: number | undefined;
845
- endTime?: number | undefined;
845
+ startTime?: number | null | undefined;
846
+ endTime?: number | null | undefined;
846
847
  };
847
848
  profile: {
848
849
  iccid: string;
@@ -914,27 +915,27 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
914
915
  purchase: z.ZodLazy<z.ZodObject<{
915
916
  id: z.ZodString;
916
917
  packageId: z.ZodString;
917
- startDate: z.ZodString;
918
- endDate: z.ZodString;
918
+ startDate: z.ZodNullable<z.ZodString>;
919
+ endDate: z.ZodNullable<z.ZodString>;
919
920
  createdDate: z.ZodString;
920
- startTime: z.ZodOptional<z.ZodNumber>;
921
- endTime: z.ZodOptional<z.ZodNumber>;
921
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
922
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
922
923
  }, "strip", z.ZodTypeAny, {
923
924
  id: string;
924
- startDate: string;
925
- endDate: string;
925
+ startDate: string | null;
926
+ endDate: string | null;
926
927
  packageId: string;
927
928
  createdDate: string;
928
- startTime?: number | undefined;
929
- endTime?: number | undefined;
929
+ startTime?: number | null | undefined;
930
+ endTime?: number | null | undefined;
930
931
  }, {
931
932
  id: string;
932
- startDate: string;
933
- endDate: string;
933
+ startDate: string | null;
934
+ endDate: string | null;
934
935
  packageId: string;
935
936
  createdDate: string;
936
- startTime?: number | undefined;
937
- endTime?: number | undefined;
937
+ startTime?: number | null | undefined;
938
+ endTime?: number | null | undefined;
938
939
  }>>;
939
940
  profile: z.ZodLazy<z.ZodObject<{
940
941
  iccid: z.ZodString;
@@ -946,12 +947,12 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
946
947
  }, "strip", z.ZodTypeAny, {
947
948
  purchase: {
948
949
  id: string;
949
- startDate: string;
950
- endDate: string;
950
+ startDate: string | null;
951
+ endDate: string | null;
951
952
  packageId: string;
952
953
  createdDate: string;
953
- startTime?: number | undefined;
954
- endTime?: number | undefined;
954
+ startTime?: number | null | undefined;
955
+ endTime?: number | null | undefined;
955
956
  };
956
957
  profile: {
957
958
  iccid: string;
@@ -959,12 +960,12 @@ declare const topUpEsimOkResponse: z.ZodLazy<z.ZodObject<{
959
960
  }, {
960
961
  purchase: {
961
962
  id: string;
962
- startDate: string;
963
- endDate: string;
963
+ startDate: string | null;
964
+ endDate: string | null;
964
965
  packageId: string;
965
966
  createdDate: string;
966
- startTime?: number | undefined;
967
- endTime?: number | undefined;
967
+ startTime?: number | null | undefined;
968
+ endTime?: number | null | undefined;
968
969
  };
969
970
  profile: {
970
971
  iccid: string;
@@ -1016,22 +1017,22 @@ type EditPurchaseRequest = z.infer<typeof editPurchaseRequest>;
1016
1017
  */
1017
1018
  declare const editPurchaseOkResponse: z.ZodLazy<z.ZodObject<{
1018
1019
  purchaseId: z.ZodString;
1019
- newStartDate: z.ZodString;
1020
- newEndDate: z.ZodString;
1021
- newStartTime: z.ZodOptional<z.ZodNumber>;
1022
- newEndTime: z.ZodOptional<z.ZodNumber>;
1020
+ newStartDate: z.ZodNullable<z.ZodString>;
1021
+ newEndDate: z.ZodNullable<z.ZodString>;
1022
+ newStartTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1023
+ newEndTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1023
1024
  }, "strip", z.ZodTypeAny, {
1024
1025
  purchaseId: string;
1025
- newStartDate: string;
1026
- newEndDate: string;
1027
- newStartTime?: number | undefined;
1028
- newEndTime?: number | undefined;
1026
+ newStartDate: string | null;
1027
+ newEndDate: string | null;
1028
+ newStartTime?: number | null | undefined;
1029
+ newEndTime?: number | null | undefined;
1029
1030
  }, {
1030
1031
  purchaseId: string;
1031
- newStartDate: string;
1032
- newEndDate: string;
1033
- newStartTime?: number | undefined;
1034
- newEndTime?: number | undefined;
1032
+ newStartDate: string | null;
1033
+ newEndDate: string | null;
1034
+ newStartTime?: number | null | undefined;
1035
+ newEndTime?: number | null | undefined;
1035
1036
  }>>;
1036
1037
  /**
1037
1038
  *
@@ -1083,6 +1084,7 @@ declare class PurchasesService extends BaseService {
1083
1084
  * @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
1084
1085
  * @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
1085
1086
  * @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
1087
+ * @param {string} [params.purchaseId] - The id of a specific purchase.
1086
1088
  * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
1087
1089
  * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
1088
1090
  */
@@ -1176,11 +1178,11 @@ type CreatePurchaseV2OkResponseProfile = z.infer<typeof createPurchaseV2OkRespon
1176
1178
  */
1177
1179
  declare const purchases: z.ZodLazy<z.ZodObject<{
1178
1180
  id: z.ZodString;
1179
- startDate: z.ZodString;
1180
- endDate: z.ZodString;
1181
+ startDate: z.ZodNullable<z.ZodString>;
1182
+ endDate: z.ZodNullable<z.ZodString>;
1181
1183
  createdDate: z.ZodString;
1182
- startTime: z.ZodOptional<z.ZodNumber>;
1183
- endTime: z.ZodOptional<z.ZodNumber>;
1184
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1185
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1184
1186
  createdAt: z.ZodOptional<z.ZodNumber>;
1185
1187
  package: z.ZodLazy<z.ZodObject<{
1186
1188
  id: z.ZodString;
@@ -1216,8 +1218,8 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1216
1218
  referenceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1217
1219
  }, "strip", z.ZodTypeAny, {
1218
1220
  id: string;
1219
- startDate: string;
1220
- endDate: string;
1221
+ startDate: string | null;
1222
+ endDate: string | null;
1221
1223
  createdDate: string;
1222
1224
  package: {
1223
1225
  destination: string;
@@ -1232,14 +1234,14 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1232
1234
  };
1233
1235
  source: string;
1234
1236
  purchaseType: string;
1235
- startTime?: number | undefined;
1236
- endTime?: number | undefined;
1237
+ startTime?: number | null | undefined;
1238
+ endTime?: number | null | undefined;
1237
1239
  createdAt?: number | undefined;
1238
1240
  referenceId?: string | null | undefined;
1239
1241
  }, {
1240
1242
  id: string;
1241
- startDate: string;
1242
- endDate: string;
1243
+ startDate: string | null;
1244
+ endDate: string | null;
1243
1245
  createdDate: string;
1244
1246
  package: {
1245
1247
  destination: string;
@@ -1254,8 +1256,8 @@ declare const purchases: z.ZodLazy<z.ZodObject<{
1254
1256
  };
1255
1257
  source: string;
1256
1258
  purchaseType: string;
1257
- startTime?: number | undefined;
1258
- endTime?: number | undefined;
1259
+ startTime?: number | null | undefined;
1260
+ endTime?: number | null | undefined;
1259
1261
  createdAt?: number | undefined;
1260
1262
  referenceId?: string | null | undefined;
1261
1263
  }>>;
@@ -1337,27 +1339,27 @@ type PurchasesEsim = z.infer<typeof purchasesEsim>;
1337
1339
  declare const createPurchaseOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1338
1340
  id: z.ZodString;
1339
1341
  packageId: z.ZodString;
1340
- startDate: z.ZodString;
1341
- endDate: z.ZodString;
1342
+ startDate: z.ZodNullable<z.ZodString>;
1343
+ endDate: z.ZodNullable<z.ZodString>;
1342
1344
  createdDate: z.ZodString;
1343
- startTime: z.ZodOptional<z.ZodNumber>;
1344
- endTime: z.ZodOptional<z.ZodNumber>;
1345
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1346
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1345
1347
  }, "strip", z.ZodTypeAny, {
1346
1348
  id: string;
1347
- startDate: string;
1348
- endDate: string;
1349
+ startDate: string | null;
1350
+ endDate: string | null;
1349
1351
  packageId: string;
1350
1352
  createdDate: string;
1351
- startTime?: number | undefined;
1352
- endTime?: number | undefined;
1353
+ startTime?: number | null | undefined;
1354
+ endTime?: number | null | undefined;
1353
1355
  }, {
1354
1356
  id: string;
1355
- startDate: string;
1356
- endDate: string;
1357
+ startDate: string | null;
1358
+ endDate: string | null;
1357
1359
  packageId: string;
1358
1360
  createdDate: string;
1359
- startTime?: number | undefined;
1360
- endTime?: number | undefined;
1361
+ startTime?: number | null | undefined;
1362
+ endTime?: number | null | undefined;
1361
1363
  }>>;
1362
1364
  /**
1363
1365
  *
@@ -1403,27 +1405,27 @@ type CreatePurchaseOkResponseProfile = z.infer<typeof createPurchaseOkResponsePr
1403
1405
  declare const topUpEsimOkResponsePurchase: z.ZodLazy<z.ZodObject<{
1404
1406
  id: z.ZodString;
1405
1407
  packageId: z.ZodString;
1406
- startDate: z.ZodString;
1407
- endDate: z.ZodString;
1408
+ startDate: z.ZodNullable<z.ZodString>;
1409
+ endDate: z.ZodNullable<z.ZodString>;
1408
1410
  createdDate: z.ZodString;
1409
- startTime: z.ZodOptional<z.ZodNumber>;
1410
- endTime: z.ZodOptional<z.ZodNumber>;
1411
+ startTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1412
+ endTime: z.ZodNullable<z.ZodOptional<z.ZodNumber>>;
1411
1413
  }, "strip", z.ZodTypeAny, {
1412
1414
  id: string;
1413
- startDate: string;
1414
- endDate: string;
1415
+ startDate: string | null;
1416
+ endDate: string | null;
1415
1417
  packageId: string;
1416
1418
  createdDate: string;
1417
- startTime?: number | undefined;
1418
- endTime?: number | undefined;
1419
+ startTime?: number | null | undefined;
1420
+ endTime?: number | null | undefined;
1419
1421
  }, {
1420
1422
  id: string;
1421
- startDate: string;
1422
- endDate: string;
1423
+ startDate: string | null;
1424
+ endDate: string | null;
1423
1425
  packageId: string;
1424
1426
  createdDate: string;
1425
- startTime?: number | undefined;
1426
- endTime?: number | undefined;
1427
+ startTime?: number | null | undefined;
1428
+ endTime?: number | null | undefined;
1427
1429
  }>>;
1428
1430
  /**
1429
1431
  *
package/dist/index.js CHANGED
@@ -2036,11 +2036,11 @@ var purchasesEsimRequest = import_zod19.z.lazy(() => {
2036
2036
  var purchases = import_zod20.z.lazy(() => {
2037
2037
  return import_zod20.z.object({
2038
2038
  id: import_zod20.z.string(),
2039
- startDate: import_zod20.z.string(),
2040
- endDate: import_zod20.z.string(),
2039
+ startDate: import_zod20.z.string().nullable(),
2040
+ endDate: import_zod20.z.string().nullable(),
2041
2041
  createdDate: import_zod20.z.string(),
2042
- startTime: import_zod20.z.number().optional(),
2043
- endTime: import_zod20.z.number().optional(),
2042
+ startTime: import_zod20.z.number().optional().nullable(),
2043
+ endTime: import_zod20.z.number().optional().nullable(),
2044
2044
  createdAt: import_zod20.z.number().optional(),
2045
2045
  package: package_,
2046
2046
  esim: purchasesEsim,
@@ -2052,11 +2052,11 @@ var purchases = import_zod20.z.lazy(() => {
2052
2052
  var purchasesResponse = import_zod20.z.lazy(() => {
2053
2053
  return import_zod20.z.object({
2054
2054
  id: import_zod20.z.string(),
2055
- startDate: import_zod20.z.string(),
2056
- endDate: import_zod20.z.string(),
2055
+ startDate: import_zod20.z.string().nullable(),
2056
+ endDate: import_zod20.z.string().nullable(),
2057
2057
  createdDate: import_zod20.z.string(),
2058
- startTime: import_zod20.z.number().optional(),
2059
- endTime: import_zod20.z.number().optional(),
2058
+ startTime: import_zod20.z.number().optional().nullable(),
2059
+ endTime: import_zod20.z.number().optional().nullable(),
2060
2060
  createdAt: import_zod20.z.number().optional(),
2061
2061
  package: packageResponse,
2062
2062
  esim: purchasesEsimResponse,
@@ -2081,11 +2081,11 @@ var purchasesResponse = import_zod20.z.lazy(() => {
2081
2081
  var purchasesRequest = import_zod20.z.lazy(() => {
2082
2082
  return import_zod20.z.object({
2083
2083
  id: import_zod20.z.string(),
2084
- startDate: import_zod20.z.string(),
2085
- endDate: import_zod20.z.string(),
2084
+ startDate: import_zod20.z.string().nullable(),
2085
+ endDate: import_zod20.z.string().nullable(),
2086
2086
  createdDate: import_zod20.z.string(),
2087
- startTime: import_zod20.z.number().optional(),
2088
- endTime: import_zod20.z.number().optional(),
2087
+ startTime: import_zod20.z.number().optional().nullable(),
2088
+ endTime: import_zod20.z.number().optional().nullable(),
2089
2089
  createdAt: import_zod20.z.number().optional(),
2090
2090
  package: packageRequest,
2091
2091
  esim: purchasesEsimRequest,
@@ -2210,22 +2210,22 @@ var createPurchaseOkResponsePurchase = import_zod23.z.lazy(() => {
2210
2210
  return import_zod23.z.object({
2211
2211
  id: import_zod23.z.string(),
2212
2212
  packageId: import_zod23.z.string(),
2213
- startDate: import_zod23.z.string(),
2214
- endDate: import_zod23.z.string(),
2213
+ startDate: import_zod23.z.string().nullable(),
2214
+ endDate: import_zod23.z.string().nullable(),
2215
2215
  createdDate: import_zod23.z.string(),
2216
- startTime: import_zod23.z.number().optional(),
2217
- endTime: import_zod23.z.number().optional()
2216
+ startTime: import_zod23.z.number().optional().nullable(),
2217
+ endTime: import_zod23.z.number().optional().nullable()
2218
2218
  });
2219
2219
  });
2220
2220
  var createPurchaseOkResponsePurchaseResponse = import_zod23.z.lazy(() => {
2221
2221
  return import_zod23.z.object({
2222
2222
  id: import_zod23.z.string(),
2223
2223
  packageId: import_zod23.z.string(),
2224
- startDate: import_zod23.z.string(),
2225
- endDate: import_zod23.z.string(),
2224
+ startDate: import_zod23.z.string().nullable(),
2225
+ endDate: import_zod23.z.string().nullable(),
2226
2226
  createdDate: import_zod23.z.string(),
2227
- startTime: import_zod23.z.number().optional(),
2228
- endTime: import_zod23.z.number().optional()
2227
+ startTime: import_zod23.z.number().optional().nullable(),
2228
+ endTime: import_zod23.z.number().optional().nullable()
2229
2229
  }).transform((data) => ({
2230
2230
  id: data["id"],
2231
2231
  packageId: data["packageId"],
@@ -2240,11 +2240,11 @@ var createPurchaseOkResponsePurchaseRequest = import_zod23.z.lazy(() => {
2240
2240
  return import_zod23.z.object({
2241
2241
  id: import_zod23.z.string(),
2242
2242
  packageId: import_zod23.z.string(),
2243
- startDate: import_zod23.z.string(),
2244
- endDate: import_zod23.z.string(),
2243
+ startDate: import_zod23.z.string().nullable(),
2244
+ endDate: import_zod23.z.string().nullable(),
2245
2245
  createdDate: import_zod23.z.string(),
2246
- startTime: import_zod23.z.number().optional(),
2247
- endTime: import_zod23.z.number().optional()
2246
+ startTime: import_zod23.z.number().optional().nullable(),
2247
+ endTime: import_zod23.z.number().optional().nullable()
2248
2248
  }).transform((data) => ({
2249
2249
  id: data["id"],
2250
2250
  packageId: data["packageId"],
@@ -2385,22 +2385,22 @@ var topUpEsimOkResponsePurchase = import_zod27.z.lazy(() => {
2385
2385
  return import_zod27.z.object({
2386
2386
  id: import_zod27.z.string(),
2387
2387
  packageId: import_zod27.z.string(),
2388
- startDate: import_zod27.z.string(),
2389
- endDate: import_zod27.z.string(),
2388
+ startDate: import_zod27.z.string().nullable(),
2389
+ endDate: import_zod27.z.string().nullable(),
2390
2390
  createdDate: import_zod27.z.string(),
2391
- startTime: import_zod27.z.number().optional(),
2392
- endTime: import_zod27.z.number().optional()
2391
+ startTime: import_zod27.z.number().optional().nullable(),
2392
+ endTime: import_zod27.z.number().optional().nullable()
2393
2393
  });
2394
2394
  });
2395
2395
  var topUpEsimOkResponsePurchaseResponse = import_zod27.z.lazy(() => {
2396
2396
  return import_zod27.z.object({
2397
2397
  id: import_zod27.z.string(),
2398
2398
  packageId: import_zod27.z.string(),
2399
- startDate: import_zod27.z.string(),
2400
- endDate: import_zod27.z.string(),
2399
+ startDate: import_zod27.z.string().nullable(),
2400
+ endDate: import_zod27.z.string().nullable(),
2401
2401
  createdDate: import_zod27.z.string(),
2402
- startTime: import_zod27.z.number().optional(),
2403
- endTime: import_zod27.z.number().optional()
2402
+ startTime: import_zod27.z.number().optional().nullable(),
2403
+ endTime: import_zod27.z.number().optional().nullable()
2404
2404
  }).transform((data) => ({
2405
2405
  id: data["id"],
2406
2406
  packageId: data["packageId"],
@@ -2415,11 +2415,11 @@ var topUpEsimOkResponsePurchaseRequest = import_zod27.z.lazy(() => {
2415
2415
  return import_zod27.z.object({
2416
2416
  id: import_zod27.z.string(),
2417
2417
  packageId: import_zod27.z.string(),
2418
- startDate: import_zod27.z.string(),
2419
- endDate: import_zod27.z.string(),
2418
+ startDate: import_zod27.z.string().nullable(),
2419
+ endDate: import_zod27.z.string().nullable(),
2420
2420
  createdDate: import_zod27.z.string(),
2421
- startTime: import_zod27.z.number().optional(),
2422
- endTime: import_zod27.z.number().optional()
2421
+ startTime: import_zod27.z.number().optional().nullable(),
2422
+ endTime: import_zod27.z.number().optional().nullable()
2423
2423
  }).transform((data) => ({
2424
2424
  id: data["id"],
2425
2425
  packageId: data["packageId"],
@@ -2526,19 +2526,19 @@ var import_zod31 = require("zod");
2526
2526
  var editPurchaseOkResponse = import_zod31.z.lazy(() => {
2527
2527
  return import_zod31.z.object({
2528
2528
  purchaseId: import_zod31.z.string(),
2529
- newStartDate: import_zod31.z.string(),
2530
- newEndDate: import_zod31.z.string(),
2531
- newStartTime: import_zod31.z.number().optional(),
2532
- newEndTime: import_zod31.z.number().optional()
2529
+ newStartDate: import_zod31.z.string().nullable(),
2530
+ newEndDate: import_zod31.z.string().nullable(),
2531
+ newStartTime: import_zod31.z.number().optional().nullable(),
2532
+ newEndTime: import_zod31.z.number().optional().nullable()
2533
2533
  });
2534
2534
  });
2535
2535
  var editPurchaseOkResponseResponse = import_zod31.z.lazy(() => {
2536
2536
  return import_zod31.z.object({
2537
2537
  purchaseId: import_zod31.z.string(),
2538
- newStartDate: import_zod31.z.string(),
2539
- newEndDate: import_zod31.z.string(),
2540
- newStartTime: import_zod31.z.number().optional(),
2541
- newEndTime: import_zod31.z.number().optional()
2538
+ newStartDate: import_zod31.z.string().nullable(),
2539
+ newEndDate: import_zod31.z.string().nullable(),
2540
+ newStartTime: import_zod31.z.number().optional().nullable(),
2541
+ newEndTime: import_zod31.z.number().optional().nullable()
2542
2542
  }).transform((data) => ({
2543
2543
  purchaseId: data["purchaseId"],
2544
2544
  newStartDate: data["newStartDate"],
@@ -2550,10 +2550,10 @@ var editPurchaseOkResponseResponse = import_zod31.z.lazy(() => {
2550
2550
  var editPurchaseOkResponseRequest = import_zod31.z.lazy(() => {
2551
2551
  return import_zod31.z.object({
2552
2552
  purchaseId: import_zod31.z.string(),
2553
- newStartDate: import_zod31.z.string(),
2554
- newEndDate: import_zod31.z.string(),
2555
- newStartTime: import_zod31.z.number().optional(),
2556
- newEndTime: import_zod31.z.number().optional()
2553
+ newStartDate: import_zod31.z.string().nullable(),
2554
+ newEndDate: import_zod31.z.string().nullable(),
2555
+ newStartTime: import_zod31.z.number().optional().nullable(),
2556
+ newEndTime: import_zod31.z.number().optional().nullable()
2557
2557
  }).transform((data) => ({
2558
2558
  purchaseId: data["purchaseId"],
2559
2559
  newStartDate: data["newStartDate"],
@@ -2624,6 +2624,7 @@ var PurchasesService = class extends BaseService {
2624
2624
  * @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
2625
2625
  * @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
2626
2626
  * @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
2627
+ * @param {string} [params.purchaseId] - The id of a specific purchase.
2627
2628
  * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
2628
2629
  * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
2629
2630
  */
@@ -2667,6 +2668,9 @@ var PurchasesService = class extends BaseService {
2667
2668
  }).addQueryParam({
2668
2669
  key: "before",
2669
2670
  value: params == null ? void 0 : params.before
2671
+ }).addQueryParam({
2672
+ key: "purchaseId",
2673
+ value: params == null ? void 0 : params.purchaseId
2670
2674
  }).build();
2671
2675
  return this.client.call(request);
2672
2676
  }
package/dist/index.mjs CHANGED
@@ -1992,11 +1992,11 @@ var purchasesEsimRequest = z17.lazy(() => {
1992
1992
  var purchases = z18.lazy(() => {
1993
1993
  return z18.object({
1994
1994
  id: z18.string(),
1995
- startDate: z18.string(),
1996
- endDate: z18.string(),
1995
+ startDate: z18.string().nullable(),
1996
+ endDate: z18.string().nullable(),
1997
1997
  createdDate: z18.string(),
1998
- startTime: z18.number().optional(),
1999
- endTime: z18.number().optional(),
1998
+ startTime: z18.number().optional().nullable(),
1999
+ endTime: z18.number().optional().nullable(),
2000
2000
  createdAt: z18.number().optional(),
2001
2001
  package: package_,
2002
2002
  esim: purchasesEsim,
@@ -2008,11 +2008,11 @@ var purchases = z18.lazy(() => {
2008
2008
  var purchasesResponse = z18.lazy(() => {
2009
2009
  return z18.object({
2010
2010
  id: z18.string(),
2011
- startDate: z18.string(),
2012
- endDate: z18.string(),
2011
+ startDate: z18.string().nullable(),
2012
+ endDate: z18.string().nullable(),
2013
2013
  createdDate: z18.string(),
2014
- startTime: z18.number().optional(),
2015
- endTime: z18.number().optional(),
2014
+ startTime: z18.number().optional().nullable(),
2015
+ endTime: z18.number().optional().nullable(),
2016
2016
  createdAt: z18.number().optional(),
2017
2017
  package: packageResponse,
2018
2018
  esim: purchasesEsimResponse,
@@ -2037,11 +2037,11 @@ var purchasesResponse = z18.lazy(() => {
2037
2037
  var purchasesRequest = z18.lazy(() => {
2038
2038
  return z18.object({
2039
2039
  id: z18.string(),
2040
- startDate: z18.string(),
2041
- endDate: z18.string(),
2040
+ startDate: z18.string().nullable(),
2041
+ endDate: z18.string().nullable(),
2042
2042
  createdDate: z18.string(),
2043
- startTime: z18.number().optional(),
2044
- endTime: z18.number().optional(),
2043
+ startTime: z18.number().optional().nullable(),
2044
+ endTime: z18.number().optional().nullable(),
2045
2045
  createdAt: z18.number().optional(),
2046
2046
  package: packageRequest,
2047
2047
  esim: purchasesEsimRequest,
@@ -2166,22 +2166,22 @@ var createPurchaseOkResponsePurchase = z21.lazy(() => {
2166
2166
  return z21.object({
2167
2167
  id: z21.string(),
2168
2168
  packageId: z21.string(),
2169
- startDate: z21.string(),
2170
- endDate: z21.string(),
2169
+ startDate: z21.string().nullable(),
2170
+ endDate: z21.string().nullable(),
2171
2171
  createdDate: z21.string(),
2172
- startTime: z21.number().optional(),
2173
- endTime: z21.number().optional()
2172
+ startTime: z21.number().optional().nullable(),
2173
+ endTime: z21.number().optional().nullable()
2174
2174
  });
2175
2175
  });
2176
2176
  var createPurchaseOkResponsePurchaseResponse = z21.lazy(() => {
2177
2177
  return z21.object({
2178
2178
  id: z21.string(),
2179
2179
  packageId: z21.string(),
2180
- startDate: z21.string(),
2181
- endDate: z21.string(),
2180
+ startDate: z21.string().nullable(),
2181
+ endDate: z21.string().nullable(),
2182
2182
  createdDate: z21.string(),
2183
- startTime: z21.number().optional(),
2184
- endTime: z21.number().optional()
2183
+ startTime: z21.number().optional().nullable(),
2184
+ endTime: z21.number().optional().nullable()
2185
2185
  }).transform((data) => ({
2186
2186
  id: data["id"],
2187
2187
  packageId: data["packageId"],
@@ -2196,11 +2196,11 @@ var createPurchaseOkResponsePurchaseRequest = z21.lazy(() => {
2196
2196
  return z21.object({
2197
2197
  id: z21.string(),
2198
2198
  packageId: z21.string(),
2199
- startDate: z21.string(),
2200
- endDate: z21.string(),
2199
+ startDate: z21.string().nullable(),
2200
+ endDate: z21.string().nullable(),
2201
2201
  createdDate: z21.string(),
2202
- startTime: z21.number().optional(),
2203
- endTime: z21.number().optional()
2202
+ startTime: z21.number().optional().nullable(),
2203
+ endTime: z21.number().optional().nullable()
2204
2204
  }).transform((data) => ({
2205
2205
  id: data["id"],
2206
2206
  packageId: data["packageId"],
@@ -2341,22 +2341,22 @@ var topUpEsimOkResponsePurchase = z25.lazy(() => {
2341
2341
  return z25.object({
2342
2342
  id: z25.string(),
2343
2343
  packageId: z25.string(),
2344
- startDate: z25.string(),
2345
- endDate: z25.string(),
2344
+ startDate: z25.string().nullable(),
2345
+ endDate: z25.string().nullable(),
2346
2346
  createdDate: z25.string(),
2347
- startTime: z25.number().optional(),
2348
- endTime: z25.number().optional()
2347
+ startTime: z25.number().optional().nullable(),
2348
+ endTime: z25.number().optional().nullable()
2349
2349
  });
2350
2350
  });
2351
2351
  var topUpEsimOkResponsePurchaseResponse = z25.lazy(() => {
2352
2352
  return z25.object({
2353
2353
  id: z25.string(),
2354
2354
  packageId: z25.string(),
2355
- startDate: z25.string(),
2356
- endDate: z25.string(),
2355
+ startDate: z25.string().nullable(),
2356
+ endDate: z25.string().nullable(),
2357
2357
  createdDate: z25.string(),
2358
- startTime: z25.number().optional(),
2359
- endTime: z25.number().optional()
2358
+ startTime: z25.number().optional().nullable(),
2359
+ endTime: z25.number().optional().nullable()
2360
2360
  }).transform((data) => ({
2361
2361
  id: data["id"],
2362
2362
  packageId: data["packageId"],
@@ -2371,11 +2371,11 @@ var topUpEsimOkResponsePurchaseRequest = z25.lazy(() => {
2371
2371
  return z25.object({
2372
2372
  id: z25.string(),
2373
2373
  packageId: z25.string(),
2374
- startDate: z25.string(),
2375
- endDate: z25.string(),
2374
+ startDate: z25.string().nullable(),
2375
+ endDate: z25.string().nullable(),
2376
2376
  createdDate: z25.string(),
2377
- startTime: z25.number().optional(),
2378
- endTime: z25.number().optional()
2377
+ startTime: z25.number().optional().nullable(),
2378
+ endTime: z25.number().optional().nullable()
2379
2379
  }).transform((data) => ({
2380
2380
  id: data["id"],
2381
2381
  packageId: data["packageId"],
@@ -2482,19 +2482,19 @@ import { z as z29 } from "zod";
2482
2482
  var editPurchaseOkResponse = z29.lazy(() => {
2483
2483
  return z29.object({
2484
2484
  purchaseId: z29.string(),
2485
- newStartDate: z29.string(),
2486
- newEndDate: z29.string(),
2487
- newStartTime: z29.number().optional(),
2488
- newEndTime: z29.number().optional()
2485
+ newStartDate: z29.string().nullable(),
2486
+ newEndDate: z29.string().nullable(),
2487
+ newStartTime: z29.number().optional().nullable(),
2488
+ newEndTime: z29.number().optional().nullable()
2489
2489
  });
2490
2490
  });
2491
2491
  var editPurchaseOkResponseResponse = z29.lazy(() => {
2492
2492
  return z29.object({
2493
2493
  purchaseId: z29.string(),
2494
- newStartDate: z29.string(),
2495
- newEndDate: z29.string(),
2496
- newStartTime: z29.number().optional(),
2497
- newEndTime: z29.number().optional()
2494
+ newStartDate: z29.string().nullable(),
2495
+ newEndDate: z29.string().nullable(),
2496
+ newStartTime: z29.number().optional().nullable(),
2497
+ newEndTime: z29.number().optional().nullable()
2498
2498
  }).transform((data) => ({
2499
2499
  purchaseId: data["purchaseId"],
2500
2500
  newStartDate: data["newStartDate"],
@@ -2506,10 +2506,10 @@ var editPurchaseOkResponseResponse = z29.lazy(() => {
2506
2506
  var editPurchaseOkResponseRequest = z29.lazy(() => {
2507
2507
  return z29.object({
2508
2508
  purchaseId: z29.string(),
2509
- newStartDate: z29.string(),
2510
- newEndDate: z29.string(),
2511
- newStartTime: z29.number().optional(),
2512
- newEndTime: z29.number().optional()
2509
+ newStartDate: z29.string().nullable(),
2510
+ newEndDate: z29.string().nullable(),
2511
+ newStartTime: z29.number().optional().nullable(),
2512
+ newEndTime: z29.number().optional().nullable()
2513
2513
  }).transform((data) => ({
2514
2514
  purchaseId: data["purchaseId"],
2515
2515
  newStartDate: data["newStartDate"],
@@ -2580,6 +2580,7 @@ var PurchasesService = class extends BaseService {
2580
2580
  * @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
2581
2581
  * @param {number} [params.after] - Epoch value representing the start of the time interval for filtering purchases
2582
2582
  * @param {number} [params.before] - Epoch value representing the end of the time interval for filtering purchases
2583
+ * @param {string} [params.purchaseId] - The id of a specific purchase.
2583
2584
  * @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
2584
2585
  * @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
2585
2586
  */
@@ -2623,6 +2624,9 @@ var PurchasesService = class extends BaseService {
2623
2624
  }).addQueryParam({
2624
2625
  key: "before",
2625
2626
  value: params == null ? void 0 : params.before
2627
+ }).addQueryParam({
2628
+ key: "purchaseId",
2629
+ value: params == null ? void 0 : params.purchaseId
2626
2630
  }).build();
2627
2631
  return this.client.call(request);
2628
2632
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "celitech-sdk",
3
- "version": "1.3.58",
3
+ "version": "1.3.60",
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",
@@ -11,7 +11,8 @@
11
11
  "scripts": {
12
12
  "test": "tsc --noEmit",
13
13
  "build": "tsup-node src/index.ts --format cjs,esm --dts --clean",
14
- "prepublishOnly": "npm run build"
14
+ "prepublishOnly": "chmod +x ./scripts/prepublish.sh && ./scripts/prepublish.sh && npm run build",
15
+ "test-example": "cd examples && tsc --noEmit"
15
16
  },
16
17
  "keywords": [
17
18
  "typescript",