@revenexx/sdk 0.0.2 → 0.0.5

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 (90) hide show
  1. package/dist/cjs/sdk.js +13496 -3442
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +13467 -3443
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +13496 -3442
  6. package/package.json +1 -1
  7. package/src/client.ts +1 -1
  8. package/src/enums/address-type.ts +4 -0
  9. package/src/enums/cart-export-format.ts +4 -0
  10. package/src/enums/cart-io-apply-mode.ts +5 -0
  11. package/src/enums/cart-io-direction.ts +4 -0
  12. package/src/enums/cart-io-entity.ts +4 -0
  13. package/src/enums/cart-io-format.ts +4 -0
  14. package/src/enums/cart-item-type.ts +5 -0
  15. package/src/enums/channel-status.ts +4 -0
  16. package/src/enums/channel-type.ts +7 -0
  17. package/src/enums/contact-role.ts +6 -0
  18. package/src/enums/contact-status.ts +5 -0
  19. package/src/enums/location-type.ts +6 -0
  20. package/src/enums/market-status.ts +4 -0
  21. package/src/enums/order-comment-visibility.ts +4 -0
  22. package/src/enums/order-item-type.ts +5 -0
  23. package/src/enums/order-payment-status.ts +9 -0
  24. package/src/enums/organization-status.ts +4 -0
  25. package/src/enums/page-status.ts +5 -0
  26. package/src/enums/payment-fee-type.ts +5 -0
  27. package/src/enums/payment-method-kind.ts +4 -0
  28. package/src/enums/price-entry-type.ts +4 -0
  29. package/src/enums/price-list-status.ts +4 -0
  30. package/src/enums/shipping-method-matrix-basis.ts +6 -0
  31. package/src/enums/shipping-method-pricing-type.ts +5 -0
  32. package/src/index.ts +30 -0
  33. package/src/models.ts +5628 -410
  34. package/src/services/apps.ts +154 -154
  35. package/src/services/avatars.ts +57 -57
  36. package/src/services/carts.ts +739 -104
  37. package/src/services/channels.ts +147 -19
  38. package/src/services/customers.ts +801 -69
  39. package/src/services/greetings.ts +18 -18
  40. package/src/services/inventories.ts +1278 -0
  41. package/src/services/locale.ts +16 -16
  42. package/src/services/markets.ts +373 -75
  43. package/src/services/messaging.ts +273 -273
  44. package/src/services/orders.ts +1648 -0
  45. package/src/services/pages.ts +2317 -0
  46. package/src/services/payments.ts +1334 -0
  47. package/src/services/prices.ts +1036 -0
  48. package/src/services/products.ts +1836 -272
  49. package/src/services/search.ts +24 -24
  50. package/src/services/shipping.ts +956 -0
  51. package/src/services/sites.ts +116 -116
  52. package/src/services/storage.ts +72 -72
  53. package/src/services/tokens.ts +14 -14
  54. package/types/enums/address-type.d.ts +4 -0
  55. package/types/enums/cart-export-format.d.ts +4 -0
  56. package/types/enums/cart-io-apply-mode.d.ts +5 -0
  57. package/types/enums/cart-io-direction.d.ts +4 -0
  58. package/types/enums/cart-io-entity.d.ts +4 -0
  59. package/types/enums/cart-io-format.d.ts +4 -0
  60. package/types/enums/cart-item-type.d.ts +5 -0
  61. package/types/enums/channel-status.d.ts +4 -0
  62. package/types/enums/channel-type.d.ts +7 -0
  63. package/types/enums/contact-role.d.ts +6 -0
  64. package/types/enums/contact-status.d.ts +5 -0
  65. package/types/enums/location-type.d.ts +6 -0
  66. package/types/enums/market-status.d.ts +4 -0
  67. package/types/enums/order-comment-visibility.d.ts +4 -0
  68. package/types/enums/order-item-type.d.ts +5 -0
  69. package/types/enums/order-payment-status.d.ts +9 -0
  70. package/types/enums/organization-status.d.ts +4 -0
  71. package/types/enums/page-status.d.ts +5 -0
  72. package/types/enums/payment-fee-type.d.ts +5 -0
  73. package/types/enums/payment-method-kind.d.ts +4 -0
  74. package/types/enums/price-entry-type.d.ts +4 -0
  75. package/types/enums/price-list-status.d.ts +4 -0
  76. package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
  77. package/types/enums/shipping-method-pricing-type.d.ts +5 -0
  78. package/types/index.d.ts +30 -0
  79. package/types/models.d.ts +5470 -404
  80. package/types/services/carts.d.ts +271 -12
  81. package/types/services/channels.d.ts +54 -2
  82. package/types/services/customers.d.ts +295 -12
  83. package/types/services/inventories.d.ts +440 -0
  84. package/types/services/markets.d.ts +123 -6
  85. package/types/services/orders.d.ts +590 -0
  86. package/types/services/pages.d.ts +792 -0
  87. package/types/services/payments.d.ts +480 -0
  88. package/types/services/prices.d.ts +384 -0
  89. package/types/services/products.d.ts +646 -32
  90. package/types/services/shipping.d.ts +351 -0
