merchi_sdk_ts 1.23.0 → 1.25.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/job.js +8 -0
- package/dist/entities/product.test.js +2 -2
- package/dist/entity.js +4 -1
- package/package.json +1 -1
- package/src/entities/job.ts +6 -0
- package/src/entities/product.test.ts +2 -2
- package/src/entity.ts +5 -3
- package/tsconfig.json +2 -0
package/dist/entities/job.js
CHANGED
|
@@ -362,6 +362,14 @@ var Job = /** @class */ (function (_super) {
|
|
|
362
362
|
Job.property(),
|
|
363
363
|
__metadata("design:type", String)
|
|
364
364
|
], Job.prototype, "clientOs", void 0);
|
|
365
|
+
__decorate([
|
|
366
|
+
Job.property(),
|
|
367
|
+
__metadata("design:type", String)
|
|
368
|
+
], Job.prototype, "clientIp", void 0);
|
|
369
|
+
__decorate([
|
|
370
|
+
Job.property(),
|
|
371
|
+
__metadata("design:type", String)
|
|
372
|
+
], Job.prototype, "clientOrigin", void 0);
|
|
365
373
|
__decorate([
|
|
366
374
|
Job.property({ type: User }),
|
|
367
375
|
__metadata("design:type", Object)
|
|
@@ -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,
|
|
@@ -357,7 +357,7 @@ test('can list products with options set', function () {
|
|
|
357
357
|
['notification_recipient', '87'],
|
|
358
358
|
['notification_type', '1'],
|
|
359
359
|
['offset', '0'],
|
|
360
|
-
['or_client_company_id', '321'],
|
|
360
|
+
['or_client_company_id', '321,654'],
|
|
361
361
|
['or_client_id', '123'],
|
|
362
362
|
['order', 'asc'],
|
|
363
363
|
['original_of', '1'],
|
package/dist/entity.js
CHANGED
|
@@ -886,7 +886,10 @@ var Entity = /** @class */ (function () {
|
|
|
886
886
|
fetchOptions.query.push(['or_client_id', options.orClientId.toString()]);
|
|
887
887
|
}
|
|
888
888
|
if (options.orClientCompanyId !== undefined) {
|
|
889
|
-
|
|
889
|
+
var companyIds = Array.isArray(options.orClientCompanyId)
|
|
890
|
+
? options.orClientCompanyId.join(',')
|
|
891
|
+
: options.orClientCompanyId.toString();
|
|
892
|
+
fetchOptions.query.push(['or_client_company_id', companyIds]);
|
|
890
893
|
}
|
|
891
894
|
}
|
|
892
895
|
if (!(options && options.withRights)) {
|
package/package.json
CHANGED
package/src/entities/job.ts
CHANGED
|
@@ -240,6 +240,12 @@ export class Job extends Entity {
|
|
|
240
240
|
@Job.property()
|
|
241
241
|
public clientOs?: string;
|
|
242
242
|
|
|
243
|
+
@Job.property()
|
|
244
|
+
public clientIp?: string;
|
|
245
|
+
|
|
246
|
+
@Job.property()
|
|
247
|
+
public clientOrigin?: string;
|
|
248
|
+
|
|
243
249
|
@Job.property({type: User})
|
|
244
250
|
public manager?: User | null;
|
|
245
251
|
|
|
@@ -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,
|
|
@@ -385,7 +385,7 @@ test('can list products with options set', () => {
|
|
|
385
385
|
['notification_recipient', '87'],
|
|
386
386
|
['notification_type', '1'],
|
|
387
387
|
['offset', '0'],
|
|
388
|
-
['or_client_company_id', '321'],
|
|
388
|
+
['or_client_company_id', '321,654'],
|
|
389
389
|
['or_client_id', '123'],
|
|
390
390
|
['order', 'asc'],
|
|
391
391
|
['original_of', '1'],
|
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;
|
|
@@ -710,8 +710,10 @@ export class Entity {
|
|
|
710
710
|
fetchOptions.query.push(['or_client_id', options.orClientId.toString()]);
|
|
711
711
|
}
|
|
712
712
|
if (options.orClientCompanyId !== undefined) {
|
|
713
|
-
|
|
714
|
-
|
|
713
|
+
const companyIds = Array.isArray(options.orClientCompanyId)
|
|
714
|
+
? options.orClientCompanyId.join(',')
|
|
715
|
+
: options.orClientCompanyId.toString();
|
|
716
|
+
fetchOptions.query.push(['or_client_company_id', companyIds]);
|
|
715
717
|
}
|
|
716
718
|
}
|
|
717
719
|
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,
|