@longvansoftware/storefront-js-client 4.3.7-beta.0 → 4.3.7

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 (38) hide show
  1. package/README.md +221 -221
  2. package/dist/src/graphql/auth/mutations.js +309 -309
  3. package/dist/src/graphql/auth/queries.js +209 -209
  4. package/dist/src/graphql/campaign/mutations.js +26 -26
  5. package/dist/src/graphql/campaign/queries.js +457 -457
  6. package/dist/src/graphql/cashbook/queries.js +93 -93
  7. package/dist/src/graphql/cloud/mutations.js +103 -103
  8. package/dist/src/graphql/cloud/queries.js +112 -112
  9. package/dist/src/graphql/cloudCloud/mutations.js +12 -12
  10. package/dist/src/graphql/cloudCloud/queries.js +117 -117
  11. package/dist/src/graphql/cloudService/queries.d.ts +1 -0
  12. package/dist/src/graphql/cloudService/queries.js +71 -0
  13. package/dist/src/graphql/computing/mutations.js +96 -96
  14. package/dist/src/graphql/computing/queries.js +41 -41
  15. package/dist/src/graphql/crm/mutations.js +1064 -1064
  16. package/dist/src/graphql/crm/queries.js +920 -920
  17. package/dist/src/graphql/orderCloud/mutations.js +7 -7
  18. package/dist/src/graphql/orderCloud/queries.js +7 -7
  19. package/dist/src/graphql/payment/mutations.js +194 -194
  20. package/dist/src/graphql/payment/queries.js +117 -117
  21. package/dist/src/graphql/paymentV2/mutations.js +115 -115
  22. package/dist/src/graphql/paymentV2/queries.js +263 -263
  23. package/dist/src/graphql/product/mutations.js +652 -652
  24. package/dist/src/graphql/product/queries.js +990 -989
  25. package/dist/src/graphql/service/mutations.js +304 -304
  26. package/dist/src/graphql/service/queries.js +131 -131
  27. package/dist/src/graphql/store/mutations.js +24 -24
  28. package/dist/src/graphql/store/queries.js +24 -24
  29. package/dist/src/graphql/user/mutations.js +201 -201
  30. package/dist/src/graphql/user/queries.js +339 -339
  31. package/dist/src/lib/cloudService/index.d.ts +5 -0
  32. package/dist/src/lib/cloudService/index.js +35 -0
  33. package/dist/src/lib/order/index.d.ts +0 -9
  34. package/dist/src/lib/order/index.js +0 -21
  35. package/dist/src/lib/serviceSDK.js +14 -14
  36. package/package.json +43 -43
  37. package/dist/index.d.ts +0 -1698
  38. package/dist/index.js +0 -13673
