@longvansoftware/service-js-client 1.16.2 → 1.16.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.
Files changed (79) hide show
  1. package/dist/src/graphql/campaign/mutations.d.ts +1 -0
  2. package/dist/src/graphql/campaign/mutations.js +34 -0
  3. package/dist/src/graphql/campaign/queries.d.ts +9 -0
  4. package/dist/src/graphql/campaign/queries.js +427 -0
  5. package/dist/src/graphql/cashbook/queries.d.ts +2 -0
  6. package/dist/src/graphql/cashbook/queries.js +99 -0
  7. package/dist/src/graphql/crm/mutations.d.ts +2 -0
  8. package/dist/src/graphql/crm/mutations.js +37 -1
  9. package/dist/src/graphql/crm/queries.d.ts +1 -0
  10. package/dist/src/graphql/crm/queries.js +35 -1
  11. package/dist/src/graphql/fragments/product.d.ts +38 -0
  12. package/dist/src/graphql/fragments/product.js +196 -0
  13. package/dist/src/graphql/paymentV2/mutations.d.ts +5 -0
  14. package/dist/src/graphql/paymentV2/mutations.js +120 -0
  15. package/dist/src/graphql/paymentV2/queries.d.ts +9 -0
  16. package/dist/src/graphql/paymentV2/queries.js +257 -0
  17. package/dist/src/graphql/product/queries.d.ts +1 -0
  18. package/dist/src/graphql/product/queries.js +14 -1
  19. package/dist/src/graphql/store/mutations.d.ts +1 -0
  20. package/dist/src/graphql/store/mutations.js +29 -0
  21. package/dist/src/graphql/store/queries.d.ts +1 -0
  22. package/dist/src/graphql/store/queries.js +29 -0
  23. package/dist/src/lib/accounting/index.d.ts +5 -0
  24. package/dist/src/lib/accounting/index.js +32 -0
  25. package/dist/src/lib/campaign/index.d.ts +20 -0
  26. package/dist/src/lib/campaign/index.js +218 -0
  27. package/dist/src/lib/cashbook/index.d.ts +6 -0
  28. package/dist/src/lib/cashbook/index.js +56 -0
  29. package/dist/src/lib/comhub/index.d.ts +6 -0
  30. package/dist/src/lib/comhub/index.js +50 -0
  31. package/dist/src/lib/crm/index.d.ts +3 -0
  32. package/dist/src/lib/crm/index.js +51 -0
  33. package/dist/src/lib/deepLinkVietQr/index.d.ts +7 -0
  34. package/dist/src/lib/deepLinkVietQr/index.js +58 -0
  35. package/dist/src/lib/fileService/index.d.ts +34 -0
  36. package/dist/src/lib/fileService/index.js +80 -0
  37. package/dist/src/lib/getImage/index.d.ts +4 -0
  38. package/dist/src/lib/getImage/index.js +10 -0
  39. package/dist/src/lib/image/index.d.ts +7 -0
  40. package/dist/src/lib/image/index.js +49 -0
  41. package/dist/src/lib/omnigateway/index.d.ts +7 -0
  42. package/dist/src/lib/omnigateway/index.js +58 -0
  43. package/dist/src/lib/paymentV2/index.d.ts +18 -0
  44. package/dist/src/lib/paymentV2/index.js +245 -0
  45. package/dist/src/lib/portal/index.d.ts +23 -0
  46. package/dist/src/lib/portal/index.js +255 -0
  47. package/dist/src/lib/product/index.d.ts +1 -0
  48. package/dist/src/lib/product/index.js +16 -0
  49. package/dist/src/lib/shareZalo/index.d.ts +5 -0
  50. package/dist/src/lib/shareZalo/index.js +32 -0
  51. package/dist/src/lib/store/index.d.ts +30 -0
  52. package/dist/src/lib/store/index.js +74 -0
  53. package/dist/src/lib/token/index.d.ts +5 -0
  54. package/dist/src/lib/token/index.js +32 -0
  55. package/dist/src/lib/upload/index.d.ts +5 -0
  56. package/dist/src/lib/upload/index.js +35 -0
  57. package/dist/src/lib/warehouseV2/index.d.ts +13 -0
  58. package/dist/src/lib/warehouseV2/index.js +54 -0
  59. package/dist/src/lib/zca/index.d.ts +12 -0
  60. package/dist/src/lib/zca/index.js +41 -0
  61. package/dist/src/types/campaign.d.ts +14 -0
  62. package/dist/src/types/campaign.js +2 -0
  63. package/dist/src/types/common.d.ts +264 -0
  64. package/dist/src/types/common.js +35 -0
  65. package/dist/src/types/invoice.d.ts +13 -0
  66. package/dist/src/types/invoice.js +2 -0
  67. package/dist/src/types/portal.d.ts +7 -0
  68. package/dist/src/types/portal.js +2 -0
  69. package/dist/src/types/store.d.ts +158 -0
  70. package/dist/src/types/store.js +3 -0
  71. package/dist/src/utils/errorHandler.d.ts +64 -0
  72. package/dist/src/utils/errorHandler.js +197 -0
  73. package/dist/src/utils/validatePhoneNumber.d.ts +1 -0
  74. package/dist/src/utils/validatePhoneNumber.js +20 -0
  75. package/package.json +1 -1
  76. package/dist/src/lib/service.d.ts +0 -14
  77. package/dist/src/lib/service.js +0 -101
  78. package/dist/src/utils/build-field-string.d.ts +0 -1
  79. package/dist/src/utils/build-field-string.js +0 -16
