@longvansoftware/service-js-client 2.8.2 → 2.8.4

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.
@@ -22,6 +22,7 @@ export declare const environmentEndpoints: {
22
22
  remote_access_service: string;
23
23
  storage_s3: string;
24
24
  content_api: string;
25
+ marketplace: string;
25
26
  };
26
27
  live: {
27
28
  product: string;
@@ -46,5 +47,6 @@ export declare const environmentEndpoints: {
46
47
  remote_access_service: string;
47
48
  storage_s3: string;
48
49
  content_api: string;
50
+ marketplace: string;
49
51
  };
50
52
  };
@@ -25,7 +25,8 @@ exports.environmentEndpoints = {
25
25
  remote_access_service: "https://api-gateway.longvan.dev/remote-access-service/graphql",
26
26
  // storage_s3: "https://portal.dev.longvan.vn/storage-s3-api/graphql",
27
27
  storage_s3: "https://api-gateway.longvan.dev/storage-s3-api/graphql",
28
- content_api: "https://api-gateway.longvan.dev/content-api/graphql"
28
+ content_api: "https://api-gateway.longvan.dev/content-api/graphql",
29
+ marketplace: "https://api-gateway.longvan.dev/marketplace/graphql"
29
30
  },
30
31
  live: {
31
32
  product: "https://product-service.longvan.vn/product-service/graphql",
@@ -50,6 +51,7 @@ exports.environmentEndpoints = {
50
51
  remote_access_service: "https://api-gateway.longvan.vn/remote-access-service/graphql",
51
52
  // storage_s3: "https://portal.longvan.vn/storage-s3-api/graphql",
52
53
  storage_s3: "https://storage-s3-api.longvan.vn/storage-s3-api/graphql",
53
- content_api: "https://portal.longvan.vn/content-api/graphql"
54
+ content_api: "https://portal.longvan.vn/content-api/graphql",
55
+ marketplace: "https://api-gateway.longvan.vn/marketplace/graphql"
54
56
  }
55
57
  };
@@ -22,3 +22,6 @@ export declare const UPDATE_URL_PUBLIC: DocumentNode;
22
22
  export declare const CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
23
23
  export declare const CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC: (fields?: string[]) => DocumentNode;
24
24
  export declare const CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST: (fields?: string[]) => DocumentNode;
25
+ export declare const REMOVE_RECORD: DocumentNode;
26
+ export declare const UPDATE_RECORD: DocumentNode;
27
+ export declare const SAVE_RECORD: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
3
+ exports.SAVE_RECORD = exports.UPDATE_RECORD = exports.REMOVE_RECORD = exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = exports.CHECK_BUSINESS_BY_TAX_CODE_DYNAMIC = exports.CHECK_ENTERPRISE_BY_TAX_CODE_DYNAMIC = exports.UPDATE_URL_PUBLIC = exports.UPDATE_SERVICE_READY_DEPLOY = exports.UPDATE_SERVICE_NEW = exports.UPDATE_SERVICE_COMPLETED = exports.UPDATE_ACTION_CUSTOM_ATTRIBUTE = exports.UPDATE_ACTION_STATUS = exports.CREATE_ACTION_CHANGE_IP_OF_SERVICE = exports.GET_ORDER_CHANGE_RESOURCE_TERM = exports.CREATE_DOMAIN_CONTACT = exports.UPDATE_DNS = exports.UPDATE_USER_PASSWORD = exports.UPDATE_PASSWORD = exports.UPDATE_USER_NAME = exports.UPDATE_DOMAIN_NAME = exports.DELETE_USER_MAIL_HOSTING = exports.CREATE_USER_MAIL_HOSTING = exports.CHANGE_SERVICE_NAME = exports.CHECK_DOMAIN_NAME = exports.CHECK_LIST_DOMAIN_NAME = exports.GET_DOMAIN_INFO = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.GET_DOMAIN_INFO = (0, graphql_tag_1.gql) `
6
6
  mutation GetDomainInfo($domainName: String! $isClearCache: Boolean) {
@@ -374,3 +374,64 @@ const CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = (fields = []) => {
374
374
  `;
375
375
  };
