@longvansoftware/service-js-client 1.16.4 → 1.16.5

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 (73) hide show
  1. package/dist/src/graphql/cloud/mutations.d.ts +23 -20
  2. package/dist/src/graphql/cloud/mutations.js +55 -1
  3. package/dist/src/graphql/crm/queries.d.ts +17 -14
  4. package/dist/src/graphql/crm/queries.js +37 -1
  5. package/dist/src/lib/cloud/index.d.ts +2 -0
  6. package/dist/src/lib/cloud/index.js +38 -0
  7. package/dist/src/lib/crm/index.d.ts +2 -0
  8. package/dist/src/lib/crm/index.js +34 -0
  9. package/package.json +1 -1
  10. package/dist/src/graphql/campaign/mutations.d.ts +0 -1
  11. package/dist/src/graphql/campaign/mutations.js +0 -34
  12. package/dist/src/graphql/campaign/queries.d.ts +0 -9
  13. package/dist/src/graphql/campaign/queries.js +0 -427
  14. package/dist/src/graphql/cashbook/queries.d.ts +0 -2
  15. package/dist/src/graphql/cashbook/queries.js +0 -99
  16. package/dist/src/graphql/fragments/product.d.ts +0 -38
  17. package/dist/src/graphql/fragments/product.js +0 -196
  18. package/dist/src/graphql/paymentV2/mutations.d.ts +0 -5
  19. package/dist/src/graphql/paymentV2/mutations.js +0 -120
  20. package/dist/src/graphql/paymentV2/queries.d.ts +0 -9
  21. package/dist/src/graphql/paymentV2/queries.js +0 -257
  22. package/dist/src/graphql/store/mutations.d.ts +0 -1
  23. package/dist/src/graphql/store/mutations.js +0 -29
  24. package/dist/src/graphql/store/queries.d.ts +0 -1
  25. package/dist/src/graphql/store/queries.js +0 -29
  26. package/dist/src/lib/accounting/index.d.ts +0 -5
  27. package/dist/src/lib/accounting/index.js +0 -32
  28. package/dist/src/lib/campaign/index.d.ts +0 -20
  29. package/dist/src/lib/campaign/index.js +0 -218
  30. package/dist/src/lib/cashbook/index.d.ts +0 -6
  31. package/dist/src/lib/cashbook/index.js +0 -56
  32. package/dist/src/lib/comhub/index.d.ts +0 -6
  33. package/dist/src/lib/comhub/index.js +0 -50
  34. package/dist/src/lib/deepLinkVietQr/index.d.ts +0 -7
  35. package/dist/src/lib/deepLinkVietQr/index.js +0 -58
  36. package/dist/src/lib/fileService/index.d.ts +0 -34
  37. package/dist/src/lib/fileService/index.js +0 -80
  38. package/dist/src/lib/getImage/index.d.ts +0 -4
  39. package/dist/src/lib/getImage/index.js +0 -10
  40. package/dist/src/lib/image/index.d.ts +0 -7
  41. package/dist/src/lib/image/index.js +0 -49
  42. package/dist/src/lib/omnigateway/index.d.ts +0 -7
  43. package/dist/src/lib/omnigateway/index.js +0 -58
  44. package/dist/src/lib/paymentV2/index.d.ts +0 -18
  45. package/dist/src/lib/paymentV2/index.js +0 -245
  46. package/dist/src/lib/portal/index.d.ts +0 -23
  47. package/dist/src/lib/portal/index.js +0 -255
  48. package/dist/src/lib/shareZalo/index.d.ts +0 -5
  49. package/dist/src/lib/shareZalo/index.js +0 -32
  50. package/dist/src/lib/store/index.d.ts +0 -30
  51. package/dist/src/lib/store/index.js +0 -74
  52. package/dist/src/lib/token/index.d.ts +0 -5
  53. package/dist/src/lib/token/index.js +0 -32
  54. package/dist/src/lib/upload/index.d.ts +0 -5
  55. package/dist/src/lib/upload/index.js +0 -35
  56. package/dist/src/lib/warehouseV2/index.d.ts +0 -13
  57. package/dist/src/lib/warehouseV2/index.js +0 -54
  58. package/dist/src/lib/zca/index.d.ts +0 -12
  59. package/dist/src/lib/zca/index.js +0 -41
  60. package/dist/src/types/campaign.d.ts +0 -14
  61. package/dist/src/types/campaign.js +0 -2
  62. package/dist/src/types/common.d.ts +0 -264
  63. package/dist/src/types/common.js +0 -35
  64. package/dist/src/types/invoice.d.ts +0 -13
  65. package/dist/src/types/invoice.js +0 -2
  66. package/dist/src/types/portal.d.ts +0 -7
  67. package/dist/src/types/portal.js +0 -2
  68. package/dist/src/types/store.d.ts +0 -158
  69. package/dist/src/types/store.js +0 -3
  70. package/dist/src/utils/errorHandler.d.ts +0 -64
  71. package/dist/src/utils/errorHandler.js +0 -197
  72. package/dist/src/utils/validatePhoneNumber.d.ts +0 -1
  73. package/dist/src/utils/validatePhoneNumber.js +0 -20
