celitech-sdk 2.0.7 → 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 +86 -37
- package/dist/index.js +1017 -703
- package/dist/index.mjs +1017 -703
- package/package.json +18 -7
package/dist/index.mjs
CHANGED
|
@@ -241,7 +241,11 @@ var TransportHookAdapter = class {
|
|
|
241
241
|
true
|
|
242
242
|
),
|
|
243
243
|
headers: this.hookParamsToTransportParams(newRequest.headers, request.headers, false),
|
|
244
|
-
pathParams: this.hookParamsToTransportParams(
|
|
244
|
+
pathParams: this.hookParamsToTransportParams(
|
|
245
|
+
newRequest.pathParams,
|
|
246
|
+
request.pathParams,
|
|
247
|
+
false
|
|
248
|
+
)
|
|
245
249
|
});
|
|
246
250
|
return newTransportRequest;
|
|
247
251
|
}
|
|
@@ -375,14 +379,13 @@ var HookHandler = class {
|
|
|
375
379
|
}
|
|
376
380
|
/**
|
|
377
381
|
* Handles a standard HTTP request with hook invocation.
|
|
378
|
-
* Calls beforeRequest hook, processes the request, and calls afterResponse
|
|
382
|
+
* Calls beforeRequest hook, processes the request, and calls the afterResponse hook.
|
|
379
383
|
* @template T - The expected response data type
|
|
380
384
|
* @param request - The HTTP request to process
|
|
381
385
|
* @returns A promise that resolves to the HTTP response
|
|
382
386
|
* @throws Error if no next handler is set, or if error handling fails
|
|
383
387
|
*/
|
|
384
388
|
async handle(request) {
|
|
385
|
-
var _a;
|
|
386
389
|
if (!this.next) {
|
|
387
390
|
throw new Error("No next handler set in hook handler.");
|
|
388
391
|
}
|
|
@@ -393,6 +396,10 @@ var HookHandler = class {
|
|
|
393
396
|
if (response.metadata.status < 400) {
|
|
394
397
|
return await hook.afterResponse(nextRequest, response, hookParams);
|
|
395
398
|
}
|
|
399
|
+
return await this.throwErrorResponse(request, response);
|
|
400
|
+
}
|
|
401
|
+
async throwErrorResponse(request, response, resolveUndeclaredError) {
|
|
402
|
+
var _a;
|
|
396
403
|
const arrayBuffer = response.raw;
|
|
397
404
|
const rawContentType = ((_a = response.metadata.headers["content-type"]) == null ? void 0 : _a.toLocaleLowerCase()) || "";
|
|
398
405
|
const contentType = getContentTypeDefinition(rawContentType);
|
|
@@ -413,6 +420,9 @@ var HookHandler = class {
|
|
|
413
420
|
customError.metadata = response.metadata;
|
|
414
421
|
customError.throw();
|
|
415
422
|
}
|
|
423
|
+
if (resolveUndeclaredError) {
|
|
424
|
+
throw await resolveUndeclaredError();
|
|
425
|
+
}
|
|
416
426
|
const decodedBody = new TextDecoder().decode(arrayBuffer);
|
|
417
427
|
throw new HttpError(
|
|
418
428
|
response.metadata,
|
|
@@ -442,7 +452,11 @@ Body: ${decodedBody}`
|
|
|
442
452
|
if (response.metadata.status < 400) {
|
|
443
453
|
yield await hook.afterResponse(nextRequest, response, hookParams);
|
|
444
454
|
} else {
|
|
445
|
-
|
|
455
|
+
return await this.throwErrorResponse(
|
|
456
|
+
request,
|
|
457
|
+
response,
|
|
458
|
+
() => hook.onError(nextRequest, response, hookParams)
|
|
459
|
+
);
|
|
446
460
|
}
|
|
447
461
|
}
|
|
448
462
|
}
|
|
@@ -727,7 +741,7 @@ var RequestValidationHandler = class {
|
|
|
727
741
|
if (!this.next) {
|
|
728
742
|
throw new Error("No next handler set in ContentTypeHandler.");
|
|
729
743
|
}
|
|
730
|
-
this.validateRequest(request);
|
|
744
|
+
await this.validateRequest(request);
|
|
731
745
|
return this.next.handle(request);
|
|
732
746
|
}
|
|
733
747
|
/**
|
|
@@ -741,7 +755,7 @@ var RequestValidationHandler = class {
|
|
|
741
755
|
if (!this.next) {
|
|
742
756
|
throw new Error("No next handler set in ContentTypeHandler.");
|
|
743
757
|
}
|
|
744
|
-
this.validateRequest(request);
|
|
758
|
+
await this.validateRequest(request);
|
|
745
759
|
yield* this.next.stream(request);
|
|
746
760
|
}
|
|
747
761
|
/**
|
|
@@ -751,33 +765,41 @@ var RequestValidationHandler = class {
|
|
|
751
765
|
*/
|
|
752
766
|
validateRequest(request) {
|
|
753
767
|
var _a, _b;
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
const parsedBody = (_a = request.requestSchema) == null ? void 0 : _a.parse(request.body);
|
|
757
|
-
request.body = JSON.stringify(parsedBody);
|
|
758
|
-
} catch (error) {
|
|
759
|
-
if (error instanceof ZodError) {
|
|
760
|
-
throw new ValidationError(error, request.body);
|
|
761
|
-
}
|
|
762
|
-
throw error;
|
|
763
|
-
}
|
|
764
|
-
} else if (request.requestContentType === "text" /* Text */ || request.requestContentType === "image" /* Image */ || request.requestContentType === "binary" /* Binary */) {
|
|
768
|
+
const requestValidationEnabled = (_b = (_a = request.config.validation) == null ? void 0 : _a.requestValidation) != null ? _b : true;
|
|
769
|
+
if (request.requestContentType === "text" /* Text */ || request.requestContentType === "image" /* Image */ || request.requestContentType === "binary" /* Binary */) {
|
|
765
770
|
request.body = request.body;
|
|
766
771
|
} else if (request.requestContentType === "form" /* FormUrlEncoded */) {
|
|
767
|
-
request.body = this.toFormUrlEncoded(request);
|
|
772
|
+
request.body = this.toFormUrlEncoded(request, requestValidationEnabled);
|
|
768
773
|
} else if (request.requestContentType === "multipartFormData" /* MultipartFormData */) {
|
|
769
774
|
request.body = this.toFormData(request.body, request.filename, request.filenames);
|
|
770
775
|
} else {
|
|
771
|
-
request.body = JSON.stringify((
|
|
776
|
+
request.body = requestValidationEnabled ? JSON.stringify(this.validateBody(request, request.body)) : JSON.stringify(request.body);
|
|
777
|
+
}
|
|
778
|
+
}
|
|
779
|
+
/**
|
|
780
|
+
* Validates a request body against its schema.
|
|
781
|
+
* @throws ValidationError if Zod schema validation fails
|
|
782
|
+
*/
|
|
783
|
+
validateBody(request, body) {
|
|
784
|
+
if (!request.requestSchema) {
|
|
785
|
+
return body;
|
|
786
|
+
}
|
|
787
|
+
try {
|
|
788
|
+
return request.requestSchema.parse(body);
|
|
789
|
+
} catch (error) {
|
|
790
|
+
if (error instanceof ZodError) {
|
|
791
|
+
throw new ValidationError(error, body);
|
|
792
|
+
}
|
|
793
|
+
throw error;
|
|
772
794
|
}
|
|
773
795
|
}
|
|
774
796
|
/**
|
|
775
797
|
* Converts request body to URL-encoded form data format.
|
|
776
798
|
* @param request - The HTTP request with body to convert
|
|
799
|
+
* @param requestValidationEnabled - Whether to validate the body against its schema first
|
|
777
800
|
* @returns URL-encoded string representation of the body
|
|
778
801
|
*/
|
|
779
|
-
toFormUrlEncoded(request) {
|
|
780
|
-
var _a;
|
|
802
|
+
toFormUrlEncoded(request, requestValidationEnabled) {
|
|
781
803
|
if (request.body === void 0) {
|
|
782
804
|
return "";
|
|
783
805
|
}
|
|
@@ -787,7 +809,7 @@ var RequestValidationHandler = class {
|
|
|
787
809
|
if (request.body instanceof URLSearchParams) {
|
|
788
810
|
return request.body.toString();
|
|
789
811
|
}
|
|
790
|
-
const validatedBody =
|
|
812
|
+
const validatedBody = requestValidationEnabled ? this.validateBody(request, request.body) : request.body;
|
|
791
813
|
if (validatedBody instanceof FormData) {
|
|
792
814
|
const params = new URLSearchParams();
|
|
793
815
|
validatedBody.forEach((value, key) => {
|
|
@@ -800,9 +822,9 @@ var RequestValidationHandler = class {
|
|
|
800
822
|
if (typeof validatedBody === "object" && validatedBody !== null && !Array.isArray(validatedBody)) {
|
|
801
823
|
const params = new URLSearchParams();
|
|
802
824
|
for (const [key, value] of Object.entries(validatedBody)) {
|
|
803
|
-
if (value
|
|
804
|
-
|
|
805
|
-
}
|
|
825
|
+
if (value == null)
|
|
826
|
+
continue;
|
|
827
|
+
params.append(key, `${value}`);
|
|
806
828
|
}
|
|
807
829
|
return params.toString();
|
|
808
830
|
}
|
|
@@ -810,7 +832,8 @@ var RequestValidationHandler = class {
|
|
|
810
832
|
}
|
|
811
833
|
/**
|
|
812
834
|
* Converts request body to multipart form data format.
|
|
813
|
-
* Handles files (ArrayBuffer
|
|
835
|
+
* Handles files (ArrayBuffer, Uint8Array, Buffer, or Blob — see `isFileLike` below), arrays,
|
|
836
|
+
* and regular values.
|
|
814
837
|
* @param body - The request body object
|
|
815
838
|
* @param filename - Optional filename for single file uploads
|
|
816
839
|
* @param filenames - Optional filenames array for array of file uploads
|
|
@@ -822,16 +845,16 @@ var RequestValidationHandler = class {
|
|
|
822
845
|
const value = body[key];
|
|
823
846
|
if (Array.isArray(value)) {
|
|
824
847
|
value.forEach((v, i) => {
|
|
825
|
-
if (v
|
|
848
|
+
if (isFileLike(v)) {
|
|
826
849
|
const fileFilename = filenames && filenames[i] ? filenames[i] : `${key}[${i}]`;
|
|
827
|
-
formData.append(`${key}[${i}]`,
|
|
850
|
+
formData.append(`${key}[${i}]`, toBlob(v), fileFilename);
|
|
828
851
|
} else {
|
|
829
852
|
formData.append(`${key}[${i}]`, v);
|
|
830
853
|
}
|
|
831
854
|
});
|
|
832
|
-
} else if (value
|
|
855
|
+
} else if (isFileLike(value)) {
|
|
833
856
|
const fileFilename = filename || key;
|
|
834
|
-
formData.append(key,
|
|
857
|
+
formData.append(key, toBlob(value), fileFilename);
|
|
835
858
|
} else {
|
|
836
859
|
formData.append(key, value);
|
|
837
860
|
}
|
|
@@ -839,6 +862,12 @@ var RequestValidationHandler = class {
|
|
|
839
862
|
return formData;
|
|
840
863
|
}
|
|
841
864
|
};
|
|
865
|
+
function isFileLike(value) {
|
|
866
|
+
return value instanceof ArrayBuffer || ArrayBuffer.isView(value) || typeof Blob !== "undefined" && value instanceof Blob;
|
|
867
|
+
}
|
|
868
|
+
function toBlob(value) {
|
|
869
|
+
return value instanceof Blob ? value : new Blob([value]);
|
|
870
|
+
}
|
|
842
871
|
|
|
843
872
|
// src/http/utils/line-decoder.ts
|
|
844
873
|
var LineDecoder = class {
|
|
@@ -855,7 +884,7 @@ var LineDecoder = class {
|
|
|
855
884
|
* @returns An array of complete lines as Uint8Array
|
|
856
885
|
*/
|
|
857
886
|
splitLines(chunk) {
|
|
858
|
-
this.lineBuffer += this.decoder.decode(chunk);
|
|
887
|
+
this.lineBuffer += this.decoder.decode(chunk, { stream: true });
|
|
859
888
|
let lineEndIndex;
|
|
860
889
|
const lines = [];
|
|
861
890
|
while ((lineEndIndex = this.lineBuffer.indexOf("\n")) >= 0) {
|
|
@@ -927,7 +956,10 @@ var RequestFetchAdapter = class {
|
|
|
927
956
|
headers: this.getHeaders(response)
|
|
928
957
|
};
|
|
929
958
|
if (response.status >= 400) {
|
|
930
|
-
|
|
959
|
+
return yield {
|
|
960
|
+
metadata,
|
|
961
|
+
raw: await response.clone().arrayBuffer()
|
|
962
|
+
};
|
|
931
963
|
}
|
|
932
964
|
if (!response.body) {
|
|
933
965
|
return yield {
|
|
@@ -1111,10 +1143,8 @@ var RetryHandler = class {
|
|
|
1111
1143
|
}
|
|
1112
1144
|
const httpMethodsToRetry = (_b = (_a = request.config.retry) == null ? void 0 : _a.httpMethodsToRetry) != null ? _b : [
|
|
1113
1145
|
"GET",
|
|
1114
|
-
"POST",
|
|
1115
1146
|
"PUT",
|
|
1116
1147
|
"DELETE",
|
|
1117
|
-
"PATCH",
|
|
1118
1148
|
"HEAD",
|
|
1119
1149
|
"OPTIONS"
|
|
1120
1150
|
];
|
|
@@ -1164,15 +1194,16 @@ var RetryHandler = class {
|
|
|
1164
1194
|
if (!headers || maxRetryAfterDelayMs <= 0) {
|
|
1165
1195
|
return null;
|
|
1166
1196
|
}
|
|
1167
|
-
const
|
|
1197
|
+
const getHeader = (name) => headers[name];
|
|
1198
|
+
const retryAfterMs = getHeader("retry-after-ms");
|
|
1168
1199
|
if (retryAfterMs !== void 0 && /^\d+(\.\d+)?$/.test(retryAfterMs.trim())) {
|
|
1169
1200
|
return Math.min(Number(retryAfterMs.trim()), maxRetryAfterDelayMs);
|
|
1170
1201
|
}
|
|
1171
|
-
const seconds = this.parseRetryAfter(
|
|
1202
|
+
const seconds = this.parseRetryAfter(getHeader("retry-after"));
|
|
1172
1203
|
if (seconds !== null) {
|
|
1173
1204
|
return Math.min(Math.max(seconds * 1e3, 0), maxRetryAfterDelayMs);
|
|
1174
1205
|
}
|
|
1175
|
-
const reset =
|
|
1206
|
+
const reset = getHeader("x-ratelimit-reset");
|
|
1176
1207
|
if (reset !== void 0 && reset.trim() !== "") {
|
|
1177
1208
|
const epoch = Number(reset);
|
|
1178
1209
|
if (Number.isFinite(epoch)) {
|
|
@@ -1447,6 +1478,78 @@ var HttpClient = class {
|
|
|
1447
1478
|
}
|
|
1448
1479
|
};
|
|
1449
1480
|
|
|
1481
|
+
// src/http/utils/runtime.ts
|
|
1482
|
+
var RUNTIME = evaluateRuntime();
|
|
1483
|
+
function evaluateRuntime() {
|
|
1484
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
1485
|
+
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined";
|
|
1486
|
+
if (isBrowser) {
|
|
1487
|
+
return { type: "browser", version: window.navigator.userAgent };
|
|
1488
|
+
}
|
|
1489
|
+
const isCloudflare = typeof globalThis !== "undefined" && ((_a = globalThis == null ? void 0 : globalThis.navigator) == null ? void 0 : _a.userAgent) === "Cloudflare-Workers";
|
|
1490
|
+
if (isCloudflare) {
|
|
1491
|
+
return { type: "workerd" };
|
|
1492
|
+
}
|
|
1493
|
+
const isEdgeRuntime = typeof EdgeRuntime === "string";
|
|
1494
|
+
if (isEdgeRuntime) {
|
|
1495
|
+
return { type: "edge-runtime" };
|
|
1496
|
+
}
|
|
1497
|
+
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");
|
|
1498
|
+
if (isWebWorker) {
|
|
1499
|
+
return { type: "web-worker" };
|
|
1500
|
+
}
|
|
1501
|
+
const isDeno = typeof Deno !== "undefined" && typeof Deno.version !== "undefined" && typeof Deno.version.deno !== "undefined";
|
|
1502
|
+
if (isDeno) {
|
|
1503
|
+
return {
|
|
1504
|
+
type: "deno",
|
|
1505
|
+
version: Deno.version.deno,
|
|
1506
|
+
os: (_e = Deno.build) == null ? void 0 : _e.os,
|
|
1507
|
+
arch: (_f = Deno.build) == null ? void 0 : _f.arch
|
|
1508
|
+
};
|
|
1509
|
+
}
|
|
1510
|
+
const isBun = typeof Bun !== "undefined" && typeof Bun.version !== "undefined";
|
|
1511
|
+
if (isBun) {
|
|
1512
|
+
return {
|
|
1513
|
+
type: "bun",
|
|
1514
|
+
version: Bun.version,
|
|
1515
|
+
os: typeof process !== "undefined" ? process.platform : void 0,
|
|
1516
|
+
arch: typeof process !== "undefined" ? process.arch : void 0
|
|
1517
|
+
};
|
|
1518
|
+
}
|
|
1519
|
+
const isReactNative = typeof navigator !== "undefined" && (navigator == null ? void 0 : navigator.product) === "ReactNative";
|
|
1520
|
+
if (isReactNative) {
|
|
1521
|
+
return { type: "react-native" };
|
|
1522
|
+
}
|
|
1523
|
+
const localProcess = typeof process !== "undefined" ? process : void 0;
|
|
1524
|
+
const isNode = typeof localProcess !== "undefined" && typeof ((_g = localProcess.versions) == null ? void 0 : _g.node) === "string";
|
|
1525
|
+
if (isNode) {
|
|
1526
|
+
return {
|
|
1527
|
+
type: "node",
|
|
1528
|
+
version: localProcess.versions.node,
|
|
1529
|
+
parsedVersion: Number(localProcess.versions.node.split(".")[0]),
|
|
1530
|
+
os: localProcess.platform,
|
|
1531
|
+
arch: localProcess.arch
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
return { type: "unknown" };
|
|
1535
|
+
}
|
|
1536
|
+
function toBase64(str) {
|
|
1537
|
+
if (typeof Buffer !== "undefined") {
|
|
1538
|
+
return Buffer.from(str, "utf-8").toString("base64");
|
|
1539
|
+
}
|
|
1540
|
+
if (typeof btoa === "function") {
|
|
1541
|
+
const bytes = new TextEncoder().encode(str);
|
|
1542
|
+
let binary = "";
|
|
1543
|
+
for (const byte of bytes) {
|
|
1544
|
+
binary += String.fromCharCode(byte);
|
|
1545
|
+
}
|
|
1546
|
+
return btoa(binary);
|
|
1547
|
+
}
|
|
1548
|
+
throw new Error(
|
|
1549
|
+
`No base64 encoder available in this runtime (${RUNTIME.type}): neither Buffer nor btoa is defined.`
|
|
1550
|
+
);
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1450
1553
|
// src/services/base-service.ts
|
|
1451
1554
|
var BaseService = class {
|
|
1452
1555
|
constructor(config, tokenManager) {
|
|
@@ -1509,6 +1612,9 @@ var BaseService = class {
|
|
|
1509
1612
|
}
|
|
1510
1613
|
return merged;
|
|
1511
1614
|
}
|
|
1615
|
+
toBase64(str) {
|
|
1616
|
+
return toBase64(str);
|
|
1617
|
+
}
|
|
1512
1618
|
set baseUrl(baseUrl) {
|
|
1513
1619
|
this.config.baseUrl = baseUrl;
|
|
1514
1620
|
}
|
|
@@ -1863,8 +1969,12 @@ var Request = class {
|
|
|
1863
1969
|
* Handles both cursor-based and limit-offset pagination strategies.
|
|
1864
1970
|
*
|
|
1865
1971
|
* @param cursor - The cursor value for cursor-based pagination (optional for limit-offset)
|
|
1972
|
+
* @param offsetIncrement - Fallback increment for offset pagination with no declared `pageSize`
|
|
1973
|
+
* (stepless offset — gap doc row 200), where the caller only learns the increment after fetching
|
|
1974
|
+
* a page (its item count). Ignored whenever `pageSize` is set, which always wins.
|
|
1866
1975
|
*/
|
|
1867
|
-
nextPage(cursor) {
|
|
1976
|
+
nextPage(cursor, offsetIncrement) {
|
|
1977
|
+
var _a;
|
|
1868
1978
|
if (!this.pagination) {
|
|
1869
1979
|
return;
|
|
1870
1980
|
}
|
|
@@ -1877,10 +1987,11 @@ var Request = class {
|
|
|
1877
1987
|
}
|
|
1878
1988
|
const offsetParam = this.getOffsetParam();
|
|
1879
1989
|
if (offsetParam) {
|
|
1880
|
-
|
|
1990
|
+
const increment = (_a = this.pagination.pageSize) != null ? _a : offsetIncrement;
|
|
1991
|
+
if (increment === void 0) {
|
|
1881
1992
|
throw new Error("pageSize is required for limit-offset pagination");
|
|
1882
1993
|
}
|
|
1883
|
-
offsetParam.value = Number(offsetParam.value) +
|
|
1994
|
+
offsetParam.value = Number(offsetParam.value) + increment;
|
|
1884
1995
|
}
|
|
1885
1996
|
}
|
|
1886
1997
|
constructPath() {
|
|
@@ -1937,9 +2048,9 @@ var RequestBuilder = class {
|
|
|
1937
2048
|
maxDelayMs: 5e3,
|
|
1938
2049
|
backoffFactor: 2,
|
|
1939
2050
|
jitterMs: 50,
|
|
1940
|
-
httpMethodsToRetry: ["GET", "
|
|
2051
|
+
httpMethodsToRetry: ["GET", "PUT", "DELETE", "HEAD", "OPTIONS"]
|
|
1941
2052
|
},
|
|
1942
|
-
validation: { responseValidation: true }
|
|
2053
|
+
validation: { responseValidation: true, requestValidation: true }
|
|
1943
2054
|
},
|
|
1944
2055
|
responses: [],
|
|
1945
2056
|
errors: [],
|
|
@@ -1953,7 +2064,7 @@ var RequestBuilder = class {
|
|
|
1953
2064
|
};
|
|
1954
2065
|
this.addHeaderParam({
|
|
1955
2066
|
key: "User-Agent",
|
|
1956
|
-
value: "postman-codegen/
|
|
2067
|
+
value: "postman-codegen/3.7.0 celitech-sdk/2.0.10 (typescript)"
|
|
1957
2068
|
});
|
|
1958
2069
|
}
|
|
1959
2070
|
setConfig(config) {
|
|
@@ -2051,7 +2162,8 @@ var RequestBuilder = class {
|
|
|
2051
2162
|
value: `${prefix != null ? prefix : "Bearer"} ${accessToken}`,
|
|
2052
2163
|
explode: false,
|
|
2053
2164
|
style: "simple" /* SIMPLE */,
|
|
2054
|
-
encode
|
|
2165
|
+
// Header values are not URL-encoded; `encode` only means something for path/query params.
|
|
2166
|
+
encode: false,
|
|
2055
2167
|
isLimit: false,
|
|
2056
2168
|
isOffset: false,
|
|
2057
2169
|
isCursor: false
|
|
@@ -2067,7 +2179,8 @@ var RequestBuilder = class {
|
|
|
2067
2179
|
value: `Basic ${this.toBase64(`${username}:${password}`)}`,
|
|
2068
2180
|
explode: false,
|
|
2069
2181
|
style: "simple" /* SIMPLE */,
|
|
2070
|
-
encode
|
|
2182
|
+
// Header values are not URL-encoded; `encode` only means something for path/query params.
|
|
2183
|
+
encode: false,
|
|
2071
2184
|
isLimit: false,
|
|
2072
2185
|
isOffset: false,
|
|
2073
2186
|
isCursor: false
|
|
@@ -2086,7 +2199,9 @@ var RequestBuilder = class {
|
|
|
2086
2199
|
value: apiKey,
|
|
2087
2200
|
explode: isQuery,
|
|
2088
2201
|
style: isQuery ? "form" /* FORM */ : "simple" /* SIMPLE */,
|
|
2089
|
-
|
|
2202
|
+
// Query values go through the FORM branch, which always URL-encodes regardless of this flag.
|
|
2203
|
+
// Header/cookie values are not URL-encoded, so `encode` must be false for those locations.
|
|
2204
|
+
encode: isQuery,
|
|
2090
2205
|
isLimit: false,
|
|
2091
2206
|
isOffset: false,
|
|
2092
2207
|
isCursor: false
|
|
@@ -2190,18 +2305,8 @@ var RequestBuilder = class {
|
|
|
2190
2305
|
build() {
|
|
2191
2306
|
return new Request(this.params);
|
|
2192
2307
|
}
|
|
2193
|
-
/**
|
|
2194
|
-
* Converts a string to Base64 encoding.
|
|
2195
|
-
* Works in both Node.js and browser environments.
|
|
2196
|
-
* @param str - The string to encode
|
|
2197
|
-
* @returns The Base64-encoded string
|
|
2198
|
-
*/
|
|
2199
2308
|
toBase64(str) {
|
|
2200
|
-
|
|
2201
|
-
return Buffer.from(str, "utf-8").toString("base64");
|
|
2202
|
-
} else {
|
|
2203
|
-
return btoa(unescape(encodeURIComponent(str)));
|
|
2204
|
-
}
|
|
2309
|
+
return toBase64(str);
|
|
2205
2310
|
}
|
|
2206
2311
|
};
|
|
2207
2312
|
|
|
@@ -2339,14 +2444,14 @@ var OAuthTokenManager = class {
|
|
|
2339
2444
|
* @throws Error if client credentials are missing or token request fails
|
|
2340
2445
|
*/
|
|
2341
2446
|
async getToken(scopes, config) {
|
|
2342
|
-
var _a, _b
|
|
2343
|
-
if (((_a = this.token) == null ? void 0 : _a.hasAllScopes(scopes)) && (
|
|
2447
|
+
var _a, _b;
|
|
2448
|
+
if (((_a = this.token) == null ? void 0 : _a.hasAllScopes(scopes)) && (this.token.expiresAt == null || this.token.expiresAt - Date.now() > 5e3)) {
|
|
2344
2449
|
return this.token;
|
|
2345
2450
|
}
|
|
2346
2451
|
if (!config.clientId || !config.clientSecret) {
|
|
2347
2452
|
throw new Error("OAuthError: clientId and clientSecret are required for token management.");
|
|
2348
2453
|
}
|
|
2349
|
-
const updatedScopes = /* @__PURE__ */ new Set([...scopes, ...((
|
|
2454
|
+
const updatedScopes = /* @__PURE__ */ new Set([...scopes, ...((_b = this.token) == null ? void 0 : _b.scopes) || []]);
|
|
2350
2455
|
const oAuth = new OAuthService(
|
|
2351
2456
|
{
|
|
2352
2457
|
...config,
|
|
@@ -2375,7 +2480,7 @@ var OAuthTokenManager = class {
|
|
|
2375
2480
|
};
|
|
2376
2481
|
|
|
2377
2482
|
// src/services/destinations/destinations-service.ts
|
|
2378
|
-
import { z as
|
|
2483
|
+
import { z as z7 } from "zod";
|
|
2379
2484
|
|
|
2380
2485
|
// src/services/destinations/models/list-destinations-ok-response.ts
|
|
2381
2486
|
import { z as z5 } from "zod";
|
|
@@ -2438,7 +2543,7 @@ var listDestinationsOkResponseRequest = z5.lazy(() => {
|
|
|
2438
2543
|
}));
|
|
2439
2544
|
});
|
|
2440
2545
|
|
|
2441
|
-
// src/services/common/
|
|
2546
|
+
// src/services/common/error-response.ts
|
|
2442
2547
|
import { z as z6 } from "zod";
|
|
2443
2548
|
|
|
2444
2549
|
// src/http/errors/throwable-error.ts
|
|
@@ -2479,58 +2584,29 @@ var ThrowableError = class extends Error {
|
|
|
2479
2584
|
}
|
|
2480
2585
|
};
|
|
2481
2586
|
|
|
2482
|
-
// src/services/common/
|
|
2483
|
-
var
|
|
2587
|
+
// src/services/common/error-response.ts
|
|
2588
|
+
var errorResponseResponse = z6.lazy(() => {
|
|
2484
2589
|
return z6.object({
|
|
2485
2590
|
message: z6.string().optional()
|
|
2486
2591
|
}).transform((data) => ({
|
|
2487
2592
|
message: data["message"]
|
|
2488
2593
|
}));
|
|
2489
2594
|
});
|
|
2490
|
-
var
|
|
2491
|
-
constructor(message, response) {
|
|
2492
|
-
super(message);
|
|
2493
|
-
this.message = message;
|
|
2494
|
-
this.response = response;
|
|
2495
|
-
}
|
|
2496
|
-
static from(message, response) {
|
|
2497
|
-
const error = new BadRequest(message, response);
|
|
2498
|
-
const result = badRequestResponse.safeParse(response);
|
|
2499
|
-
const parsedResponse = result.success ? result.data : response || {};
|
|
2500
|
-
error.message = parsedResponse.message || "";
|
|
2501
|
-
return error;
|
|
2502
|
-
}
|
|
2503
|
-
throw() {
|
|
2504
|
-
const error = BadRequest.from(this.message, this.response);
|
|
2505
|
-
error.metadata = this.metadata;
|
|
2506
|
-
throw error;
|
|
2507
|
-
}
|
|
2508
|
-
};
|
|
2509
|
-
|
|
2510
|
-
// src/services/common/unauthorized.ts
|
|
2511
|
-
import { z as z7 } from "zod";
|
|
2512
|
-
var unauthorizedResponse = z7.lazy(() => {
|
|
2513
|
-
return z7.object({
|
|
2514
|
-
message: z7.string().optional()
|
|
2515
|
-
}).transform((data) => ({
|
|
2516
|
-
message: data["message"]
|
|
2517
|
-
}));
|
|
2518
|
-
});
|
|
2519
|
-
var Unauthorized = class extends ThrowableError {
|
|
2595
|
+
var ErrorResponse = class extends ThrowableError {
|
|
2520
2596
|
constructor(message, response) {
|
|
2521
2597
|
super(message);
|
|
2522
2598
|
this.message = message;
|
|
2523
2599
|
this.response = response;
|
|
2524
2600
|
}
|
|
2525
2601
|
static from(message, response) {
|
|
2526
|
-
const error = new
|
|
2527
|
-
const result =
|
|
2602
|
+
const error = new ErrorResponse(message, response);
|
|
2603
|
+
const result = errorResponseResponse.safeParse(response);
|
|
2528
2604
|
const parsedResponse = result.success ? result.data : response || {};
|
|
2529
2605
|
error.message = parsedResponse.message || "";
|
|
2530
2606
|
return error;
|
|
2531
2607
|
}
|
|
2532
2608
|
throw() {
|
|
2533
|
-
const error =
|
|
2609
|
+
const error = ErrorResponse.from(this.message, this.response);
|
|
2534
2610
|
error.metadata = this.metadata;
|
|
2535
2611
|
throw error;
|
|
2536
2612
|
}
|
|
@@ -2554,53 +2630,65 @@ var DestinationsService = class extends BaseService {
|
|
|
2554
2630
|
*/
|
|
2555
2631
|
async listDestinations(requestConfig) {
|
|
2556
2632
|
const resolvedConfig = this.getResolvedConfig(this.listDestinationsConfig, requestConfig);
|
|
2557
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/destinations").setRequestSchema(
|
|
2633
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/destinations").setRequestSchema(z7.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
2558
2634
|
schema: listDestinationsOkResponseResponse,
|
|
2559
2635
|
contentType: "json" /* Json */,
|
|
2560
2636
|
status: 200
|
|
2561
2637
|
}).addError({
|
|
2562
|
-
error:
|
|
2638
|
+
error: ErrorResponse,
|
|
2563
2639
|
contentType: "json" /* Json */,
|
|
2564
2640
|
status: 400
|
|
2565
2641
|
}).addError({
|
|
2566
|
-
error:
|
|
2642
|
+
error: ErrorResponse,
|
|
2567
2643
|
contentType: "json" /* Json */,
|
|
2568
2644
|
status: 401
|
|
2645
|
+
}).addError({
|
|
2646
|
+
error: ErrorResponse,
|
|
2647
|
+
contentType: "json" /* Json */,
|
|
2648
|
+
status: 409
|
|
2649
|
+
}).addError({
|
|
2650
|
+
error: ErrorResponse,
|
|
2651
|
+
contentType: "json" /* Json */,
|
|
2652
|
+
status: 422
|
|
2653
|
+
}).addError({
|
|
2654
|
+
error: ErrorResponse,
|
|
2655
|
+
contentType: "json" /* Json */,
|
|
2656
|
+
status: 503
|
|
2569
2657
|
}).build();
|
|
2570
2658
|
return this.client.callDirect(request);
|
|
2571
2659
|
}
|
|
2572
2660
|
};
|
|
2573
2661
|
|
|
2574
2662
|
// src/services/packages/packages-service.ts
|
|
2575
|
-
import { z as
|
|
2663
|
+
import { z as z10 } from "zod";
|
|
2576
2664
|
|
|
2577
2665
|
// src/services/packages/models/list-packages-ok-response.ts
|
|
2578
|
-
import { z as
|
|
2666
|
+
import { z as z9 } from "zod";
|
|
2579
2667
|
|
|
2580
2668
|
// src/services/packages/models/packages.ts
|
|
2581
|
-
import { z as
|
|
2582
|
-
var packages =
|
|
2583
|
-
return
|
|
2584
|
-
id:
|
|
2585
|
-
destination:
|
|
2586
|
-
destinationIso2:
|
|
2587
|
-
dataLimitInBytes:
|
|
2588
|
-
dataLimitInGb:
|
|
2589
|
-
minDays:
|
|
2590
|
-
maxDays:
|
|
2591
|
-
priceInCents:
|
|
2669
|
+
import { z as z8 } from "zod";
|
|
2670
|
+
var packages = z8.lazy(() => {
|
|
2671
|
+
return z8.object({
|
|
2672
|
+
id: z8.string(),
|
|
2673
|
+
destination: z8.string(),
|
|
2674
|
+
destinationIso2: z8.string(),
|
|
2675
|
+
dataLimitInBytes: z8.number(),
|
|
2676
|
+
dataLimitInGb: z8.number(),
|
|
2677
|
+
minDays: z8.number(),
|
|
2678
|
+
maxDays: z8.number(),
|
|
2679
|
+
priceInCents: z8.number()
|
|
2592
2680
|
});
|
|
2593
2681
|
});
|
|
2594
|
-
var packagesResponse =
|
|
2595
|
-
return
|
|
2596
|
-
id:
|
|
2597
|
-
destination:
|
|
2598
|
-
destinationISO2:
|
|
2599
|
-
dataLimitInBytes:
|
|
2600
|
-
dataLimitInGB:
|
|
2601
|
-
minDays:
|
|
2602
|
-
maxDays:
|
|
2603
|
-
priceInCents:
|
|
2682
|
+
var packagesResponse = z8.lazy(() => {
|
|
2683
|
+
return z8.object({
|
|
2684
|
+
id: z8.string(),
|
|
2685
|
+
destination: z8.string(),
|
|
2686
|
+
destinationISO2: z8.string(),
|
|
2687
|
+
dataLimitInBytes: z8.number(),
|
|
2688
|
+
dataLimitInGB: z8.number(),
|
|
2689
|
+
minDays: z8.number(),
|
|
2690
|
+
maxDays: z8.number(),
|
|
2691
|
+
priceInCents: z8.number()
|
|
2604
2692
|
}).transform((data) => ({
|
|
2605
2693
|
id: data["id"],
|
|
2606
2694
|
destination: data["destination"],
|
|
@@ -2612,16 +2700,16 @@ var packagesResponse = z9.lazy(() => {
|
|
|
2612
2700
|
priceInCents: data["priceInCents"]
|
|
2613
2701
|
}));
|
|
2614
2702
|
});
|
|
2615
|
-
var packagesRequest =
|
|
2616
|
-
return
|
|
2617
|
-
id:
|
|
2618
|
-
destination:
|
|
2619
|
-
destinationIso2:
|
|
2620
|
-
dataLimitInBytes:
|
|
2621
|
-
dataLimitInGb:
|
|
2622
|
-
minDays:
|
|
2623
|
-
maxDays:
|
|
2624
|
-
priceInCents:
|
|
2703
|
+
var packagesRequest = z8.lazy(() => {
|
|
2704
|
+
return z8.object({
|
|
2705
|
+
id: z8.string(),
|
|
2706
|
+
destination: z8.string(),
|
|
2707
|
+
destinationIso2: z8.string(),
|
|
2708
|
+
dataLimitInBytes: z8.number(),
|
|
2709
|
+
dataLimitInGb: z8.number(),
|
|
2710
|
+
minDays: z8.number(),
|
|
2711
|
+
maxDays: z8.number(),
|
|
2712
|
+
priceInCents: z8.number()
|
|
2625
2713
|
}).transform((data) => ({
|
|
2626
2714
|
id: data["id"],
|
|
2627
2715
|
destination: data["destination"],
|
|
@@ -2635,25 +2723,25 @@ var packagesRequest = z9.lazy(() => {
|
|
|
2635
2723
|
});
|
|
2636
2724
|
|
|
2637
2725
|
// src/services/packages/models/list-packages-ok-response.ts
|
|
2638
|
-
var listPackagesOkResponse =
|
|
2639
|
-
return
|
|
2640
|
-
packages:
|
|
2641
|
-
afterCursor:
|
|
2726
|
+
var listPackagesOkResponse = z9.lazy(() => {
|
|
2727
|
+
return z9.object({
|
|
2728
|
+
packages: z9.array(packages),
|
|
2729
|
+
afterCursor: z9.string().nullable()
|
|
2642
2730
|
});
|
|
2643
2731
|
});
|
|
2644
|
-
var listPackagesOkResponseResponse =
|
|
2645
|
-
return
|
|
2646
|
-
packages:
|
|
2647
|
-
afterCursor:
|
|
2732
|
+
var listPackagesOkResponseResponse = z9.lazy(() => {
|
|
2733
|
+
return z9.object({
|
|
2734
|
+
packages: z9.array(packagesResponse),
|
|
2735
|
+
afterCursor: z9.string().nullable()
|
|
2648
2736
|
}).transform((data) => ({
|
|
2649
2737
|
packages: data["packages"],
|
|
2650
2738
|
afterCursor: data["afterCursor"]
|
|
2651
2739
|
}));
|
|
2652
2740
|
});
|
|
2653
|
-
var listPackagesOkResponseRequest =
|
|
2654
|
-
return
|
|
2655
|
-
packages:
|
|
2656
|
-
afterCursor:
|
|
2741
|
+
var listPackagesOkResponseRequest = z9.lazy(() => {
|
|
2742
|
+
return z9.object({
|
|
2743
|
+
packages: z9.array(packagesRequest),
|
|
2744
|
+
afterCursor: z9.string().nullable()
|
|
2657
2745
|
}).transform((data) => ({
|
|
2658
2746
|
packages: data["packages"],
|
|
2659
2747
|
afterCursor: data["afterCursor"]
|
|
@@ -2687,29 +2775,41 @@ var PackagesService = class extends BaseService {
|
|
|
2687
2775
|
*/
|
|
2688
2776
|
async listPackages(params, requestConfig) {
|
|
2689
2777
|
const resolvedConfig = this.getResolvedConfig(this.listPackagesConfig, requestConfig);
|
|
2690
|
-
|
|
2691
|
-
destination:
|
|
2692
|
-
dataLimitInGb:
|
|
2693
|
-
startDate:
|
|
2694
|
-
endDate:
|
|
2695
|
-
afterCursor:
|
|
2696
|
-
limit:
|
|
2697
|
-
startTime:
|
|
2698
|
-
endTime:
|
|
2699
|
-
includeUnlimited:
|
|
2778
|
+
z10.object({
|
|
2779
|
+
destination: z10.string().optional(),
|
|
2780
|
+
dataLimitInGb: z10.number().optional(),
|
|
2781
|
+
startDate: z10.string().optional(),
|
|
2782
|
+
endDate: z10.string().optional(),
|
|
2783
|
+
afterCursor: z10.string().optional(),
|
|
2784
|
+
limit: z10.number().optional(),
|
|
2785
|
+
startTime: z10.number().optional(),
|
|
2786
|
+
endTime: z10.number().optional(),
|
|
2787
|
+
includeUnlimited: z10.boolean().optional()
|
|
2700
2788
|
}).parse(params != null ? params : {});
|
|
2701
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(
|
|
2789
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/packages").setRequestSchema(z10.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
2702
2790
|
schema: listPackagesOkResponseResponse,
|
|
2703
2791
|
contentType: "json" /* Json */,
|
|
2704
2792
|
status: 200
|
|
2705
2793
|
}).addError({
|
|
2706
|
-
error:
|
|
2794
|
+
error: ErrorResponse,
|
|
2707
2795
|
contentType: "json" /* Json */,
|
|
2708
2796
|
status: 400
|
|
2709
2797
|
}).addError({
|
|
2710
|
-
error:
|
|
2798
|
+
error: ErrorResponse,
|
|
2711
2799
|
contentType: "json" /* Json */,
|
|
2712
2800
|
status: 401
|
|
2801
|
+
}).addError({
|
|
2802
|
+
error: ErrorResponse,
|
|
2803
|
+
contentType: "json" /* Json */,
|
|
2804
|
+
status: 409
|
|
2805
|
+
}).addError({
|
|
2806
|
+
error: ErrorResponse,
|
|
2807
|
+
contentType: "json" /* Json */,
|
|
2808
|
+
status: 422
|
|
2809
|
+
}).addError({
|
|
2810
|
+
error: ErrorResponse,
|
|
2811
|
+
contentType: "json" /* Json */,
|
|
2812
|
+
status: 503
|
|
2713
2813
|
}).addQueryParam({
|
|
2714
2814
|
key: "destination",
|
|
2715
2815
|
value: params == null ? void 0 : params.destination
|
|
@@ -2743,38 +2843,38 @@ var PackagesService = class extends BaseService {
|
|
|
2743
2843
|
};
|
|
2744
2844
|
|
|
2745
2845
|
// src/services/purchases/purchases-service.ts
|
|
2746
|
-
import { z as
|
|
2846
|
+
import { z as z30 } from "zod";
|
|
2747
2847
|
|
|
2748
2848
|
// src/services/purchases/models/create-purchase-v2-request.ts
|
|
2749
|
-
import { z as
|
|
2750
|
-
var createPurchaseV2Request =
|
|
2751
|
-
return
|
|
2752
|
-
destination:
|
|
2753
|
-
dataLimitInGb:
|
|
2754
|
-
startDate:
|
|
2755
|
-
endDate:
|
|
2756
|
-
duration:
|
|
2757
|
-
quantity:
|
|
2758
|
-
email:
|
|
2759
|
-
referenceId:
|
|
2760
|
-
networkBrand:
|
|
2761
|
-
emailBrand:
|
|
2762
|
-
language:
|
|
2849
|
+
import { z as z11 } from "zod";
|
|
2850
|
+
var createPurchaseV2Request = z11.lazy(() => {
|
|
2851
|
+
return z11.object({
|
|
2852
|
+
destination: z11.string(),
|
|
2853
|
+
dataLimitInGb: z11.number(),
|
|
2854
|
+
startDate: z11.string().optional(),
|
|
2855
|
+
endDate: z11.string().optional(),
|
|
2856
|
+
duration: z11.number().optional(),
|
|
2857
|
+
quantity: z11.number().gte(1).lte(5),
|
|
2858
|
+
email: z11.string().optional(),
|
|
2859
|
+
referenceId: z11.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2860
|
+
networkBrand: z11.string().optional(),
|
|
2861
|
+
emailBrand: z11.string().optional(),
|
|
2862
|
+
language: z11.string().optional()
|
|
2763
2863
|
});
|
|
2764
2864
|
});
|
|
2765
|
-
var createPurchaseV2RequestResponse =
|
|
2766
|
-
return
|
|
2767
|
-
destination:
|
|
2768
|
-
dataLimitInGB:
|
|
2769
|
-
startDate:
|
|
2770
|
-
endDate:
|
|
2771
|
-
duration:
|
|
2772
|
-
quantity:
|
|
2773
|
-
email:
|
|
2774
|
-
referenceId:
|
|
2775
|
-
networkBrand:
|
|
2776
|
-
emailBrand:
|
|
2777
|
-
language:
|
|
2865
|
+
var createPurchaseV2RequestResponse = z11.lazy(() => {
|
|
2866
|
+
return z11.object({
|
|
2867
|
+
destination: z11.string(),
|
|
2868
|
+
dataLimitInGB: z11.number(),
|
|
2869
|
+
startDate: z11.string().optional(),
|
|
2870
|
+
endDate: z11.string().optional(),
|
|
2871
|
+
duration: z11.number().optional(),
|
|
2872
|
+
quantity: z11.number().gte(1).lte(5),
|
|
2873
|
+
email: z11.string().optional(),
|
|
2874
|
+
referenceId: z11.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2875
|
+
networkBrand: z11.string().optional(),
|
|
2876
|
+
emailBrand: z11.string().optional(),
|
|
2877
|
+
language: z11.string().optional()
|
|
2778
2878
|
}).transform((data) => ({
|
|
2779
2879
|
destination: data["destination"],
|
|
2780
2880
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -2789,19 +2889,19 @@ var createPurchaseV2RequestResponse = z12.lazy(() => {
|
|
|
2789
2889
|
language: data["language"]
|
|
2790
2890
|
}));
|
|
2791
2891
|
});
|
|
2792
|
-
var createPurchaseV2RequestRequest =
|
|
2793
|
-
return
|
|
2794
|
-
destination:
|
|
2795
|
-
dataLimitInGb:
|
|
2796
|
-
startDate:
|
|
2797
|
-
endDate:
|
|
2798
|
-
duration:
|
|
2799
|
-
quantity:
|
|
2800
|
-
email:
|
|
2801
|
-
referenceId:
|
|
2802
|
-
networkBrand:
|
|
2803
|
-
emailBrand:
|
|
2804
|
-
language:
|
|
2892
|
+
var createPurchaseV2RequestRequest = z11.lazy(() => {
|
|
2893
|
+
return z11.object({
|
|
2894
|
+
destination: z11.string(),
|
|
2895
|
+
dataLimitInGb: z11.number(),
|
|
2896
|
+
startDate: z11.string().optional(),
|
|
2897
|
+
endDate: z11.string().optional(),
|
|
2898
|
+
duration: z11.number().optional(),
|
|
2899
|
+
quantity: z11.number().gte(1).lte(5),
|
|
2900
|
+
email: z11.string().optional(),
|
|
2901
|
+
referenceId: z11.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
2902
|
+
networkBrand: z11.string().optional(),
|
|
2903
|
+
emailBrand: z11.string().optional(),
|
|
2904
|
+
language: z11.string().optional()
|
|
2805
2905
|
}).transform((data) => ({
|
|
2806
2906
|
destination: data["destination"],
|
|
2807
2907
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -2818,33 +2918,33 @@ var createPurchaseV2RequestRequest = z12.lazy(() => {
|
|
|
2818
2918
|
});
|
|
2819
2919
|
|
|
2820
2920
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
|
2821
|
-
import { z as
|
|
2921
|
+
import { z as z14 } from "zod";
|
|
2822
2922
|
|
|
2823
2923
|
// src/services/purchases/models/create-purchase-v2-ok-response-purchase.ts
|
|
2824
|
-
import { z as
|
|
2825
|
-
var createPurchaseV2OkResponsePurchase =
|
|
2826
|
-
return
|
|
2827
|
-
id:
|
|
2828
|
-
packageId:
|
|
2829
|
-
createdDate:
|
|
2924
|
+
import { z as z12 } from "zod";
|
|
2925
|
+
var createPurchaseV2OkResponsePurchase = z12.lazy(() => {
|
|
2926
|
+
return z12.object({
|
|
2927
|
+
id: z12.string(),
|
|
2928
|
+
packageId: z12.string(),
|
|
2929
|
+
createdDate: z12.string()
|
|
2830
2930
|
});
|
|
2831
2931
|
});
|
|
2832
|
-
var createPurchaseV2OkResponsePurchaseResponse =
|
|
2833
|
-
return
|
|
2834
|
-
id:
|
|
2835
|
-
packageId:
|
|
2836
|
-
createdDate:
|
|
2932
|
+
var createPurchaseV2OkResponsePurchaseResponse = z12.lazy(() => {
|
|
2933
|
+
return z12.object({
|
|
2934
|
+
id: z12.string(),
|
|
2935
|
+
packageId: z12.string(),
|
|
2936
|
+
createdDate: z12.string()
|
|
2837
2937
|
}).transform((data) => ({
|
|
2838
2938
|
id: data["id"],
|
|
2839
2939
|
packageId: data["packageId"],
|
|
2840
2940
|
createdDate: data["createdDate"]
|
|
2841
2941
|
}));
|
|
2842
2942
|
});
|
|
2843
|
-
var createPurchaseV2OkResponsePurchaseRequest =
|
|
2844
|
-
return
|
|
2845
|
-
id:
|
|
2846
|
-
packageId:
|
|
2847
|
-
createdDate:
|
|
2943
|
+
var createPurchaseV2OkResponsePurchaseRequest = z12.lazy(() => {
|
|
2944
|
+
return z12.object({
|
|
2945
|
+
id: z12.string(),
|
|
2946
|
+
packageId: z12.string(),
|
|
2947
|
+
createdDate: z12.string()
|
|
2848
2948
|
}).transform((data) => ({
|
|
2849
2949
|
id: data["id"],
|
|
2850
2950
|
packageId: data["packageId"],
|
|
@@ -2853,23 +2953,23 @@ var createPurchaseV2OkResponsePurchaseRequest = z13.lazy(() => {
|
|
|
2853
2953
|
});
|
|
2854
2954
|
|
|
2855
2955
|
// src/services/purchases/models/create-purchase-v2-ok-response-profile.ts
|
|
2856
|
-
import { z as
|
|
2857
|
-
var createPurchaseV2OkResponseProfile =
|
|
2858
|
-
return
|
|
2859
|
-
iccid:
|
|
2860
|
-
activationCode:
|
|
2861
|
-
manualActivationCode:
|
|
2862
|
-
iosActivationLink:
|
|
2863
|
-
androidActivationLink:
|
|
2956
|
+
import { z as z13 } from "zod";
|
|
2957
|
+
var createPurchaseV2OkResponseProfile = z13.lazy(() => {
|
|
2958
|
+
return z13.object({
|
|
2959
|
+
iccid: z13.string().min(18).max(22),
|
|
2960
|
+
activationCode: z13.string().min(1e3).max(8e3),
|
|
2961
|
+
manualActivationCode: z13.string(),
|
|
2962
|
+
iosActivationLink: z13.string(),
|
|
2963
|
+
androidActivationLink: z13.string()
|
|
2864
2964
|
});
|
|
2865
2965
|
});
|
|
2866
|
-
var createPurchaseV2OkResponseProfileResponse =
|
|
2867
|
-
return
|
|
2868
|
-
iccid:
|
|
2869
|
-
activationCode:
|
|
2870
|
-
manualActivationCode:
|
|
2871
|
-
iosActivationLink:
|
|
2872
|
-
androidActivationLink:
|
|
2966
|
+
var createPurchaseV2OkResponseProfileResponse = z13.lazy(() => {
|
|
2967
|
+
return z13.object({
|
|
2968
|
+
iccid: z13.string().min(18).max(22),
|
|
2969
|
+
activationCode: z13.string().min(1e3).max(8e3),
|
|
2970
|
+
manualActivationCode: z13.string(),
|
|
2971
|
+
iosActivationLink: z13.string(),
|
|
2972
|
+
androidActivationLink: z13.string()
|
|
2873
2973
|
}).transform((data) => ({
|
|
2874
2974
|
iccid: data["iccid"],
|
|
2875
2975
|
activationCode: data["activationCode"],
|
|
@@ -2878,13 +2978,13 @@ var createPurchaseV2OkResponseProfileResponse = z14.lazy(() => {
|
|
|
2878
2978
|
androidActivationLink: data["androidActivationLink"]
|
|
2879
2979
|
}));
|
|
2880
2980
|
});
|
|
2881
|
-
var createPurchaseV2OkResponseProfileRequest =
|
|
2882
|
-
return
|
|
2883
|
-
iccid:
|
|
2884
|
-
activationCode:
|
|
2885
|
-
manualActivationCode:
|
|
2886
|
-
iosActivationLink:
|
|
2887
|
-
androidActivationLink:
|
|
2981
|
+
var createPurchaseV2OkResponseProfileRequest = z13.lazy(() => {
|
|
2982
|
+
return z13.object({
|
|
2983
|
+
iccid: z13.string().min(18).max(22),
|
|
2984
|
+
activationCode: z13.string().min(1e3).max(8e3),
|
|
2985
|
+
manualActivationCode: z13.string(),
|
|
2986
|
+
iosActivationLink: z13.string(),
|
|
2987
|
+
androidActivationLink: z13.string()
|
|
2888
2988
|
}).transform((data) => ({
|
|
2889
2989
|
iccid: data["iccid"],
|
|
2890
2990
|
activationCode: data["activationCode"],
|
|
@@ -2895,14 +2995,14 @@ var createPurchaseV2OkResponseProfileRequest = z14.lazy(() => {
|
|
|
2895
2995
|
});
|
|
2896
2996
|
|
|
2897
2997
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
|
2898
|
-
var createPurchaseV2OkResponse =
|
|
2899
|
-
return
|
|
2998
|
+
var createPurchaseV2OkResponse = z14.lazy(() => {
|
|
2999
|
+
return z14.object({
|
|
2900
3000
|
purchase: createPurchaseV2OkResponsePurchase,
|
|
2901
3001
|
profile: createPurchaseV2OkResponseProfile
|
|
2902
3002
|
});
|
|
2903
3003
|
});
|
|
2904
|
-
var createPurchaseV2OkResponseResponse =
|
|
2905
|
-
return
|
|
3004
|
+
var createPurchaseV2OkResponseResponse = z14.lazy(() => {
|
|
3005
|
+
return z14.object({
|
|
2906
3006
|
purchase: createPurchaseV2OkResponsePurchaseResponse,
|
|
2907
3007
|
profile: createPurchaseV2OkResponseProfileResponse
|
|
2908
3008
|
}).transform((data) => ({
|
|
@@ -2910,8 +3010,8 @@ var createPurchaseV2OkResponseResponse = z15.lazy(() => {
|
|
|
2910
3010
|
profile: data["profile"]
|
|
2911
3011
|
}));
|
|
2912
3012
|
});
|
|
2913
|
-
var createPurchaseV2OkResponseRequest =
|
|
2914
|
-
return
|
|
3013
|
+
var createPurchaseV2OkResponseRequest = z14.lazy(() => {
|
|
3014
|
+
return z14.object({
|
|
2915
3015
|
purchase: createPurchaseV2OkResponsePurchaseRequest,
|
|
2916
3016
|
profile: createPurchaseV2OkResponseProfileRequest
|
|
2917
3017
|
}).transform((data) => ({
|
|
@@ -2921,33 +3021,33 @@ var createPurchaseV2OkResponseRequest = z15.lazy(() => {
|
|
|
2921
3021
|
});
|
|
2922
3022
|
|
|
2923
3023
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
|
2924
|
-
import { z as
|
|
3024
|
+
import { z as z18 } from "zod";
|
|
2925
3025
|
|
|
2926
3026
|
// src/services/purchases/models/purchases.ts
|
|
2927
|
-
import { z as
|
|
3027
|
+
import { z as z17 } from "zod";
|
|
2928
3028
|
|
|
2929
3029
|
// src/services/purchases/models/package_.ts
|
|
2930
|
-
import { z as
|
|
2931
|
-
var package_ =
|
|
2932
|
-
return
|
|
2933
|
-
id:
|
|
2934
|
-
dataLimitInBytes:
|
|
2935
|
-
dataLimitInGb:
|
|
2936
|
-
destination:
|
|
2937
|
-
destinationIso2:
|
|
2938
|
-
destinationName:
|
|
2939
|
-
priceInCents:
|
|
3030
|
+
import { z as z15 } from "zod";
|
|
3031
|
+
var package_ = z15.lazy(() => {
|
|
3032
|
+
return z15.object({
|
|
3033
|
+
id: z15.string(),
|
|
3034
|
+
dataLimitInBytes: z15.number(),
|
|
3035
|
+
dataLimitInGb: z15.number(),
|
|
3036
|
+
destination: z15.string(),
|
|
3037
|
+
destinationIso2: z15.string(),
|
|
3038
|
+
destinationName: z15.string(),
|
|
3039
|
+
priceInCents: z15.number()
|
|
2940
3040
|
});
|
|
2941
3041
|
});
|
|
2942
|
-
var packageResponse =
|
|
2943
|
-
return
|
|
2944
|
-
id:
|
|
2945
|
-
dataLimitInBytes:
|
|
2946
|
-
dataLimitInGB:
|
|
2947
|
-
destination:
|
|
2948
|
-
destinationISO2:
|
|
2949
|
-
destinationName:
|
|
2950
|
-
priceInCents:
|
|
3042
|
+
var packageResponse = z15.lazy(() => {
|
|
3043
|
+
return z15.object({
|
|
3044
|
+
id: z15.string(),
|
|
3045
|
+
dataLimitInBytes: z15.number(),
|
|
3046
|
+
dataLimitInGB: z15.number(),
|
|
3047
|
+
destination: z15.string(),
|
|
3048
|
+
destinationISO2: z15.string(),
|
|
3049
|
+
destinationName: z15.string(),
|
|
3050
|
+
priceInCents: z15.number()
|
|
2951
3051
|
}).transform((data) => ({
|
|
2952
3052
|
id: data["id"],
|
|
2953
3053
|
dataLimitInBytes: data["dataLimitInBytes"],
|
|
@@ -2958,15 +3058,15 @@ var packageResponse = z16.lazy(() => {
|
|
|
2958
3058
|
priceInCents: data["priceInCents"]
|
|
2959
3059
|
}));
|
|
2960
3060
|
});
|
|
2961
|
-
var packageRequest =
|
|
2962
|
-
return
|
|
2963
|
-
id:
|
|
2964
|
-
dataLimitInBytes:
|
|
2965
|
-
dataLimitInGb:
|
|
2966
|
-
destination:
|
|
2967
|
-
destinationIso2:
|
|
2968
|
-
destinationName:
|
|
2969
|
-
priceInCents:
|
|
3061
|
+
var packageRequest = z15.lazy(() => {
|
|
3062
|
+
return z15.object({
|
|
3063
|
+
id: z15.string(),
|
|
3064
|
+
dataLimitInBytes: z15.number(),
|
|
3065
|
+
dataLimitInGb: z15.number(),
|
|
3066
|
+
destination: z15.string(),
|
|
3067
|
+
destinationIso2: z15.string(),
|
|
3068
|
+
destinationName: z15.string(),
|
|
3069
|
+
priceInCents: z15.number()
|
|
2970
3070
|
}).transform((data) => ({
|
|
2971
3071
|
id: data["id"],
|
|
2972
3072
|
dataLimitInBytes: data["dataLimitInBytes"],
|
|
@@ -2979,60 +3079,60 @@ var packageRequest = z16.lazy(() => {
|
|
|
2979
3079
|
});
|
|
2980
3080
|
|
|
2981
3081
|
// src/services/purchases/models/purchases-esim.ts
|
|
2982
|
-
import { z as
|
|
2983
|
-
var purchasesEsim =
|
|
2984
|
-
return
|
|
2985
|
-
iccid:
|
|
3082
|
+
import { z as z16 } from "zod";
|
|
3083
|
+
var purchasesEsim = z16.lazy(() => {
|
|
3084
|
+
return z16.object({
|
|
3085
|
+
iccid: z16.string().min(18).max(22)
|
|
2986
3086
|
});
|
|
2987
3087
|
});
|
|
2988
|
-
var purchasesEsimResponse =
|
|
2989
|
-
return
|
|
2990
|
-
iccid:
|
|
3088
|
+
var purchasesEsimResponse = z16.lazy(() => {
|
|
3089
|
+
return z16.object({
|
|
3090
|
+
iccid: z16.string().min(18).max(22)
|
|
2991
3091
|
}).transform((data) => ({
|
|
2992
3092
|
iccid: data["iccid"]
|
|
2993
3093
|
}));
|
|
2994
3094
|
});
|
|
2995
|
-
var purchasesEsimRequest =
|
|
2996
|
-
return
|
|
2997
|
-
iccid:
|
|
3095
|
+
var purchasesEsimRequest = z16.lazy(() => {
|
|
3096
|
+
return z16.object({
|
|
3097
|
+
iccid: z16.string().min(18).max(22)
|
|
2998
3098
|
}).transform((data) => ({
|
|
2999
3099
|
iccid: data["iccid"]
|
|
3000
3100
|
}));
|
|
3001
3101
|
});
|
|
3002
3102
|
|
|
3003
3103
|
// src/services/purchases/models/purchases.ts
|
|
3004
|
-
var purchases =
|
|
3005
|
-
return
|
|
3006
|
-
id:
|
|
3007
|
-
startDate:
|
|
3008
|
-
endDate:
|
|
3009
|
-
duration:
|
|
3010
|
-
createdDate:
|
|
3011
|
-
startTime:
|
|
3012
|
-
endTime:
|
|
3013
|
-
createdAt:
|
|
3104
|
+
var purchases = z17.lazy(() => {
|
|
3105
|
+
return z17.object({
|
|
3106
|
+
id: z17.string(),
|
|
3107
|
+
startDate: z17.string().nullable(),
|
|
3108
|
+
endDate: z17.string().nullable(),
|
|
3109
|
+
duration: z17.number().optional().nullable(),
|
|
3110
|
+
createdDate: z17.string(),
|
|
3111
|
+
startTime: z17.number().optional().nullable(),
|
|
3112
|
+
endTime: z17.number().optional().nullable(),
|
|
3113
|
+
createdAt: z17.number().optional(),
|
|
3014
3114
|
package: package_,
|
|
3015
3115
|
esim: purchasesEsim,
|
|
3016
|
-
source:
|
|
3017
|
-
purchaseType:
|
|
3018
|
-
referenceId:
|
|
3116
|
+
source: z17.string(),
|
|
3117
|
+
purchaseType: z17.string(),
|
|
3118
|
+
referenceId: z17.string().optional().nullable()
|
|
3019
3119
|
});
|
|
3020
3120
|
});
|
|
3021
|
-
var purchasesResponse =
|
|
3022
|
-
return
|
|
3023
|
-
id:
|
|
3024
|
-
startDate:
|
|
3025
|
-
endDate:
|
|
3026
|
-
duration:
|
|
3027
|
-
createdDate:
|
|
3028
|
-
startTime:
|
|
3029
|
-
endTime:
|
|
3030
|
-
createdAt:
|
|
3121
|
+
var purchasesResponse = z17.lazy(() => {
|
|
3122
|
+
return z17.object({
|
|
3123
|
+
id: z17.string(),
|
|
3124
|
+
startDate: z17.string().nullable(),
|
|
3125
|
+
endDate: z17.string().nullable(),
|
|
3126
|
+
duration: z17.number().optional().nullable(),
|
|
3127
|
+
createdDate: z17.string(),
|
|
3128
|
+
startTime: z17.number().optional().nullable(),
|
|
3129
|
+
endTime: z17.number().optional().nullable(),
|
|
3130
|
+
createdAt: z17.number().optional(),
|
|
3031
3131
|
package: packageResponse,
|
|
3032
3132
|
esim: purchasesEsimResponse,
|
|
3033
|
-
source:
|
|
3034
|
-
purchaseType:
|
|
3035
|
-
referenceId:
|
|
3133
|
+
source: z17.string(),
|
|
3134
|
+
purchaseType: z17.string(),
|
|
3135
|
+
referenceId: z17.string().optional().nullable()
|
|
3036
3136
|
}).transform((data) => ({
|
|
3037
3137
|
id: data["id"],
|
|
3038
3138
|
startDate: data["startDate"],
|
|
@@ -3049,21 +3149,21 @@ var purchasesResponse = z18.lazy(() => {
|
|
|
3049
3149
|
referenceId: data["referenceId"]
|
|
3050
3150
|
}));
|
|
3051
3151
|
});
|
|
3052
|
-
var purchasesRequest =
|
|
3053
|
-
return
|
|
3054
|
-
id:
|
|
3055
|
-
startDate:
|
|
3056
|
-
endDate:
|
|
3057
|
-
duration:
|
|
3058
|
-
createdDate:
|
|
3059
|
-
startTime:
|
|
3060
|
-
endTime:
|
|
3061
|
-
createdAt:
|
|
3152
|
+
var purchasesRequest = z17.lazy(() => {
|
|
3153
|
+
return z17.object({
|
|
3154
|
+
id: z17.string(),
|
|
3155
|
+
startDate: z17.string().nullable(),
|
|
3156
|
+
endDate: z17.string().nullable(),
|
|
3157
|
+
duration: z17.number().optional().nullable(),
|
|
3158
|
+
createdDate: z17.string(),
|
|
3159
|
+
startTime: z17.number().optional().nullable(),
|
|
3160
|
+
endTime: z17.number().optional().nullable(),
|
|
3161
|
+
createdAt: z17.number().optional(),
|
|
3062
3162
|
package: packageRequest,
|
|
3063
3163
|
esim: purchasesEsimRequest,
|
|
3064
|
-
source:
|
|
3065
|
-
purchaseType:
|
|
3066
|
-
referenceId:
|
|
3164
|
+
source: z17.string(),
|
|
3165
|
+
purchaseType: z17.string(),
|
|
3166
|
+
referenceId: z17.string().optional().nullable()
|
|
3067
3167
|
}).transform((data) => ({
|
|
3068
3168
|
id: data["id"],
|
|
3069
3169
|
startDate: data["startDate"],
|
|
@@ -3082,25 +3182,25 @@ var purchasesRequest = z18.lazy(() => {
|
|
|
3082
3182
|
});
|
|
3083
3183
|
|
|
3084
3184
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
|
3085
|
-
var listPurchasesOkResponse =
|
|
3086
|
-
return
|
|
3087
|
-
purchases:
|
|
3088
|
-
afterCursor:
|
|
3185
|
+
var listPurchasesOkResponse = z18.lazy(() => {
|
|
3186
|
+
return z18.object({
|
|
3187
|
+
purchases: z18.array(purchases),
|
|
3188
|
+
afterCursor: z18.string().nullable()
|
|
3089
3189
|
});
|
|
3090
3190
|
});
|
|
3091
|
-
var listPurchasesOkResponseResponse =
|
|
3092
|
-
return
|
|
3093
|
-
purchases:
|
|
3094
|
-
afterCursor:
|
|
3191
|
+
var listPurchasesOkResponseResponse = z18.lazy(() => {
|
|
3192
|
+
return z18.object({
|
|
3193
|
+
purchases: z18.array(purchasesResponse),
|
|
3194
|
+
afterCursor: z18.string().nullable()
|
|
3095
3195
|
}).transform((data) => ({
|
|
3096
3196
|
purchases: data["purchases"],
|
|
3097
3197
|
afterCursor: data["afterCursor"]
|
|
3098
3198
|
}));
|
|
3099
3199
|
});
|
|
3100
|
-
var listPurchasesOkResponseRequest =
|
|
3101
|
-
return
|
|
3102
|
-
purchases:
|
|
3103
|
-
afterCursor:
|
|
3200
|
+
var listPurchasesOkResponseRequest = z18.lazy(() => {
|
|
3201
|
+
return z18.object({
|
|
3202
|
+
purchases: z18.array(purchasesRequest),
|
|
3203
|
+
afterCursor: z18.string().nullable()
|
|
3104
3204
|
}).transform((data) => ({
|
|
3105
3205
|
purchases: data["purchases"],
|
|
3106
3206
|
afterCursor: data["afterCursor"]
|
|
@@ -3108,35 +3208,35 @@ var listPurchasesOkResponseRequest = z19.lazy(() => {
|
|
|
3108
3208
|
});
|
|
3109
3209
|
|
|
3110
3210
|
// src/services/purchases/models/create-purchase-request.ts
|
|
3111
|
-
import { z as
|
|
3112
|
-
var createPurchaseRequest =
|
|
3113
|
-
return
|
|
3114
|
-
destination:
|
|
3115
|
-
dataLimitInGb:
|
|
3116
|
-
startDate:
|
|
3117
|
-
endDate:
|
|
3118
|
-
email:
|
|
3119
|
-
referenceId:
|
|
3120
|
-
networkBrand:
|
|
3121
|
-
emailBrand:
|
|
3122
|
-
language:
|
|
3123
|
-
startTime:
|
|
3124
|
-
endTime:
|
|
3211
|
+
import { z as z19 } from "zod";
|
|
3212
|
+
var createPurchaseRequest = z19.lazy(() => {
|
|
3213
|
+
return z19.object({
|
|
3214
|
+
destination: z19.string(),
|
|
3215
|
+
dataLimitInGb: z19.number(),
|
|
3216
|
+
startDate: z19.string(),
|
|
3217
|
+
endDate: z19.string(),
|
|
3218
|
+
email: z19.string().optional(),
|
|
3219
|
+
referenceId: z19.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3220
|
+
networkBrand: z19.string().optional(),
|
|
3221
|
+
emailBrand: z19.string().optional(),
|
|
3222
|
+
language: z19.string().optional(),
|
|
3223
|
+
startTime: z19.number().optional(),
|
|
3224
|
+
endTime: z19.number().optional()
|
|
3125
3225
|
});
|
|
3126
3226
|
});
|
|
3127
|
-
var createPurchaseRequestResponse =
|
|
3128
|
-
return
|
|
3129
|
-
destination:
|
|
3130
|
-
dataLimitInGB:
|
|
3131
|
-
startDate:
|
|
3132
|
-
endDate:
|
|
3133
|
-
email:
|
|
3134
|
-
referenceId:
|
|
3135
|
-
networkBrand:
|
|
3136
|
-
emailBrand:
|
|
3137
|
-
language:
|
|
3138
|
-
startTime:
|
|
3139
|
-
endTime:
|
|
3227
|
+
var createPurchaseRequestResponse = z19.lazy(() => {
|
|
3228
|
+
return z19.object({
|
|
3229
|
+
destination: z19.string(),
|
|
3230
|
+
dataLimitInGB: z19.number(),
|
|
3231
|
+
startDate: z19.string(),
|
|
3232
|
+
endDate: z19.string(),
|
|
3233
|
+
email: z19.string().optional(),
|
|
3234
|
+
referenceId: z19.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3235
|
+
networkBrand: z19.string().optional(),
|
|
3236
|
+
emailBrand: z19.string().optional(),
|
|
3237
|
+
language: z19.string().optional(),
|
|
3238
|
+
startTime: z19.number().optional(),
|
|
3239
|
+
endTime: z19.number().optional()
|
|
3140
3240
|
}).transform((data) => ({
|
|
3141
3241
|
destination: data["destination"],
|
|
3142
3242
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -3151,19 +3251,19 @@ var createPurchaseRequestResponse = z20.lazy(() => {
|
|
|
3151
3251
|
endTime: data["endTime"]
|
|
3152
3252
|
}));
|
|
3153
3253
|
});
|
|
3154
|
-
var createPurchaseRequestRequest =
|
|
3155
|
-
return
|
|
3156
|
-
destination:
|
|
3157
|
-
dataLimitInGb:
|
|
3158
|
-
startDate:
|
|
3159
|
-
endDate:
|
|
3160
|
-
email:
|
|
3161
|
-
referenceId:
|
|
3162
|
-
networkBrand:
|
|
3163
|
-
emailBrand:
|
|
3164
|
-
language:
|
|
3165
|
-
startTime:
|
|
3166
|
-
endTime:
|
|
3254
|
+
var createPurchaseRequestRequest = z19.lazy(() => {
|
|
3255
|
+
return z19.object({
|
|
3256
|
+
destination: z19.string(),
|
|
3257
|
+
dataLimitInGb: z19.number(),
|
|
3258
|
+
startDate: z19.string(),
|
|
3259
|
+
endDate: z19.string(),
|
|
3260
|
+
email: z19.string().optional(),
|
|
3261
|
+
referenceId: z19.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3262
|
+
networkBrand: z19.string().optional(),
|
|
3263
|
+
emailBrand: z19.string().optional(),
|
|
3264
|
+
language: z19.string().optional(),
|
|
3265
|
+
startTime: z19.number().optional(),
|
|
3266
|
+
endTime: z19.number().optional()
|
|
3167
3267
|
}).transform((data) => ({
|
|
3168
3268
|
destination: data["destination"],
|
|
3169
3269
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -3180,30 +3280,30 @@ var createPurchaseRequestRequest = z20.lazy(() => {
|
|
|
3180
3280
|
});
|
|
3181
3281
|
|
|
3182
3282
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
|
3183
|
-
import { z as
|
|
3283
|
+
import { z as z22 } from "zod";
|
|
3184
3284
|
|
|
3185
3285
|
// src/services/purchases/models/create-purchase-ok-response-purchase.ts
|
|
3186
|
-
import { z as
|
|
3187
|
-
var createPurchaseOkResponsePurchase =
|
|
3188
|
-
return
|
|
3189
|
-
id:
|
|
3190
|
-
packageId:
|
|
3191
|
-
startDate:
|
|
3192
|
-
endDate:
|
|
3193
|
-
createdDate:
|
|
3194
|
-
startTime:
|
|
3195
|
-
endTime:
|
|
3286
|
+
import { z as z20 } from "zod";
|
|
3287
|
+
var createPurchaseOkResponsePurchase = z20.lazy(() => {
|
|
3288
|
+
return z20.object({
|
|
3289
|
+
id: z20.string(),
|
|
3290
|
+
packageId: z20.string(),
|
|
3291
|
+
startDate: z20.string().nullable(),
|
|
3292
|
+
endDate: z20.string().nullable(),
|
|
3293
|
+
createdDate: z20.string(),
|
|
3294
|
+
startTime: z20.number().optional().nullable(),
|
|
3295
|
+
endTime: z20.number().optional().nullable()
|
|
3196
3296
|
});
|
|
3197
3297
|
});
|
|
3198
|
-
var createPurchaseOkResponsePurchaseResponse =
|
|
3199
|
-
return
|
|
3200
|
-
id:
|
|
3201
|
-
packageId:
|
|
3202
|
-
startDate:
|
|
3203
|
-
endDate:
|
|
3204
|
-
createdDate:
|
|
3205
|
-
startTime:
|
|
3206
|
-
endTime:
|
|
3298
|
+
var createPurchaseOkResponsePurchaseResponse = z20.lazy(() => {
|
|
3299
|
+
return z20.object({
|
|
3300
|
+
id: z20.string(),
|
|
3301
|
+
packageId: z20.string(),
|
|
3302
|
+
startDate: z20.string().nullable(),
|
|
3303
|
+
endDate: z20.string().nullable(),
|
|
3304
|
+
createdDate: z20.string(),
|
|
3305
|
+
startTime: z20.number().optional().nullable(),
|
|
3306
|
+
endTime: z20.number().optional().nullable()
|
|
3207
3307
|
}).transform((data) => ({
|
|
3208
3308
|
id: data["id"],
|
|
3209
3309
|
packageId: data["packageId"],
|
|
@@ -3214,15 +3314,15 @@ var createPurchaseOkResponsePurchaseResponse = z21.lazy(() => {
|
|
|
3214
3314
|
endTime: data["endTime"]
|
|
3215
3315
|
}));
|
|
3216
3316
|
});
|
|
3217
|
-
var createPurchaseOkResponsePurchaseRequest =
|
|
3218
|
-
return
|
|
3219
|
-
id:
|
|
3220
|
-
packageId:
|
|
3221
|
-
startDate:
|
|
3222
|
-
endDate:
|
|
3223
|
-
createdDate:
|
|
3224
|
-
startTime:
|
|
3225
|
-
endTime:
|
|
3317
|
+
var createPurchaseOkResponsePurchaseRequest = z20.lazy(() => {
|
|
3318
|
+
return z20.object({
|
|
3319
|
+
id: z20.string(),
|
|
3320
|
+
packageId: z20.string(),
|
|
3321
|
+
startDate: z20.string().nullable(),
|
|
3322
|
+
endDate: z20.string().nullable(),
|
|
3323
|
+
createdDate: z20.string(),
|
|
3324
|
+
startTime: z20.number().optional().nullable(),
|
|
3325
|
+
endTime: z20.number().optional().nullable()
|
|
3226
3326
|
}).transform((data) => ({
|
|
3227
3327
|
id: data["id"],
|
|
3228
3328
|
packageId: data["packageId"],
|
|
@@ -3235,30 +3335,30 @@ var createPurchaseOkResponsePurchaseRequest = z21.lazy(() => {
|
|
|
3235
3335
|
});
|
|
3236
3336
|
|
|
3237
3337
|
// src/services/purchases/models/create-purchase-ok-response-profile.ts
|
|
3238
|
-
import { z as
|
|
3239
|
-
var createPurchaseOkResponseProfile =
|
|
3240
|
-
return
|
|
3241
|
-
iccid:
|
|
3242
|
-
activationCode:
|
|
3243
|
-
manualActivationCode:
|
|
3338
|
+
import { z as z21 } from "zod";
|
|
3339
|
+
var createPurchaseOkResponseProfile = z21.lazy(() => {
|
|
3340
|
+
return z21.object({
|
|
3341
|
+
iccid: z21.string().min(18).max(22),
|
|
3342
|
+
activationCode: z21.string().min(1e3).max(8e3),
|
|
3343
|
+
manualActivationCode: z21.string()
|
|
3244
3344
|
});
|
|
3245
3345
|
});
|
|
3246
|
-
var createPurchaseOkResponseProfileResponse =
|
|
3247
|
-
return
|
|
3248
|
-
iccid:
|
|
3249
|
-
activationCode:
|
|
3250
|
-
manualActivationCode:
|
|
3346
|
+
var createPurchaseOkResponseProfileResponse = z21.lazy(() => {
|
|
3347
|
+
return z21.object({
|
|
3348
|
+
iccid: z21.string().min(18).max(22),
|
|
3349
|
+
activationCode: z21.string().min(1e3).max(8e3),
|
|
3350
|
+
manualActivationCode: z21.string()
|
|
3251
3351
|
}).transform((data) => ({
|
|
3252
3352
|
iccid: data["iccid"],
|
|
3253
3353
|
activationCode: data["activationCode"],
|
|
3254
3354
|
manualActivationCode: data["manualActivationCode"]
|
|
3255
3355
|
}));
|
|
3256
3356
|
});
|
|
3257
|
-
var createPurchaseOkResponseProfileRequest =
|
|
3258
|
-
return
|
|
3259
|
-
iccid:
|
|
3260
|
-
activationCode:
|
|
3261
|
-
manualActivationCode:
|
|
3357
|
+
var createPurchaseOkResponseProfileRequest = z21.lazy(() => {
|
|
3358
|
+
return z21.object({
|
|
3359
|
+
iccid: z21.string().min(18).max(22),
|
|
3360
|
+
activationCode: z21.string().min(1e3).max(8e3),
|
|
3361
|
+
manualActivationCode: z21.string()
|
|
3262
3362
|
}).transform((data) => ({
|
|
3263
3363
|
iccid: data["iccid"],
|
|
3264
3364
|
activationCode: data["activationCode"],
|
|
@@ -3267,14 +3367,14 @@ var createPurchaseOkResponseProfileRequest = z22.lazy(() => {
|
|
|
3267
3367
|
});
|
|
3268
3368
|
|
|
3269
3369
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
|
3270
|
-
var createPurchaseOkResponse =
|
|
3271
|
-
return
|
|
3370
|
+
var createPurchaseOkResponse = z22.lazy(() => {
|
|
3371
|
+
return z22.object({
|
|
3272
3372
|
purchase: createPurchaseOkResponsePurchase,
|
|
3273
3373
|
profile: createPurchaseOkResponseProfile
|
|
3274
3374
|
});
|
|
3275
3375
|
});
|
|
3276
|
-
var createPurchaseOkResponseResponse =
|
|
3277
|
-
return
|
|
3376
|
+
var createPurchaseOkResponseResponse = z22.lazy(() => {
|
|
3377
|
+
return z22.object({
|
|
3278
3378
|
purchase: createPurchaseOkResponsePurchaseResponse,
|
|
3279
3379
|
profile: createPurchaseOkResponseProfileResponse
|
|
3280
3380
|
}).transform((data) => ({
|
|
@@ -3282,8 +3382,8 @@ var createPurchaseOkResponseResponse = z23.lazy(() => {
|
|
|
3282
3382
|
profile: data["profile"]
|
|
3283
3383
|
}));
|
|
3284
3384
|
});
|
|
3285
|
-
var createPurchaseOkResponseRequest =
|
|
3286
|
-
return
|
|
3385
|
+
var createPurchaseOkResponseRequest = z22.lazy(() => {
|
|
3386
|
+
return z22.object({
|
|
3287
3387
|
purchase: createPurchaseOkResponsePurchaseRequest,
|
|
3288
3388
|
profile: createPurchaseOkResponseProfileRequest
|
|
3289
3389
|
}).transform((data) => ({
|
|
@@ -3293,33 +3393,33 @@ var createPurchaseOkResponseRequest = z23.lazy(() => {
|
|
|
3293
3393
|
});
|
|
3294
3394
|
|
|
3295
3395
|
// src/services/purchases/models/top-up-esim-request.ts
|
|
3296
|
-
import { z as
|
|
3297
|
-
var topUpEsimRequest =
|
|
3298
|
-
return
|
|
3299
|
-
iccid:
|
|
3300
|
-
dataLimitInGb:
|
|
3301
|
-
startDate:
|
|
3302
|
-
endDate:
|
|
3303
|
-
duration:
|
|
3304
|
-
email:
|
|
3305
|
-
referenceId:
|
|
3306
|
-
emailBrand:
|
|
3307
|
-
startTime:
|
|
3308
|
-
endTime:
|
|
3396
|
+
import { z as z23 } from "zod";
|
|
3397
|
+
var topUpEsimRequest = z23.lazy(() => {
|
|
3398
|
+
return z23.object({
|
|
3399
|
+
iccid: z23.string().min(18).max(22),
|
|
3400
|
+
dataLimitInGb: z23.number(),
|
|
3401
|
+
startDate: z23.string().optional(),
|
|
3402
|
+
endDate: z23.string().optional(),
|
|
3403
|
+
duration: z23.number().optional(),
|
|
3404
|
+
email: z23.string().optional(),
|
|
3405
|
+
referenceId: z23.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3406
|
+
emailBrand: z23.string().optional(),
|
|
3407
|
+
startTime: z23.number().optional(),
|
|
3408
|
+
endTime: z23.number().optional()
|
|
3309
3409
|
});
|
|
3310
3410
|
});
|
|
3311
|
-
var topUpEsimRequestResponse =
|
|
3312
|
-
return
|
|
3313
|
-
iccid:
|
|
3314
|
-
dataLimitInGB:
|
|
3315
|
-
startDate:
|
|
3316
|
-
endDate:
|
|
3317
|
-
duration:
|
|
3318
|
-
email:
|
|
3319
|
-
referenceId:
|
|
3320
|
-
emailBrand:
|
|
3321
|
-
startTime:
|
|
3322
|
-
endTime:
|
|
3411
|
+
var topUpEsimRequestResponse = z23.lazy(() => {
|
|
3412
|
+
return z23.object({
|
|
3413
|
+
iccid: z23.string().min(18).max(22),
|
|
3414
|
+
dataLimitInGB: z23.number(),
|
|
3415
|
+
startDate: z23.string().optional(),
|
|
3416
|
+
endDate: z23.string().optional(),
|
|
3417
|
+
duration: z23.number().optional(),
|
|
3418
|
+
email: z23.string().optional(),
|
|
3419
|
+
referenceId: z23.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3420
|
+
emailBrand: z23.string().optional(),
|
|
3421
|
+
startTime: z23.number().optional(),
|
|
3422
|
+
endTime: z23.number().optional()
|
|
3323
3423
|
}).transform((data) => ({
|
|
3324
3424
|
iccid: data["iccid"],
|
|
3325
3425
|
dataLimitInGb: data["dataLimitInGB"],
|
|
@@ -3333,18 +3433,18 @@ var topUpEsimRequestResponse = z24.lazy(() => {
|
|
|
3333
3433
|
endTime: data["endTime"]
|
|
3334
3434
|
}));
|
|
3335
3435
|
});
|
|
3336
|
-
var topUpEsimRequestRequest =
|
|
3337
|
-
return
|
|
3338
|
-
iccid:
|
|
3339
|
-
dataLimitInGb:
|
|
3340
|
-
startDate:
|
|
3341
|
-
endDate:
|
|
3342
|
-
duration:
|
|
3343
|
-
email:
|
|
3344
|
-
referenceId:
|
|
3345
|
-
emailBrand:
|
|
3346
|
-
startTime:
|
|
3347
|
-
endTime:
|
|
3436
|
+
var topUpEsimRequestRequest = z23.lazy(() => {
|
|
3437
|
+
return z23.object({
|
|
3438
|
+
iccid: z23.string().min(18).max(22),
|
|
3439
|
+
dataLimitInGb: z23.number(),
|
|
3440
|
+
startDate: z23.string().optional(),
|
|
3441
|
+
endDate: z23.string().optional(),
|
|
3442
|
+
duration: z23.number().optional(),
|
|
3443
|
+
email: z23.string().optional(),
|
|
3444
|
+
referenceId: z23.string().max(255).regex(/^[a-zA-Z0-9\-_.@+]+$/).optional(),
|
|
3445
|
+
emailBrand: z23.string().optional(),
|
|
3446
|
+
startTime: z23.number().optional(),
|
|
3447
|
+
endTime: z23.number().optional()
|
|
3348
3448
|
}).transform((data) => ({
|
|
3349
3449
|
iccid: data["iccid"],
|
|
3350
3450
|
dataLimitInGB: data["dataLimitInGb"],
|
|
@@ -3360,30 +3460,30 @@ var topUpEsimRequestRequest = z24.lazy(() => {
|
|
|
3360
3460
|
});
|
|
3361
3461
|
|
|
3362
3462
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
|
3363
|
-
import { z as
|
|
3463
|
+
import { z as z26 } from "zod";
|
|
3364
3464
|
|
|
3365
3465
|
// src/services/purchases/models/top-up-esim-ok-response-purchase.ts
|
|
3366
|
-
import { z as
|
|
3367
|
-
var topUpEsimOkResponsePurchase =
|
|
3368
|
-
return
|
|
3369
|
-
id:
|
|
3370
|
-
packageId:
|
|
3371
|
-
startDate:
|
|
3372
|
-
endDate:
|
|
3373
|
-
createdDate:
|
|
3374
|
-
startTime:
|
|
3375
|
-
endTime:
|
|
3466
|
+
import { z as z24 } from "zod";
|
|
3467
|
+
var topUpEsimOkResponsePurchase = z24.lazy(() => {
|
|
3468
|
+
return z24.object({
|
|
3469
|
+
id: z24.string(),
|
|
3470
|
+
packageId: z24.string(),
|
|
3471
|
+
startDate: z24.string().nullable(),
|
|
3472
|
+
endDate: z24.string().nullable(),
|
|
3473
|
+
createdDate: z24.string(),
|
|
3474
|
+
startTime: z24.number().optional().nullable(),
|
|
3475
|
+
endTime: z24.number().optional().nullable()
|
|
3376
3476
|
});
|
|
3377
3477
|
});
|
|
3378
|
-
var topUpEsimOkResponsePurchaseResponse =
|
|
3379
|
-
return
|
|
3380
|
-
id:
|
|
3381
|
-
packageId:
|
|
3382
|
-
startDate:
|
|
3383
|
-
endDate:
|
|
3384
|
-
createdDate:
|
|
3385
|
-
startTime:
|
|
3386
|
-
endTime:
|
|
3478
|
+
var topUpEsimOkResponsePurchaseResponse = z24.lazy(() => {
|
|
3479
|
+
return z24.object({
|
|
3480
|
+
id: z24.string(),
|
|
3481
|
+
packageId: z24.string(),
|
|
3482
|
+
startDate: z24.string().nullable(),
|
|
3483
|
+
endDate: z24.string().nullable(),
|
|
3484
|
+
createdDate: z24.string(),
|
|
3485
|
+
startTime: z24.number().optional().nullable(),
|
|
3486
|
+
endTime: z24.number().optional().nullable()
|
|
3387
3487
|
}).transform((data) => ({
|
|
3388
3488
|
id: data["id"],
|
|
3389
3489
|
packageId: data["packageId"],
|
|
@@ -3394,15 +3494,15 @@ var topUpEsimOkResponsePurchaseResponse = z25.lazy(() => {
|
|
|
3394
3494
|
endTime: data["endTime"]
|
|
3395
3495
|
}));
|
|
3396
3496
|
});
|
|
3397
|
-
var topUpEsimOkResponsePurchaseRequest =
|
|
3398
|
-
return
|
|
3399
|
-
id:
|
|
3400
|
-
packageId:
|
|
3401
|
-
startDate:
|
|
3402
|
-
endDate:
|
|
3403
|
-
createdDate:
|
|
3404
|
-
startTime:
|
|
3405
|
-
endTime:
|
|
3497
|
+
var topUpEsimOkResponsePurchaseRequest = z24.lazy(() => {
|
|
3498
|
+
return z24.object({
|
|
3499
|
+
id: z24.string(),
|
|
3500
|
+
packageId: z24.string(),
|
|
3501
|
+
startDate: z24.string().nullable(),
|
|
3502
|
+
endDate: z24.string().nullable(),
|
|
3503
|
+
createdDate: z24.string(),
|
|
3504
|
+
startTime: z24.number().optional().nullable(),
|
|
3505
|
+
endTime: z24.number().optional().nullable()
|
|
3406
3506
|
}).transform((data) => ({
|
|
3407
3507
|
id: data["id"],
|
|
3408
3508
|
packageId: data["packageId"],
|
|
@@ -3415,36 +3515,36 @@ var topUpEsimOkResponsePurchaseRequest = z25.lazy(() => {
|
|
|
3415
3515
|
});
|
|
3416
3516
|
|
|
3417
3517
|
// src/services/purchases/models/top-up-esim-ok-response-profile.ts
|
|
3418
|
-
import { z as
|
|
3419
|
-
var topUpEsimOkResponseProfile =
|
|
3420
|
-
return
|
|
3421
|
-
iccid:
|
|
3518
|
+
import { z as z25 } from "zod";
|
|
3519
|
+
var topUpEsimOkResponseProfile = z25.lazy(() => {
|
|
3520
|
+
return z25.object({
|
|
3521
|
+
iccid: z25.string().min(18).max(22)
|
|
3422
3522
|
});
|
|
3423
3523
|
});
|
|
3424
|
-
var topUpEsimOkResponseProfileResponse =
|
|
3425
|
-
return
|
|
3426
|
-
iccid:
|
|
3524
|
+
var topUpEsimOkResponseProfileResponse = z25.lazy(() => {
|
|
3525
|
+
return z25.object({
|
|
3526
|
+
iccid: z25.string().min(18).max(22)
|
|
3427
3527
|
}).transform((data) => ({
|
|
3428
3528
|
iccid: data["iccid"]
|
|
3429
3529
|
}));
|
|
3430
3530
|
});
|
|
3431
|
-
var topUpEsimOkResponseProfileRequest =
|
|
3432
|
-
return
|
|
3433
|
-
iccid:
|
|
3531
|
+
var topUpEsimOkResponseProfileRequest = z25.lazy(() => {
|
|
3532
|
+
return z25.object({
|
|
3533
|
+
iccid: z25.string().min(18).max(22)
|
|
3434
3534
|
}).transform((data) => ({
|
|
3435
3535
|
iccid: data["iccid"]
|
|
3436
3536
|
}));
|
|
3437
3537
|
});
|
|
3438
3538
|
|
|
3439
3539
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
|
3440
|
-
var topUpEsimOkResponse =
|
|
3441
|
-
return
|
|
3540
|
+
var topUpEsimOkResponse = z26.lazy(() => {
|
|
3541
|
+
return z26.object({
|
|
3442
3542
|
purchase: topUpEsimOkResponsePurchase,
|
|
3443
3543
|
profile: topUpEsimOkResponseProfile
|
|
3444
3544
|
});
|
|
3445
3545
|
});
|
|
3446
|
-
var topUpEsimOkResponseResponse =
|
|
3447
|
-
return
|
|
3546
|
+
var topUpEsimOkResponseResponse = z26.lazy(() => {
|
|
3547
|
+
return z26.object({
|
|
3448
3548
|
purchase: topUpEsimOkResponsePurchaseResponse,
|
|
3449
3549
|
profile: topUpEsimOkResponseProfileResponse
|
|
3450
3550
|
}).transform((data) => ({
|
|
@@ -3452,8 +3552,8 @@ var topUpEsimOkResponseResponse = z27.lazy(() => {
|
|
|
3452
3552
|
profile: data["profile"]
|
|
3453
3553
|
}));
|
|
3454
3554
|
});
|
|
3455
|
-
var topUpEsimOkResponseRequest =
|
|
3456
|
-
return
|
|
3555
|
+
var topUpEsimOkResponseRequest = z26.lazy(() => {
|
|
3556
|
+
return z26.object({
|
|
3457
3557
|
purchase: topUpEsimOkResponsePurchaseRequest,
|
|
3458
3558
|
profile: topUpEsimOkResponseProfileRequest
|
|
3459
3559
|
}).transform((data) => ({
|
|
@@ -3463,23 +3563,23 @@ var topUpEsimOkResponseRequest = z27.lazy(() => {
|
|
|
3463
3563
|
});
|
|
3464
3564
|
|
|
3465
3565
|
// src/services/purchases/models/edit-purchase-request.ts
|
|
3466
|
-
import { z as
|
|
3467
|
-
var editPurchaseRequest =
|
|
3468
|
-
return
|
|
3469
|
-
purchaseId:
|
|
3470
|
-
startDate:
|
|
3471
|
-
endDate:
|
|
3472
|
-
startTime:
|
|
3473
|
-
endTime:
|
|
3566
|
+
import { z as z27 } from "zod";
|
|
3567
|
+
var editPurchaseRequest = z27.lazy(() => {
|
|
3568
|
+
return z27.object({
|
|
3569
|
+
purchaseId: z27.string(),
|
|
3570
|
+
startDate: z27.string(),
|
|
3571
|
+
endDate: z27.string(),
|
|
3572
|
+
startTime: z27.number().optional(),
|
|
3573
|
+
endTime: z27.number().optional()
|
|
3474
3574
|
});
|
|
3475
3575
|
});
|
|
3476
|
-
var editPurchaseRequestResponse =
|
|
3477
|
-
return
|
|
3478
|
-
purchaseId:
|
|
3479
|
-
startDate:
|
|
3480
|
-
endDate:
|
|
3481
|
-
startTime:
|
|
3482
|
-
endTime:
|
|
3576
|
+
var editPurchaseRequestResponse = z27.lazy(() => {
|
|
3577
|
+
return z27.object({
|
|
3578
|
+
purchaseId: z27.string(),
|
|
3579
|
+
startDate: z27.string(),
|
|
3580
|
+
endDate: z27.string(),
|
|
3581
|
+
startTime: z27.number().optional(),
|
|
3582
|
+
endTime: z27.number().optional()
|
|
3483
3583
|
}).transform((data) => ({
|
|
3484
3584
|
purchaseId: data["purchaseId"],
|
|
3485
3585
|
startDate: data["startDate"],
|
|
@@ -3488,13 +3588,13 @@ var editPurchaseRequestResponse = z28.lazy(() => {
|
|
|
3488
3588
|
endTime: data["endTime"]
|
|
3489
3589
|
}));
|
|
3490
3590
|
});
|
|
3491
|
-
var editPurchaseRequestRequest =
|
|
3492
|
-
return
|
|
3493
|
-
purchaseId:
|
|
3494
|
-
startDate:
|
|
3495
|
-
endDate:
|
|
3496
|
-
startTime:
|
|
3497
|
-
endTime:
|
|
3591
|
+
var editPurchaseRequestRequest = z27.lazy(() => {
|
|
3592
|
+
return z27.object({
|
|
3593
|
+
purchaseId: z27.string(),
|
|
3594
|
+
startDate: z27.string(),
|
|
3595
|
+
endDate: z27.string(),
|
|
3596
|
+
startTime: z27.number().optional(),
|
|
3597
|
+
endTime: z27.number().optional()
|
|
3498
3598
|
}).transform((data) => ({
|
|
3499
3599
|
purchaseId: data["purchaseId"],
|
|
3500
3600
|
startDate: data["startDate"],
|
|
@@ -3505,23 +3605,23 @@ var editPurchaseRequestRequest = z28.lazy(() => {
|
|
|
3505
3605
|
});
|
|
3506
3606
|
|
|
3507
3607
|
// src/services/purchases/models/edit-purchase-ok-response.ts
|
|
3508
|
-
import { z as
|
|
3509
|
-
var editPurchaseOkResponse =
|
|
3510
|
-
return
|
|
3511
|
-
purchaseId:
|
|
3512
|
-
newStartDate:
|
|
3513
|
-
newEndDate:
|
|
3514
|
-
newStartTime:
|
|
3515
|
-
newEndTime:
|
|
3608
|
+
import { z as z28 } from "zod";
|
|
3609
|
+
var editPurchaseOkResponse = z28.lazy(() => {
|
|
3610
|
+
return z28.object({
|
|
3611
|
+
purchaseId: z28.string(),
|
|
3612
|
+
newStartDate: z28.string().nullable(),
|
|
3613
|
+
newEndDate: z28.string().nullable(),
|
|
3614
|
+
newStartTime: z28.number().optional().nullable(),
|
|
3615
|
+
newEndTime: z28.number().optional().nullable()
|
|
3516
3616
|
});
|
|
3517
3617
|
});
|
|
3518
|
-
var editPurchaseOkResponseResponse =
|
|
3519
|
-
return
|
|
3520
|
-
purchaseId:
|
|
3521
|
-
newStartDate:
|
|
3522
|
-
newEndDate:
|
|
3523
|
-
newStartTime:
|
|
3524
|
-
newEndTime:
|
|
3618
|
+
var editPurchaseOkResponseResponse = z28.lazy(() => {
|
|
3619
|
+
return z28.object({
|
|
3620
|
+
purchaseId: z28.string(),
|
|
3621
|
+
newStartDate: z28.string().nullable(),
|
|
3622
|
+
newEndDate: z28.string().nullable(),
|
|
3623
|
+
newStartTime: z28.number().optional().nullable(),
|
|
3624
|
+
newEndTime: z28.number().optional().nullable()
|
|
3525
3625
|
}).transform((data) => ({
|
|
3526
3626
|
purchaseId: data["purchaseId"],
|
|
3527
3627
|
newStartDate: data["newStartDate"],
|
|
@@ -3530,13 +3630,13 @@ var editPurchaseOkResponseResponse = z29.lazy(() => {
|
|
|
3530
3630
|
newEndTime: data["newEndTime"]
|
|
3531
3631
|
}));
|
|
3532
3632
|
});
|
|
3533
|
-
var editPurchaseOkResponseRequest =
|
|
3534
|
-
return
|
|
3535
|
-
purchaseId:
|
|
3536
|
-
newStartDate:
|
|
3537
|
-
newEndDate:
|
|
3538
|
-
newStartTime:
|
|
3539
|
-
newEndTime:
|
|
3633
|
+
var editPurchaseOkResponseRequest = z28.lazy(() => {
|
|
3634
|
+
return z28.object({
|
|
3635
|
+
purchaseId: z28.string(),
|
|
3636
|
+
newStartDate: z28.string().nullable(),
|
|
3637
|
+
newEndDate: z28.string().nullable(),
|
|
3638
|
+
newStartTime: z28.number().optional().nullable(),
|
|
3639
|
+
newEndTime: z28.number().optional().nullable()
|
|
3540
3640
|
}).transform((data) => ({
|
|
3541
3641
|
purchaseId: data["purchaseId"],
|
|
3542
3642
|
newStartDate: data["newStartDate"],
|
|
@@ -3547,30 +3647,30 @@ var editPurchaseOkResponseRequest = z29.lazy(() => {
|
|
|
3547
3647
|
});
|
|
3548
3648
|
|
|
3549
3649
|
// src/services/purchases/models/get-purchase-consumption-ok-response.ts
|
|
3550
|
-
import { z as
|
|
3551
|
-
var getPurchaseConsumptionOkResponse =
|
|
3552
|
-
return
|
|
3553
|
-
dataUsageRemainingInBytes:
|
|
3554
|
-
dataUsageRemainingInGb:
|
|
3555
|
-
status:
|
|
3650
|
+
import { z as z29 } from "zod";
|
|
3651
|
+
var getPurchaseConsumptionOkResponse = z29.lazy(() => {
|
|
3652
|
+
return z29.object({
|
|
3653
|
+
dataUsageRemainingInBytes: z29.number(),
|
|
3654
|
+
dataUsageRemainingInGb: z29.number(),
|
|
3655
|
+
status: z29.string()
|
|
3556
3656
|
});
|
|
3557
3657
|
});
|
|
3558
|
-
var getPurchaseConsumptionOkResponseResponse =
|
|
3559
|
-
return
|
|
3560
|
-
dataUsageRemainingInBytes:
|
|
3561
|
-
dataUsageRemainingInGB:
|
|
3562
|
-
status:
|
|
3658
|
+
var getPurchaseConsumptionOkResponseResponse = z29.lazy(() => {
|
|
3659
|
+
return z29.object({
|
|
3660
|
+
dataUsageRemainingInBytes: z29.number(),
|
|
3661
|
+
dataUsageRemainingInGB: z29.number(),
|
|
3662
|
+
status: z29.string()
|
|
3563
3663
|
}).transform((data) => ({
|
|
3564
3664
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
|
3565
3665
|
dataUsageRemainingInGb: data["dataUsageRemainingInGB"],
|
|
3566
3666
|
status: data["status"]
|
|
3567
3667
|
}));
|
|
3568
3668
|
});
|
|
3569
|
-
var getPurchaseConsumptionOkResponseRequest =
|
|
3570
|
-
return
|
|
3571
|
-
dataUsageRemainingInBytes:
|
|
3572
|
-
dataUsageRemainingInGb:
|
|
3573
|
-
status:
|
|
3669
|
+
var getPurchaseConsumptionOkResponseRequest = z29.lazy(() => {
|
|
3670
|
+
return z29.object({
|
|
3671
|
+
dataUsageRemainingInBytes: z29.number(),
|
|
3672
|
+
dataUsageRemainingInGb: z29.number(),
|
|
3673
|
+
status: z29.string()
|
|
3574
3674
|
}).transform((data) => ({
|
|
3575
3675
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
|
3576
3676
|
dataUsageRemainingInGB: data["dataUsageRemainingInGb"],
|
|
@@ -3636,23 +3736,40 @@ var PurchasesService = class extends BaseService {
|
|
|
3636
3736
|
}
|
|
3637
3737
|
/**
|
|
3638
3738
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
3739
|
+
* @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.
|
|
3639
3740
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3640
3741
|
* @returns {Promise<HttpResponse<CreatePurchaseV2OkResponse[]>>} - Successful Response
|
|
3641
3742
|
*/
|
|
3642
|
-
async createPurchaseV2(body, requestConfig) {
|
|
3743
|
+
async createPurchaseV2(body, params, requestConfig) {
|
|
3643
3744
|
const resolvedConfig = this.getResolvedConfig(this.createPurchaseV2Config, requestConfig);
|
|
3745
|
+
z30.object({ idempotencyKey: z30.string().optional() }).parse(params != null ? params : {});
|
|
3644
3746
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/v2").setRequestSchema(createPurchaseV2RequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3645
|
-
schema:
|
|
3747
|
+
schema: z30.array(createPurchaseV2OkResponseResponse),
|
|
3646
3748
|
contentType: "json" /* Json */,
|
|
3647
3749
|
status: 200
|
|
3648
3750
|
}).addError({
|
|
3649
|
-
error:
|
|
3751
|
+
error: ErrorResponse,
|
|
3650
3752
|
contentType: "json" /* Json */,
|
|
3651
3753
|
status: 400
|
|
3652
3754
|
}).addError({
|
|
3653
|
-
error:
|
|
3755
|
+
error: ErrorResponse,
|
|
3654
3756
|
contentType: "json" /* Json */,
|
|
3655
3757
|
status: 401
|
|
3758
|
+
}).addError({
|
|
3759
|
+
error: ErrorResponse,
|
|
3760
|
+
contentType: "json" /* Json */,
|
|
3761
|
+
status: 409
|
|
3762
|
+
}).addError({
|
|
3763
|
+
error: ErrorResponse,
|
|
3764
|
+
contentType: "json" /* Json */,
|
|
3765
|
+
status: 422
|
|
3766
|
+
}).addError({
|
|
3767
|
+
error: ErrorResponse,
|
|
3768
|
+
contentType: "json" /* Json */,
|
|
3769
|
+
status: 503
|
|
3770
|
+
}).addHeaderParam({
|
|
3771
|
+
key: "Idempotency-Key",
|
|
3772
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3656
3773
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3657
3774
|
return this.client.callDirect(request);
|
|
3658
3775
|
}
|
|
@@ -3673,30 +3790,42 @@ var PurchasesService = class extends BaseService {
|
|
|
3673
3790
|
*/
|
|
3674
3791
|
async listPurchases(params, requestConfig) {
|
|
3675
3792
|
const resolvedConfig = this.getResolvedConfig(this.listPurchasesConfig, requestConfig);
|
|
3676
|
-
|
|
3677
|
-
purchaseId:
|
|
3678
|
-
iccid:
|
|
3679
|
-
afterDate:
|
|
3680
|
-
beforeDate:
|
|
3681
|
-
email:
|
|
3682
|
-
referenceId:
|
|
3683
|
-
afterCursor:
|
|
3684
|
-
limit:
|
|
3685
|
-
after:
|
|
3686
|
-
before:
|
|
3793
|
+
z30.object({
|
|
3794
|
+
purchaseId: z30.string().optional(),
|
|
3795
|
+
iccid: z30.string().optional(),
|
|
3796
|
+
afterDate: z30.string().optional(),
|
|
3797
|
+
beforeDate: z30.string().optional(),
|
|
3798
|
+
email: z30.string().optional(),
|
|
3799
|
+
referenceId: z30.string().optional(),
|
|
3800
|
+
afterCursor: z30.string().optional(),
|
|
3801
|
+
limit: z30.number().optional(),
|
|
3802
|
+
after: z30.number().optional(),
|
|
3803
|
+
before: z30.number().optional()
|
|
3687
3804
|
}).parse(params != null ? params : {});
|
|
3688
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases").setRequestSchema(
|
|
3805
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases").setRequestSchema(z30.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3689
3806
|
schema: listPurchasesOkResponseResponse,
|
|
3690
3807
|
contentType: "json" /* Json */,
|
|
3691
3808
|
status: 200
|
|
3692
3809
|
}).addError({
|
|
3693
|
-
error:
|
|
3810
|
+
error: ErrorResponse,
|
|
3694
3811
|
contentType: "json" /* Json */,
|
|
3695
3812
|
status: 400
|
|
3696
3813
|
}).addError({
|
|
3697
|
-
error:
|
|
3814
|
+
error: ErrorResponse,
|
|
3698
3815
|
contentType: "json" /* Json */,
|
|
3699
3816
|
status: 401
|
|
3817
|
+
}).addError({
|
|
3818
|
+
error: ErrorResponse,
|
|
3819
|
+
contentType: "json" /* Json */,
|
|
3820
|
+
status: 409
|
|
3821
|
+
}).addError({
|
|
3822
|
+
error: ErrorResponse,
|
|
3823
|
+
contentType: "json" /* Json */,
|
|
3824
|
+
status: 422
|
|
3825
|
+
}).addError({
|
|
3826
|
+
error: ErrorResponse,
|
|
3827
|
+
contentType: "json" /* Json */,
|
|
3828
|
+
status: 503
|
|
3700
3829
|
}).addQueryParam({
|
|
3701
3830
|
key: "purchaseId",
|
|
3702
3831
|
value: params == null ? void 0 : params.purchaseId
|
|
@@ -3732,45 +3861,79 @@ var PurchasesService = class extends BaseService {
|
|
|
3732
3861
|
}
|
|
3733
3862
|
/**
|
|
3734
3863
|
* This endpoint is used to purchase a new eSIM by providing the package details.
|
|
3864
|
+
* @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.
|
|
3735
3865
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3736
3866
|
* @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} - Successful Response
|
|
3737
3867
|
*/
|
|
3738
|
-
async createPurchase(body, requestConfig) {
|
|
3868
|
+
async createPurchase(body, params, requestConfig) {
|
|
3739
3869
|
const resolvedConfig = this.getResolvedConfig(this.createPurchaseConfig, requestConfig);
|
|
3870
|
+
z30.object({ idempotencyKey: z30.string().optional() }).parse(params != null ? params : {});
|
|
3740
3871
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases").setRequestSchema(createPurchaseRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3741
3872
|
schema: createPurchaseOkResponseResponse,
|
|
3742
3873
|
contentType: "json" /* Json */,
|
|
3743
3874
|
status: 200
|
|
3744
3875
|
}).addError({
|
|
3745
|
-
error:
|
|
3876
|
+
error: ErrorResponse,
|
|
3746
3877
|
contentType: "json" /* Json */,
|
|
3747
3878
|
status: 400
|
|
3748
3879
|
}).addError({
|
|
3749
|
-
error:
|
|
3880
|
+
error: ErrorResponse,
|
|
3750
3881
|
contentType: "json" /* Json */,
|
|
3751
3882
|
status: 401
|
|
3883
|
+
}).addError({
|
|
3884
|
+
error: ErrorResponse,
|
|
3885
|
+
contentType: "json" /* Json */,
|
|
3886
|
+
status: 409
|
|
3887
|
+
}).addError({
|
|
3888
|
+
error: ErrorResponse,
|
|
3889
|
+
contentType: "json" /* Json */,
|
|
3890
|
+
status: 422
|
|
3891
|
+
}).addError({
|
|
3892
|
+
error: ErrorResponse,
|
|
3893
|
+
contentType: "json" /* Json */,
|
|
3894
|
+
status: 503
|
|
3895
|
+
}).addHeaderParam({
|
|
3896
|
+
key: "Idempotency-Key",
|
|
3897
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3752
3898
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3753
3899
|
return this.client.callDirect(request);
|
|
3754
3900
|
}
|
|
3755
3901
|
/**
|
|
3756
3902
|
* 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.
|
|
3903
|
+
* @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.
|
|
3757
3904
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3758
3905
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} - Successful Response
|
|
3759
3906
|
*/
|
|
3760
|
-
async topUpEsim(body, requestConfig) {
|
|
3907
|
+
async topUpEsim(body, params, requestConfig) {
|
|
3761
3908
|
const resolvedConfig = this.getResolvedConfig(this.topUpEsimConfig, requestConfig);
|
|
3909
|
+
z30.object({ idempotencyKey: z30.string().optional() }).parse(params != null ? params : {});
|
|
3762
3910
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/topup").setRequestSchema(topUpEsimRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3763
3911
|
schema: topUpEsimOkResponseResponse,
|
|
3764
3912
|
contentType: "json" /* Json */,
|
|
3765
3913
|
status: 200
|
|
3766
3914
|
}).addError({
|
|
3767
|
-
error:
|
|
3915
|
+
error: ErrorResponse,
|
|
3768
3916
|
contentType: "json" /* Json */,
|
|
3769
3917
|
status: 400
|
|
3770
3918
|
}).addError({
|
|
3771
|
-
error:
|
|
3919
|
+
error: ErrorResponse,
|
|
3772
3920
|
contentType: "json" /* Json */,
|
|
3773
3921
|
status: 401
|
|
3922
|
+
}).addError({
|
|
3923
|
+
error: ErrorResponse,
|
|
3924
|
+
contentType: "json" /* Json */,
|
|
3925
|
+
status: 409
|
|
3926
|
+
}).addError({
|
|
3927
|
+
error: ErrorResponse,
|
|
3928
|
+
contentType: "json" /* Json */,
|
|
3929
|
+
status: 422
|
|
3930
|
+
}).addError({
|
|
3931
|
+
error: ErrorResponse,
|
|
3932
|
+
contentType: "json" /* Json */,
|
|
3933
|
+
status: 503
|
|
3934
|
+
}).addHeaderParam({
|
|
3935
|
+
key: "Idempotency-Key",
|
|
3936
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
3774
3937
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3775
3938
|
return this.client.callDirect(request);
|
|
3776
3939
|
}
|
|
@@ -3783,23 +3946,40 @@ var PurchasesService = class extends BaseService {
|
|
|
3783
3946
|
|
|
3784
3947
|
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.
|
|
3785
3948
|
|
|
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.
|
|
3786
3950
|
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
3787
3951
|
* @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} - Successful Response
|
|
3788
3952
|
*/
|
|
3789
|
-
async editPurchase(body, requestConfig) {
|
|
3953
|
+
async editPurchase(body, params, requestConfig) {
|
|
3790
3954
|
const resolvedConfig = this.getResolvedConfig(this.editPurchaseConfig, requestConfig);
|
|
3955
|
+
z30.object({ idempotencyKey: z30.string().optional() }).parse(params != null ? params : {});
|
|
3791
3956
|
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/purchases/edit").setRequestSchema(editPurchaseRequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3792
3957
|
schema: editPurchaseOkResponseResponse,
|
|
3793
3958
|
contentType: "json" /* Json */,
|
|
3794
3959
|
status: 200
|
|
3795
3960
|
}).addError({
|
|
3796
|
-
error:
|
|
3961
|
+
error: ErrorResponse,
|
|
3797
3962
|
contentType: "json" /* Json */,
|
|
3798
3963
|
status: 400
|
|
3799
3964
|
}).addError({
|
|
3800
|
-
error:
|
|
3965
|
+
error: ErrorResponse,
|
|
3801
3966
|
contentType: "json" /* Json */,
|
|
3802
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
|
|
3803
3983
|
}).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
|
3804
3984
|
return this.client.callDirect(request);
|
|
3805
3985
|
}
|
|
@@ -3811,18 +3991,30 @@ var PurchasesService = class extends BaseService {
|
|
|
3811
3991
|
*/
|
|
3812
3992
|
async getPurchaseConsumption(purchaseId, requestConfig) {
|
|
3813
3993
|
const resolvedConfig = this.getResolvedConfig(this.getPurchaseConsumptionConfig, requestConfig);
|
|
3814
|
-
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(
|
|
3994
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(z30.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
3815
3995
|
schema: getPurchaseConsumptionOkResponseResponse,
|
|
3816
3996
|
contentType: "json" /* Json */,
|
|
3817
3997
|
status: 200
|
|
3818
3998
|
}).addError({
|
|
3819
|
-
error:
|
|
3999
|
+
error: ErrorResponse,
|
|
3820
4000
|
contentType: "json" /* Json */,
|
|
3821
4001
|
status: 400
|
|
3822
4002
|
}).addError({
|
|
3823
|
-
error:
|
|
4003
|
+
error: ErrorResponse,
|
|
3824
4004
|
contentType: "json" /* Json */,
|
|
3825
4005
|
status: 401
|
|
4006
|
+
}).addError({
|
|
4007
|
+
error: ErrorResponse,
|
|
4008
|
+
contentType: "json" /* Json */,
|
|
4009
|
+
status: 409
|
|
4010
|
+
}).addError({
|
|
4011
|
+
error: ErrorResponse,
|
|
4012
|
+
contentType: "json" /* Json */,
|
|
4013
|
+
status: 422
|
|
4014
|
+
}).addError({
|
|
4015
|
+
error: ErrorResponse,
|
|
4016
|
+
contentType: "json" /* Json */,
|
|
4017
|
+
status: 503
|
|
3826
4018
|
}).addPathParam({
|
|
3827
4019
|
key: "purchaseId",
|
|
3828
4020
|
value: purchaseId
|
|
@@ -3855,30 +4047,30 @@ var CreatePurchaseRequestLanguage = /* @__PURE__ */ ((CreatePurchaseRequestLangu
|
|
|
3855
4047
|
import { z as z39 } from "zod";
|
|
3856
4048
|
|
|
3857
4049
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
|
3858
|
-
import { z as
|
|
4050
|
+
import { z as z32 } from "zod";
|
|
3859
4051
|
|
|
3860
4052
|
// src/services/e-sim/models/get-esim-ok-response-esim.ts
|
|
3861
|
-
import { z as
|
|
3862
|
-
var getEsimOkResponseEsim =
|
|
3863
|
-
return
|
|
3864
|
-
iccid:
|
|
3865
|
-
smdpAddress:
|
|
3866
|
-
activationCode:
|
|
3867
|
-
manualActivationCode:
|
|
3868
|
-
status:
|
|
3869
|
-
connectivityStatus:
|
|
3870
|
-
isTopUpAllowed:
|
|
4053
|
+
import { z as z31 } from "zod";
|
|
4054
|
+
var getEsimOkResponseEsim = z31.lazy(() => {
|
|
4055
|
+
return z31.object({
|
|
4056
|
+
iccid: z31.string().min(18).max(22),
|
|
4057
|
+
smdpAddress: z31.string(),
|
|
4058
|
+
activationCode: z31.string().min(1e3).max(8e3),
|
|
4059
|
+
manualActivationCode: z31.string(),
|
|
4060
|
+
status: z31.string(),
|
|
4061
|
+
connectivityStatus: z31.string(),
|
|
4062
|
+
isTopUpAllowed: z31.boolean()
|
|
3871
4063
|
});
|
|
3872
4064
|
});
|
|
3873
|
-
var getEsimOkResponseEsimResponse =
|
|
3874
|
-
return
|
|
3875
|
-
iccid:
|
|
3876
|
-
smdpAddress:
|
|
3877
|
-
activationCode:
|
|
3878
|
-
manualActivationCode:
|
|
3879
|
-
status:
|
|
3880
|
-
connectivityStatus:
|
|
3881
|
-
isTopUpAllowed:
|
|
4065
|
+
var getEsimOkResponseEsimResponse = z31.lazy(() => {
|
|
4066
|
+
return z31.object({
|
|
4067
|
+
iccid: z31.string().min(18).max(22),
|
|
4068
|
+
smdpAddress: z31.string(),
|
|
4069
|
+
activationCode: z31.string().min(1e3).max(8e3),
|
|
4070
|
+
manualActivationCode: z31.string(),
|
|
4071
|
+
status: z31.string(),
|
|
4072
|
+
connectivityStatus: z31.string(),
|
|
4073
|
+
isTopUpAllowed: z31.boolean()
|
|
3882
4074
|
}).transform((data) => ({
|
|
3883
4075
|
iccid: data["iccid"],
|
|
3884
4076
|
smdpAddress: data["smdpAddress"],
|
|
@@ -3889,15 +4081,15 @@ var getEsimOkResponseEsimResponse = z32.lazy(() => {
|
|
|
3889
4081
|
isTopUpAllowed: data["isTopUpAllowed"]
|
|
3890
4082
|
}));
|
|
3891
4083
|
});
|
|
3892
|
-
var getEsimOkResponseEsimRequest =
|
|
3893
|
-
return
|
|
3894
|
-
iccid:
|
|
3895
|
-
smdpAddress:
|
|
3896
|
-
activationCode:
|
|
3897
|
-
manualActivationCode:
|
|
3898
|
-
status:
|
|
3899
|
-
connectivityStatus:
|
|
3900
|
-
isTopUpAllowed:
|
|
4084
|
+
var getEsimOkResponseEsimRequest = z31.lazy(() => {
|
|
4085
|
+
return z31.object({
|
|
4086
|
+
iccid: z31.string().min(18).max(22),
|
|
4087
|
+
smdpAddress: z31.string(),
|
|
4088
|
+
activationCode: z31.string().min(1e3).max(8e3),
|
|
4089
|
+
manualActivationCode: z31.string(),
|
|
4090
|
+
status: z31.string(),
|
|
4091
|
+
connectivityStatus: z31.string(),
|
|
4092
|
+
isTopUpAllowed: z31.boolean()
|
|
3901
4093
|
}).transform((data) => ({
|
|
3902
4094
|
iccid: data["iccid"],
|
|
3903
4095
|
smdpAddress: data["smdpAddress"],
|
|
@@ -3910,20 +4102,20 @@ var getEsimOkResponseEsimRequest = z32.lazy(() => {
|
|
|
3910
4102
|
});
|
|
3911
4103
|
|
|
3912
4104
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
|
3913
|
-
var getEsimOkResponse =
|
|
3914
|
-
return
|
|
4105
|
+
var getEsimOkResponse = z32.lazy(() => {
|
|
4106
|
+
return z32.object({
|
|
3915
4107
|
esim: getEsimOkResponseEsim
|
|
3916
4108
|
});
|
|
3917
4109
|
});
|
|
3918
|
-
var getEsimOkResponseResponse =
|
|
3919
|
-
return
|
|
4110
|
+
var getEsimOkResponseResponse = z32.lazy(() => {
|
|
4111
|
+
return z32.object({
|
|
3920
4112
|
esim: getEsimOkResponseEsimResponse
|
|
3921
4113
|
}).transform((data) => ({
|
|
3922
4114
|
esim: data["esim"]
|
|
3923
4115
|
}));
|
|
3924
4116
|
});
|
|
3925
|
-
var getEsimOkResponseRequest =
|
|
3926
|
-
return
|
|
4117
|
+
var getEsimOkResponseRequest = z32.lazy(() => {
|
|
4118
|
+
return z32.object({
|
|
3927
4119
|
esim: getEsimOkResponseEsimRequest
|
|
3928
4120
|
}).transform((data) => ({
|
|
3929
4121
|
esim: data["esim"]
|
|
@@ -3931,24 +4123,24 @@ var getEsimOkResponseRequest = z33.lazy(() => {
|
|
|
3931
4123
|
});
|
|
3932
4124
|
|
|
3933
4125
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
|
3934
|
-
import { z as
|
|
4126
|
+
import { z as z34 } from "zod";
|
|
3935
4127
|
|
|
3936
4128
|
// src/services/e-sim/models/device.ts
|
|
3937
|
-
import { z as
|
|
3938
|
-
var device =
|
|
3939
|
-
return
|
|
3940
|
-
oem:
|
|
3941
|
-
hardwareName:
|
|
3942
|
-
hardwareModel:
|
|
3943
|
-
eid:
|
|
4129
|
+
import { z as z33 } from "zod";
|
|
4130
|
+
var device = z33.lazy(() => {
|
|
4131
|
+
return z33.object({
|
|
4132
|
+
oem: z33.string(),
|
|
4133
|
+
hardwareName: z33.string(),
|
|
4134
|
+
hardwareModel: z33.string(),
|
|
4135
|
+
eid: z33.string()
|
|
3944
4136
|
});
|
|
3945
4137
|
});
|
|
3946
|
-
var deviceResponse =
|
|
3947
|
-
return
|
|
3948
|
-
oem:
|
|
3949
|
-
hardwareName:
|
|
3950
|
-
hardwareModel:
|
|
3951
|
-
eid:
|
|
4138
|
+
var deviceResponse = z33.lazy(() => {
|
|
4139
|
+
return z33.object({
|
|
4140
|
+
oem: z33.string(),
|
|
4141
|
+
hardwareName: z33.string(),
|
|
4142
|
+
hardwareModel: z33.string(),
|
|
4143
|
+
eid: z33.string()
|
|
3952
4144
|
}).transform((data) => ({
|
|
3953
4145
|
oem: data["oem"],
|
|
3954
4146
|
hardwareName: data["hardwareName"],
|
|
@@ -3956,12 +4148,12 @@ var deviceResponse = z34.lazy(() => {
|
|
|
3956
4148
|
eid: data["eid"]
|
|
3957
4149
|
}));
|
|
3958
4150
|
});
|
|
3959
|
-
var deviceRequest =
|
|
3960
|
-
return
|
|
3961
|
-
oem:
|
|
3962
|
-
hardwareName:
|
|
3963
|
-
hardwareModel:
|
|
3964
|
-
eid:
|
|
4151
|
+
var deviceRequest = z33.lazy(() => {
|
|
4152
|
+
return z33.object({
|
|
4153
|
+
oem: z33.string(),
|
|
4154
|
+
hardwareName: z33.string(),
|
|
4155
|
+
hardwareModel: z33.string(),
|
|
4156
|
+
eid: z33.string()
|
|
3965
4157
|
}).transform((data) => ({
|
|
3966
4158
|
oem: data["oem"],
|
|
3967
4159
|
hardwareName: data["hardwareName"],
|
|
@@ -3971,20 +4163,20 @@ var deviceRequest = z34.lazy(() => {
|
|
|
3971
4163
|
});
|
|
3972
4164
|
|
|
3973
4165
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
|
3974
|
-
var getEsimDeviceOkResponse =
|
|
3975
|
-
return
|
|
4166
|
+
var getEsimDeviceOkResponse = z34.lazy(() => {
|
|
4167
|
+
return z34.object({
|
|
3976
4168
|
device
|
|
3977
4169
|
});
|
|
3978
4170
|
});
|
|
3979
|
-
var getEsimDeviceOkResponseResponse =
|
|
3980
|
-
return
|
|
4171
|
+
var getEsimDeviceOkResponseResponse = z34.lazy(() => {
|
|
4172
|
+
return z34.object({
|
|
3981
4173
|
device: deviceResponse
|
|
3982
4174
|
}).transform((data) => ({
|
|
3983
4175
|
device: data["device"]
|
|
3984
4176
|
}));
|
|
3985
4177
|
});
|
|
3986
|
-
var getEsimDeviceOkResponseRequest =
|
|
3987
|
-
return
|
|
4178
|
+
var getEsimDeviceOkResponseRequest = z34.lazy(() => {
|
|
4179
|
+
return z34.object({
|
|
3988
4180
|
device: deviceRequest
|
|
3989
4181
|
}).transform((data) => ({
|
|
3990
4182
|
device: data["device"]
|
|
@@ -3992,36 +4184,36 @@ var getEsimDeviceOkResponseRequest = z35.lazy(() => {
|
|
|
3992
4184
|
});
|
|
3993
4185
|
|
|
3994
4186
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
|
3995
|
-
import { z as
|
|
4187
|
+
import { z as z37 } from "zod";
|
|
3996
4188
|
|
|
3997
4189
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
|
3998
|
-
import { z as
|
|
4190
|
+
import { z as z36 } from "zod";
|
|
3999
4191
|
|
|
4000
4192
|
// src/services/e-sim/models/history.ts
|
|
4001
|
-
import { z as
|
|
4002
|
-
var history =
|
|
4003
|
-
return
|
|
4004
|
-
status:
|
|
4005
|
-
statusDate:
|
|
4006
|
-
date:
|
|
4193
|
+
import { z as z35 } from "zod";
|
|
4194
|
+
var history = z35.lazy(() => {
|
|
4195
|
+
return z35.object({
|
|
4196
|
+
status: z35.string(),
|
|
4197
|
+
statusDate: z35.string(),
|
|
4198
|
+
date: z35.number().optional()
|
|
4007
4199
|
});
|
|
4008
4200
|
});
|
|
4009
|
-
var historyResponse =
|
|
4010
|
-
return
|
|
4011
|
-
status:
|
|
4012
|
-
statusDate:
|
|
4013
|
-
date:
|
|
4201
|
+
var historyResponse = z35.lazy(() => {
|
|
4202
|
+
return z35.object({
|
|
4203
|
+
status: z35.string(),
|
|
4204
|
+
statusDate: z35.string(),
|
|
4205
|
+
date: z35.number().optional()
|
|
4014
4206
|
}).transform((data) => ({
|
|
4015
4207
|
status: data["status"],
|
|
4016
4208
|
statusDate: data["statusDate"],
|
|
4017
4209
|
date: data["date"]
|
|
4018
4210
|
}));
|
|
4019
4211
|
});
|
|
4020
|
-
var historyRequest =
|
|
4021
|
-
return
|
|
4022
|
-
status:
|
|
4023
|
-
statusDate:
|
|
4024
|
-
date:
|
|
4212
|
+
var historyRequest = z35.lazy(() => {
|
|
4213
|
+
return z35.object({
|
|
4214
|
+
status: z35.string(),
|
|
4215
|
+
statusDate: z35.string(),
|
|
4216
|
+
date: z35.number().optional()
|
|
4025
4217
|
}).transform((data) => ({
|
|
4026
4218
|
status: data["status"],
|
|
4027
4219
|
statusDate: data["statusDate"],
|
|
@@ -4030,25 +4222,25 @@ var historyRequest = z36.lazy(() => {
|
|
|
4030
4222
|
});
|
|
4031
4223
|
|
|
4032
4224
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
|
4033
|
-
var getEsimHistoryOkResponseEsim =
|
|
4034
|
-
return
|
|
4035
|
-
iccid:
|
|
4036
|
-
history:
|
|
4225
|
+
var getEsimHistoryOkResponseEsim = z36.lazy(() => {
|
|
4226
|
+
return z36.object({
|
|
4227
|
+
iccid: z36.string().min(18).max(22),
|
|
4228
|
+
history: z36.array(history)
|
|
4037
4229
|
});
|
|
4038
4230
|
});
|
|
4039
|
-
var getEsimHistoryOkResponseEsimResponse =
|
|
4040
|
-
return
|
|
4041
|
-
iccid:
|
|
4042
|
-
history:
|
|
4231
|
+
var getEsimHistoryOkResponseEsimResponse = z36.lazy(() => {
|
|
4232
|
+
return z36.object({
|
|
4233
|
+
iccid: z36.string().min(18).max(22),
|
|
4234
|
+
history: z36.array(historyResponse)
|
|
4043
4235
|
}).transform((data) => ({
|
|
4044
4236
|
iccid: data["iccid"],
|
|
4045
4237
|
history: data["history"]
|
|
4046
4238
|
}));
|
|
4047
4239
|
});
|
|
4048
|
-
var getEsimHistoryOkResponseEsimRequest =
|
|
4049
|
-
return
|
|
4050
|
-
iccid:
|
|
4051
|
-
history:
|
|
4240
|
+
var getEsimHistoryOkResponseEsimRequest = z36.lazy(() => {
|
|
4241
|
+
return z36.object({
|
|
4242
|
+
iccid: z36.string().min(18).max(22),
|
|
4243
|
+
history: z36.array(historyRequest)
|
|
4052
4244
|
}).transform((data) => ({
|
|
4053
4245
|
iccid: data["iccid"],
|
|
4054
4246
|
history: data["history"]
|
|
@@ -4056,26 +4248,48 @@ var getEsimHistoryOkResponseEsimRequest = z37.lazy(() => {
|
|
|
4056
4248
|
});
|
|
4057
4249
|
|
|
4058
4250
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
|
4059
|
-
var getEsimHistoryOkResponse =
|
|
4060
|
-
return
|
|
4251
|
+
var getEsimHistoryOkResponse = z37.lazy(() => {
|
|
4252
|
+
return z37.object({
|
|
4061
4253
|
esim: getEsimHistoryOkResponseEsim
|
|
4062
4254
|
});
|
|
4063
4255
|
});
|
|
4064
|
-
var getEsimHistoryOkResponseResponse =
|
|
4065
|
-
return
|
|
4256
|
+
var getEsimHistoryOkResponseResponse = z37.lazy(() => {
|
|
4257
|
+
return z37.object({
|
|
4066
4258
|
esim: getEsimHistoryOkResponseEsimResponse
|
|
4067
4259
|
}).transform((data) => ({
|
|
4068
4260
|
esim: data["esim"]
|
|
4069
4261
|
}));
|
|
4070
4262
|
});
|
|
4071
|
-
var getEsimHistoryOkResponseRequest =
|
|
4072
|
-
return
|
|
4263
|
+
var getEsimHistoryOkResponseRequest = z37.lazy(() => {
|
|
4264
|
+
return z37.object({
|
|
4073
4265
|
esim: getEsimHistoryOkResponseEsimRequest
|
|
4074
4266
|
}).transform((data) => ({
|
|
4075
4267
|
esim: data["esim"]
|
|
4076
4268
|
}));
|
|
4077
4269
|
});
|
|
4078
4270
|
|
|
4271
|
+
// src/services/e-sim/models/suspend-esim-ok-response.ts
|
|
4272
|
+
import { z as z38 } from "zod";
|
|
4273
|
+
var suspendEsimOkResponse = z38.lazy(() => {
|
|
4274
|
+
return z38.object({
|
|
4275
|
+
message: z38.string()
|
|
4276
|
+
});
|
|
4277
|
+
});
|
|
4278
|
+
var suspendEsimOkResponseResponse = z38.lazy(() => {
|
|
4279
|
+
return z38.object({
|
|
4280
|
+
message: z38.string()
|
|
4281
|
+
}).transform((data) => ({
|
|
4282
|
+
message: data["message"]
|
|
4283
|
+
}));
|
|
4284
|
+
});
|
|
4285
|
+
var suspendEsimOkResponseRequest = z38.lazy(() => {
|
|
4286
|
+
return z38.object({
|
|
4287
|
+
message: z38.string()
|
|
4288
|
+
}).transform((data) => ({
|
|
4289
|
+
message: data["message"]
|
|
4290
|
+
}));
|
|
4291
|
+
});
|
|
4292
|
+
|
|
4079
4293
|
// src/services/e-sim/e-sim-service.ts
|
|
4080
4294
|
var ESimService = class extends BaseService {
|
|
4081
4295
|
/**
|
|
@@ -4105,6 +4319,15 @@ var ESimService = class extends BaseService {
|
|
|
4105
4319
|
this.getEsimHistoryConfig = config;
|
|
4106
4320
|
return this;
|
|
4107
4321
|
}
|
|
4322
|
+
/**
|
|
4323
|
+
* Sets method-level configuration for suspendEsim.
|
|
4324
|
+
* @param config - Partial configuration to override service-level defaults
|
|
4325
|
+
* @returns This service instance for method chaining
|
|
4326
|
+
*/
|
|
4327
|
+
setSuspendEsimConfig(config) {
|
|
4328
|
+
this.suspendEsimConfig = config;
|
|
4329
|
+
return this;
|
|
4330
|
+
}
|
|
4108
4331
|
/**
|
|
4109
4332
|
* Get eSIM
|
|
4110
4333
|
* @param {string} params.iccid - ID of the eSIM
|
|
@@ -4119,13 +4342,25 @@ var ESimService = class extends BaseService {
|
|
|
4119
4342
|
contentType: "json" /* Json */,
|
|
4120
4343
|
status: 200
|
|
4121
4344
|
}).addError({
|
|
4122
|
-
error:
|
|
4345
|
+
error: ErrorResponse,
|
|
4123
4346
|
contentType: "json" /* Json */,
|
|
4124
4347
|
status: 400
|
|
4125
4348
|
}).addError({
|
|
4126
|
-
error:
|
|
4349
|
+
error: ErrorResponse,
|
|
4127
4350
|
contentType: "json" /* Json */,
|
|
4128
4351
|
status: 401
|
|
4352
|
+
}).addError({
|
|
4353
|
+
error: ErrorResponse,
|
|
4354
|
+
contentType: "json" /* Json */,
|
|
4355
|
+
status: 409
|
|
4356
|
+
}).addError({
|
|
4357
|
+
error: ErrorResponse,
|
|
4358
|
+
contentType: "json" /* Json */,
|
|
4359
|
+
status: 422
|
|
4360
|
+
}).addError({
|
|
4361
|
+
error: ErrorResponse,
|
|
4362
|
+
contentType: "json" /* Json */,
|
|
4363
|
+
status: 503
|
|
4129
4364
|
}).addQueryParam({
|
|
4130
4365
|
key: "iccid",
|
|
4131
4366
|
value: params == null ? void 0 : params.iccid
|
|
@@ -4145,13 +4380,25 @@ var ESimService = class extends BaseService {
|
|
|
4145
4380
|
contentType: "json" /* Json */,
|
|
4146
4381
|
status: 200
|
|
4147
4382
|
}).addError({
|
|
4148
|
-
error:
|
|
4383
|
+
error: ErrorResponse,
|
|
4149
4384
|
contentType: "json" /* Json */,
|
|
4150
4385
|
status: 400
|
|
4151
4386
|
}).addError({
|
|
4152
|
-
error:
|
|
4387
|
+
error: ErrorResponse,
|
|
4153
4388
|
contentType: "json" /* Json */,
|
|
4154
4389
|
status: 401
|
|
4390
|
+
}).addError({
|
|
4391
|
+
error: ErrorResponse,
|
|
4392
|
+
contentType: "json" /* Json */,
|
|
4393
|
+
status: 409
|
|
4394
|
+
}).addError({
|
|
4395
|
+
error: ErrorResponse,
|
|
4396
|
+
contentType: "json" /* Json */,
|
|
4397
|
+
status: 422
|
|
4398
|
+
}).addError({
|
|
4399
|
+
error: ErrorResponse,
|
|
4400
|
+
contentType: "json" /* Json */,
|
|
4401
|
+
status: 503
|
|
4155
4402
|
}).addPathParam({
|
|
4156
4403
|
key: "iccid",
|
|
4157
4404
|
value: iccid
|
|
@@ -4171,19 +4418,74 @@ var ESimService = class extends BaseService {
|
|
|
4171
4418
|
contentType: "json" /* Json */,
|
|
4172
4419
|
status: 200
|
|
4173
4420
|
}).addError({
|
|
4174
|
-
error:
|
|
4421
|
+
error: ErrorResponse,
|
|
4175
4422
|
contentType: "json" /* Json */,
|
|
4176
4423
|
status: 400
|
|
4177
4424
|
}).addError({
|
|
4178
|
-
error:
|
|
4425
|
+
error: ErrorResponse,
|
|
4179
4426
|
contentType: "json" /* Json */,
|
|
4180
4427
|
status: 401
|
|
4428
|
+
}).addError({
|
|
4429
|
+
error: ErrorResponse,
|
|
4430
|
+
contentType: "json" /* Json */,
|
|
4431
|
+
status: 409
|
|
4432
|
+
}).addError({
|
|
4433
|
+
error: ErrorResponse,
|
|
4434
|
+
contentType: "json" /* Json */,
|
|
4435
|
+
status: 422
|
|
4436
|
+
}).addError({
|
|
4437
|
+
error: ErrorResponse,
|
|
4438
|
+
contentType: "json" /* Json */,
|
|
4439
|
+
status: 503
|
|
4181
4440
|
}).addPathParam({
|
|
4182
4441
|
key: "iccid",
|
|
4183
4442
|
value: iccid
|
|
4184
4443
|
}).build();
|
|
4185
4444
|
return this.client.callDirect(request);
|
|
4186
4445
|
}
|
|
4446
|
+
/**
|
|
4447
|
+
* 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.
|
|
4448
|
+
* @param {string} iccid - ID of the eSIM
|
|
4449
|
+
* @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.
|
|
4450
|
+
* @param {Partial<SdkConfig>} [requestConfig] - The request configuration for retry and validation.
|
|
4451
|
+
* @returns {Promise<HttpResponse<SuspendEsimOkResponse>>} - Successful Response
|
|
4452
|
+
*/
|
|
4453
|
+
async suspendEsim(iccid, params, requestConfig) {
|
|
4454
|
+
const resolvedConfig = this.getResolvedConfig(this.suspendEsimConfig, requestConfig);
|
|
4455
|
+
z39.object({ idempotencyKey: z39.string().optional() }).parse(params != null ? params : {});
|
|
4456
|
+
const request = new RequestBuilder().setConfig(resolvedConfig).setBaseUrl(resolvedConfig).setMethod("POST").setPath("/esim/{iccid}/suspend").setRequestSchema(z39.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
|
4457
|
+
schema: suspendEsimOkResponseResponse,
|
|
4458
|
+
contentType: "json" /* Json */,
|
|
4459
|
+
status: 200
|
|
4460
|
+
}).addError({
|
|
4461
|
+
error: ErrorResponse,
|
|
4462
|
+
contentType: "json" /* Json */,
|
|
4463
|
+
status: 400
|
|
4464
|
+
}).addError({
|
|
4465
|
+
error: ErrorResponse,
|
|
4466
|
+
contentType: "json" /* Json */,
|
|
4467
|
+
status: 401
|
|
4468
|
+
}).addError({
|
|
4469
|
+
error: ErrorResponse,
|
|
4470
|
+
contentType: "json" /* Json */,
|
|
4471
|
+
status: 409
|
|
4472
|
+
}).addError({
|
|
4473
|
+
error: ErrorResponse,
|
|
4474
|
+
contentType: "json" /* Json */,
|
|
4475
|
+
status: 422
|
|
4476
|
+
}).addError({
|
|
4477
|
+
error: ErrorResponse,
|
|
4478
|
+
contentType: "json" /* Json */,
|
|
4479
|
+
status: 503
|
|
4480
|
+
}).addPathParam({
|
|
4481
|
+
key: "iccid",
|
|
4482
|
+
value: iccid
|
|
4483
|
+
}).addHeaderParam({
|
|
4484
|
+
key: "Idempotency-Key",
|
|
4485
|
+
value: params == null ? void 0 : params.idempotencyKey
|
|
4486
|
+
}).build();
|
|
4487
|
+
return this.client.callDirect(request);
|
|
4488
|
+
}
|
|
4187
4489
|
};
|
|
4188
4490
|
|
|
4189
4491
|
// src/services/i-frame/i-frame-service.ts
|
|
@@ -4234,13 +4536,25 @@ var IFrameService = class extends BaseService {
|
|
|
4234
4536
|
contentType: "json" /* Json */,
|
|
4235
4537
|
status: 200
|
|
4236
4538
|
}).addError({
|
|
4237
|
-
error:
|
|
4539
|
+
error: ErrorResponse,
|
|
4238
4540
|
contentType: "json" /* Json */,
|
|
4239
4541
|
status: 400
|
|
4240
4542
|
}).addError({
|
|
4241
|
-
error:
|
|
4543
|
+
error: ErrorResponse,
|
|
4242
4544
|
contentType: "json" /* Json */,
|
|
4243
4545
|
status: 401
|
|
4546
|
+
}).addError({
|
|
4547
|
+
error: ErrorResponse,
|
|
4548
|
+
contentType: "json" /* Json */,
|
|
4549
|
+
status: 409
|
|
4550
|
+
}).addError({
|
|
4551
|
+
error: ErrorResponse,
|
|
4552
|
+
contentType: "json" /* Json */,
|
|
4553
|
+
status: 422
|
|
4554
|
+
}).addError({
|
|
4555
|
+
error: ErrorResponse,
|
|
4556
|
+
contentType: "json" /* Json */,
|
|
4557
|
+
status: 503
|
|
4244
4558
|
}).build();
|
|
4245
4559
|
return this.client.callDirect(request);
|
|
4246
4560
|
}
|