@feedmepos/mf-connect 0.1.98-beta.3 → 0.1.98-beta.31

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 (123) hide show
  1. package/dist/{App-DEtGn29M.js → App-BhjPzSiY.js} +808 -665
  2. package/dist/{AuditLogs-Mrm0iq9P.js → AuditLogs-Ch6LolQM.js} +9 -9
  3. package/dist/{Bin-D9Pu0L6h.js → Bin-DN-id6dz.js} +8 -8
  4. package/dist/{Broadcast-BZDQtN8x.js → Broadcast-DW2DVP1Y.js} +39 -36
  5. package/dist/CampaignAnalytic-DT-nSIGr.js +1666 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bxlbz-JW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-R-VzWmm8.js} +6 -5
  7. package/dist/{Card-BdMSuxr4.js → Card-BS6sPsHL.js} +18 -18
  8. package/dist/{Collections-D2IOFKrJ.js → Collections-BpdLOygl.js} +14 -13
  9. package/dist/Credit-iyO7xUul.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-jmfMQG79.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-q8PuaqGc.js} +34 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BYQDCpXN.js → EffectSheet.vue_vue_type_style_index_0_lang-C4RJCmCF.js} +6 -6
  12. package/dist/{Experience-Dm5TDsKH.js → Experience-Cc_lsAuN.js} +112 -86
  13. package/dist/{FileSaver.min-G6JMp965.js → FileSaver.min-DlK0mbcs.js} +1 -1
  14. package/dist/Game-N5oRxhfD.js +356 -0
  15. package/dist/{Grab-BXfBhrCM.js → Grab-C4JOX7S9.js} +32 -31
  16. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-C7EIMTui.js → ImageInput.vue_vue_type_script_setup_true_lang-ttCaGoaA.js} +1 -1
  17. package/dist/{Index-DfPPobH8.js → Index-BTPfwIiL.js} +10 -10
  18. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cpx1HMpd.js → LocationPicker.vue_vue_type_script_setup_true_lang-CsOOd9Vz.js} +1 -1
  19. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Csse-q2U.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CECNBs_-.js} +1 -1
  20. package/dist/LoyaltyDashboard-qZRDd1VL.js +1345 -0
  21. package/dist/{MainLayout-DxAYEJg1.js → MainLayout-yONDAqXN.js} +1 -1
  22. package/dist/{Marketing-CPQQG8Y9.js → Marketing-CtxinaIp.js} +4 -4
  23. package/dist/{MarketingMaterialEdit-ssilnzNw.js → MarketingMaterialEdit-BbYHbOjZ.js} +6 -6
  24. package/dist/{Member-DmoUk3Dx.js → Member-BswZb-b-.js} +11 -11
  25. package/dist/{MemberList-Cm2BWPrW.js → MemberList-DclEAn1h.js} +36 -35
  26. package/dist/{MemberTransactions-Cxr87RMl.js → MemberTransactions-B4sc1Ahe.js} +1 -1
  27. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DpUg4Uwi.js → MessageInput.vue_vue_type_script_setup_true_lang-en_MLf2q.js} +5434 -5279
  28. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  29. package/dist/Mission-B2_SB07l.js +360 -0
  30. package/dist/Overview-BETAx6sC.js +1104 -0
  31. package/dist/{Overview-CfigslHq.js → Overview-DJ8DB7p1.js} +18 -18
  32. package/dist/Point-I5sYY0AV.js +288 -0
  33. package/dist/Promotion-BZiOiGCt.js +423 -0
  34. package/dist/{Queue-B7kxDPZV.js → Queue-BirX_EC7.js} +12 -12
  35. package/dist/{Record-BGULqygn.js → Record-C0K6Ns45.js} +9 -9
  36. package/dist/Review-BoISkcF5.js +45 -0
  37. package/dist/ReviewFacebookCallback-DI_v42cz.js +238 -0
  38. package/dist/ReviewGoogleCallback-bWRrVgif.js +213 -0
  39. package/dist/{Reward-C0w5c1Th.js → Reward-Cq52vwUr.js} +16 -16
  40. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-CspVlyRZ.js → RewardGroup.vue_vue_type_script_setup_true_lang-BW_TCNUF.js} +11 -11
  41. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-QYsK7vE4.js → RuleGroup.vue_vue_type_script_setup_true_lang-BB42pC95.js} +16 -15
  42. package/dist/{Segment-I_p06AoA.js → Segment-BmOC4d7i.js} +39 -37
  43. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DV79EJm9.js → SelectItems.vue_vue_type_script_setup_true_lang-QClugajp.js} +2 -2
  44. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CUwwzTTV.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-CaQdSfIF.js} +12 -12
  45. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D2Nv32U5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-W7APn7Cu.js} +4 -4
  46. package/dist/{Setting-DOMSAMUz.js → Setting-Dgt0LCbv.js} +40 -40
  47. package/dist/{SettingAdvertisements-IeGC6PHz.js → SettingAdvertisements-DAUdwr1p.js} +12 -12
  48. package/dist/Settings-gGFgpQbO.js +179 -0
  49. package/dist/{Store-DLzj0qGi.js → Store-IaZXjlU_.js} +21 -21
  50. package/dist/{StoreRewards-BPhAkGNl.js → StoreRewards-DnNuYefP.js} +15 -15
  51. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DpcaOgdN.js → StoreTransactions.vue_vue_type_script_setup_true_lang-DTLHTyc_.js} +190 -187
  52. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DUdAxdEO.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-euqTCLNl.js} +2 -2
  53. package/dist/{Tier-7MveQA4f.js → Tier-DUZjJBxp.js} +36 -34
  54. package/dist/{Title-kyAzLGqm.js → Title-CoElyNyo.js} +39 -37
  55. package/dist/{Transaction-Chl3d3Ai.js → Transaction-eywJjImp.js} +2 -2
  56. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-CZsaFtae.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DJ5_Kqpv.js} +6 -6
  57. package/dist/{Voucher-CxIPPul5.js → Voucher-CAiuvTfM.js} +156 -133
  58. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BntA1IAx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-BDnbUGdG.js} +12 -12
  59. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CiOmadge.js → ZodTextField.vue_vue_type_script_setup_true_lang-D5rXidZV.js} +2 -2
  60. package/dist/{app-5YllsPJi.js → app-DhDmESYL.js} +3356 -2864
  61. package/dist/app.js +1 -1
  62. package/dist/{business-C0zArPJj.js → business-GzfuJslR.js} +1 -1
  63. package/dist/campaign-D5fwJP6R.js +100 -0
  64. package/dist/{campaign-BHl5a5Z1.js → campaign-DFT642vU.js} +74 -96
  65. package/dist/{campaign.enum-CHWTkc9k.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  66. package/dist/{campaign.fn-BtwnAETQ.js → campaign.fn-DkdIAZ7i.js} +115 -115
  67. package/dist/{collectible.enum-BvoISTK3.js → collectible.enum-Liy2wH3s.js} +1 -1
  68. package/dist/collection.fn-OGlCjGmW.js +26 -0
  69. package/dist/{duplicateCampaign-C27ikU2f.js → duplicateCampaign-iTVcbRn-.js} +2 -2
  70. package/dist/{effect-CARgKjhU.js → effect-CGAWPcrm.js} +1 -1
  71. package/dist/{email-addresses-CnTsfZHe.js → email-addresses-BE2S4Dj8.js} +2 -2
  72. package/dist/{export-CO8-3Ob9.js → export-D_fy-zua.js} +3 -3
  73. package/dist/google-C3S8u0mT.js +4 -0
  74. package/dist/{helper-C617AZcV.js → helper-C3C4SOin.js} +1 -1
  75. package/dist/{index-B0BE7PIS.js → index-BAApyOCS.js} +1 -1
  76. package/dist/{index-gPrU9b68.js → index-Be5nXR7v.js} +8027 -10766
  77. package/dist/{index-hKv7PcTR.js → index-Bh9_cs1A.js} +1 -1
  78. package/dist/{index-wL9aIsub.js → index-Bt33uSj8.js} +587 -578
  79. package/dist/{index-CtXx42Yb.js → index-C0miKj5V.js} +1 -1
  80. package/dist/index-C8cXXcLk.js +45 -0
  81. package/dist/{index-9AxeGyVh.js → index-CKAtCHMa.js} +272 -369
  82. package/dist/{index-DMvP3cOz.js → index-CWIwKELy.js} +184 -210
  83. package/dist/{index-DNf6qgpV.js → index-CXmuQ0jf.js} +2 -2
  84. package/dist/index-C_H8jFYf.js +2743 -0
  85. package/dist/{index-CFO8nwbC.js → index-CdH2ReVb.js} +8 -7
  86. package/dist/{index-Da8trM3D.js → index-CdZ_RusD.js} +1 -1
  87. package/dist/{index-CEJgFylS.js → index-CgRL0HwK.js} +26 -17
  88. package/dist/index-CsGEC4Aw.js +146 -0
  89. package/dist/{index-CMfyVF2h.js → index-D-btpqVA.js} +105 -123
  90. package/dist/{index-B2ZvboNZ.js → index-DTZ7EAcZ.js} +1 -1
  91. package/dist/{index-DIcwj1r2.js → index-QHOmMZSD.js} +1 -1
  92. package/dist/{index.esm2017-BFgbXDc8.js → index.esm2017-G5LoANQX.js} +105 -105
  93. package/dist/{loading-BxpiUNaf.js → loading-BPNkTxXT.js} +1 -1
  94. package/dist/{lodash-rPOvq9te.js → lodash-9ta4Nkqt.js} +1 -1
  95. package/dist/{membership-lfX5TNVQ.js → membership-BYkSHLOw.js} +3 -3
  96. package/dist/{money-CuUoYzPn.js → money-3C0zWUC8.js} +1 -1
  97. package/dist/{number-DMk8hvKt.js → number-d4dGkDp-.js} +1 -1
  98. package/dist/objectid-DnLDUQct.js +145 -0
  99. package/dist/{plugins-CyYjHO_X.js → plugins-DpkzBj4v.js} +3 -3
  100. package/dist/{reward-BxwaSc-X.js → reward-X01fpNlm.js} +1 -1
  101. package/dist/{rule-76SluGaP.js → rule-TAnVjqJf.js} +3 -3
  102. package/dist/rule-builder-BcmfLik_.js +126 -0
  103. package/dist/{template-ByceGw-A.js → template-Dw2oNW4d.js} +6 -6
  104. package/dist/timezone-Df1SYjKC.js +20 -0
  105. package/dist/{trigger-CxM5x3Sj.js → trigger-BPnDSdB4.js} +5 -5
  106. package/dist/{useMarketingMaterialActions-CHXVZ61f.js → useMarketingMaterialActions-CeoTwfgs.js} +3 -3
  107. package/dist/{usePagination-BKfoMHBB.js → usePagination-nnXuyQTt.js} +1 -1
  108. package/dist/{user-Cqjv0IpD.js → user-C0_0nUJU.js} +1 -1
  109. package/dist/{vue-i18n-Q-nKu_E3.js → vue-i18n-LQy4nXEW.js} +246 -246
  110. package/dist/{xlsx-D1LobU8O.js → xlsx-DZTNL-Ht.js} +1 -1
  111. package/dist/{zod-B5vUvKbD.js → zod-D-SNQ7Pu.js} +1 -1
  112. package/package.json +3 -3
  113. package/dist/Credit-BWyLeJpj.js +0 -260
  114. package/dist/Game-BB81nS7Y.js +0 -330
  115. package/dist/LoyaltyDashboard-BWC3rDDk.js +0 -1082
  116. package/dist/Mission-ChWPNxbI.js +0 -334
  117. package/dist/Point-Ko81Ny1q.js +0 -262
  118. package/dist/Promotion-CfyscRNN.js +0 -397
  119. package/dist/Review-C7Nx6a5t.js +0 -959
  120. package/dist/ReviewFacebookCallback-DKmL0TYZ.js +0 -243
  121. package/dist/ReviewGoogleCallback-C6iFFEfS.js +0 -208
  122. package/dist/campaign-C_49MeEc.js +0 -219
  123. package/dist/objectid-VPzb0Etb.js +0 -145
@@ -1,128 +1,11 @@
1
- import { z as e, F as n, m, a as L } from "./index-gPrU9b68.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-DMvP3cOz.js";
3
- import { _ as M, l as H, a as F } from "./index-wL9aIsub.js";
4
- import { i as p } from "./helper-C617AZcV.js";
5
- import { a as f } from "./index-CFO8nwbC.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 { F as a, m as i, a as U } from "./index-Be5nXR7v.js";
2
+ import { z as e } from "./index-C_H8jFYf.js";
3
+ import { B as P, C as j, E as J, G as E, H as r } from "./index-CWIwKELy.js";
4
+ import { a as O } from "./index-Bt33uSj8.js";
5
+ import { R as t } from "./rule-builder-BcmfLik_.js";
6
+ import { i as o } from "./helper-C3C4SOin.js";
7
+ import { a as d } from "./index-CdH2ReVb.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
+ }), u = 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: u.optional().or(
2059
+ e.array(u)
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 X = 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: X,
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
+ }), q = 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(q).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: E.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
+ }), h = 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: O.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(h),
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,79 @@ 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(h),
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: h.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
+ }), de = e.object({
2554
2437
  token: e.string().nullable(),
2555
- pages: e.array(Se)
2438
+ pages: e.array(me)
2556
2439
  });
