doboxa-js 1.0.1 → 1.0.2

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.
Files changed (43) hide show
  1. package/dist/chunk-36DDSV5T.mjs +3077 -0
  2. package/dist/chunk-36DDSV5T.mjs.map +1 -0
  3. package/dist/chunk-CGJD4ZO5.mjs +107 -0
  4. package/dist/chunk-CGJD4ZO5.mjs.map +1 -0
  5. package/dist/client.js +2046 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/client.mjs +8 -0
  8. package/dist/client.mjs.map +1 -0
  9. package/dist/errors.js +91 -0
  10. package/dist/errors.js.map +1 -0
  11. package/dist/errors.mjs +15 -0
  12. package/dist/errors.mjs.map +1 -0
  13. package/dist/index.js +3724 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/index.mjs +719 -0
  16. package/dist/index.mjs.map +1 -0
  17. package/dist/models.js +1 -0
  18. package/dist/models.js.map +1 -0
  19. package/dist/models.mjs +1 -0
  20. package/dist/models.mjs.map +1 -0
  21. package/package.json +8 -1
  22. package/api-doc.yaml +0 -2013
  23. package/openapi-generator-config.yaml +0 -15
  24. package/openapitools.json +0 -7
  25. package/src/client.ts +0 -99
  26. package/src/errors.ts +0 -90
  27. package/src/http/client.ts +0 -156
  28. package/src/index.ts +0 -31
  29. package/src/models.ts +0 -0
  30. package/src/resources/authentication.ts +0 -73
  31. package/src/resources/clients.ts +0 -32
  32. package/src/resources/discountCodes.ts +0 -32
  33. package/src/resources/invoices.ts +0 -46
  34. package/src/resources/orderComments.ts +0 -38
  35. package/src/resources/orderStatusChanges.ts +0 -38
  36. package/src/resources/orders.ts +0 -123
  37. package/src/resources/trackingNumbers.ts +0 -38
  38. package/src/resources/users.ts +0 -28
  39. package/src/types/index.ts +0 -59
  40. package/src/utils/config.ts +0 -10
  41. package/src/utils/tokenManager.ts +0 -68
  42. package/tsconfig.json +0 -12
  43. package/tsup.config.ts +0 -30
package/dist/index.js ADDED
@@ -0,0 +1,3724 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
+ var __spreadValues = (a, b) => {
11
+ for (var prop in b || (b = {}))
12
+ if (__hasOwnProp.call(b, prop))
13
+ __defNormalProp(a, prop, b[prop]);
14
+ if (__getOwnPropSymbols)
15
+ for (var prop of __getOwnPropSymbols(b)) {
16
+ if (__propIsEnum.call(b, prop))
17
+ __defNormalProp(a, prop, b[prop]);
18
+ }
19
+ return a;
20
+ };
21
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
+ var __export = (target, all) => {
23
+ for (var name in all)
24
+ __defProp(target, name, { get: all[name], enumerable: true });
25
+ };
26
+ var __copyProps = (to, from, except, desc) => {
27
+ if (from && typeof from === "object" || typeof from === "function") {
28
+ for (let key of __getOwnPropNames(from))
29
+ if (!__hasOwnProp.call(to, key) && key !== except)
30
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
31
+ }
32
+ return to;
33
+ };
34
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
35
+ var __async = (__this, __arguments, generator) => {
36
+ return new Promise((resolve, reject) => {
37
+ var fulfilled = (value) => {
38
+ try {
39
+ step(generator.next(value));
40
+ } catch (e) {
41
+ reject(e);
42
+ }
43
+ };
44
+ var rejected = (value) => {
45
+ try {
46
+ step(generator.throw(value));
47
+ } catch (e) {
48
+ reject(e);
49
+ }
50
+ };
51
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
52
+ step((generator = generator.apply(__this, __arguments)).next());
53
+ });
54
+ };
55
+
56
+ // src/index.ts
57
+ var src_exports = {};
58
+ __export(src_exports, {
59
+ ApiV2AuthenticationRefreshTokenPost200ResponseFromJSON: () => ApiV2AuthenticationRefreshTokenPost200ResponseFromJSON,
60
+ ApiV2AuthenticationRefreshTokenPost200ResponseFromJSONTyped: () => ApiV2AuthenticationRefreshTokenPost200ResponseFromJSONTyped,
61
+ ApiV2AuthenticationRefreshTokenPost200ResponseToJSON: () => ApiV2AuthenticationRefreshTokenPost200ResponseToJSON,
62
+ ApiV2AuthenticationRefreshTokenPost200ResponseToJSONTyped: () => ApiV2AuthenticationRefreshTokenPost200ResponseToJSONTyped,
63
+ ApiV2AuthenticationRefreshTokenPostRequestFromJSON: () => ApiV2AuthenticationRefreshTokenPostRequestFromJSON,
64
+ ApiV2AuthenticationRefreshTokenPostRequestFromJSONTyped: () => ApiV2AuthenticationRefreshTokenPostRequestFromJSONTyped,
65
+ ApiV2AuthenticationRefreshTokenPostRequestToJSON: () => ApiV2AuthenticationRefreshTokenPostRequestToJSON,
66
+ ApiV2AuthenticationRefreshTokenPostRequestToJSONTyped: () => ApiV2AuthenticationRefreshTokenPostRequestToJSONTyped,
67
+ ApiV2AuthenticationTokenPost200ResponseFromJSON: () => ApiV2AuthenticationTokenPost200ResponseFromJSON,
68
+ ApiV2AuthenticationTokenPost200ResponseFromJSONTyped: () => ApiV2AuthenticationTokenPost200ResponseFromJSONTyped,
69
+ ApiV2AuthenticationTokenPost200ResponseToJSON: () => ApiV2AuthenticationTokenPost200ResponseToJSON,
70
+ ApiV2AuthenticationTokenPost200ResponseToJSONTyped: () => ApiV2AuthenticationTokenPost200ResponseToJSONTyped,
71
+ ApiV2AuthenticationTokenPost401ResponseFromJSON: () => ApiV2AuthenticationTokenPost401ResponseFromJSON,
72
+ ApiV2AuthenticationTokenPost401ResponseFromJSONTyped: () => ApiV2AuthenticationTokenPost401ResponseFromJSONTyped,
73
+ ApiV2AuthenticationTokenPost401ResponseToJSON: () => ApiV2AuthenticationTokenPost401ResponseToJSON,
74
+ ApiV2AuthenticationTokenPost401ResponseToJSONTyped: () => ApiV2AuthenticationTokenPost401ResponseToJSONTyped,
75
+ ApiV2AuthenticationTokenPostRequestFromJSON: () => ApiV2AuthenticationTokenPostRequestFromJSON,
76
+ ApiV2AuthenticationTokenPostRequestFromJSONTyped: () => ApiV2AuthenticationTokenPostRequestFromJSONTyped,
77
+ ApiV2AuthenticationTokenPostRequestToJSON: () => ApiV2AuthenticationTokenPostRequestToJSON,
78
+ ApiV2AuthenticationTokenPostRequestToJSONTyped: () => ApiV2AuthenticationTokenPostRequestToJSONTyped,
79
+ AttachmentFromJSON: () => AttachmentFromJSON,
80
+ AttachmentFromJSONTyped: () => AttachmentFromJSONTyped,
81
+ AttachmentToJSON: () => AttachmentToJSON,
82
+ AttachmentToJSONTyped: () => AttachmentToJSONTyped,
83
+ AuthenticationResource: () => AuthenticationResource,
84
+ BillingAddressFromJSON: () => BillingAddressFromJSON,
85
+ BillingAddressFromJSONTyped: () => BillingAddressFromJSONTyped,
86
+ BillingAddressToJSON: () => BillingAddressToJSON,
87
+ BillingAddressToJSONTyped: () => BillingAddressToJSONTyped,
88
+ BoolFromJSON: () => BoolFromJSON,
89
+ BoolFromJSONTyped: () => BoolFromJSONTyped,
90
+ BoolToJSON: () => BoolToJSON,
91
+ BoolToJSONTyped: () => BoolToJSONTyped,
92
+ ClientFromJSON: () => ClientFromJSON,
93
+ ClientFromJSONTyped: () => ClientFromJSONTyped,
94
+ ClientToJSON: () => ClientToJSON,
95
+ ClientToJSONTyped: () => ClientToJSONTyped,
96
+ ClientsResource: () => ClientsResource,
97
+ CreateOrderCommentAuthorTypeEnum: () => CreateOrderCommentAuthorTypeEnum,
98
+ CreateOrderCommentFromJSON: () => CreateOrderCommentFromJSON,
99
+ CreateOrderCommentFromJSONTyped: () => CreateOrderCommentFromJSONTyped,
100
+ CreateOrderCommentToJSON: () => CreateOrderCommentToJSON,
101
+ CreateOrderCommentToJSONTyped: () => CreateOrderCommentToJSONTyped,
102
+ DeliveryAddressFromJSON: () => DeliveryAddressFromJSON,
103
+ DeliveryAddressFromJSONTyped: () => DeliveryAddressFromJSONTyped,
104
+ DeliveryAddressToJSON: () => DeliveryAddressToJSON,
105
+ DeliveryAddressToJSONTyped: () => DeliveryAddressToJSONTyped,
106
+ DiscountCodesResource: () => DiscountCodesResource,
107
+ Doboxa: () => Doboxa,
108
+ DoboxaAPIError: () => DoboxaAPIError,
109
+ DoboxaAuthenticationError: () => DoboxaAuthenticationError,
110
+ DoboxaError: () => DoboxaError,
111
+ DoboxaValidationError: () => DoboxaValidationError,
112
+ GetApiV2DiscountCodesExternal200ResponseFromJSON: () => GetApiV2DiscountCodesExternal200ResponseFromJSON,
113
+ GetApiV2DiscountCodesExternal200ResponseFromJSONTyped: () => GetApiV2DiscountCodesExternal200ResponseFromJSONTyped,
114
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSON: () => GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSON,
115
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSONTyped: () => GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSONTyped,
116
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSON: () => GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSON,
117
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSONTyped: () => GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSONTyped,
118
+ GetApiV2DiscountCodesExternal200ResponseToJSON: () => GetApiV2DiscountCodesExternal200ResponseToJSON,
119
+ GetApiV2DiscountCodesExternal200ResponseToJSONTyped: () => GetApiV2DiscountCodesExternal200ResponseToJSONTyped,
120
+ InvalidParameterFromJSON: () => InvalidParameterFromJSON,
121
+ InvalidParameterFromJSONTyped: () => InvalidParameterFromJSONTyped,
122
+ InvalidParameterToJSON: () => InvalidParameterToJSON,
123
+ InvalidParameterToJSONTyped: () => InvalidParameterToJSONTyped,
124
+ InvalidRequestDataResponseFromJSON: () => InvalidRequestDataResponseFromJSON,
125
+ InvalidRequestDataResponseFromJSONTyped: () => InvalidRequestDataResponseFromJSONTyped,
126
+ InvalidRequestDataResponseToJSON: () => InvalidRequestDataResponseToJSON,
127
+ InvalidRequestDataResponseToJSONTyped: () => InvalidRequestDataResponseToJSONTyped,
128
+ InvoiceDocumentTypeEnum: () => InvoiceDocumentTypeEnum,
129
+ InvoiceFromJSON: () => InvoiceFromJSON,
130
+ InvoiceFromJSONTyped: () => InvoiceFromJSONTyped,
131
+ InvoiceItemFromJSON: () => InvoiceItemFromJSON,
132
+ InvoiceItemFromJSONTyped: () => InvoiceItemFromJSONTyped,
133
+ InvoiceItemToJSON: () => InvoiceItemToJSON,
134
+ InvoiceItemToJSONTyped: () => InvoiceItemToJSONTyped,
135
+ InvoiceOrderFromJSON: () => InvoiceOrderFromJSON,
136
+ InvoiceOrderFromJSONTyped: () => InvoiceOrderFromJSONTyped,
137
+ InvoiceOrderItemFromJSON: () => InvoiceOrderItemFromJSON,
138
+ InvoiceOrderItemFromJSONTyped: () => InvoiceOrderItemFromJSONTyped,
139
+ InvoiceOrderItemToJSON: () => InvoiceOrderItemToJSON,
140
+ InvoiceOrderItemToJSONTyped: () => InvoiceOrderItemToJSONTyped,
141
+ InvoiceOrderToJSON: () => InvoiceOrderToJSON,
142
+ InvoiceOrderToJSONTyped: () => InvoiceOrderToJSONTyped,
143
+ InvoiceStateEnum: () => InvoiceStateEnum,
144
+ InvoiceToJSON: () => InvoiceToJSON,
145
+ InvoiceToJSONTyped: () => InvoiceToJSONTyped,
146
+ InvoicesResource: () => InvoicesResource,
147
+ MeFromJSON: () => MeFromJSON,
148
+ MeFromJSONTyped: () => MeFromJSONTyped,
149
+ MeToJSON: () => MeToJSON,
150
+ MeToJSONTyped: () => MeToJSONTyped,
151
+ OrderCancellationFromJSON: () => OrderCancellationFromJSON,
152
+ OrderCancellationFromJSONTyped: () => OrderCancellationFromJSONTyped,
153
+ OrderCancellationResponseDetailsEnum: () => OrderCancellationResponseDetailsEnum,
154
+ OrderCancellationResponseFromJSON: () => OrderCancellationResponseFromJSON,
155
+ OrderCancellationResponseFromJSONTyped: () => OrderCancellationResponseFromJSONTyped,
156
+ OrderCancellationResponseToJSON: () => OrderCancellationResponseToJSON,
157
+ OrderCancellationResponseToJSONTyped: () => OrderCancellationResponseToJSONTyped,
158
+ OrderCancellationToJSON: () => OrderCancellationToJSON,
159
+ OrderCancellationToJSONTyped: () => OrderCancellationToJSONTyped,
160
+ OrderCommentAuthorTypeEnum: () => OrderCommentAuthorTypeEnum,
161
+ OrderCommentFromJSON: () => OrderCommentFromJSON,
162
+ OrderCommentFromJSONTyped: () => OrderCommentFromJSONTyped,
163
+ OrderCommentToJSON: () => OrderCommentToJSON,
164
+ OrderCommentToJSONTyped: () => OrderCommentToJSONTyped,
165
+ OrderCommentsResource: () => OrderCommentsResource,
166
+ OrderFromJSON: () => OrderFromJSON,
167
+ OrderFromJSONTyped: () => OrderFromJSONTyped,
168
+ OrderItemCropDataFilterEnum: () => OrderItemCropDataFilterEnum,
169
+ OrderItemCropDataFromJSON: () => OrderItemCropDataFromJSON,
170
+ OrderItemCropDataFromJSONTyped: () => OrderItemCropDataFromJSONTyped,
171
+ OrderItemCropDataReflectionEnum: () => OrderItemCropDataReflectionEnum,
172
+ OrderItemCropDataToJSON: () => OrderItemCropDataToJSON,
173
+ OrderItemCropDataToJSONTyped: () => OrderItemCropDataToJSONTyped,
174
+ OrderItemFromJSON: () => OrderItemFromJSON,
175
+ OrderItemFromJSONTyped: () => OrderItemFromJSONTyped,
176
+ OrderItemOriginalDataFromJSON: () => OrderItemOriginalDataFromJSON,
177
+ OrderItemOriginalDataFromJSONTyped: () => OrderItemOriginalDataFromJSONTyped,
178
+ OrderItemOriginalDataToJSON: () => OrderItemOriginalDataToJSON,
179
+ OrderItemOriginalDataToJSONTyped: () => OrderItemOriginalDataToJSONTyped,
180
+ OrderItemStatusFromJSON: () => OrderItemStatusFromJSON,
181
+ OrderItemStatusFromJSONTyped: () => OrderItemStatusFromJSONTyped,
182
+ OrderItemStatusStatusEnum: () => OrderItemStatusStatusEnum,
183
+ OrderItemStatusToJSON: () => OrderItemStatusToJSON,
184
+ OrderItemStatusToJSONTyped: () => OrderItemStatusToJSONTyped,
185
+ OrderItemToJSON: () => OrderItemToJSON,
186
+ OrderItemToJSONTyped: () => OrderItemToJSONTyped,
187
+ OrderOriginalDataFromJSON: () => OrderOriginalDataFromJSON,
188
+ OrderOriginalDataFromJSONTyped: () => OrderOriginalDataFromJSONTyped,
189
+ OrderOriginalDataToJSON: () => OrderOriginalDataToJSON,
190
+ OrderOriginalDataToJSONTyped: () => OrderOriginalDataToJSONTyped,
191
+ OrderPaymentMethodEnum: () => OrderPaymentMethodEnum,
192
+ OrderStatusChangeFromJSON: () => OrderStatusChangeFromJSON,
193
+ OrderStatusChangeFromJSONTyped: () => OrderStatusChangeFromJSONTyped,
194
+ OrderStatusChangeStatusEnum: () => OrderStatusChangeStatusEnum,
195
+ OrderStatusChangeToJSON: () => OrderStatusChangeToJSON,
196
+ OrderStatusChangeToJSONTyped: () => OrderStatusChangeToJSONTyped,
197
+ OrderStatusChangesResource: () => OrderStatusChangesResource,
198
+ OrderStatusFromJSON: () => OrderStatusFromJSON,
199
+ OrderStatusFromJSONTyped: () => OrderStatusFromJSONTyped,
200
+ OrderStatusStatusEnum: () => OrderStatusStatusEnum,
201
+ OrderStatusToJSON: () => OrderStatusToJSON,
202
+ OrderStatusToJSONTyped: () => OrderStatusToJSONTyped,
203
+ OrderToJSON: () => OrderToJSON,
204
+ OrderToJSONTyped: () => OrderToJSONTyped,
205
+ OrdersResource: () => OrdersResource,
206
+ PageOfClientsFromJSON: () => PageOfClientsFromJSON,
207
+ PageOfClientsFromJSONTyped: () => PageOfClientsFromJSONTyped,
208
+ PageOfClientsToJSON: () => PageOfClientsToJSON,
209
+ PageOfClientsToJSONTyped: () => PageOfClientsToJSONTyped,
210
+ PageOfInvoicesFromJSON: () => PageOfInvoicesFromJSON,
211
+ PageOfInvoicesFromJSONTyped: () => PageOfInvoicesFromJSONTyped,
212
+ PageOfInvoicesToJSON: () => PageOfInvoicesToJSON,
213
+ PageOfInvoicesToJSONTyped: () => PageOfInvoicesToJSONTyped,
214
+ PageOfOrderCommentsFromJSON: () => PageOfOrderCommentsFromJSON,
215
+ PageOfOrderCommentsFromJSONTyped: () => PageOfOrderCommentsFromJSONTyped,
216
+ PageOfOrderCommentsToJSON: () => PageOfOrderCommentsToJSON,
217
+ PageOfOrderCommentsToJSONTyped: () => PageOfOrderCommentsToJSONTyped,
218
+ PageOfOrderStatusChangesFromJSON: () => PageOfOrderStatusChangesFromJSON,
219
+ PageOfOrderStatusChangesFromJSONTyped: () => PageOfOrderStatusChangesFromJSONTyped,
220
+ PageOfOrderStatusChangesToJSON: () => PageOfOrderStatusChangesToJSON,
221
+ PageOfOrderStatusChangesToJSONTyped: () => PageOfOrderStatusChangesToJSONTyped,
222
+ PageOfTrackingNumbersFromJSON: () => PageOfTrackingNumbersFromJSON,
223
+ PageOfTrackingNumbersFromJSONTyped: () => PageOfTrackingNumbersFromJSONTyped,
224
+ PageOfTrackingNumbersToJSON: () => PageOfTrackingNumbersToJSON,
225
+ PageOfTrackingNumbersToJSONTyped: () => PageOfTrackingNumbersToJSONTyped,
226
+ PostOrderCommentResponseFromJSON: () => PostOrderCommentResponseFromJSON,
227
+ PostOrderCommentResponseFromJSONTyped: () => PostOrderCommentResponseFromJSONTyped,
228
+ PostOrderCommentResponseToJSON: () => PostOrderCommentResponseToJSON,
229
+ PostOrderCommentResponseToJSONTyped: () => PostOrderCommentResponseToJSONTyped,
230
+ PostOrderResponseFromJSON: () => PostOrderResponseFromJSON,
231
+ PostOrderResponseFromJSONTyped: () => PostOrderResponseFromJSONTyped,
232
+ PostOrderResponseToJSON: () => PostOrderResponseToJSON,
233
+ PostOrderResponseToJSONTyped: () => PostOrderResponseToJSONTyped,
234
+ PostOrderStatusFromJSON: () => PostOrderStatusFromJSON,
235
+ PostOrderStatusFromJSONTyped: () => PostOrderStatusFromJSONTyped,
236
+ PostOrderStatusItemFromJSON: () => PostOrderStatusItemFromJSON,
237
+ PostOrderStatusItemFromJSONTyped: () => PostOrderStatusItemFromJSONTyped,
238
+ PostOrderStatusItemStatusEnum: () => PostOrderStatusItemStatusEnum,
239
+ PostOrderStatusItemToJSON: () => PostOrderStatusItemToJSON,
240
+ PostOrderStatusItemToJSONTyped: () => PostOrderStatusItemToJSONTyped,
241
+ PostOrderStatusResponseFromJSON: () => PostOrderStatusResponseFromJSON,
242
+ PostOrderStatusResponseFromJSONTyped: () => PostOrderStatusResponseFromJSONTyped,
243
+ PostOrderStatusResponseToJSON: () => PostOrderStatusResponseToJSON,
244
+ PostOrderStatusResponseToJSONTyped: () => PostOrderStatusResponseToJSONTyped,
245
+ PostOrderStatusStatusEnum: () => PostOrderStatusStatusEnum,
246
+ PostOrderStatusToJSON: () => PostOrderStatusToJSON,
247
+ PostOrderStatusToJSONTyped: () => PostOrderStatusToJSONTyped,
248
+ ReturnLabelFromJSON: () => ReturnLabelFromJSON,
249
+ ReturnLabelFromJSONTyped: () => ReturnLabelFromJSONTyped,
250
+ ReturnLabelToJSON: () => ReturnLabelToJSON,
251
+ ReturnLabelToJSONTyped: () => ReturnLabelToJSONTyped,
252
+ ServerErrorResponseFromJSON: () => ServerErrorResponseFromJSON,
253
+ ServerErrorResponseFromJSONTyped: () => ServerErrorResponseFromJSONTyped,
254
+ ServerErrorResponseToJSON: () => ServerErrorResponseToJSON,
255
+ ServerErrorResponseToJSONTyped: () => ServerErrorResponseToJSONTyped,
256
+ TrackingNumberFromJSON: () => TrackingNumberFromJSON,
257
+ TrackingNumberFromJSONTyped: () => TrackingNumberFromJSONTyped,
258
+ TrackingNumberItemFromJSON: () => TrackingNumberItemFromJSON,
259
+ TrackingNumberItemFromJSONTyped: () => TrackingNumberItemFromJSONTyped,
260
+ TrackingNumberItemToJSON: () => TrackingNumberItemToJSON,
261
+ TrackingNumberItemToJSONTyped: () => TrackingNumberItemToJSONTyped,
262
+ TrackingNumberToJSON: () => TrackingNumberToJSON,
263
+ TrackingNumberToJSONTyped: () => TrackingNumberToJSONTyped,
264
+ TrackingNumbersResource: () => TrackingNumbersResource,
265
+ UsersResource: () => UsersResource,
266
+ WaybillDeliveryMethodEnum: () => WaybillDeliveryMethodEnum,
267
+ WaybillFromJSON: () => WaybillFromJSON,
268
+ WaybillFromJSONTyped: () => WaybillFromJSONTyped,
269
+ WaybillToJSON: () => WaybillToJSON,
270
+ WaybillToJSONTyped: () => WaybillToJSONTyped,
271
+ default: () => src_default,
272
+ instanceOfApiV2AuthenticationRefreshTokenPost200Response: () => instanceOfApiV2AuthenticationRefreshTokenPost200Response,
273
+ instanceOfApiV2AuthenticationRefreshTokenPostRequest: () => instanceOfApiV2AuthenticationRefreshTokenPostRequest,
274
+ instanceOfApiV2AuthenticationTokenPost200Response: () => instanceOfApiV2AuthenticationTokenPost200Response,
275
+ instanceOfApiV2AuthenticationTokenPost401Response: () => instanceOfApiV2AuthenticationTokenPost401Response,
276
+ instanceOfApiV2AuthenticationTokenPostRequest: () => instanceOfApiV2AuthenticationTokenPostRequest,
277
+ instanceOfAttachment: () => instanceOfAttachment,
278
+ instanceOfBillingAddress: () => instanceOfBillingAddress,
279
+ instanceOfClient: () => instanceOfClient,
280
+ instanceOfCreateOrderComment: () => instanceOfCreateOrderComment,
281
+ instanceOfDeliveryAddress: () => instanceOfDeliveryAddress,
282
+ instanceOfGetApiV2DiscountCodesExternal200Response: () => instanceOfGetApiV2DiscountCodesExternal200Response,
283
+ instanceOfGetApiV2DiscountCodesExternal200ResponseItemsInner: () => instanceOfGetApiV2DiscountCodesExternal200ResponseItemsInner,
284
+ instanceOfInvalidParameter: () => instanceOfInvalidParameter,
285
+ instanceOfInvalidRequestDataResponse: () => instanceOfInvalidRequestDataResponse,
286
+ instanceOfInvoice: () => instanceOfInvoice,
287
+ instanceOfInvoiceItem: () => instanceOfInvoiceItem,
288
+ instanceOfInvoiceOrder: () => instanceOfInvoiceOrder,
289
+ instanceOfInvoiceOrderItem: () => instanceOfInvoiceOrderItem,
290
+ instanceOfMe: () => instanceOfMe,
291
+ instanceOfOrder: () => instanceOfOrder,
292
+ instanceOfOrderCancellation: () => instanceOfOrderCancellation,
293
+ instanceOfOrderCancellationResponse: () => instanceOfOrderCancellationResponse,
294
+ instanceOfOrderComment: () => instanceOfOrderComment,
295
+ instanceOfOrderItem: () => instanceOfOrderItem,
296
+ instanceOfOrderItemCropData: () => instanceOfOrderItemCropData,
297
+ instanceOfOrderItemOriginalData: () => instanceOfOrderItemOriginalData,
298
+ instanceOfOrderItemStatus: () => instanceOfOrderItemStatus,
299
+ instanceOfOrderOriginalData: () => instanceOfOrderOriginalData,
300
+ instanceOfOrderStatus: () => instanceOfOrderStatus,
301
+ instanceOfOrderStatusChange: () => instanceOfOrderStatusChange,
302
+ instanceOfPageOfClients: () => instanceOfPageOfClients,
303
+ instanceOfPageOfInvoices: () => instanceOfPageOfInvoices,
304
+ instanceOfPageOfOrderComments: () => instanceOfPageOfOrderComments,
305
+ instanceOfPageOfOrderStatusChanges: () => instanceOfPageOfOrderStatusChanges,
306
+ instanceOfPageOfTrackingNumbers: () => instanceOfPageOfTrackingNumbers,
307
+ instanceOfPostOrderCommentResponse: () => instanceOfPostOrderCommentResponse,
308
+ instanceOfPostOrderResponse: () => instanceOfPostOrderResponse,
309
+ instanceOfPostOrderStatus: () => instanceOfPostOrderStatus,
310
+ instanceOfPostOrderStatusItem: () => instanceOfPostOrderStatusItem,
311
+ instanceOfPostOrderStatusResponse: () => instanceOfPostOrderStatusResponse,
312
+ instanceOfReturnLabel: () => instanceOfReturnLabel,
313
+ instanceOfServerErrorResponse: () => instanceOfServerErrorResponse,
314
+ instanceOfTrackingNumber: () => instanceOfTrackingNumber,
315
+ instanceOfTrackingNumberItem: () => instanceOfTrackingNumberItem,
316
+ instanceOfWaybill: () => instanceOfWaybill,
317
+ parseErrorResponse: () => parseErrorResponse
318
+ });
319
+ module.exports = __toCommonJS(src_exports);
320
+
321
+ // src/types/generated/src/runtime.ts
322
+ var BASE_PATH = "http://localhost".replace(/\/+$/, "");
323
+ var Configuration = class {
324
+ constructor(configuration = {}) {
325
+ this.configuration = configuration;
326
+ }
327
+ set config(configuration) {
328
+ this.configuration = configuration;
329
+ }
330
+ get basePath() {
331
+ return this.configuration.basePath != null ? this.configuration.basePath : BASE_PATH;
332
+ }
333
+ get fetchApi() {
334
+ return this.configuration.fetchApi;
335
+ }
336
+ get middleware() {
337
+ return this.configuration.middleware || [];
338
+ }
339
+ get queryParamsStringify() {
340
+ return this.configuration.queryParamsStringify || querystring;
341
+ }
342
+ get username() {
343
+ return this.configuration.username;
344
+ }
345
+ get password() {
346
+ return this.configuration.password;
347
+ }
348
+ get apiKey() {
349
+ const apiKey = this.configuration.apiKey;
350
+ if (apiKey) {
351
+ return typeof apiKey === "function" ? apiKey : () => apiKey;
352
+ }
353
+ return void 0;
354
+ }
355
+ get accessToken() {
356
+ const accessToken = this.configuration.accessToken;
357
+ if (accessToken) {
358
+ return typeof accessToken === "function" ? accessToken : () => __async(this, null, function* () {
359
+ return accessToken;
360
+ });
361
+ }
362
+ return void 0;
363
+ }
364
+ get headers() {
365
+ return this.configuration.headers;
366
+ }
367
+ get credentials() {
368
+ return this.configuration.credentials;
369
+ }
370
+ };
371
+ var DefaultConfig = new Configuration();
372
+ var _BaseAPI = class _BaseAPI {
373
+ constructor(configuration = DefaultConfig) {
374
+ this.configuration = configuration;
375
+ this.fetchApi = (url, init) => __async(this, null, function* () {
376
+ let fetchParams = { url, init };
377
+ for (const middleware of this.middleware) {
378
+ if (middleware.pre) {
379
+ fetchParams = (yield middleware.pre(__spreadValues({
380
+ fetch: this.fetchApi
381
+ }, fetchParams))) || fetchParams;
382
+ }
383
+ }
384
+ let response = void 0;
385
+ try {
386
+ response = yield (this.configuration.fetchApi || fetch)(fetchParams.url, fetchParams.init);
387
+ } catch (e) {
388
+ for (const middleware of this.middleware) {
389
+ if (middleware.onError) {
390
+ response = (yield middleware.onError({
391
+ fetch: this.fetchApi,
392
+ url: fetchParams.url,
393
+ init: fetchParams.init,
394
+ error: e,
395
+ response: response ? response.clone() : void 0
396
+ })) || response;
397
+ }
398
+ }
399
+ if (response === void 0) {
400
+ if (e instanceof Error) {
401
+ throw new FetchError(e, "The request failed and the interceptors did not return an alternative response");
402
+ } else {
403
+ throw e;
404
+ }
405
+ }
406
+ }
407
+ for (const middleware of this.middleware) {
408
+ if (middleware.post) {
409
+ response = (yield middleware.post({
410
+ fetch: this.fetchApi,
411
+ url: fetchParams.url,
412
+ init: fetchParams.init,
413
+ response: response.clone()
414
+ })) || response;
415
+ }
416
+ }
417
+ return response;
418
+ });
419
+ this.middleware = configuration.middleware;
420
+ }
421
+ withMiddleware(...middlewares) {
422
+ const next = this.clone();
423
+ next.middleware = next.middleware.concat(...middlewares);
424
+ return next;
425
+ }
426
+ withPreMiddleware(...preMiddlewares) {
427
+ const middlewares = preMiddlewares.map((pre) => ({ pre }));
428
+ return this.withMiddleware(...middlewares);
429
+ }
430
+ withPostMiddleware(...postMiddlewares) {
431
+ const middlewares = postMiddlewares.map((post) => ({ post }));
432
+ return this.withMiddleware(...middlewares);
433
+ }
434
+ /**
435
+ * Check if the given MIME is a JSON MIME.
436
+ * JSON MIME examples:
437
+ * application/json
438
+ * application/json; charset=UTF8
439
+ * APPLICATION/JSON
440
+ * application/vnd.company+json
441
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
442
+ * @return True if the given MIME is JSON, false otherwise.
443
+ */
444
+ isJsonMime(mime) {
445
+ if (!mime) {
446
+ return false;
447
+ }
448
+ return _BaseAPI.jsonRegex.test(mime);
449
+ }
450
+ request(context, initOverrides) {
451
+ return __async(this, null, function* () {
452
+ const { url, init } = yield this.createFetchParams(context, initOverrides);
453
+ const response = yield this.fetchApi(url, init);
454
+ if (response && (response.status >= 200 && response.status < 300)) {
455
+ return response;
456
+ }
457
+ throw new ResponseError(response, "Response returned an error code");
458
+ });
459
+ }
460
+ createFetchParams(context, initOverrides) {
461
+ return __async(this, null, function* () {
462
+ let url = this.configuration.basePath + context.path;
463
+ if (context.query !== void 0 && Object.keys(context.query).length !== 0) {
464
+ url += "?" + this.configuration.queryParamsStringify(context.query);
465
+ }
466
+ const headers = Object.assign({}, this.configuration.headers, context.headers);
467
+ Object.keys(headers).forEach((key) => headers[key] === void 0 ? delete headers[key] : {});
468
+ const initOverrideFn = typeof initOverrides === "function" ? initOverrides : () => __async(this, null, function* () {
469
+ return initOverrides;
470
+ });
471
+ const initParams = {
472
+ method: context.method,
473
+ headers,
474
+ body: context.body,
475
+ credentials: this.configuration.credentials
476
+ };
477
+ const overriddenInit = __spreadValues(__spreadValues({}, initParams), yield initOverrideFn({
478
+ init: initParams,
479
+ context
480
+ }));
481
+ let body;
482
+ if (isFormData(overriddenInit.body) || overriddenInit.body instanceof URLSearchParams || isBlob(overriddenInit.body)) {
483
+ body = overriddenInit.body;
484
+ } else if (this.isJsonMime(headers["Content-Type"])) {
485
+ body = JSON.stringify(overriddenInit.body);
486
+ } else {
487
+ body = overriddenInit.body;
488
+ }
489
+ const init = __spreadProps(__spreadValues({}, overriddenInit), {
490
+ body
491
+ });
492
+ return { url, init };
493
+ });
494
+ }
495
+ /**
496
+ * Create a shallow clone of `this` by constructing a new instance
497
+ * and then shallow cloning data members.
498
+ */
499
+ clone() {
500
+ const constructor = this.constructor;
501
+ const next = new constructor(this.configuration);
502
+ next.middleware = this.middleware.slice();
503
+ return next;
504
+ }
505
+ };
506
+ _BaseAPI.jsonRegex = new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$", "i");
507
+ var BaseAPI = _BaseAPI;
508
+ function isBlob(value) {
509
+ return typeof Blob !== "undefined" && value instanceof Blob;
510
+ }
511
+ function isFormData(value) {
512
+ return typeof FormData !== "undefined" && value instanceof FormData;
513
+ }
514
+ var ResponseError = class extends Error {
515
+ constructor(response, msg) {
516
+ super(msg);
517
+ this.response = response;
518
+ this.name = "ResponseError";
519
+ }
520
+ };
521
+ var FetchError = class extends Error {
522
+ constructor(cause, msg) {
523
+ super(msg);
524
+ this.cause = cause;
525
+ this.name = "FetchError";
526
+ }
527
+ };
528
+ var RequiredError = class extends Error {
529
+ constructor(field, msg) {
530
+ super(msg);
531
+ this.field = field;
532
+ this.name = "RequiredError";
533
+ }
534
+ };
535
+ function querystring(params, prefix = "") {
536
+ return Object.keys(params).map((key) => querystringSingleKey(key, params[key], prefix)).filter((part) => part.length > 0).join("&");
537
+ }
538
+ function querystringSingleKey(key, value, keyPrefix = "") {
539
+ const fullKey = keyPrefix + (keyPrefix.length ? `[${key}]` : key);
540
+ if (value instanceof Array) {
541
+ const multiValue = value.map((singleValue) => encodeURIComponent(String(singleValue))).join(`&${encodeURIComponent(fullKey)}=`);
542
+ return `${encodeURIComponent(fullKey)}=${multiValue}`;
543
+ }
544
+ if (value instanceof Set) {
545
+ const valueAsArray = Array.from(value);
546
+ return querystringSingleKey(key, valueAsArray, keyPrefix);
547
+ }
548
+ if (value instanceof Date) {
549
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(value.toISOString())}`;
550
+ }
551
+ if (value instanceof Object) {
552
+ return querystring(value, fullKey);
553
+ }
554
+ return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
555
+ }
556
+ var JSONApiResponse = class {
557
+ constructor(raw, transformer = (jsonValue) => jsonValue) {
558
+ this.raw = raw;
559
+ this.transformer = transformer;
560
+ }
561
+ value() {
562
+ return __async(this, null, function* () {
563
+ return this.transformer(yield this.raw.json());
564
+ });
565
+ }
566
+ };
567
+
568
+ // src/errors.ts
569
+ var DoboxaError = class _DoboxaError extends Error {
570
+ constructor(message) {
571
+ super(message);
572
+ this.name = "DoboxaError";
573
+ Object.setPrototypeOf(this, _DoboxaError.prototype);
574
+ }
575
+ };
576
+ var DoboxaAPIError = class _DoboxaAPIError extends DoboxaError {
577
+ constructor(statusCode, message, body) {
578
+ super(message);
579
+ this.name = "DoboxaAPIError";
580
+ this.statusCode = statusCode;
581
+ if (body) {
582
+ if ("result_code" in body) {
583
+ this.code = body.result_code;
584
+ }
585
+ if ("error_message" in body) {
586
+ this.errorMessage = body.error_message || void 0;
587
+ }
588
+ if ("invalid_parameters" in body && body.invalid_parameters) {
589
+ this.invalidParameters = body.invalid_parameters.map((param) => ({
590
+ parameter: param.parameter,
591
+ error_cause: param.error_cause
592
+ }));
593
+ }
594
+ }
595
+ Object.setPrototypeOf(this, _DoboxaAPIError.prototype);
596
+ }
597
+ };
598
+ var DoboxaAuthenticationError = class _DoboxaAuthenticationError extends DoboxaError {
599
+ constructor(message = "Authentication failed") {
600
+ super(message);
601
+ this.name = "DoboxaAuthenticationError";
602
+ Object.setPrototypeOf(this, _DoboxaAuthenticationError.prototype);
603
+ }
604
+ };
605
+ var DoboxaValidationError = class _DoboxaValidationError extends DoboxaAPIError {
606
+ constructor(statusCode, message, body) {
607
+ super(statusCode, message, body);
608
+ this.name = "DoboxaValidationError";
609
+ Object.setPrototypeOf(this, _DoboxaValidationError.prototype);
610
+ }
611
+ };
612
+ function parseErrorResponse(statusCode, body) {
613
+ if (typeof body === "object" && body !== null) {
614
+ if ("invalid_parameters" in body || "error_message" in body) {
615
+ return body;
616
+ }
617
+ if ("error_message" in body && "result_code" in body) {
618
+ return body;
619
+ }
620
+ }
621
+ return void 0;
622
+ }
623
+
624
+ // src/http/client.ts
625
+ var HTTPClient = class {
626
+ constructor(config) {
627
+ this.baseURL = config.baseURL || "http://localhost";
628
+ this.tokenManager = config.tokenManager;
629
+ this.onTokenRefresh = config.onTokenRefresh;
630
+ }
631
+ /**
632
+ * Make an HTTP request
633
+ */
634
+ request(_0) {
635
+ return __async(this, arguments, function* (path, options = {}) {
636
+ const url = `${this.baseURL}${path.startsWith("/") ? path : `/${path}`}`;
637
+ let accessToken = this.tokenManager.getAccessToken();
638
+ if (!accessToken || this.tokenManager.isTokenExpired()) {
639
+ if (this.onTokenRefresh) {
640
+ const refreshToken = this.tokenManager.getRefreshToken();
641
+ if (!refreshToken) {
642
+ throw new DoboxaAuthenticationError("No refresh token available");
643
+ }
644
+ let refreshPromise = this.tokenManager.getRefreshPromise();
645
+ if (!refreshPromise) {
646
+ refreshPromise = this.onTokenRefresh(refreshToken);
647
+ this.tokenManager.setRefreshPromise(refreshPromise);
648
+ }
649
+ try {
650
+ accessToken = yield refreshPromise;
651
+ } finally {
652
+ this.tokenManager.setRefreshPromise(null);
653
+ }
654
+ } else {
655
+ throw new DoboxaAuthenticationError("No access token available");
656
+ }
657
+ }
658
+ const headers = new Headers(options.headers);
659
+ headers.set("Content-Type", "application/json");
660
+ headers.set("Authorization", `Bearer ${accessToken}`);
661
+ const response = yield fetch(url, __spreadProps(__spreadValues({}, options), {
662
+ headers
663
+ }));
664
+ let responseBody;
665
+ const contentType = response.headers.get("content-type");
666
+ if (contentType && contentType.includes("application/json")) {
667
+ try {
668
+ responseBody = yield response.json();
669
+ } catch (e) {
670
+ }
671
+ } else {
672
+ responseBody = yield response.text();
673
+ }
674
+ if (!response.ok) {
675
+ const errorBody = parseErrorResponse(response.status, responseBody);
676
+ const errorMessage = (errorBody && "error_message" in errorBody ? errorBody.error_message : void 0) || response.statusText || `HTTP ${response.status}`;
677
+ if (response.status === 401 || response.status === 403) {
678
+ throw new DoboxaAuthenticationError(errorMessage);
679
+ }
680
+ throw new DoboxaAPIError(response.status, errorMessage, errorBody);
681
+ }
682
+ return responseBody;
683
+ });
684
+ }
685
+ /**
686
+ * GET request
687
+ */
688
+ get(path, options) {
689
+ return __async(this, null, function* () {
690
+ return this.request(path, __spreadProps(__spreadValues({}, options), { method: "GET" }));
691
+ });
692
+ }
693
+ /**
694
+ * POST request
695
+ */
696
+ post(path, body, options) {
697
+ return __async(this, null, function* () {
698
+ return this.request(path, __spreadProps(__spreadValues({}, options), {
699
+ method: "POST",
700
+ body: body ? JSON.stringify(body) : void 0
701
+ }));
702
+ });
703
+ }
704
+ /**
705
+ * PUT request
706
+ */
707
+ put(path, body, options) {
708
+ return __async(this, null, function* () {
709
+ return this.request(path, __spreadProps(__spreadValues({}, options), {
710
+ method: "PUT",
711
+ body: body ? JSON.stringify(body) : void 0
712
+ }));
713
+ });
714
+ }
715
+ /**
716
+ * DELETE request
717
+ */
718
+ delete(path, options) {
719
+ return __async(this, null, function* () {
720
+ return this.request(path, __spreadProps(__spreadValues({}, options), { method: "DELETE" }));
721
+ });
722
+ }
723
+ /**
724
+ * PATCH request
725
+ */
726
+ patch(path, body, options) {
727
+ return __async(this, null, function* () {
728
+ return this.request(path, __spreadProps(__spreadValues({}, options), {
729
+ method: "PATCH",
730
+ body: body ? JSON.stringify(body) : void 0
731
+ }));
732
+ });
733
+ }
734
+ };
735
+
736
+ // src/utils/tokenManager.ts
737
+ var TokenManager = class {
738
+ constructor() {
739
+ this.accessToken = null;
740
+ this.refreshToken = null;
741
+ this.tokenExpiry = null;
742
+ this.refreshPromise = null;
743
+ }
744
+ /**
745
+ * Set tokens and calculate expiry
746
+ */
747
+ setTokens(accessToken, refreshToken, expiresIn = 3600) {
748
+ this.accessToken = accessToken;
749
+ this.refreshToken = refreshToken;
750
+ this.tokenExpiry = Date.now() + (expiresIn - 5) * 1e3;
751
+ }
752
+ /**
753
+ * Get current access token
754
+ */
755
+ getAccessToken() {
756
+ return this.accessToken;
757
+ }
758
+ /**
759
+ * Get refresh token
760
+ */
761
+ getRefreshToken() {
762
+ return this.refreshToken;
763
+ }
764
+ /**
765
+ * Check if token is expired or will expire soon
766
+ */
767
+ isTokenExpired() {
768
+ if (!this.tokenExpiry || !this.accessToken) {
769
+ return true;
770
+ }
771
+ return Date.now() >= this.tokenExpiry;
772
+ }
773
+ /**
774
+ * Clear all tokens
775
+ */
776
+ clearTokens() {
777
+ this.accessToken = null;
778
+ this.refreshToken = null;
779
+ this.tokenExpiry = null;
780
+ this.refreshPromise = null;
781
+ }
782
+ /**
783
+ * Set refresh promise to prevent concurrent refresh requests
784
+ */
785
+ setRefreshPromise(promise) {
786
+ this.refreshPromise = promise;
787
+ }
788
+ /**
789
+ * Get current refresh promise
790
+ */
791
+ getRefreshPromise() {
792
+ return this.refreshPromise;
793
+ }
794
+ };
795
+
796
+ // src/utils/config.ts
797
+ function getBaseURL() {
798
+ if (typeof process !== "undefined" && process.env) {
799
+ return process.env.DOBOXA_API_URL;
800
+ }
801
+ return void 0;
802
+ }
803
+
804
+ // src/resources/authentication.ts
805
+ var AuthenticationResource = class {
806
+ constructor(httpClient, tokenManager) {
807
+ this.httpClient = httpClient;
808
+ this.tokenManager = tokenManager;
809
+ }
810
+ /**
811
+ * Login with username and password
812
+ */
813
+ login(params) {
814
+ return __async(this, null, function* () {
815
+ const request = {
816
+ username: params.username,
817
+ password: params.password
818
+ };
819
+ const response = yield this.httpClient.post(
820
+ "/api/v2/authentication/token",
821
+ request
822
+ );
823
+ if (response.token && response.refresh_token) {
824
+ this.tokenManager.setTokens(response.token, response.refresh_token, 3600);
825
+ }
826
+ return response;
827
+ });
828
+ }
829
+ /**
830
+ * Refresh access token using refresh token
831
+ */
832
+ refreshToken(refreshToken) {
833
+ return __async(this, null, function* () {
834
+ const request = {
835
+ refresh_token: refreshToken
836
+ };
837
+ const response = yield this.httpClient.post(
838
+ "/api/v2/authentication/refresh_token",
839
+ request
840
+ );
841
+ if (response.token && response.refresh_token) {
842
+ this.tokenManager.setTokens(response.token, response.refresh_token, 3600);
843
+ }
844
+ return response;
845
+ });
846
+ }
847
+ };
848
+
849
+ // src/types/generated/src/models/Bool.ts
850
+ function BoolFromJSON(json) {
851
+ return json;
852
+ }
853
+ function BoolFromJSONTyped(json, ignoreDiscriminator) {
854
+ return json;
855
+ }
856
+ function BoolToJSON(value) {
857
+ return value;
858
+ }
859
+ function BoolToJSONTyped(value, ignoreDiscriminator = false) {
860
+ return value;
861
+ }
862
+
863
+ // src/types/generated/src/models/ApiV2AuthenticationRefreshTokenPost200Response.ts
864
+ function instanceOfApiV2AuthenticationRefreshTokenPost200Response(value) {
865
+ return true;
866
+ }
867
+ function ApiV2AuthenticationRefreshTokenPost200ResponseFromJSON(json) {
868
+ return ApiV2AuthenticationRefreshTokenPost200ResponseFromJSONTyped(json, false);
869
+ }
870
+ function ApiV2AuthenticationRefreshTokenPost200ResponseFromJSONTyped(json, ignoreDiscriminator) {
871
+ if (json == null) {
872
+ return json;
873
+ }
874
+ return {
875
+ "token": json["token"] == null ? void 0 : json["token"],
876
+ "refresh_token": json["refresh_token"] == null ? void 0 : json["refresh_token"]
877
+ };
878
+ }
879
+ function ApiV2AuthenticationRefreshTokenPost200ResponseToJSON(json) {
880
+ return ApiV2AuthenticationRefreshTokenPost200ResponseToJSONTyped(json, false);
881
+ }
882
+ function ApiV2AuthenticationRefreshTokenPost200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
883
+ if (value == null) {
884
+ return value;
885
+ }
886
+ return {
887
+ "token": value["token"],
888
+ "refresh_token": value["refresh_token"]
889
+ };
890
+ }
891
+
892
+ // src/types/generated/src/models/ApiV2AuthenticationRefreshTokenPostRequest.ts
893
+ function instanceOfApiV2AuthenticationRefreshTokenPostRequest(value) {
894
+ return true;
895
+ }
896
+ function ApiV2AuthenticationRefreshTokenPostRequestFromJSON(json) {
897
+ return ApiV2AuthenticationRefreshTokenPostRequestFromJSONTyped(json, false);
898
+ }
899
+ function ApiV2AuthenticationRefreshTokenPostRequestFromJSONTyped(json, ignoreDiscriminator) {
900
+ if (json == null) {
901
+ return json;
902
+ }
903
+ return {
904
+ "refresh_token": json["refresh_token"] == null ? void 0 : json["refresh_token"]
905
+ };
906
+ }
907
+ function ApiV2AuthenticationRefreshTokenPostRequestToJSON(json) {
908
+ return ApiV2AuthenticationRefreshTokenPostRequestToJSONTyped(json, false);
909
+ }
910
+ function ApiV2AuthenticationRefreshTokenPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
911
+ if (value == null) {
912
+ return value;
913
+ }
914
+ return {
915
+ "refresh_token": value["refresh_token"]
916
+ };
917
+ }
918
+
919
+ // src/types/generated/src/models/ApiV2AuthenticationTokenPost200Response.ts
920
+ function instanceOfApiV2AuthenticationTokenPost200Response(value) {
921
+ return true;
922
+ }
923
+ function ApiV2AuthenticationTokenPost200ResponseFromJSON(json) {
924
+ return ApiV2AuthenticationTokenPost200ResponseFromJSONTyped(json, false);
925
+ }
926
+ function ApiV2AuthenticationTokenPost200ResponseFromJSONTyped(json, ignoreDiscriminator) {
927
+ if (json == null) {
928
+ return json;
929
+ }
930
+ return {
931
+ "token": json["token"] == null ? void 0 : json["token"],
932
+ "refresh_token": json["refresh_token"] == null ? void 0 : json["refresh_token"]
933
+ };
934
+ }
935
+ function ApiV2AuthenticationTokenPost200ResponseToJSON(json) {
936
+ return ApiV2AuthenticationTokenPost200ResponseToJSONTyped(json, false);
937
+ }
938
+ function ApiV2AuthenticationTokenPost200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
939
+ if (value == null) {
940
+ return value;
941
+ }
942
+ return {
943
+ "token": value["token"],
944
+ "refresh_token": value["refresh_token"]
945
+ };
946
+ }
947
+
948
+ // src/types/generated/src/models/ApiV2AuthenticationTokenPost401Response.ts
949
+ function instanceOfApiV2AuthenticationTokenPost401Response(value) {
950
+ return true;
951
+ }
952
+ function ApiV2AuthenticationTokenPost401ResponseFromJSON(json) {
953
+ return ApiV2AuthenticationTokenPost401ResponseFromJSONTyped(json, false);
954
+ }
955
+ function ApiV2AuthenticationTokenPost401ResponseFromJSONTyped(json, ignoreDiscriminator) {
956
+ if (json == null) {
957
+ return json;
958
+ }
959
+ return {
960
+ "code": json["code"] == null ? void 0 : json["code"],
961
+ "message": json["message"] == null ? void 0 : json["message"]
962
+ };
963
+ }
964
+ function ApiV2AuthenticationTokenPost401ResponseToJSON(json) {
965
+ return ApiV2AuthenticationTokenPost401ResponseToJSONTyped(json, false);
966
+ }
967
+ function ApiV2AuthenticationTokenPost401ResponseToJSONTyped(value, ignoreDiscriminator = false) {
968
+ if (value == null) {
969
+ return value;
970
+ }
971
+ return {
972
+ "code": value["code"],
973
+ "message": value["message"]
974
+ };
975
+ }
976
+
977
+ // src/types/generated/src/models/ApiV2AuthenticationTokenPostRequest.ts
978
+ function instanceOfApiV2AuthenticationTokenPostRequest(value) {
979
+ return true;
980
+ }
981
+ function ApiV2AuthenticationTokenPostRequestFromJSON(json) {
982
+ return ApiV2AuthenticationTokenPostRequestFromJSONTyped(json, false);
983
+ }
984
+ function ApiV2AuthenticationTokenPostRequestFromJSONTyped(json, ignoreDiscriminator) {
985
+ if (json == null) {
986
+ return json;
987
+ }
988
+ return {
989
+ "username": json["username"] == null ? void 0 : json["username"],
990
+ "password": json["password"] == null ? void 0 : json["password"]
991
+ };
992
+ }
993
+ function ApiV2AuthenticationTokenPostRequestToJSON(json) {
994
+ return ApiV2AuthenticationTokenPostRequestToJSONTyped(json, false);
995
+ }
996
+ function ApiV2AuthenticationTokenPostRequestToJSONTyped(value, ignoreDiscriminator = false) {
997
+ if (value == null) {
998
+ return value;
999
+ }
1000
+ return {
1001
+ "username": value["username"],
1002
+ "password": value["password"]
1003
+ };
1004
+ }
1005
+
1006
+ // src/types/generated/src/models/Attachment.ts
1007
+ function instanceOfAttachment(value) {
1008
+ if (!("type" in value) || value["type"] === void 0) return false;
1009
+ if (!("file_path" in value) || value["file_path"] === void 0) return false;
1010
+ return true;
1011
+ }
1012
+ function AttachmentFromJSON(json) {
1013
+ return AttachmentFromJSONTyped(json, false);
1014
+ }
1015
+ function AttachmentFromJSONTyped(json, ignoreDiscriminator) {
1016
+ if (json == null) {
1017
+ return json;
1018
+ }
1019
+ return {
1020
+ "type": json["type"],
1021
+ "file_path": json["file_path"],
1022
+ "articles": json["articles"] == null ? void 0 : json["articles"]
1023
+ };
1024
+ }
1025
+ function AttachmentToJSON(json) {
1026
+ return AttachmentToJSONTyped(json, false);
1027
+ }
1028
+ function AttachmentToJSONTyped(value, ignoreDiscriminator = false) {
1029
+ if (value == null) {
1030
+ return value;
1031
+ }
1032
+ return {
1033
+ "type": value["type"],
1034
+ "file_path": value["file_path"],
1035
+ "articles": value["articles"]
1036
+ };
1037
+ }
1038
+
1039
+ // src/types/generated/src/models/BillingAddress.ts
1040
+ function instanceOfBillingAddress(value) {
1041
+ if (!("first_name" in value) || value["first_name"] === void 0) return false;
1042
+ if (!("last_name" in value) || value["last_name"] === void 0) return false;
1043
+ if (!("address1" in value) || value["address1"] === void 0) return false;
1044
+ if (!("city" in value) || value["city"] === void 0) return false;
1045
+ if (!("post_code" in value) || value["post_code"] === void 0) return false;
1046
+ if (!("country_iso" in value) || value["country_iso"] === void 0) return false;
1047
+ return true;
1048
+ }
1049
+ function BillingAddressFromJSON(json) {
1050
+ return BillingAddressFromJSONTyped(json, false);
1051
+ }
1052
+ function BillingAddressFromJSONTyped(json, ignoreDiscriminator) {
1053
+ if (json == null) {
1054
+ return json;
1055
+ }
1056
+ return {
1057
+ "first_name": json["first_name"],
1058
+ "last_name": json["last_name"],
1059
+ "company_name": json["company_name"] == null ? void 0 : json["company_name"],
1060
+ "phone_number": json["phone_number"] == null ? void 0 : json["phone_number"],
1061
+ "email": json["email"] == null ? void 0 : json["email"],
1062
+ "address1": json["address1"],
1063
+ "address2": json["address2"] == null ? void 0 : json["address2"],
1064
+ "city": json["city"],
1065
+ "region": json["region"] == null ? void 0 : json["region"],
1066
+ "post_code": json["post_code"],
1067
+ "country_iso": json["country_iso"],
1068
+ "tax_id": json["tax_id"] == null ? void 0 : json["tax_id"]
1069
+ };
1070
+ }
1071
+ function BillingAddressToJSON(json) {
1072
+ return BillingAddressToJSONTyped(json, false);
1073
+ }
1074
+ function BillingAddressToJSONTyped(value, ignoreDiscriminator = false) {
1075
+ if (value == null) {
1076
+ return value;
1077
+ }
1078
+ return {
1079
+ "first_name": value["first_name"],
1080
+ "last_name": value["last_name"],
1081
+ "company_name": value["company_name"],
1082
+ "phone_number": value["phone_number"],
1083
+ "email": value["email"],
1084
+ "address1": value["address1"],
1085
+ "address2": value["address2"],
1086
+ "city": value["city"],
1087
+ "region": value["region"],
1088
+ "post_code": value["post_code"],
1089
+ "country_iso": value["country_iso"],
1090
+ "tax_id": value["tax_id"]
1091
+ };
1092
+ }
1093
+
1094
+ // src/types/generated/src/models/Client.ts
1095
+ function instanceOfClient(value) {
1096
+ return true;
1097
+ }
1098
+ function ClientFromJSON(json) {
1099
+ return ClientFromJSONTyped(json, false);
1100
+ }
1101
+ function ClientFromJSONTyped(json, ignoreDiscriminator) {
1102
+ if (json == null) {
1103
+ return json;
1104
+ }
1105
+ return {
1106
+ "email": json["email"] == null ? void 0 : json["email"],
1107
+ "token": json["token"] == null ? void 0 : json["token"]
1108
+ };
1109
+ }
1110
+ function ClientToJSON(json) {
1111
+ return ClientToJSONTyped(json, false);
1112
+ }
1113
+ function ClientToJSONTyped(value, ignoreDiscriminator = false) {
1114
+ if (value == null) {
1115
+ return value;
1116
+ }
1117
+ return {
1118
+ "email": value["email"],
1119
+ "token": value["token"]
1120
+ };
1121
+ }
1122
+
1123
+ // src/types/generated/src/models/CreateOrderComment.ts
1124
+ var CreateOrderCommentAuthorTypeEnum = /* @__PURE__ */ ((CreateOrderCommentAuthorTypeEnum2) => {
1125
+ CreateOrderCommentAuthorTypeEnum2["client"] = "client";
1126
+ CreateOrderCommentAuthorTypeEnum2["support"] = "support";
1127
+ return CreateOrderCommentAuthorTypeEnum2;
1128
+ })(CreateOrderCommentAuthorTypeEnum || {});
1129
+ function instanceOfCreateOrderComment(value) {
1130
+ if (!("author_type" in value) || value["author_type"] === void 0) return false;
1131
+ if (!("author_email" in value) || value["author_email"] === void 0) return false;
1132
+ if (!("content" in value) || value["content"] === void 0) return false;
1133
+ if (!("created_at" in value) || value["created_at"] === void 0) return false;
1134
+ return true;
1135
+ }
1136
+ function CreateOrderCommentFromJSON(json) {
1137
+ return CreateOrderCommentFromJSONTyped(json, false);
1138
+ }
1139
+ function CreateOrderCommentFromJSONTyped(json, ignoreDiscriminator) {
1140
+ if (json == null) {
1141
+ return json;
1142
+ }
1143
+ return {
1144
+ "author_type": json["author_type"],
1145
+ "author_email": json["author_email"],
1146
+ "content": json["content"],
1147
+ "created_at": new Date(json["created_at"])
1148
+ };
1149
+ }
1150
+ function CreateOrderCommentToJSON(json) {
1151
+ return CreateOrderCommentToJSONTyped(json, false);
1152
+ }
1153
+ function CreateOrderCommentToJSONTyped(value, ignoreDiscriminator = false) {
1154
+ if (value == null) {
1155
+ return value;
1156
+ }
1157
+ return {
1158
+ "author_type": value["author_type"],
1159
+ "author_email": value["author_email"],
1160
+ "content": value["content"],
1161
+ "created_at": value["created_at"].toISOString()
1162
+ };
1163
+ }
1164
+
1165
+ // src/types/generated/src/models/DeliveryAddress.ts
1166
+ function instanceOfDeliveryAddress(value) {
1167
+ if (!("first_name" in value) || value["first_name"] === void 0) return false;
1168
+ if (!("last_name" in value) || value["last_name"] === void 0) return false;
1169
+ if (!("phone_number" in value) || value["phone_number"] === void 0) return false;
1170
+ if (!("email" in value) || value["email"] === void 0) return false;
1171
+ if (!("address1" in value) || value["address1"] === void 0) return false;
1172
+ if (!("city" in value) || value["city"] === void 0) return false;
1173
+ if (!("post_code" in value) || value["post_code"] === void 0) return false;
1174
+ if (!("country_iso" in value) || value["country_iso"] === void 0) return false;
1175
+ return true;
1176
+ }
1177
+ function DeliveryAddressFromJSON(json) {
1178
+ return DeliveryAddressFromJSONTyped(json, false);
1179
+ }
1180
+ function DeliveryAddressFromJSONTyped(json, ignoreDiscriminator) {
1181
+ if (json == null) {
1182
+ return json;
1183
+ }
1184
+ return {
1185
+ "first_name": json["first_name"],
1186
+ "last_name": json["last_name"],
1187
+ "company_name": json["company_name"] == null ? void 0 : json["company_name"],
1188
+ "phone_number": json["phone_number"],
1189
+ "email": json["email"],
1190
+ "address1": json["address1"],
1191
+ "address2": json["address2"] == null ? void 0 : json["address2"],
1192
+ "city": json["city"],
1193
+ "region": json["region"] == null ? void 0 : json["region"],
1194
+ "post_code": json["post_code"],
1195
+ "country_iso": json["country_iso"],
1196
+ "delivery_point_id": json["delivery_point_id"] == null ? void 0 : json["delivery_point_id"],
1197
+ "allegro_smart_account_id": json["allegro_smart_account_id"] == null ? void 0 : json["allegro_smart_account_id"]
1198
+ };
1199
+ }
1200
+ function DeliveryAddressToJSON(json) {
1201
+ return DeliveryAddressToJSONTyped(json, false);
1202
+ }
1203
+ function DeliveryAddressToJSONTyped(value, ignoreDiscriminator = false) {
1204
+ if (value == null) {
1205
+ return value;
1206
+ }
1207
+ return {
1208
+ "first_name": value["first_name"],
1209
+ "last_name": value["last_name"],
1210
+ "company_name": value["company_name"],
1211
+ "phone_number": value["phone_number"],
1212
+ "email": value["email"],
1213
+ "address1": value["address1"],
1214
+ "address2": value["address2"],
1215
+ "city": value["city"],
1216
+ "region": value["region"],
1217
+ "post_code": value["post_code"],
1218
+ "country_iso": value["country_iso"],
1219
+ "delivery_point_id": value["delivery_point_id"],
1220
+ "allegro_smart_account_id": value["allegro_smart_account_id"]
1221
+ };
1222
+ }
1223
+
1224
+ // src/types/generated/src/models/GetApiV2DiscountCodesExternal200ResponseItemsInner.ts
1225
+ function instanceOfGetApiV2DiscountCodesExternal200ResponseItemsInner(value) {
1226
+ return true;
1227
+ }
1228
+ function GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSON(json) {
1229
+ return GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSONTyped(json, false);
1230
+ }
1231
+ function GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSONTyped(json, ignoreDiscriminator) {
1232
+ if (json == null) {
1233
+ return json;
1234
+ }
1235
+ return {
1236
+ "code": json["code"] == null ? void 0 : json["code"],
1237
+ "type": json["type"] == null ? void 0 : json["type"],
1238
+ "client_email": json["client_email"] == null ? void 0 : json["client_email"],
1239
+ "domain": json["domain"] == null ? void 0 : json["domain"],
1240
+ "currency": json["currency"] == null ? void 0 : json["currency"],
1241
+ "action": json["action"] == null ? void 0 : json["action"],
1242
+ "valid_until": json["valid_until"] == null ? void 0 : json["valid_until"]
1243
+ };
1244
+ }
1245
+ function GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSON(json) {
1246
+ return GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSONTyped(json, false);
1247
+ }
1248
+ function GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSONTyped(value, ignoreDiscriminator = false) {
1249
+ if (value == null) {
1250
+ return value;
1251
+ }
1252
+ return {
1253
+ "code": value["code"],
1254
+ "type": value["type"],
1255
+ "client_email": value["client_email"],
1256
+ "domain": value["domain"],
1257
+ "currency": value["currency"],
1258
+ "action": value["action"],
1259
+ "valid_until": value["valid_until"]
1260
+ };
1261
+ }
1262
+
1263
+ // src/types/generated/src/models/GetApiV2DiscountCodesExternal200Response.ts
1264
+ function instanceOfGetApiV2DiscountCodesExternal200Response(value) {
1265
+ return true;
1266
+ }
1267
+ function GetApiV2DiscountCodesExternal200ResponseFromJSON(json) {
1268
+ return GetApiV2DiscountCodesExternal200ResponseFromJSONTyped(json, false);
1269
+ }
1270
+ function GetApiV2DiscountCodesExternal200ResponseFromJSONTyped(json, ignoreDiscriminator) {
1271
+ if (json == null) {
1272
+ return json;
1273
+ }
1274
+ return {
1275
+ "items": json["items"] == null ? void 0 : json["items"].map(GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSON),
1276
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
1277
+ };
1278
+ }
1279
+ function GetApiV2DiscountCodesExternal200ResponseToJSON(json) {
1280
+ return GetApiV2DiscountCodesExternal200ResponseToJSONTyped(json, false);
1281
+ }
1282
+ function GetApiV2DiscountCodesExternal200ResponseToJSONTyped(value, ignoreDiscriminator = false) {
1283
+ if (value == null) {
1284
+ return value;
1285
+ }
1286
+ return {
1287
+ "items": value["items"] == null ? void 0 : value["items"].map(GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSON),
1288
+ "next_page": value["next_page"]
1289
+ };
1290
+ }
1291
+
1292
+ // src/types/generated/src/models/InvalidParameter.ts
1293
+ function instanceOfInvalidParameter(value) {
1294
+ return true;
1295
+ }
1296
+ function InvalidParameterFromJSON(json) {
1297
+ return InvalidParameterFromJSONTyped(json, false);
1298
+ }
1299
+ function InvalidParameterFromJSONTyped(json, ignoreDiscriminator) {
1300
+ if (json == null) {
1301
+ return json;
1302
+ }
1303
+ return {
1304
+ "parameter": json["parameter"] == null ? void 0 : json["parameter"],
1305
+ "error_cause": json["error_cause"] == null ? void 0 : json["error_cause"]
1306
+ };
1307
+ }
1308
+ function InvalidParameterToJSON(json) {
1309
+ return InvalidParameterToJSONTyped(json, false);
1310
+ }
1311
+ function InvalidParameterToJSONTyped(value, ignoreDiscriminator = false) {
1312
+ if (value == null) {
1313
+ return value;
1314
+ }
1315
+ return {
1316
+ "parameter": value["parameter"],
1317
+ "error_cause": value["error_cause"]
1318
+ };
1319
+ }
1320
+
1321
+ // src/types/generated/src/models/InvalidRequestDataResponse.ts
1322
+ function instanceOfInvalidRequestDataResponse(value) {
1323
+ return true;
1324
+ }
1325
+ function InvalidRequestDataResponseFromJSON(json) {
1326
+ return InvalidRequestDataResponseFromJSONTyped(json, false);
1327
+ }
1328
+ function InvalidRequestDataResponseFromJSONTyped(json, ignoreDiscriminator) {
1329
+ if (json == null) {
1330
+ return json;
1331
+ }
1332
+ return {
1333
+ "invalid_parameters": json["invalid_parameters"] == null ? void 0 : json["invalid_parameters"].map(InvalidParameterFromJSON),
1334
+ "result_code": json["result_code"] == null ? void 0 : json["result_code"],
1335
+ "error_message": json["error_message"] == null ? void 0 : json["error_message"]
1336
+ };
1337
+ }
1338
+ function InvalidRequestDataResponseToJSON(json) {
1339
+ return InvalidRequestDataResponseToJSONTyped(json, false);
1340
+ }
1341
+ function InvalidRequestDataResponseToJSONTyped(value, ignoreDiscriminator = false) {
1342
+ if (value == null) {
1343
+ return value;
1344
+ }
1345
+ return {
1346
+ "invalid_parameters": value["invalid_parameters"] == null ? void 0 : value["invalid_parameters"].map(InvalidParameterToJSON),
1347
+ "result_code": value["result_code"],
1348
+ "error_message": value["error_message"]
1349
+ };
1350
+ }
1351
+
1352
+ // src/types/generated/src/models/InvoiceItem.ts
1353
+ function instanceOfInvoiceItem(value) {
1354
+ return true;
1355
+ }
1356
+ function InvoiceItemFromJSON(json) {
1357
+ return InvoiceItemFromJSONTyped(json, false);
1358
+ }
1359
+ function InvoiceItemFromJSONTyped(json, ignoreDiscriminator) {
1360
+ if (json == null) {
1361
+ return json;
1362
+ }
1363
+ return {
1364
+ "doboxa_item_id": json["doboxa_item_id"] == null ? void 0 : json["doboxa_item_id"],
1365
+ "foreign_item_id": json["foreign_item_id"] == null ? void 0 : json["foreign_item_id"],
1366
+ "name": json["name"] == null ? void 0 : json["name"],
1367
+ "qty": json["qty"] == null ? void 0 : json["qty"],
1368
+ "unit": json["unit"] == null ? void 0 : json["unit"],
1369
+ "net_unit_price": json["net_unit_price"] == null ? void 0 : json["net_unit_price"],
1370
+ "net_value": json["net_value"] == null ? void 0 : json["net_value"],
1371
+ "vat_value": json["vat_value"] == null ? void 0 : json["vat_value"],
1372
+ "vat_rate": json["vat_rate"] == null ? void 0 : json["vat_rate"],
1373
+ "currency": json["currency"] == null ? void 0 : json["currency"]
1374
+ };
1375
+ }
1376
+ function InvoiceItemToJSON(json) {
1377
+ return InvoiceItemToJSONTyped(json, false);
1378
+ }
1379
+ function InvoiceItemToJSONTyped(value, ignoreDiscriminator = false) {
1380
+ if (value == null) {
1381
+ return value;
1382
+ }
1383
+ return {
1384
+ "doboxa_item_id": value["doboxa_item_id"],
1385
+ "foreign_item_id": value["foreign_item_id"],
1386
+ "name": value["name"],
1387
+ "qty": value["qty"],
1388
+ "unit": value["unit"],
1389
+ "net_unit_price": value["net_unit_price"],
1390
+ "net_value": value["net_value"],
1391
+ "vat_value": value["vat_value"],
1392
+ "vat_rate": value["vat_rate"],
1393
+ "currency": value["currency"]
1394
+ };
1395
+ }
1396
+
1397
+ // src/types/generated/src/models/InvoiceOrderItem.ts
1398
+ function instanceOfInvoiceOrderItem(value) {
1399
+ return true;
1400
+ }
1401
+ function InvoiceOrderItemFromJSON(json) {
1402
+ return InvoiceOrderItemFromJSONTyped(json, false);
1403
+ }
1404
+ function InvoiceOrderItemFromJSONTyped(json, ignoreDiscriminator) {
1405
+ if (json == null) {
1406
+ return json;
1407
+ }
1408
+ return {
1409
+ "doboxa_item_id": json["doboxa_item_id"] == null ? void 0 : json["doboxa_item_id"],
1410
+ "foreign_item_id": json["foreign_item_id"] == null ? void 0 : json["foreign_item_id"]
1411
+ };
1412
+ }
1413
+ function InvoiceOrderItemToJSON(json) {
1414
+ return InvoiceOrderItemToJSONTyped(json, false);
1415
+ }
1416
+ function InvoiceOrderItemToJSONTyped(value, ignoreDiscriminator = false) {
1417
+ if (value == null) {
1418
+ return value;
1419
+ }
1420
+ return {
1421
+ "doboxa_item_id": value["doboxa_item_id"],
1422
+ "foreign_item_id": value["foreign_item_id"]
1423
+ };
1424
+ }
1425
+
1426
+ // src/types/generated/src/models/InvoiceOrder.ts
1427
+ function instanceOfInvoiceOrder(value) {
1428
+ return true;
1429
+ }
1430
+ function InvoiceOrderFromJSON(json) {
1431
+ return InvoiceOrderFromJSONTyped(json, false);
1432
+ }
1433
+ function InvoiceOrderFromJSONTyped(json, ignoreDiscriminator) {
1434
+ if (json == null) {
1435
+ return json;
1436
+ }
1437
+ return {
1438
+ "doboxa_order_id": json["doboxa_order_id"] == null ? void 0 : json["doboxa_order_id"],
1439
+ "external_order_id": json["external_order_id"] == null ? void 0 : json["external_order_id"],
1440
+ "items": json["items"] == null ? void 0 : json["items"].map(InvoiceOrderItemFromJSON)
1441
+ };
1442
+ }
1443
+ function InvoiceOrderToJSON(json) {
1444
+ return InvoiceOrderToJSONTyped(json, false);
1445
+ }
1446
+ function InvoiceOrderToJSONTyped(value, ignoreDiscriminator = false) {
1447
+ if (value == null) {
1448
+ return value;
1449
+ }
1450
+ return {
1451
+ "doboxa_order_id": value["doboxa_order_id"],
1452
+ "external_order_id": value["external_order_id"],
1453
+ "items": value["items"] == null ? void 0 : value["items"].map(InvoiceOrderItemToJSON)
1454
+ };
1455
+ }
1456
+
1457
+ // src/types/generated/src/models/Invoice.ts
1458
+ var InvoiceStateEnum = /* @__PURE__ */ ((InvoiceStateEnum2) => {
1459
+ InvoiceStateEnum2["PAID"] = "PAID";
1460
+ InvoiceStateEnum2["UNPAID"] = "UNPAID";
1461
+ return InvoiceStateEnum2;
1462
+ })(InvoiceStateEnum || {});
1463
+ var InvoiceDocumentTypeEnum = /* @__PURE__ */ ((InvoiceDocumentTypeEnum2) => {
1464
+ InvoiceDocumentTypeEnum2["main"] = "main";
1465
+ return InvoiceDocumentTypeEnum2;
1466
+ })(InvoiceDocumentTypeEnum || {});
1467
+ function instanceOfInvoice(value) {
1468
+ return true;
1469
+ }
1470
+ function InvoiceFromJSON(json) {
1471
+ return InvoiceFromJSONTyped(json, false);
1472
+ }
1473
+ function InvoiceFromJSONTyped(json, ignoreDiscriminator) {
1474
+ if (json == null) {
1475
+ return json;
1476
+ }
1477
+ return {
1478
+ "id": json["id"] == null ? void 0 : json["id"],
1479
+ "client": json["client"] == null ? void 0 : json["client"],
1480
+ "file": json["file"] == null ? void 0 : json["file"],
1481
+ "state": json["state"] == null ? void 0 : json["state"],
1482
+ "document_number": json["document_number"] == null ? void 0 : json["document_number"],
1483
+ "document_amount": json["document_amount"] == null ? void 0 : json["document_amount"],
1484
+ "net_amount": json["net_amount"] == null ? void 0 : json["net_amount"],
1485
+ "tax_amount": json["tax_amount"] == null ? void 0 : json["tax_amount"],
1486
+ "tax_rate": json["tax_rate"] == null ? void 0 : json["tax_rate"],
1487
+ "paid_amount": json["paid_amount"] == null ? void 0 : json["paid_amount"],
1488
+ "currency": json["currency"] == null ? void 0 : json["currency"],
1489
+ "date_of_issue": json["date_of_issue"] == null ? void 0 : new Date(json["date_of_issue"]),
1490
+ "due_date": json["due_date"] == null ? void 0 : new Date(json["due_date"]),
1491
+ "document_type": json["document_type"] == null ? void 0 : json["document_type"],
1492
+ "orders": json["orders"] == null ? void 0 : json["orders"].map(InvoiceOrderFromJSON),
1493
+ "invoice_items": json["invoice_items"] == null ? void 0 : json["invoice_items"].map(InvoiceItemFromJSON)
1494
+ };
1495
+ }
1496
+ function InvoiceToJSON(json) {
1497
+ return InvoiceToJSONTyped(json, false);
1498
+ }
1499
+ function InvoiceToJSONTyped(value, ignoreDiscriminator = false) {
1500
+ if (value == null) {
1501
+ return value;
1502
+ }
1503
+ return {
1504
+ "id": value["id"],
1505
+ "client": value["client"],
1506
+ "file": value["file"],
1507
+ "state": value["state"],
1508
+ "document_number": value["document_number"],
1509
+ "document_amount": value["document_amount"],
1510
+ "net_amount": value["net_amount"],
1511
+ "tax_amount": value["tax_amount"],
1512
+ "tax_rate": value["tax_rate"],
1513
+ "paid_amount": value["paid_amount"],
1514
+ "currency": value["currency"],
1515
+ "date_of_issue": value["date_of_issue"] == null ? value["date_of_issue"] : value["date_of_issue"].toISOString(),
1516
+ "due_date": value["due_date"] == null ? value["due_date"] : value["due_date"].toISOString(),
1517
+ "document_type": value["document_type"],
1518
+ "orders": value["orders"] == null ? void 0 : value["orders"].map(InvoiceOrderToJSON),
1519
+ "invoice_items": value["invoice_items"] == null ? void 0 : value["invoice_items"].map(InvoiceItemToJSON)
1520
+ };
1521
+ }
1522
+
1523
+ // src/types/generated/src/models/Me.ts
1524
+ function instanceOfMe(value) {
1525
+ return true;
1526
+ }
1527
+ function MeFromJSON(json) {
1528
+ return MeFromJSONTyped(json, false);
1529
+ }
1530
+ function MeFromJSONTyped(json, ignoreDiscriminator) {
1531
+ if (json == null) {
1532
+ return json;
1533
+ }
1534
+ return {
1535
+ "username": json["username"] == null ? void 0 : json["username"]
1536
+ };
1537
+ }
1538
+ function MeToJSON(json) {
1539
+ return MeToJSONTyped(json, false);
1540
+ }
1541
+ function MeToJSONTyped(value, ignoreDiscriminator = false) {
1542
+ if (value == null) {
1543
+ return value;
1544
+ }
1545
+ return {
1546
+ "username": value["username"]
1547
+ };
1548
+ }
1549
+
1550
+ // src/types/generated/src/models/OrderItemCropData.ts
1551
+ var OrderItemCropDataFilterEnum = /* @__PURE__ */ ((OrderItemCropDataFilterEnum2) => {
1552
+ OrderItemCropDataFilterEnum2["none"] = "none";
1553
+ OrderItemCropDataFilterEnum2["blackwhite"] = "blackwhite";
1554
+ OrderItemCropDataFilterEnum2["sepia"] = "sepia";
1555
+ return OrderItemCropDataFilterEnum2;
1556
+ })(OrderItemCropDataFilterEnum || {});
1557
+ var OrderItemCropDataReflectionEnum = /* @__PURE__ */ ((OrderItemCropDataReflectionEnum2) => {
1558
+ OrderItemCropDataReflectionEnum2["none"] = "none";
1559
+ OrderItemCropDataReflectionEnum2["vertical"] = "vertical";
1560
+ OrderItemCropDataReflectionEnum2["horizontal"] = "horizontal";
1561
+ OrderItemCropDataReflectionEnum2["both"] = "both";
1562
+ return OrderItemCropDataReflectionEnum2;
1563
+ })(OrderItemCropDataReflectionEnum || {});
1564
+ function instanceOfOrderItemCropData(value) {
1565
+ return true;
1566
+ }
1567
+ function OrderItemCropDataFromJSON(json) {
1568
+ return OrderItemCropDataFromJSONTyped(json, false);
1569
+ }
1570
+ function OrderItemCropDataFromJSONTyped(json, ignoreDiscriminator) {
1571
+ if (json == null) {
1572
+ return json;
1573
+ }
1574
+ return {
1575
+ "left": json["left"] == null ? void 0 : json["left"],
1576
+ "top": json["top"] == null ? void 0 : json["top"],
1577
+ "width": json["width"] == null ? void 0 : json["width"],
1578
+ "height": json["height"] == null ? void 0 : json["height"],
1579
+ "original_photo_width": json["original_photo_width"] == null ? void 0 : json["original_photo_width"],
1580
+ "original_photo_height": json["original_photo_height"] == null ? void 0 : json["original_photo_height"],
1581
+ "filter": json["filter"] == null ? void 0 : json["filter"],
1582
+ "reflection": json["reflection"] == null ? void 0 : json["reflection"],
1583
+ "rotation": json["rotation"] == null ? void 0 : json["rotation"],
1584
+ "scale": json["scale"] == null ? void 0 : json["scale"]
1585
+ };
1586
+ }
1587
+ function OrderItemCropDataToJSON(json) {
1588
+ return OrderItemCropDataToJSONTyped(json, false);
1589
+ }
1590
+ function OrderItemCropDataToJSONTyped(value, ignoreDiscriminator = false) {
1591
+ if (value == null) {
1592
+ return value;
1593
+ }
1594
+ return {
1595
+ "left": value["left"],
1596
+ "top": value["top"],
1597
+ "width": value["width"],
1598
+ "height": value["height"],
1599
+ "original_photo_width": value["original_photo_width"],
1600
+ "original_photo_height": value["original_photo_height"],
1601
+ "filter": value["filter"],
1602
+ "reflection": value["reflection"],
1603
+ "rotation": value["rotation"],
1604
+ "scale": value["scale"]
1605
+ };
1606
+ }
1607
+
1608
+ // src/types/generated/src/models/OrderItemOriginalData.ts
1609
+ function instanceOfOrderItemOriginalData(value) {
1610
+ return true;
1611
+ }
1612
+ function OrderItemOriginalDataFromJSON(json) {
1613
+ return OrderItemOriginalDataFromJSONTyped(json, false);
1614
+ }
1615
+ function OrderItemOriginalDataFromJSONTyped(json, ignoreDiscriminator) {
1616
+ if (json == null) {
1617
+ return json;
1618
+ }
1619
+ return {
1620
+ "item_unit_price": json["item_unit_price"] == null ? void 0 : json["item_unit_price"],
1621
+ "item_value": json["item_value"] == null ? void 0 : json["item_value"]
1622
+ };
1623
+ }
1624
+ function OrderItemOriginalDataToJSON(json) {
1625
+ return OrderItemOriginalDataToJSONTyped(json, false);
1626
+ }
1627
+ function OrderItemOriginalDataToJSONTyped(value, ignoreDiscriminator = false) {
1628
+ if (value == null) {
1629
+ return value;
1630
+ }
1631
+ return {
1632
+ "item_unit_price": value["item_unit_price"],
1633
+ "item_value": value["item_value"]
1634
+ };
1635
+ }
1636
+
1637
+ // src/types/generated/src/models/OrderItem.ts
1638
+ function instanceOfOrderItem(value) {
1639
+ if (!("id" in value) || value["id"] === void 0) return false;
1640
+ if (!("qty" in value) || value["qty"] === void 0) return false;
1641
+ return true;
1642
+ }
1643
+ function OrderItemFromJSON(json) {
1644
+ return OrderItemFromJSONTyped(json, false);
1645
+ }
1646
+ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
1647
+ if (json == null) {
1648
+ return json;
1649
+ }
1650
+ return {
1651
+ "foreign_id": json["foreign_id"] == null ? void 0 : json["foreign_id"],
1652
+ "id": json["id"],
1653
+ "additional_sku": json["additional_sku"] == null ? void 0 : json["additional_sku"],
1654
+ "ean": json["ean"] == null ? void 0 : json["ean"],
1655
+ "symbol_code": json["symbol_code"] == null ? void 0 : json["symbol_code"],
1656
+ "name": json["name"] == null ? void 0 : json["name"],
1657
+ "qty": json["qty"],
1658
+ "item_price": json["item_price"] == null ? void 0 : json["item_price"],
1659
+ "width_in_cm": json["width_in_cm"] == null ? void 0 : json["width_in_cm"],
1660
+ "height_in_cm": json["height_in_cm"] == null ? void 0 : json["height_in_cm"],
1661
+ "custom_file": json["custom_file"] == null ? void 0 : json["custom_file"],
1662
+ "additional_custom_file": json["additional_custom_file"] == null ? void 0 : json["additional_custom_file"],
1663
+ "additional_info": json["additional_info"] == null ? void 0 : json["additional_info"],
1664
+ "crop_data": json["crop_data"] == null ? void 0 : OrderItemCropDataFromJSON(json["crop_data"]),
1665
+ "initial_price": json["initial_price"] == null ? void 0 : json["initial_price"],
1666
+ "item_delivery_cost": json["item_delivery_cost"] == null ? void 0 : json["item_delivery_cost"],
1667
+ "item_original_data": json["item_original_data"] == null ? void 0 : OrderItemOriginalDataFromJSON(json["item_original_data"]),
1668
+ "fulfillment_date": json["fulfillment_date"] == null ? void 0 : new Date(json["fulfillment_date"]),
1669
+ "custom_file_id": json["custom_file_id"] == null ? void 0 : json["custom_file_id"],
1670
+ "item_tax": json["item_tax"] == null ? void 0 : json["item_tax"]
1671
+ };
1672
+ }
1673
+ function OrderItemToJSON(json) {
1674
+ return OrderItemToJSONTyped(json, false);
1675
+ }
1676
+ function OrderItemToJSONTyped(value, ignoreDiscriminator = false) {
1677
+ if (value == null) {
1678
+ return value;
1679
+ }
1680
+ return {
1681
+ "foreign_id": value["foreign_id"],
1682
+ "id": value["id"],
1683
+ "additional_sku": value["additional_sku"],
1684
+ "ean": value["ean"],
1685
+ "symbol_code": value["symbol_code"],
1686
+ "name": value["name"],
1687
+ "qty": value["qty"],
1688
+ "item_price": value["item_price"],
1689
+ "width_in_cm": value["width_in_cm"],
1690
+ "height_in_cm": value["height_in_cm"],
1691
+ "custom_file": value["custom_file"],
1692
+ "additional_custom_file": value["additional_custom_file"],
1693
+ "additional_info": value["additional_info"],
1694
+ "crop_data": OrderItemCropDataToJSON(value["crop_data"]),
1695
+ "fulfillment_date": value["fulfillment_date"] == null ? value["fulfillment_date"] : value["fulfillment_date"].toISOString(),
1696
+ "custom_file_id": value["custom_file_id"]
1697
+ };
1698
+ }
1699
+
1700
+ // src/types/generated/src/models/OrderOriginalData.ts
1701
+ function instanceOfOrderOriginalData(value) {
1702
+ return true;
1703
+ }
1704
+ function OrderOriginalDataFromJSON(json) {
1705
+ return OrderOriginalDataFromJSONTyped(json, false);
1706
+ }
1707
+ function OrderOriginalDataFromJSONTyped(json, ignoreDiscriminator) {
1708
+ if (json == null) {
1709
+ return json;
1710
+ }
1711
+ return {
1712
+ "currency": json["currency"] == null ? void 0 : json["currency"],
1713
+ "order_sum": json["order_sum"] == null ? void 0 : json["order_sum"],
1714
+ "delivery_cost": json["delivery_cost"] == null ? void 0 : json["delivery_cost"],
1715
+ "payment_cost": json["payment_cost"] == null ? void 0 : json["payment_cost"],
1716
+ "rebate": json["rebate"] == null ? void 0 : json["rebate"]
1717
+ };
1718
+ }
1719
+ function OrderOriginalDataToJSON(json) {
1720
+ return OrderOriginalDataToJSONTyped(json, false);
1721
+ }
1722
+ function OrderOriginalDataToJSONTyped(value, ignoreDiscriminator = false) {
1723
+ if (value == null) {
1724
+ return value;
1725
+ }
1726
+ return {
1727
+ "currency": value["currency"],
1728
+ "order_sum": value["order_sum"],
1729
+ "delivery_cost": value["delivery_cost"],
1730
+ "payment_cost": value["payment_cost"],
1731
+ "rebate": value["rebate"]
1732
+ };
1733
+ }
1734
+
1735
+ // src/types/generated/src/models/Waybill.ts
1736
+ var WaybillDeliveryMethodEnum = /* @__PURE__ */ ((WaybillDeliveryMethodEnum2) => {
1737
+ WaybillDeliveryMethodEnum2["dpd"] = "dpd";
1738
+ WaybillDeliveryMethodEnum2["dpd_de"] = "dpd_de";
1739
+ WaybillDeliveryMethodEnum2["dpd_pl"] = "dpd_pl";
1740
+ WaybillDeliveryMethodEnum2["gls"] = "gls";
1741
+ WaybillDeliveryMethodEnum2["fedex"] = "fedex";
1742
+ WaybillDeliveryMethodEnum2["fedex_pl"] = "fedex_pl";
1743
+ WaybillDeliveryMethodEnum2["dhl"] = "dhl";
1744
+ WaybillDeliveryMethodEnum2["dhl_de"] = "dhl_de";
1745
+ WaybillDeliveryMethodEnum2["ups"] = "ups";
1746
+ WaybillDeliveryMethodEnum2["inpost"] = "inpost";
1747
+ WaybillDeliveryMethodEnum2["to_resolve_in_erp"] = "to_resolve_in_erp";
1748
+ return WaybillDeliveryMethodEnum2;
1749
+ })(WaybillDeliveryMethodEnum || {});
1750
+ function instanceOfWaybill(value) {
1751
+ if (!("file_path" in value) || value["file_path"] === void 0) return false;
1752
+ return true;
1753
+ }
1754
+ function WaybillFromJSON(json) {
1755
+ return WaybillFromJSONTyped(json, false);
1756
+ }
1757
+ function WaybillFromJSONTyped(json, ignoreDiscriminator) {
1758
+ if (json == null) {
1759
+ return json;
1760
+ }
1761
+ return {
1762
+ "number": json["number"] == null ? void 0 : json["number"],
1763
+ "delivery_method": json["delivery_method"] == null ? void 0 : json["delivery_method"],
1764
+ "file_path": json["file_path"],
1765
+ "articles": json["articles"] == null ? void 0 : json["articles"]
1766
+ };
1767
+ }
1768
+ function WaybillToJSON(json) {
1769
+ return WaybillToJSONTyped(json, false);
1770
+ }
1771
+ function WaybillToJSONTyped(value, ignoreDiscriminator = false) {
1772
+ if (value == null) {
1773
+ return value;
1774
+ }
1775
+ return {
1776
+ "number": value["number"],
1777
+ "delivery_method": value["delivery_method"],
1778
+ "file_path": value["file_path"],
1779
+ "articles": value["articles"]
1780
+ };
1781
+ }
1782
+
1783
+ // src/types/generated/src/models/Order.ts
1784
+ var OrderPaymentMethodEnum = /* @__PURE__ */ ((OrderPaymentMethodEnum2) => {
1785
+ OrderPaymentMethodEnum2["gotwka"] = "got\xF3wka";
1786
+ OrderPaymentMethodEnum2["przelew"] = "przelew";
1787
+ OrderPaymentMethodEnum2["karta"] = "karta";
1788
+ OrderPaymentMethodEnum2["Przelewy_24"] = "Przelewy 24";
1789
+ OrderPaymentMethodEnum2["PayU"] = "PayU";
1790
+ OrderPaymentMethodEnum2["PayU_DE"] = "PayU DE";
1791
+ OrderPaymentMethodEnum2["PayU_EN"] = "PayU EN";
1792
+ OrderPaymentMethodEnum2["PayU_PL"] = "PayU PL";
1793
+ OrderPaymentMethodEnum2["Kompensata"] = "Kompensata";
1794
+ OrderPaymentMethodEnum2["PayPal"] = "PayPal";
1795
+ OrderPaymentMethodEnum2["Raty_PayU"] = "Raty PayU";
1796
+ OrderPaymentMethodEnum2["pobranie"] = "pobranie";
1797
+ OrderPaymentMethodEnum2["amazon"] = "amazon";
1798
+ OrderPaymentMethodEnum2["allegro"] = "allegro";
1799
+ OrderPaymentMethodEnum2["Allegro_PayU"] = "Allegro PayU";
1800
+ OrderPaymentMethodEnum2["Allegro_P24"] = "Allegro P24";
1801
+ OrderPaymentMethodEnum2["etsy"] = "etsy";
1802
+ OrderPaymentMethodEnum2["emag_ro"] = "emag.ro";
1803
+ OrderPaymentMethodEnum2["emag_hu"] = "emag.hu";
1804
+ OrderPaymentMethodEnum2["real"] = "real";
1805
+ OrderPaymentMethodEnum2["ebay"] = "ebay";
1806
+ OrderPaymentMethodEnum2["stripe"] = "stripe";
1807
+ OrderPaymentMethodEnum2["BRW"] = "BRW";
1808
+ OrderPaymentMethodEnum2["eMag_bg"] = "eMag.bg";
1809
+ OrderPaymentMethodEnum2["Empik"] = "Empik";
1810
+ OrderPaymentMethodEnum2["Homeyou"] = "Home&you";
1811
+ OrderPaymentMethodEnum2["Home24"] = "Home24";
1812
+ OrderPaymentMethodEnum2["Kaufland"] = "Kaufland";
1813
+ OrderPaymentMethodEnum2["Erli"] = "Erli";
1814
+ OrderPaymentMethodEnum2["Leroy_Merlin"] = "Leroy Merlin";
1815
+ OrderPaymentMethodEnum2["Castorama"] = "Castorama";
1816
+ OrderPaymentMethodEnum2["Vivre"] = "Vivre";
1817
+ OrderPaymentMethodEnum2["Vilandy"] = "Vilandy";
1818
+ OrderPaymentMethodEnum2["Pigu"] = "Pigu";
1819
+ OrderPaymentMethodEnum2["Fruugo"] = "Fruugo";
1820
+ OrderPaymentMethodEnum2["Hood"] = "Hood";
1821
+ OrderPaymentMethodEnum2["XXXLutz"] = "XXXLutz";
1822
+ OrderPaymentMethodEnum2["BricoDepot"] = "BricoDepot";
1823
+ OrderPaymentMethodEnum2["Adyen"] = "Adyen";
1824
+ OrderPaymentMethodEnum2["Mirakl"] = "Mirakl";
1825
+ OrderPaymentMethodEnum2["Payoneer"] = "Payoneer";
1826
+ OrderPaymentMethodEnum2["Hitmeister"] = "Hitmeister";
1827
+ return OrderPaymentMethodEnum2;
1828
+ })(OrderPaymentMethodEnum || {});
1829
+ function instanceOfOrder(value) {
1830
+ if (!("deliver_address" in value) || value["deliver_address"] === void 0) return false;
1831
+ if (!("items" in value) || value["items"] === void 0) return false;
1832
+ if (!("order_time" in value) || value["order_time"] === void 0) return false;
1833
+ if (!("order_channel" in value) || value["order_channel"] === void 0) return false;
1834
+ if (!("currency" in value) || value["currency"] === void 0) return false;
1835
+ return true;
1836
+ }
1837
+ function OrderFromJSON(json) {
1838
+ return OrderFromJSONTyped(json, false);
1839
+ }
1840
+ function OrderFromJSONTyped(json, ignoreDiscriminator) {
1841
+ if (json == null) {
1842
+ return json;
1843
+ }
1844
+ return {
1845
+ "external_id": json["external_id"] == null ? void 0 : json["external_id"],
1846
+ "billing_address": json["billing_address"] == null ? void 0 : BillingAddressFromJSON(json["billing_address"]),
1847
+ "deliver_address": DeliveryAddressFromJSON(json["deliver_address"]),
1848
+ "items": json["items"].map(OrderItemFromJSON),
1849
+ "order_time": new Date(json["order_time"]),
1850
+ "payment_time": json["payment_time"] == null ? void 0 : new Date(json["payment_time"]),
1851
+ "info": json["info"] == null ? void 0 : json["info"],
1852
+ "order_channel": json["order_channel"],
1853
+ "order_source": json["order_source"] == null ? void 0 : json["order_source"],
1854
+ "currency": json["currency"],
1855
+ "company_name": json["company_name"] == null ? void 0 : json["company_name"],
1856
+ "own_delivery": json["own_delivery"] == null ? void 0 : json["own_delivery"],
1857
+ "discount_code": json["discount_code"] == null ? void 0 : json["discount_code"],
1858
+ "partner_code": json["partner_code"] == null ? void 0 : json["partner_code"],
1859
+ "order_original_data": json["order_original_data"] == null ? void 0 : OrderOriginalDataFromJSON(json["order_original_data"]),
1860
+ "payment_method": json["payment_method"] == null ? void 0 : json["payment_method"],
1861
+ "payment_transaction_id": json["payment_transaction_id"] == null ? void 0 : json["payment_transaction_id"],
1862
+ "ag_invoice_requested": json["ag_invoice_requested"] == null ? void 0 : json["ag_invoice_requested"],
1863
+ "waybills": json["waybills"] == null ? void 0 : json["waybills"].map(WaybillFromJSON),
1864
+ "attachments": json["attachments"] == null ? void 0 : json["attachments"].map(AttachmentFromJSON),
1865
+ "suggested_delivery_method": json["suggested_delivery_method"] == null ? void 0 : json["suggested_delivery_method"]
1866
+ };
1867
+ }
1868
+ function OrderToJSON(json) {
1869
+ return OrderToJSONTyped(json, false);
1870
+ }
1871
+ function OrderToJSONTyped(value, ignoreDiscriminator = false) {
1872
+ if (value == null) {
1873
+ return value;
1874
+ }
1875
+ return {
1876
+ "external_id": value["external_id"],
1877
+ "deliver_address": DeliveryAddressToJSON(value["deliver_address"]),
1878
+ "items": value["items"].map(OrderItemToJSON),
1879
+ "order_time": value["order_time"].toISOString(),
1880
+ "payment_time": value["payment_time"] == null ? value["payment_time"] : value["payment_time"].toISOString(),
1881
+ "info": value["info"],
1882
+ "order_channel": value["order_channel"],
1883
+ "currency": value["currency"],
1884
+ "company_name": value["company_name"],
1885
+ "own_delivery": value["own_delivery"],
1886
+ "waybills": value["waybills"] == null ? void 0 : value["waybills"].map(WaybillToJSON),
1887
+ "attachments": value["attachments"] == null ? void 0 : value["attachments"].map(AttachmentToJSON)
1888
+ };
1889
+ }
1890
+
1891
+ // src/types/generated/src/models/OrderCancellation.ts
1892
+ function instanceOfOrderCancellation(value) {
1893
+ if (!("order_id" in value) || value["order_id"] === void 0) return false;
1894
+ return true;
1895
+ }
1896
+ function OrderCancellationFromJSON(json) {
1897
+ return OrderCancellationFromJSONTyped(json, false);
1898
+ }
1899
+ function OrderCancellationFromJSONTyped(json, ignoreDiscriminator) {
1900
+ if (json == null) {
1901
+ return json;
1902
+ }
1903
+ return {
1904
+ "order_id": json["order_id"]
1905
+ };
1906
+ }
1907
+ function OrderCancellationToJSON(json) {
1908
+ return OrderCancellationToJSONTyped(json, false);
1909
+ }
1910
+ function OrderCancellationToJSONTyped(value, ignoreDiscriminator = false) {
1911
+ if (value == null) {
1912
+ return value;
1913
+ }
1914
+ return {
1915
+ "order_id": value["order_id"]
1916
+ };
1917
+ }
1918
+
1919
+ // src/types/generated/src/models/OrderCancellationResponse.ts
1920
+ var OrderCancellationResponseDetailsEnum = /* @__PURE__ */ ((OrderCancellationResponseDetailsEnum2) => {
1921
+ OrderCancellationResponseDetailsEnum2["cancelled"] = "cancelled";
1922
+ OrderCancellationResponseDetailsEnum2["already_in_production"] = "already_in_production";
1923
+ return OrderCancellationResponseDetailsEnum2;
1924
+ })(OrderCancellationResponseDetailsEnum || {});
1925
+ function instanceOfOrderCancellationResponse(value) {
1926
+ return true;
1927
+ }
1928
+ function OrderCancellationResponseFromJSON(json) {
1929
+ return OrderCancellationResponseFromJSONTyped(json, false);
1930
+ }
1931
+ function OrderCancellationResponseFromJSONTyped(json, ignoreDiscriminator) {
1932
+ if (json == null) {
1933
+ return json;
1934
+ }
1935
+ return {
1936
+ "cancelled": json["cancelled"] == null ? void 0 : BoolFromJSON(json["cancelled"]),
1937
+ "details": json["details"] == null ? void 0 : json["details"]
1938
+ };
1939
+ }
1940
+ function OrderCancellationResponseToJSON(json) {
1941
+ return OrderCancellationResponseToJSONTyped(json, false);
1942
+ }
1943
+ function OrderCancellationResponseToJSONTyped(value, ignoreDiscriminator = false) {
1944
+ if (value == null) {
1945
+ return value;
1946
+ }
1947
+ return {
1948
+ "cancelled": BoolToJSON(value["cancelled"]),
1949
+ "details": value["details"]
1950
+ };
1951
+ }
1952
+
1953
+ // src/types/generated/src/models/OrderComment.ts
1954
+ var OrderCommentAuthorTypeEnum = /* @__PURE__ */ ((OrderCommentAuthorTypeEnum2) => {
1955
+ OrderCommentAuthorTypeEnum2["client"] = "client";
1956
+ OrderCommentAuthorTypeEnum2["support"] = "support";
1957
+ return OrderCommentAuthorTypeEnum2;
1958
+ })(OrderCommentAuthorTypeEnum || {});
1959
+ function instanceOfOrderComment(value) {
1960
+ return true;
1961
+ }
1962
+ function OrderCommentFromJSON(json) {
1963
+ return OrderCommentFromJSONTyped(json, false);
1964
+ }
1965
+ function OrderCommentFromJSONTyped(json, ignoreDiscriminator) {
1966
+ if (json == null) {
1967
+ return json;
1968
+ }
1969
+ return {
1970
+ "comment_id": json["comment_id"] == null ? void 0 : json["comment_id"],
1971
+ "author_type": json["author_type"] == null ? void 0 : json["author_type"],
1972
+ "author": json["author"] == null ? void 0 : json["author"],
1973
+ "content": json["content"] == null ? void 0 : json["content"],
1974
+ "created_at": json["created_at"] == null ? void 0 : new Date(json["created_at"])
1975
+ };
1976
+ }
1977
+ function OrderCommentToJSON(json) {
1978
+ return OrderCommentToJSONTyped(json, false);
1979
+ }
1980
+ function OrderCommentToJSONTyped(value, ignoreDiscriminator = false) {
1981
+ if (value == null) {
1982
+ return value;
1983
+ }
1984
+ return {
1985
+ "comment_id": value["comment_id"],
1986
+ "author_type": value["author_type"],
1987
+ "author": value["author"],
1988
+ "content": value["content"],
1989
+ "created_at": value["created_at"] == null ? value["created_at"] : value["created_at"].toISOString()
1990
+ };
1991
+ }
1992
+
1993
+ // src/types/generated/src/models/OrderItemStatus.ts
1994
+ var OrderItemStatusStatusEnum = /* @__PURE__ */ ((OrderItemStatusStatusEnum2) => {
1995
+ OrderItemStatusStatusEnum2["new"] = "new";
1996
+ OrderItemStatusStatusEnum2["wait_for_payment"] = "wait_for_payment";
1997
+ OrderItemStatusStatusEnum2["paid"] = "paid";
1998
+ OrderItemStatusStatusEnum2["in_progress"] = "in_progress";
1999
+ OrderItemStatusStatusEnum2["ready_to_be_sent"] = "ready_to_be_sent";
2000
+ OrderItemStatusStatusEnum2["sent"] = "sent";
2001
+ OrderItemStatusStatusEnum2["cancelled"] = "cancelled";
2002
+ OrderItemStatusStatusEnum2["hold"] = "hold";
2003
+ OrderItemStatusStatusEnum2["refund"] = "refund";
2004
+ return OrderItemStatusStatusEnum2;
2005
+ })(OrderItemStatusStatusEnum || {});
2006
+ function instanceOfOrderItemStatus(value) {
2007
+ return true;
2008
+ }
2009
+ function OrderItemStatusFromJSON(json) {
2010
+ return OrderItemStatusFromJSONTyped(json, false);
2011
+ }
2012
+ function OrderItemStatusFromJSONTyped(json, ignoreDiscriminator) {
2013
+ if (json == null) {
2014
+ return json;
2015
+ }
2016
+ return {
2017
+ "doboxa_order_id": json["doboxa_order_id"] == null ? void 0 : json["doboxa_order_id"],
2018
+ "external_order_id": json["external_order_id"] == null ? void 0 : json["external_order_id"],
2019
+ "doboxa_item_id": json["doboxa_item_id"] == null ? void 0 : json["doboxa_item_id"],
2020
+ "foreign_item_id": json["foreign_item_id"] == null ? void 0 : json["foreign_item_id"],
2021
+ "product_sku": json["product_sku"] == null ? void 0 : json["product_sku"],
2022
+ "status": json["status"] == null ? void 0 : json["status"]
2023
+ };
2024
+ }
2025
+ function OrderItemStatusToJSON(json) {
2026
+ return OrderItemStatusToJSONTyped(json, false);
2027
+ }
2028
+ function OrderItemStatusToJSONTyped(value, ignoreDiscriminator = false) {
2029
+ if (value == null) {
2030
+ return value;
2031
+ }
2032
+ return {
2033
+ "doboxa_order_id": value["doboxa_order_id"],
2034
+ "external_order_id": value["external_order_id"],
2035
+ "doboxa_item_id": value["doboxa_item_id"],
2036
+ "foreign_item_id": value["foreign_item_id"],
2037
+ "product_sku": value["product_sku"],
2038
+ "status": value["status"]
2039
+ };
2040
+ }
2041
+
2042
+ // src/types/generated/src/models/OrderStatus.ts
2043
+ var OrderStatusStatusEnum = /* @__PURE__ */ ((OrderStatusStatusEnum2) => {
2044
+ OrderStatusStatusEnum2["new"] = "new";
2045
+ OrderStatusStatusEnum2["wait_for_payment"] = "wait_for_payment";
2046
+ OrderStatusStatusEnum2["paid"] = "paid";
2047
+ OrderStatusStatusEnum2["in_progress"] = "in_progress";
2048
+ OrderStatusStatusEnum2["ready_to_be_sent"] = "ready_to_be_sent";
2049
+ OrderStatusStatusEnum2["sent"] = "sent";
2050
+ OrderStatusStatusEnum2["cancelled"] = "cancelled";
2051
+ OrderStatusStatusEnum2["hold"] = "hold";
2052
+ OrderStatusStatusEnum2["refund"] = "refund";
2053
+ return OrderStatusStatusEnum2;
2054
+ })(OrderStatusStatusEnum || {});
2055
+ function instanceOfOrderStatus(value) {
2056
+ return true;
2057
+ }
2058
+ function OrderStatusFromJSON(json) {
2059
+ return OrderStatusFromJSONTyped(json, false);
2060
+ }
2061
+ function OrderStatusFromJSONTyped(json, ignoreDiscriminator) {
2062
+ if (json == null) {
2063
+ return json;
2064
+ }
2065
+ return {
2066
+ "status": json["status"] == null ? void 0 : json["status"],
2067
+ "item_status": json["item_status"] == null ? void 0 : json["item_status"].map(OrderItemStatusFromJSON)
2068
+ };
2069
+ }
2070
+ function OrderStatusToJSON(json) {
2071
+ return OrderStatusToJSONTyped(json, false);
2072
+ }
2073
+ function OrderStatusToJSONTyped(value, ignoreDiscriminator = false) {
2074
+ if (value == null) {
2075
+ return value;
2076
+ }
2077
+ return {
2078
+ "status": value["status"],
2079
+ "item_status": value["item_status"] == null ? void 0 : value["item_status"].map(OrderItemStatusToJSON)
2080
+ };
2081
+ }
2082
+
2083
+ // src/types/generated/src/models/OrderStatusChange.ts
2084
+ var OrderStatusChangeStatusEnum = /* @__PURE__ */ ((OrderStatusChangeStatusEnum2) => {
2085
+ OrderStatusChangeStatusEnum2["new"] = "new";
2086
+ OrderStatusChangeStatusEnum2["wait_for_payment"] = "wait_for_payment";
2087
+ OrderStatusChangeStatusEnum2["paid"] = "paid";
2088
+ OrderStatusChangeStatusEnum2["in_progress"] = "in_progress";
2089
+ OrderStatusChangeStatusEnum2["ready_to_be_sent"] = "ready_to_be_sent";
2090
+ OrderStatusChangeStatusEnum2["sent"] = "sent";
2091
+ OrderStatusChangeStatusEnum2["cancelled"] = "cancelled";
2092
+ OrderStatusChangeStatusEnum2["hold"] = "hold";
2093
+ OrderStatusChangeStatusEnum2["refund"] = "refund";
2094
+ return OrderStatusChangeStatusEnum2;
2095
+ })(OrderStatusChangeStatusEnum || {});
2096
+ function instanceOfOrderStatusChange(value) {
2097
+ return true;
2098
+ }
2099
+ function OrderStatusChangeFromJSON(json) {
2100
+ return OrderStatusChangeFromJSONTyped(json, false);
2101
+ }
2102
+ function OrderStatusChangeFromJSONTyped(json, ignoreDiscriminator) {
2103
+ if (json == null) {
2104
+ return json;
2105
+ }
2106
+ return {
2107
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2108
+ "status": json["status"] == null ? void 0 : json["status"],
2109
+ "change_time": json["change_time"] == null ? void 0 : new Date(json["change_time"]),
2110
+ "item_status": json["item_status"] == null ? void 0 : json["item_status"].map(OrderItemStatusFromJSON)
2111
+ };
2112
+ }
2113
+ function OrderStatusChangeToJSON(json) {
2114
+ return OrderStatusChangeToJSONTyped(json, false);
2115
+ }
2116
+ function OrderStatusChangeToJSONTyped(value, ignoreDiscriminator = false) {
2117
+ if (value == null) {
2118
+ return value;
2119
+ }
2120
+ return {
2121
+ "order_id": value["order_id"],
2122
+ "status": value["status"],
2123
+ "change_time": value["change_time"] == null ? value["change_time"] : value["change_time"].toISOString(),
2124
+ "item_status": value["item_status"] == null ? void 0 : value["item_status"].map(OrderItemStatusToJSON)
2125
+ };
2126
+ }
2127
+
2128
+ // src/types/generated/src/models/PageOfClients.ts
2129
+ function instanceOfPageOfClients(value) {
2130
+ return true;
2131
+ }
2132
+ function PageOfClientsFromJSON(json) {
2133
+ return PageOfClientsFromJSONTyped(json, false);
2134
+ }
2135
+ function PageOfClientsFromJSONTyped(json, ignoreDiscriminator) {
2136
+ if (json == null) {
2137
+ return json;
2138
+ }
2139
+ return {
2140
+ "items": json["items"] == null ? void 0 : json["items"].map(ClientFromJSON),
2141
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
2142
+ };
2143
+ }
2144
+ function PageOfClientsToJSON(json) {
2145
+ return PageOfClientsToJSONTyped(json, false);
2146
+ }
2147
+ function PageOfClientsToJSONTyped(value, ignoreDiscriminator = false) {
2148
+ if (value == null) {
2149
+ return value;
2150
+ }
2151
+ return {
2152
+ "items": value["items"] == null ? void 0 : value["items"].map(ClientToJSON),
2153
+ "next_page": value["next_page"]
2154
+ };
2155
+ }
2156
+
2157
+ // src/types/generated/src/models/PageOfInvoices.ts
2158
+ function instanceOfPageOfInvoices(value) {
2159
+ return true;
2160
+ }
2161
+ function PageOfInvoicesFromJSON(json) {
2162
+ return PageOfInvoicesFromJSONTyped(json, false);
2163
+ }
2164
+ function PageOfInvoicesFromJSONTyped(json, ignoreDiscriminator) {
2165
+ if (json == null) {
2166
+ return json;
2167
+ }
2168
+ return {
2169
+ "items": json["items"] == null ? void 0 : json["items"].map(InvoiceFromJSON),
2170
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
2171
+ };
2172
+ }
2173
+ function PageOfInvoicesToJSON(json) {
2174
+ return PageOfInvoicesToJSONTyped(json, false);
2175
+ }
2176
+ function PageOfInvoicesToJSONTyped(value, ignoreDiscriminator = false) {
2177
+ if (value == null) {
2178
+ return value;
2179
+ }
2180
+ return {
2181
+ "items": value["items"] == null ? void 0 : value["items"].map(InvoiceToJSON),
2182
+ "next_page": value["next_page"]
2183
+ };
2184
+ }
2185
+
2186
+ // src/types/generated/src/models/PageOfOrderComments.ts
2187
+ function instanceOfPageOfOrderComments(value) {
2188
+ return true;
2189
+ }
2190
+ function PageOfOrderCommentsFromJSON(json) {
2191
+ return PageOfOrderCommentsFromJSONTyped(json, false);
2192
+ }
2193
+ function PageOfOrderCommentsFromJSONTyped(json, ignoreDiscriminator) {
2194
+ if (json == null) {
2195
+ return json;
2196
+ }
2197
+ return {
2198
+ "items": json["items"] == null ? void 0 : json["items"].map(OrderCommentFromJSON),
2199
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
2200
+ };
2201
+ }
2202
+ function PageOfOrderCommentsToJSON(json) {
2203
+ return PageOfOrderCommentsToJSONTyped(json, false);
2204
+ }
2205
+ function PageOfOrderCommentsToJSONTyped(value, ignoreDiscriminator = false) {
2206
+ if (value == null) {
2207
+ return value;
2208
+ }
2209
+ return {
2210
+ "items": value["items"] == null ? void 0 : value["items"].map(OrderCommentToJSON),
2211
+ "next_page": value["next_page"]
2212
+ };
2213
+ }
2214
+
2215
+ // src/types/generated/src/models/PageOfOrderStatusChanges.ts
2216
+ function instanceOfPageOfOrderStatusChanges(value) {
2217
+ return true;
2218
+ }
2219
+ function PageOfOrderStatusChangesFromJSON(json) {
2220
+ return PageOfOrderStatusChangesFromJSONTyped(json, false);
2221
+ }
2222
+ function PageOfOrderStatusChangesFromJSONTyped(json, ignoreDiscriminator) {
2223
+ if (json == null) {
2224
+ return json;
2225
+ }
2226
+ return {
2227
+ "items": json["items"] == null ? void 0 : json["items"].map(OrderStatusChangeFromJSON),
2228
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
2229
+ };
2230
+ }
2231
+ function PageOfOrderStatusChangesToJSON(json) {
2232
+ return PageOfOrderStatusChangesToJSONTyped(json, false);
2233
+ }
2234
+ function PageOfOrderStatusChangesToJSONTyped(value, ignoreDiscriminator = false) {
2235
+ if (value == null) {
2236
+ return value;
2237
+ }
2238
+ return {
2239
+ "items": value["items"] == null ? void 0 : value["items"].map(OrderStatusChangeToJSON),
2240
+ "next_page": value["next_page"]
2241
+ };
2242
+ }
2243
+
2244
+ // src/types/generated/src/models/ReturnLabel.ts
2245
+ function instanceOfReturnLabel(value) {
2246
+ return true;
2247
+ }
2248
+ function ReturnLabelFromJSON(json) {
2249
+ return ReturnLabelFromJSONTyped(json, false);
2250
+ }
2251
+ function ReturnLabelFromJSONTyped(json, ignoreDiscriminator) {
2252
+ if (json == null) {
2253
+ return json;
2254
+ }
2255
+ return {
2256
+ "number": json["number"] == null ? void 0 : json["number"],
2257
+ "delivery_method": json["delivery_method"] == null ? void 0 : json["delivery_method"]
2258
+ };
2259
+ }
2260
+ function ReturnLabelToJSON(json) {
2261
+ return ReturnLabelToJSONTyped(json, false);
2262
+ }
2263
+ function ReturnLabelToJSONTyped(value, ignoreDiscriminator = false) {
2264
+ if (value == null) {
2265
+ return value;
2266
+ }
2267
+ return {
2268
+ "number": value["number"],
2269
+ "delivery_method": value["delivery_method"]
2270
+ };
2271
+ }
2272
+
2273
+ // src/types/generated/src/models/TrackingNumberItem.ts
2274
+ function instanceOfTrackingNumberItem(value) {
2275
+ return true;
2276
+ }
2277
+ function TrackingNumberItemFromJSON(json) {
2278
+ return TrackingNumberItemFromJSONTyped(json, false);
2279
+ }
2280
+ function TrackingNumberItemFromJSONTyped(json, ignoreDiscriminator) {
2281
+ if (json == null) {
2282
+ return json;
2283
+ }
2284
+ return {
2285
+ "doboxa_item_id": json["doboxa_item_id"] == null ? void 0 : json["doboxa_item_id"],
2286
+ "foreign_item_id": json["foreign_item_id"] == null ? void 0 : json["foreign_item_id"],
2287
+ "product_sku": json["product_sku"] == null ? void 0 : json["product_sku"]
2288
+ };
2289
+ }
2290
+ function TrackingNumberItemToJSON(json) {
2291
+ return TrackingNumberItemToJSONTyped(json, false);
2292
+ }
2293
+ function TrackingNumberItemToJSONTyped(value, ignoreDiscriminator = false) {
2294
+ if (value == null) {
2295
+ return value;
2296
+ }
2297
+ return {
2298
+ "doboxa_item_id": value["doboxa_item_id"],
2299
+ "foreign_item_id": value["foreign_item_id"],
2300
+ "product_sku": value["product_sku"]
2301
+ };
2302
+ }
2303
+
2304
+ // src/types/generated/src/models/TrackingNumber.ts
2305
+ function instanceOfTrackingNumber(value) {
2306
+ return true;
2307
+ }
2308
+ function TrackingNumberFromJSON(json) {
2309
+ return TrackingNumberFromJSONTyped(json, false);
2310
+ }
2311
+ function TrackingNumberFromJSONTyped(json, ignoreDiscriminator) {
2312
+ if (json == null) {
2313
+ return json;
2314
+ }
2315
+ return {
2316
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"],
2317
+ "number": json["number"] == null ? void 0 : json["number"],
2318
+ "delivery_method": json["delivery_method"] == null ? void 0 : json["delivery_method"],
2319
+ "sent_at": json["sent_at"] == null ? void 0 : new Date(json["sent_at"]),
2320
+ "created_at": json["created_at"] == null ? void 0 : new Date(json["created_at"]),
2321
+ "return_label": json["return_label"] == null ? void 0 : ReturnLabelFromJSON(json["return_label"]),
2322
+ "order_items": json["order_items"] == null ? void 0 : json["order_items"].map(TrackingNumberItemFromJSON)
2323
+ };
2324
+ }
2325
+ function TrackingNumberToJSON(json) {
2326
+ return TrackingNumberToJSONTyped(json, false);
2327
+ }
2328
+ function TrackingNumberToJSONTyped(value, ignoreDiscriminator = false) {
2329
+ if (value == null) {
2330
+ return value;
2331
+ }
2332
+ return {
2333
+ "order_id": value["order_id"],
2334
+ "number": value["number"],
2335
+ "delivery_method": value["delivery_method"],
2336
+ "sent_at": value["sent_at"] == null ? value["sent_at"] : value["sent_at"].toISOString(),
2337
+ "created_at": value["created_at"] == null ? value["created_at"] : value["created_at"].toISOString(),
2338
+ "return_label": ReturnLabelToJSON(value["return_label"]),
2339
+ "order_items": value["order_items"] == null ? void 0 : value["order_items"].map(TrackingNumberItemToJSON)
2340
+ };
2341
+ }
2342
+
2343
+ // src/types/generated/src/models/PageOfTrackingNumbers.ts
2344
+ function instanceOfPageOfTrackingNumbers(value) {
2345
+ return true;
2346
+ }
2347
+ function PageOfTrackingNumbersFromJSON(json) {
2348
+ return PageOfTrackingNumbersFromJSONTyped(json, false);
2349
+ }
2350
+ function PageOfTrackingNumbersFromJSONTyped(json, ignoreDiscriminator) {
2351
+ if (json == null) {
2352
+ return json;
2353
+ }
2354
+ return {
2355
+ "items": json["items"] == null ? void 0 : json["items"].map(TrackingNumberFromJSON),
2356
+ "next_page": json["next_page"] == null ? void 0 : json["next_page"]
2357
+ };
2358
+ }
2359
+ function PageOfTrackingNumbersToJSON(json) {
2360
+ return PageOfTrackingNumbersToJSONTyped(json, false);
2361
+ }
2362
+ function PageOfTrackingNumbersToJSONTyped(value, ignoreDiscriminator = false) {
2363
+ if (value == null) {
2364
+ return value;
2365
+ }
2366
+ return {
2367
+ "items": value["items"] == null ? void 0 : value["items"].map(TrackingNumberToJSON),
2368
+ "next_page": value["next_page"]
2369
+ };
2370
+ }
2371
+
2372
+ // src/types/generated/src/models/PostOrderCommentResponse.ts
2373
+ function instanceOfPostOrderCommentResponse(value) {
2374
+ return true;
2375
+ }
2376
+ function PostOrderCommentResponseFromJSON(json) {
2377
+ return PostOrderCommentResponseFromJSONTyped(json, false);
2378
+ }
2379
+ function PostOrderCommentResponseFromJSONTyped(json, ignoreDiscriminator) {
2380
+ if (json == null) {
2381
+ return json;
2382
+ }
2383
+ return {
2384
+ "result_code": json["result_code"] == null ? void 0 : json["result_code"],
2385
+ "comment_id": json["comment_id"] == null ? void 0 : json["comment_id"]
2386
+ };
2387
+ }
2388
+ function PostOrderCommentResponseToJSON(json) {
2389
+ return PostOrderCommentResponseToJSONTyped(json, false);
2390
+ }
2391
+ function PostOrderCommentResponseToJSONTyped(value, ignoreDiscriminator = false) {
2392
+ if (value == null) {
2393
+ return value;
2394
+ }
2395
+ return {
2396
+ "result_code": value["result_code"],
2397
+ "comment_id": value["comment_id"]
2398
+ };
2399
+ }
2400
+
2401
+ // src/types/generated/src/models/PostOrderResponse.ts
2402
+ function instanceOfPostOrderResponse(value) {
2403
+ return true;
2404
+ }
2405
+ function PostOrderResponseFromJSON(json) {
2406
+ return PostOrderResponseFromJSONTyped(json, false);
2407
+ }
2408
+ function PostOrderResponseFromJSONTyped(json, ignoreDiscriminator) {
2409
+ if (json == null) {
2410
+ return json;
2411
+ }
2412
+ return {
2413
+ "result_code": json["result_code"] == null ? void 0 : json["result_code"],
2414
+ "order_id": json["order_id"] == null ? void 0 : json["order_id"]
2415
+ };
2416
+ }
2417
+ function PostOrderResponseToJSON(json) {
2418
+ return PostOrderResponseToJSONTyped(json, false);
2419
+ }
2420
+ function PostOrderResponseToJSONTyped(value, ignoreDiscriminator = false) {
2421
+ if (value == null) {
2422
+ return value;
2423
+ }
2424
+ return {
2425
+ "result_code": value["result_code"],
2426
+ "order_id": value["order_id"]
2427
+ };
2428
+ }
2429
+
2430
+ // src/types/generated/src/models/PostOrderStatusItem.ts
2431
+ var PostOrderStatusItemStatusEnum = /* @__PURE__ */ ((PostOrderStatusItemStatusEnum2) => {
2432
+ PostOrderStatusItemStatusEnum2["new"] = "new";
2433
+ PostOrderStatusItemStatusEnum2["wait_for_payment"] = "wait_for_payment";
2434
+ PostOrderStatusItemStatusEnum2["paid"] = "paid";
2435
+ PostOrderStatusItemStatusEnum2["in_progress"] = "in_progress";
2436
+ PostOrderStatusItemStatusEnum2["ready_to_be_sent"] = "ready_to_be_sent";
2437
+ PostOrderStatusItemStatusEnum2["sent"] = "sent";
2438
+ PostOrderStatusItemStatusEnum2["cancelled"] = "cancelled";
2439
+ PostOrderStatusItemStatusEnum2["hold"] = "hold";
2440
+ PostOrderStatusItemStatusEnum2["refund"] = "refund";
2441
+ return PostOrderStatusItemStatusEnum2;
2442
+ })(PostOrderStatusItemStatusEnum || {});
2443
+ function instanceOfPostOrderStatusItem(value) {
2444
+ if (!("doboxa_item_id" in value) || value["doboxa_item_id"] === void 0) return false;
2445
+ if (!("status" in value) || value["status"] === void 0) return false;
2446
+ return true;
2447
+ }
2448
+ function PostOrderStatusItemFromJSON(json) {
2449
+ return PostOrderStatusItemFromJSONTyped(json, false);
2450
+ }
2451
+ function PostOrderStatusItemFromJSONTyped(json, ignoreDiscriminator) {
2452
+ if (json == null) {
2453
+ return json;
2454
+ }
2455
+ return {
2456
+ "doboxa_item_id": json["doboxa_item_id"],
2457
+ "status": json["status"]
2458
+ };
2459
+ }
2460
+ function PostOrderStatusItemToJSON(json) {
2461
+ return PostOrderStatusItemToJSONTyped(json, false);
2462
+ }
2463
+ function PostOrderStatusItemToJSONTyped(value, ignoreDiscriminator = false) {
2464
+ if (value == null) {
2465
+ return value;
2466
+ }
2467
+ return {
2468
+ "doboxa_item_id": value["doboxa_item_id"],
2469
+ "status": value["status"]
2470
+ };
2471
+ }
2472
+
2473
+ // src/types/generated/src/models/PostOrderStatus.ts
2474
+ var PostOrderStatusStatusEnum = /* @__PURE__ */ ((PostOrderStatusStatusEnum2) => {
2475
+ PostOrderStatusStatusEnum2["new"] = "new";
2476
+ PostOrderStatusStatusEnum2["wait_for_payment"] = "wait_for_payment";
2477
+ PostOrderStatusStatusEnum2["paid"] = "paid";
2478
+ PostOrderStatusStatusEnum2["in_progress"] = "in_progress";
2479
+ PostOrderStatusStatusEnum2["ready_to_be_sent"] = "ready_to_be_sent";
2480
+ PostOrderStatusStatusEnum2["sent"] = "sent";
2481
+ PostOrderStatusStatusEnum2["cancelled"] = "cancelled";
2482
+ PostOrderStatusStatusEnum2["hold"] = "hold";
2483
+ PostOrderStatusStatusEnum2["refund"] = "refund";
2484
+ return PostOrderStatusStatusEnum2;
2485
+ })(PostOrderStatusStatusEnum || {});
2486
+ function instanceOfPostOrderStatus(value) {
2487
+ if (!("status" in value) || value["status"] === void 0) return false;
2488
+ return true;
2489
+ }
2490
+ function PostOrderStatusFromJSON(json) {
2491
+ return PostOrderStatusFromJSONTyped(json, false);
2492
+ }
2493
+ function PostOrderStatusFromJSONTyped(json, ignoreDiscriminator) {
2494
+ if (json == null) {
2495
+ return json;
2496
+ }
2497
+ return {
2498
+ "status": json["status"],
2499
+ "item_status": json["item_status"] == null ? void 0 : json["item_status"].map(PostOrderStatusItemFromJSON)
2500
+ };
2501
+ }
2502
+ function PostOrderStatusToJSON(json) {
2503
+ return PostOrderStatusToJSONTyped(json, false);
2504
+ }
2505
+ function PostOrderStatusToJSONTyped(value, ignoreDiscriminator = false) {
2506
+ if (value == null) {
2507
+ return value;
2508
+ }
2509
+ return {
2510
+ "status": value["status"],
2511
+ "item_status": value["item_status"] == null ? void 0 : value["item_status"].map(PostOrderStatusItemToJSON)
2512
+ };
2513
+ }
2514
+
2515
+ // src/types/generated/src/models/PostOrderStatusResponse.ts
2516
+ function instanceOfPostOrderStatusResponse(value) {
2517
+ return true;
2518
+ }
2519
+ function PostOrderStatusResponseFromJSON(json) {
2520
+ return PostOrderStatusResponseFromJSONTyped(json, false);
2521
+ }
2522
+ function PostOrderStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
2523
+ if (json == null) {
2524
+ return json;
2525
+ }
2526
+ return {
2527
+ "result_code": json["result_code"] == null ? void 0 : json["result_code"]
2528
+ };
2529
+ }
2530
+ function PostOrderStatusResponseToJSON(json) {
2531
+ return PostOrderStatusResponseToJSONTyped(json, false);
2532
+ }
2533
+ function PostOrderStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
2534
+ if (value == null) {
2535
+ return value;
2536
+ }
2537
+ return {
2538
+ "result_code": value["result_code"]
2539
+ };
2540
+ }
2541
+
2542
+ // src/types/generated/src/models/ServerErrorResponse.ts
2543
+ function instanceOfServerErrorResponse(value) {
2544
+ return true;
2545
+ }
2546
+ function ServerErrorResponseFromJSON(json) {
2547
+ return ServerErrorResponseFromJSONTyped(json, false);
2548
+ }
2549
+ function ServerErrorResponseFromJSONTyped(json, ignoreDiscriminator) {
2550
+ if (json == null) {
2551
+ return json;
2552
+ }
2553
+ return {
2554
+ "result_code": json["result_code"] == null ? void 0 : json["result_code"],
2555
+ "error_message": json["error_message"] == null ? void 0 : json["error_message"]
2556
+ };
2557
+ }
2558
+ function ServerErrorResponseToJSON(json) {
2559
+ return ServerErrorResponseToJSONTyped(json, false);
2560
+ }
2561
+ function ServerErrorResponseToJSONTyped(value, ignoreDiscriminator = false) {
2562
+ if (value == null) {
2563
+ return value;
2564
+ }
2565
+ return {
2566
+ "result_code": value["result_code"],
2567
+ "error_message": value["error_message"]
2568
+ };
2569
+ }
2570
+
2571
+ // src/types/generated/src/apis/OrderApi.ts
2572
+ var OrderApi = class extends BaseAPI {
2573
+ /**
2574
+ * Get a specific order comments
2575
+ */
2576
+ getAppEcommerceApiV2GetordercommentsInvokeRaw(requestParameters, initOverrides) {
2577
+ return __async(this, null, function* () {
2578
+ if (requestParameters["orderId"] == null) {
2579
+ throw new RequiredError(
2580
+ "orderId",
2581
+ 'Required parameter "orderId" was null or undefined when calling getAppEcommerceApiV2GetordercommentsInvoke().'
2582
+ );
2583
+ }
2584
+ const queryParameters = {};
2585
+ const headerParameters = {};
2586
+ if (this.configuration && this.configuration.apiKey) {
2587
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2588
+ }
2589
+ let urlPath = `/api/v2/order/{order_id}/comment`;
2590
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2591
+ const response = yield this.request({
2592
+ path: urlPath,
2593
+ method: "GET",
2594
+ headers: headerParameters,
2595
+ query: queryParameters
2596
+ }, initOverrides);
2597
+ return new JSONApiResponse(response, (jsonValue) => PageOfOrderCommentsFromJSON(jsonValue));
2598
+ });
2599
+ }
2600
+ /**
2601
+ * Get a specific order comments
2602
+ */
2603
+ getAppEcommerceApiV2GetordercommentsInvoke(orderId, initOverrides) {
2604
+ return __async(this, null, function* () {
2605
+ const response = yield this.getAppEcommerceApiV2GetordercommentsInvokeRaw({ orderId }, initOverrides);
2606
+ return yield response.value();
2607
+ });
2608
+ }
2609
+ /**
2610
+ * Get Order invoices
2611
+ */
2612
+ getAppEcommerceApiV2GetorderinvoicesInvokeRaw(requestParameters, initOverrides) {
2613
+ return __async(this, null, function* () {
2614
+ if (requestParameters["orderId"] == null) {
2615
+ throw new RequiredError(
2616
+ "orderId",
2617
+ 'Required parameter "orderId" was null or undefined when calling getAppEcommerceApiV2GetorderinvoicesInvoke().'
2618
+ );
2619
+ }
2620
+ const queryParameters = {};
2621
+ const headerParameters = {};
2622
+ if (this.configuration && this.configuration.apiKey) {
2623
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2624
+ }
2625
+ let urlPath = `/api/v2/order/{order_id}/invoice`;
2626
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2627
+ const response = yield this.request({
2628
+ path: urlPath,
2629
+ method: "GET",
2630
+ headers: headerParameters,
2631
+ query: queryParameters
2632
+ }, initOverrides);
2633
+ return new JSONApiResponse(response, (jsonValue) => PageOfInvoicesFromJSON(jsonValue));
2634
+ });
2635
+ }
2636
+ /**
2637
+ * Get Order invoices
2638
+ */
2639
+ getAppEcommerceApiV2GetorderinvoicesInvoke(orderId, initOverrides) {
2640
+ return __async(this, null, function* () {
2641
+ const response = yield this.getAppEcommerceApiV2GetorderinvoicesInvokeRaw({ orderId }, initOverrides);
2642
+ return yield response.value();
2643
+ });
2644
+ }
2645
+ /**
2646
+ * Get current order status
2647
+ */
2648
+ getAppEcommerceApiV2GetorderstatusInvokeRaw(requestParameters, initOverrides) {
2649
+ return __async(this, null, function* () {
2650
+ if (requestParameters["orderId"] == null) {
2651
+ throw new RequiredError(
2652
+ "orderId",
2653
+ 'Required parameter "orderId" was null or undefined when calling getAppEcommerceApiV2GetorderstatusInvoke().'
2654
+ );
2655
+ }
2656
+ const queryParameters = {};
2657
+ const headerParameters = {};
2658
+ if (this.configuration && this.configuration.apiKey) {
2659
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2660
+ }
2661
+ let urlPath = `/api/v2/order/{order_id}/status`;
2662
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2663
+ const response = yield this.request({
2664
+ path: urlPath,
2665
+ method: "GET",
2666
+ headers: headerParameters,
2667
+ query: queryParameters
2668
+ }, initOverrides);
2669
+ return new JSONApiResponse(response, (jsonValue) => OrderStatusFromJSON(jsonValue));
2670
+ });
2671
+ }
2672
+ /**
2673
+ * Get current order status
2674
+ */
2675
+ getAppEcommerceApiV2GetorderstatusInvoke(orderId, initOverrides) {
2676
+ return __async(this, null, function* () {
2677
+ const response = yield this.getAppEcommerceApiV2GetorderstatusInvokeRaw({ orderId }, initOverrides);
2678
+ return yield response.value();
2679
+ });
2680
+ }
2681
+ /**
2682
+ * Get Order tracking numbers
2683
+ */
2684
+ getAppEcommerceApiV2GetordertrackingnumbersInvokeRaw(requestParameters, initOverrides) {
2685
+ return __async(this, null, function* () {
2686
+ if (requestParameters["orderId"] == null) {
2687
+ throw new RequiredError(
2688
+ "orderId",
2689
+ 'Required parameter "orderId" was null or undefined when calling getAppEcommerceApiV2GetordertrackingnumbersInvoke().'
2690
+ );
2691
+ }
2692
+ const queryParameters = {};
2693
+ const headerParameters = {};
2694
+ if (this.configuration && this.configuration.apiKey) {
2695
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2696
+ }
2697
+ let urlPath = `/api/v2/order/{order_id}/tracking_number`;
2698
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2699
+ const response = yield this.request({
2700
+ path: urlPath,
2701
+ method: "GET",
2702
+ headers: headerParameters,
2703
+ query: queryParameters
2704
+ }, initOverrides);
2705
+ return new JSONApiResponse(response, (jsonValue) => PageOfTrackingNumbersFromJSON(jsonValue));
2706
+ });
2707
+ }
2708
+ /**
2709
+ * Get Order tracking numbers
2710
+ */
2711
+ getAppEcommerceApiV2GetordertrackingnumbersInvoke(orderId, initOverrides) {
2712
+ return __async(this, null, function* () {
2713
+ const response = yield this.getAppEcommerceApiV2GetordertrackingnumbersInvokeRaw({ orderId }, initOverrides);
2714
+ return yield response.value();
2715
+ });
2716
+ }
2717
+ /**
2718
+ * Create an Order
2719
+ */
2720
+ postAppEcommerceApiV2PostorderInvokeRaw(requestParameters, initOverrides) {
2721
+ return __async(this, null, function* () {
2722
+ if (requestParameters["order"] == null) {
2723
+ throw new RequiredError(
2724
+ "order",
2725
+ 'Required parameter "order" was null or undefined when calling postAppEcommerceApiV2PostorderInvoke().'
2726
+ );
2727
+ }
2728
+ const queryParameters = {};
2729
+ const headerParameters = {};
2730
+ headerParameters["Content-Type"] = "application/json";
2731
+ if (this.configuration && this.configuration.apiKey) {
2732
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2733
+ }
2734
+ let urlPath = `/api/v2/order`;
2735
+ const response = yield this.request({
2736
+ path: urlPath,
2737
+ method: "POST",
2738
+ headers: headerParameters,
2739
+ query: queryParameters,
2740
+ body: OrderToJSON(requestParameters["order"])
2741
+ }, initOverrides);
2742
+ return new JSONApiResponse(response, (jsonValue) => PostOrderResponseFromJSON(jsonValue));
2743
+ });
2744
+ }
2745
+ /**
2746
+ * Create an Order
2747
+ */
2748
+ postAppEcommerceApiV2PostorderInvoke(order, initOverrides) {
2749
+ return __async(this, null, function* () {
2750
+ const response = yield this.postAppEcommerceApiV2PostorderInvokeRaw({ order }, initOverrides);
2751
+ return yield response.value();
2752
+ });
2753
+ }
2754
+ /**
2755
+ * Create an Order comment
2756
+ */
2757
+ postAppEcommerceApiV2PostordercommentInvokeRaw(requestParameters, initOverrides) {
2758
+ return __async(this, null, function* () {
2759
+ if (requestParameters["orderId"] == null) {
2760
+ throw new RequiredError(
2761
+ "orderId",
2762
+ 'Required parameter "orderId" was null or undefined when calling postAppEcommerceApiV2PostordercommentInvoke().'
2763
+ );
2764
+ }
2765
+ if (requestParameters["createOrderComment"] == null) {
2766
+ throw new RequiredError(
2767
+ "createOrderComment",
2768
+ 'Required parameter "createOrderComment" was null or undefined when calling postAppEcommerceApiV2PostordercommentInvoke().'
2769
+ );
2770
+ }
2771
+ const queryParameters = {};
2772
+ const headerParameters = {};
2773
+ headerParameters["Content-Type"] = "application/json";
2774
+ if (this.configuration && this.configuration.apiKey) {
2775
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2776
+ }
2777
+ let urlPath = `/api/v2/order/{order_id}/comment`;
2778
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2779
+ const response = yield this.request({
2780
+ path: urlPath,
2781
+ method: "POST",
2782
+ headers: headerParameters,
2783
+ query: queryParameters,
2784
+ body: CreateOrderCommentToJSON(requestParameters["createOrderComment"])
2785
+ }, initOverrides);
2786
+ return new JSONApiResponse(response, (jsonValue) => PostOrderCommentResponseFromJSON(jsonValue));
2787
+ });
2788
+ }
2789
+ /**
2790
+ * Create an Order comment
2791
+ */
2792
+ postAppEcommerceApiV2PostordercommentInvoke(orderId, createOrderComment, initOverrides) {
2793
+ return __async(this, null, function* () {
2794
+ const response = yield this.postAppEcommerceApiV2PostordercommentInvokeRaw({ orderId, createOrderComment }, initOverrides);
2795
+ return yield response.value();
2796
+ });
2797
+ }
2798
+ /**
2799
+ * Change Order status (only commision type or test orders)
2800
+ */
2801
+ postAppEcommerceApiV2PostorderstatuschangeInvokeRaw(requestParameters, initOverrides) {
2802
+ return __async(this, null, function* () {
2803
+ if (requestParameters["orderId"] == null) {
2804
+ throw new RequiredError(
2805
+ "orderId",
2806
+ 'Required parameter "orderId" was null or undefined when calling postAppEcommerceApiV2PostorderstatuschangeInvoke().'
2807
+ );
2808
+ }
2809
+ if (requestParameters["postOrderStatus"] == null) {
2810
+ throw new RequiredError(
2811
+ "postOrderStatus",
2812
+ 'Required parameter "postOrderStatus" was null or undefined when calling postAppEcommerceApiV2PostorderstatuschangeInvoke().'
2813
+ );
2814
+ }
2815
+ const queryParameters = {};
2816
+ const headerParameters = {};
2817
+ headerParameters["Content-Type"] = "application/json";
2818
+ if (this.configuration && this.configuration.apiKey) {
2819
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2820
+ }
2821
+ let urlPath = `/api/v2/order/{order_id}/status`;
2822
+ urlPath = urlPath.replace(`{${"order_id"}}`, encodeURIComponent(String(requestParameters["orderId"])));
2823
+ const response = yield this.request({
2824
+ path: urlPath,
2825
+ method: "POST",
2826
+ headers: headerParameters,
2827
+ query: queryParameters,
2828
+ body: PostOrderStatusToJSON(requestParameters["postOrderStatus"])
2829
+ }, initOverrides);
2830
+ return new JSONApiResponse(response, (jsonValue) => PostOrderStatusResponseFromJSON(jsonValue));
2831
+ });
2832
+ }
2833
+ /**
2834
+ * Change Order status (only commision type or test orders)
2835
+ */
2836
+ postAppEcommerceApiV2PostorderstatuschangeInvoke(orderId, postOrderStatus, initOverrides) {
2837
+ return __async(this, null, function* () {
2838
+ const response = yield this.postAppEcommerceApiV2PostorderstatuschangeInvokeRaw({ orderId, postOrderStatus }, initOverrides);
2839
+ return yield response.value();
2840
+ });
2841
+ }
2842
+ };
2843
+
2844
+ // src/types/generated/src/apis/OrderCancellationApi.ts
2845
+ var OrderCancellationApi = class extends BaseAPI {
2846
+ /**
2847
+ * Cancel an order if possible (orders already in production cannot be cancelled)
2848
+ */
2849
+ postAppEcommerceApiV2PostordercancellationInvokeRaw(requestParameters, initOverrides) {
2850
+ return __async(this, null, function* () {
2851
+ if (requestParameters["orderCancellation"] == null) {
2852
+ throw new RequiredError(
2853
+ "orderCancellation",
2854
+ 'Required parameter "orderCancellation" was null or undefined when calling postAppEcommerceApiV2PostordercancellationInvoke().'
2855
+ );
2856
+ }
2857
+ const queryParameters = {};
2858
+ const headerParameters = {};
2859
+ headerParameters["Content-Type"] = "application/json";
2860
+ if (this.configuration && this.configuration.apiKey) {
2861
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2862
+ }
2863
+ let urlPath = `/api/v2/order_cancellation`;
2864
+ const response = yield this.request({
2865
+ path: urlPath,
2866
+ method: "POST",
2867
+ headers: headerParameters,
2868
+ query: queryParameters,
2869
+ body: OrderCancellationToJSON(requestParameters["orderCancellation"])
2870
+ }, initOverrides);
2871
+ return new JSONApiResponse(response, (jsonValue) => OrderCancellationResponseFromJSON(jsonValue));
2872
+ });
2873
+ }
2874
+ /**
2875
+ * Cancel an order if possible (orders already in production cannot be cancelled)
2876
+ */
2877
+ postAppEcommerceApiV2PostordercancellationInvoke(orderCancellation, initOverrides) {
2878
+ return __async(this, null, function* () {
2879
+ const response = yield this.postAppEcommerceApiV2PostordercancellationInvokeRaw({ orderCancellation }, initOverrides);
2880
+ return yield response.value();
2881
+ });
2882
+ }
2883
+ };
2884
+
2885
+ // src/resources/orders.ts
2886
+ var OrdersResource = class {
2887
+ constructor(httpClient, config) {
2888
+ this.httpClient = httpClient;
2889
+ this.orderApi = new OrderApi(config);
2890
+ this.cancellationApi = new OrderCancellationApi(config);
2891
+ }
2892
+ /**
2893
+ * Create an order
2894
+ */
2895
+ create(params) {
2896
+ return __async(this, null, function* () {
2897
+ return this.orderApi.postAppEcommerceApiV2PostorderInvoke(params);
2898
+ });
2899
+ }
2900
+ /**
2901
+ * Get current order status
2902
+ */
2903
+ getStatus(orderId) {
2904
+ return __async(this, null, function* () {
2905
+ return this.orderApi.getAppEcommerceApiV2GetorderstatusInvoke(orderId);
2906
+ });
2907
+ }
2908
+ /**
2909
+ * Update order status
2910
+ */
2911
+ updateStatus(orderId, params) {
2912
+ return __async(this, null, function* () {
2913
+ return this.orderApi.postAppEcommerceApiV2PostorderstatuschangeInvoke(
2914
+ orderId,
2915
+ params
2916
+ );
2917
+ });
2918
+ }
2919
+ /**
2920
+ * Get order comments
2921
+ */
2922
+ getComments(orderId) {
2923
+ return __async(this, null, function* () {
2924
+ return this.orderApi.getAppEcommerceApiV2GetordercommentsInvoke(orderId);
2925
+ });
2926
+ }
2927
+ /**
2928
+ * Create an order comment
2929
+ */
2930
+ createComment(orderId, params) {
2931
+ return __async(this, null, function* () {
2932
+ return this.orderApi.postAppEcommerceApiV2PostordercommentInvoke(
2933
+ orderId,
2934
+ params
2935
+ );
2936
+ });
2937
+ }
2938
+ /**
2939
+ * Get order invoices
2940
+ */
2941
+ getInvoices(orderId) {
2942
+ return __async(this, null, function* () {
2943
+ return this.orderApi.getAppEcommerceApiV2GetorderinvoicesInvoke(orderId);
2944
+ });
2945
+ }
2946
+ /**
2947
+ * Get order tracking numbers
2948
+ */
2949
+ getTrackingNumbers(orderId) {
2950
+ return __async(this, null, function* () {
2951
+ return this.orderApi.getAppEcommerceApiV2GetordertrackingnumbersInvoke(orderId);
2952
+ });
2953
+ }
2954
+ /**
2955
+ * Cancel an order
2956
+ */
2957
+ cancel(params) {
2958
+ return __async(this, null, function* () {
2959
+ const cancellation = {
2960
+ order_id: params.order_id
2961
+ };
2962
+ return this.cancellationApi.postAppEcommerceApiV2PostordercancellationInvoke(
2963
+ cancellation
2964
+ );
2965
+ });
2966
+ }
2967
+ };
2968
+
2969
+ // src/types/generated/src/apis/InvoiceApi.ts
2970
+ var InvoiceApi = class extends BaseAPI {
2971
+ /**
2972
+ * Get a specific invoice
2973
+ */
2974
+ getAppEcommerceApiV2GetinvoiceInvokeRaw(requestParameters, initOverrides) {
2975
+ return __async(this, null, function* () {
2976
+ if (requestParameters["invoiceId"] == null) {
2977
+ throw new RequiredError(
2978
+ "invoiceId",
2979
+ 'Required parameter "invoiceId" was null or undefined when calling getAppEcommerceApiV2GetinvoiceInvoke().'
2980
+ );
2981
+ }
2982
+ const queryParameters = {};
2983
+ const headerParameters = {};
2984
+ if (this.configuration && this.configuration.apiKey) {
2985
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
2986
+ }
2987
+ let urlPath = `/api/v2/invoice/{invoice_id}`;
2988
+ urlPath = urlPath.replace(`{${"invoice_id"}}`, encodeURIComponent(String(requestParameters["invoiceId"])));
2989
+ const response = yield this.request({
2990
+ path: urlPath,
2991
+ method: "GET",
2992
+ headers: headerParameters,
2993
+ query: queryParameters
2994
+ }, initOverrides);
2995
+ return new JSONApiResponse(response, (jsonValue) => InvoiceFromJSON(jsonValue));
2996
+ });
2997
+ }
2998
+ /**
2999
+ * Get a specific invoice
3000
+ */
3001
+ getAppEcommerceApiV2GetinvoiceInvoke(invoiceId, initOverrides) {
3002
+ return __async(this, null, function* () {
3003
+ const response = yield this.getAppEcommerceApiV2GetinvoiceInvokeRaw({ invoiceId }, initOverrides);
3004
+ return yield response.value();
3005
+ });
3006
+ }
3007
+ /**
3008
+ * Get latest invoices
3009
+ */
3010
+ getAppEcommerceApiV2GetinvoicesInvokeRaw(requestParameters, initOverrides) {
3011
+ return __async(this, null, function* () {
3012
+ const queryParameters = {};
3013
+ if (requestParameters["page"] != null) {
3014
+ queryParameters["page"] = requestParameters["page"];
3015
+ }
3016
+ if (requestParameters["from"] != null) {
3017
+ queryParameters["from"] = requestParameters["from"];
3018
+ }
3019
+ if (requestParameters["to"] != null) {
3020
+ queryParameters["to"] = requestParameters["to"];
3021
+ }
3022
+ const headerParameters = {};
3023
+ if (this.configuration && this.configuration.apiKey) {
3024
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3025
+ }
3026
+ let urlPath = `/api/v2/invoice`;
3027
+ const response = yield this.request({
3028
+ path: urlPath,
3029
+ method: "GET",
3030
+ headers: headerParameters,
3031
+ query: queryParameters
3032
+ }, initOverrides);
3033
+ return new JSONApiResponse(response, (jsonValue) => PageOfInvoicesFromJSON(jsonValue));
3034
+ });
3035
+ }
3036
+ /**
3037
+ * Get latest invoices
3038
+ */
3039
+ getAppEcommerceApiV2GetinvoicesInvoke(page, from, to, initOverrides) {
3040
+ return __async(this, null, function* () {
3041
+ const response = yield this.getAppEcommerceApiV2GetinvoicesInvokeRaw({ page, from, to }, initOverrides);
3042
+ return yield response.value();
3043
+ });
3044
+ }
3045
+ };
3046
+
3047
+ // src/resources/invoices.ts
3048
+ var InvoicesResource = class {
3049
+ constructor(httpClient, config) {
3050
+ this.httpClient = httpClient;
3051
+ this.invoiceApi = new InvoiceApi(config);
3052
+ }
3053
+ /**
3054
+ * List invoices
3055
+ */
3056
+ list(params) {
3057
+ return __async(this, null, function* () {
3058
+ return this.invoiceApi.getAppEcommerceApiV2GetinvoicesInvoke(
3059
+ params == null ? void 0 : params.page,
3060
+ (params == null ? void 0 : params.from) ? new Date(params.from) : void 0,
3061
+ (params == null ? void 0 : params.to) ? new Date(params.to) : void 0
3062
+ );
3063
+ });
3064
+ }
3065
+ /**
3066
+ * Retrieve a specific invoice
3067
+ */
3068
+ retrieve(invoiceId) {
3069
+ return __async(this, null, function* () {
3070
+ return this.invoiceApi.getAppEcommerceApiV2GetinvoiceInvoke(invoiceId);
3071
+ });
3072
+ }
3073
+ };
3074
+
3075
+ // src/types/generated/src/apis/ClientApi.ts
3076
+ var ClientApi = class extends BaseAPI {
3077
+ /**
3078
+ * Get clients (only commission type)
3079
+ */
3080
+ getAppEcommerceApiV2GetclientsInvokeRaw(requestParameters, initOverrides) {
3081
+ return __async(this, null, function* () {
3082
+ const queryParameters = {};
3083
+ if (requestParameters["page"] != null) {
3084
+ queryParameters["page"] = requestParameters["page"];
3085
+ }
3086
+ const headerParameters = {};
3087
+ if (this.configuration && this.configuration.apiKey) {
3088
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3089
+ }
3090
+ let urlPath = `/api/v2/client`;
3091
+ const response = yield this.request({
3092
+ path: urlPath,
3093
+ method: "GET",
3094
+ headers: headerParameters,
3095
+ query: queryParameters
3096
+ }, initOverrides);
3097
+ return new JSONApiResponse(response, (jsonValue) => PageOfClientsFromJSON(jsonValue));
3098
+ });
3099
+ }
3100
+ /**
3101
+ * Get clients (only commission type)
3102
+ */
3103
+ getAppEcommerceApiV2GetclientsInvoke(page, initOverrides) {
3104
+ return __async(this, null, function* () {
3105
+ const response = yield this.getAppEcommerceApiV2GetclientsInvokeRaw({ page }, initOverrides);
3106
+ return yield response.value();
3107
+ });
3108
+ }
3109
+ };
3110
+
3111
+ // src/resources/clients.ts
3112
+ var ClientsResource = class {
3113
+ constructor(httpClient, config) {
3114
+ this.httpClient = httpClient;
3115
+ this.clientApi = new ClientApi(config);
3116
+ }
3117
+ /**
3118
+ * List clients (only commission type)
3119
+ */
3120
+ list(params) {
3121
+ return __async(this, null, function* () {
3122
+ return this.clientApi.getAppEcommerceApiV2GetclientsInvoke(params == null ? void 0 : params.page);
3123
+ });
3124
+ }
3125
+ };
3126
+
3127
+ // src/types/generated/src/apis/DiscountCodeApi.ts
3128
+ var DiscountCodeApi = class extends BaseAPI {
3129
+ /**
3130
+ * Get discount codes (only commission type)
3131
+ */
3132
+ getApiV2DiscountCodesExternalRaw(requestParameters, initOverrides) {
3133
+ return __async(this, null, function* () {
3134
+ const queryParameters = {};
3135
+ if (requestParameters["page"] != null) {
3136
+ queryParameters["page"] = requestParameters["page"];
3137
+ }
3138
+ const headerParameters = {};
3139
+ if (this.configuration && this.configuration.apiKey) {
3140
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3141
+ }
3142
+ let urlPath = `/api/v2/discount_code`;
3143
+ const response = yield this.request({
3144
+ path: urlPath,
3145
+ method: "GET",
3146
+ headers: headerParameters,
3147
+ query: queryParameters
3148
+ }, initOverrides);
3149
+ return new JSONApiResponse(response, (jsonValue) => GetApiV2DiscountCodesExternal200ResponseFromJSON(jsonValue));
3150
+ });
3151
+ }
3152
+ /**
3153
+ * Get discount codes (only commission type)
3154
+ */
3155
+ getApiV2DiscountCodesExternal(page, initOverrides) {
3156
+ return __async(this, null, function* () {
3157
+ const response = yield this.getApiV2DiscountCodesExternalRaw({ page }, initOverrides);
3158
+ return yield response.value();
3159
+ });
3160
+ }
3161
+ };
3162
+
3163
+ // src/resources/discountCodes.ts
3164
+ var DiscountCodesResource = class {
3165
+ constructor(httpClient, config) {
3166
+ this.httpClient = httpClient;
3167
+ this.discountCodeApi = new DiscountCodeApi(config);
3168
+ }
3169
+ /**
3170
+ * List discount codes (only commission type)
3171
+ */
3172
+ list(params) {
3173
+ return __async(this, null, function* () {
3174
+ return this.discountCodeApi.getApiV2DiscountCodesExternal(params == null ? void 0 : params.page);
3175
+ });
3176
+ }
3177
+ };
3178
+
3179
+ // src/types/generated/src/apis/TrackingNumberApi.ts
3180
+ var TrackingNumberApi = class extends BaseAPI {
3181
+ /**
3182
+ * Get latest tracking numbers
3183
+ */
3184
+ getAppEcommerceApiV2GettrackingnumbersInvokeRaw(requestParameters, initOverrides) {
3185
+ return __async(this, null, function* () {
3186
+ const queryParameters = {};
3187
+ if (requestParameters["page"] != null) {
3188
+ queryParameters["page"] = requestParameters["page"];
3189
+ }
3190
+ if (requestParameters["from"] != null) {
3191
+ queryParameters["from"] = requestParameters["from"];
3192
+ }
3193
+ if (requestParameters["to"] != null) {
3194
+ queryParameters["to"] = requestParameters["to"];
3195
+ }
3196
+ const headerParameters = {};
3197
+ if (this.configuration && this.configuration.apiKey) {
3198
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3199
+ }
3200
+ let urlPath = `/api/v2/tracking_number`;
3201
+ const response = yield this.request({
3202
+ path: urlPath,
3203
+ method: "GET",
3204
+ headers: headerParameters,
3205
+ query: queryParameters
3206
+ }, initOverrides);
3207
+ return new JSONApiResponse(response, (jsonValue) => PageOfTrackingNumbersFromJSON(jsonValue));
3208
+ });
3209
+ }
3210
+ /**
3211
+ * Get latest tracking numbers
3212
+ */
3213
+ getAppEcommerceApiV2GettrackingnumbersInvoke(page, from, to, initOverrides) {
3214
+ return __async(this, null, function* () {
3215
+ const response = yield this.getAppEcommerceApiV2GettrackingnumbersInvokeRaw({ page, from, to }, initOverrides);
3216
+ return yield response.value();
3217
+ });
3218
+ }
3219
+ };
3220
+
3221
+ // src/resources/trackingNumbers.ts
3222
+ var TrackingNumbersResource = class {
3223
+ constructor(httpClient, config) {
3224
+ this.httpClient = httpClient;
3225
+ this.trackingNumberApi = new TrackingNumberApi(config);
3226
+ }
3227
+ /**
3228
+ * List tracking numbers
3229
+ */
3230
+ list(params) {
3231
+ return __async(this, null, function* () {
3232
+ return this.trackingNumberApi.getAppEcommerceApiV2GettrackingnumbersInvoke(
3233
+ params == null ? void 0 : params.page,
3234
+ (params == null ? void 0 : params.from) ? new Date(params.from) : void 0,
3235
+ (params == null ? void 0 : params.to) ? new Date(params.to) : void 0
3236
+ );
3237
+ });
3238
+ }
3239
+ };
3240
+
3241
+ // src/types/generated/src/apis/OrderCommentApi.ts
3242
+ var OrderCommentApi = class extends BaseAPI {
3243
+ /**
3244
+ * Get latest order comments.
3245
+ */
3246
+ getAppEcommerceApiV2GetorderscommentsInvokeRaw(requestParameters, initOverrides) {
3247
+ return __async(this, null, function* () {
3248
+ const queryParameters = {};
3249
+ if (requestParameters["page"] != null) {
3250
+ queryParameters["page"] = requestParameters["page"];
3251
+ }
3252
+ if (requestParameters["from"] != null) {
3253
+ queryParameters["from"] = requestParameters["from"];
3254
+ }
3255
+ if (requestParameters["to"] != null) {
3256
+ queryParameters["to"] = requestParameters["to"];
3257
+ }
3258
+ const headerParameters = {};
3259
+ if (this.configuration && this.configuration.apiKey) {
3260
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3261
+ }
3262
+ let urlPath = `/api/v2/order_comment`;
3263
+ const response = yield this.request({
3264
+ path: urlPath,
3265
+ method: "GET",
3266
+ headers: headerParameters,
3267
+ query: queryParameters
3268
+ }, initOverrides);
3269
+ return new JSONApiResponse(response, (jsonValue) => PageOfOrderCommentsFromJSON(jsonValue));
3270
+ });
3271
+ }
3272
+ /**
3273
+ * Get latest order comments.
3274
+ */
3275
+ getAppEcommerceApiV2GetorderscommentsInvoke(page, from, to, initOverrides) {
3276
+ return __async(this, null, function* () {
3277
+ const response = yield this.getAppEcommerceApiV2GetorderscommentsInvokeRaw({ page, from, to }, initOverrides);
3278
+ return yield response.value();
3279
+ });
3280
+ }
3281
+ };
3282
+
3283
+ // src/resources/orderComments.ts
3284
+ var OrderCommentsResource = class {
3285
+ constructor(httpClient, config) {
3286
+ this.httpClient = httpClient;
3287
+ this.orderCommentApi = new OrderCommentApi(config);
3288
+ }
3289
+ /**
3290
+ * List order comments
3291
+ */
3292
+ list(params) {
3293
+ return __async(this, null, function* () {
3294
+ return this.orderCommentApi.getAppEcommerceApiV2GetorderscommentsInvoke(
3295
+ params == null ? void 0 : params.page,
3296
+ (params == null ? void 0 : params.from) ? new Date(params.from) : void 0,
3297
+ (params == null ? void 0 : params.to) ? new Date(params.to) : void 0
3298
+ );
3299
+ });
3300
+ }
3301
+ };
3302
+
3303
+ // src/types/generated/src/apis/OrderStatusChangeApi.ts
3304
+ var OrderStatusChangeApi = class extends BaseAPI {
3305
+ /**
3306
+ * Get latest status changes. Note that only the latest order status change is provided.
3307
+ */
3308
+ getAppEcommerceApiV2GetorderstatuschangesInvokeRaw(requestParameters, initOverrides) {
3309
+ return __async(this, null, function* () {
3310
+ const queryParameters = {};
3311
+ if (requestParameters["page"] != null) {
3312
+ queryParameters["page"] = requestParameters["page"];
3313
+ }
3314
+ if (requestParameters["from"] != null) {
3315
+ queryParameters["from"] = requestParameters["from"];
3316
+ }
3317
+ if (requestParameters["to"] != null) {
3318
+ queryParameters["to"] = requestParameters["to"];
3319
+ }
3320
+ const headerParameters = {};
3321
+ if (this.configuration && this.configuration.apiKey) {
3322
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3323
+ }
3324
+ let urlPath = `/api/v2/order_status_change`;
3325
+ const response = yield this.request({
3326
+ path: urlPath,
3327
+ method: "GET",
3328
+ headers: headerParameters,
3329
+ query: queryParameters
3330
+ }, initOverrides);
3331
+ return new JSONApiResponse(response, (jsonValue) => PageOfOrderStatusChangesFromJSON(jsonValue));
3332
+ });
3333
+ }
3334
+ /**
3335
+ * Get latest status changes. Note that only the latest order status change is provided.
3336
+ */
3337
+ getAppEcommerceApiV2GetorderstatuschangesInvoke(page, from, to, initOverrides) {
3338
+ return __async(this, null, function* () {
3339
+ const response = yield this.getAppEcommerceApiV2GetorderstatuschangesInvokeRaw({ page, from, to }, initOverrides);
3340
+ return yield response.value();
3341
+ });
3342
+ }
3343
+ };
3344
+
3345
+ // src/resources/orderStatusChanges.ts
3346
+ var OrderStatusChangesResource = class {
3347
+ constructor(httpClient, config) {
3348
+ this.httpClient = httpClient;
3349
+ this.orderStatusChangeApi = new OrderStatusChangeApi(config);
3350
+ }
3351
+ /**
3352
+ * List order status changes
3353
+ */
3354
+ list(params) {
3355
+ return __async(this, null, function* () {
3356
+ return this.orderStatusChangeApi.getAppEcommerceApiV2GetorderstatuschangesInvoke(
3357
+ params == null ? void 0 : params.page,
3358
+ (params == null ? void 0 : params.from) ? new Date(params.from) : void 0,
3359
+ (params == null ? void 0 : params.to) ? new Date(params.to) : void 0
3360
+ );
3361
+ });
3362
+ }
3363
+ };
3364
+
3365
+ // src/types/generated/src/apis/UserApi.ts
3366
+ var UserApi = class extends BaseAPI {
3367
+ /**
3368
+ * Validate your access token
3369
+ */
3370
+ getAppEcommerceApiV2GetmeInvokeRaw(initOverrides) {
3371
+ return __async(this, null, function* () {
3372
+ const queryParameters = {};
3373
+ const headerParameters = {};
3374
+ if (this.configuration && this.configuration.apiKey) {
3375
+ headerParameters["Authorization"] = yield this.configuration.apiKey("Authorization");
3376
+ }
3377
+ let urlPath = `/api/v2/user/me`;
3378
+ const response = yield this.request({
3379
+ path: urlPath,
3380
+ method: "GET",
3381
+ headers: headerParameters,
3382
+ query: queryParameters
3383
+ }, initOverrides);
3384
+ return new JSONApiResponse(response, (jsonValue) => MeFromJSON(jsonValue));
3385
+ });
3386
+ }
3387
+ /**
3388
+ * Validate your access token
3389
+ */
3390
+ getAppEcommerceApiV2GetmeInvoke(initOverrides) {
3391
+ return __async(this, null, function* () {
3392
+ const response = yield this.getAppEcommerceApiV2GetmeInvokeRaw(initOverrides);
3393
+ return yield response.value();
3394
+ });
3395
+ }
3396
+ };
3397
+
3398
+ // src/resources/users.ts
3399
+ var UsersResource = class {
3400
+ constructor(httpClient, config) {
3401
+ this.httpClient = httpClient;
3402
+ this.userApi = new UserApi(config);
3403
+ }
3404
+ /**
3405
+ * Get current user (validate access token)
3406
+ */
3407
+ me() {
3408
+ return __async(this, null, function* () {
3409
+ return this.userApi.getAppEcommerceApiV2GetmeInvoke();
3410
+ });
3411
+ }
3412
+ };
3413
+
3414
+ // src/client.ts
3415
+ var Doboxa = class {
3416
+ constructor(config = {}) {
3417
+ const baseURL = config.baseURL || getBaseURL() || "http://localhost";
3418
+ this.tokenManager = new TokenManager();
3419
+ if (config.apiKey) {
3420
+ this.tokenManager.setTokens(config.apiKey, "", 3600);
3421
+ }
3422
+ this.config = new Configuration({
3423
+ basePath: baseURL,
3424
+ apiKey: (name) => __async(this, null, function* () {
3425
+ if (name === "Authorization") {
3426
+ const token = this.tokenManager.getAccessToken();
3427
+ if (!token) {
3428
+ throw new Error("No access token available");
3429
+ }
3430
+ return `Bearer ${token}`;
3431
+ }
3432
+ throw new Error(`Unknown API key name: ${name}`);
3433
+ })
3434
+ });
3435
+ const tempHttpClient = new HTTPClient({
3436
+ baseURL,
3437
+ tokenManager: this.tokenManager
3438
+ });
3439
+ this.httpClient = new HTTPClient({
3440
+ baseURL,
3441
+ tokenManager: this.tokenManager,
3442
+ onTokenRefresh: (refreshToken) => __async(this, null, function* () {
3443
+ const tempAuth = new AuthenticationResource(tempHttpClient, this.tokenManager);
3444
+ const response = yield tempAuth.refreshToken(refreshToken);
3445
+ this.tokenManager.setTokens(response.token, response.refresh_token, 3600);
3446
+ return response.token;
3447
+ })
3448
+ });
3449
+ this.authentication = new AuthenticationResource(this.httpClient, this.tokenManager);
3450
+ this.orders = new OrdersResource(this.httpClient, this.config);
3451
+ this.invoices = new InvoicesResource(this.httpClient, this.config);
3452
+ this.clients = new ClientsResource(this.httpClient, this.config);
3453
+ this.discountCodes = new DiscountCodesResource(this.httpClient, this.config);
3454
+ this.trackingNumbers = new TrackingNumbersResource(this.httpClient, this.config);
3455
+ this.orderComments = new OrderCommentsResource(this.httpClient, this.config);
3456
+ this.orderStatusChanges = new OrderStatusChangesResource(this.httpClient, this.config);
3457
+ this.users = new UsersResource(this.httpClient, this.config);
3458
+ }
3459
+ };
3460
+
3461
+ // src/index.ts
3462
+ var src_default = Doboxa;
3463
+ // Annotate the CommonJS export names for ESM import in node:
3464
+ 0 && (module.exports = {
3465
+ ApiV2AuthenticationRefreshTokenPost200ResponseFromJSON,
3466
+ ApiV2AuthenticationRefreshTokenPost200ResponseFromJSONTyped,
3467
+ ApiV2AuthenticationRefreshTokenPost200ResponseToJSON,
3468
+ ApiV2AuthenticationRefreshTokenPost200ResponseToJSONTyped,
3469
+ ApiV2AuthenticationRefreshTokenPostRequestFromJSON,
3470
+ ApiV2AuthenticationRefreshTokenPostRequestFromJSONTyped,
3471
+ ApiV2AuthenticationRefreshTokenPostRequestToJSON,
3472
+ ApiV2AuthenticationRefreshTokenPostRequestToJSONTyped,
3473
+ ApiV2AuthenticationTokenPost200ResponseFromJSON,
3474
+ ApiV2AuthenticationTokenPost200ResponseFromJSONTyped,
3475
+ ApiV2AuthenticationTokenPost200ResponseToJSON,
3476
+ ApiV2AuthenticationTokenPost200ResponseToJSONTyped,
3477
+ ApiV2AuthenticationTokenPost401ResponseFromJSON,
3478
+ ApiV2AuthenticationTokenPost401ResponseFromJSONTyped,
3479
+ ApiV2AuthenticationTokenPost401ResponseToJSON,
3480
+ ApiV2AuthenticationTokenPost401ResponseToJSONTyped,
3481
+ ApiV2AuthenticationTokenPostRequestFromJSON,
3482
+ ApiV2AuthenticationTokenPostRequestFromJSONTyped,
3483
+ ApiV2AuthenticationTokenPostRequestToJSON,
3484
+ ApiV2AuthenticationTokenPostRequestToJSONTyped,
3485
+ AttachmentFromJSON,
3486
+ AttachmentFromJSONTyped,
3487
+ AttachmentToJSON,
3488
+ AttachmentToJSONTyped,
3489
+ AuthenticationResource,
3490
+ BillingAddressFromJSON,
3491
+ BillingAddressFromJSONTyped,
3492
+ BillingAddressToJSON,
3493
+ BillingAddressToJSONTyped,
3494
+ BoolFromJSON,
3495
+ BoolFromJSONTyped,
3496
+ BoolToJSON,
3497
+ BoolToJSONTyped,
3498
+ ClientFromJSON,
3499
+ ClientFromJSONTyped,
3500
+ ClientToJSON,
3501
+ ClientToJSONTyped,
3502
+ ClientsResource,
3503
+ CreateOrderCommentAuthorTypeEnum,
3504
+ CreateOrderCommentFromJSON,
3505
+ CreateOrderCommentFromJSONTyped,
3506
+ CreateOrderCommentToJSON,
3507
+ CreateOrderCommentToJSONTyped,
3508
+ DeliveryAddressFromJSON,
3509
+ DeliveryAddressFromJSONTyped,
3510
+ DeliveryAddressToJSON,
3511
+ DeliveryAddressToJSONTyped,
3512
+ DiscountCodesResource,
3513
+ Doboxa,
3514
+ DoboxaAPIError,
3515
+ DoboxaAuthenticationError,
3516
+ DoboxaError,
3517
+ DoboxaValidationError,
3518
+ GetApiV2DiscountCodesExternal200ResponseFromJSON,
3519
+ GetApiV2DiscountCodesExternal200ResponseFromJSONTyped,
3520
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSON,
3521
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerFromJSONTyped,
3522
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSON,
3523
+ GetApiV2DiscountCodesExternal200ResponseItemsInnerToJSONTyped,
3524
+ GetApiV2DiscountCodesExternal200ResponseToJSON,
3525
+ GetApiV2DiscountCodesExternal200ResponseToJSONTyped,
3526
+ InvalidParameterFromJSON,
3527
+ InvalidParameterFromJSONTyped,
3528
+ InvalidParameterToJSON,
3529
+ InvalidParameterToJSONTyped,
3530
+ InvalidRequestDataResponseFromJSON,
3531
+ InvalidRequestDataResponseFromJSONTyped,
3532
+ InvalidRequestDataResponseToJSON,
3533
+ InvalidRequestDataResponseToJSONTyped,
3534
+ InvoiceDocumentTypeEnum,
3535
+ InvoiceFromJSON,
3536
+ InvoiceFromJSONTyped,
3537
+ InvoiceItemFromJSON,
3538
+ InvoiceItemFromJSONTyped,
3539
+ InvoiceItemToJSON,
3540
+ InvoiceItemToJSONTyped,
3541
+ InvoiceOrderFromJSON,
3542
+ InvoiceOrderFromJSONTyped,
3543
+ InvoiceOrderItemFromJSON,
3544
+ InvoiceOrderItemFromJSONTyped,
3545
+ InvoiceOrderItemToJSON,
3546
+ InvoiceOrderItemToJSONTyped,
3547
+ InvoiceOrderToJSON,
3548
+ InvoiceOrderToJSONTyped,
3549
+ InvoiceStateEnum,
3550
+ InvoiceToJSON,
3551
+ InvoiceToJSONTyped,
3552
+ InvoicesResource,
3553
+ MeFromJSON,
3554
+ MeFromJSONTyped,
3555
+ MeToJSON,
3556
+ MeToJSONTyped,
3557
+ OrderCancellationFromJSON,
3558
+ OrderCancellationFromJSONTyped,
3559
+ OrderCancellationResponseDetailsEnum,
3560
+ OrderCancellationResponseFromJSON,
3561
+ OrderCancellationResponseFromJSONTyped,
3562
+ OrderCancellationResponseToJSON,
3563
+ OrderCancellationResponseToJSONTyped,
3564
+ OrderCancellationToJSON,
3565
+ OrderCancellationToJSONTyped,
3566
+ OrderCommentAuthorTypeEnum,
3567
+ OrderCommentFromJSON,
3568
+ OrderCommentFromJSONTyped,
3569
+ OrderCommentToJSON,
3570
+ OrderCommentToJSONTyped,
3571
+ OrderCommentsResource,
3572
+ OrderFromJSON,
3573
+ OrderFromJSONTyped,
3574
+ OrderItemCropDataFilterEnum,
3575
+ OrderItemCropDataFromJSON,
3576
+ OrderItemCropDataFromJSONTyped,
3577
+ OrderItemCropDataReflectionEnum,
3578
+ OrderItemCropDataToJSON,
3579
+ OrderItemCropDataToJSONTyped,
3580
+ OrderItemFromJSON,
3581
+ OrderItemFromJSONTyped,
3582
+ OrderItemOriginalDataFromJSON,
3583
+ OrderItemOriginalDataFromJSONTyped,
3584
+ OrderItemOriginalDataToJSON,
3585
+ OrderItemOriginalDataToJSONTyped,
3586
+ OrderItemStatusFromJSON,
3587
+ OrderItemStatusFromJSONTyped,
3588
+ OrderItemStatusStatusEnum,
3589
+ OrderItemStatusToJSON,
3590
+ OrderItemStatusToJSONTyped,
3591
+ OrderItemToJSON,
3592
+ OrderItemToJSONTyped,
3593
+ OrderOriginalDataFromJSON,
3594
+ OrderOriginalDataFromJSONTyped,
3595
+ OrderOriginalDataToJSON,
3596
+ OrderOriginalDataToJSONTyped,
3597
+ OrderPaymentMethodEnum,
3598
+ OrderStatusChangeFromJSON,
3599
+ OrderStatusChangeFromJSONTyped,
3600
+ OrderStatusChangeStatusEnum,
3601
+ OrderStatusChangeToJSON,
3602
+ OrderStatusChangeToJSONTyped,
3603
+ OrderStatusChangesResource,
3604
+ OrderStatusFromJSON,
3605
+ OrderStatusFromJSONTyped,
3606
+ OrderStatusStatusEnum,
3607
+ OrderStatusToJSON,
3608
+ OrderStatusToJSONTyped,
3609
+ OrderToJSON,
3610
+ OrderToJSONTyped,
3611
+ OrdersResource,
3612
+ PageOfClientsFromJSON,
3613
+ PageOfClientsFromJSONTyped,
3614
+ PageOfClientsToJSON,
3615
+ PageOfClientsToJSONTyped,
3616
+ PageOfInvoicesFromJSON,
3617
+ PageOfInvoicesFromJSONTyped,
3618
+ PageOfInvoicesToJSON,
3619
+ PageOfInvoicesToJSONTyped,
3620
+ PageOfOrderCommentsFromJSON,
3621
+ PageOfOrderCommentsFromJSONTyped,
3622
+ PageOfOrderCommentsToJSON,
3623
+ PageOfOrderCommentsToJSONTyped,
3624
+ PageOfOrderStatusChangesFromJSON,
3625
+ PageOfOrderStatusChangesFromJSONTyped,
3626
+ PageOfOrderStatusChangesToJSON,
3627
+ PageOfOrderStatusChangesToJSONTyped,
3628
+ PageOfTrackingNumbersFromJSON,
3629
+ PageOfTrackingNumbersFromJSONTyped,
3630
+ PageOfTrackingNumbersToJSON,
3631
+ PageOfTrackingNumbersToJSONTyped,
3632
+ PostOrderCommentResponseFromJSON,
3633
+ PostOrderCommentResponseFromJSONTyped,
3634
+ PostOrderCommentResponseToJSON,
3635
+ PostOrderCommentResponseToJSONTyped,
3636
+ PostOrderResponseFromJSON,
3637
+ PostOrderResponseFromJSONTyped,
3638
+ PostOrderResponseToJSON,
3639
+ PostOrderResponseToJSONTyped,
3640
+ PostOrderStatusFromJSON,
3641
+ PostOrderStatusFromJSONTyped,
3642
+ PostOrderStatusItemFromJSON,
3643
+ PostOrderStatusItemFromJSONTyped,
3644
+ PostOrderStatusItemStatusEnum,
3645
+ PostOrderStatusItemToJSON,
3646
+ PostOrderStatusItemToJSONTyped,
3647
+ PostOrderStatusResponseFromJSON,
3648
+ PostOrderStatusResponseFromJSONTyped,
3649
+ PostOrderStatusResponseToJSON,
3650
+ PostOrderStatusResponseToJSONTyped,
3651
+ PostOrderStatusStatusEnum,
3652
+ PostOrderStatusToJSON,
3653
+ PostOrderStatusToJSONTyped,
3654
+ ReturnLabelFromJSON,
3655
+ ReturnLabelFromJSONTyped,
3656
+ ReturnLabelToJSON,
3657
+ ReturnLabelToJSONTyped,
3658
+ ServerErrorResponseFromJSON,
3659
+ ServerErrorResponseFromJSONTyped,
3660
+ ServerErrorResponseToJSON,
3661
+ ServerErrorResponseToJSONTyped,
3662
+ TrackingNumberFromJSON,
3663
+ TrackingNumberFromJSONTyped,
3664
+ TrackingNumberItemFromJSON,
3665
+ TrackingNumberItemFromJSONTyped,
3666
+ TrackingNumberItemToJSON,
3667
+ TrackingNumberItemToJSONTyped,
3668
+ TrackingNumberToJSON,
3669
+ TrackingNumberToJSONTyped,
3670
+ TrackingNumbersResource,
3671
+ UsersResource,
3672
+ WaybillDeliveryMethodEnum,
3673
+ WaybillFromJSON,
3674
+ WaybillFromJSONTyped,
3675
+ WaybillToJSON,
3676
+ WaybillToJSONTyped,
3677
+ instanceOfApiV2AuthenticationRefreshTokenPost200Response,
3678
+ instanceOfApiV2AuthenticationRefreshTokenPostRequest,
3679
+ instanceOfApiV2AuthenticationTokenPost200Response,
3680
+ instanceOfApiV2AuthenticationTokenPost401Response,
3681
+ instanceOfApiV2AuthenticationTokenPostRequest,
3682
+ instanceOfAttachment,
3683
+ instanceOfBillingAddress,
3684
+ instanceOfClient,
3685
+ instanceOfCreateOrderComment,
3686
+ instanceOfDeliveryAddress,
3687
+ instanceOfGetApiV2DiscountCodesExternal200Response,
3688
+ instanceOfGetApiV2DiscountCodesExternal200ResponseItemsInner,
3689
+ instanceOfInvalidParameter,
3690
+ instanceOfInvalidRequestDataResponse,
3691
+ instanceOfInvoice,
3692
+ instanceOfInvoiceItem,
3693
+ instanceOfInvoiceOrder,
3694
+ instanceOfInvoiceOrderItem,
3695
+ instanceOfMe,
3696
+ instanceOfOrder,
3697
+ instanceOfOrderCancellation,
3698
+ instanceOfOrderCancellationResponse,
3699
+ instanceOfOrderComment,
3700
+ instanceOfOrderItem,
3701
+ instanceOfOrderItemCropData,
3702
+ instanceOfOrderItemOriginalData,
3703
+ instanceOfOrderItemStatus,
3704
+ instanceOfOrderOriginalData,
3705
+ instanceOfOrderStatus,
3706
+ instanceOfOrderStatusChange,
3707
+ instanceOfPageOfClients,
3708
+ instanceOfPageOfInvoices,
3709
+ instanceOfPageOfOrderComments,
3710
+ instanceOfPageOfOrderStatusChanges,
3711
+ instanceOfPageOfTrackingNumbers,
3712
+ instanceOfPostOrderCommentResponse,
3713
+ instanceOfPostOrderResponse,
3714
+ instanceOfPostOrderStatus,
3715
+ instanceOfPostOrderStatusItem,
3716
+ instanceOfPostOrderStatusResponse,
3717
+ instanceOfReturnLabel,
3718
+ instanceOfServerErrorResponse,
3719
+ instanceOfTrackingNumber,
3720
+ instanceOfTrackingNumberItem,
3721
+ instanceOfWaybill,
3722
+ parseErrorResponse
3723
+ });
3724
+ //# sourceMappingURL=index.js.map