@feedmepos/mf-connect 0.1.98-beta.7 → 0.1.98-beta.72

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 (152) hide show
  1. package/dist/{App-BonFFUVJ.js → App-DpYceiwG.js} +812 -666
  2. package/dist/{AuditLogs-CaQisyMC.js → AuditLogs-CG98b2qE.js} +14 -13
  3. package/dist/{Bin-Mu8gAiHw.js → Bin-vdipv2fF.js} +8 -8
  4. package/dist/Broadcast-ChwVqheE.js +303 -0
  5. package/dist/CampaignAnalytic-4PHO849x.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BoLZVrCU.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DmnN4pjm.js} +6 -5
  7. package/dist/Card-B6ol3PQw.js +1084 -0
  8. package/dist/{Collections-CByXxRW_.js → Collections-DodNIUr1.js} +14 -13
  9. package/dist/Credit-CJQyAZYw.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang--FqHJ7Ez.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CA31QP-A.js +4277 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BXsAX1Xa.js → EffectSheet.vue_vue_type_style_index_0_lang-DkKhdp7G.js} +35 -35
  13. package/dist/{Experience-B7J-aqPK.js → Experience-iLAKddx_.js} +112 -86
  14. package/dist/{FileSaver.min-D_F_MSZt.js → FileSaver.min-w_ExQ0py.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-DWdUbsAg.js +356 -0
  17. package/dist/GiftCardSetup-DnQ5vwxu.js +736 -0
  18. package/dist/{Grab-C45MmlD9.js → Grab-CFLRHs5w.js} +33 -32
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-CPPcB3PC.js → ImageInput.vue_vue_type_script_setup_true_lang-uQJvjvTe.js} +1 -1
  20. package/dist/{Index-vQ6uP49O.js → Index-CUy4z2tS.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-Cj3hN3tg.js → LocationPicker.vue_vue_type_script_setup_true_lang-hKJ41Fe_.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-DU9eIein.js → LottieAnimation.vue_vue_type_script_setup_true_lang-BDmtqTVC.js} +1 -1
  23. package/dist/LoyaltyDashboard-C5o7KriA.js +2865 -0
  24. package/dist/MainLayout-Dt0ywph3.js +143 -0
  25. package/dist/{Marketing-B6xMdQvW.js → Marketing-BHwxzBZ0.js} +7 -6
  26. package/dist/{MarketingMaterialEdit-0cZN4bek.js → MarketingMaterialEdit-B6k4ceGx.js} +15 -14
  27. package/dist/Member-DcPZfTj6.js +654 -0
  28. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-CiiBrlHY.js +1279 -0
  29. package/dist/MemberImportHistory-DmPMuu1g.js +187 -0
  30. package/dist/MemberList-f9JejfNW.js +334 -0
  31. package/dist/{MemberTransactions-Bg-ziZy8.js → MemberTransactions-D1YSXeX-.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-jbDJkbZh.js → MessageInput.vue_vue_type_script_setup_true_lang-freeE-DP.js} +5928 -5644
  33. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-m7ytg0ok.js +40 -0
  34. package/dist/Mission-BaaEl5BV.js +360 -0
  35. package/dist/Overview-CviY55Gs.js +1316 -0
  36. package/dist/{Overview-nsyJGSCq.js → Overview-fx-0E3b8.js} +21 -20
  37. package/dist/Point-BfqtflbC.js +288 -0
  38. package/dist/Promotion-Be2ogRYt.js +423 -0
  39. package/dist/{Queue-Dkipt6fw.js → Queue-CLSUL-Cx.js} +14 -13
  40. package/dist/{Record-BFqx6vM-.js → Record-CpTMQT7B.js} +9 -9
  41. package/dist/Review-DzSDx7dY.js +45 -0
  42. package/dist/ReviewFacebookCallback-CvbPJADM.js +238 -0
  43. package/dist/ReviewGoogleCallback-DJlqMbh3.js +213 -0
  44. package/dist/{Reward-DjFEE7I_.js → Reward-DJOmd6Z5.js} +35 -35
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BzZ6VH80.js → RewardGroup.vue_vue_type_script_setup_true_lang-DY9fYxwc.js} +14 -13
  46. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-A9jQX4jt.js → RuleGroup.vue_vue_type_script_setup_true_lang-BgYK4hpo.js} +196 -186
  47. package/dist/{Segment-BAjdUfZ6.js → Segment-G6xmeEaq.js} +275 -276
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-CAQPFzRH.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-C3O0biLZ.js} +37 -36
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-Gkz8jhES.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CWP5sGT7.js} +4 -4
  50. package/dist/{Setting-BK7y0XC-.js → Setting-CKp441AW.js} +14 -14
  51. package/dist/{SettingAdvertisements-DfQ645xr.js → SettingAdvertisements-C4Uf-DgK.js} +12 -12
  52. package/dist/Settings-CTvMVwp6.js +230 -0
  53. package/dist/Store-Bzei6Xev.js +2612 -0
  54. package/dist/{StoreRewards-usHKOGmB.js → StoreRewards-DMQNIpF5.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-mm1jbcvo.js +1329 -0
  56. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DrcWUZuR.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BspBXIO2.js} +2 -2
  57. package/dist/{Tier-BF3V430O.js → Tier-BN32RwYr.js} +2580 -754
  58. package/dist/{Title-DwPuqKfJ.js → Title-BIhgfRUI.js} +39 -37
  59. package/dist/Transaction-CPjA7IN9.js +45 -0
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-DToNRTJS.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-DSutMvfk.js} +26 -26
  61. package/dist/{Voucher-DnhVIl_o.js → Voucher-CGJtn9bC.js} +156 -133
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-Btb3UZCn.js → VoucherEditor.vue_vue_type_script_setup_true_lang-B-IwtPvx.js} +118 -124
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-EFUW9DMY.js → ZodTextField.vue_vue_type_script_setup_true_lang-Ce9xPwqA.js} +2 -2
  64. package/dist/{app-i3r-6ZVm.js → app-DAtx6aZ4.js} +45039 -37428
  65. package/dist/app.js +1 -1
  66. package/dist/base.export-BtRC4aWM.js +75 -0
  67. package/dist/{business-i0Gxk7gG.js → business-BZUIs8Ub.js} +5 -5
  68. package/dist/campaign-B6I6PuY4.js +100 -0
  69. package/dist/campaign-DKjBjV2k.js +398 -0
  70. package/dist/{campaign.enum-CbUTfxek.js → campaign.enum-BQy3e845.js} +1 -1
  71. package/dist/{campaign.fn-BjHSIDd1.js → campaign.fn--qVJ3jeH.js} +77 -77
  72. package/dist/{collectible.enum-DN7E_kHg.js → collectible.enum-vcvRFGl0.js} +1 -1
  73. package/dist/collection.fn-C3bMPBkC.js +26 -0
  74. package/dist/currency--R6VPInw.js +7 -0
  75. package/dist/{duplicateCampaign-DmdJQEIA.js → duplicateCampaign-aIsX9cCi.js} +11 -11
  76. package/dist/{effect-DM4AzeQl.js → effect-CbjmtRph.js} +1 -1
  77. package/dist/{email-addresses-BlqVJhwZ.js → email-addresses-DZKMnoKf.js} +209 -201
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkdISSVP.js → helper-BGqw2-RO.js} +1 -1
  80. package/dist/index-7TKoSEJ2.js +14550 -0
  81. package/dist/index-B9DM5Vuv.js +32437 -0
  82. package/dist/index-BWlfW4Kr.js +137 -0
  83. package/dist/{index-Cl8t41Sk.js → index-Bb4TieR_.js} +5 -5
  84. package/dist/{index-D6qeYVNz.js → index-BbpqZrkB.js} +1 -1
  85. package/dist/{index-4EtrCy_K.js → index-C22GPEM-.js} +4 -4
  86. package/dist/{index-FD50UHqf.js → index-CVYbfRGO.js} +105 -123
  87. package/dist/index-CVvSd60O.js +53 -0
  88. package/dist/{index-vI-ndGu_.js → index-CXL5WAH0.js} +5 -5
  89. package/dist/{index-B6xi1soU.js → index-ClP7Xy6Q.js} +1 -1
  90. package/dist/{index-BWsj6lCJ.js → index-D-P90w8K.js} +14 -14
  91. package/dist/{index-CxdLExX0.js → index-D_o9LsHU.js} +24 -9
  92. package/dist/{index-BrboOmPq.js → index-DcA0B-Y5.js} +347 -216
  93. package/dist/index-FnsjvtSo.js +901 -0
  94. package/dist/{index-DgzNGQgE.js → index-LlFZ5kxi.js} +2083 -2559
  95. package/dist/{index-CB7ytKOE.js → index-LnCoUCnx.js} +1588 -1522
  96. package/dist/index-kkhrPH6s.js +151 -0
  97. package/dist/index-v8Zv-2ko.js +72 -0
  98. package/dist/{index.esm2017-BX5CyKoc.js → index.esm2017-DO7bbE7J.js} +132 -132
  99. package/dist/{loading-DTKDhqew.js → loading-CzWOx4tE.js} +1 -1
  100. package/dist/{lodash-CCPBsqhe.js → lodash-B_gr6Ayu.js} +1 -1
  101. package/dist/member-import-BxCrd9tq.js +187 -0
  102. package/dist/membership-ILB4aB4h.js +274 -0
  103. package/dist/{money-wMK3QkZ5.js → money-CpIK1N_r.js} +1 -1
  104. package/dist/{number-DjKVlWn0.js → number-leVwmDCm.js} +1 -1
  105. package/dist/objectid-8hKuNcMN.js +145 -0
  106. package/dist/{plugins-D25PaNJk.js → plugins-DLIgnFIF.js} +13 -12
  107. package/dist/remy-Qz_pNsUS.js +13 -0
  108. package/dist/{reward-E63jqJHm.js → reward-DqT0zF01.js} +1 -1
  109. package/dist/{rule-RVvPtAnk.js → rule-DBtMGLxD.js} +335 -275
  110. package/dist/style.css +1 -1
  111. package/dist/{template-zNxOQaqe.js → template-CYKGCWY4.js} +6 -6
  112. package/dist/timezone-Brs5nrTL.js +20 -0
  113. package/dist/transaction.fn-0ZZcVp-j.js +71 -0
  114. package/dist/{trigger-BXV02FhP.js → trigger-LhNre1L9.js} +17 -17
  115. package/dist/useMarketingMaterialActions-DbDRMmhM.js +96 -0
  116. package/dist/{usePagination-BPcPhEnp.js → usePagination-DmZX0V64.js} +1 -1
  117. package/dist/{user-Bd8S7R5u.js → user-CBPsvnx9.js} +1 -1
  118. package/dist/vue-i18n-BPeSHE3c.js +2365 -0
  119. package/dist/{xlsx-_tQC9Ezf.js → xlsx-Cm3vGmLN.js} +440 -440
  120. package/dist/{zod-C1j2GLZP.js → zod-GTEcy37q.js} +1 -1
  121. package/package.json +10 -6
  122. package/dist/Broadcast-Cy-i-WOT.js +0 -266
  123. package/dist/Card-f2XOtWxp.js +0 -910
  124. package/dist/Credit-CcZF4aQS.js +0 -260
  125. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-C7KZ8GMx.js +0 -3377
  127. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  128. package/dist/Game-CUW7NeVG.js +0 -330
  129. package/dist/LoyaltyDashboard-GqyUwvXz.js +0 -1082
  130. package/dist/MainLayout-R5NxIBR-.js +0 -41
  131. package/dist/Member-CC5F6Bmz.js +0 -280
  132. package/dist/MemberList-Cq4zxopX.js +0 -1601
  133. package/dist/Mission-DcCZ6tAG.js +0 -334
  134. package/dist/Point-D1vLd5hL.js +0 -262
  135. package/dist/Promotion-Cv7MW5RJ.js +0 -397
  136. package/dist/Review-CKhakUMe.js +0 -1123
  137. package/dist/ReviewFacebookCallback-xgRpXQAg.js +0 -243
  138. package/dist/ReviewGoogleCallback-Cqi_43qi.js +0 -208
  139. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DDqK4kV1.js +0 -181
  140. package/dist/Store-uTRQ6KbC.js +0 -1996
  141. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Bb2sTsuA.js +0 -1130
  142. package/dist/Transaction-CnTEfMGU.js +0 -39
  143. package/dist/campaign-CbMlARNI.js +0 -219
  144. package/dist/campaign-f7FT91GR.js +0 -277
  145. package/dist/export-DQR-0lmK.js +0 -97
  146. package/dist/index-COrXX9MR.js +0 -52
  147. package/dist/index-CWiaP-aV.js +0 -28900
  148. package/dist/index-jVfDVEtz.js +0 -85
  149. package/dist/membership-rifuatxU.js +0 -255
  150. package/dist/objectid-DjpWkCxH.js +0 -145
  151. package/dist/useMarketingMaterialActions-5TFNqZVo.js +0 -107
  152. package/dist/vue-i18n-CgMK-TaC.js +0 -2365
