@scayle/storefront-core 8.9.0 → 8.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.
Files changed (62) hide show
  1. package/CHANGELOG.md +67 -0
  2. package/dist/helpers/advancedAttributeHelpers.d.ts +27 -0
  3. package/dist/helpers/arrayHelpers.d.ts +7 -0
  4. package/dist/helpers/attributeHelpers.d.ts +32 -0
  5. package/dist/helpers/basketHelpers.d.ts +7 -0
  6. package/dist/helpers/categoryHelper.d.ts +38 -0
  7. package/dist/helpers/filterHelper.d.ts +96 -10
  8. package/dist/helpers/formHelpers.d.ts +57 -24
  9. package/dist/helpers/imageHelpers.d.ts +18 -0
  10. package/dist/helpers/localization.d.ts +6 -4
  11. package/dist/helpers/objectHelpers.d.ts +7 -0
  12. package/dist/helpers/orderHelpers.d.ts +31 -16
  13. package/dist/helpers/productDisruptorHelper.d.ts +43 -0
  14. package/dist/helpers/productHelpers.d.ts +169 -0
  15. package/dist/helpers/sanitizationHelpers.d.ts +61 -0
  16. package/dist/helpers/sortingHelper.d.ts +16 -0
  17. package/dist/helpers/stringHelpers.d.ts +14 -0
  18. package/dist/index.d.ts +1 -1
  19. package/dist/rpc/methods/basket/basket.d.ts +95 -10
  20. package/dist/rpc/methods/brands.d.ts +26 -0
  21. package/dist/rpc/methods/campaign.d.ts +8 -4
  22. package/dist/rpc/methods/categories.d.ts +65 -5
  23. package/dist/rpc/methods/categories.mjs +2 -1
  24. package/dist/rpc/methods/cbd.d.ts +10 -0
  25. package/dist/rpc/methods/checkout/checkout.d.ts +40 -0
  26. package/dist/rpc/methods/checkout/checkout.mjs +1 -1
  27. package/dist/rpc/methods/checkout/order.d.ts +12 -0
  28. package/dist/rpc/methods/checkout/order.mjs +0 -10
  29. package/dist/rpc/methods/checkout/shopUser.d.ts +20 -0
  30. package/dist/rpc/methods/checkout/shopUserAddresses.d.ts +7 -0
  31. package/dist/rpc/methods/navigationTrees.d.ts +27 -0
  32. package/dist/rpc/methods/oauth/idp.d.ts +24 -0
  33. package/dist/rpc/methods/products.d.ts +150 -7
  34. package/dist/rpc/methods/products.mjs +1 -3
  35. package/dist/rpc/methods/promotion.d.ts +46 -4
  36. package/dist/rpc/methods/search.d.ts +17 -12
  37. package/dist/rpc/methods/search.mjs +4 -2
  38. package/dist/rpc/methods/session.d.ts +71 -0
  39. package/dist/rpc/methods/session.mjs +13 -13
  40. package/dist/rpc/methods/shopConfiguration.d.ts +12 -1
  41. package/dist/rpc/methods/shopConfiguration.mjs +2 -1
  42. package/dist/rpc/methods/user.d.ts +34 -4
  43. package/dist/rpc/methods/variants.d.ts +28 -0
  44. package/dist/rpc/methods/wishlist.d.ts +35 -0
  45. package/dist/test/factories/user.d.ts +10 -0
  46. package/dist/types/api/auth.d.ts +67 -0
  47. package/dist/types/api/context.d.ts +61 -0
  48. package/dist/types/api/rpc.d.ts +19 -0
  49. package/dist/types/breadcrumb.d.ts +9 -0
  50. package/dist/types/promises.d.ts +10 -0
  51. package/dist/types/sapi/basket.d.ts +26 -1
  52. package/dist/types/sapi/filter.d.ts +37 -0
  53. package/dist/types/sapi/navigation.d.ts +16 -4
  54. package/dist/types/sapi/order.d.ts +137 -242
  55. package/dist/types/sapi/product.d.ts +85 -0
  56. package/dist/types/sapi/productFilter.d.ts +14 -0
  57. package/dist/types/sapi/router.d.ts +3 -0
  58. package/dist/types/sapi/search.d.ts +19 -0
  59. package/dist/types/sapi/sorting.d.ts +7 -0
  60. package/dist/types/sapi/wishlist.d.ts +6 -0
  61. package/dist/types/user.d.ts +102 -0
  62. package/package.json +1 -1
