@revenexx/sdk 0.0.4 → 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 +7445 -1584
  2. package/dist/cjs/sdk.js.map +1 -1
  3. package/dist/esm/sdk.js +7422 -1585
  4. package/dist/esm/sdk.js.map +1 -1
  5. package/dist/iife/sdk.js +7445 -1584
  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 +24 -0
  33. package/src/models.ts +4303 -941
  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 +620 -65
  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 +692 -137
  45. package/src/services/pages.ts +377 -157
  46. package/src/services/payments.ts +591 -64
  47. package/src/services/prices.ts +524 -59
  48. package/src/services/products.ts +1836 -272
  49. package/src/services/search.ts +24 -24
  50. package/src/services/shipping.ts +444 -59
  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 +24 -0
  79. package/types/models.d.ts +4214 -970
  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 +225 -11
  84. package/types/services/markets.d.ts +123 -6
  85. package/types/services/orders.d.ts +238 -16
  86. package/types/services/pages.d.ts +95 -6
  87. package/types/services/payments.d.ts +221 -7
  88. package/types/services/prices.d.ts +198 -6
  89. package/types/services/products.d.ts +646 -32
  90. package/types/services/shipping.d.ts +165 -6
@@ -1,5 +1,9 @@
1
1
  import { Client } from '../client';
2
2
  import type { Models } from '../models';
