@longvansoftware/storefront-js-client 3.3.7 → 3.3.9

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.
@@ -6,6 +6,7 @@ export declare const GET_TICKET_BY_ID: import("graphql").DocumentNode;
6
6
  export declare const GET_ATTACHMENT_BY_WORK_EFFORT_ID: import("graphql").DocumentNode;
7
7
  export declare const GET_LIST_COMMENT: import("graphql").DocumentNode;
8
8
  export declare const GET_WORK_EFFORTS: import("graphql").DocumentNode;
9
+ export declare const GET_WORK_EFFORTS_V3: import("graphql").DocumentNode;
9
10
  export declare const GET_WORK_EFFORTS_V2: import("graphql").DocumentNode;
10
11
  export declare const GET_WORK_EFFORT_BY_ID: import("graphql").DocumentNode;
11
12
  export declare const GET_CONNECTOR_BY_RESOURCE: import("graphql").DocumentNode;
@@ -14,3 +15,4 @@ export declare const SEARCH_TOPIC: import("graphql").DocumentNode;
14
15
  export declare const GET_MY_WORK_EFFORT_TODAY: import("graphql").DocumentNode;
15
16
  export declare const GET_MESSAGES: import("graphql").DocumentNode;
16
17
  export declare const GET_RESOURCE_RELATED_TOPIC: import("graphql").DocumentNode;
18
+ export declare const GET_WORK_FLOWS: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_RESOURCE_RELATED_TOPIC = exports.GET_MESSAGES = exports.GET_MY_WORK_EFFORT_TODAY = exports.SEARCH_TOPIC = exports.GET_TAG = exports.GET_CONNECTOR_BY_RESOURCE = exports.GET_WORK_EFFORT_BY_ID = exports.GET_WORK_EFFORTS_V2 = exports.GET_WORK_EFFORTS = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
3
+ exports.GET_WORK_FLOWS = exports.GET_RESOURCE_RELATED_TOPIC = exports.GET_MESSAGES = exports.GET_MY_WORK_EFFORT_TODAY = exports.SEARCH_TOPIC = exports.GET_TAG = exports.GET_CONNECTOR_BY_RESOURCE = exports.GET_WORK_EFFORT_BY_ID = exports.GET_WORK_EFFORTS_V2 = exports.GET_WORK_EFFORTS_V3 = exports.GET_WORK_EFFORTS = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_LIST_OPPORTUNITY_QUERY = (0, graphql_tag_1.gql) `
6
6
  query GetListOpportunity(
@@ -404,6 +404,59 @@ exports.GET_WORK_EFFORTS = (0, graphql_tag_1.gql) `
404
404
  }
405
405
  }
406
406
  `;
407
+ exports.GET_WORK_EFFORTS_V3 = (0, graphql_tag_1.gql) `
408
+ query GetWorkEfforts(
409
+ $partnerId: String!
410
+ $performerId: String!
411
+ $workflowId: String
412
+ $pageNumber: Int!
413
+ $pageSize: Int!
414
+ $sorts: [BaseSort]
415
+ ) {
416
+ getWorkEfforts(
417
+ partnerId: $partnerId
418
+ performerId: $performerId
419
+ workflowId: $workflowId
420
+ pageNumber: $pageNumber
421
+ pageSize: $pageSize
422
+ sorts: $sorts
423
+ ) {
424
+ total
425
+ data {
426
+ id
427
+ createdStamp
428
+ updatedStamp
429
+ createdBy
430
+ updatedBy
431
+ name
432
+ partyId
433
+ targetId
434
+ targetType
435
+ targetUrl
436
+ description
437
+ status
438
+ parentId
439
+ workEffortTypeId
440
+ stmId
441
+ workflowId
442
+ endDateExpect
443
+ endDateActual
444
+ startDateActual
445
+ startDateExpect
446
+ source
447
+ group
448
+ priorityName
449
+ priorityValue
450
+ connectorId
451
+ mode
452
+ partyGroupIds
453
+ tagIds
454
+ processResult
455
+ processStatus
456
+ }
457
+ }
458
+ }
459
+ `;
407
460
  exports.GET_WORK_EFFORTS_V2 = (0, graphql_tag_1.gql) `
