@longvansoftware/service-js-client 2.9.0 → 2.9.1

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.
Files changed (54) hide show
  1. package/dist/config/config.js +1 -1
  2. package/dist/src/graphql/campaign/queries.d.ts +13 -11
  3. package/dist/src/graphql/campaign/queries.js +39 -111
  4. package/dist/src/graphql/cashbook/mutation.js +4 -0
  5. package/dist/src/graphql/cashbook/query.d.ts +2 -0
  6. package/dist/src/graphql/cashbook/query.js +17 -1
  7. package/dist/src/graphql/cloud/mutations.d.ts +2 -0
  8. package/dist/src/graphql/cloud/mutations.js +53 -186
  9. package/dist/src/graphql/cloudCloud/mutations.d.ts +2 -0
  10. package/dist/src/graphql/cloudCloud/mutations.js +101 -27
  11. package/dist/src/graphql/cloudCloud/queries.js +4 -0
  12. package/dist/src/graphql/orderCloud/mutations.d.ts +3 -1
  13. package/dist/src/graphql/orderCloud/mutations.js +21 -5
  14. package/dist/src/graphql/paymentLV/mutations.d.ts +4 -0
  15. package/dist/src/graphql/paymentLV/mutations.js +41 -13
  16. package/dist/src/graphql/paymentV2/mutations.d.ts +1 -0
  17. package/dist/src/graphql/paymentV2/mutations.js +23 -37
  18. package/dist/src/graphql/paymentV2/queries.d.ts +2 -0
  19. package/dist/src/graphql/paymentV2/queries.js +58 -1
  20. package/dist/src/graphql/storefont/mutation.d.ts +4 -0
  21. package/dist/src/graphql/storefont/mutation.js +56 -0
  22. package/dist/src/graphql/storefont/queries.d.ts +5 -0
  23. package/dist/src/graphql/storefont/queries.js +106 -0
  24. package/dist/src/graphql/tag/mutations.d.ts +2 -0
  25. package/dist/src/graphql/tag/mutations.js +44 -0
  26. package/dist/src/graphql/tag/queries.d.ts +1 -0
  27. package/dist/src/graphql/tag/queries.js +20 -0
  28. package/dist/src/lib/campaign/index.d.ts +1 -0
  29. package/dist/src/lib/campaign/index.js +69 -12
  30. package/dist/src/lib/cashbook/index.d.ts +4 -0
  31. package/dist/src/lib/cashbook/index.js +60 -2
  32. package/dist/src/lib/cloud/index.d.ts +2 -0
  33. package/dist/src/lib/cloud/index.js +65 -37
  34. package/dist/src/lib/cloudCloud/index.d.ts +1 -0
  35. package/dist/src/lib/cloudCloud/index.js +16 -0
  36. package/dist/src/lib/imageGateway/index.d.ts +6 -0
  37. package/dist/src/lib/imageGateway/index.js +18 -0
  38. package/dist/src/lib/orderCloud/index.d.ts +2 -0
  39. package/dist/src/lib/orderCloud/index.js +47 -1
  40. package/dist/src/lib/paymentLV/index.d.ts +4 -0
  41. package/dist/src/lib/paymentLV/index.js +55 -7
  42. package/dist/src/lib/paymentV2/index.d.ts +11 -1
  43. package/dist/src/lib/paymentV2/index.js +55 -14
  44. package/dist/src/lib/portal/index.d.ts +10 -2
  45. package/dist/src/lib/portal/index.js +171 -11
  46. package/dist/src/lib/storefont/index.d.ts +23 -0
  47. package/dist/src/lib/storefont/index.js +160 -0
  48. package/dist/src/lib/tag/index.d.ts +7 -0
  49. package/dist/src/lib/tag/index.js +61 -0
  50. package/package.json +1 -1
  51. package/dist/src/lib/service.d.ts +0 -14
  52. package/dist/src/lib/service.js +0 -101
  53. package/dist/src/utils/build-field-string.d.ts +0 -1
  54. package/dist/src/utils/build-field-string.js +0 -16
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GET_RESULT_TAG = void 0;
4
+ const graphql_tag_1 = require("graphql-tag");
5
+ exports.GET_RESULT_TAG = (0, graphql_tag_1.gql) `
6
+ query GetResultTag($resourceId: String!, $resourceType: String!) {
7
+ getResultTag(resourceId: $resourceId, resourceType: $resourceType) {
8
+ id
9
+ title
10
+ items {
11
+ id
12
+ title
13
+ items {
14
+ id
15
+ title
16
+ }
17
+ }
18
+ }
19
+ }
20
+ `;
@@ -19,4 +19,5 @@ export declare class CampaignService extends Service {
19
19
  searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
20
20
  getCampaign(id: string): Promise<any>;
21
21
  searchProductPricePromotionResponse(campaignId: string, campaignActionId: string, statusActive: string): Promise<any>;
22
+ voucherForUserRequest(orderId: string, customerId?: string, paymentMethodId?: string, shippingCompanyId?: string, pageNumber?: number, pageSize?: number, fields?: string[]): Promise<any>;
22
23
  }
@@ -30,7 +30,7 @@ class CampaignService extends serviceSDK_1.Service {
30
30
  partyId: this.orgId,
31
31
  productStoreId: this.storeId,
32
32
  customerId,
33
- campaignActionType,
33
+ campaignActionType
34
34
  };
35
35
  try {
36
36
  const response = yield this.graphqlQuery(query, variables);
@@ -54,7 +54,7 @@ class CampaignService extends serviceSDK_1.Service {
54
54
  customerId,
55
55
  excludeExpired,
56
56
  pageNumber,
57
- pageSize,
57
+ pageSize
58
58
  };
59
59
  try {
60
60
  const response = yield this.graphqlQuery(query, variables);
@@ -73,7 +73,7 @@ class CampaignService extends serviceSDK_1.Service {
73
73
  partyId: this.orgId,
74
74
  productStoreId: this.storeId,
75
75
  customerId,
76
- voucherCode,
76
+ voucherCode
77
77
  };
78
78
  try {
79
79
  const response = yield this.graphqlQuery(query, variables);
@@ -92,7 +92,7 @@ class CampaignService extends serviceSDK_1.Service {
92
92
  partyId: this.orgId,
93
93
  productStoreId: this.storeId,
94
94
  campaignActionType,
95
- customerId,
95
+ customerId
96
96
  };
97
97
  try {
98
98
  const response = yield this.graphqlQuery(query, variables);
@@ -110,7 +110,7 @@ class CampaignService extends serviceSDK_1.Service {
110
110
  partyId: this.orgId,
111
111
  productStoreId: this.storeId,
112
112
  productId,
113
- productPrice,
113
+ productPrice
114
114
  };
115
115
  try {
116
116
  const response = yield this.graphqlQuery(query, variables);
@@ -131,7 +131,7 @@ class CampaignService extends serviceSDK_1.Service {
131
131
  campaignActionId,
132
132
  customerId,
133
133
  excludeExpired,
134
- isPageAble,
134
+ isPageAble
135
135
  };
136
136
  try {
137
137
  const response = yield this.graphqlQuery(query, variables);
@@ -149,7 +149,7 @@ class CampaignService extends serviceSDK_1.Service {
149
149
  partyId: this.orgId,
150
150
  voucherCode,
151
151
  userId,
152
- affiliateId,
152
+ affiliateId
153
153
  };
154
154
  try {
155
155
  const response = yield this.graphqlMutation(query, variables);
@@ -169,7 +169,7 @@ class CampaignService extends serviceSDK_1.Service {
169
169
  campaignId: campaignId,
170
170
  campaignActionId: campaignActionId,
171
171
  excludeExpired: true,
172
- isBirthday: isBirthday,
172
+ isBirthday: isBirthday
173
173
  };
174
174
  try {
175
175
  const response = yield this.graphqlQuery(query, variables);
@@ -184,7 +184,7 @@ class CampaignService extends serviceSDK_1.Service {
184
184
  return __awaiter(this, void 0, void 0, function* () {
185
185
  const query = queries_1.GET_CAMPAIGN_ACTION_BY_ID;
186
186
  const variables = {
187
- id,
187
+ id
188
188
  };
189
189
  try {
190
190
  const response = yield this.graphqlQuery(query, variables);
@@ -203,7 +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
+ sort: { asc: true, key: "createdStamp" }
207
207
  };
208
208
  try {
209
209
  const response = yield this.graphqlQuery(query, variables);
@@ -218,7 +218,7 @@ class CampaignService extends serviceSDK_1.Service {
218
218
  return __awaiter(this, void 0, void 0, function* () {
219
219
  const query = queries_1.GET_CAMPAIGN;
220
220
  const variables = {
221
- id,
221
+ id
222
222
  };
223
223
  try {
224
224
  const response = yield this.graphqlQuery(query, variables);
@@ -237,7 +237,7 @@ class CampaignService extends serviceSDK_1.Service {
237
237
  campaignId,
238
238
  campaignActionId,
239
239
  statusActive,
240
- sort: { asc: true, key: "productId" },
240
+ sort: { asc: true, key: "productId" }
241
241
  };
242
242
  try {
243
243
  const response = yield this.graphqlQuery(query, variables);
@@ -248,5 +248,62 @@ class CampaignService extends serviceSDK_1.Service {
248
248
  }
249
249
  });
250
250
  }
251
+ voucherForUserRequest(orderId_1) {
252
+ return __awaiter(this, arguments, void 0, function* (orderId, customerId = "", paymentMethodId, shippingCompanyId, pageNumber = 0, pageSize = 20, fields = [
253
+ `content {
254
+ id
255
+ voucherCode
256
+ isBirthday
257
+ discountAmount
258
+ discountPercent
259
+ usageLimitPerVoucher
260
+ numberOfTimeUsed
261
+ maximumDiscount
262
+ maximumDiscountType
263
+ memberLevel
264
+ affiliateId
265
+ description
266
+ usageLimitType
267
+ minimumSpend
268
+ maximumSpend
269
+ expiryDate
270
+ isUsable
271
+ unusableReasons
272
+ remainingAmount
273
+ discountType
274
+ discountValue
275
+ ownerPartyId
276
+ rewardType
277
+ voucherType
278
+ }`,
279
+ "total",
280
+ "pageNumber",
281
+ "pageSize",
282
+ "totalPages",
283
+ "numberOfElements",
284
+ "first",
285
+ "last"
286
+ ]) {
287
+ const query = (0, queries_1.GET_VOUCHER_FOR_USER)(fields);
288
+ const variables = {
289
+ voucherForUserRequest: {
290
+ orderId,
291
+ customerId,
292
+ storeId: this.storeId,
293
+ paymentMethodId,
294
+ shippingCompanyId,
295
+ pageNumber,
296
+ pageSize
297
+ }
298
+ };
299
+ try {
300
+ const res = yield this.graphqlQuery(query, variables);
301
+ return res.getVouchersForUser;
302
+ }
303
+ catch (error) {
304
+ throw error;
305
+ }
306
+ });
307
+ }
251
308
  }
252
309
  exports.CampaignService = CampaignService;
@@ -3,13 +3,16 @@ export declare class Cashbook extends Service {
3
3
  constructor(endpoint: string, orgId: string, storeId: string);
4
4
  setToken(token: string): void;
5
5
  setStoreId(storeId: string): void;
6
+ getCardTypes(fields?: string[]): Promise<any>;
6
7
  getCashAccountCustomers(partyId: string, fields?: string[]): Promise<any>;
7
8
  getBankCodes(fields?: string[]): Promise<any>;
9
+ getBankCodesForCustomer(fields?: string[]): Promise<any>;
8
10
  createCashAccountCustomer(input: {
9
11
  bankCode: string;
10
12
  name: string;
11
13
  accountNumber: string;
12
14
  typeCard: string;
15
+ expiryDate: string;
13
16
  partyId: string;
14
17
  }, fields?: string[]): Promise<any>;
15
18
  updateCashAccountCustomer(input: {
@@ -19,6 +22,7 @@ export declare class Cashbook extends Service {
19
22
  name?: string;
20
23
  accountNumber?: string;
21
24
  typeCard?: string;
25
+ expiryDate?: string;
22
26
  isDefault?: boolean;
23
27
  }, fields?: string[]): Promise<any>;
24
28
  deleteCashAccountCustomer(id: string, partyId: string, fields?: string[]): Promise<any>;
@@ -23,8 +23,36 @@ class Cashbook extends serviceSDK_1.Service {
23
23
  setStoreId(storeId) {
24
24
  this.storeId = storeId;
25
25
  }
26
+ getCardTypes() {
27
+ return __awaiter(this, arguments, void 0, function* (fields = ["code", "description"]) {
28
+ const query = (0, query_1.GET_CART_TYPE)(fields);
29
+ try {
30
+ const response = yield this.graphqlQuery(query, {});
31
+ return response.getCardTypes;
32
+ }
33
+ catch (error) {
34
+ console.log(`Error getCardTypes: ${error}`);
35
+ throw error;
36
+ }
37
+ });
38
+ }
26
39
  getCashAccountCustomers(partyId_1) {
27
- return __awaiter(this, arguments, void 0, function* (partyId, fields = ["id", "partnerId", "bankCode", "name", "accountNumber", "typeCard", "partyId", "isDefault", "customAttributes", "bankName"]) {
40
+ return __awaiter(this, arguments, void 0, function* (partyId, fields = [
41
+ "id",
42
+ "partnerId",
43
+ "bankCode",
44
+ "name",
45
+ "accountNumber",
46
+ "typeCard",
47
+ "partyId",
48
+ "isDefault",
49
+ "customAttributes",
50
+ "bankName",
51
+ "bankShortName",
52
+ "bankLogo",
53
+ "bankColors",
54
+ "expiryDate"
55
+ ]) {
28
56
  const query = (0, query_1.GET_CASH_ACCOUNT_CUSTOMERS)(fields);
29
57
  const variables = { partnerId: this.orgId, partyId };
30
58
  try {
@@ -50,8 +78,36 @@ class Cashbook extends serviceSDK_1.Service {
50
78
  }
51
79
  });
52
80
  }
81
+ getBankCodesForCustomer() {
82
+ return __awaiter(this, arguments, void 0, function* (fields = ["bankCode", "shortName", "description", "logo", "colors"]) {
83
+ const query = (0, query_1.GET_BANK_CODES_FOR_CUSTOMER)(fields);
84
+ try {
85
+ const response = yield this.graphqlQuery(query, {});
86
+ return response.getBankCodesForCustomer;
87
+ }
88
+ catch (error) {
89
+ console.log(`Error getBankCodesForCustomer: ${error}`);
90
+ throw error;
91
+ }
92
+ });
93
+ }
53
94
  createCashAccountCustomer(input_1) {
54
- return __awaiter(this, arguments, void 0, function* (input, fields = ["id", "partnerId", "bankCode", "name", "accountNumber", "typeCard", "partyId", "isDefault", "customAttributes"]) {
95
+ return __awaiter(this, arguments, void 0, function* (input, fields = [
96
+ "id",
97
+ "partnerId",
98
+ "bankCode",
99
+ "name",
100
+ "accountNumber",
101
+ "typeCard",
102
+ "partyId",
103
+ "isDefault",
104
+ "bankName",
105
+ "bankShortName",
106
+ "bankLogo",
107
+ "bankColors",
108
+ "expiryDate",
109
+ "customAttributes"
110
+ ]) {
55
111
  const mutation = (0, mutation_1.CREATE_CASH_ACCOUNT_CUSTOMER)(fields);
56
112
  const variables = {
57
113
  partnerId: this.orgId,
@@ -59,6 +115,7 @@ class Cashbook extends serviceSDK_1.Service {
59
115
  bankCode: input.bankCode,
60
116
  name: input.name,
61
117
  accountNumber: input.accountNumber,
118
+ expiryDate: input.expiryDate,
62
119
  typeCard: input.typeCard
63
120
  };
64
121
  try {
@@ -82,6 +139,7 @@ class Cashbook extends serviceSDK_1.Service {
82
139
  name: input.name,
83
140
  accountNumber: input.accountNumber,
84
141
  typeCard: input.typeCard,
142
+ expiryDate: input.expiryDate,
85
143
  isDefault: input.isDefault
86
144
  };
87
145
  try {
@@ -61,4 +61,6 @@ export declare class CloudService extends Service {
61
61
  saveRecord(serviceId: string, record: RecordDnsInput): Promise<RecordDns>;
62
62
  getRecord(serviceId: string): Promise<RecordDns[]>;
63
63
  getDomainDns(serviceId: string): Promise<DomainDns | null>;
64
+ registerAutoExtentService(serviceId: string, updateBy: string): Promise<any>;
65
+ cancelAutoExtentService(serviceId: string, updateBy: string): Promise<any>;
64
66
  }
@@ -33,7 +33,7 @@ class CloudService extends serviceSDK_1.Service {
33
33
  return __awaiter(this, void 0, void 0, function* () {
34
34
  const query = queries_1.SERVICE_DETAIL;
35
35
  const variables = {
36
- serviceId,
36
+ serviceId
37
37
  };
38
38
  try {
39
39
  const response = yield this.graphqlQueryV2(query, variables);
@@ -49,7 +49,7 @@ class CloudService extends serviceSDK_1.Service {
49
49
  return __awaiter(this, void 0, void 0, function* () {
50
50
  const query = (0, queries_1.SERVICE_DETAIL_DYNAMIC)(fields);
51
51
  const variables = {
52
- serviceId,
52
+ serviceId
53
53
  };
54
54
  try {
55
55
  const response = yield this.graphqlQueryV2(query, variables);
@@ -66,7 +66,7 @@ class CloudService extends serviceSDK_1.Service {
66
66
  const mutation = mutations_1.UPDATE_SERVICE_COMPLETED;
67
67
  const variables = {
68
68
  serviceId,
69
- handleBy,
69
+ handleBy
70
70
  };
71
71
  try {
72
72
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -83,7 +83,7 @@ class CloudService extends serviceSDK_1.Service {
83
83
  const mutation = mutations_1.UPDATE_SERVICE_NEW;
84
84
  const variables = {
85
85
  serviceId,
86
- handleBy,
86
+ handleBy
87
87
  };
88
88
  try {
89
89
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -100,7 +100,7 @@ class CloudService extends serviceSDK_1.Service {
100
100
  const mutation = mutations_1.UPDATE_SERVICE_READY_DEPLOY;
101
101
  const variables = {
102
102
  serviceId,
103
- handleBy,
103
+ handleBy
104
104
  };
105
105
  try {
106
106
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -134,7 +134,7 @@ class CloudService extends serviceSDK_1.Service {
134
134
  return __awaiter(this, void 0, void 0, function* () {
135
135
  const query = queries_1.GET_MAIL_RESOURCE;
136
136
  const variables = {
137
- serviceId,
137
+ serviceId
138
138
  };
139
139
  try {
140
140
  const response = yield this.graphqlQueryV2(query, variables);
@@ -152,7 +152,7 @@ class CloudService extends serviceSDK_1.Service {
152
152
  const variables = {
153
153
  serviceId,
154
154
  updateBy,
155
- updateData,
155
+ updateData
156
156
  };
157
157
  try {
158
158
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -168,7 +168,7 @@ class CloudService extends serviceSDK_1.Service {
168
168
  return __awaiter(this, void 0, void 0, function* () {
169
169
  const query = queries_1.GET_USER_MAIL_HOSTING;
170
170
  const variables = {
171
- serviceId,
171
+ serviceId
172
172
  };
173
173
  try {
174
174
  const response = yield this.graphqlQueryV2(query, variables);
@@ -187,7 +187,7 @@ class CloudService extends serviceSDK_1.Service {
187
187
  serviceId: payload.serviceId,
188
188
  username: payload.username,
189
189
  password: payload.password,
190
- fullName: payload.fullName,
190
+ fullName: payload.fullName
191
191
  };
192
192
  try {
193
193
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -205,7 +205,7 @@ class CloudService extends serviceSDK_1.Service {
205
205
  const variables = {
206
206
  serviceId: payload.serviceId,
207
207
  username: payload.username,
208
- password: payload.password,
208
+ password: payload.password
209
209
  };
210
210
  try {
211
211
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -222,7 +222,7 @@ class CloudService extends serviceSDK_1.Service {
222
222
  const mutation = mutations_1.DELETE_USER_MAIL_HOSTING;
223
223
  const variables = {
224
224
  serviceId: payload.serviceId,
225
- username: payload.username,
225
+ username: payload.username
226
226
  };
227
227
  try {
228
228
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -240,7 +240,7 @@ class CloudService extends serviceSDK_1.Service {
240
240
  const variables = {
241
241
  serviceId: payload.serviceId,
242
242
  updateBy: payload.useUpdate,
243
- updateData: payload.valueUpdate,
243
+ updateData: payload.valueUpdate
244
244
  };
245
245
  try {
246
246
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -258,7 +258,7 @@ class CloudService extends serviceSDK_1.Service {
258
258
  const variables = {
259
259
  serviceId: payload.serviceId,
260
260
  updateBy: payload.useUpdate,
261
- updateData: payload.valueUpdate,
261
+ updateData: payload.valueUpdate
262
262
  };
263
263
  try {
264
264
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -276,7 +276,7 @@ class CloudService extends serviceSDK_1.Service {
276
276
  const variables = {
277
277
  serviceId: payload.serviceId,
278
278
  updateBy: payload.useUpdate,
279
- updateData: payload.valueUpdate,
279
+ updateData: payload.valueUpdate
280
280
  };
281
281
  try {
282
282
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -306,7 +306,7 @@ class CloudService extends serviceSDK_1.Service {
306
306
  return __awaiter(this, void 0, void 0, function* () {
307
307
  const query = queries_1.SEARCH_SERVICE;
308
308
  const variables = {
309
- filter,
309
+ filter
310
310
  };
311
311
  try {
312
312
  const response = yield this.graphqlQueryV2(query, variables);
@@ -336,7 +336,7 @@ class CloudService extends serviceSDK_1.Service {
336
336
  return __awaiter(this, void 0, void 0, function* () {
337
337
  const query = queries_1.GET_PRODUCTS_OF_SERVICE;
338
338
  const variables = {
339
- serviceId,
339
+ serviceId
340
340
  };
341
341
  try {
342
342
  const response = yield this.graphqlQueryV2(query, variables);
@@ -352,7 +352,7 @@ class CloudService extends serviceSDK_1.Service {
352
352
  return __awaiter(this, void 0, void 0, function* () {
353
353
  const query = queries_1.GET_IPS_OF_SERVICE;
354
354
  const variables = {
355
- serviceId,
355
+ serviceId
356
356
  };
357
357
  try {
358
358
  const response = yield this.graphqlQueryV2(query, variables);
@@ -368,7 +368,7 @@ class CloudService extends serviceSDK_1.Service {
368
368
  return __awaiter(this, void 0, void 0, function* () {
369
369
  const query = queries_1.GET_SERVICES_BY_ORDER_ID;
370
370
  const variables = {
371
- orderId,
371
+ orderId
372
372
  };
373
373
  try {
374
374
  const response = yield this.graphqlQueryV2(query, variables);
@@ -384,7 +384,8 @@ class CloudService extends serviceSDK_1.Service {
384
384
  return __awaiter(this, void 0, void 0, function* () {
385
385
  const mutation = mutations_1.CHECK_DOMAIN_NAME;
386
386
  const variables = {
387
- domainName, isClearCache
387
+ domainName,
388
+ isClearCache
388
389
  };
389
390
  try {
390
391
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -400,7 +401,8 @@ class CloudService extends serviceSDK_1.Service {
400
401
  return __awaiter(this, void 0, void 0, function* () {
401
402
  const mutation = mutations_1.CHECK_LIST_DOMAIN_NAME;
402
403
  const variables = {
403
- domainNames, isClearCache
404
+ domainNames,
405
+ isClearCache
404
406
  };
405
407
  try {
406
408
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -416,7 +418,8 @@ class CloudService extends serviceSDK_1.Service {
416
418
  return __awaiter(this, void 0, void 0, function* () {
417
419
  const mutation = mutations_1.CHECK_DOMAIN_NAME;
418
420
  const variables = {
419
- domainName, isClearCache
421
+ domainName,
422
+ isClearCache
420
423
  };
421
424
  try {
422
425
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -432,7 +435,8 @@ class CloudService extends serviceSDK_1.Service {
432
435
  return __awaiter(this, void 0, void 0, function* () {
433
436
  const mutation = mutations_1.CHECK_LIST_DOMAIN_NAME;
434
437
  const variables = {
435
- domainNames, isClearCache
438
+ domainNames,
439
+ isClearCache
436
440
  };
437
441
  try {
438
442
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -652,7 +656,7 @@ class CloudService extends serviceSDK_1.Service {
652
656
  serviceId,
653
657
  storeId: this.storeId,
654
658
  createdBy,
655
- partnerId: this.orgId,
659
+ partnerId: this.orgId
656
660
  };
657
661
  try {
658
662
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -668,7 +672,7 @@ class CloudService extends serviceSDK_1.Service {
668
672
  return __awaiter(this, void 0, void 0, function* () {
669
673
  const query = queries_1.SEARCH_ACTIONS;
670
674
  const variables = {
671
- parameter: Object.assign(Object.assign({}, parameter), { partyId: this.orgId }),
675
+ parameter: Object.assign(Object.assign({}, parameter), { partyId: this.orgId })
672
676
  };
673
677
  try {
674
678
  const response = yield this.graphqlQueryV2(query, variables);
@@ -685,7 +689,7 @@ class CloudService extends serviceSDK_1.Service {
685
689
  const mutation = mutations_1.CREATE_ACTION_CHANGE_IP_OF_SERVICE;
686
690
  const variables = {
687
691
  action: Object.assign(Object.assign({}, action), { partyId: this.orgId }),
688
- byUser,
692
+ byUser
689
693
  };
690
694
  try {
691
695
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -703,7 +707,7 @@ class CloudService extends serviceSDK_1.Service {
703
707
  const variables = {
704
708
  actionId,
705
709
  status,
706
- byUser,
710
+ byUser
707
711
  };
708
712
  try {
709
713
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -722,7 +726,7 @@ class CloudService extends serviceSDK_1.Service {
722
726
  actionId,
723
727
  attrName,
724
728
  attrValue,
725
- byUser,
729
+ byUser
726
730
  };
727
731
  try {
728
732
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -738,7 +742,7 @@ class CloudService extends serviceSDK_1.Service {
738
742
  return __awaiter(this, void 0, void 0, function* () {
739
743
  const query = queries_1.GET_ELASTIC_CLOUD_RESOURCE;
740
744
  const variables = {
741
- serviceId,
745
+ serviceId
742
746
  };
743
747
  try {
744
748
  const response = yield this.graphqlQueryV2(query, variables);
@@ -754,7 +758,7 @@ class CloudService extends serviceSDK_1.Service {
754
758
  return __awaiter(this, void 0, void 0, function* () {
755
759
  const query = (0, queries_1.SEARCH_SERVICE_DYNAMIC)(fields);
756
760
  const variables = {
757
- filter,
761
+ filter
758
762
  };
759
763
  try {
760
764
  const response = yield this.graphqlQueryV2(query, variables);
@@ -772,7 +776,7 @@ class CloudService extends serviceSDK_1.Service {
772
776
  const variables = {
773
777
  productResourceInput: {
774
778
  productId: productResourceInput === null || productResourceInput === void 0 ? void 0 : productResourceInput.productId,
775
- resources: productResourceInput === null || productResourceInput === void 0 ? void 0 : productResourceInput.resources,
779
+ resources: productResourceInput === null || productResourceInput === void 0 ? void 0 : productResourceInput.resources
776
780
  }
777
781
  };
778
782
  try {
@@ -789,7 +793,7 @@ class CloudService extends serviceSDK_1.Service {
789
793
  return __awaiter(this, void 0, void 0, function* () {
790
794
  const query = (0, queries_1.SEARCH_ACTIONS_DYNAMIC)(fields);
791
795
  const variables = {
792
- parameter,
796
+ parameter
793
797
  };
794
798
  try {
795
799
  const response = yield this.graphqlQueryV2(query, variables);
@@ -806,7 +810,7 @@ class CloudService extends serviceSDK_1.Service {
806
810
  const query = queries_1.ADD_LETS_ENCRYPT_SSL_FOR_MAIL_HOSTING;
807
811
  const variables = {
808
812
  serviceId,
809
- actorId,
813
+ actorId
810
814
  };
811
815
  try {
812
816
  const response = yield this.graphqlQueryV2(query, variables);
@@ -824,7 +828,7 @@ class CloudService extends serviceSDK_1.Service {
824
828
  const variables = {
825
829
  serviceId,
826
830
  nameRecord,
827
- typeRecord,
831
+ typeRecord
828
832
  };
829
833
  try {
830
834
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -841,7 +845,7 @@ class CloudService extends serviceSDK_1.Service {
841
845
  const mutation = mutations_1.UPDATE_RECORD;
842
846
  const variables = {
843
847
  serviceId,
844
- record,
848
+ record
845
849
  };
846
850
  try {
847
851
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -858,7 +862,7 @@ class CloudService extends serviceSDK_1.Service {
858
862
  const mutation = mutations_1.SAVE_RECORD;
859
863
  const variables = {
860
864
  serviceId,
861
- record,
865
+ record
862
866
  };
863
867
  try {
864
868
  const response = yield this.graphqlMutationV2(mutation, variables);
@@ -874,7 +878,7 @@ class CloudService extends serviceSDK_1.Service {
874
878
  return __awaiter(this, void 0, void 0, function* () {
875
879
  const query = queries_1.GET_RECORD;
876
880
  const variables = {
877
- serviceId,
881
+ serviceId
878
882
  };
879
883
  try {
880
884
  const response = yield this.graphqlQueryV2(query, variables);
@@ -890,7 +894,7 @@ class CloudService extends serviceSDK_1.Service {
890
894
  return __awaiter(this, void 0, void 0, function* () {
891
895
  const query = queries_1.GET_DOMAIN_DNS;
892
896
  const variables = {
893
- serviceId,
897
+ serviceId
894
898
  };
895
899
  try {
896
900
  const response = yield this.graphqlQueryV2(query, variables);
@@ -902,5 +906,29 @@ class CloudService extends serviceSDK_1.Service {
902
906
  }
903
907
  });
904
908
  }
909
+ registerAutoExtentService(serviceId, updateBy) {
910
+ return __awaiter(this, void 0, void 0, function* () {
911
+ try {
912
+ const response = yield this.graphqlMutation(mutations_1.REGISTER_AUTO_EXTEND_SERVICE, { serviceId, updateBy });
913
+ return response.registerAutoExtendService;
914
+ }
915
+ catch (error) {
916
+ console.log(`Error in registerAutoExtendService: ${error}`);
917
+ throw error;
918
+ }
919
+ });
920
+ }
921
+ cancelAutoExtentService(serviceId, updateBy) {
922
+ return __awaiter(this, void 0, void 0, function* () {
923
+ try {
924
+ const response = yield this.graphqlMutation(mutations_1.CANCEL_AUTO_EXTEND_SERVICE, { serviceId, updateBy });
925
+ return response.cancelAutoExtendService;
926
+ }
927
+ catch (error) {
928
+ console.log(`Error in cancelAutoExtendService: ${error}`);
929
+ throw error;
930
+ }
931
+ });
932
+ }
905
933
  }
906
934
  exports.CloudService = CloudService;
@@ -9,4 +9,5 @@ export declare class CloudCloudService extends Service {
9
9
  updateServiceResource(data: Record<string, any>): Promise<any>;
10
10
  countAvailableBookings(serviceId: string): Promise<any>;
11
11
  recountUsedBookings(serviceId: string, actorId: string): Promise<any>;
12
+ linkUserAccount(ownerId: string, serviceId: string): Promise<any>;
12
13
  }