@zenify-omni/chat-js 0.1.0

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 (124) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +28 -0
  3. package/api/campaign.js +19 -0
  4. package/api/chat.js +518 -0
  5. package/api/chatroom.js +254 -0
  6. package/api/contact.js +45 -0
  7. package/api/crm-organization.js +101 -0
  8. package/api/customer.js +143 -0
  9. package/api/facebook-labels.js +11 -0
  10. package/api/field.js +11 -0
  11. package/api/file.js +17 -0
  12. package/api/filter.js +50 -0
  13. package/api/group.js +11 -0
  14. package/api/iam.js +23 -0
  15. package/api/index.js +54 -0
  16. package/api/orgTree.js +45 -0
  17. package/api/post.js +111 -0
  18. package/api/queue.js +15 -0
  19. package/api/report.js +422 -0
  20. package/api/send.js +21 -0
  21. package/api/session-event.js +30 -0
  22. package/api/session.js +249 -0
  23. package/api/settings/assign-task.js +10 -0
  24. package/api/settings/channel.js +136 -0
  25. package/api/settings/chat-layout.js +37 -0
  26. package/api/settings/chat-timeout.js +10 -0
  27. package/api/settings/common.js +32 -0
  28. package/api/settings/config.js +19 -0
  29. package/api/settings/index.js +24 -0
  30. package/api/settings/ivr.js +25 -0
  31. package/api/settings/queue-v3.js +56 -0
  32. package/api/settings/queue.js +48 -0
  33. package/api/settings/routing.js +32 -0
  34. package/api/settings/service.js +31 -0
  35. package/api/settings.js +567 -0
  36. package/api/shipping.js +19 -0
  37. package/api/shopee.js +21 -0
  38. package/api/smart-qc/index.js +4 -0
  39. package/api/smart-qc/keyword.js +10 -0
  40. package/api/tag.js +11 -0
  41. package/api/user.js +177 -0
  42. package/client.js +391 -0
  43. package/config/env.js +76 -0
  44. package/constants/advance-filter.js +358 -0
  45. package/constants/auto-assign-tag.js +13 -0
  46. package/constants/chat-message.js +423 -0
  47. package/constants/chat-room-tag.js +7 -0
  48. package/constants/chat-source.js +68 -0
  49. package/constants/chatbot.js +58 -0
  50. package/constants/common.js +4 -0
  51. package/constants/crm-organization.js +75 -0
  52. package/constants/distribute.js +8 -0
  53. package/constants/distribution-log.js +14 -0
  54. package/constants/events.js +27 -0
  55. package/constants/file-upload.js +86 -0
  56. package/constants/lead.js +111 -0
  57. package/constants/mask-data-config.js +16 -0
  58. package/constants/month.js +78 -0
  59. package/constants/quick-filter.js +49 -0
  60. package/constants/regex.js +34 -0
  61. package/constants/setting.js +62 -0
  62. package/constants/shipping.js +12 -0
  63. package/constants/social.js +21 -0
  64. package/constants/sortable-fields.js +146 -0
  65. package/constants/tenant_config.js +154 -0
  66. package/constants/use-query-key.js +470 -0
  67. package/constants/user.js +293 -0
  68. package/exceptions/axios-error.js +24 -0
  69. package/exceptions/https-error.js +28 -0
  70. package/exceptions/validator-error.js +20 -0
  71. package/lib/avatar-color.js +31 -0
  72. package/lib/i18n/index.js +85 -0
  73. package/lib/i18n/language-store.js +74 -0
  74. package/lib/i18n/locales/en/campaign.json +3 -0
  75. package/lib/i18n/locales/en/chat.json +656 -0
  76. package/lib/i18n/locales/en/common.json +1846 -0
  77. package/lib/i18n/locales/en/customer.json +20 -0
  78. package/lib/i18n/locales/en/lead.json +5 -0
  79. package/lib/i18n/locales/en/lumi.json +4 -0
  80. package/lib/i18n/locales/en/notification.json +107 -0
  81. package/lib/i18n/locales/en/org.json +4 -0
  82. package/lib/i18n/locales/en/posts.json +8 -0
  83. package/lib/i18n/locales/en/settings.json +39 -0
  84. package/lib/i18n/locales/vi/campaign.json +3 -0
  85. package/lib/i18n/locales/vi/chat.json +660 -0
  86. package/lib/i18n/locales/vi/common.json +1846 -0
  87. package/lib/i18n/locales/vi/customer.json +20 -0
  88. package/lib/i18n/locales/vi/lead.json +5 -0
  89. package/lib/i18n/locales/vi/lumi.json +4 -0
  90. package/lib/i18n/locales/vi/notification.json +107 -0
  91. package/lib/i18n/locales/vi/org.json +4 -0
  92. package/lib/i18n/locales/vi/posts.json +8 -0
  93. package/lib/i18n/locales/vi/settings.json +39 -0
  94. package/lib/i18n/server-label.js +33 -0
  95. package/lib/phone.js +70 -0
  96. package/lib/user-avatar.js +21 -0
  97. package/package.json +45 -0
  98. package/socket/index.js +30 -0
  99. package/transport-registry.js +77 -0
  100. package/utils/access-detail.js +119 -0
  101. package/utils/auth.js +205 -0
  102. package/utils/chunk-reload-guard.js +4 -0
  103. package/utils/concurrency-limiter.js +30 -0
  104. package/utils/crm-organization.js +0 -0
  105. package/utils/currency.js +14 -0
  106. package/utils/customers.js +42 -0
  107. package/utils/data.js +178 -0
  108. package/utils/date.js +144 -0
  109. package/utils/debounced-invalidate.js +15 -0
  110. package/utils/emoticon.js +134 -0
  111. package/utils/export.js +7 -0
  112. package/utils/field-layout.js +33 -0
  113. package/utils/filter-adapters.js +9 -0
  114. package/utils/filter.js +18 -0
  115. package/utils/formatters.js +6 -0
  116. package/utils/image-compression.js +169 -0
  117. package/utils/leads.js +13 -0
  118. package/utils/microlink.js +20 -0
  119. package/utils/org-tree.js +108 -0
  120. package/utils/request.js +461 -0
  121. package/utils/session-end.js +19 -0
  122. package/utils/string.js +154 -0
  123. package/utils/table-display-config.js +80 -0
  124. package/utils/validation.js +49 -0
@@ -0,0 +1,31 @@
1
+ import { requestApi } from "../../utils/request.js";
2
+ const getListService = ({ params }) => requestApi({
3
+ method: "get",
4
+ endpoint: `/v2/services`,
5
+ params
6
+ });
7
+ const createService = ({ data }) => requestApi({
8
+ method: "post",
9
+ endpoint: `/v2/service`,
10
+ data
11
+ });
12
+ const updateService = ({ id, data }) => requestApi({
13
+ method: "put",
14
+ endpoint: `/v2/service/${id}`,
15
+ data
16
+ });
17
+ const deleteService = ({ id }) => requestApi({
18
+ method: "delete",
19
+ endpoint: `/v2/service/${id}`
20
+ });
21
+ const findService = ({ id }) => requestApi({
22
+ method: "get",
23
+ endpoint: `/v2/service/${id}`
24
+ });
25
+ export {
26
+ createService,
27
+ deleteService,
28
+ findService,
29
+ getListService,
30
+ updateService
31
+ };
@@ -0,0 +1,567 @@
1
+ import { requestApi, postWithFile } from "../utils/request.js";
2
+ const getSettings = () => requestApi({
3
+ method: "get",
4
+ endpoint: "/v2/setting-dashboard"
5
+ });
6
+ const getUsers = ({ params }) => requestApi({
7
+ method: "get",
8
+ endpoint: "/v2/users",
9
+ params
10
+ });
11
+ function createUser({ data }) {
12
+ return requestApi({
13
+ method: "post",
14
+ endpoint: "/v2/create-user",
15
+ data
16
+ });
17
+ }
18
+ function uploadAddBlackList(payload) {
19
+ return postWithFile({
20
+ method: "post",
21
+ endpoint: "/v2/upload-add-blacklist",
22
+ data: payload
23
+ });
24
+ }
25
+ function uploadDeleteBlacklist(payload) {
26
+ return postWithFile({
27
+ method: "post",
28
+ endpoint: "/v2/upload-delete-blacklist",
29
+ data: payload
30
+ });
31
+ }
32
+ function activeUser({ id, data }) {
33
+ return requestApi({
34
+ method: "put",
35
+ endpoint: `/v2/active-user/${id}`,
36
+ data
37
+ });
38
+ }
39
+ function getSchedules({ params }) {
40
+ return requestApi({
41
+ method: "get",
42
+ endpoint: "/v2/time/schedules",
43
+ params
44
+ });
45
+ }
46
+ function createSchedule({ data }) {
47
+ return requestApi({
48
+ method: "post",
49
+ endpoint: "/v2/time/create-schedule",
50
+ data
51
+ });
52
+ }
53
+ function updateSchedule({ scheduleId, data }) {
54
+ return requestApi({
55
+ method: "put",
56
+ endpoint: `/v2/time/schedules/${scheduleId}`,
57
+ data
58
+ });
59
+ }
60
+ function deleteSchedule(id) {
61
+ return requestApi({
62
+ method: "delete",
63
+ endpoint: `/v2/time/schedules/${id}`
64
+ });
65
+ }
66
+ function getEvents({ params }) {
67
+ return requestApi({
68
+ method: "get",
69
+ endpoint: "/v2/time/schedule-periods",
70
+ params
71
+ });
72
+ }
73
+ function createEvent({ data }) {
74
+ return requestApi({
75
+ method: "post",
76
+ endpoint: "/v2/time/create-period",
77
+ data
78
+ });
79
+ }
80
+ function editEvent({ id, data }) {
81
+ return requestApi({
82
+ method: "put",
83
+ endpoint: `/v2/time/schedule-periods/${id}`,
84
+ data
85
+ });
86
+ }
87
+ function deleteEvent({ id }) {
88
+ return requestApi({
89
+ method: "delete",
90
+ endpoint: `/v2/time/schedule-periods/${id}`
91
+ });
92
+ }
93
+ function getAttributes({ params }) {
94
+ return requestApi({
95
+ method: "get",
96
+ endpoint: "/v2/fields",
97
+ params
98
+ });
99
+ }
100
+ function getAttribute(fieldId) {
101
+ return requestApi({
102
+ method: "get",
103
+ endpoint: `/v2/field/${fieldId}`
104
+ });
105
+ }
106
+ function createAttribute({ data }) {
107
+ return requestApi({
108
+ method: "post",
109
+ endpoint: "/v2/field",
110
+ data
111
+ });
112
+ }
113
+ function editAttribute({ id, data }) {
114
+ return requestApi({
115
+ method: "put",
116
+ endpoint: `/v2/field/${id}`,
117
+ data
118
+ });
119
+ }
120
+ function updateAttributeData({ id, data }) {
121
+ return requestApi({
122
+ method: "put",
123
+ endpoint: `/v2/field/data_field/${id}`,
124
+ data
125
+ });
126
+ }
127
+ function changeRequireAttribute({ id, data }) {
128
+ return requestApi({
129
+ method: "patch",
130
+ endpoint: `/v2/field/${id}`,
131
+ data
132
+ });
133
+ }
134
+ function deleteAttribute({ id, confirm }) {
135
+ return requestApi({
136
+ method: "delete",
137
+ endpoint: `/v2/field/${id}${confirm ? "?confirm=true" : ""}`
138
+ });
139
+ }
140
+ function getGroups({ params }) {
141
+ return requestApi({
142
+ method: "get",
143
+ endpoint: "/v2/groups",
144
+ params
145
+ });
146
+ }
147
+ function createGroup({ data }) {
148
+ return requestApi({
149
+ method: "post",
150
+ endpoint: "/v2/group",
151
+ data
152
+ });
153
+ }
154
+ function updateGroup({ data }) {
155
+ return requestApi({
156
+ method: "put",
157
+ endpoint: `/v2/updateGroup`,
158
+ data
159
+ });
160
+ }
161
+ function deleteGroup({ id }) {
162
+ return requestApi({
163
+ method: "delete",
164
+ endpoint: `/v2/group/${id}`
165
+ });
166
+ }
167
+ function getCities(params) {
168
+ return requestApi({
169
+ method: "get",
170
+ endpoint: "/cities",
171
+ params
172
+ });
173
+ }
174
+ function getOrganizes({ params }) {
175
+ return requestApi({
176
+ method: "get",
177
+ endpoint: "/v2/organizes",
178
+ params
179
+ });
180
+ }
181
+ function getAllOrganizes() {
182
+ return requestApi({
183
+ method: "get",
184
+ endpoint: "/v2/all-organize"
185
+ });
186
+ }
187
+ function createOrganize({ data }) {
188
+ return requestApi({
189
+ method: "post",
190
+ endpoint: "/v2/organize",
191
+ data
192
+ });
193
+ }
194
+ function deleteOrganize({ id }) {
195
+ return requestApi({
196
+ method: "delete",
197
+ endpoint: `/v2/organize/${id}`
198
+ });
199
+ }
200
+ function getOrganizationDetail({ id }) {
201
+ return requestApi({
202
+ method: "get",
203
+ endpoint: `/v2/organize/${id}`
204
+ });
205
+ }
206
+ function updateOrganization({ id, data }) {
207
+ return requestApi({
208
+ method: "put",
209
+ endpoint: `/v2/organize/${id}`,
210
+ data
211
+ });
212
+ }
213
+ function getDistricts({ params }) {
214
+ return requestApi({
215
+ method: "get",
216
+ endpoint: "districts",
217
+ params
218
+ });
219
+ }
220
+ function getDistrictsByCityId({ city_id }) {
221
+ return requestApi({
222
+ method: "get",
223
+ endpoint: `districts?city_id=${city_id}`
224
+ });
225
+ }
226
+ function getWards({ params }) {
227
+ return requestApi({
228
+ method: "get",
229
+ endpoint: "wards",
230
+ params
231
+ });
232
+ }
233
+ function getWardsByDistrictId({ districtId }) {
234
+ return requestApi({
235
+ method: "get",
236
+ endpoint: `wards?district_id=${districtId}`
237
+ });
238
+ }
239
+ function getWardsByCityId({ cityId }) {
240
+ return requestApi({
241
+ method: "get",
242
+ endpoint: `/wards?city_id=${cityId}`
243
+ });
244
+ }
245
+ function getChatConfig() {
246
+ return requestApi({
247
+ method: "get",
248
+ endpoint: "/v2/chat-config"
249
+ });
250
+ }
251
+ function updateChatConfig({ data }) {
252
+ return requestApi({
253
+ method: "put",
254
+ endpoint: `/v2/chat-config`,
255
+ data
256
+ });
257
+ }
258
+ function getPriorities() {
259
+ return requestApi({
260
+ method: "get",
261
+ endpoint: "/all-priority"
262
+ });
263
+ }
264
+ function createTemplate({ data }) {
265
+ return requestApi({
266
+ method: "post",
267
+ endpoint: "/v2/core/template",
268
+ data
269
+ });
270
+ }
271
+ function editTemplate({ id, data }) {
272
+ return requestApi({
273
+ method: "put",
274
+ endpoint: `/v2/core/template/${id}`,
275
+ data
276
+ });
277
+ }
278
+ function deleteTemplate({ id }) {
279
+ return requestApi({
280
+ method: "delete",
281
+ endpoint: `/v2/core/template/${id}`
282
+ });
283
+ }
284
+ function getSettingBlacklist({ params }) {
285
+ return requestApi({
286
+ method: "get",
287
+ endpoint: "/v2/all-blacklists",
288
+ params
289
+ });
290
+ }
291
+ function createSettingBlacklist({ data }) {
292
+ return requestApi({
293
+ method: "post",
294
+ endpoint: "/v2/post-blacklist",
295
+ data
296
+ });
297
+ }
298
+ function editSettingBlacklist({ data }) {
299
+ return requestApi({
300
+ method: "put",
301
+ endpoint: `/v2/update-blacklist`,
302
+ data
303
+ });
304
+ }
305
+ function deleteSettingBlacklist({ id }) {
306
+ return requestApi({
307
+ method: "post",
308
+ endpoint: `/v2/delete-blacklist/${id}`
309
+ });
310
+ }
311
+ function deleteSettingManyBlacklist(blacklistIds) {
312
+ return requestApi({
313
+ method: "post",
314
+ endpoint: `/v2/delete-many-blacklist`,
315
+ data: {
316
+ ids: blacklistIds
317
+ }
318
+ });
319
+ }
320
+ const getSmsTemplates = (params) => {
321
+ const options = {
322
+ method: "get",
323
+ endpoint: "/v2/core/templates/sms"
324
+ };
325
+ if (params) {
326
+ options.params = params;
327
+ }
328
+ return requestApi(options);
329
+ };
330
+ const getZnsTemplates = (params) => {
331
+ const options = {
332
+ method: "get",
333
+ endpoint: "/v2/core/templates/zns"
334
+ };
335
+ if (params) {
336
+ options.params = params;
337
+ }
338
+ return requestApi(options);
339
+ };
340
+ const getChatTemplates = (params) => {
341
+ const options = {
342
+ method: "get",
343
+ endpoint: "/v2/core/templates/chat"
344
+ };
345
+ if (params) {
346
+ options.params = params;
347
+ }
348
+ return requestApi(options);
349
+ };
350
+ const getWhatsappTemplates = (params) => {
351
+ const options = {
352
+ method: "get",
353
+ endpoint: "/v2/core/templates/whatsapp"
354
+ };
355
+ if (params) {
356
+ options.params = params;
357
+ }
358
+ return requestApi(options);
359
+ };
360
+ const getEmailTemplates = (params) => {
361
+ const options = {
362
+ method: "get",
363
+ endpoint: `/v2/core/templates/email`
364
+ };
365
+ if (params) {
366
+ options.params = params;
367
+ }
368
+ return requestApi(options);
369
+ };
370
+ const getNoteTemplates = (params) => {
371
+ const options = {
372
+ method: "get",
373
+ endpoint: "/v2/core/templates/deal"
374
+ };
375
+ if (params) {
376
+ options.params = params;
377
+ }
378
+ return requestApi(options);
379
+ };
380
+ const getEmailAccounts = () => requestApi({
381
+ method: "get",
382
+ endpoint: "/v2/email/accounts"
383
+ });
384
+ const getSmartViews = (params) => {
385
+ return requestApi({
386
+ method: "get",
387
+ endpoint: "/v2/smart-view",
388
+ params
389
+ });
390
+ };
391
+ const copySmartView = (viewId) => {
392
+ return requestApi({
393
+ method: "post",
394
+ endpoint: `/v2/smart-view/${viewId}`
395
+ });
396
+ };
397
+ const getSmartViewDetail = (viewId) => requestApi({
398
+ method: "get",
399
+ endpoint: `v2/smart-view/${viewId}`
400
+ });
401
+ const getTags = (params) => {
402
+ const options = {
403
+ method: "get",
404
+ endpoint: `/v2/group-tag-customer`
405
+ };
406
+ if (params) {
407
+ options.params = params;
408
+ }
409
+ return requestApi(options);
410
+ };
411
+ const getTagsSetting = (params) => requestApi({
412
+ method: "get",
413
+ endpoint: "/v2/tags",
414
+ params
415
+ });
416
+ const createTagsSetting = (payload) => requestApi({
417
+ method: "post",
418
+ endpoint: "/v2/tags",
419
+ data: payload
420
+ });
421
+ const deleteTagSetting = (id) => requestApi({
422
+ method: "delete",
423
+ endpoint: `v2/tags/${id}`
424
+ });
425
+ const updateTagSetting = (id, payload) => requestApi({
426
+ method: "put",
427
+ endpoint: `/v2/tags/${id}`,
428
+ data: payload
429
+ });
430
+ const pinTagSetting = (id, payload) => requestApi({
431
+ method: "put",
432
+ endpoint: `/v2/tags/${id}/pin`,
433
+ data: payload
434
+ });
435
+ const deletePersonalTag = (id) => requestApi({
436
+ method: "delete",
437
+ endpoint: `/v2/personal-tags/${id}`
438
+ });
439
+ const createGroupTag = (payload) => requestApi({
440
+ method: "post",
441
+ endpoint: "/v2/group-tag-customer",
442
+ data: payload
443
+ });
444
+ const updateGroupTag = (id, payload) => requestApi({
445
+ method: "put",
446
+ endpoint: `/v2/group-tag-customer/${id}`,
447
+ data: payload
448
+ });
449
+ const deleteGroupTag = (id) => requestApi({
450
+ method: "delete",
451
+ endpoint: `/v2/group-tag-customer/${id}`
452
+ });
453
+ const getGroupsByTenantId = async (tenantId, params) => {
454
+ return requestApi({
455
+ method: "get",
456
+ endpoint: `/v2/settings/${tenantId}/groups`,
457
+ params
458
+ });
459
+ };
460
+ const getUsersByTenantId = async (tenantId, params) => {
461
+ return requestApi({
462
+ method: "get",
463
+ endpoint: `/v2/admin/settings/${tenantId}/users`,
464
+ params
465
+ });
466
+ };
467
+ const getAllDomains = async () => {
468
+ return requestApi({
469
+ method: "get",
470
+ endpoint: "/v2/admin/settings/accounts-all"
471
+ });
472
+ };
473
+ const getDataMaskingConfigs = () => requestApi({
474
+ method: "get",
475
+ endpoint: "/v2/setting-data-masking-config"
476
+ });
477
+ const createDataMaskingConfig = ({ data }) => requestApi({
478
+ method: "post",
479
+ endpoint: "/v2/setting-data-masking-config",
480
+ data
481
+ });
482
+ const updateDataMaskingConfig = ({ id, data }) => requestApi({
483
+ method: "put",
484
+ endpoint: `/v2/setting-data-masking-config/${id}`,
485
+ data
486
+ });
487
+ const deleteDataMaskingConfig = ({ id }) => requestApi({
488
+ method: "delete",
489
+ endpoint: `/v2/setting-data-masking-config/${id}`
490
+ });
491
+ export {
492
+ activeUser,
493
+ changeRequireAttribute,
494
+ copySmartView,
495
+ createAttribute,
496
+ createDataMaskingConfig,
497
+ createEvent,
498
+ createGroup,
499
+ createGroupTag,
500
+ createOrganize,
501
+ createSchedule,
502
+ createSettingBlacklist,
503
+ createTagsSetting,
504
+ createTemplate,
505
+ createUser,
506
+ deleteAttribute,
507
+ deleteDataMaskingConfig,
508
+ deleteEvent,
509
+ deleteGroup,
510
+ deleteGroupTag,
511
+ deleteOrganize,
512
+ deletePersonalTag,
513
+ deleteSchedule,
514
+ deleteSettingBlacklist,
515
+ deleteSettingManyBlacklist,
516
+ deleteTagSetting,
517
+ deleteTemplate,
518
+ editAttribute,
519
+ editEvent,
520
+ editSettingBlacklist,
521
+ editTemplate,
522
+ getAllDomains,
523
+ getAllOrganizes,
524
+ getAttribute,
525
+ getAttributes,
526
+ getChatConfig,
527
+ getChatTemplates,
528
+ getCities,
529
+ getDataMaskingConfigs,
530
+ getDistricts,
531
+ getDistrictsByCityId,
532
+ getEmailAccounts,
533
+ getEmailTemplates,
534
+ getEvents,
535
+ getGroups,
536
+ getGroupsByTenantId,
537
+ getNoteTemplates,
538
+ getOrganizationDetail,
539
+ getOrganizes,
540
+ getPriorities,
541
+ getSchedules,
542
+ getSettingBlacklist,
543
+ getSettings,
544
+ getSmartViewDetail,
545
+ getSmartViews,
546
+ getSmsTemplates,
547
+ getTags,
548
+ getTagsSetting,
549
+ getUsers,
550
+ getUsersByTenantId,
551
+ getWards,
552
+ getWardsByCityId,
553
+ getWardsByDistrictId,
554
+ getWhatsappTemplates,
555
+ getZnsTemplates,
556
+ pinTagSetting,
557
+ updateAttributeData,
558
+ updateChatConfig,
559
+ updateDataMaskingConfig,
560
+ updateGroup,
561
+ updateGroupTag,
562
+ updateOrganization,
563
+ updateSchedule,
564
+ updateTagSetting,
565
+ uploadAddBlackList,
566
+ uploadDeleteBlacklist
567
+ };
@@ -0,0 +1,19 @@
1
+ import { requestApi } from "../utils/request.js";
2
+ function getShippings(params) {
3
+ return requestApi({
4
+ method: "get",
5
+ endpoint: "/v2/shipping/carriers",
6
+ params
7
+ });
8
+ }
9
+ function getShippingFeeConfigs(params) {
10
+ return requestApi({
11
+ method: "get",
12
+ endpoint: "/v2/shipping/fee-configs",
13
+ params
14
+ });
15
+ }
16
+ export {
17
+ getShippingFeeConfigs,
18
+ getShippings
19
+ };
package/api/shopee.js ADDED
@@ -0,0 +1,21 @@
1
+ import { requestOttApi } from "../utils/request.js";
2
+ const syncShopeeMessages = ({
3
+ roomId,
4
+ pageId,
5
+ shopeeConversationId,
6
+ oldestMessageTimestamp
7
+ }) => {
8
+ return requestOttApi({
9
+ endpoint: "/shopee/sync-messages",
10
+ method: "POST",
11
+ data: {
12
+ room_id: roomId,
13
+ page_id: pageId,
14
+ shopee_conversation_id: shopeeConversationId,
15
+ ...oldestMessageTimestamp ? { oldest_message_timestamp: oldestMessageTimestamp } : {}
16
+ }
17
+ });
18
+ };
19
+ export {
20
+ syncShopeeMessages
21
+ };
@@ -0,0 +1,4 @@
1
+ import * as keyword from "./keyword.js";
2
+ export {
3
+ keyword
4
+ };
@@ -0,0 +1,10 @@
1
+ import { requestApi } from "../../utils/request.js";
2
+ function getAllKeywordQc() {
3
+ return requestApi({
4
+ endpoint: "/v2/smart-qc/keywords-all",
5
+ method: "get"
6
+ });
7
+ }
8
+ export {
9
+ getAllKeywordQc
10
+ };
package/api/tag.js ADDED
@@ -0,0 +1,11 @@
1
+ import { requestApi } from "../utils/request.js";
2
+ function getProductTags(params) {
3
+ return requestApi({
4
+ method: "get",
5
+ endpoint: "/v2/tags",
6
+ params
7
+ });
8
+ }
9
+ export {
10
+ getProductTags
11
+ };