@revenexx/sdk 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sdk.js +13491 -6163
- package/dist/cjs/sdk.js.map +1 -1
- package/dist/esm/sdk.js +13464 -6162
- package/dist/esm/sdk.js.map +1 -1
- package/dist/iife/sdk.js +13491 -6163
- package/package.json +1 -1
- package/src/client.ts +1 -1
- package/src/enums/address-type.ts +4 -0
- package/src/enums/cart-export-format.ts +4 -0
- package/src/enums/cart-io-apply-mode.ts +5 -0
- package/src/enums/cart-io-direction.ts +4 -0
- package/src/enums/cart-io-entity.ts +4 -0
- package/src/enums/cart-io-format.ts +4 -0
- package/src/enums/cart-item-type.ts +5 -0
- package/src/enums/channel-status.ts +4 -0
- package/src/enums/channel-type.ts +7 -0
- package/src/enums/contact-role.ts +6 -0
- package/src/enums/contact-status.ts +5 -0
- package/src/enums/location-type.ts +6 -0
- package/src/enums/market-status.ts +4 -0
- package/src/enums/order-comment-visibility.ts +4 -0
- package/src/enums/order-item-type.ts +5 -0
- package/src/enums/order-list-kind.ts +4 -0
- package/src/enums/order-payment-status.ts +9 -0
- package/src/enums/organization-status.ts +4 -0
- package/src/enums/page-status.ts +5 -0
- package/src/enums/payment-fee-type.ts +5 -0
- package/src/enums/payment-method-kind.ts +4 -0
- package/src/enums/price-entry-type.ts +4 -0
- package/src/enums/price-list-status.ts +4 -0
- package/src/enums/shipping-method-matrix-basis.ts +6 -0
- package/src/enums/shipping-method-pricing-type.ts +5 -0
- package/src/enums/store-asset-request-visibility.ts +4 -0
- package/src/enums/visibility.ts +4 -0
- package/src/index.ts +28 -2
- package/src/models.ts +5309 -1009
- package/src/services/apps.ts +154 -154
- package/src/services/avatars.ts +57 -57
- package/src/services/carts.ts +739 -104
- package/src/services/channels.ts +147 -19
- package/src/services/customers.ts +809 -69
- package/src/services/greetings.ts +18 -18
- package/src/services/inventories.ts +620 -65
- package/src/services/locale.ts +16 -16
- package/src/services/markets.ts +690 -75
- package/src/services/messaging.ts +273 -273
- package/src/services/orderlists.ts +889 -0
- package/src/services/orders.ts +692 -137
- package/src/services/pages.ts +661 -155
- package/src/services/payments.ts +591 -64
- package/src/services/prices.ts +585 -59
- package/src/services/products.ts +1908 -272
- package/src/services/search.ts +24 -24
- package/src/services/shipping.ts +451 -59
- package/src/services/sites.ts +116 -116
- package/src/services/storage.ts +933 -599
- package/src/services/tokens.ts +14 -14
- package/types/enums/address-type.d.ts +4 -0
- package/types/enums/cart-export-format.d.ts +4 -0
- package/types/enums/cart-io-apply-mode.d.ts +5 -0
- package/types/enums/cart-io-direction.d.ts +4 -0
- package/types/enums/cart-io-entity.d.ts +4 -0
- package/types/enums/cart-io-format.d.ts +4 -0
- package/types/enums/cart-item-type.d.ts +5 -0
- package/types/enums/channel-status.d.ts +4 -0
- package/types/enums/channel-type.d.ts +7 -0
- package/types/enums/contact-role.d.ts +6 -0
- package/types/enums/contact-status.d.ts +5 -0
- package/types/enums/location-type.d.ts +6 -0
- package/types/enums/market-status.d.ts +4 -0
- package/types/enums/order-comment-visibility.d.ts +4 -0
- package/types/enums/order-item-type.d.ts +5 -0
- package/types/enums/order-list-kind.d.ts +4 -0
- package/types/enums/order-payment-status.d.ts +9 -0
- package/types/enums/organization-status.d.ts +4 -0
- package/types/enums/page-status.d.ts +5 -0
- package/types/enums/payment-fee-type.d.ts +5 -0
- package/types/enums/payment-method-kind.d.ts +4 -0
- package/types/enums/price-entry-type.d.ts +4 -0
- package/types/enums/price-list-status.d.ts +4 -0
- package/types/enums/shipping-method-matrix-basis.d.ts +6 -0
- package/types/enums/shipping-method-pricing-type.d.ts +5 -0
- package/types/enums/store-asset-request-visibility.d.ts +4 -0
- package/types/enums/visibility.d.ts +4 -0
- package/types/index.d.ts +28 -2
- package/types/models.d.ts +5170 -1010
- package/types/services/carts.d.ts +271 -12
- package/types/services/channels.d.ts +54 -2
- package/types/services/customers.d.ts +298 -12
- package/types/services/inventories.d.ts +225 -11
- package/types/services/markets.d.ts +235 -6
- package/types/services/orderlists.d.ts +324 -0
- package/types/services/orders.d.ts +238 -16
- package/types/services/pages.d.ts +190 -6
- package/types/services/payments.d.ts +221 -7
- package/types/services/prices.d.ts +218 -6
- package/types/services/products.d.ts +672 -32
- package/types/services/shipping.d.ts +168 -6
- package/types/services/storage.d.ts +353 -285
package/src/services/search.ts
CHANGED
|
@@ -20,7 +20,7 @@ export class Search {
|
|
|
20
20
|
searchListCollections(): Promise<{}> {
|
|
21
21
|
|
|
22
22
|
const apiPath = '/v1/search/collections';
|
|
23
|
-
const
|
|
23
|
+
const apiPayload: Payload = {};
|
|
24
24
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
25
25
|
|
|
26
26
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -30,7 +30,7 @@ export class Search {
|
|
|
30
30
|
'get',
|
|
31
31
|
uri,
|
|
32
32
|
apiHeaders,
|
|
33
|
-
|
|
33
|
+
apiPayload
|
|
34
34
|
);
|
|
35
35
|
}
|
|
36
36
|
|
|
@@ -96,24 +96,24 @@ export class Search {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
const apiPath = '/v1/search/collections/{collection}/documents/search'.replace('{collection}', collection);
|
|
99
|
-
const
|
|
99
|
+
const apiPayload: Payload = {};
|
|
100
100
|
if (typeof q !== 'undefined') {
|
|
101
|
-
|
|
101
|
+
apiPayload['q'] = q;
|
|
102
102
|
}
|
|
103
103
|
if (typeof queryBy !== 'undefined') {
|
|
104
|
-
|
|
104
|
+
apiPayload['query_by'] = queryBy;
|
|
105
105
|
}
|
|
106
106
|
if (typeof filterBy !== 'undefined') {
|
|
107
|
-
|
|
107
|
+
apiPayload['filter_by'] = filterBy;
|
|
108
108
|
}
|
|
109
109
|
if (typeof sortBy !== 'undefined') {
|
|
110
|
-
|
|
110
|
+
apiPayload['sort_by'] = sortBy;
|
|
111
111
|
}
|
|
112
112
|
if (typeof page !== 'undefined') {
|
|
113
|
-
|
|
113
|
+
apiPayload['page'] = page;
|
|
114
114
|
}
|
|
115
115
|
if (typeof perPage !== 'undefined') {
|
|
116
|
-
|
|
116
|
+
apiPayload['per_page'] = perPage;
|
|
117
117
|
}
|
|
118
118
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
119
119
|
|
|
@@ -124,7 +124,7 @@ export class Search {
|
|
|
124
124
|
'get',
|
|
125
125
|
uri,
|
|
126
126
|
apiHeaders,
|
|
127
|
-
|
|
127
|
+
apiPayload
|
|
128
128
|
);
|
|
129
129
|
}
|
|
130
130
|
|
|
@@ -194,27 +194,27 @@ export class Search {
|
|
|
194
194
|
}
|
|
195
195
|
|
|
196
196
|
const apiPath = '/v1/search/collections/{collection}/documents/search'.replace('{collection}', collection);
|
|
197
|
-
const
|
|
197
|
+
const apiPayload: Payload = {};
|
|
198
198
|
if (typeof facetBy !== 'undefined') {
|
|
199
|
-
|
|
199
|
+
apiPayload['facet_by'] = facetBy;
|
|
200
200
|
}
|
|
201
201
|
if (typeof filterBy !== 'undefined') {
|
|
202
|
-
|
|
202
|
+
apiPayload['filter_by'] = filterBy;
|
|
203
203
|
}
|
|
204
204
|
if (typeof page !== 'undefined') {
|
|
205
|
-
|
|
205
|
+
apiPayload['page'] = page;
|
|
206
206
|
}
|
|
207
207
|
if (typeof perPage !== 'undefined') {
|
|
208
|
-
|
|
208
|
+
apiPayload['per_page'] = perPage;
|
|
209
209
|
}
|
|
210
210
|
if (typeof q !== 'undefined') {
|
|
211
|
-
|
|
211
|
+
apiPayload['q'] = q;
|
|
212
212
|
}
|
|
213
213
|
if (typeof queryBy !== 'undefined') {
|
|
214
|
-
|
|
214
|
+
apiPayload['query_by'] = queryBy;
|
|
215
215
|
}
|
|
216
216
|
if (typeof sortBy !== 'undefined') {
|
|
217
|
-
|
|
217
|
+
apiPayload['sort_by'] = sortBy;
|
|
218
218
|
}
|
|
219
219
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
220
220
|
|
|
@@ -226,7 +226,7 @@ export class Search {
|
|
|
226
226
|
'post',
|
|
227
227
|
uri,
|
|
228
228
|
apiHeaders,
|
|
229
|
-
|
|
229
|
+
apiPayload
|
|
230
230
|
);
|
|
231
231
|
}
|
|
232
232
|
|
|
@@ -275,7 +275,7 @@ export class Search {
|
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
const apiPath = '/v1/search/collections/{collection}/documents/{documentId}'.replace('{collection}', collection).replace('{documentId}', documentId);
|
|
278
|
-
const
|
|
278
|
+
const apiPayload: Payload = {};
|
|
279
279
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
280
280
|
|
|
281
281
|
const apiHeaders: { [header: string]: string } = {
|
|
@@ -285,7 +285,7 @@ export class Search {
|
|
|
285
285
|
'get',
|
|
286
286
|
uri,
|
|
287
287
|
apiHeaders,
|
|
288
|
-
|
|
288
|
+
apiPayload
|
|
289
289
|
);
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -326,9 +326,9 @@ export class Search {
|
|
|
326
326
|
}
|
|
327
327
|
|
|
328
328
|
const apiPath = '/v1/search/multi_search';
|
|
329
|
-
const
|
|
329
|
+
const apiPayload: Payload = {};
|
|
330
330
|
if (typeof searches !== 'undefined') {
|
|
331
|
-
|
|
331
|
+
apiPayload['searches'] = searches;
|
|
332
332
|
}
|
|
333
333
|
const uri = new URL(this.client.config.endpoint + apiPath);
|
|
334
334
|
|
|
@@ -340,7 +340,7 @@ export class Search {
|
|
|
340
340
|
'post',
|
|
341
341
|
uri,
|
|
342
342
|
apiHeaders,
|
|
343
|
-
|
|
343
|
+
apiPayload
|
|
344
344
|
);
|
|
345
345
|
}
|
|
346
346
|
}
|