merchi_sdk_ts 1.24.0 → 1.26.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.
- package/dist/entities/product.test.js +4 -2
- package/dist/entity.js +8 -1
- package/package.json +1 -1
- package/src/entities/product.test.ts +4 -2
- package/src/entity.ts +10 -3
- package/tsconfig.json +2 -0
|
@@ -269,7 +269,7 @@ test('can list products with options set', function () {
|
|
|
269
269
|
notificationType: NotificationType.DRAFT_SENT,
|
|
270
270
|
offset: 0,
|
|
271
271
|
orClientId: 123,
|
|
272
|
-
orClientCompanyId: 321,
|
|
272
|
+
orClientCompanyId: [321, 654],
|
|
273
273
|
order: 'asc',
|
|
274
274
|
originalOf: 1,
|
|
275
275
|
platformCategoryId: 3,
|
|
@@ -287,6 +287,7 @@ test('can list products with options set', function () {
|
|
|
287
287
|
relatedUser: 55,
|
|
288
288
|
savedByUser: 24,
|
|
289
289
|
section: NotificationSection.JOB_INFO,
|
|
290
|
+
senderCompanyId: 77,
|
|
290
291
|
senderRole: Role.MANAGER,
|
|
291
292
|
shopifyOnly: false,
|
|
292
293
|
sort: 'name',
|
|
@@ -357,7 +358,7 @@ test('can list products with options set', function () {
|
|
|
357
358
|
['notification_recipient', '87'],
|
|
358
359
|
['notification_type', '1'],
|
|
359
360
|
['offset', '0'],
|
|
360
|
-
['or_client_company_id', '321'],
|
|
361
|
+
['or_client_company_id', '321,654'],
|
|
361
362
|
['or_client_id', '123'],
|
|
362
363
|
['order', 'asc'],
|
|
363
364
|
['original_of', '1'],
|
|
@@ -376,6 +377,7 @@ test('can list products with options set', function () {
|
|
|
376
377
|
['related_user', '55'],
|
|
377
378
|
['saved_by_user', '24'],
|
|
378
379
|
['section', '2'],
|
|
380
|
+
['sender_company_id', '77'],
|
|
379
381
|
['sender_role', '6'],
|
|
380
382
|
['skip_rights', 'y'],
|
|
381
383
|
['shopify_only', 'false'],
|
package/dist/entity.js
CHANGED
|
@@ -816,6 +816,10 @@ var Entity = /** @class */ (function () {
|
|
|
816
816
|
fetchOptions.query.push(['saved_by_user',
|
|
817
817
|
options.savedByUser.toString()]);
|
|
818
818
|
}
|
|
819
|
+
if (options.senderCompanyId !== undefined) {
|
|
820
|
+
fetchOptions.query.push(['sender_company_id',
|
|
821
|
+
options.senderCompanyId.toString()]);
|
|
822
|
+
}
|
|
819
823
|
if (options.receiverId !== undefined) {
|
|
820
824
|
fetchOptions.query.push(['receiver_id', options.receiverId.toString()]);
|
|
821
825
|
}
|
|
@@ -886,7 +890,10 @@ var Entity = /** @class */ (function () {
|
|
|
886
890
|
fetchOptions.query.push(['or_client_id', options.orClientId.toString()]);
|
|
887
891
|
}
|
|
888
892
|
if (options.orClientCompanyId !== undefined) {
|
|
889
|
-
|
|
893
|
+
var companyIds = Array.isArray(options.orClientCompanyId)
|
|
894
|
+
? options.orClientCompanyId.join(',')
|
|
895
|
+
: options.orClientCompanyId.toString();
|
|
896
|
+
fetchOptions.query.push(['or_client_company_id', companyIds]);
|
|
890
897
|
}
|
|
891
898
|
}
|
|
892
899
|
if (!(options && options.withRights)) {
|
package/package.json
CHANGED
|
@@ -293,7 +293,7 @@ test('can list products with options set', () => {
|
|
|
293
293
|
notificationType: NotificationType.DRAFT_SENT,
|
|
294
294
|
offset: 0,
|
|
295
295
|
orClientId: 123,
|
|
296
|
-
orClientCompanyId: 321,
|
|
296
|
+
orClientCompanyId: [321, 654],
|
|
297
297
|
order: 'asc',
|
|
298
298
|
originalOf: 1,
|
|
299
299
|
platformCategoryId: 3,
|
|
@@ -311,6 +311,7 @@ test('can list products with options set', () => {
|
|
|
311
311
|
relatedUser: 55,
|
|
312
312
|
savedByUser: 24,
|
|
313
313
|
section: NotificationSection.JOB_INFO,
|
|
314
|
+
senderCompanyId: 77,
|
|
314
315
|
senderRole: Role.MANAGER,
|
|
315
316
|
shopifyOnly: false,
|
|
316
317
|
sort: 'name',
|
|
@@ -385,7 +386,7 @@ test('can list products with options set', () => {
|
|
|
385
386
|
['notification_recipient', '87'],
|
|
386
387
|
['notification_type', '1'],
|
|
387
388
|
['offset', '0'],
|
|
388
|
-
['or_client_company_id', '321'],
|
|
389
|
+
['or_client_company_id', '321,654'],
|
|
389
390
|
['or_client_id', '123'],
|
|
390
391
|
['order', 'asc'],
|
|
391
392
|
['original_of', '1'],
|
|
@@ -404,6 +405,7 @@ test('can list products with options set', () => {
|
|
|
404
405
|
['related_user', '55'],
|
|
405
406
|
['saved_by_user', '24'],
|
|
406
407
|
['section', '2'],
|
|
408
|
+
['sender_company_id', '77'],
|
|
407
409
|
['sender_role', '6'],
|
|
408
410
|
['skip_rights', 'y'],
|
|
409
411
|
['shopify_only', 'false'],
|
package/src/entity.ts
CHANGED
|
@@ -122,7 +122,7 @@ interface ListOptions {
|
|
|
122
122
|
notificationType?: NotificationType;
|
|
123
123
|
offset?: number;
|
|
124
124
|
orClientId?: number;
|
|
125
|
-
orClientCompanyId?: number;
|
|
125
|
+
orClientCompanyId?: number | number[];
|
|
126
126
|
order?: string;
|
|
127
127
|
originalOf?: number;
|
|
128
128
|
platformCategoryId?: number;
|
|
@@ -141,6 +141,7 @@ interface ListOptions {
|
|
|
141
141
|
relatedUser?: number;
|
|
142
142
|
savedByUser?: number;
|
|
143
143
|
section?: NotificationSection;
|
|
144
|
+
senderCompanyId?: number;
|
|
144
145
|
senderRole?: Role;
|
|
145
146
|
serialiseMethod?: SerialiseMethod;
|
|
146
147
|
shopifyOnly?: boolean;
|
|
@@ -634,6 +635,10 @@ export class Entity {
|
|
|
634
635
|
fetchOptions.query.push(['saved_by_user',
|
|
635
636
|
options.savedByUser.toString()]);
|
|
636
637
|
}
|
|
638
|
+
if (options.senderCompanyId !== undefined) {
|
|
639
|
+
fetchOptions.query.push(['sender_company_id',
|
|
640
|
+
options.senderCompanyId.toString()]);
|
|
641
|
+
}
|
|
637
642
|
if (options.receiverId !== undefined) {
|
|
638
643
|
fetchOptions.query.push(['receiver_id', options.receiverId.toString()]);
|
|
639
644
|
}
|
|
@@ -710,8 +715,10 @@ export class Entity {
|
|
|
710
715
|
fetchOptions.query.push(['or_client_id', options.orClientId.toString()]);
|
|
711
716
|
}
|
|
712
717
|
if (options.orClientCompanyId !== undefined) {
|
|
713
|
-
|
|
714
|
-
|
|
718
|
+
const companyIds = Array.isArray(options.orClientCompanyId)
|
|
719
|
+
? options.orClientCompanyId.join(',')
|
|
720
|
+
: options.orClientCompanyId.toString();
|
|
721
|
+
fetchOptions.query.push(['or_client_company_id', companyIds]);
|
|
715
722
|
}
|
|
716
723
|
}
|
|
717
724
|
if (!(options && options.withRights)) {
|
package/tsconfig.json
CHANGED
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
"downlevelIteration": true,
|
|
7
7
|
"lib": ["es2017", "DOM", "ES6"],
|
|
8
8
|
"moduleResolution": "node",
|
|
9
|
+
"rootDir": "./src",
|
|
9
10
|
"outDir": "dist",
|
|
10
11
|
"module": "ES6",
|
|
11
12
|
"types": ["node", "jest"],
|
|
12
13
|
"baseUrl": ".",
|
|
14
|
+
"ignoreDeprecations": "6.0",
|
|
13
15
|
"noImplicitAny": true,
|
|
14
16
|
"noImplicitReturns": true,
|
|
15
17
|
"noImplicitThis": true,
|