@@ -0,0 +1,80 @@
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.FileServiceSerVice = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ class FileServiceSerVice extends serviceSDK_1.Service {
15
+ constructor(endpoint, orgId, storeId) {
16
+ super(endpoint, orgId, storeId);
17
+ }
18
+ /**
19
+ * Upload file to the file service
20
+ * @param uploadFile - File object to upload
21
+ * @param path - Directory path to save the file
22
+ * @param parentId - Reference ID of parent object (optional)
23
+ * @param parentType - Type of parent object reference (optional)
24
+ * @returns Promise<UploadFileResponse>
25
+ */
26
+ uploadFile(uploadFile, path, parentId, parentType) {
27
+ return __awaiter(this, void 0, void 0, function* () {
28
+ const endpoint = `/omnichannel/files/upload`;
29
+ const method = "POST";
30
+ try {
31
+ const formData = new FormData();
32
+ formData.append("uploadFile", uploadFile);
33
+ formData.append("path", path);
34
+ if (parentId) {
35
+ formData.append("parentId", parentId);
36
+ }
37
+ if (parentType) {
38
+ formData.append("parentType", parentType);
39
+ }
40
+ const response = yield this.restApiCallWithNoHeader(endpoint, method, formData);
41
+ return response;
42
+ }
43
+ catch (error) {
44
+ console.error("Error uploading file:", error);
45
+ throw error;
46
+ }
47
+ });
48
+ }
49
+ /**
50
+ * Upload image file (convenience method)
51
+ * @param imageFile - Image file to upload
52
+ * @param path - Directory path to save the image (default: "public")
53
+ * @param parentId - Reference ID of parent object (optional)
54
+ * @param parentType - Type of parent object reference (optional)
55
+ * @returns Promise<UploadFileResponse>
56
+ */
57
+ uploadImage(imageFile_1) {
58
+ return __awaiter(this, arguments, void 0, function* (imageFile, path = "public", parentId, parentType) {
59
+ // Validate that the file is an image
60
+ if (!imageFile.type.startsWith("image/")) {
61
+ throw new Error("File must be an image");
62
+ }
63
+ return this.uploadFile(imageFile, path, parentId, parentType);
64
+ });
65
+ }
66
+ getImage(parentId, parenttype) {
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ const endpoint = `/omnichannel/files/gets/${parentId}/${parenttype}`;
69
+ const method = "GET";
70
+ try {
71
+ const response = yield this.restApiCallWithNoHeader(endpoint, method);
72
+ return response;
73
+ }
74
+ catch (error) {
75
+ throw error;
76
+ }
77
+ });
78
+ }
79
+ }
80
+ exports.FileServiceSerVice = FileServiceSerVice;
@@ -0,0 +1,4 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class GetImageService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ }
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GetImageService = void 0;
4
+ const serviceSDK_1 = require("../serviceSDK");
5
+ class GetImageService extends serviceSDK_1.Service {
6
+ constructor(endpoint, orgId, storeId) {
7
+ super(endpoint, orgId, storeId);
8
+ }
9
+ }
10
+ exports.GetImageService = GetImageService;
@@ -0,0 +1,7 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class ImageService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ setToken(token: string): void;
5
+ getImageProduct(imageId: string): Promise<any>;
6
+ getImageProducts(productCode: string): Promise<any>;
7
+ }
@@ -0,0 +1,49 @@
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.ImageService = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ class ImageService extends serviceSDK_1.Service {
15
+ constructor(endpoint, orgId, storeId) {
16
+ super(endpoint, orgId, storeId);
17
+ }
18
+ setToken(token) {
19
+ this.token = token;
20
+ }
21
+ getImageProduct(imageId) {
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const endpoint = `/${this.orgId}/${imageId}/images-url`;
24
+ const method = "GET";
25
+ try {
26
+ const response = yield this.restApiCallWithNoToken(endpoint, method);
27
+ return response;
28
+ }
29
+ catch (error) {
30
+ throw error;
31
+ }
32
+ });
33
+ }
34
+ getImageProducts(productCode) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ try {
37
+ const response = yield fetch(`https://product-service.dev.longvan.vn/product-service/v1/products/${this.orgId}/${productCode}/images-url`);
38
+ if (!response.ok) {
39
+ throw new Error("Failed to get image products");
40
+ }
41
+ return response.json();
42
+ }
43
+ catch (error) {
44
+ console.error("Error getting image products:", error);
45
+ }
46
+ });
47
+ }
48
+ }
49
+ exports.ImageService = ImageService;
@@ -0,0 +1,7 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class OmnigatewayService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ requestJoinRoom(roomId: string, listUser: [string]): Promise<any>;
5
+ getTemplate(type: string): Promise<any>;
6
+ getInfoChatApp(): Promise<any>;
7
+ }
@@ -0,0 +1,58 @@
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.OmnigatewayService = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ class OmnigatewayService extends serviceSDK_1.Service {
15
+ constructor(endpoint, orgId, storeId) {
16
+ super(endpoint, orgId, storeId);
17
+ }
18
+ requestJoinRoom(roomId, listUser) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const endpoint = `/topics/room/${roomId}/join`;
21
+ const method = "POST";
22
+ try {
23
+ const response = yield this.restApiCallWithNoHeader(endpoint, method, listUser);
24
+ return response;
25
+ }
26
+ catch (error) {
27
+ throw error;
28
+ }
29
+ });
30
+ }
31
+ getTemplate(type) {
32
+ return __awaiter(this, void 0, void 0, function* () {
33
+ const endpoint = `/message-templates/partner/${this.orgId}/type/${type}`;
34
+ const method = "GET";
35
+ try {
36
+ const response = yield this.restApiCallWithNoHeader(endpoint, method);
37
+ return response;
38
+ }
39
+ catch (error) {
40
+ throw error;
41
+ }
42
+ });
43
+ }
44
+ getInfoChatApp() {
45
+ return __awaiter(this, void 0, void 0, function* () {
46
+ const endpoint = `/channels/partner/${this.orgId}/social`;
47
+ const method = "GET";
48
+ try {
49
+ const response = yield this.restApiCallWithNoHeader(endpoint, method);
50
+ return response;
51
+ }
52
+ catch (error) {
53
+ throw error;
54
+ }
55
+ });
56
+ }
57
+ }
58
+ exports.OmnigatewayService = OmnigatewayService;
@@ -0,0 +1,18 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class PaymentServiceV2 extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ paymentsByOrders(orderIds: [string]): Promise<any>;
5
+ cancelPayment(paymentId: string, reason: string): Promise<any>;
6
+ paymentMethods(): Promise<any>;
7
+ getPaymentMethodTypes(): Promise<any>;
8
+ paymentInfo(paymentId: string): Promise<any>;
9
+ confirmToGateway(paymentId: string, methodCode: string, returnUrl: string): Promise<any>;
10
+ paymentStatus(paymentId: string): Promise<any>;
11
+ gwConfigDetail(configId: string): Promise<any>;
12
+ confirmPaymentSuccessManual(paymentId: string, transactionNo: string, note: string, confirmBy: string): Promise<any>;
13
+ getPaymentMethodTitles(methodCode: string): Promise<any>;
14
+ handleCreateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
15
+ handleUpdateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
16
+ getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
17
+ getPaymentMethodTypesV2(storeActive: any, allMethodTypes: boolean): Promise<any>;
18
+ }
@@ -0,0 +1,245 @@
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.PaymentServiceV2 = void 0;
13
+ const serviceSDK_1 = require("../serviceSDK");
14
+ const queries_1 = require("../../graphql/paymentV2/queries");
15
+ const mutations_1 = require("../../graphql/paymentV2/mutations");
16
+ class PaymentServiceV2 extends serviceSDK_1.Service {
17
+ constructor(endpoint, orgId, storeId) {
18
+ super(endpoint, orgId, storeId);
19
+ }
20
+ paymentsByOrders(orderIds) {
21
+ return __awaiter(this, void 0, void 0, function* () {
22
+ const query = queries_1.PAYMENTS_BY_ORDERS;
23
+ const variables = {
24
+ orderIds: orderIds,
25
+ };
26
+ try {
27
+ const response = yield this.graphqlQueryV3(query, variables);
28
+ return response.paymentsByOrders;
29
+ }
30
+ catch (error) {
31
+ throw error;
32
+ }
33
+ });
34
+ }
35
+ cancelPayment(paymentId, reason) {
36
+ return __awaiter(this, void 0, void 0, function* () {
37
+ const mutation = mutations_1.CANCEL_PAYMENT;
38
+ const variables = {
39
+ paymentId: paymentId,
40
+ reason: reason,
41
+ };
42
+ try {
43
+ const respone = yield this.graphqlMutationV3(mutation, variables);
44
+ return respone.cancelPayment;
45
+ }
46
+ catch (error) {
47
+ throw error;
48
+ }
49
+ });
50
+ }
51
+ paymentMethods() {
52
+ return __awaiter(this, void 0, void 0, function* () {
53
+ const query = queries_1.PAYMENT_METHODS;
54
+ const variables = {};
55
+ try {
56
+ const response = yield this.graphqlQueryV3(query, variables);
57
+ return response.paymentMethods;
58
+ }
59
+ catch (error) {
60
+ throw error;
61
+ }
62
+ });
63
+ }
64
+ getPaymentMethodTypes() {
65
+ return __awaiter(this, void 0, void 0, function* () {
66
+ const query = queries_1.GET_PAYMENT_METHOD_TYPES;
67
+ const variables = {
68
+ partnerId: this.orgId,
69
+ storeId: this.storeId,
70
+ };
71
+ try {
72
+ const response = yield this.graphqlQueryV3(query, variables);
73
+ return response.getPaymentMethodTypes;
74
+ }
75
+ catch (error) {
76
+ throw error;
77
+ }
78
+ });
79
+ }
80
+ paymentInfo(paymentId) {
81
+ return __awaiter(this, void 0, void 0, function* () {
82
+ const query = queries_1.PAYMENT_INFO;
83
+ const variables = {
84
+ paymentId,
85
+ };
86
+ try {
87
+ const response = yield this.graphqlQueryV3(query, variables);
88
+ return response.paymentInfo;
89
+ }
90
+ catch (error) {
91
+ throw error;
92
+ }
93
+ });
94
+ }
95
+ confirmToGateway(paymentId, methodCode, returnUrl) {
96
+ return __awaiter(this, void 0, void 0, function* () {
97
+ const mutation = mutations_1.CONFIRM_TO_GATEWAY;
98
+ const variables = {
99
+ paymentId,
100
+ methodCode,
101
+ returnUrl,
102
+ };
103
+ try {
104
+ const response = yield this.graphqlMutationV3(mutation, variables);
105
+ return response.confirmToGateway;
106
+ }
107
+ catch (error) {
108
+ throw error;
109
+ }
110
+ });
111
+ }
112
+ paymentStatus(paymentId) {
113
+ return __awaiter(this, void 0, void 0, function* () {
114
+ const query = queries_1.PAYMENT_STATUS;
115
+ const variables = {
116
+ paymentId,
117
+ };
118
+ try {
119
+ const response = yield this.graphqlQueryV3(query, variables);
120
+ return response.paymentStatus;
121
+ }
122
+ catch (error) {
123
+ throw error;
124
+ }
125
+ });
126
+ }
127
+ gwConfigDetail(configId) {
128
+ return __awaiter(this, void 0, void 0, function* () {
129
+ const query = queries_1.GW_CONFIG_DETAIL;
130
+ const variables = {
131
+ configId,
132
+ };
133
+ try {
134
+ const response = yield this.graphqlQueryV3(query, variables);
135
+ return response.gwConfigDetail;
136
+ }
137
+ catch (error) {
138
+ throw error;
139
+ }
140
+ });
141
+ }
142
+ confirmPaymentSuccessManual(paymentId, transactionNo, note, confirmBy) {
143
+ return __awaiter(this, void 0, void 0, function* () {
144
+ const mutation = mutations_1.CONFIRM_PAYMENT_SUCCESS_MANUAL;
145
+ const variables = {
146
+ paymentId: paymentId,
147
+ transactionNo: transactionNo,
148
+ note: note,
149
+ confirmBy: confirmBy,
150
+ };
151
+ try {
152
+ const response = yield this.graphqlMutationV3(mutation, variables);
153
+ return response.confirmPaymentSuccessManual;
154
+ }
155
+ catch (error) {
156
+ throw error;
157
+ }
158
+ });
159
+ }
160
+ getPaymentMethodTitles(methodCode) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ const query = queries_1.GET_PAYMENT_METHOD_TITLES;
163
+ const variables = {
164
+ methodCode,
165
+ };
166
+ try {
167
+ const response = yield this.graphqlQueryV3(query, variables);
168
+ return response.getPaymentMethodTitles;
169
+ }
170
+ catch (error) {
171
+ throw error;
172
+ }
173
+ });
174
+ }
175
+ handleCreateGatewayConfig(input, cassoApiKey) {
176
+ return __awaiter(this, void 0, void 0, function* () {
177
+ const mutation = mutations_1.HANDLE_CREATE_GATEWAY_CONFIG;
178
+ const data = Object.assign(Object.assign({}, input), { partnerCode: this.orgId });
179
+ const variable = {
180
+ input: data,
181
+ cassoApiKey,
182
+ };
183
+ try {
184
+ const response = yield this.graphqlMutationV3(mutation, variable);
185
+ return response.handleCreateGatewayConfig;
186
+ }
187
+ catch (error) {
188
+ throw error;
189
+ }
190
+ });
191
+ }
192
+ handleUpdateGatewayConfig(input, cassoApiKey) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ const mutation = mutations_1.HANDLE_UPDATE_GATEWAY_CONFIG;
195
+ const data = Object.assign(Object.assign({}, input), { partnerCode: this.orgId });
196
+ const variable = {
197
+ input: data,
198
+ cassoApiKey,
199
+ };
200
+ try {
201
+ const response = yield this.graphqlMutationV3(mutation, variable);
202
+ return response.handleUpdateGatewayConfig;
203
+ }
204
+ catch (error) {
205
+ throw error;
206
+ }
207
+ });
208
+ }
209
+ getPaymentGatewaysByMethodCode(methodCode) {
210
+ return __awaiter(this, void 0, void 0, function* () {
211
+ const query = queries_1.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE;
212
+ const variables = {
213
+ partnerId: this.orgId,
214
+ methodCode,
215
+ storeId: this.storeId
216
+ };
217
+ try {
218
+ const response = yield this.graphqlQueryV3(query, variables);
219
+ return response.getPaymentGatewaysByMethodCode;
220
+ }
221
+ catch (error) {
222
+ throw error;
223
+ }
224
+ });
225
+ }
226
+ getPaymentMethodTypesV2(storeActive, allMethodTypes) {
227
+ return __awaiter(this, void 0, void 0, function* () {
228
+ const queries = queries_1.GET_PAYMENT_METHOD_TYPES_V2;
229
+ const variables = {
230
+ partnerId: this.orgId,
231
+ storeId: this.storeId,
232
+ storeActive: storeActive,
233
+ allMethodTypes: allMethodTypes
234
+ };
235
+ try {
236
+ const response = yield this.graphqlQueryV3(queries, variables);
237
+ return response.getPaymentMethodTypes;
238
+ }
239
+ catch (error) {
240
+ throw error;
241
+ }
242
+ });
243
+ }
244
+ }
245
+ exports.PaymentServiceV2 = PaymentServiceV2;
@@ -0,0 +1,23 @@
1
+ import { Service } from "../serviceSDK";
2
+ export declare class PortalService extends Service {
3
+ constructor(endpoint: string, orgId: string, storeId: string);
4
+ getDynamicForm(dataRequest: any): Promise<any>;
5
+ updateDynamicForm(dataRequest: any): Promise<any>;
6
+ createTag(title: string, createBy: string, partnerId?: string): Promise<any>;
7
+ searchTag(partnerId?: string, title?: string, id?: string, search?: string): Promise<any>;
8
+ redirectLink(sku?: string, id?: string): string;
9
+ imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
10
+ imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
11
+ completeOrder(orderId: string, byUser: string): Promise<any>;
12
+ pushMessage(message: any): Promise<any>;
13
+ confirmExport(orderId: string, updateBy: string): Promise<any>;
14
+ confirmPackage(orderId: string, packageBoxId: string, byUser: string): Promise<any>;
15
+ handlePackage(orderId: string, byUser: string): Promise<any>;
16
+ packageBoxes(): Promise<any>;
17
+ shipmentParameter(orderId: string): Promise<any>;
18
+ connectShipment(orderId: string, byUser: string, pickupType: string, trackingCode: string): Promise<any>;
19
+ ffmStage(orderId: string): Promise<any>;
20
+ completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
21
+ saveTextEditor(saveTextEditor: any): Promise<any>;
22
+ getContent(type: string, relativeId: string): Promise<any>;
23
+ }