408
461
  query GetWorkEfforts(
409
462
  $partnerId: String!
@@ -726,3 +779,20 @@ exports.GET_RESOURCE_RELATED_TOPIC = (0, graphql_tag_1.gql) `
726
779
  getResourceRelatedTopic(topicId: $topicId, resourceType: $resourceType)
727
780
  }
728
781
  `;
782
+ exports.GET_WORK_FLOWS = (0, graphql_tag_1.gql) `
783
+ query GetWorkflows($partnerId: String!, $group: String, $keyword: String) {
784
+ getWorkflows(partnerId: $partnerId, group: $group, keyword: $keyword) {
785
+ id
786
+ name
787
+ group
788
+ createdStamp
789
+ updatedStamp
790
+ updatedBy
791
+ createdBy
792
+ partyId
793
+ actionLinkId
794
+ partyGroupIds
795
+ description
796
+ }
797
+ }
798
+ `;
@@ -45,8 +45,8 @@ exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
45
45
  }
46
46
  `;
47
47
  exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
48
- query PaymentMethods($partnerCode: String) {
49
- paymentMethods(partnerCode: $partnerCode) {
48
+ query PaymentMethods {
49
+ paymentMethods {
50
50
  id
51
51
  code
52
52
  name
@@ -21,6 +21,7 @@ export declare class CrmService extends Service {
21
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
23
  getWorkEfforts(performerId: string, workflowId: string, group: string, pageNumber: number, pageSize: number, sorts: BaseSort, attributes: object, fromDate: any, toDate: any): Promise<any>;
24
+ getWorkEffortsV3(performerId: string, workflowId: string, pageNumber: number, pageSize: number, sorts: BaseSort): Promise<any>;
24
25
  getWorkEffortsV2(performerId: string, workEffortTypeId: string, source: string, fromDate: string, toDate: string): Promise<any>;
25
26
  getWorkEffortById(id: string): Promise<any>;
26
27
  updateWorkEffortProcessStatus(workEffortId: string, processStatus: string, performerId: string): Promise<any>;
@@ -38,4 +39,5 @@ export declare class CrmService extends Service {
38
39
  getMessages(topicId: String, pageSize: Number, pageNumber: Number): Promise<any>;
39
40
  getResourceRelatedTopic(topicId: string, resourceType: string): Promise<any>;
40
41
  addTopicRelatedResource(topicId: string, resourceId: string, resourceType: string, createdBy: string): Promise<any>;
42
+ getWorkflows(group: string, keyword: string): Promise<any>;
41
43
  }
@@ -357,6 +357,26 @@ class CrmService extends serviceSDK_1.Service {
357
357
  }
358
358
  });
359
359
  }
360
+ getWorkEffortsV3(performerId, workflowId, pageNumber, pageSize, sorts) {
361
+ return __awaiter(this, void 0, void 0, function* () {
362
+ const query = queries_1.GET_WORK_EFFORTS_V3;
363
+ const variables = {
364
+ partnerId: this.orgId,
365
+ performerId,
366
+ workflowId,
367
+ pageNumber,
368
+ pageSize,
369
+ sorts,
370
+ };
371
+ try {
372
+ const response = yield this.graphqlQueryV2(query, variables);
373
+ return response.getWorkEfforts;
374
+ }
375
+ catch (error) {
376
+ throw error;
377
+ }
378
+ });
379
+ }
360
380
  getWorkEffortsV2(performerId, workEffortTypeId, source, fromDate, toDate) {
361
381
  return __awaiter(this, void 0, void 0, function* () {
362
382
  const query = queries_1.GET_WORK_EFFORTS_V2;
@@ -648,5 +668,22 @@ class CrmService extends serviceSDK_1.Service {
648
668
  }
649
669
  });
650
670
  }
671
+ getWorkflows(group, keyword) {
672
+ return __awaiter(this, void 0, void 0, function* () {
673
+ const query = queries_1.GET_WORK_FLOWS;
674
+ const variables = {
675
+ partnerId: this.orgId,
676
+ group,
677
+ keyword,
678
+ };
679
+ try {
680
+ const response = yield this.graphqlQuery(query, variables);
681
+ return response.getWorkflows;
682
+ }
683
+ catch (error) {
684
+ throw error;
685
+ }
686
+ });
687
+ }
651
688
  }
652
689
  exports.CrmService = CrmService;
@@ -51,9 +51,7 @@ class PaymentServiceV2 extends serviceSDK_1.Service {
51
51
  paymentMethods() {
52
52
  return __awaiter(this, void 0, void 0, function* () {
53
53
  const query = queries_1.PAYMENT_METHODS;
54
- const variables = {
55
- partnerCode: this.orgId,
56
- };
54
+ const variables = {};
57
55
  try {
58
56
  const response = yield this.graphqlQueryV3(query, variables);
59
57
  return response.paymentMethods;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [