@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,384 @@
1
+ import { Client } from '../client';
2
+ import type { Models } from '../models';
3
+ import { PriceListStatus } from '../enums/price-list-status';
4
+ import { PriceEntryType } from '../enums/price-entry-type';
5
+ export declare class Prices {
6
+ client: Client;
7
+ constructor(client: Client);
8
+ /**
9
+ *
10
+ * @throws {RevenexxException}
11
+ * @returns {Promise<{}>}
12
+ */
13
+ pricesListsList(): Promise<{}>;
14
+ /**
15
+ *
16
+ * @param {string} params.code - Unique list code per tenant.
17
+ * @param {string} params.name -
18
+ * @param {string} params.channelId - Scope: only this channel.
19
+ * @param {string} params.contactId - Scope: only this contact — beats every other scope.
20
+ * @param {string} params.currency - ISO 4217 code (default EUR) — resolution only considers lists matching the requested currency.
21
+ * @param {string} params.description -
22
+ * @param {boolean} params.isDefault - Default lists resolve last within their group.
23
+ * @param {object} params.labels - Localised names ({de, en, …}).
24
+ * @param {string} params.marketId - Scope: only this market.
25
+ * @param {object} params.metadata - Free-form metadata.
26
+ * @param {string} params.organizationId - Scope: only this organization.
27
+ * @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
28
+ * @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
29
+ * @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
30
+ * @param {string} params.validFrom - Validity window start.
31
+ * @param {string} params.validUntil - Validity window end.
32
+ * @throws {RevenexxException}
33
+ * @returns {Promise<Models.PriceList>}
34
+ */
35
+ pricesListsCreate(params: {
36
+ code: string;
37
+ name: string;
38
+ channelId?: string;
39
+ contactId?: string;
40
+ currency?: string;
41
+ description?: string;
42
+ isDefault?: boolean;
43
+ labels?: object;
44
+ marketId?: string;
45
+ metadata?: object;
46
+ organizationId?: string;
47
+ priority?: number;
48
+ status?: PriceListStatus;
49
+ taxIncluded?: boolean;
50
+ validFrom?: string;
51
+ validUntil?: string;
52
+ }): Promise<Models.PriceList>;
53
+ /**
54
+ *
55
+ * @param {string} code - Unique list code per tenant.
56
+ * @param {string} name -
57
+ * @param {string} channelId - Scope: only this channel.
58
+ * @param {string} contactId - Scope: only this contact — beats every other scope.
59
+ * @param {string} currency - ISO 4217 code (default EUR) — resolution only considers lists matching the requested currency.
60
+ * @param {string} description -
61
+ * @param {boolean} isDefault - Default lists resolve last within their group.
62
+ * @param {object} labels - Localised names ({de, en, …}).
63
+ * @param {string} marketId - Scope: only this market.
64
+ * @param {object} metadata - Free-form metadata.
65
+ * @param {string} organizationId - Scope: only this organization.
66
+ * @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
67
+ * @param {PriceListStatus} status - Default 'active' — only active lists resolve.
68
+ * @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
69
+ * @param {string} validFrom - Validity window start.
70
+ * @param {string} validUntil - Validity window end.
71
+ * @throws {RevenexxException}
72
+ * @returns {Promise<Models.PriceList>}
73
+ * @deprecated Use the object parameter style method for a better developer experience.
74
+ */
75
+ pricesListsCreate(code: string, name: string, channelId?: string, contactId?: string, currency?: string, description?: string, isDefault?: boolean, labels?: object, marketId?: string, metadata?: object, organizationId?: string, priority?: number, status?: PriceListStatus, taxIncluded?: boolean, validFrom?: string, validUntil?: string): Promise<Models.PriceList>;
76
+ /**
77
+ *
78
+ * @throws {RevenexxException}
79
+ * @returns {Promise<{}>}
80
+ */
81
+ pricesListsDefaults(): Promise<{}>;
82
+ /**
83
+ *
84
+ * @param {string} params.id -
85
+ * @throws {RevenexxException}
86
+ * @returns {Promise<{}>}
87
+ */
88
+ pricesListsDelete(params: {
89
+ id: string;
90
+ }): Promise<{}>;
91
+ /**
92
+ *
93
+ * @param {string} id -
94
+ * @throws {RevenexxException}
95
+ * @returns {Promise<{}>}
96
+ * @deprecated Use the object parameter style method for a better developer experience.
97
+ */
98
+ pricesListsDelete(id: string): Promise<{}>;
99
+ /**
100
+ *
101
+ * @param {string} params.id -
102
+ * @throws {RevenexxException}
103
+ * @returns {Promise<Models.PriceList>}
104
+ */
105
+ pricesListsGet(params: {
106
+ id: string;
107
+ }): Promise<Models.PriceList>;
108
+ /**
109
+ *
110
+ * @param {string} id -
111
+ * @throws {RevenexxException}
112
+ * @returns {Promise<Models.PriceList>}
113
+ * @deprecated Use the object parameter style method for a better developer experience.
114
+ */
115
+ pricesListsGet(id: string): Promise<Models.PriceList>;
116
+ /**
117
+ *
118
+ * @param {string} params.id -
119
+ * @param {string} params.channelId - Scope: only this channel.
120
+ * @param {string} params.code - Unique list code per tenant.
121
+ * @param {string} params.contactId - Scope: only this contact — beats every other scope.
122
+ * @param {string} params.currency - ISO 4217 code (default EUR) — resolution only considers lists matching the requested currency.
123
+ * @param {string} params.description -
124
+ * @param {boolean} params.isDefault - Default lists resolve last within their group.
125
+ * @param {object} params.labels - Localised names ({de, en, …}).
126
+ * @param {string} params.marketId - Scope: only this market.
127
+ * @param {object} params.metadata - Free-form metadata.
128
+ * @param {string} params.name -
129
+ * @param {string} params.organizationId - Scope: only this organization.
130
+ * @param {number} params.priority - Tie-breaker within a specificity group (higher wins, default 0).
131
+ * @param {PriceListStatus} params.status - Default 'active' — only active lists resolve.
132
+ * @param {boolean} params.taxIncluded - Gross (true) or net (false, default) prices.
133
+ * @param {string} params.validFrom - Validity window start.
134
+ * @param {string} params.validUntil - Validity window end.
135
+ * @throws {RevenexxException}
136
+ * @returns {Promise<Models.PriceList>}
137
+ */
138
+ pricesListsUpdate(params: {
139
+ id: string;
140
+ channelId?: string;
141
+ code?: string;
142
+ contactId?: string;
143
+ currency?: string;
144
+ description?: string;
145
+ isDefault?: boolean;
146
+ labels?: object;
147
+ marketId?: string;
148
+ metadata?: object;
149
+ name?: string;
150
+ organizationId?: string;
151
+ priority?: number;
152
+ status?: PriceListStatus;
153
+ taxIncluded?: boolean;
154
+ validFrom?: string;
155
+ validUntil?: string;
156
+ }): Promise<Models.PriceList>;
157
+ /**
158
+ *
159
+ * @param {string} id -
160
+ * @param {string} channelId - Scope: only this channel.
161
+ * @param {string} code - Unique list code per tenant.
162
+ * @param {string} contactId - Scope: only this contact — beats every other scope.
163
+ * @param {string} currency - ISO 4217 code (default EUR) — resolution only considers lists matching the requested currency.
164
+ * @param {string} description -
165
+ * @param {boolean} isDefault - Default lists resolve last within their group.
166
+ * @param {object} labels - Localised names ({de, en, …}).
167
+ * @param {string} marketId - Scope: only this market.
168
+ * @param {object} metadata - Free-form metadata.
169
+ * @param {string} name -
170
+ * @param {string} organizationId - Scope: only this organization.
171
+ * @param {number} priority - Tie-breaker within a specificity group (higher wins, default 0).
172
+ * @param {PriceListStatus} status - Default 'active' — only active lists resolve.
173
+ * @param {boolean} taxIncluded - Gross (true) or net (false, default) prices.
174
+ * @param {string} validFrom - Validity window start.
175
+ * @param {string} validUntil - Validity window end.
176
+ * @throws {RevenexxException}
177
+ * @returns {Promise<Models.PriceList>}
178
+ * @deprecated Use the object parameter style method for a better developer experience.
179
+ */
180
+ pricesListsUpdate(id: string, channelId?: string, code?: string, contactId?: string, currency?: string, description?: string, isDefault?: boolean, labels?: object, marketId?: string, metadata?: object, name?: string, organizationId?: string, priority?: number, status?: PriceListStatus, taxIncluded?: boolean, validFrom?: string, validUntil?: string): Promise<Models.PriceList>;
181
+ /**
182
+ *
183
+ * @param {string} params.listId -
184
+ * @throws {RevenexxException}
185
+ * @returns {Promise<{}>}
186
+ */
187
+ pricesEntriesList(params: {
188
+ listId: string;
189
+ }): Promise<{}>;
190
+ /**
191
+ *
192
+ * @param {string} listId -
193
+ * @throws {RevenexxException}
194
+ * @returns {Promise<{}>}
195
+ * @deprecated Use the object parameter style method for a better developer experience.
196
+ */
197
+ pricesEntriesList(listId: string): Promise<{}>;
198
+ /**
199
+ *
200
+ * @param {string} params.listId -
201
+ * @param {object} params.metadata - Free-form metadata.
202
+ * @param {PriceEntryType} params.priceType - Default 'standard'; 'on_request' is the explicit no-price marker — it stops resolution and answers "price on request".
203
+ * @param {string} params.productId - Priced product.
204
+ * @param {number} params.quantityMin - Tier threshold (Staffelpreis): this price applies from this quantity (default 1).
205
+ * @param {string} params.sku - Priced SKU (alternative to product_id).
206
+ * @param {string} params.unit -
207
+ * @param {number} params.unitPrice - Per-unit price (default 0).
208
+ * @param {string} params.validFrom - Per-entry validity start (promo prices).
209
+ * @param {string} params.validUntil - Per-entry validity end.
210
+ * @throws {RevenexxException}
211
+ * @returns {Promise<Models.PriceEntry>}
212
+ */
213
+ pricesEntriesCreate(params: {
214
+ listId: string;
215
+ metadata?: object;
216
+ priceType?: PriceEntryType;
217
+ productId?: string;
218
+ quantityMin?: number;
219
+ sku?: string;
220
+ unit?: string;
221
+ unitPrice?: number;
222
+ validFrom?: string;
223
+ validUntil?: string;
224
+ }): Promise<Models.PriceEntry>;
225
+ /**
226
+ *
227
+ * @param {string} listId -
228
+ * @param {object} metadata - Free-form metadata.
229
+ * @param {PriceEntryType} priceType - Default 'standard'; 'on_request' is the explicit no-price marker — it stops resolution and answers "price on request".
230
+ * @param {string} productId - Priced product.
231
+ * @param {number} quantityMin - Tier threshold (Staffelpreis): this price applies from this quantity (default 1).
232
+ * @param {string} sku - Priced SKU (alternative to product_id).
233
+ * @param {string} unit -
234
+ * @param {number} unitPrice - Per-unit price (default 0).
235
+ * @param {string} validFrom - Per-entry validity start (promo prices).
236
+ * @param {string} validUntil - Per-entry validity end.
237
+ * @throws {RevenexxException}
238
+ * @returns {Promise<Models.PriceEntry>}
239
+ * @deprecated Use the object parameter style method for a better developer experience.
240
+ */
241
+ pricesEntriesCreate(listId: string, metadata?: object, priceType?: PriceEntryType, productId?: string, quantityMin?: number, sku?: string, unit?: string, unitPrice?: number, validFrom?: string, validUntil?: string): Promise<Models.PriceEntry>;
242
+ /**
243
+ *
244
+ * @param {string} params.listId -
245
+ * @param {Models.PriceEntryCreateRequest[]} params.entries - The complete new entry set (set semantics).
246
+ * @throws {RevenexxException}
247
+ * @returns {Promise<{}>}
248
+ */
249
+ pricesEntriesReplace(params: {
250
+ listId: string;
251
+ entries: Models.PriceEntryCreateRequest[];
252
+ }): Promise<{}>;
253
+ /**
254
+ *
255
+ * @param {string} listId -
256
+ * @param {Models.PriceEntryCreateRequest[]} entries - The complete new entry set (set semantics).
257
+ * @throws {RevenexxException}
258
+ * @returns {Promise<{}>}
259
+ * @deprecated Use the object parameter style method for a better developer experience.
260
+ */
261
+ pricesEntriesReplace(listId: string, entries: Models.PriceEntryCreateRequest[]): Promise<{}>;
262
+ /**
263
+ *
264
+ * @param {string} params.listId -
265
+ * @param {string} params.id -
266
+ * @throws {RevenexxException}
267
+ * @returns {Promise<{}>}
268
+ */
269
+ pricesEntriesDelete(params: {
270
+ listId: string;
271
+ id: string;
272
+ }): Promise<{}>;
273
+ /**
274
+ *
275
+ * @param {string} listId -
276
+ * @param {string} id -
277
+ * @throws {RevenexxException}
278
+ * @returns {Promise<{}>}
279
+ * @deprecated Use the object parameter style method for a better developer experience.
280
+ */
281
+ pricesEntriesDelete(listId: string, id: string): Promise<{}>;
282
+ /**
283
+ *
284
+ * @param {string} params.listId -
285
+ * @param {string} params.id -
286
+ * @throws {RevenexxException}
287
+ * @returns {Promise<Models.PriceEntry>}
288
+ */
289
+ pricesEntriesGet(params: {
290
+ listId: string;
291
+ id: string;
292
+ }): Promise<Models.PriceEntry>;
293
+ /**
294
+ *
295
+ * @param {string} listId -
296
+ * @param {string} id -
297
+ * @throws {RevenexxException}
298
+ * @returns {Promise<Models.PriceEntry>}
299
+ * @deprecated Use the object parameter style method for a better developer experience.
300
+ */
301
+ pricesEntriesGet(listId: string, id: string): Promise<Models.PriceEntry>;
302
+ /**
303
+ *
304
+ * @param {string} params.listId -
305
+ * @param {string} params.id -
306
+ * @param {object} params.metadata - Free-form metadata.
307
+ * @param {PriceEntryType} params.priceType - Default 'standard'; 'on_request' is the explicit no-price marker — it stops resolution and answers "price on request".
308
+ * @param {string} params.productId - Priced product.
309
+ * @param {number} params.quantityMin - Tier threshold (Staffelpreis): this price applies from this quantity (default 1).
310
+ * @param {string} params.sku - Priced SKU (alternative to product_id).
311
+ * @param {string} params.unit -
312
+ * @param {number} params.unitPrice - Per-unit price (default 0).
313
+ * @param {string} params.validFrom - Per-entry validity start (promo prices).
314
+ * @param {string} params.validUntil - Per-entry validity end.
315
+ * @throws {RevenexxException}
316
+ * @returns {Promise<Models.PriceEntry>}
317
+ */
318
+ pricesEntriesUpdate(params: {
319
+ listId: string;
320
+ id: string;
321
+ metadata?: object;
322
+ priceType?: PriceEntryType;
323
+ productId?: string;
324
+ quantityMin?: number;
325
+ sku?: string;
326
+ unit?: string;
327
+ unitPrice?: number;
328
+ validFrom?: string;
329
+ validUntil?: string;
330
+ }): Promise<Models.PriceEntry>;
331
+ /**
332
+ *
333
+ * @param {string} listId -
334
+ * @param {string} id -
335
+ * @param {object} metadata - Free-form metadata.
336
+ * @param {PriceEntryType} priceType - Default 'standard'; 'on_request' is the explicit no-price marker — it stops resolution and answers "price on request".
337
+ * @param {string} productId - Priced product.
338
+ * @param {number} quantityMin - Tier threshold (Staffelpreis): this price applies from this quantity (default 1).
339
+ * @param {string} sku - Priced SKU (alternative to product_id).
340
+ * @param {string} unit -
341
+ * @param {number} unitPrice - Per-unit price (default 0).
342
+ * @param {string} validFrom - Per-entry validity start (promo prices).
343
+ * @param {string} validUntil - Per-entry validity end.
344
+ * @throws {RevenexxException}
345
+ * @returns {Promise<Models.PriceEntry>}
346
+ * @deprecated Use the object parameter style method for a better developer experience.
347
+ */
348
+ pricesEntriesUpdate(listId: string, id: string, metadata?: object, priceType?: PriceEntryType, productId?: string, quantityMin?: number, sku?: string, unit?: string, unitPrice?: number, validFrom?: string, validUntil?: string): Promise<Models.PriceEntry>;
349
+ /**
350
+ *
351
+ * @param {Models.PriceResolveItem[]} params.items - Items to price (at most 200 per call).
352
+ * @param {string} params.at - Point in time for validity windows (ISO 8601 timestamp, default now).
353
+ * @param {string} params.channelId - Buyer context: channel.
354
+ * @param {string} params.contactId - Buyer context: contact — most specific scope.
355
+ * @param {string} params.currency - ISO 4217 code (default EUR) — only lists in this currency resolve.
356
+ * @param {string} params.marketId - Buyer context: market.
357
+ * @param {string} params.organizationId - Buyer context: organization.
358
+ * @throws {RevenexxException}
359
+ * @returns {Promise<{}>}
360
+ */
361
+ pricesResolve(params: {
362
+ items: Models.PriceResolveItem[];
363
+ at?: string;
364
+ channelId?: string;
365
+ contactId?: string;
366
+ currency?: string;
367
+ marketId?: string;
368
+ organizationId?: string;
369
+ }): Promise<{}>;
370
+ /**
371
+ *
372
+ * @param {Models.PriceResolveItem[]} items - Items to price (at most 200 per call).
373
+ * @param {string} at - Point in time for validity windows (ISO 8601 timestamp, default now).
374
+ * @param {string} channelId - Buyer context: channel.
375
+ * @param {string} contactId - Buyer context: contact — most specific scope.
376
+ * @param {string} currency - ISO 4217 code (default EUR) — only lists in this currency resolve.
377
+ * @param {string} marketId - Buyer context: market.
378
+ * @param {string} organizationId - Buyer context: organization.
379
+ * @throws {RevenexxException}
380
+ * @returns {Promise<{}>}
381
+ * @deprecated Use the object parameter style method for a better developer experience.
382
+ */
383
+ pricesResolve(items: Models.PriceResolveItem[], at?: string, channelId?: string, contactId?: string, currency?: string, marketId?: string, organizationId?: string): Promise<{}>;
384
+ }