@@ -1,196 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PRODUCT_EXTENDED_FIELDS = exports.PRODUCT_SIMPLE_FIELDS = exports.PRODUCT_FULL_DETAILS = exports.PRODUCT_UNIT = exports.PRODUCT_CATEGORIES = exports.PRODUCT_FEATURE_TYPES = exports.PRODUCT_VARIANTS = exports.PRODUCT_ATTRIBUTES = exports.PRODUCT_CORE_FIELDS = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- /**
6
- * Common product fields fragment
7
- * Used across multiple product queries to reduce duplication
8
- */
9
- exports.PRODUCT_CORE_FIELDS = (0, graphql_tag_1.gql) `
10
- fragment ProductCoreFields on Product {
11
- id
12
- title
13
- description
14
- sku
15
- shortDescription
16
- weight
17
- width
18
- depth
19
- height
20
- vat
21
- qualify
22
- parentId
23
- handle
24
- price
25
- options
26
- optionsRelationship
27
- compareAtPrice
28
- featuredImage
29
- images
30
- }
31
- `;
32
- /**
33
- * Product attributes fragment
34
- */
35
- exports.PRODUCT_ATTRIBUTES = (0, graphql_tag_1.gql) `
36
- fragment ProductAttributes on Product {
37
- productAttributes {
38
- attributeName
39
- attributeValue
40
- }
41
- }
42
- `;
43
- /**
44
- * Product variants fragment
45
- */
46
- exports.PRODUCT_VARIANTS = (0, graphql_tag_1.gql) `
47
- fragment ProductVariants on Product {
48
- variants {
49
- id
50
- handle
51
- title
52
- price
53
- compareAtPrice
54
- options
55
- optionsIds
56
- featuredImage
57
- sku
58
- }
59
- }
60
- `;
61
- /**
62
- * Product feature types fragment
63
- */
64
- exports.PRODUCT_FEATURE_TYPES = (0, graphql_tag_1.gql) `
65
- fragment ProductFeatureTypes on Product {
66
- featureTypes {
67
- id
68
- name
69
- values
70
- valuesFull {
71
- id
72
- name
73
- }
74
- }
75
- }
76
- `;
77
- /**
78
- * Product categories fragment
79
- */
80
- exports.PRODUCT_CATEGORIES = (0, graphql_tag_1.gql) `
81
- fragment ProductCategories on Product {
82
- categories {
83
- id
84
- title
85
- handle
86
- }
87
- }
88
- `;
89
- /**
90
- * Product unit fragment
91
- */
92
- exports.PRODUCT_UNIT = (0, graphql_tag_1.gql) `
93
- fragment ProductUnit on Product {
94
- unitDTO {
95
- id
96
- name
97
- }
98
- }
99
- `;
100
- /**
101
- * Complete product details fragment
102
- * Combines all product fragments for detailed queries
103
- */
104
- exports.PRODUCT_FULL_DETAILS = (0, graphql_tag_1.gql) `
105
- fragment ProductFullDetails on Product {
106
- ...ProductCoreFields
107
- ...ProductAttributes
108
- ...ProductVariants
109
- ...ProductFeatureTypes
110
- ...ProductCategories
111
- ...ProductUnit
112
- }
113
- ${exports.PRODUCT_CORE_FIELDS}
114
- ${exports.PRODUCT_ATTRIBUTES}
115
- ${exports.PRODUCT_VARIANTS}
116
- ${exports.PRODUCT_FEATURE_TYPES}
117
- ${exports.PRODUCT_CATEGORIES}
118
- ${exports.PRODUCT_UNIT}
119
- `;
120
- /**
121
- * Simple product fields for list views
122
- */
123
- exports.PRODUCT_SIMPLE_FIELDS = (0, graphql_tag_1.gql) `
124
- fragment ProductSimpleFields on Product {
125
- id
126
- title
127
- sku
128
- shortDescription
129
- description
130
- subType
131
- vat
132
- qualify
133
- parentId
134
- handle
135
- price
136
- compareAtPrice
137
- priceType
138
- priceTypeName
139
- featuredImage
140
- optionsRelationship
141
- images
142
- }
143
- `;
144
- /**
145
- * Extended product fields for getProducts query
146
- */
147
- exports.PRODUCT_EXTENDED_FIELDS = (0, graphql_tag_1.gql) `
148
- fragment ProductExtendedFields on Product {
149
- id
150
- title
151
- subType
152
- description
153
- sku
154
- shortDescription
155
- weight
156
- width
157
- depth
158
- height
159
- vat
160
- qualify
161
- parentId
162
- handle
163
- price
164
- priceType
165
- salePolicy
166
- priceTypeName
167
- priceVaries
168
- available
169
- tags
170
- options
171
- optionsRelationship
172
- compareAtPrice
173
- featuredImage
174
- images
175
- categories {
176
- id
177
- title
178
- image
179
- icon
180
- parentId
181
- level
182
- handle
183
- description
184
- }
185
- groups {
186
- id
187
- name
188
- policy
189
- image
190
- }
191
- unitDTO {
192
- id
193
- name
194
- }
195
- }
196
- `;
@@ -1,5 +0,0 @@
1
- export declare const CANCEL_PAYMENT: import("graphql").DocumentNode;
2
- export declare const CONFIRM_TO_GATEWAY: import("graphql").DocumentNode;
3
- export declare const CONFIRM_PAYMENT_SUCCESS_MANUAL: import("graphql").DocumentNode;
4
- export declare const HANDLE_UPDATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
5
- export declare const HANDLE_CREATE_GATEWAY_CONFIG: import("graphql").DocumentNode;
@@ -1,120 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HANDLE_CREATE_GATEWAY_CONFIG = exports.HANDLE_UPDATE_GATEWAY_CONFIG = exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = exports.CONFIRM_TO_GATEWAY = exports.CANCEL_PAYMENT = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- exports.CANCEL_PAYMENT = (0, graphql_tag_1.gql) `
6
- mutation CancelPayment($paymentId: String!, $reason: String!) {
7
- cancelPayment(paymentId: $paymentId, reason: $reason)
8
- }
9
- `;
10
- exports.CONFIRM_TO_GATEWAY = (0, graphql_tag_1.gql) `
11
- mutation ConfirmToGateWay(
12
- $paymentId: String!
13
- $methodCode: String
14
- $returnUrl: String
15
- ) {
16
- confirmToGateway(
17
- paymentId: $paymentId
18
- methodCode: $methodCode
19
- returnUrl: $returnUrl
20
- ) {
21
- code
22
- message
23
- data
24
- qrCodeUrl
25
- deeplink
26
- deeplinkMiniApp
27
- paymentId
28
- gwConfigId
29
- }
30
- }
31
- `;
32
- exports.CONFIRM_PAYMENT_SUCCESS_MANUAL = (0, graphql_tag_1.gql) `
33
- mutation ConfirmPaymentSuccessManual(
34
- $paymentId: String!
35
- $transactionNo: String!
36
- $note: String
37
- $confirmBy: String!
38
- ) {
39
- confirmPaymentSuccessManual(
40
- paymentId: $paymentId
41
- transactionNo: $transactionNo
42
- note: $note
43
- confirmBy: $confirmBy
44
- ) {
45
- code
46
- message
47
- data
48
- qrCodeUrl
49
- deeplink
50
- deeplinkMiniApp
51
- paymentId
52
- }
53
- }
54
- `;
55
- exports.HANDLE_UPDATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
56
- mutation HandleUpdateGatewayConfig(
57
- $input: PaymentGatewayConfigInput!
58
- $cassoApiKey: String
59
- ) {
60
- handleUpdateGatewayConfig(input: $input, cassoApiKey: $cassoApiKey) {
61
- id
62
- methodCode
63
- partnerCode
64
- subMethodCode
65
- gwPartnerCode
66
- gwPartnerName
67
- gwPaymentMethod
68
- gwSubChannel
69
- gwMethodVersion
70
- hashAlgorithm
71
- accessKey
72
- secretKey
73
- responseUrl
74
- requestUrl
75
- methodType
76
- publicKey
77
- redirectUrl
78
- activated
79
- paymentRecordingMethod
80
- userId
81
- storeIdMapping {
82
- storeId
83
- gwStoreId
84
- }
85
- }
86
- }
87
- `;
88
- exports.HANDLE_CREATE_GATEWAY_CONFIG = (0, graphql_tag_1.gql) `
89
- mutation HandleCreateGatewayConfig(
90
- $input: PaymentGatewayConfigInput!
91
- $cassoApiKey: String
92
- ) {
93
- handleCreateGatewayConfig(input: $input, cassoApiKey: $cassoApiKey) {
94
- id
95
- methodCode
96
- partnerCode
97
- subMethodCode
98
- gwPartnerCode
99
- gwPartnerName
100
- gwPaymentMethod
101
- gwSubChannel
102
- gwMethodVersion
103
- hashAlgorithm
104
- accessKey
105
- secretKey
106
- responseUrl
107
- requestUrl
108
- methodType
109
- publicKey
110
- redirectUrl
111
- activated
112
- paymentRecordingMethod
113
- userId
114
- storeIdMapping {
115
- storeId
116
- gwStoreId
117
- }
118
- }
119
- }
120
- `;
@@ -1,9 +0,0 @@
1
- export declare const PAYMENTS_BY_ORDERS: import("graphql").DocumentNode;
2
- export declare const PAYMENT_METHODS: import("graphql").DocumentNode;
3
- export declare const GET_PAYMENT_METHOD_TYPES: import("graphql").DocumentNode;
4
- export declare const PAYMENT_INFO: import("graphql").DocumentNode;
5
- export declare const PAYMENT_STATUS: import("graphql").DocumentNode;
6
- export declare const GW_CONFIG_DETAIL: import("graphql").DocumentNode;
7
- export declare const GET_PAYMENT_METHOD_TITLES: import("graphql").DocumentNode;
8
- export declare const GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE: import("graphql").DocumentNode;
9
- export declare const GET_PAYMENT_METHOD_TYPES_V2: import("graphql").DocumentNode;
@@ -1,257 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_PAYMENT_METHOD_TYPES_V2 = exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = exports.GET_PAYMENT_METHOD_TITLES = exports.GW_CONFIG_DETAIL = exports.PAYMENT_STATUS = exports.PAYMENT_INFO = exports.GET_PAYMENT_METHOD_TYPES = exports.PAYMENT_METHODS = exports.PAYMENTS_BY_ORDERS = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- exports.PAYMENTS_BY_ORDERS = (0, graphql_tag_1.gql) `
6
- query PaymentsByOrders($orderIds: [String!]!) {
7
- paymentsByOrders(orderIds: $orderIds) {
8
- methodCode
9
- methodTypeCode
10
- gatewayConfigId
11
- partnerCode
12
- totalAmount
13
- fee
14
- discountAmount
15
- payDate
16
- payType
17
- transactionDate
18
- orderId
19
- paymentId
20
- invoiceId
21
- orderInfo
22
- orderType
23
- locale
24
- merchantIp
25
- extraData
26
- storeID
27
- bankCode
28
- appUser
29
- phone
30
- email
31
- address
32
- statusCode
33
- statusDescription
34
- transactionId
35
- createBy
36
- methodDescription
37
- methodMapping
38
- baseMethodCode
39
- confirmPaidBy
40
- confirmPaidDate
41
- qrCode
42
- payUrl
43
- paymentNote
44
- }
45
- }
46
- `;
47
- exports.PAYMENT_METHODS = (0, graphql_tag_1.gql) `
48
- query PaymentMethods {
49
- paymentMethods {
50
- id
51
- code
52
- name
53
- description
54
- image
55
- titles {
56
- id
57
- code
58
- name
59
- lang
60
- showField
61
- required
62
- }
63
- }
64
- }
65
- `;
66
- exports.GET_PAYMENT_METHOD_TYPES = (0, graphql_tag_1.gql) `
67
- query GetPaymentMethodTypes($partnerId: String!, $storeId: String!) {
68
- getPaymentMethodTypes(partnerId: $partnerId, storeId: $storeId) {
69
- code
70
- name
71
- description
72
- image
73
- }
74
- }
75
- `;
76
- exports.PAYMENT_INFO = (0, graphql_tag_1.gql) `
77
- query PaymentInfo($paymentId: String!) {
78
- paymentInfo(paymentId: $paymentId) {
79
- id
80
- payType
81
- payDate
82
- dueDate
83
- completePayment
84
- paymentTerm
85
- methodCode
86
- methodTypeCode
87
- gatewayConfigId
88
- partnerCode
89
- totalAmount
90
- remain
91
- currCode
92
- invoiceId
93
- orderId
94
- orderInfo
95
- orderGroup
96
- orderType
97
- returnUrl
98
- ipnUrl
99
- merchantIp
100
- extraData
101
- storeID
102
- bankCode
103
- appUser
104
- phone
105
- email
106
- address
107
- signature
108
- createBy
109
- transactionId
110
- baseMethodCode
111
- retry
112
- postToOrder
113
- editAble
114
- approved
115
- statusCode
116
- paymentGroup
117
- userId
118
- type
119
- attributes
120
- items {
121
- id
122
- partnerCode
123
- paymentId
124
- type
125
- orderId
126
- invoiceId
127
- orderGroup
128
- orderType
129
- orderInfo
130
- totalAmount
131
- }
132
- }
133
- }
134
- `;
135
- exports.PAYMENT_STATUS = (0, graphql_tag_1.gql) `
136
- query PaymentStatus($paymentId: String!) {
137
- paymentStatus(paymentId: $paymentId) {
138
- methodCode
139
- methodTypeCode
140
- gatewayConfigId
141
- partnerCode
142
- totalAmount
143
- fee
144
- discountAmount
145
- payDate
146
- payType
147
- transactionDate
148
- paymentId
149
- invoiceId
150
- orderInfo
151
- orderType
152
- locale
153
- merchantIp
154
- extraData
155
- storeID
156
- bankCode
157
- appUser
158
- phone
159
- email
160
- address
161
- statusCode
162
- statusDescription
163
- transactionId
164
- createBy
165
- methodDescription
166
- methodMapping
167
- baseMethodCode
168
- confirmPaidBy
169
- confirmPaidDate
170
- qrCode
171
- payUrl
172
- attributes
173
- }
174
- }
175
- `;
176
- exports.GW_CONFIG_DETAIL = (0, graphql_tag_1.gql) `
177
- query GwConfigDetail($configId: String!) {
178
- gwConfigDetail(configId: $configId) {
179
- id
180
- name
181
- methodCode
182
- partnerCode
183
- subMethodCode
184
- gwPartnerCode
185
- gwPartnerName
186
- gwSubChannel
187
- gwMethodVersion
188
- accessKey
189
- secretKey
190
- description
191
- activated
192
- }
193
- }
194
- `;
195
- exports.GET_PAYMENT_METHOD_TITLES = (0, graphql_tag_1.gql) `
196
- query GetPaymentMethodTitles($methodCode: String!) {
197
- getPaymentMethodTitles(methodCode: $methodCode) {
198
- id
199
- code
200
- name
201
- lang
202
- showField
203
- required
204
- }
205
- }
206
- `;
207
- exports.GET_PAYEMNT_GATEWAYS_BY_METHOD_CODE = (0, graphql_tag_1.gql) `
208
- query GetPaymentGatewaysByMethodCode(
209
- $partnerId: String!
210
- $methodCode: String!
211
- $storeId: String
212
- ) {
213
- getPaymentGatewaysByMethodCode(
214
- partnerId: $partnerId
215
- methodCode: $methodCode
216
- storeId: $storeId
217
- ) {
218
- id
219
- name
220
- methodCode
221
- partnerCode
222
- subMethodCode
223
- gwPartnerCode
224
- gwPartnerName
225
- gwSubChannel
226
- gwMethodVersion
227
- hashAlgorithm
228
- accessKey
229
- secretKey
230
- requestUrl
231
- description
232
- activated
233
- storeActive
234
- }
235
- }
236
- `;
237
- exports.GET_PAYMENT_METHOD_TYPES_V2 = (0, graphql_tag_1.gql) `
238
- query GetPaymentMethodTypes(
239
- $partnerId: String!
240
- $storeId: String!
241
- $storeActive: StoreActive
242
- $allMethodTypes: Boolean
243
- ) {
244
- getPaymentMethodTypes(
245
- partnerId: $partnerId
246
- storeId: $storeId
247
- storeActive: $storeActive
248
- allMethodTypes: $allMethodTypes
249
- ) {
250
- code
251
- name
252
- description
253
- image
254
- storeActive
255
- }
256
- }
257
- `;
@@ -1 +0,0 @@
1
- export declare const CREATE_STORE_MUTATION: import("graphql").DocumentNode;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CREATE_STORE_MUTATION = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- exports.CREATE_STORE_MUTATION = (0, graphql_tag_1.gql) `
6
- mutation CreateStore($partnerId: String, $storeName: String) {
7
- createStore(partnerId: $partnerId, storeName: $storeName) {
8
- id
9
- createdStamp
10
- name
11
- type
12
- enable
13
- partyId
14
- warehouses
15
- warehouseIdDefault
16
- enableOrderAbleFuture
17
- enableOrderNegativeQuantity
18
- storeEcommerceName
19
- shippingCompanies
20
- shippingCompanyIdPrimary
21
- customerIdPrimary
22
- paymentMethodIdPrimary
23
- enableCustomProductPrice
24
- enablePaymentPartial
25
- paymentPartialPercent
26
- productStoreLink
27
- }
28
- }
29
- `;
@@ -1 +0,0 @@
1
- export declare const GET_STORE_CHANNEL_BY_EMP_ID_QUERY: import("graphql").DocumentNode;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GET_STORE_CHANNEL_BY_EMP_ID_QUERY = void 0;
4
- const graphql_tag_1 = require("graphql-tag");
5
- exports.GET_STORE_CHANNEL_BY_EMP_ID_QUERY = (0, graphql_tag_1.gql) `
6
- query GetStoreChannelByEmpId($saleId: String) {
7
- getStoreChannelByEmpId(saleId: $saleId) {
8
- id
9
- createdStamp
10
- name
11
- type
12
- enable
13
- partyId
14
- warehouses
15
- warehouseIdDefault
16
- enableOrderAbleFuture
17
- enableOrderNegativeQuantity
18
- storeEcommerceName
19
- shippingCompanies
20
- shippingCompanyIdPrimary
21
- customerIdPrimary
22
- paymentMethodIdPrimary
23
- enableCustomProductPrice
24
- enablePaymentPartial
25
- paymentPartialPercent
26
- productStoreLink
27
- }
28
- }
29
- `;
@@ -1,5 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- export declare class AccountingService extends Service {
3
- constructor(endpoint: string, orgId: string, storeId: string);
4
- getCustomerWallet(customerId: string, type: string): Promise<any>;
5
- }
@@ -1,32 +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.AccountingService = void 0;
13
- const serviceSDK_1 = require("../serviceSDK");
14
- class AccountingService extends serviceSDK_1.Service {
15
- constructor(endpoint, orgId, storeId) {
16
- super(endpoint, orgId, storeId);
17
- }
18
- getCustomerWallet(customerId, type) {
19
- return __awaiter(this, void 0, void 0, function* () {
20
- const endpoint = `/${this.orgId}/get_gl_account?partyId=${customerId}&type=${type}`;
21
- const method = "GET";
22
- try {
23
- const response = yield this.restApiCallWithNoHeader(endpoint, method);
24
- return response;
25
- }
26
- catch (error) {
27
- throw error;
28
- }
29
- });
30
- }
31
- }
32
- exports.AccountingService = AccountingService;
@@ -1,20 +0,0 @@
1
- import { Service } from "../serviceSDK";
2
- export declare class CampaignService extends Service {
3
- /**
4
- * Constructs a new CampaignService 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
- getCampaignActionActiveNow(customerId: string, campaignActionType: string): Promise<any>;
11
- searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
12
- checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
13
- getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
14
- getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
15
- getVoucherAvailableForCustomer(campaignId: string, campaignActionId: string, customerId: string, excludeExpired: Boolean, isPageAble: Boolean): Promise<any>;
16
- addCustomerToVoucher(voucherCode: string, userId: string, affiliateId: string): Promise<any>;
17
- suggestVoucher(customerId: string, campaignId: string, campaignActionId: string, isBirthday: Boolean): Promise<any>;
18
- getCampaignActionById(id: string): Promise<any>;
19
- searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
20
- }