@@ -2,31 +2,53 @@ import type { AttributeWithBooleanValueFilter, AttributeWithValuesFilter, Filter
2
2
  import type { Query } from './router';
3
3
  export type { AttributesFilterItemWithValues } from '@scayle/storefront-api';
4
4
  export type { AttributeWithBooleanValueFilter, AttributeWithValuesFilter, AttributeKey, } from '@scayle/storefront-api';
5
+ /**
6
+ * Parameters for filtering products.
7
+ */
5
8
  export interface FilterParams {
6
9
  page?: number;
7
10
  perPage?: number;
11
+ /** The where clause for filtering. */
8
12
  where?: {
13
+ /** The search term. */
9
14
  term?: ProductSearchQuery['term'];
15
+ /** The minimum price. */
10
16
  minPrice?: ProductSearchQuery['minPrice'];
17
+ /** The maximum price. */
11
18
  maxPrice?: ProductSearchQuery['maxPrice'];
19
+ /** The attributes filter. */
12
20
  attributes?: ProductSearchQuery['attributes'];
21
+ /** Attributes to whitelist */
13
22
  whitelistAttributes?: ProductSearchQuery['attributes'];
14
23
  };
24
+ /** The sort configuration. */
15
25
  sort?: ProductSortConfig;
26
+ /** The OR filters operator. */
16
27
  orFiltersOperator?: ProductsSearchEndpointParameters['orFiltersOperator'];
17
28
  }
29
+ /**
30
+ * Parameters for fetching filters.
31
+ */
18
32
  export type FetchFiltersParams = {
19
33
  includedFilters?: Array<string>;
34
+ /** where clause for prefiltering the filters */
20
35
  where?: {
36
+ /** The search term. */
21
37
  term?: ProductSearchQuery['term'];
38
+ /** The minimum price. */
22
39
  minPrice?: ProductSearchQuery['minPrice'];
40
+ /** The maximum price. */
23
41
  maxPrice?: ProductSearchQuery['maxPrice'];
42
+ /** The attributes filter. */
24
43
  attributes?: ProductSearchQuery['attributes'];
44
+ /** wether to disable fuzziness on term */
25
45
  disableFuzziness?: ProductSearchQuery['disableFuzziness'];
46
+ /** Attributes to whitelist */
26
47
  whitelistAttributes?: ProductSearchQuery['attributes'];
27
48
  };
28
49
  includeSoldOut?: boolean;
29
50
  includeSellableForFree?: boolean;
51
+ /** or operator for filters */
30
52
  orFiltersOperator?: ProductsSearchEndpointParameters['orFiltersOperator'];
31
53
  } & ({
32
54
  category?: string;
@@ -35,18 +57,33 @@ export type FetchFiltersParams = {
35
57
  categoryId: number;
36
58
  category?: undefined;
37
59
  });
60
+ /**
61
+ * The response from fetching filters.
62
+ */
38
63
  export interface FetchFiltersResponse {
39
64
  filters: FiltersEndpointResponseData;
40
65
  unfilteredCount: number;
41
66
  }
67
+ /**
68
+ * Represents a filter query.
69
+ */
42
70
  export interface FilterQuery {
43
71
  page?: Query;
44
72
  sort?: Query;
45
73
  term?: Query;
46
74
  }
75
+ /**
76
+ * Filter setup type.
77
+ */
47
78
  export type FilterSetup = Record<string, unknown>;
79
+ /**
80
+ * Parameters for sanitizing attributes.
81
+ */
48
82
  export interface SanitizeAttributesParams {
83
+ /** The attributes to sanitize. */
49
84
  attributes: (AttributeWithValuesFilter | AttributeWithBooleanValueFilter)[];
85
+ /** The filter keys. */
50
86
  filterKeys: string[];
87
+ /** included filter names */
51
88
  includedFilters?: string[];
52
89
  }
@@ -1,12 +1,24 @@
1
1
  import type { GetNavigationParameters, NavigationItems } from '@scayle/storefront-api';
2
2
  export type { NavigationItems, NavigationTree, NavigationItemExternal, NavigationItemPage, NavigationItemCategory, } from '@scayle/storefront-api';
3
+ /**
4
+ * Represents a navigation tree item.
5
+ */
3
6
  export type NavigationTreeItem = NavigationItems[0];
7
+ /**
8
+ * Parameters for fetching navigation trees.
9
+ */
4
10
  export interface FetchNavigationTreesParams {
5
11
  params?: GetNavigationParameters;
6
12
  }
7
- export type FetchNavigationTreeByIdParams = FetchNavigationTreesParams & {
13
+ /**
14
+ * Parameters for fetching a navigation tree by ID.
15
+ */
16
+ export interface FetchNavigationTreeByIdParams extends FetchNavigationTreesParams {
8
17
  treeId: number;
9
- };
10
- export type FetchNavigationTreeByNameParams = FetchNavigationTreesParams & {
18
+ }
19
+ /**
20
+ * Parameters for fetching a navigation tree by name.
21
+ */
22
+ export interface FetchNavigationTreeByNameParams extends FetchNavigationTreesParams {
11
23
  treeName: string;
12
- };
24
+ }
@@ -1,116 +1,39 @@
1
- /**
2
- * This file was automatically generated by json-schema-to-typescript.
3
- * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
4
- * and run json-schema-to-typescript to regenerate this file.
5
- */
6
- export type TimestampOfOrderConfirmation = string;
7
- export type ThisFieldRepresentsTheAdditionalFeesExcludingTheTaxes = number;
8
- export type ThisFieldRepresentsTheAdditionalFeesIncludingTheTaxes = number;
9
- export type TheIncludedVATAmount = number;
10
- export type TheIncludedVATRateInPercentAsIntegerRepresentation = number;
11
- export type ThisFieldRepresentsTheDiscountAmountIncludingTheTaxes = number;
12
- export type AbsoluteValueOfTheAppliedTax = number;
13
- /**
14
- * This price excludes taxes, but also includes all applicable reductions.
15
- */
16
- export type ItemPriceExcludingTaxes = number;
17
- /**
18
- * The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provdided on the request).
19
- */
20
- export type ItemPriceIncludingTaxes = number;
21
- /**
22
- * The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code that identifies the currency. The currency is defined on the configuration of the shop, and can be modified in the cloud panel.
23
- */
24
- export type CharacterCurrencyCode = string;
25
- export type UniqueIdentifierOfTheState = string;
26
- export type NameOfTheState = string;
27
- export type UniqueIdentifierOfTheState1 = string;
28
- export type NameOfTheState1 = string;
29
- export type UniqueIdentifierOfTheState2 = string;
30
- export type NameOfTheState2 = string;
31
- export type TimestampOfOrderInvoice = string;
32
- export type UniqueNumericIdentifierOfTheItem = number;
33
- /**
34
- * The number of deliverable items available in the warehouse for immediate shipping.
35
- */
36
- export type AvailableQuantityInTheWarehouse = number;
37
- /**
38
- * The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code that identifies the currency. The currency is defined on the configuration of the shop, and can be modified in the cloud panel.
39
- */
40
- export type CharacterCurrencyCode1 = string;
41
- /**
42
- * Whether the return shipment got triggered manually. Is missing in case there is no return shipment.
43
- */
44
- export type TheReturnShipmentHasBeenTriggeredByCCI = boolean;
45
- export type UniqueIdentifierOfTheItem = string;
46
1
  /**
47
2
  * Items are grouped by package, depending on the item's supplier configuration. The `packageId` references an entry in the packages list with delivery estimates and expected carrier.
48
3
  */
49
4
  export type PackageReference = number;
50
- export type ThisFieldRepresentsTheDiscountAmountIncludingTheTaxes1 = number;
51
- export type AbsoluteValueOfTheAppliedTax1 = number;
52
- export type RelativeValueOfTheAppliedTax = number;
53
- export type UndiscountedItemPriceExcludingTaxes = number;
54
- export type UndiscountedItemPriceIncludingTaxes = number;
55
- /**
56
- * This price excludes taxes, but also includes all applicable reductions.
57
- */
58
- export type ItemPriceExcludingTaxes1 = number;
59
- /**
60
- * The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provdided on the request).
61
- */
62
- export type ItemPriceIncludingTaxes1 = number;
63
- /**
64
- * the warehouse id where the item are being picking from.
65
- */
66
- export type PickingWarehouseId = null | number;
67
- /**
68
- * The package identification inside of the warehouse.
69
- */
70
- export type WarehousePackageReference = null | number;
71
- export type TimestampOfItemCreation = string;
72
- export type TimestampOfLastItemUpdate = string;
73
- /**
74
- * Basket and order items are matched to a package by cross-referencing the `item[].packageId`.
75
- */
76
- export type ReferenceByWhichThePackageIsIdentified = number;
77
- export type CarrierShippingTheItem = string;
78
- export type LatestExpectedDeliveryDate = string;
79
- export type EarliestExpectedDeliveryDate = string;
80
- export type ReturnIdentCodeOfTheItem = null | string;
81
- export type ShipmentKeyOfTheItem = string;
82
5
  /**
83
6
  * The distribution of items across packages is calculated based on the supplierId. Once shipments are processed, the packages may be updated to reflect the actual shipments.
84
7
  */
85
8
  export type ListOfPackages = {
86
- id: ReferenceByWhichThePackageIsIdentified;
87
- carrierKey: CarrierShippingTheItem;
9
+ /**
10
+ * Basket and order items are matched to a package by cross-referencing the `item[].packageId`.
11
+ */
12
+ id: number;
13
+ carrierKey: string;
88
14
  /**
89
15
  * The delivery dates are calculated based on the hour-to-hour estimates configured per supplier in the cloud panel. Once the order has been confirmed and shipments have been received, the calculation is based on the warehouse cut-off times and transport duration. If the carrier provides a delivery estimate, this is applied.
90
16
  */
91
17
  deliveryDate: {
92
- maximum: LatestExpectedDeliveryDate;
93
- minimum: EarliestExpectedDeliveryDate;
18
+ maximum: string;
19
+ minimum: string;
94
20
  };
95
21
  deliveryStatus: 'open' | 'shipment_pending' | 'delegation_pending' | 'shipment_completed' | 'cancellation_completed';
96
- returnIdentCode?: ReturnIdentCodeOfTheItem;
97
- shipmentKey?: ShipmentKeyOfTheItem;
22
+ returnIdentCode?: null | string;
23
+ shipmentKey?: string;
98
24
  tracking?: {
99
25
  id?: string;
100
26
  url?: string;
101
27
  };
102
28
  }[];
103
- export type WhetherThePaymentMethodIsAGiftCard = boolean;
104
- export type NumberOfInstallmentsChosenByTheCustomerForTheOrder = number;
105
- export type IfTrueTheCustomerElectedToHaveADelayInPaymentCapture = boolean;
106
- export type TimestampOfOrderCreation = string;
107
- export type TimestampOfLastOrderUpdate = string;
108
- export interface ThisFieldHoldsDetailsAboutTheIncludedVATTax {
109
- amount: TheIncludedVATAmount;
110
- rate: TheIncludedVATRateInPercentAsIntegerRepresentation;
111
- }
112
29
  /**
113
- * When an item cannot be shipped within the regular delivery timeframe, and the warehouse is already aware of this, prior to the customer placing the order (ie it is not an unintentionally delayed delivery). This is generally the case when the item is out of stock and: the warehouse is waiting for incoming returns to restock the item, the warehouse has ordered fresh stocks from the supplier/manufacturer and is waiting for these to be shipped to the warehouse.
30
+ * When an item cannot be shipped within the regular delivery timeframe,
31
+ * and the warehouse is already aware of this, prior to the customer placing the
32
+ * order (ie it is not an unintentionally delayed delivery).
33
+ * This is generally the case when the item is out of stock and:
34
+ * the warehouse is waiting for incoming returns to restock the item,
35
+ * the warehouse has ordered fresh stocks from the supplier/manufacturer and is
36
+ * waiting for these to be shipped to the warehouse.
114
37
  */
115
38
  export interface DeliveryForecastFromWarehouse {
116
39
  deliverable?: {
@@ -122,123 +45,68 @@ export interface DeliveryForecastFromWarehouse {
122
45
  [k: string]: unknown;
123
46
  };
124
47
  }
48
+ export type OrderAddressRecipientGender = 'm' | 'f' | 'd';
49
+ export type OrderAddressRecipientType = 'personal' | 'retail' | 'organization' | 'family';
50
+ export interface OrderAddress {
51
+ id: number;
52
+ additional?: string;
53
+ city: string;
54
+ collectionPoint?: {
55
+ customerKey?: string;
56
+ description?: string;
57
+ key: string;
58
+ type: string;
59
+ };
60
+ countryCode: string;
61
+ houseNumber?: string;
62
+ isBillingAddress?: boolean;
63
+ isDefault: {
64
+ billing: boolean;
65
+ shipping: boolean;
66
+ };
67
+ isShippingAddress?: boolean;
68
+ recipient: {
69
+ firstName?: string;
70
+ gender?: OrderAddressRecipientGender;
71
+ lastName: string;
72
+ title?: string | null;
73
+ type: OrderAddressRecipientType;
74
+ };
75
+ referenceKey?: string;
76
+ street: string;
77
+ zipCode: string;
78
+ createdAt: string;
79
+ updatedAt: string;
80
+ state?: string;
81
+ }
82
+ export interface OrderForwardAddress {
83
+ additional?: string;
84
+ city?: string;
85
+ collectionPoint?: {
86
+ customerKey?: string;
87
+ description?: string;
88
+ key?: string;
89
+ type?: string;
90
+ };
91
+ countryCode?: string;
92
+ houseNumber?: string;
93
+ recipient?: {
94
+ firstName?: string;
95
+ gender?: OrderAddressRecipientGender;
96
+ lastName?: string;
97
+ title?: string | null;
98
+ type?: OrderAddressRecipientType;
99
+ };
100
+ }
125
101
  export interface Order {
126
102
  /**
127
- * This `id` can be applied as a parameter on the url to retrieve an individual order in the [Fetch Order by ID](#fetch-order-by-id) endpoint.
103
+ * The `id` can be applied as a parameter on the url to retrieve an individual order in the [Fetch Order by ID](#fetch-order-by-id) endpoint.
128
104
  */
129
105
  id: number;
130
106
  address?: {
131
- billing: {
132
- id: number;
133
- /**
134
- * Additional data pertaining to the address, such as `c/o AboutYou`.
135
- */
136
- additional?: string;
137
- city: string;
138
- /**
139
- * A collection point is an alternate shipping address, which will hold the customer's packages until pickup. Examples for collection points are DHL Packstations, DHL Post Offices and Hermes Paketshops.
140
- */
141
- collectionPoint?: {
142
- customerKey?: string;
143
- description?: string;
144
- key: string;
145
- type: ('hermes_parcelshop' | 'dhl_packstation' | 'dhl_postoffice' | 'postsk_postoffice' | 'postsk_parcelbox' | 'gls_postoffice' | 'gls_packstation' | 'gls_parcelshop' | 'post_office' | 'postsi_postoffice' | 'postsi_packstation' | 'omniva_parcel_shop' | 'omniva_packstation' | 'offline-store' | 'fastwayie_packstation' | 'fastwayie_parcelshop' | 'generic' | 'packstation' | 'parcel_shop' | 'posteitaliane_packstation' | 'posteitaliane_parcelshop' | 'postifi_packstation' | 'postifi_parcelshop' | 'zasilcz_parcelshop' | 'zasilcz_packstation' | 'reba_packstation' | 'reba_parcel_shop') | string;
146
- };
147
- countryCode: string;
148
- houseNumber?: string;
149
- isBillingAddress?: boolean;
150
- isDefault: {
151
- billing: boolean;
152
- shipping: boolean;
153
- };
154
- isShippingAddress?: boolean;
155
- recipient: {
156
- firstName?: string;
157
- gender?: 'm' | 'f' | 'd';
158
- lastName: string;
159
- title?: null | string;
160
- type: 'personal' | 'retail' | 'organization' | 'family';
161
- };
162
- /**
163
- * External reference set by the client to integrate a 3rd party system
164
- */
165
- referenceKey?: string;
166
- street: string;
167
- zipCode: string;
168
- createdAt: string;
169
- updatedAt: string;
170
- state?: string;
171
- };
172
- forward?: {
173
- /**
174
- * Additional data pertaining to the address, such as `c/o AboutYou`.
175
- */
176
- additional?: string;
177
- city?: string;
178
- /**
179
- * A collection point is an alternate shipping address, which will hold the customer's packages until pickup. Examples for collection points are DHL Packstations, DHL Post Offices and Hermes Paketshops.
180
- */
181
- collectionPoint?: {
182
- customerKey?: string;
183
- description?: string;
184
- key?: string;
185
- type?: ('hermes_parcelshop' | 'dhl_packstation' | 'dhl_postoffice' | 'postsk_postoffice' | 'postsk_parcelbox' | 'gls_postoffice' | 'gls_packstation' | 'gls_parcelshop' | 'post_office' | 'postsi_postoffice' | 'postsi_packstation' | 'omniva_parcel_shop' | 'omniva_packstation' | 'offline-store' | 'fastwayie_packstation' | 'fastwayie_parcelshop' | 'generic' | 'packstation' | 'parcel_shop' | 'posteitaliane_packstation' | 'posteitaliane_parcelshop' | 'postifi_packstation' | 'postifi_parcelshop' | 'zasilcz_parcelshop' | 'zasilcz_packstation' | 'reba_packstation' | 'reba_parcel_shop') | string;
186
- };
187
- countryCode?: string;
188
- houseNumber?: string;
189
- recipient?: {
190
- firstName?: string;
191
- gender?: 'm' | 'f' | 'd';
192
- lastName?: string;
193
- title?: null | string;
194
- type?: 'personal' | 'retail' | 'organization' | 'family';
195
- };
196
- street?: string;
197
- zipCode?: string;
198
- createdAt?: string;
199
- updatedAt?: string;
200
- };
201
- shipping: {
202
- id: number;
203
- /**
204
- * Additional data pertaining to the address, such as `c/o AboutYou`.
205
- */
206
- additional?: string;
207
- city: string;
208
- /**
209
- * A collection point is an alternate shipping address, which will hold the customer's packages until pickup. Examples for collection points are DHL Packstations, DHL Post Offices and Hermes Paketshops.
210
- */
211
- collectionPoint?: {
212
- customerKey?: string;
213
- description?: string;
214
- key: string;
215
- type: ('hermes_parcelshop' | 'dhl_packstation' | 'dhl_postoffice' | 'postsk_postoffice' | 'postsk_parcelbox' | 'gls_postoffice' | 'gls_packstation' | 'gls_parcelshop' | 'post_office' | 'postsi_postoffice' | 'postsi_packstation' | 'omniva_parcel_shop' | 'omniva_packstation' | 'offline-store' | 'fastwayie_packstation' | 'fastwayie_parcelshop' | 'generic' | 'packstation' | 'parcel_shop' | 'posteitaliane_packstation' | 'posteitaliane_parcelshop' | 'postifi_packstation' | 'postifi_parcelshop' | 'zasilcz_parcelshop' | 'zasilcz_packstation' | 'reba_packstation' | 'reba_parcel_shop') | string;
216
- };
217
- countryCode: string;
218
- houseNumber?: string;
219
- isBillingAddress?: boolean;
220
- isDefault: {
221
- billing: boolean;
222
- shipping: boolean;
223
- };
224
- isShippingAddress?: boolean;
225
- recipient: {
226
- firstName?: string;
227
- gender?: 'm' | 'f' | 'd';
228
- lastName: string;
229
- title?: null | string;
230
- type: 'personal' | 'retail' | 'organization' | 'family';
231
- };
232
- /**
233
- * External reference set by the client to integrate a 3rd party system
234
- */
235
- referenceKey?: string;
236
- street: string;
237
- zipCode: string;
238
- createdAt: string;
239
- updatedAt: string;
240
- state?: string;
241
- };
107
+ billing: OrderAddress;
108
+ forward?: OrderForwardAddress;
109
+ shipping: OrderAddress;
242
110
  };
243
111
  /**
244
112
  * Reference to the basket attached to this order
@@ -248,7 +116,7 @@ export interface Order {
248
116
  * Reference to the campaign applied to this order
249
117
  */
250
118
  campaignKey?: string;
251
- confirmedAt?: TimestampOfOrderConfirmation;
119
+ confirmedAt?: string;
252
120
  contacts?: {
253
121
  type?: string;
254
122
  value?: string;
@@ -262,14 +130,17 @@ export interface Order {
262
130
  */
263
131
  appliedFees?: {
264
132
  amount: {
265
- withoutTax: ThisFieldRepresentsTheAdditionalFeesExcludingTheTaxes;
266
- withTax: ThisFieldRepresentsTheAdditionalFeesIncludingTheTaxes;
133
+ withoutTax: number;
134
+ withTax: number;
267
135
  };
268
136
  category: 'payment' | 'delivery' | 'percentage_payment' | 'return';
269
137
  key: string;
270
138
  option?: string;
271
139
  tax?: {
272
- vat: ThisFieldHoldsDetailsAboutTheIncludedVATTax;
140
+ vat: {
141
+ amount: number;
142
+ rate: number;
143
+ };
273
144
  };
274
145
  }[];
275
146
  /**
@@ -277,7 +148,7 @@ export interface Order {
277
148
  */
278
149
  appliedReductions?: {
279
150
  amount: {
280
- absoluteWithTax: ThisFieldRepresentsTheDiscountAmountIncludingTheTaxes;
151
+ absoluteWithTax: number;
281
152
  /**
282
153
  * The `rate` is calculated on the basis of the reduction in relation to the `preDiscountPrice` price.
283
154
  */
@@ -308,13 +179,19 @@ export interface Order {
308
179
  * List of all taxes applied in calculating the `price.withTax`
309
180
  */
310
181
  vat?: {
311
- amount: AbsoluteValueOfTheAppliedTax;
182
+ amount: number;
312
183
  };
313
184
  };
314
- withoutTax: ItemPriceExcludingTaxes;
315
- withTax: ItemPriceIncludingTaxes;
185
+ /**
186
+ * This price excludes taxes, but also includes all applicable reductions.
187
+ */
188
+ withoutTax: number;
189
+ /**
190
+ * The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provdided on the request).
191
+ */
192
+ withTax: number;
316
193
  };
317
- currencyCode: CharacterCurrencyCode;
194
+ currencyCode: string;
318
195
  customData?: {
319
196
  score?: {
320
197
  [k: string]: unknown;
@@ -368,27 +245,33 @@ export interface Order {
368
245
  };
369
246
  detailedStatus: {
370
247
  billing: {
371
- code: UniqueIdentifierOfTheState;
372
- name: NameOfTheState;
248
+ code: string;
249
+ name: string;
373
250
  [k: string]: unknown;
374
251
  };
375
252
  order: {
376
- code: UniqueIdentifierOfTheState1;
377
- name: NameOfTheState1;
253
+ code: string;
254
+ name: string;
378
255
  [k: string]: unknown;
379
256
  };
380
257
  shipping: {
381
- code: UniqueIdentifierOfTheState2;
382
- name: NameOfTheState2;
258
+ code: string;
259
+ name: string;
383
260
  [k: string]: unknown;
384
261
  };
385
262
  [k: string]: unknown;
386
263
  };
387
- invoicedAt?: TimestampOfOrderInvoice;
264
+ invoicedAt?: string;
388
265
  items?: {
389
- id?: UniqueNumericIdentifierOfTheItem;
390
- availableQuantity?: AvailableQuantityInTheWarehouse;
391
- currency?: CharacterCurrencyCode1;
266
+ id?: string;
267
+ /**
268
+ * The number of deliverable items available in the warehouse for immediate shipping.
269
+ */
270
+ availableQuantity?: number;
271
+ /**
272
+ * The three character [ISO-4217](https://en.wikipedia.org/wiki/ISO_4217#Active_codes) currency code that identifies the currency. The currency is defined on the configuration of the shop, and can be modified in the cloud panel.
273
+ */
274
+ currency?: string;
392
275
  /**
393
276
  * customData allows the tenant to attach data to an item. The data will remain attached to the item from the basket through the process of order creation and delegation and may be displayed to the customer during the order lifecycle.
394
277
  */
@@ -396,7 +279,10 @@ export interface Order {
396
279
  [k: string]: unknown;
397
280
  };
398
281
  deliveryForecast?: DeliveryForecastFromWarehouse;
399
- isManuallyReturnedByCci?: TheReturnShipmentHasBeenTriggeredByCCI;
282
+ /**
283
+ * Whether the return shipment got triggered manually. Is missing in case there is no return shipment.
284
+ */
285
+ isManuallyReturnedByCci?: boolean;
400
286
  itemGroup?: null | {
401
287
  /**
402
288
  * Item group ID
@@ -411,7 +297,7 @@ export interface Order {
411
297
  */
412
298
  isRequired: boolean;
413
299
  };
414
- key: UniqueIdentifierOfTheItem;
300
+ key: string;
415
301
  lowestPriorPrice?: null | {
416
302
  /**
417
303
  * Difference to the current price
@@ -439,7 +325,7 @@ export interface Order {
439
325
  */
440
326
  appliedReductions?: {
441
327
  amount: {
442
- absoluteWithTax: ThisFieldRepresentsTheDiscountAmountIncludingTheTaxes1;
328
+ absoluteWithTax: number;
443
329
  /**
444
330
  * The `rate` is calculated on the basis of the reduction in relation to the `preDiscountPrice` price.
445
331
  */
@@ -461,14 +347,20 @@ export interface Order {
461
347
  */
462
348
  tax: {
463
349
  [k: string]: {
464
- amount: AbsoluteValueOfTheAppliedTax1;
465
- rate: RelativeValueOfTheAppliedTax;
350
+ amount: number;
351
+ rate: number;
466
352
  };
467
353
  };
468
- undiscountedWithOutTax?: UndiscountedItemPriceExcludingTaxes;
469
- undiscountedWithTax?: UndiscountedItemPriceIncludingTaxes;
470
- withoutTax: ItemPriceExcludingTaxes1;
471
- withTax: ItemPriceIncludingTaxes1;
354
+ undiscountedWithOutTax?: number;
355
+ undiscountedWithTax?: number;
356
+ /**
357
+ * This price excludes taxes, but also includes all applicable reductions.
358
+ */
359
+ withoutTax: number;
360
+ /**
361
+ * The price is calculated including taxes and all applicable reductions such as discounts for sale and campaigns (should a campaign key be provided on the request).
362
+ */
363
+ withTax: number;
472
364
  };
473
365
  product: {
474
366
  [k: string]: unknown;
@@ -481,10 +373,13 @@ export interface Order {
481
373
  variant: {
482
374
  [k: string]: unknown;
483
375
  };
484
- warehouseId?: PickingWarehouseId;
485
- warehousePackageGroupId?: WarehousePackageReference;
486
- createdAt: TimestampOfItemCreation;
487
- updatedAt: TimestampOfLastItemUpdate;
376
+ /**
377
+ * The warehouse id where the item are being picking from.
378
+ */
379
+ warehouseId?: null | number;
380
+ warehousePackageGroupId?: null | number;
381
+ createdAt: string;
382
+ updatedAt: string;
488
383
  }[];
489
384
  loyaltyCard?: {
490
385
  cardNumber?: string;
@@ -507,11 +402,11 @@ export interface Order {
507
402
  amount?: number;
508
403
  type?: 'annualInterest' | 'firstInstallment' | 'subsequentInstallments';
509
404
  }[];
510
- isGiftCard?: WhetherThePaymentMethodIsAGiftCard;
405
+ isGiftCard?: boolean;
511
406
  key?: string;
512
407
  options?: {
513
- countOfInstallments?: NumberOfInstallmentsChosenByTheCustomerForTheOrder;
514
- hasPaybreak?: IfTrueTheCustomerElectedToHaveADelayInPaymentCapture;
408
+ countOfInstallments?: number;
409
+ hasPaybreak?: boolean;
515
410
  };
516
411
  transactionKey?: string;
517
412
  }[];
@@ -551,6 +446,6 @@ export interface Order {
551
446
  type: 'absolute' | 'relative';
552
447
  value: number;
553
448
  }[];
554
- createdAt: TimestampOfOrderCreation;
555
- updatedAt: TimestampOfLastOrderUpdate;
449
+ createdAt: string;
450
+ updatedAt: string;
556
451
  }