@longvansoftware/storefront-js-client 1.7.3 → 1.7.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.
@@ -7,3 +7,4 @@ export declare const ADD_ATTACHMENT_FOR_WORK_EFFORT: import("graphql").DocumentN
7
7
  export declare const ADD_TICKED: import("graphql").DocumentNode;
8
8
  export declare const ADD_COMMENT: import("graphql").DocumentNode;
9
9
  export declare const CREATE_WORK_EFFORT: import("graphql").DocumentNode;
10
+ export declare const UPDATE_WORK_EFFORT_PROCESS_STATUS: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
3
+ exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = exports.CREATE_WORK_EFFORT = exports.ADD_COMMENT = exports.ADD_TICKED = exports.ADD_ATTACHMENT_FOR_WORK_EFFORT = exports.UPDATE_WORK_EFFORT_STATUS = exports.UPDATE_WORK_EFFORT_NAME = exports.UPDATE_WORK_EFFORT_DESCRIPTION = exports.UPDATE_STATUS_ATTACHMENT_BY_ID = exports.ADD_OPPORTUNITY_MUTATION = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.ADD_OPPORTUNITY_MUTATION = (0, graphql_tag_1.gql) `
6
6
  mutation AddOpportunity(
@@ -106,7 +106,14 @@ exports.UPDATE_WORK_EFFORT_DESCRIPTION = (0, graphql_tag_1.gql) `
106
106
  startDateActual
107
107
  startDateExpect
108
108
  source
109
- ownerId
109
+ owner {
110
+ id
111
+ fullName
112
+ name
113
+ type
114
+ phone
115
+ email
116
+ }
110
117
  priorityName
111
118
  priorityValue
112
119
  connectorId
@@ -151,7 +158,14 @@ exports.UPDATE_WORK_EFFORT_NAME = (0, graphql_tag_1.gql) `
151
158
  startDateActual
152
159
  startDateExpect
153
160
  source
154
- ownerId
161
+ owner {
162
+ id
163
+ fullName
164
+ name
165
+ type
166
+ phone
167
+ email
168
+ }
155
169
  priorityName
156
170
  priorityValue
157
171
  connectorId
@@ -203,7 +217,14 @@ exports.UPDATE_WORK_EFFORT_NAME = (0, graphql_tag_1.gql) `
203
217
  startDateActual
204
218
  startDateExpect
205
219
  source
206
- ownerId
220
+ owner {
221
+ id
222
+ fullName
223
+ name
224
+ type
225
+ phone
226
+ email
227
+ }
207
228
  priorityName
208
229
  priorityValue
209
230
  connectorId
@@ -373,6 +394,7 @@ exports.CREATE_WORK_EFFORT = (0, graphql_tag_1.gql) `
373
394
  $partnerId: String!
374
395
  $createdBy: String!
375
396
  $name: String
397
+ $description: String
376
398
  $workEffortTypeId: String!
377
399
  $source: String!
378
400
  $attributes: JSON
@@ -382,13 +404,319 @@ exports.CREATE_WORK_EFFORT = (0, graphql_tag_1.gql) `
382
404
  partnerId: $partnerId
383
405
  createdBy: $createdBy
384
406
  name: $name
407
+ description: $description
385
408
  workEffortTypeId: $workEffortTypeId
386
409
  source: $source
387
410
  attributes: $attributes
388
411
  addAttachmentRequest: $addAttachmentRequest
