@longvansoftware/storefront-js-client 3.2.5 → 3.2.7
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/src/graphql/campaign/queries.js +2 -0
- package/dist/src/graphql/crm/mutations.js +8 -169
- package/dist/src/graphql/crm/queries.js +4 -5
- package/dist/src/lib/campaign/index.js +1 -0
- package/dist/src/lib/crm/index.d.ts +3 -3
- package/dist/src/lib/crm/index.js +8 -9
- package/dist/src/lib/fileService/index.js +2 -2
- package/package.json +1 -1
|
@@ -373,6 +373,7 @@ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
|
373
373
|
$storeId: String
|
|
374
374
|
$productIds: [String]
|
|
375
375
|
$campaignActionId: String
|
|
376
|
+
$sort: [BaseSortRequest]
|
|
376
377
|
) {
|
|
377
378
|
searchProductGiftPromotionResponse(
|
|
378
379
|
parameterSearchProductGift: {
|
|
@@ -380,6 +381,7 @@ exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = (0, graphql_tag_1.gql) `
|
|
|
380
381
|
storeId: $storeId
|
|
381
382
|
productIds: $productIds
|
|
382
383
|
campaignActionId: $campaignActionId
|
|
384
|
+
sort: $sort
|
|
383
385
|
}
|
|
384
386
|
) {
|
|
385
387
|
total
|
|
@@ -256,14 +256,14 @@ exports.UPDATE_WORK_EFFORT_STATUS = (0, graphql_tag_1.gql) `
|
|
|
256
256
|
$partyId: String!
|
|
257
257
|
$performerId: String!
|
|
258
258
|
$workEffortId: String!
|
|
259
|
-
$
|
|
260
|
-
$status:
|
|
259
|
+
$group: String
|
|
260
|
+
$status: WorkEffortStatus!
|
|
261
261
|
) {
|
|
262
262
|
updateWorkEffortStatus(
|
|
263
263
|
partyId: $partyId
|
|
264
264
|
performerId: $performerId
|
|
265
265
|
workEffortId: $workEffortId
|
|
266
|
-
|
|
266
|
+
group: $group
|
|
267
267
|
status: $status
|
|
268
268
|
) {
|
|
269
269
|
id
|
|
@@ -287,28 +287,14 @@ exports.UPDATE_WORK_EFFORT_STATUS = (0, graphql_tag_1.gql) `
|
|
|
287
287
|
startDateActual
|
|
288
288
|
startDateExpect
|
|
289
289
|
source
|
|
290
|
-
owner {
|
|
291
|
-
id
|
|
292
|
-
fullName
|
|
293
|
-
name
|
|
294
|
-
type
|
|
295
|
-
phone
|
|
296
|
-
email
|
|
297
|
-
}
|
|
298
290
|
priorityName
|
|
299
291
|
priorityValue
|
|
300
|
-
extSource
|
|
301
|
-
extSourceTopicId
|
|
302
|
-
extSourceSocialAppId
|
|
303
|
-
extSourceSupportChannelType
|
|
304
|
-
extSourceSocialChannelType
|
|
305
|
-
extSourceSocialAppName
|
|
306
|
-
extSourceTopicUrl
|
|
307
292
|
connectorId
|
|
308
293
|
mode
|
|
309
294
|
partyGroupIds
|
|
310
295
|
tagIds
|
|
311
296
|
processResult
|
|
297
|
+
processStatus
|
|
312
298
|
}
|
|
313
299
|
}
|
|
314
300
|
`;
|
|
@@ -402,20 +388,18 @@ exports.CREATE_WORK_EFFORT = (0, graphql_tag_1.gql) `
|
|
|
402
388
|
$createdBy: String!
|
|
403
389
|
$name: String
|
|
404
390
|
$description: String
|
|
405
|
-
$
|
|
406
|
-
$
|
|
391
|
+
$workflowId: String
|
|
392
|
+
$group: String
|
|
407
393
|
$attributes: JSON
|
|
408
|
-
$parentId: String
|
|
409
394
|
) {
|
|
410
395
|
createWorkEffort(
|
|
411
396
|
partnerId: $partnerId
|
|
412
397
|
createdBy: $createdBy
|
|
413
398
|
name: $name
|
|
414
399
|
description: $description
|
|
415
|
-
|
|
416
|
-
|
|
400
|
+
workflowId: $workflowId
|
|
401
|
+
group: $group
|
|
417
402
|
attributes: $attributes
|
|
418
|
-
parentId: $parentId
|
|
419
403
|
) {
|
|
420
404
|
id
|
|
421
405
|
createdStamp
|
|
@@ -438,14 +422,6 @@ exports.CREATE_WORK_EFFORT = (0, graphql_tag_1.gql) `
|
|
|
438
422
|
startDateActual
|
|
439
423
|
startDateExpect
|
|
440
424
|
source
|
|
441
|
-
owner {
|
|
442
|
-
id
|
|
443
|
-
fullName
|
|
444
|
-
name
|
|
445
|
-
type
|
|
446
|
-
phone
|
|
447
|
-
email
|
|
448
|
-
}
|
|
449
425
|
priorityName
|
|
450
426
|
priorityValue
|
|
451
427
|
connectorId
|
|
@@ -454,143 +430,6 @@ exports.CREATE_WORK_EFFORT = (0, graphql_tag_1.gql) `
|
|
|
454
430
|
tagIds
|
|
455
431
|
processResult
|
|
456
432
|
processStatus
|
|
457
|
-
subTasks {
|
|
458
|
-
id
|
|
459
|
-
createdStamp
|
|
460
|
-
updatedStamp
|
|
461
|
-
createdBy
|
|
462
|
-
updatedBy
|
|
463
|
-
name
|
|
464
|
-
partyId
|
|
465
|
-
targetId
|
|
466
|
-
targetType
|
|
467
|
-
targetUrl
|
|
468
|
-
description
|
|
469
|
-
status
|
|
470
|
-
parentId
|
|
471
|
-
workEffortTypeId
|
|
472
|
-
stmId
|
|
473
|
-
workflowId
|
|
474
|
-
endDateExpect
|
|
475
|
-
endDateActual
|
|
476
|
-
startDateActual
|
|
477
|
-
startDateExpect
|
|
478
|
-
source
|
|
479
|
-
owner {
|
|
480
|
-
id
|
|
481
|
-
fullName
|
|
482
|
-
name
|
|
483
|
-
type
|
|
484
|
-
phone
|
|
485
|
-
email
|
|
486
|
-
}
|
|
487
|
-
priorityName
|
|
488
|
-
priorityValue
|
|
489
|
-
connectorId
|
|
490
|
-
mode
|
|
491
|
-
partyGroupIds
|
|
492
|
-
tagIds
|
|
493
|
-
processResult
|
|
494
|
-
processStatus
|
|
495
|
-
processPipeline {
|
|
496
|
-
id
|
|
497
|
-
name
|
|
498
|
-
}
|
|
499
|
-
attachments {
|
|
500
|
-
id
|
|
501
|
-
createdStamp
|
|
502
|
-
updatedStamp
|
|
503
|
-
updatedBy
|
|
504
|
-
createdBy
|
|
505
|
-
partyId
|
|
506
|
-
path
|
|
507
|
-
srcId
|
|
508
|
-
srcName
|
|
509
|
-
srcPath
|
|
510
|
-
srcConfigPathId
|
|
511
|
-
name
|
|
512
|
-
fileType
|
|
513
|
-
type
|
|
514
|
-
status
|
|
515
|
-
referId
|
|
516
|
-
}
|
|
517
|
-
subTasks {
|
|
518
|
-
id
|
|
519
|
-
createdStamp
|
|
520
|
-
updatedStamp
|
|
521
|
-
createdBy
|
|
522
|
-
updatedBy
|
|
523
|
-
name
|
|
524
|
-
partyId
|
|
525
|
-
targetId
|
|
526
|
-
targetType
|
|
527
|
-
targetUrl
|
|
528
|
-
description
|
|
529
|
-
status
|
|
530
|
-
parentId
|
|
531
|
-
workEffortTypeId
|
|
532
|
-
stmId
|
|
533
|
-
workflowId
|
|
534
|
-
endDateExpect
|
|
535
|
-
endDateActual
|
|
536
|
-
startDateActual
|
|
537
|
-
startDateExpect
|
|
538
|
-
source
|
|
539
|
-
owner {
|
|
540
|
-
id
|
|
541
|
-
fullName
|
|
542
|
-
name
|
|
543
|
-
type
|
|
544
|
-
phone
|
|
545
|
-
email
|
|
546
|
-
}
|
|
547
|
-
priorityName
|
|
548
|
-
priorityValue
|
|
549
|
-
connectorId
|
|
550
|
-
mode
|
|
551
|
-
partyGroupIds
|
|
552
|
-
tagIds
|
|
553
|
-
processResult
|
|
554
|
-
processStatus
|
|
555
|
-
}
|
|
556
|
-
actionLink {
|
|
557
|
-
name
|
|
558
|
-
uri
|
|
559
|
-
type
|
|
560
|
-
partyId
|
|
561
|
-
fromCollection
|
|
562
|
-
toCollection
|
|
563
|
-
group
|
|
564
|
-
params
|
|
565
|
-
id
|
|
566
|
-
createdStamp
|
|
567
|
-
updatedStamp
|
|
568
|
-
updatedBy
|
|
569
|
-
createdBy
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
attachments {
|
|
573
|
-
id
|
|
574
|
-
createdStamp
|
|
575
|
-
updatedStamp
|
|
576
|
-
updatedBy
|
|
577
|
-
createdBy
|
|
578
|
-
partyId
|
|
579
|
-
path
|
|
580
|
-
srcId
|
|
581
|
-
srcName
|
|
582
|
-
srcPath
|
|
583
|
-
srcConfigPathId
|
|
584
|
-
name
|
|
585
|
-
fileType
|
|
586
|
-
type
|
|
587
|
-
status
|
|
588
|
-
referId
|
|
589
|
-
}
|
|
590
|
-
processPipeline {
|
|
591
|
-
id
|
|
592
|
-
name
|
|
593
|
-
}
|
|
594
433
|
}
|
|
595
434
|
}
|
|
596
435
|
`;
|
|
@@ -288,8 +288,8 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
|
|
|
288
288
|
query GetWorkEfforts(
|
|
289
289
|
$partnerId: String!
|
|
290
290
|
$performerId: String!
|
|
291
|
-
$
|
|
292
|
-
$
|
|
291
|
+
$workflowId: String
|
|
292
|
+
$group: String!
|
|
293
293
|
$pageNumber: Int!
|
|
294
294
|
$pageSize: Int!
|
|
295
295
|
$sorts: [BaseSort]
|
|
@@ -300,8 +300,8 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
|
|
|
300
300
|
getWorkEfforts(
|
|
301
301
|
partnerId: $partnerId
|
|
302
302
|
performerId: $performerId
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
workflowId: $workflowId
|
|
304
|
+
group: $group
|
|
305
305
|
pageNumber: $pageNumber
|
|
306
306
|
pageSize: $pageSize
|
|
307
307
|
sorts: $sorts
|
|
@@ -324,7 +324,6 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
|
|
|
324
324
|
description
|
|
325
325
|
status
|
|
326
326
|
parentId
|
|
327
|
-
workEffortTypeId
|
|
328
327
|
stmId
|
|
329
328
|
workflowId
|
|
330
329
|
endDateExpect
|
|
@@ -203,6 +203,7 @@ class CampaignService extends serviceSDK_1.Service {
|
|
|
203
203
|
storeId: this.storeId,
|
|
204
204
|
productIds: productIds,
|
|
205
205
|
campaignActionId: campaignActionId,
|
|
206
|
+
sort: { asc: true, key: "createdStamp" },
|
|
206
207
|
};
|
|
207
208
|
try {
|
|
208
209
|
const response = yield this.graphqlQuery(query, variables);
|
|
@@ -10,7 +10,7 @@ export declare class CrmService extends Service {
|
|
|
10
10
|
updateStatusAttachmentById(performerId: string, attachmentId: string, status: string): Promise<any>;
|
|
11
11
|
updateWorkEffortDescription(performerId: string, workEffortId: string, description: string): Promise<any>;
|
|
12
12
|
updateWorkEffortName(performerId: string, workEffortId: string, name: string): Promise<any>;
|
|
13
|
-
updateWorkEffortStatus(performerId: string, workEffortId: string,
|
|
13
|
+
updateWorkEffortStatus(performerId: string, workEffortId: string, group: string, status: string): Promise<any>;
|
|
14
14
|
addAttachmentForWorkEffort(performerId: string, workEffortId: string, addAttachmentRequest: AddAttachmentRequest): Promise<any>;
|
|
15
15
|
getListTicket(performerId: string, getTicketRequest: getTicketRequest): Promise<any>;
|
|
16
16
|
addTicket(performerId: string, addTicketRequest: AddTicketRequest, addAttachmentRequest: [AddAttachmentRequest]): Promise<any>;
|
|
@@ -18,9 +18,9 @@ export declare class CrmService extends Service {
|
|
|
18
18
|
getAttachmentByWorkEffortId(workEffortIds: [string]): Promise<any>;
|
|
19
19
|
getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
|
|
20
20
|
addComment(params: any): Promise<any>;
|
|
21
|
-
createWorkEffort(createdBy: string, name: String, decription: string,
|
|
21
|
+
createWorkEffort(createdBy: string, name: String, decription: string, workflowId: string, group: string, attributes: object): Promise<any>;
|
|
22
22
|
createWorkEffortV2(createdBy: string, name: string, decription: string, workEffortTypeId: string, source: string): Promise<any>;
|
|
23
|
-
getWorkEfforts(performerId: string,
|
|
23
|
+
getWorkEfforts(performerId: string, workflowId: string, group: string, pageNumber: number, pageSize: number, sorts: BaseSort, attributes: object, fromDate: any, toDate: any): Promise<any>;
|
|
24
24
|
getWorkEffortsV2(performerId: string, workEffortTypeId: string, source: string, fromDate: string, toDate: string): Promise<any>;
|
|
25
25
|
getWorkEffortById(id: string): Promise<any>;
|
|
26
26
|
updateWorkEffortProcessStatus(workEffortId: string, processStatus: string, performerId: string): Promise<any>;
|
|
@@ -145,14 +145,14 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
145
145
|
}
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
updateWorkEffortStatus(performerId, workEffortId,
|
|
148
|
+
updateWorkEffortStatus(performerId, workEffortId, group, status) {
|
|
149
149
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
150
|
const mutation = mutations_1.UPDATE_WORK_EFFORT_STATUS;
|
|
151
151
|
const variables = {
|
|
152
152
|
partyId: this.orgId,
|
|
153
153
|
performerId,
|
|
154
154
|
workEffortId,
|
|
155
|
-
|
|
155
|
+
group,
|
|
156
156
|
status,
|
|
157
157
|
};
|
|
158
158
|
try {
|
|
@@ -292,7 +292,7 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
292
292
|
}
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
createWorkEffort(createdBy, name, decription,
|
|
295
|
+
createWorkEffort(createdBy, name, decription, workflowId, group, attributes) {
|
|
296
296
|
return __awaiter(this, void 0, void 0, function* () {
|
|
297
297
|
const query = mutations_1.CREATE_WORK_EFFORT;
|
|
298
298
|
const variables = {
|
|
@@ -300,10 +300,9 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
300
300
|
createdBy,
|
|
301
301
|
name,
|
|
302
302
|
decription,
|
|
303
|
-
|
|
304
|
-
|
|
303
|
+
workflowId,
|
|
304
|
+
group,
|
|
305
305
|
attributes,
|
|
306
|
-
parentId,
|
|
307
306
|
};
|
|
308
307
|
try {
|
|
309
308
|
const response = yield this.graphqlMutationV2(query, variables);
|
|
@@ -334,14 +333,14 @@ class CrmService extends serviceSDK_1.Service {
|
|
|
334
333
|
}
|
|
335
334
|
});
|
|
336
335
|
}
|
|
337
|
-
getWorkEfforts(performerId,
|
|
336
|
+
getWorkEfforts(performerId, workflowId, group, pageNumber, pageSize, sorts, attributes, fromDate, toDate) {
|
|
338
337
|
return __awaiter(this, void 0, void 0, function* () {
|
|
339
338
|
const query = queries_1.GET_WORK_EFFORTS;
|
|
340
339
|
const variables = {
|
|
341
340
|
partnerId: this.orgId,
|
|
342
341
|
performerId,
|
|
343
|
-
|
|
344
|
-
|
|
342
|
+
workflowId,
|
|
343
|
+
group,
|
|
345
344
|
pageNumber,
|
|
346
345
|
pageSize,
|
|
347
346
|
sorts,
|
|
@@ -25,7 +25,7 @@ class FileServiceSerVice extends serviceSDK_1.Service {
|
|
|
25
25
|
*/
|
|
26
26
|
uploadFile(uploadFile, path, parentId, parentType) {
|
|
27
27
|
return __awaiter(this, void 0, void 0, function* () {
|
|
28
|
-
const endpoint = `/upload`;
|
|
28
|
+
const endpoint = `/omnichannel/files/upload`;
|
|
29
29
|
const method = "POST";
|
|
30
30
|
try {
|
|
31
31
|
const formData = new FormData();
|
|
@@ -65,7 +65,7 @@ class FileServiceSerVice extends serviceSDK_1.Service {
|
|
|
65
65
|
}
|
|
66
66
|
getImage(parentId, parenttype) {
|
|
67
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
|
-
const endpoint = `/files/gets/${parentId}/${parenttype}`;
|
|
68
|
+
const endpoint = `/omnichannel/files/gets/${parentId}/${parenttype}`;
|
|
69
69
|
const method = "GET";
|
|
70
70
|
try {
|
|
71
71
|
const response = yield this.restApiCallWithNoHeader(endpoint, method);
|