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