389
412
  ) {
413
+ id
414
+ createdStamp
415
+ updatedStamp
416
+ createdBy
417
+ updatedBy
418
+ name
419
+ partyId
420
+ targetId
421
+ targetType
422
+ targetUrl
423
+ description
424
+ status
425
+ parentId
390
426
  workEffortTypeId
427
+ stmId
428
+ workflowId
429
+ endDateExpect
430
+ endDateActual
431
+ startDateActual
432
+ startDateExpect
433
+ source
434
+ owner {
435
+ id
436
+ fullName
437
+ name
438
+ type
439
+ phone
440
+ email
441
+ }
442
+ priorityName
443
+ priorityValue
444
+ connectorId
445
+ mode
446
+ partyGroupIds
447
+ tagIds
448
+ processResult
449
+ processStatus
450
+ subTasks {
451
+ id
452
+ createdStamp
453
+ updatedStamp
454
+ createdBy
455
+ updatedBy
456
+ name
457
+ partyId
458
+ targetId
459
+ targetType
460
+ targetUrl
461
+ description
462
+ status
463
+ parentId
464
+ workEffortTypeId
465
+ stmId
466
+ workflowId
467
+ endDateExpect
468
+ endDateActual
469
+ startDateActual
470
+ startDateExpect
471
+ source
472
+ owner {
473
+ id
474
+ fullName
475
+ name
476
+ type
477
+ phone
478
+ email
479
+ }
480
+ priorityName
481
+ priorityValue
482
+ connectorId
483
+ mode
484
+ partyGroupIds
485
+ tagIds
486
+ processResult
487
+ processStatus
488
+ processPipeline {
489
+ id
490
+ name
491
+ }
492
+ attachments {
493
+ id
494
+ createdStamp
495
+ updatedStamp
496
+ updatedBy
497
+ createdBy
498
+ partyId
499
+ path
500
+ srcId
501
+ srcName
502
+ srcPath
503
+ srcConfigPathId
504
+ name
505
+ fileType
506
+ type
507
+ status
508
+ referId
509
+ }
510
+ subTasks {
511
+ id
512
+ createdStamp
513
+ updatedStamp
514
+ createdBy
515
+ updatedBy
516
+ name
517
+ partyId
518
+ targetId
519
+ targetType
520
+ targetUrl
521
+ description
522
+ status
523
+ parentId
524
+ workEffortTypeId
525
+ stmId
526
+ workflowId
527
+ endDateExpect
528
+ endDateActual
529
+ startDateActual
530
+ startDateExpect
531
+ source
532
+ ownerId
533
+ priorityName
534
+ priorityValue
535
+ connectorId
536
+ mode
537
+ partyGroupIds
538
+ tagIds
539
+ processResult
540
+ processStatus
541
+ }
542
+ actionLink {
543
+ name
544
+ uri
545
+ type
546
+ partyId
547
+ fromCollection
548
+ toCollection
549
+ group
550
+ params
551
+ id
552
+ createdStamp
553
+ updatedStamp
554
+ updatedBy
555
+ createdBy
556
+ }
557
+ }
558
+ attachments {
559
+ id
560
+ createdStamp
561
+ updatedStamp
562
+ updatedBy
563
+ createdBy
564
+ partyId
565
+ path
566
+ srcId
567
+ srcName
568
+ srcPath
569
+ srcConfigPathId
570
+ name
571
+ fileType
572
+ type
573
+ status
574
+ referId
575
+ }
576
+ processPipeline {
577
+ id
578
+ name
579
+ }
580
+ actionLink {
581
+ name
582
+ uri
583
+ type
584
+ partyId
585
+ fromCollection
586
+ toCollection
587
+ group
588
+ params
589
+ id
590
+ createdStamp
591
+ updatedStamp
592
+ updatedBy
593
+ createdBy
594
+ }
595
+ }
596
+ }
597
+ `;
598
+ exports.UPDATE_WORK_EFFORT_PROCESS_STATUS = (0, graphql_tag_1.gql) `
599
+ mutation UpdateWorkEffortProcessStatus(
600
+ $workEffortId: String!
601
+ $processStatus: String!
602
+ $performerId: String!
603
+ ) {
604
+ updateWorkEffortProcessStatus(
605
+ workEffortId: $workEffortId
606
+ processStatus: $processStatus
607
+ performerId: $performerId
608
+ ) {
391
609
  id
610
+ createdStamp
611
+ updatedStamp
612
+ createdBy
613
+ updatedBy
614
+ name
615
+ partyId
616
+ targetId
617
+ targetType
618
+ targetUrl
619
+ description
620
+ status
621
+ parentId
622
+ workEffortTypeId
623
+ stmId
624
+ workflowId
625
+ endDateExpect
626
+ endDateActual
627
+ startDateActual
628
+ startDateExpect
629
+ source
630
+ owner {
631
+ id
632
+ fullName
633
+ name
634
+ type
635
+ phone
636
+ email
637
+ }
638
+ priorityName
639
+ priorityValue
640
+ connectorId
641
+ mode
642
+ partyGroupIds
643
+ tagIds
644
+ processResult
645
+ actionLink {
646
+ name
647
+ uri
648
+ type
649
+ partyId
650
+ fromCollection
651
+ toCollection
652
+ group
653
+ params
654
+ id
655
+ createdStamp
656
+ updatedStamp
657
+ updatedBy
658
+ createdBy
659
+ }
660
+ subTasks {
661
+ id
662
+ createdStamp
663
+ updatedStamp
664
+ createdBy
665
+ updatedBy
666
+ name
667
+ partyId
668
+ targetId
669
+ targetType
670
+ targetUrl
671
+ description
672
+ status
673
+ parentId
674
+ workEffortTypeId
675
+ stmId
676
+ workflowId
677
+ endDateExpect
678
+ endDateActual
679
+ startDateActual
680
+ startDateExpect
681
+ source
682
+ owner {
683
+ id
684
+ fullName
685
+ name
686
+ type
687
+ phone
688
+ email
689
+ }
690
+ priorityName
691
+ priorityValue
692
+ connectorId
693
+ mode
694
+ partyGroupIds
695
+ tagIds
696
+ processResult
697
+ }
698
+ attachments {
699
+ id
700
+ createdStamp
701
+ updatedStamp
702
+ updatedBy
703
+ createdBy
704
+ partyId
705
+ path
706
+ srcId
707
+ srcName
708
+ srcPath
709
+ srcConfigPathId
710
+ name
711
+ fileType
712
+ type
713
+ status
714
+ referId
715
+ }
716
+ processPipeline {
717
+ id
718
+ name
719
+ }
392
720
  }
393
721
  }
