@pexcode/dlis-sdk 1.0.0
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/LICENSE +21 -0
- package/README.md +332 -0
- package/dist/api/core/ApiError.d.ts +10 -0
- package/dist/api/core/ApiError.js +15 -0
- package/dist/api/core/ApiRequestOptions.d.ts +13 -0
- package/dist/api/core/ApiRequestOptions.js +2 -0
- package/dist/api/core/ApiResult.d.ts +7 -0
- package/dist/api/core/ApiResult.js +2 -0
- package/dist/api/core/CancelablePromise.d.ts +20 -0
- package/dist/api/core/CancelablePromise.js +116 -0
- package/dist/api/core/OpenAPI.d.ts +16 -0
- package/dist/api/core/OpenAPI.js +14 -0
- package/dist/api/core/request.d.ts +34 -0
- package/dist/api/core/request.js +294 -0
- package/dist/api/index.d.ts +46 -0
- package/dist/api/index.js +48 -0
- package/dist/api/models/AppLevel.d.ts +5 -0
- package/dist/api/models/AppLevel.js +13 -0
- package/dist/api/models/BillingType.d.ts +5 -0
- package/dist/api/models/BillingType.js +13 -0
- package/dist/api/models/BranchId.d.ts +1 -0
- package/dist/api/models/BranchId.js +2 -0
- package/dist/api/models/BranchLedgerAttributes.d.ts +23 -0
- package/dist/api/models/BranchLedgerAttributes.js +2 -0
- package/dist/api/models/CalculateCostAttributes.d.ts +14 -0
- package/dist/api/models/CalculateCostAttributes.js +2 -0
- package/dist/api/models/CheckBlackListAttribute.d.ts +7 -0
- package/dist/api/models/CheckBlackListAttribute.js +2 -0
- package/dist/api/models/ClientAttributes.d.ts +26 -0
- package/dist/api/models/ClientAttributes.js +2 -0
- package/dist/api/models/ClientCreationAttributes.d.ts +12 -0
- package/dist/api/models/ClientCreationAttributes.js +2 -0
- package/dist/api/models/ClientTypeEnum.d.ts +4 -0
- package/dist/api/models/ClientTypeEnum.js +12 -0
- package/dist/api/models/CostId.d.ts +1 -0
- package/dist/api/models/CostId.js +2 -0
- package/dist/api/models/Currencies.d.ts +7 -0
- package/dist/api/models/Currencies.js +15 -0
- package/dist/api/models/EndpointId.d.ts +1 -0
- package/dist/api/models/EndpointId.js +2 -0
- package/dist/api/models/HttpSuccess.d.ts +5 -0
- package/dist/api/models/HttpSuccess.js +2 -0
- package/dist/api/models/LedgerCategory.d.ts +7 -0
- package/dist/api/models/LedgerCategory.js +15 -0
- package/dist/api/models/LedgerStatus.d.ts +5 -0
- package/dist/api/models/LedgerStatus.js +13 -0
- package/dist/api/models/LedgerType.d.ts +4 -0
- package/dist/api/models/LedgerType.js +12 -0
- package/dist/api/models/MovementsStatusAttributes.d.ts +6 -0
- package/dist/api/models/MovementsStatusAttributes.js +14 -0
- package/dist/api/models/PackageId.d.ts +1 -0
- package/dist/api/models/PackageId.js +2 -0
- package/dist/api/models/PackagePlatform.d.ts +6 -0
- package/dist/api/models/PackagePlatform.js +14 -0
- package/dist/api/models/PackageType.d.ts +4 -0
- package/dist/api/models/PackageType.js +12 -0
- package/dist/api/models/PlatformEnum.d.ts +8 -0
- package/dist/api/models/PlatformEnum.js +16 -0
- package/dist/api/models/ProofOfDeliveryType.d.ts +5 -0
- package/dist/api/models/ProofOfDeliveryType.js +13 -0
- package/dist/api/models/ReferenceType.d.ts +4 -0
- package/dist/api/models/ReferenceType.js +12 -0
- package/dist/api/models/SdkId.d.ts +1 -0
- package/dist/api/models/SdkId.js +2 -0
- package/dist/api/models/SdkInfoAttributes.d.ts +25 -0
- package/dist/api/models/SdkInfoAttributes.js +2 -0
- package/dist/api/models/SdkLedgerOverview.d.ts +6 -0
- package/dist/api/models/SdkLedgerOverview.js +2 -0
- package/dist/api/models/SdkPackagesCreationAttributes.d.ts +26 -0
- package/dist/api/models/SdkPackagesCreationAttributes.js +2 -0
- package/dist/api/models/ShippingOption.d.ts +5 -0
- package/dist/api/models/ShippingOption.js +13 -0
- package/dist/api/models/ShippingServiceData.d.ts +10 -0
- package/dist/api/models/ShippingServiceData.js +2 -0
- package/dist/api/models/Sizes.d.ts +5 -0
- package/dist/api/models/Sizes.js +13 -0
- package/dist/api/models/TenantId.d.ts +1 -0
- package/dist/api/models/TenantId.js +2 -0
- package/dist/api/models/UserId.d.ts +1 -0
- package/dist/api/models/UserId.js +2 -0
- package/dist/api/models/appAttributes.d.ts +4 -0
- package/dist/api/models/appAttributes.js +2 -0
- package/dist/api/models/branchesAttributes.d.ts +28 -0
- package/dist/api/models/branchesAttributes.js +2 -0
- package/dist/api/models/citiesAttributes.d.ts +12 -0
- package/dist/api/models/citiesAttributes.js +2 -0
- package/dist/api/models/costModelAttributes.d.ts +29 -0
- package/dist/api/models/costModelAttributes.js +2 -0
- package/dist/api/models/limitedSdkAttributes.d.ts +11 -0
- package/dist/api/models/limitedSdkAttributes.js +2 -0
- package/dist/api/models/movementsAttributes.d.ts +19 -0
- package/dist/api/models/movementsAttributes.js +2 -0
- package/dist/api/models/packagesAttributes.d.ts +70 -0
- package/dist/api/models/packagesAttributes.js +2 -0
- package/dist/api/models/packagesGroupAttributes.d.ts +8 -0
- package/dist/api/models/packagesGroupAttributes.js +2 -0
- package/dist/api/models/regionsAttributes.d.ts +11 -0
- package/dist/api/models/regionsAttributes.js +2 -0
- package/dist/api/models/sdksAttributes.d.ts +23 -0
- package/dist/api/models/sdksAttributes.js +2 -0
- package/dist/api/services/RegionsControllerService.d.ts +30 -0
- package/dist/api/services/RegionsControllerService.js +49 -0
- package/dist/api/services/SdkControllerService.d.ts +54 -0
- package/dist/api/services/SdkControllerService.js +94 -0
- package/dist/api/services/SdkPackagesControllerService.d.ts +55 -0
- package/dist/api/services/SdkPackagesControllerService.js +109 -0
- package/dist/api/services/SdkRegionsControllerService.d.ts +17 -0
- package/dist/api/services/SdkRegionsControllerService.js +36 -0
- package/dist/api-handler.d.ts +10 -0
- package/dist/api-handler.js +26 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +130 -0
- package/dist/sdk.spec.d.ts +1 -0
- package/dist/sdk.spec.js +150 -0
- package/package.json +38 -0
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.request = exports.catchErrorCodes = exports.getResponseBody = exports.getResponseHeader = exports.sendRequest = exports.getRequestBody = exports.getHeaders = exports.resolve = exports.getFormData = exports.getQueryString = exports.base64 = exports.isSuccess = exports.isFormData = exports.isBlob = exports.isStringWithValue = exports.isString = exports.isDefined = void 0;
|
|
7
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
8
|
+
/* istanbul ignore file */
|
|
9
|
+
/* tslint:disable */
|
|
10
|
+
/* eslint-disable */
|
|
11
|
+
const axios_1 = __importDefault(require("axios"));
|
|
12
|
+
const form_data_1 = __importDefault(require("form-data"));
|
|
13
|
+
const ApiError_1 = require("./ApiError");
|
|
14
|
+
const CancelablePromise_1 = require("./CancelablePromise");
|
|
15
|
+
const isDefined = (value) => {
|
|
16
|
+
return value !== undefined && value !== null;
|
|
17
|
+
};
|
|
18
|
+
exports.isDefined = isDefined;
|
|
19
|
+
const isString = (value) => {
|
|
20
|
+
return typeof value === 'string';
|
|
21
|
+
};
|
|
22
|
+
exports.isString = isString;
|
|
23
|
+
const isStringWithValue = (value) => {
|
|
24
|
+
return (0, exports.isString)(value) && value !== '';
|
|
25
|
+
};
|
|
26
|
+
exports.isStringWithValue = isStringWithValue;
|
|
27
|
+
const isBlob = (value) => {
|
|
28
|
+
return (typeof value === 'object' &&
|
|
29
|
+
typeof value.type === 'string' &&
|
|
30
|
+
typeof value.stream === 'function' &&
|
|
31
|
+
typeof value.arrayBuffer === 'function' &&
|
|
32
|
+
typeof value.constructor === 'function' &&
|
|
33
|
+
typeof value.constructor.name === 'string' &&
|
|
34
|
+
/^(Blob|File)$/.test(value.constructor.name) &&
|
|
35
|
+
/^(Blob|File)$/.test(value[Symbol.toStringTag]));
|
|
36
|
+
};
|
|
37
|
+
exports.isBlob = isBlob;
|
|
38
|
+
const isFormData = (value) => {
|
|
39
|
+
return value instanceof form_data_1.default;
|
|
40
|
+
};
|
|
41
|
+
exports.isFormData = isFormData;
|
|
42
|
+
const isSuccess = (status) => {
|
|
43
|
+
return status >= 200 && status < 300;
|
|
44
|
+
};
|
|
45
|
+
exports.isSuccess = isSuccess;
|
|
46
|
+
const base64 = (str) => {
|
|
47
|
+
try {
|
|
48
|
+
return btoa(str);
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
// @ts-ignore
|
|
52
|
+
return Buffer.from(str).toString('base64');
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
exports.base64 = base64;
|
|
56
|
+
const getQueryString = (params) => {
|
|
57
|
+
const qs = [];
|
|
58
|
+
const append = (key, value) => {
|
|
59
|
+
qs.push(`${encodeURIComponent(key)}=${encodeURIComponent(String(value))}`);
|
|
60
|
+
};
|
|
61
|
+
const process = (key, value) => {
|
|
62
|
+
if ((0, exports.isDefined)(value)) {
|
|
63
|
+
if (Array.isArray(value)) {
|
|
64
|
+
value.forEach(v => {
|
|
65
|
+
process(key, v);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
else if (typeof value === 'object') {
|
|
69
|
+
Object.entries(value).forEach(([k, v]) => {
|
|
70
|
+
process(`${key}[${k}]`, v);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
else {
|
|
74
|
+
append(key, value);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
};
|
|
78
|
+
Object.entries(params).forEach(([key, value]) => {
|
|
79
|
+
process(key, value);
|
|
80
|
+
});
|
|
81
|
+
if (qs.length > 0) {
|
|
82
|
+
return `?${qs.join('&')}`;
|
|
83
|
+
}
|
|
84
|
+
return '';
|
|
85
|
+
};
|
|
86
|
+
exports.getQueryString = getQueryString;
|
|
87
|
+
const getUrl = (config, options) => {
|
|
88
|
+
const encoder = config.ENCODE_PATH || encodeURI;
|
|
89
|
+
const path = options.url
|
|
90
|
+
.replace('{api-version}', config.VERSION)
|
|
91
|
+
.replace(/{(.*?)}/g, (substring, group) => {
|
|
92
|
+
var _a;
|
|
93
|
+
if ((_a = options.path) === null || _a === void 0 ? void 0 : _a.hasOwnProperty(group)) {
|
|
94
|
+
return encoder(String(options.path[group]));
|
|
95
|
+
}
|
|
96
|
+
return substring;
|
|
97
|
+
});
|
|
98
|
+
const url = `${config.BASE}${path}`;
|
|
99
|
+
if (options.query) {
|
|
100
|
+
return `${url}${(0, exports.getQueryString)(options.query)}`;
|
|
101
|
+
}
|
|
102
|
+
return url;
|
|
103
|
+
};
|
|
104
|
+
const getFormData = (options) => {
|
|
105
|
+
if (options.formData) {
|
|
106
|
+
const formData = new form_data_1.default();
|
|
107
|
+
const process = (key, value) => {
|
|
108
|
+
if ((0, exports.isString)(value) || (0, exports.isBlob)(value)) {
|
|
109
|
+
formData.append(key, value);
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
formData.append(key, JSON.stringify(value));
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
Object.entries(options.formData)
|
|
116
|
+
.filter(([_, value]) => (0, exports.isDefined)(value))
|
|
117
|
+
.forEach(([key, value]) => {
|
|
118
|
+
if (Array.isArray(value)) {
|
|
119
|
+
value.forEach(v => process(key, v));
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
process(key, value);
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
return formData;
|
|
126
|
+
}
|
|
127
|
+
return undefined;
|
|
128
|
+
};
|
|
129
|
+
exports.getFormData = getFormData;
|
|
130
|
+
const resolve = async (options, resolver) => {
|
|
131
|
+
if (typeof resolver === 'function') {
|
|
132
|
+
return resolver(options);
|
|
133
|
+
}
|
|
134
|
+
return resolver;
|
|
135
|
+
};
|
|
136
|
+
exports.resolve = resolve;
|
|
137
|
+
const getHeaders = async (config, options, formData) => {
|
|
138
|
+
const [token, username, password, additionalHeaders] = await Promise.all([
|
|
139
|
+
(0, exports.resolve)(options, config.TOKEN),
|
|
140
|
+
(0, exports.resolve)(options, config.USERNAME),
|
|
141
|
+
(0, exports.resolve)(options, config.PASSWORD),
|
|
142
|
+
(0, exports.resolve)(options, config.HEADERS),
|
|
143
|
+
]);
|
|
144
|
+
const formHeaders = typeof (formData === null || formData === void 0 ? void 0 : formData.getHeaders) === 'function' && (formData === null || formData === void 0 ? void 0 : formData.getHeaders()) || {};
|
|
145
|
+
const headers = Object.entries({
|
|
146
|
+
Accept: 'application/json',
|
|
147
|
+
...additionalHeaders,
|
|
148
|
+
...options.headers,
|
|
149
|
+
...formHeaders,
|
|
150
|
+
})
|
|
151
|
+
.filter(([_, value]) => (0, exports.isDefined)(value))
|
|
152
|
+
.reduce((headers, [key, value]) => ({
|
|
153
|
+
...headers,
|
|
154
|
+
[key]: String(value),
|
|
155
|
+
}), {});
|
|
156
|
+
if ((0, exports.isStringWithValue)(token)) {
|
|
157
|
+
headers['Authorization'] = `Bearer ${token}`;
|
|
158
|
+
}
|
|
159
|
+
if ((0, exports.isStringWithValue)(username) && (0, exports.isStringWithValue)(password)) {
|
|
160
|
+
const credentials = (0, exports.base64)(`${username}:${password}`);
|
|
161
|
+
headers['Authorization'] = `Basic ${credentials}`;
|
|
162
|
+
}
|
|
163
|
+
if (options.body !== undefined) {
|
|
164
|
+
if (options.mediaType) {
|
|
165
|
+
headers['Content-Type'] = options.mediaType;
|
|
166
|
+
}
|
|
167
|
+
else if ((0, exports.isBlob)(options.body)) {
|
|
168
|
+
headers['Content-Type'] = options.body.type || 'application/octet-stream';
|
|
169
|
+
}
|
|
170
|
+
else if ((0, exports.isString)(options.body)) {
|
|
171
|
+
headers['Content-Type'] = 'text/plain';
|
|
172
|
+
}
|
|
173
|
+
else if (!(0, exports.isFormData)(options.body)) {
|
|
174
|
+
headers['Content-Type'] = 'application/json';
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
return headers;
|
|
178
|
+
};
|
|
179
|
+
exports.getHeaders = getHeaders;
|
|
180
|
+
const getRequestBody = (options) => {
|
|
181
|
+
if (options.body) {
|
|
182
|
+
return options.body;
|
|
183
|
+
}
|
|
184
|
+
return undefined;
|
|
185
|
+
};
|
|
186
|
+
exports.getRequestBody = getRequestBody;
|
|
187
|
+
const sendRequest = async (config, options, url, body, formData, headers, onCancel, axiosClient) => {
|
|
188
|
+
const source = axios_1.default.CancelToken.source();
|
|
189
|
+
const requestConfig = {
|
|
190
|
+
url,
|
|
191
|
+
headers,
|
|
192
|
+
data: body !== null && body !== void 0 ? body : formData,
|
|
193
|
+
method: options.method,
|
|
194
|
+
withCredentials: config.WITH_CREDENTIALS,
|
|
195
|
+
withXSRFToken: config.CREDENTIALS === 'include' ? config.WITH_CREDENTIALS : false,
|
|
196
|
+
cancelToken: source.token,
|
|
197
|
+
};
|
|
198
|
+
onCancel(() => source.cancel('The user aborted a request.'));
|
|
199
|
+
try {
|
|
200
|
+
return await axiosClient.request(requestConfig);
|
|
201
|
+
}
|
|
202
|
+
catch (error) {
|
|
203
|
+
const axiosError = error;
|
|
204
|
+
if (axiosError.response) {
|
|
205
|
+
return axiosError.response;
|
|
206
|
+
}
|
|
207
|
+
throw error;
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
exports.sendRequest = sendRequest;
|
|
211
|
+
const getResponseHeader = (response, responseHeader) => {
|
|
212
|
+
if (responseHeader) {
|
|
213
|
+
const content = response.headers[responseHeader];
|
|
214
|
+
if ((0, exports.isString)(content)) {
|
|
215
|
+
return content;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
return undefined;
|
|
219
|
+
};
|
|
220
|
+
exports.getResponseHeader = getResponseHeader;
|
|
221
|
+
const getResponseBody = (response) => {
|
|
222
|
+
if (response.status !== 204) {
|
|
223
|
+
return response.data;
|
|
224
|
+
}
|
|
225
|
+
return undefined;
|
|
226
|
+
};
|
|
227
|
+
exports.getResponseBody = getResponseBody;
|
|
228
|
+
const catchErrorCodes = (options, result) => {
|
|
229
|
+
var _a, _b;
|
|
230
|
+
const errors = {
|
|
231
|
+
400: 'Bad Request',
|
|
232
|
+
401: 'Unauthorized',
|
|
233
|
+
403: 'Forbidden',
|
|
234
|
+
404: 'Not Found',
|
|
235
|
+
500: 'Internal Server Error',
|
|
236
|
+
502: 'Bad Gateway',
|
|
237
|
+
503: 'Service Unavailable',
|
|
238
|
+
...options.errors,
|
|
239
|
+
};
|
|
240
|
+
const error = errors[result.status];
|
|
241
|
+
if (error) {
|
|
242
|
+
throw new ApiError_1.ApiError(options, result, error);
|
|
243
|
+
}
|
|
244
|
+
if (!result.ok) {
|
|
245
|
+
const errorStatus = (_a = result.status) !== null && _a !== void 0 ? _a : 'unknown';
|
|
246
|
+
const errorStatusText = (_b = result.statusText) !== null && _b !== void 0 ? _b : 'unknown';
|
|
247
|
+
const errorBody = (() => {
|
|
248
|
+
try {
|
|
249
|
+
return JSON.stringify(result.body, null, 2);
|
|
250
|
+
}
|
|
251
|
+
catch (e) {
|
|
252
|
+
return undefined;
|
|
253
|
+
}
|
|
254
|
+
})();
|
|
255
|
+
throw new ApiError_1.ApiError(options, result, `Generic Error: status: ${errorStatus}; status text: ${errorStatusText}; body: ${errorBody}`);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
exports.catchErrorCodes = catchErrorCodes;
|
|
259
|
+
/**
|
|
260
|
+
* Request method
|
|
261
|
+
* @param config The OpenAPI configuration object
|
|
262
|
+
* @param options The request options from the service
|
|
263
|
+
* @param axiosClient The axios client instance to use
|
|
264
|
+
* @returns CancelablePromise<T>
|
|
265
|
+
* @throws ApiError
|
|
266
|
+
*/
|
|
267
|
+
const request = (config, options, axiosClient = axios_1.default) => {
|
|
268
|
+
return new CancelablePromise_1.CancelablePromise(async (resolve, reject, onCancel) => {
|
|
269
|
+
try {
|
|
270
|
+
const url = getUrl(config, options);
|
|
271
|
+
const formData = (0, exports.getFormData)(options);
|
|
272
|
+
const body = (0, exports.getRequestBody)(options);
|
|
273
|
+
const headers = await (0, exports.getHeaders)(config, options, formData);
|
|
274
|
+
if (!onCancel.isCancelled) {
|
|
275
|
+
const response = await (0, exports.sendRequest)(config, options, url, body, formData, headers, onCancel, axiosClient);
|
|
276
|
+
const responseBody = (0, exports.getResponseBody)(response);
|
|
277
|
+
const responseHeader = (0, exports.getResponseHeader)(response, options.responseHeader);
|
|
278
|
+
const result = {
|
|
279
|
+
url,
|
|
280
|
+
ok: (0, exports.isSuccess)(response.status),
|
|
281
|
+
status: response.status,
|
|
282
|
+
statusText: response.statusText,
|
|
283
|
+
body: responseHeader !== null && responseHeader !== void 0 ? responseHeader : responseBody,
|
|
284
|
+
};
|
|
285
|
+
(0, exports.catchErrorCodes)(options, result);
|
|
286
|
+
resolve(result.body);
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
catch (error) {
|
|
290
|
+
reject(error);
|
|
291
|
+
}
|
|
292
|
+
});
|
|
293
|
+
};
|
|
294
|
+
exports.request = request;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export { ApiError } from './core/ApiError';
|
|
2
|
+
export { CancelablePromise, CancelError } from './core/CancelablePromise';
|
|
3
|
+
export { OpenAPI } from './core/OpenAPI';
|
|
4
|
+
export type { OpenAPIConfig } from './core/OpenAPI';
|
|
5
|
+
export { AppLevel } from './models/AppLevel';
|
|
6
|
+
export { BillingType } from './models/BillingType';
|
|
7
|
+
export type { branchesAttributes } from './models/branchesAttributes';
|
|
8
|
+
export type { BranchId } from './models/BranchId';
|
|
9
|
+
export type { BranchLedgerAttributes } from './models/BranchLedgerAttributes';
|
|
10
|
+
export type { CalculateCostAttributes } from './models/CalculateCostAttributes';
|
|
11
|
+
export type { CheckBlackListAttribute } from './models/CheckBlackListAttribute';
|
|
12
|
+
export type { citiesAttributes } from './models/citiesAttributes';
|
|
13
|
+
export type { ClientAttributes } from './models/ClientAttributes';
|
|
14
|
+
export type { ClientCreationAttributes } from './models/ClientCreationAttributes';
|
|
15
|
+
export { ClientTypeEnum } from './models/ClientTypeEnum';
|
|
16
|
+
export type { CostId } from './models/CostId';
|
|
17
|
+
export type { costModelAttributes } from './models/costModelAttributes';
|
|
18
|
+
export { Currencies } from './models/Currencies';
|
|
19
|
+
export type { EndpointId } from './models/EndpointId';
|
|
20
|
+
export type { HttpSuccess } from './models/HttpSuccess';
|
|
21
|
+
export { LedgerCategory } from './models/LedgerCategory';
|
|
22
|
+
export { LedgerStatus } from './models/LedgerStatus';
|
|
23
|
+
export { LedgerType } from './models/LedgerType';
|
|
24
|
+
export type { limitedSdkAttributes } from './models/limitedSdkAttributes';
|
|
25
|
+
export type { movementsAttributes } from './models/movementsAttributes';
|
|
26
|
+
export { MovementsStatusAttributes } from './models/MovementsStatusAttributes';
|
|
27
|
+
export type { PackageId } from './models/PackageId';
|
|
28
|
+
export { PackagePlatform } from './models/PackagePlatform';
|
|
29
|
+
export type { packagesAttributes } from './models/packagesAttributes';
|
|
30
|
+
export type { packagesGroupAttributes } from './models/packagesGroupAttributes';
|
|
31
|
+
export { PackageType } from './models/PackageType';
|
|
32
|
+
export { ProofOfDeliveryType } from './models/ProofOfDeliveryType';
|
|
33
|
+
export { ReferenceType } from './models/ReferenceType';
|
|
34
|
+
export type { regionsAttributes } from './models/regionsAttributes';
|
|
35
|
+
export type { SdkId } from './models/SdkId';
|
|
36
|
+
export type { SdkInfoAttributes } from './models/SdkInfoAttributes';
|
|
37
|
+
export type { SdkLedgerOverview } from './models/SdkLedgerOverview';
|
|
38
|
+
export type { SdkPackagesCreationAttributes } from './models/SdkPackagesCreationAttributes';
|
|
39
|
+
export { ShippingOption } from './models/ShippingOption';
|
|
40
|
+
export type { ShippingServiceData } from './models/ShippingServiceData';
|
|
41
|
+
export { Sizes } from './models/Sizes';
|
|
42
|
+
export type { TenantId } from './models/TenantId';
|
|
43
|
+
export type { UserId } from './models/UserId';
|
|
44
|
+
export { SdkControllerService } from './services/SdkControllerService';
|
|
45
|
+
export { SdkPackagesControllerService } from './services/SdkPackagesControllerService';
|
|
46
|
+
export { SdkRegionsControllerService } from './services/SdkRegionsControllerService';
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SdkRegionsControllerService = exports.SdkPackagesControllerService = exports.SdkControllerService = exports.Sizes = exports.ShippingOption = exports.ReferenceType = exports.ProofOfDeliveryType = exports.PackageType = exports.PackagePlatform = exports.MovementsStatusAttributes = exports.LedgerType = exports.LedgerStatus = exports.LedgerCategory = exports.Currencies = exports.ClientTypeEnum = exports.BillingType = exports.AppLevel = exports.OpenAPI = exports.CancelError = exports.CancelablePromise = exports.ApiError = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var ApiError_1 = require("./core/ApiError");
|
|
9
|
+
Object.defineProperty(exports, "ApiError", { enumerable: true, get: function () { return ApiError_1.ApiError; } });
|
|
10
|
+
var CancelablePromise_1 = require("./core/CancelablePromise");
|
|
11
|
+
Object.defineProperty(exports, "CancelablePromise", { enumerable: true, get: function () { return CancelablePromise_1.CancelablePromise; } });
|
|
12
|
+
Object.defineProperty(exports, "CancelError", { enumerable: true, get: function () { return CancelablePromise_1.CancelError; } });
|
|
13
|
+
var OpenAPI_1 = require("./core/OpenAPI");
|
|
14
|
+
Object.defineProperty(exports, "OpenAPI", { enumerable: true, get: function () { return OpenAPI_1.OpenAPI; } });
|
|
15
|
+
var AppLevel_1 = require("./models/AppLevel");
|
|
16
|
+
Object.defineProperty(exports, "AppLevel", { enumerable: true, get: function () { return AppLevel_1.AppLevel; } });
|
|
17
|
+
var BillingType_1 = require("./models/BillingType");
|
|
18
|
+
Object.defineProperty(exports, "BillingType", { enumerable: true, get: function () { return BillingType_1.BillingType; } });
|
|
19
|
+
var ClientTypeEnum_1 = require("./models/ClientTypeEnum");
|
|
20
|
+
Object.defineProperty(exports, "ClientTypeEnum", { enumerable: true, get: function () { return ClientTypeEnum_1.ClientTypeEnum; } });
|
|
21
|
+
var Currencies_1 = require("./models/Currencies");
|
|
22
|
+
Object.defineProperty(exports, "Currencies", { enumerable: true, get: function () { return Currencies_1.Currencies; } });
|
|
23
|
+
var LedgerCategory_1 = require("./models/LedgerCategory");
|
|
24
|
+
Object.defineProperty(exports, "LedgerCategory", { enumerable: true, get: function () { return LedgerCategory_1.LedgerCategory; } });
|
|
25
|
+
var LedgerStatus_1 = require("./models/LedgerStatus");
|
|
26
|
+
Object.defineProperty(exports, "LedgerStatus", { enumerable: true, get: function () { return LedgerStatus_1.LedgerStatus; } });
|
|
27
|
+
var LedgerType_1 = require("./models/LedgerType");
|
|
28
|
+
Object.defineProperty(exports, "LedgerType", { enumerable: true, get: function () { return LedgerType_1.LedgerType; } });
|
|
29
|
+
var MovementsStatusAttributes_1 = require("./models/MovementsStatusAttributes");
|
|
30
|
+
Object.defineProperty(exports, "MovementsStatusAttributes", { enumerable: true, get: function () { return MovementsStatusAttributes_1.MovementsStatusAttributes; } });
|
|
31
|
+
var PackagePlatform_1 = require("./models/PackagePlatform");
|
|
32
|
+
Object.defineProperty(exports, "PackagePlatform", { enumerable: true, get: function () { return PackagePlatform_1.PackagePlatform; } });
|
|
33
|
+
var PackageType_1 = require("./models/PackageType");
|
|
34
|
+
Object.defineProperty(exports, "PackageType", { enumerable: true, get: function () { return PackageType_1.PackageType; } });
|
|
35
|
+
var ProofOfDeliveryType_1 = require("./models/ProofOfDeliveryType");
|
|
36
|
+
Object.defineProperty(exports, "ProofOfDeliveryType", { enumerable: true, get: function () { return ProofOfDeliveryType_1.ProofOfDeliveryType; } });
|
|
37
|
+
var ReferenceType_1 = require("./models/ReferenceType");
|
|
38
|
+
Object.defineProperty(exports, "ReferenceType", { enumerable: true, get: function () { return ReferenceType_1.ReferenceType; } });
|
|
39
|
+
var ShippingOption_1 = require("./models/ShippingOption");
|
|
40
|
+
Object.defineProperty(exports, "ShippingOption", { enumerable: true, get: function () { return ShippingOption_1.ShippingOption; } });
|
|
41
|
+
var Sizes_1 = require("./models/Sizes");
|
|
42
|
+
Object.defineProperty(exports, "Sizes", { enumerable: true, get: function () { return Sizes_1.Sizes; } });
|
|
43
|
+
var SdkControllerService_1 = require("./services/SdkControllerService");
|
|
44
|
+
Object.defineProperty(exports, "SdkControllerService", { enumerable: true, get: function () { return SdkControllerService_1.SdkControllerService; } });
|
|
45
|
+
var SdkPackagesControllerService_1 = require("./services/SdkPackagesControllerService");
|
|
46
|
+
Object.defineProperty(exports, "SdkPackagesControllerService", { enumerable: true, get: function () { return SdkPackagesControllerService_1.SdkPackagesControllerService; } });
|
|
47
|
+
var SdkRegionsControllerService_1 = require("./services/SdkRegionsControllerService");
|
|
48
|
+
Object.defineProperty(exports, "SdkRegionsControllerService", { enumerable: true, get: function () { return SdkRegionsControllerService_1.SdkRegionsControllerService; } });
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AppLevel = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var AppLevel;
|
|
9
|
+
(function (AppLevel) {
|
|
10
|
+
AppLevel["PRIVATE"] = "private";
|
|
11
|
+
AppLevel["PUBLIC"] = "public";
|
|
12
|
+
AppLevel["NATIONAL"] = "national";
|
|
13
|
+
})(AppLevel || (exports.AppLevel = AppLevel = {}));
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BillingType = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var BillingType;
|
|
9
|
+
(function (BillingType) {
|
|
10
|
+
BillingType["NONE"] = "none";
|
|
11
|
+
BillingType["PREPAID"] = "prepaid";
|
|
12
|
+
BillingType["POSTPAID"] = "postpaid";
|
|
13
|
+
})(BillingType || (exports.BillingType = BillingType = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type BranchId = string;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { BranchId } from './BranchId';
|
|
2
|
+
import type { Currencies } from './Currencies';
|
|
3
|
+
import type { LedgerCategory } from './LedgerCategory';
|
|
4
|
+
import type { LedgerStatus } from './LedgerStatus';
|
|
5
|
+
import type { LedgerType } from './LedgerType';
|
|
6
|
+
import type { ReferenceType } from './ReferenceType';
|
|
7
|
+
import type { UserId } from './UserId';
|
|
8
|
+
export type BranchLedgerAttributes = {
|
|
9
|
+
id: string;
|
|
10
|
+
branchId: BranchId;
|
|
11
|
+
userId?: UserId;
|
|
12
|
+
appId?: string;
|
|
13
|
+
limitedAppId?: string;
|
|
14
|
+
referenceType: ReferenceType;
|
|
15
|
+
packageId?: string;
|
|
16
|
+
type: LedgerType;
|
|
17
|
+
category: LedgerCategory;
|
|
18
|
+
amount: number;
|
|
19
|
+
currency: Currencies;
|
|
20
|
+
status: LedgerStatus;
|
|
21
|
+
createdAt?: string;
|
|
22
|
+
updatedAt?: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { BranchId } from './BranchId';
|
|
2
|
+
import type { CostId } from './CostId';
|
|
3
|
+
import type { ShippingOption } from './ShippingOption';
|
|
4
|
+
export type CalculateCostAttributes = {
|
|
5
|
+
costId: CostId;
|
|
6
|
+
branchId: BranchId;
|
|
7
|
+
receiverLng?: number;
|
|
8
|
+
receiverLat?: number;
|
|
9
|
+
receiverAddress?: string;
|
|
10
|
+
receiverCityId: number;
|
|
11
|
+
shippingOption: ShippingOption;
|
|
12
|
+
isPickup: boolean;
|
|
13
|
+
weight: number;
|
|
14
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { ClientTypeEnum } from './ClientTypeEnum';
|
|
2
|
+
import type { TenantId } from './TenantId';
|
|
3
|
+
import type { UserId } from './UserId';
|
|
4
|
+
export type ClientAttributes = {
|
|
5
|
+
id: string;
|
|
6
|
+
tenantId: TenantId;
|
|
7
|
+
userId?: UserId;
|
|
8
|
+
appId?: string;
|
|
9
|
+
countryId: number;
|
|
10
|
+
cityId: number;
|
|
11
|
+
firstName: string;
|
|
12
|
+
lastName: string;
|
|
13
|
+
postCode?: string;
|
|
14
|
+
houseNumber?: string;
|
|
15
|
+
address: string;
|
|
16
|
+
phone: string;
|
|
17
|
+
email?: string;
|
|
18
|
+
isVerified: boolean;
|
|
19
|
+
lng?: number;
|
|
20
|
+
lat?: number;
|
|
21
|
+
type: ClientTypeEnum;
|
|
22
|
+
comment?: string;
|
|
23
|
+
hasBan?: boolean;
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
updatedAt?: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ClientTypeEnum = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var ClientTypeEnum;
|
|
9
|
+
(function (ClientTypeEnum) {
|
|
10
|
+
ClientTypeEnum["BUSINESS"] = "Business";
|
|
11
|
+
ClientTypeEnum["CLIENT"] = "Client";
|
|
12
|
+
})(ClientTypeEnum || (exports.ClientTypeEnum = ClientTypeEnum = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type CostId = string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Currencies = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var Currencies;
|
|
9
|
+
(function (Currencies) {
|
|
10
|
+
Currencies["USD"] = "USD";
|
|
11
|
+
Currencies["EURO"] = "EURO";
|
|
12
|
+
Currencies["EGP"] = "EGP";
|
|
13
|
+
Currencies["DZD"] = "DZD";
|
|
14
|
+
Currencies["SYP"] = "SYP";
|
|
15
|
+
})(Currencies || (exports.Currencies = Currencies = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type EndpointId = string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LedgerCategory = void 0;
|
|
4
|
+
/* generated using openapi-typescript-codegen -- do not edit */
|
|
5
|
+
/* istanbul ignore file */
|
|
6
|
+
/* tslint:disable */
|
|
7
|
+
/* eslint-disable */
|
|
8
|
+
var LedgerCategory;
|
|
9
|
+
(function (LedgerCategory) {
|
|
10
|
+
LedgerCategory["SHIPPING"] = "SHIPPING";
|
|
11
|
+
LedgerCategory["CUSTOMS"] = "CUSTOMS";
|
|
12
|
+
LedgerCategory["CLIENT"] = "CLIENT";
|
|
13
|
+
LedgerCategory["TENANT"] = "TENANT";
|
|
14
|
+
LedgerCategory["OTHER"] = "OTHER";
|
|
15
|
+
})(LedgerCategory || (exports.LedgerCategory = LedgerCategory = {}));
|