@feedmepos/mf-connect 0.1.98-beta.8 → 0.1.98-beta.81

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 (170) hide show
  1. package/dist/{App-DsB2o1oB.js → App-CKdnfhUE.js} +853 -683
  2. package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-vN-szmrB.js} +16 -13
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-FIyWozvZ.js} +8 -8
  4. package/dist/Broadcast-CV_euppF.js +306 -0
  5. package/dist/CampaignAnalytic-Dlovlsh3.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Fd_0aPzZ.js} +8 -5
  7. package/dist/Card-ZgfOZ7sV.js +1086 -0
  8. package/dist/{Collections-B0uGC2FE.js → Collections-DZmHKbZn.js} +14 -13
  9. package/dist/Credit-DGsbEvMw.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cj89MnB0.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C77dXZo-.js +4432 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-CcIiEV2Z.js} +36 -36
  13. package/dist/Experience-DlJycdKe.js +288 -0
  14. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-DVGF0TBc.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-q2X_SSup.js +356 -0
  17. package/dist/GiftCardSetup-BLDm3RfC.js +736 -0
  18. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CBC5AGR-.js +424 -0
  19. package/dist/Goals-CD8vdUPQ.js +247 -0
  20. package/dist/{Grab-DmmwrGzk.js → Grab-KDYktOCn.js} +33 -32
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-DUi1YY1x.js} +1 -1
  22. package/dist/{Index-m7l4insz.js → Index-BT4esMkG.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-BRCrx3DA.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-D3G4alTX.js} +1 -1
  25. package/dist/LoyaltyDashboard-CzmwuzTw.js +2911 -0
  26. package/dist/MainLayout-CVYfxfuS.js +143 -0
  27. package/dist/{Marketing-C9pSIdBU.js → Marketing-sDWWcaL5.js} +7 -6
  28. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-DHmI38Lo.js} +15 -14
  29. package/dist/Member-sdcMiTmr.js +654 -0
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-DqchRq6h.js +1281 -0
  31. package/dist/MemberImportHistory-Df_5SiGn.js +187 -0
  32. package/dist/MemberList-BGoClGZE.js +334 -0
  33. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-qR38yGk5.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-D4yY57Vo.js} +5928 -5644
  35. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Co9oeOFx.js +40 -0
  36. package/dist/Mission-DSyqYeI6.js +363 -0
  37. package/dist/{Overview-DOJj4XvO.js → Overview-BDM8Lxfv.js} +23 -20
  38. package/dist/Overview-sLhLv5Oa.js +1316 -0
  39. package/dist/Point-DO5Z5sOL.js +297 -0
  40. package/dist/Promotion-BXm1Dxlv.js +426 -0
  41. package/dist/{Queue-55G2gtP5.js → Queue-C4kEj_Bp.js} +16 -13
  42. package/dist/{Record-DNPI02c6.js → Record-iKUy-nn3.js} +9 -9
  43. package/dist/Review-D-3-BRON.js +45 -0
  44. package/dist/ReviewFacebookCallback-SLzE3D7c.js +238 -0
  45. package/dist/ReviewGoogleCallback-DntrtfGB.js +213 -0
  46. package/dist/{Reward-CnP8R2pS.js → Reward-CNQS6F2m.js} +28 -28
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-D0ZNJilO.js} +26 -23
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgvaMOAJ.js} +198 -186
  49. package/dist/{Segment-CxiQnnyj.js → Segment-Bi58A7cw.js} +278 -276
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CxC6ZLZT.js} +45 -42
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CToVAWKO.js} +4 -4
  52. package/dist/Setting-CixcOp_l.js +574 -0
  53. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-DkPNDfxz.js} +12 -12
  54. package/dist/Settings-bD_DkKI0.js +230 -0
  55. package/dist/Store-BvnsumDX.js +2615 -0
  56. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-CKPnV_j3.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-k46T2rql.js +1319 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-IknvTIMG.js} +2 -2
  59. package/dist/{Tier-BAZ1xuKL.js → Tier-CiKGy-Do.js} +2576 -757
  60. package/dist/{Title-CcNAt47f.js → Title-CNFamvkQ.js} +41 -37
  61. package/dist/Transaction-C8SnyFML.js +45 -0
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DQrTH7cz.js} +26 -26
  63. package/dist/Voucher-9Q-GHuvD.js +837 -0
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B-6mF0RH.js} +118 -124
  65. package/dist/WhatsappAccount-DRKJVs0I.js +325 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DGOPGiGH.js +96 -0
  67. package/dist/WhatsappBot-muUmTIyY.js +441 -0
  68. package/dist/WhatsappBotSettings-DUjKwiv6.js +136 -0
  69. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-7tSuZ_C3.js} +2 -2
  70. package/dist/{app-Z-UKRG5V.js → app-CQnX8TXq.js} +50951 -42514
  71. package/dist/app.js +1 -1
  72. package/dist/base.export-CwCY41wr.js +75 -0
  73. package/dist/browser-BSAOEeIM.js +1478 -0
  74. package/dist/{business-C7EF6cKC.js → business-DGYo03yh.js} +5 -5
  75. package/dist/campaign-BFhMhQWk.js +400 -0
  76. package/dist/campaign-BmVMseCM.js +100 -0
  77. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  78. package/dist/campaign.fn-DHdhR9C8.js +776 -0
  79. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
  80. package/dist/collection.fn-CYrQd8Th.js +26 -0
  81. package/dist/currency-B7wFZjCM.js +7 -0
  82. package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-C62eVSKZ.js} +11 -11
  83. package/dist/{effect-BcB8IlTI.js → effect-XVC0SyM1.js} +1 -1
  84. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-DUWzbknH.js} +209 -201
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-BSgrCJRv.js → helper-Bw_KFook.js} +1 -1
  87. package/dist/index-B88wz0DA.js +53 -0
  88. package/dist/{index-iMPtFp54.js → index-BHPcqvxB.js} +10 -9
  89. package/dist/{index-HXiYGO4_.js → index-BL01AAGF.js} +6343 -7693
  90. package/dist/index-BpcakDLo.js +32438 -0
  91. package/dist/{index-VlFWaBrg.js → index-Bu0rl1Jm.js} +1 -1
  92. package/dist/{index-BpI-BI4H.js → index-C0WVYJgp.js} +4 -4
  93. package/dist/index-C5a9ZaAM.js +151 -0
  94. package/dist/{index-CsoBDon4.js → index-CRX2b_-n.js} +1590 -1523
  95. package/dist/{index-CIBPhxlC.js → index-CSaO5mCs.js} +105 -123
  96. package/dist/{index-hlyg-wxV.js → index-CX2tKi6X.js} +1 -1
  97. package/dist/index-C_H8jFYf.js +2743 -0
  98. package/dist/{index-BoYEqLif.js → index-CmJ4UtbH.js} +1517 -263
  99. package/dist/index-CoaZuwwm.js +172 -0
  100. package/dist/{index-Bf6jNZit.js → index-CsZ7_Qzf.js} +24 -9
  101. package/dist/index-D5D85re4.js +902 -0
  102. package/dist/index-D89ye2yV.js +74 -0
  103. package/dist/index-DHRVhERM.js +14550 -0
  104. package/dist/index-DKabvlsg.js +69 -0
  105. package/dist/{index-CoHWpylO.js → index-DlFjUct2.js} +2140 -2557
  106. package/dist/index-XCHxkJPE.js +137 -0
  107. package/dist/index-o2Ga_qaX.js +39 -0
  108. package/dist/index-z0K48rtR.js +54 -0
  109. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-cOXL--fX.js} +164 -164
  110. package/dist/{loading-CSXr0Yqz.js → loading-BlfJuA-h.js} +1 -1
  111. package/dist/{lodash-Bh7XKI-R.js → lodash-CFkpI5Sp.js} +1 -1
  112. package/dist/member-import-B4ihDPgR.js +188 -0
  113. package/dist/membership-CyNEU3ld.js +274 -0
  114. package/dist/{money-BZIST_m9.js → money-B0QV3AtE.js} +1 -1
  115. package/dist/{number-DXLR2w95.js → number-DJ7EhoTu.js} +1 -1
  116. package/dist/objectid-DZ8o9_J4.js +145 -0
  117. package/dist/onboarding-BhMbuIRK.js +131 -0
  118. package/dist/onboardingSetup-BZMYTun6.js +17 -0
  119. package/dist/{plugins-4FlbwoES.js → plugins-C7hEP98r.js} +13 -12
  120. package/dist/remy-Qz_pNsUS.js +13 -0
  121. package/dist/{reward-DUbl79bZ.js → reward-D4975Y4s.js} +1 -1
  122. package/dist/{rule-BQUoZ4l_.js → rule-BfSrqM9Z.js} +337 -275
  123. package/dist/style.css +1 -1
  124. package/dist/{template-BoiSG7G7.js → template-CTCYJKDu.js} +6 -6
  125. package/dist/timezone-hBjTK85u.js +20 -0
  126. package/dist/transaction.fn-1iGyAGZA.js +71 -0
  127. package/dist/{trigger-D5g5m6tT.js → trigger-CdJikvw9.js} +17 -17
  128. package/dist/useMarketingMaterialActions-R1rDbIr8.js +96 -0
  129. package/dist/{usePagination-DHePBBoR.js → usePagination-CqSRHo9z.js} +1 -1
  130. package/dist/{user-C_ToSo-g.js → user-C8i4TfQt.js} +1 -1
  131. package/dist/vue-i18n-CiJ_kNkt.js +2365 -0
  132. package/dist/{xlsx-h4G1C-xj.js → xlsx-DGiPalb9.js} +440 -440
  133. package/dist/{zod-CgigfJar.js → zod-CKl6yP5K.js} +1 -1
  134. package/package.json +10 -6
  135. package/dist/Broadcast-C9akM-TB.js +0 -266
  136. package/dist/Card-DRkIYs0M.js +0 -910
  137. package/dist/Credit-V5YA_hGx.js +0 -260
  138. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  139. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  140. package/dist/Experience-WTWy5yY6.js +0 -259
  141. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  142. package/dist/Game-BwOfTCW5.js +0 -330
  143. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  144. package/dist/MainLayout-Du5kZOtA.js +0 -41
  145. package/dist/Member-DUV_vbPI.js +0 -280
  146. package/dist/MemberList-Ye4nOk-i.js +0 -1601
  147. package/dist/Mission-BBmCGpt8.js +0 -334
  148. package/dist/Point-Bzg6hi6o.js +0 -262
  149. package/dist/Promotion-BMXIp_ef.js +0 -397
  150. package/dist/Review-CYNPPxYU.js +0 -1141
  151. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  152. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  153. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
  154. package/dist/Setting-jHAjccod.js +0 -2047
  155. package/dist/Store-Cu-hKmVa.js +0 -1996
  156. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  157. package/dist/Transaction-D7DO3dKQ.js +0 -39
  158. package/dist/Voucher-Cq-n1CaC.js +0 -421
  159. package/dist/campaign--MjoY1Mn.js +0 -219
  160. package/dist/campaign-DHBuP4UA.js +0 -277
  161. package/dist/campaign.fn-Bd34dVnx.js +0 -776
  162. package/dist/export-CjB7qxZ9.js +0 -97
  163. package/dist/index-BIAjmMga.js +0 -85
  164. package/dist/index-Bm0QPucw.js +0 -67
  165. package/dist/index-Bv4MBLQ5.js +0 -52
  166. package/dist/index-hbyCVNa7.js +0 -30289
  167. package/dist/membership-CfredTm3.js +0 -255
  168. package/dist/objectid-Dg4ZodlT.js +0 -145
  169. package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
  170. package/dist/vue-i18n-BcYh6_51.js +0 -2365
@@ -1,97 +0,0 @@
1
- var g = Object.defineProperty;
2
- var b = (s, e, o) => e in s ? g(s, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : s[e] = o;
3
- var d = (s, e, o) => b(s, typeof e != "symbol" ? e + "" : e, o);
4
- import { u as a, w as f } from "./xlsx-h4G1C-xj.js";
5
- import { u as h } from "./loading-CSXr0Yqz.js";
6
- import { h as x } from "./moment-D7p2TMB-.js";
7
- import { m as w } from "./index-Bf6jNZit.js";
8
- class y {
9
- constructor() {
10
- d(this, "records", []);
11
- }
12
- addRecord(e) {
13
- this.records.push(e);
14
- }
15
- addRecords(e) {
16
- this.records.push(...e);
17
- }
18
- buildExcel() {
19
- const e = a.json_to_sheet(this.records), o = a.book_new();
20
- return a.book_append_sheet(o, e, "Sheet1"), o;
21
- }
22
- }
23
- class k extends y {
24
- }
25
- const r = {
26
- sortBy: "_id",
27
- descending: !1,
28
- rowsPerPage: 1e3,
29
- page: 1,
30
- rowsNumber: 0
31
- }, { minor: _ } = h;
32
- async function S({
33
- exporter: s,
34
- readFunction: e,
35
- transformRecord: o,
36
- filename: t
37
- }) {
38
- const c = (await e({
39
- limit: 1,
40
- skip: 0,
41
- sortBy: r.sortBy,
42
- descending: r.descending
43
- })).meta.totalResources ?? 0, n = r.rowsPerPage;
44
- await _(
45
- async () => {
46
- for (let i = 0; i < c; i += n) {
47
- const m = {
48
- ...r,
49
- limit: n,
50
- skip: r.page - 1,
51
- sortBy: r.sortBy,
52
- descending: r.descending
53
- }, p = await e(m);
54
- for (const l of p.resources) {
55
- const u = o(l);
56
- s.addRecord(u);
57
- }
58
- r.page++;
59
- }
60
- await f(
61
- s.buildExcel(),
62
- `${t}-${(/* @__PURE__ */ new Date()).toISOString()}.xlsx`,
63
- {
64
- bookType: "xlsx",
65
- bookSST: !1,
66
- type: "array"
67
- }
68
- ), r.page = 1;
69
- },
70
- {
71
- message: `Exporting ${t}...`,
72
- successMessage: `${t} exported successfully`
73
- }
74
- );
75
- }
76
- async function E() {
77
- return S({
78
- exporter: new k(),
79
- readFunction: w.readCards,
80
- transformRecord: (s) => {
81
- var e, o;
82
- return {
83
- CardNumber: s.serialNumber || "",
84
- MemberId: ((e = s.pf_member) == null ? void 0 : e._id.toString()) || "",
85
- Phone: ((o = s.pf_member) == null ? void 0 : o.phoneNumber) || "",
86
- RedeemedAt: s.redeemedAt ? x(s.redeemedAt).format("DD/MM/YYYY") : ""
87
- };
88
- },
89
- filename: "cards"
90
- });
91
- }
92
- export {
93
- y as B,
94
- k as C,
95
- E as a,
96
- S as e
97
- };
@@ -1,85 +0,0 @@
1
- import { g as n, S as w, u as _, b as y } from "./index-HXiYGO4_.js";
2
- const r = () => {
3
- if (!w.getBusinessId()) throw new Error("Invalid business ID");
4
- return _("users");
5
- }, a = () => {
6
- const e = w.getBusinessId();
7
- if (!e) throw new Error("Invalid business ID");
8
- return y(`businesses/${e}/membership`, {
9
- noIdRequired: !0
10
- });
11
- }, C = (e) => {
12
- var s, t, c, o, i, u, p, m, d, l, b, I;
13
- return {
14
- ...e,
15
- collection_TIER_0_balance: ((c = (t = (s = e.collection) == null ? void 0 : s.TIER) == null ? void 0 : t[0]) == null ? void 0 : c.balance) ?? 0,
16
- collection_CREDIT_0_balance: ((u = (i = (o = e.collection) == null ? void 0 : o.CREDIT) == null ? void 0 : i[0]) == null ? void 0 : u.balance) ?? 0,
17
- collection_COIN_0_balance: ((d = (m = (p = e.collection) == null ? void 0 : p.COIN) == null ? void 0 : m[0]) == null ? void 0 : d.balance) ?? 0,
18
- collection_TITLE_0_title: ((I = (b = (l = e.collection) == null ? void 0 : l.TITLE) == null ? void 0 : b[0]) == null ? void 0 : I.title) ?? ""
19
- };
20
- }, E = {
21
- async read(e) {
22
- const s = n(
23
- await r().get("", { params: e })
24
- ), t = s.resources.map(C);
25
- return {
26
- meta: s.meta,
27
- resources: t
28
- };
29
- },
30
- async readCursor(e) {
31
- const s = n(
32
- await r().get("cursor", { params: e })
33
- ), t = s.resources.map(C);
34
- return {
35
- meta: s.meta,
36
- resources: t
37
- };
38
- },
39
- async readById(e) {
40
- return n(await r().get(`${e}`));
41
- },
42
- async sendCredit(e, s) {
43
- return n(
44
- await a().post(
45
- `members/${e}/send-credit`,
46
- s
47
- )
48
- );
49
- },
50
- async deductCredit(e, s) {
51
- return n(
52
- await a().post(
53
- `members/${e}/deduct-credit`,
54
- s
55
- )
56
- );
57
- },
58
- async sendCoin(e, s) {
59
- return n(
60
- await a().post(
61
- `members/${e}/send-coin`,
62
- s
63
- )
64
- );
65
- },
66
- async deductCoin(e, s) {
67
- return n(
68
- await a().post(
69
- `members/${e}/deduct-coin`,
70
- s
71
- )
72
- );
73
- },
74
- async updateMember(e, s) {
75
- return n(
76
- await r().put(`${e}`, s)
77
- );
78
- },
79
- async import(e) {
80
- return await r().post("import", e);
81
- }
82
- };
83
- export {
84
- E as m
85
- };
@@ -1,67 +0,0 @@
1
- import { g as a, a as n, S as c, b as o } from "./index-HXiYGO4_.js";
2
- const t = () => {
3
- const s = c.getBusinessId();
4
- if (!s) throw new Error("Invalid business ID");
5
- return o(`businesses/${s}/transactions`, {
6
- noIdRequired: !0
7
- });
8
- }, p = {
9
- async readAll(s, e) {
10
- const r = a(
11
- await t().get("", {
12
- params: { ...s, ...e }
13
- })
14
- );
15
- return {
16
- meta: r.meta,
17
- resources: r.resources
18
- };
19
- },
20
- async readAllCursor(s, e) {
21
- const r = a(
22
- await t().get("cursor", {
23
- params: { ...s, ...e }
24
- })
25
- );
26
- return {
27
- meta: r.meta,
28
- resources: r.resources
29
- };
30
- },
31
- async readStoreTransactions(s, e) {
32
- const r = a(
33
- await t().get("/store", {
34
- params: { ...s, ...e }
35
- })
36
- );
37
- return {
38
- meta: r.meta,
39
- resources: r.resources
40
- };
41
- },
42
- async readBills(s, e, r) {
43
- return (await n("").get(
44
- `/restaurants/${s}/receipt?start=${e}&end=${r}`
45
- )).data;
46
- },
47
- async readPurchaseCountByMember(s) {
48
- return a(
49
- await t().get(`/store/${s}`)
50
- );
51
- },
52
- async readTransactionsByBill(s, e) {
53
- return a(
54
- await t().get(`/bill/${s}`, {
55
- params: e
56
- })
57
- );
58
- },
59
- async revertTransaction(s) {
60
- return a(
61
- await t().post("/revert", s)
62
- );
63
- }
64
- };
65
- export {
66
- p as t
67
- };
@@ -1,52 +0,0 @@
1
- import { g as n, S as r, b as c } from "./index-HXiYGO4_.js";
2
- const o = (e = "") => {
3
- const s = r.getBusinessId();
4
- if (!s) throw new Error("Invalid business ID");
5
- return c(`businesses/${s}/${e}`);
6
- }, g = {
7
- async listReviews(e) {
8
- const s = await o("reviews").get("", { params: e });
9
- return n(s);
10
- },
11
- async getSource() {
12
- const e = await o("reviews/config").get("");
13
- return n(e);
14
- },
15
- async connectGoogle(e, s, t) {
16
- const a = await o("reviews/config/google").post("", {
17
- code: e,
18
- redirectUri: s,
19
- state: t
20
- });
21
- return n(a);
22
- },
23
- async updateGoogleLocations(e) {
24
- const s = await o("reviews/config/google/locations").put("", { locations: e });
25
- return n(s);
26
- },
27
- async syncGoogleReviews() {
28
- const e = await o("reviews/config/google/sync").post("", {});
29
- return n(e);
30
- },
31
- async connectFacebook(e) {
32
- const s = await o("reviews/config/facebook").post("", { token: e });
33
- return n(s);
34
- },
35
- async updateFacebookPages(e) {
36
- const s = await o("reviews/config/facebook/pages").put("", { pages: e });
37
- return n(s);
38
- },
39
- async syncFacebookReviews() {
40
- const e = await o("reviews/config/facebook/sync").post("", {});
41
- return n(e);
42
- },
43
- async getOauthUrl(e, s) {
44
- const t = await o(`reviews/config/${e}/oauth`).get("", {
45
- params: { redirectUri: s }
46
- });
47
- return n(t);
48
- }
49
- };
50
- export {
51
- g as r
52
- };