394
722
  `;
@@ -25,7 +25,6 @@ exports.GET_LIST_OPPORTUNITY_QUERY = (0, graphql_tag_1.gql) `
25
25
  referEmail
26
26
  id
27
27
  createdBy
28
- ownerId
29
28
  workEffortTypeId
30
29
  partyId
31
30
  name
@@ -173,7 +172,6 @@ exports.GET_LIST_TICKET = (0, graphql_tag_1.gql) `
173
172
  total
174
173
  data {
175
174
  id
176
- ownerId
177
175
  workEffortTypeId
178
176
  partyId
179
177
  name
@@ -328,14 +326,90 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
328
326
  startDateActual
329
327
  startDateExpect
330
328
  source
331
- ownerId
332
329
  priorityName
333
330
  priorityValue
334
331
  connectorId
332
+ owner {
333
+ id
334
+ fullName
335
+ name
336
+ type
337
+ phone
338
+ email
339
+ }
335
340
  mode
336
341
  partyGroupIds
337
342
  tagIds
338
343
  processResult
344
+ processStatus
345
+ processPipeline {
346
+ id
347
+ name
348
+ }
349
+ attachments {
350
+ id
351
+ createdStamp
352
+ updatedStamp
353
+ updatedBy
354
+ createdBy
355
+ partyId
356
+ path
357
+ srcId
358
+ srcName
359
+ srcPath
360
+ srcConfigPathId
361
+ name
362
+ fileType
363
+ type
364
+ status
365
+ referId
366
+ }
367
+ subTasks {
368
+ id
369
+ createdStamp
370
+ updatedStamp
371
+ createdBy
372
+ updatedBy
373
+ name
374
+ partyId
375
+ targetId
376
+ targetType
377
+ targetUrl
378
+ description
379
+ status
380
+ parentId
381
+ workEffortTypeId
382
+ stmId
383
+ workflowId
384
+ endDateExpect
385
+ endDateActual
386
+ startDateActual
387
+ startDateExpect
388
+ source
389
+ priorityName
390
+ priorityValue
391
+ connectorId
392
+ mode
393
+ partyGroupIds
394
+ tagIds
395
+ processResult
396
+ processStatus
397
+ }
398
+ actionLink {
399
+ name
400
+ uri
401
+ type
402
+ partyId
403
+ fromCollection
404
+ toCollection
405
+ group
406
+ params
407
+ id
408
+ createdStamp
409
+ updatedStamp
410
+ updatedBy
411
+ createdBy
412
+ }
339
413
  }
340
414
  }
341
415
  }
@@ -364,14 +438,22 @@ exports.GET_WORK_EFFORT_BY_ID = (0, graphql_tag_1.gql) `
364
438
  startDateActual
365
439
  startDateExpect
366
440
  source
367
- ownerId
368
441
  priorityName
