celitech-sdk 2.0.6 → 2.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -15
- package/dist/index.d.mts +2664 -0
- package/dist/index.d.ts +281 -243
- package/dist/index.js +1117 -716
- package/dist/index.mjs +1117 -716
- package/package.json +18 -7
package/dist/index.js
CHANGED
|
@@ -287,7 +287,11 @@ var TransportHookAdapter = class {
|
|
|
287
287
|
true
|
|
288
288
|
),
|
|
289
289
|
headers: this.hookParamsToTransportParams(newRequest.headers, request.headers, false),
|
|
290
|
-
pathParams: this.hookParamsToTransportParams(
|
|
290
|
+
pathParams: this.hookParamsToTransportParams(
|
|
291
|
+
newRequest.pathParams,
|
|
292
|
+
request.pathParams,
|
|
293
|
+
false
|
|
294
|
+
)
|
|
291
295
|
});
|
|
292
296
|
return newTransportRequest;
|
|
293
297
|
}
|
|
@@ -382,7 +386,7 @@ var TransportHookAdapter = class {
|
|
|
382
386
|
function getContentTypeDefinition(contentType) {
|
|
383
387
|
const ct = contentType.toLowerCase();
|
|
384
388
|
if (ct.startsWith("application/") && ct.includes("xml")) {
|
|
385
|
-
return "
|
|
389
|
+
return "text" /* Text */;
|
|
386
390
|
}
|
|
387
391
|
if (ct === "application/x-www-form-urlencoded") {
|
|
388
392
|
return "form" /* FormUrlEncoded */;
|
|
@@ -421,14 +425,13 @@ var HookHandler = class {
|
|
|
421
425
|
}
|
|
422
426
|
/**
|
|
423
427
|
* Handles a standard HTTP request with hook invocation.
|
|
424
|
-
* Calls beforeRequest hook, processes the request, and calls afterResponse
|
|
428
|
+
* Calls beforeRequest hook, processes the request, and calls the afterResponse hook.
|
|
425
429
|
* @template T - The expected response data type
|
|
426
430
|
* @param request - The HTTP request to process
|
|
427
431
|
* @returns A promise that resolves to the HTTP response
|
|
428
432
|
* @throws Error if no next handler is set, or if error handling fails
|
|
429
433
|
*/
|
|
430
434
|
async handle(request) {
|
|
431
|
-
var _a;
|
|
432
435
|
if (!this.next) {
|
|
433
436
|
throw new Error("No next handler set in hook handler.");
|
|
434
437
|
}
|
|
@@ -439,6 +442,10 @@ var HookHandler = class {
|
|
|
439
442
|
if (response.metadata.status < 400) {
|
|
440
443
|
return await hook.afterResponse(nextRequest, response, hookParams);
|
|
441
444
|
}
|
|
445
|
+
return await this.throwErrorResponse(request, response);
|
|
446
|
+
}
|
|
447
|
+
async throwErrorResponse(request, response, resolveUndeclaredError) {
|
|
448
|
+
var _a;
|
|
442
449
|
const arrayBuffer = response.raw;
|
|
443
450
|
const rawContentType = ((_a = response.metadata.headers["content-type"]) == null ? void 0 : _a.toLocaleLowerCase()) || "";
|
|
444
451
|
const contentType = getContentTypeDefinition(rawContentType);
|
|
@@ -455,10 +462,13 @@ var HookHandler = class {
|
|
|
455
462
|
} catch (e) {
|
|
456
463
|
}
|
|
457
464
|
}
|
|
458
|
-
const customError =
|
|
465
|
+
const customError = error.error.from((json == null ? void 0 : json.message) || "", json);
|
|
459
466
|
customError.metadata = response.metadata;
|
|
460
467
|
customError.throw();
|
|
461
468
|
}
|
|
469
|
+
if (resolveUndeclaredError) {
|
|
470
|
+
throw await resolveUndeclaredError();
|
|
471
|
+
}
|
|
462
472
|
const decodedBody = new TextDecoder().decode(arrayBuffer);
|
|
463
473
|
throw new HttpError(
|
|
464
474
|
response.metadata,
|
|
@@ -488,7 +498,11 @@ Body: ${decodedBody}`
|
|
|
488
498
|
if (response.metadata.status < 400) {
|
|
489
499
|
yield await hook.afterResponse(nextRequest, response, hookParams);
|
|
490
500
|
} else {
|
|
491
|
-
|
|
501
|
+
return await this.throwErrorResponse(
|
|
502
|
+
request,
|
|
503
|
+
response,
|
|
504
|
+
() => hook.onError(nextRequest, response, hookParams)
|
|
505
|
+
);
|
|
492
506
|
}
|
|
493
507
|
}
|
|
494
508
|
}
|
|
@@ -592,7 +606,6 @@ var ResponseValidationHandler = class {
|
|
|
592
606
|
["image" /* Image */]: this.decodeFile,
|
|
593
607
|
["multipartFormData" /* MultipartFormData */]: this.decodeMultipartFormData,
|
|
594
608
|
["text" /* Text */]: this.decodeText,
|
|
595
|
-
["xml" /* Xml */]: this.decodeText,
|
|
596
609
|
["form" /* FormUrlEncoded */]: this.decodeFormUrlEncoded,
|
|
597
610
|
["eventStream" /* EventStream */]: this.decodeEventStream
|
|
598
611
|
};
|
|
@@ -774,7 +787,7 @@ var RequestValidationHandler = class {
|
|
|
774
787
|
if (!this.next) {
|
|
775
788
|
throw new Error("No next handler set in ContentTypeHandler.");
|
|
776
789
|
}
|
|
777
|
-
this.validateRequest(request);
|
|
790
|
+
await this.validateRequest(request);
|
|
778
791
|
return this.next.handle(request);
|
|
779
792
|
}
|
|
780
793
|
/**
|
|
@@ -788,7 +801,7 @@ var RequestValidationHandler = class {
|
|
|
788
801
|
if (!this.next) {
|
|
789
802
|
throw new Error("No next handler set in ContentTypeHandler.");
|
|
790
803
|
}
|
|
791
|
-
this.validateRequest(request);
|
|
804
|
+
await this.validateRequest(request);
|
|
792
805
|
yield* this.next.stream(request);
|
|
793
806
|
}
|
|
794
807
|
/**
|
|
@@ -798,33 +811,41 @@ var RequestValidationHandler = class {
|
|
|
798
811
|
*/
|
|
799
812
|
validateRequest(request) {
|
|
800
813
|
var _a, _b;
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
const parsedBody = (_a = request.requestSchema) == null ? void 0 : _a.parse(request.body);
|
|
804
|
-
request.body = JSON.stringify(parsedBody);
|
|
805
|
-
} catch (error) {
|
|
806
|
-
if (error instanceof import_zod2.ZodError) {
|
|
807
|
-
throw new ValidationError(error, request.body);
|
|
808
|
-
}
|
|
809
|
-
throw error;
|
|
810
|
-
}
|
|
811
|
-
} else if (request.requestContentType === "xml" /* Xml */ || request.requestContentType === "text" /* Text */ || request.requestContentType === "image" /* Image */ || request.requestContentType === "binary" /* Binary */) {
|
|
814
|
+
const requestValidationEnabled = (_b = (_a = request.config.validation) == null ? void 0 : _a.requestValidation) != null ? _b : true;
|
|
815
|
+
if (request.requestContentType === "text" /* Text */ || request.requestContentType === "image" /* Image */ || request.requestContentType === "binary" /* Binary */) {
|
|
812
816
|
request.body = request.body;
|
|
813
817
|
} else if (request.requestContentType === "form" /* FormUrlEncoded */) {
|
|
814
|
-
request.body = this.toFormUrlEncoded(request);
|
|
818
|
+
request.body = this.toFormUrlEncoded(request, requestValidationEnabled);
|
|
815
819
|
} else if (request.requestContentType === "multipartFormData" /* MultipartFormData */) {
|
|
816
820
|
request.body = this.toFormData(request.body, request.filename, request.filenames);
|
|
817
821
|
} else {
|
|
818
|
-
request.body = JSON.stringify((
|
|
822
|
+
request.body = requestValidationEnabled ? JSON.stringify(this.validateBody(request, request.body)) : JSON.stringify(request.body);
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Validates a request body against its schema.
|
|
827
|
+
* @throws ValidationError if Zod schema validation fails
|
|
828
|
+
*/
|
|
829
|
+
validateBody(request, body) {
|
|
830
|
+
if (!request.requestSchema) {
|
|
831
|
+
return body;
|
|
832
|
+
}
|
|
833
|
+
try {
|
|
834
|
+
return request.requestSchema.parse(body);
|
|
835
|
+
} catch (error) {
|
|
836
|
+
if (error instanceof import_zod2.ZodError) {
|
|
837
|
+
throw new ValidationError(error, body);
|
|
838
|
+
}
|
|
839
|
+
throw error;
|
|
819
840
|
}
|
|
820
841
|
}
|
|
821
842
|
/**
|
|
822
843
|
* Converts request body to URL-encoded form data format.
|
|
823
844
|
* @param request - The HTTP request with body to convert
|
|
845
|
+
* @param requestValidationEnabled - Whether to validate the body against its schema first
|
|
824
846
|
* @returns URL-encoded string representation of the body
|
|
825
847
|
*/
|
|
826
|
-
toFormUrlEncoded(request) {
|
|
827
|
-
var _a;
|
|
848
|
+
toFormUrlEncoded(request, requestValidationEnabled) {
|
|
828
849
|
if (request.body === void 0) {
|
|
829
850
|
return "";
|
|
830
851
|
}
|
|
@@ -834,7 +855,7 @@ var RequestValidationHandler = class {
|
|
|
834
855
|
if (request.body instanceof URLSearchParams) {
|
|
835
856
|
return request.body.toString();
|
|
836
857
|
}
|
|
837
|
-
const validatedBody =
|
|
858
|
+
const validatedBody = requestValidationEnabled ? this.validateBody(request, request.body) : request.body;
|
|
838
859
|
if (validatedBody instanceof FormData) {
|
|
839
860
|
const params = new URLSearchParams();
|
|
840
861
|
validatedBody.forEach((value, key) => {
|
|
@@ -844,12 +865,12 @@ var RequestValidationHandler = class {
|
|
|
844
865
|
});
|
|
845
866
|
return params.toString();
|
|
846
867
|
}
|
|
847
|
-
if (typeof validatedBody === "object" && !Array.isArray(validatedBody)) {
|
|
868
|
+
if (typeof validatedBody === "object" && validatedBody !== null && !Array.isArray(validatedBody)) {
|
|
848
869
|
const params = new URLSearchParams();
|
|
849
870
|
for (const [key, value] of Object.entries(validatedBody)) {
|
|
850
|
-
if (value
|
|
851
|
-
|
|
852
|
-
}
|
|
871
|
+
if (value == null)
|
|
872
|
+
continue;
|
|
873
|
+
params.append(key, `${value}`);
|
|
853
874
|
}
|
|
854
875
|
return params.toString();
|
|
855
876
|
}
|
|
@@ -857,7 +878,8 @@ var RequestValidationHandler = class {
|
|
|
857
878
|
}
|
|
858
879
|
/**
|
|
859
880
|
* Converts request body to multipart form data format.
|
|
860
|
-
* Handles files (ArrayBuffer
|
|
881
|
+
* Handles files (ArrayBuffer, Uint8Array, Buffer, or Blob — see `isFileLike` below), arrays,
|
|
882
|
+
* and regular values.
|
|
861
883
|
* @param body - The request body object
|
|
862
884
|
* @param filename - Optional filename for single file uploads
|
|
863
885
|
* @param filenames - Optional filenames array for array of file uploads
|
|
@@ -869,16 +891,16 @@ var RequestValidationHandler = class {
|
|
|
869
891
|
const value = body[key];
|
|
870
892
|
if (Array.isArray(value)) {
|
|
871
893
|
value.forEach((v, i) => {
|
|
872
|
-
if (v
|
|
894
|
+
if (isFileLike(v)) {
|
|
873
895
|
const fileFilename = filenames && filenames[i] ? filenames[i] : `${key}[${i}]`;
|
|
874
|
-
formData.append(`${key}[${i}]`,
|
|
896
|
+
formData.append(`${key}[${i}]`, toBlob(v), fileFilename);
|
|
875
897
|
} else {
|
|
876
898
|
formData.append(`${key}[${i}]`, v);
|
|
877
899
|
}
|
|
878
900
|
});
|
|
879
|
-
} else if (value
|
|
901
|
+
} else if (isFileLike(value)) {
|
|
880
902
|
const fileFilename = filename || key;
|
|
881
|
-
formData.append(key,
|
|
903
|
+
formData.append(key, toBlob(value), fileFilename);
|
|
882
904
|
} else {
|
|
883
905
|
formData.append(key, value);
|
|
884
906
|
}
|
|
@@ -886,6 +908,12 @@ var RequestValidationHandler = class {
|
|
|
886
908
|
return formData;
|
|
887
909
|
}
|
|
888
910
|
};
|
|
911
|
+
function isFileLike(value) {
|
|
912
|
+
return value instanceof ArrayBuffer || ArrayBuffer.isView(value) || typeof Blob !== "undefined" && value instanceof Blob;
|
|
913
|
+
}
|
|
914
|
+
function toBlob(value) {
|
|
915
|
+
return value instanceof Blob ? value : new Blob([value]);
|
|
916
|
+
}
|
|
889
917
|
|
|
890
918
|
// src/http/utils/line-decoder.ts
|
|
891
919
|
var LineDecoder = class {
|
|
@@ -902,7 +930,7 @@ var LineDecoder = class {
|
|
|
902
930
|
* @returns An array of complete lines as Uint8Array
|
|
903
931
|
*/
|
|
904
932
|
splitLines(chunk) {
|
|
905
|
-
this.lineBuffer += this.decoder.decode(chunk);
|
|
933
|
+
this.lineBuffer += this.decoder.decode(chunk, { stream: true });
|
|
906
934
|
let lineEndIndex;
|
|
907
935
|
const lines = [];
|
|
908
936
|
while ((lineEndIndex = this.lineBuffer.indexOf("\n")) >= 0) {
|
|
@@ -974,7 +1002,10 @@ var RequestFetchAdapter = class {
|
|
|
974
1002
|
headers: this.getHeaders(response)
|
|
975
1003
|
};
|
|
976
1004
|
if (response.status >= 400) {
|
|
977
|
-
|
|
1005
|
+
return yield {
|
|
1006
|
+
metadata,
|
|
1007
|
+
raw: await response.clone().arrayBuffer()
|
|
1008
|
+
};
|
|
978
1009
|
}
|
|
979
1010
|
if (!response.body) {
|
|
980
1011
|
return yield {
|
|
@@ -1060,10 +1091,7 @@ var RequestFetchAdapter = class {
|
|
|
1060
1091
|
return headers;
|
|
1061
1092
|
}
|
|
1062
1093
|
toArrayBuffer(uint8Array) {
|
|
1063
|
-
return uint8Array.buffer
|
|
1064
|
-
uint8Array.byteOffset,
|
|
1065
|
-
uint8Array.byteOffset + uint8Array.byteLength
|
|
1066
|
-
);
|
|
1094
|
+
return new Uint8Array(uint8Array).buffer;
|
|
1067
1095
|
}
|
|
1068
1096
|
};
|
|
1069
1097
|
|
|
@@ -1113,7 +1141,7 @@ var RetryHandler = class {
|
|
|
1113
1141
|
if (!this.shouldRetry(error, request) || attempt === maxAttempts) {
|
|
1114
1142
|
throw error;
|
|
1115
1143
|
}
|
|
1116
|
-
const delayMs = this.calculateDelay(attempt, request);
|
|
1144
|
+
const delayMs = this.calculateDelay(attempt, request, error);
|
|
1117
1145
|
await this.delay(delayMs);
|
|
1118
1146
|
}
|
|
1119
1147
|
}
|
|
@@ -1140,7 +1168,7 @@ var RetryHandler = class {
|
|
|
1140
1168
|
if (!this.shouldRetry(error, request) || attempt === maxAttempts) {
|
|
1141
1169
|
throw error;
|
|
1142
1170
|
}
|
|
1143
|
-
const delayMs = this.calculateDelay(attempt, request);
|
|
1171
|
+
const delayMs = this.calculateDelay(attempt, request, error);
|
|
1144
1172
|
await this.delay(delayMs);
|
|
1145
1173
|
}
|
|
1146
1174
|
}
|
|
@@ -1161,10 +1189,8 @@ var RetryHandler = class {
|
|
|
1161
1189
|
}
|
|
1162
1190
|
const httpMethodsToRetry = (_b = (_a = request.config.retry) == null ? void 0 : _a.httpMethodsToRetry) != null ? _b : [
|
|
1163
1191
|
"GET",
|
|
1164
|
-
"POST",
|
|
1165
1192
|
"PUT",
|
|
1166
1193
|
"DELETE",
|
|
1167
|
-
"PATCH",
|
|
1168
1194
|
"HEAD",
|
|
1169
1195
|
"OPTIONS"
|
|
1170
1196
|
];
|
|
@@ -1173,18 +1199,25 @@ var RetryHandler = class {
|
|
|
1173
1199
|
return shouldRetryStatus && shouldRetryMethod;
|
|
1174
1200
|
}
|
|
1175
1201
|
/**
|
|
1176
|
-
* Calculates the delay before the next retry attempt
|
|
1177
|
-
*
|
|
1202
|
+
* Calculates the delay before the next retry attempt. A server rate-limit timing header
|
|
1203
|
+
* (Retry-After / X-RateLimit-Reset) on the error, when present, overrides the computed
|
|
1204
|
+
* exponential backoff; otherwise falls back to exponential backoff with optional jitter.
|
|
1178
1205
|
* @param attempt - The current retry attempt number (1-indexed)
|
|
1179
1206
|
* @param request - The HTTP request being retried
|
|
1207
|
+
* @param error - The error that triggered the retry (carries the response headers)
|
|
1180
1208
|
* @returns The delay in milliseconds, capped at the configured maximum delay
|
|
1181
1209
|
*/
|
|
1182
|
-
calculateDelay(attempt, request) {
|
|
1183
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
1184
|
-
const
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1187
|
-
|
|
1210
|
+
calculateDelay(attempt, request, error) {
|
|
1211
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
1212
|
+
const maxRetryAfterDelay = (_b = (_a = request.config.retry) == null ? void 0 : _a.maxRetryAfterDelayMs) != null ? _b : 6e4;
|
|
1213
|
+
const headerDelay = this.retryAfterDelay(error, maxRetryAfterDelay);
|
|
1214
|
+
if (headerDelay !== null) {
|
|
1215
|
+
return Math.floor(headerDelay);
|
|
1216
|
+
}
|
|
1217
|
+
const baseDelay = (_d = (_c = request.config.retry) == null ? void 0 : _c.delayMs) != null ? _d : 150;
|
|
1218
|
+
const backoffFactor = (_f = (_e = request.config.retry) == null ? void 0 : _e.backoffFactor) != null ? _f : 2;
|
|
1219
|
+
const maxDelay = (_h = (_g = request.config.retry) == null ? void 0 : _g.maxDelayMs) != null ? _h : 5e3;
|
|
1220
|
+
const jitter = (_j = (_i = request.config.retry) == null ? void 0 : _i.jitterMs) != null ? _j : 50;
|
|
1188
1221
|
let delay = baseDelay * Math.pow(backoffFactor, attempt - 1);
|
|
1189
1222
|
delay = Math.min(delay, maxDelay);
|
|
1190
1223
|
if (jitter > 0) {
|
|
@@ -1192,6 +1225,66 @@ var RetryHandler = class {
|
|
|
1192
1225
|
}
|
|
1193
1226
|
return Math.floor(delay);
|
|
1194
1227
|
}
|
|
1228
|
+
/**
|
|
1229
|
+
* Returns the server-directed retry delay (ms) from rate-limit response headers,
|
|
1230
|
+
* honoring Retry-After (delta-seconds or HTTP-date) and, when absent, X-RateLimit-Reset
|
|
1231
|
+
* (epoch seconds), clamped to maxRetryAfterDelayMs. Returns null when no usable header is
|
|
1232
|
+
* present so the caller falls back to the computed exponential backoff.
|
|
1233
|
+
* @param error - The error that triggered the retry (carries the response headers)
|
|
1234
|
+
* @param maxRetryAfterDelayMs - Upper bound for a server-directed delay
|
|
1235
|
+
* @returns The delay in milliseconds, or null to use exponential backoff
|
|
1236
|
+
*/
|
|
1237
|
+
retryAfterDelay(error, maxRetryAfterDelayMs) {
|
|
1238
|
+
var _a;
|
|
1239
|
+
const headers = (_a = error == null ? void 0 : error.metadata) == null ? void 0 : _a.headers;
|
|
1240
|
+
if (!headers || maxRetryAfterDelayMs <= 0) {
|
|
1241
|
+
return null;
|
|
1242
|
+
}
|
|
1243
|
+
const getHeader = (name) => headers[name];
|
|
1244
|
+
const retryAfterMs = getHeader("retry-after-ms");
|
|
1245
|
+
if (retryAfterMs !== void 0 && /^\d+(\.\d+)?$/.test(retryAfterMs.trim())) {
|
|
1246
|
+
return Math.min(Number(retryAfterMs.trim()), maxRetryAfterDelayMs);
|
|
1247
|
+
}
|
|
1248
|
+
const seconds = this.parseRetryAfter(getHeader("retry-after"));
|
|
1249
|
+
if (seconds !== null) {
|
|
1250
|
+
return Math.min(Math.max(seconds * 1e3, 0), maxRetryAfterDelayMs);
|
|
1251
|
+
}
|
|
1252
|
+
const reset = getHeader("x-ratelimit-reset");
|
|
1253
|
+
if (reset !== void 0 && reset.trim() !== "") {
|
|
1254
|
+
const epoch = Number(reset);
|
|
1255
|
+
if (Number.isFinite(epoch)) {
|
|
1256
|
+
const deltaMs = epoch * 1e3 - Date.now();
|
|
1257
|
+
if (deltaMs > 0) {
|
|
1258
|
+
return Math.min(deltaMs, maxRetryAfterDelayMs);
|
|
1259
|
+
}
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
return null;
|
|
1263
|
+
}
|
|
1264
|
+
/**
|
|
1265
|
+
* Parses a Retry-After header value: an integer/float number of seconds, or an HTTP-date
|
|
1266
|
+
* (a past date yields 0). Returns the delay in seconds, or null if empty/unparseable.
|
|
1267
|
+
* @param value - The raw Retry-After header value
|
|
1268
|
+
* @returns The delay in seconds, or null
|
|
1269
|
+
*/
|
|
1270
|
+
parseRetryAfter(value) {
|
|
1271
|
+
if (value === void 0) {
|
|
1272
|
+
return null;
|
|
1273
|
+
}
|
|
1274
|
+
const trimmed = value.trim();
|
|
1275
|
+
if (trimmed === "") {
|
|
1276
|
+
return null;
|
|
1277
|
+
}
|
|
1278
|
+
if (/^\d+(\.\d+)?$/.test(trimmed)) {
|
|
1279
|
+
return Number(trimmed);
|
|
1280
|
+
}
|
|
1281
|
+
const dateMs = Date.parse(trimmed);
|
|
1282
|
+
if (!Number.isNaN(dateMs)) {
|
|
1283
|
+
const deltaSeconds = (dateMs - Date.now()) / 1e3;
|
|
1284
|
+
return deltaSeconds > 0 ? deltaSeconds : 0;
|
|
1285
|
+
}
|
|
1286
|
+
return null;
|
|
1287
|
+
}
|
|
1195
1288
|
/**
|
|
1196
1289
|
* Delays execution for a specified duration before retrying.
|
|
1197
1290
|
* @param delayMs - The delay in milliseconds
|
|
@@ -1431,6 +1524,78 @@ var HttpClient = class {
|
|
|
1431
1524
|
}
|
|
1432
1525
|
};
|
|
1433
1526
|
|
|
1527
|
+
// src/http/utils/runtime.ts
|
|
1528
|
+
var RUNTIME = evaluateRuntime();
|
|
1529
|
+
function evaluateRuntime() {
|
|
1530
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1531
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
1532
|
+
if (isBrowser) {
|
|
1533
|
+
return { type: "browser", version: window.navigator.userAgent };
|
|
1534
|
+
}
|
|
1535
|
+
const isCloudflare = typeof globalThis !== "undefined" && ((_a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : _a.userAgent) === "Cloudflare-Workers";
|
|
1536
|
+
if (isCloudflare) {
|
|
1537
|
+
return { type: "workerd" };
|
|
1538
|
+
}
|
|
1539
|
+
const isEdgeRuntime = typeof EdgeRuntime === "string";
|
|
1540
|
+
if (isEdgeRuntime) {
|
|
1541
|
+
return { type: "edge-runtime" };
|
|
1542
|
+
}
|
|
1543
|
+
const isWebWorker = typeof self === "object" && typeof (self == null ? void 0 : self.importScripts) === "function" && (((_b = self.constructor) == null ? void 0 : _b.name) === "DedicatedWorkerGlobalScope" || ((_c = self.constructor) == null ? void 0 : _c.name) === "ServiceWorkerGlobalScope" || ((_d = self.constructor) == null ? void 0 : _d.name) === "SharedWorkerGlobalScope");
|
|
1544
|
+
if (isWebWorker) {
|
|
1545
|
+
return { type: "web-worker" };
|
|
1546
|
+
}
|
|
1547
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
1548
|
+
if (isDeno) {
|
|
1549
|
+
return {
|
|
1550
|
+
type: "deno",
|
|
1551
|
+
version: Deno.version.deno,
|
|
1552
|
+
os: (_e = Deno.build) == null ? void 0 : _e.os,
|
|
1553
|
+
arch: (_f = Deno.build) == null ? void 0 : _f.arch
|
|
1554
|
+
};
|
|
1555
|
+
}
|
|
1556
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
1557
|
+
if (isBun) {
|
|
1558
|
+
return {
|
|
1559
|
+
type: "bun",
|
|
1560
|
+
version: Bun.version,
|
|
1561
|
+
os: typeof process !== "undefined" ? process.platform : void 0,
|
|
1562
|
+
arch: typeof process !== "undefined" ? process.arch : void 0
|
|
1563
|
+
};
|
|
1564
|
+
}
|
|
1565
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
|
|
1566
|
+
if (isReactNative) {
|
|
1567
|
+
return { type: "react-native" };
|
|
1568
|
+
}
|
|
1569
|
+
const localProcess = typeof process !== "undefined" ? process : void 0;
|
|
1570
|
+
const isNode = typeof localProcess !== "undefined" && typeof ((_g = localProcess.versions) == null ? void 0 : _g.node) === "string";
|
|
1571
|
+
if (isNode) {
|
|
1572
|
+
return {
|
|
1573
|
+
type: "node",
|
|
1574
|
+
version: localProcess.versions.node,
|
|
1575
|
+
parsedVersion: Number(localProcess.versions.node.split(".")[0]),
|
|
1576
|
+
os: localProcess.platform,
|
|
1577
|
+
arch: localProcess.arch
|
|
1578
|
+
};
|
|
1579
|
+
}
|
|
1580
|
+
return { type: "unknown" };
|
|
1581
|
+
}
|
|
1582
|
+
function toBase64(str) {
|
|
1583
|
+
if (typeof Buffer !== "undefined") {
|
|
1584
|
+
return Buffer.from(str, "utf-8").toString("base64");
|
|
1585
|
+
}
|
|
1586
|
+
if (typeof btoa === "function") {
|
|
1587
|
+
const bytes = new TextEncoder().encode(str);
|
|
1588
|
+
let binary = "";
|
|
1589
|
+
for (const byte of bytes) {
|
|
1590
|
+
binary += String.fromCharCode(byte);
|
|
1591
|
+
}
|
|
1592
|
+
return btoa(binary);
|
|
1593
|
+
}
|
|
1594
|
+
throw new Error(
|
|
1595
|
+
`No base64 encoder available in this runtime (${RUNTIME.type}): neither Buffer nor btoa is defined.`
|
|
1596
|
+
);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1434
1599
|
// src/services/base-service.ts
|
|
1435
1600
|
var BaseService = class {
|
|
1436
1601
|
constructor(config, tokenManager) {
|
|
@@ -1493,6 +1658,9 @@ var BaseService = class {
|
|
|
1493
1658
|
}
|
|
1494
1659
|
return merged;
|
|
1495
1660
|
}
|
|
1661
|
+
toBase64(str) {
|
|
1662
|
+
return toBase64(str);
|
|
1663
|
+
}
|
|
1496
1664
|
set baseUrl(baseUrl) {
|
|
1497
1665
|
this.config.baseUrl = baseUrl;
|
|
1498
1666
|
}
|
|
@@ -1553,7 +1721,7 @@ var QuerySerializer = class extends Serializer {
|
|
|
1553
1721
|
}
|
|
1554
1722
|
const query = [];
|
|
1555
1723
|
queryParams.forEach((param) => {
|
|
1556
|
-
if (param.value === void 0) {
|
|
1724
|
+
if (param.value === void 0 || param.value === null) {
|
|
1557
1725
|
return;
|
|
1558
1726
|
}
|
|
1559
1727
|
return query.push(`${this.serializeValue(param)}`);
|
|
@@ -1575,7 +1743,7 @@ var HeaderSerializer = class extends Serializer {
|
|
|
1575
1743
|
}
|
|
1576
1744
|
const headers = {};
|
|
1577
1745
|
headerParams.forEach((param) => {
|
|
1578
|
-
if (!param.key) {
|
|
1746
|
+
if (!param.key || param.value === void 0 || param.value === null) {
|
|
1579
1747
|
return;
|
|
1580
1748
|
}
|
|
1581
1749
|
headers[param.key] = this.serializeValue(param);
|
|
@@ -1597,7 +1765,7 @@ var CookieSerializer = class {
|
|
|
1597
1765
|
}
|
|
1598
1766
|
const cookies = {};
|
|
1599
1767
|
cookieParams.forEach((param) => {
|
|
1600
|
-
if (!param.key || param.value === void 0) {
|
|
1768
|
+
if (!param.key || param.value === void 0 || param.value === null) {
|
|
1601
1769
|
return;
|
|
1602
1770
|
}
|
|
1603
1771
|
cookies[param.key] = this.serializeCookieValue(param);
|
|
@@ -1847,8 +2015,12 @@ var Request = class {
|
|
|
1847
2015
|
* Handles both cursor-based and limit-offset pagination strategies.
|
|
1848
2016
|
*
|
|
1849
2017
|
* @param cursor - The cursor value for cursor-based pagination (optional for limit-offset)
|
|
2018
|
+
* @param offsetIncrement - Fallback increment for offset pagination with no declared `pageSize`
|
|
2019
|
+
* (stepless offset — gap doc row 200), where the caller only learns the increment after fetching
|
|
2020
|
+
* a page (its item count). Ignored whenever `pageSize` is set, which always wins.
|
|
1850
2021
|
*/
|
|
1851
|
-
nextPage(cursor) {
|
|
2022
|
+
nextPage(cursor, offsetIncrement) {
|
|
2023
|
+
var _a;
|
|
1852
2024
|
if (!this.pagination) {
|
|
1853
2025
|
return;
|
|
1854
2026
|
}
|
|
@@ -1861,10 +2033,11 @@ var Request = class {
|
|
|
1861
2033
|
}
|
|
1862
2034
|
const offsetParam = this.getOffsetParam();
|
|
1863
2035
|
if (offsetParam) {
|
|
1864
|
-
|
|
2036
|
+
const increment = (_a = this.pagination.pageSize) != null ? _a : offsetIncrement;
|
|
2037
|
+
if (increment === void 0) {
|
|
1865
2038
|
throw new Error("pageSize is required for limit-offset pagination");
|
|
1866
2039
|
}
|
|
1867
|
-
offsetParam.value = Number(offsetParam.value) +
|
|
2040
|
+
offsetParam.value = Number(offsetParam.value) + increment;
|
|
1868
2041
|
}
|
|
1869
2042
|
}
|
|
1870
2043
|
constructPath() {
|
|
@@ -1917,14 +2090,13 @@ var RequestBuilder = class {
|
|
|
1917
2090
|
clientId: "",
|
|
1918
2091
|
clientSecret: "",
|
|
1919
2092
|
retry: {
|
|
1920
|
-
attempts: 3,
|
|
1921
2093
|
delayMs: 150,
|
|
1922
2094
|
maxDelayMs: 5e3,
|
|
1923
2095
|
backoffFactor: 2,
|
|
1924
2096
|
jitterMs: 50,
|
|
1925
|
-
httpMethodsToRetry: ["GET", "
|
|
2097
|
+
httpMethodsToRetry: ["GET", "PUT", "DELETE", "HEAD", "OPTIONS"]
|
|
1926
2098
|
},
|
|
1927
|
-
validation: { responseValidation: true }
|
|
2099
|
+
validation: { responseValidation: true, requestValidation: true }
|
|
1928
2100
|
},
|
|
1929
2101
|
responses: [],
|
|
1930
2102
|
errors: [],
|
|
@@ -1938,7 +2110,7 @@ var RequestBuilder = class {
|
|
|
1938
2110
|
};
|
|
1939
2111
|
this.addHeaderParam({
|
|
1940
2112
|
key: "User-Agent",
|
|
1941
|
-
value: "postman-codegen/
|
|
2113
|
+
value: "postman-codegen/3.7.0 celitech-sdk/2.0.10 (typescript)"
|
|
1942
2114
|
});
|
|
1943
2115
|
}
|
|
1944
2116
|
setConfig(config) {
|
|
@@ -2036,7 +2208,8 @@ var RequestBuilder = class {
|
|
|
2036
2208
|
value: `${prefix != null ? prefix : "Bearer"} ${accessToken}`,
|
|
2037
2209
|
explode: false,
|
|
2038
2210
|
style: "simple" /* SIMPLE */,
|
|
2039
|
-
encode
|
|
2211
|
+
// Header values are not URL-encoded; `encode` only means something for path/query params.
|
|
2212
|
+
encode: false,
|
|
2040
2213
|
isLimit: false,
|
|
2041
2214
|
isOffset: false,
|
|
2042
2215
|
isCursor: false
|
|
@@ -2052,7 +2225,8 @@ var RequestBuilder = class {
|
|
|
2052
2225
|
value: `Basic ${this.toBase64(`${username}:${password}`)}`,
|
|
2053
2226
|
explode: false,
|
|
2054
2227
|
style: "simple" /* SIMPLE */,
|
|
2055
|
-
encode
|
|
2228
|
+
// Header values are not URL-encoded; `encode` only means something for path/query params.
|
|
2229
|
+
encode: false,
|
|
2056
2230
|
isLimit: false,
|
|
2057
2231
|
isOffset: false,
|
|
2058
2232
|
isCursor: false
|
|
@@ -2071,7 +2245,9 @@ var RequestBuilder = class {
|
|
|
2071
2245
|
value: apiKey,
|
|
2072
2246
|
explode: isQuery,
|
|
2073
2247
|
style: isQuery ? "form" /* FORM */ : "simple" /* SIMPLE */,
|
|
2074
|
-
|
|
2248
|
+
// Query values go through the FORM branch, which always URL-encodes regardless of this flag.
|
|
2249
|
+
// Header/cookie values are not URL-encoded, so `encode` must be false for those locations.
|
|
2250
|
+
encode: isQuery,
|
|
2075
2251
|
isLimit: false,
|
|
2076
2252
|
isOffset: false,
|
|
2077
2253
|
isCursor: false
|
|
@@ -2175,18 +2351,8 @@ var RequestBuilder = class {
|
|
|
2175
2351
|
build() {
|
|
2176
2352
|
return new Request(this.params);
|
|
2177
2353
|
}
|
|
2178
|
-
/**
|
|
2179
|
-
* Converts a string to Base64 encoding.
|
|
2180
|
-
* Works in both Node.js and browser environments.
|
|
2181
|
-
* @param str - The string to encode
|
|
2182
|
-
* @returns The Base64-encoded string
|
|
2183
|
-
*/
|
|
2184
2354
|
toBase64(str) {
|
|
2185
|
-
|
|
2186
|
-
return Buffer.from(str, "utf-8").toString("base64");
|
|
2187
|
-
} else {
|
|
2188
|
-
return btoa(unescape(encodeURIComponent(str)));
|
|
2189
|
-
}
|
|
2355
|
+
return toBase64(str);
|
|
2190
2356
|
}
|
|
2191
2357
|
};
|
|
2192
2358
|
|
|
@@ -2324,14 +2490,14 @@ var OAuthTokenManager = class {
|
|
|
2324
2490
|
* @throws Error if client credentials are missing or token request fails
|
|
2325
2491
|
*/
|
|
2326
2492
|
async getToken(scopes, config) {
|
|
2327
|
-
var _a, _b
|
|
2328
|
-
if (((_a = this.token) == null ? void 0 : _a.hasAllScopes(scopes)) && (
|
|
2493
|
+
var _a, _b;
|
|
2494
|
+
if (((_a = this.token) == null ? void 0 : _a.hasAllScopes(scopes)) && (this.token.expiresAt == null || this.token.expiresAt - Date.now() > 5e3)) {
|
|
2329
2495
|
return this.token;
|
|
2330
2496
|
}
|
|
2331
2497
|
if (!config.clientId || !config.clientSecret) {
|
|
2332
2498
|
throw new Error("OAuthError: clientId and clientSecret are required for token management.");
|
|
2333
2499
|
}
|
|
2334
|
-
const updatedScopes = /* @__PURE__ */ new Set([...scopes, ...((
|
|
2500
|
+
const updatedScopes = /* @__PURE__ */ new Set([...scopes, ...((_b = this.token) == null ? void 0 : _b.scopes) || []]);
|
|
2335
2501
|
const oAuth = new OAuthService(
|
|
2336
2502
|
{
|
|
2337
2503
|
...config,
|
|
@@ -2360,7 +2526,7 @@ var OAuthTokenManager = class {
|
|
|
2360
2526
|
};
|
|
2361
2527
|
|
|
2362
2528
|
// src/services/destinations/destinations-service.ts
|
|
2363
|
-
var
|
|
2529
|
+
var import_zod9 = require("zod");
|
|
2364
2530
|
|
|
2365
2531
|
// src/services/destinations/models/list-destinations-ok-response.ts
|
|
2366
2532
|
var import_zod7 = require("zod");
|
|
@@ -2423,7 +2589,7 @@ var listDestinationsOkResponseRequest = import_zod7.z.lazy(() => {
|
|
|
2423
2589
|
}));
|
|
2424
2590
|
});
|
|
2425
2591
|
|
|
2426
|
-
// src/services/common/
|
|
2592
|
+
// src/services/common/error-response.ts
|
|
2427
2593
|
var import_zod8 = require("zod");
|
|
2428
2594
|
|
|
2429
2595
|
// src/http/errors/throwable-error.ts
|
|
@@ -2438,6 +2604,22 @@ var ThrowableError = class extends Error {
|
|
|
2438
2604
|
this.message = message;
|
|
2439
2605
|
this.response = response;
|
|
2440
2606
|
}
|
|
2607
|
+
/**
|
|
2608
|
+
* Creates an error instance from a response body.
|
|
2609
|
+
* Parsing (which can throw) is kept out of the constructor so that constructing
|
|
2610
|
+
* an error while handling an error response never throws. The base implementation
|
|
2611
|
+
* simply constructs the instance; subclasses may override to populate typed fields.
|
|
2612
|
+
*
|
|
2613
|
+
* Contract: every subclass constructor must accept `(message, response?)`. The base
|
|
2614
|
+
* uses `new this(message, response)`, so a subclass with a different constructor
|
|
2615
|
+
* signature must override `from()`.
|
|
2616
|
+
* @param message - The error message
|
|
2617
|
+
* @param response - Optional response data associated with the error
|
|
2618
|
+
* @returns A new error instance
|
|
2619
|
+
*/
|
|
2620
|
+
static from(message, response) {
|
|
2621
|
+
return new this(message, response);
|
|
2622
|
+
}
|
|
2441
2623
|
/**
|
|
2442
2624
|
* Throws this error instance.
|
|
2443
2625
|
* Convenience method for explicitly throwing the error.
|
|
@@ -2448,48 +2630,29 @@ var ThrowableError = class extends Error {
|
|
|
2448
2630
|
}
|
|
2449
2631
|
};
|
|
2450
2632
|
|
|
2451
|
-
// src/services/common/
|
|
2452
|
-
var
|
|
2633
|
+
// src/services/common/error-response.ts
|
|
2634
|
+
var errorResponseResponse = import_zod8.z.lazy(() => {
|
|
2453
2635
|
return import_zod8.z.object({
|
|
2454
2636
|
message: import_zod8.z.string().optional()
|
|
2455
2637
|
}).transform((data) => ({
|
|
2456
2638
|
message: data["message"]
|
|
2457
2639
|
}));
|
|
2458
2640
|
});
|
|
2459
|
-
var
|
|
2641
|
+
var ErrorResponse = class extends ThrowableError {
|
|
2460
2642
|
constructor(message, response) {
|
|
2461
2643
|
super(message);
|
|
2462
2644
|
this.message = message;
|
|
2463
2645
|
this.response = response;
|
|
2464
|
-
const parsedResponse = badRequestResponse.parse(response);
|
|
2465
|
-
this.message = parsedResponse.message || "";
|
|
2466
|
-
}
|
|
2467
|
-
throw() {
|
|
2468
|
-
const error = new BadRequest(this.message, this.response);
|
|
2469
|
-
error.metadata = this.metadata;
|
|
2470
|
-
throw error;
|
|
2471
2646
|
}
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
message: import_zod9.z.string().optional()
|
|
2479
|
-
}).transform((data) => ({
|
|
2480
|
-
message: data["message"]
|
|
2481
|
-
}));
|
|
2482
|
-
});
|
|
2483
|
-
var Unauthorized = class extends ThrowableError {
|
|
2484
|
-
constructor(message, response) {
|
|
2485
|
-
super(message);
|
|
2486
|
-
this.message = message;
|
|
2487
|
-
this.response = response;
|
|
2488
|
-
const parsedResponse = unauthorizedResponse.parse(response);
|
|
2489
|
-
this.message = parsedResponse.message || "";
|
|
2647
|
+
static from(message, response) {
|
|
2648
|
+
const error = new ErrorResponse(message, response);
|
|
2649
|
+
const result = errorResponseResponse.safeParse(response);
|
|
2650
|
+
const parsedResponse = result.success ? result.data : response || {};
|
|
2651
|
+
error.message = parsedResponse.message || "";
|
|
2652
|
+
return error;
|
|
2490
2653
|
}
|
|
2491
2654
|
throw() {
|
|
2492
|
-
const error =
|
|
2655
|
+
const error = ErrorResponse.from(this.message, this.response);
|
|
2493
2656
|
error.metadata = this.metadata;
|
|
2494
2657
|
throw error;
|
|
2495
2658
|
}
|
|
@@ -2513,53 +2676,65 @@ var DestinationsService = class extends BaseService {
|
|
|
2513
2676
|
*/
|
|
2514
2677
|
async listDestinations(requestConfig) {
|
|
2515
2678
|
const resolvedConfig = this.getResolvedConfig(this.listDestinationsConfig, requestConfig);
|
|
2516
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/destinations").setRequestSchema(
|
|
2679
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/destinations").setRequestSchema(import_zod9.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
2517
2680
|
schema: listDestinationsOkResponseResponse,
|
|
2518
2681
|
contentType: "json" /* Json */,
|
|
2519
2682
|
status: 200
|
|
2520
2683
|
}).addError({
|
|
2521
|
-
error:
|
|
2684
|
+
error: ErrorResponse,
|
|
2522
2685
|
contentType: "json" /* Json */,
|
|
2523
2686
|
status: 400
|
|
2524
2687
|
}).addError({
|
|
2525
|
-
error:
|
|
2688
|
+
error: ErrorResponse,
|
|
2526
2689
|
contentType: "json" /* Json */,
|
|
2527
2690
|
status: 401
|
|
2691
|
+
}).addError({
|
|
2692
|
+
error: ErrorResponse,
|
|
2693
|
+
contentType: "json" /* Json */,
|
|
2694
|
+
status: 409
|
|
2695
|
+
}).addError({
|
|
2696
|
+
error: ErrorResponse,
|
|
2697
|
+
contentType: "json" /* Json */,
|
|
2698
|
+
status: 422
|
|
2699
|
+
}).addError({
|
|
2700
|
+
error: ErrorResponse,
|
|
2701
|
+
contentType: "json" /* Json */,
|
|
2702
|
+
status: 503
|
|
2528
2703
|
}).build();
|
|
2529
2704
|
return this.client.callDirect(request);
|
|
2530
2705
|
}
|
|
2531
2706
|
};
|
|
2532
2707
|
|
|
2533
2708
|
// src/services/packages/packages-service.ts
|
|
2534
|
-
var
|
|
2709
|
+
var import_zod12 = require("zod");
|
|
2535
2710
|
|
|
2536
2711
|
// src/services/packages/models/list-packages-ok-response.ts
|
|
2537
|
-
var
|
|
2712
|
+
var import_zod11 = require("zod");
|
|
2538
2713
|
|
|
2539
2714
|
// src/services/packages/models/packages.ts
|
|
2540
|
-
var
|
|
2541
|
-
var packages =
|
|
2542
|
-
return
|
|
2543
|
-
id:
|
|
2544
|
-
destination:
|
|
2545
|
-
destinationIso2:
|
|
2546
|
-
dataLimitInBytes:
|
|
2547
|
-
dataLimitInGb:
|
|
2548
|
-
minDays:
|
|
2549
|
-
maxDays:
|
|
2550
|
-
priceInCents:
|
|
2715
|
+
var import_zod10 = require("zod");
|
|
2716
|
+
var packages = import_zod10.z.lazy(() => {
|
|
2717
|
+
return import_zod10.z.object({
|
|
2718
|
+
id: import_zod10.z.string(),
|
|
2719
|
+
destination: import_zod10.z.string(),
|
|
2720
|
+
destinationIso2: import_zod10.z.string(),
|
|
2721
|
+
dataLimitInBytes: import_zod10.z.number(),
|
|
2722
|
+
dataLimitInGb: import_zod10.z.number(),
|
|
2723
|
+
minDays: import_zod10.z.number(),
|
|
2724
|
+
maxDays: import_zod10.z.number(),
|
|
2725
|
+
priceInCents: import_zod10.z.number()
|
|
2551
2726
|
});
|
|
2552
2727
|
});
|
|
2553
|
-
var packagesResponse =
|
|
2554
|
-
return
|
|
2555
|
-
id:
|
|
2556
|
-
destination:
|
|
2557
|
-
destinationISO2:
|
|
2558
|
-
dataLimitInBytes:
|
|
2559
|
-
dataLimitInGB:
|
|
2560
|
-
minDays:
|
|
2561
|
-
maxDays:
|
|
2562
|
-
priceInCents:
|
|
2728
|
+
var packagesResponse = import_zod10.z.lazy(() => {
|
|
2729
|
+
return import_zod10.z.object({
|
|
2730
|
+
id: import_zod10.z.string(),
|
|
2731
|
+
destination: import_zod10.z.string(),
|
|
2732
|
+
destinationISO2: import_zod10.z.string(),
|
|
2733
|
+
dataLimitInBytes: import_zod10.z.number(),
|
|
2734
|
+
dataLimitInGB: import_zod10.z.number(),
|
|
2735
|
+
minDays: import_zod10.z.number(),
|
|
2736
|
+
maxDays: import_zod10.z.number(),
|
|
2737
|
+
priceInCents: import_zod10.z.number()
|
|
2563
2738
|
}).transform((data) => ({
|
|
2564
2739
|
id: data["id"],
|
|
2565
2740
|
destination: data["destination"],
|
|
@@ -2571,16 +2746,16 @@ var packagesResponse = import_zod11.z.lazy(() => {
|
|
|
2571
2746
|
priceInCents: data["priceInCents"]
|
|
2572
2747
|
}));
|
|
2573
2748
|
});
|
|
2574
|
-
var packagesRequest =
|
|
2575
|
-
return
|
|
2576
|
-
id:
|
|
2577
|
-
destination:
|
|
2578
|
-
destinationIso2:
|
|
2579
|
-
dataLimitInBytes:
|
|
2580
|
-
dataLimitInGb:
|
|
2581
|
-
minDays:
|
|
2582
|
-
maxDays:
|
|
2583
|
-
priceInCents:
|
|
2749
|
+
var packagesRequest = import_zod10.z.lazy(() => {
|
|
2750
|
+
return import_zod10.z.object({
|
|
2751
|
+
id: import_zod10.z.string(),
|
|
2752
|
+
destination: import_zod10.z.string(),
|
|
2753
|
+
destinationIso2: import_zod10.z.string(),
|
|
2754
|
+
dataLimitInBytes: import_zod10.z.number(),
|
|
2755
|
+
dataLimitInGb: import_zod10.z.number(),
|
|
2756
|
+
minDays: import_zod10.z.number(),
|
|
2757
|
+
maxDays: import_zod10.z.number(),
|
|
2758
|
+
priceInCents: import_zod10.z.number()
|
|
2584
2759
|
}).transform((data) => ({
|
|
2585
2760
|
id: data["id"],
|
|
2586
2761
|
destination: data["destination"],
|
|
@@ -2594,25 +2769,25 @@ var packagesRequest = import_zod11.z.lazy(() => {
|
|
|
2594
2769
|
});
|
|
2595
2770
|
|
|
2596
2771
|
// src/services/packages/models/list-packages-ok-response.ts
|
|
2597
|
-
var listPackagesOkResponse =
|
|
2598
|
-
return
|
|
2599
|
-
packages:
|
|
2600
|
-
afterCursor:
|
|
2772
|
+
var listPackagesOkResponse = import_zod11.z.lazy(() => {
|
|
2773
|
+
return import_zod11.z.object({
|
|
2774
|
+
packages: import_zod11.z.array(packages),
|
|
2775
|
+
afterCursor: import_zod11.z.string().nullable()
|
|
2601
2776
|
});
|
|
2602
2777
|
});
|
|
2603
|
-
var listPackagesOkResponseResponse =
|
|
2604
|
-
return
|
|
2605
|
-
packages:
|
|
2606
|
-
afterCursor:
|
|
2778
|
+
var listPackagesOkResponseResponse = import_zod11.z.lazy(() => {
|
|
2779
|
+
return import_zod11.z.object({
|
|
2780
|
+
packages: import_zod11.z.array(packagesResponse),
|
|
2781
|
+
afterCursor: import_zod11.z.string().nullable()
|
|
2607
2782
|
}).transform((data) => ({
|
|
2608
2783
|
packages: data["packages"],
|
|
2609
2784
|
afterCursor: data["afterCursor"]
|
|
2610
2785
|
}));
|
|
2611
2786
|
});
|
|
2612
|
-
var listPackagesOkResponseRequest =
|
|
2613
|
-
return
|
|
2614
|
-
packages:
|
|
2615
|
-
afterCursor:
|
|
2787
|
+
var listPackagesOkResponseRequest = import_zod11.z.lazy(() => {
|
|
2788
|
+
return import_zod11.z.object({
|
|
2789
|
+
packages: import_zod11.z.array(packagesRequest),
|
|
2790
|
+
afterCursor: import_zod11.z.string().nullable()
|
|
2616
2791
|
}).transform((data) => ({
|
|
2617
2792
|
packages: data["packages"],
|
|
2618
2793
|
afterCursor: data["afterCursor"]
|
|
@@ -2646,29 +2821,41 @@ var PackagesService = class extends BaseService {
|
|
|
2646
2821
|
*/
|
|
2647
2822
|
async listPackages(params, requestConfig) {
|
|
2648
2823
|
const resolvedConfig = this.getResolvedConfig(this.listPackagesConfig, requestConfig);
|
|
2649
|
-
|
|
2650
|
-
destination:
|
|
2651
|
-
dataLimitInGb:
|
|
2652
|
-
startDate:
|
|
2653
|
-
endDate:
|
|
2654
|
-
afterCursor:
|
|
2655
|
-
limit:
|
|
2656
|
-
startTime:
|
|
2657
|
-
endTime:
|
|
2658
|
-
includeUnlimited:
|
|
2824
|
+
import_zod12.z.object({
|
|
2825
|
+
destination: import_zod12.z.string().optional(),
|
|
2826
|
+
dataLimitInGb: import_zod12.z.number().optional(),
|
|
2827
|
+
startDate: import_zod12.z.string().optional(),
|
|
2828
|
+
endDate: import_zod12.z.string().optional(),
|
|
2829
|
+
afterCursor: import_zod12.z.string().optional(),
|
|
2830
|
+
limit: import_zod12.z.number().optional(),
|
|
2831
|
+
startTime: import_zod12.z.number().optional(),
|
|
2832
|
+
endTime: import_zod12.z.number().optional(),
|
|
2833
|
+
includeUnlimited: import_zod12.z.boolean().optional()
|
|
2659
2834
|
}).parse(params != null ? params : {});
|
|
2660
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(
|
|
2835
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(import_zod12.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
2661
2836
|
schema: listPackagesOkResponseResponse,
|
|
2662
2837
|
contentType: "json" /* Json */,
|
|
2663
2838
|
status: 200
|
|
2664
2839
|
}).addError({
|
|
2665
|
-
error:
|
|
2840
|
+
error: ErrorResponse,
|
|
2666
2841
|
contentType: "json" /* Json */,
|
|
2667
2842
|
status: 400
|
|
2668
2843
|
}).addError({
|
|
2669
|
-
error:
|
|
2844
|
+
error: ErrorResponse,
|
|
2670
2845
|
contentType: "json" /* Json */,
|
|
2671
2846
|
status: 401
|
|
2847
|
+
}).addError({
|
|
2848
|
+
error: ErrorResponse,
|
|
2849
|
+
contentType: "json" /* Json */,
|
|
2850
|
+
status: 409
|
|
2851
|
+
}).addError({
|
|
2852
|
+
error: ErrorResponse,
|
|
2853
|
+
contentType: "json" /* Json */,
|
|
2854
|
+
status: 422
|
|
2855
|
+
}).addError({
|
|
2856
|
+
error: ErrorResponse,
|
|
2857
|
+
contentType: "json" /* Json */,
|
|
2858
|
+
status: 503
|
|
2672
2859
|
}).addQueryParam({
|
|
2673
2860
|
key: "destination",
|
|
2674
2861
|
value: params == null ? void 0 : params.destination
|
|
@@ -2702,38 +2889,38 @@ var PackagesService = class extends BaseService {
|
|
|
2702
2889
|
};
|
|
2703
2890
|
|
|
2704
2891
|
// src/services/purchases/purchases-service.ts
|
|
2705
|
-
var
|
|
2892
|
+
var import_zod32 = require("zod");
|
|
2706
2893
|
|
|
2707
2894
|
// src/services/purchases/models/create-purchase-v2-request.ts
|
|
2708
|
-
var
|
|
2709
|
-
var createPurchaseV2Request =
|
|
2710
|
-
return
|
|
2711
|
-
destination:
|
|
2712
|
-
dataLimitInGb:
|
|
2713
|
-
startDate:
|
|
2714
|
-
endDate:
|
|
2715
|
-
duration:
|
|
2716
|
-
quantity:
|
|
2717
|
-
email:
|
|
2718
|
-
referenceId:
|
|
2719
|
-
networkBrand:
|
|
2720
|
-
emailBrand:
|
|
2721
|
-
language:
|
|
2895
|
+
var import_zod13 = require("zod");
|
|
2896
|
+
var createPurchaseV2Request = import_zod13.z.lazy(() => {
|
|
2897
|
+
return import_zod13.z.object({
|
|
2898
|
+
destination: import_zod13.z.string(),
|
|
2899
|
+
dataLimitInGb: import_zod13.z.number(),
|
|
2900
|
+
startDate: import_zod13.z.string().optional(),
|
|
2901
|
+
endDate: import_zod13.z.string().optional(),
|
|
2902
|
+
duration: import_zod13.z.number().optional(),
|
|
2903
|
+
quantity: import_zod13.z.number().gte(1).lte(5),
|
|
2904
|
+
email: import_zod13.z.string().optional(),
|
|
2905
|
+
referenceId: import_zod13.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2906
|
+
networkBrand: import_zod13.z.string().optional(),
|
|
2907
|
+
emailBrand: import_zod13.z.string().optional(),
|
|
2908
|
+
language: import_zod13.z.string().optional()
|
|
2722
2909
|
});
|
|
2723
2910
|
});
|
|
2724
|
-
var createPurchaseV2RequestResponse =
|
|
2725
|
-
return
|
|
2726
|
-
destination:
|
|
2727
|
-
dataLimitInGB:
|
|
2728
|
-
startDate:
|
|
2729
|
-
endDate:
|
|
2730
|
-
duration:
|
|
2731
|
-
quantity:
|
|
2732
|
-
email:
|
|
2733
|
-
referenceId:
|
|
2734
|
-
networkBrand:
|
|
2735
|
-
emailBrand:
|
|
2736
|
-
language:
|
|
2911
|
+
var createPurchaseV2RequestResponse = import_zod13.z.lazy(() => {
|
|
2912
|
+
return import_zod13.z.object({
|
|
2913
|
+
destination: import_zod13.z.string(),
|
|
2914
|
+
dataLimitInGB: import_zod13.z.number(),
|
|
2915
|
+
startDate: import_zod13.z.string().optional(),
|
|
2916
|
+
endDate: import_zod13.z.string().optional(),
|
|
2917
|
+
duration: import_zod13.z.number().optional(),
|
|
2918
|
+
quantity: import_zod13.z.number().gte(1).lte(5),
|
|
2919
|
+
email: import_zod13.z.string().optional(),
|
|
2920
|
+
referenceId: import_zod13.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2921
|
+
networkBrand: import_zod13.z.string().optional(),
|
|
2922
|
+
emailBrand: import_zod13.z.string().optional(),
|
|
2923
|
+
language: import_zod13.z.string().optional()
|
|
2737
2924
|
}).transform((data) => ({
|
|
2738
2925
|
destination: data["destination"],
|
|
2739
2926
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -2748,19 +2935,19 @@ var createPurchaseV2RequestResponse = import_zod14.z.lazy(() => {
|
|
|
2748
2935
|
language: data["language"]
|
|
2749
2936
|
}));
|
|
2750
2937
|
});
|
|
2751
|
-
var createPurchaseV2RequestRequest =
|
|
2752
|
-
return
|
|
2753
|
-
destination:
|
|
2754
|
-
dataLimitInGb:
|
|
2755
|
-
startDate:
|
|
2756
|
-
endDate:
|
|
2757
|
-
duration:
|
|
2758
|
-
quantity:
|
|
2759
|
-
email:
|
|
2760
|
-
referenceId:
|
|
2761
|
-
networkBrand:
|
|
2762
|
-
emailBrand:
|
|
2763
|
-
language:
|
|
2938
|
+
var createPurchaseV2RequestRequest = import_zod13.z.lazy(() => {
|
|
2939
|
+
return import_zod13.z.object({
|
|
2940
|
+
destination: import_zod13.z.string(),
|
|
2941
|
+
dataLimitInGb: import_zod13.z.number(),
|
|
2942
|
+
startDate: import_zod13.z.string().optional(),
|
|
2943
|
+
endDate: import_zod13.z.string().optional(),
|
|
2944
|
+
duration: import_zod13.z.number().optional(),
|
|
2945
|
+
quantity: import_zod13.z.number().gte(1).lte(5),
|
|
2946
|
+
email: import_zod13.z.string().optional(),
|
|
2947
|
+
referenceId: import_zod13.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2948
|
+
networkBrand: import_zod13.z.string().optional(),
|
|
2949
|
+
emailBrand: import_zod13.z.string().optional(),
|
|
2950
|
+
language: import_zod13.z.string().optional()
|
|
2764
2951
|
}).transform((data) => ({
|
|
2765
2952
|
destination: data["destination"],
|
|
2766
2953
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -2777,33 +2964,33 @@ var createPurchaseV2RequestRequest = import_zod14.z.lazy(() => {
|
|
|
2777
2964
|
});
|
|
2778
2965
|
|
|
2779
2966
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
|
2780
|
-
var
|
|
2967
|
+
var import_zod16 = require("zod");
|
|
2781
2968
|
|
|
2782
2969
|
// src/services/purchases/models/create-purchase-v2-ok-response-purchase.ts
|
|
2783
|
-
var
|
|
2784
|
-
var createPurchaseV2OkResponsePurchase =
|
|
2785
|
-
return
|
|
2786
|
-
id:
|
|
2787
|
-
packageId:
|
|
2788
|
-
createdDate:
|
|
2970
|
+
var import_zod14 = require("zod");
|
|
2971
|
+
var createPurchaseV2OkResponsePurchase = import_zod14.z.lazy(() => {
|
|
2972
|
+
return import_zod14.z.object({
|
|
2973
|
+
id: import_zod14.z.string(),
|
|
2974
|
+
packageId: import_zod14.z.string(),
|
|
2975
|
+
createdDate: import_zod14.z.string()
|
|
2789
2976
|
});
|
|
2790
2977
|
});
|
|
2791
|
-
var createPurchaseV2OkResponsePurchaseResponse =
|
|
2792
|
-
return
|
|
2793
|
-
id:
|
|
2794
|
-
packageId:
|
|
2795
|
-
createdDate:
|
|
2978
|
+
var createPurchaseV2OkResponsePurchaseResponse = import_zod14.z.lazy(() => {
|
|
2979
|
+
return import_zod14.z.object({
|
|
2980
|
+
id: import_zod14.z.string(),
|
|
2981
|
+
packageId: import_zod14.z.string(),
|
|
2982
|
+
createdDate: import_zod14.z.string()
|
|
2796
2983
|
}).transform((data) => ({
|
|
2797
2984
|
id: data["id"],
|
|
2798
2985
|
packageId: data["packageId"],
|
|
2799
2986
|
createdDate: data["createdDate"]
|
|
2800
2987
|
}));
|
|
2801
2988
|
});
|
|
2802
|
-
var createPurchaseV2OkResponsePurchaseRequest =
|
|
2803
|
-
return
|
|
2804
|
-
id:
|
|
2805
|
-
packageId:
|
|
2806
|
-
createdDate:
|
|
2989
|
+
var createPurchaseV2OkResponsePurchaseRequest = import_zod14.z.lazy(() => {
|
|
2990
|
+
return import_zod14.z.object({
|
|
2991
|
+
id: import_zod14.z.string(),
|
|
2992
|
+
packageId: import_zod14.z.string(),
|
|
2993
|
+
createdDate: import_zod14.z.string()
|
|
2807
2994
|
}).transform((data) => ({
|
|
2808
2995
|
id: data["id"],
|
|
2809
2996
|
packageId: data["packageId"],
|
|
@@ -2812,23 +2999,23 @@ var createPurchaseV2OkResponsePurchaseRequest = import_zod15.z.lazy(() => {
|
|
|
2812
2999
|
});
|
|
2813
3000
|
|
|
2814
3001
|
// src/services/purchases/models/create-purchase-v2-ok-response-profile.ts
|
|
2815
|
-
var
|
|
2816
|
-
var createPurchaseV2OkResponseProfile =
|
|
2817
|
-
return
|
|
2818
|
-
iccid:
|
|
2819
|
-
activationCode:
|
|
2820
|
-
manualActivationCode:
|
|
2821
|
-
iosActivationLink:
|
|
2822
|
-
androidActivationLink:
|
|
3002
|
+
var import_zod15 = require("zod");
|
|
3003
|
+
var createPurchaseV2OkResponseProfile = import_zod15.z.lazy(() => {
|
|
3004
|
+
return import_zod15.z.object({
|
|
3005
|
+
iccid: import_zod15.z.string().min(18).max(22),
|
|
3006
|
+
activationCode: import_zod15.z.string().min(1e3).max(8e3),
|
|
3007
|
+
manualActivationCode: import_zod15.z.string(),
|
|
3008
|
+
iosActivationLink: import_zod15.z.string(),
|
|
3009
|
+
androidActivationLink: import_zod15.z.string()
|
|
2823
3010
|
});
|
|
2824
3011
|
});
|
|
2825
|
-
var createPurchaseV2OkResponseProfileResponse =
|
|
2826
|
-
return
|
|
2827
|
-
iccid:
|
|
2828
|
-
activationCode:
|
|
2829
|
-
manualActivationCode:
|
|
2830
|
-
iosActivationLink:
|
|
2831
|
-
androidActivationLink:
|
|
3012
|
+
var createPurchaseV2OkResponseProfileResponse = import_zod15.z.lazy(() => {
|
|
3013
|
+
return import_zod15.z.object({
|
|
3014
|
+
iccid: import_zod15.z.string().min(18).max(22),
|
|
3015
|
+
activationCode: import_zod15.z.string().min(1e3).max(8e3),
|
|
3016
|
+
manualActivationCode: import_zod15.z.string(),
|
|
3017
|
+
iosActivationLink: import_zod15.z.string(),
|
|
3018
|
+
androidActivationLink: import_zod15.z.string()
|
|
2832
3019
|
}).transform((data) => ({
|
|
2833
3020
|
iccid: data["iccid"],
|
|
2834
3021
|
activationCode: data["activationCode"],
|
|
@@ -2837,13 +3024,13 @@ var createPurchaseV2OkResponseProfileResponse = import_zod16.z.lazy(() => {
|
|
|
2837
3024
|
androidActivationLink: data["androidActivationLink"]
|
|
2838
3025
|
}));
|
|
2839
3026
|
});
|
|
2840
|
-
var createPurchaseV2OkResponseProfileRequest =
|
|
2841
|
-
return
|
|
2842
|
-
iccid:
|
|
2843
|
-
activationCode:
|
|
2844
|
-
manualActivationCode:
|
|
2845
|
-
iosActivationLink:
|
|
2846
|
-
androidActivationLink:
|
|
3027
|
+
var createPurchaseV2OkResponseProfileRequest = import_zod15.z.lazy(() => {
|
|
3028
|
+
return import_zod15.z.object({
|
|
3029
|
+
iccid: import_zod15.z.string().min(18).max(22),
|
|
3030
|
+
activationCode: import_zod15.z.string().min(1e3).max(8e3),
|
|
3031
|
+
manualActivationCode: import_zod15.z.string(),
|
|
3032
|
+
iosActivationLink: import_zod15.z.string(),
|
|
3033
|
+
androidActivationLink: import_zod15.z.string()
|
|
2847
3034
|
}).transform((data) => ({
|
|
2848
3035
|
iccid: data["iccid"],
|
|
2849
3036
|
activationCode: data["activationCode"],
|
|
@@ -2854,14 +3041,14 @@ var createPurchaseV2OkResponseProfileRequest = import_zod16.z.lazy(() => {
|
|
|
2854
3041
|
});
|
|
2855
3042
|
|
|
2856
3043
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
|
2857
|
-
var createPurchaseV2OkResponse =
|
|
2858
|
-
return
|
|
3044
|
+
var createPurchaseV2OkResponse = import_zod16.z.lazy(() => {
|
|
3045
|
+
return import_zod16.z.object({
|
|
2859
3046
|
purchase: createPurchaseV2OkResponsePurchase,
|
|
2860
3047
|
profile: createPurchaseV2OkResponseProfile
|
|
2861
3048
|
});
|
|
2862
3049
|
});
|
|
2863
|
-
var createPurchaseV2OkResponseResponse =
|
|
2864
|
-
return
|
|
3050
|
+
var createPurchaseV2OkResponseResponse = import_zod16.z.lazy(() => {
|
|
3051
|
+
return import_zod16.z.object({
|
|
2865
3052
|
purchase: createPurchaseV2OkResponsePurchaseResponse,
|
|
2866
3053
|
profile: createPurchaseV2OkResponseProfileResponse
|
|
2867
3054
|
}).transform((data) => ({
|
|
@@ -2869,8 +3056,8 @@ var createPurchaseV2OkResponseResponse = import_zod17.z.lazy(() => {
|
|
|
2869
3056
|
profile: data["profile"]
|
|
2870
3057
|
}));
|
|
2871
3058
|
});
|
|
2872
|
-
var createPurchaseV2OkResponseRequest =
|
|
2873
|
-
return
|
|
3059
|
+
var createPurchaseV2OkResponseRequest = import_zod16.z.lazy(() => {
|
|
3060
|
+
return import_zod16.z.object({
|
|
2874
3061
|
purchase: createPurchaseV2OkResponsePurchaseRequest,
|
|
2875
3062
|
profile: createPurchaseV2OkResponseProfileRequest
|
|
2876
3063
|
}).transform((data) => ({
|
|
@@ -2880,33 +3067,33 @@ var createPurchaseV2OkResponseRequest = import_zod17.z.lazy(() => {
|
|
|
2880
3067
|
});
|
|
2881
3068
|
|
|
2882
3069
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
|
2883
|
-
var
|
|
3070
|
+
var import_zod20 = require("zod");
|
|
2884
3071
|
|
|
2885
3072
|
// src/services/purchases/models/purchases.ts
|
|
2886
|
-
var
|
|
3073
|
+
var import_zod19 = require("zod");
|
|
2887
3074
|
|
|
2888
3075
|
// src/services/purchases/models/package_.ts
|
|
2889
|
-
var
|
|
2890
|
-
var package_ =
|
|
2891
|
-
return
|
|
2892
|
-
id:
|
|
2893
|
-
dataLimitInBytes:
|
|
2894
|
-
dataLimitInGb:
|
|
2895
|
-
destination:
|
|
2896
|
-
destinationIso2:
|
|
2897
|
-
destinationName:
|
|
2898
|
-
priceInCents:
|
|
3076
|
+
var import_zod17 = require("zod");
|
|
3077
|
+
var package_ = import_zod17.z.lazy(() => {
|
|
3078
|
+
return import_zod17.z.object({
|
|
3079
|
+
id: import_zod17.z.string(),
|
|
3080
|
+
dataLimitInBytes: import_zod17.z.number(),
|
|
3081
|
+
dataLimitInGb: import_zod17.z.number(),
|
|
3082
|
+
destination: import_zod17.z.string(),
|
|
3083
|
+
destinationIso2: import_zod17.z.string(),
|
|
3084
|
+
destinationName: import_zod17.z.string(),
|
|
3085
|
+
priceInCents: import_zod17.z.number()
|
|
2899
3086
|
});
|
|
2900
3087
|
});
|
|
2901
|
-
var packageResponse =
|
|
2902
|
-
return
|
|
2903
|
-
id:
|
|
2904
|
-
dataLimitInBytes:
|
|
2905
|
-
dataLimitInGB:
|
|
2906
|
-
destination:
|
|
2907
|
-
destinationISO2:
|
|
2908
|
-
destinationName:
|
|
2909
|
-
priceInCents:
|
|
3088
|
+
var packageResponse = import_zod17.z.lazy(() => {
|
|
3089
|
+
return import_zod17.z.object({
|
|
3090
|
+
id: import_zod17.z.string(),
|
|
3091
|
+
dataLimitInBytes: import_zod17.z.number(),
|
|
3092
|
+
dataLimitInGB: import_zod17.z.number(),
|
|
3093
|
+
destination: import_zod17.z.string(),
|
|
3094
|
+
destinationISO2: import_zod17.z.string(),
|
|
3095
|
+
destinationName: import_zod17.z.string(),
|
|
3096
|
+
priceInCents: import_zod17.z.number()
|
|
2910
3097
|
}).transform((data) => ({
|
|
2911
3098
|
id: data["id"],
|
|
2912
3099
|
dataLimitInBytes: data["dataLimitInBytes"],
|
|
@@ -2917,15 +3104,15 @@ var packageResponse = import_zod18.z.lazy(() => {
|
|
|
2917
3104
|
priceInCents: data["priceInCents"]
|
|
2918
3105
|
}));
|
|
2919
3106
|
});
|
|
2920
|
-
var packageRequest =
|
|
2921
|
-
return
|
|
2922
|
-
id:
|
|
2923
|
-
dataLimitInBytes:
|
|
2924
|
-
dataLimitInGb:
|
|
2925
|
-
destination:
|
|
2926
|
-
destinationIso2:
|
|
2927
|
-
destinationName:
|
|
2928
|
-
priceInCents:
|
|
3107
|
+
var packageRequest = import_zod17.z.lazy(() => {
|
|
3108
|
+
return import_zod17.z.object({
|
|
3109
|
+
id: import_zod17.z.string(),
|
|
3110
|
+
dataLimitInBytes: import_zod17.z.number(),
|
|
3111
|
+
dataLimitInGb: import_zod17.z.number(),
|
|
3112
|
+
destination: import_zod17.z.string(),
|
|
3113
|
+
destinationIso2: import_zod17.z.string(),
|
|
3114
|
+
destinationName: import_zod17.z.string(),
|
|
3115
|
+
priceInCents: import_zod17.z.number()
|
|
2929
3116
|
}).transform((data) => ({
|
|
2930
3117
|
id: data["id"],
|
|
2931
3118
|
dataLimitInBytes: data["dataLimitInBytes"],
|
|
@@ -2938,60 +3125,60 @@ var packageRequest = import_zod18.z.lazy(() => {
|
|
|
2938
3125
|
});
|
|
2939
3126
|
|
|
2940
3127
|
// src/services/purchases/models/purchases-esim.ts
|
|
2941
|
-
var
|
|
2942
|
-
var purchasesEsim =
|
|
2943
|
-
return
|
|
2944
|
-
iccid:
|
|
3128
|
+
var import_zod18 = require("zod");
|
|
3129
|
+
var purchasesEsim = import_zod18.z.lazy(() => {
|
|
3130
|
+
return import_zod18.z.object({
|
|
3131
|
+
iccid: import_zod18.z.string().min(18).max(22)
|
|
2945
3132
|
});
|
|
2946
3133
|
});
|
|
2947
|
-
var purchasesEsimResponse =
|
|
2948
|
-
return
|
|
2949
|
-
iccid:
|
|
3134
|
+
var purchasesEsimResponse = import_zod18.z.lazy(() => {
|
|
3135
|
+
return import_zod18.z.object({
|
|
3136
|
+
iccid: import_zod18.z.string().min(18).max(22)
|
|
2950
3137
|
}).transform((data) => ({
|
|
2951
3138
|
iccid: data["iccid"]
|
|
2952
3139
|
}));
|
|
2953
3140
|
});
|
|
2954
|
-
var purchasesEsimRequest =
|
|
2955
|
-
return
|
|
2956
|
-
iccid:
|
|
3141
|
+
var purchasesEsimRequest = import_zod18.z.lazy(() => {
|
|
3142
|
+
return import_zod18.z.object({
|
|
3143
|
+
iccid: import_zod18.z.string().min(18).max(22)
|
|
2957
3144
|
}).transform((data) => ({
|
|
2958
3145
|
iccid: data["iccid"]
|
|
2959
3146
|
}));
|
|
2960
3147
|
});
|
|
2961
3148
|
|
|
2962
3149
|
// src/services/purchases/models/purchases.ts
|
|
2963
|
-
var purchases =
|
|
2964
|
-
return
|
|
2965
|
-
id:
|
|
2966
|
-
startDate:
|
|
2967
|
-
endDate:
|
|
2968
|
-
duration:
|
|
2969
|
-
createdDate:
|
|
2970
|
-
startTime:
|
|
2971
|
-
endTime:
|
|
2972
|
-
createdAt:
|
|
3150
|
+
var purchases = import_zod19.z.lazy(() => {
|
|
3151
|
+
return import_zod19.z.object({
|
|
3152
|
+
id: import_zod19.z.string(),
|
|
3153
|
+
startDate: import_zod19.z.string().nullable(),
|
|
3154
|
+
endDate: import_zod19.z.string().nullable(),
|
|
3155
|
+
duration: import_zod19.z.number().optional().nullable(),
|
|
3156
|
+
createdDate: import_zod19.z.string(),
|
|
3157
|
+
startTime: import_zod19.z.number().optional().nullable(),
|
|
3158
|
+
endTime: import_zod19.z.number().optional().nullable(),
|
|
3159
|
+
createdAt: import_zod19.z.number().optional(),
|
|
2973
3160
|
package: package_,
|
|
2974
3161
|
esim: purchasesEsim,
|
|
2975
|
-
source:
|
|
2976
|
-
purchaseType:
|
|
2977
|
-
referenceId:
|
|
3162
|
+
source: import_zod19.z.string(),
|
|
3163
|
+
purchaseType: import_zod19.z.string(),
|
|
3164
|
+
referenceId: import_zod19.z.string().optional().nullable()
|
|
2978
3165
|
});
|
|
2979
3166
|
});
|
|
2980
|
-
var purchasesResponse =
|
|
2981
|
-
return
|
|
2982
|
-
id:
|
|
2983
|
-
startDate:
|
|
2984
|
-
endDate:
|
|
2985
|
-
duration:
|
|
2986
|
-
createdDate:
|
|
2987
|
-
startTime:
|
|
2988
|
-
endTime:
|
|
2989
|
-
createdAt:
|
|
3167
|
+
var purchasesResponse = import_zod19.z.lazy(() => {
|
|
3168
|
+
return import_zod19.z.object({
|
|
3169
|
+
id: import_zod19.z.string(),
|
|
3170
|
+
startDate: import_zod19.z.string().nullable(),
|
|
3171
|
+
endDate: import_zod19.z.string().nullable(),
|
|
3172
|
+
duration: import_zod19.z.number().optional().nullable(),
|
|
3173
|
+
createdDate: import_zod19.z.string(),
|
|
3174
|
+
startTime: import_zod19.z.number().optional().nullable(),
|
|
3175
|
+
endTime: import_zod19.z.number().optional().nullable(),
|
|
3176
|
+
createdAt: import_zod19.z.number().optional(),
|
|
2990
3177
|
package: packageResponse,
|
|
2991
3178
|
esim: purchasesEsimResponse,
|
|
2992
|
-
source:
|
|
2993
|
-
purchaseType:
|
|
2994
|
-
referenceId:
|
|
3179
|
+
source: import_zod19.z.string(),
|
|
3180
|
+
purchaseType: import_zod19.z.string(),
|
|
3181
|
+
referenceId: import_zod19.z.string().optional().nullable()
|
|
2995
3182
|
}).transform((data) => ({
|
|
2996
3183
|
id: data["id"],
|
|
2997
3184
|
startDate: data["startDate"],
|
|
@@ -3008,21 +3195,21 @@ var purchasesResponse = import_zod20.z.lazy(() => {
|
|
|
3008
3195
|
referenceId: data["referenceId"]
|
|
3009
3196
|
}));
|
|
3010
3197
|
});
|
|
3011
|
-
var purchasesRequest =
|
|
3012
|
-
return
|
|
3013
|
-
id:
|
|
3014
|
-
startDate:
|
|
3015
|
-
endDate:
|
|
3016
|
-
duration:
|
|
3017
|
-
createdDate:
|
|
3018
|
-
startTime:
|
|
3019
|
-
endTime:
|
|
3020
|
-
createdAt:
|
|
3198
|
+
var purchasesRequest = import_zod19.z.lazy(() => {
|
|
3199
|
+
return import_zod19.z.object({
|
|
3200
|
+
id: import_zod19.z.string(),
|
|
3201
|
+
startDate: import_zod19.z.string().nullable(),
|
|
3202
|
+
endDate: import_zod19.z.string().nullable(),
|
|
3203
|
+
duration: import_zod19.z.number().optional().nullable(),
|
|
3204
|
+
createdDate: import_zod19.z.string(),
|
|
3205
|
+
startTime: import_zod19.z.number().optional().nullable(),
|
|
3206
|
+
endTime: import_zod19.z.number().optional().nullable(),
|
|
3207
|
+
createdAt: import_zod19.z.number().optional(),
|
|
3021
3208
|
package: packageRequest,
|
|
3022
3209
|
esim: purchasesEsimRequest,
|
|
3023
|
-
source:
|
|
3024
|
-
purchaseType:
|
|
3025
|
-
referenceId:
|
|
3210
|
+
source: import_zod19.z.string(),
|
|
3211
|
+
purchaseType: import_zod19.z.string(),
|
|
3212
|
+
referenceId: import_zod19.z.string().optional().nullable()
|
|
3026
3213
|
}).transform((data) => ({
|
|
3027
3214
|
id: data["id"],
|
|
3028
3215
|
startDate: data["startDate"],
|
|
@@ -3041,25 +3228,25 @@ var purchasesRequest = import_zod20.z.lazy(() => {
|
|
|
3041
3228
|
});
|
|
3042
3229
|
|
|
3043
3230
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
|
3044
|
-
var listPurchasesOkResponse =
|
|
3045
|
-
return
|
|
3046
|
-
purchases:
|
|
3047
|
-
afterCursor:
|
|
3231
|
+
var listPurchasesOkResponse = import_zod20.z.lazy(() => {
|
|
3232
|
+
return import_zod20.z.object({
|
|
3233
|
+
purchases: import_zod20.z.array(purchases),
|
|
3234
|
+
afterCursor: import_zod20.z.string().nullable()
|
|
3048
3235
|
});
|
|
3049
3236
|
});
|
|
3050
|
-
var listPurchasesOkResponseResponse =
|
|
3051
|
-
return
|
|
3052
|
-
purchases:
|
|
3053
|
-
afterCursor:
|
|
3237
|
+
var listPurchasesOkResponseResponse = import_zod20.z.lazy(() => {
|
|
3238
|
+
return import_zod20.z.object({
|
|
3239
|
+
purchases: import_zod20.z.array(purchasesResponse),
|
|
3240
|
+
afterCursor: import_zod20.z.string().nullable()
|
|
3054
3241
|
}).transform((data) => ({
|
|
3055
3242
|
purchases: data["purchases"],
|
|
3056
3243
|
afterCursor: data["afterCursor"]
|
|
3057
3244
|
}));
|
|
3058
3245
|
});
|
|
3059
|
-
var listPurchasesOkResponseRequest =
|
|
3060
|
-
return
|
|
3061
|
-
purchases:
|
|
3062
|
-
afterCursor:
|
|
3246
|
+
var listPurchasesOkResponseRequest = import_zod20.z.lazy(() => {
|
|
3247
|
+
return import_zod20.z.object({
|
|
3248
|
+
purchases: import_zod20.z.array(purchasesRequest),
|
|
3249
|
+
afterCursor: import_zod20.z.string().nullable()
|
|
3063
3250
|
}).transform((data) => ({
|
|
3064
3251
|
purchases: data["purchases"],
|
|
3065
3252
|
afterCursor: data["afterCursor"]
|
|
@@ -3067,35 +3254,35 @@ var listPurchasesOkResponseRequest = import_zod21.z.lazy(() => {
|
|
|
3067
3254
|
});
|
|
3068
3255
|
|
|
3069
3256
|
// src/services/purchases/models/create-purchase-request.ts
|
|
3070
|
-
var
|
|
3071
|
-
var createPurchaseRequest =
|
|
3072
|
-
return
|
|
3073
|
-
destination:
|
|
3074
|
-
dataLimitInGb:
|
|
3075
|
-
startDate:
|
|
3076
|
-
endDate:
|
|
3077
|
-
email:
|
|
3078
|
-
referenceId:
|
|
3079
|
-
networkBrand:
|
|
3080
|
-
emailBrand:
|
|
3081
|
-
language:
|
|
3082
|
-
startTime:
|
|
3083
|
-
endTime:
|
|
3257
|
+
var import_zod21 = require("zod");
|
|
3258
|
+
var createPurchaseRequest = import_zod21.z.lazy(() => {
|
|
3259
|
+
return import_zod21.z.object({
|
|
3260
|
+
destination: import_zod21.z.string(),
|
|
3261
|
+
dataLimitInGb: import_zod21.z.number(),
|
|
3262
|
+
startDate: import_zod21.z.string(),
|
|
3263
|
+
endDate: import_zod21.z.string(),
|
|
3264
|
+
email: import_zod21.z.string().optional(),
|
|
3265
|
+
referenceId: import_zod21.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3266
|
+
networkBrand: import_zod21.z.string().optional(),
|
|
3267
|
+
emailBrand: import_zod21.z.string().optional(),
|
|
3268
|
+
language: import_zod21.z.string().optional(),
|
|
3269
|
+
startTime: import_zod21.z.number().optional(),
|
|
3270
|
+
endTime: import_zod21.z.number().optional()
|
|
3084
3271
|
});
|
|
3085
3272
|
});
|
|
3086
|
-
var createPurchaseRequestResponse =
|
|
3087
|
-
return
|
|
3088
|
-
destination:
|
|
3089
|
-
dataLimitInGB:
|
|
3090
|
-
startDate:
|
|
3091
|
-
endDate:
|
|
3092
|
-
email:
|
|
3093
|
-
referenceId:
|
|
3094
|
-
networkBrand:
|
|
3095
|
-
emailBrand:
|
|
3096
|
-
language:
|
|
3097
|
-
startTime:
|
|
3098
|
-
endTime:
|
|
3273
|
+
var createPurchaseRequestResponse = import_zod21.z.lazy(() => {
|
|
3274
|
+
return import_zod21.z.object({
|
|
3275
|
+
destination: import_zod21.z.string(),
|
|
3276
|
+
dataLimitInGB: import_zod21.z.number(),
|
|
3277
|
+
startDate: import_zod21.z.string(),
|
|
3278
|
+
endDate: import_zod21.z.string(),
|
|
3279
|
+
email: import_zod21.z.string().optional(),
|
|
3280
|
+
referenceId: import_zod21.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3281
|
+
networkBrand: import_zod21.z.string().optional(),
|
|
3282
|
+
emailBrand: import_zod21.z.string().optional(),
|
|
3283
|
+
language: import_zod21.z.string().optional(),
|
|
3284
|
+
startTime: import_zod21.z.number().optional(),
|
|
3285
|
+
endTime: import_zod21.z.number().optional()
|
|
3099
3286
|
}).transform((data) => ({
|
|
3100
3287
|
destination: data["destination"],
|
|
3101
3288
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -3110,19 +3297,19 @@ var createPurchaseRequestResponse = import_zod22.z.lazy(() => {
|
|
|
3110
3297
|
endTime: data["endTime"]
|
|
3111
3298
|
}));
|
|
3112
3299
|
});
|
|
3113
|
-
var createPurchaseRequestRequest =
|
|
3114
|
-
return
|
|
3115
|
-
destination:
|
|
3116
|
-
dataLimitInGb:
|
|
3117
|
-
startDate:
|
|
3118
|
-
endDate:
|
|
3119
|
-
email:
|
|
3120
|
-
referenceId:
|
|
3121
|
-
networkBrand:
|
|
3122
|
-
emailBrand:
|
|
3123
|
-
language:
|
|
3124
|
-
startTime:
|
|
3125
|
-
endTime:
|
|
3300
|
+
var createPurchaseRequestRequest = import_zod21.z.lazy(() => {
|
|
3301
|
+
return import_zod21.z.object({
|
|
3302
|
+
destination: import_zod21.z.string(),
|
|
3303
|
+
dataLimitInGb: import_zod21.z.number(),
|
|
3304
|
+
startDate: import_zod21.z.string(),
|
|
3305
|
+
endDate: import_zod21.z.string(),
|
|
3306
|
+
email: import_zod21.z.string().optional(),
|
|
3307
|
+
referenceId: import_zod21.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3308
|
+
networkBrand: import_zod21.z.string().optional(),
|
|
3309
|
+
emailBrand: import_zod21.z.string().optional(),
|
|
3310
|
+
language: import_zod21.z.string().optional(),
|
|
3311
|
+
startTime: import_zod21.z.number().optional(),
|
|
3312
|
+
endTime: import_zod21.z.number().optional()
|
|
3126
3313
|
}).transform((data) => ({
|
|
3127
3314
|
destination: data["destination"],
|
|
3128
3315
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -3139,30 +3326,30 @@ var createPurchaseRequestRequest = import_zod22.z.lazy(() => {
|
|
|
3139
3326
|
});
|
|
3140
3327
|
|
|
3141
3328
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
|
3142
|
-
var
|
|
3329
|
+
var import_zod24 = require("zod");
|
|
3143
3330
|
|
|
3144
3331
|
// src/services/purchases/models/create-purchase-ok-response-purchase.ts
|
|
3145
|
-
var
|
|
3146
|
-
var createPurchaseOkResponsePurchase =
|
|
3147
|
-
return
|
|
3148
|
-
id:
|
|
3149
|
-
packageId:
|
|
3150
|
-
startDate:
|
|
3151
|
-
endDate:
|
|
3152
|
-
createdDate:
|
|
3153
|
-
startTime:
|
|
3154
|
-
endTime:
|
|
3332
|
+
var import_zod22 = require("zod");
|
|
3333
|
+
var createPurchaseOkResponsePurchase = import_zod22.z.lazy(() => {
|
|
3334
|
+
return import_zod22.z.object({
|
|
3335
|
+
id: import_zod22.z.string(),
|
|
3336
|
+
packageId: import_zod22.z.string(),
|
|
3337
|
+
startDate: import_zod22.z.string().nullable(),
|
|
3338
|
+
endDate: import_zod22.z.string().nullable(),
|
|
3339
|
+
createdDate: import_zod22.z.string(),
|
|
3340
|
+
startTime: import_zod22.z.number().optional().nullable(),
|
|
3341
|
+
endTime: import_zod22.z.number().optional().nullable()
|
|
3155
3342
|
});
|
|
3156
3343
|
});
|
|
3157
|
-
var createPurchaseOkResponsePurchaseResponse =
|
|
3158
|
-
return
|
|
3159
|
-
id:
|
|
3160
|
-
packageId:
|
|
3161
|
-
startDate:
|
|
3162
|
-
endDate:
|
|
3163
|
-
createdDate:
|
|
3164
|
-
startTime:
|
|
3165
|
-
endTime:
|
|
3344
|
+
var createPurchaseOkResponsePurchaseResponse = import_zod22.z.lazy(() => {
|
|
3345
|
+
return import_zod22.z.object({
|
|
3346
|
+
id: import_zod22.z.string(),
|
|
3347
|
+
packageId: import_zod22.z.string(),
|
|
3348
|
+
startDate: import_zod22.z.string().nullable(),
|
|
3349
|
+
endDate: import_zod22.z.string().nullable(),
|
|
3350
|
+
createdDate: import_zod22.z.string(),
|
|
3351
|
+
startTime: import_zod22.z.number().optional().nullable(),
|
|
3352
|
+
endTime: import_zod22.z.number().optional().nullable()
|
|
3166
3353
|
}).transform((data) => ({
|
|
3167
3354
|
id: data["id"],
|
|
3168
3355
|
packageId: data["packageId"],
|
|
@@ -3173,15 +3360,15 @@ var createPurchaseOkResponsePurchaseResponse = import_zod23.z.lazy(() => {
|
|
|
3173
3360
|
endTime: data["endTime"]
|
|
3174
3361
|
}));
|
|
3175
3362
|
});
|
|
3176
|
-
var createPurchaseOkResponsePurchaseRequest =
|
|
3177
|
-
return
|
|
3178
|
-
id:
|
|
3179
|
-
packageId:
|
|
3180
|
-
startDate:
|
|
3181
|
-
endDate:
|
|
3182
|
-
createdDate:
|
|
3183
|
-
startTime:
|
|
3184
|
-
endTime:
|
|
3363
|
+
var createPurchaseOkResponsePurchaseRequest = import_zod22.z.lazy(() => {
|
|
3364
|
+
return import_zod22.z.object({
|
|
3365
|
+
id: import_zod22.z.string(),
|
|
3366
|
+
packageId: import_zod22.z.string(),
|
|
3367
|
+
startDate: import_zod22.z.string().nullable(),
|
|
3368
|
+
endDate: import_zod22.z.string().nullable(),
|
|
3369
|
+
createdDate: import_zod22.z.string(),
|
|
3370
|
+
startTime: import_zod22.z.number().optional().nullable(),
|
|
3371
|
+
endTime: import_zod22.z.number().optional().nullable()
|
|
3185
3372
|
}).transform((data) => ({
|
|
3186
3373
|
id: data["id"],
|
|
3187
3374
|
packageId: data["packageId"],
|
|
@@ -3194,30 +3381,30 @@ var createPurchaseOkResponsePurchaseRequest = import_zod23.z.lazy(() => {
|
|
|
3194
3381
|
});
|
|
3195
3382
|
|
|
3196
3383
|
// src/services/purchases/models/create-purchase-ok-response-profile.ts
|
|
3197
|
-
var
|
|
3198
|
-
var createPurchaseOkResponseProfile =
|
|
3199
|
-
return
|
|
3200
|
-
iccid:
|
|
3201
|
-
activationCode:
|
|
3202
|
-
manualActivationCode:
|
|
3384
|
+
var import_zod23 = require("zod");
|
|
3385
|
+
var createPurchaseOkResponseProfile = import_zod23.z.lazy(() => {
|
|
3386
|
+
return import_zod23.z.object({
|
|
3387
|
+
iccid: import_zod23.z.string().min(18).max(22),
|
|
3388
|
+
activationCode: import_zod23.z.string().min(1e3).max(8e3),
|
|
3389
|
+
manualActivationCode: import_zod23.z.string()
|
|
3203
3390
|
});
|
|
3204
3391
|
});
|
|
3205
|
-
var createPurchaseOkResponseProfileResponse =
|
|
3206
|
-
return
|
|
3207
|
-
iccid:
|
|
3208
|
-
activationCode:
|
|
3209
|
-
manualActivationCode:
|
|
3392
|
+
var createPurchaseOkResponseProfileResponse = import_zod23.z.lazy(() => {
|
|
3393
|
+
return import_zod23.z.object({
|
|
3394
|
+
iccid: import_zod23.z.string().min(18).max(22),
|
|
3395
|
+
activationCode: import_zod23.z.string().min(1e3).max(8e3),
|
|
3396
|
+
manualActivationCode: import_zod23.z.string()
|
|
3210
3397
|
}).transform((data) => ({
|
|
3211
3398
|
iccid: data["iccid"],
|
|
3212
3399
|
activationCode: data["activationCode"],
|
|
3213
3400
|
manualActivationCode: data["manualActivationCode"]
|
|
3214
3401
|
}));
|
|
3215
3402
|
});
|
|
3216
|
-
var createPurchaseOkResponseProfileRequest =
|
|
3217
|
-
return
|
|
3218
|
-
iccid:
|
|
3219
|
-
activationCode:
|
|
3220
|
-
manualActivationCode:
|
|
3403
|
+
var createPurchaseOkResponseProfileRequest = import_zod23.z.lazy(() => {
|
|
3404
|
+
return import_zod23.z.object({
|
|
3405
|
+
iccid: import_zod23.z.string().min(18).max(22),
|
|
3406
|
+
activationCode: import_zod23.z.string().min(1e3).max(8e3),
|
|
3407
|
+
manualActivationCode: import_zod23.z.string()
|
|
3221
3408
|
}).transform((data) => ({
|
|
3222
3409
|
iccid: data["iccid"],
|
|
3223
3410
|
activationCode: data["activationCode"],
|
|
@@ -3226,14 +3413,14 @@ var createPurchaseOkResponseProfileRequest = import_zod24.z.lazy(() => {
|
|
|
3226
3413
|
});
|
|
3227
3414
|
|
|
3228
3415
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
|
3229
|
-
var createPurchaseOkResponse =
|
|
3230
|
-
return
|
|
3416
|
+
var createPurchaseOkResponse = import_zod24.z.lazy(() => {
|
|
3417
|
+
return import_zod24.z.object({
|
|
3231
3418
|
purchase: createPurchaseOkResponsePurchase,
|
|
3232
3419
|
profile: createPurchaseOkResponseProfile
|
|
3233
3420
|
});
|
|
3234
3421
|
});
|
|
3235
|
-
var createPurchaseOkResponseResponse =
|
|
3236
|
-
return
|
|
3422
|
+
var createPurchaseOkResponseResponse = import_zod24.z.lazy(() => {
|
|
3423
|
+
return import_zod24.z.object({
|
|
3237
3424
|
purchase: createPurchaseOkResponsePurchaseResponse,
|
|
3238
3425
|
profile: createPurchaseOkResponseProfileResponse
|
|
3239
3426
|
}).transform((data) => ({
|
|
@@ -3241,8 +3428,8 @@ var createPurchaseOkResponseResponse = import_zod25.z.lazy(() => {
|
|
|
3241
3428
|
profile: data["profile"]
|
|
3242
3429
|
}));
|
|
3243
3430
|
});
|
|
3244
|
-
var createPurchaseOkResponseRequest =
|
|
3245
|
-
return
|
|
3431
|
+
var createPurchaseOkResponseRequest = import_zod24.z.lazy(() => {
|
|
3432
|
+
return import_zod24.z.object({
|
|
3246
3433
|
purchase: createPurchaseOkResponsePurchaseRequest,
|
|
3247
3434
|
profile: createPurchaseOkResponseProfileRequest
|
|
3248
3435
|
}).transform((data) => ({
|
|
@@ -3252,33 +3439,33 @@ var createPurchaseOkResponseRequest = import_zod25.z.lazy(() => {
|
|
|
3252
3439
|
});
|
|
3253
3440
|
|
|
3254
3441
|
// src/services/purchases/models/top-up-esim-request.ts
|
|
3255
|
-
var
|
|
3256
|
-
var topUpEsimRequest =
|
|
3257
|
-
return
|
|
3258
|
-
iccid:
|
|
3259
|
-
dataLimitInGb:
|
|
3260
|
-
startDate:
|
|
3261
|
-
endDate:
|
|
3262
|
-
duration:
|
|
3263
|
-
email:
|
|
3264
|
-
referenceId:
|
|
3265
|
-
emailBrand:
|
|
3266
|
-
startTime:
|
|
3267
|
-
endTime:
|
|
3442
|
+
var import_zod25 = require("zod");
|
|
3443
|
+
var topUpEsimRequest = import_zod25.z.lazy(() => {
|
|
3444
|
+
return import_zod25.z.object({
|
|
3445
|
+
iccid: import_zod25.z.string().min(18).max(22),
|
|
3446
|
+
dataLimitInGb: import_zod25.z.number(),
|
|
3447
|
+
startDate: import_zod25.z.string().optional(),
|
|
3448
|
+
endDate: import_zod25.z.string().optional(),
|
|
3449
|
+
duration: import_zod25.z.number().optional(),
|
|
3450
|
+
email: import_zod25.z.string().optional(),
|
|
3451
|
+
referenceId: import_zod25.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3452
|
+
emailBrand: import_zod25.z.string().optional(),
|
|
3453
|
+
startTime: import_zod25.z.number().optional(),
|
|
3454
|
+
endTime: import_zod25.z.number().optional()
|
|
3268
3455
|
});
|
|
3269
3456
|
});
|
|
3270
|
-
var topUpEsimRequestResponse =
|
|
3271
|
-
return
|
|
3272
|
-
iccid:
|
|
3273
|
-
dataLimitInGB:
|
|
3274
|
-
startDate:
|
|
3275
|
-
endDate:
|
|
3276
|
-
duration:
|
|
3277
|
-
email:
|
|
3278
|
-
referenceId:
|
|
3279
|
-
emailBrand:
|
|
3280
|
-
startTime:
|
|
3281
|
-
endTime:
|
|
3457
|
+
var topUpEsimRequestResponse = import_zod25.z.lazy(() => {
|
|
3458
|
+
return import_zod25.z.object({
|
|
3459
|
+
iccid: import_zod25.z.string().min(18).max(22),
|
|
3460
|
+
dataLimitInGB: import_zod25.z.number(),
|
|
3461
|
+
startDate: import_zod25.z.string().optional(),
|
|
3462
|
+
endDate: import_zod25.z.string().optional(),
|
|
3463
|
+
duration: import_zod25.z.number().optional(),
|
|
3464
|
+
email: import_zod25.z.string().optional(),
|
|
3465
|
+
referenceId: import_zod25.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3466
|
+
emailBrand: import_zod25.z.string().optional(),
|
|
3467
|
+
startTime: import_zod25.z.number().optional(),
|
|
3468
|
+
endTime: import_zod25.z.number().optional()
|
|
3282
3469
|
}).transform((data) => ({
|
|
3283
3470
|
iccid: data["iccid"],
|
|
3284
3471
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -3292,18 +3479,18 @@ var topUpEsimRequestResponse = import_zod26.z.lazy(() => {
|
|
|
3292
3479
|
endTime: data["endTime"]
|
|
3293
3480
|
}));
|
|
3294
3481
|
});
|
|
3295
|
-
var topUpEsimRequestRequest =
|
|
3296
|
-
return
|
|
3297
|
-
iccid:
|
|
3298
|
-
dataLimitInGb:
|
|
3299
|
-
startDate:
|
|
3300
|
-
endDate:
|
|
3301
|
-
duration:
|
|
3302
|
-
email:
|
|
3303
|
-
referenceId:
|
|
3304
|
-
emailBrand:
|
|
3305
|
-
startTime:
|
|
3306
|
-
endTime:
|
|
3482
|
+
var topUpEsimRequestRequest = import_zod25.z.lazy(() => {
|
|
3483
|
+
return import_zod25.z.object({
|
|
3484
|
+
iccid: import_zod25.z.string().min(18).max(22),
|
|
3485
|
+
dataLimitInGb: import_zod25.z.number(),
|
|
3486
|
+
startDate: import_zod25.z.string().optional(),
|
|
3487
|
+
endDate: import_zod25.z.string().optional(),
|
|
3488
|
+
duration: import_zod25.z.number().optional(),
|
|
3489
|
+
email: import_zod25.z.string().optional(),
|
|
3490
|
+
referenceId: import_zod25.z.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3491
|
+
emailBrand: import_zod25.z.string().optional(),
|
|
3492
|
+
startTime: import_zod25.z.number().optional(),
|
|
3493
|
+
endTime: import_zod25.z.number().optional()
|
|
3307
3494
|
}).transform((data) => ({
|
|
3308
3495
|
iccid: data["iccid"],
|
|
3309
3496
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -3319,30 +3506,30 @@ var topUpEsimRequestRequest = import_zod26.z.lazy(() => {
|
|
|
3319
3506
|
});
|
|
3320
3507
|
|
|
3321
3508
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
|
3322
|
-
var
|
|
3509
|
+
var import_zod28 = require("zod");
|
|
3323
3510
|
|
|
3324
3511
|
// src/services/purchases/models/top-up-esim-ok-response-purchase.ts
|
|
3325
|
-
var
|
|
3326
|
-
var topUpEsimOkResponsePurchase =
|
|
3327
|
-
return
|
|
3328
|
-
id:
|
|
3329
|
-
packageId:
|
|
3330
|
-
startDate:
|
|
3331
|
-
endDate:
|
|
3332
|
-
createdDate:
|
|
3333
|
-
startTime:
|
|
3334
|
-
endTime:
|
|
3512
|
+
var import_zod26 = require("zod");
|
|
3513
|
+
var topUpEsimOkResponsePurchase = import_zod26.z.lazy(() => {
|
|
3514
|
+
return import_zod26.z.object({
|
|
3515
|
+
id: import_zod26.z.string(),
|
|
3516
|
+
packageId: import_zod26.z.string(),
|
|
3517
|
+
startDate: import_zod26.z.string().nullable(),
|
|
3518
|
+
endDate: import_zod26.z.string().nullable(),
|
|
3519
|
+
createdDate: import_zod26.z.string(),
|
|
3520
|
+
startTime: import_zod26.z.number().optional().nullable(),
|
|
3521
|
+
endTime: import_zod26.z.number().optional().nullable()
|
|
3335
3522
|
});
|
|
3336
3523
|
});
|
|
3337
|
-
var topUpEsimOkResponsePurchaseResponse =
|
|
3338
|
-
return
|
|
3339
|
-
id:
|
|
3340
|
-
packageId:
|
|
3341
|
-
startDate:
|
|
3342
|
-
endDate:
|
|
3343
|
-
createdDate:
|
|
3344
|
-
startTime:
|
|
3345
|
-
endTime:
|
|
3524
|
+
var topUpEsimOkResponsePurchaseResponse = import_zod26.z.lazy(() => {
|
|
3525
|
+
return import_zod26.z.object({
|
|
3526
|
+
id: import_zod26.z.string(),
|
|
3527
|
+
packageId: import_zod26.z.string(),
|
|
3528
|
+
startDate: import_zod26.z.string().nullable(),
|
|
3529
|
+
endDate: import_zod26.z.string().nullable(),
|
|
3530
|
+
createdDate: import_zod26.z.string(),
|
|
3531
|
+
startTime: import_zod26.z.number().optional().nullable(),
|
|
3532
|
+
endTime: import_zod26.z.number().optional().nullable()
|
|
3346
3533
|
}).transform((data) => ({
|
|
3347
3534
|
id: data["id"],
|
|
3348
3535
|
packageId: data["packageId"],
|
|
@@ -3353,15 +3540,15 @@ var topUpEsimOkResponsePurchaseResponse = import_zod27.z.lazy(() => {
|
|
|
3353
3540
|
endTime: data["endTime"]
|
|
3354
3541
|
}));
|
|
3355
3542
|
});
|
|
3356
|
-
var topUpEsimOkResponsePurchaseRequest =
|
|
3357
|
-
return
|
|
3358
|
-
id:
|
|
3359
|
-
packageId:
|
|
3360
|
-
startDate:
|
|
3361
|
-
endDate:
|
|
3362
|
-
createdDate:
|
|
3363
|
-
startTime:
|
|
3364
|
-
endTime:
|
|
3543
|
+
var topUpEsimOkResponsePurchaseRequest = import_zod26.z.lazy(() => {
|
|
3544
|
+
return import_zod26.z.object({
|
|
3545
|
+
id: import_zod26.z.string(),
|
|
3546
|
+
packageId: import_zod26.z.string(),
|
|
3547
|
+
startDate: import_zod26.z.string().nullable(),
|
|
3548
|
+
endDate: import_zod26.z.string().nullable(),
|
|
3549
|
+
createdDate: import_zod26.z.string(),
|
|
3550
|
+
startTime: import_zod26.z.number().optional().nullable(),
|
|
3551
|
+
endTime: import_zod26.z.number().optional().nullable()
|
|
3365
3552
|
}).transform((data) => ({
|
|
3366
3553
|
id: data["id"],
|
|
3367
3554
|
packageId: data["packageId"],
|
|
@@ -3374,36 +3561,36 @@ var topUpEsimOkResponsePurchaseRequest = import_zod27.z.lazy(() => {
|
|
|
3374
3561
|
});
|
|
3375
3562
|
|
|
3376
3563
|
// src/services/purchases/models/top-up-esim-ok-response-profile.ts
|
|
3377
|
-
var
|
|
3378
|
-
var topUpEsimOkResponseProfile =
|
|
3379
|
-
return
|
|
3380
|
-
iccid:
|
|
3564
|
+
var import_zod27 = require("zod");
|
|
3565
|
+
var topUpEsimOkResponseProfile = import_zod27.z.lazy(() => {
|
|
3566
|
+
return import_zod27.z.object({
|
|
3567
|
+
iccid: import_zod27.z.string().min(18).max(22)
|
|
3381
3568
|
});
|
|
3382
3569
|
});
|
|
3383
|
-
var topUpEsimOkResponseProfileResponse =
|
|
3384
|
-
return
|
|
3385
|
-
iccid:
|
|
3570
|
+
var topUpEsimOkResponseProfileResponse = import_zod27.z.lazy(() => {
|
|
3571
|
+
return import_zod27.z.object({
|
|
3572
|
+
iccid: import_zod27.z.string().min(18).max(22)
|
|
3386
3573
|
}).transform((data) => ({
|
|
3387
3574
|
iccid: data["iccid"]
|
|
3388
3575
|
}));
|
|
3389
3576
|
});
|
|
3390
|
-
var topUpEsimOkResponseProfileRequest =
|
|
3391
|
-
return
|
|
3392
|
-
iccid:
|
|
3577
|
+
var topUpEsimOkResponseProfileRequest = import_zod27.z.lazy(() => {
|
|
3578
|
+
return import_zod27.z.object({
|
|
3579
|
+
iccid: import_zod27.z.string().min(18).max(22)
|
|
3393
3580
|
}).transform((data) => ({
|
|
3394
3581
|
iccid: data["iccid"]
|
|
3395
3582
|
}));
|
|
3396
3583
|
});
|
|
3397
3584
|
|
|
3398
3585
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
|
3399
|
-
var topUpEsimOkResponse =
|
|
3400
|
-
return
|
|
3586
|
+
var topUpEsimOkResponse = import_zod28.z.lazy(() => {
|
|
3587
|
+
return import_zod28.z.object({
|
|
3401
3588
|
purchase: topUpEsimOkResponsePurchase,
|
|
3402
3589
|
profile: topUpEsimOkResponseProfile
|
|
3403
3590
|
});
|
|
3404
3591
|
});
|
|
3405
|
-
var topUpEsimOkResponseResponse =
|
|
3406
|
-
return
|
|
3592
|
+
var topUpEsimOkResponseResponse = import_zod28.z.lazy(() => {
|
|
3593
|
+
return import_zod28.z.object({
|
|
3407
3594
|
purchase: topUpEsimOkResponsePurchaseResponse,
|
|
3408
3595
|
profile: topUpEsimOkResponseProfileResponse
|
|
3409
3596
|
}).transform((data) => ({
|
|
@@ -3411,8 +3598,8 @@ var topUpEsimOkResponseResponse = import_zod29.z.lazy(() => {
|
|
|
3411
3598
|
profile: data["profile"]
|
|
3412
3599
|
}));
|
|
3413
3600
|
});
|
|
3414
|
-
var topUpEsimOkResponseRequest =
|
|
3415
|
-
return
|
|
3601
|
+
var topUpEsimOkResponseRequest = import_zod28.z.lazy(() => {
|
|
3602
|
+
return import_zod28.z.object({
|
|
3416
3603
|
purchase: topUpEsimOkResponsePurchaseRequest,
|
|
3417
3604
|
profile: topUpEsimOkResponseProfileRequest
|
|
3418
3605
|
}).transform((data) => ({
|
|
@@ -3422,23 +3609,23 @@ var topUpEsimOkResponseRequest = import_zod29.z.lazy(() => {
|
|
|
3422
3609
|
});
|
|
3423
3610
|
|
|
3424
3611
|
// src/services/purchases/models/edit-purchase-request.ts
|
|
3425
|
-
var
|
|
3426
|
-
var editPurchaseRequest =
|
|
3427
|
-
return
|
|
3428
|
-
purchaseId:
|
|
3429
|
-
startDate:
|
|
3430
|
-
endDate:
|
|
3431
|
-
startTime:
|
|
3432
|
-
endTime:
|
|
3612
|
+
var import_zod29 = require("zod");
|
|
3613
|
+
var editPurchaseRequest = import_zod29.z.lazy(() => {
|
|
3614
|
+
return import_zod29.z.object({
|
|
3615
|
+
purchaseId: import_zod29.z.string(),
|
|
3616
|
+
startDate: import_zod29.z.string(),
|
|
3617
|
+
endDate: import_zod29.z.string(),
|
|
3618
|
+
startTime: import_zod29.z.number().optional(),
|
|
3619
|
+
endTime: import_zod29.z.number().optional()
|
|
3433
3620
|
});
|
|
3434
3621
|
});
|
|
3435
|
-
var editPurchaseRequestResponse =
|
|
3436
|
-
return
|
|
3437
|
-
purchaseId:
|
|
3438
|
-
startDate:
|
|
3439
|
-
endDate:
|
|
3440
|
-
startTime:
|
|
3441
|
-
endTime:
|
|
3622
|
+
var editPurchaseRequestResponse = import_zod29.z.lazy(() => {
|
|
3623
|
+
return import_zod29.z.object({
|
|
3624
|
+
purchaseId: import_zod29.z.string(),
|
|
3625
|
+
startDate: import_zod29.z.string(),
|
|
3626
|
+
endDate: import_zod29.z.string(),
|
|
3627
|
+
startTime: import_zod29.z.number().optional(),
|
|
3628
|
+
endTime: import_zod29.z.number().optional()
|
|
3442
3629
|
}).transform((data) => ({
|
|
3443
3630
|
purchaseId: data["purchaseId"],
|
|
3444
3631
|
startDate: data["startDate"],
|
|
@@ -3447,13 +3634,13 @@ var editPurchaseRequestResponse = import_zod30.z.lazy(() => {
|
|
|
3447
3634
|
endTime: data["endTime"]
|
|
3448
3635
|
}));
|
|
3449
3636
|
});
|
|
3450
|
-
var editPurchaseRequestRequest =
|
|
3451
|
-
return
|
|
3452
|
-
purchaseId:
|
|
3453
|
-
startDate:
|
|
3454
|
-
endDate:
|
|
3455
|
-
startTime:
|
|
3456
|
-
endTime:
|
|
3637
|
+
var editPurchaseRequestRequest = import_zod29.z.lazy(() => {
|
|
3638
|
+
return import_zod29.z.object({
|
|
3639
|
+
purchaseId: import_zod29.z.string(),
|
|
3640
|
+
startDate: import_zod29.z.string(),
|
|
3641
|
+
endDate: import_zod29.z.string(),
|
|
3642
|
+
startTime: import_zod29.z.number().optional(),
|
|
3643
|
+
endTime: import_zod29.z.number().optional()
|
|
3457
3644
|
}).transform((data) => ({
|
|
3458
3645
|
purchaseId: data["purchaseId"],
|
|
3459
3646
|
startDate: data["startDate"],
|
|
@@ -3464,23 +3651,23 @@ var editPurchaseRequestRequest = import_zod30.z.lazy(() => {
|
|
|
3464
3651
|
});
|
|
3465
3652
|
|
|
3466
3653
|
// src/services/purchases/models/edit-purchase-ok-response.ts
|
|
3467
|
-
var
|
|
3468
|
-
var editPurchaseOkResponse =
|
|
3469
|
-
return
|
|
3470
|
-
purchaseId:
|
|
3471
|
-
newStartDate:
|
|
3472
|
-
newEndDate:
|
|
3473
|
-
newStartTime:
|
|
3474
|
-
newEndTime:
|
|
3654
|
+
var import_zod30 = require("zod");
|
|
3655
|
+
var editPurchaseOkResponse = import_zod30.z.lazy(() => {
|
|
3656
|
+
return import_zod30.z.object({
|
|
3657
|
+
purchaseId: import_zod30.z.string(),
|
|
3658
|
+
newStartDate: import_zod30.z.string().nullable(),
|
|
3659
|
+
newEndDate: import_zod30.z.string().nullable(),
|
|
3660
|
+
newStartTime: import_zod30.z.number().optional().nullable(),
|
|
3661
|
+
newEndTime: import_zod30.z.number().optional().nullable()
|
|
3475
3662
|
});
|
|
3476
3663
|
});
|
|
3477
|
-
var editPurchaseOkResponseResponse =
|
|
3478
|
-
return
|
|
3479
|
-
purchaseId:
|
|
3480
|
-
newStartDate:
|
|
3481
|
-
newEndDate:
|
|
3482
|
-
newStartTime:
|
|
3483
|
-
newEndTime:
|
|
3664
|
+
var editPurchaseOkResponseResponse = import_zod30.z.lazy(() => {
|
|
3665
|
+
return import_zod30.z.object({
|
|
3666
|
+
purchaseId: import_zod30.z.string(),
|
|
3667
|
+
newStartDate: import_zod30.z.string().nullable(),
|
|
3668
|
+
newEndDate: import_zod30.z.string().nullable(),
|
|
3669
|
+
newStartTime: import_zod30.z.number().optional().nullable(),
|
|
3670
|
+
newEndTime: import_zod30.z.number().optional().nullable()
|
|
3484
3671
|
}).transform((data) => ({
|
|
3485
3672
|
purchaseId: data["purchaseId"],
|
|
3486
3673
|
newStartDate: data["newStartDate"],
|
|
@@ -3489,13 +3676,13 @@ var editPurchaseOkResponseResponse = import_zod31.z.lazy(() => {
|
|
|
3489
3676
|
newEndTime: data["newEndTime"]
|
|
3490
3677
|
}));
|
|
3491
3678
|
});
|
|
3492
|
-
var editPurchaseOkResponseRequest =
|
|
3493
|
-
return
|
|
3494
|
-
purchaseId:
|
|
3495
|
-
newStartDate:
|
|
3496
|
-
newEndDate:
|
|
3497
|
-
newStartTime:
|
|
3498
|
-
newEndTime:
|
|
3679
|
+
var editPurchaseOkResponseRequest = import_zod30.z.lazy(() => {
|
|
3680
|
+
return import_zod30.z.object({
|
|
3681
|
+
purchaseId: import_zod30.z.string(),
|
|
3682
|
+
newStartDate: import_zod30.z.string().nullable(),
|
|
3683
|
+
newEndDate: import_zod30.z.string().nullable(),
|
|
3684
|
+
newStartTime: import_zod30.z.number().optional().nullable(),
|
|
3685
|
+
newEndTime: import_zod30.z.number().optional().nullable()
|
|
3499
3686
|
}).transform((data) => ({
|
|
3500
3687
|
purchaseId: data["purchaseId"],
|
|
3501
3688
|
newStartDate: data["newStartDate"],
|
|
@@ -3506,30 +3693,30 @@ var editPurchaseOkResponseRequest = import_zod31.z.lazy(() => {
|
|
|
3506
3693
|
});
|
|
3507
3694
|
|
|
3508
3695
|
// src/services/purchases/models/get-purchase-consumption-ok-response.ts
|
|
3509
|
-
var
|
|
3510
|
-
var getPurchaseConsumptionOkResponse =
|
|
3511
|
-
return
|
|
3512
|
-
dataUsageRemainingInBytes:
|
|
3513
|
-
dataUsageRemainingInGb:
|
|
3514
|
-
status:
|
|
3696
|
+
var import_zod31 = require("zod");
|
|
3697
|
+
var getPurchaseConsumptionOkResponse = import_zod31.z.lazy(() => {
|
|
3698
|
+
return import_zod31.z.object({
|
|
3699
|
+
dataUsageRemainingInBytes: import_zod31.z.number(),
|
|
3700
|
+
dataUsageRemainingInGb: import_zod31.z.number(),
|
|
3701
|
+
status: import_zod31.z.string()
|
|
3515
3702
|
});
|
|
3516
3703
|
});
|
|
3517
|
-
var getPurchaseConsumptionOkResponseResponse =
|
|
3518
|
-
return
|
|
3519
|
-
dataUsageRemainingInBytes:
|
|
3520
|
-
dataUsageRemainingInGB:
|
|
3521
|
-
status:
|
|
3704
|
+
var getPurchaseConsumptionOkResponseResponse = import_zod31.z.lazy(() => {
|
|
3705
|
+
return import_zod31.z.object({
|
|
3706
|
+
dataUsageRemainingInBytes: import_zod31.z.number(),
|
|
3707
|
+
dataUsageRemainingInGB: import_zod31.z.number(),
|
|
3708
|
+
status: import_zod31.z.string()
|
|
3522
3709
|
}).transform((data) => ({
|
|
3523
3710
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
|
3524
3711
|
dataUsageRemainingInGb: data["dataUsageRemainingInGB"],
|
|
3525
3712
|
status: data["status"]
|
|
3526
3713
|
}));
|
|
3527
3714
|
});
|
|
3528
|
-
var getPurchaseConsumptionOkResponseRequest =
|
|
3529
|
-
return
|
|
3530
|
-
dataUsageRemainingInBytes:
|
|
3531
|
-
dataUsageRemainingInGb:
|
|
3532
|
-
status:
|
|
3715
|
+
var getPurchaseConsumptionOkResponseRequest = import_zod31.z.lazy(() => {
|
|
3716
|
+
return import_zod31.z.object({
|
|
3717
|
+
dataUsageRemainingInBytes: import_zod31.z.number(),
|
|
3718
|
+
dataUsageRemainingInGb: import_zod31.z.number(),
|
|
3719
|
+
status: import_zod31.z.string()
|
|
3533
3720
|
}).transform((data) => ({
|
|
3534
3721
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
|
3535
3722
|
dataUsageRemainingInGB: data["dataUsageRemainingInGb"],
|
|
@@ -3595,23 +3782,40 @@ var PurchasesService = class extends BaseService {
|
|
|
3595
3782
|
}
|
|
3596
3783
|
/**
|
|
3597
3784
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
3785
|
+
* @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
|
|
3598
3786
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3599
3787
|
* @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} - Successful Response
|
|
3600
3788
|
*/
|
|
3601
|
-
async createPurchaseV2(body, requestConfig) {
|
|
3789
|
+
async createPurchaseV2(body, params, requestConfig) {
|
|
3602
3790
|
const resolvedConfig = this.getResolvedConfig(this.createPurchaseV2Config, requestConfig);
|
|
3791
|
+
import_zod32.z.object({ idempotencyKey: import_zod32.z.string().optional() }).parse(params != null ? params : {});
|
|
3603
3792
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/v2").setRequestSchema(createPurchaseV2RequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3604
|
-
schema:
|
|
3793
|
+
schema: import_zod32.z.array(createPurchaseV2OkResponseResponse),
|
|
3605
3794
|
contentType: "json" /* Json */,
|
|
3606
3795
|
status: 200
|
|
3607
3796
|
}).addError({
|
|
3608
|
-
error:
|
|
3797
|
+
error: ErrorResponse,
|
|
3609
3798
|
contentType: "json" /* Json */,
|
|
3610
3799
|
status: 400
|
|
3611
3800
|
}).addError({
|
|
3612
|
-
error:
|
|
3801
|
+
error: ErrorResponse,
|
|
3613
3802
|
contentType: "json" /* Json */,
|
|
3614
3803
|
status: 401
|
|
3804
|
+
}).addError({
|
|
3805
|
+
error: ErrorResponse,
|
|
3806
|
+
contentType: "json" /* Json */,
|
|
3807
|
+
status: 409
|
|
3808
|
+
}).addError({
|
|
3809
|
+
error: ErrorResponse,
|
|
3810
|
+
contentType: "json" /* Json */,
|
|
3811
|
+
status: 422
|
|
3812
|
+
}).addError({
|
|
3813
|
+
error: ErrorResponse,
|
|
3814
|
+
contentType: "json" /* Json */,
|
|
3815
|
+
status: 503
|
|
3816
|
+
}).addHeaderParam({
|
|
3817
|
+
key: "Idempotency-Key",
|
|
3818
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3615
3819
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3616
3820
|
return this.client.callDirect(request);
|
|
3617
3821
|
}
|
|
@@ -3632,30 +3836,42 @@ var PurchasesService = class extends BaseService {
|
|
|
3632
3836
|
*/
|
|
3633
3837
|
async listPurchases(params, requestConfig) {
|
|
3634
3838
|
const resolvedConfig = this.getResolvedConfig(this.listPurchasesConfig, requestConfig);
|
|
3635
|
-
|
|
3636
|
-
purchaseId:
|
|
3637
|
-
iccid:
|
|
3638
|
-
afterDate:
|
|
3639
|
-
beforeDate:
|
|
3640
|
-
email:
|
|
3641
|
-
referenceId:
|
|
3642
|
-
afterCursor:
|
|
3643
|
-
limit:
|
|
3644
|
-
after:
|
|
3645
|
-
before:
|
|
3839
|
+
import_zod32.z.object({
|
|
3840
|
+
purchaseId: import_zod32.z.string().optional(),
|
|
3841
|
+
iccid: import_zod32.z.string().optional(),
|
|
3842
|
+
afterDate: import_zod32.z.string().optional(),
|
|
3843
|
+
beforeDate: import_zod32.z.string().optional(),
|
|
3844
|
+
email: import_zod32.z.string().optional(),
|
|
3845
|
+
referenceId: import_zod32.z.string().optional(),
|
|
3846
|
+
afterCursor: import_zod32.z.string().optional(),
|
|
3847
|
+
limit: import_zod32.z.number().optional(),
|
|
3848
|
+
after: import_zod32.z.number().optional(),
|
|
3849
|
+
before: import_zod32.z.number().optional()
|
|
3646
3850
|
}).parse(params != null ? params : {});
|
|
3647
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases").setRequestSchema(
|
|
3851
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases").setRequestSchema(import_zod32.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3648
3852
|
schema: listPurchasesOkResponseResponse,
|
|
3649
3853
|
contentType: "json" /* Json */,
|
|
3650
3854
|
status: 200
|
|
3651
3855
|
}).addError({
|
|
3652
|
-
error:
|
|
3856
|
+
error: ErrorResponse,
|
|
3653
3857
|
contentType: "json" /* Json */,
|
|
3654
3858
|
status: 400
|
|
3655
3859
|
}).addError({
|
|
3656
|
-
error:
|
|
3860
|
+
error: ErrorResponse,
|
|
3657
3861
|
contentType: "json" /* Json */,
|
|
3658
3862
|
status: 401
|
|
3863
|
+
}).addError({
|
|
3864
|
+
error: ErrorResponse,
|
|
3865
|
+
contentType: "json" /* Json */,
|
|
3866
|
+
status: 409
|
|
3867
|
+
}).addError({
|
|
3868
|
+
error: ErrorResponse,
|
|
3869
|
+
contentType: "json" /* Json */,
|
|
3870
|
+
status: 422
|
|
3871
|
+
}).addError({
|
|
3872
|
+
error: ErrorResponse,
|
|
3873
|
+
contentType: "json" /* Json */,
|
|
3874
|
+
status: 503
|
|
3659
3875
|
}).addQueryParam({
|
|
3660
3876
|
key: "purchaseId",
|
|
3661
3877
|
value: params == null ? void 0 : params.purchaseId
|
|
@@ -3691,45 +3907,79 @@ var PurchasesService = class extends BaseService {
|
|
|
3691
3907
|
}
|
|
3692
3908
|
/**
|
|
3693
3909
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
3910
|
+
* @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
|
|
3694
3911
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3695
3912
|
* @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} - Successful Response
|
|
3696
3913
|
*/
|
|
3697
|
-
async createPurchase(body, requestConfig) {
|
|
3914
|
+
async createPurchase(body, params, requestConfig) {
|
|
3698
3915
|
const resolvedConfig = this.getResolvedConfig(this.createPurchaseConfig, requestConfig);
|
|
3916
|
+
import_zod32.z.object({ idempotencyKey: import_zod32.z.string().optional() }).parse(params != null ? params : {});
|
|
3699
3917
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases").setRequestSchema(createPurchaseRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3700
3918
|
schema: createPurchaseOkResponseResponse,
|
|
3701
3919
|
contentType: "json" /* Json */,
|
|
3702
3920
|
status: 200
|
|
3703
3921
|
}).addError({
|
|
3704
|
-
error:
|
|
3922
|
+
error: ErrorResponse,
|
|
3705
3923
|
contentType: "json" /* Json */,
|
|
3706
3924
|
status: 400
|
|
3707
3925
|
}).addError({
|
|
3708
|
-
error:
|
|
3926
|
+
error: ErrorResponse,
|
|
3709
3927
|
contentType: "json" /* Json */,
|
|
3710
3928
|
status: 401
|
|
3929
|
+
}).addError({
|
|
3930
|
+
error: ErrorResponse,
|
|
3931
|
+
contentType: "json" /* Json */,
|
|
3932
|
+
status: 409
|
|
3933
|
+
}).addError({
|
|
3934
|
+
error: ErrorResponse,
|
|
3935
|
+
contentType: "json" /* Json */,
|
|
3936
|
+
status: 422
|
|
3937
|
+
}).addError({
|
|
3938
|
+
error: ErrorResponse,
|
|
3939
|
+
contentType: "json" /* Json */,
|
|
3940
|
+
status: 503
|
|
3941
|
+
}).addHeaderParam({
|
|
3942
|
+
key: "Idempotency-Key",
|
|
3943
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3711
3944
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3712
3945
|
return this.client.callDirect(request);
|
|
3713
3946
|
}
|
|
3714
3947
|
/**
|
|
3715
3948
|
* This endpoint is used to top-up an existing eSIM with the previously associated destination by providing its ICCID and package details. To determine if an eSIM can be topped up, use the Get eSIM endpoint, which returns the `isTopUpAllowed` flag.
|
|
3949
|
+
* @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
|
|
3716
3950
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3717
3951
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} - Successful Response
|
|
3718
3952
|
*/
|
|
3719
|
-
async topUpEsim(body, requestConfig) {
|
|
3953
|
+
async topUpEsim(body, params, requestConfig) {
|
|
3720
3954
|
const resolvedConfig = this.getResolvedConfig(this.topUpEsimConfig, requestConfig);
|
|
3955
|
+
import_zod32.z.object({ idempotencyKey: import_zod32.z.string().optional() }).parse(params != null ? params : {});
|
|
3721
3956
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/topup").setRequestSchema(topUpEsimRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3722
3957
|
schema: topUpEsimOkResponseResponse,
|
|
3723
3958
|
contentType: "json" /* Json */,
|
|
3724
3959
|
status: 200
|
|
3725
3960
|
}).addError({
|
|
3726
|
-
error:
|
|
3961
|
+
error: ErrorResponse,
|
|
3727
3962
|
contentType: "json" /* Json */,
|
|
3728
3963
|
status: 400
|
|
3729
3964
|
}).addError({
|
|
3730
|
-
error:
|
|
3965
|
+
error: ErrorResponse,
|
|
3731
3966
|
contentType: "json" /* Json */,
|
|
3732
3967
|
status: 401
|
|
3968
|
+
}).addError({
|
|
3969
|
+
error: ErrorResponse,
|
|
3970
|
+
contentType: "json" /* Json */,
|
|
3971
|
+
status: 409
|
|
3972
|
+
}).addError({
|
|
3973
|
+
error: ErrorResponse,
|
|
3974
|
+
contentType: "json" /* Json */,
|
|
3975
|
+
status: 422
|
|
3976
|
+
}).addError({
|
|
3977
|
+
error: ErrorResponse,
|
|
3978
|
+
contentType: "json" /* Json */,
|
|
3979
|
+
status: 503
|
|
3980
|
+
}).addHeaderParam({
|
|
3981
|
+
key: "Idempotency-Key",
|
|
3982
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3733
3983
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3734
3984
|
return this.client.callDirect(request);
|
|
3735
3985
|
}
|
|
@@ -3742,23 +3992,40 @@ var PurchasesService = class extends BaseService {
|
|
|
3742
3992
|
|
|
3743
3993
|
The end date can be extended or shortened as long as it adheres to the same pricing category and does not exceed the allowed duration limits.
|
|
3744
3994
|
|
|
3995
|
+
* @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
|
|
3745
3996
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3746
3997
|
* @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} - Successful Response
|
|
3747
3998
|
*/
|
|
3748
|
-
async editPurchase(body, requestConfig) {
|
|
3999
|
+
async editPurchase(body, params, requestConfig) {
|
|
3749
4000
|
const resolvedConfig = this.getResolvedConfig(this.editPurchaseConfig, requestConfig);
|
|
4001
|
+
import_zod32.z.object({ idempotencyKey: import_zod32.z.string().optional() }).parse(params != null ? params : {});
|
|
3750
4002
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/edit").setRequestSchema(editPurchaseRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3751
4003
|
schema: editPurchaseOkResponseResponse,
|
|
3752
4004
|
contentType: "json" /* Json */,
|
|
3753
4005
|
status: 200
|
|
3754
4006
|
}).addError({
|
|
3755
|
-
error:
|
|
4007
|
+
error: ErrorResponse,
|
|
3756
4008
|
contentType: "json" /* Json */,
|
|
3757
4009
|
status: 400
|
|
3758
4010
|
}).addError({
|
|
3759
|
-
error:
|
|
4011
|
+
error: ErrorResponse,
|
|
3760
4012
|
contentType: "json" /* Json */,
|
|
3761
4013
|
status: 401
|
|
4014
|
+
}).addError({
|
|
4015
|
+
error: ErrorResponse,
|
|
4016
|
+
contentType: "json" /* Json */,
|
|
4017
|
+
status: 409
|
|
4018
|
+
}).addError({
|
|
4019
|
+
error: ErrorResponse,
|
|
4020
|
+
contentType: "json" /* Json */,
|
|
4021
|
+
status: 422
|
|
4022
|
+
}).addError({
|
|
4023
|
+
error: ErrorResponse,
|
|
4024
|
+
contentType: "json" /* Json */,
|
|
4025
|
+
status: 503
|
|
4026
|
+
}).addHeaderParam({
|
|
4027
|
+
key: "Idempotency-Key",
|
|
4028
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3762
4029
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3763
4030
|
return this.client.callDirect(request);
|
|
3764
4031
|
}
|
|
@@ -3770,18 +4037,30 @@ var PurchasesService = class extends BaseService {
|
|
|
3770
4037
|
*/
|
|
3771
4038
|
async getPurchaseConsumption(purchaseId, requestConfig) {
|
|
3772
4039
|
const resolvedConfig = this.getResolvedConfig(this.getPurchaseConsumptionConfig, requestConfig);
|
|
3773
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(
|
|
4040
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(import_zod32.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3774
4041
|
schema: getPurchaseConsumptionOkResponseResponse,
|
|
3775
4042
|
contentType: "json" /* Json */,
|
|
3776
4043
|
status: 200
|
|
3777
4044
|
}).addError({
|
|
3778
|
-
error:
|
|
4045
|
+
error: ErrorResponse,
|
|
3779
4046
|
contentType: "json" /* Json */,
|
|
3780
4047
|
status: 400
|
|
3781
4048
|
}).addError({
|
|
3782
|
-
error:
|
|
4049
|
+
error: ErrorResponse,
|
|
3783
4050
|
contentType: "json" /* Json */,
|
|
3784
4051
|
status: 401
|
|
4052
|
+
}).addError({
|
|
4053
|
+
error: ErrorResponse,
|
|
4054
|
+
contentType: "json" /* Json */,
|
|
4055
|
+
status: 409
|
|
4056
|
+
}).addError({
|
|
4057
|
+
error: ErrorResponse,
|
|
4058
|
+
contentType: "json" /* Json */,
|
|
4059
|
+
status: 422
|
|
4060
|
+
}).addError({
|
|
4061
|
+
error: ErrorResponse,
|
|
4062
|
+
contentType: "json" /* Json */,
|
|
4063
|
+
status: 503
|
|
3785
4064
|
}).addPathParam({
|
|
3786
4065
|
key: "purchaseId",
|
|
3787
4066
|
value: purchaseId
|
|
@@ -3814,30 +4093,30 @@ var CreatePurchaseRequestLanguage = /* @__PURE__ */ ((CreatePurchaseRequestLangu
|
|
|
3814
4093
|
var import_zod41 = require("zod");
|
|
3815
4094
|
|
|
3816
4095
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
|
3817
|
-
var
|
|
4096
|
+
var import_zod34 = require("zod");
|
|
3818
4097
|
|
|
3819
4098
|
// src/services/e-sim/models/get-esim-ok-response-esim.ts
|
|
3820
|
-
var
|
|
3821
|
-
var getEsimOkResponseEsim =
|
|
3822
|
-
return
|
|
3823
|
-
iccid:
|
|
3824
|
-
smdpAddress:
|
|
3825
|
-
activationCode:
|
|
3826
|
-
manualActivationCode:
|
|
3827
|
-
status:
|
|
3828
|
-
connectivityStatus:
|
|
3829
|
-
isTopUpAllowed:
|
|
4099
|
+
var import_zod33 = require("zod");
|
|
4100
|
+
var getEsimOkResponseEsim = import_zod33.z.lazy(() => {
|
|
4101
|
+
return import_zod33.z.object({
|
|
4102
|
+
iccid: import_zod33.z.string().min(18).max(22),
|
|
4103
|
+
smdpAddress: import_zod33.z.string(),
|
|
4104
|
+
activationCode: import_zod33.z.string().min(1e3).max(8e3),
|
|
4105
|
+
manualActivationCode: import_zod33.z.string(),
|
|
4106
|
+
status: import_zod33.z.string(),
|
|
4107
|
+
connectivityStatus: import_zod33.z.string(),
|
|
4108
|
+
isTopUpAllowed: import_zod33.z.boolean()
|
|
3830
4109
|
});
|
|
3831
4110
|
});
|
|
3832
|
-
var getEsimOkResponseEsimResponse =
|
|
3833
|
-
return
|
|
3834
|
-
iccid:
|
|
3835
|
-
smdpAddress:
|
|
3836
|
-
activationCode:
|
|
3837
|
-
manualActivationCode:
|
|
3838
|
-
status:
|
|
3839
|
-
connectivityStatus:
|
|
3840
|
-
isTopUpAllowed:
|
|
4111
|
+
var getEsimOkResponseEsimResponse = import_zod33.z.lazy(() => {
|
|
4112
|
+
return import_zod33.z.object({
|
|
4113
|
+
iccid: import_zod33.z.string().min(18).max(22),
|
|
4114
|
+
smdpAddress: import_zod33.z.string(),
|
|
4115
|
+
activationCode: import_zod33.z.string().min(1e3).max(8e3),
|
|
4116
|
+
manualActivationCode: import_zod33.z.string(),
|
|
4117
|
+
status: import_zod33.z.string(),
|
|
4118
|
+
connectivityStatus: import_zod33.z.string(),
|
|
4119
|
+
isTopUpAllowed: import_zod33.z.boolean()
|
|
3841
4120
|
}).transform((data) => ({
|
|
3842
4121
|
iccid: data["iccid"],
|
|
3843
4122
|
smdpAddress: data["smdpAddress"],
|
|
@@ -3848,15 +4127,15 @@ var getEsimOkResponseEsimResponse = import_zod34.z.lazy(() => {
|
|
|
3848
4127
|
isTopUpAllowed: data["isTopUpAllowed"]
|
|
3849
4128
|
}));
|
|
3850
4129
|
});
|
|
3851
|
-
var getEsimOkResponseEsimRequest =
|
|
3852
|
-
return
|
|
3853
|
-
iccid:
|
|
3854
|
-
smdpAddress:
|
|
3855
|
-
activationCode:
|
|
3856
|
-
manualActivationCode:
|
|
3857
|
-
status:
|
|
3858
|
-
connectivityStatus:
|
|
3859
|
-
isTopUpAllowed:
|
|
4130
|
+
var getEsimOkResponseEsimRequest = import_zod33.z.lazy(() => {
|
|
4131
|
+
return import_zod33.z.object({
|
|
4132
|
+
iccid: import_zod33.z.string().min(18).max(22),
|
|
4133
|
+
smdpAddress: import_zod33.z.string(),
|
|
4134
|
+
activationCode: import_zod33.z.string().min(1e3).max(8e3),
|
|
4135
|
+
manualActivationCode: import_zod33.z.string(),
|
|
4136
|
+
status: import_zod33.z.string(),
|
|
4137
|
+
connectivityStatus: import_zod33.z.string(),
|
|
4138
|
+
isTopUpAllowed: import_zod33.z.boolean()
|
|
3860
4139
|
}).transform((data) => ({
|
|
3861
4140
|
iccid: data["iccid"],
|
|
3862
4141
|
smdpAddress: data["smdpAddress"],
|
|
@@ -3869,20 +4148,20 @@ var getEsimOkResponseEsimRequest = import_zod34.z.lazy(() => {
|
|
|
3869
4148
|
});
|
|
3870
4149
|
|
|
3871
4150
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
|
3872
|
-
var getEsimOkResponse =
|
|
3873
|
-
return
|
|
4151
|
+
var getEsimOkResponse = import_zod34.z.lazy(() => {
|
|
4152
|
+
return import_zod34.z.object({
|
|
3874
4153
|
esim: getEsimOkResponseEsim
|
|
3875
4154
|
});
|
|
3876
4155
|
});
|
|
3877
|
-
var getEsimOkResponseResponse =
|
|
3878
|
-
return
|
|
4156
|
+
var getEsimOkResponseResponse = import_zod34.z.lazy(() => {
|
|
4157
|
+
return import_zod34.z.object({
|
|
3879
4158
|
esim: getEsimOkResponseEsimResponse
|
|
3880
4159
|
}).transform((data) => ({
|
|
3881
4160
|
esim: data["esim"]
|
|
3882
4161
|
}));
|
|
3883
4162
|
});
|
|
3884
|
-
var getEsimOkResponseRequest =
|
|
3885
|
-
return
|
|
4163
|
+
var getEsimOkResponseRequest = import_zod34.z.lazy(() => {
|
|
4164
|
+
return import_zod34.z.object({
|
|
3886
4165
|
esim: getEsimOkResponseEsimRequest
|
|
3887
4166
|
}).transform((data) => ({
|
|
3888
4167
|
esim: data["esim"]
|
|
@@ -3890,24 +4169,24 @@ var getEsimOkResponseRequest = import_zod35.z.lazy(() => {
|
|
|
3890
4169
|
});
|
|
3891
4170
|
|
|
3892
4171
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
|
3893
|
-
var
|
|
4172
|
+
var import_zod36 = require("zod");
|
|
3894
4173
|
|
|
3895
4174
|
// src/services/e-sim/models/device.ts
|
|
3896
|
-
var
|
|
3897
|
-
var device =
|
|
3898
|
-
return
|
|
3899
|
-
oem:
|
|
3900
|
-
hardwareName:
|
|
3901
|
-
hardwareModel:
|
|
3902
|
-
eid:
|
|
4175
|
+
var import_zod35 = require("zod");
|
|
4176
|
+
var device = import_zod35.z.lazy(() => {
|
|
4177
|
+
return import_zod35.z.object({
|
|
4178
|
+
oem: import_zod35.z.string(),
|
|
4179
|
+
hardwareName: import_zod35.z.string(),
|
|
4180
|
+
hardwareModel: import_zod35.z.string(),
|
|
4181
|
+
eid: import_zod35.z.string()
|
|
3903
4182
|
});
|
|
3904
4183
|
});
|
|
3905
|
-
var deviceResponse =
|
|
3906
|
-
return
|
|
3907
|
-
oem:
|
|
3908
|
-
hardwareName:
|
|
3909
|
-
hardwareModel:
|
|
3910
|
-
eid:
|
|
4184
|
+
var deviceResponse = import_zod35.z.lazy(() => {
|
|
4185
|
+
return import_zod35.z.object({
|
|
4186
|
+
oem: import_zod35.z.string(),
|
|
4187
|
+
hardwareName: import_zod35.z.string(),
|
|
4188
|
+
hardwareModel: import_zod35.z.string(),
|
|
4189
|
+
eid: import_zod35.z.string()
|
|
3911
4190
|
}).transform((data) => ({
|
|
3912
4191
|
oem: data["oem"],
|
|
3913
4192
|
hardwareName: data["hardwareName"],
|
|
@@ -3915,12 +4194,12 @@ var deviceResponse = import_zod36.z.lazy(() => {
|
|
|
3915
4194
|
eid: data["eid"]
|
|
3916
4195
|
}));
|
|
3917
4196
|
});
|
|
3918
|
-
var deviceRequest =
|
|
3919
|
-
return
|
|
3920
|
-
oem:
|
|
3921
|
-
hardwareName:
|
|
3922
|
-
hardwareModel:
|
|
3923
|
-
eid:
|
|
4197
|
+
var deviceRequest = import_zod35.z.lazy(() => {
|
|
4198
|
+
return import_zod35.z.object({
|
|
4199
|
+
oem: import_zod35.z.string(),
|
|
4200
|
+
hardwareName: import_zod35.z.string(),
|
|
4201
|
+
hardwareModel: import_zod35.z.string(),
|
|
4202
|
+
eid: import_zod35.z.string()
|
|
3924
4203
|
}).transform((data) => ({
|
|
3925
4204
|
oem: data["oem"],
|
|
3926
4205
|
hardwareName: data["hardwareName"],
|
|
@@ -3930,20 +4209,20 @@ var deviceRequest = import_zod36.z.lazy(() => {
|
|
|
3930
4209
|
});
|
|
3931
4210
|
|
|
3932
4211
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
|
3933
|
-
var getEsimDeviceOkResponse =
|
|
3934
|
-
return
|
|
4212
|
+
var getEsimDeviceOkResponse = import_zod36.z.lazy(() => {
|
|
4213
|
+
return import_zod36.z.object({
|
|
3935
4214
|
device
|
|
3936
4215
|
});
|
|
3937
4216
|
});
|
|
3938
|
-
var getEsimDeviceOkResponseResponse =
|
|
3939
|
-
return
|
|
4217
|
+
var getEsimDeviceOkResponseResponse = import_zod36.z.lazy(() => {
|
|
4218
|
+
return import_zod36.z.object({
|
|
3940
4219
|
device: deviceResponse
|
|
3941
4220
|
}).transform((data) => ({
|
|
3942
4221
|
device: data["device"]
|
|
3943
4222
|
}));
|
|
3944
4223
|
});
|
|
3945
|
-
var getEsimDeviceOkResponseRequest =
|
|
3946
|
-
return
|
|
4224
|
+
var getEsimDeviceOkResponseRequest = import_zod36.z.lazy(() => {
|
|
4225
|
+
return import_zod36.z.object({
|
|
3947
4226
|
device: deviceRequest
|
|
3948
4227
|
}).transform((data) => ({
|
|
3949
4228
|
device: data["device"]
|
|
@@ -3951,36 +4230,36 @@ var getEsimDeviceOkResponseRequest = import_zod37.z.lazy(() => {
|
|
|
3951
4230
|
});
|
|
3952
4231
|
|
|
3953
4232
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
|
3954
|
-
var
|
|
4233
|
+
var import_zod39 = require("zod");
|
|
3955
4234
|
|
|
3956
4235
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
|
3957
|
-
var
|
|
4236
|
+
var import_zod38 = require("zod");
|
|
3958
4237
|
|
|
3959
4238
|
// src/services/e-sim/models/history.ts
|
|
3960
|
-
var
|
|
3961
|
-
var history =
|
|
3962
|
-
return
|
|
3963
|
-
status:
|
|
3964
|
-
statusDate:
|
|
3965
|
-
date:
|
|
4239
|
+
var import_zod37 = require("zod");
|
|
4240
|
+
var history = import_zod37.z.lazy(() => {
|
|
4241
|
+
return import_zod37.z.object({
|
|
4242
|
+
status: import_zod37.z.string(),
|
|
4243
|
+
statusDate: import_zod37.z.string(),
|
|
4244
|
+
date: import_zod37.z.number().optional()
|
|
3966
4245
|
});
|
|
3967
4246
|
});
|
|
3968
|
-
var historyResponse =
|
|
3969
|
-
return
|
|
3970
|
-
status:
|
|
3971
|
-
statusDate:
|
|
3972
|
-
date:
|
|
4247
|
+
var historyResponse = import_zod37.z.lazy(() => {
|
|
4248
|
+
return import_zod37.z.object({
|
|
4249
|
+
status: import_zod37.z.string(),
|
|
4250
|
+
statusDate: import_zod37.z.string(),
|
|
4251
|
+
date: import_zod37.z.number().optional()
|
|
3973
4252
|
}).transform((data) => ({
|
|
3974
4253
|
status: data["status"],
|
|
3975
4254
|
statusDate: data["statusDate"],
|
|
3976
4255
|
date: data["date"]
|
|
3977
4256
|
}));
|
|
3978
4257
|
});
|
|
3979
|
-
var historyRequest =
|
|
3980
|
-
return
|
|
3981
|
-
status:
|
|
3982
|
-
statusDate:
|
|
3983
|
-
date:
|
|
4258
|
+
var historyRequest = import_zod37.z.lazy(() => {
|
|
4259
|
+
return import_zod37.z.object({
|
|
4260
|
+
status: import_zod37.z.string(),
|
|
4261
|
+
statusDate: import_zod37.z.string(),
|
|
4262
|
+
date: import_zod37.z.number().optional()
|
|
3984
4263
|
}).transform((data) => ({
|
|
3985
4264
|
status: data["status"],
|
|
3986
4265
|
statusDate: data["statusDate"],
|
|
@@ -3989,25 +4268,25 @@ var historyRequest = import_zod38.z.lazy(() => {
|
|
|
3989
4268
|
});
|
|
3990
4269
|
|
|
3991
4270
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
|
3992
|
-
var getEsimHistoryOkResponseEsim =
|
|
3993
|
-
return
|
|
3994
|
-
iccid:
|
|
3995
|
-
history:
|
|
4271
|
+
var getEsimHistoryOkResponseEsim = import_zod38.z.lazy(() => {
|
|
4272
|
+
return import_zod38.z.object({
|
|
4273
|
+
iccid: import_zod38.z.string().min(18).max(22),
|
|
4274
|
+
history: import_zod38.z.array(history)
|
|
3996
4275
|
});
|
|
3997
4276
|
});
|
|
3998
|
-
var getEsimHistoryOkResponseEsimResponse =
|
|
3999
|
-
return
|
|
4000
|
-
iccid:
|
|
4001
|
-
history:
|
|
4277
|
+
var getEsimHistoryOkResponseEsimResponse = import_zod38.z.lazy(() => {
|
|
4278
|
+
return import_zod38.z.object({
|
|
4279
|
+
iccid: import_zod38.z.string().min(18).max(22),
|
|
4280
|
+
history: import_zod38.z.array(historyResponse)
|
|
4002
4281
|
}).transform((data) => ({
|
|
4003
4282
|
iccid: data["iccid"],
|
|
4004
4283
|
history: data["history"]
|
|
4005
4284
|
}));
|
|
4006
4285
|
});
|
|
4007
|
-
var getEsimHistoryOkResponseEsimRequest =
|
|
4008
|
-
return
|
|
4009
|
-
iccid:
|
|
4010
|
-
history:
|
|
4286
|
+
var getEsimHistoryOkResponseEsimRequest = import_zod38.z.lazy(() => {
|
|
4287
|
+
return import_zod38.z.object({
|
|
4288
|
+
iccid: import_zod38.z.string().min(18).max(22),
|
|
4289
|
+
history: import_zod38.z.array(historyRequest)
|
|
4011
4290
|
}).transform((data) => ({
|
|
4012
4291
|
iccid: data["iccid"],
|
|
4013
4292
|
history: data["history"]
|
|
@@ -4015,26 +4294,48 @@ var getEsimHistoryOkResponseEsimRequest = import_zod39.z.lazy(() => {
|
|
|
4015
4294
|
});
|
|
4016
4295
|
|
|
4017
4296
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
|
4018
|
-
var getEsimHistoryOkResponse =
|
|
4019
|
-
return
|
|
4297
|
+
var getEsimHistoryOkResponse = import_zod39.z.lazy(() => {
|
|
4298
|
+
return import_zod39.z.object({
|
|
4020
4299
|
esim: getEsimHistoryOkResponseEsim
|
|
4021
4300
|
});
|
|
4022
4301
|
});
|
|
4023
|
-
var getEsimHistoryOkResponseResponse =
|
|
4024
|
-
return
|
|
4302
|
+
var getEsimHistoryOkResponseResponse = import_zod39.z.lazy(() => {
|
|
4303
|
+
return import_zod39.z.object({
|
|
4025
4304
|
esim: getEsimHistoryOkResponseEsimResponse
|
|
4026
4305
|
}).transform((data) => ({
|
|
4027
4306
|
esim: data["esim"]
|
|
4028
4307
|
}));
|
|
4029
4308
|
});
|
|
4030
|
-
var getEsimHistoryOkResponseRequest =
|
|
4031
|
-
return
|
|
4309
|
+
var getEsimHistoryOkResponseRequest = import_zod39.z.lazy(() => {
|
|
4310
|
+
return import_zod39.z.object({
|
|
4032
4311
|
esim: getEsimHistoryOkResponseEsimRequest
|
|
4033
4312
|
}).transform((data) => ({
|
|
4034
4313
|
esim: data["esim"]
|
|
4035
4314
|
}));
|
|
4036
4315
|
});
|
|
4037
4316
|
|
|
4317
|
+
// src/services/e-sim/models/suspend-esim-ok-response.ts
|
|
4318
|
+
var import_zod40 = require("zod");
|
|
4319
|
+
var suspendEsimOkResponse = import_zod40.z.lazy(() => {
|
|
4320
|
+
return import_zod40.z.object({
|
|
4321
|
+
message: import_zod40.z.string()
|
|
4322
|
+
});
|
|
4323
|
+
});
|
|
4324
|
+
var suspendEsimOkResponseResponse = import_zod40.z.lazy(() => {
|
|
4325
|
+
return import_zod40.z.object({
|
|
4326
|
+
message: import_zod40.z.string()
|
|
4327
|
+
}).transform((data) => ({
|
|
4328
|
+
message: data["message"]
|
|
4329
|
+
}));
|
|
4330
|
+
});
|
|
4331
|
+
var suspendEsimOkResponseRequest = import_zod40.z.lazy(() => {
|
|
4332
|
+
return import_zod40.z.object({
|
|
4333
|
+
message: import_zod40.z.string()
|
|
4334
|
+
}).transform((data) => ({
|
|
4335
|
+
message: data["message"]
|
|
4336
|
+
}));
|
|
4337
|
+
});
|
|
4338
|
+
|
|
4038
4339
|
// src/services/e-sim/e-sim-service.ts
|
|
4039
4340
|
var ESimService = class extends BaseService {
|
|
4040
4341
|
/**
|
|
@@ -4064,6 +4365,15 @@ var ESimService = class extends BaseService {
|
|
|
4064
4365
|
this.getEsimHistoryConfig = config;
|
|
4065
4366
|
return this;
|
|
4066
4367
|
}
|
|
4368
|
+
/**
|
|
4369
|
+
* Sets method-level configuration for suspendEsim.
|
|
4370
|
+
* @param config - Partial configuration to override service-level defaults
|
|
4371
|
+
* @returns This service instance for method chaining
|
|
4372
|
+
*/
|
|
4373
|
+
setSuspendEsimConfig(config) {
|
|
4374
|
+
this.suspendEsimConfig = config;
|
|
4375
|
+
return this;
|
|
4376
|
+
}
|
|
4067
4377
|
/**
|
|
4068
4378
|
* Get eSIM
|
|
4069
4379
|
* @param {string} params.iccid - ID of the eSIM
|
|
@@ -4078,13 +4388,25 @@ var ESimService = class extends BaseService {
|
|
|
4078
4388
|
contentType: "json" /* Json */,
|
|
4079
4389
|
status: 200
|
|
4080
4390
|
}).addError({
|
|
4081
|
-
error:
|
|
4391
|
+
error: ErrorResponse,
|
|
4082
4392
|
contentType: "json" /* Json */,
|
|
4083
4393
|
status: 400
|
|
4084
4394
|
}).addError({
|
|
4085
|
-
error:
|
|
4395
|
+
error: ErrorResponse,
|
|
4086
4396
|
contentType: "json" /* Json */,
|
|
4087
4397
|
status: 401
|
|
4398
|
+
}).addError({
|
|
4399
|
+
error: ErrorResponse,
|
|
4400
|
+
contentType: "json" /* Json */,
|
|
4401
|
+
status: 409
|
|
4402
|
+
}).addError({
|
|
4403
|
+
error: ErrorResponse,
|
|
4404
|
+
contentType: "json" /* Json */,
|
|
4405
|
+
status: 422
|
|
4406
|
+
}).addError({
|
|
4407
|
+
error: ErrorResponse,
|
|
4408
|
+
contentType: "json" /* Json */,
|
|
4409
|
+
status: 503
|
|
4088
4410
|
}).addQueryParam({
|
|
4089
4411
|
key: "iccid",
|
|
4090
4412
|
value: params == null ? void 0 : params.iccid
|
|
@@ -4104,13 +4426,25 @@ var ESimService = class extends BaseService {
|
|
|
4104
4426
|
contentType: "json" /* Json */,
|
|
4105
4427
|
status: 200
|
|
4106
4428
|
}).addError({
|
|
4107
|
-
error:
|
|
4429
|
+
error: ErrorResponse,
|
|
4108
4430
|
contentType: "json" /* Json */,
|
|
4109
4431
|
status: 400
|
|
4110
4432
|
}).addError({
|
|
4111
|
-
error:
|
|
4433
|
+
error: ErrorResponse,
|
|
4112
4434
|
contentType: "json" /* Json */,
|
|
4113
4435
|
status: 401
|
|
4436
|
+
}).addError({
|
|
4437
|
+
error: ErrorResponse,
|
|
4438
|
+
contentType: "json" /* Json */,
|
|
4439
|
+
status: 409
|
|
4440
|
+
}).addError({
|
|
4441
|
+
error: ErrorResponse,
|
|
4442
|
+
contentType: "json" /* Json */,
|
|
4443
|
+
status: 422
|
|
4444
|
+
}).addError({
|
|
4445
|
+
error: ErrorResponse,
|
|
4446
|
+
contentType: "json" /* Json */,
|
|
4447
|
+
status: 503
|
|
4114
4448
|
}).addPathParam({
|
|
4115
4449
|
key: "iccid",
|
|
4116
4450
|
value: iccid
|
|
@@ -4130,19 +4464,74 @@ var ESimService = class extends BaseService {
|
|
|
4130
4464
|
contentType: "json" /* Json */,
|
|
4131
4465
|
status: 200
|
|
4132
4466
|
}).addError({
|
|
4133
|
-
error:
|
|
4467
|
+
error: ErrorResponse,
|
|
4134
4468
|
contentType: "json" /* Json */,
|
|
4135
4469
|
status: 400
|
|
4136
4470
|
}).addError({
|
|
4137
|
-
error:
|
|
4471
|
+
error: ErrorResponse,
|
|
4138
4472
|
contentType: "json" /* Json */,
|
|
4139
4473
|
status: 401
|
|
4474
|
+
}).addError({
|
|
4475
|
+
error: ErrorResponse,
|
|
4476
|
+
contentType: "json" /* Json */,
|
|
4477
|
+
status: 409
|
|
4478
|
+
}).addError({
|
|
4479
|
+
error: ErrorResponse,
|
|
4480
|
+
contentType: "json" /* Json */,
|
|
4481
|
+
status: 422
|
|
4482
|
+
}).addError({
|
|
4483
|
+
error: ErrorResponse,
|
|
4484
|
+
contentType: "json" /* Json */,
|
|
4485
|
+
status: 503
|
|
4140
4486
|
}).addPathParam({
|
|
4141
4487
|
key: "iccid",
|
|
4142
4488
|
value: iccid
|
|
4143
4489
|
}).build();
|
|
4144
4490
|
return this.client.callDirect(request);
|
|
4145
4491
|
}
|
|
4492
|
+
/**
|
|
4493
|
+
* Suspends an eSIM to prevent abuse. All of the eSIM's packages are terminated and its connectivity is switched off. The eSIM is not refunded: the charge stays.
|
|
4494
|
+
* @param {string} iccid - ID of the eSIM
|
|
4495
|
+
* @param {string} [params.idempotencyKey] - Optional. A unique value (for example a UUID) that makes this request safe to retry. If a request with the same `Idempotency-Key` and the same body succeeds, repeating it returns the original response instead of performing the action again, and the response includes the header `Idempotent-Replayed: true`. Keys are scoped to your credentials and remembered for 3 days. Only successful (2xx) responses are remembered, so a request that failed can be retried with the same key. Reusing a key with a different request returns `422`; sending it while the original request is still being processed returns `409`. If the idempotency store is temporarily unavailable, the request is not processed and returns `503`; retry it. Must be 1 to 255 printable ASCII characters, without spaces.
|
|
4496
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
4497
|
+
* @returns {Promise<HttpResponse<SuspendEsimOkResponse>>} - Successful Response
|
|
4498
|
+
*/
|
|
4499
|
+
async suspendEsim(iccid, params, requestConfig) {
|
|
4500
|
+
const resolvedConfig = this.getResolvedConfig(this.suspendEsimConfig, requestConfig);
|
|
4501
|
+
import_zod41.z.object({ idempotencyKey: import_zod41.z.string().optional() }).parse(params != null ? params : {});
|
|
4502
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/esim/{iccid}/suspend").setRequestSchema(import_zod41.z.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
4503
|
+
schema: suspendEsimOkResponseResponse,
|
|
4504
|
+
contentType: "json" /* Json */,
|
|
4505
|
+
status: 200
|
|
4506
|
+
}).addError({
|
|
4507
|
+
error: ErrorResponse,
|
|
4508
|
+
contentType: "json" /* Json */,
|
|
4509
|
+
status: 400
|
|
4510
|
+
}).addError({
|
|
4511
|
+
error: ErrorResponse,
|
|
4512
|
+
contentType: "json" /* Json */,
|
|
4513
|
+
status: 401
|
|
4514
|
+
}).addError({
|
|
4515
|
+
error: ErrorResponse,
|
|
4516
|
+
contentType: "json" /* Json */,
|
|
4517
|
+
status: 409
|
|
4518
|
+
}).addError({
|
|
4519
|
+
error: ErrorResponse,
|
|
4520
|
+
contentType: "json" /* Json */,
|
|
4521
|
+
status: 422
|
|
4522
|
+
}).addError({
|
|
4523
|
+
error: ErrorResponse,
|
|
4524
|
+
contentType: "json" /* Json */,
|
|
4525
|
+
status: 503
|
|
4526
|
+
}).addPathParam({
|
|
4527
|
+
key: "iccid",
|
|
4528
|
+
value: iccid
|
|
4529
|
+
}).addHeaderParam({
|
|
4530
|
+
key: "Idempotency-Key",
|
|
4531
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
4532
|
+
}).build();
|
|
4533
|
+
return this.client.callDirect(request);
|
|
4534
|
+
}
|
|
4146
4535
|
};
|
|
4147
4536
|
|
|
4148
4537
|
// src/services/i-frame/i-frame-service.ts
|
|
@@ -4193,13 +4582,25 @@ var IFrameService = class extends BaseService {
|
|
|
4193
4582
|
contentType: "json" /* Json */,
|
|
4194
4583
|
status: 200
|
|
4195
4584
|
}).addError({
|
|
4196
|
-
error:
|
|
4585
|
+
error: ErrorResponse,
|
|
4197
4586
|
contentType: "json" /* Json */,
|
|
4198
4587
|
status: 400
|
|
4199
4588
|
}).addError({
|
|
4200
|
-
error:
|
|
4589
|
+
error: ErrorResponse,
|
|
4201
4590
|
contentType: "json" /* Json */,
|
|
4202
4591
|
status: 401
|
|
4592
|
+
}).addError({
|
|
4593
|
+
error: ErrorResponse,
|
|
4594
|
+
contentType: "json" /* Json */,
|
|
4595
|
+
status: 409
|
|
4596
|
+
}).addError({
|
|
4597
|
+
error: ErrorResponse,
|
|
4598
|
+
contentType: "json" /* Json */,
|
|
4599
|
+
status: 422
|
|
4600
|
+
}).addError({
|
|
4601
|
+
error: ErrorResponse,
|
|
4602
|
+
contentType: "json" /* Json */,
|
|
4603
|
+
status: 503
|
|
4203
4604
|
}).build();
|
|
4204
4605
|
return this.client.callDirect(request);
|
|
4205
4606
|
}
|