@longvansoftware/service-js-client 1.20.4 → 1.20.6

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.
@@ -19,6 +19,8 @@ export declare const environmentEndpoints: {
19
19
  cloud_rest: string;
20
20
  accounting_service: string;
21
21
  quicklab_service: string;
22
+ remote_access_service: string;
23
+ storage_s3: string;
22
24
  };
23
25
  live: {
24
26
  product: string;
@@ -40,5 +42,7 @@ export declare const environmentEndpoints: {
40
42
  cloud_rest: string;
41
43
  accounting_service: string;
42
44
  quicklab_service: string;
45
+ remote_access_service: string;
46
+ storage_s3: string;
43
47
  };
44
48
  };
@@ -22,6 +22,9 @@ exports.environmentEndpoints = {
22
22
  cloud_rest: "https://api-gateway.dev.longvan.vn/cloud-service-api/v1",
23
23
  accounting_service: "https://api-gateway.dev.longvan.vn/accounting-service/graphql/",
24
24
  quicklab_service: "https://portal.dev.longvan.vn/quicklab-api/graphql",
25
+ remote_access_service: "https://api-gateway.dev.longvan.vn/remote-access-service/graphql",
26
+ // storage_s3: "https://portal.dev.longvan.vn/storage-s3-api/graphql",
27
+ storage_s3: "https://storage-s3-api.dev.longvan.vn/storage-s3-api/graphql",
25
28
  },
26
29
  live: {
27
30
  product: "https://product-service.longvan.vn/product-service/graphql",
@@ -43,5 +46,8 @@ exports.environmentEndpoints = {
43
46
  cloud_rest: "https://api-gateway.longvan.vn/cloud-service-api/v1",
44
47
  accounting_service: "https://api-gateway.longvan.vn/accounting-service/graphql/",
45
48
  quicklab_service: "https://portal.longvan.vn/quicklab-api/graphql",
49
+ remote_access_service: "https://api-gateway.longvan.vn/remote-access-service/graphql",
50
+ // storage_s3: "https://portal.longvan.vn/storage-s3-api/graphql",
51
+ storage_s3: "https://storage-s3-api.longvan.vn/storage-s3-api/graphql",
46
52
  },
47
53
  };
@@ -1,19 +1,21 @@
1
- export declare const CHECK_DOMAIN_NAME_AVAILABLE: import("graphql").DocumentNode;
2
- export declare const CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC: import("graphql").DocumentNode;
3
- export declare const GET_WHOIS_DOMAIN_INFO: import("graphql").DocumentNode;
4
- export declare const SERVICE_DETAIL: import("graphql").DocumentNode;
5
- export declare const GET_MAIL_RESOURCE: import("graphql").DocumentNode;
6
- export declare const GET_USER_MAIL_HOSTING: import("graphql").DocumentNode;
7
- export declare const SERVICE_TYPE: import("graphql").DocumentNode;
8
- export declare const SEARCH_SERVICE: import("graphql").DocumentNode;
9
- export declare const GET_PRODUCTS_OF_SERVICE: import("graphql").DocumentNode;
10
- export declare const GET_IPS_OF_SERVICE: import("graphql").DocumentNode;
11
- export declare const GET_SERVICES_BY_ORDER_ID: import("graphql").DocumentNode;
12
- export declare const GET_SERVICE_TYPE_LIST: import("graphql").DocumentNode;
13
- export declare const GET_DOMAIN_CONTACTS: import("graphql").DocumentNode;
14
- export declare const GET_OWNERS_BY_CUSTOMER_ID: import("graphql").DocumentNode;
15
- export declare const GET_CONTACTS_BY_OWNER_ID: import("graphql").DocumentNode;
16
- export declare const GET_DOMAIN_SUPPLIER: import("graphql").DocumentNode;
17
- export declare const CHECK_DOMAIN_EXIST: import("graphql").DocumentNode;
18
- export declare const SEARCH_ACTIONS: import("graphql").DocumentNode;
19
- export declare const GET_ELASTIC_CLOUD_RESOURCE: import("graphql").DocumentNode;
1
+ import { DocumentNode } from 'graphql';
2
+ export declare const CHECK_DOMAIN_NAME_AVAILABLE: DocumentNode;
3
+ export declare const CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC: DocumentNode;
4
+ export declare const GET_WHOIS_DOMAIN_INFO: DocumentNode;
5
+ export declare const SERVICE_DETAIL: DocumentNode;
6
+ export declare const SERVICE_DETAIL_DYNAMIC: (fields?: string[]) => DocumentNode;
7
+ export declare const GET_MAIL_RESOURCE: DocumentNode;
8
+ export declare const GET_USER_MAIL_HOSTING: DocumentNode;
9
+ export declare const SERVICE_TYPE: DocumentNode;
10
+ export declare const SEARCH_SERVICE: DocumentNode;
11
+ export declare const GET_PRODUCTS_OF_SERVICE: DocumentNode;
12
+ export declare const GET_IPS_OF_SERVICE: DocumentNode;
13
+ export declare const GET_SERVICES_BY_ORDER_ID: DocumentNode;
14
+ export declare const GET_SERVICE_TYPE_LIST: DocumentNode;
15
+ export declare const GET_DOMAIN_CONTACTS: DocumentNode;
16
+ export declare const GET_OWNERS_BY_CUSTOMER_ID: DocumentNode;
17
+ export declare const GET_CONTACTS_BY_OWNER_ID: DocumentNode;
18
+ export declare const GET_DOMAIN_SUPPLIER: DocumentNode;
19
+ export declare const CHECK_DOMAIN_EXIST: DocumentNode;
20
+ export declare const SEARCH_ACTIONS: DocumentNode;
21
+ export declare const GET_ELASTIC_CLOUD_RESOURCE: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
3
+ exports.GET_ELASTIC_CLOUD_RESOURCE = exports.SEARCH_ACTIONS = exports.CHECK_DOMAIN_EXIST = exports.GET_DOMAIN_SUPPLIER = exports.GET_CONTACTS_BY_OWNER_ID = exports.GET_OWNERS_BY_CUSTOMER_ID = exports.GET_DOMAIN_CONTACTS = exports.GET_SERVICE_TYPE_LIST = exports.GET_SERVICES_BY_ORDER_ID = exports.GET_IPS_OF_SERVICE = exports.GET_PRODUCTS_OF_SERVICE = exports.SEARCH_SERVICE = exports.SERVICE_TYPE = exports.GET_USER_MAIL_HOSTING = exports.GET_MAIL_RESOURCE = exports.SERVICE_DETAIL_DYNAMIC = exports.SERVICE_DETAIL = exports.GET_WHOIS_DOMAIN_INFO = exports.CHECK_DOMAIN_NAME_AVAILAVLE_VNNIC = exports.CHECK_DOMAIN_NAME_AVAILABLE = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.CHECK_DOMAIN_NAME_AVAILABLE = (0, graphql_tag_1.gql) `
6
6
  query CheckDomainNameAvailable($domainName: String!) {
@@ -94,6 +94,18 @@ exports.SERVICE_DETAIL = (0, graphql_tag_1.gql) `
94
94
  }
95
95
  }
96
96
  `;
97
+ const SERVICE_DETAIL_DYNAMIC = (fields = []) => {
98
+ const fieldStr = fields.join('\n ');
99
+ const hasFields = fields.length > 0;
100
+ return (0, graphql_tag_1.gql) `
101
+ query ServiceDetail($serviceId: String) {
102
+ serviceDetail(serviceId: $serviceId) {
103
+ ${hasFields ? `${fieldStr}` : ''}
104
+ }
105
+ }
106
+ `;
107
+ };
108
+ exports.SERVICE_DETAIL_DYNAMIC = SERVICE_DETAIL_DYNAMIC;
97
109
  exports.GET_MAIL_RESOURCE = (0, graphql_tag_1.gql) `
98
110
  query GetMailResource($serviceId: String!) {
99
111
  getMailResource(serviceId: $serviceId) {
@@ -8,3 +8,4 @@ export declare const GET_NUMBER_OF_TICKET_EVALUATION: import("graphql").Document
8
8
  export declare const SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE: import("graphql").DocumentNode;
9
9
  export declare const GET_VOUCHERS_V2: import("graphql").DocumentNode;
10
10
  export declare const SEARCH_CAMPAIGN: import("graphql").DocumentNode;
11
+ export declare const GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS: import("graphql").DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SEARCH_CAMPAIGN = exports.GET_VOUCHERS_V2 = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
3
+ exports.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS = exports.SEARCH_CAMPAIGN = exports.GET_VOUCHERS_V2 = exports.SEARCH_PRODUCT_GIFT_PROMOTION_RESPONSE = exports.GET_NUMBER_OF_TICKET_EVALUATION = exports.GET_URL_EVALUATION = exports.GET_AVERAGE_RATING = exports.GET_VOUCHERS = exports.SUGGEST_VOUCHER = exports.GET_CAMPAIGN_ACTION_BY_ID = exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.SEARCH_PRODUCT_QUANTITY_PROMOTION_ACTION = (0, graphql_tag_1.gql) `
6
6
  query SearchProductQuantityPromotionAction(
@@ -361,3 +361,27 @@ exports.SEARCH_CAMPAIGN = (0, graphql_tag_1.gql) `
361
361
  }
362
362
  }
363
363
  `;
364
+ exports.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS = (0, graphql_tag_1.gql) `
365
+ query GetConditionByOrgIdCampaignActionIds(
366
+ $orgId: String!
367
+ $campaignActionIds: [String]!
368
+ ) {
369
+ getConditionByOrgIdCampaignActionIds(
370
+ orgId: $orgId
371
+ campaignActionIds: $campaignActionIds
372
+ ) {
373
+ partyId
374
+ campaignActionId
375
+ type
376
+ minimumSpend
377
+ maximumSpend
378
+ description
379
+ newCustomer
380
+ id
381
+ createdStamp
382
+ updatedStamp
383
+ updatedBy
384
+ createdBy
385
+ }
386
+ }
387
+ `;
@@ -24,3 +24,4 @@ export declare const GET_TAGS: DocumentNode;
24
24
  export declare const GET_TAGS_BY_CATEGORY: DocumentNode;
25
25
  export declare const GET_LIST_PRODUCTS_CONFIG_DYNAMIC: (fields?: string[]) => DocumentNode;
26
26
  export declare const GET_CATEGORIES: DocumentNode;
27
+ export declare const GET_PRICE_MENUS: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_CATEGORIES = exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS_DYNAMIC = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
3
+ exports.GET_PRICE_MENUS = exports.GET_CATEGORIES = exports.GET_LIST_PRODUCTS_CONFIG_DYNAMIC = exports.GET_TAGS_BY_CATEGORY = exports.GET_TAGS = exports.GET_LIST_PRICE = exports.GET_DETAIL_STORES = exports.GET_RELATED_INFOR = exports.GET_PRODUCT_VARIANT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_VARIANT_BY_ID = exports.GET_RESOURCE_BY_PRODUCT = exports.GET_HANDLE_BY_SERVICETYPE = exports.GET_PRODUCTS_DYNAMIC = exports.GET_PRODUCTS = exports.GET_POLICY = exports.GET_PRODUCT_OPTION = exports.GET_BRAND_DETAIL_QUERY = exports.GET_BRANDS_BY_CATEGORY_QUERY = exports.GET_BRANDS_QUERY = exports.GET_CATEGORY_BY_ID_QUERY = exports.GET_CATEGORY_BY_HANDLE_QUERY = exports.GET_CATEGORIES_QUERY = exports.GET_SIMPLE_PRODUCTS_QUERY = exports.GET_PRODUCT_BY_SLUG_QUERY = exports.GET_PRODUCT_BY_ID_QUERY_DYNAMIC = exports.GET_PRODUCT_BY_ID_QUERY = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  // export const GET_PRODUCT_BY_ID_QUERY = gql`
6
6
  // query GetProductById(
@@ -1058,3 +1058,48 @@ exports.GET_CATEGORIES = (0, graphql_tag_1.gql) `
1058
1058
  }
1059
1059
  }
1060
1060
  `;
1061
+ exports.GET_PRICE_MENUS = (0, graphql_tag_1.gql) `
1062
+ query GetPriceMenus(
1063
+ $partnerId: String!
1064
+ $storeId: String!
1065
+ $categoryId: String!
1066
+ ) {
1067
+ getPriceMenus(
1068
+ partnerId: $partnerId
1069
+ storeId: $storeId
1070
+ categoryId: $categoryId
1071
+ ) {
1072
+ name
1073
+ products {
1074
+ id
1075
+ title
1076
+ subType
1077
+ sku
1078
+ shortDescription
1079
+ vat
1080
+ unitDTO {
1081
+ id
1082
+ name
1083
+ }
1084
+ qualify
1085
+ handle
1086
+ price
1087
+ displayPrice
1088
+ hint
1089
+ compareAtPrices
1090
+ priceUnit
1091
+ priceQuantity
1092
+ priceType
1093
+ salePolicy
1094
+ priceTypeName
1095
+ priceVaries
1096
+ available
1097
+ tags
1098
+ compareAtPrice
1099
+ featuredImage
1100
+ version
1101
+ images
1102
+ }
1103
+ }
1104
+ }
1105
+ `;
@@ -15,8 +15,13 @@ export declare const REMOVE_FILE: (fields?: string[]) => DocumentNode;
15
15
  export declare const UPDATE_ACL_PERMISSION_BUCKET: (fields?: string[]) => DocumentNode;
16
16
  export declare const UPDATE_BUCKET_VERSIONING: (fields?: string[]) => DocumentNode;
17
17
  export declare const RESTORE_FILE_TRASH: (fields?: string[]) => DocumentNode;
18
+ export declare const REMOVE_FILE_TRASH: (fields?: string[]) => DocumentNode;
19
+ export declare const RESTORE_FILE_OTHER_VERSION: (fields?: string[]) => DocumentNode;
20
+ export declare const REMOVE_FILE_OTHER_VERSION: (fields?: string[]) => DocumentNode;
18
21
  export declare const ADD_S3_DOMAIN: (fields?: string[]) => DocumentNode;
19
22
  export declare const REMOVE_S3_DOMAIN: (fields?: string[]) => DocumentNode;
20
23
  export declare const ADD_CORS_BUCKET: (fields?: string[]) => DocumentNode;
21
24
  export declare const UPDATE_CORS_BUCKET: (fields?: string[]) => DocumentNode;
22
25
  export declare const REMOVE_CORS_BUCKET: (fields?: string[]) => DocumentNode;