369
442
  priorityValue
370
443
  connectorId
371
444
  mode
372
445
  partyGroupIds
373
446
  tagIds
447
+ owner {
448
+ id
449
+ fullName
450
+ name
451
+ type
452
+ phone
453
+ email
454
+ }
374
455
  processResult
456
+ processStatus
375
457
  processPipeline {
376
458
  id
377
459
  name
@@ -416,7 +498,6 @@ exports.GET_WORK_EFFORT_BY_ID = (0, graphql_tag_1.gql) `
416
498
  startDateActual
417
499
  startDateExpect
418
500
  source
419
- ownerId
420
501
  priorityName
421
502
  priorityValue
422
503
  connectorId
@@ -18,7 +18,8 @@ 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, workEffortTypeId: string, source: string, attributes: object, addAttachmentRequest: AddAttachmentRequest): Promise<any>;
22
- getWorkEfforts(performerId: string, source: string, pageNumber: number, pageSize: number, sorts: BaseSort): Promise<any>;
21
+ createWorkEffort(createdBy: string, name: String, decription: string, workEffortTypeId: string, source: string, attributes: object, addAttachmentRequest: AddAttachmentRequest): Promise<any>;
22
+ getWorkEfforts(performerId: string, workEffortTypeId: string, source: string, pageNumber: number, pageSize: number, sorts: BaseSort): Promise<any>;
23
23
  getWorkEffortById(id: string): Promise<any>;
24
+ updateWorkEffortProcessStatus(workEffortId: string, processStatus: string, performerId: string): Promise<any>;
24
25
  }
@@ -292,13 +292,14 @@ class CrmService extends serviceSDK_1.Service {
292
292
  }
293
293
  });
294
294
  }
295
- createWorkEffort(createdBy, name, workEffortTypeId, source, attributes, addAttachmentRequest) {
295
+ createWorkEffort(createdBy, name, decription, workEffortTypeId, source, attributes, addAttachmentRequest) {
296
296
  return __awaiter(this, void 0, void 0, function* () {
297
297
  const query = mutations_1.CREATE_WORK_EFFORT;
298
298
  const variables = {
299
299
  partnerId: this.orgId,
300
300
  createdBy,
301
301
  name,
302
+ decription,
302
303
  workEffortTypeId,
303
304
  source,
304
305
  attributes,
@@ -313,12 +314,13 @@ class CrmService extends serviceSDK_1.Service {
313
314
  }
314
315
  });
315
316
  }
316
- getWorkEfforts(performerId, source, pageNumber, pageSize, sorts) {
317
+ getWorkEfforts(performerId, workEffortTypeId, source, pageNumber, pageSize, sorts) {
317
318
  return __awaiter(this, void 0, void 0, function* () {
318
319
  const query = queries_1.GET_WORK_EFFORTS;
319
320
  const variables = {
320
321
  partnerId: this.orgId,
321
322
  performerId,
323
+ workEffortTypeId,
322
324
  source,
323
325
  pageNumber,
324
326
  pageSize,
@@ -348,5 +350,22 @@ class CrmService extends serviceSDK_1.Service {
348
350
  }
349
351
  });
350
352
  }
353
+ updateWorkEffortProcessStatus(workEffortId, processStatus, performerId) {
354
+ return __awaiter(this, void 0, void 0, function* () {
355
+ const mutation = mutations_1.UPDATE_WORK_EFFORT_PROCESS_STATUS;
356
+ const variables = {
357
+ workEffortId,
358
+ processStatus,
359
+ performerId
360
+ };
361
+ try {
362
+ const response = yield this.graphqlMutationV2(mutation, variables);
363
+ return response.updateWorkEffortProcessStatus;
364
+ }
365
+ catch (error) {
366
+ throw error;
367
+ }
368
+ });
369
+ }
351
370
  }
352
371
  exports.CrmService = CrmService;
@@ -9,6 +9,11 @@ export interface AddOpportunityRequest {
9
9
  targetId: string;
10
10
  extSource: string;
11
11
  ownerId?: string;
12
+ forms: [Map];
13
+ }
14
+ export interface Map {
15
+ key: string;
16
+ value: string;
12
17
  }
13
18
  export interface AddAttachmentRequestFull {
14
19
  name: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "1.7.3",
3
+ "version": "1.7.5",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [