@feedmepos/mf-connect 0.1.98-beta.4 → 0.1.98-beta.41

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 (132) hide show
  1. package/dist/{App-BGv_JihW.js → App-C6JJ9uQ8.js} +808 -665
  2. package/dist/{AuditLogs-53rnjCmD.js → AuditLogs-CAlgtDgx.js} +12 -11
  3. package/dist/{Bin-B0Q_WpuY.js → Bin-D8jwhwER.js} +8 -8
  4. package/dist/{Broadcast-PiJE1Syl.js → Broadcast-CP8DRfkT.js} +39 -36
  5. package/dist/CampaignAnalytic-MVjYBFvu.js +1826 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dz2KsBZl.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DeLURz87.js} +7 -5
  7. package/dist/{Card-DlqMu3Sl.js → Card-QribXJwZ.js} +21 -20
  8. package/dist/{Collections-BWcBlDDR.js → Collections-X9xbt43V.js} +14 -13
  9. package/dist/Credit-QmbsW1eb.js +286 -0
  10. package/dist/{EditCampaignSheet.vue_vue_type_script_setup_true_lang-DCvH0lGA.js → EditCampaignSheet.vue_vue_type_script_setup_true_lang-ClNieHSo.js} +35 -30
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-B_FyeWq4.js → EffectSheet.vue_vue_type_style_index_0_lang-CrGHTNhg.js} +16 -16
  12. package/dist/{Experience-DacFmPYy.js → Experience-CPGMg847.js} +112 -86
  13. package/dist/{FileSaver.min-CMZKiGkX.js → FileSaver.min-CK67LsPG.js} +1 -1
  14. package/dist/Game-BrkiEFCS.js +356 -0
  15. package/dist/GiftCardSetup-DXNBHF1A.js +542 -0
  16. package/dist/{Grab-DaBL5y3H.js → Grab-BgtDzK1B.js} +32 -31
  17. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BaY_nQio.js → ImageInput.vue_vue_type_script_setup_true_lang-Dzv2AkKN.js} +1 -1
  18. package/dist/{Index-2UrjF35w.js → Index-KJgzalOd.js} +10 -10
  19. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BuVBZsCN.js → LocationPicker.vue_vue_type_script_setup_true_lang-C6SBLJGQ.js} +1 -1
  20. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-6wUxYqWe.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Dj74lJ7b.js} +1 -1
  21. package/dist/LoyaltyDashboard-B2JpbC01.js +1345 -0
  22. package/dist/MainLayout-DlfTKHQ-.js +143 -0
  23. package/dist/{Marketing-DEp--hFd.js → Marketing-Crx_JQpi.js} +7 -6
  24. package/dist/{MarketingMaterialEdit-BHL8Ptsu.js → MarketingMaterialEdit-BfsdcMXJ.js} +15 -14
  25. package/dist/{Member-BU1YxoEV.js → Member-C50Nrsko.js} +14 -13
  26. package/dist/{MemberList-zjvJBYf0.js → MemberList-C9uUKw1o.js} +37 -35
  27. package/dist/{MemberTransactions-BvyLV69V.js → MemberTransactions-DZ7zPOHX.js} +1 -1
  28. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-_YOM1SlS.js → MessageInput.vue_vue_type_script_setup_true_lang-Du_ZGsbX.js} +5434 -5279
  29. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Bg_0YlwG.js +38 -0
  30. package/dist/Mission-D_km8zi6.js +360 -0
  31. package/dist/{Overview-BToUlbsH.js → Overview-BBieK6qQ.js} +21 -20
  32. package/dist/Overview-B_kmLOcc.js +1316 -0
  33. package/dist/Point-D0q9N7f9.js +288 -0
  34. package/dist/Promotion-DoFTy-NK.js +423 -0
  35. package/dist/{Queue-D3vUkKN9.js → Queue-Dh5sDRHW.js} +13 -12
  36. package/dist/{Record-BViEbZZ8.js → Record-0owEBKqN.js} +9 -9
  37. package/dist/Review-DV2fnpOH.js +45 -0
  38. package/dist/ReviewFacebookCallback-D8mnAPzR.js +238 -0
  39. package/dist/ReviewGoogleCallback-CLzt_ox2.js +213 -0
  40. package/dist/{Reward-CZsvsYW_.js → Reward-Co20Xrss.js} +35 -35
  41. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BASPLoRa.js → RewardGroup.vue_vue_type_script_setup_true_lang-0qU49c47.js} +14 -13
  42. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-B90meAnV.js → RuleGroup.vue_vue_type_script_setup_true_lang-qdvaXPhJ.js} +17 -15
  43. package/dist/{Segment-CN8NEg8w.js → Segment-7dQKeHWK.js} +38 -35
  44. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-BGyYQST4.js → SelectItems.vue_vue_type_script_setup_true_lang-BUVrUifO.js} +2 -2
  45. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-BxW-Kc6t.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DDsV9TD9.js} +37 -36
  46. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-C9dwcEr5.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-DqPZpddc.js} +4 -4
  47. package/dist/{Setting-DLPbZW11.js → Setting-Bvahxs-y.js} +14 -14
  48. package/dist/{SettingAdvertisements-BIq8gS5g.js → SettingAdvertisements-fbXLRwfb.js} +12 -12
  49. package/dist/Settings-C_HWDFN8.js +179 -0
  50. package/dist/Store-8yBKDR1b.js +2413 -0
  51. package/dist/{StoreRewards-BoEjVFk6.js → StoreRewards-DKaJvoJs.js} +15 -15
  52. package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-Bv9ABH1K.js → StoreTransactions.vue_vue_type_script_setup_true_lang-D23XzJD7.js} +400 -455
  53. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DNHgSfIg.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-JaFhCK_L.js} +2 -2
  54. package/dist/{Tier-kQ6X9h-t.js → Tier-CD-CjXC3.js} +44 -41
  55. package/dist/{Title-XosVAF2Y.js → Title-C_lcgye8.js} +49 -46
  56. package/dist/{Transaction-CO6oLPKR.js → Transaction-BvUYm-rT.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-McMR2Y7Y.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-C3Yacz7K.js} +6 -6
  58. package/dist/{Voucher-CogaCxx2.js → Voucher-CYaG0GLU.js} +156 -133
  59. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-DjHwHFBq.js → VoucherEditor.vue_vue_type_script_setup_true_lang-DF2JqzRe.js} +12 -12
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-Dor9klZ8.js → ZodTextField.vue_vue_type_script_setup_true_lang-B4UPqSNc.js} +2 -2
  61. package/dist/{app-C9UPXbDs.js → app-CE5hQ4Uq.js} +6656 -5653
  62. package/dist/app.js +1 -1
  63. package/dist/{business-CYpW6-Ls.js → business-CE_4siXc.js} +1 -1
  64. package/dist/{campaign-BtLa7KeF.js → campaign-BP6rvSpg.js} +74 -96
  65. package/dist/campaign-CXQtKpeb.js +100 -0
  66. package/dist/{campaign.enum-DiLhS5il.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  67. package/dist/{campaign.fn-CLB9gBHo.js → campaign.fn-DKnBpE1N.js} +119 -119
  68. package/dist/{collectible.enum-CmwWcfBh.js → collectible.enum-Liy2wH3s.js} +1 -1
  69. package/dist/collection.fn-Cg16QZSp.js +26 -0
  70. package/dist/{duplicateCampaign-DGhOBd5l.js → duplicateCampaign-DbtVAGsT.js} +2 -2
  71. package/dist/{effect-CY5Y6sxy.js → effect-CLI8NI4O.js} +1 -1
  72. package/dist/{email-addresses-BEnOHWj_.js → email-addresses-DlLiZ1io.js} +2 -2
  73. package/dist/{export-BgYu7SCd.js → export-6Hr34dBU.js} +3 -3
  74. package/dist/google-C3S8u0mT.js +4 -0
  75. package/dist/{helper-DTDgoyEh.js → helper-vkjFqj70.js} +1 -1
  76. package/dist/index-BIyKgw4m.js +72 -0
  77. package/dist/{index-C8ehLvXG.js → index-BLQJ-rv3.js} +1 -1
  78. package/dist/{index-CP-7qATP.js → index-BbTIqReL.js} +1 -1
  79. package/dist/index-BuMfQxMf.js +897 -0
  80. package/dist/index-C8cXXcLk.js +45 -0
  81. package/dist/{index-kS20rM5m.js → index-CSVhIZSY.js} +589 -580
  82. package/dist/{index-zF0gIg9H.js → index-CVHacTbc.js} +1 -1
  83. package/dist/index-C_H8jFYf.js +2743 -0
  84. package/dist/{index-goRooQn5.js → index-CmNsGhDf.js} +272 -368
  85. package/dist/index-CnTeeRyJ.js +53 -0
  86. package/dist/{index-Ck3PeOQ5.js → index-CzbNobLv.js} +105 -123
  87. package/dist/index-D06n1h1b.js +146 -0
  88. package/dist/{index-CNKP1_IW.js → index-D4SDAfbP.js} +8027 -10766
  89. package/dist/{index-DntoqWT_.js → index-DVnYQ3Hs.js} +1 -1
  90. package/dist/{index-BZVhi3ZG.js → index-DcjnS5Sv.js} +2 -2
  91. package/dist/{index-DtyWsBgg.js → index-Dx9h0FNH.js} +1 -1
  92. package/dist/{index-CDk0Itu1.js → index-YgP4ihQL.js} +1 -1
  93. package/dist/{index-B4IAURA_.js → index-kedErkLZ.js} +1759 -2480
  94. package/dist/{index-CLZnH782.js → index-lnQT4P3d.js} +10 -9
  95. package/dist/{index.esm2017-C79fd6cz.js → index.esm2017-Jhv2lkrq.js} +105 -105
  96. package/dist/{loading-Dfr_97Ri.js → loading-NY-FPxVY.js} +1 -1
  97. package/dist/{lodash-BX2mJOxF.js → lodash-BC_P6kLg.js} +1 -1
  98. package/dist/{membership-ncNOUJwj.js → membership-BWaK-9FY.js} +3 -3
  99. package/dist/{money-vEtTzt04.js → money-COoh4GXK.js} +1 -1
  100. package/dist/{number-BjgTlMsp.js → number-BX5OEXgq.js} +1 -1
  101. package/dist/objectid-1SUSRtmY.js +145 -0
  102. package/dist/{plugins-BVGqEmE1.js → plugins-ur-FAoye.js} +3 -3
  103. package/dist/remy-Qz_pNsUS.js +13 -0
  104. package/dist/{reward-BGTLhhzT.js → reward-DSsylZ22.js} +1 -1
  105. package/dist/{rule-BB2VX3Gy.js → rule-BM9GUd1C.js} +3 -3
  106. package/dist/rule-builder-gC9LH2AC.js +126 -0
  107. package/dist/{template-DLiHnpjK.js → template-CUV3AMFI.js} +6 -6
  108. package/dist/timezone-BFZhekOU.js +20 -0
  109. package/dist/transaction.fn-C5MlkEIC.js +64 -0
  110. package/dist/{trigger-DrKnfSoi.js → trigger-CbjiuoSo.js} +14 -14
  111. package/dist/useMarketingMaterialActions-BLisTieA.js +96 -0
  112. package/dist/{usePagination-Dgd-onzU.js → usePagination-Caah4sJr.js} +1 -1
  113. package/dist/{user-BcDUmNrZ.js → user-BZC4P_jL.js} +1 -1
  114. package/dist/{vue-i18n-DNBGmwox.js → vue-i18n-BYz7XAr_.js} +390 -390
  115. package/dist/{xlsx-BX-U0_Au.js → xlsx-Bn7BqUFA.js} +1 -1
  116. package/dist/{zod-Mx51GBPY.js → zod-DHH42rXG.js} +1 -1
  117. package/package.json +3 -3
  118. package/dist/Credit-CMfcuj5n.js +0 -260
  119. package/dist/Game-DXKnGuhR.js +0 -330
  120. package/dist/LoyaltyDashboard-DIArPp71.js +0 -1082
  121. package/dist/MainLayout-BjvTxTPG.js +0 -41
  122. package/dist/Mission-BNYk_aPM.js +0 -334
  123. package/dist/Point-B-L2326L.js +0 -262
  124. package/dist/Promotion-sMKGkL4w.js +0 -397
  125. package/dist/Review-CMBAk-Qu.js +0 -1067
  126. package/dist/ReviewFacebookCallback-BCJTFy3b.js +0 -243
  127. package/dist/ReviewGoogleCallback-DKUG075r.js +0 -208
  128. package/dist/Store-DNB3gUIR.js +0 -1996
  129. package/dist/campaign-CtoHyXVT.js +0 -219
  130. package/dist/index-P8Qh2yIP.js +0 -52
  131. package/dist/objectid-C9DiLwge.js +0 -145
  132. package/dist/useMarketingMaterialActions-B6zaDbNE.js +0 -107
@@ -1,128 +1,12 @@
1
- import { z as e, F as n, m, a as L } from "./index-CNKP1_IW.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-B4IAURA_.js";
3
- import { _ as M, l as H, a as F } from "./index-kS20rM5m.js";
4
- import { i as p } from "./helper-DTDgoyEh.js";
5
- import { a as f } from "./index-CLZnH782.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-D4SDAfbP.js";
2
+ import { z as e } from "./index-C_H8jFYf.js";
3
+ import { x as P, u as j, v as J, t as r } from "./index-kedErkLZ.js";
4
+ import { a as E } from "./index-CSVhIZSY.js";
5
+ import { R as t } from "./rule-builder-gC9LH2AC.js";
6
+ import { i as o } from "./helper-vkjFqj70.js";
7
+ import { l as O } from "./index-BuMfQxMf.js";
8
+ import { F as d } from "./index-lnQT4P3d.js";
9
+ const I = {
126
10
  collectionName: "AuditLogs",
127
11
  transform: {
128
12
  _id: "oid",
@@ -135,7 +19,7 @@ const W = {
135
19
  fromCollection: "Businesses"
136
20
  }
137
21
  }
138
- }, X = e.enum([
22
+ }, R = e.enum([
139
23
  "GET",
140
24
  "POST",
141
25
  "PUT",
@@ -144,7 +28,7 @@ const W = {
144
28
  "OPTIONS",
145
29
  "HEAD",
146
30
  "ALL"
147
- ]), q = e.enum([
31
+ ]), L = e.enum([
148
32
  "CAMPAIGN",
149
33
  "LOCATION",
150
34
  "MARKETING MATERIALS",
@@ -154,31 +38,31 @@ const W = {
154
38
  "SETTINGS",
155
39
  "SEGMENTATION",
156
40
  "USER"
157
- ]), Q = e.object({
158
- httpMethod: X,
41
+ ]), x = e.object({
42
+ httpMethod: R,
159
43
  url: e.string().min(1),
160
44
  userAgent: e.string(),
161
45
  host: e.string().min(1),
162
46
  params: e.object({}).passthrough().nullish(),
163
47
  query: e.object({}).passthrough().nullish(),
164
48
  body: e.object({}).passthrough().nullish()
165
- }), $ = e.object({
49
+ }), D = e.object({
166
50
  statusCode: e.number().int().min(100).max(599),
167
51
  body: e.object({}).passthrough().nullish()
168
52
  });
169
53
  e.object({
170
- _id: n,
54
+ _id: a,
171
55
  user: e.string().length(28),
172
56
  userName: e.string().min(1),
173
- userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
174
- moduleType: q,
175
- business: n.nullish(),
57
+ userPhoneNumber: e.string().refine((n) => P(n)).nullish(),
58
+ moduleType: L,
59
+ business: a.nullish(),
176
60
  clientIp: e.string().nullish(),
177
61
  timestamp: e.string().datetime(),
178
- request: Q,
179
- response: $
180
- }).describe(m.describe(W));
181
- const We = {
62
+ request: x,
63
+ response: D
64
+ }).describe(i.describe(I));
65
+ const we = {
182
66
  PROMOTION: {
183
67
  name: "Promotion Template",
184
68
  description: "Promotion template for campaign creation.",
@@ -584,7 +468,7 @@ const We = {
584
468
  // },
585
469
  hideInApp: !0
586
470
  },
587
- configs: p("VOUCHER", {
471
+ configs: o("VOUCHER", {
588
472
  name: "",
589
473
  business: null,
590
474
  noCampaign: !1
@@ -1529,7 +1413,7 @@ const We = {
1529
1413
  rewards: []
1530
1414
  }
1531
1415
  },
1532
- configs: p("GAME", {
1416
+ configs: o("GAME", {
1533
1417
  name: "Token",
1534
1418
  business: null,
1535
1419
  noCampaign: !1
@@ -1770,7 +1654,7 @@ const We = {
1770
1654
  type: "timeframe"
1771
1655
  }
1772
1656
  },
1773
- configs: p("STAMP", {
1657
+ configs: o("STAMP", {
1774
1658
  business: null,
1775
1659
  noCampaign: !1
1776
1660
  })
@@ -1943,20 +1827,20 @@ const We = {
1943
1827
  }
1944
1828
  }
1945
1829
  };
1946
- t.scaffoldGroup(), p("STAMP", {
1830
+ t.scaffoldGroup(), o("STAMP", {
1947
1831
  business: null,
1948
1832
  noCampaign: !1
1949
1833
  });
1950
1834
  ({
1951
1835
  ...t.scaffoldGroup()
1952
- }, p("VOUCHER", {
1836
+ }, o("VOUCHER", {
1953
1837
  name: "",
1954
1838
  business: null,
1955
1839
  noCampaign: !1
1956
1840
  }));
1957
1841
  ({
1958
1842
  ...t.scaffoldGroup()
1959
- }, p("VOUCHER", {
1843
+ }, o("VOUCHER", {
1960
1844
  name: "",
1961
1845
  business: null,
1962
1846
  noCampaign: !1
@@ -2012,7 +1896,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2012
1896
  });
2013
1897
  ({
2014
1898
  ...t.scaffoldGroup()
2015
- }, p("VOUCHER", {
1899
+ }, o("VOUCHER", {
2016
1900
  name: "",
2017
1901
  business: null,
2018
1902
  noCampaign: !1
@@ -2058,14 +1942,14 @@ t.setRuleToGroup(
2058
1942
  "&&"
2059
1943
  )
2060
1944
  );
2061
- t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
1945
+ t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
2062
1946
  name: "Token",
2063
1947
  business: null,
2064
1948
  noCampaign: !1
2065
1949
  });
2066
1950
  ({
2067
1951
  ...t.scaffoldGroup()
2068
- }, p("VOUCHER", {
1952
+ }, o("VOUCHER", {
2069
1953
  name: "",
2070
1954
  business: null,
2071
1955
  noCampaign: !1
@@ -2094,7 +1978,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2094
1978
  ],
2095
1979
  "&&"
2096
1980
  )
2097
- ]), p("VOUCHER", {
1981
+ ]), o("VOUCHER", {
2098
1982
  name: "",
2099
1983
  business: null,
2100
1984
  noCampaign: !1
@@ -2117,7 +2001,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2117
2001
  ({
2118
2002
  ...t.scaffoldGroup()
2119
2003
  });
2120
- const Z = e.enum([
2004
+ const w = e.enum([
2121
2005
  "MEMBER_REWARD",
2122
2006
  "PAID_LOYALTY",
2123
2007
  "COLLECT_FEEDBACK",
@@ -2127,7 +2011,7 @@ const Z = e.enum([
2127
2011
  "BROADCAST",
2128
2012
  "BIRTHDAY",
2129
2013
  "GAME"
2130
- ]), ee = e.enum([
2014
+ ]), A = e.enum([
2131
2015
  "text",
2132
2016
  "number",
2133
2017
  "textarea",
@@ -2157,114 +2041,114 @@ const Z = e.enum([
2157
2041
  "grab_effect",
2158
2042
  "grab_quota",
2159
2043
  "grab_conditions"
2160
- ]), te = e.object({
2044
+ ]), F = e.object({
2161
2045
  label: e.string().optional(),
2162
2046
  label_locale: e.record(e.string()).nullish(),
2163
2047
  property: e.string().or(e.any()),
2164
- type: ee,
2048
+ type: A,
2165
2049
  extras: e.string().optional(),
2166
2050
  isRuleChildren: e.boolean().optional()
2167
- }), z = e.object({
2051
+ }), u = e.object({
2168
2052
  not: e.boolean().optional(),
2169
2053
  property: e.string(),
2170
2054
  value: e.any()
2171
- }), ae = e.object({
2055
+ }), G = e.object({
2172
2056
  name: e.string().optional(),
2173
2057
  name_locale: e.record(e.string()).nullish(),
2174
- fields: e.array(te),
2175
- condition: z.optional().or(
2176
- e.array(z)
2058
+ fields: e.array(F),
2059
+ condition: u.optional().or(
2060
+ e.array(u)
2177
2061
  )
2178
- }), ne = e.object({
2062
+ }), M = e.object({
2179
2063
  name: e.string(),
2180
2064
  name_locale: e.record(e.string()).nullish(),
2181
- groups: e.array(ae)
2065
+ groups: e.array(G)
2182
2066
  });
2183
2067
  e.object({
2184
- _id: n,
2068
+ _id: a,
2185
2069
  name: e.string(),
2186
2070
  name_locale: e.record(e.string()).nullish(),
2187
2071
  description: e.string().nullish(),
2188
2072
  description_locale: e.record(e.string()).nullish(),
2189
- steps: e.array(ne).min(1),
2190
- intention: e.array(Z),
2073
+ steps: e.array(M).min(1),
2074
+ intention: e.array(w),
2191
2075
  defaultValue: e.any()
2192
2076
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
2193
- const oe = {
2077
+ const k = {
2194
2078
  collectionName: "Businesses",
2195
2079
  transform: {
2196
2080
  _id: "oid"
2197
2081
  }
2198
2082
  };
2199
2083
  e.object({
2200
- _id: n,
2084
+ _id: a,
2201
2085
  ownerId: e.string(),
2202
2086
  name: e.string(),
2203
2087
  credit: e.number(),
2204
2088
  forceSend: e.boolean().optional()
2205
- }).describe(m.describe(oe));
2206
- const v = e.enum(["PHONE"]), ie = e.enum([
2089
+ }).describe(i.describe(k));
2090
+ const y = e.enum(["PHONE"]), B = e.enum([
2207
2091
  "MOCEAN",
2208
2092
  "SLACK",
2209
2093
  "SMS",
2210
2094
  "EMAIL",
2211
2095
  "WHATSAPP"
2212
- ]), le = e.enum(["PENDING", "COMPLETED", "FAILED"]), re = e.enum([
2096
+ ]), V = e.enum(["PENDING", "COMPLETED", "FAILED"]), Y = e.enum([
2213
2097
  "General",
2214
2098
  "Otp",
2215
2099
  "Marketing",
2216
2100
  "Ordering",
2217
2101
  "MemberInvitation",
2218
2102
  "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 = {
2103
+ ]), K = e.object({
2104
+ type: y
2105
+ }), f = K.extend({
2106
+ type: e.literal(y.enum.PHONE),
2107
+ provider: B,
2108
+ usage: Y.optional()
2109
+ }), W = {
2226
2110
  collectionName: "Notifications",
2227
2111
  transform: { _id: "oid", business: "oid" }
2228
2112
  };
2229
2113
  e.object({
2230
- _id: n,
2231
- business: n,
2114
+ _id: a,
2115
+ business: a,
2232
2116
  target: e.string(),
2233
2117
  title: e.string().optional(),
2234
2118
  message: e.string(),
2235
- option: S,
2236
- status: le,
2119
+ option: f,
2120
+ status: V,
2237
2121
  ref: e.string().optional()
2238
- }).describe(m.describe(pe));
2239
- const me = e.object({
2122
+ }).describe(i.describe(W));
2123
+ const X = e.object({
2240
2124
  target: e.string(),
2241
2125
  title: e.string().optional(),
2242
2126
  message: e.string(),
2243
- option: S,
2127
+ option: f,
2244
2128
  ref: e.string().optional()
2245
2129
  });
2246
2130
  e.object({
2247
2131
  campaignId: e.string(),
2248
- notification: me,
2132
+ notification: X,
2249
2133
  business: e.string()
2250
2134
  });
2251
2135
  e.object({
2252
2136
  phone: e.string(),
2253
2137
  message: e.string()
2254
2138
  });
2255
- const C = e.object({
2139
+ const _ = e.object({
2256
2140
  name: e.string().optional(),
2257
2141
  address: e.string()
2258
- }), se = e.object({
2142
+ }), q = e.object({
2259
2143
  filename: e.string(),
2260
2144
  content: e.instanceof(Uint8Array)
2261
2145
  });
2262
2146
  e.object({
2263
- from: C.optional(),
2264
- to: e.array(C),
2147
+ from: _.optional(),
2148
+ to: e.array(_),
2265
2149
  subject: e.string(),
2266
2150
  html: e.string().optional(),
2267
- attachments: e.array(se).optional()
2151
+ attachments: e.array(q).optional()
2268
2152
  });
2269
2153
  e.object({
2270
2154
  subject: e.string(),
@@ -2304,7 +2188,7 @@ e.object({
2304
2188
  billId: e.string()
2305
2189
  });
2306
2190
  e.object({
2307
- amount: L,
2191
+ amount: U,
2308
2192
  member: e.string(),
2309
2193
  bill: e.string(),
2310
2194
  otp: e.string().nullish(),
@@ -2313,15 +2197,15 @@ e.object({
2313
2197
  e.object({
2314
2198
  orderId: e.string()
2315
2199
  });
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);
2200
+ var b = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(b || {});
2201
+ e.nativeEnum(b);
2318
2202
  e.enum(["manage", "create", "read", "update", "delete"]);
2319
2203
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2320
2204
  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);
2205
+ 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 || {});
2206
+ e.nativeEnum(H);
2323
2207
  e.enum(["restaurant"]);
2324
- const ge = e.object({
2208
+ const Q = e.object({
2325
2209
  label: e.string(),
2326
2210
  subject: e.union([e.string(), e.array(e.string())]),
2327
2211
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2331,41 +2215,41 @@ const ge = e.object({
2331
2215
  reason: e.string().optional()
2332
2216
  });
2333
2217
  e.object({
2334
- _id: n,
2218
+ _id: a,
2335
2219
  businessId: e.string(),
2336
2220
  userId: e.string(),
2337
2221
  email: e.string().nullish(),
2338
2222
  phoneNo: e.string().nullish(),
2339
- permissions: e.array(e.lazy(() => ge))
2223
+ permissions: e.array(e.lazy(() => Q))
2340
2224
  }).describe(
2341
- m.describe({
2225
+ i.describe({
2342
2226
  collectionName: "PermissionUsers",
2343
2227
  transform: {
2344
2228
  _id: "oid"
2345
2229
  }
2346
2230
  })
2347
2231
  );
2348
- const P = e.object({
2232
+ const z = e.object({
2349
2233
  userId: e.string(),
2350
2234
  level: e.number(),
2351
2235
  role: e.string().optional(),
2352
2236
  businessId: e.string().optional(),
2353
2237
  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())));
2238
+ }), Z = e.function().args(e.any(), z).returns(e.boolean()), $ = e.function().args(z).returns(e.promise(e.array(e.any())));
2355
2239
  e.object({
2356
- isAdmin: de,
2357
- getRules: ue
2240
+ isAdmin: Z,
2241
+ getRules: $
2358
2242
  });
2359
2243
  e.object({
2360
- transactions: e.array(D),
2361
- collections: e.array(w)
2244
+ transactions: e.array(j),
2245
+ collections: e.array(J)
2362
2246
  });
2363
- const j = e.enum([
2247
+ const C = e.enum([
2364
2248
  "ROCK_PAPER_SCISSOR"
2365
2249
  ]);
2366
- j.enum.ROCK_PAPER_SCISSOR + "";
2250
+ C.enum.ROCK_PAPER_SCISSOR + "";
2367
2251
  e.object({
2368
- type: j
2252
+ type: C
2369
2253
  });
2370
2254
  e.object({
2371
2255
  host: e.string().url(),
@@ -2374,7 +2258,7 @@ e.object({
2374
2258
  roomId: e.string()
2375
2259
  });
2376
2260
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
2377
- const he = {
2261
+ const ee = {
2378
2262
  collectionName: "MarketingMaterials",
2379
2263
  transform: {
2380
2264
  _id: "oid",
@@ -2382,13 +2266,13 @@ const he = {
2382
2266
  }
2383
2267
  };
2384
2268
  e.object({
2385
- _id: n,
2386
- business: n,
2269
+ _id: a,
2270
+ business: a,
2387
2271
  imageUrl: e.string().url(),
2388
2272
  headline: e.string(),
2389
2273
  caption: e.string(),
2390
2274
  editedAt: e.coerce.date()
2391
- }).describe(m.describe(he));
2275
+ }).describe(i.describe(ee));
2392
2276
  e.object({
2393
2277
  id: e.number(),
2394
2278
  name: e.string(),
@@ -2408,12 +2292,12 @@ e.object({
2408
2292
  phone: e.string().optional(),
2409
2293
  email: e.string().optional()
2410
2294
  });
2411
- const _e = e.enum([
2295
+ const te = e.enum([
2412
2296
  "PENDING",
2413
2297
  "SUCCESS",
2414
2298
  "FAILED",
2415
2299
  "RETRYING"
2416
- ]), ye = {
2300
+ ]), ae = {
2417
2301
  collectionName: "WebhookLogs",
2418
2302
  transform: {
2419
2303
  _id: "oid",
@@ -2421,39 +2305,39 @@ const _e = e.enum([
2421
2305
  }
2422
2306
  };
2423
2307
  e.object({
2424
- _id: n,
2425
- business: n,
2308
+ _id: a,
2309
+ business: a,
2426
2310
  type: e.string(),
2427
2311
  payload: e.record(e.any()),
2428
- status: _e,
2312
+ status: te,
2429
2313
  response: e.any().optional(),
2430
2314
  error: e.string().optional()
2431
- }).describe(m.describe(ye));
2432
- const fe = e.enum(["AUTO", "MANUAL"]);
2315
+ }).describe(i.describe(ae));
2316
+ const ne = e.enum(["AUTO", "MANUAL"]);
2433
2317
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2434
- const J = e.object({
2435
- _id: n,
2318
+ const T = e.object({
2319
+ _id: a,
2436
2320
  name: e.string().min(1, "Name is required").max(50),
2437
- type: fe,
2438
- event: A.optional()
2439
- }), be = e.object({
2321
+ type: ne,
2322
+ event: O.optional()
2323
+ }), oe = e.object({
2440
2324
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2441
2325
  to: e.number().int("Must be integer").nullish()
2442
- }).superRefine((o, a) => {
2443
- o.from && o.to && o.from > o.to && a.addIssue({
2326
+ }).superRefine((n, N) => {
2327
+ n.from && n.to && n.from > n.to && N.addIssue({
2444
2328
  code: "custom",
2445
2329
  message: "Max referral count must be more than min referral count"
2446
2330
  });
2447
- }), He = e.object({
2448
- threshold: be,
2449
- rewards: e.array(n),
2450
- pf_reward: e.array(f).optional()
2451
- }), b = e.object({
2331
+ }), ie = e.object({
2332
+ threshold: oe,
2333
+ rewards: e.array(a),
2334
+ pf_reward: e.array(d).optional()
2335
+ }), h = e.object({
2452
2336
  id: e.string(),
2453
2337
  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 = {
2338
+ rule: E.optional(),
2339
+ rewards: e.array(ie)
2340
+ }), le = {
2457
2341
  collectionName: "ReferralRecords",
2458
2342
  transform: {
2459
2343
  _id: "oid",
@@ -2462,25 +2346,25 @@ const J = e.object({
2462
2346
  referee: "oid",
2463
2347
  refereeReward: "oid"
2464
2348
  }
2465
- }, Ce = e.object({
2349
+ }, re = e.object({
2466
2350
  completedAt: e.coerce.date(),
2467
- criteria: n,
2351
+ criteria: a,
2468
2352
  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),
2353
+ }), ce = e.object({
2354
+ _id: a,
2355
+ business: a,
2356
+ referer: a,
2357
+ referee: a,
2358
+ criteria: e.array(T),
2359
+ reward: e.array(h),
2360
+ refereeReward: e.array(a).optional(),
2361
+ criteria_progress: e.array(re),
2478
2362
  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({
2363
+ pf_referer: r.optional(),
2364
+ pf_referee: r.optional(),
2365
+ pf_refereeReward: e.array(d).optional()
2366
+ }).describe(i.describe(le));
2367
+ ce.pick({
2484
2368
  _id: !0,
2485
2369
  business: !0,
2486
2370
  referer: !0,
@@ -2488,79 +2372,79 @@ Te.pick({
2488
2372
  criteria_progress: !0,
2489
2373
  criteria: !0
2490
2374
  }).extend({
2491
- pf_referee: g.pick({
2375
+ pf_referee: r.pick({
2492
2376
  _id: !0,
2493
2377
  name: !0,
2494
2378
  phoneNumber: !0,
2495
2379
  photoUrl: !0
2496
2380
  })
2497
2381
  });
2498
- const ve = {
2382
+ const pe = {
2499
2383
  collectionName: "ReferralProgram",
2500
2384
  transform: {
2501
2385
  _id: "oid",
2502
2386
  business: "oid"
2503
2387
  }
2504
- }, E = e.object({
2505
- _id: n,
2506
- business: n,
2388
+ }, v = e.object({
2389
+ _id: a,
2390
+ business: a,
2507
2391
  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));
2392
+ refereeReward: e.array(a).optional(),
2393
+ reward: e.array(h),
2394
+ criteria: e.array(T)
2395
+ }).describe(i.describe(pe));
2512
2396
  e.object({
2513
- referer: n,
2514
- referee: n,
2515
- business: n
2397
+ referer: a,
2398
+ referee: a,
2399
+ business: a
2516
2400
  });
2517
2401
  e.object({
2518
- program: E.pick({
2402
+ program: v.pick({
2519
2403
  _id: !0,
2520
2404
  business: !0,
2521
2405
  term_and_condition: !0
2522
2406
  }).extend({
2523
- reward: b.optional(),
2524
- pf_refereeReward: e.array(f).optional()
2407
+ reward: h.optional(),
2408
+ pf_refereeReward: e.array(d).optional()
2525
2409
  }),
2526
2410
  referralCount: e.number(),
2527
2411
  successReferralCount: e.number(),
2528
- referredBy: g.pick({
2412
+ referredBy: r.pick({
2529
2413
  _id: !0,
2530
2414
  name: !0,
2531
2415
  phoneNumber: !0,
2532
2416
  photoUrl: !0
2533
2417
  }).optional()
2534
2418
  });
2535
- E.extend({
2419
+ v.extend({
2536
2420
  updateReferralRecord: e.boolean().optional()
2537
2421
  });
2538
- const Se = e.object({
2422
+ const me = e.object({
2539
2423
  facebookPageId: e.string(),
2540
2424
  pageName: e.string(),
2541
2425
  pageProfileImageUrl: e.string(),
2542
2426
  pageAccessToken: e.string().optional(),
2543
- locationIds: e.array(n)
2544
- }), Ne = e.object({
2545
- locationId: n.nullable(),
2427
+ locationIds: e.array(a)
2428
+ }), se = e.object({
2429
+ locationId: a.nullable(),
2546
2430
  googleLocationName: e.string(),
2547
2431
  displayName: e.string().optional()
2548
- }), Ue = e.object({
2432
+ }), ge = e.object({
2549
2433
  accessToken: e.string().nullable(),
2550
2434
  refreshToken: e.string().nullable(),
2551
2435
  accessTokenExpiresAt: e.date().nullable(),
2552
- locations: e.array(Ne)
2553
- }), Pe = e.object({
2436
+ locations: e.array(se)
2437
+ }), de = e.object({
2554
2438
  token: e.string().nullable(),
2555
- pages: e.array(Se)
2439
+ pages: e.array(me)
2556
2440
  });
2557
2441
  e.object({
2558
- _id: n,
2559
- businessId: n,
2560
- google: Ue.nullable(),
2561
- facebook: Pe.nullable()
2442
+ _id: a,
2443
+ businessId: a,
2444
+ google: ge.nullable(),
2445
+ facebook: de.nullable()
2562
2446
  }).describe(
2563
- m.describe({
2447
+ i.describe({
2564
2448
  collectionName: "ReviewSourceConfig",
2565
2449
  transform: {
2566
2450
  _id: "oid",
@@ -2618,101 +2502,115 @@ e.object({
2618
2502
  )
2619
2503
  }).nullable()
2620
2504
  });
2621
- const O = e.object({
2505
+ const c = e.object({
2622
2506
  name: e.string(),
2623
- pictureUrl: e.string()
2624
- }), je = O.extend({
2507
+ pictureUrl: e.string(),
2508
+ phoneNumber: e.string().optional()
2509
+ }), he = c.extend({
2625
2510
  isAnonymous: e.boolean().optional()
2626
- }), Je = O.extend({
2511
+ }), ue = c.extend({
2627
2512
  id: e.string().optional()
2628
- }), d = e.object({
2513
+ }), p = e.object({
2629
2514
  comment: e.string(),
2630
2515
  updateTime: e.coerce.date()
2631
- }), s = e.object({
2516
+ });
2517
+ e.object({
2518
+ comment: e.string().trim().min(1).max(4096)
2519
+ });
2520
+ const l = e.object({
2632
2521
  externalId: e.string().optional(),
2633
2522
  thumbnailUrl: e.string(),
2634
2523
  thumbnailLabel: e.string(),
2635
2524
  videoUrl: e.string().optional()
2636
- }), Ee = {
2525
+ }), _e = {
2637
2526
  collectionName: "Reviews",
2638
2527
  transform: {
2639
2528
  _id: "oid",
2529
+ businessId: "oid",
2640
2530
  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
- }
2531
+ restaurantId: "oid"
2652
2532
  }
2653
- }, I = e.enum([
2533
+ }, S = e.enum([
2654
2534
  "google",
2655
2535
  "facebook",
2656
2536
  "feedme",
2657
2537
  "feedvibe"
2658
2538
  ]);
2659
- I.options;
2539
+ S.options;
2660
2540
  e.enum(["google", "facebook"]);
2661
- const Oe = e.enum([
2541
+ const ye = e.enum([
2662
2542
  "createTime_desc",
2663
2543
  "createTime_asc",
2664
2544
  "rating_asc",
2665
2545
  "rating_desc"
2666
2546
  ]);
2667
2547
  e.object({
2668
- source: I.array().optional(),
2669
- dateFrom: e.coerce.date().optional(),
2670
- dateTo: e.coerce.date().optional(),
2548
+ source: S.array().optional(),
2549
+ dateFrom: e.string().datetime({ offset: !0 }).optional(),
2550
+ dateTo: e.string().datetime({ offset: !0 }).optional(),
2671
2551
  locationId: e.string().optional(),
2672
- sort: Oe.optional(),
2552
+ excludeDeleted: e.boolean().optional(),
2553
+ sort: ye.optional(),
2673
2554
  limit: e.coerce.number().int().positive().optional(),
2674
2555
  skip: e.coerce.number().int().min(0).optional()
2675
2556
  });
2676
- const R = e.object({
2557
+ const Ae = e.object({
2558
+ averageScore: e.number(),
2559
+ total: e.number().int().nonnegative(),
2560
+ starCounts: e.array(
2561
+ e.object({
2562
+ star: e.number().int().min(1).max(5),
2563
+ count: e.number().int().nonnegative()
2564
+ })
2565
+ )
2566
+ }), m = e.object({
2677
2567
  name: e.string(),
2678
- pictureUrl: e.string()
2679
- }), Ie = R.extend({
2568
+ pictureUrl: e.string().optional(),
2569
+ phoneNumber: e.string().optional()
2570
+ }), fe = m.extend({
2571
+ _id: e.string().optional()
2572
+ }), be = m.extend({
2573
+ _id: e.string()
2574
+ }), He = m.extend({
2680
2575
  isAnonymous: e.boolean().optional()
2681
- }), Re = R.extend({
2576
+ }), ze = m.extend({
2682
2577
  id: e.string().optional()
2683
- }), u = e.object({
2684
- _id: n,
2578
+ }), s = e.object({
2579
+ _id: a,
2685
2580
  comment: e.string(),
2686
2581
  createTime: e.coerce.date(),
2687
- locationId: n
2688
- }), Le = u.extend({
2582
+ updateTime: e.coerce.date().nullish(),
2583
+ restaurantId: a,
2584
+ restaurantName: e.string()
2585
+ }), Ce = s.extend({
2689
2586
  source: e.literal("google"),
2690
2587
  externalId: e.string().min(1),
2691
- reviewer: Ie.optional(),
2692
- reply: d.optional(),
2693
- mediaItems: e.array(s),
2588
+ translatedComment: e.string().optional(),
2589
+ reviewer: He.optional(),
2590
+ reply: p.optional(),
2591
+ mediaItems: e.array(l),
2694
2592
  starRating: e.number(),
2695
2593
  locationName: e.string(),
2696
- locationDisplayName: e.string()
2697
- }), xe = u.extend({
2594
+ locationDisplayName: e.string(),
2595
+ originalUrl: e.string().optional()
2596
+ }), Te = s.extend({
2698
2597
  source: e.literal("facebook"),
2699
2598
  externalId: e.string().min(1),
2700
- reviewer: Re.optional(),
2599
+ reviewer: ze.optional(),
2701
2600
  isPositive: e.boolean().optional(),
2702
2601
  pageId: e.string(),
2703
2602
  pageName: e.string()
2704
- }), De = u.extend({
2603
+ }), ve = s.extend({
2705
2604
  source: e.literal("feedme"),
2706
- reviewer: T,
2707
- reply: d.optional(),
2605
+ reviewer: fe.optional(),
2606
+ reply: p.optional(),
2708
2607
  starRating: e.number(),
2709
- location: G.optional(),
2710
- mediaItems: e.array(s),
2608
+ mediaItems: e.array(l),
2711
2609
  billId: e.string()
2712
- }), we = u.extend({
2610
+ }), Se = s.extend({
2713
2611
  source: e.literal("feedvibe"),
2714
2612
  externalId: e.string().min(1),
2715
- reviewer: T.optional(),
2613
+ reviewer: be.optional(),
2716
2614
  rating: e.object({
2717
2615
  overall: e.number(),
2718
2616
  food: e.number(),
@@ -2720,58 +2618,66 @@ const R = e.object({
2720
2618
  atmosphere: e.number()
2721
2619
  }),
2722
2620
  verified: e.boolean(),
2723
- mediaItems: e.array(s).default([])
2621
+ mediaItems: e.array(l).default([])
2724
2622
  });
2725
2623
  e.discriminatedUnion("source", [
2726
- Le,
2727
- xe,
2728
- De,
2729
- we
2624
+ Ce,
2625
+ Te,
2626
+ ve,
2627
+ Se
2730
2628
  ]);
2731
2629
  e.object({
2732
2630
  comment: e.string(),
2733
2631
  starRating: e.number(),
2734
2632
  billId: e.string(),
2735
- mediaItems: e.array(s).optional()
2633
+ isAnonymous: e.boolean(),
2634
+ mediaItems: e.array(l).optional()
2635
+ });
2636
+ e.object({
2637
+ name: e.string().trim().min(1),
2638
+ phoneNumber: e.string().trim().min(1).optional()
2736
2639
  });
2737
- const h = e.object({
2738
- _id: n,
2640
+ const g = e.object({
2641
+ _id: a,
2642
+ businessId: a,
2739
2643
  comment: e.string(),
2740
2644
  createTime: e.coerce.date(),
2741
- // The marketing Location the review belongs to. For feedme reviews this is
2742
- // the restaurantId (Location._id === restaurantId); for google/facebook it
2743
- // is resolved from the review-source location/page mapping at sync time.
2744
- locationId: n
2745
- }), Ae = h.extend({
2645
+ updateTime: e.coerce.date().nullish(),
2646
+ restaurantId: a,
2647
+ restaurantName: e.string(),
2648
+ deletedAt: e.coerce.date().optional()
2649
+ }), Ne = g.extend({
2746
2650
  source: e.literal("google"),
2747
2651
  externalId: e.string().min(1),
2748
- reviewer: je.optional(),
2749
- reply: d.optional(),
2750
- mediaItems: e.array(s),
2652
+ translatedComment: e.string().optional(),
2653
+ reviewer: he.optional(),
2654
+ reply: p.optional(),
2655
+ mediaItems: e.array(l),
2751
2656
  starRating: e.number(),
2752
2657
  locationName: e.string(),
2753
- locationDisplayName: e.string()
2754
- }), Ge = h.extend({
2658
+ locationDisplayName: e.string(),
2659
+ originalUrl: e.string().optional()
2660
+ }), Ue = g.extend({
2755
2661
  source: e.literal("facebook"),
2756
2662
  externalId: e.string().min(1),
2757
- reviewer: Je.optional(),
2663
+ reviewer: ue.optional(),
2758
2664
  isPositive: e.boolean().optional(),
2759
2665
  pageId: e.string(),
2760
2666
  pageName: e.string()
2761
- }), Me = h.extend({
2667
+ }), Pe = g.extend({
2762
2668
  source: e.literal("feedme"),
2763
- reviewerId: n,
2764
- reviewer: e.any().optional(),
2765
- reply: d.optional(),
2669
+ isAnonymous: e.boolean(),
2670
+ reviewerId: a.optional(),
2671
+ reviewer: c.optional(),
2672
+ reply: p.optional(),
2766
2673
  starRating: e.number(),
2767
2674
  billId: e.string(),
2768
- location: e.any().optional(),
2769
- mediaItems: e.array(s)
2770
- }), Fe = h.extend({
2675
+ mediaItems: e.array(l)
2676
+ }), je = g.extend({
2771
2677
  source: e.literal("feedvibe"),
2772
2678
  externalId: e.string().min(1),
2773
- reviewerId: n,
2774
- reviewer: e.any().optional(),
2679
+ reviewerId: a,
2680
+ reviewer: c,
2775
2681
  rating: e.object({
2776
2682
  overall: e.number(),
2777
2683
  food: e.number(),
@@ -2779,24 +2685,22 @@ const h = e.object({
2779
2685
  atmosphere: e.number()
2780
2686
  }),
2781
2687
  verified: e.boolean(),
2782
- mediaItems: e.array(s).default([])
2688
+ mediaItems: e.array(l).default([])
2783
2689
  });
2784
2690
  e.discriminatedUnion("source", [
2785
- Ae,
2786
- Ge,
2787
- Me,
2788
- Fe
2789
- ]).describe(m.describe(Ee));
2691
+ Ne,
2692
+ Ue,
2693
+ Pe,
2694
+ je
2695
+ ]).describe(i.describe(_e));
2790
2696
  export {
2791
- Z as F,
2792
- t as R,
2793
- We as T,
2794
- k as a,
2795
- He as b,
2796
- J as c,
2797
- b as d,
2798
- X as e,
2799
- q as f,
2800
- y as i,
2801
- Y as s
2697
+ w as F,
2698
+ we as T,
2699
+ ie as a,
2700
+ T as b,
2701
+ h as c,
2702
+ R as d,
2703
+ L as e,
2704
+ Ae as f,
2705
+ p as g
2802
2706
  };