celitech-sdk 1.2.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +26 -6
- package/dist/index.d.ts +94 -13
- package/dist/index.js +678 -545
- package/dist/index.mjs +676 -545
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -33,14 +33,13 @@ __export(src_exports, {
|
|
33
33
|
Celitech: () => Celitech,
|
34
34
|
DestinationsService: () => DestinationsService,
|
35
35
|
ESimService: () => ESimService,
|
36
|
+
GrantType: () => GrantType,
|
37
|
+
OAuthService: () => OAuthService,
|
36
38
|
PackagesService: () => PackagesService,
|
37
39
|
PurchasesService: () => PurchasesService
|
38
40
|
});
|
39
41
|
module.exports = __toCommonJS(src_exports);
|
40
42
|
|
41
|
-
// src/services/destinations/destinations.ts
|
42
|
-
var import_zod5 = require("zod");
|
43
|
-
|
44
43
|
// src/http/handlers/handler-chain.ts
|
45
44
|
var RequestHandlerChain = class {
|
46
45
|
constructor() {
|
@@ -61,63 +60,26 @@ var RequestHandlerChain = class {
|
|
61
60
|
}
|
62
61
|
};
|
63
62
|
|
63
|
+
// src/http/error.ts
|
64
|
+
var HttpError = class extends Error {
|
65
|
+
constructor(metadata, raw, error) {
|
66
|
+
super(error);
|
67
|
+
this.error = metadata.statusText;
|
68
|
+
this.metadata = metadata;
|
69
|
+
this.raw = raw;
|
70
|
+
}
|
71
|
+
};
|
72
|
+
|
64
73
|
// src/http/hooks/custom-hook.ts
|
65
|
-
var CURRENT_TOKEN = "";
|
66
|
-
var CURRENT_EXPIRY = -1;
|
67
74
|
var CustomHook = class {
|
68
|
-
async getToken(clientId, clientSecret) {
|
69
|
-
const tokenUrl = "https://auth.celitech.net/oauth2/token";
|
70
|
-
const headers = {
|
71
|
-
"Content-Type": "application/x-www-form-urlencoded"
|
72
|
-
};
|
73
|
-
const body = {
|
74
|
-
client_id: clientId,
|
75
|
-
client_secret: clientSecret,
|
76
|
-
grant_type: "client_credentials"
|
77
|
-
};
|
78
|
-
const response = await fetch(tokenUrl, {
|
79
|
-
method: "POST",
|
80
|
-
headers,
|
81
|
-
body: new URLSearchParams(body)
|
82
|
-
});
|
83
|
-
return response.json();
|
84
|
-
}
|
85
75
|
async beforeRequest(request, params) {
|
86
|
-
const clientId = params.get("clientId") || "";
|
87
|
-
const clientSecret = params.get("clientSecret") || "";
|
88
|
-
if (!clientId || !clientSecret) {
|
89
|
-
throw new Error("Missing clientId and/or clientSecret constructor parameters");
|
90
|
-
}
|
91
|
-
if (!CURRENT_TOKEN || CURRENT_EXPIRY < Date.now()) {
|
92
|
-
const tokenResponse = await this.getToken(clientId, clientSecret);
|
93
|
-
if (tokenResponse.error) {
|
94
|
-
throw new Error(tokenResponse.error);
|
95
|
-
}
|
96
|
-
const { expires_in, access_token } = tokenResponse;
|
97
|
-
if (!expires_in || !access_token) {
|
98
|
-
throw new Error("There is an issue with getting the oauth token");
|
99
|
-
}
|
100
|
-
CURRENT_EXPIRY = Date.now() + expires_in * 1e3;
|
101
|
-
CURRENT_TOKEN = access_token;
|
102
|
-
}
|
103
|
-
const authorization = `Bearer ${CURRENT_TOKEN}`;
|
104
|
-
if (!request.headers) {
|
105
|
-
request.headers = /* @__PURE__ */ new Map();
|
106
|
-
}
|
107
|
-
request.headers.set("Authorization", authorization);
|
108
76
|
return request;
|
109
77
|
}
|
110
78
|
async afterResponse(request, response, params) {
|
111
79
|
return response;
|
112
80
|
}
|
113
81
|
async onError(request, response, params) {
|
114
|
-
return new
|
115
|
-
}
|
116
|
-
};
|
117
|
-
var CustomHttpError = class {
|
118
|
-
constructor(error, metadata) {
|
119
|
-
this.error = error;
|
120
|
-
this.metadata = metadata;
|
82
|
+
return new HttpError(response.metadata, response.raw);
|
121
83
|
}
|
122
84
|
};
|
123
85
|
|
@@ -294,10 +256,8 @@ var HookHandler = class {
|
|
294
256
|
}
|
295
257
|
throw await hook.onError(nextRequest, response, hookParams);
|
296
258
|
}
|
297
|
-
getHookParams(
|
259
|
+
getHookParams(_request) {
|
298
260
|
const hookParams = /* @__PURE__ */ new Map();
|
299
|
-
hookParams.set("clientId", request.config.clientId || "");
|
300
|
-
hookParams.set("clientSecret", request.config.clientSecret || "");
|
301
261
|
return hookParams;
|
302
262
|
}
|
303
263
|
};
|
@@ -524,16 +484,6 @@ var TerminatingHandler = class {
|
|
524
484
|
}
|
525
485
|
};
|
526
486
|
|
527
|
-
// src/http/error.ts
|
528
|
-
var HttpError = class extends Error {
|
529
|
-
constructor(metadata, raw, error) {
|
530
|
-
super(error);
|
531
|
-
this.error = metadata.statusText;
|
532
|
-
this.metadata = metadata;
|
533
|
-
this.raw = raw;
|
534
|
-
}
|
535
|
-
};
|
536
|
-
|
537
487
|
// src/http/handlers/retry-handler.ts
|
538
488
|
var RetryHandler = class {
|
539
489
|
async handle(request) {
|
@@ -565,6 +515,32 @@ var RetryHandler = class {
|
|
565
515
|
}
|
566
516
|
};
|
567
517
|
|
518
|
+
// src/http/handlers/oauth-handler.ts
|
519
|
+
var OAuthHandler = class {
|
520
|
+
async handle(request) {
|
521
|
+
var _a;
|
522
|
+
if (!this.next) {
|
523
|
+
throw new Error(`No next handler set in OAuthHandler`);
|
524
|
+
}
|
525
|
+
if (!request.scopes) {
|
526
|
+
return (_a = this.next) == null ? void 0 : _a.handle(request);
|
527
|
+
}
|
528
|
+
const token = await request.tokenManager.getToken(request.scopes, request.config);
|
529
|
+
if (token.accessToken) {
|
530
|
+
request.addHeaderParam("Authorization", {
|
531
|
+
key: "Authorization",
|
532
|
+
value: `Bearer ${token.accessToken}`,
|
533
|
+
explode: false,
|
534
|
+
encode: false,
|
535
|
+
style: "simple" /* SIMPLE */,
|
536
|
+
isLimit: false,
|
537
|
+
isOffset: false
|
538
|
+
});
|
539
|
+
}
|
540
|
+
return this.next.handle(request);
|
541
|
+
}
|
542
|
+
};
|
543
|
+
|
568
544
|
// src/http/client.ts
|
569
545
|
var HttpClient = class {
|
570
546
|
constructor(config, hook = new CustomHook()) {
|
@@ -572,6 +548,7 @@ var HttpClient = class {
|
|
572
548
|
this.requestHandlerChain = new RequestHandlerChain();
|
573
549
|
this.requestHandlerChain.addHandler(new ResponseValidationHandler());
|
574
550
|
this.requestHandlerChain.addHandler(new RequestValidationHandler());
|
551
|
+
this.requestHandlerChain.addHandler(new OAuthHandler());
|
575
552
|
this.requestHandlerChain.addHandler(new RetryHandler());
|
576
553
|
this.requestHandlerChain.addHandler(new HookHandler(hook));
|
577
554
|
this.requestHandlerChain.addHandler(new TerminatingHandler());
|
@@ -616,8 +593,9 @@ var HttpClient = class {
|
|
616
593
|
|
617
594
|
// src/services/base-service.ts
|
618
595
|
var BaseService = class {
|
619
|
-
constructor(config) {
|
596
|
+
constructor(config, tokenManager) {
|
620
597
|
this.config = config;
|
598
|
+
this.tokenManager = tokenManager;
|
621
599
|
this.client = new HttpClient(this.config);
|
622
600
|
}
|
623
601
|
set baseUrl(baseUrl) {
|
@@ -707,6 +685,8 @@ var Request = class {
|
|
707
685
|
this.retry = params.retry;
|
708
686
|
this.validation = params.validation;
|
709
687
|
this.pagination = params.pagination;
|
688
|
+
this.scopes = params.scopes;
|
689
|
+
this.tokenManager = params.tokenManager;
|
710
690
|
}
|
711
691
|
addHeaderParam(key, param) {
|
712
692
|
if (param.value === void 0) {
|
@@ -771,7 +751,7 @@ var Request = class {
|
|
771
751
|
return `${this.baseUrl}${path}${queryString}`;
|
772
752
|
}
|
773
753
|
copy(overrides) {
|
774
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
|
754
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
775
755
|
const createRequestParams = {
|
776
756
|
baseUrl: (_a = overrides == null ? void 0 : overrides.baseUrl) != null ? _a : this.baseUrl,
|
777
757
|
method: (_b = overrides == null ? void 0 : overrides.method) != null ? _b : this.method,
|
@@ -786,7 +766,9 @@ var Request = class {
|
|
786
766
|
requestContentType: (_k = overrides == null ? void 0 : overrides.requestContentType) != null ? _k : this.requestContentType,
|
787
767
|
responseContentType: (_l = overrides == null ? void 0 : overrides.responseContentType) != null ? _l : this.responseContentType,
|
788
768
|
retry: (_m = overrides == null ? void 0 : overrides.retry) != null ? _m : this.retry,
|
789
|
-
validation: (_n = overrides == null ? void 0 : overrides.validation) != null ? _n : this.validation
|
769
|
+
validation: (_n = overrides == null ? void 0 : overrides.validation) != null ? _n : this.validation,
|
770
|
+
scopes: (_o = overrides == null ? void 0 : overrides.scopes) != null ? _o : /* @__PURE__ */ new Set(),
|
771
|
+
tokenManager: this.tokenManager
|
790
772
|
};
|
791
773
|
return new Request({
|
792
774
|
...createRequestParams,
|
@@ -838,7 +820,7 @@ var RequestBuilder = class {
|
|
838
820
|
baseUrl: "https://api.celitech.net/v1" /* DEFAULT */,
|
839
821
|
method: "GET",
|
840
822
|
path: "",
|
841
|
-
config: {},
|
823
|
+
config: { clientId: "", clientSecret: "" },
|
842
824
|
responseSchema: import_zod2.default.any(),
|
843
825
|
requestSchema: import_zod2.default.any(),
|
844
826
|
requestContentType: "json" /* Json */,
|
@@ -852,7 +834,9 @@ var RequestBuilder = class {
|
|
852
834
|
},
|
853
835
|
pathParams: /* @__PURE__ */ new Map(),
|
854
836
|
queryParams: /* @__PURE__ */ new Map(),
|
855
|
-
headers: /* @__PURE__ */ new Map()
|
837
|
+
headers: /* @__PURE__ */ new Map(),
|
838
|
+
scopes: /* @__PURE__ */ new Set(),
|
839
|
+
tokenManager: new OAuthTokenManager()
|
856
840
|
};
|
857
841
|
}
|
858
842
|
setRetryAttempts(sdkConfig, requestConfig) {
|
@@ -920,6 +904,14 @@ var RequestBuilder = class {
|
|
920
904
|
this.params.pagination = pagination;
|
921
905
|
return this;
|
922
906
|
}
|
907
|
+
setScopes(scopes) {
|
908
|
+
this.params.scopes = new Set(scopes);
|
909
|
+
return this;
|
910
|
+
}
|
911
|
+
setTokenManager(tokenManager) {
|
912
|
+
this.params.tokenManager = tokenManager;
|
913
|
+
return this;
|
914
|
+
}
|
923
915
|
addBody(body) {
|
924
916
|
if (body !== void 0) {
|
925
917
|
this.params.body = body;
|
@@ -979,34 +971,166 @@ var RequestBuilder = class {
|
|
979
971
|
}
|
980
972
|
};
|
981
973
|
|
982
|
-
// src/services/
|
983
|
-
var import_zod4 = require("zod");
|
984
|
-
|
985
|
-
// src/services/destinations/models/destinations.ts
|
974
|
+
// src/services/o-auth/models/get-access-token-request.ts
|
986
975
|
var import_zod3 = require("zod");
|
987
|
-
var
|
976
|
+
var getAccessTokenRequest = import_zod3.z.lazy(() => {
|
988
977
|
return import_zod3.z.object({
|
989
|
-
|
990
|
-
|
991
|
-
|
978
|
+
grantType: import_zod3.z.string().optional(),
|
979
|
+
clientId: import_zod3.z.string().optional(),
|
980
|
+
clientSecret: import_zod3.z.string().optional()
|
992
981
|
});
|
993
982
|
});
|
994
|
-
var
|
983
|
+
var getAccessTokenRequestResponse = import_zod3.z.lazy(() => {
|
995
984
|
return import_zod3.z.object({
|
996
|
-
|
997
|
-
|
998
|
-
|
985
|
+
grant_type: import_zod3.z.string().optional(),
|
986
|
+
client_id: import_zod3.z.string().optional(),
|
987
|
+
client_secret: import_zod3.z.string().optional()
|
988
|
+
}).transform((data) => ({
|
989
|
+
grantType: data["grant_type"],
|
990
|
+
clientId: data["client_id"],
|
991
|
+
clientSecret: data["client_secret"]
|
992
|
+
}));
|
993
|
+
});
|
994
|
+
var getAccessTokenRequestRequest = import_zod3.z.lazy(() => {
|
995
|
+
return import_zod3.z.object({ grantType: import_zod3.z.string().nullish(), clientId: import_zod3.z.string().nullish(), clientSecret: import_zod3.z.string().nullish() }).transform((data) => ({
|
996
|
+
grant_type: data["grantType"],
|
997
|
+
client_id: data["clientId"],
|
998
|
+
client_secret: data["clientSecret"]
|
999
|
+
}));
|
1000
|
+
});
|
1001
|
+
|
1002
|
+
// src/services/o-auth/models/get-access-token-ok-response.ts
|
1003
|
+
var import_zod4 = require("zod");
|
1004
|
+
var getAccessTokenOkResponse = import_zod4.z.lazy(() => {
|
1005
|
+
return import_zod4.z.object({
|
1006
|
+
accessToken: import_zod4.z.string().optional(),
|
1007
|
+
tokenType: import_zod4.z.string().optional(),
|
1008
|
+
expiresIn: import_zod4.z.number().optional()
|
1009
|
+
});
|
1010
|
+
});
|
1011
|
+
var getAccessTokenOkResponseResponse = import_zod4.z.lazy(() => {
|
1012
|
+
return import_zod4.z.object({
|
1013
|
+
access_token: import_zod4.z.string().optional(),
|
1014
|
+
token_type: import_zod4.z.string().optional(),
|
1015
|
+
expires_in: import_zod4.z.number().optional()
|
1016
|
+
}).transform((data) => ({
|
1017
|
+
accessToken: data["access_token"],
|
1018
|
+
tokenType: data["token_type"],
|
1019
|
+
expiresIn: data["expires_in"]
|
1020
|
+
}));
|
1021
|
+
});
|
1022
|
+
var getAccessTokenOkResponseRequest = import_zod4.z.lazy(() => {
|
1023
|
+
return import_zod4.z.object({ accessToken: import_zod4.z.string().nullish(), tokenType: import_zod4.z.string().nullish(), expiresIn: import_zod4.z.number().nullish() }).transform((data) => ({
|
1024
|
+
access_token: data["accessToken"],
|
1025
|
+
token_type: data["tokenType"],
|
1026
|
+
expires_in: data["expiresIn"]
|
1027
|
+
}));
|
1028
|
+
});
|
1029
|
+
|
1030
|
+
// src/services/o-auth/o-auth.ts
|
1031
|
+
var OAuthService = class extends BaseService {
|
1032
|
+
/**
|
1033
|
+
* This endpoint was added by liblab
|
1034
|
+
* @returns {Promise<HttpResponse<GetAccessTokenOkResponse>>} Successful Response
|
1035
|
+
*/
|
1036
|
+
async getAccessToken(body, requestConfig) {
|
1037
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/oauth2/token").setRequestSchema(getAccessTokenRequestRequest).setResponseSchema(getAccessTokenOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("form" /* FormUrlEncoded */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/x-www-form-urlencoded" }).addBody(body).build();
|
1038
|
+
return this.client.call(request);
|
1039
|
+
}
|
1040
|
+
};
|
1041
|
+
|
1042
|
+
// src/services/o-auth/models/grant-type.ts
|
1043
|
+
var GrantType = /* @__PURE__ */ ((GrantType2) => {
|
1044
|
+
GrantType2["CLIENT_CREDENTIALS"] = "client_credentials";
|
1045
|
+
return GrantType2;
|
1046
|
+
})(GrantType || {});
|
1047
|
+
|
1048
|
+
// src/http/oauth/token-manager.ts
|
1049
|
+
var OAuthToken = class {
|
1050
|
+
constructor(accessToken, scopes, expiresAt) {
|
1051
|
+
this.accessToken = accessToken;
|
1052
|
+
this.scopes = scopes;
|
1053
|
+
this.expiresAt = expiresAt;
|
1054
|
+
}
|
1055
|
+
hasAllScopes(scopes) {
|
1056
|
+
for (const scope of scopes) {
|
1057
|
+
if (!this.scopes.has(scope)) {
|
1058
|
+
return false;
|
1059
|
+
}
|
1060
|
+
}
|
1061
|
+
return true;
|
1062
|
+
}
|
1063
|
+
};
|
1064
|
+
var OAuthTokenManager = class {
|
1065
|
+
constructor() {
|
1066
|
+
this.token = new OAuthToken("", /* @__PURE__ */ new Set(), null);
|
1067
|
+
}
|
1068
|
+
async getToken(scopes, config) {
|
1069
|
+
var _a, _b, _c, _d, _e;
|
1070
|
+
if ((_a = this.token) == null ? void 0 : _a.hasAllScopes(scopes)) {
|
1071
|
+
return this.token;
|
1072
|
+
}
|
1073
|
+
const updatedScopes = /* @__PURE__ */ new Set([...scopes, ...((_b = this.token) == null ? void 0 : _b.scopes) || []]);
|
1074
|
+
const oAuth = new OAuthService(
|
1075
|
+
{
|
1076
|
+
...config,
|
1077
|
+
baseUrl: "https://auth.celitech.net"
|
1078
|
+
},
|
1079
|
+
this
|
1080
|
+
);
|
1081
|
+
const response = await oAuth.getAccessToken(
|
1082
|
+
{
|
1083
|
+
grantType: "client_credentials",
|
1084
|
+
clientId: config.clientId,
|
1085
|
+
clientSecret: config.clientSecret
|
1086
|
+
},
|
1087
|
+
{}
|
1088
|
+
);
|
1089
|
+
if (!((_c = response.data) == null ? void 0 : _c.accessToken)) {
|
1090
|
+
throw new Error(
|
1091
|
+
`OAuthError: token endpoint response did not return access token. Response: ${JSON.stringify(response), void 0, 2}.`
|
1092
|
+
);
|
1093
|
+
}
|
1094
|
+
this.token = new OAuthToken(
|
1095
|
+
response.data.accessToken,
|
1096
|
+
updatedScopes,
|
1097
|
+
((_d = response.data) == null ? void 0 : _d.expiresIn) ? ((_e = response.data) == null ? void 0 : _e.expiresIn) + Math.floor(Date.now() / 1e3) : null
|
1098
|
+
);
|
1099
|
+
return this.token;
|
1100
|
+
}
|
1101
|
+
};
|
1102
|
+
|
1103
|
+
// src/services/destinations/destinations.ts
|
1104
|
+
var import_zod7 = require("zod");
|
1105
|
+
|
1106
|
+
// src/services/destinations/models/list-destinations-ok-response.ts
|
1107
|
+
var import_zod6 = require("zod");
|
1108
|
+
|
1109
|
+
// src/services/destinations/models/destinations.ts
|
1110
|
+
var import_zod5 = require("zod");
|
1111
|
+
var destinations = import_zod5.z.lazy(() => {
|
1112
|
+
return import_zod5.z.object({
|
1113
|
+
name: import_zod5.z.string().optional(),
|
1114
|
+
destination: import_zod5.z.string().optional(),
|
1115
|
+
supportedCountries: import_zod5.z.array(import_zod5.z.string()).optional()
|
1116
|
+
});
|
1117
|
+
});
|
1118
|
+
var destinationsResponse = import_zod5.z.lazy(() => {
|
1119
|
+
return import_zod5.z.object({
|
1120
|
+
name: import_zod5.z.string().optional(),
|
1121
|
+
destination: import_zod5.z.string().optional(),
|
1122
|
+
supportedCountries: import_zod5.z.array(import_zod5.z.string()).optional()
|
999
1123
|
}).transform((data) => ({
|
1000
1124
|
name: data["name"],
|
1001
1125
|
destination: data["destination"],
|
1002
1126
|
supportedCountries: data["supportedCountries"]
|
1003
1127
|
}));
|
1004
1128
|
});
|
1005
|
-
var destinationsRequest =
|
1006
|
-
return
|
1007
|
-
name:
|
1008
|
-
destination:
|
1009
|
-
supportedCountries:
|
1129
|
+
var destinationsRequest = import_zod5.z.lazy(() => {
|
1130
|
+
return import_zod5.z.object({
|
1131
|
+
name: import_zod5.z.string().nullish(),
|
1132
|
+
destination: import_zod5.z.string().nullish(),
|
1133
|
+
supportedCountries: import_zod5.z.array(import_zod5.z.string()).nullish()
|
1010
1134
|
}).transform((data) => ({
|
1011
1135
|
name: data["name"],
|
1012
1136
|
destination: data["destination"],
|
@@ -1015,20 +1139,20 @@ var destinationsRequest = import_zod3.z.lazy(() => {
|
|
1015
1139
|
});
|
1016
1140
|
|
1017
1141
|
// src/services/destinations/models/list-destinations-ok-response.ts
|
1018
|
-
var listDestinationsOkResponse =
|
1019
|
-
return
|
1020
|
-
destinations:
|
1142
|
+
var listDestinationsOkResponse = import_zod6.z.lazy(() => {
|
1143
|
+
return import_zod6.z.object({
|
1144
|
+
destinations: import_zod6.z.array(destinations).optional()
|
1021
1145
|
});
|
1022
1146
|
});
|
1023
|
-
var listDestinationsOkResponseResponse =
|
1024
|
-
return
|
1025
|
-
destinations:
|
1147
|
+
var listDestinationsOkResponseResponse = import_zod6.z.lazy(() => {
|
1148
|
+
return import_zod6.z.object({
|
1149
|
+
destinations: import_zod6.z.array(destinationsResponse).optional()
|
1026
1150
|
}).transform((data) => ({
|
1027
1151
|
destinations: data["destinations"]
|
1028
1152
|
}));
|
1029
1153
|
});
|
1030
|
-
var listDestinationsOkResponseRequest =
|
1031
|
-
return
|
1154
|
+
var listDestinationsOkResponseRequest = import_zod6.z.lazy(() => {
|
1155
|
+
return import_zod6.z.object({ destinations: import_zod6.z.array(destinationsRequest).nullish() }).transform((data) => ({
|
1032
1156
|
destinations: data["destinations"]
|
1033
1157
|
}));
|
1034
1158
|
});
|
@@ -1040,37 +1164,37 @@ var DestinationsService = class extends BaseService {
|
|
1040
1164
|
* @returns {Promise<HttpResponse<ListDestinationsOkResponse>>} Successful Response
|
1041
1165
|
*/
|
1042
1166
|
async listDestinations(requestConfig) {
|
1043
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/destinations").setRequestSchema(
|
1167
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/destinations").setRequestSchema(import_zod7.z.any()).setResponseSchema(listDestinationsOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).build();
|
1044
1168
|
return this.client.call(request);
|
1045
1169
|
}
|
1046
1170
|
};
|
1047
1171
|
|
1048
1172
|
// src/services/packages/packages.ts
|
1049
|
-
var
|
1173
|
+
var import_zod10 = require("zod");
|
1050
1174
|
|
1051
1175
|
// src/services/packages/models/list-packages-ok-response.ts
|
1052
|
-
var
|
1176
|
+
var import_zod9 = require("zod");
|
1053
1177
|
|
1054
1178
|
// src/services/packages/models/packages.ts
|
1055
|
-
var
|
1056
|
-
var packages =
|
1057
|
-
return
|
1058
|
-
id:
|
1059
|
-
destination:
|
1060
|
-
dataLimitInBytes:
|
1061
|
-
minDays:
|
1062
|
-
maxDays:
|
1063
|
-
priceInCents:
|
1179
|
+
var import_zod8 = require("zod");
|
1180
|
+
var packages = import_zod8.z.lazy(() => {
|
1181
|
+
return import_zod8.z.object({
|
1182
|
+
id: import_zod8.z.string().optional(),
|
1183
|
+
destination: import_zod8.z.string().optional(),
|
1184
|
+
dataLimitInBytes: import_zod8.z.number().optional(),
|
1185
|
+
minDays: import_zod8.z.number().optional(),
|
1186
|
+
maxDays: import_zod8.z.number().optional(),
|
1187
|
+
priceInCents: import_zod8.z.number().optional()
|
1064
1188
|
});
|
1065
1189
|
});
|
1066
|
-
var packagesResponse =
|
1067
|
-
return
|
1068
|
-
id:
|
1069
|
-
destination:
|
1070
|
-
dataLimitInBytes:
|
1071
|
-
minDays:
|
1072
|
-
maxDays:
|
1073
|
-
priceInCents:
|
1190
|
+
var packagesResponse = import_zod8.z.lazy(() => {
|
1191
|
+
return import_zod8.z.object({
|
1192
|
+
id: import_zod8.z.string().optional(),
|
1193
|
+
destination: import_zod8.z.string().optional(),
|
1194
|
+
dataLimitInBytes: import_zod8.z.number().optional(),
|
1195
|
+
minDays: import_zod8.z.number().optional(),
|
1196
|
+
maxDays: import_zod8.z.number().optional(),
|
1197
|
+
priceInCents: import_zod8.z.number().optional()
|
1074
1198
|
}).transform((data) => ({
|
1075
1199
|
id: data["id"],
|
1076
1200
|
destination: data["destination"],
|
@@ -1080,14 +1204,14 @@ var packagesResponse = import_zod6.z.lazy(() => {
|
|
1080
1204
|
priceInCents: data["priceInCents"]
|
1081
1205
|
}));
|
1082
1206
|
});
|
1083
|
-
var packagesRequest =
|
1084
|
-
return
|
1085
|
-
id:
|
1086
|
-
destination:
|
1087
|
-
dataLimitInBytes:
|
1088
|
-
minDays:
|
1089
|
-
maxDays:
|
1090
|
-
priceInCents:
|
1207
|
+
var packagesRequest = import_zod8.z.lazy(() => {
|
1208
|
+
return import_zod8.z.object({
|
1209
|
+
id: import_zod8.z.string().nullish(),
|
1210
|
+
destination: import_zod8.z.string().nullish(),
|
1211
|
+
dataLimitInBytes: import_zod8.z.number().nullish(),
|
1212
|
+
minDays: import_zod8.z.number().nullish(),
|
1213
|
+
maxDays: import_zod8.z.number().nullish(),
|
1214
|
+
priceInCents: import_zod8.z.number().nullish()
|
1091
1215
|
}).transform((data) => ({
|
1092
1216
|
id: data["id"],
|
1093
1217
|
destination: data["destination"],
|
@@ -1099,23 +1223,23 @@ var packagesRequest = import_zod6.z.lazy(() => {
|
|
1099
1223
|
});
|
1100
1224
|
|
1101
1225
|
// src/services/packages/models/list-packages-ok-response.ts
|
1102
|
-
var listPackagesOkResponse =
|
1103
|
-
return
|
1104
|
-
packages:
|
1105
|
-
afterCursor:
|
1226
|
+
var listPackagesOkResponse = import_zod9.z.lazy(() => {
|
1227
|
+
return import_zod9.z.object({
|
1228
|
+
packages: import_zod9.z.array(packages).optional(),
|
1229
|
+
afterCursor: import_zod9.z.string().optional().nullable()
|
1106
1230
|
});
|
1107
1231
|
});
|
1108
|
-
var listPackagesOkResponseResponse =
|
1109
|
-
return
|
1110
|
-
packages:
|
1111
|
-
afterCursor:
|
1232
|
+
var listPackagesOkResponseResponse = import_zod9.z.lazy(() => {
|
1233
|
+
return import_zod9.z.object({
|
1234
|
+
packages: import_zod9.z.array(packagesResponse).optional(),
|
1235
|
+
afterCursor: import_zod9.z.string().optional().nullable()
|
1112
1236
|
}).transform((data) => ({
|
1113
1237
|
packages: data["packages"],
|
1114
1238
|
afterCursor: data["afterCursor"]
|
1115
1239
|
}));
|
1116
1240
|
});
|
1117
|
-
var listPackagesOkResponseRequest =
|
1118
|
-
return
|
1241
|
+
var listPackagesOkResponseRequest = import_zod9.z.lazy(() => {
|
1242
|
+
return import_zod9.z.object({ packages: import_zod9.z.array(packagesRequest).nullish(), afterCursor: import_zod9.z.string().nullish() }).transform((data) => ({
|
1119
1243
|
packages: data["packages"],
|
1120
1244
|
afterCursor: data["afterCursor"]
|
1121
1245
|
}));
|
@@ -1136,7 +1260,7 @@ var PackagesService = class extends BaseService {
|
|
1136
1260
|
* @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
|
1137
1261
|
*/
|
1138
1262
|
async listPackages(params, requestConfig) {
|
1139
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/packages").setRequestSchema(
|
1263
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/packages").setRequestSchema(import_zod10.z.any()).setResponseSchema(listPackagesOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
1140
1264
|
key: "destination",
|
1141
1265
|
value: params == null ? void 0 : params.destination
|
1142
1266
|
}).addQueryParam({
|
@@ -1166,32 +1290,32 @@ var PackagesService = class extends BaseService {
|
|
1166
1290
|
};
|
1167
1291
|
|
1168
1292
|
// src/services/purchases/purchases.ts
|
1169
|
-
var
|
1293
|
+
var import_zod26 = require("zod");
|
1170
1294
|
|
1171
1295
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
1172
|
-
var
|
1296
|
+
var import_zod14 = require("zod");
|
1173
1297
|
|
1174
1298
|
// src/services/purchases/models/purchases.ts
|
1175
|
-
var
|
1299
|
+
var import_zod13 = require("zod");
|
1176
1300
|
|
1177
1301
|
// src/services/purchases/models/package_.ts
|
1178
|
-
var
|
1179
|
-
var package_ =
|
1180
|
-
return
|
1181
|
-
id:
|
1182
|
-
dataLimitInBytes:
|
1183
|
-
destination:
|
1184
|
-
destinationName:
|
1185
|
-
priceInCents:
|
1302
|
+
var import_zod11 = require("zod");
|
1303
|
+
var package_ = import_zod11.z.lazy(() => {
|
1304
|
+
return import_zod11.z.object({
|
1305
|
+
id: import_zod11.z.string().optional(),
|
1306
|
+
dataLimitInBytes: import_zod11.z.number().optional(),
|
1307
|
+
destination: import_zod11.z.string().optional(),
|
1308
|
+
destinationName: import_zod11.z.string().optional(),
|
1309
|
+
priceInCents: import_zod11.z.number().optional()
|
1186
1310
|
});
|
1187
1311
|
});
|
1188
|
-
var packageResponse =
|
1189
|
-
return
|
1190
|
-
id:
|
1191
|
-
dataLimitInBytes:
|
1192
|
-
destination:
|
1193
|
-
destinationName:
|
1194
|
-
priceInCents:
|
1312
|
+
var packageResponse = import_zod11.z.lazy(() => {
|
1313
|
+
return import_zod11.z.object({
|
1314
|
+
id: import_zod11.z.string().optional(),
|
1315
|
+
dataLimitInBytes: import_zod11.z.number().optional(),
|
1316
|
+
destination: import_zod11.z.string().optional(),
|
1317
|
+
destinationName: import_zod11.z.string().optional(),
|
1318
|
+
priceInCents: import_zod11.z.number().optional()
|
1195
1319
|
}).transform((data) => ({
|
1196
1320
|
id: data["id"],
|
1197
1321
|
dataLimitInBytes: data["dataLimitInBytes"],
|
@@ -1200,13 +1324,13 @@ var packageResponse = import_zod9.z.lazy(() => {
|
|
1200
1324
|
priceInCents: data["priceInCents"]
|
1201
1325
|
}));
|
1202
1326
|
});
|
1203
|
-
var packageRequest =
|
1204
|
-
return
|
1205
|
-
id:
|
1206
|
-
dataLimitInBytes:
|
1207
|
-
destination:
|
1208
|
-
destinationName:
|
1209
|
-
priceInCents:
|
1327
|
+
var packageRequest = import_zod11.z.lazy(() => {
|
1328
|
+
return import_zod11.z.object({
|
1329
|
+
id: import_zod11.z.string().nullish(),
|
1330
|
+
dataLimitInBytes: import_zod11.z.number().nullish(),
|
1331
|
+
destination: import_zod11.z.string().nullish(),
|
1332
|
+
destinationName: import_zod11.z.string().nullish(),
|
1333
|
+
priceInCents: import_zod11.z.number().nullish()
|
1210
1334
|
}).transform((data) => ({
|
1211
1335
|
id: data["id"],
|
1212
1336
|
dataLimitInBytes: data["dataLimitInBytes"],
|
@@ -1217,54 +1341,54 @@ var packageRequest = import_zod9.z.lazy(() => {
|
|
1217
1341
|
});
|
1218
1342
|
|
1219
1343
|
// src/services/purchases/models/purchases-esim.ts
|
1220
|
-
var
|
1221
|
-
var purchasesEsim =
|
1222
|
-
return
|
1223
|
-
iccid:
|
1344
|
+
var import_zod12 = require("zod");
|
1345
|
+
var purchasesEsim = import_zod12.z.lazy(() => {
|
1346
|
+
return import_zod12.z.object({
|
1347
|
+
iccid: import_zod12.z.string().min(18).max(22).optional()
|
1224
1348
|
});
|
1225
1349
|
});
|
1226
|
-
var purchasesEsimResponse =
|
1227
|
-
return
|
1228
|
-
iccid:
|
1350
|
+
var purchasesEsimResponse = import_zod12.z.lazy(() => {
|
1351
|
+
return import_zod12.z.object({
|
1352
|
+
iccid: import_zod12.z.string().min(18).max(22).optional()
|
1229
1353
|
}).transform((data) => ({
|
1230
1354
|
iccid: data["iccid"]
|
1231
1355
|
}));
|
1232
1356
|
});
|
1233
|
-
var purchasesEsimRequest =
|
1234
|
-
return
|
1357
|
+
var purchasesEsimRequest = import_zod12.z.lazy(() => {
|
1358
|
+
return import_zod12.z.object({ iccid: import_zod12.z.string().nullish() }).transform((data) => ({
|
1235
1359
|
iccid: data["iccid"]
|
1236
1360
|
}));
|
1237
1361
|
});
|
1238
1362
|
|
1239
1363
|
// src/services/purchases/models/purchases.ts
|
1240
|
-
var purchases =
|
1241
|
-
return
|
1242
|
-
id:
|
1243
|
-
startDate:
|
1244
|
-
endDate:
|
1245
|
-
createdDate:
|
1246
|
-
startTime:
|
1247
|
-
endTime:
|
1248
|
-
createdAt:
|
1364
|
+
var purchases = import_zod13.z.lazy(() => {
|
1365
|
+
return import_zod13.z.object({
|
1366
|
+
id: import_zod13.z.string().optional(),
|
1367
|
+
startDate: import_zod13.z.string().optional(),
|
1368
|
+
endDate: import_zod13.z.string().optional(),
|
1369
|
+
createdDate: import_zod13.z.string().optional(),
|
1370
|
+
startTime: import_zod13.z.number().optional(),
|
1371
|
+
endTime: import_zod13.z.number().optional(),
|
1372
|
+
createdAt: import_zod13.z.number().optional(),
|
1249
1373
|
package: package_.optional(),
|
1250
1374
|
esim: purchasesEsim.optional(),
|
1251
|
-
source:
|
1252
|
-
referenceId:
|
1375
|
+
source: import_zod13.z.string().optional(),
|
1376
|
+
referenceId: import_zod13.z.string().optional()
|
1253
1377
|
});
|
1254
1378
|
});
|
1255
|
-
var purchasesResponse =
|
1256
|
-
return
|
1257
|
-
id:
|
1258
|
-
startDate:
|
1259
|
-
endDate:
|
1260
|
-
createdDate:
|
1261
|
-
startTime:
|
1262
|
-
endTime:
|
1263
|
-
createdAt:
|
1379
|
+
var purchasesResponse = import_zod13.z.lazy(() => {
|
1380
|
+
return import_zod13.z.object({
|
1381
|
+
id: import_zod13.z.string().optional(),
|
1382
|
+
startDate: import_zod13.z.string().optional(),
|
1383
|
+
endDate: import_zod13.z.string().optional(),
|
1384
|
+
createdDate: import_zod13.z.string().optional(),
|
1385
|
+
startTime: import_zod13.z.number().optional(),
|
1386
|
+
endTime: import_zod13.z.number().optional(),
|
1387
|
+
createdAt: import_zod13.z.number().optional(),
|
1264
1388
|
package: packageResponse.optional(),
|
1265
1389
|
esim: purchasesEsimResponse.optional(),
|
1266
|
-
source:
|
1267
|
-
referenceId:
|
1390
|
+
source: import_zod13.z.string().optional(),
|
1391
|
+
referenceId: import_zod13.z.string().optional()
|
1268
1392
|
}).transform((data) => ({
|
1269
1393
|
id: data["id"],
|
1270
1394
|
startDate: data["startDate"],
|
@@ -1279,19 +1403,19 @@ var purchasesResponse = import_zod11.z.lazy(() => {
|
|
1279
1403
|
referenceId: data["referenceId"]
|
1280
1404
|
}));
|
1281
1405
|
});
|
1282
|
-
var purchasesRequest =
|
1283
|
-
return
|
1284
|
-
id:
|
1285
|
-
startDate:
|
1286
|
-
endDate:
|
1287
|
-
createdDate:
|
1288
|
-
startTime:
|
1289
|
-
endTime:
|
1290
|
-
createdAt:
|
1406
|
+
var purchasesRequest = import_zod13.z.lazy(() => {
|
1407
|
+
return import_zod13.z.object({
|
1408
|
+
id: import_zod13.z.string().nullish(),
|
1409
|
+
startDate: import_zod13.z.string().nullish(),
|
1410
|
+
endDate: import_zod13.z.string().nullish(),
|
1411
|
+
createdDate: import_zod13.z.string().nullish(),
|
1412
|
+
startTime: import_zod13.z.number().nullish(),
|
1413
|
+
endTime: import_zod13.z.number().nullish(),
|
1414
|
+
createdAt: import_zod13.z.number().nullish(),
|
1291
1415
|
package: packageRequest.nullish(),
|
1292
1416
|
esim: purchasesEsimRequest.nullish(),
|
1293
|
-
source:
|
1294
|
-
referenceId:
|
1417
|
+
source: import_zod13.z.string().nullish(),
|
1418
|
+
referenceId: import_zod13.z.string().nullish()
|
1295
1419
|
}).transform((data) => ({
|
1296
1420
|
id: data["id"],
|
1297
1421
|
startDate: data["startDate"],
|
@@ -1308,54 +1432,54 @@ var purchasesRequest = import_zod11.z.lazy(() => {
|
|
1308
1432
|
});
|
1309
1433
|
|
1310
1434
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
1311
|
-
var listPurchasesOkResponse =
|
1312
|
-
return
|
1313
|
-
purchases:
|
1314
|
-
afterCursor:
|
1435
|
+
var listPurchasesOkResponse = import_zod14.z.lazy(() => {
|
1436
|
+
return import_zod14.z.object({
|
1437
|
+
purchases: import_zod14.z.array(purchases).optional(),
|
1438
|
+
afterCursor: import_zod14.z.string().optional().nullable()
|
1315
1439
|
});
|
1316
1440
|
});
|
1317
|
-
var listPurchasesOkResponseResponse =
|
1318
|
-
return
|
1319
|
-
purchases:
|
1320
|
-
afterCursor:
|
1441
|
+
var listPurchasesOkResponseResponse = import_zod14.z.lazy(() => {
|
1442
|
+
return import_zod14.z.object({
|
1443
|
+
purchases: import_zod14.z.array(purchasesResponse).optional(),
|
1444
|
+
afterCursor: import_zod14.z.string().optional().nullable()
|
1321
1445
|
}).transform((data) => ({
|
1322
1446
|
purchases: data["purchases"],
|
1323
1447
|
afterCursor: data["afterCursor"]
|
1324
1448
|
}));
|
1325
1449
|
});
|
1326
|
-
var listPurchasesOkResponseRequest =
|
1327
|
-
return
|
1450
|
+
var listPurchasesOkResponseRequest = import_zod14.z.lazy(() => {
|
1451
|
+
return import_zod14.z.object({ purchases: import_zod14.z.array(purchasesRequest).nullish(), afterCursor: import_zod14.z.string().nullish() }).transform((data) => ({
|
1328
1452
|
purchases: data["purchases"],
|
1329
1453
|
afterCursor: data["afterCursor"]
|
1330
1454
|
}));
|
1331
1455
|
});
|
1332
1456
|
|
1333
1457
|
// src/services/purchases/models/create-purchase-request.ts
|
1334
|
-
var
|
1335
|
-
var createPurchaseRequest =
|
1336
|
-
return
|
1337
|
-
destination:
|
1338
|
-
dataLimitInGb:
|
1339
|
-
startDate:
|
1340
|
-
endDate:
|
1341
|
-
email:
|
1342
|
-
referenceId:
|
1343
|
-
networkBrand:
|
1344
|
-
startTime:
|
1345
|
-
endTime:
|
1458
|
+
var import_zod15 = require("zod");
|
1459
|
+
var createPurchaseRequest = import_zod15.z.lazy(() => {
|
1460
|
+
return import_zod15.z.object({
|
1461
|
+
destination: import_zod15.z.string(),
|
1462
|
+
dataLimitInGb: import_zod15.z.number(),
|
1463
|
+
startDate: import_zod15.z.string(),
|
1464
|
+
endDate: import_zod15.z.string(),
|
1465
|
+
email: import_zod15.z.string().optional(),
|
1466
|
+
referenceId: import_zod15.z.string().optional(),
|
1467
|
+
networkBrand: import_zod15.z.string().optional(),
|
1468
|
+
startTime: import_zod15.z.number().optional(),
|
1469
|
+
endTime: import_zod15.z.number().optional()
|
1346
1470
|
});
|
1347
1471
|
});
|
1348
|
-
var createPurchaseRequestResponse =
|
1349
|
-
return
|
1350
|
-
destination:
|
1351
|
-
dataLimitInGB:
|
1352
|
-
startDate:
|
1353
|
-
endDate:
|
1354
|
-
email:
|
1355
|
-
referenceId:
|
1356
|
-
networkBrand:
|
1357
|
-
startTime:
|
1358
|
-
endTime:
|
1472
|
+
var createPurchaseRequestResponse = import_zod15.z.lazy(() => {
|
1473
|
+
return import_zod15.z.object({
|
1474
|
+
destination: import_zod15.z.string(),
|
1475
|
+
dataLimitInGB: import_zod15.z.number(),
|
1476
|
+
startDate: import_zod15.z.string(),
|
1477
|
+
endDate: import_zod15.z.string(),
|
1478
|
+
email: import_zod15.z.string().optional(),
|
1479
|
+
referenceId: import_zod15.z.string().optional(),
|
1480
|
+
networkBrand: import_zod15.z.string().optional(),
|
1481
|
+
startTime: import_zod15.z.number().optional(),
|
1482
|
+
endTime: import_zod15.z.number().optional()
|
1359
1483
|
}).transform((data) => ({
|
1360
1484
|
destination: data["destination"],
|
1361
1485
|
dataLimitInGb: data["dataLimitInGB"],
|
@@ -1368,17 +1492,17 @@ var createPurchaseRequestResponse = import_zod13.z.lazy(() => {
|
|
1368
1492
|
endTime: data["endTime"]
|
1369
1493
|
}));
|
1370
1494
|
});
|
1371
|
-
var createPurchaseRequestRequest =
|
1372
|
-
return
|
1373
|
-
destination:
|
1374
|
-
dataLimitInGb:
|
1375
|
-
startDate:
|
1376
|
-
endDate:
|
1377
|
-
email:
|
1378
|
-
referenceId:
|
1379
|
-
networkBrand:
|
1380
|
-
startTime:
|
1381
|
-
endTime:
|
1495
|
+
var createPurchaseRequestRequest = import_zod15.z.lazy(() => {
|
1496
|
+
return import_zod15.z.object({
|
1497
|
+
destination: import_zod15.z.string().nullish(),
|
1498
|
+
dataLimitInGb: import_zod15.z.number().nullish(),
|
1499
|
+
startDate: import_zod15.z.string().nullish(),
|
1500
|
+
endDate: import_zod15.z.string().nullish(),
|
1501
|
+
email: import_zod15.z.string().nullish(),
|
1502
|
+
referenceId: import_zod15.z.string().nullish(),
|
1503
|
+
networkBrand: import_zod15.z.string().nullish(),
|
1504
|
+
startTime: import_zod15.z.number().nullish(),
|
1505
|
+
endTime: import_zod15.z.number().nullish()
|
1382
1506
|
}).transform((data) => ({
|
1383
1507
|
destination: data["destination"],
|
1384
1508
|
dataLimitInGB: data["dataLimitInGb"],
|
@@ -1393,30 +1517,30 @@ var createPurchaseRequestRequest = import_zod13.z.lazy(() => {
|
|
1393
1517
|
});
|
1394
1518
|
|
1395
1519
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
1396
|
-
var
|
1520
|
+
var import_zod18 = require("zod");
|
1397
1521
|
|
1398
1522
|
// src/services/purchases/models/create-purchase-ok-response-purchase.ts
|
1399
|
-
var
|
1400
|
-
var createPurchaseOkResponsePurchase =
|
1401
|
-
return
|
1402
|
-
id:
|
1403
|
-
packageId:
|
1404
|
-
startDate:
|
1405
|
-
endDate:
|
1406
|
-
createdDate:
|
1407
|
-
startTime:
|
1408
|
-
endTime:
|
1523
|
+
var import_zod16 = require("zod");
|
1524
|
+
var createPurchaseOkResponsePurchase = import_zod16.z.lazy(() => {
|
1525
|
+
return import_zod16.z.object({
|
1526
|
+
id: import_zod16.z.string().optional(),
|
1527
|
+
packageId: import_zod16.z.string().optional(),
|
1528
|
+
startDate: import_zod16.z.string().optional(),
|
1529
|
+
endDate: import_zod16.z.string().optional(),
|
1530
|
+
createdDate: import_zod16.z.string().optional(),
|
1531
|
+
startTime: import_zod16.z.number().optional(),
|
1532
|
+
endTime: import_zod16.z.number().optional()
|
1409
1533
|
});
|
1410
1534
|
});
|
1411
|
-
var createPurchaseOkResponsePurchaseResponse =
|
1412
|
-
return
|
1413
|
-
id:
|
1414
|
-
packageId:
|
1415
|
-
startDate:
|
1416
|
-
endDate:
|
1417
|
-
createdDate:
|
1418
|
-
startTime:
|
1419
|
-
endTime:
|
1535
|
+
var createPurchaseOkResponsePurchaseResponse = import_zod16.z.lazy(() => {
|
1536
|
+
return import_zod16.z.object({
|
1537
|
+
id: import_zod16.z.string().optional(),
|
1538
|
+
packageId: import_zod16.z.string().optional(),
|
1539
|
+
startDate: import_zod16.z.string().optional(),
|
1540
|
+
endDate: import_zod16.z.string().optional(),
|
1541
|
+
createdDate: import_zod16.z.string().optional(),
|
1542
|
+
startTime: import_zod16.z.number().optional(),
|
1543
|
+
endTime: import_zod16.z.number().optional()
|
1420
1544
|
}).transform((data) => ({
|
1421
1545
|
id: data["id"],
|
1422
1546
|
packageId: data["packageId"],
|
@@ -1427,15 +1551,15 @@ var createPurchaseOkResponsePurchaseResponse = import_zod14.z.lazy(() => {
|
|
1427
1551
|
endTime: data["endTime"]
|
1428
1552
|
}));
|
1429
1553
|
});
|
1430
|
-
var createPurchaseOkResponsePurchaseRequest =
|
1431
|
-
return
|
1432
|
-
id:
|
1433
|
-
packageId:
|
1434
|
-
startDate:
|
1435
|
-
endDate:
|
1436
|
-
createdDate:
|
1437
|
-
startTime:
|
1438
|
-
endTime:
|
1554
|
+
var createPurchaseOkResponsePurchaseRequest = import_zod16.z.lazy(() => {
|
1555
|
+
return import_zod16.z.object({
|
1556
|
+
id: import_zod16.z.string().nullish(),
|
1557
|
+
packageId: import_zod16.z.string().nullish(),
|
1558
|
+
startDate: import_zod16.z.string().nullish(),
|
1559
|
+
endDate: import_zod16.z.string().nullish(),
|
1560
|
+
createdDate: import_zod16.z.string().nullish(),
|
1561
|
+
startTime: import_zod16.z.number().nullish(),
|
1562
|
+
endTime: import_zod16.z.number().nullish()
|
1439
1563
|
}).transform((data) => ({
|
1440
1564
|
id: data["id"],
|
1441
1565
|
packageId: data["packageId"],
|
@@ -1448,30 +1572,30 @@ var createPurchaseOkResponsePurchaseRequest = import_zod14.z.lazy(() => {
|
|
1448
1572
|
});
|
1449
1573
|
|
1450
1574
|
// src/services/purchases/models/create-purchase-ok-response-profile.ts
|
1451
|
-
var
|
1452
|
-
var createPurchaseOkResponseProfile =
|
1453
|
-
return
|
1454
|
-
iccid:
|
1455
|
-
activationCode:
|
1456
|
-
manualActivationCode:
|
1575
|
+
var import_zod17 = require("zod");
|
1576
|
+
var createPurchaseOkResponseProfile = import_zod17.z.lazy(() => {
|
1577
|
+
return import_zod17.z.object({
|
1578
|
+
iccid: import_zod17.z.string().min(18).max(22).optional(),
|
1579
|
+
activationCode: import_zod17.z.string().min(1e3).max(8e3).optional(),
|
1580
|
+
manualActivationCode: import_zod17.z.string().optional()
|
1457
1581
|
});
|
1458
1582
|
});
|
1459
|
-
var createPurchaseOkResponseProfileResponse =
|
1460
|
-
return
|
1461
|
-
iccid:
|
1462
|
-
activationCode:
|
1463
|
-
manualActivationCode:
|
1583
|
+
var createPurchaseOkResponseProfileResponse = import_zod17.z.lazy(() => {
|
1584
|
+
return import_zod17.z.object({
|
1585
|
+
iccid: import_zod17.z.string().min(18).max(22).optional(),
|
1586
|
+
activationCode: import_zod17.z.string().min(1e3).max(8e3).optional(),
|
1587
|
+
manualActivationCode: import_zod17.z.string().optional()
|
1464
1588
|
}).transform((data) => ({
|
1465
1589
|
iccid: data["iccid"],
|
1466
1590
|
activationCode: data["activationCode"],
|
1467
1591
|
manualActivationCode: data["manualActivationCode"]
|
1468
1592
|
}));
|
1469
1593
|
});
|
1470
|
-
var createPurchaseOkResponseProfileRequest =
|
1471
|
-
return
|
1472
|
-
iccid:
|
1473
|
-
activationCode:
|
1474
|
-
manualActivationCode:
|
1594
|
+
var createPurchaseOkResponseProfileRequest = import_zod17.z.lazy(() => {
|
1595
|
+
return import_zod17.z.object({
|
1596
|
+
iccid: import_zod17.z.string().nullish(),
|
1597
|
+
activationCode: import_zod17.z.string().nullish(),
|
1598
|
+
manualActivationCode: import_zod17.z.string().nullish()
|
1475
1599
|
}).transform((data) => ({
|
1476
1600
|
iccid: data["iccid"],
|
1477
1601
|
activationCode: data["activationCode"],
|
@@ -1480,14 +1604,14 @@ var createPurchaseOkResponseProfileRequest = import_zod15.z.lazy(() => {
|
|
1480
1604
|
});
|
1481
1605
|
|
1482
1606
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
1483
|
-
var createPurchaseOkResponse =
|
1484
|
-
return
|
1607
|
+
var createPurchaseOkResponse = import_zod18.z.lazy(() => {
|
1608
|
+
return import_zod18.z.object({
|
1485
1609
|
purchase: createPurchaseOkResponsePurchase.optional(),
|
1486
1610
|
profile: createPurchaseOkResponseProfile.optional()
|
1487
1611
|
});
|
1488
1612
|
});
|
1489
|
-
var createPurchaseOkResponseResponse =
|
1490
|
-
return
|
1613
|
+
var createPurchaseOkResponseResponse = import_zod18.z.lazy(() => {
|
1614
|
+
return import_zod18.z.object({
|
1491
1615
|
purchase: createPurchaseOkResponsePurchaseResponse.optional(),
|
1492
1616
|
profile: createPurchaseOkResponseProfileResponse.optional()
|
1493
1617
|
}).transform((data) => ({
|
@@ -1495,8 +1619,8 @@ var createPurchaseOkResponseResponse = import_zod16.z.lazy(() => {
|
|
1495
1619
|
profile: data["profile"]
|
1496
1620
|
}));
|
1497
1621
|
});
|
1498
|
-
var createPurchaseOkResponseRequest =
|
1499
|
-
return
|
1622
|
+
var createPurchaseOkResponseRequest = import_zod18.z.lazy(() => {
|
1623
|
+
return import_zod18.z.object({
|
1500
1624
|
purchase: createPurchaseOkResponsePurchaseRequest.nullish(),
|
1501
1625
|
profile: createPurchaseOkResponseProfileRequest.nullish()
|
1502
1626
|
}).transform((data) => ({
|
@@ -1506,29 +1630,29 @@ var createPurchaseOkResponseRequest = import_zod16.z.lazy(() => {
|
|
1506
1630
|
});
|
1507
1631
|
|
1508
1632
|
// src/services/purchases/models/top-up-esim-request.ts
|
1509
|
-
var
|
1510
|
-
var topUpEsimRequest =
|
1511
|
-
return
|
1512
|
-
iccid:
|
1513
|
-
dataLimitInGb:
|
1514
|
-
startDate:
|
1515
|
-
endDate:
|
1516
|
-
email:
|
1517
|
-
referenceId:
|
1518
|
-
startTime:
|
1519
|
-
endTime:
|
1633
|
+
var import_zod19 = require("zod");
|
1634
|
+
var topUpEsimRequest = import_zod19.z.lazy(() => {
|
1635
|
+
return import_zod19.z.object({
|
1636
|
+
iccid: import_zod19.z.string().min(18).max(22),
|
1637
|
+
dataLimitInGb: import_zod19.z.number(),
|
1638
|
+
startDate: import_zod19.z.string(),
|
1639
|
+
endDate: import_zod19.z.string(),
|
1640
|
+
email: import_zod19.z.string().optional(),
|
1641
|
+
referenceId: import_zod19.z.string().optional(),
|
1642
|
+
startTime: import_zod19.z.number().optional(),
|
1643
|
+
endTime: import_zod19.z.number().optional()
|
1520
1644
|
});
|
1521
1645
|
});
|
1522
|
-
var topUpEsimRequestResponse =
|
1523
|
-
return
|
1524
|
-
iccid:
|
1525
|
-
dataLimitInGB:
|
1526
|
-
startDate:
|
1527
|
-
endDate:
|
1528
|
-
email:
|
1529
|
-
referenceId:
|
1530
|
-
startTime:
|
1531
|
-
endTime:
|
1646
|
+
var topUpEsimRequestResponse = import_zod19.z.lazy(() => {
|
1647
|
+
return import_zod19.z.object({
|
1648
|
+
iccid: import_zod19.z.string().min(18).max(22),
|
1649
|
+
dataLimitInGB: import_zod19.z.number(),
|
1650
|
+
startDate: import_zod19.z.string(),
|
1651
|
+
endDate: import_zod19.z.string(),
|
1652
|
+
email: import_zod19.z.string().optional(),
|
1653
|
+
referenceId: import_zod19.z.string().optional(),
|
1654
|
+
startTime: import_zod19.z.number().optional(),
|
1655
|
+
endTime: import_zod19.z.number().optional()
|
1532
1656
|
}).transform((data) => ({
|
1533
1657
|
iccid: data["iccid"],
|
1534
1658
|
dataLimitInGb: data["dataLimitInGB"],
|
@@ -1540,16 +1664,16 @@ var topUpEsimRequestResponse = import_zod17.z.lazy(() => {
|
|
1540
1664
|
endTime: data["endTime"]
|
1541
1665
|
}));
|
1542
1666
|
});
|
1543
|
-
var topUpEsimRequestRequest =
|
1544
|
-
return
|
1545
|
-
iccid:
|
1546
|
-
dataLimitInGb:
|
1547
|
-
startDate:
|
1548
|
-
endDate:
|
1549
|
-
email:
|
1550
|
-
referenceId:
|
1551
|
-
startTime:
|
1552
|
-
endTime:
|
1667
|
+
var topUpEsimRequestRequest = import_zod19.z.lazy(() => {
|
1668
|
+
return import_zod19.z.object({
|
1669
|
+
iccid: import_zod19.z.string().nullish(),
|
1670
|
+
dataLimitInGb: import_zod19.z.number().nullish(),
|
1671
|
+
startDate: import_zod19.z.string().nullish(),
|
1672
|
+
endDate: import_zod19.z.string().nullish(),
|
1673
|
+
email: import_zod19.z.string().nullish(),
|
1674
|
+
referenceId: import_zod19.z.string().nullish(),
|
1675
|
+
startTime: import_zod19.z.number().nullish(),
|
1676
|
+
endTime: import_zod19.z.number().nullish()
|
1553
1677
|
}).transform((data) => ({
|
1554
1678
|
iccid: data["iccid"],
|
1555
1679
|
dataLimitInGB: data["dataLimitInGb"],
|
@@ -1563,30 +1687,30 @@ var topUpEsimRequestRequest = import_zod17.z.lazy(() => {
|
|
1563
1687
|
});
|
1564
1688
|
|
1565
1689
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
1566
|
-
var
|
1690
|
+
var import_zod22 = require("zod");
|
1567
1691
|
|
1568
1692
|
// src/services/purchases/models/top-up-esim-ok-response-purchase.ts
|
1569
|
-
var
|
1570
|
-
var topUpEsimOkResponsePurchase =
|
1571
|
-
return
|
1572
|
-
id:
|
1573
|
-
packageId:
|
1574
|
-
startDate:
|
1575
|
-
endDate:
|
1576
|
-
createdDate:
|
1577
|
-
startTime:
|
1578
|
-
endTime:
|
1693
|
+
var import_zod20 = require("zod");
|
1694
|
+
var topUpEsimOkResponsePurchase = import_zod20.z.lazy(() => {
|
1695
|
+
return import_zod20.z.object({
|
1696
|
+
id: import_zod20.z.string().optional(),
|
1697
|
+
packageId: import_zod20.z.string().optional(),
|
1698
|
+
startDate: import_zod20.z.string().optional(),
|
1699
|
+
endDate: import_zod20.z.string().optional(),
|
1700
|
+
createdDate: import_zod20.z.string().optional(),
|
1701
|
+
startTime: import_zod20.z.number().optional(),
|
1702
|
+
endTime: import_zod20.z.number().optional()
|
1579
1703
|
});
|
1580
1704
|
});
|
1581
|
-
var topUpEsimOkResponsePurchaseResponse =
|
1582
|
-
return
|
1583
|
-
id:
|
1584
|
-
packageId:
|
1585
|
-
startDate:
|
1586
|
-
endDate:
|
1587
|
-
createdDate:
|
1588
|
-
startTime:
|
1589
|
-
endTime:
|
1705
|
+
var topUpEsimOkResponsePurchaseResponse = import_zod20.z.lazy(() => {
|
1706
|
+
return import_zod20.z.object({
|
1707
|
+
id: import_zod20.z.string().optional(),
|
1708
|
+
packageId: import_zod20.z.string().optional(),
|
1709
|
+
startDate: import_zod20.z.string().optional(),
|
1710
|
+
endDate: import_zod20.z.string().optional(),
|
1711
|
+
createdDate: import_zod20.z.string().optional(),
|
1712
|
+
startTime: import_zod20.z.number().optional(),
|
1713
|
+
endTime: import_zod20.z.number().optional()
|
1590
1714
|
}).transform((data) => ({
|
1591
1715
|
id: data["id"],
|
1592
1716
|
packageId: data["packageId"],
|
@@ -1597,15 +1721,15 @@ var topUpEsimOkResponsePurchaseResponse = import_zod18.z.lazy(() => {
|
|
1597
1721
|
endTime: data["endTime"]
|
1598
1722
|
}));
|
1599
1723
|
});
|
1600
|
-
var topUpEsimOkResponsePurchaseRequest =
|
1601
|
-
return
|
1602
|
-
id:
|
1603
|
-
packageId:
|
1604
|
-
startDate:
|
1605
|
-
endDate:
|
1606
|
-
createdDate:
|
1607
|
-
startTime:
|
1608
|
-
endTime:
|
1724
|
+
var topUpEsimOkResponsePurchaseRequest = import_zod20.z.lazy(() => {
|
1725
|
+
return import_zod20.z.object({
|
1726
|
+
id: import_zod20.z.string().nullish(),
|
1727
|
+
packageId: import_zod20.z.string().nullish(),
|
1728
|
+
startDate: import_zod20.z.string().nullish(),
|
1729
|
+
endDate: import_zod20.z.string().nullish(),
|
1730
|
+
createdDate: import_zod20.z.string().nullish(),
|
1731
|
+
startTime: import_zod20.z.number().nullish(),
|
1732
|
+
endTime: import_zod20.z.number().nullish()
|
1609
1733
|
}).transform((data) => ({
|
1610
1734
|
id: data["id"],
|
1611
1735
|
packageId: data["packageId"],
|
@@ -1618,34 +1742,34 @@ var topUpEsimOkResponsePurchaseRequest = import_zod18.z.lazy(() => {
|
|
1618
1742
|
});
|
1619
1743
|
|
1620
1744
|
// src/services/purchases/models/top-up-esim-ok-response-profile.ts
|
1621
|
-
var
|
1622
|
-
var topUpEsimOkResponseProfile =
|
1623
|
-
return
|
1624
|
-
iccid:
|
1745
|
+
var import_zod21 = require("zod");
|
1746
|
+
var topUpEsimOkResponseProfile = import_zod21.z.lazy(() => {
|
1747
|
+
return import_zod21.z.object({
|
1748
|
+
iccid: import_zod21.z.string().min(18).max(22).optional()
|
1625
1749
|
});
|
1626
1750
|
});
|
1627
|
-
var topUpEsimOkResponseProfileResponse =
|
1628
|
-
return
|
1629
|
-
iccid:
|
1751
|
+
var topUpEsimOkResponseProfileResponse = import_zod21.z.lazy(() => {
|
1752
|
+
return import_zod21.z.object({
|
1753
|
+
iccid: import_zod21.z.string().min(18).max(22).optional()
|
1630
1754
|
}).transform((data) => ({
|
1631
1755
|
iccid: data["iccid"]
|
1632
1756
|
}));
|
1633
1757
|
});
|
1634
|
-
var topUpEsimOkResponseProfileRequest =
|
1635
|
-
return
|
1758
|
+
var topUpEsimOkResponseProfileRequest = import_zod21.z.lazy(() => {
|
1759
|
+
return import_zod21.z.object({ iccid: import_zod21.z.string().nullish() }).transform((data) => ({
|
1636
1760
|
iccid: data["iccid"]
|
1637
1761
|
}));
|
1638
1762
|
});
|
1639
1763
|
|
1640
1764
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
1641
|
-
var topUpEsimOkResponse =
|
1642
|
-
return
|
1765
|
+
var topUpEsimOkResponse = import_zod22.z.lazy(() => {
|
1766
|
+
return import_zod22.z.object({
|
1643
1767
|
purchase: topUpEsimOkResponsePurchase.optional(),
|
1644
1768
|
profile: topUpEsimOkResponseProfile.optional()
|
1645
1769
|
});
|
1646
1770
|
});
|
1647
|
-
var topUpEsimOkResponseResponse =
|
1648
|
-
return
|
1771
|
+
var topUpEsimOkResponseResponse = import_zod22.z.lazy(() => {
|
1772
|
+
return import_zod22.z.object({
|
1649
1773
|
purchase: topUpEsimOkResponsePurchaseResponse.optional(),
|
1650
1774
|
profile: topUpEsimOkResponseProfileResponse.optional()
|
1651
1775
|
}).transform((data) => ({
|
@@ -1653,8 +1777,8 @@ var topUpEsimOkResponseResponse = import_zod20.z.lazy(() => {
|
|
1653
1777
|
profile: data["profile"]
|
1654
1778
|
}));
|
1655
1779
|
});
|
1656
|
-
var topUpEsimOkResponseRequest =
|
1657
|
-
return
|
1780
|
+
var topUpEsimOkResponseRequest = import_zod22.z.lazy(() => {
|
1781
|
+
return import_zod22.z.object({
|
1658
1782
|
purchase: topUpEsimOkResponsePurchaseRequest.nullish(),
|
1659
1783
|
profile: topUpEsimOkResponseProfileRequest.nullish()
|
1660
1784
|
}).transform((data) => ({
|
@@ -1664,23 +1788,23 @@ var topUpEsimOkResponseRequest = import_zod20.z.lazy(() => {
|
|
1664
1788
|
});
|
1665
1789
|
|
1666
1790
|
// src/services/purchases/models/edit-purchase-request.ts
|
1667
|
-
var
|
1668
|
-
var editPurchaseRequest =
|
1669
|
-
return
|
1670
|
-
purchaseId:
|
1671
|
-
startDate:
|
1672
|
-
endDate:
|
1673
|
-
startTime:
|
1674
|
-
endTime:
|
1791
|
+
var import_zod23 = require("zod");
|
1792
|
+
var editPurchaseRequest = import_zod23.z.lazy(() => {
|
1793
|
+
return import_zod23.z.object({
|
1794
|
+
purchaseId: import_zod23.z.string(),
|
1795
|
+
startDate: import_zod23.z.string(),
|
1796
|
+
endDate: import_zod23.z.string(),
|
1797
|
+
startTime: import_zod23.z.number().optional(),
|
1798
|
+
endTime: import_zod23.z.number().optional()
|
1675
1799
|
});
|
1676
1800
|
});
|
1677
|
-
var editPurchaseRequestResponse =
|
1678
|
-
return
|
1679
|
-
purchaseId:
|
1680
|
-
startDate:
|
1681
|
-
endDate:
|
1682
|
-
startTime:
|
1683
|
-
endTime:
|
1801
|
+
var editPurchaseRequestResponse = import_zod23.z.lazy(() => {
|
1802
|
+
return import_zod23.z.object({
|
1803
|
+
purchaseId: import_zod23.z.string(),
|
1804
|
+
startDate: import_zod23.z.string(),
|
1805
|
+
endDate: import_zod23.z.string(),
|
1806
|
+
startTime: import_zod23.z.number().optional(),
|
1807
|
+
endTime: import_zod23.z.number().optional()
|
1684
1808
|
}).transform((data) => ({
|
1685
1809
|
purchaseId: data["purchaseId"],
|
1686
1810
|
startDate: data["startDate"],
|
@@ -1689,13 +1813,13 @@ var editPurchaseRequestResponse = import_zod21.z.lazy(() => {
|
|
1689
1813
|
endTime: data["endTime"]
|
1690
1814
|
}));
|
1691
1815
|
});
|
1692
|
-
var editPurchaseRequestRequest =
|
1693
|
-
return
|
1694
|
-
purchaseId:
|
1695
|
-
startDate:
|
1696
|
-
endDate:
|
1697
|
-
startTime:
|
1698
|
-
endTime:
|
1816
|
+
var editPurchaseRequestRequest = import_zod23.z.lazy(() => {
|
1817
|
+
return import_zod23.z.object({
|
1818
|
+
purchaseId: import_zod23.z.string().nullish(),
|
1819
|
+
startDate: import_zod23.z.string().nullish(),
|
1820
|
+
endDate: import_zod23.z.string().nullish(),
|
1821
|
+
startTime: import_zod23.z.number().nullish(),
|
1822
|
+
endTime: import_zod23.z.number().nullish()
|
1699
1823
|
}).transform((data) => ({
|
1700
1824
|
purchaseId: data["purchaseId"],
|
1701
1825
|
startDate: data["startDate"],
|
@@ -1706,23 +1830,23 @@ var editPurchaseRequestRequest = import_zod21.z.lazy(() => {
|
|
1706
1830
|
});
|
1707
1831
|
|
1708
1832
|
// src/services/purchases/models/edit-purchase-ok-response.ts
|
1709
|
-
var
|
1710
|
-
var editPurchaseOkResponse =
|
1711
|
-
return
|
1712
|
-
purchaseId:
|
1713
|
-
newStartDate:
|
1714
|
-
newEndDate:
|
1715
|
-
newStartTime:
|
1716
|
-
newEndTime:
|
1833
|
+
var import_zod24 = require("zod");
|
1834
|
+
var editPurchaseOkResponse = import_zod24.z.lazy(() => {
|
1835
|
+
return import_zod24.z.object({
|
1836
|
+
purchaseId: import_zod24.z.string().optional(),
|
1837
|
+
newStartDate: import_zod24.z.string().optional(),
|
1838
|
+
newEndDate: import_zod24.z.string().optional(),
|
1839
|
+
newStartTime: import_zod24.z.number().optional(),
|
1840
|
+
newEndTime: import_zod24.z.number().optional()
|
1717
1841
|
});
|
1718
1842
|
});
|
1719
|
-
var editPurchaseOkResponseResponse =
|
1720
|
-
return
|
1721
|
-
purchaseId:
|
1722
|
-
newStartDate:
|
1723
|
-
newEndDate:
|
1724
|
-
newStartTime:
|
1725
|
-
newEndTime:
|
1843
|
+
var editPurchaseOkResponseResponse = import_zod24.z.lazy(() => {
|
1844
|
+
return import_zod24.z.object({
|
1845
|
+
purchaseId: import_zod24.z.string().optional(),
|
1846
|
+
newStartDate: import_zod24.z.string().optional(),
|
1847
|
+
newEndDate: import_zod24.z.string().optional(),
|
1848
|
+
newStartTime: import_zod24.z.number().optional(),
|
1849
|
+
newEndTime: import_zod24.z.number().optional()
|
1726
1850
|
}).transform((data) => ({
|
1727
1851
|
purchaseId: data["purchaseId"],
|
1728
1852
|
newStartDate: data["newStartDate"],
|
@@ -1731,13 +1855,13 @@ var editPurchaseOkResponseResponse = import_zod22.z.lazy(() => {
|
|
1731
1855
|
newEndTime: data["newEndTime"]
|
1732
1856
|
}));
|
1733
1857
|
});
|
1734
|
-
var editPurchaseOkResponseRequest =
|
1735
|
-
return
|
1736
|
-
purchaseId:
|
1737
|
-
newStartDate:
|
1738
|
-
newEndDate:
|
1739
|
-
newStartTime:
|
1740
|
-
newEndTime:
|
1858
|
+
var editPurchaseOkResponseRequest = import_zod24.z.lazy(() => {
|
1859
|
+
return import_zod24.z.object({
|
1860
|
+
purchaseId: import_zod24.z.string().nullish(),
|
1861
|
+
newStartDate: import_zod24.z.string().nullish(),
|
1862
|
+
newEndDate: import_zod24.z.string().nullish(),
|
1863
|
+
newStartTime: import_zod24.z.number().nullish(),
|
1864
|
+
newEndTime: import_zod24.z.number().nullish()
|
1741
1865
|
}).transform((data) => ({
|
1742
1866
|
purchaseId: data["purchaseId"],
|
1743
1867
|
newStartDate: data["newStartDate"],
|
@@ -1748,24 +1872,24 @@ var editPurchaseOkResponseRequest = import_zod22.z.lazy(() => {
|
|
1748
1872
|
});
|
1749
1873
|
|
1750
1874
|
// src/services/purchases/models/get-purchase-consumption-ok-response.ts
|
1751
|
-
var
|
1752
|
-
var getPurchaseConsumptionOkResponse =
|
1753
|
-
return
|
1754
|
-
dataUsageRemainingInBytes:
|
1755
|
-
status:
|
1875
|
+
var import_zod25 = require("zod");
|
1876
|
+
var getPurchaseConsumptionOkResponse = import_zod25.z.lazy(() => {
|
1877
|
+
return import_zod25.z.object({
|
1878
|
+
dataUsageRemainingInBytes: import_zod25.z.number().optional(),
|
1879
|
+
status: import_zod25.z.string().optional()
|
1756
1880
|
});
|
1757
1881
|
});
|
1758
|
-
var getPurchaseConsumptionOkResponseResponse =
|
1759
|
-
return
|
1760
|
-
dataUsageRemainingInBytes:
|
1761
|
-
status:
|
1882
|
+
var getPurchaseConsumptionOkResponseResponse = import_zod25.z.lazy(() => {
|
1883
|
+
return import_zod25.z.object({
|
1884
|
+
dataUsageRemainingInBytes: import_zod25.z.number().optional(),
|
1885
|
+
status: import_zod25.z.string().optional()
|
1762
1886
|
}).transform((data) => ({
|
1763
1887
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
1764
1888
|
status: data["status"]
|
1765
1889
|
}));
|
1766
1890
|
});
|
1767
|
-
var getPurchaseConsumptionOkResponseRequest =
|
1768
|
-
return
|
1891
|
+
var getPurchaseConsumptionOkResponseRequest = import_zod25.z.lazy(() => {
|
1892
|
+
return import_zod25.z.object({ dataUsageRemainingInBytes: import_zod25.z.number().nullish(), status: import_zod25.z.string().nullish() }).transform((data) => ({
|
1769
1893
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
1770
1894
|
status: data["status"]
|
1771
1895
|
}));
|
@@ -1786,7 +1910,7 @@ var PurchasesService = class extends BaseService {
|
|
1786
1910
|
* @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
|
1787
1911
|
*/
|
1788
1912
|
async listPurchases(params, requestConfig) {
|
1789
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/purchases").setRequestSchema(
|
1913
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/purchases").setRequestSchema(import_zod26.z.any()).setResponseSchema(listPurchasesOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
1790
1914
|
key: "iccid",
|
1791
1915
|
value: params == null ? void 0 : params.iccid
|
1792
1916
|
}).addQueryParam({
|
@@ -1818,7 +1942,7 @@ var PurchasesService = class extends BaseService {
|
|
1818
1942
|
* @returns {Promise<HttpResponse<CreatePurchaseOkResponse>>} Successful Response
|
1819
1943
|
*/
|
1820
1944
|
async createPurchase(body, requestConfig) {
|
1821
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases").setRequestSchema(createPurchaseRequestRequest).setResponseSchema(createPurchaseOkResponseResponse).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1945
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases").setRequestSchema(createPurchaseRequestRequest).setResponseSchema(createPurchaseOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1822
1946
|
return this.client.call(request);
|
1823
1947
|
}
|
1824
1948
|
/**
|
@@ -1826,7 +1950,7 @@ var PurchasesService = class extends BaseService {
|
|
1826
1950
|
* @returns {Promise<HttpResponse<TopUpEsimOkResponse>>} Successful Response
|
1827
1951
|
*/
|
1828
1952
|
async topUpEsim(body, requestConfig) {
|
1829
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases/topup").setRequestSchema(topUpEsimRequestRequest).setResponseSchema(topUpEsimOkResponseResponse).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1953
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases/topup").setRequestSchema(topUpEsimRequestRequest).setResponseSchema(topUpEsimOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1830
1954
|
return this.client.call(request);
|
1831
1955
|
}
|
1832
1956
|
/**
|
@@ -1834,7 +1958,7 @@ var PurchasesService = class extends BaseService {
|
|
1834
1958
|
* @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
|
1835
1959
|
*/
|
1836
1960
|
async editPurchase(body, requestConfig) {
|
1837
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases/edit").setRequestSchema(editPurchaseRequestRequest).setResponseSchema(editPurchaseOkResponseResponse).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1961
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("POST").setPath("/purchases/edit").setRequestSchema(editPurchaseRequestRequest).setResponseSchema(editPurchaseOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
1838
1962
|
return this.client.call(request);
|
1839
1963
|
}
|
1840
1964
|
/**
|
@@ -1843,7 +1967,7 @@ var PurchasesService = class extends BaseService {
|
|
1843
1967
|
* @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} Successful Response
|
1844
1968
|
*/
|
1845
1969
|
async getPurchaseConsumption(purchaseId, requestConfig) {
|
1846
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(
|
1970
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(import_zod26.z.any()).setResponseSchema(getPurchaseConsumptionOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
1847
1971
|
key: "purchaseId",
|
1848
1972
|
value: purchaseId
|
1849
1973
|
}).build();
|
@@ -1852,27 +1976,27 @@ var PurchasesService = class extends BaseService {
|
|
1852
1976
|
};
|
1853
1977
|
|
1854
1978
|
// src/services/e-sim/e-sim.ts
|
1855
|
-
var
|
1979
|
+
var import_zod36 = require("zod");
|
1856
1980
|
|
1857
1981
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
1858
|
-
var
|
1982
|
+
var import_zod28 = require("zod");
|
1859
1983
|
|
1860
1984
|
// src/services/e-sim/models/get-esim-ok-response-esim.ts
|
1861
|
-
var
|
1862
|
-
var getEsimOkResponseEsim =
|
1863
|
-
return
|
1864
|
-
iccid:
|
1865
|
-
smdpAddress:
|
1866
|
-
manualActivationCode:
|
1867
|
-
status:
|
1985
|
+
var import_zod27 = require("zod");
|
1986
|
+
var getEsimOkResponseEsim = import_zod27.z.lazy(() => {
|
1987
|
+
return import_zod27.z.object({
|
1988
|
+
iccid: import_zod27.z.string().min(18).max(22).optional(),
|
1989
|
+
smdpAddress: import_zod27.z.string().optional(),
|
1990
|
+
manualActivationCode: import_zod27.z.string().optional(),
|
1991
|
+
status: import_zod27.z.string().optional()
|
1868
1992
|
});
|
1869
1993
|
});
|
1870
|
-
var getEsimOkResponseEsimResponse =
|
1871
|
-
return
|
1872
|
-
iccid:
|
1873
|
-
smdpAddress:
|
1874
|
-
manualActivationCode:
|
1875
|
-
status:
|
1994
|
+
var getEsimOkResponseEsimResponse = import_zod27.z.lazy(() => {
|
1995
|
+
return import_zod27.z.object({
|
1996
|
+
iccid: import_zod27.z.string().min(18).max(22).optional(),
|
1997
|
+
smdpAddress: import_zod27.z.string().optional(),
|
1998
|
+
manualActivationCode: import_zod27.z.string().optional(),
|
1999
|
+
status: import_zod27.z.string().optional()
|
1876
2000
|
}).transform((data) => ({
|
1877
2001
|
iccid: data["iccid"],
|
1878
2002
|
smdpAddress: data["smdpAddress"],
|
@@ -1880,12 +2004,12 @@ var getEsimOkResponseEsimResponse = import_zod25.z.lazy(() => {
|
|
1880
2004
|
status: data["status"]
|
1881
2005
|
}));
|
1882
2006
|
});
|
1883
|
-
var getEsimOkResponseEsimRequest =
|
1884
|
-
return
|
1885
|
-
iccid:
|
1886
|
-
smdpAddress:
|
1887
|
-
manualActivationCode:
|
1888
|
-
status:
|
2007
|
+
var getEsimOkResponseEsimRequest = import_zod27.z.lazy(() => {
|
2008
|
+
return import_zod27.z.object({
|
2009
|
+
iccid: import_zod27.z.string().nullish(),
|
2010
|
+
smdpAddress: import_zod27.z.string().nullish(),
|
2011
|
+
manualActivationCode: import_zod27.z.string().nullish(),
|
2012
|
+
status: import_zod27.z.string().nullish()
|
1889
2013
|
}).transform((data) => ({
|
1890
2014
|
iccid: data["iccid"],
|
1891
2015
|
smdpAddress: data["smdpAddress"],
|
@@ -1895,43 +2019,43 @@ var getEsimOkResponseEsimRequest = import_zod25.z.lazy(() => {
|
|
1895
2019
|
});
|
1896
2020
|
|
1897
2021
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
1898
|
-
var getEsimOkResponse =
|
1899
|
-
return
|
2022
|
+
var getEsimOkResponse = import_zod28.z.lazy(() => {
|
2023
|
+
return import_zod28.z.object({
|
1900
2024
|
esim: getEsimOkResponseEsim.optional()
|
1901
2025
|
});
|
1902
2026
|
});
|
1903
|
-
var getEsimOkResponseResponse =
|
1904
|
-
return
|
2027
|
+
var getEsimOkResponseResponse = import_zod28.z.lazy(() => {
|
2028
|
+
return import_zod28.z.object({
|
1905
2029
|
esim: getEsimOkResponseEsimResponse.optional()
|
1906
2030
|
}).transform((data) => ({
|
1907
2031
|
esim: data["esim"]
|
1908
2032
|
}));
|
1909
2033
|
});
|
1910
|
-
var getEsimOkResponseRequest =
|
1911
|
-
return
|
2034
|
+
var getEsimOkResponseRequest = import_zod28.z.lazy(() => {
|
2035
|
+
return import_zod28.z.object({ esim: getEsimOkResponseEsimRequest.nullish() }).transform((data) => ({
|
1912
2036
|
esim: data["esim"]
|
1913
2037
|
}));
|
1914
2038
|
});
|
1915
2039
|
|
1916
2040
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
1917
|
-
var
|
2041
|
+
var import_zod30 = require("zod");
|
1918
2042
|
|
1919
2043
|
// src/services/e-sim/models/device.ts
|
1920
|
-
var
|
1921
|
-
var device =
|
1922
|
-
return
|
1923
|
-
oem:
|
1924
|
-
hardwareName:
|
1925
|
-
hardwareModel:
|
1926
|
-
eid:
|
2044
|
+
var import_zod29 = require("zod");
|
2045
|
+
var device = import_zod29.z.lazy(() => {
|
2046
|
+
return import_zod29.z.object({
|
2047
|
+
oem: import_zod29.z.string().optional(),
|
2048
|
+
hardwareName: import_zod29.z.string().optional(),
|
2049
|
+
hardwareModel: import_zod29.z.string().optional(),
|
2050
|
+
eid: import_zod29.z.string().optional()
|
1927
2051
|
});
|
1928
2052
|
});
|
1929
|
-
var deviceResponse =
|
1930
|
-
return
|
1931
|
-
oem:
|
1932
|
-
hardwareName:
|
1933
|
-
hardwareModel:
|
1934
|
-
eid:
|
2053
|
+
var deviceResponse = import_zod29.z.lazy(() => {
|
2054
|
+
return import_zod29.z.object({
|
2055
|
+
oem: import_zod29.z.string().optional(),
|
2056
|
+
hardwareName: import_zod29.z.string().optional(),
|
2057
|
+
hardwareModel: import_zod29.z.string().optional(),
|
2058
|
+
eid: import_zod29.z.string().optional()
|
1935
2059
|
}).transform((data) => ({
|
1936
2060
|
oem: data["oem"],
|
1937
2061
|
hardwareName: data["hardwareName"],
|
@@ -1939,12 +2063,12 @@ var deviceResponse = import_zod27.z.lazy(() => {
|
|
1939
2063
|
eid: data["eid"]
|
1940
2064
|
}));
|
1941
2065
|
});
|
1942
|
-
var deviceRequest =
|
1943
|
-
return
|
1944
|
-
oem:
|
1945
|
-
hardwareName:
|
1946
|
-
hardwareModel:
|
1947
|
-
eid:
|
2066
|
+
var deviceRequest = import_zod29.z.lazy(() => {
|
2067
|
+
return import_zod29.z.object({
|
2068
|
+
oem: import_zod29.z.string().nullish(),
|
2069
|
+
hardwareName: import_zod29.z.string().nullish(),
|
2070
|
+
hardwareModel: import_zod29.z.string().nullish(),
|
2071
|
+
eid: import_zod29.z.string().nullish()
|
1948
2072
|
}).transform((data) => ({
|
1949
2073
|
oem: data["oem"],
|
1950
2074
|
hardwareName: data["hardwareName"],
|
@@ -1954,52 +2078,52 @@ var deviceRequest = import_zod27.z.lazy(() => {
|
|
1954
2078
|
});
|
1955
2079
|
|
1956
2080
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
1957
|
-
var getEsimDeviceOkResponse =
|
1958
|
-
return
|
2081
|
+
var getEsimDeviceOkResponse = import_zod30.z.lazy(() => {
|
2082
|
+
return import_zod30.z.object({
|
1959
2083
|
device: device.optional()
|
1960
2084
|
});
|
1961
2085
|
});
|
1962
|
-
var getEsimDeviceOkResponseResponse =
|
1963
|
-
return
|
2086
|
+
var getEsimDeviceOkResponseResponse = import_zod30.z.lazy(() => {
|
2087
|
+
return import_zod30.z.object({
|
1964
2088
|
device: deviceResponse.optional()
|
1965
2089
|
}).transform((data) => ({
|
1966
2090
|
device: data["device"]
|
1967
2091
|
}));
|
1968
2092
|
});
|
1969
|
-
var getEsimDeviceOkResponseRequest =
|
1970
|
-
return
|
2093
|
+
var getEsimDeviceOkResponseRequest = import_zod30.z.lazy(() => {
|
2094
|
+
return import_zod30.z.object({ device: deviceRequest.nullish() }).transform((data) => ({
|
1971
2095
|
device: data["device"]
|
1972
2096
|
}));
|
1973
2097
|
});
|
1974
2098
|
|
1975
2099
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
1976
|
-
var
|
2100
|
+
var import_zod33 = require("zod");
|
1977
2101
|
|
1978
2102
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
1979
|
-
var
|
2103
|
+
var import_zod32 = require("zod");
|
1980
2104
|
|
1981
2105
|
// src/services/e-sim/models/history.ts
|
1982
|
-
var
|
1983
|
-
var history =
|
1984
|
-
return
|
1985
|
-
status:
|
1986
|
-
statusDate:
|
1987
|
-
date:
|
2106
|
+
var import_zod31 = require("zod");
|
2107
|
+
var history = import_zod31.z.lazy(() => {
|
2108
|
+
return import_zod31.z.object({
|
2109
|
+
status: import_zod31.z.string().optional(),
|
2110
|
+
statusDate: import_zod31.z.string().optional(),
|
2111
|
+
date: import_zod31.z.number().optional()
|
1988
2112
|
});
|
1989
2113
|
});
|
1990
|
-
var historyResponse =
|
1991
|
-
return
|
1992
|
-
status:
|
1993
|
-
statusDate:
|
1994
|
-
date:
|
2114
|
+
var historyResponse = import_zod31.z.lazy(() => {
|
2115
|
+
return import_zod31.z.object({
|
2116
|
+
status: import_zod31.z.string().optional(),
|
2117
|
+
statusDate: import_zod31.z.string().optional(),
|
2118
|
+
date: import_zod31.z.number().optional()
|
1995
2119
|
}).transform((data) => ({
|
1996
2120
|
status: data["status"],
|
1997
2121
|
statusDate: data["statusDate"],
|
1998
2122
|
date: data["date"]
|
1999
2123
|
}));
|
2000
2124
|
});
|
2001
|
-
var historyRequest =
|
2002
|
-
return
|
2125
|
+
var historyRequest = import_zod31.z.lazy(() => {
|
2126
|
+
return import_zod31.z.object({ status: import_zod31.z.string().nullish(), statusDate: import_zod31.z.string().nullish(), date: import_zod31.z.number().nullish() }).transform((data) => ({
|
2003
2127
|
status: data["status"],
|
2004
2128
|
statusDate: data["statusDate"],
|
2005
2129
|
date: data["date"]
|
@@ -2007,75 +2131,75 @@ var historyRequest = import_zod29.z.lazy(() => {
|
|
2007
2131
|
});
|
2008
2132
|
|
2009
2133
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
2010
|
-
var getEsimHistoryOkResponseEsim =
|
2011
|
-
return
|
2012
|
-
iccid:
|
2013
|
-
history:
|
2134
|
+
var getEsimHistoryOkResponseEsim = import_zod32.z.lazy(() => {
|
2135
|
+
return import_zod32.z.object({
|
2136
|
+
iccid: import_zod32.z.string().min(18).max(22).optional(),
|
2137
|
+
history: import_zod32.z.array(history).optional()
|
2014
2138
|
});
|
2015
2139
|
});
|
2016
|
-
var getEsimHistoryOkResponseEsimResponse =
|
2017
|
-
return
|
2018
|
-
iccid:
|
2019
|
-
history:
|
2140
|
+
var getEsimHistoryOkResponseEsimResponse = import_zod32.z.lazy(() => {
|
2141
|
+
return import_zod32.z.object({
|
2142
|
+
iccid: import_zod32.z.string().min(18).max(22).optional(),
|
2143
|
+
history: import_zod32.z.array(historyResponse).optional()
|
2020
2144
|
}).transform((data) => ({
|
2021
2145
|
iccid: data["iccid"],
|
2022
2146
|
history: data["history"]
|
2023
2147
|
}));
|
2024
2148
|
});
|
2025
|
-
var getEsimHistoryOkResponseEsimRequest =
|
2026
|
-
return
|
2149
|
+
var getEsimHistoryOkResponseEsimRequest = import_zod32.z.lazy(() => {
|
2150
|
+
return import_zod32.z.object({ iccid: import_zod32.z.string().nullish(), history: import_zod32.z.array(historyRequest).nullish() }).transform((data) => ({
|
2027
2151
|
iccid: data["iccid"],
|
2028
2152
|
history: data["history"]
|
2029
2153
|
}));
|
2030
2154
|
});
|
2031
2155
|
|
2032
2156
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
2033
|
-
var getEsimHistoryOkResponse =
|
2034
|
-
return
|
2157
|
+
var getEsimHistoryOkResponse = import_zod33.z.lazy(() => {
|
2158
|
+
return import_zod33.z.object({
|
2035
2159
|
esim: getEsimHistoryOkResponseEsim.optional()
|
2036
2160
|
});
|
2037
2161
|
});
|
2038
|
-
var getEsimHistoryOkResponseResponse =
|
2039
|
-
return
|
2162
|
+
var getEsimHistoryOkResponseResponse = import_zod33.z.lazy(() => {
|
2163
|
+
return import_zod33.z.object({
|
2040
2164
|
esim: getEsimHistoryOkResponseEsimResponse.optional()
|
2041
2165
|
}).transform((data) => ({
|
2042
2166
|
esim: data["esim"]
|
2043
2167
|
}));
|
2044
2168
|
});
|
2045
|
-
var getEsimHistoryOkResponseRequest =
|
2046
|
-
return
|
2169
|
+
var getEsimHistoryOkResponseRequest = import_zod33.z.lazy(() => {
|
2170
|
+
return import_zod33.z.object({ esim: getEsimHistoryOkResponseEsimRequest.nullish() }).transform((data) => ({
|
2047
2171
|
esim: data["esim"]
|
2048
2172
|
}));
|
2049
2173
|
});
|
2050
2174
|
|
2051
2175
|
// src/services/e-sim/models/get-esim-mac-ok-response.ts
|
2052
|
-
var
|
2176
|
+
var import_zod35 = require("zod");
|
2053
2177
|
|
2054
2178
|
// src/services/e-sim/models/get-esim-mac-ok-response-esim.ts
|
2055
|
-
var
|
2056
|
-
var getEsimMacOkResponseEsim =
|
2057
|
-
return
|
2058
|
-
iccid:
|
2059
|
-
smdpAddress:
|
2060
|
-
manualActivationCode:
|
2179
|
+
var import_zod34 = require("zod");
|
2180
|
+
var getEsimMacOkResponseEsim = import_zod34.z.lazy(() => {
|
2181
|
+
return import_zod34.z.object({
|
2182
|
+
iccid: import_zod34.z.string().min(18).max(22).optional(),
|
2183
|
+
smdpAddress: import_zod34.z.string().optional(),
|
2184
|
+
manualActivationCode: import_zod34.z.string().optional()
|
2061
2185
|
});
|
2062
2186
|
});
|
2063
|
-
var getEsimMacOkResponseEsimResponse =
|
2064
|
-
return
|
2065
|
-
iccid:
|
2066
|
-
smdpAddress:
|
2067
|
-
manualActivationCode:
|
2187
|
+
var getEsimMacOkResponseEsimResponse = import_zod34.z.lazy(() => {
|
2188
|
+
return import_zod34.z.object({
|
2189
|
+
iccid: import_zod34.z.string().min(18).max(22).optional(),
|
2190
|
+
smdpAddress: import_zod34.z.string().optional(),
|
2191
|
+
manualActivationCode: import_zod34.z.string().optional()
|
2068
2192
|
}).transform((data) => ({
|
2069
2193
|
iccid: data["iccid"],
|
2070
2194
|
smdpAddress: data["smdpAddress"],
|
2071
2195
|
manualActivationCode: data["manualActivationCode"]
|
2072
2196
|
}));
|
2073
2197
|
});
|
2074
|
-
var getEsimMacOkResponseEsimRequest =
|
2075
|
-
return
|
2076
|
-
iccid:
|
2077
|
-
smdpAddress:
|
2078
|
-
manualActivationCode:
|
2198
|
+
var getEsimMacOkResponseEsimRequest = import_zod34.z.lazy(() => {
|
2199
|
+
return import_zod34.z.object({
|
2200
|
+
iccid: import_zod34.z.string().nullish(),
|
2201
|
+
smdpAddress: import_zod34.z.string().nullish(),
|
2202
|
+
manualActivationCode: import_zod34.z.string().nullish()
|
2079
2203
|
}).transform((data) => ({
|
2080
2204
|
iccid: data["iccid"],
|
2081
2205
|
smdpAddress: data["smdpAddress"],
|
@@ -2084,20 +2208,20 @@ var getEsimMacOkResponseEsimRequest = import_zod32.z.lazy(() => {
|
|
2084
2208
|
});
|
2085
2209
|
|
2086
2210
|
// src/services/e-sim/models/get-esim-mac-ok-response.ts
|
2087
|
-
var getEsimMacOkResponse =
|
2088
|
-
return
|
2211
|
+
var getEsimMacOkResponse = import_zod35.z.lazy(() => {
|
2212
|
+
return import_zod35.z.object({
|
2089
2213
|
esim: getEsimMacOkResponseEsim.optional()
|
2090
2214
|
});
|
2091
2215
|
});
|
2092
|
-
var getEsimMacOkResponseResponse =
|
2093
|
-
return
|
2216
|
+
var getEsimMacOkResponseResponse = import_zod35.z.lazy(() => {
|
2217
|
+
return import_zod35.z.object({
|
2094
2218
|
esim: getEsimMacOkResponseEsimResponse.optional()
|
2095
2219
|
}).transform((data) => ({
|
2096
2220
|
esim: data["esim"]
|
2097
2221
|
}));
|
2098
2222
|
});
|
2099
|
-
var getEsimMacOkResponseRequest =
|
2100
|
-
return
|
2223
|
+
var getEsimMacOkResponseRequest = import_zod35.z.lazy(() => {
|
2224
|
+
return import_zod35.z.object({ esim: getEsimMacOkResponseEsimRequest.nullish() }).transform((data) => ({
|
2101
2225
|
esim: data["esim"]
|
2102
2226
|
}));
|
2103
2227
|
});
|
@@ -2110,7 +2234,7 @@ var ESimService = class extends BaseService {
|
|
2110
2234
|
* @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
|
2111
2235
|
*/
|
2112
2236
|
async getEsim(params, requestConfig) {
|
2113
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim").setRequestSchema(
|
2237
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim").setRequestSchema(import_zod36.z.any()).setResponseSchema(getEsimOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
2114
2238
|
key: "iccid",
|
2115
2239
|
value: params == null ? void 0 : params.iccid
|
2116
2240
|
}).build();
|
@@ -2122,7 +2246,7 @@ var ESimService = class extends BaseService {
|
|
2122
2246
|
* @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
|
2123
2247
|
*/
|
2124
2248
|
async getEsimDevice(iccid, requestConfig) {
|
2125
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/device").setRequestSchema(
|
2249
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/device").setRequestSchema(import_zod36.z.any()).setResponseSchema(getEsimDeviceOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
2126
2250
|
key: "iccid",
|
2127
2251
|
value: iccid
|
2128
2252
|
}).build();
|
@@ -2134,7 +2258,7 @@ var ESimService = class extends BaseService {
|
|
2134
2258
|
* @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
|
2135
2259
|
*/
|
2136
2260
|
async getEsimHistory(iccid, requestConfig) {
|
2137
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/history").setRequestSchema(
|
2261
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/history").setRequestSchema(import_zod36.z.any()).setResponseSchema(getEsimHistoryOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
2138
2262
|
key: "iccid",
|
2139
2263
|
value: iccid
|
2140
2264
|
}).build();
|
@@ -2146,7 +2270,7 @@ var ESimService = class extends BaseService {
|
|
2146
2270
|
* @returns {Promise<HttpResponse<GetEsimMacOkResponse>>} Successful Response
|
2147
2271
|
*/
|
2148
2272
|
async getEsimMac(iccid, requestConfig) {
|
2149
|
-
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/mac").setRequestSchema(
|
2273
|
+
const request = new RequestBuilder().setBaseUrl(this.config).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/mac").setRequestSchema(import_zod36.z.any()).setResponseSchema(getEsimMacOkResponseResponse).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).setResponseContentType("json" /* Json */).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
2150
2274
|
key: "iccid",
|
2151
2275
|
value: iccid
|
2152
2276
|
}).build();
|
@@ -2158,41 +2282,48 @@ var ESimService = class extends BaseService {
|
|
2158
2282
|
var Celitech = class {
|
2159
2283
|
constructor(config) {
|
2160
2284
|
this.config = config;
|
2285
|
+
this.tokenManager = new OAuthTokenManager();
|
2161
2286
|
const baseUrl = config.environment || config.baseUrl || "https://api.celitech.net/v1" /* DEFAULT */;
|
2162
2287
|
this.config = {
|
2163
2288
|
...config,
|
2164
2289
|
baseUrl
|
2165
2290
|
};
|
2166
|
-
this.
|
2167
|
-
this.
|
2168
|
-
this.
|
2169
|
-
this.
|
2291
|
+
this.oAuth = new OAuthService(this.config, this.tokenManager);
|
2292
|
+
this.destinations = new DestinationsService(this.config, this.tokenManager);
|
2293
|
+
this.packages = new PackagesService(this.config, this.tokenManager);
|
2294
|
+
this.purchases = new PurchasesService(this.config, this.tokenManager);
|
2295
|
+
this.eSim = new ESimService(this.config, this.tokenManager);
|
2170
2296
|
}
|
2171
2297
|
set baseUrl(baseUrl) {
|
2298
|
+
this.oAuth.baseUrl = baseUrl;
|
2172
2299
|
this.destinations.baseUrl = baseUrl;
|
2173
2300
|
this.packages.baseUrl = baseUrl;
|
2174
2301
|
this.purchases.baseUrl = baseUrl;
|
2175
2302
|
this.eSim.baseUrl = baseUrl;
|
2176
2303
|
}
|
2177
2304
|
set environment(environment) {
|
2305
|
+
this.oAuth.baseUrl = environment;
|
2178
2306
|
this.destinations.baseUrl = environment;
|
2179
2307
|
this.packages.baseUrl = environment;
|
2180
2308
|
this.purchases.baseUrl = environment;
|
2181
2309
|
this.eSim.baseUrl = environment;
|
2182
2310
|
}
|
2183
2311
|
set timeoutMs(timeoutMs) {
|
2312
|
+
this.oAuth.timeoutMs = timeoutMs;
|
2184
2313
|
this.destinations.timeoutMs = timeoutMs;
|
2185
2314
|
this.packages.timeoutMs = timeoutMs;
|
2186
2315
|
this.purchases.timeoutMs = timeoutMs;
|
2187
2316
|
this.eSim.timeoutMs = timeoutMs;
|
2188
2317
|
}
|
2189
2318
|
set clientId(clientId) {
|
2319
|
+
this.oAuth.clientId = clientId;
|
2190
2320
|
this.destinations.clientId = clientId;
|
2191
2321
|
this.packages.clientId = clientId;
|
2192
2322
|
this.purchases.clientId = clientId;
|
2193
2323
|
this.eSim.clientId = clientId;
|
2194
2324
|
}
|
2195
2325
|
set clientSecret(clientSecret) {
|
2326
|
+
this.oAuth.clientSecret = clientSecret;
|
2196
2327
|
this.destinations.clientSecret = clientSecret;
|
2197
2328
|
this.packages.clientSecret = clientSecret;
|
2198
2329
|
this.purchases.clientSecret = clientSecret;
|
@@ -2204,6 +2335,8 @@ var Celitech = class {
|
|
2204
2335
|
Celitech,
|
2205
2336
|
DestinationsService,
|
2206
2337
|
ESimService,
|
2338
|
+
GrantType,
|
2339
|
+
OAuthService,
|
2207
2340
|
PackagesService,
|
2208
2341
|
PurchasesService
|
2209
2342
|
});
|