@@ -0,0 +1,351 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { ShippingMethodMatrixBasis } from '../enums/shipping-method-matrix-basis';
4
+ import { ShippingMethodPricingType } from '../enums/shipping-method-pricing-type';
5
+ export declare class Shipping {
6
+ client: Client;
7
+ constructor(client: Client);
8
+ /**
9
+ *
10
+ * @throws {RevenexxException}
11
+ * @returns {Promise<{}>}
12
+ */
13
+ shippingMethodsList(): Promise<{}>;
14
+ /**
15
+ *
16
+ * @param {string} params.code - Stable method code, unique per tenant (e.g. standard, express).
17
+ * @param {string} params.name - Display name.
18
+ * @param {string} params.carrier - Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).
19
+ * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.
20
+ * @param {string} params.currency - ISO 4217 code (default EUR).
21
+ * @param {string} params.description -
22
+ * @param {boolean} params.enabled - Only enabled methods appear in rate responses (default false).
23
+ * @param {number} params.etaDaysMax - Delivery-time estimate for the checkout (days, upper bound).
24
+ * @param {number} params.etaDaysMin - Delivery-time estimate for the checkout (days, lower bound).
25
+ * @param {number} params.freeAbove - Free shipping at or above this order value — wins over every pricing model.
26
+ * @param {object} params.labels - Localized display names keyed by locale (e.g. {de, en}).
27
+ * @param {string} params.matrixAttribute - Attribute name for matrix_basis 'attribute'.
28
+ * @param {ShippingMethodMatrixBasis} params.matrixBasis - The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.
29
+ * @param {object} params.metadata - Free-form metadata.
30
+ * @param {number} params.position - Sort order in the checkout (default 0).
31
+ * @param {number} params.price - The fixed price (default 0) — ignored for 'free' and 'matrix'.
32
+ * @param {ShippingMethodPricingType} params.pricingType - Pricing model (default 'fixed'): one price, no price, or tiered over a measure.
33
+ * @throws {RevenexxException}
34
+ * @returns {Promise<Models.ShippingMethod>}
35
+ */
36
+ shippingMethodsCreate(params: {
37
+ code: string;
38
+ name: string;
39
+ carrier?: string;
40
+ countries?: string[];
41
+ currency?: string;
42
+ description?: string;
43
+ enabled?: boolean;
44
+ etaDaysMax?: number;
45
+ etaDaysMin?: number;
46
+ freeAbove?: number;
47
+ labels?: object;
48
+ matrixAttribute?: string;
49
+ matrixBasis?: ShippingMethodMatrixBasis;
50
+ metadata?: object;
51
+ position?: number;
52
+ price?: number;
53
+ pricingType?: ShippingMethodPricingType;
54
+ }): Promise<Models.ShippingMethod>;
55
+ /**
56
+ *
57
+ * @param {string} code - Stable method code, unique per tenant (e.g. standard, express).
58
+ * @param {string} name - Display name.
59
+ * @param {string} carrier - Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).
60
+ * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.
61
+ * @param {string} currency - ISO 4217 code (default EUR).
62
+ * @param {string} description -
63
+ * @param {boolean} enabled - Only enabled methods appear in rate responses (default false).
64
+ * @param {number} etaDaysMax - Delivery-time estimate for the checkout (days, upper bound).
65
+ * @param {number} etaDaysMin - Delivery-time estimate for the checkout (days, lower bound).
66
+ * @param {number} freeAbove - Free shipping at or above this order value — wins over every pricing model.
67
+ * @param {object} labels - Localized display names keyed by locale (e.g. {de, en}).
68
+ * @param {string} matrixAttribute - Attribute name for matrix_basis 'attribute'.
69
+ * @param {ShippingMethodMatrixBasis} matrixBasis - The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.
70
+ * @param {object} metadata - Free-form metadata.
71
+ * @param {number} position - Sort order in the checkout (default 0).
72
+ * @param {number} price - The fixed price (default 0) — ignored for 'free' and 'matrix'.
73
+ * @param {ShippingMethodPricingType} pricingType - Pricing model (default 'fixed'): one price, no price, or tiered over a measure.
74
+ * @throws {RevenexxException}
75
+ * @returns {Promise<Models.ShippingMethod>}
76
+ * @deprecated Use the object parameter style method for a better developer experience.
77
+ */
78
+ shippingMethodsCreate(code: string, name: string, carrier?: string, countries?: string[], currency?: string, description?: string, enabled?: boolean, etaDaysMax?: number, etaDaysMin?: number, freeAbove?: number, labels?: object, matrixAttribute?: string, matrixBasis?: ShippingMethodMatrixBasis, metadata?: object, position?: number, price?: number, pricingType?: ShippingMethodPricingType): Promise<Models.ShippingMethod>;
79
+ /**
80
+ *
81
+ * @throws {RevenexxException}
82
+ * @returns {Promise<{}>}
83
+ */
84
+ shippingMethodsDefaults(): Promise<{}>;
85
+ /**
86
+ *
87
+ * @param {string} params.id -
88
+ * @throws {RevenexxException}
89
+ * @returns {Promise<{}>}
90
+ */
91
+ shippingMethodsDelete(params: {
92
+ id: string;
93
+ }): Promise<{}>;
94
+ /**
95
+ *
96
+ * @param {string} id -
97
+ * @throws {RevenexxException}
98
+ * @returns {Promise<{}>}
99
+ * @deprecated Use the object parameter style method for a better developer experience.
100
+ */
101
+ shippingMethodsDelete(id: string): Promise<{}>;
102
+ /**
103
+ *
104
+ * @param {string} params.id -
105
+ * @throws {RevenexxException}
106
+ * @returns {Promise<Models.ShippingMethod>}
107
+ */
108
+ shippingMethodsGet(params: {
109
+ id: string;
110
+ }): Promise<Models.ShippingMethod>;
111
+ /**
112
+ *
113
+ * @param {string} id -
114
+ * @throws {RevenexxException}
115
+ * @returns {Promise<Models.ShippingMethod>}
116
+ * @deprecated Use the object parameter style method for a better developer experience.
117
+ */
118
+ shippingMethodsGet(id: string): Promise<Models.ShippingMethod>;
119
+ /**
120
+ *
121
+ * @param {string} params.id -
122
+ * @param {string} params.carrier - Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).
123
+ * @param {string} params.code - Stable method code, unique per tenant (e.g. standard, express).
124
+ * @param {string[]} params.countries - Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.
125
+ * @param {string} params.currency - ISO 4217 code (default EUR).
126
+ * @param {string} params.description -
127
+ * @param {boolean} params.enabled - Only enabled methods appear in rate responses (default false).
128
+ * @param {number} params.etaDaysMax - Delivery-time estimate for the checkout (days, upper bound).
129
+ * @param {number} params.etaDaysMin - Delivery-time estimate for the checkout (days, lower bound).
130
+ * @param {number} params.freeAbove - Free shipping at or above this order value — wins over every pricing model.
131
+ * @param {object} params.labels - Localized display names keyed by locale (e.g. {de, en}).
132
+ * @param {string} params.matrixAttribute - Attribute name for matrix_basis 'attribute'.
133
+ * @param {ShippingMethodMatrixBasis} params.matrixBasis - The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.
134
+ * @param {object} params.metadata - Free-form metadata.
135
+ * @param {string} params.name - Display name.
136
+ * @param {number} params.position - Sort order in the checkout (default 0).
137
+ * @param {number} params.price - The fixed price (default 0) — ignored for 'free' and 'matrix'.
138
+ * @param {ShippingMethodPricingType} params.pricingType - Pricing model (default 'fixed'): one price, no price, or tiered over a measure.
139
+ * @throws {RevenexxException}
140
+ * @returns {Promise<Models.ShippingMethod>}
141
+ */
142
+ shippingMethodsUpdate(params: {
143
+ id: string;
144
+ carrier?: string;
145
+ code?: string;
146
+ countries?: string[];
147
+ currency?: string;
148
+ description?: string;
149
+ enabled?: boolean;
150
+ etaDaysMax?: number;
151
+ etaDaysMin?: number;
152
+ freeAbove?: number;
153
+ labels?: object;
154
+ matrixAttribute?: string;
155
+ matrixBasis?: ShippingMethodMatrixBasis;
156
+ metadata?: object;
157
+ name?: string;
158
+ position?: number;
159
+ price?: number;
160
+ pricingType?: ShippingMethodPricingType;
161
+ }): Promise<Models.ShippingMethod>;
162
+ /**
163
+ *
164
+ * @param {string} id -
165
+ * @param {string} carrier - Carrier anchor for the upcoming carrier connect (dynamic rates, tracking links).
166
+ * @param {string} code - Stable method code, unique per tenant (e.g. standard, express).
167
+ * @param {string[]} countries - Allowed ISO 3166-1 alpha-2 codes; null or empty = worldwide.
168
+ * @param {string} currency - ISO 4217 code (default EUR).
169
+ * @param {string} description -
170
+ * @param {boolean} enabled - Only enabled methods appear in rate responses (default false).
171
+ * @param {number} etaDaysMax - Delivery-time estimate for the checkout (days, upper bound).
172
+ * @param {number} etaDaysMin - Delivery-time estimate for the checkout (days, lower bound).
173
+ * @param {number} freeAbove - Free shipping at or above this order value — wins over every pricing model.
174
+ * @param {object} labels - Localized display names keyed by locale (e.g. {de, en}).
175
+ * @param {string} matrixAttribute - Attribute name for matrix_basis 'attribute'.
176
+ * @param {ShippingMethodMatrixBasis} matrixBasis - The measure a matrix method prices over; 'attribute' reads matrix_attribute from the rate request.
177
+ * @param {object} metadata - Free-form metadata.
178
+ * @param {string} name - Display name.
179
+ * @param {number} position - Sort order in the checkout (default 0).
180
+ * @param {number} price - The fixed price (default 0) — ignored for 'free' and 'matrix'.
181
+ * @param {ShippingMethodPricingType} pricingType - Pricing model (default 'fixed'): one price, no price, or tiered over a measure.
182
+ * @throws {RevenexxException}
183
+ * @returns {Promise<Models.ShippingMethod>}
184
+ * @deprecated Use the object parameter style method for a better developer experience.
185
+ */
186
+ shippingMethodsUpdate(id: string, carrier?: string, code?: string, countries?: string[], currency?: string, description?: string, enabled?: boolean, etaDaysMax?: number, etaDaysMin?: number, freeAbove?: number, labels?: object, matrixAttribute?: string, matrixBasis?: ShippingMethodMatrixBasis, metadata?: object, name?: string, position?: number, price?: number, pricingType?: ShippingMethodPricingType): Promise<Models.ShippingMethod>;
187
+ /**
188
+ *
189
+ * @param {string} params.methodId -
190
+ * @throws {RevenexxException}
191
+ * @returns {Promise<{}>}
192
+ */
193
+ shippingTiersList(params: {
194
+ methodId: string;
195
+ }): Promise<{}>;
196
+ /**
197
+ *
198
+ * @param {string} methodId -
199
+ * @throws {RevenexxException}
200
+ * @returns {Promise<{}>}
201
+ * @deprecated Use the object parameter style method for a better developer experience.
202
+ */
203
+ shippingTiersList(methodId: string): Promise<{}>;
204
+ /**
205
+ *
206
+ * @param {string} params.methodId -
207
+ * @param {number} params.fromValue - Tier threshold (default 0) — the tier with the highest from_value at or below the measured value wins.
208
+ * @param {number} params.position - Sort order (default 0; bulk replace derives it from the array index).
209
+ * @param {number} params.price - Price of this tier (default 0).
210
+ * @throws {RevenexxException}
211
+ * @returns {Promise<Models.ShippingRateTier>}
212
+ */
213
+ shippingTiersCreate(params: {
214
+ methodId: string;
215
+ fromValue?: number;
216
+ position?: number;
217
+ price?: number;
218
+ }): Promise<Models.ShippingRateTier>;
219
+ /**
220
+ *
221
+ * @param {string} methodId -
222
+ * @param {number} fromValue - Tier threshold (default 0) — the tier with the highest from_value at or below the measured value wins.
223
+ * @param {number} position - Sort order (default 0; bulk replace derives it from the array index).
224
+ * @param {number} price - Price of this tier (default 0).
225
+ * @throws {RevenexxException}
226
+ * @returns {Promise<Models.ShippingRateTier>}
227
+ * @deprecated Use the object parameter style method for a better developer experience.
228
+ */
229
+ shippingTiersCreate(methodId: string, fromValue?: number, position?: number, price?: number): Promise<Models.ShippingRateTier>;
230
+ /**
231
+ *
232
+ * @param {string} params.methodId -
233
+ * @param {Models.ShippingRateTierCreateRequest[]} params.tiers - The complete new tier set (set semantics) — positions are derived from the array order.
234
+ * @throws {RevenexxException}
235
+ * @returns {Promise<{}>}
236
+ */
237
+ shippingTiersReplace(params: {
238
+ methodId: string;
239
+ tiers: Models.ShippingRateTierCreateRequest[];
240
+ }): Promise<{}>;
241
+ /**
242
+ *
243
+ * @param {string} methodId -
244
+ * @param {Models.ShippingRateTierCreateRequest[]} tiers - The complete new tier set (set semantics) — positions are derived from the array order.
245
+ * @throws {RevenexxException}
246
+ * @returns {Promise<{}>}
247
+ * @deprecated Use the object parameter style method for a better developer experience.
248
+ */
249
+ shippingTiersReplace(methodId: string, tiers: Models.ShippingRateTierCreateRequest[]): Promise<{}>;
250
+ /**
251
+ *
252
+ * @param {string} params.methodId -
253
+ * @param {string} params.id -
254
+ * @throws {RevenexxException}
255
+ * @returns {Promise<{}>}
256
+ */
257
+ shippingTiersDelete(params: {
258
+ methodId: string;
259
+ id: string;
260
+ }): Promise<{}>;
261
+ /**
262
+ *
263
+ * @param {string} methodId -
264
+ * @param {string} id -
265
+ * @throws {RevenexxException}
266
+ * @returns {Promise<{}>}
267
+ * @deprecated Use the object parameter style method for a better developer experience.
268
+ */
269
+ shippingTiersDelete(methodId: string, id: string): Promise<{}>;
270
+ /**
271
+ *
272
+ * @param {string} params.methodId -
273
+ * @param {string} params.id -
274
+ * @throws {RevenexxException}
275
+ * @returns {Promise<Models.ShippingRateTier>}
276
+ */
277
+ shippingTiersGet(params: {
278
+ methodId: string;
279
+ id: string;
280
+ }): Promise<Models.ShippingRateTier>;
281
+ /**
282
+ *
283
+ * @param {string} methodId -
284
+ * @param {string} id -
285
+ * @throws {RevenexxException}
286
+ * @returns {Promise<Models.ShippingRateTier>}
287
+ * @deprecated Use the object parameter style method for a better developer experience.
288
+ */
289
+ shippingTiersGet(methodId: string, id: string): Promise<Models.ShippingRateTier>;
290
+ /**
291
+ *
292
+ * @param {string} params.methodId -
293
+ * @param {string} params.id -
294
+ * @param {number} params.fromValue - Tier threshold (default 0) — the tier with the highest from_value at or below the measured value wins.
295
+ * @param {number} params.position - Sort order (default 0; bulk replace derives it from the array index).
296
+ * @param {number} params.price - Price of this tier (default 0).
297
+ * @throws {RevenexxException}
298
+ * @returns {Promise<Models.ShippingRateTier>}
299
+ */
300
+ shippingTiersUpdate(params: {
301
+ methodId: string;
302
+ id: string;
303
+ fromValue?: number;
304
+ position?: number;
305
+ price?: number;
306
+ }): Promise<Models.ShippingRateTier>;
307
+ /**
308
+ *
309
+ * @param {string} methodId -
310
+ * @param {string} id -
311
+ * @param {number} fromValue - Tier threshold (default 0) — the tier with the highest from_value at or below the measured value wins.
312
+ * @param {number} position - Sort order (default 0; bulk replace derives it from the array index).
313
+ * @param {number} price - Price of this tier (default 0).
314
+ * @throws {RevenexxException}
315
+ * @returns {Promise<Models.ShippingRateTier>}
316
+ * @deprecated Use the object parameter style method for a better developer experience.
317
+ */
318
+ shippingTiersUpdate(methodId: string, id: string, fromValue?: number, position?: number, price?: number): Promise<Models.ShippingRateTier>;
319
+ /**
320
+ *
321
+ * @param {object} params.attributes - Measure values for attribute matrices, keyed by attribute name.
322
+ * @param {string} params.country - Destination ISO 3166-1 alpha-2 code — checked against method country restrictions.
323
+ * @param {string} params.currency - Echoed into the rates (default 'EUR').
324
+ * @param {number} params.orderValue - Order value (default 0) — drives free-above thresholds and order_value matrices.
325
+ * @param {number} params.quantity - Total quantity — measure for quantity matrices.
326
+ * @param {number} params.weight - Total weight — measure for weight matrices.
327
+ * @throws {RevenexxException}
328
+ * @returns {Promise<{}>}
329
+ */
330
+ shippingRates(params?: {
331
+ attributes?: object;
332
+ country?: string;
333
+ currency?: string;
334
+ orderValue?: number;
335
+ quantity?: number;
336
+ weight?: number;
337
+ }): Promise<{}>;
338
+ /**
339
+ *
340
+ * @param {object} attributes - Measure values for attribute matrices, keyed by attribute name.
341
+ * @param {string} country - Destination ISO 3166-1 alpha-2 code — checked against method country restrictions.
342
+ * @param {string} currency - Echoed into the rates (default 'EUR').
343
+ * @param {number} orderValue - Order value (default 0) — drives free-above thresholds and order_value matrices.
344
+ * @param {number} quantity - Total quantity — measure for quantity matrices.
345
+ * @param {number} weight - Total weight — measure for weight matrices.
346
+ * @throws {RevenexxException}
347
+ * @returns {Promise<{}>}
348
+ * @deprecated Use the object parameter style method for a better developer experience.
349
+ */
350
+ shippingRates(attributes?: object, country?: string, currency?: string, orderValue?: number, quantity?: number, weight?: number): Promise<{}>;
351
+ }