376
376
  exports.CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST = CONVERT_PRODUCT_RESOURCE_OUTPUTS_TO_PRODUCT_JSON_LIST;
377
+ exports.REMOVE_RECORD = (0, graphql_tag_1.gql) `
378
+ mutation RemoveRecord(
379
+ $serviceId: String!
380
+ $nameRecord: String!
381
+ $typeRecord: String!
382
+ ) {
383
+ removeRecord(
384
+ serviceId: $serviceId
385
+ nameRecord: $nameRecord
386
+ typeRecord: $typeRecord
387
+ )
388
+ }
389
+ `;
390
+ exports.UPDATE_RECORD = (0, graphql_tag_1.gql) `
391
+ mutation UpdateRecord(
392
+ $serviceId: String!
393
+ $record: RecordDnsInput!
394
+ ) {
395
+ updateRecord(
396
+ serviceId: $serviceId
397
+ record: $record
398
+ ) {
399
+ id
400
+ domainName
401
+ domainId
402
+ name
403
+ type
404
+ content
405
+ ttl
406
+ prio
407
+ changeDate
408
+ disabled
409
+ ordername
410
+ auth
411
+ }
412
+ }
413
+ `;
414
+ exports.SAVE_RECORD = (0, graphql_tag_1.gql) `
415
+ mutation SaveRecord(
416
+ $serviceId: String!
417
+ $record: RecordDnsInput!
418
+ ) {
419
+ saveRecord(
420
+ serviceId: $serviceId
421
+ record: $record
422
+ ) {
423
+ id
424
+ domainName
425
+ domainId
426
+ name
427
+ type
428
+ content
429
+ ttl
430
+ prio
431
+ changeDate
432
+ disabled
433
+ ordername
434
+ auth
435
+ }
436
+ }
437
+ `;
@@ -22,3 +22,5 @@ export declare const GET_ELASTIC_CLOUD_RESOURCE: DocumentNode;
22
22
  export declare const SEARCH_SERVICE_DYNAMIC: (fields?: string[]) => DocumentNode;
23
23
  export declare const SEARCH_ACTIONS_DYNAMIC: (fields?: string[]) => DocumentNode;
24
24
  export declare const ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING: DocumentNode;