@@ -1,38 +1,40 @@
1
- import { z as e, F as n, m, a as L } from "./index-Cl8t41Sk.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-DgzNGQgE.js";
3
- import { _ as M, l as H, a as F } from "./index-CB7ytKOE.js";
4
- import { i as p } from "./helper-CkdISSVP.js";
5
- import { a as f } from "./index-vI-ndGu_.js";
6
- function _(o, a) {
1
+ import { z as e, F as n, m, b as A } from "./index-Bb4TieR_.js";
2
+ import { C as F, E as M, H as G, I as g } from "./index-LlFZ5kxi.js";
3
+ import { _ as k, l as v, f as B } from "./index-LnCoUCnx.js";
4
+ import { i as p } from "./helper-BGqw2-RO.js";
5
+ import { d as z, b as U, e as d } from "./index-7TKoSEJ2.js";
6
+ import { d as V } from "./index-FnsjvtSo.js";
7
+ import { F as T } from "./index-CXL5WAH0.js";
8
+ function b(o, a) {
7
9
  let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
8
10
  const l = r.length;
9
11
  for (let c = 0; c < o; c++)
10
12
  i += r.charAt(Math.floor(Math.random() * l));
11
13
  return i;
12
14
  }
13
- function y(o) {
15
+ function H(o) {
14
16
  return !o.property && "rules" in o;
15
17
  }
16
- function k(o) {
18
+ function Y(o) {
17
19
  return "property" in o && !!o.property;
18
20
  }
19
- const B = "g_schedule";
20
- function V(o) {
21
+ const W = "g_schedule";
22
+ function K(o) {
21
23
  return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
22
24
  `).trim();
23
25
  }
24
- function Y(o, a = !1) {
25
- const i = M.cloneDeep(o);
26
- if (k(i)) {
26
+ function q(o, a = !1) {
27
+ const i = k.cloneDeep(o);
28
+ if (Y(i)) {
27
29
  const r = i.conditions;
28
- return !a && r && typeof r._rrule == "string" && (r._rrule = V(
30
+ return !a && r && typeof r._rrule == "string" && (r._rrule = K(
29
31
  r._rrule
30
32
  )), i;
31
33
  }
32
- if (y(i))
34
+ if (H(i))
33
35
  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
+ const l = i.rules[r], c = a || H(l) && l.name === W;
37
+ i.rules[r] = q(
36
38
  l,
37
39
  c
38
40
  );
@@ -42,14 +44,14 @@ function Y(o, a = !1) {
42
44
  class t {
43
45
  static scaffoldGroup(a) {
44
46
  return {
45
- name: a ?? `g_${_(4)}`,
47
+ name: a ?? `g_${b(4)}`,
46
48
  rules: {},
47
49
  logic: ""
48
50
  };
49
51
  }
50
52
  static scaffoldEntry(a) {
51
53
  return {
52
- name: `r_${_(4)}`,
54
+ name: `r_${b(4)}`,
53
55
  property: a ?? "",
54
56
  conditions: {},
55
57
  negated: !1
@@ -57,7 +59,7 @@ class t {
57
59
  }
58
60
  static constructEntry(a, i, r, l) {
59
61
  return {
60
- name: l ?? `e_${_(4)}`,
62
+ name: l ?? `e_${b(4)}`,
61
63
  property: a,
62
64
  conditions: {
63
65
  [i]: r
@@ -70,16 +72,16 @@ class t {
70
72
  }
71
73
  static constructLogic(a, i) {
72
74
  const r = i ?? t.getLogic(a);
73
- return Object.entries(a.rules).map(([l, c]) => y(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
75
+ return Object.entries(a.rules).map(([l, c]) => H(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
74
76
  }
75
77
  static setRuleToGroup(a, i, r) {
76
- let l = H.cloneDeep(a);
78
+ let l = v.cloneDeep(a);
77
79
  return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
78
80
  l.rules[c.name] = c;
79
81
  }) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
80
82
  }
81
83
  static removeEntry(a, i, r) {
82
- const l = H.cloneDeep(a);
84
+ const l = v.cloneDeep(a);
83
85
  return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
84
86
  }
85
87
  static constructRule(a) {
@@ -111,18 +113,18 @@ class t {
111
113
  static isRuleExceed(a, i) {
112
114
  const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
113
115
  if (l > 10)
114
- throw new K(10, l);
116
+ throw new X(10, l);
115
117
  return !0;
116
118
  }
117
119
  }
118
- class K extends Error {
120
+ class X extends Error {
119
121
  constructor(a, i) {
120
122
  super(
121
123
  `Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
122
124
  ), this.name = "MaxRulesExceededError";
123
125
  }
124
126
  }
125
- const W = {
127
+ const Q = {
126
128
  collectionName: "AuditLogs",
127
129
  transform: {
128
130
  _id: "oid",
@@ -135,7 +137,7 @@ const W = {
135
137
  fromCollection: "Businesses"
136
138
  }
137
139
  }
138
- }, X = e.enum([
140
+ }, $ = e.enum([
139
141
  "GET",
140
142
  "POST",
141
143
  "PUT",
@@ -144,7 +146,7 @@ const W = {
144
146
  "OPTIONS",
145
147
  "HEAD",
146
148
  "ALL"
147
- ]), q = e.enum([
149
+ ]), Z = e.enum([
148
150
  "CAMPAIGN",
149
151
  "LOCATION",
150
152
  "MARKETING MATERIALS",
@@ -154,15 +156,15 @@ const W = {
154
156
  "SETTINGS",
155
157
  "SEGMENTATION",
156
158
  "USER"
157
- ]), Q = e.object({
158
- httpMethod: X,
159
+ ]), ee = e.object({
160
+ httpMethod: $,
159
161
  url: e.string().min(1),
160
162
  userAgent: e.string(),
161
163
  host: e.string().min(1),
162
164
  params: e.object({}).passthrough().nullish(),
163
165
  query: e.object({}).passthrough().nullish(),
164
166
  body: e.object({}).passthrough().nullish()
165
- }), $ = e.object({
167
+ }), te = e.object({
166
168
  statusCode: e.number().int().min(100).max(599),
167
169
  body: e.object({}).passthrough().nullish()
168
170
  });
@@ -170,15 +172,15 @@ e.object({
170
172
  _id: n,
171
173
  user: e.string().length(28),
172
174
  userName: e.string().min(1),
173
- userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
174
- moduleType: q,
175
+ userPhoneNumber: e.string().refine((o) => F(o)).nullish(),
176
+ moduleType: Z,
175
177
  business: n.nullish(),
176
178
  clientIp: e.string().nullish(),
177
179
  timestamp: e.string().datetime(),
178
- request: Q,
179
- response: $
180
- }).describe(m.describe(W));
181
- const We = {
180
+ request: ee,
181
+ response: te
182
+ }).describe(m.describe(Q));
183
+ const ot = {
182
184
  PROMOTION: {
183
185
  name: "Promotion Template",
184
186
  description: "Promotion template for campaign creation.",
@@ -2117,7 +2119,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2117
2119
  ({
2118
2120
  ...t.scaffoldGroup()
2119
2121
  });
2120
- const Z = e.enum([
2122
+ const ae = e.enum([
2121
2123
  "MEMBER_REWARD",
2122
2124
  "PAID_LOYALTY",
2123
2125
  "COLLECT_FEEDBACK",
@@ -2127,7 +2129,7 @@ const Z = e.enum([
2127
2129
  "BROADCAST",
2128
2130
  "BIRTHDAY",
2129
2131
  "GAME"
2130
- ]), ee = e.enum([
2132
+ ]), ne = e.enum([
2131
2133
  "text",
2132
2134
  "number",
2133
2135
  "textarea",
@@ -2157,28 +2159,28 @@ const Z = e.enum([
2157
2159
  "grab_effect",
2158
2160
  "grab_quota",
2159
2161
  "grab_conditions"
2160
- ]), te = e.object({
2162
+ ]), oe = e.object({
2161
2163
  label: e.string().optional(),
2162
2164
  label_locale: e.record(e.string()).nullish(),
2163
2165
  property: e.string().or(e.any()),
2164
- type: ee,
2166
+ type: ne,
2165
2167
  extras: e.string().optional(),
2166
2168
  isRuleChildren: e.boolean().optional()
2167
- }), z = e.object({
2169
+ }), S = e.object({
2168
2170
  not: e.boolean().optional(),
2169
2171
  property: e.string(),
2170
2172
  value: e.any()
2171
- }), ae = e.object({
2173
+ }), ie = e.object({
2172
2174
  name: e.string().optional(),
2173
2175
  name_locale: e.record(e.string()).nullish(),
2174
- fields: e.array(te),
2175
- condition: z.optional().or(
2176
- e.array(z)
2176
+ fields: e.array(oe),
2177
+ condition: S.optional().or(
2178
+ e.array(S)
2177
2179
  )
2178
- }), ne = e.object({
2180
+ }), le = e.object({
2179
2181
  name: e.string(),
2180
2182
  name_locale: e.record(e.string()).nullish(),
2181
- groups: e.array(ae)
2183
+ groups: e.array(ie)
2182
2184
  });
2183
2185
  e.object({
2184
2186
  _id: n,
@@ -2186,11 +2188,11 @@ e.object({
2186
2188
  name_locale: e.record(e.string()).nullish(),
2187
2189
  description: e.string().nullish(),
2188
2190
  description_locale: e.record(e.string()).nullish(),
2189
- steps: e.array(ne).min(1),
2190
- intention: e.array(Z),
2191
+ steps: e.array(le).min(1),
2192
+ intention: e.array(ae),
2191
2193
  defaultValue: e.any()
2192
2194
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
2193
- const oe = {
2195
+ const re = {
2194
2196
  collectionName: "Businesses",
2195
2197
  transform: {
2196
2198
  _id: "oid"
@@ -2202,69 +2204,171 @@ e.object({
2202
2204
  name: e.string(),
2203
2205
  credit: e.number(),
2204
2206
  forceSend: e.boolean().optional()
2205
- }).describe(m.describe(oe));
2206
- const v = e.enum(["PHONE"]), ie = e.enum([
2207
+ }).describe(m.describe(re));
2208
+ const P = e.enum(["PHONE"]), ce = e.enum([
2207
2209
  "MOCEAN",
2208
2210
  "SLACK",
2209
2211
  "SMS",
2210
2212
  "EMAIL",
2211
2213
  "WHATSAPP"
2212
- ]), le = e.enum(["PENDING", "COMPLETED", "FAILED"]), re = e.enum([
2214
+ ]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
2213
2215
  "General",
2214
2216
  "Otp",
2215
2217
  "Marketing",
2216
2218
  "Ordering",
2217
2219
  "MemberInvitation",
2218
2220
  "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 = {
2221
+ ]), se = e.object({
2222
+ type: P
2223
+ }), j = se.extend({
2224
+ type: e.literal(P.enum.PHONE),
2225
+ provider: ce,
2226
+ usage: me.optional()
2227
+ }), E = e.enum([
2228
+ "Accepted",
2229
+ "PartiallyAccepted",
2230
+ "Queued",
2231
+ "Unknown",
2232
+ "Failed"
2233
+ ]), ge = e.enum([
2234
+ "PENDING",
2235
+ "SUBMITTED",
2236
+ "SETTLED",
2237
+ "FAILED"
2238
+ ]), J = e.object({
2239
+ channel: e.string(),
2240
+ status: e.string(),
2241
+ statusDetails: e.string().nullish()
2242
+ }), de = {
2226
2243
  collectionName: "Notifications",
2227
- transform: { _id: "oid", business: "oid" }
2244
+ transform: {
2245
+ _id: "oid",
2246
+ business: "oid",
2247
+ campaign: "oid",
2248
+ member: "oid"
2249
+ }
2228
2250
  };
2229
2251
  e.object({
2230
2252
  _id: n,
2231
2253
  business: n,
2232
- target: e.string(),
2254
+ status: pe,
2255
+ ref: e.string().optional(),
2233
2256
  title: e.string().optional(),
2234
- message: e.string(),
2235
- option: S,
2236
- status: le,
2237
- ref: e.string().optional()
2238
- }).describe(m.describe(pe));
2239
- const me = e.object({
2257
+ // Single-channel fields. Absent on multi-channel dispatches, which carry
2258
+ // their content per channel in the submitted request instead.
2259
+ target: e.string().optional(),
2260
+ message: e.string().optional(),
2261
+ option: j.optional(),
2262
+ // Multi-channel dispatch fields.
2263
+ campaign: n.nullish(),
2264
+ member: n.nullish(),
2265
+ /**
2266
+ * The scheduled run this dispatch belongs to. With campaign and member it
2267
+ * identifies one intended send, so a redelivered queue job is recognised
2268
+ * rather than sent twice.
2269
+ */
2270
+ runAt: e.coerce.date().nullish(),
2271
+ mode: z.nullish(),
2272
+ channels: e.array(U).nullish(),
2273
+ /**
2274
+ * Local submission state, kept separate from the upstream outcome so an
2275
+ * interrupted worker can tell "never sent" from "sent, result unknown".
2276
+ */
2277
+ state: ge.nullish(),
2278
+ outcome: E.nullish(),
2279
+ /** Upstream correlation id, preserved even when the request failed. */
2280
+ requestId: e.string().nullish(),
2281
+ attempts: e.array(J).nullish(),
2282
+ /** Credit consumed upstream, recorded for reconciliation. */
2283
+ creditUsed: d.nullish(),
2284
+ balanceAfter: d.nullish(),
2285
+ error: e.string().nullish(),
2286
+ createdAt: e.coerce.date().nullish(),
2287
+ submittedAt: e.coerce.date().nullish(),
2288
+ settledAt: e.coerce.date().nullish()
2289
+ }).describe(m.describe(de));
2290
+ const ue = e.object({
2240
2291
  target: e.string(),
2241
2292
  title: e.string().optional(),
2242
2293
  message: e.string(),
2243
- option: S,
2294
+ option: j,
2244
2295
  ref: e.string().optional()
2296
+ }), he = e.object({
2297
+ memberId: e.string(),
2298
+ name: e.string().nullish(),
2299
+ phoneNumber: e.string().nullish(),
2300
+ email: e.string().nullish(),
2301
+ /**
2302
+ * Shared Firebase uid required by App Inbox and Push, sourced from
2303
+ * `FdoUserV2.externalMemberId`. Optional there, so it can legitimately be
2304
+ * absent for a member; upstream decides what that means for a channel.
2305
+ */
2306
+ firebaseUid: e.string().nullish()
2307
+ });
2308
+ e.object({
2309
+ businessId: e.string(),
2310
+ forceSend: e.boolean(),
2311
+ mode: z,
2312
+ channels: e.array(
2313
+ e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
2314
+ ),
2315
+ metadata: e.object({
2316
+ source: e.string(),
2317
+ refValue: e.string()
2318
+ }),
2319
+ content: e.record(e.string(), e.unknown())
2245
2320
  });
2246
2321
  e.object({
2322
+ requestId: e.string().nullish(),
2323
+ status: E.nullish(),
2324
+ attempts: e.array(J).nullish(),
2325
+ creditUsed: d.nullish(),
2326
+ balance: d.nullish()
2327
+ });
2328
+ const _e = e.object({
2247
2329
  campaignId: e.string(),
2248
- notification: me,
2249
- business: e.string()
2330
+ business: e.string(),
2331
+ runAt: e.coerce.date(),
2332
+ recipient: he,
2333
+ /** Personalised, editor-data-free content keyed by channel. */
2334
+ content: e.record(e.string(), e.unknown()),
2335
+ mode: z,
2336
+ channels: e.array(U)
2337
+ });
2338
+ e.object({
2339
+ campaignId: e.string(),
2340
+ /** Absent only on multi-channel jobs, which carry `dispatch` instead. */
2341
+ notification: ue.optional(),
2342
+ business: e.string(),
2343
+ /**
2344
+ * Present only for multi-channel broadcasts. When set the job takes the
2345
+ * multi-channel dispatch path; when absent the legacy single-channel path
2346
+ * runs unchanged.
2347
+ */
2348
+ dispatch: _e.optional()
2349
+ }).superRefine((o, a) => {
2350
+ !o.notification && !o.dispatch && a.addIssue({
2351
+ code: e.ZodIssueCode.custom,
2352
+ message: "Job must carry either a notification or a dispatch"
2353
+ });
2250
2354
  });
2251
2355
  e.object({
2252
2356
  phone: e.string(),
2253
2357
  message: e.string()
2254
2358
  });
2255
- const C = e.object({
2359
+ const N = e.object({
2256
2360
  name: e.string().optional(),
2257
2361
  address: e.string()
2258
- }), se = e.object({
2362
+ }), ye = e.object({
2259
2363
  filename: e.string(),
2260
2364
  content: e.instanceof(Uint8Array)
2261
2365
  });
2262
2366
  e.object({
2263
- from: C.optional(),
2264
- to: e.array(C),
2367
+ from: N.optional(),
2368
+ to: e.array(N),
2265
2369
  subject: e.string(),
2266
2370
  html: e.string().optional(),
2267
- attachments: e.array(se).optional()
2371
+ attachments: e.array(ye).optional()
2268
2372
  });
2269
2373
  e.object({
2270
2374
  subject: e.string(),
@@ -2304,7 +2408,7 @@ e.object({
2304
2408
  billId: e.string()
2305
2409
  });
2306
2410
  e.object({
2307
- amount: L,
2411
+ amount: A,
2308
2412
  member: e.string(),
2309
2413
  bill: e.string(),
2310
2414
  otp: e.string().nullish(),
@@ -2313,15 +2417,15 @@ e.object({
2313
2417
  e.object({
2314
2418
  orderId: e.string()
2315
2419
  });
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);
2420
+ var O = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(O || {});
2421
+ e.nativeEnum(O);
2318
2422
  e.enum(["manage", "create", "read", "update", "delete"]);
2319
2423
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2320
2424
  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);
2425
+ var I = /* @__PURE__ */ ((o) => (o.marketing = "business::marketing", o.campaign = "business::campaign", o.counter = "business::counter", o.permission = "business::permission", o.role = "business::role", o))(I || {});
2426
+ e.nativeEnum(I);
2323
2427
  e.enum(["restaurant"]);
2324
- const ge = e.object({
2428
+ const fe = e.object({
2325
2429
  label: e.string(),
2326
2430
  subject: e.union([e.string(), e.array(e.string())]),
2327
2431
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2336,7 +2440,7 @@ e.object({
2336
2440
  userId: e.string(),
2337
2441
  email: e.string().nullish(),
2338
2442
  phoneNo: e.string().nullish(),
2339
- permissions: e.array(e.lazy(() => ge))
2443
+ permissions: e.array(e.lazy(() => fe))
2340
2444
  }).describe(
2341
2445
  m.describe({
2342
2446
  collectionName: "PermissionUsers",
@@ -2345,27 +2449,27 @@ e.object({
2345
2449
  }
2346
2450
  })
2347
2451
  );
2348
- const P = e.object({
2452
+ const R = e.object({
2349
2453
  userId: e.string(),
2350
2454
  level: e.number(),
2351
2455
  role: e.string().optional(),
2352
2456
  businessId: e.string().optional(),
2353
2457
  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())));
2458
+ }), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
2355
2459
  e.object({
2356
- isAdmin: de,
2357
- getRules: ue
2460
+ isAdmin: be,
2461
+ getRules: He
2358
2462
  });
2359
2463
  e.object({
2360
- transactions: e.array(D),
2361
- collections: e.array(w)
2464
+ transactions: e.array(M),
2465
+ collections: e.array(G)
2362
2466
  });
2363
- const j = e.enum([
2467
+ const L = e.enum([
2364
2468
  "ROCK_PAPER_SCISSOR"
2365
2469
  ]);
2366
- j.enum.ROCK_PAPER_SCISSOR + "";
2470
+ L.enum.ROCK_PAPER_SCISSOR + "";
2367
2471
  e.object({
2368
- type: j
2472
+ type: L
2369
2473
  });
2370
2474
  e.object({
2371
2475
  host: e.string().url(),
@@ -2374,7 +2478,7 @@ e.object({
2374
2478
  roomId: e.string()
2375
2479
  });
2376
2480
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
2377
- const he = {
2481
+ const ze = {
2378
2482
  collectionName: "MarketingMaterials",
2379
2483
  transform: {
2380
2484
  _id: "oid",
@@ -2388,7 +2492,7 @@ e.object({
2388
2492
  headline: e.string(),
2389
2493
  caption: e.string(),
2390
2494
  editedAt: e.coerce.date()
2391
- }).describe(m.describe(he));
2495
+ }).describe(m.describe(ze));
2392
2496
  e.object({
2393
2497
  id: e.number(),
2394
2498
  name: e.string(),
@@ -2408,12 +2512,12 @@ e.object({
2408
2512
  phone: e.string().optional(),
2409
2513
  email: e.string().optional()
2410
2514
  });
2411
- const _e = e.enum([
2515
+ const Te = e.enum([
2412
2516
  "PENDING",
2413
2517
  "SUCCESS",
2414
2518
  "FAILED",
2415
2519
  "RETRYING"
2416
- ]), ye = {
2520
+ ]), Ce = {
2417
2521
  collectionName: "WebhookLogs",
2418
2522
  transform: {
2419
2523
  _id: "oid",
@@ -2425,18 +2529,18 @@ e.object({
2425
2529
  business: n,
2426
2530
  type: e.string(),
2427
2531
  payload: e.record(e.any()),
2428
- status: _e,
2532
+ status: Te,
2429
2533
  response: e.any().optional(),
2430
2534
  error: e.string().optional()
2431
- }).describe(m.describe(ye));
2432
- const fe = e.enum(["AUTO", "MANUAL"]);
2535
+ }).describe(m.describe(Ce));
2536
+ const ve = e.enum(["AUTO", "MANUAL"]);
2433
2537
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2434
- const J = e.object({
2538
+ const x = e.object({
2435
2539
  _id: n,
2436
2540
  name: e.string().min(1, "Name is required").max(50),
2437
- type: fe,
2438
- event: A.optional()
2439
- }), be = e.object({
2541
+ type: ve,
2542
+ event: V.optional()
2543
+ }), Se = e.object({
2440
2544
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2441
2545
  to: e.number().int("Must be integer").nullish()
2442
2546
  }).superRefine((o, a) => {
@@ -2444,16 +2548,16 @@ const J = e.object({
2444
2548
  code: "custom",
2445
2549
  message: "Max referral count must be more than min referral count"
2446
2550
  });
2447
- }), He = e.object({
2448
- threshold: be,
2551
+ }), Ne = e.object({
2552
+ threshold: Se,
2449
2553
  rewards: e.array(n),
2450
- pf_reward: e.array(f).optional()
2451
- }), b = e.object({
2554
+ pf_reward: e.array(T).optional()
2555
+ }), C = e.object({
2452
2556
  id: e.string(),
2453
2557
  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 = {
2558
+ rule: B.optional(),
2559
+ rewards: e.array(Ne)
2560
+ }), Ue = {
2457
2561
  collectionName: "ReferralRecords",
2458
2562
  transform: {
2459
2563
  _id: "oid",
@@ -2462,25 +2566,25 @@ const J = e.object({
2462
2566
  referee: "oid",
2463
2567
  refereeReward: "oid"
2464
2568
  }
2465
- }, Ce = e.object({
2569
+ }, Pe = e.object({
2466
2570
  completedAt: e.coerce.date(),
2467
2571
  criteria: n,
2468
2572
  ref: e.string()
2469
- }), Te = e.object({
2573
+ }), je = e.object({
2470
2574
  _id: n,
2471
2575
  business: n,
2472
2576
  referer: n,
2473
2577
  referee: n,
2474
- criteria: e.array(J),
2475
- reward: e.array(b),
2578
+ criteria: e.array(x),
2579
+ reward: e.array(C),
2476
2580
  refereeReward: e.array(n).optional(),
2477
- criteria_progress: e.array(Ce),
2581
+ criteria_progress: e.array(Pe),
2478
2582
  status: e.string(),
2479
2583
  pf_referer: g.optional(),
2480
2584
  pf_referee: g.optional(),
2481
- pf_refereeReward: e.array(f).optional()
2482
- }).describe(m.describe(ze));
2483
- Te.pick({
2585
+ pf_refereeReward: e.array(T).optional()
2586
+ }).describe(m.describe(Ue));
2587
+ je.pick({
2484
2588
  _id: !0,
2485
2589
  business: !0,
2486
2590
  referer: !0,
@@ -2495,33 +2599,33 @@ Te.pick({
2495
2599
  photoUrl: !0
2496
2600
  })
2497
2601
  });
2498
- const ve = {
2602
+ const Ee = {
2499
2603
  collectionName: "ReferralProgram",
2500
2604
  transform: {
2501
2605
  _id: "oid",
2502
2606
  business: "oid"
2503
2607
  }
2504
- }, E = e.object({
2608
+ }, D = e.object({
2505
2609
  _id: n,
2506
2610
  business: n,
2507
2611
  term_and_condition: e.string().optional(),
2508
2612
  refereeReward: e.array(n).optional(),
2509
- reward: e.array(b),
2510
- criteria: e.array(J)
2511
- }).describe(m.describe(ve));
2613
+ reward: e.array(C),
2614
+ criteria: e.array(x)
2615
+ }).describe(m.describe(Ee));
2512
2616
  e.object({
2513
2617
  referer: n,
2514
2618
  referee: n,
2515
2619
  business: n
2516
2620
  });
2517
2621
  e.object({
2518
- program: E.pick({
2622
+ program: D.pick({
2519
2623
  _id: !0,
2520
2624
  business: !0,
2521
2625
  term_and_condition: !0
2522
2626
  }).extend({
2523
- reward: b.optional(),
2524
- pf_refereeReward: e.array(f).optional()
2627
+ reward: C.optional(),
2628
+ pf_refereeReward: e.array(T).optional()
2525
2629
  }),
2526
2630
  referralCount: e.number(),
2527
2631
  successReferralCount: e.number(),
@@ -2532,33 +2636,37 @@ e.object({
2532
2636
  photoUrl: !0
2533
2637
  }).optional()
2534
2638
  });
2535
- E.extend({
2639
+ D.extend({
2536
2640
  updateReferralRecord: e.boolean().optional()
2537
2641
  });
2538
- const Se = e.object({
2642
+ const Je = e.object({
2539
2643
  facebookPageId: e.string(),
2540
2644
  pageName: e.string(),
2541
2645
  pageProfileImageUrl: e.string(),
2542
2646
  pageAccessToken: e.string().optional(),
2543
2647
  locationIds: e.array(n)
2544
- }), Ne = e.object({
2648
+ }), Oe = e.object({
2545
2649
  locationId: n.nullable(),
2546
2650
  googleLocationName: e.string(),
2547
2651
  displayName: e.string().optional()
2548
- }), Ue = e.object({
2652
+ }), Ie = e.object({
2549
2653
  accessToken: e.string().nullable(),
2550
2654
  refreshToken: e.string().nullable(),
2551
2655
  accessTokenExpiresAt: e.date().nullable(),
2552
- locations: e.array(Ne)
2553
- }), Pe = e.object({
2656
+ locations: e.array(Oe),
2657
+ lastSyncTime: e.coerce.date().nullish(),
2658
+ syncFrequency: e.number().int().min(1).max(30).default(30)
2659
+ }), Re = e.object({
2554
2660
  token: e.string().nullable(),
2555
- pages: e.array(Se)
2661
+ pages: e.array(Je),
2662
+ lastSyncTime: e.coerce.date().nullish(),
2663
+ syncFrequency: e.number().int().min(1).max(30).default(30)
2556
2664
  });
2557
2665
  e.object({
2558
2666
  _id: n,
2559
2667
  businessId: n,
2560
- google: Ue.nullable(),
2561
- facebook: Pe.nullable()
2668
+ google: Ie.nullable(),
2669
+ facebook: Re.nullable()
2562
2670
  }).describe(
2563
2671
  m.describe({
2564
2672
  collectionName: "ReviewSourceConfig",
@@ -2604,7 +2712,9 @@ e.object({
2604
2712
  displayName: e.string().optional(),
2605
2713
  locationId: e.string().nullable()
2606
2714
  })
2607
- )
2715
+ ),
2716
+ lastSyncTime: e.string().datetime().nullable(),
2717
+ syncFrequency: e.number().int().min(1).max(30)
2608
2718
  }).nullable(),
2609
2719
  facebook: e.object({
2610
2720
  token: e.string().nullable(),
@@ -2615,107 +2725,120 @@ e.object({
2615
2725
  pageProfileImageUrl: e.string(),
2616
2726
  locationIds: e.array(e.string())
2617
2727
  })
2618
- )
2728
+ ),
2729
+ lastSyncTime: e.string().datetime().nullable(),
2730
+ syncFrequency: e.number().int().min(1).max(30)
2619
2731
  }).nullable()
2620
2732
  });
2621
- const O = e.object({
2733
+ const u = e.object({
2622
2734
  name: e.string(),
2623
- pictureUrl: e.string()
2624
- }), je = O.extend({
2735
+ pictureUrl: e.string(),
2736
+ phoneNumber: e.string().optional()
2737
+ }), Le = u.extend({
2625
2738
  isAnonymous: e.boolean().optional()
2626
- }), Je = O.extend({
2739
+ }), xe = u.extend({
2627
2740
  id: e.string().optional()
2628
- }), d = e.object({
2741
+ }), h = e.object({
2629
2742
  comment: e.string(),
2630
2743
  updateTime: e.coerce.date()
2631
- }), s = e.object({
2744
+ });
2745
+ e.object({
2746
+ comment: e.string().trim().min(1).max(4096)
2747
+ });
2748
+ const s = e.object({
2632
2749
  externalId: e.string().optional(),
2633
2750
  thumbnailUrl: e.string(),
2634
2751
  thumbnailLabel: e.string(),
2635
2752
  videoUrl: e.string().optional()
2636
- }), Ee = {
2753
+ }), De = {
2637
2754
  collectionName: "Reviews",
2638
2755
  transform: {
2639
2756
  _id: "oid",
2640
2757
  businessId: "oid",
2641
2758
  reviewerId: "oid",
2642
- locationId: "oid"
2643
- },
2644
- lookups: {
2645
- reviewerId: {
2646
- as: "reviewer",
2647
- fromCollection: "UsersV2"
2648
- },
2649
- locationId: {
2650
- as: "location",
2651
- fromCollection: "Locations"
2652
- }
2759
+ restaurantId: "oid"
2653
2760
  }
2654
- }, I = e.enum([
2761
+ }, w = e.enum([
2655
2762
  "google",
2656
2763
  "facebook",
2657
2764
  "feedme",
2658
2765
  "feedvibe"
2659
2766
  ]);
2660
- I.options;
2767
+ w.options;
2661
2768
  e.enum(["google", "facebook"]);
2662
- const Oe = e.enum([
2769
+ const we = e.enum([
2663
2770
  "createTime_desc",
2664
2771
  "createTime_asc",
2665
2772
  "rating_asc",
2666
2773
  "rating_desc"
2667
2774
  ]);
2668
2775
  e.object({
2669
- source: I.array().optional(),
2776
+ source: w.array().optional(),
2670
2777
  dateFrom: e.string().datetime({ offset: !0 }).optional(),
2671
2778
  dateTo: e.string().datetime({ offset: !0 }).optional(),
2672
2779
  locationId: e.string().optional(),
2673
2780
  excludeDeleted: e.boolean().optional(),
2674
- sort: Oe.optional(),
2781
+ sort: we.optional(),
2675
2782
  limit: e.coerce.number().int().positive().optional(),
2676
2783
  skip: e.coerce.number().int().min(0).optional()
2677
2784
  });
2678
- const R = e.object({
2785
+ const it = e.object({
2786
+ averageScore: e.number(),
2787
+ total: e.number().int().nonnegative(),
2788
+ starCounts: e.array(
2789
+ e.object({
2790
+ star: e.number().int().min(1).max(5),
2791
+ count: e.number().int().nonnegative()
2792
+ })
2793
+ )
2794
+ }), _ = e.object({
2679
2795
  name: e.string(),
2680
- pictureUrl: e.string()
2681
- }), Ie = R.extend({
2796
+ pictureUrl: e.string().optional(),
2797
+ phoneNumber: e.string().optional()
2798
+ }), Ae = _.extend({
2799
+ _id: e.string().optional()
2800
+ }), Fe = _.extend({
2801
+ _id: e.string()
2802
+ }), Me = _.extend({
2682
2803
  isAnonymous: e.boolean().optional()
2683
- }), Re = R.extend({
2804
+ }), Ge = _.extend({
2684
2805
  id: e.string().optional()
2685
- }), u = e.object({
2806
+ }), y = e.object({
2686
2807
  _id: n,
2687
2808
  comment: e.string(),
2688
2809
  createTime: e.coerce.date(),
2689
2810
  updateTime: e.coerce.date().nullish(),
2690
- locationId: n
2691
- }), Le = u.extend({
2811
+ restaurantId: n,
2812
+ restaurantName: e.string()
2813
+ }), ke = y.extend({
2692
2814
  source: e.literal("google"),
2693
2815
  externalId: e.string().min(1),
2694
- reviewer: Ie.optional(),
2695
- reply: d.optional(),
2816
+ translatedComment: e.string().optional(),
2817
+ reviewer: Me.optional(),
2818
+ reply: h.optional(),
2696
2819
  mediaItems: e.array(s),
2697
2820
  starRating: e.number(),
2698
2821
  locationName: e.string(),
2699
- locationDisplayName: e.string()
2700
- }), xe = u.extend({
2822
+ locationDisplayName: e.string(),
2823
+ originalUrl: e.string().optional()
2824
+ }), Be = y.extend({
2701
2825
  source: e.literal("facebook"),
2702
2826
  externalId: e.string().min(1),
2703
- reviewer: Re.optional(),
2827
+ reviewer: Ge.optional(),
2704
2828
  isPositive: e.boolean().optional(),
2705
2829
  pageId: e.string(),
2706
2830
  pageName: e.string()
2707
- }), De = u.extend({
2831
+ }), Ve = y.extend({
2708
2832
  source: e.literal("feedme"),
2709
- reviewer: T,
2710
- reply: d.optional(),
2833
+ reviewer: Ae.optional(),
2834
+ reply: h.optional(),
2711
2835
  starRating: e.number(),
2712
- location: G.optional(),
2713
2836
  mediaItems: e.array(s),
2714
2837
  billId: e.string()
2715
- }), we = u.extend({
2838
+ }), Ye = y.extend({
2716
2839
  source: e.literal("feedvibe"),
2717
2840
  externalId: e.string().min(1),
2718
- reviewer: T.optional(),
2841
+ reviewer: Fe.optional(),
2719
2842
  rating: e.object({
2720
2843
  overall: e.number(),
2721
2844
  food: e.number(),
@@ -2726,58 +2849,64 @@ const R = e.object({
2726
2849
  mediaItems: e.array(s).default([])
2727
2850
  });
2728
2851
  e.discriminatedUnion("source", [
2729
- Le,
2730
- xe,
2731
- De,
2732
- we
2852
+ ke,
2853
+ Be,
2854
+ Ve,
2855
+ Ye
2733
2856
  ]);
2734
2857
  e.object({
2735
2858
  comment: e.string(),
2736
2859
  starRating: e.number(),
2737
2860
  billId: e.string(),
2861
+ isAnonymous: e.boolean(),
2738
2862
  mediaItems: e.array(s).optional()
2739
2863
  });
2740
- const h = e.object({
2864
+ e.object({
2865
+ name: e.string().trim().min(1),
2866
+ phoneNumber: e.string().trim().min(1).optional()
2867
+ });
2868
+ const f = e.object({
2741
2869
  _id: n,
2742
2870
  businessId: n,
2743
2871
  comment: e.string(),
2744
2872
  createTime: e.coerce.date(),
2745
2873
  updateTime: e.coerce.date().nullish(),
2746
- // The marketing Location the review belongs to. For feedme reviews this is
2747
- // the restaurantId (Location._id === restaurantId); for google/facebook it
2748
- // is resolved from the review-source location/page mapping at sync time.
2749
- locationId: n,
2874
+ restaurantId: n,
2875
+ restaurantName: e.string(),
2750
2876
  deletedAt: e.coerce.date().optional()
2751
- }), Ae = h.extend({
2877
+ }), We = f.extend({
2752
2878
  source: e.literal("google"),
2753
2879
  externalId: e.string().min(1),
2754
- reviewer: je.optional(),
2755
- reply: d.optional(),
2880
+ translatedComment: e.string().optional(),
2881
+ reviewer: Le.optional(),
2882
+ reply: h.optional(),
2756
2883
  mediaItems: e.array(s),
2757
2884
  starRating: e.number(),
2758
2885
  locationName: e.string(),
2759
- locationDisplayName: e.string()
2760
- }), Ge = h.extend({
2886
+ locationDisplayName: e.string(),
2887
+ originalUrl: e.string().optional()
2888
+ }), Ke = f.extend({
2761
2889
  source: e.literal("facebook"),
2762
2890
  externalId: e.string().min(1),
2763
- reviewer: Je.optional(),
2891
+ reviewer: xe.optional(),
2764
2892
  isPositive: e.boolean().optional(),
2765
2893
  pageId: e.string(),
2766
2894
  pageName: e.string()
2767
- }), Me = h.extend({
2895
+ }), qe = f.extend({
2768
2896
  source: e.literal("feedme"),
2769
- reviewerId: n,
2770
- reviewer: e.any().optional(),
2771
- reply: d.optional(),
2897
+ isAnonymous: e.boolean(),
2898
+ metadata: e.record(e.string(), e.unknown()).optional(),
2899
+ reviewerId: n.optional(),
2900
+ reviewer: u.optional(),
2901
+ reply: h.optional(),
2772
2902
  starRating: e.number(),
2773
2903
  billId: e.string(),
2774
- location: e.any().optional(),
2775
2904
  mediaItems: e.array(s)
2776
- }), Fe = h.extend({
2905
+ }), Xe = f.extend({
2777
2906
  source: e.literal("feedvibe"),
2778
2907
  externalId: e.string().min(1),
2779
2908
  reviewerId: n,
2780
- reviewer: e.any().optional(),
2909
+ reviewer: u,
2781
2910
  rating: e.object({
2782
2911
  overall: e.number(),
2783
2912
  food: e.number(),
@@ -2788,21 +2917,23 @@ const h = e.object({
2788
2917
  mediaItems: e.array(s).default([])
2789
2918
  });
2790
2919
  e.discriminatedUnion("source", [
2791
- Ae,
2792
- Ge,
2793
- Me,
2794
- Fe
2795
- ]).describe(m.describe(Ee));
2920
+ We,
2921
+ Ke,
2922
+ qe,
2923
+ Xe
2924
+ ]).describe(m.describe(De));
2796
2925
  export {
2797
- Z as F,
2926
+ ae as F,
2798
2927
  t as R,
2799
- We as T,
2800
- k as a,
2801
- He as b,
2802
- J as c,
2803
- b as d,
2804
- X as e,
2805
- q as f,
2806
- y as i,
2807
- Y as s
2928
+ ot as T,
2929
+ H as a,
2930
+ Ne as b,
2931
+ x as c,
2932
+ C as d,
2933
+ $ as e,
2934
+ Z as f,
2935
+ it as g,
2936
+ h,
2937
+ Y as i,
2938
+ q as s
2808
2939
  };