@longvansoftware/service-js-client 1.16.1 → 1.16.3

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 (95) hide show
  1. package/README.md +93 -93
  2. package/dist/src/graphql/accounting_service/mutations.js +96 -96
  3. package/dist/src/graphql/accounting_service/queries.js +57 -57
  4. package/dist/src/graphql/auth/mutations.js +235 -235
  5. package/dist/src/graphql/auth/queries.js +68 -68
  6. package/dist/src/graphql/cloud/mutations.js +282 -282
  7. package/dist/src/graphql/cloud/queries.js +341 -341
  8. package/dist/src/graphql/computing/mutations.js +303 -303
  9. package/dist/src/graphql/computing/queries.js +548 -548
  10. package/dist/src/graphql/crm/mutations.d.ts +2 -0
  11. package/dist/src/graphql/crm/mutations.js +427 -391
  12. package/dist/src/graphql/crm/queries.d.ts +1 -0
  13. package/dist/src/graphql/crm/queries.js +392 -358
  14. package/dist/src/graphql/crm_camping/mutations.js +32 -32
  15. package/dist/src/graphql/crm_camping/queries.js +228 -199
  16. package/dist/src/graphql/orderGraphQL/mutations.js +351 -351
  17. package/dist/src/graphql/orderGraphQL/queries.js +387 -387
  18. package/dist/src/graphql/payment/mutations.js +45 -45
  19. package/dist/src/graphql/payment/queries.js +60 -60
  20. package/dist/src/graphql/paymentLV/mutations.js +19 -19
  21. package/dist/src/graphql/paymentLV/queries.js +75 -75
  22. package/dist/src/graphql/product/queries.d.ts +1 -0
  23. package/dist/src/graphql/product/queries.js +910 -892
  24. package/dist/src/graphql/quicklab_service/mutations.js +154 -154
  25. package/dist/src/graphql/quicklab_service/queries.js +108 -108
  26. package/dist/src/graphql/resource_permission/mutations.js +57 -57
  27. package/dist/src/graphql/resource_permission/queries.js +13 -13
  28. package/dist/src/graphql/service/mutations.js +228 -228
  29. package/dist/src/graphql/service/queries.js +128 -128
  30. package/dist/src/graphql/user/mutations.js +214 -214
  31. package/dist/src/graphql/user/queries.js +312 -312
  32. package/dist/src/lib/crm/index.d.ts +3 -0
  33. package/dist/src/lib/crm/index.js +51 -0
  34. package/dist/src/lib/crm_camping/index.d.ts +1 -1
  35. package/dist/src/lib/crm_camping/index.js +10 -6
  36. package/dist/src/lib/product/index.d.ts +1 -0
  37. package/dist/src/lib/product/index.js +18 -0
  38. package/dist/src/lib/service.d.ts +14 -0
  39. package/dist/src/lib/service.js +101 -0
  40. package/dist/src/lib/serviceSDK.js +12 -12
  41. package/dist/src/utils/build-field-string.d.ts +1 -0
  42. package/dist/src/utils/build-field-string.js +16 -0
  43. package/package.json +43 -44
  44. package/dist/src/graphql/campaign/mutations.d.ts +0 -1
  45. package/dist/src/graphql/campaign/mutations.js +0 -34
  46. package/dist/src/graphql/campaign/queries.d.ts +0 -9
  47. package/dist/src/graphql/campaign/queries.js +0 -412
  48. package/dist/src/graphql/cashbook/queries.d.ts +0 -2
  49. package/dist/src/graphql/cashbook/queries.js +0 -99
  50. package/dist/src/graphql/paymentV2/mutations.d.ts +0 -3
  51. package/dist/src/graphql/paymentV2/mutations.js +0 -54
  52. package/dist/src/graphql/paymentV2/queries.d.ts +0 -6
  53. package/dist/src/graphql/paymentV2/queries.js +0 -186
  54. package/dist/src/graphql/store/mutations.d.ts +0 -1
  55. package/dist/src/graphql/store/mutations.js +0 -29
  56. package/dist/src/graphql/store/queries.d.ts +0 -1
  57. package/dist/src/graphql/store/queries.js +0 -29
  58. package/dist/src/lib/accounting/index.d.ts +0 -5
  59. package/dist/src/lib/accounting/index.js +0 -32
  60. package/dist/src/lib/campaign/index.d.ts +0 -20
  61. package/dist/src/lib/campaign/index.js +0 -213
  62. package/dist/src/lib/cashbook/index.d.ts +0 -6
  63. package/dist/src/lib/cashbook/index.js +0 -56
  64. package/dist/src/lib/comhub/index.d.ts +0 -6
  65. package/dist/src/lib/comhub/index.js +0 -50
  66. package/dist/src/lib/deepLinkVietQr/index.d.ts +0 -6
  67. package/dist/src/lib/deepLinkVietQr/index.js +0 -45
  68. package/dist/src/lib/getImage/index.d.ts +0 -4
  69. package/dist/src/lib/getImage/index.js +0 -10
  70. package/dist/src/lib/image/index.d.ts +0 -7
  71. package/dist/src/lib/image/index.js +0 -49
  72. package/dist/src/lib/omnigateway/index.d.ts +0 -7
  73. package/dist/src/lib/omnigateway/index.js +0 -58
  74. package/dist/src/lib/paymentV2/index.d.ts +0 -13
  75. package/dist/src/lib/paymentV2/index.js +0 -163
  76. package/dist/src/lib/portal/index.d.ts +0 -21
  77. package/dist/src/lib/portal/index.js +0 -225
  78. package/dist/src/lib/store/index.d.ts +0 -30
  79. package/dist/src/lib/store/index.js +0 -74
  80. package/dist/src/lib/token/index.d.ts +0 -5
  81. package/dist/src/lib/token/index.js +0 -32
  82. package/dist/src/lib/upload/index.d.ts +0 -5
  83. package/dist/src/lib/upload/index.js +0 -35
  84. package/dist/src/lib/warehouseV2/index.d.ts +0 -13
  85. package/dist/src/lib/warehouseV2/index.js +0 -54
  86. package/dist/src/lib/zca/index.d.ts +0 -12
  87. package/dist/src/lib/zca/index.js +0 -41
  88. package/dist/src/types/campaign.d.ts +0 -14
  89. package/dist/src/types/campaign.js +0 -2
  90. package/dist/src/types/invoice.d.ts +0 -13
  91. package/dist/src/types/invoice.js +0 -2
  92. package/dist/src/types/store.d.ts +0 -158
  93. package/dist/src/types/store.js +0 -3
  94. package/dist/src/utils/validatePhoneNumber.d.ts +0 -1
  95. package/dist/src/utils/validatePhoneNumber.js +0 -20
@@ -1,45 +0,0 @@
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.DeepLinkVietQrService = void 0;
13
- const serviceSDK_1 = require("../serviceSDK");
14
- class DeepLinkVietQrService extends serviceSDK_1.Service {
15
- constructor(endpoint, orgId, storeId) {
16
- super(endpoint, orgId, storeId);
17
- }
18
- getAndroidBank() {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- const endpoint = `/android-app-deeplinks`;
21
- const method = "GET";
22
- try {
23
- const response = yield this.restApiCallWithToken(endpoint, method);
24
- return response;
25
- }
26
- catch (error) {
27
- throw error;
28
- }
29
- });
30
- }
31
- getIosBank() {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- const endpoint = `/ios-app-deeplinks`;
34
- const method = "GET";
35
- try {
36
- const response = yield this.restApiCallWithToken(endpoint, method);
37
- return response;
38
- }
39
- catch (error) {
40
- throw error;
41
- }
42
- });
43
- }
44
- }
45
- exports.DeepLinkVietQrService = DeepLinkVietQrService;
@@ -1,4 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- export declare class GetImageService extends Service {
3
- constructor(endpoint: string, orgId: string, storeId: string);
4
- }
@@ -1,10 +0,0 @@
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;
@@ -1,7 +0,0 @@
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
- }
@@ -1,49 +0,0 @@
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;
@@ -1,7 +0,0 @@
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
- }
@@ -1,58 +0,0 @@
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;
@@ -1,13 +0,0 @@
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
- }
@@ -1,163 +0,0 @@
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
- partnerCode: this.orgId,
56
- };
57
- try {
58
- const response = yield this.graphqlQueryV3(query, variables);
59
- return response.paymentMethods;
60
- }
61
- catch (error) {
62
- throw error;
63
- }
64
- });
65
- }
66
- getPaymentMethodTypes() {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- const query = queries_1.GET_PAYMENT_METHOD_TYPES;
69
- const variables = {
70
- partnerId: this.orgId,
71
- storeId: this.storeId,
72
- };
73
- try {
74
- const response = yield this.graphqlQueryV3(query, variables);
75
- return response.getPaymentMethodTypes;
76
- }
77
- catch (error) {
78
- throw error;
79
- }
80
- });
81
- }
82
- paymentInfo(paymentId) {
83
- return __awaiter(this, void 0, void 0, function* () {
84
- const query = queries_1.PAYMENT_INFO;
85
- const variables = {
86
- paymentId,
87
- };
88
- try {
89
- const response = yield this.graphqlQueryV3(query, variables);
90
- return response.paymentInfo;
91
- }
92
- catch (error) {
93
- throw error;
94
- }
95
- });
96
- }
97
- confirmToGateway(paymentId, methodCode, returnUrl) {
98
- return __awaiter(this, void 0, void 0, function* () {
99
- const mutation = mutations_1.CONFIRM_TO_GATEWAY;
100
- const variables = {
101
- paymentId,
102
- methodCode,
103
- returnUrl,
104
- };
105
- try {
106
- const response = yield this.graphqlMutationV3(mutation, variables);
107
- return response.confirmToGateway;
108
- }
109
- catch (error) {
110
- throw error;
111
- }
112
- });
113
- }
114
- paymentStatus(paymentId) {
115
- return __awaiter(this, void 0, void 0, function* () {
116
- const query = queries_1.PAYMENT_STATUS;
117
- const variables = {
118
- paymentId,
119
- };
120
- try {
121
- const response = yield this.graphqlQueryV3(query, variables);
122
- return response.paymentStatus;
123
- }
124
- catch (error) {
125
- throw error;
126
- }
127
- });
128
- }
129
- gwConfigDetail(configId) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- const query = queries_1.GW_CONFIG_DETAIL;
132
- const variables = {
133
- configId,
134
- };
135
- try {
136
- const response = yield this.graphqlQueryV3(query, variables);
137
- return response.gwConfigDetail;
138
- }
139
- catch (error) {
140
- throw error;
141
- }
142
- });
143
- }
144
- confirmPaymentSuccessManual(paymentId, transactionNo, note, confirmBy) {
145
- return __awaiter(this, void 0, void 0, function* () {
146
- const mutation = mutations_1.CONFIRM_PAYMENT_SUCCESS_MANUAL;
147
- const variables = {
148
- paymentId: paymentId,
149
- transactionNo: transactionNo,
150
- note: note,
151
- confirmBy: confirmBy,
152
- };
153
- try {
154
- const response = yield this.graphqlMutationV3(mutation, variables);
155
- return response.confirmPaymentSuccessManual;
156
- }
157
- catch (error) {
158
- throw error;
159
- }
160
- });
161
- }
162
- }
163
- exports.PaymentServiceV2 = PaymentServiceV2;
@@ -1,21 +0,0 @@
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): Promise<any>;
19
- ffmStage(orderId: string): Promise<any>;
20
- completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
21
- }
@@ -1,225 +0,0 @@
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.PortalService = void 0;
13
- const serviceSDK_1 = require("../serviceSDK");
14
- class PortalService extends serviceSDK_1.Service {
15
- constructor(endpoint, orgId, storeId) {
16
- super(endpoint, orgId, storeId);
17
- }
18
- // GET
19
- getDynamicForm(dataRequest) {
20
- return __awaiter(this, void 0, void 0, function* () {
21
- const endpoint = `/dynamic-collection/public/v2/formApi/F.diaries`;
22
- const method = "POST";
23
- try {
24
- const response = yield this.restApiCallWithNoHeader(endpoint, method, dataRequest);
25
- return response;
26
- }
27
- catch (error) {
28
- throw error;
29
- }
30
- });
31
- }
32
- // POST
33
- updateDynamicForm(dataRequest) {
34
- return __awaiter(this, void 0, void 0, function* () {
35
- const endpoint = `/dynamic-collection/public/v2/formApi/F.diaries`;
36
- const method = "PUT";
37
- try {
38
- const response = yield this.restApiCallWithNoHeader(endpoint, method, dataRequest);
39
- return response;
40
- }
41
- catch (error) {
42
- throw error;
43
- }
44
- });
45
- }
46
- // TAG-order
47
- //Create- tag
48
- createTag(title, createBy, partnerId) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- const endpoint = `/tag-api/public/tag-core/tag/create?title=${title}&createBy=${createBy}&partnerId=${this.orgId}`;
51
- const method = "POST";
52
- try {
53
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
54
- return response;
55
- }
56
- catch (error) {
57
- throw error;
58
- }
59
- });
60
- }
61
- // search tag
62
- searchTag(partnerId, title, id, search) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- const endpoint = `/tag-api/public/tag-core/tag/get?partnerId=${this.orgId}&title=${title}&id=${id}&search=${search}`;
65
- const method = "GET";
66
- try {
67
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
68
- return response;
69
- }
70
- catch (error) {
71
- throw error;
72
- }
73
- });
74
- }
75
- //
76
- redirectLink(sku, id) {
77
- const url = `${this.endpoint}/facility/manager/session/inventory-item-by-product.xhtml?${sku ? `sku=${sku}` : `id=${id}`}&orgId=${this.orgId}`;
78
- return url;
79
- }
80
- imageProduct(parentId, parentType, width, height) {
81
- const url = `${this.endpoint}/image-gateway/public/image/${parentType}/${parentId}${width ? `?w=${width}` : ``}${`${height ? `&h=${height}` : ``}`} `;
82
- return url;
83
- }
84
- imagesProduct(parentId, parentType, width, height) {
85
- const url = `${this.endpoint}/image-gateway/public/images/${parentType}/${parentId}?w=${width}&h=${height}`;
86
- return url;
87
- }
88
- completeOrder(orderId, byUser) {
89
- return __awaiter(this, void 0, void 0, function* () {
90
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/complete-fulfillment/${byUser}`;
91
- const method = "PUT";
92
- try {
93
- const response = yield this.restApiCallWithToken(endpoint, method);
94
- return response;
95
- }
96
- catch (error) {
97
- throw error;
98
- }
99
- });
100
- }
101
- pushMessage(message) {
102
- return __awaiter(this, void 0, void 0, function* () {
103
- const endpoint = `/dynamic-collection/public/v2/webhook/push_message`;
104
- const method = "POST";
105
- console.log("endpoint", endpoint);
106
- const data = message;
107
- try {
108
- const response = yield this.restApiCallWithNoToken(endpoint, method, message);
109
- return response;
110
- }
111
- catch (error) {
112
- throw error;
113
- }
114
- });
115
- }
116
- confirmExport(orderId, updateBy) {
117
- return __awaiter(this, void 0, void 0, function* () {
118
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/confirm-export/${updateBy}`;
119
- const method = "PUT";
120
- try {
121
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
122
- return response;
123
- }
124
- catch (error) {
125
- throw error;
126
- }
127
- });
128
- }
129
- confirmPackage(orderId, packageBoxId, byUser) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/confirm-package/${packageBoxId}/${byUser}`;
132
- const method = "PUT";
133
- try {
134
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
135
- return response;
136
- }
137
- catch (error) {
138
- throw error;
139
- }
140
- });
141
- }
142
- handlePackage(orderId, byUser) {
143
- return __awaiter(this, void 0, void 0, function* () {
144
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/handle-package/${byUser}`;
145
- const method = "PUT";
146
- try {
147
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
148
- return response;
149
- }
150
- catch (error) {
151
- throw error;
152
- }
153
- });
154
- }
155
- packageBoxes() {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/packageBoxes`;
158
- const method = "GET";
159
- try {
160
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
161
- return response;
162
- }
163
- catch (error) {
164
- throw error;
165
- }
166
- });
167
- }
168
- shipmentParameter(orderId) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/shipment-parameters`;
171
- const method = "GET";
172
- try {
173
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
174
- return response;
175
- }
176
- catch (error) {
177
- throw error;
178
- }
179
- });
180
- }
181
- connectShipment(orderId, byUser) {
182
- return __awaiter(this, void 0, void 0, function* () {
183
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/connect-shipment/${byUser}`;
184
- const method = "POST";
185
- try {
186
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
187
- return response;
188
- }
189
- catch (error) {
190
- throw error;
191
- }
192
- });
193
- }
194
- ffmStage(orderId) {
195
- return __awaiter(this, void 0, void 0, function* () {
196
- const endpoint = `/fulfillment-api/public/fulfillment/${this.orgId}/${orderId}/fulfillment-stage`;
197
- const method = "GET";
198
- try {
199
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
200
- return response;
201
- }
202
- catch (error) {
203
- throw error;
204
- }
205
- });
206
- }
207
- completeCancelFFMOrder(orderId, note, reason) {
208
- return __awaiter(this, void 0, void 0, function* () {
209
- const endpoint = `/fulfillment-api/public/fulfillment/FOX/${orderId}/completeCancelOrder`;
210
- const method = "PUT";
211
- const reqData = {
212
- note: note,
213
- reason: reason,
214
- };
215
- try {
216
- const response = yield this.restApiCallWithNoHeader(endpoint, method, reqData);
217
- return response;
218
- }
219
- catch (error) {
220
- throw error;
221
- }
222
- });
223
- }
224
- }
225
- exports.PortalService = PortalService;
@@ -1,30 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- /**
3
- * Service class for managing store-related operations.
4
- */
5
- export declare class StoreService extends Service {
6
- /**
7
- * Constructs a new StoreService instance.
8
- * @param endpoint - The endpoint URL for the service.
9
- * @param orgId - The organization ID.
10
- * @param storeId - The store ID.
11
- */
12
- constructor(endpoint: string, orgId: string, storeId: string);
13
- setToken(token: string): void;
14
- /**
15
- * Creates a store channel.
16
- *
17
- * @param storeChannelData - The data for creating the store channel.
18
- * @returns A promise that resolves to the created store channel response.
19
- * @throws If an error occurs while creating the store channel.
20
- */
21
- createStoreChannel(storeChannelData: any): Promise<any>;
22
- /**
23
- * Gets available store channels for an employee.
24
- *
25
- * @param empId - The employee ID.
26
- * @returns A promise that resolves to the available store channels.
27
- * @throws If an error occurs while fetching the store channels.
28
- */
29
- getAvailableStoreChannels(empId: string): Promise<any>;
30
- }