25
+ export declare const GET_RECORD: DocumentNode;
26
+ export declare const GET_DOMAIN_DNS: DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = exports.SEARCH_ACTIONS_DYNAMIC = exports.SEARCH_SERVICE_DYNAMIC = 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;
3
+ exports.GET_DOMAIN_DNS = exports.GET_RECORD = exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = exports.SEARCH_ACTIONS_DYNAMIC = exports.SEARCH_SERVICE_DYNAMIC = 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!) {
@@ -408,3 +408,36 @@ exports.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING = (0, graphql_tag_1.gql) `
408
408
  addLetsEncryptSSLForMailHosting(serviceId: $serviceId, actorId: $actorId)
409
409
  }
410
410
  `;
411
+ exports.GET_RECORD = (0, graphql_tag_1.gql) `
412
+ query GetRecord($serviceId: String!) {
413
+ getRecord(serviceId: $serviceId) {
414
+ id
415
+ domainName
416
+ domainId
417
+ name
418
+ type
419
+ content
420
+ ttl
421
+ prio
422
+ changeDate
423
+ disabled
424
+ ordername
425
+ auth
426
+ }
427
+ }
428
+ `;
429
+ exports.GET_DOMAIN_DNS = (0, graphql_tag_1.gql) `
430
+ query GetDomainDns($serviceId: String!) {
431
+ getDomainDns(serviceId: $serviceId) {
432
+ id
433
+ name
434
+ master
435
+ lastCheck
436
+ type
437
+ notifiedSerial
438
+ account
439
+ email
440
+ nameServer
441
+ }
442
+ }
443
+ `;
@@ -17,3 +17,4 @@ export declare const GET_RELATED_RESOURCE_BY_RESOURCE_TYPE: DocumentNode;
17
17
  export declare const GET_RESUME_INFO_BY_CUSTOMER_ID: DocumentNode;
18
18
  export declare const GET_RESUME_INFO_BY_CUSTOMER_ID_DYNAMIC: (fields?: string[]) => DocumentNode;
19
19
  export declare const GET_LIST_TICKET_BY_OWNER_DYNAMIC: (fields?: string[]) => DocumentNode;
20
+ export declare const GET_RESUME_ID: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_LIST_TICKET_BY_OWNER_DYNAMIC = exports.GET_RESUME_INFO_BY_CUSTOMER_ID_DYNAMIC = exports.GET_RESUME_INFO_BY_CUSTOMER_ID = exports.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE = exports.GET_COLLEGES_BY_PROVINCE_ID = exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = exports.GET_REUSME_BY_CUSTOMER_ID = exports.GET_RESUME_CONTACT = exports.GET_RESUME_ID_BY_RESOURCE = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_LIST_TICKET_BY_ID_DYNAMIC = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET_DYNAMIC = exports.GET_LIST_TICKET = exports.GET_LIST_WORK_EFFORT_TYPE = exports.GET_LIST_TODO = exports.GET_LIST_OPPORTUNITY_QUERY = void 0;
3
+ exports.GET_RESUME_ID = exports.GET_LIST_TICKET_BY_OWNER_DYNAMIC = exports.GET_RESUME_INFO_BY_CUSTOMER_ID_DYNAMIC = exports.GET_RESUME_INFO_BY_CUSTOMER_ID = exports.GET_RELATED_RESOURCE_BY_RESOURCE_TYPE = exports.GET_COLLEGES_BY_PROVINCE_ID = exports.GET_RESUME_DOMAIN_BY_SERVICE_ID = exports.GET_REUSME_BY_CUSTOMER_ID = exports.GET_RESUME_CONTACT = exports.GET_RESUME_ID_BY_RESOURCE = exports.GET_LIST_COMMENT = exports.GET_ATTACHMENT_BY_WORK_EFFORT_ID = exports.GET_LIST_TICKET_BY_ID_DYNAMIC = exports.GET_TICKET_BY_ID = exports.GET_LIST_TICKET_DYNAMIC = 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(
@@ -479,3 +479,20 @@ const GET_LIST_TICKET_BY_OWNER_DYNAMIC = (fields = []) => {
479
479
  `;
480
480
  };
481
481
  exports.GET_LIST_TICKET_BY_OWNER_DYNAMIC = GET_LIST_TICKET_BY_OWNER_DYNAMIC;
482
+ const GET_RESUME_ID = (fields = []) => {
483
+ const fieldStr = fields.join("\n ");
484
+ const hasFields = fields.length > 0;
485
+ return (0, graphql_tag_1.gql) `
486
+ query getResumeById(
487
+ $resumeId: String!
488
+ ) {
489
+ getResumeById(
490
+ resumeId: $resumeId
491
+ )
492
+ {
493
+ ${hasFields ? `${fieldStr}` : ""}
494
+ }
495
+ }
496
+ `;
497
+ };
498
+ exports.GET_RESUME_ID = GET_RESUME_ID;
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,2 @@
1
+ import { DocumentNode } from "graphql";
2
+ export declare const GET_PUBLIC_PRODUCT_DYNAMIC: (fields?: string[]) => DocumentNode;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_PUBLIC_PRODUCT_DYNAMIC = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ const GET_PUBLIC_PRODUCT_DYNAMIC = (fields = []) => {
6
+ const fieldStr = fields.join("\n ");
7
+ const hasFields = fields.length > 0;
8
+ return (0, graphql_tag_1.gql) `
9
+ query getPublicProduct(
10
+ $storeChannel: String!
11
+ $categoryId: String
12
+ $supplierId: String
13
+ ) {
14
+ getPublicProduct(
15
+ storeChannel: $storeChannel
16
+ categoryId: $categoryId
17
+ supplierId: $supplierId
18
+ ) {
19
+ ${hasFields ? `${fieldStr}` : ""}
20
+ }
21
+ }
22
+ `;
23
+ };
24
+ exports.GET_PUBLIC_PRODUCT_DYNAMIC = GET_PUBLIC_PRODUCT_DYNAMIC;
@@ -8,3 +8,4 @@ export declare const UPDATE_ORDER_LINE_ITEM_PARENT_ID: DocumentNode;
8
8
  export declare const UPDATE_PRODUCT_OPTION_ORDERLINE_ITEM: DocumentNode;
9
9
  export declare const APPLY_REFERRAL_CODE: DocumentNode;
10
10
  export declare const REMOVE_REFERRAL_CODE: DocumentNode;
11
+ export declare const UPDATE_LINE_ITEM_RESOURCE: (fields?: string[]) => DocumentNode;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.REMOVE_REFERRAL_CODE = exports.APPLY_REFERRAL_CODE = exports.UPDATE_PRODUCT_OPTION_ORDERLINE_ITEM = exports.UPDATE_ORDER_LINE_ITEM_PARENT_ID = exports.ADD_ITEM_INTO_ORDER_BY_PRODUCT_JSON_RESOURCE = exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
3
+ exports.UPDATE_LINE_ITEM_RESOURCE = exports.REMOVE_REFERRAL_CODE = exports.APPLY_REFERRAL_CODE = exports.UPDATE_PRODUCT_OPTION_ORDERLINE_ITEM = exports.UPDATE_ORDER_LINE_ITEM_PARENT_ID = exports.ADD_ITEM_INTO_ORDER_BY_PRODUCT_JSON_RESOURCE = exports.REMOVE_PRODUCT_OPTION_ORDER_LINE_ITEM = exports.ADD_TO_CART = exports.UPDATE_QUANTITY_V2 = exports.CREATE_ORDER = void 0;
4
4
  const graphql_tag_1 = require("graphql-tag");
5
5
  exports.CREATE_ORDER = (0, graphql_tag_1.gql) `
6
6
  mutation CreateOrder($input: CreateOrderInput!) {
@@ -408,3 +408,20 @@ exports.REMOVE_REFERRAL_CODE = (0, graphql_tag_1.gql) `
408
408
  removeReferralCode(input: $input)
409
409
  }
410
410
  `;
411
+ const UPDATE_LINE_ITEM_RESOURCE = (fields = []) => {
412
+ const fieldStr = fields.join("\n ");
413
+ const hasFields = fields.length > 0;
414
+ return (0, graphql_tag_1.gql) `
415
+ mutation UpdateLineItemResource($partnerId: String!, $orderId: String!, $lineItem_id: String!, $productConfiguration: ProductConfiguration!, $updateBy: String!){
416
+ updateLineItemResource(
417
+ partnerId: $partnerId
418
+ orderId: $orderId
419
+ lineItem_id: $lineItem_id
420
+ productConfiguration: $productConfiguration
421
+ updateBy: $updateBy
422
+ )
423
+ ${hasFields ? `{ ${fieldStr} }` : ""}
424
+ }
425
+ `;
426
+ };
427
+ exports.UPDATE_LINE_ITEM_RESOURCE = UPDATE_LINE_ITEM_RESOURCE;
@@ -20,6 +20,7 @@ import { QuicklabService } from "./quicklab_service";
20
20
  import { RemoteAccessService } from "./remote_access_service";
21
21
  import { StorageS3Service } from "./storage_s3";
22
22
  import { ContentApiService } from "./content_api";
23
+ import { MarketPlaceService } from "./marketplace";
23
24
  export interface Endpoints {
24
25
  product: string;
25
26
  crm: string;
@@ -43,6 +44,7 @@ export interface Endpoints {
43
44
  remote_access_service: string;
44
45
  storage_s3: string;
45
46
  content_api: string;
47
+ marketplace: string;
46
48
  }
47
49
  export declare class SDK {
48
50
  orgId: string;
@@ -70,6 +72,7 @@ export declare class SDK {
70
72
  quicklab_service: QuicklabService;
71
73
  remote_access_service: RemoteAccessService;
72
74
  storage_s3: StorageS3Service;
75
+ marketplace: MarketPlaceService;
73
76
  content_api: ContentApiService;
74
77
  token: string | null;
75
78
  private endpoints;
@@ -26,6 +26,7 @@ const quicklab_service_1 = require("./quicklab_service");
26
26
  const remote_access_service_1 = require("./remote_access_service");
27
27
  const storage_s3_1 = require("./storage_s3");
28
28
  const content_api_1 = require("./content_api");
29
+ const marketplace_1 = require("./marketplace");
29
30
  class SDK {
30
31
  constructor(orgId, storeId, storefrontAccessToken, environment) {
31
32
  this.orgId = orgId;
@@ -62,6 +63,7 @@ class SDK {
62
63
  this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, orgId, storeId);
63
64
  this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, orgId, storeId);
64
65
  this.content_api = new content_api_1.ContentApiService(this.endpoints.content_api, orgId, storeId);
66
+ this.marketplace = new marketplace_1.MarketPlaceService(this.endpoints.marketplace, orgId, storeId);
65
67
  // Initialize other services here
66
68
  }
67
69
  setToken(token) {
@@ -89,6 +91,7 @@ class SDK {
89
91
  this.remote_access_service.setToken(token);
90
92
  this.storage_s3.setToken(token);
91
93
  this.content_api.setToken(token);
94
+ this.marketplace.setToken(token);
92
95
  // Set token for other services here
93
96
  }
94
97
  // các module export từ serviceSDK.ts set storeId vào serviceSDK.ts
@@ -118,6 +121,7 @@ class SDK {
118
121
  this.remote_access_service = new remote_access_service_1.RemoteAccessService(this.endpoints.remote_access_service, this.orgId, storeId);
119
122
  this.storage_s3 = new storage_s3_1.StorageS3Service(this.endpoints.storage_s3, this.orgId, storeId);
120
123
  this.content_api = new content_api_1.ContentApiService(this.endpoints.content_api, this.orgId, storeId);
124
+ this.marketplace = new marketplace_1.MarketPlaceService(this.endpoints.marketplace, this.orgId, storeId);
121
125
  }
122
126
  }
123
127
  exports.SDK = SDK;
@@ -1,4 +1,4 @@
1
- import { CreateUserMailHosting, DeleteUserPassword, Filter, UpdateInforMationService, UpdateUserPassword } from "../../types/cloud";
1
+ import { CreateUserMailHosting, DeleteUserPassword, DomainDns, Filter, RecordDns, RecordDnsInput, UpdateInforMationService, UpdateUserPassword } from "../../types/cloud";
2
2
  import { Service } from "../serviceSDK";
3
3
  export declare class CloudService extends Service {
4
4
  /**
@@ -56,4 +56,9 @@ export declare class CloudService extends Service {
56
56
  convertProductResourceOutputsToProductJsonList(productResourceInput: any, fields: string[]): Promise<any>;
57
57
  searchActionsDynamic(parameter: any, fields: string[]): Promise<any>;
58
58
  addLetsEncryptSSLForMailHosting(serviceId: string, actorId: string): Promise<any>;
59
+ removeRecord(serviceId: string, nameRecord: string, typeRecord: string): Promise<boolean>;
60
+ updateRecord(serviceId: string, record: RecordDnsInput): Promise<RecordDns>;
61
+ saveRecord(serviceId: string, record: RecordDnsInput): Promise<RecordDns>;
62
+ getRecord(serviceId: string): Promise<RecordDns[]>;
63
+ getDomainDns(serviceId: string): Promise<DomainDns | null>;
59
64
  }
@@ -818,5 +818,89 @@ class CloudService extends serviceSDK_1.Service {
818
818
  }
819
819
  });
820
820
  }
821
+ removeRecord(serviceId, nameRecord, typeRecord) {
822
+ return __awaiter(this, void 0, void 0, function* () {
823
+ const mutation = mutations_1.REMOVE_RECORD;
824
+ const variables = {
825
+ serviceId,
826
+ nameRecord,
827
+ typeRecord,
828
+ };
829
+ try {
830
+ const response = yield this.graphqlMutationV2(mutation, variables);
831
+ return response.removeRecord;
832
+ }
833
+ catch (error) {
834
+ console.log(`Error in removeRecord: ${error}`);
835
+ throw error;
836
+ }
837
+ });
838
+ }
839
+ updateRecord(serviceId, record) {
840
+ return __awaiter(this, void 0, void 0, function* () {
841
+ const mutation = mutations_1.UPDATE_RECORD;
842
+ const variables = {
843
+ serviceId,
844
+ record,
845
+ };
846
+ try {
847
+ const response = yield this.graphqlMutationV2(mutation, variables);
848
+ return response.updateRecord;
849
+ }
850
+ catch (error) {
851
+ console.log(`Error in updateRecord: ${error}`);
852
+ throw error;
853
+ }
854
+ });
855
+ }
856
+ saveRecord(serviceId, record) {
857
+ return __awaiter(this, void 0, void 0, function* () {
858
+ const mutation = mutations_1.SAVE_RECORD;
859
+ const variables = {
860
+ serviceId,
861
+ record,
862
+ };
863
+ try {
864
+ const response = yield this.graphqlMutationV2(mutation, variables);
865
+ return response.saveRecord;
866
+ }
867
+ catch (error) {
868
+ console.log(`Error in saveRecord: ${error}`);
869
+ throw error;
870
+ }
871
+ });
872
+ }
873
+ getRecord(serviceId) {
874
+ return __awaiter(this, void 0, void 0, function* () {
875
+ const query = queries_1.GET_RECORD;
876
+ const variables = {
877
+ serviceId,
878
+ };
879
+ try {
880
+ const response = yield this.graphqlQueryV2(query, variables);
881
+ return response.getRecord;
882
+ }
883
+ catch (error) {
884
+ console.log(`Error in getRecord: ${error}`);
885
+ throw error;
886
+ }
887
+ });
888
+ }
889
+ getDomainDns(serviceId) {
890
+ return __awaiter(this, void 0, void 0, function* () {
891
+ const query = queries_1.GET_DOMAIN_DNS;
892
+ const variables = {
893
+ serviceId,
894
+ };
895
+ try {
896
+ const response = yield this.graphqlQueryV2(query, variables);
897
+ return response.getDomainDns;
898
+ }
899
+ catch (error) {
900
+ console.log(`Error in getDomainDns: ${error}`);
901
+ throw error;
902
+ }
903
+ });
904
+ }
821
905
  }
822
906
  exports.CloudService = CloudService;
@@ -38,4 +38,5 @@ export declare class CrmService extends Service {
38
38
  createResumeInfo(data: any): Promise<any>;
39
39
  updateFieldResume(resumeId: string, fieldName: string, value: string, resourceType: string, updatedBy: string): Promise<any>;
40
40
  getListTicketByOwnerDynamic(ownerId: string, getTicketRequest: getTicketRequest, fields: string[]): Promise<any>;
41
+ getResumeById(resumeId: string, fields: string[]): Promise<any>;
41
42
  }
@@ -634,5 +634,21 @@ class CrmService extends serviceSDK_1.Service {
634
634
  }
635
635
  });
636
636
  }
637
+ getResumeById(resumeId, fields) {
638
+ return __awaiter(this, void 0, void 0, function* () {
639
+ const query = (0, queries_1.GET_RESUME_ID)(fields);
640
+ const variables = {
641
+ resumeId,
642
+ };
643
+ try {
644
+ const response = yield this.graphqlQueryV2(query, variables);
645
+ return response.getResumeById;
646
+ }
647
+ catch (error) {
648
+ console.log(`Error fetching get getResumeById method: ${error}`);
649
+ throw error;
650
+ }
651
+ });
652
+ }
637
653
  }
638
654
  exports.CrmService = CrmService;
@@ -0,0 +1,13 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class MarketPlaceService extends Service {
3
+ /**
4
+ * Constructs a new ProductService instance.
5
+ * @param endpoint - The endpoint URL for the service.
6
+ * @param orgId - The organization ID.
7
+ * @param storeId - The store ID.
8
+ */
9
+ constructor(endpoint: string, orgId: string, storeId: string);
10
+ setToken(token: string): void;
11
+ setStoreId(storeId: string): void;
12
+ getPublicProductDynamic(categoryId: string, supplierId: string, fields: string[]): Promise<any>;
13
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.MarketPlaceService = void 0;
13
+ const queries_1 = require("../../graphql/marketplace/queries");
14
+ const serviceSDK_1 = require("../serviceSDK");
15
+ class MarketPlaceService extends serviceSDK_1.Service {
16
+ /**
17
+ * Constructs a new ProductService instance.
18
+ * @param endpoint - The endpoint URL for the service.
19
+ * @param orgId - The organization ID.
20
+ * @param storeId - The store ID.
21
+ */
22
+ constructor(endpoint, orgId, storeId) {
23
+ super(endpoint, orgId, storeId);
24
+ }
25
+ setToken(token) {
26
+ this.token = token;
27
+ }
28
+ setStoreId(storeId) {
29
+ this.storeId = storeId;
30
+ }
31
+ getPublicProductDynamic(categoryId, supplierId, fields) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const query = (0, queries_1.GET_PUBLIC_PRODUCT_DYNAMIC)(fields);
34
+ const variablesHandle = {
35
+ storeChannel: this.storeId,
36
+ supplierId,
37
+ categoryId,
38
+ };
39
+ try {
40
+ const response = yield this.graphqlQueryV2(query, variablesHandle);
41
+ return response.getPublicProduct;
42
+ }
43
+ catch (error) {
44
+ console.log(`Error fetching getPublicProductDynamic : ${error}`);
45
+ throw error;
46
+ }
47
+ });
48
+ }
49
+ }
50
+ exports.MarketPlaceService = MarketPlaceService;
@@ -21,4 +21,5 @@ export declare class OrderGraphQLService extends Service {
21
21
  calculateResourceChangePrice(productIds: string[], quantity: string, unit: string, storeId: string, fields: string[], serviceId: string): Promise<any>;
22
22
  applyReferralCode(input: any): Promise<any>;
23
23
  removeReferralCode(input: any): Promise<any>;
24
+ updateLineItemResource(orderId: string, lineItem_id: string, productConfiguration: any, updateBy: string, fields: string[]): Promise<any>;
24
25
  }
@@ -338,5 +338,21 @@ class OrderGraphQLService extends serviceSDK_1.Service {
338
338
  }
339
339
  });
340
340
  }
341
+ updateLineItemResource(orderId, lineItem_id, productConfiguration, updateBy, fields) {
342
+ return __awaiter(this, void 0, void 0, function* () {
343
+ const mutation = (0, mutations_1.UPDATE_LINE_ITEM_RESOURCE)(fields);
344
+ const variables = {
345
+ partnerId: this.orgId, orderId, lineItem_id, productConfiguration, updateBy
346
+ };
347
+ try {
348
+ const response = yield this.graphqlMutationV2(mutation, variables);
349
+ return response.updateLineItemResource;
350
+ }
351
+ catch (error) {
352
+ console.log(`Error in updateLineItemResource: ${error}`);
353
+ throw error;
354
+ }
355
+ });
356
+ }
341
357
  }
342
358
  exports.OrderGraphQLService = OrderGraphQLService;
@@ -40,3 +40,40 @@ export interface ServiceStatus {
40
40
  CANCELLED: "CANCELLED";
41
41
  CLOSED: "CLOSED";
42
42
  }
43
+ export interface RecordDnsInput {
44
+ id?: number;
45
+ name: string;
46
+ type: string;
47
+ content?: string;
48
+ ttl?: number;
49
+ prio?: number;
50
+ changeDate?: number;
51
+ disabled?: number;
52
+ ordername?: string;
53
+ auth?: number;
54
+ }
55
+ export interface RecordDns {
56
+ id?: number;
57
+ domainName?: string;
58
+ domainId?: number;
59
+ name?: string;
60
+ type?: string;
61
+ content?: string;
62
+ ttl?: number;
63
+ prio?: number;
64
+ changeDate?: number;
65
+ disabled?: number;
66
+ ordername?: string;
67
+ auth?: number;
68
+ }
69
+ export interface DomainDns {
70
+ id?: number;
71
+ name?: string;
72
+ master?: string;
73
+ lastCheck?: number;
74
+ type?: string;
75
+ notifiedSerial?: number;
76
+ account?: string;
77
+ email?: string;
78
+ nameServer?: string;
79
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/service-js-client",
3
- "version": "2.8.2",
3
+ "version": "2.8.4",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [