@feedmepos/mf-connect 0.1.98-beta.5 → 0.1.98-beta.51

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 (140) hide show
  1. package/dist/{App-D_4snNiy.js → App-JV2uNrvu.js} +812 -666
  2. package/dist/{AuditLogs-KQU1O9_9.js → AuditLogs-DIIFx72_.js} +12 -11
  3. package/dist/{Bin-gp_uuNrE.js → Bin-CZhEKQu2.js} +8 -8
  4. package/dist/{Broadcast-CbBaOlnn.js → Broadcast-BcZkno6J.js} +39 -36
  5. package/dist/CampaignAnalytic-CAia4i9S.js +1826 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-2bro245w.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-L8SJYjBW.js} +7 -5
  7. package/dist/Card-TKD4-Xso.js +1060 -0
  8. package/dist/{Collections-CKeOHYZ4.js → Collections-VSwS8D6Q.js} +14 -13
  9. package/dist/Credit-CtHPSpAU.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bh2O4xdy.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-CbNDf9DU.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BIdb46VQ.js → EffectSheet.vue_vue_type_style_index_0_lang-BPebL492.js} +6 -6
  12. package/dist/{Experience-B-c5SMns.js → Experience-CWBJSMlx.js} +112 -86
  13. package/dist/{FileSaver.min-DWnvGKCg.js → FileSaver.min-BfTmJkbD.js} +1 -1
  14. package/dist/Game-DI4seuZN.js +356 -0
  15. package/dist/GiftCardSetup-Eb4z-3Tw.js +662 -0
  16. package/dist/{Grab-BLC4GcgE.js → Grab-QA8iuTIt.js} +32 -31
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-l2CmQ0nR.js → ImageInput.vue_vue_type_script_setup_true_lang-Kj2eGbhx.js} +1 -1
  18. package/dist/{Index-DmAG2skd.js → Index-q_mf4I2R.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-UmynGH00.js → LocationPicker.vue_vue_type_script_setup_true_lang-D-zdplq1.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-BThofu65.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DuF9Zazb.js} +1 -1
  21. package/dist/LoyaltyDashboard-DqLObGpI.js +2218 -0
  22. package/dist/MainLayout-R50g2-Xa.js +143 -0
  23. package/dist/{Marketing-DmY25Ri9.js → Marketing-BF4Xdneq.js} +7 -6
  24. package/dist/{MarketingMaterialEdit-DP9pba44.js → MarketingMaterialEdit-C1jbUUjo.js} +15 -14
  25. package/dist/Member-DJjiYJtn.js +630 -0
  26. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-BM9E0GyV.js +1287 -0
  27. package/dist/MemberImportHistory-Bkvm0Ez3.js +187 -0
  28. package/dist/MemberList-dKpMFozU.js +336 -0
  29. package/dist/{MemberTransactions-XRvUfeFB.js → MemberTransactions-Cekl-sXJ.js} +1 -1
  30. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-g7v3ZoUS.js → MessageInput.vue_vue_type_script_setup_true_lang-B0yGRUZI.js} +5434 -5279
  31. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  32. package/dist/Mission-DdK_5_F3.js +360 -0
  33. package/dist/Overview-DERmPhum.js +1316 -0
  34. package/dist/{Overview-DgmVlUVi.js → Overview-DMicUAtO.js} +21 -20
  35. package/dist/Point-9nbs-bQj.js +288 -0
  36. package/dist/Promotion-1J4rNVbl.js +423 -0
  37. package/dist/{Queue-DxtykwmI.js → Queue-C5HpvpfO.js} +13 -12
  38. package/dist/{Record-fLCi2Oyh.js → Record-DPWTZIZG.js} +9 -9
  39. package/dist/Review-BILLtfEs.js +45 -0
  40. package/dist/ReviewFacebookCallback-X5ZRII8-.js +238 -0
  41. package/dist/ReviewGoogleCallback-CsFpRPMM.js +213 -0
  42. package/dist/{Reward-BbdiCAiO.js → Reward-BZf4HyXc.js} +35 -35
  43. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Cfjtk46d.js → RewardGroup.vue_vue_type_script_setup_true_lang-c0K--Vka.js} +14 -13
  44. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CYEBeuQQ.js → RuleGroup.vue_vue_type_script_setup_true_lang-cP-U-lIJ.js} +17 -15
  45. package/dist/{Segment-EkGcR2jo.js → Segment-Bw2EFKGm.js} +31 -29
  46. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DND48RGu.js → SelectItems.vue_vue_type_script_setup_true_lang-Cc-T78sP.js} +2 -2
  47. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-sbYDSAFK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BAxkvdal.js} +37 -36
  48. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8RmLtRC.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DojnFmx5.js} +4 -4
  49. package/dist/{Setting-D3swsR6P.js → Setting-CcXr0dQ1.js} +14 -14
  50. package/dist/{SettingAdvertisements-BjhTK11W.js → SettingAdvertisements-CzuEpMOf.js} +12 -12
  51. package/dist/Settings-DiMD2NkY.js +230 -0
  52. package/dist/Store-dwl-jnTa.js +2615 -0
  53. package/dist/{StoreRewards-CyrWuwLi.js → StoreRewards-CWb9PKSE.js} +15 -15
  54. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-BUTYIDGo.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CbtrHjJP.js} +400 -455
  55. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DJQ022R4.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-044yoW2U.js} +2 -2
  56. package/dist/{Tier-DrPqr8_e.js → Tier-DWvwkylY.js} +44 -41
  57. package/dist/{Title-CaZtz98p.js → Title-DlU9gF0K.js} +49 -46
  58. package/dist/Transaction-Bc93xnBU.js +45 -0
  59. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BsBqk0Rs.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DetYg0Bb.js} +6 -6
  60. package/dist/{Voucher-BZcr4D0y.js → Voucher-BW14GJbe.js} +156 -133
  61. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DXQF3LZK.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DVLfWJi6.js} +12 -12
  62. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DI-tCQeb.js → ZodTextField.vue_vue_type_script_setup_true_lang-C4Vn9TNW.js} +2 -2
  63. package/dist/{app-B0vutEt5.js → app-CMP4JV-I.js} +7366 -6068
  64. package/dist/app.js +1 -1
  65. package/dist/{business-IZLJeLD-.js → business-KReNCbnK.js} +5 -5
  66. package/dist/{campaign-BPmgteCL.js → campaign-BRVpfKi1.js} +74 -96
  67. package/dist/campaign-DyuxGLq4.js +100 -0
  68. package/dist/{campaign.enum-BCdlLIt6.js → campaign.enum-BeZION80.js} +1 -1
  69. package/dist/{campaign.fn-BIFWlQvS.js → campaign.fn-2PEF3nkf.js} +92 -92
  70. package/dist/{collectible.enum-CiuAWn6_.js → collectible.enum-DYUFYht1.js} +1 -1
  71. package/dist/collection.fn-BID3ayar.js +26 -0
  72. package/dist/{duplicateCampaign-BouCkl9n.js → duplicateCampaign-C69iPr6Z.js} +2 -2
  73. package/dist/{effect-Cov_Xrar.js → effect-D1pc__Xy.js} +1 -1
  74. package/dist/{email-addresses-BiopO9xi.js → email-addresses-C9EZ-kvh.js} +2 -2
  75. package/dist/{export-DAPTBdHb.js → export-CosJDe69.js} +3 -3
  76. package/dist/google-C3S8u0mT.js +4 -0
  77. package/dist/{helper-ClFo4nAk.js → helper-D0fnLHuw.js} +1 -1
  78. package/dist/index-BCFh3XOm.js +896 -0
  79. package/dist/{index-BeK9AXvx.js → index-BDe4uGkM.js} +1 -1
  80. package/dist/index-BVsFibrm.js +53 -0
  81. package/dist/{index-k0hHOUBO.js → index-Bat7Iuv1.js} +579 -571
  82. package/dist/{index-N5t83KgP.js → index-BuoP8jTk.js} +1902 -2559
  83. package/dist/{index-k9DTOKkN.js → index-C-mhZhj-.js} +4 -1
  84. package/dist/{index-BZvvCPbP.js → index-C4IVNYKv.js} +5 -4
  85. package/dist/{index-CD_3hR1g.js → index-C8COBHo0.js} +1 -1
  86. package/dist/index-CeojsFkg.js +72 -0
  87. package/dist/{index-CmgQZKyo.js → index-CjS68_1M.js} +1 -1
  88. package/dist/{index-Bm5E2iD6.js → index-CtsuA8Yo.js} +14 -14
  89. package/dist/{index-DTSGYksR.js → index-DFXrFkyv.js} +281 -372
  90. package/dist/index-DRsMk331.js +51 -0
  91. package/dist/{index-pKdJ8574.js → index-DUg1krO0.js} +5 -5
  92. package/dist/{index-Kllafq_o.js → index-D_C0xupc.js} +105 -123
  93. package/dist/{index-C_AuIVay.js → index-HtrU57rF.js} +5 -5
  94. package/dist/index-mipq9GXC.js +151 -0
  95. package/dist/index-nweuFPTK.js +137 -0
  96. package/dist/{index.esm2017-ByFUnorr.js → index.esm2017-ArKRaPJJ.js} +164 -164
  97. package/dist/{loading-t4ygCIAa.js → loading-D_YeYrou.js} +1 -1
  98. package/dist/{lodash-DwGVChOs.js → lodash-BxQQlaBr.js} +1 -1
  99. package/dist/member-import-CAxFcEFz.js +187 -0
  100. package/dist/{membership-CMCTmRdh.js → membership-JcSqll6e.js} +3 -3
  101. package/dist/{money-MhQbdVIt.js → money-CE8VtExr.js} +1 -1
  102. package/dist/{number-klG94_wm.js → number-B1-SfLRP.js} +1 -1
  103. package/dist/objectid-CA1FNe-m.js +145 -0
  104. package/dist/{plugins-2py5EcqG.js → plugins-CnDONOZC.js} +3 -3
  105. package/dist/remy-Qz_pNsUS.js +13 -0
  106. package/dist/{reward-CE9z-Us7.js → reward-SXG2AxAb.js} +1 -1
  107. package/dist/{rule-BKNHxNrQ.js → rule-DoLHX3mM.js} +3 -3
  108. package/dist/rule-builder-dVImuRVj.js +126 -0
  109. package/dist/{template-C9yNa_0m.js → template-sTUnIE3A.js} +6 -6
  110. package/dist/timezone-B9h5PP8z.js +20 -0
  111. package/dist/transaction.fn-CkSLBsry.js +64 -0
  112. package/dist/{trigger-Dk0tAyDv.js → trigger-D6HMzMR1.js} +14 -14
  113. package/dist/useMarketingMaterialActions-D0W735D9.js +96 -0
  114. package/dist/{usePagination-cF1F_1NH.js → usePagination-TK7EqteI.js} +1 -1
  115. package/dist/{user-CNPPoxKh.js → user-l_0SFSlp.js} +1 -1
  116. package/dist/vue-i18n-CQAuV1i2.js +2365 -0
  117. package/dist/{xlsx-D3muGzk7.js → xlsx-BoOvRAl-.js} +1 -1
  118. package/dist/{zod-D72USJGr.js → zod-CDtseEbG.js} +1 -1
  119. package/package.json +5 -3
  120. package/dist/Card-P7MqKEDT.js +0 -910
  121. package/dist/Credit-Dp5P2k79.js +0 -260
  122. package/dist/Game-CNSbh93g.js +0 -330
  123. package/dist/LoyaltyDashboard-Go9ClMrp.js +0 -1082
  124. package/dist/MainLayout-Dyw9Qqvh.js +0 -41
  125. package/dist/Member-DKXzaqlL.js +0 -280
  126. package/dist/MemberList-BJ5nI3Nz.js +0 -1601
  127. package/dist/Mission-BvHArY3W.js +0 -334
  128. package/dist/Point-BR0R03i6.js +0 -262
  129. package/dist/Promotion-DofFeR2N.js +0 -397
  130. package/dist/Review-7tFJOnrt.js +0 -1076
  131. package/dist/ReviewFacebookCallback-yl0w_vF9.js +0 -243
  132. package/dist/ReviewGoogleCallback-Dn_aF2ZD.js +0 -208
  133. package/dist/Store-U1jysb7b.js +0 -1996
  134. package/dist/Transaction-Bj6bSo8R.js +0 -39
  135. package/dist/campaign-Cxp-DOCG.js +0 -219
  136. package/dist/index-BQ8XZk2Y.js +0 -85
  137. package/dist/index-KmCk2ksK.js +0 -52
  138. package/dist/objectid-C4ak1ctJ.js +0 -145
  139. package/dist/useMarketingMaterialActions-BiXkdMcs.js +0 -107
  140. package/dist/vue-i18n-Bk_KpCO_.js +0 -2365
@@ -1,128 +1,11 @@
1
- import { z as e, F as n, m, a as L } from "./index-C_AuIVay.js";
2
- import { B as x, C as D, E as w, G as A, H as g, I as T, J as G } from "./index-N5t83KgP.js";
3
- import { _ as M, l as H, a as F } from "./index-k0hHOUBO.js";
4
- import { i as p } from "./helper-ClFo4nAk.js";
5
- import { a as f } from "./index-pKdJ8574.js";
6
- function _(o, a) {
7
- let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
8
- const l = r.length;
9
- for (let c = 0; c < o; c++)
10
- i += r.charAt(Math.floor(Math.random() * l));
11
- return i;
12
- }
13
- function y(o) {
14
- return !o.property && "rules" in o;
15
- }
16
- function k(o) {
17
- return "property" in o && !!o.property;
18
- }
19
- const B = "g_schedule";
20
- function V(o) {
21
- return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
22
- `).trim();
23
- }
24
- function Y(o, a = !1) {
25
- const i = M.cloneDeep(o);
26
- if (k(i)) {
27
- const r = i.conditions;
28
- return !a && r && typeof r._rrule == "string" && (r._rrule = V(
29
- r._rrule
30
- )), i;
31
- }
32
- if (y(i))
33
- for (const r in i.rules) {
34
- const l = i.rules[r], c = a || y(l) && l.name === B;
35
- i.rules[r] = Y(
36
- l,
37
- c
38
- );
39
- }
40
- return i;
41
- }
42
- class t {
43
- static scaffoldGroup(a) {
44
- return {
45
- name: a ?? `g_${_(4)}`,
46
- rules: {},
47
- logic: ""
48
- };
49
- }
50
- static scaffoldEntry(a) {
51
- return {
52
- name: `r_${_(4)}`,
53
- property: a ?? "",
54
- conditions: {},
55
- negated: !1
56
- };
57
- }
58
- static constructEntry(a, i, r, l) {
59
- return {
60
- name: l ?? `e_${_(4)}`,
61
- property: a,
62
- conditions: {
63
- [i]: r
64
- },
65
- negated: !1
66
- };
67
- }
68
- static getLogic(a) {
69
- return (a.logic ?? "").includes("||") ? "||" : "&&";
70
- }
71
- static constructLogic(a, i) {
72
- const r = i ?? t.getLogic(a);
73
- return Object.entries(a.rules).map(([l, c]) => y(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
74
- }
75
- static setRuleToGroup(a, i, r) {
76
- let l = H.cloneDeep(a);
77
- return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
78
- l.rules[c.name] = c;
79
- }) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
80
- }
81
- static removeEntry(a, i, r) {
82
- const l = H.cloneDeep(a);
83
- return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
84
- }
85
- static constructRule(a) {
86
- switch (a.type) {
87
- case "timeframe": {
88
- const i = a.property, r = t.scaffoldGroup("timeframe"), l = [];
89
- return (a.start || a.end) && l.push(
90
- t.constructEntry(i, "_isBetween", {
91
- start: a.start || void 0,
92
- end: a.end || void 0
93
- })
94
- ), t.setRuleToGroup(r, l, "&&");
95
- }
96
- default:
97
- throw Error("invalid config type");
98
- }
99
- }
100
- static getRules(a) {
101
- return a && "rules" in a ? Object.values(a.rules) : [];
102
- }
103
- static simplify(a) {
104
- const [i] = Object.entries(a.conditions);
105
- return i[0], {
106
- property: a.property,
107
- operator: i[0],
108
- equator: i[1]
109
- };
110
- }
111
- static isRuleExceed(a, i) {
112
- const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
113
- if (l > 10)
114
- throw new K(10, l);
115
- return !0;
116
- }
117
- }
118
- class K extends Error {
119
- constructor(a, i) {
120
- super(
121
- `Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
122
- ), this.name = "MaxRulesExceededError";
123
- }
124
- }
125
- const W = {
1
+ import { z as e, F as a, m as i, b as U } from "./index-HtrU57rF.js";
2
+ import { y as P, z as j, A as J, B as r } from "./index-BuoP8jTk.js";
3
+ import { d as E } from "./index-Bat7Iuv1.js";
4
+ import { R as t } from "./rule-builder-dVImuRVj.js";
5
+ import { i as o } from "./helper-D0fnLHuw.js";
6
+ import { d as O } from "./index-BCFh3XOm.js";
7
+ import { F as d } from "./index-DUg1krO0.js";
8
+ const I = {
126
9
  collectionName: "AuditLogs",
127
10
  transform: {
128
11
  _id: "oid",
@@ -135,7 +18,7 @@ const W = {
135
18
  fromCollection: "Businesses"
136
19
  }
137
20
  }
138
- }, X = e.enum([
21
+ }, R = e.enum([
139
22
  "GET",
140
23
  "POST",
141
24
  "PUT",
@@ -144,7 +27,7 @@ const W = {
144
27
  "OPTIONS",
145
28
  "HEAD",
146
29
  "ALL"
147
- ]), q = e.enum([
30
+ ]), L = e.enum([
148
31
  "CAMPAIGN",
149
32
  "LOCATION",
150
33
  "MARKETING MATERIALS",
@@ -154,31 +37,31 @@ const W = {
154
37
  "SETTINGS",
155
38
  "SEGMENTATION",
156
39
  "USER"
157
- ]), Q = e.object({
158
- httpMethod: X,
40
+ ]), x = e.object({
41
+ httpMethod: R,
159
42
  url: e.string().min(1),
160
43
  userAgent: e.string(),
161
44
  host: e.string().min(1),
162
45
  params: e.object({}).passthrough().nullish(),
163
46
  query: e.object({}).passthrough().nullish(),
164
47
  body: e.object({}).passthrough().nullish()
165
- }), $ = e.object({
48
+ }), D = e.object({
166
49
  statusCode: e.number().int().min(100).max(599),
167
50
  body: e.object({}).passthrough().nullish()
168
51
  });
169
52
  e.object({
170
- _id: n,
53
+ _id: a,
171
54
  user: e.string().length(28),
172
55
  userName: e.string().min(1),
173
- userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
174
- moduleType: q,
175
- business: n.nullish(),
56
+ userPhoneNumber: e.string().refine((n) => P(n)).nullish(),
57
+ moduleType: L,
58
+ business: a.nullish(),
176
59
  clientIp: e.string().nullish(),
177
60
  timestamp: e.string().datetime(),
178
- request: Q,
179
- response: $
180
- }).describe(m.describe(W));
181
- const We = {
61
+ request: x,
62
+ response: D
63
+ }).describe(i.describe(I));
64
+ const De = {
182
65
  PROMOTION: {
183
66
  name: "Promotion Template",
184
67
  description: "Promotion template for campaign creation.",
@@ -584,7 +467,7 @@ const We = {
584
467
  // },
585
468
  hideInApp: !0
586
469
  },
587
- configs: p("VOUCHER", {
470
+ configs: o("VOUCHER", {
588
471
  name: "",
589
472
  business: null,
590
473
  noCampaign: !1
@@ -1529,7 +1412,7 @@ const We = {
1529
1412
  rewards: []
1530
1413
  }
1531
1414
  },
1532
- configs: p("GAME", {
1415
+ configs: o("GAME", {
1533
1416
  name: "Token",
1534
1417
  business: null,
1535
1418
  noCampaign: !1
@@ -1770,7 +1653,7 @@ const We = {
1770
1653
  type: "timeframe"
1771
1654
  }
1772
1655
  },
1773
- configs: p("STAMP", {
1656
+ configs: o("STAMP", {
1774
1657
  business: null,
1775
1658
  noCampaign: !1
1776
1659
  })
@@ -1943,20 +1826,20 @@ const We = {
1943
1826
  }
1944
1827
  }
1945
1828
  };
1946
- t.scaffoldGroup(), p("STAMP", {
1829
+ t.scaffoldGroup(), o("STAMP", {
1947
1830
  business: null,
1948
1831
  noCampaign: !1
1949
1832
  });
1950
1833
  ({
1951
1834
  ...t.scaffoldGroup()
1952
- }, p("VOUCHER", {
1835
+ }, o("VOUCHER", {
1953
1836
  name: "",
1954
1837
  business: null,
1955
1838
  noCampaign: !1
1956
1839
  }));
1957
1840
  ({
1958
1841
  ...t.scaffoldGroup()
1959
- }, p("VOUCHER", {
1842
+ }, o("VOUCHER", {
1960
1843
  name: "",
1961
1844
  business: null,
1962
1845
  noCampaign: !1
@@ -2012,7 +1895,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2012
1895
  });
2013
1896
  ({
2014
1897
  ...t.scaffoldGroup()
2015
- }, p("VOUCHER", {
1898
+ }, o("VOUCHER", {
2016
1899
  name: "",
2017
1900
  business: null,
2018
1901
  noCampaign: !1
@@ -2058,14 +1941,14 @@ t.setRuleToGroup(
2058
1941
  "&&"
2059
1942
  )
2060
1943
  );
2061
- t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
1944
+ t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
2062
1945
  name: "Token",
2063
1946
  business: null,
2064
1947
  noCampaign: !1
2065
1948
  });
2066
1949
  ({
2067
1950
  ...t.scaffoldGroup()
2068
- }, p("VOUCHER", {
1951
+ }, o("VOUCHER", {
2069
1952
  name: "",
2070
1953
  business: null,
2071
1954
  noCampaign: !1
@@ -2094,7 +1977,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2094
1977
  ],
2095
1978
  "&&"
2096
1979
  )
2097
- ]), p("VOUCHER", {
1980
+ ]), o("VOUCHER", {
2098
1981
  name: "",
2099
1982
  business: null,
2100
1983
  noCampaign: !1
@@ -2117,7 +2000,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2117
2000
  ({
2118
2001
  ...t.scaffoldGroup()
2119
2002
  });
2120
- const Z = e.enum([
2003
+ const w = e.enum([
2121
2004
  "MEMBER_REWARD",
2122
2005
  "PAID_LOYALTY",
2123
2006
  "COLLECT_FEEDBACK",
@@ -2127,7 +2010,7 @@ const Z = e.enum([
2127
2010
  "BROADCAST",
2128
2011
  "BIRTHDAY",
2129
2012
  "GAME"
2130
- ]), ee = e.enum([
2013
+ ]), A = e.enum([
2131
2014
  "text",
2132
2015
  "number",
2133
2016
  "textarea",
@@ -2157,114 +2040,114 @@ const Z = e.enum([
2157
2040
  "grab_effect",
2158
2041
  "grab_quota",
2159
2042
  "grab_conditions"
2160
- ]), te = e.object({
2043
+ ]), F = e.object({
2161
2044
  label: e.string().optional(),
2162
2045
  label_locale: e.record(e.string()).nullish(),
2163
2046
  property: e.string().or(e.any()),
2164
- type: ee,
2047
+ type: A,
2165
2048
  extras: e.string().optional(),
2166
2049
  isRuleChildren: e.boolean().optional()
2167
- }), z = e.object({
2050
+ }), h = e.object({
2168
2051
  not: e.boolean().optional(),
2169
2052
  property: e.string(),
2170
2053
  value: e.any()
2171
- }), ae = e.object({
2054
+ }), G = e.object({
2172
2055
  name: e.string().optional(),
2173
2056
  name_locale: e.record(e.string()).nullish(),
2174
- fields: e.array(te),
2175
- condition: z.optional().or(
2176
- e.array(z)
2057
+ fields: e.array(F),
2058
+ condition: h.optional().or(
2059
+ e.array(h)
2177
2060
  )
2178
- }), ne = e.object({
2061
+ }), M = e.object({
2179
2062
  name: e.string(),
2180
2063
  name_locale: e.record(e.string()).nullish(),
2181
- groups: e.array(ae)
2064
+ groups: e.array(G)
2182
2065
  });
2183
2066
  e.object({
2184
- _id: n,
2067
+ _id: a,
2185
2068
  name: e.string(),
2186
2069
  name_locale: e.record(e.string()).nullish(),
2187
2070
  description: e.string().nullish(),
2188
2071
  description_locale: e.record(e.string()).nullish(),
2189
- steps: e.array(ne).min(1),
2190
- intention: e.array(Z),
2072
+ steps: e.array(M).min(1),
2073
+ intention: e.array(w),
2191
2074
  defaultValue: e.any()
2192
2075
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
2193
- const oe = {
2076
+ const k = {
2194
2077
  collectionName: "Businesses",
2195
2078
  transform: {
2196
2079
  _id: "oid"
2197
2080
  }
2198
2081
  };
2199
2082
  e.object({
2200
- _id: n,
2083
+ _id: a,
2201
2084
  ownerId: e.string(),
2202
2085
  name: e.string(),
2203
2086
  credit: e.number(),
2204
2087
  forceSend: e.boolean().optional()
2205
- }).describe(m.describe(oe));
2206
- const v = e.enum(["PHONE"]), ie = e.enum([
2088
+ }).describe(i.describe(k));
2089
+ const y = e.enum(["PHONE"]), B = e.enum([
2207
2090
  "MOCEAN",
2208
2091
  "SLACK",
2209
2092
  "SMS",
2210
2093
  "EMAIL",
2211
2094
  "WHATSAPP"
2212
- ]), le = e.enum(["PENDING", "COMPLETED", "FAILED"]), re = e.enum([
2095
+ ]), V = e.enum(["PENDING", "COMPLETED", "FAILED"]), Y = e.enum([
2213
2096
  "General",
2214
2097
  "Otp",
2215
2098
  "Marketing",
2216
2099
  "Ordering",
2217
2100
  "MemberInvitation",
2218
2101
  "MarketingPromotion"
2219
- ]), ce = e.object({
2220
- type: v
2221
- }), S = ce.extend({
2222
- type: e.literal(v.enum.PHONE),
2223
- provider: ie,
2224
- usage: re.optional()
2225
- }), pe = {
2102
+ ]), K = e.object({
2103
+ type: y
2104
+ }), f = K.extend({
2105
+ type: e.literal(y.enum.PHONE),
2106
+ provider: B,
2107
+ usage: Y.optional()
2108
+ }), W = {
2226
2109
  collectionName: "Notifications",
2227
2110
  transform: { _id: "oid", business: "oid" }
2228
2111
  };
2229
2112
  e.object({
2230
- _id: n,
2231
- business: n,
2113
+ _id: a,
2114
+ business: a,
2232
2115
  target: e.string(),
2233
2116
  title: e.string().optional(),
2234
2117
  message: e.string(),
2235
- option: S,
2236
- status: le,
2118
+ option: f,
2119
+ status: V,
2237
2120
  ref: e.string().optional()
2238
- }).describe(m.describe(pe));
2239
- const me = e.object({
2121
+ }).describe(i.describe(W));
2122
+ const q = e.object({
2240
2123
  target: e.string(),
2241
2124
  title: e.string().optional(),
2242
2125
  message: e.string(),
2243
- option: S,
2126
+ option: f,
2244
2127
  ref: e.string().optional()
2245
2128
  });
2246
2129
  e.object({
2247
2130
  campaignId: e.string(),
2248
- notification: me,
2131
+ notification: q,
2249
2132
  business: e.string()
2250
2133
  });
2251
2134
  e.object({
2252
2135
  phone: e.string(),
2253
2136
  message: e.string()
2254
2137
  });
2255
- const C = e.object({
2138
+ const _ = e.object({
2256
2139
  name: e.string().optional(),
2257
2140
  address: e.string()
2258
- }), se = e.object({
2141
+ }), X = e.object({
2259
2142
  filename: e.string(),
2260
2143
  content: e.instanceof(Uint8Array)
2261
2144
  });
2262
2145
  e.object({
2263
- from: C.optional(),
2264
- to: e.array(C),
2146
+ from: _.optional(),
2147
+ to: e.array(_),
2265
2148
  subject: e.string(),
2266
2149
  html: e.string().optional(),
2267
- attachments: e.array(se).optional()
2150
+ attachments: e.array(X).optional()
2268
2151
  });
2269
2152
  e.object({
2270
2153
  subject: e.string(),
@@ -2304,7 +2187,7 @@ e.object({
2304
2187
  billId: e.string()
2305
2188
  });
2306
2189
  e.object({
2307
- amount: L,
2190
+ amount: U,
2308
2191
  member: e.string(),
2309
2192
  bill: e.string(),
2310
2193
  otp: e.string().nullish(),
@@ -2313,15 +2196,15 @@ e.object({
2313
2196
  e.object({
2314
2197
  orderId: e.string()
2315
2198
  });
2316
- var N = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(N || {});
2317
- e.nativeEnum(N);
2199
+ var b = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(b || {});
2200
+ e.nativeEnum(b);
2318
2201
  e.enum(["manage", "create", "read", "update", "delete"]);
2319
2202
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2320
2203
  e.enum(["quota"]);
2321
- var U = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(U || {});
2322
- e.nativeEnum(U);
2204
+ var H = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(H || {});
2205
+ e.nativeEnum(H);
2323
2206
  e.enum(["restaurant"]);
2324
- const ge = e.object({
2207
+ const Q = e.object({
2325
2208
  label: e.string(),
2326
2209
  subject: e.union([e.string(), e.array(e.string())]),
2327
2210
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2331,41 +2214,41 @@ const ge = e.object({
2331
2214
  reason: e.string().optional()
2332
2215
  });
2333
2216
  e.object({
2334
- _id: n,
2217
+ _id: a,
2335
2218
  businessId: e.string(),
2336
2219
  userId: e.string(),
2337
2220
  email: e.string().nullish(),
2338
2221
  phoneNo: e.string().nullish(),
2339
- permissions: e.array(e.lazy(() => ge))
2222
+ permissions: e.array(e.lazy(() => Q))
2340
2223
  }).describe(
2341
- m.describe({
2224
+ i.describe({
2342
2225
  collectionName: "PermissionUsers",
2343
2226
  transform: {
2344
2227
  _id: "oid"
2345
2228
  }
2346
2229
  })
2347
2230
  );
2348
- const P = e.object({
2231
+ const z = e.object({
2349
2232
  userId: e.string(),
2350
2233
  level: e.number(),
2351
2234
  role: e.string().optional(),
2352
2235
  businessId: e.string().optional(),
2353
2236
  restaurantId: e.string().optional()
2354
- }), de = e.function().args(e.any(), P).returns(e.boolean()), ue = e.function().args(P).returns(e.promise(e.array(e.any())));
2237
+ }), Z = e.function().args(e.any(), z).returns(e.boolean()), $ = e.function().args(z).returns(e.promise(e.array(e.any())));
2355
2238
  e.object({
2356
- isAdmin: de,
2357
- getRules: ue
2239
+ isAdmin: Z,
2240
+ getRules: $
2358
2241
  });
2359
2242
  e.object({
2360
- transactions: e.array(D),
2361
- collections: e.array(w)
2243
+ transactions: e.array(j),
2244
+ collections: e.array(J)
2362
2245
  });
2363
- const j = e.enum([
2246
+ const C = e.enum([
2364
2247
  "ROCK_PAPER_SCISSOR"
2365
2248
  ]);
2366
- j.enum.ROCK_PAPER_SCISSOR + "";
2249
+ C.enum.ROCK_PAPER_SCISSOR + "";
2367
2250
  e.object({
2368
- type: j
2251
+ type: C
2369
2252
  });
2370
2253
  e.object({
2371
2254
  host: e.string().url(),
@@ -2374,7 +2257,7 @@ e.object({
2374
2257
  roomId: e.string()
2375
2258
  });
2376
2259
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
2377
- const he = {
2260
+ const ee = {
2378
2261
  collectionName: "MarketingMaterials",
2379
2262
  transform: {
2380
2263
  _id: "oid",
@@ -2382,13 +2265,13 @@ const he = {
2382
2265
  }
2383
2266
  };
2384
2267
  e.object({
2385
- _id: n,
2386
- business: n,
2268
+ _id: a,
2269
+ business: a,
2387
2270
  imageUrl: e.string().url(),
2388
2271
  headline: e.string(),
2389
2272
  caption: e.string(),
2390
2273
  editedAt: e.coerce.date()
2391
- }).describe(m.describe(he));
2274
+ }).describe(i.describe(ee));
2392
2275
  e.object({
2393
2276
  id: e.number(),
2394
2277
  name: e.string(),
@@ -2408,12 +2291,12 @@ e.object({
2408
2291
  phone: e.string().optional(),
2409
2292
  email: e.string().optional()
2410
2293
  });
2411
- const _e = e.enum([
2294
+ const te = e.enum([
2412
2295
  "PENDING",
2413
2296
  "SUCCESS",
2414
2297
  "FAILED",
2415
2298
  "RETRYING"
2416
- ]), ye = {
2299
+ ]), ae = {
2417
2300
  collectionName: "WebhookLogs",
2418
2301
  transform: {
2419
2302
  _id: "oid",
@@ -2421,39 +2304,39 @@ const _e = e.enum([
2421
2304
  }
2422
2305
  };
2423
2306
  e.object({
2424
- _id: n,
2425
- business: n,
2307
+ _id: a,
2308
+ business: a,
2426
2309
  type: e.string(),
2427
2310
  payload: e.record(e.any()),
2428
- status: _e,
2311
+ status: te,
2429
2312
  response: e.any().optional(),
2430
2313
  error: e.string().optional()
2431
- }).describe(m.describe(ye));
2432
- const fe = e.enum(["AUTO", "MANUAL"]);
2314
+ }).describe(i.describe(ae));
2315
+ const ne = e.enum(["AUTO", "MANUAL"]);
2433
2316
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2434
- const J = e.object({
2435
- _id: n,
2317
+ const T = e.object({
2318
+ _id: a,
2436
2319
  name: e.string().min(1, "Name is required").max(50),
2437
- type: fe,
2438
- event: A.optional()
2439
- }), be = e.object({
2320
+ type: ne,
2321
+ event: O.optional()
2322
+ }), oe = e.object({
2440
2323
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2441
2324
  to: e.number().int("Must be integer").nullish()
2442
- }).superRefine((o, a) => {
2443
- o.from && o.to && o.from > o.to && a.addIssue({
2325
+ }).superRefine((n, N) => {
2326
+ n.from && n.to && n.from > n.to && N.addIssue({
2444
2327
  code: "custom",
2445
2328
  message: "Max referral count must be more than min referral count"
2446
2329
  });
2447
- }), He = e.object({
2448
- threshold: be,
2449
- rewards: e.array(n),
2450
- pf_reward: e.array(f).optional()
2451
- }), b = e.object({
2330
+ }), ie = e.object({
2331
+ threshold: oe,
2332
+ rewards: e.array(a),
2333
+ pf_reward: e.array(d).optional()
2334
+ }), u = e.object({
2452
2335
  id: e.string(),
2453
2336
  name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2454
- rule: F.optional(),
2455
- rewards: e.array(He)
2456
- }), ze = {
2337
+ rule: E.optional(),
2338
+ rewards: e.array(ie)
2339
+ }), le = {
2457
2340
  collectionName: "ReferralRecords",
2458
2341
  transform: {
2459
2342
  _id: "oid",
@@ -2462,25 +2345,25 @@ const J = e.object({
2462
2345
  referee: "oid",
2463
2346
  refereeReward: "oid"
2464
2347
  }
2465
- }, Ce = e.object({
2348
+ }, re = e.object({
2466
2349
  completedAt: e.coerce.date(),
2467
- criteria: n,
2350
+ criteria: a,
2468
2351
  ref: e.string()
2469
- }), Te = e.object({
2470
- _id: n,
2471
- business: n,
2472
- referer: n,
2473
- referee: n,
2474
- criteria: e.array(J),
2475
- reward: e.array(b),
2476
- refereeReward: e.array(n).optional(),
2477
- criteria_progress: e.array(Ce),
2352
+ }), ce = e.object({
2353
+ _id: a,
2354
+ business: a,
2355
+ referer: a,
2356
+ referee: a,
2357
+ criteria: e.array(T),
2358
+ reward: e.array(u),
2359
+ refereeReward: e.array(a).optional(),
2360
+ criteria_progress: e.array(re),
2478
2361
  status: e.string(),
2479
- pf_referer: g.optional(),
2480
- pf_referee: g.optional(),
2481
- pf_refereeReward: e.array(f).optional()
2482
- }).describe(m.describe(ze));
2483
- Te.pick({
2362
+ pf_referer: r.optional(),
2363
+ pf_referee: r.optional(),
2364
+ pf_refereeReward: e.array(d).optional()
2365
+ }).describe(i.describe(le));
2366
+ ce.pick({
2484
2367
  _id: !0,
2485
2368
  business: !0,
2486
2369
  referer: !0,
@@ -2488,79 +2371,83 @@ Te.pick({
2488
2371
  criteria_progress: !0,
2489
2372
  criteria: !0
2490
2373
  }).extend({
2491
- pf_referee: g.pick({
2374
+ pf_referee: r.pick({
2492
2375
  _id: !0,
2493
2376
  name: !0,
2494
2377
  phoneNumber: !0,
2495
2378
  photoUrl: !0
2496
2379
  })
2497
2380
  });
2498
- const ve = {
2381
+ const pe = {
2499
2382
  collectionName: "ReferralProgram",
2500
2383
  transform: {
2501
2384
  _id: "oid",
2502
2385
  business: "oid"
2503
2386
  }
2504
- }, E = e.object({
2505
- _id: n,
2506
- business: n,
2387
+ }, v = e.object({
2388
+ _id: a,
2389
+ business: a,
2507
2390
  term_and_condition: e.string().optional(),
2508
- refereeReward: e.array(n).optional(),
2509
- reward: e.array(b),
2510
- criteria: e.array(J)
2511
- }).describe(m.describe(ve));
2391
+ refereeReward: e.array(a).optional(),
2392
+ reward: e.array(u),
2393
+ criteria: e.array(T)
2394
+ }).describe(i.describe(pe));
2512
2395
  e.object({
2513
- referer: n,
2514
- referee: n,
2515
- business: n
2396
+ referer: a,
2397
+ referee: a,
2398
+ business: a
2516
2399
  });
2517
2400
  e.object({
2518
- program: E.pick({
2401
+ program: v.pick({
2519
2402
  _id: !0,
2520
2403
  business: !0,
2521
2404
  term_and_condition: !0
2522
2405
  }).extend({
2523
- reward: b.optional(),
2524
- pf_refereeReward: e.array(f).optional()
2406
+ reward: u.optional(),
2407
+ pf_refereeReward: e.array(d).optional()
2525
2408
  }),
2526
2409
  referralCount: e.number(),
2527
2410
  successReferralCount: e.number(),
2528
- referredBy: g.pick({
2411
+ referredBy: r.pick({
2529
2412
  _id: !0,
2530
2413
  name: !0,
2531
2414
  phoneNumber: !0,
2532
2415
  photoUrl: !0
2533
2416
  }).optional()
2534
2417
  });
2535
- E.extend({
2418
+ v.extend({
2536
2419
  updateReferralRecord: e.boolean().optional()
2537
2420
  });
2538
- const Se = e.object({
2421
+ const me = e.object({
2539
2422
  facebookPageId: e.string(),
2540
2423
  pageName: e.string(),
2541
2424
  pageProfileImageUrl: e.string(),
2542
2425
  pageAccessToken: e.string().optional(),
2543
- locationIds: e.array(n)
2544
- }), Ne = e.object({
2545
- locationId: n.nullable(),
2426
+ locationIds: e.array(a)
2427
+ }), se = e.object({
2428
+ locationId: a.nullable(),
2546
2429
  googleLocationName: e.string(),
2547
2430
  displayName: e.string().optional()
2548
- }), Ue = e.object({
2431
+ }), ge = e.object({
2549
2432
  accessToken: e.string().nullable(),
2550
2433
  refreshToken: e.string().nullable(),
2551
2434
  accessTokenExpiresAt: e.date().nullable(),
2552
- locations: e.array(Ne)
2553
- }), Pe = e.object({
2435
+ locations: e.array(se),
2436
+ lastSyncTime: e.coerce.date().nullish(),
2437
+ syncFrequency: e.number().int().min(1).max(30).default(30)
2438
+ }), de = e.object({
2554
2439
  token: e.string().nullable(),
2555
- pages: e.array(Se)
2440
+ pages: e.array(me),
2441
+ lastSyncTime: e.coerce.date().nullish(),
2442
+ syncFrequency: e.number().int().min(1).max(30).default(30)
2556
2443
  });
2557
2444
  e.object({
2558
- _id: n,
2559
- businessId: n,
2560
- google: Ue.nullable(),
2561
- facebook: Pe.nullable()
2445
+ _id: a,
2446
+ businessId: a,
2447
+ google: ge.nullable(),
2448
+ facebook: de.nullable()
2562
2449
  }).describe(
2563
- m.describe({
2450
+ i.describe({
2564
2451
  collectionName: "ReviewSourceConfig",
2565
2452
  transform: {
2566
2453
  _id: "oid",
@@ -2604,7 +2491,9 @@ e.object({
2604
2491
  displayName: e.string().optional(),
2605
2492
  locationId: e.string().nullable()
2606
2493
  })
2607
- )
2494
+ ),
2495
+ lastSyncTime: e.string().datetime().nullable(),
2496
+ syncFrequency: e.number().int().min(1).max(30)
2608
2497
  }).nullable(),
2609
2498
  facebook: e.object({
2610
2499
  token: e.string().nullable(),
@@ -2615,105 +2504,120 @@ e.object({
2615
2504
  pageProfileImageUrl: e.string(),
2616
2505
  locationIds: e.array(e.string())
2617
2506
  })
2618
- )
2507
+ ),
2508
+ lastSyncTime: e.string().datetime().nullable(),
2509
+ syncFrequency: e.number().int().min(1).max(30)
2619
2510
  }).nullable()
2620
2511
  });
2621
- const O = e.object({
2512
+ const c = e.object({
2622
2513
  name: e.string(),
2623
- pictureUrl: e.string()
2624
- }), je = O.extend({
2514
+ pictureUrl: e.string(),
2515
+ phoneNumber: e.string().optional()
2516
+ }), ue = c.extend({
2625
2517
  isAnonymous: e.boolean().optional()
2626
- }), Je = O.extend({
2518
+ }), he = c.extend({
2627
2519
  id: e.string().optional()
2628
- }), d = e.object({
2520
+ }), p = e.object({
2629
2521
  comment: e.string(),
2630
2522
  updateTime: e.coerce.date()
2631
- }), s = e.object({
2523
+ });
2524
+ e.object({
2525
+ comment: e.string().trim().min(1).max(4096)
2526
+ });
2527
+ const l = e.object({
2632
2528
  externalId: e.string().optional(),
2633
2529
  thumbnailUrl: e.string(),
2634
2530
  thumbnailLabel: e.string(),
2635
2531
  videoUrl: e.string().optional()
2636
- }), Ee = {
2532
+ }), _e = {
2637
2533
  collectionName: "Reviews",
2638
2534
  transform: {
2639
2535
  _id: "oid",
2536
+ businessId: "oid",
2640
2537
  reviewerId: "oid",
2641
- locationId: "oid"
2642
- },
2643
- lookups: {
2644
- reviewerId: {
2645
- as: "reviewer",
2646
- fromCollection: "UsersV2"
2647
- },
2648
- locationId: {
2649
- as: "location",
2650
- fromCollection: "Locations"
2651
- }
2538
+ restaurantId: "oid"
2652
2539
  }
2653
- }, I = e.enum([
2540
+ }, S = e.enum([
2654
2541
  "google",
2655
2542
  "facebook",
2656
2543
  "feedme",
2657
2544
  "feedvibe"
2658
2545
  ]);
2659
- I.options;
2546
+ S.options;
2660
2547
  e.enum(["google", "facebook"]);
2661
- const Oe = e.enum([
2548
+ const ye = e.enum([
2662
2549
  "createTime_desc",
2663
2550
  "createTime_asc",
2664
2551
  "rating_asc",
2665
2552
  "rating_desc"
2666
2553
  ]);
2667
2554
  e.object({
2668
- source: I.array().optional(),
2669
- dateFrom: e.coerce.date().optional(),
2670
- dateTo: e.coerce.date().optional(),
2555
+ source: S.array().optional(),
2556
+ dateFrom: e.string().datetime({ offset: !0 }).optional(),
2557
+ dateTo: e.string().datetime({ offset: !0 }).optional(),
2671
2558
  locationId: e.string().optional(),
2672
- sort: Oe.optional(),
2559
+ excludeDeleted: e.boolean().optional(),
2560
+ sort: ye.optional(),
2673
2561
  limit: e.coerce.number().int().positive().optional(),
2674
2562
  skip: e.coerce.number().int().min(0).optional()
2675
2563
  });
2676
- const R = e.object({
2564
+ const we = e.object({
2565
+ averageScore: e.number(),
2566
+ total: e.number().int().nonnegative(),
2567
+ starCounts: e.array(
2568
+ e.object({
2569
+ star: e.number().int().min(1).max(5),
2570
+ count: e.number().int().nonnegative()
2571
+ })
2572
+ )
2573
+ }), m = e.object({
2677
2574
  name: e.string(),
2678
- pictureUrl: e.string()
2679
- }), Ie = R.extend({
2575
+ pictureUrl: e.string().optional(),
2576
+ phoneNumber: e.string().optional()
2577
+ }), fe = m.extend({
2578
+ _id: e.string().optional()
2579
+ }), be = m.extend({
2580
+ _id: e.string()
2581
+ }), He = m.extend({
2680
2582
  isAnonymous: e.boolean().optional()
2681
- }), Re = R.extend({
2583
+ }), ze = m.extend({
2682
2584
  id: e.string().optional()
2683
- }), u = e.object({
2684
- _id: n,
2585
+ }), s = e.object({
2586
+ _id: a,
2685
2587
  comment: e.string(),
2686
2588
  createTime: e.coerce.date(),
2687
- updateTime: e.coerce.date().optional(),
2688
- locationId: n
2689
- }), Le = u.extend({
2589
+ updateTime: e.coerce.date().nullish(),
2590
+ restaurantId: a,
2591
+ restaurantName: e.string()
2592
+ }), Ce = s.extend({
2690
2593
  source: e.literal("google"),
2691
2594
  externalId: e.string().min(1),
2692
- reviewer: Ie.optional(),
2693
- reply: d.optional(),
2694
- mediaItems: e.array(s),
2595
+ translatedComment: e.string().optional(),
2596
+ reviewer: He.optional(),
2597
+ reply: p.optional(),
2598
+ mediaItems: e.array(l),
2695
2599
  starRating: e.number(),
2696
2600
  locationName: e.string(),
2697
- locationDisplayName: e.string()
2698
- }), xe = u.extend({
2601
+ locationDisplayName: e.string(),
2602
+ originalUrl: e.string().optional()
2603
+ }), Te = s.extend({
2699
2604
  source: e.literal("facebook"),
2700
2605
  externalId: e.string().min(1),
2701
- reviewer: Re.optional(),
2606
+ reviewer: ze.optional(),
2702
2607
  isPositive: e.boolean().optional(),
2703
2608
  pageId: e.string(),
2704
2609
  pageName: e.string()
2705
- }), De = u.extend({
2610
+ }), ve = s.extend({
2706
2611
  source: e.literal("feedme"),
2707
- reviewer: T,
2708
- reply: d.optional(),
2612
+ reviewer: fe.optional(),
2613
+ reply: p.optional(),
2709
2614
  starRating: e.number(),
2710
- location: G.optional(),
2711
- mediaItems: e.array(s),
2615
+ mediaItems: e.array(l),
2712
2616
  billId: e.string()
2713
- }), we = u.extend({
2617
+ }), Se = s.extend({
2714
2618
  source: e.literal("feedvibe"),
2715
2619
  externalId: e.string().min(1),
2716
- reviewer: T.optional(),
2620
+ reviewer: be.optional(),
2717
2621
  rating: e.object({
2718
2622
  overall: e.number(),
2719
2623
  food: e.number(),
@@ -2721,59 +2625,66 @@ const R = e.object({
2721
2625
  atmosphere: e.number()
2722
2626
  }),
2723
2627
  verified: e.boolean(),
2724
- mediaItems: e.array(s).default([])
2628
+ mediaItems: e.array(l).default([])
2725
2629
  });
2726
2630
  e.discriminatedUnion("source", [
2727
- Le,
2728
- xe,
2729
- De,
2730
- we
2631
+ Ce,
2632
+ Te,
2633
+ ve,
2634
+ Se
2731
2635
  ]);
2732
2636
  e.object({
2733
2637
  comment: e.string(),
2734
2638
  starRating: e.number(),
2735
2639
  billId: e.string(),
2736
- mediaItems: e.array(s).optional()
2640
+ isAnonymous: e.boolean(),
2641
+ mediaItems: e.array(l).optional()
2642
+ });
2643
+ e.object({
2644
+ name: e.string().trim().min(1),
2645
+ phoneNumber: e.string().trim().min(1).optional()
2737
2646
  });
2738
- const h = e.object({
2739
- _id: n,
2647
+ const g = e.object({
2648
+ _id: a,
2649
+ businessId: a,
2740
2650
  comment: e.string(),
2741
2651
  createTime: e.coerce.date(),
2742
- updateTime: e.coerce.date().optional(),
2743
- // The marketing Location the review belongs to. For feedme reviews this is
2744
- // the restaurantId (Location._id === restaurantId); for google/facebook it
2745
- // is resolved from the review-source location/page mapping at sync time.
2746
- locationId: n
2747
- }), Ae = h.extend({
2652
+ updateTime: e.coerce.date().nullish(),
2653
+ restaurantId: a,
2654
+ restaurantName: e.string(),
2655
+ deletedAt: e.coerce.date().optional()
2656
+ }), Ne = g.extend({
2748
2657
  source: e.literal("google"),
2749
2658
  externalId: e.string().min(1),
2750
- reviewer: je.optional(),
2751
- reply: d.optional(),
2752
- mediaItems: e.array(s),
2659
+ translatedComment: e.string().optional(),
2660
+ reviewer: ue.optional(),
2661
+ reply: p.optional(),
2662
+ mediaItems: e.array(l),
2753
2663
  starRating: e.number(),
2754
2664
  locationName: e.string(),
2755
- locationDisplayName: e.string()
2756
- }), Ge = h.extend({
2665
+ locationDisplayName: e.string(),
2666
+ originalUrl: e.string().optional()
2667
+ }), Ue = g.extend({
2757
2668
  source: e.literal("facebook"),
2758
2669
  externalId: e.string().min(1),
2759
- reviewer: Je.optional(),
2670
+ reviewer: he.optional(),
2760
2671
  isPositive: e.boolean().optional(),
2761
2672
  pageId: e.string(),
2762
2673
  pageName: e.string()
2763
- }), Me = h.extend({
2674
+ }), Pe = g.extend({
2764
2675
  source: e.literal("feedme"),
2765
- reviewerId: n,
2766
- reviewer: e.any().optional(),
2767
- reply: d.optional(),
2676
+ isAnonymous: e.boolean(),
2677
+ reviewerId: a.optional(),
2678
+ reviewer: c.optional(),
2679
+ reply: p.optional(),
2768
2680
  starRating: e.number(),
2769
2681
  billId: e.string(),
2770
- location: e.any().optional(),
2771
- mediaItems: e.array(s)
2772
- }), Fe = h.extend({
2682
+ mediaItems: e.array(l)
2683
+ }), je = g.extend({
2773
2684
  source: e.literal("feedvibe"),
2774
2685
  externalId: e.string().min(1),
2775
- reviewerId: n,
2776
- reviewer: e.any().optional(),
2686
+ reviewerId: a,
2687
+ reviewer: c,
2777
2688
  rating: e.object({
2778
2689
  overall: e.number(),
2779
2690
  food: e.number(),
@@ -2781,24 +2692,22 @@ const h = e.object({
2781
2692
  atmosphere: e.number()
2782
2693
  }),
2783
2694
  verified: e.boolean(),
2784
- mediaItems: e.array(s).default([])
2695
+ mediaItems: e.array(l).default([])
2785
2696
  });
2786
2697
  e.discriminatedUnion("source", [
2787
- Ae,
2788
- Ge,
2789
- Me,
2790
- Fe
2791
- ]).describe(m.describe(Ee));
2698
+ Ne,
2699
+ Ue,
2700
+ Pe,
2701
+ je
2702
+ ]).describe(i.describe(_e));
2792
2703
  export {
2793
- Z as F,
2794
- t as R,
2795
- We as T,
2796
- k as a,
2797
- He as b,
2798
- J as c,
2799
- b as d,
2800
- X as e,
2801
- q as f,
2802
- y as i,
2803
- Y as s
2704
+ w as F,
2705
+ De as T,
2706
+ ie as a,
2707
+ T as b,
2708
+ u as c,
2709
+ R as d,
2710
+ L as e,
2711
+ we as f,
2712
+ p as g
2804
2713
  };