3
+ import { AddressType } from '../enums/address-type';
4
+ import { ContactRole } from '../enums/contact-role';
5
+ import { ContactStatus } from '../enums/contact-status';
6
+ import { OrganizationStatus } from '../enums/organization-status';
3
7
  export declare class Customers {
4
8
  client: Client;
5
9
  constructor(client: Client);
@@ -11,10 +15,57 @@ export declare class Customers {
11
15
  customersAddressesList(): Promise<{}>;
12
16
  /**
13
17
  *
18
+ * @param {string} params.city -
19
+ * @param {string} params.country - ISO 3166-1 alpha-2 code.
20
+ * @param {string} params.street -
21
+ * @param {string} params.zip -
22
+ * @param {string} params.company -
23
+ * @param {string} params.contactId - Owning contact (personal address).
24
+ * @param {boolean} params.isDefault - The default address of its owner and type.
25
+ * @param {string} params.name - Recipient name.
26
+ * @param {string} params.organizationId - Owning organization (company address).
27
+ * @param {string} params.phone -
28
+ * @param {string} params.region -
29
+ * @param {string} params.street2 -
30
+ * @param {AddressType} params.type - Default 'shipping'.
14
31
  * @throws {RevenexxException}
15
32
  * @returns {Promise<Models.Address>}
16
33
  */
17
- customersAddressesCreate(): Promise<Models.Address>;
34
+ customersAddressesCreate(params: {
35
+ city: string;
36
+ country: string;
37
+ street: string;
38
+ zip: string;
39
+ company?: string;
40
+ contactId?: string;
41
+ isDefault?: boolean;
42
+ name?: string;
43
+ organizationId?: string;
44
+ phone?: string;
45
+ region?: string;
46
+ street2?: string;
47
+ type?: AddressType;
48
+ }): Promise<Models.Address>;
49
+ /**
50
+ *
51
+ * @param {string} city -
52
+ * @param {string} country - ISO 3166-1 alpha-2 code.
53
+ * @param {string} street -
54
+ * @param {string} zip -
55
+ * @param {string} company -
56
+ * @param {string} contactId - Owning contact (personal address).
57
+ * @param {boolean} isDefault - The default address of its owner and type.
58
+ * @param {string} name - Recipient name.
59
+ * @param {string} organizationId - Owning organization (company address).
60
+ * @param {string} phone -
61
+ * @param {string} region -
62
+ * @param {string} street2 -
63
+ * @param {AddressType} type - Default 'shipping'.
64
+ * @throws {RevenexxException}
65
+ * @returns {Promise<Models.Address>}
66
+ * @deprecated Use the object parameter style method for a better developer experience.
67
+ */
68
+ customersAddressesCreate(city: string, country: string, street: string, zip: string, company?: string, contactId?: string, isDefault?: boolean, name?: string, organizationId?: string, phone?: string, region?: string, street2?: string, type?: AddressType): Promise<Models.Address>;
18
69
  /**
19
70
  *
20
71
  * @param {string} params.id -
@@ -52,56 +103,194 @@ export declare class Customers {
52
103
  /**
53
104
  *
54
105
  * @param {string} params.id -
106
+ * @param {string} params.city -
107
+ * @param {string} params.company -
108
+ * @param {string} params.contactId - Owning contact (personal address).
109
+ * @param {string} params.country - ISO 3166-1 alpha-2 code.
110
+ * @param {boolean} params.isDefault - The default address of its owner and type.
111
+ * @param {string} params.name - Recipient name.
112
+ * @param {string} params.organizationId - Owning organization (company address).
113
+ * @param {string} params.phone -
114
+ * @param {string} params.region -
115
+ * @param {string} params.street -
116
+ * @param {string} params.street2 -
117
+ * @param {AddressType} params.type - Default 'shipping'.
118
+ * @param {string} params.zip -
55
119
  * @throws {RevenexxException}
56
120
  * @returns {Promise<Models.Address>}
57
121
  */
58
122
  customersAddressesUpdate(params: {
59
123
  id: string;
124
+ city?: string;
125
+ company?: string;
126
+ contactId?: string;
127
+ country?: string;
128
+ isDefault?: boolean;
129
+ name?: string;
130
+ organizationId?: string;
131
+ phone?: string;
132
+ region?: string;
133
+ street?: string;
134
+ street2?: string;
135
+ type?: AddressType;
136
+ zip?: string;
60
137
  }): Promise<Models.Address>;
61
138
  /**
62
139
  *
63
140
  * @param {string} id -
141
+ * @param {string} city -
142
+ * @param {string} company -
143
+ * @param {string} contactId - Owning contact (personal address).
144
+ * @param {string} country - ISO 3166-1 alpha-2 code.
145
+ * @param {boolean} isDefault - The default address of its owner and type.
146
+ * @param {string} name - Recipient name.
147
+ * @param {string} organizationId - Owning organization (company address).
148
+ * @param {string} phone -
149
+ * @param {string} region -
150
+ * @param {string} street -
151
+ * @param {string} street2 -
152
+ * @param {AddressType} type - Default 'shipping'.
153
+ * @param {string} zip -
64
154
  * @throws {RevenexxException}
65
155
  * @returns {Promise<Models.Address>}
66
156
  * @deprecated Use the object parameter style method for a better developer experience.
67
157
  */
68
- customersAddressesUpdate(id: string): Promise<Models.Address>;
158
+ customersAddressesUpdate(id: string, city?: string, company?: string, contactId?: string, country?: string, isDefault?: boolean, name?: string, organizationId?: string, phone?: string, region?: string, street?: string, street2?: string, type?: AddressType, zip?: string): Promise<Models.Address>;
69
159
  /**
70
160
  *
161
+ * @param {string} params.email -
162
+ * @param {string} params.password -
71
163
  * @throws {RevenexxException}
72
164
  * @returns {Promise<Models.AuthLoginResponse>}
73
165
  */
74
- customersAuthLogin(): Promise<Models.AuthLoginResponse>;
166
+ customersAuthLogin(params: {
167
+ email: string;
168
+ password: string;
169
+ }): Promise<Models.AuthLoginResponse>;
170
+ /**
171
+ *
172
+ * @param {string} email -
173
+ * @param {string} password -
174
+ * @throws {RevenexxException}
175
+ * @returns {Promise<Models.AuthLoginResponse>}
176
+ * @deprecated Use the object parameter style method for a better developer experience.
177
+ */
178
+ customersAuthLogin(email: string, password: string): Promise<Models.AuthLoginResponse>;
179
+ /**
180
+ *
181
+ * @param {string} params.sessionId -
182
+ * @param {string} params.userId -
183
+ * @throws {RevenexxException}
184
+ * @returns {Promise<{}>}
185
+ */
186
+ customersAuthLogout(params: {
187
+ sessionId: string;
188
+ userId: string;
189
+ }): Promise<{}>;
75
190
  /**
76
191
  *
192
+ * @param {string} sessionId -
193
+ * @param {string} userId -
77
194
  * @throws {RevenexxException}
78
195
  * @returns {Promise<{}>}
196
+ * @deprecated Use the object parameter style method for a better developer experience.
79
197
  */
80
- customersAuthLogout(): Promise<{}>;
198
+ customersAuthLogout(sessionId: string, userId: string): Promise<{}>;
81
199
  /**
82
200
  *
201
+ * @param {string} params.userId -
83
202
  * @throws {RevenexxException}
84
203
  * @returns {Promise<Models.AuthMeResponse>}
85
204
  */
86
- customersAuthMe(): Promise<Models.AuthMeResponse>;
205
+ customersAuthMe(params: {
206
+ userId: string;
207
+ }): Promise<Models.AuthMeResponse>;
208
+ /**
209
+ *
210
+ * @param {string} userId -
211
+ * @throws {RevenexxException}
212
+ * @returns {Promise<Models.AuthMeResponse>}
213
+ * @deprecated Use the object parameter style method for a better developer experience.
214
+ */
215
+ customersAuthMe(userId: string): Promise<Models.AuthMeResponse>;
216
+ /**
217
+ *
218
+ * @param {string} params.email -
219
+ * @param {string} params.url - Redirect URL carrying userId + secret.
220
+ * @throws {RevenexxException}
221
+ * @returns {Promise<{}>}
222
+ */
223
+ customersAuthRecovery(params: {
224
+ email: string;
225
+ url: string;
226
+ }): Promise<{}>;
87
227
  /**
88
228
  *
229
+ * @param {string} email -
230
+ * @param {string} url - Redirect URL carrying userId + secret.
89
231
  * @throws {RevenexxException}
90
232
  * @returns {Promise<{}>}
233
+ * @deprecated Use the object parameter style method for a better developer experience.
91
234
  */
92
- customersAuthRecovery(): Promise<{}>;
235
+ customersAuthRecovery(email: string, url: string): Promise<{}>;
93
236
  /**
94
237
  *
238
+ * @param {string} params.password -
239
+ * @param {string} params.secret -
240
+ * @param {string} params.userId -
95
241
  * @throws {RevenexxException}
96
242
  * @returns {Promise<{}>}
97
243
  */
98
- customersAuthRecoveryConfirm(): Promise<{}>;
244
+ customersAuthRecoveryConfirm(params: {
245
+ password: string;
246
+ secret: string;
247
+ userId: string;
248
+ }): Promise<{}>;
249
+ /**
250
+ *
251
+ * @param {string} password -
252
+ * @param {string} secret -
253
+ * @param {string} userId -
254
+ * @throws {RevenexxException}
255
+ * @returns {Promise<{}>}
256
+ * @deprecated Use the object parameter style method for a better developer experience.
257
+ */
258
+ customersAuthRecoveryConfirm(password: string, secret: string, userId: string): Promise<{}>;
259
+ /**
260
+ *
261
+ * @param {string} params.email -
262
+ * @param {string} params.password -
263
+ * @param {string} params.firstName -
264
+ * @param {string} params.lastName -
265
+ * @param {string} params.locale - BCP 47, e.g. de-DE
266
+ * @param {string} params.organizationId - Join an existing organization.
267
+ * @param {string} params.organizationName - Found a new organization; the contact becomes its admin.
268
+ * @throws {RevenexxException}
269
+ * @returns {Promise<Models.AuthRegisterResponse>}
270
+ */
271
+ customersAuthRegister(params: {
272
+ email: string;
273
+ password: string;
274
+ firstName?: string;
275
+ lastName?: string;
276
+ locale?: string;
277
+ organizationId?: string;
278
+ organizationName?: string;
279
+ }): Promise<Models.AuthRegisterResponse>;
99
280
  /**
100
281
  *
282
+ * @param {string} email -
283
+ * @param {string} password -
284
+ * @param {string} firstName -
285
+ * @param {string} lastName -
286
+ * @param {string} locale - BCP 47, e.g. de-DE
287
+ * @param {string} organizationId - Join an existing organization.
288
+ * @param {string} organizationName - Found a new organization; the contact becomes its admin.
101
289
  * @throws {RevenexxException}
102
290
  * @returns {Promise<Models.AuthRegisterResponse>}
291
+ * @deprecated Use the object parameter style method for a better developer experience.
103
292
  */
104
- customersAuthRegister(): Promise<Models.AuthRegisterResponse>;
293
+ customersAuthRegister(email: string, password: string, firstName?: string, lastName?: string, locale?: string, organizationId?: string, organizationName?: string): Promise<Models.AuthRegisterResponse>;
105
294
  /**
106
295
  *
107
296
  * @throws {RevenexxException}
@@ -110,10 +299,45 @@ export declare class Customers {
110
299
  customersContactsList(): Promise<{}>;
111
300
  /**
112
301
  *
302
+ * @param {string} params.email -
303
+ * @param {string} params.firstName -
304
+ * @param {boolean} params.isPrimary - The primary contact of its organization.
305
+ * @param {string} params.lastName -
306
+ * @param {string} params.locale - BCP 47, e.g. de-DE
307
+ * @param {string} params.organizationId - Owning organization — membership is mirrored to the platform team.
308
+ * @param {string} params.phone -
309
+ * @param {ContactRole} params.role - Default 'buyer' — also the team role on the platform mirror.
310
+ * @param {ContactStatus} params.status - Default 'invited' on create.
311
+ * @throws {RevenexxException}
312
+ * @returns {Promise<Models.Contact>}
313
+ */
314
+ customersContactsCreate(params: {
315
+ email: string;
316
+ firstName?: string;
317
+ isPrimary?: boolean;
318
+ lastName?: string;
319
+ locale?: string;
320
+ organizationId?: string;
321
+ phone?: string;
322
+ role?: ContactRole;
323
+ status?: ContactStatus;
324
+ }): Promise<Models.Contact>;
325
+ /**
326
+ *
327
+ * @param {string} email -
328
+ * @param {string} firstName -
329
+ * @param {boolean} isPrimary - The primary contact of its organization.
330
+ * @param {string} lastName -
331
+ * @param {string} locale - BCP 47, e.g. de-DE
332
+ * @param {string} organizationId - Owning organization — membership is mirrored to the platform team.
333
+ * @param {string} phone -
334
+ * @param {ContactRole} role - Default 'buyer' — also the team role on the platform mirror.
335
+ * @param {ContactStatus} status - Default 'invited' on create.
113
336
  * @throws {RevenexxException}
114
337
  * @returns {Promise<Models.Contact>}
338
+ * @deprecated Use the object parameter style method for a better developer experience.
115
339
  */
116
- customersContactsCreate(): Promise<Models.Contact>;
340
+ customersContactsCreate(email: string, firstName?: string, isPrimary?: boolean, lastName?: string, locale?: string, organizationId?: string, phone?: string, role?: ContactRole, status?: ContactStatus): Promise<Models.Contact>;
117
341
  /**
118
342
  *
119
343
  * @param {string} params.id -
@@ -151,20 +375,47 @@ export declare class Customers {
151
375
  /**
152
376
  *
153
377
  * @param {string} params.id -
378
+ * @param {string} params.email -
379
+ * @param {string} params.firstName -
380
+ * @param {boolean} params.isPrimary - The primary contact of its organization.
381
+ * @param {string} params.lastName -
382
+ * @param {string} params.locale - BCP 47, e.g. de-DE
383
+ * @param {string} params.organizationId - Owning organization — membership is mirrored to the platform team.
384
+ * @param {string} params.phone -
385
+ * @param {ContactRole} params.role - Default 'buyer' — also the team role on the platform mirror.
386
+ * @param {ContactStatus} params.status - Default 'invited' on create.
154
387
  * @throws {RevenexxException}
155
388
  * @returns {Promise<Models.Contact>}
156
389
  */
157
390
  customersContactsUpdate(params: {
158
391
  id: string;
392
+ email?: string;
393
+ firstName?: string;
394
+ isPrimary?: boolean;
395
+ lastName?: string;
396
+ locale?: string;
397
+ organizationId?: string;
398
+ phone?: string;
399
+ role?: ContactRole;
400
+ status?: ContactStatus;
159
401
  }): Promise<Models.Contact>;
160
402
  /**
161
403
  *
162
404
  * @param {string} id -
405
+ * @param {string} email -
406
+ * @param {string} firstName -
407
+ * @param {boolean} isPrimary - The primary contact of its organization.
408
+ * @param {string} lastName -
409
+ * @param {string} locale - BCP 47, e.g. de-DE
410
+ * @param {string} organizationId - Owning organization — membership is mirrored to the platform team.
411
+ * @param {string} phone -
412
+ * @param {ContactRole} role - Default 'buyer' — also the team role on the platform mirror.
413
+ * @param {ContactStatus} status - Default 'invited' on create.
163
414
  * @throws {RevenexxException}
164
415
  * @returns {Promise<Models.Contact>}
165
416
  * @deprecated Use the object parameter style method for a better developer experience.
166
417
  */
167
- customersContactsUpdate(id: string): Promise<Models.Contact>;
418
+ customersContactsUpdate(id: string, email?: string, firstName?: string, isPrimary?: boolean, lastName?: string, locale?: string, organizationId?: string, phone?: string, role?: ContactRole, status?: ContactStatus): Promise<Models.Contact>;
168
419
  /**
169
420
  *
170
421
  * @throws {RevenexxException}
@@ -173,10 +424,30 @@ export declare class Customers {
173
424
  customersOrganizationsList(): Promise<{}>;
174
425
  /**
175
426
  *
427
+ * @param {string} params.name - Company name — mirrored to the platform team.
428
+ * @param {object} params.settings - Free-form organization settings.
429
+ * @param {OrganizationStatus} params.status - Default 'active'.
430
+ * @param {string} params.vatId -
176
431
  * @throws {RevenexxException}
177
432
  * @returns {Promise<Models.Organization>}
178
433
  */
179
- customersOrganizationsCreate(): Promise<Models.Organization>;
434
+ customersOrganizationsCreate(params: {
435
+ name: string;
436
+ settings?: object;
437
+ status?: OrganizationStatus;
438
+ vatId?: string;
439
+ }): Promise<Models.Organization>;
440
+ /**
441
+ *
442
+ * @param {string} name - Company name — mirrored to the platform team.
443
+ * @param {object} settings - Free-form organization settings.
444
+ * @param {OrganizationStatus} status - Default 'active'.
445
+ * @param {string} vatId -
446
+ * @throws {RevenexxException}
447
+ * @returns {Promise<Models.Organization>}
448
+ * @deprecated Use the object parameter style method for a better developer experience.
449
+ */
450
+ customersOrganizationsCreate(name: string, settings?: object, status?: OrganizationStatus, vatId?: string): Promise<Models.Organization>;
180
451
  /**
181
452
  *
182
453
  * @param {string} params.id -
@@ -214,18 +485,30 @@ export declare class Customers {
214
485
  /**
215
486
  *
216
487
  * @param {string} params.id -
488
+ * @param {string} params.name - Company name — mirrored to the platform team.
489
+ * @param {object} params.settings - Free-form organization settings.
490
+ * @param {OrganizationStatus} params.status - Default 'active'.
491
+ * @param {string} params.vatId -
217
492
  * @throws {RevenexxException}
218
493
  * @returns {Promise<Models.Organization>}
219
494
  */
220
495
  customersOrganizationsUpdate(params: {
221
496
  id: string;
497
+ name?: string;
498
+ settings?: object;
499
+ status?: OrganizationStatus;
500
+ vatId?: string;
222
501
  }): Promise<Models.Organization>;
223
502
  /**
224
503
  *
225
504
  * @param {string} id -
505
+ * @param {string} name - Company name — mirrored to the platform team.
506
+ * @param {object} settings - Free-form organization settings.
507
+ * @param {OrganizationStatus} status - Default 'active'.
508
+ * @param {string} vatId -
226
509
  * @throws {RevenexxException}
227
510
  * @returns {Promise<Models.Organization>}
228
511
  * @deprecated Use the object parameter style method for a better developer experience.
229
512
  */
230
- customersOrganizationsUpdate(id: string): Promise<Models.Organization>;
513
+ customersOrganizationsUpdate(id: string, name?: string, settings?: object, status?: OrganizationStatus, vatId?: string): Promise<Models.Organization>;
231
514
  }