package/dist/index.d.ts DELETED
@@ -1,1698 +0,0 @@
1
- import { ApolloClient, NormalizedCacheObject } from '@apollo/client/core';
2
- import { DocumentNode } from 'graphql';
3
-
4
- declare class Service {
5
- protected token: string | null;
6
- protected client: ApolloClient<NormalizedCacheObject>;
7
- protected orgId: string;
8
- protected storeId: string;
9
- protected endpoint: string;
10
- protected environment: "dev" | "live";
11
- constructor(endpoint: string, orgId: string, storeId: string, environment?: "dev" | "live");
12
- setToken(token: string): void;
13
- setStoreId(storeId: string): void;
14
- setOrgId(orgId: string): void;
15
- private handleApolloError;
16
- protected graphqlQuery(query: DocumentNode, variables: any): Promise<any>;
17
- protected graphqlMutation(mutation: DocumentNode, variables: any): Promise<any>;
18
- protected restApiCallWithToken(path: string, method: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: any): Promise<any>;
19
- protected restApiCallWithNoToken(path: string, method: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: any): Promise<any>;
20
- protected restApiCallWithNoHeader(path: string, method: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: any): Promise<any>;
21
- protected graphqlQueryV2(query: DocumentNode, variables: any): Promise<any>;
22
- protected graphqlMutationV2(mutation: DocumentNode, variables: any): Promise<any>;
23
- protected graphqlQueryV3(query: DocumentNode, variables: any): Promise<any>;
24
- protected graphqlQueryV4(query: DocumentNode, variables: any): Promise<any>;
25
- protected graphqlMutationV3(mutation: DocumentNode, variables: any): Promise<any>;
26
- }
27
-
28
- interface Product {
29
- id: string;
30
- title: string;
31
- description: string;
32
- sku: string;
33
- price: number;
34
- available: boolean;
35
- categories: Category[];
36
- featuredImage: string;
37
- subType: string;
38
- }
39
- interface Category {
40
- id: string;
41
- title: string;
42
- image: string;
43
- icon: string;
44
- parentId: string | null;
45
- level: number;
46
- sequence: number;
47
- handle: string;
48
- }
49
- interface Category {
50
- id: string;
51
- title: string;
52
- image: string;
53
- icon: string;
54
- parentId: string | null;
55
- level: number;
56
- sequence: number;
57
- handle: string;
58
- child?: Category[];
59
- }
60
-
61
- /**
62
- * Service class for managing product-related operations.
63
- */
64
- declare class ProductService extends Service {
65
- /**
66
- * Constructs a new ProductService instance.
67
- * @param endpoint - The endpoint URL for the service.
68
- * @param orgId - The organization ID.
69
- * @param storeId - The store ID.
70
- */
71
- constructor(endpoint: string, orgId: string, storeId: string);
72
- /**
73
- * Retrieves a product by its ID.
74
- * @param productId - The ID of the product.
75
- * @returns A promise that resolves to the product.
76
- * @throws If an error occurs while fetching the product.
77
- */
78
- getProductById(productId: string): Promise<any>;
79
- /**
80
- * Retrieves a product by its slug.
81
- * @param slug - The slug of the product.
82
- * @returns A promise that resolves to the product.
83
- * @throws If an error occurs while fetching the product.
84
- */
85
- getProductBySlug(slug: string): Promise<Product>;
86
- /**
87
- * Retrieves simple products based on the provided variables.
88
- * @param variables - The variables for the query.
89
- * @returns A promise that resolves to the simple products.
90
- * @throws If an error occurs while fetching the simple products.
91
- */
92
- getSimpleProducts(variables: any): Promise<Product[] | null>;
93
- getProductOption(productId: string): Promise<any>;
94
- getPolicy(groupId: string): Promise<any>;
95
- getStores(type: string): Promise<any>;
96
- getDetailStores(): Promise<any>;
97
- getDetailStoresV2(storeId: string): Promise<any>;
98
- getDetailStoresV3(partnerId: string, storeId: string): Promise<any>;
99
- getProductImage: (productId: string) => Promise<any>;
100
- getCategory(typeBuild: string, level: number, storeId: string): Promise<any>;
101
- getProduct(dataQuery: any): Promise<any>;
102
- updateProductTitle(productId: string, title: string, updatedBy: string): Promise<any>;
103
- updatePrice(productId: string, price: string, updatedBy: string): Promise<any>;
104
- updatePricePromotion(productId: string, price: string, updatedBy: string): Promise<any>;
105
- updateCategory(productId: string, categoryId: string, updatedBy: string): Promise<any>;
106
- updateShortDescription(productId: string, shortDescription: string, updatedBy: string): Promise<any>;
107
- updateUnit(productId: string, unitId: string, updatedBy: string): Promise<any>;
108
- getUnits(): Promise<any>;
109
- clearAllCaches(): Promise<any>;
110
- getProductVariantById(variantId: string): Promise<any>;
111
- createProductTemplatesByPartner(partnerId: string): Promise<any>;
112
- createProductFromTemplate(templateId: string, createdBy: string): Promise<any>;
113
- getProductTemplates(groupId: string): Promise<any>;
114
- getGroups(): Promise<any>;
115
- getBrand(): Promise<any>;
116
- getTags(): Promise<any>;
117
- addProductAttribute(productId: string, key: string, values: [string]): Promise<any>;
118
- saveProductDraft(productId: string, productInputDTOS: [any]): Promise<any>;
119
- updateProductBrand(productId: string, brandId: string, updatedBy: string): Promise<any>;
120
- updateProductAttribute(productId: string, attributeId: string, key: string, values: [string]): Promise<any>;
121
- removeProductAttribute(productId: string, key: string): Promise<any>;
122
- createProductVariant(attributes: [any]): Promise<any>;
123
- updateProductSKU(productId: string, sku: string, updatedBy: string): Promise<any>;
124
- updateProductVAT(productId: string, vat: number, updatedBy: string): Promise<any>;
125
- createGroup(name: string, createdBy: string): Promise<any>;
126
- createCategory(name: string, createdBy: string): Promise<any>;
127
- createBrand(brandName: string, createdBy: string): Promise<any>;
128
- createUnit(name: string): Promise<any>;
129
- createProductImages(productId: string, createdBy: string, imageDTO: any): Promise<any>;
130
- removeProductImages(productId: string, imageDTO: any): Promise<any>;
131
- buildProductPreBuildByProduct(productId: string): Promise<any>;
132
- buildProductPreBuildByStore(storeIds: [string]): Promise<any>;
133
- getProductByGroup(storeChannel: string, group: string): Promise<any>;
134
- RemoveImage(productId: string): Promise<any>;
135
- CreateProduct(productInputDTO: any): Promise<void>;
136
- RemoveProduct(productId: string): Promise<any>;
137
- UpdateProductSubtype(productId: string, subType: string): Promise<any>;
138
- getCategoryById(categoryId: string): Promise<any>;
139
- getCategoryByHandle(handle: string): Promise<any>;
140
- }
141
-
142
- interface LoginRequest {
143
- username: string;
144
- password: string;
145
- }
146
- interface LoginResponse {
147
- partyId: string;
148
- orgId: string;
149
- fullName: string;
150
- email: string;
151
- phone: string;
152
- address: string;
153
- identityNumber: string;
154
- gender: string;
155
- birthDate: string;
156
- avatarUrl: string;
157
- accessToken: string;
158
- username: string;
159
- orgPermissionsMap: Record<string, any>;
160
- orgPositionsMap: Record<string, any>;
161
- orgRolesMap: Record<string, any>;
162
- }
163
- interface RegisterRequest {
164
- username: string;
165
- fullName: string;
166
- }
167
- interface UpdateInfoResponse {
168
- partyId: string;
169
- fullName: string;
170
- email: string;
171
- phone: string;
172
- address: string;
173
- identityNumber: string;
174
- gender: string;
175
- birthDate: string;
176
- avatarUrl: string;
177
- }
178
- /**
179
- * Response interface for sending OTP
180
- */
181
- interface SendOTPResponse {
182
- /** SMS ID */
183
- id?: string;
184
- /** OTP code (for development) */
185
- code?: string;
186
- /** Username/phone number */
187
- username?: string;
188
- /** Expiration timestamp */
189
- timeExpired?: number;
190
- }
191
- /**
192
- * Response interface for validating OTP
193
- * validateOTP returns a simple string result
194
- */
195
- interface ValidateOTPResponse {
196
- /** Result message from validateOTP */
197
- result: string;
198
- }
199
- /**
200
- * Response interface for creating user login
201
- */
202
- interface CreateUserLoginResponse {
203
- /** User login ID */
204
- id: string;
205
- /** Party ID associated with the user login */
206
- partyId: string;
207
- /** Type of user login */
208
- type: string;
209
- /** Username */
210
- username: string;
211
- /** Status of the user login */
212
- status: string;
213
- /** Access token for the user */
214
- accessToken: string;
215
- }
216
- /**
217
- * Response interface for getting access token by OTP
218
- * Returns just the access token as a string
219
- */
220
- interface GetAccessTokenByOTPResponse {
221
- /** The access token string */
222
- accessToken: string;
223
- }
224
-
225
- /**
226
- * Represents the authentication service.
227
- */
228
- declare class AuthService extends Service {
229
- /**
230
- * Constructs a new ProductService instance.
231
- * @param endpoint - The endpoint URL for the service.
232
- * @param orgId - The organization ID.
233
- * @param storeId - The store ID.
234
- */
235
- constructor(endpoint: string, orgId: string, storeId: string);
236
- /**
237
- * Logs in a user with the provided login request.
238
- * @param loginRequest - The login request object.
239
- * @returns A promise that resolves to the login response.
240
- */
241
- login(loginRequest: LoginRequest): Promise<LoginResponse>;
242
- /**
243
- * Registers a new user with the provided register request.
244
- * @param registerRequest - The register request object.
245
- * @returns A promise that resolves when the registration is successful.
246
- */
247
- register(registerRequest: RegisterRequest): Promise<void>;
248
- getUserDetail(accessToken: string): Promise<any>;
249
- /**
250
- * Retrieves user login information using the provided access token.
251
- *
252
- * @param {string} accessToken - The access token used to authenticate the request.
253
- * @returns {Promise<any>} A promise that resolves to the user login information.
254
- * @throws Will throw an error if the GraphQL query fails.
255
- */
256
- getUserLoginByToken(accessToken: string): Promise<any>;
257
- updateProfile(userLoginId: string, name: string, phone: string, email: string): Promise<any>;
258
- getUserLoginByUserLoginId(userLoginId: string): Promise<any>;
259
- checkUsernameExisted(username: string): Promise<any>;
260
- linkingUserLoginAndUserDetail(userLoginId: string, partyId: string): Promise<any>;
261
- createUserDetail(userLoginId: string): Promise<any>;
262
- createUserDetailV2(userLoginId: string, phone: string): Promise<any>;
263
- createUserDetailV3(userLoginId: string, phone: string, name: string, email: string): Promise<any>;
264
- sendSmsVerifyCode(username: string): Promise<any>;
265
- verifyCode(username: string, code: string): Promise<any>;
266
- resetPassword(username: string, newPassword: string, accessToken: string): Promise<any>;
267
- loginGoogle(redirectUrl: string, redirectUrlError?: string): Promise<any>;
268
- loginFacebook(redirectUrl: string, redirectUrlError?: string): Promise<any>;
269
- /**
270
- * Logs in a user via Zalo by executing a GraphQL query.
271
- *
272
- * @param redirectUrl - The URL to redirect the user to after login.
273
- * @returns A promise that resolves to the result of the `loginZalo` GraphQL query.
274
- * @throws Will throw an error if the GraphQL query fails.
275
- */
276
- loginZalo(redirectUrl: string, redirectUrlError?: string): Promise<any>;
277
- /**
278
- * Creates a new organization.
279
- *
280
- * @param orgName - The name of the organization to create.
281
- * @returns A promise that resolves to the result of the createOrg mutation.
282
- * @throws Will throw an error if the GraphQL mutation fails.
283
- */
284
- createOrg(orgName: string, providerId: string, groupTenantId: string): Promise<any>;
285
- /**
286
- * Adds a role to a user in an organization.
287
- *
288
- * @param role - The role to assign to the user.
289
- * @param partyId - The party ID of the user.
290
- * @param roleType - Optional role type.
291
- * @returns A promise that resolves to the result of the addRoleUser mutation.
292
- * @throws Will throw an error if the GraphQL mutation fails.
293
- */
294
- addRoleUser(role: string, partyId: string, roleType?: string): Promise<any>;
295
- /**
296
- * Creates a new user login.
297
- *
298
- * @param userLoginId - The user login ID to create.
299
- * @returns A promise that resolves to the result of the createUserLogin mutation.
300
- * @throws Will throw an error if the GraphQL mutation fails.
301
- */
302
- createUserLogin(userLoginId: string): Promise<CreateUserLoginResponse>;
303
- /**
304
- * Checks if a user login exists.
305
- *
306
- * @param userLoginId - The user login ID to check.
307
- * @returns A promise that resolves to the result of the checkUserLogin query.
308
- * @throws Will throw an error if the GraphQL query fails.
309
- */
310
- checkUserLogin(userLoginId: string): Promise<any>;
311
- /**
312
- * Sends OTP code to the specified phone number.
313
- *
314
- * @param phone - The phone number to send OTP to.
315
- * @param type - The type of OTP delivery ('SMS' or 'ZALO'). Defaults to 'SMS' if not specified.
316
- * @returns A promise that resolves to the result of the sendOTP mutation.
317
- * @throws Will throw an error if the GraphQL mutation fails.
318
- */
319
- sendOTP(phone: string, type?: "SMS" | "ZALO"): Promise<SendOTPResponse>;
320
- sendOTPV2(orgId: String, phone: string, type?: "SMS" | "ZALO"): Promise<SendOTPResponse>;
321
- /**
322
- * Validates OTP code for the specified phone number.
323
- *
324
- * @param otpCode - The OTP code to validate.
325
- * @param phone - The phone number associated with the OTP.
326
- * @param type - The type of OTP delivery ('SMS' or 'ZALO'). Defaults to 'SMS' if not specified.
327
- * @returns A promise that resolves to the result of the validateOTP mutation.
328
- * @throws Will throw an error if the GraphQL mutation fails.
329
- */
330
- validateOTP(otpCode: string, phone: string, type?: "SMS" | "ZALO"): Promise<ValidateOTPResponse>;
331
- /**
332
- * Gets access token by validating OTP code for the specified phone number.
333
- * This function validates the OTP and returns an access token if successful.
334
- *
335
- * @param otpCode - The OTP code to validate.
336
- * @param phone - The phone number associated with the OTP.
337
- * @param type - The type of OTP delivery ('SMS' or 'ZALO'). Defaults to 'SMS' if not specified.
338
- * @returns A promise that resolves to an object containing the access token.
339
- * @throws Will throw an error if the GraphQL query fails.
340
- */
341
- getAccessTokenByOTP(otpCode: string, phone: string, type?: "SMS" | "ZALO"): Promise<GetAccessTokenByOTPResponse>;
342
- /**
343
- * Creates/sets a password for a user using the updateInfo mutation.
344
- * Uses the SDK's internal orgId and token (accessToken).
345
- *
346
- * @param password - The new password to set.
347
- * @returns A promise that resolves to the updated user information.
348
- * @throws Will throw an error if the GraphQL mutation fails.
349
- */
350
- createPassword(password: string): Promise<any>;
351
- /**
352
- * Updates user information using the updateInfo mutation.
353
- * Uses the SDK's internal orgId and token (accessToken).
354
- *
355
- * @param updateUserRequest - The user data to update (optional).
356
- * @param type - The type parameter (optional, use 'oauth' if not updating password).
357
- * @param password - The password to set (optional).
358
- * @returns A promise that resolves to the updated user information.
359
- * @throws Will throw an error if the GraphQL mutation fails.
360
- */
361
- updateInfo(updateUserRequest?: any, type?: string, password?: string): Promise<UpdateInfoResponse>;
362
- createResetKey(userLoginId: string): Promise<any>;
363
- checkResetKey(resetKey: string): Promise<any>;
364
- resetPasswordV2(orgId: string, username: string, newPassword: string, accessToken: string): Promise<any>;
365
- getOrganizationsByPartyId(partyId: String): Promise<any>;
366
- getMenus(partyId: string, workspaceId: string, scope: string): Promise<any>;
367
- getWorkspaces(partyId: string, scope: string): Promise<any>;
368
- logout(token: string): Promise<any>;
369
- getOrganizationById(orgId: string): Promise<any>;
370
- }
371
-
372
- interface LineItem {
373
- quantity: number;
374
- parent_id?: string;
375
- product_id: string;
376
- input_price?: number;
377
- discount_amount?: number;
378
- }
379
- interface DiscountCampaign {
380
- type_discount: string;
381
- discount_amount: 0;
382
- campaign_id: string;
383
- campaign_action_id: string;
384
- campaign_action_type: string;
385
- }
386
- interface CancelOrder {
387
- reason: "CUSTOMER";
388
- updatedBy: string;
389
- note: string;
390
- orderType: "SALES";
391
- }
392
- interface MemberDiscount {
393
- type: string;
394
- amount: 0;
395
- campaignId: string;
396
- campaignActionId: string;
397
- campaignActionType: string;
398
- }
399
- interface CampaignPromotion {
400
- campaign_id: string;
401
- campaign_action_id: string;
402
- campaign_action_type: string;
403
- }
404
- interface OrderQuery {
405
- order_id?: string;
406
- status?: [number];
407
- status_ignore?: [number];
408
- sub_status?: string;
409
- ffm_status?: string;
410
- sub_type?: string;
411
- payment_method?: string;
412
- keyword?: string;
413
- customer_multi_value?: string;
414
- product_multi_value?: string;
415
- customer_id?: string;
416
- created_by?: string;
417
- date_create_from?: number;
418
- date_create_to?: number;
419
- date_update_from?: number;
420
- date_update_to?: number;
421
- employee_assign?: string;
422
- currentPage?: number;
423
- maxResult?: number;
424
- source?: string;
425
- }
426
- interface ShippingAddress {
427
- name: string;
428
- phone: string;
429
- address: string;
430
- province_code: string;
431
- district_code: string;
432
- ward_code: string;
433
- address_default?: boolean;
434
- }
435
- interface CustomerInfo {
436
- id: string;
437
- email: string;
438
- name: string;
439
- phone: string;
440
- }
441
-
442
- /**
443
- * Represents a service for managing orders.
444
- */
445
- declare class OrderService extends Service {
446
- /**
447
- * Constructs a new OrderService instance.
448
- * @param endpoint - The endpoint URL for the service.
449
- * @param orgId - The organization ID.
450
- * @param storeId - The store ID.
451
- */
452
- constructor(endpoint: string, orgId: string, storeId: string, environment?: "dev" | "live");
453
- setToken(token: string): void;
454
- /**
455
- * Override restApiCallWithToken to use default token if no token is set
456
- */
457
- protected restApiCallWithToken(path: string, method: "GET" | "POST" | "PUT" | "DELETE", data?: any, headers?: any): Promise<any>;
458
- /**
459
- * Creates a new order.
460
- * @param orderData - The data for the order.
461
- * @param platform - The platform for the order.
462
- * @param createDraft - Indicates whether to create a draft order.
463
- * @returns A promise that resolves with the created order.
464
- * @throws If an error occurs while creating the order.
465
- */
466
- createOrder(orderData: any, platform: string, createDraft: boolean, created_by: string): Promise<any>;
467
- /**
468
- * Creates a temporary order.
469
- *
470
- * @param orderData - The data for the order.
471
- * @param platform - The platform for the order.
472
- * @returns A promise that resolves to the response from the server.
473
- * @throws If an error occurs during the API call.
474
- */
475
- createOrderTemp(orderData: any, platform: string): Promise<any>;
476
- /**
477
- * Completes multiple orders.
478
- * @param orderIds - The IDs of the orders to complete.
479
- * @returns A promise that resolves when the orders are completed.
480
- * @throws If an error occurs while completing the orders.
481
- */
482
- completeOrder(orderIds: string[]): Promise<any>;
483
- /**
484
- * Adds a voucher to an order.
485
- * @param orderId - The ID of the order.
486
- * @param voucherCode - The voucher code.
487
- * @returns A promise that resolves when the voucher is added.
488
- * @throws If an error occurs while adding the voucher.
489
- */
490
- addVoucher(orderId: string, voucherCode: string): Promise<any>;
491
- /**
492
- * Removes a voucher from an order.
493
- * @param orderId - The ID of the order.
494
- * @param voucherCode - The voucher code.
495
- * @returns A promise that resolves when the voucher is removed.
496
- * @throws If an error occurs while removing the voucher.
497
- */
498
- removeVoucher(orderId: string, voucherCode: string): Promise<any>;
499
- /**
500
- * Updates the VAT (Value Added Tax) for an order.
501
- * @param orderId - The ID of the order.
502
- * @param vatFee - The VAT fee.
503
- * @param vatType - The VAT type. (e.g., VALUE_GOODS, PRODUCT, etc. )
504
- * @returns A promise that resolves when the VAT is updated.
505
- * @throws If an error occurs while updating the VAT.
506
- */
507
- updateVAT(orderId: string, vatFee: number, vatType: string): Promise<any>;
508
- /**
509
- * Updates the customer and shipping address for an order.
510
- * @param orderId - The ID of the order.
511
- * @param customerId - The data for the customer.
512
- * @param shippingAddress - The shipping address.
513
- * @returns A promise that resolves when the customer and shipping address are updated.
514
- * @throws If an error occurs while updating the customer and shipping address.
515
- */
516
- updateCustomerAndShippingAddress(orderId: string, customerId: string, shippingAddress: string): Promise<any>;
517
- /**
518
- * Retrieves the order line items for a specific order.
519
- * @param partnerId - The partner ID.
520
- * @returns A promise that resolves with the order line items.
521
- * @throws If an error occurs while retrieving the order line items.
522
- */
523
- /**
524
- * Adds order line items to an order.
525
- * @param orderId - The ID of the order.
526
- * @param lineItems - The line items to add.
527
- * @returns A promise that resolves when the line items are added.
528
- * @throws If an error occurs while adding the line items.
529
- */
530
- addOrderLineItems(orderId: string, lineItems: LineItem[]): Promise<any>;
531
- /**
532
- * Update Quantity in an order
533
- * @param orderId - The id of the order .
534
- * @param orderItemId - The id of order item.
535
- * @param quantity - Quantity of profuct in order.
536
- * @returns A promise that resolves with the created order.
537
- * @throws If an error occurs while creating the order.
538
- */
539
- updateQuantityProductInOrder(orderId: string, orderItemId: string, quantity: number): Promise<any>;
540
- /**
541
- *Updates sale Employee
542
- * @param orderId - The ID of the order.
543
- * @param saleId - The Id of saler.
544
- * @param updatedBy - Who update.
545
- * @returns A promise that resolves when the customer and shipping address are updated.
546
- * @throws If an error occurs while updating the customer and shipping address.
547
- */
548
- updateSaleEmployee(orderId: string, saleId: string, updatedBy: string): Promise<any>;
549
- /**
550
- *Update type of order
551
- * @param orderId - The ID of the order.
552
- * @param orderType - The type of order.
553
- * @param updatedBy - Id of person update
554
- * @returns A promise that resolves when the customer and shipping address are updated.
555
- * @throws If an error occurs while updating the customer and shipping address.
556
- */
557
- updateOrderType(orderId: string, orderType: string, updatedBy: string): Promise<any>;
558
- /**
559
- * Update new price in order
560
- * @param orderId - The ID of the order.
561
- * @param orderItemId - The id of order.
562
- * @param priceNew - the new price after update
563
- * @returns A promise that resolves when the customer and shipping address are updated.
564
- * @throws If an error occurs while updating the customer and shipping address.
565
- */
566
- updatePriceInOrder(orderId: string, orderItemId: string, priceNew: number, reason: string): Promise<any>;
567
- /**
568
- * Update discount price in order
569
- * @param orderId - The ID of the order.
570
- * @param orderItemId - The id of order.
571
- * @param requestData - The request data
572
- * @returns A promise that resolves when the customer and shipping address are updated.
573
- * @throws If an error occurs while updating the customer and shipping address.
574
- */
575
- updateDiscountPriceInOrder(orderId: string, orderItemId: string, requestData: DiscountCampaign): Promise<any>;
576
- /**
577
- * Update cancel order
578
- * @param orderId - The ID of the order.
579
- * @param requestData
580
- * @returns A promise that resolves when the customer and shipping address are updated.
581
- * @throws If an error occurs while updating the customer and shipping address.
582
- */
583
- updateCancelOrder(orderId: string, requestData: CancelOrder): Promise<any>;
584
- /**
585
- * Update status of return order
586
- * @param orderId - The ID of the order.
587
- * @param statusNew - the new status of order
588
- * @param updatedBy - Id of person update
589
- * @returns A promise that resolves when the customer and shipping address are updated.
590
- * @throws If an error occurs while updating the customer and shipping address.
591
- */
592
- updateStatusReturnOrder(orderId: string, statusNew: string, updatedBy: string): Promise<any>;
593
- /**
594
- * Update Shipping service
595
- * @param orderId - The ID of the order.
596
- * @param shippingServiceId - the id of shipping service
597
- * @param updatedBy - Id of person update
598
- * @returns A promise that resolves when the customer and shipping address are updated.
599
- * @throws If an error occurs while updating the customer and shipping address.
600
- */
601
- updateShippingService(orderId: string, shippingServiceId: string, updatedBy: string): Promise<any>;
602
- /**
603
- * Update shipping order
604
- * @param orderId - The ID of the order.
605
- * @param shippingId - the id of shipping
606
- * @returns A promise that resolves when the customer and shipping address are updated.
607
- * @throws If an error occurs while updating the customer and shipping address.
608
- */
609
- updateShippingOrder(orderId: string, shippingId: string): Promise<any>;
610
- /**
611
- * Update shipping fee
612
- * @param orderId - The ID of the order.
613
- * @param shippingFee - the fee of shipping
614
- * @returns A promise that resolves when the customer and shipping address are updated.
615
- * @throws If an error occurs while updating the customer and shipping address.
616
- */
617
- updateShippingFee(orderId: string, shipingFee: Number): Promise<any>;
618
- /**
619
- * Update Financial Status after payment success
620
- * @param orderId - The ID of the order.
621
- * @param financialStatus - the status of financial
622
- * @param updatedBy - Id of person update
623
- * @returns A promise that resolves when the customer and shipping address are updated.
624
- * @throws If an error occurs while updating the customer and shipping address.
625
- */
626
- updateFinancialStatus(orderId: string, financialStatus: string, updatedBy: string): Promise<any>;
627
- /**
628
- * Update warehouse of order
629
- * @param orderId - The ID of the order.
630
- * @param warehouseId - the status of warehouse
631
- * @returns A promise that resolves when the customer and shipping address are updated.
632
- * @throws If an error occurs while updating the customer and shipping address.
633
- */
634
- updateWareHouseOrder(orderId: String, warehouseId: string): Promise<any>;
635
- /**
636
- * Update voucher
637
- * @param orderId - The ID of the order.
638
- * @param voucherCode - the code of voucher
639
- * @returns A promise that resolves when the customer and shipping address are updated.
640
- * @throws If an error occurs while updating the customer and shipping address.
641
- */
642
- updateVoucher(orderId: string, voucherCode: string): Promise<any>;
643
- /**
644
- * Update Vat
645
- * @param orderId - The ID of the order.
646
- * @param vatFee - The fee of VAT
647
- * @param vatType - The type of vat
648
- * @returns A promise that resolves when the customer and shipping address are updated.
649
- * @throws If an error occurs while updating the customer and shipping address.
650
- */
651
- updateVat(orderId: string, vatFee: number, vatType: string): Promise<any>;
652
- /**
653
- * Update Status of l order
654
- * @param orderId - The ID of the order.
655
- * @param status - The status of sell order
656
- * @returns A promise that resolves when the customer and shipping address are updated.
657
- * @throws If an error occurs while updating the customer and shipping address.
658
- */
659
- updateStatusSellOrder(orderId: string, status: string): Promise<any>;
660
- /**
661
- * Update date remain in total price
662
- * @param orderId - The ID of the order.
663
- * @param updatedBy - Id of person update
664
- * @returns A promise that resolves when the customer and shipping address are updated.
665
- * @throws If an error occurs while updating the customer and shipping address.
666
- */
667
- updateRemainToTalPrice(orderId: string, updatedBy: string): Promise<any>;
668
- /**
669
- * Update date create order
670
- * @param orderId - The ID of the order.
671
- * @param orderDate - The date of order
672
- * @param updatedBy - Id of person update
673
- * @returns A promise that resolves when the customer and shipping address are updated.
674
- * @throws If an error occurs while updating the customer and shipping address.
675
- */
676
- updateDateCreateOrder(orderId: string, orderDate: number, updatedBy: string): Promise<any>;
677
- /**
678
- * Update membership discount
679
- * @param orderId - The ID of the order.
680
- * @param requestData
681
- * @returns A promise that resolves when the customer and shipping address are updated.
682
- * @throws If an error occurs while updating the customer and shipping address.
683
- */
684
- updateMemberDiscount(orderId: string, requestData: MemberDiscount): Promise<any>;
685
- /**
686
- * Update status editable order
687
- * @param orderId - The ID of the order.
688
- * @param editable - The editable of
689
- * @returns A promise that resolves when the customer and shipping address are updated.
690
- * @throws If an error occurs while updating the customer and shipping address.
691
- */
692
- updateEditableOrder(orderId: string, editable: boolean): Promise<any>;
693
- /**
694
- * Update discount
695
- * @param orderId - The ID of the order.
696
- * @param requestData
697
- * @returns A promise that resolves when the customer and shipping address are updated.
698
- * @throws If an error occurs while updating the customer and shipping address.
699
- */
700
- updateDiscount(orderId: string, updated_by: string, requestData: any): Promise<any>;
701
- /**
702
- * Update info campaign promotion
703
- * @param orderId - The ID of the order.
704
- * @param requestData
705
- * @returns A promise that resolves when the customer and shipping address are updated.
706
- * @throws If an error occurs while updating the customer and shipping address.
707
- */
708
- updateInfoCampaignPromotion(orderId: string, requestData: CampaignPromotion): Promise<any>;
709
- /**
710
- * Get list shipping service
711
- * @param shippingCarrierId - The ID of the campaign
712
- * @returns A promise that resolves when the customer and shipping address are updated.
713
- * @throws If an error occurs while updating the customer and shipping address.
714
- */
715
- getShippingService(shippingCarrierId: string): Promise<any>;
716
- /**
717
- * Get info sell order
718
- * @param orderId - The ID of the order.
719
- * @returns A promise that resolves when the customer and shipping address are updated.
720
- * @throws If an error occurs while updating the customer and shipping address.
721
- */
722
- getInfoSellOrder(orderId: string): Promise<any>;
723
- /**
724
- * Get info return order
725
- * @param orderId - The ID of the order.
726
- * @returns A promise that resolves when the customer and shipping address are updated.
727
- * @throws If an error occurs while updating the customer and shipping address.
728
- */
729
- getInfoReturnOrder(orderId: string): Promise<any>;
730
- /**
731
- * Get list type order
732
- * @returns A promise that resolves when the customer and shipping address are updated.
733
- * @throws If an error occurs while updating the customer and shipping address.
734
- */
735
- getListTypeOrder(): Promise<any>;
736
- /**
737
- * GEt list shipping carrier
738
- * @returns A promise that resolves when the customer and shipping address are updated.
739
- * @throws If an error occurs while updating the customer and shipping address.
740
- */
741
- getListShippingCarrier(): Promise<any>;
742
- /**
743
- * Get list sell order
744
- * @param orderId
745
- * @param requestData
746
- * @returns A promise that resolves when the customer and shipping address are updated.
747
- * @throws If an error occurs while updating the customer and shipping address.
748
- */
749
- getListSellOrder(requestData: OrderQuery): Promise<any>;
750
- getListSellOrderV2(requestData: OrderQuery, storeId: string): Promise<any>;
751
- getListSellOrderAll(requestData: OrderQuery): Promise<any>;
752
- getDiaries(requestData: OrderQuery): Promise<any>;
753
- /**
754
- * Get list sale order status
755
- * @returns A promise that resolves when the customer and shipping address are updated.
756
- * @throws If an error occurs while updating the customer and shipping address.
757
- */
758
- getListSaleOrderStatus(): Promise<any>;
759
- /**
760
- * Get list return order
761
- * @param orderId - The id of the order
762
- * @param requestData
763
- * @returns A promise that resolves when the customer and shipping address are updated.
764
- * @throws If an error occurs while updating the customer and shipping address.
765
- */
766
- getListReturnOrder(requestData: OrderQuery): Promise<any>;
767
- getListReturnOrderV2(requestData: OrderQuery, storeId: string): Promise<any>;
768
- /**
769
- * Get list return order status
770
- * @returns A promise that resolves when the customer and shipping address are updated.
771
- * @throws If an error occurs while updating the customer and shipping address.
772
- */
773
- getListReturnOrderStatus(): Promise<any>;
774
- /**
775
- * remove draft order
776
- * @param orderId - The id of order
777
- * @param updatedBy - Thi id of person update
778
- * @returns A promise that resolves when the customer and shipping address are updated.
779
- * @throws If an error occurs while updating the customer and shipping address.
780
- */
781
- removeDraftOrder(orderId: string, updatedBy: string): Promise<any>;
782
- /**
783
- * Cancel product in order
784
- * @param orderId - The id of order
785
- * @param orderItemId - Thi id of item order
786
- * @param reason - The reason of cancel product in order
787
- * @returns A promise that resolves when the customer and shipping address are updated.
788
- * @throws If an error occurs while updating the customer and shipping address.
789
- */
790
- cancelProductInOrder(orderId: string, orderItemId: string, reason: string): Promise<any>;
791
- /**
792
- * Remove Product in order
793
- * @param orderId - The id of order
794
- * @param orderItemId - Thi id of item order
795
- * @param reason - The reason of cancel product in order
796
- * @returns A promise that resolves when the customer and shipping address are updated.
797
- * @throws If an error occurs while updating the customer and shipping address.
798
- */
799
- removeProductInOrder(orderId: string, orderItemId: string, reason: string): Promise<any>;
800
- /**
801
- * Print order pdf
802
- * @param orderId - The id of order
803
- * @param paymentMethod - Thi id of item order
804
- * @returns A promise that resolves when the customer and shipping address are updated.
805
- * @throws If an error occurs while updating the customer and shipping address.
806
- */
807
- printOrderPdf(orderId: string, paymentMethod: string): Promise<any>;
808
- /**
809
- * Print order HTML
810
- * @param orderId - The id of order
811
- * @param paymentMethod - Thi id of item order
812
- * @returns A promise that resolves when the customer and shipping address are updated.
813
- * @throws If an error occurs while updating the customer and shipping address.
814
- */
815
- printOrderHtml(orderId: string, paymentMethod?: string, paymentUrl?: string): Promise<any>;
816
- /**
817
- * Create an orderReturn
818
- * @param orderData - The id of order
819
- * @returns A promise that resolves when the customer and shipping address are updated.
820
- * @throws If an error occurs while updating the customer and shipping address.
821
- */
822
- createOrderReturn(orderData: any, created_by: any): Promise<any>;
823
- /**
824
- * Caculate the order
825
- * @param orderData - The data from the order
826
- * @returns A promise that resolves when the customer and shipping address are updated.
827
- * @throws If an error occurs while updating the customer and shipping address.
828
- */
829
- calculateOrder(orderData: any): Promise<any>;
830
- /**
831
- * get amount product able order
832
- * @param productIds - The id of product
833
- * @returns A prom that resolves when the customer and shipping address are updated.
834
- * @throws If an error occurs while updating the customer and shipping address.
835
- */
836
- getQuantityAbleOrder(productIds: string[]): Promise<any>;
837
- /**
838
- * updatee note without login
839
- * @param orderId - The id of the order
840
- * @param noteId - The id of the note
841
- * @param note - The content of the note
842
- * @returns A prom that resolves when the customer and shipping address are updated.
843
- * @throws If an error occurs while updating the customer and shipping address.
844
- */
845
- updateNoteWithoutLogin(orderId: string, noteId: string, note: string): Promise<any>;
846
- /**
847
- * add voucher without login
848
- * @param orderId - The id of the order
849
- * @param voucherCode - The code of voucher
850
- * @param updatedBy
851
- * @returns A prom that resolves when the customer and shipping address are updated.
852
- * @throws If an error occurs while updating the customer and shipping address.
853
- */
854
- addVoucherWithoutLogin(orderId: string, voucherCode: string, updatedBy: "SYSTEM"): Promise<any>;
855
- /**
856
- * delete voucher without login
857
- * @param orderId - The id of the order
858
- * @param voucherCode - The code of voucher
859
- * @param updatedBy
860
- * @returns A prom that resolves when the customer and shipping address are updated.
861
- * @throws If an error occurs while updating the customer and shipping address.
862
- */
863
- deleteVoucherLogin(orderId: string, voucherCode: string, updatedBy: "SYSTEM"): Promise<any>;
864
- /**
865
- * get list note without login
866
- * @param orderId - The id of the order
867
- * @returns A prom that resolves when the customer and shipping address are updated.
868
- * @throws If an error occurs while updating the customer and shipping address.
869
- */
870
- getListNoteWithoutLogin(orderId: string): Promise<any>;
871
- /**
872
- * create note without login
873
- * @param orderId - The id of the order
874
- * @param createdBy
875
- * @param note
876
- * @returns A prom that resolves when the customer and shipping address are updated.
877
- * @throws If an error occurs while updating the customer and shipping address.
878
- */
879
- createNoteWithoutLogin(orderId: string, createdBy: string, note: string): Promise<any>;
880
- /**
881
- * get list order realation
882
- * @param orderIds
883
- * @returns A prom that resolves when the customer and shipping address are updated.
884
- * @throws If an error occurs while updating the customer and shipping address.
885
- */
886
- getListOrderRelationsWithoutLogin(orderIds: string[]): Promise<any>;
887
- getOrderPromotion(level: string): Promise<any>;
888
- /**
889
- * get list order realation
890
- * @param orderId - The id of order
891
- * @param noteId - The id of note
892
- * @param deletedBy - The id of person delete
893
- * @returns A prom that resolves when the customer and shipping address are updated.
894
- * @throws If an error occurs while updating the customer and shipping address.
895
- */
896
- deleteNoteWithoutLogin(orderId: string, noteId: string, deletedBy: string): Promise<any>;
897
- getOrderByIdNoLogin(partnerId: string, storeId: string, orderId: string): Promise<any>;
898
- updateOrderDescription(orderId: string, description: string): Promise<any>;
899
- getOrderDetail(orderId: string): Promise<any>;
900
- createInfoReceiver(ownerId: string, dataRequest: ShippingAddress): Promise<any>;
901
- getInfoReceiver(ownerId: string): Promise<any>;
902
- updateInfoReceiver(ownerId: string, receiverId: string, updatedBy: string, dataRequest: ShippingAddress): Promise<any>;
903
- deleteInfoReceiver(ownerId: string, receiverId: string, deletedBy: string): Promise<any>;
904
- enableProductDiary(orderId: string, orderItemId: string): Promise<any>;
905
- removeMemberDiscount(orderId: string): Promise<any>;
906
- getInfoChatApp(attributesName: string): Promise<any>;
907
- validatePhoneNumber(phoneNumer: string): boolean;
908
- /**
909
- *report by date month year
910
- * @param employee_assign
911
- * @param type_view
912
- * @param date_from
913
- * @param date_to
914
- * @returns A promise that resolves with the created order.
915
- * @throws If an error occurs while creating the order.
916
- */
917
- reportDateMonthYear(employee_assign: string, type_view: string, date_from: number, date_to: number): Promise<any>;
918
- /**
919
- * report by sale employee
920
- * @param employee_assign
921
- * @param date_from
922
- * @param date_to
923
- * @returns A promise that resolves with the created order.
924
- * @throws If an error occurs while creating the order.
925
- */
926
- reportBySaleEmployee(employee_assign: string, date_from: number, date_to: number): Promise<any>;
927
- /**
928
- * report by sale employee
929
- * @param employee_assign
930
- * @param date_from
931
- * @param date_to
932
- * @returns A promise that resolves with the created order.
933
- * @throws If an error occurs while creating the order.
934
- */
935
- reportByPaymentMethod(employee_assign: string, date_from: number, date_to: number): Promise<any>;
936
- /**
937
- * report by detail
938
- * @param employee_assign
939
- * @param type_view
940
- * @param date_from
941
- * @param date_to
942
- * @returns A promise that resolves with the created order.
943
- * @throws If an error occurs while creating the order.
944
- */
945
- reportByDetail(employee_assign: string, type_view: string, date_from: number, date_to: number): Promise<any>;
946
- reportByDetailV2(employee_assign: string, type_view: string, date_from: number, date_to: number, storeId: string): Promise<any>;
947
- /**
948
- * report by store
949
- * @param date_from
950
- * @param date_to
951
- * @returns A promise that resolves with the created order.
952
- * @throws If an error occurs while creating the order.
953
- */
954
- reporByStores(date_from: number, date_to: number): Promise<any>;
955
- reporByStoresV2(date_from: number, date_to: number, storeId: string): Promise<any>;
956
- updateExchangeOrder(exchangeOrder: string, returnOrder: string, sellOrder: string): Promise<any>;
957
- removeShippingAddress(orderId: string, updateBy: string): Promise<any>;
958
- removeShippingInfo(orderId: string, updateBy: string): Promise<any>;
959
- updateVatInorder(orderId: string, orderItemId: string, vatRate: string): Promise<any>;
960
- /**
961
- * Updates the referral code for an order
962
- * @param orderId - The ID of the order
963
- * @param referralCode - The referral code to update
964
- * @returns A promise that resolves when the referral code is updated
965
- * @throws If an error occurs while updating the referral code
966
- */
967
- updateReferralCode(orderId: string, referralCode: string): Promise<any>;
968
- /**
969
- * Updates customer information for an order in front-end context
970
- * @param orderId - The ID of the order
971
- * @param customerInfo - The customer information to update
972
- * @returns A promise that resolves when the customer information is updated
973
- * @throws If an error occurs while updating the customer information
974
- */
975
- updateCustomerInfoFront(orderId: string, customerInfo: CustomerInfo): Promise<any>;
976
- removeGiftQuantity(orderId: string, orderItemId: string): Promise<any>;
977
- removeGiftInOrder(orderId: string, orderItemId: string): Promise<any>;
978
- tooglePaymentMethod(methodCode: string, status: boolean): Promise<any>;
979
- choosePaymentGatewayForPaymentMethod(methodCode: string, gatewayId: string): Promise<any>;
980
- addCustomerToOder(orderId: string, customerData: any): Promise<any>;
981
- updateShippingAddressWithoutLogin(orderId: string, shippingData: {
982
- name: string;
983
- phone: string;
984
- address: string;
985
- province: string;
986
- district: string;
987
- ward: string;
988
- province_code: string;
989
- district_code: string;
990
- ward_code: string;
991
- }): Promise<any>;
992
- }
993
-
994
- interface ServiceRequest {
995
- partnerId: String;
996
- serviceName: String;
997
- serviceId: String;
998
- type: String;
999
- typeName: String;
1000
- orderId: String;
1001
- orderLineItemId: String;
1002
- orderItemTermId: String;
1003
- status: String;
1004
- ownerId: String;
1005
- ownerName: String;
1006
- ownerEmail: String;
1007
- ownerPhone: String;
1008
- saleName: String;
1009
- salePartyId: String;
1010
- startDate: Date;
1011
- endDate: Date;
1012
- version: String;
1013
- location: String;
1014
- description: String;
1015
- username: String;
1016
- password: String;
1017
- urlPrivate: String;
1018
- urlPublic: String;
1019
- serviceType: Number;
1020
- actionResult: String;
1021
- attrs: {};
1022
- }
1023
-
1024
- declare class ServiceManagementService extends Service {
1025
- /**
1026
- * Constructs a new ProductService instance.
1027
- * @param endpoint - The endpoint URL for the service.
1028
- * @param orgId - The organization ID.
1029
- * @param storeId - The store ID.
1030
- */
1031
- constructor(endpoint: string, orgId: string, storeId: string);
1032
- /**
1033
- * get service by id .
1034
- * @param serviceId - The id of the service
1035
- */
1036
- getServiceById(serviceId: string): Promise<any>;
1037
- /**
1038
- * get service by type
1039
- * @param type - The endpoint URL for the service.
1040
- */
1041
- /**
1042
- * get service by owner id
1043
- * @param ownerId - The endpoint URL for the service.
1044
- */
1045
- getServiceByOwnerId(ownerId: string): Promise<any>;
1046
- /**
1047
- * get service actions
1048
- * @param serviceId -
1049
- * @param actionType
1050
- * @param updatedBy
1051
- */
1052
- getServiceActions(serviceId: string): Promise<any>;
1053
- /**
1054
- * create service
1055
- * @param data
1056
- */
1057
- createService(data: ServiceRequest): Promise<any>;
1058
- /**
1059
- * create service
1060
- * @param data
1061
- * @param serviceId
1062
- * @param updatedBy
1063
- */
1064
- updateService(data: ServiceRequest, serviceId: String, updatedBy: string): Promise<any>;
1065
- /**
1066
- * delete service
1067
- * @param serviceId
1068
- * @param deletedBy
1069
- */
1070
- deleteService(serviceId: string, deletedBy: string): Promise<any>;
1071
- /**
1072
- * update attr value
1073
- * @param serviceId
1074
- * @param attrName
1075
- * @param attrValue
1076
- * @param updatedBy
1077
- */
1078
- updateAttrValue(serviceId: string, attr: JSON, updatedBy: string): Promise<any>;
1079
- /**
1080
- * delete attr value
1081
- * @param serviceId
1082
- * @param attrName
1083
- * @param updatedBy
1084
- */
1085
- deleteAttrValue(serviceId: string, attrName: string, updatedBy: string): Promise<any>;
1086
- /**
1087
- * update success action process status
1088
- * @param serviceId
1089
- * @param actionResult
1090
- * @param updatedBy
1091
- */
1092
- updateSuccessActionProcessStatus(serviceActionId: string, updatedBy: string): Promise<any>;
1093
- /**
1094
- * update fail action process status
1095
- * @param serviceId
1096
- * @param actionResult
1097
- * @param updatedBy
1098
- */
1099
- updateFailActionProcessStatus(serviceActionId: string, description: string, updatedBy: string): Promise<any>;
1100
- /**
1101
- * Creates a service ticket.
1102
- *
1103
- * @param {string} serviceId - The ID of the service.
1104
- * @param {string} name - The name of the service ticket.
1105
- * @param {string} createdBy - The user who created the service ticket.
1106
- * @param {string} description - The description of the service ticket.
1107
- * @returns {Promise<any>} - A promise that resolves to the created service ticket.
1108
- * @throws {Error} - If an error occurs during the creation of the service ticket.
1109
- */
1110
- createServiceTicket(serviceId: string, name: string, createdBy: string, description: string): Promise<any>;
1111
- getServiceTicket(serviceId: string): Promise<any>;
1112
- createServiceAction(serviceId: string, actionType: string, attributes: JSON, createdBy: string): Promise<any>;
1113
- addActionAttribute(actionId: string, attribute: JSON, createdBy: string): Promise<any>;
1114
- getActionAttribute(actionId: string, attributeName: string): Promise<any>;
1115
- }
1116
-
1117
- interface createCompanyRequest {
1118
- name: string;
1119
- phone: string;
1120
- address: string;
1121
- email: string;
1122
- }
1123
- interface updateCustomerRequest {
1124
- name: string;
1125
- phone: string;
1126
- address: string;
1127
- birthDate: Date;
1128
- email: string;
1129
- gender: string;
1130
- }
1131
- interface createCustomerRequest {
1132
- name: string;
1133
- phone: string;
1134
- email: string;
1135
- birthDate: Date;
1136
- }
1137
- interface dataCustomerRequest {
1138
- name: string;
1139
- phone: string;
1140
- email: string;
1141
- address: string;
1142
- birthDate: Date;
1143
- }
1144
- interface customerQuery {
1145
- keyword: string;
1146
- type: string;
1147
- startCreatedDate?: number;
1148
- endCreatedDate?: number;
1149
- memberLevel?: string;
1150
- currentPage?: number | 1;
1151
- pageSize: number | 20;
1152
- followSocialAppId?: string;
1153
- }
1154
- interface employeesQuery {
1155
- keyword: string;
1156
- positionShortName: string;
1157
- }
1158
- interface customer {
1159
- id: string;
1160
- name: string;
1161
- address: string;
1162
- gender: string;
1163
- identityNumber: string;
1164
- birthDate: Date;
1165
- email: string;
1166
- phone: string;
1167
- createdStamp: Date;
1168
- createdBy: string;
1169
- memberLevel: string;
1170
- }
1171
- interface searchCustomersResponse {
1172
- content: customer[];
1173
- }
1174
-
1175
- declare class UserService extends Service {
1176
- constructor(endpoint: string, orgId: string, storeId: string);
1177
- getPersonByPartyIds(partyIds: string[]): Promise<any>;
1178
- createCompany(payload: createCompanyRequest, createdBy: string): Promise<any>;
1179
- updateCompanyInfo(id: string, fieldName: string, valueUpdate: string, updatedBy: string): Promise<any>;
1180
- updateCustomer(id: string, customerItem: updateCustomerRequest, updatedBy: string): Promise<any>;
1181
- getCustomerById(id: string): Promise<any>;
1182
- searchCompany(keyword: string, limit: number): Promise<any>;
1183
- createCustomerV2(createCustomerRequest: createCustomerRequest, createdBy: string): Promise<any>;
1184
- createCustomer(dataCustomerRequest: dataCustomerRequest, createdBy: string, type: string): Promise<any>;
1185
- searchCustomer(searchParams: customerQuery): Promise<searchCustomersResponse>;
1186
- searchEmployees(searchParams: employeesQuery): Promise<any>;
1187
- getPositionsByEmployeeId(employeeId: string): Promise<any>;
1188
- getStoreChannelIdsByEmployeeId(employeeId: string): Promise<any>;
1189
- getEmployeesByStoreChannelId(): Promise<any>;
1190
- getCompanyByContactInfoId(contactId: string): Promise<any>;
1191
- getContactInfosByCompanyId(companyId: string): Promise<any>;
1192
- getProvinces(version: number): Promise<any>;
1193
- getWardsByProvinceId(provinceId: string): Promise<any>;
1194
- getDistricts(provinceId: string): Promise<any>;
1195
- getWards(districtId: string): Promise<any>;
1196
- getPersonByPartyId(partyId: string): Promise<any>;
1197
- getVatInfoByOwnerPartyId(ownerPartyId: string): Promise<any>;
1198
- createVatInfo(company: string, taxCode: string, invoiceReceiveEmail1: string, ownerPartyId: string, address: string, createdBy: string): Promise<any>;
1199
- }
1200
-
1201
- interface VatInvoiceRequestDTO {
1202
- sourceId: String;
1203
- sourceType: String;
1204
- signType: String;
1205
- includeBuyerTaxCode: Boolean;
1206
- buyerName: String;
1207
- buyerTaxCode: String;
1208
- buyerCompany: String;
1209
- buyerAddress: String;
1210
- sendMail: Boolean;
1211
- receiverName: String;
1212
- receiverEmail: String;
1213
- }
1214
-
1215
- declare class PaymentService extends Service {
1216
- constructor(endpoint: string, orgId: string, storeId: string);
1217
- getPaymentMethod(): Promise<any>;
1218
- createPaymentOrder(paymentOrderData: any): Promise<any>;
1219
- genQRPayment(orderId: any, totalAmount: any): Promise<any>;
1220
- getPaymentMethodOfStoreChannel(): Promise<any>;
1221
- getInvoiceDetail(invoiceId: string): Promise<any>;
1222
- requestUnpublishVatInvoice(VatInvoiceRequest: VatInvoiceRequestDTO, byUser: string): Promise<any>;
1223
- requestPublishVatInvoice(VatInvoiceRequest: VatInvoiceRequestDTO, byUser: string): Promise<any>;
1224
- getInvoicesOfOrder(orderId: string): Promise<any>;
1225
- viewPublishedInvoice(invoiceId: string): Promise<any>;
1226
- updateInvoiceItem(invoiceId: string, updateInvoiceItemDTO: any, byUser: string): Promise<any>;
1227
- getInvoiceItemOfInvoie(invoiceId: string): Promise<any>;
1228
- addInvoiceItem(invoiceId: string, invoiceItem: any, byUser: string): Promise<any>;
1229
- deleteInvoiceItem(invoiceId: string, invoiceItemId: string, byUser: string): Promise<any>;
1230
- }
1231
-
1232
- interface AddOpportunityRequest {
1233
- name: string;
1234
- description: string;
1235
- parentId?: string | null;
1236
- priorityName: string;
1237
- referName: string;
1238
- referPhone: string;
1239
- referEmail: string;
1240
- targetId: string;
1241
- extSource: string;
1242
- ownerId?: string;
1243
- forms: [Map];
1244
- }
1245
- interface Map {
1246
- key: string;
1247
- value: string;
1248
- }
1249
- interface GetOpportunityRequest {
1250
- id?: string;
1251
- pageSize: number;
1252
- pageNumber: number;
1253
- isPagination: boolean;
1254
- workEffortTypeId: string;
1255
- sort: {
1256
- key: string;
1257
- asc: boolean;
1258
- };
1259
- }
1260
- interface getTicketRequest {
1261
- estimateTime: string;
1262
- keyword: string;
1263
- id: string;
1264
- ids: [string];
1265
- ignoreIds: string;
1266
- partyGroupId: string;
1267
- name: string;
1268
- workEffortTypeId: string;
1269
- createdBy: string;
1270
- partyId: string;
1271
- accountableId: string;
1272
- parentId: string;
1273
- status: number;
1274
- statuses: [number];
1275
- processResult: number;
1276
- ownerId: string;
1277
- priorityName: Priority;
1278
- targetId: string;
1279
- targetType: string;
1280
- fromDate: Date;
1281
- toDate: Date;
1282
- isPagination: boolean;
1283
- sort: sort;
1284
- pageNumber: number;
1285
- pageSize: number;
1286
- extSource: string;
1287
- connectorId: string;
1288
- }
1289
- interface sort {
1290
- key: string;
1291
- asc: boolean;
1292
- }
1293
- interface Priority {
1294
- HIGH: "HIGH";
1295
- MEDIUM: "MEDIUM";
1296
- LOW: "LOW";
1297
- }
1298
- interface AddTicketRequest {
1299
- name: string;
1300
- description: string;
1301
- workEffortTypeId: string;
1302
- workEffortTypeAction: string;
1303
- ownerId: string;
1304
- parentId: string;
1305
- priorityName: Priority;
1306
- accountableId: string;
1307
- targetId: string;
1308
- targetType: string;
1309
- targetUrl: string;
1310
- extSource: string;
1311
- connectorId: string;
1312
- startDateExpect: string;
1313
- }
1314
- interface AddAttachmentRequest {
1315
- srcId: string;
1316
- srcName: string;
1317
- srcPath: string;
1318
- srcConfigPathId?: string;
1319
- name?: string;
1320
- type?: string;
1321
- fileType?: string;
1322
- }
1323
- interface GetCommentRequest {
1324
- referId: string;
1325
- type: CommentType;
1326
- }
1327
- interface CommentType {
1328
- GLOBAL: "GLOBAL";
1329
- INTERNAL: "INTERNAL";
1330
- }
1331
- interface BaseSort {
1332
- key: string;
1333
- asc: boolean;
1334
- }
1335
-
1336
- declare class CrmService extends Service {
1337
- constructor(endpoint: string, orgId: string, storeId: string);
1338
- setToken(token: string): void;
1339
- addOpportunity(performerId: string, addOpportunityRequest?: AddOpportunityRequest): Promise<any>;
1340
- addOpportunityV2(performerId: string, addOpportunityRequest: any): Promise<any>;
1341
- addOpportuniyV3(partyId: string, performerId: string, addOpportunityRequest: any): Promise<any>;
1342
- getListOpportunity(performerId: string, getOpportunityRequest: GetOpportunityRequest): Promise<any>;
1343
- getListTodo(workEffortId: string[]): Promise<any>;
1344
- getListWorkEffortType(id: string): Promise<any>;
1345
- updateStatusAttachmentById(performerId: string, attachmentId: string, status: string): Promise<any>;
1346
- updateWorkEffortDescription(performerId: string, workEffortId: string, description: string): Promise<any>;
1347
- updateWorkEffortName(performerId: string, workEffortId: string, name: string): Promise<any>;
1348
- updateWorkEffortStatus(performerId: string, workEffortId: string, group: string, status: string): Promise<any>;
1349
- addAttachmentForWorkEffort(performerId: string, workEffortId: string, addAttachmentRequest: AddAttachmentRequest): Promise<any>;
1350
- getListTicket(performerId: string, getTicketRequest: getTicketRequest): Promise<any>;
1351
- addTicket(performerId: string, addTicketRequest: AddTicketRequest, addAttachmentRequest: [AddAttachmentRequest]): Promise<any>;
1352
- getTicketById(ticketId: string): Promise<any>;
1353
- getAttachmentByWorkEffortId(workEffortIds: [string]): Promise<any>;
1354
- getListComment(getCommentRequest: GetCommentRequest): Promise<any>;
1355
- addComment(params: any): Promise<any>;
1356
- createWorkEffort(createdBy: string, name: String, decription: string, workEffortTypeId: string, group: string, attributes: object, addAttachmentRequest: AddAttachmentRequest, parentId?: string): Promise<any>;
1357
- createWorkEffortV2(createdBy: string, name: string, decription: string, workEffortTypeId: string, source: string): Promise<any>;
1358
- getWorkEfforts(performerId: string, workflowId: string, group: string, pageNumber: number, pageSize: number, sorts: BaseSort, attributes: object, fromDate: any, toDate: any): Promise<any>;
1359
- getWorkEffortsV3(performerId: string, workflowId: string, group: string, pageNumber: number, pageSize: number, sorts: BaseSort, fromDate: string, toDate: string): Promise<any>;
1360
- getWorkEffortsV2(performerId: string, workEffortTypeId: string, source: string, fromDate: string, toDate: string): Promise<any>;
1361
- getWorkEffortById(id: string): Promise<any>;
1362
- getWorkEffortByIdV2(id: string): Promise<any>;
1363
- updateWorkEffortProcessStatus(workEffortId: string, processStatus: string, performerId: string): Promise<any>;
1364
- getConnectorByResource(resourceId: string, resourceType: string, type: string): Promise<any>;
1365
- createConnector(resourceId: string, resourceType: string, description: string, type: string, createdBy: string): Promise<any>;
1366
- addTag(connectorId: string, tagTitle: string, tagId: string, addedBy: string): Promise<any>;
1367
- updateConnectorDescription(connectorId: string, description: string, updatedBy: string): Promise<any>;
1368
- getTags(connectorId: string): Promise<any>;
1369
- removeTag(connectorId: string, tagId: string, removedBy: string): Promise<any>;
1370
- searchTopic(filterTopicRequest: any, pageSize: number, currentPage: number): Promise<any>;
1371
- closeTopic(id: string, updatedBy: string): Promise<any>;
1372
- createTopic(socialAppId: String, customerId: string, message: string): Promise<any>;
1373
- getTopicByCustomerId(filterTopicRequest: any, pageSize: number, currentPage: number): Promise<any>;
1374
- getMyWorkEffortToday(performerId: string, source: string): Promise<any>;
1375
- getMessages(topicId: String, pageSize: Number, pageNumber: Number): Promise<any>;
1376
- getResourceRelatedTopic(topicId: string, resourceType: string): Promise<any>;
1377
- addTopicRelatedResource(topicId: string, resourceId: string, resourceType: string, createdBy: string): Promise<any>;
1378
- getWorkflows(group: string, keyword: string): Promise<any>;
1379
- createOrg(orgName: string, providerId: string, groupTenantId: string): Promise<any>;
1380
- }
1381
-
1382
- declare class WarehouseService extends Service {
1383
- /**
1384
- * Constructs a new OrderService instance.
1385
- * @param endpoint - The endpoint URL for the service.
1386
- * @param orgId - The organization ID.
1387
- * @param storeId - The store ID.
1388
- */
1389
- constructor(endpoint: string, orgId: string, storeId: string);
1390
- setToken(token: string): void;
1391
- /**
1392
- * get product inventory
1393
- * @param warehouseId - the id of the warehouse
1394
- * @param listProduct - list product
1395
- * @returns A promise that resolves with the created order.
1396
- * @throws If an error occurs while creating the order.
1397
- */
1398
- getInventory(sku: string, warehouseId: string): Promise<any>;
1399
- }
1400
-
1401
- interface UpdateDescriptionPortNat {
1402
- portNatId: string;
1403
- description: string;
1404
- }
1405
- interface CreatePortNat {
1406
- portNatId: string;
1407
- translatedPort: string;
1408
- }
1409
- interface CreateSnapShot {
1410
- computingId: string;
1411
- snapshotName: string;
1412
- }
1413
- interface RollBackSnapShot {
1414
- computingId: string;
1415
- snapshotId: string;
1416
- }
1417
-
1418
- declare class ComputingService extends Service {
1419
- /**
1420
- * Constructs a new OrderService instance.
1421
- * @param endpoint - The endpoint URL for the service.
1422
- * @param orgId - The organization ID.
1423
- * @param storeId - The store ID.
1424
- */
1425
- constructor(endpoint: string, orgId: string, storeId: string);
1426
- setToken(token: string): void;
1427
- computingDetail(computingId: string): Promise<any>;
1428
- portNats(computingId: string): Promise<any>;
1429
- restartVM(computingId: string, actor: string): Promise<any>;
1430
- updateDescriptionPortNat(payload: UpdateDescriptionPortNat, updateBy: string): Promise<any>;
1431
- createPortNat(payload: CreatePortNat, createBy: string): Promise<any>;
1432
- updatePortNat(payload: CreatePortNat, updateBy: string): Promise<any>;
1433
- removePortNat(portNatId: string, updateBy: string): Promise<any>;
1434
- startVM(computingId: string, actor: string): Promise<any>;
1435
- stopVM(computingId: string, actor: string): Promise<any>;
1436
- snapshots(computingId: string): Promise<any>;
1437
- createSnapshot(payload: CreateSnapShot, createBy: string): Promise<any>;
1438
- rollbackSnapshot(payload: RollBackSnapShot, createBy: string): Promise<any>;
1439
- deleteSnapshot(payload: RollBackSnapShot, updateBy: string): Promise<any>;
1440
- }
1441
-
1442
- declare class CampaignService extends Service {
1443
- /**
1444
- * Constructs a new CampaignService instance.
1445
- * @param endpoint - The endpoint URL for the service.
1446
- * @param orgId - The organization ID.
1447
- * @param storeId - The store ID.
1448
- */
1449
- constructor(endpoint: string, orgId: string, storeId: string);
1450
- getCampaignActionActiveNow(customerId: string, campaignActionType: string): Promise<any>;
1451
- searchVouchers(campaignId: String, campaignActionId: String, campaignActionType: String, customerId: String, excludeExpired: Boolean, pageNumber: number, pageSize: number): Promise<any>;
1452
- checkValidVoucher(customerId: string, voucherCode: string): Promise<any>;
1453
- getCampaignActiveNow(campaignActionType: string, customerId: string): Promise<any>;
1454
- getPromotionProductPrice(productId: String, productPrice: number): Promise<any>;
1455
- getVoucherAvailableForCustomer(campaignId: string, campaignActionId: string, customerId: string, excludeExpired: Boolean, isPageAble: Boolean): Promise<any>;
1456
- addCustomerToVoucher(voucherCode: string, userId: string, affiliateId: string): Promise<any>;
1457
- suggestVoucher(customerId: string, campaignId: string, campaignActionId: string, isBirthday: Boolean): Promise<any>;
1458
- getCampaignActionById(id: string): Promise<any>;
1459
- searchProductGiftPromotionResponse(productIds: string[], campaignActionId: string): Promise<any>;
1460
- getCampaign(id: string): Promise<any>;
1461
- }
1462
-
1463
- declare class ImageService extends Service {
1464
- constructor(endpoint: string, orgId: string, storeId: string);
1465
- setToken(token: string): void;
1466
- getImageProduct(imageId: string): Promise<any>;
1467
- getImageProducts(productCode: string): Promise<any>;
1468
- }
1469
-
1470
- declare class PaymentServiceV2 extends Service {
1471
- constructor(endpoint: string, orgId: string, storeId: string);
1472
- paymentsByOrders(orderIds: [string]): Promise<any>;
1473
- cancelPayment(paymentId: string, reason: string): Promise<any>;
1474
- paymentMethods(): Promise<any>;
1475
- getPaymentMethodTypes(): Promise<any>;
1476
- paymentInfo(paymentId: string): Promise<any>;
1477
- confirmToGateway(paymentId: string, methodTypeCode: string, methodCode: string, returnUrl: string): Promise<any>;
1478
- paymentStatus(paymentId: string): Promise<any>;
1479
- gwConfigDetail(configId: string): Promise<any>;
1480
- confirmPaymentSuccessManual(paymentId: string, transactionNo: string, note: string, confirmBy: string): Promise<any>;
1481
- getPaymentMethodTitles(methodCode: string): Promise<any>;
1482
- handleCreateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
1483
- handleUpdateGatewayConfig(input: any, cassoApiKey: string): Promise<any>;
1484
- getPaymentGatewaysByMethodCode(methodCode: string): Promise<any>;
1485
- getPaymentMethodTypesV2(storeActive: any, allMethodTypes: boolean): Promise<any>;
1486
- getTransferInfo(storeId: string, paymentId: string): Promise<any>;
1487
- }
1488
-
1489
- declare class WarehouseServiceV2 extends Service {
1490
- /**
1491
- * Constructs a new OrderService instance.
1492
- * @param endpoint - The endpoint URL for the service.
1493
- * @param orgId - The organization ID.
1494
- * @param storeId - The store ID.
1495
- */
1496
- constructor(endpoint: string, orgId: string, storeId: string);
1497
- setToken(token: string): void;
1498
- getInventory(warehouseId: string, data: any[]): Promise<any>;
1499
- getInfoWarehouse(warehouseId: string): Promise<any>;
1500
- }
1501
-
1502
- declare class DeepLinkVietQrService extends Service {
1503
- constructor(endpoint: string, orgId: string, storeId: string);
1504
- getAndroidBank(): Promise<any>;
1505
- getIosBank(): Promise<any>;
1506
- getBank(): Promise<any>;
1507
- }
1508
-
1509
- declare class ComhubService extends Service {
1510
- constructor(endpoint: string, orgId: string, storeId: string);
1511
- sendZns(dataTemplate: any, appId: string, messageType: string): Promise<any>;
1512
- sendMessage(OAId: string, content: string, contentType: string, senderPartyId: string, receivePartyIds: [string]): Promise<any>;
1513
- }
1514
-
1515
- declare class PortalService extends Service {
1516
- constructor(endpoint: string, orgId: string, storeId: string);
1517
- getDynamicForm(dataRequest: any): Promise<any>;
1518
- updateDynamicForm(dataRequest: any): Promise<any>;
1519
- createTag(title: string, createBy: string, partnerId?: string): Promise<any>;
1520
- searchTag(partnerId?: string, title?: string, id?: string, search?: string): Promise<any>;
1521
- redirectLink(sku?: string, id?: string): string;
1522
- imageProduct(parentId: string, parentType: string, width?: number, height?: number): string;
1523
- imagesProduct(parentId: string, parentType: string, width?: number, height?: number): string;
1524
- completeOrder(orderId: string, byUser: string): Promise<any>;
1525
- pushMessage(message: any): Promise<any>;
1526
- confirmExport(orderId: string, updateBy: string): Promise<any>;
1527
- confirmPackage(orderId: string, packageBoxId: string, byUser: string): Promise<any>;
1528
- handlePackage(orderId: string, byUser: string): Promise<any>;
1529
- packageBoxes(): Promise<any>;
1530
- shipmentParameter(orderId: string): Promise<any>;
1531
- connectShipment(orderId: string, byUser: string, pickupType: string, trackingCode: string): Promise<any>;
1532
- ffmStage(orderId: string): Promise<any>;
1533
- completeCancelFFMOrder(orderId: string, note: string, reason: string): Promise<any>;
1534
- saveTextEditor(saveTextEditor: any): Promise<any>;
1535
- getContent(type: string, relativeId: string): Promise<any>;
1536
- getCalendarStudent(studentId?: string, classId?: string, startDate?: number, endDate?: number): Promise<any>;
1537
- getClass(studentId?: string): Promise<any>;
1538
- getMenus(menuId: string): Promise<any>;
1539
- getBooking(query?: Record<string, any>): Promise<any>;
1540
- bookingSchedule(data: Record<string, any>): Promise<any>;
1541
- getWorkSchedule(orgId: string, query?: Record<string, any>): Promise<any>;
1542
- updateSchedule(orgId: string, data: Record<string, any>): Promise<any>;
1543
- getPosition(query?: Record<string, any>): Promise<any>;
1544
- }
1545
-
1546
- declare class UploadService extends Service {
1547
- constructor(endpoint: string, orgId: string, storeId: string);
1548
- uploadImage(imageCode: string): Promise<any>;
1549
- }
1550
-
1551
- declare class GetImageService extends Service {
1552
- constructor(endpoint: string, orgId: string, storeId: string);
1553
- }
1554
-
1555
- declare class AccountingService extends Service {
1556
- constructor(endpoint: string, orgId: string, storeId: string);
1557
- getCustomerWallet(customerId: string, type: string): Promise<any>;
1558
- }
1559
-
1560
- declare class OmnigatewayService extends Service {
1561
- constructor(endpoint: string, orgId: string, storeId: string);
1562
- requestJoinRoom(roomId: string, listUser: [string]): Promise<any>;
1563
- getTemplate(type: string): Promise<any>;
1564
- getInfoChatApp(): Promise<any>;
1565
- }
1566
-
1567
- declare class AuthorizationService extends Service {
1568
- constructor(endpoint: string, orgId: string, storeId: string);
1569
- checkToken(orgId: string, token: string): Promise<any>;
1570
- }
1571
-
1572
- declare class ZcaService extends Service {
1573
- /**
1574
- * Constructs a new OrderService instance.
1575
- * @param endpoint - The endpoint URL for the service.
1576
- * @param orgId - The organization ID.
1577
- * @param storeId - The store ID.
1578
- */
1579
- constructor(endpoint: string, orgId: string, storeId: string);
1580
- setToken(token: string): void;
1581
- loginQR(sessionId: string, appId: string): Promise<any>;
1582
- }
1583
-
1584
- declare class CashbookService extends Service {
1585
- constructor(endpoint: string, orgId: string, storeId: string);
1586
- searchTransactions(keyword: string, dateFrom: number, dateTo: number, currentPage: number, pageSize: number): Promise<any>;
1587
- getCashbookTransactionDetail(cashTransactionId: string): Promise<any>;
1588
- }
1589
-
1590
- /**
1591
- * Service class for managing store-related operations.
1592
- */
1593
- declare class StoreService extends Service {
1594
- /**
1595
- * Constructs a new StoreService instance.
1596
- * @param endpoint - The endpoint URL for the service.
1597
- * @param orgId - The organization ID.
1598
- * @param storeId - The store ID.
1599
- */
1600
- constructor(endpoint: string, orgId: string, storeId: string);
1601
- setToken(token: string): void;
1602
- /**
1603
- * Creates a store channel.
1604
- *
1605
- * @param storeChannelData - The data for creating the store channel.
1606
- * @returns A promise that resolves to the created store channel response.
1607
- * @throws If an error occurs while creating the store channel.
1608
- */
1609
- createStoreChannel(storeChannelData: any): Promise<any>;
1610
- /**
1611
- * Gets available store channels for an employee.
1612
- *
1613
- * @param empId - The employee ID.
1614
- * @returns A promise that resolves to the available store channels.
1615
- * @throws If an error occurs while fetching the store channels.
1616
- */
1617
- getAvailableStoreChannels(empId: string): Promise<any>;
1618
- }
1619
-
1620
- interface UploadFileResponse {
1621
- fileName: string;
1622
- filePath: string;
1623
- fileSize: number;
1624
- }
1625
- declare class FileServiceSerVice extends Service {
1626
- constructor(endpoint: string, orgId: string, storeId: string);
1627
- /**
1628
- * Upload file to the file service
1629
- * @param uploadFile - File object to upload
1630
- * @param path - Directory path to save the file
1631
- * @param parentId - Reference ID of parent object (optional)
1632
- * @param parentType - Type of parent object reference (optional)
1633
- * @returns Promise<UploadFileResponse>
1634
- */
1635
- uploadFile(uploadFile: File, path: string, parentId?: string, parentType?: string): Promise<UploadFileResponse>;
1636
- /**
1637
- * Upload image file (convenience method)
1638
- * @param imageFile - Image file to upload
1639
- * @param path - Directory path to save the image (default: "public")
1640
- * @param parentId - Reference ID of parent object (optional)
1641
- * @param parentType - Type of parent object reference (optional)
1642
- * @returns Promise<UploadFileResponse>
1643
- */
1644
- uploadImage(imageFile: File, path?: string, parentId?: string, parentType?: string): Promise<UploadFileResponse>;
1645
- getImage(parentId: string, parenttype: string): Promise<any>;
1646
- }
1647
-
1648
- declare class OrderCloudService extends Service {
1649
- constructor(endpoint: string, orgId: string, storeId: string);
1650
- findOrderByOwnerPartyId(ownerPartyId: string): Promise<any>;
1651
- }
1652
-
1653
- declare class CloudCloudService extends Service {
1654
- constructor(endpoint: string, orgId: string, storeId: string);
1655
- searchService(data: any): Promise<any>;
1656
- serviceDetail(serviceId: string): Promise<any>;
1657
- updateDescription(serviceId: string, description: string, updatedBy: string): Promise<any>;
1658
- }
1659
-
1660
- declare class SDK {
1661
- orgId: string;
1662
- storeId: string;
1663
- environment: "dev" | "live";
1664
- product: ProductService;
1665
- auth: AuthService;
1666
- order: OrderService;
1667
- user: UserService;
1668
- payment: PaymentService;
1669
- crm: CrmService;
1670
- service: ServiceManagementService;
1671
- warehouse: WarehouseService;
1672
- computing: ComputingService;
1673
- campaign: CampaignService;
1674
- image: ImageService;
1675
- paymentV2: PaymentServiceV2;
1676
- warehouseV2: WarehouseServiceV2;
1677
- deepLinkVietQr: DeepLinkVietQrService;
1678
- comhub: ComhubService;
1679
- portal: PortalService;
1680
- upload: UploadService;
1681
- getImage: GetImageService;
1682
- accounting: AccountingService;
1683
- omnigateway: OmnigatewayService;
1684
- authorization: AuthorizationService;
1685
- zca: ZcaService;
1686
- cashbook: CashbookService;
1687
- store: StoreService;
1688
- fileService: FileServiceSerVice;
1689
- orderCloud: OrderCloudService;
1690
- cloudCloud: CloudCloudService;
1691
- token: string | null;
1692
- constructor(orgId: string, storeId: string, environment: "dev" | "live");
1693
- setToken(token: string): void;
1694
- setStoreId(storeId: string): void;
1695
- setOrgId(orgId: string): void;
1696
- }
1697
-
1698
- export { SDK };