2557
2440
  e.object({
2558
- _id: n,
2559
- businessId: n,
2560
- google: Ue.nullable(),
2561
- facebook: Pe.nullable()
2441
+ _id: a,
2442
+ businessId: a,
2443
+ google: ge.nullable(),
2444
+ facebook: de.nullable()
2562
2445
  }).describe(
2563
- m.describe({
2446
+ i.describe({
2564
2447
  collectionName: "ReviewSourceConfig",
2565
2448
  transform: {
2566
2449
  _id: "oid",
@@ -2618,98 +2501,111 @@ e.object({
2618
2501
  )
2619
2502
  }).nullable()
2620
2503
  });
2621
- const O = e.object({
2504
+ const c = e.object({
2622
2505
  name: e.string(),
2623
- pictureUrl: e.string()
2624
- }), je = O.extend({
2506
+ pictureUrl: e.string(),
2507
+ phoneNumber: e.string().optional()
2508
+ }), he = c.extend({
2625
2509
  isAnonymous: e.boolean().optional()
2626
- }), Je = O.extend({
2510
+ }), ue = c.extend({
2627
2511
  id: e.string().optional()
2628
- }), d = e.object({
2512
+ }), p = e.object({
2629
2513
  comment: e.string(),
2630
2514
  updateTime: e.coerce.date()
2631
- }), s = e.object({
2515
+ }), l = e.object({
2632
2516
  externalId: e.string().optional(),
2633
2517
  thumbnailUrl: e.string(),
2634
2518
  thumbnailLabel: e.string(),
2635
2519
  videoUrl: e.string().optional()
2636
- }), Ee = {
2520
+ }), _e = {
2637
2521
  collectionName: "Reviews",
2638
2522
  transform: {
2639
2523
  _id: "oid",
2524
+ businessId: "oid",
2640
2525
  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
- }
2526
+ restaurantId: "oid"
2652
2527
  }
2653
- }, I = e.enum([
2528
+ }, S = e.enum([
2654
2529
  "google",
2655
2530
  "facebook",
2656
2531
  "feedme",
2657
2532
  "feedvibe"
2658
2533
  ]);
2659
- I.options;
2534
+ S.options;
2660
2535
  e.enum(["google", "facebook"]);
2661
- const Oe = e.enum([
2536
+ const ye = e.enum([
2662
2537
  "createTime_desc",
2663
2538
  "createTime_asc",
2664
2539
  "rating_asc",
2665
2540
  "rating_desc"
2666
2541
  ]);
2667
2542
  e.object({
2668
- source: I.array().optional(),
2669
- dateFrom: e.coerce.date().optional(),
2670
- dateTo: e.coerce.date().optional(),
2543
+ source: S.array().optional(),
2544
+ dateFrom: e.string().datetime({ offset: !0 }).optional(),
2545
+ dateTo: e.string().datetime({ offset: !0 }).optional(),
2671
2546
  locationId: e.string().optional(),
2672
- sort: Oe.optional(),
2547
+ excludeDeleted: e.boolean().optional(),
2548
+ sort: ye.optional(),
2673
2549
  limit: e.coerce.number().int().positive().optional(),
2674
2550
  skip: e.coerce.number().int().min(0).optional()
2675
2551
  });
2676
- const R = e.object({
2552
+ const we = e.object({
2553
+ averageScore: e.number(),
2554
+ total: e.number().int().nonnegative(),
2555
+ starCounts: e.array(
2556
+ e.object({
2557
+ star: e.number().int().min(1).max(5),
2558
+ count: e.number().int().nonnegative()
2559
+ })
2560
+ )
2561
+ }), m = e.object({
2677
2562
  name: e.string(),
2678
- pictureUrl: e.string()
2679
- }), Ie = R.extend({
2563
+ pictureUrl: e.string().optional(),
2564
+ phoneNumber: e.string().optional()
2565
+ }), fe = m.extend({
2566
+ _id: e.string().optional()
2567
+ }), be = m.extend({
2568
+ _id: e.string()
2569
+ }), He = m.extend({
2680
2570
  isAnonymous: e.boolean().optional()
2681
- }), Re = R.extend({
2571
+ }), ze = m.extend({
2682
2572
  id: e.string().optional()
2683
- }), u = e.object({
2684
- _id: n,
2573
+ }), s = e.object({
2574
+ _id: a,
2685
2575
  comment: e.string(),
2686
2576
  createTime: e.coerce.date(),
2687
- locationId: n
2688
- }), Le = u.extend({
2577
+ updateTime: e.coerce.date().nullish(),
2578
+ restaurantId: a,
2579
+ restaurantName: e.string()
2580
+ }), Ce = s.extend({
2689
2581
  source: e.literal("google"),
2690
- reviewer: Ie.optional(),
2691
- reply: d.optional(),
2692
- mediaItems: e.array(s),
2582
+ externalId: e.string().min(1),
2583
+ translatedComment: e.string().optional(),
2584
+ reviewer: He.optional(),
2585
+ reply: p.optional(),
2586
+ mediaItems: e.array(l),
2693
2587
  starRating: e.number(),
2694
2588
  locationName: e.string(),
2695
- locationDisplayName: e.string()
2696
- }), xe = u.extend({
2589
+ locationDisplayName: e.string(),
2590
+ originalUrl: e.string().optional()
2591
+ }), Te = s.extend({
2697
2592
  source: e.literal("facebook"),
2698
- reviewer: Re.optional(),
2593
+ externalId: e.string().min(1),
2594
+ reviewer: ze.optional(),
2699
2595
  isPositive: e.boolean().optional(),
2700
2596
  pageId: e.string(),
2701
2597
  pageName: e.string()
2702
- }), De = u.extend({
2598
+ }), ve = s.extend({
2703
2599
  source: e.literal("feedme"),
2704
- reviewer: T,
2705
- reply: d.optional(),
2600
+ reviewer: fe.optional(),
2601
+ reply: p.optional(),
2706
2602
  starRating: e.number(),
2707
- location: G.optional(),
2708
- mediaItems: e.array(s),
2603
+ mediaItems: e.array(l),
2709
2604
  billId: e.string()
2710
- }), we = u.extend({
2605
+ }), Se = s.extend({
2711
2606
  source: e.literal("feedvibe"),
2712
- reviewer: T.optional(),
2607
+ externalId: e.string().min(1),
2608
+ reviewer: be.optional(),
2713
2609
  rating: e.object({
2714
2610
  overall: e.number(),
2715
2611
  food: e.number(),
@@ -2717,56 +2613,66 @@ const R = e.object({
2717
2613
  atmosphere: e.number()
2718
2614
  }),
2719
2615
  verified: e.boolean(),
2720
- mediaItems: e.array(s).default([])
2616
+ mediaItems: e.array(l).default([])
2721
2617
  });
2722
2618
  e.discriminatedUnion("source", [
2723
- Le,
2724
- xe,
2725
- De,
2726
- we
2619
+ Ce,
2620
+ Te,
2621
+ ve,
2622
+ Se
2727
2623
  ]);
2728
2624
  e.object({
2729
2625
  comment: e.string(),
2730
2626
  starRating: e.number(),
2731
2627
  billId: e.string(),
2732
- mediaItems: e.array(s).optional()
2628
+ isAnonymous: e.boolean(),
2629
+ mediaItems: e.array(l).optional()
2733
2630
  });
2734
- const h = e.object({
2735
- _id: n,
2736
- externalId: e.string().optional(),
2631
+ e.object({
2632
+ name: e.string().trim().min(1),
2633
+ phoneNumber: e.string().trim().min(1).optional()
2634
+ });
2635
+ const g = e.object({
2636
+ _id: a,
2637
+ businessId: a,
2737
2638
  comment: e.string(),
2738
2639
  createTime: e.coerce.date(),
2739
- // The marketing Location the review belongs to. For feedme reviews this is
2740
- // the restaurantId (Location._id === restaurantId); for google/facebook it
2741
- // is resolved from the review-source location/page mapping at sync time.
2742
- locationId: n
2743
- }), Ae = h.extend({
2640
+ updateTime: e.coerce.date().nullish(),
2641
+ restaurantId: a,
2642
+ restaurantName: e.string(),
2643
+ deletedAt: e.coerce.date().optional()
2644
+ }), Ne = g.extend({
2744
2645
  source: e.literal("google"),
2745
- reviewer: je.optional(),
2746
- reply: d.optional(),
2747
- mediaItems: e.array(s),
2646
+ externalId: e.string().min(1),
2647
+ translatedComment: e.string().optional(),
2648
+ reviewer: he.optional(),
2649
+ reply: p.optional(),
2650
+ mediaItems: e.array(l),
2748
2651
  starRating: e.number(),
2749
2652
  locationName: e.string(),
2750
- locationDisplayName: e.string()
2751
- }), Ge = h.extend({
2653
+ locationDisplayName: e.string(),
2654
+ originalUrl: e.string().optional()
2655
+ }), Ue = g.extend({
2752
2656
  source: e.literal("facebook"),
2753
- reviewer: Je.optional(),
2657
+ externalId: e.string().min(1),
2658
+ reviewer: ue.optional(),
2754
2659
  isPositive: e.boolean().optional(),
2755
2660
  pageId: e.string(),
2756
2661
  pageName: e.string()
2757
- }), Me = h.extend({
2662
+ }), Pe = g.extend({
2758
2663
  source: e.literal("feedme"),
2759
- reviewerId: n,
2760
- reviewer: e.any().optional(),
2761
- reply: d.optional(),
2664
+ isAnonymous: e.boolean(),
2665
+ reviewerId: a.optional(),
2666
+ reviewer: c.optional(),
2667
+ reply: p.optional(),
2762
2668
  starRating: e.number(),
2763
2669
  billId: e.string(),
2764
- location: e.any().optional(),
2765
- mediaItems: e.array(s)
2766
- }), Fe = h.extend({
2670
+ mediaItems: e.array(l)
2671
+ }), je = g.extend({
2767
2672
  source: e.literal("feedvibe"),
2768
- reviewerId: n,
2769
- reviewer: e.any().optional(),
2673
+ externalId: e.string().min(1),
2674
+ reviewerId: a,
2675
+ reviewer: c,
2770
2676
  rating: e.object({
2771
2677
  overall: e.number(),
2772
2678
  food: e.number(),
@@ -2774,24 +2680,21 @@ const h = e.object({
2774
2680
  atmosphere: e.number()
2775
2681
  }),
2776
2682
  verified: e.boolean(),
2777
- mediaItems: e.array(s).default([])
2683
+ mediaItems: e.array(l).default([])
2778
2684
  });
2779
2685
  e.discriminatedUnion("source", [
2780
- Ae,
2781
- Ge,
2782
- Me,
2783
- Fe
2784
- ]).describe(m.describe(Ee));
2686
+ Ne,
2687
+ Ue,
2688
+ Pe,
2689
+ je
2690
+ ]).describe(i.describe(_e));
2785
2691
  export {
2786
- Z as F,
2787
- t as R,
2788
- We as T,
2789
- k as a,
2790
- He as b,
2791
- J as c,
2792
- b as d,
2793
- X as e,
2794
- q as f,
2795
- y as i,
2796
- Y as s
2692
+ w as F,
2693
+ De as T,
2694
+ ie as a,
2695
+ T as b,
2696
+ h as c,
2697
+ R as d,
2698
+ L as e,
2699
+ we as f
2797
2700
  };