26
+ export declare const RESET_KEY: (fields?: string[]) => DocumentNode;
27
+ export declare const ACTION_SYNC_USER_FROM_S3: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REMOVE_CORS_BUCKET = exports.UPDATE_CORS_BUCKET = exports.ADD_CORS_BUCKET = exports.REMOVE_S3_DOMAIN = exports.ADD_S3_DOMAIN = exports.RESTORE_FILE_TRASH = exports.UPDATE_BUCKET_VERSIONING = exports.UPDATE_ACL_PERMISSION_BUCKET = exports.REMOVE_FILE = exports.MOVE_FILE = exports.COPY_FILE = exports.SHARE_LINK_FILE_BY_TIME = exports.SHARE_LINK_FILE_BY_TIME_DYNAMIC = exports.RENAME_FILE = exports.UPDATE_ACL_PERMISSION_FILE = exports.UPLOAD_FOLDER = exports.REMOVE_FOLDER = exports.CREATE_FOLDER = exports.DELETE_BUCKET = exports.RENAME_BUCKET = exports.CREATE_BUCKET = void 0;
3
+ exports.ACTION_SYNC_USER_FROM_S3 = exports.RESET_KEY = exports.REMOVE_CORS_BUCKET = exports.UPDATE_CORS_BUCKET = exports.ADD_CORS_BUCKET = exports.REMOVE_S3_DOMAIN = exports.ADD_S3_DOMAIN = exports.REMOVE_FILE_OTHER_VERSION = exports.RESTORE_FILE_OTHER_VERSION = exports.REMOVE_FILE_TRASH = exports.RESTORE_FILE_TRASH = exports.UPDATE_BUCKET_VERSIONING = exports.UPDATE_ACL_PERMISSION_BUCKET = exports.REMOVE_FILE = exports.MOVE_FILE = exports.COPY_FILE = exports.SHARE_LINK_FILE_BY_TIME = exports.SHARE_LINK_FILE_BY_TIME_DYNAMIC = exports.RENAME_FILE = exports.UPDATE_ACL_PERMISSION_FILE = exports.UPLOAD_FOLDER = exports.REMOVE_FOLDER = exports.CREATE_FOLDER = exports.DELETE_BUCKET = exports.RENAME_BUCKET = exports.CREATE_BUCKET = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  const CREATE_BUCKET = (fields = []) => {
6
6
  const fieldStr = fields.join('\n ');
@@ -333,6 +333,70 @@ const RESTORE_FILE_TRASH = (fields = []) => {
333
333
  `;
334
334
  };
335
335
  exports.RESTORE_FILE_TRASH = RESTORE_FILE_TRASH;
336
+ const REMOVE_FILE_TRASH = (fields = []) => {
337
+ const fieldStr = fields.join('\n ');
338
+ const hasFields = fields.length > 0;
339
+ return (0, graphql_tag_1.gql) `
340
+ mutation RemoveFileTrash(
341
+ $s3UserId: String!,
342
+ $bucketId: String!,
343
+ $files: [FileTrashInput!]!
344
+ ) {
345
+ removeFileTrash(
346
+ s3UserId: $s3UserId,
347
+ bucketId: $bucketId,
348
+ files: $files
349
+ ) {
350
+ ${hasFields ? `${fieldStr}` : ''}
351
+ }
352
+ }
353
+ `;
354
+ };
355
+ exports.REMOVE_FILE_TRASH = REMOVE_FILE_TRASH;
356
+ const RESTORE_FILE_OTHER_VERSION = (fields = []) => {
357
+ const fieldStr = fields.join('\n ');
358
+ const hasFields = fields.length > 0;
359
+ return (0, graphql_tag_1.gql) `
360
+ mutation RestoreFileOtherVersion(
361
+ $s3UserId: String!,
362
+ $bucketId: String!,
363
+ $key: String!,
364
+ $versionId: String!
365
+ ) {
366
+ restoreFileOtherVersion(
367
+ s3UserId: $s3UserId,
368
+ bucketId: $bucketId,
369
+ key: $key,
370
+ versionId: $versionId
371
+ ) {
372
+ ${hasFields ? `${fieldStr}` : ''}
373
+ }
374
+ }
375
+ `;
376
+ };
377
+ exports.RESTORE_FILE_OTHER_VERSION = RESTORE_FILE_OTHER_VERSION;
378
+ const REMOVE_FILE_OTHER_VERSION = (fields = []) => {
379
+ const fieldStr = fields.join('\n ');
380
+ const hasFields = fields.length > 0;
381
+ return (0, graphql_tag_1.gql) `
382
+ mutation RemoveFileOtherVersion(
383
+ $s3UserId: String!,
384
+ $bucketId: String!,
385
+ $key: String!,
386
+ $versionId: String!
387
+ ) {
388
+ removeFileOtherVersion(
389
+ s3UserId: $s3UserId,
390
+ bucketId: $bucketId,
391
+ key: $key,
392
+ versionId: $versionId
393
+ ) {
394
+ ${hasFields ? `${fieldStr}` : ''}
395
+ }
396
+ }
397
+ `;
398
+ };
399
+ exports.REMOVE_FILE_OTHER_VERSION = REMOVE_FILE_OTHER_VERSION;
336
400
  const ADD_S3_DOMAIN = (fields = []) => {
337
401
  const fieldStr = fields.join('\n ');
338
402
  const hasFields = fields.length > 0;
@@ -440,13 +504,11 @@ const REMOVE_CORS_BUCKET = (fields = []) => {
440
504
  const hasFields = fields.length > 0;
441
505
  return (0, graphql_tag_1.gql) `
442
506
  mutation RemoveCorsBucket(
443
- $s3UserId: String!,
444
507
  $bucketId: String!,
445
508
  $corsId: String!,
446
509
  $updateBy: String!
447
510
  ) {
448
511
  removeCorsBucket(
449
- s3UserId: $s3UserId,
450
512
  bucketId: $bucketId,
451
513
  corsId: $corsId,
452
514
  updateBy: $updateBy,
@@ -457,3 +519,39 @@ const REMOVE_CORS_BUCKET = (fields = []) => {
457
519
  `;
458
520
  };
459
521
  exports.REMOVE_CORS_BUCKET = REMOVE_CORS_BUCKET;
522
+ const RESET_KEY = (fields = []) => {
523
+ const fieldStr = fields.join('\n ');
524
+ const hasFields = fields.length > 0;
525
+ return (0, graphql_tag_1.gql) `
526
+ mutation ResetKey(
527
+ $s3UserId: String!,
528
+ $updateBy: String!
529
+ ) {
530
+ resetKey(
531
+ s3UserId: $s3UserId,
532
+ updateBy: $updateBy,
533
+ ) {
534
+ ${hasFields ? `${fieldStr}` : ''}
535
+ }
536
+ }
537
+ `;
538
+ };
539
+ exports.RESET_KEY = RESET_KEY;
540
+ const ACTION_SYNC_USER_FROM_S3 = (fields = []) => {
541
+ const fieldStr = fields.join('\n ');
542
+ const hasFields = fields.length > 0;
543
+ return (0, graphql_tag_1.gql) `
544
+ mutation ActionSyncUserFromS3(
545
+ $s3UserId: String!,
546
+ $updateBy: String!
547
+ ) {
548
+ actionSyncUserFromS3(
549
+ s3UserId: $s3UserId,
550
+ updateBy: $updateBy,
551
+ ) {
552
+ ${hasFields ? `${fieldStr}` : ''}
553
+ }
554
+ }
555
+ `;
556
+ };
557
+ exports.ACTION_SYNC_USER_FROM_S3 = ACTION_SYNC_USER_FROM_S3;
@@ -5,4 +5,5 @@ export declare const GET_LIST_OBJECT: (fields?: string[]) => DocumentNode;
5
5
  export declare const GET_LIST_FILE_TRASH: (fields?: string[]) => DocumentNode;
6
6
  export declare const GET_LIST_S3_DOMAIN_BY_S3_USER_ID: (fields?: string[]) => DocumentNode;
7
7
  export declare const GET_LIST_CORS_BY_S3_USER_ID: (fields?: string[]) => DocumentNode;
8
+ export declare const GET_LIST_FILE_OTHER_VERSION: (fields?: string[]) => DocumentNode;
8
9
  export declare const CHART_IN_YEAR: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CHART_IN_YEAR = exports.GET_LIST_CORS_BY_S3_USER_ID = exports.GET_LIST_S3_DOMAIN_BY_S3_USER_ID = exports.GET_LIST_FILE_TRASH = exports.GET_LIST_OBJECT = exports.GET_LIST_BUCKET_BY_S3_USER_ID = exports.GET_LIST_S3_USER_BY_SERVICE_ID = void 0;
3
+ exports.CHART_IN_YEAR = exports.GET_LIST_FILE_OTHER_VERSION = exports.GET_LIST_CORS_BY_S3_USER_ID = exports.GET_LIST_S3_DOMAIN_BY_S3_USER_ID = exports.GET_LIST_FILE_TRASH = exports.GET_LIST_OBJECT = exports.GET_LIST_BUCKET_BY_S3_USER_ID = exports.GET_LIST_S3_USER_BY_SERVICE_ID = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  const GET_LIST_S3_USER_BY_SERVICE_ID = (fields = []) => {
6
6
  const fieldStr = fields.join('\n ');
@@ -74,12 +74,24 @@ const GET_LIST_CORS_BY_S3_USER_ID = (fields = []) => {
74
74
  `;
75
75
  };
76
76
  exports.GET_LIST_CORS_BY_S3_USER_ID = GET_LIST_CORS_BY_S3_USER_ID;
77
+ const GET_LIST_FILE_OTHER_VERSION = (fields = []) => {
78
+ const fieldStr = fields.join('\n ');
79
+ const hasFields = fields.length > 0;
80
+ return (0, graphql_tag_1.gql) `
81
+ query GetListFileOtherVersion($s3UserId: String!, $bucketId: String!, $key: String) {
82
+ getListFileOtherVersion(s3UserId: $s3UserId, bucketId: $bucketId, key: $key) {
83
+ ${hasFields ? `${fieldStr}` : ''}
84
+ }
85
+ }
86
+ `;
87
+ };
88
+ exports.GET_LIST_FILE_OTHER_VERSION = GET_LIST_FILE_OTHER_VERSION;
77
89
  const CHART_IN_YEAR = (fields = []) => {
78
90
  const fieldStr = fields.join('\n ');
79
91
  const hasFields = fields.length > 0;
80
92
  return (0, graphql_tag_1.gql) `
81
- query ChartInYear($s3UserId: String!, $year: Int!) {
82
- chartInYear(s3UserId: $s3UserId, year: $year) {
93
+ query ChartInYear($s3UserId: String!, $year: Int!, $month: Int!) {
94
+ chartInYear(s3UserId: $s3UserId, year: $year, month: $month) {
83
95
  ${hasFields ? `${fieldStr}` : ''}
84
96
  }
85
97
  }
@@ -17,6 +17,8 @@ import { CloudRestService } from "./cloud_rest";
17
17
  import { OrderCloudRestService } from "./order_cloud_rest";
18
18
  import { AccountingService } from "./accounting_service";
19
19
  import { QuicklabService } from "./quicklab_service";
20
+ import { RemoteAccessService } from "./remote_access_service";
21
+ import { StorageS3Service } from "./storage_s3";
20
22
  export interface Endpoints {
21
23
  product: string;
22
24
  crm: string;
@@ -37,6 +39,8 @@ export interface Endpoints {
37
39
  order_cloud_rest: string;
38
40
  accounting_service: string;
39
41
  quicklab_service: string;
42
+ remote_access_service: string;
43
+ storage_s3: string;
40
44
  }
41
45
  export declare class SDK {
42
46
  orgId: string;
@@ -62,6 +66,8 @@ export declare class SDK {
62
66
  order_cloud_rest: OrderCloudRestService;
63
67
  accounting_service: AccountingService;
64
68
  quicklab_service: QuicklabService;
69
+ remote_access_service: RemoteAccessService;
70
+ storage_s3: StorageS3Service;
65
71
  token: string | null;
66
72
  private endpoints;
67
73
  constructor(orgId: string, storeId: string, storefrontAccessToken: string, environment: string);
@@ -23,6 +23,8 @@ const cloud_rest_1 = require("./cloud_rest");
23
23
  const order_cloud_rest_1 = require("./order_cloud_rest");
24
24
  const accounting_service_1 = require("./accounting_service");
25
25
  const quicklab_service_1 = require("./quicklab_service");
26
+ const remote_access_service_1 = require("./remote_access_service");
27
+ const storage_s3_1 = require("./storage_s3");
26
28
  class SDK {
27
29
  constructor(orgId, storeId, storefrontAccessToken, environment) {
28
30
  this.orgId = orgId;
@@ -56,6 +58,8 @@ class SDK {
56
58
  this.order_cloud_rest = new order_cloud_rest_1.OrderCloudRestService(this.endpoints.order_cloud_rest, orgId, storeId);
57
59
  this.accounting_service = new accounting_service_1.AccountingService(this.endpoints.accounting_service, orgId, storeId);
58
60
  this.quicklab_service = new quicklab_service_1.QuicklabService(this.endpoints.quicklab_service, orgId, storeId);
61
+ this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, orgId, storeId);
62
+ this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, orgId, storeId);
59
63
  // Initialize other services here
60
64
  }
61
65
  setToken(token) {
@@ -80,6 +84,8 @@ class SDK {
80
84
  this.order_cloud_rest.setToken(token);
81
85
  this.accounting_service.setToken(token);
82
86
  this.quicklab_service.setToken(token);
87
+ this.remote_access_service.setToken(token);
88
+ this.storage_s3.setToken(token);
83
89
  // Set token for other services here
84
90
  }
85
91
  // các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
@@ -106,6 +112,8 @@ class SDK {
106
112
  this.order_cloud_rest = new order_cloud_rest_1.OrderCloudRestService(this.endpoints.order_cloud_rest, this.orgId, storeId);
107
113
  this.accounting_service = new accounting_service_1.AccountingService(this.endpoints.accounting_service, this.orgId, storeId);
108
114
  this.quicklab_service = new quicklab_service_1.QuicklabService(this.endpoints.quicklab_service, this.orgId, storeId);
115
+ this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, this.orgId, storeId);
116
+ this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, this.orgId, storeId);
109
117
  }
110
118
  }
111
119
  exports.SDK = SDK;
@@ -11,6 +11,7 @@ export declare class CloudService extends Service {
11
11
  setToken(token: string): void;
12
12
  setStoreId(storeId: string): void;
13
13
  serviceDetail(serviceId: string): Promise<any>;
14
+ serviceDetailDynamic(serviceId: string, fields: string[]): Promise<any>;
14
15
  updateServiceCompleted(serviceId: string, handleBy: string): Promise<any>;
15
16
  updateServiceNew(serviceId: string, handleBy: string): Promise<any>;
16
17
  updateServiceReadyDeploy(serviceId: string, handleBy: string): Promise<any>;
@@ -45,6 +45,22 @@ class CloudService extends serviceSDK_1.Service {
45
45
  }
46
46
  });
47
47
  }
48
+ serviceDetailDynamic(serviceId, fields) {
49
+ return __awaiter(this, void 0, void 0, function* () {
50
+ const query = (0, queries_1.SERVICE_DETAIL_DYNAMIC)(fields);
51
+ const variables = {
52
+ serviceId,
53
+ };
54
+ try {
55
+ const response = yield this.graphqlQueryV2(query, variables);
56
+ return response.serviceDetail;
57
+ }
58
+ catch (error) {
59
+ console.log(`Error in serviceDetailDynamic: ${error}`);
60
+ throw error;
61
+ }
62
+ });
63
+ }
48
64
  updateServiceCompleted(serviceId, handleBy) {
49
65
  return __awaiter(this, void 0, void 0, function* () {
50
66
  const mutation = mutations_1.UPDATE_SERVICE_COMPLETED;
@@ -15,4 +15,5 @@ export declare class CrmCampingService extends Service {
15
15
  addProductGiftPromotion(orderId: string, updatedBy: string, addData: any): Promise<any>;
16
16
  searchVouchersV2(searchVoucherRequest: any): Promise<any>;
17
17
  searchCampaign(searchCampaignRequest: any): Promise<any>;
18
+ getConditionByOrgIdCampaignActionIds(campaignActionIds: [string]): Promise<any>;
18
19
  }
@@ -258,5 +258,22 @@ class CrmCampingService extends serviceSDK_1.Service {
258
258
  }
259
259
  });
260
260
  }
261
+ getConditionByOrgIdCampaignActionIds(campaignActionIds) {
262
+ return __awaiter(this, void 0, void 0, function* () {
263
+ const query = queries_1.GET_CONDITION_BY_ORGID_CAMPAIGN_ACTIONIDS;
264
+ const variables = {
265
+ orgId: this.orgId,
266
+ campaignActionIds,
267
+ };
268
+ try {
269
+ const response = yield this.graphqlQuery(query, variables);
270
+ return response.getConditionByOrgIdCampaignActionIds;
271
+ }
272
+ catch (error) {
273
+ console.log(`Error fetching getConditionByOrgIdCampaignActionIds: ${error}`);
274
+ throw error;
275
+ }
276
+ });
277
+ }
261
278
  }
262
279
  exports.CrmCampingService = CrmCampingService;
@@ -51,4 +51,5 @@ export declare class ProductService extends Service {
51
51
  getTagsByCategory(categoryId: string, storeId: string): Promise<any>;
52
52
  getListProductConfigDynamic(productId: string, store: string, fields: string[]): Promise<any>;
53
53
  getCategories(): Promise<any>;
54
+ getPriceMenus(categoryId: string, store: string): Promise<any>;
54
55
  }
@@ -369,5 +369,23 @@ class ProductService extends serviceSDK_1.Service {
369
369
  }
370
370
  });
371
371
  }
372
+ getPriceMenus(categoryId, store) {
373
+ return __awaiter(this, void 0, void 0, function* () {
374
+ const query = queries_1.GET_PRICE_MENUS;
375
+ const variables = {
376
+ partnerId: this.orgId,
377
+ storeId: store ? store : this.storeId,
378
+ categoryId,
379
+ };
380
+ try {
381
+ const response = yield this.graphqlQuery(query, variables);
382
+ return response.getPriceMenus;
383
+ }
384
+ catch (error) {
385
+ console.log(`Error fetching getPriceMenus by ID: ${error}`);
386
+ throw error;
387
+ }
388
+ });
389
+ }
372
390
  }
373
391
  exports.ProductService = ProductService;
@@ -1,4 +1,4 @@
1
- import { FileInfoInput } from '../../types/storage_s3';
1
+ import { FileInfoInput, FileTrashInput } from '../../types/storage_s3';
2
2
  import { Service } from '../serviceSDK';
3
3
  export declare class StorageS3Service extends Service {
4
4
  constructor(endpoint: string, orgId: string, storeId: string);
@@ -21,12 +21,19 @@ export declare class StorageS3Service extends Service {
21
21
  updateAclPermissionBucket(s3UserId: string, bucketId: string, isPublic: boolean, updateBy: string, fields: string[]): Promise<any>;
22
22
  updateBucketVersioning(s3UserId: string, bucketId: string, isOn: boolean, updateBy: string, fields: string[]): Promise<any>;
23
23
  getListFileTrash(s3UserId: string, bucketId: string, fields: string[]): Promise<any>;
24
+ restoreFileTrash(s3UserId: string, bucketId: string, key: string, versionId: string, fields: string[]): Promise<any>;
25
+ removeFileTrash(s3UserId: string, bucketId: string, files: [FileTrashInput], fields: string[]): Promise<any>;
24
26
  getListS3DomainByS3UserId(s3UserId: string, fields: string[]): Promise<any>;
25
27
  addS3Domain(s3UserId: string, domain: string, byUser: string, fields: string[]): Promise<any>;
26
28
  removeS3Domain(s3UserId: string, domainId: string, byUser: string, fields: string[]): Promise<any>;
27
29
  getListCorsByS3UserId(s3UserId: string, bucketId: string, fields: string[]): Promise<any>;
28
30
  addCorsBucket(s3UserId: string, bucketId: string, allowedMethods: string[], allowedOrigins: string[], allowedHeaders: string[], exposeHeaders: string[], maxAgeSeconds: number, updateBy: string, fields: string[]): Promise<any>;
29
31
  updateCorsBucket(s3UserId: string, bucketId: string, corsId: string, allowedMethods: string[], allowedOrigins: string[], allowedHeaders: string[], exposeHeaders: string[], maxAgeSeconds: number, updateBy: string, fields: string[]): Promise<any>;
30
- removeCorsBucket(s3UserId: string, bucketId: string, corsId: string, updateBy: string, fields: string[]): Promise<any>;
31
- chartInYear(s3UserId: string, year: number, fields: string[]): Promise<any>;
32
+ removeCorsBucket(bucketId: string, corsId: string, updateBy: string, fields: string[]): Promise<any>;
33
+ getListFileOtherVersion(s3UserId: string, bucketId: string, key: string, fields: string[]): Promise<any>;
34
+ restoreFileOtherVersion(s3UserId: string, bucketId: string, key: string, versionId: string, fields: string[]): Promise<any>;
35
+ removeFileOtherVersion(s3UserId: string, bucketId: string, key: string, versionId: string, fields: string[]): Promise<any>;
36
+ resetKey(s3UserId: string, updateBy: string, fields: string[]): Promise<any>;
37
+ actionSyncUserFromS3(s3UserId: string, updateBy: string, fields: string[]): Promise<any>;
38
+ chartInYear(s3UserId: string, year: number, month: number, fields: string[]): Promise<any>;
32
39
  }
@@ -367,6 +367,43 @@ class StorageS3Service extends serviceSDK_1.Service {
367
367
  }
368
368
  });
369
369
  }
370
+ restoreFileTrash(s3UserId, bucketId, key, versionId, fields) {
371
+ return __awaiter(this, void 0, void 0, function* () {
372
+ const mutation = (0, mutations_1.RESTORE_FILE_TRASH)(fields);
373
+ const variables = {
374
+ s3UserId,
375
+ bucketId,
376
+ key,
377
+ versionId
378
+ };
379
+ try {
380
+ const response = yield this.graphqlMutationV2(mutation, variables);
381
+ return response.restoreFileTrash;
382
+ }
383
+ catch (error) {
384
+ console.log(`Error in restoreFileTrash: ${error}`);
385
+ throw error;
386
+ }
387
+ });
388
+ }
389
+ removeFileTrash(s3UserId, bucketId, files, fields) {
390
+ return __awaiter(this, void 0, void 0, function* () {
391
+ const mutation = (0, mutations_1.REMOVE_FILE_TRASH)(fields);
392
+ const variables = {
393
+ s3UserId,
394
+ bucketId,
395
+ files
396
+ };
397
+ try {
398
+ const response = yield this.graphqlMutationV2(mutation, variables);
399
+ return response.removeFileTrash;
400
+ }
401
+ catch (error) {
402
+ console.log(`Error in removeFileTrash: ${error}`);
403
+ throw error;
404
+ }
405
+ });
406
+ }
370
407
  getListS3DomainByS3UserId(s3UserId, fields) {
371
408
  return __awaiter(this, void 0, void 0, function* () {
372
409
  const query = (0, queries_1.GET_LIST_S3_DOMAIN_BY_S3_USER_ID)(fields);
@@ -483,11 +520,10 @@ class StorageS3Service extends serviceSDK_1.Service {
483
520
  }
484
521
  });
485
522
  }
486
- removeCorsBucket(s3UserId, bucketId, corsId, updateBy, fields) {
523
+ removeCorsBucket(bucketId, corsId, updateBy, fields) {
487
524
  return __awaiter(this, void 0, void 0, function* () {
488
525
  const query = (0, mutations_1.REMOVE_CORS_BUCKET)(fields);
489
526
  const variables = {
490
- s3UserId,
491
527
  bucketId,
492
528
  corsId,
493
529
  updateBy,
@@ -502,12 +538,103 @@ class StorageS3Service extends serviceSDK_1.Service {
502
538
  }
503
539
  });
504
540
  }
505
- chartInYear(s3UserId, year, fields) {
541
+ getListFileOtherVersion(s3UserId, bucketId, key, fields) {
542
+ return __awaiter(this, void 0, void 0, function* () {
543
+ const query = (0, queries_1.GET_LIST_FILE_OTHER_VERSION)(fields);
544
+ const variables = {
545
+ s3UserId,
546
+ bucketId,
547
+ key,
548
+ };
549
+ try {
550
+ const response = yield this.graphqlQueryV2(query, variables);
551
+ return response.getListFileOtherVersion;
552
+ }
553
+ catch (error) {
554
+ console.log(`Error in getListFileOtherVersion: ${error}`);
555
+ throw error;
556
+ }
557
+ });
558
+ }
559
+ restoreFileOtherVersion(s3UserId, bucketId, key, versionId, fields) {
560
+ return __awaiter(this, void 0, void 0, function* () {
561
+ const mutation = (0, mutations_1.RESTORE_FILE_OTHER_VERSION)(fields);
562
+ const variables = {
563
+ s3UserId,
564
+ bucketId,
565
+ key,
566
+ versionId
567
+ };
568
+ try {
569
+ const response = yield this.graphqlMutationV2(mutation, variables);
570
+ return response.restoreFileOtherVersion;
571
+ }
572
+ catch (error) {
573
+ console.log(`Error in restoreFileOtherVersion: ${error}`);
574
+ throw error;
575
+ }
576
+ });
577
+ }
578
+ removeFileOtherVersion(s3UserId, bucketId, key, versionId, fields) {
579
+ return __awaiter(this, void 0, void 0, function* () {
580
+ const mutation = (0, mutations_1.REMOVE_FILE_OTHER_VERSION)(fields);
581
+ const variables = {
582
+ s3UserId,
583
+ bucketId,
584
+ key,
585
+ versionId
586
+ };
587
+ try {
588
+ const response = yield this.graphqlMutationV2(mutation, variables);
589
+ return response.removeFileOtherVersion;
590
+ }
591
+ catch (error) {
592
+ console.log(`Error in removeFileOtherVersion: ${error}`);
593
+ throw error;
594
+ }
595
+ });
596
+ }
597
+ resetKey(s3UserId, updateBy, fields) {
598
+ return __awaiter(this, void 0, void 0, function* () {
599
+ const mutation = (0, mutations_1.RESET_KEY)(fields);
600
+ const variables = {
601
+ s3UserId,
602
+ updateBy
603
+ };
604
+ try {
605
+ const response = yield this.graphqlMutationV2(mutation, variables);
606
+ return response.resetKey;
607
+ }
608
+ catch (error) {
609
+ console.log(`Error in resetKey: ${error}`);
610
+ throw error;
611
+ }
612
+ });
613
+ }
614
+ actionSyncUserFromS3(s3UserId, updateBy, fields) {
615
+ return __awaiter(this, void 0, void 0, function* () {
616
+ const mutation = (0, mutations_1.ACTION_SYNC_USER_FROM_S3)(fields);
617
+ const variables = {
618
+ s3UserId,
619
+ updateBy
620
+ };
621
+ try {
622
+ const response = yield this.graphqlMutationV2(mutation, variables);
623
+ return response.resetKey;
624
+ }
625
+ catch (error) {
626
+ console.log(`Error in resetKey: ${error}`);
627
+ throw error;
628
+ }
629
+ });
630
+ }
631
+ chartInYear(s3UserId, year, month, fields) {
506
632
  return __awaiter(this, void 0, void 0, function* () {
507
633
  const query = (0, queries_1.CHART_IN_YEAR)(fields);
508
634
  const variables = {
509
635
  s3UserId,
510
- year
636
+ year,
637
+ month
511
638
  };
512
639
  try {
513
640
  const response = yield this.graphqlQueryV2(query, variables);
@@ -4,3 +4,7 @@ export interface FileInfoInput {
4
4
  size: number;
5
5
  contentType: string;
6
6
  }
7
+ export interface FileTrashInput {
8
+ key: string;
9
+ versionId: string;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "1.20.4",
3
+ "version": "1.20.6",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [