@myparcel-dev/pdk-common 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +426 -0
- package/dist/data/common.d.ts +21 -0
- package/dist/data/constants.d.ts +18 -0
- package/dist/data/endpoints.d.ts +97 -0
- package/dist/data/index.d.ts +3 -0
- package/dist/index.d.ts +2 -0
- package/dist/types/endpoints.types.d.ts +13 -0
- package/dist/types/generic.types.d.ts +7 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/php-pdk.types.d.ts +750 -0
- package/dist/types/pluginSettings.types.d.ts +29 -0
- package/package.json +48 -0
- package/src/__tests__/__snapshots__/exports.spec.ts.snap +14 -0
- package/src/__tests__/exports.spec.ts +8 -0
- package/src/data/common.ts +23 -0
- package/src/data/constants.ts +21 -0
- package/src/data/endpoints.ts +114 -0
- package/src/data/index.ts +3 -0
- package/src/index.ts +2 -0
- package/src/types/endpoints.types.ts +29 -0
- package/src/types/generic.types.ts +10 -0
- package/src/types/index.ts +4 -0
- package/src/types/php-pdk.types.ts +880 -0
- package/src/types/pluginSettings.types.ts +42 -0
|
@@ -0,0 +1,880 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-empty-interface,@typescript-eslint/no-namespace,@typescript-eslint/naming-convention */
|
|
2
|
+
// noinspection JSUnusedGlobalSymbols
|
|
3
|
+
|
|
4
|
+
// ⚠️ THIS FILE IS AUTOMATICALLY GENERATED!!! ⚠️
|
|
5
|
+
|
|
6
|
+
import {type SupportedDeliveryTypeName, type SupportedPackageTypeName} from '@myparcel-dev/delivery-options';
|
|
7
|
+
import {type CarrierId, type CarrierName} from '@myparcel-dev/constants';
|
|
8
|
+
import {type FrontendEndpoint, type TriState} from '../data';
|
|
9
|
+
import {type ShippingMethodTypeMap} from './pluginSettings.types';
|
|
10
|
+
import {type DateTime, type DateTimeImmutable} from './generic.types';
|
|
11
|
+
import {type EndpointObject} from './endpoints.types';
|
|
12
|
+
|
|
13
|
+
export namespace Account {
|
|
14
|
+
export type GetAccountsRequest = Base.Request;
|
|
15
|
+
|
|
16
|
+
export type GetShopCarrierConfigurationRequest = Base.Request;
|
|
17
|
+
|
|
18
|
+
export type GetShopCarrierConfigurationsRequest = Base.Request;
|
|
19
|
+
|
|
20
|
+
export type GetShopCarrierOptionsRequest = Base.Request;
|
|
21
|
+
|
|
22
|
+
export type GetShopRequest = Base.Request;
|
|
23
|
+
|
|
24
|
+
export type GetShopsRequest = Base.Request;
|
|
25
|
+
|
|
26
|
+
export type ModelAccount = {
|
|
27
|
+
id: number;
|
|
28
|
+
platformId: number;
|
|
29
|
+
status: number;
|
|
30
|
+
contactInfo: Base.ModelContactDetails;
|
|
31
|
+
generalSettings: ModelAccountGeneralSettings;
|
|
32
|
+
shops: ShopCollection;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type ModelAccountGeneralSettings = {
|
|
36
|
+
isTest: boolean;
|
|
37
|
+
orderMode: boolean;
|
|
38
|
+
hasCarrierContract: boolean;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export type ModelShop = {
|
|
42
|
+
id: number;
|
|
43
|
+
accountId: number;
|
|
44
|
+
platformId: number;
|
|
45
|
+
name: string;
|
|
46
|
+
hidden: boolean;
|
|
47
|
+
billing: Record<string, unknown>;
|
|
48
|
+
deliveryAddress: Record<string, unknown>;
|
|
49
|
+
generalSettings: Record<string, unknown>;
|
|
50
|
+
return: Record<string, unknown>;
|
|
51
|
+
shipmentOptions: Record<string, unknown>;
|
|
52
|
+
trackTrace: Record<string, unknown>;
|
|
53
|
+
carrierConfigurations: ShopCarrierConfigurationCollection;
|
|
54
|
+
carriers: Carrier.CarrierCollection;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
export type ModelShopCarrierConfiguration = {
|
|
58
|
+
carrier?: string;
|
|
59
|
+
defaultCutoffTime: string;
|
|
60
|
+
defaultDropOffPoint: string;
|
|
61
|
+
defaultDropOffPointIdentifier: string;
|
|
62
|
+
mondayCutoffTime: string;
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export type ShopCarrierConfigurationCollection = ModelShopCarrierConfiguration[];
|
|
66
|
+
|
|
67
|
+
export type ShopCollection = ModelShop[];
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export namespace Base {
|
|
71
|
+
export type Model = Record<string, unknown>;
|
|
72
|
+
|
|
73
|
+
export type ModelAddress = {
|
|
74
|
+
address1?: string;
|
|
75
|
+
address2?: string;
|
|
76
|
+
area?: string;
|
|
77
|
+
boxNumber?: string;
|
|
78
|
+
cc?: string;
|
|
79
|
+
city?: string;
|
|
80
|
+
postalCode?: string;
|
|
81
|
+
region?: string;
|
|
82
|
+
state?: string;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export interface ModelContactDetails extends ModelAddress {
|
|
86
|
+
company?: string;
|
|
87
|
+
email?: string;
|
|
88
|
+
person?: string;
|
|
89
|
+
phone?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ModelShippingAddress extends ModelContactDetails {
|
|
93
|
+
eoriNumber?: string;
|
|
94
|
+
vatNumber?: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ModelCurrency {
|
|
98
|
+
amount: number;
|
|
99
|
+
currency: string;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export interface Request {
|
|
103
|
+
body?: string;
|
|
104
|
+
headers: Record<string, string>;
|
|
105
|
+
method: string;
|
|
106
|
+
parameters: Record<string, string>;
|
|
107
|
+
path: string;
|
|
108
|
+
property: string;
|
|
109
|
+
responseProperty?: string;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export namespace Carrier {
|
|
114
|
+
export type CarrierCollection = ModelCarrier[];
|
|
115
|
+
|
|
116
|
+
export type ModelCapability = {
|
|
117
|
+
type: string;
|
|
118
|
+
enum: unknown[];
|
|
119
|
+
minimum: number;
|
|
120
|
+
maximum: number;
|
|
121
|
+
minLength: number;
|
|
122
|
+
maxLength: number;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export type ModelCarrier = {
|
|
126
|
+
externalIdentifier?: string;
|
|
127
|
+
id: CarrierId;
|
|
128
|
+
name: CarrierName;
|
|
129
|
+
human: string;
|
|
130
|
+
subscriptionId?: number;
|
|
131
|
+
enabled: boolean;
|
|
132
|
+
primary: boolean;
|
|
133
|
+
isDefault: boolean;
|
|
134
|
+
optional: boolean;
|
|
135
|
+
label?: string;
|
|
136
|
+
type: string;
|
|
137
|
+
capabilities: ModelCarrierCapabilities;
|
|
138
|
+
returnCapabilities: ModelCarrierCapabilities;
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
export type ModelCarrierCapabilities = {
|
|
142
|
+
deliveryTypes: string[];
|
|
143
|
+
features: Record<string, unknown>;
|
|
144
|
+
packageTypes: string[];
|
|
145
|
+
shipmentOptions: Shipment.ModelShipmentOptions;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
export type ModelShipmentOptionsCapabilities = {
|
|
149
|
+
ageCheck: ModelCapability;
|
|
150
|
+
dropOffAtPostalPoint: ModelCapability;
|
|
151
|
+
insurance: ModelCapability;
|
|
152
|
+
labelDescription: ModelCapability;
|
|
153
|
+
largeFormat: ModelCapability;
|
|
154
|
+
onlyRecipient: ModelCapability;
|
|
155
|
+
return: ModelCapability;
|
|
156
|
+
sameDayDelivery: ModelCapability;
|
|
157
|
+
saturdayDelivery: ModelCapability;
|
|
158
|
+
signature: ModelCapability;
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export namespace Frontend {
|
|
163
|
+
export type FormElementCollection = (FormPlainElement | FormInteractiveElement)[];
|
|
164
|
+
|
|
165
|
+
export type FormInteractiveElement = FormPlainElement & {
|
|
166
|
+
name: string;
|
|
167
|
+
label: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
export type FormPlainElement = {
|
|
171
|
+
component: string;
|
|
172
|
+
props: Record<string, unknown>;
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export namespace Form {
|
|
177
|
+
export type InputOptionsCollection = ModelInputOptions[];
|
|
178
|
+
|
|
179
|
+
export type ModelFormGroup = {
|
|
180
|
+
name: string;
|
|
181
|
+
};
|
|
182
|
+
|
|
183
|
+
export type ModelInputBaseInput = {
|
|
184
|
+
component: string;
|
|
185
|
+
name: string;
|
|
186
|
+
label: string;
|
|
187
|
+
props: Record<string, unknown>;
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
export type ModelInputCheckboxInput = ModelInputBaseInput & {
|
|
191
|
+
description: string;
|
|
192
|
+
element: string;
|
|
193
|
+
label: string;
|
|
194
|
+
name: string;
|
|
195
|
+
type: string;
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
export type ModelInputHiddenInput = ModelInputTextInput & {
|
|
199
|
+
description: string;
|
|
200
|
+
element: string;
|
|
201
|
+
label: string;
|
|
202
|
+
name: string;
|
|
203
|
+
type: string;
|
|
204
|
+
};
|
|
205
|
+
|
|
206
|
+
export type ModelInputNumberInput = ModelInputTextInput & {
|
|
207
|
+
description: string;
|
|
208
|
+
element: string;
|
|
209
|
+
label: string;
|
|
210
|
+
name: string;
|
|
211
|
+
type: string;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export type ModelInputOptions = {
|
|
215
|
+
query: unknown[];
|
|
216
|
+
id: number;
|
|
217
|
+
name: string;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export type ModelInputRadioButtonInput = ModelInputBaseInput & {
|
|
221
|
+
description: string;
|
|
222
|
+
element: string;
|
|
223
|
+
label: string;
|
|
224
|
+
multiple: boolean;
|
|
225
|
+
name: string;
|
|
226
|
+
options: ModelInputOptions;
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
export type ModelInputSelectCountrySelectInput = ModelInputSelectInput & {
|
|
230
|
+
type: string;
|
|
231
|
+
label: string;
|
|
232
|
+
name: string;
|
|
233
|
+
description: string;
|
|
234
|
+
options: unknown[];
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export type ModelInputSelectDropOffDaySelectInput = ModelInputBaseInput & {
|
|
238
|
+
type: string;
|
|
239
|
+
name: string;
|
|
240
|
+
label: string;
|
|
241
|
+
description: string;
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
export type ModelInputSelectInput = ModelInputBaseInput & {
|
|
245
|
+
description: string;
|
|
246
|
+
element: string;
|
|
247
|
+
label: string;
|
|
248
|
+
name: string;
|
|
249
|
+
options: SelectOptionsCollection;
|
|
250
|
+
type: string;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
export type ModelInputTextInput = ModelInputBaseInput & {
|
|
254
|
+
description: string;
|
|
255
|
+
element: string;
|
|
256
|
+
label: string;
|
|
257
|
+
name: string;
|
|
258
|
+
type: string;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export type ModelInputToggleInput = ModelInputBaseInput & {
|
|
262
|
+
description: string;
|
|
263
|
+
element: string;
|
|
264
|
+
isBool: boolean;
|
|
265
|
+
label: string;
|
|
266
|
+
name: string;
|
|
267
|
+
type: string;
|
|
268
|
+
values: unknown[];
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export type ModelSelectOptions = {
|
|
272
|
+
name: string;
|
|
273
|
+
label: string;
|
|
274
|
+
options: unknown[];
|
|
275
|
+
};
|
|
276
|
+
|
|
277
|
+
export type SelectOptionsCollection = ModelSelectOptions[];
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
export namespace Fulfilment {
|
|
281
|
+
export type GetOrdersRequest = Base.Request;
|
|
282
|
+
|
|
283
|
+
export type ModelOrder = {
|
|
284
|
+
accountId?: number;
|
|
285
|
+
createdAt?: string;
|
|
286
|
+
externalIdentifier?: string;
|
|
287
|
+
fulfilmentPartnerIdentifier?: string;
|
|
288
|
+
invoiceAddress?: Base.ModelContactDetails;
|
|
289
|
+
language?: string;
|
|
290
|
+
orderDate?: string;
|
|
291
|
+
orderLines?: OrderLineCollection;
|
|
292
|
+
price?: number;
|
|
293
|
+
priceAfterVat?: number;
|
|
294
|
+
// todo fix this in the generator
|
|
295
|
+
shipment?: unknown;
|
|
296
|
+
shopId?: number;
|
|
297
|
+
status?: string;
|
|
298
|
+
type?: string;
|
|
299
|
+
updatedAt?: string;
|
|
300
|
+
uuid?: string;
|
|
301
|
+
vat?: number;
|
|
302
|
+
};
|
|
303
|
+
|
|
304
|
+
export type ModelOrderLine = {
|
|
305
|
+
uuid?: string;
|
|
306
|
+
quantity: number;
|
|
307
|
+
price: number;
|
|
308
|
+
vat: number;
|
|
309
|
+
priceAfterVat: number;
|
|
310
|
+
product?: ModelProduct;
|
|
311
|
+
instructions: string;
|
|
312
|
+
shippable: boolean;
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
export type ModelProduct = {
|
|
316
|
+
externalIdentifier: string;
|
|
317
|
+
uuid?: string;
|
|
318
|
+
sku?: string;
|
|
319
|
+
ean?: string;
|
|
320
|
+
name?: string;
|
|
321
|
+
description?: string;
|
|
322
|
+
width: number;
|
|
323
|
+
length: number;
|
|
324
|
+
height: number;
|
|
325
|
+
weight: number;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export type OrderCollection = ModelOrder[];
|
|
329
|
+
|
|
330
|
+
export type OrderLineCollection = ModelOrderLine[];
|
|
331
|
+
|
|
332
|
+
export type PostOrdersRequest = Base.Request;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
export namespace Plugin {
|
|
336
|
+
export type AbstractEndpointRequest = Base.Request;
|
|
337
|
+
|
|
338
|
+
export type Context = Record<string, unknown>;
|
|
339
|
+
|
|
340
|
+
export type DeleteShipmentsEndpointRequest = AbstractEndpointRequest;
|
|
341
|
+
|
|
342
|
+
export type EndpointRequestCollection = Record<string, AbstractEndpointRequest>;
|
|
343
|
+
|
|
344
|
+
export type ExportOrdersEndpointRequest = AbstractEndpointRequest;
|
|
345
|
+
|
|
346
|
+
export type ExportPrintOrdersEndpointRequest = AbstractEndpointRequest;
|
|
347
|
+
|
|
348
|
+
export type GetOrdersEndpointRequest = AbstractEndpointRequest;
|
|
349
|
+
|
|
350
|
+
export type ModelContextContextBag = {
|
|
351
|
+
checkout?: ModelContextCheckoutContext;
|
|
352
|
+
dynamic?: ModelContextDynamicContext;
|
|
353
|
+
global: ModelContextGlobalContext;
|
|
354
|
+
orderData?: OrderDataContextCollection;
|
|
355
|
+
pluginSettingsView?: ModelContextPluginSettingsViewContext;
|
|
356
|
+
productData?: ProductDataContextCollection;
|
|
357
|
+
productSettingsView?: ModelContextProductSettingsViewContext;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
export type ModelContextDeliveryOptionsConfig = {
|
|
361
|
+
apiBaseUrl: string;
|
|
362
|
+
currency: string;
|
|
363
|
+
packageType: string;
|
|
364
|
+
locale: string;
|
|
365
|
+
platform: string;
|
|
366
|
+
basePrice: number;
|
|
367
|
+
showPriceSurcharge: boolean;
|
|
368
|
+
pickupLocationsDefaultView: string;
|
|
369
|
+
priceStandardDelivery: number;
|
|
370
|
+
carrierSettings: unknown[];
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export type ModelContextCheckoutContextSettings = {
|
|
374
|
+
actions: {
|
|
375
|
+
baseUrl: string;
|
|
376
|
+
endpoints: EndpointObject<FrontendEndpoint>;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
// Delivery options
|
|
380
|
+
allowedShippingMethods: Omit<ShippingMethodTypeMap, TriState.Off>;
|
|
381
|
+
hasDeliveryOptions: boolean;
|
|
382
|
+
hiddenInputName: string;
|
|
383
|
+
|
|
384
|
+
// Separate address fields
|
|
385
|
+
countriesWithSeparateAddressFields: string[];
|
|
386
|
+
|
|
387
|
+
// Address widget
|
|
388
|
+
checkoutAddressHiddenInputName: string;
|
|
389
|
+
|
|
390
|
+
// Tax fields
|
|
391
|
+
carriersWithTaxFields: CarrierName[];
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export type ModelContextCheckoutContext = {
|
|
395
|
+
config: Shipment.ModelDeliveryOptions;
|
|
396
|
+
platformConfig: Record<'carriers', unknown[]>; // @todo this is a temporary generic type, until capabilities is implemented in the deliveryOptions
|
|
397
|
+
endpoints: EndpointRequestCollection;
|
|
398
|
+
settings: ModelContextCheckoutContextSettings;
|
|
399
|
+
strings: Record<string, string>;
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export type ModelContextGlobalContext = {
|
|
403
|
+
appInfo: {
|
|
404
|
+
name: string;
|
|
405
|
+
path: string;
|
|
406
|
+
title: string;
|
|
407
|
+
url: string;
|
|
408
|
+
version: string;
|
|
409
|
+
};
|
|
410
|
+
baseUrl: string;
|
|
411
|
+
bootId: string;
|
|
412
|
+
endpoints: EndpointRequestCollection;
|
|
413
|
+
eventPing: string;
|
|
414
|
+
eventPong: string;
|
|
415
|
+
language: string;
|
|
416
|
+
mode: string;
|
|
417
|
+
platform: {
|
|
418
|
+
backofficeUrl: string;
|
|
419
|
+
defaultCarrier: string;
|
|
420
|
+
defaultCarrierId: number;
|
|
421
|
+
human: string;
|
|
422
|
+
localCountry: string;
|
|
423
|
+
name: string;
|
|
424
|
+
supportUrl: string;
|
|
425
|
+
};
|
|
426
|
+
translations: Record<string, string>;
|
|
427
|
+
};
|
|
428
|
+
|
|
429
|
+
export type ModelContextDynamicContext = {
|
|
430
|
+
account: Account.ModelAccount;
|
|
431
|
+
carriers: Carrier.CarrierCollection;
|
|
432
|
+
pluginSettings: Settings.ModelSettings;
|
|
433
|
+
printOptionsView: SettingsView;
|
|
434
|
+
shop: Account.ModelShop;
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
export interface DigitalStampRange {
|
|
438
|
+
min: number;
|
|
439
|
+
max: number;
|
|
440
|
+
average: number;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
export type ModelContextOrderDataContext = ModelPdkOrder & {
|
|
444
|
+
digitalStampRanges: DigitalStampRange[];
|
|
445
|
+
inheritedDeliveryOptions: Record<string, Shipment.ModelDeliveryOptions>;
|
|
446
|
+
};
|
|
447
|
+
|
|
448
|
+
export type ModelContextProductDataContext = ModelPdkProduct;
|
|
449
|
+
|
|
450
|
+
export type Field = {
|
|
451
|
+
$attributes?: Record<string, unknown>;
|
|
452
|
+
$component: string;
|
|
453
|
+
$builders?: Record<string, unknown>[];
|
|
454
|
+
$slot?: string;
|
|
455
|
+
$wrapper?: string | boolean;
|
|
456
|
+
label?: string;
|
|
457
|
+
name?: string;
|
|
458
|
+
subtext?: string;
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
export type SettingsView = {
|
|
462
|
+
id: string;
|
|
463
|
+
title: string;
|
|
464
|
+
titleSuffix?: string;
|
|
465
|
+
description?: string;
|
|
466
|
+
subtext?: string;
|
|
467
|
+
elements: null | Field[];
|
|
468
|
+
children: null | SettingsView[];
|
|
469
|
+
};
|
|
470
|
+
|
|
471
|
+
export type ModelContextPluginSettingsViewContext = {
|
|
472
|
+
order: SettingsView;
|
|
473
|
+
label: SettingsView;
|
|
474
|
+
customs: SettingsView;
|
|
475
|
+
checkout: SettingsView;
|
|
476
|
+
carrier: SettingsView;
|
|
477
|
+
};
|
|
478
|
+
|
|
479
|
+
export type ModelContextProductSettingsViewContext = {
|
|
480
|
+
product: ModelPdkProduct;
|
|
481
|
+
view: SettingsView[];
|
|
482
|
+
values: Settings.ModelProductSettings;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
export type ModelPdkPhysicalProperties = {
|
|
486
|
+
height?: number;
|
|
487
|
+
length?: number;
|
|
488
|
+
width?: number;
|
|
489
|
+
initialWeight: number;
|
|
490
|
+
manualWeight: number;
|
|
491
|
+
totalWeight: number;
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
export type ModelPdkOrder = {
|
|
495
|
+
customsDeclaration?: Shipment.ModelCustomsDeclaration;
|
|
496
|
+
deliveryOptions?: Shipment.ModelDeliveryOptions;
|
|
497
|
+
exported: boolean;
|
|
498
|
+
externalIdentifier: string;
|
|
499
|
+
lines?: PdkOrderLineCollection;
|
|
500
|
+
orderPrice: number;
|
|
501
|
+
orderPriceAfterVat: number;
|
|
502
|
+
orderVat: number;
|
|
503
|
+
billingAddress?: Base.ModelContactDetails;
|
|
504
|
+
shippingAddress: Base.ModelContactDetails;
|
|
505
|
+
senderAddress?: Base.ModelContactDetails;
|
|
506
|
+
physicalProperties: ModelPdkPhysicalProperties;
|
|
507
|
+
shipmentPrice: number;
|
|
508
|
+
shipmentPriceAfterVat: number;
|
|
509
|
+
shipmentVat: number;
|
|
510
|
+
shipments: Shipment.ShipmentCollection;
|
|
511
|
+
totalPrice: number;
|
|
512
|
+
totalPriceAfterVat: number;
|
|
513
|
+
totalVat: number;
|
|
514
|
+
};
|
|
515
|
+
|
|
516
|
+
export type ModelPdkOrderLine = {
|
|
517
|
+
quantity: number;
|
|
518
|
+
price: number;
|
|
519
|
+
vat: number;
|
|
520
|
+
priceAfterVat: number;
|
|
521
|
+
product?: Fulfilment.ModelProduct;
|
|
522
|
+
};
|
|
523
|
+
|
|
524
|
+
export type ModelPdkProduct = {
|
|
525
|
+
externalIdentifier: string;
|
|
526
|
+
sku?: string;
|
|
527
|
+
name?: string;
|
|
528
|
+
weight: number;
|
|
529
|
+
settings: Settings.ModelProductSettings;
|
|
530
|
+
};
|
|
531
|
+
|
|
532
|
+
export type OrderDataContextCollection = ModelContextOrderDataContext[];
|
|
533
|
+
|
|
534
|
+
export type ProductDataContextCollection = ModelContextProductDataContext[];
|
|
535
|
+
|
|
536
|
+
export type PdkOrderCollection = ModelPdkOrder[];
|
|
537
|
+
|
|
538
|
+
export type PdkOrderLineCollection = ModelPdkOrderLine[];
|
|
539
|
+
|
|
540
|
+
export type PdkProductCollection = ModelPdkProduct[];
|
|
541
|
+
|
|
542
|
+
export type PrintOrdersEndpointRequest = AbstractEndpointRequest;
|
|
543
|
+
|
|
544
|
+
export type UpdateShipmentsEndpointRequest = AbstractEndpointRequest;
|
|
545
|
+
|
|
546
|
+
export type UpdateOrdersEndpointRequest = AbstractEndpointRequest;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
export namespace Settings {
|
|
550
|
+
export type CarrierSettingsCollection = ModelCarrierSettings[];
|
|
551
|
+
|
|
552
|
+
export type ModelAccountSettings = {
|
|
553
|
+
apiKey: string;
|
|
554
|
+
environment?: string;
|
|
555
|
+
};
|
|
556
|
+
|
|
557
|
+
export type ModelCarrierSettings = {
|
|
558
|
+
carrierName: string;
|
|
559
|
+
allowDeliveryOptions: boolean;
|
|
560
|
+
allowEveningDelivery: boolean;
|
|
561
|
+
allowInsuranceBelgium: boolean;
|
|
562
|
+
allowMondayDelivery: boolean;
|
|
563
|
+
allowMorningDelivery: boolean;
|
|
564
|
+
allowOnlyRecipient: boolean;
|
|
565
|
+
allowPickupLocations: boolean;
|
|
566
|
+
allowSameDayDelivery: boolean;
|
|
567
|
+
allowSaturdayDelivery: boolean;
|
|
568
|
+
allowSignature: boolean;
|
|
569
|
+
cutoffTime: string;
|
|
570
|
+
cutoffTimeSameDay: string;
|
|
571
|
+
defaultPackageType: string;
|
|
572
|
+
deliveryOptionsCustomCss: string;
|
|
573
|
+
deliveryOptionsDisplay: string;
|
|
574
|
+
deliveryOptionsEnabledForBackorders: boolean;
|
|
575
|
+
deliveryOptionsPosition: string;
|
|
576
|
+
digitalStampDefaultWeight: number;
|
|
577
|
+
dropOffPossibilities: ModelDropOffPossibilities;
|
|
578
|
+
dropOffDelay: number;
|
|
579
|
+
dropOffPoint: string;
|
|
580
|
+
exportAgeCheck: boolean;
|
|
581
|
+
exportInsurance: boolean;
|
|
582
|
+
exportInsuranceAmount: number;
|
|
583
|
+
exportInsuranceUpTo: number;
|
|
584
|
+
exportLargeFormat: boolean;
|
|
585
|
+
exportOnlyRecipient: boolean;
|
|
586
|
+
exportReturnLargeFormat: boolean;
|
|
587
|
+
exportReturnPackageType: string;
|
|
588
|
+
exportReturnShipments: boolean;
|
|
589
|
+
exportSignature: boolean;
|
|
590
|
+
featureShowDeliveryDate: boolean;
|
|
591
|
+
pickupLocationsDefaultView: string;
|
|
592
|
+
priceEveningDelivery: number;
|
|
593
|
+
priceMondayDelivery: number;
|
|
594
|
+
priceMorningDelivery: number;
|
|
595
|
+
priceOnlyRecipient: number;
|
|
596
|
+
pricePackageTypeDigitalStamp: number;
|
|
597
|
+
pricePackageTypeMailbox: number;
|
|
598
|
+
pricePickup: number;
|
|
599
|
+
priceSameDayDelivery: number;
|
|
600
|
+
priceSignature: number;
|
|
601
|
+
priceStandardDelivery: number;
|
|
602
|
+
showDeliveryDay: boolean;
|
|
603
|
+
showPriceAsSurcharge: boolean;
|
|
604
|
+
useSeparateAddressFields: boolean;
|
|
605
|
+
stringAddressNotFound: string;
|
|
606
|
+
stringCity: string;
|
|
607
|
+
stringCountry: string;
|
|
608
|
+
stringDelivery: string;
|
|
609
|
+
stringDiscount: string;
|
|
610
|
+
stringEveningDelivery: string;
|
|
611
|
+
stringFrom: string;
|
|
612
|
+
stringHouseNumber: string;
|
|
613
|
+
stringLoadMore: string;
|
|
614
|
+
stringMorningDelivery: string;
|
|
615
|
+
stringOnlyRecipient: string;
|
|
616
|
+
stringOpeningHours: string;
|
|
617
|
+
stringPickup: string;
|
|
618
|
+
stringPickupLocationsListButton: string;
|
|
619
|
+
stringPickupLocationsMapButton: string;
|
|
620
|
+
stringPostalCode: string;
|
|
621
|
+
stringRecipient: string;
|
|
622
|
+
stringRetry: string;
|
|
623
|
+
stringSaturdayDelivery: string;
|
|
624
|
+
stringSignature: string;
|
|
625
|
+
stringStandardDelivery: string;
|
|
626
|
+
stringWrongNumberPostalCode: string;
|
|
627
|
+
stringWrongPostalCodeCity: string;
|
|
628
|
+
};
|
|
629
|
+
|
|
630
|
+
export type ModelCheckoutSettings = {
|
|
631
|
+
deliveryOptionsCustomCss: string;
|
|
632
|
+
deliveryOptionsDisplay: boolean;
|
|
633
|
+
deliveryOptionsPosition: string;
|
|
634
|
+
pickupLocationsDefaultView: string;
|
|
635
|
+
priceType: string;
|
|
636
|
+
showDeliveryDay: boolean;
|
|
637
|
+
showPriceAsSurcharge: boolean;
|
|
638
|
+
useSeparateAddressFields: boolean;
|
|
639
|
+
stringAddressNotFound: string;
|
|
640
|
+
stringCountry: string;
|
|
641
|
+
stringCity: string;
|
|
642
|
+
stringDelivery: string;
|
|
643
|
+
stringDiscount: string;
|
|
644
|
+
stringEveningDelivery: string;
|
|
645
|
+
stringFrom: string;
|
|
646
|
+
stringHouseNumber: string;
|
|
647
|
+
stringLoadMore: string;
|
|
648
|
+
stringMorningDelivery: string;
|
|
649
|
+
stringOnlyRecipient: string;
|
|
650
|
+
stringOpeningHours: string;
|
|
651
|
+
stringPickupLocationsListButton: string;
|
|
652
|
+
stringPickupLocationsMapButton: string;
|
|
653
|
+
stringPickup: string;
|
|
654
|
+
stringPostalCode: string;
|
|
655
|
+
stringRecipient: string;
|
|
656
|
+
stringRetry: string;
|
|
657
|
+
stringSaturdayDelivery: string;
|
|
658
|
+
stringSignature: string;
|
|
659
|
+
stringStandardDelivery: string;
|
|
660
|
+
stringWrongNumberPostalCode: string;
|
|
661
|
+
stringWrongPostalCodeCity: string;
|
|
662
|
+
};
|
|
663
|
+
|
|
664
|
+
export type ModelCustomsSettings = {
|
|
665
|
+
countryOfOrigin?: string;
|
|
666
|
+
customsCode: string;
|
|
667
|
+
packageContents: string;
|
|
668
|
+
};
|
|
669
|
+
|
|
670
|
+
export type ModelDropOffPossibilities = {
|
|
671
|
+
dropOffDays: Shipment.DropOffDayCollection;
|
|
672
|
+
dropOffDaysDeviations: Shipment.DropOffDayCollection;
|
|
673
|
+
};
|
|
674
|
+
|
|
675
|
+
export type ModelLabelSettings = {
|
|
676
|
+
description?: string;
|
|
677
|
+
format: string;
|
|
678
|
+
output: string;
|
|
679
|
+
position: number;
|
|
680
|
+
prompt: boolean;
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
export type ModelOrderSettings = {
|
|
684
|
+
barcodeInNote: boolean;
|
|
685
|
+
conceptShipments: boolean;
|
|
686
|
+
emptyDigitalStampWeight: number;
|
|
687
|
+
emptyParcelWeight: number;
|
|
688
|
+
exportWithAutomaticStatus: string;
|
|
689
|
+
ignoreOrderStatuses: string[];
|
|
690
|
+
orderMode: boolean;
|
|
691
|
+
orderStatusMail: boolean;
|
|
692
|
+
processDirectly: boolean;
|
|
693
|
+
saveCustomerAddress: boolean;
|
|
694
|
+
sendNotificationAfter: -1 | string;
|
|
695
|
+
shareCustomerInformation: boolean;
|
|
696
|
+
statusOnLabelCreate: -1 | string;
|
|
697
|
+
statusWhenDelivered: -1 | string;
|
|
698
|
+
statusWhenLabelScanned: -1 | string;
|
|
699
|
+
trackTraceInAccount: boolean;
|
|
700
|
+
trackTraceInEmail: boolean;
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
export type ModelProductSettings = {
|
|
704
|
+
allowOnlyRecipient: 0 | 1 | -1;
|
|
705
|
+
allowSignature: 0 | 1 | -1;
|
|
706
|
+
countryOfOrigin: string;
|
|
707
|
+
customsCode: string;
|
|
708
|
+
disableDeliveryOptions: 0 | 1 | -1;
|
|
709
|
+
dropOffDelay: number;
|
|
710
|
+
exportAgeCheck: 0 | 1 | -1;
|
|
711
|
+
exportInsurance: 0 | 1 | -1;
|
|
712
|
+
exportLargeFormat: 0 | 1 | -1;
|
|
713
|
+
fitInMailbox: number;
|
|
714
|
+
packageType: string;
|
|
715
|
+
returnShipments: 0 | 1 | -1;
|
|
716
|
+
excludeParcelLocker: 0 | 1 | -1;
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
export type ModelSettings = {
|
|
720
|
+
account: ModelAccountSettings;
|
|
721
|
+
order: ModelOrderSettings;
|
|
722
|
+
label: ModelLabelSettings;
|
|
723
|
+
customs: ModelCustomsSettings;
|
|
724
|
+
checkout: ModelCheckoutSettings;
|
|
725
|
+
carrier: Record<string, ModelCarrierSettings>;
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export namespace Shipment {
|
|
730
|
+
export type CustomsDeclarationItemCollection = ModelCustomsDeclarationItem[];
|
|
731
|
+
|
|
732
|
+
export type DeliveryTypeCollection = ModelDeliveryType[];
|
|
733
|
+
|
|
734
|
+
export type DropOffDayCollection = ModelDropOffDay[];
|
|
735
|
+
|
|
736
|
+
export type GetLabelsAsPdfRequest = GetLabelsRequest;
|
|
737
|
+
|
|
738
|
+
export type GetLabelsRequest = Base.Request;
|
|
739
|
+
|
|
740
|
+
export type GetShipmentsRequest = Base.Request;
|
|
741
|
+
|
|
742
|
+
export type ModelCustomsDeclaration = {
|
|
743
|
+
contents: number;
|
|
744
|
+
items: CustomsDeclarationItemCollection;
|
|
745
|
+
invoice?: string;
|
|
746
|
+
weight: number;
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
export type ModelCustomsDeclarationItem = {
|
|
750
|
+
amount: number;
|
|
751
|
+
classification?: string;
|
|
752
|
+
country?: string;
|
|
753
|
+
description?: string;
|
|
754
|
+
itemValue: Base.ModelCurrency;
|
|
755
|
+
weight: number;
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
export type ModelDeliveryOptions = {
|
|
759
|
+
carrier?: Carrier.ModelCarrier;
|
|
760
|
+
date?: DateTime;
|
|
761
|
+
deliveryType?: SupportedDeliveryTypeName;
|
|
762
|
+
labelAmount: number;
|
|
763
|
+
packageType?: SupportedPackageTypeName;
|
|
764
|
+
pickupLocation?: ModelRetailLocation;
|
|
765
|
+
shipmentOptions: ModelShipmentOptions;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
export type ModelDeliveryType = {
|
|
769
|
+
id?: number;
|
|
770
|
+
name?: string;
|
|
771
|
+
};
|
|
772
|
+
|
|
773
|
+
export type ModelDropOffDay = {
|
|
774
|
+
cutoffTime?: string;
|
|
775
|
+
date?: DateTimeImmutable;
|
|
776
|
+
dispatch?: boolean;
|
|
777
|
+
sameDayCutoffTime?: string;
|
|
778
|
+
weekday: number;
|
|
779
|
+
};
|
|
780
|
+
|
|
781
|
+
export type ModelPackageType = {
|
|
782
|
+
id?: number;
|
|
783
|
+
name?: string;
|
|
784
|
+
};
|
|
785
|
+
|
|
786
|
+
export type ModelPhysicalProperties = {
|
|
787
|
+
height?: number;
|
|
788
|
+
length?: number;
|
|
789
|
+
weight: number;
|
|
790
|
+
width?: number;
|
|
791
|
+
};
|
|
792
|
+
|
|
793
|
+
export type ModelRetailLocation = Base.ModelAddress & {
|
|
794
|
+
locationCode?: string;
|
|
795
|
+
locationName?: string;
|
|
796
|
+
retailNetworkId?: string;
|
|
797
|
+
boxNumber?: string;
|
|
798
|
+
cc?: string;
|
|
799
|
+
city?: string;
|
|
800
|
+
number?: string;
|
|
801
|
+
numberSuffix?: string;
|
|
802
|
+
postalCode?: string;
|
|
803
|
+
region?: string;
|
|
804
|
+
state?: string;
|
|
805
|
+
street?: string;
|
|
806
|
+
};
|
|
807
|
+
|
|
808
|
+
export type ModelShipment = {
|
|
809
|
+
id: number;
|
|
810
|
+
shopId?: number;
|
|
811
|
+
orderId: string;
|
|
812
|
+
referenceIdentifier?: string;
|
|
813
|
+
externalIdentifier?: string;
|
|
814
|
+
apiKey?: string;
|
|
815
|
+
barcode?: string;
|
|
816
|
+
carrier?: Carrier.ModelCarrier;
|
|
817
|
+
collectionContact?: string;
|
|
818
|
+
customsDeclaration?: ModelCustomsDeclaration;
|
|
819
|
+
delayed: boolean;
|
|
820
|
+
delivered: boolean;
|
|
821
|
+
deliveryOptions: ModelDeliveryOptions;
|
|
822
|
+
dropOffPoint?: ModelRetailLocation;
|
|
823
|
+
hidden: boolean;
|
|
824
|
+
isReturn: boolean;
|
|
825
|
+
linkConsumerPortal?: string;
|
|
826
|
+
multiCollo: boolean;
|
|
827
|
+
multiColloMainShipmentId?: string;
|
|
828
|
+
partnerTrackTraces: unknown[];
|
|
829
|
+
physicalProperties?: ModelPhysicalProperties;
|
|
830
|
+
price: Base.ModelCurrency;
|
|
831
|
+
shippingAddress: Base.ModelContactDetails;
|
|
832
|
+
senderAddress?: Base.ModelContactDetails;
|
|
833
|
+
shipmentType?: number;
|
|
834
|
+
status?: number;
|
|
835
|
+
deleted?: DateTime;
|
|
836
|
+
updated: null | DateTime;
|
|
837
|
+
created?: DateTime;
|
|
838
|
+
createdBy?: number;
|
|
839
|
+
modified?: DateTime;
|
|
840
|
+
modifiedBy?: number;
|
|
841
|
+
};
|
|
842
|
+
|
|
843
|
+
export type ModelShipmentOptions = {
|
|
844
|
+
ageCheck?: boolean;
|
|
845
|
+
hideSender?: boolean;
|
|
846
|
+
insurance?: number[];
|
|
847
|
+
labelDescription?: string;
|
|
848
|
+
largeFormat?: boolean;
|
|
849
|
+
onlyRecipient?: boolean;
|
|
850
|
+
return?: boolean;
|
|
851
|
+
sameDayDelivery?: boolean;
|
|
852
|
+
signature?: boolean;
|
|
853
|
+
receiptCode?: boolean;
|
|
854
|
+
};
|
|
855
|
+
|
|
856
|
+
export type PostReturnShipmentsRequest = Base.Request;
|
|
857
|
+
|
|
858
|
+
export type PostShipmentsRequest = Base.Request;
|
|
859
|
+
|
|
860
|
+
export type ShipmentCollection = ModelShipment[];
|
|
861
|
+
|
|
862
|
+
export type UpdateShipmentsRequest = Base.Request;
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
export namespace Webhook {
|
|
866
|
+
export type DeleteWebhookSubscriptionRequest = Base.Request;
|
|
867
|
+
|
|
868
|
+
export type GetWebhookSubscriptionRequest = Base.Request;
|
|
869
|
+
|
|
870
|
+
export type GetWebhookSubscriptionsRequest = Base.Request;
|
|
871
|
+
|
|
872
|
+
export type ModelWebhookSubscription = {
|
|
873
|
+
hook: string;
|
|
874
|
+
url: string;
|
|
875
|
+
};
|
|
876
|
+
|
|
877
|
+
export type PostWebhookSubscriptionRequest = Base.Request;
|
|
878
|
+
|
|
879
|
+
export type WebhookSubscriptionCollection = ModelWebhookSubscription[];
|
|
880
|
+
}
|