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

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 (167) hide show
  1. package/dist/{App-DsB2o1oB.js → App-DievprEi.js} +853 -683
  2. package/dist/{AuditLogs-BcfgiYnJ.js → AuditLogs-DrdqOhZL.js} +16 -13
  3. package/dist/{Bin-DMr7K8Kj.js → Bin-Ci2k3z77.js} +8 -8
  4. package/dist/Broadcast-CpDMAG1o.js +306 -0
  5. package/dist/CampaignAnalytic-uRyGaLaN.js +1830 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CwGoEBsW.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DtGe2Og1.js} +8 -5
  7. package/dist/Card-tb98Kyr-.js +1086 -0
  8. package/dist/{Collections-B0uGC2FE.js → Collections-P1S5WjnJ.js} +14 -13
  9. package/dist/Credit-DwK7JYf-.js +286 -0
  10. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-Cyk0iIsd.js +53 -0
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-8r29jKh9.js +4432 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DJLxGk7W.js → EffectSheet.vue_vue_type_style_index_0_lang-BML_-v8I.js} +36 -36
  13. package/dist/Experience-BejtRlOj.js +288 -0
  14. package/dist/{FileSaver.min-BlA0oZEC.js → FileSaver.min-C-hmBaHm.js} +1 -1
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-3bH-tZAm.js +138 -0
  16. package/dist/Game-n8qL896g.js +356 -0
  17. package/dist/GiftCardSetup-Bgsfcu7N.js +736 -0
  18. package/dist/GoalPickerPanel.vue_vue_type_script_setup_true_lang-CzL68PPP.js +424 -0
  19. package/dist/Goals-BB8LJlq3.js +247 -0
  20. package/dist/{Grab-DmmwrGzk.js → Grab-COq3Ujst.js} +33 -32
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-DNtLW0yQ.js → ImageInput.vue_vue_type_script_setup_true_lang-BmLclEyi.js} +1 -1
  22. package/dist/{Index-m7l4insz.js → Index-BdkIinaE.js} +10 -10
  23. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-B9sJ-M20.js → LocationPicker.vue_vue_type_script_setup_true_lang-DsWv3DVb.js} +1 -1
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Dsg2sWjF.js → LottieAnimation.vue_vue_type_script_setup_true_lang-DvOzGF8c.js} +1 -1
  25. package/dist/LoyaltyDashboard-D4Jtpw0n.js +2911 -0
  26. package/dist/MainLayout-Ca-Xm3eZ.js +143 -0
  27. package/dist/{Marketing-C9pSIdBU.js → Marketing-Cpe4s7NZ.js} +7 -6
  28. package/dist/{MarketingMaterialEdit-BEF2T9LR.js → MarketingMaterialEdit-nTeS9VVx.js} +15 -14
  29. package/dist/Member-DgGZ4Cdg.js +654 -0
  30. package/dist/MemberDetailSheet.vue_vue_type_script_setup_true_lang-_O3B-FIA.js +1281 -0
  31. package/dist/MemberImportHistory-rdlbDVWU.js +187 -0
  32. package/dist/MemberList-BC4aRJTt.js +334 -0
  33. package/dist/{MemberTransactions-CAut1TQb.js → MemberTransactions-BFfdTttp.js} +1 -1
  34. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-1AuHixPC.js → MessageInput.vue_vue_type_script_setup_true_lang-DXajAQy9.js} +5928 -5644
  35. package/dist/MetricInfoTooltip.vue_vue_type_script_setup_true_lang-8xVDzdO3.js +40 -0
  36. package/dist/Mission-BWCNKTjU.js +363 -0
  37. package/dist/Overview--Q7vzhNK.js +1316 -0
  38. package/dist/{Overview-DOJj4XvO.js → Overview-i02Wnyjn.js} +23 -20
  39. package/dist/Point-CiWxqny5.js +297 -0
  40. package/dist/Promotion-B0G9qfBm.js +426 -0
  41. package/dist/{Queue-55G2gtP5.js → Queue-YfwgYmzH.js} +16 -13
  42. package/dist/{Record-DNPI02c6.js → Record-CCuwrPKW.js} +9 -9
  43. package/dist/Review-ymsfdh7Q.js +45 -0
  44. package/dist/ReviewFacebookCallback-DyDExWvP.js +238 -0
  45. package/dist/ReviewGoogleCallback-DNyg3n2S.js +213 -0
  46. package/dist/{Reward-CnP8R2pS.js → Reward-BKIb0ezH.js} +28 -28
  47. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-BN71h9IK.js → RewardGroup.vue_vue_type_script_setup_true_lang-DPaaNgpr.js} +26 -23
  48. package/dist/{RuleGroup.vue_vue_type_script_setup_true_lang-CtB9Ls5-.js → RuleGroup.vue_vue_type_script_setup_true_lang-BLFLybFn.js} +198 -186
  49. package/dist/{Segment-CxiQnnyj.js → Segment-D5_pp7fh.js} +278 -276
  50. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B1vj5f7T.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-BLLjIA-D.js} +45 -42
  51. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-cWx0G3nM.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BRIcZwnU.js} +4 -4
  52. package/dist/Setting-CD78gIMU.js +574 -0
  53. package/dist/{SettingAdvertisements-Vt7w1WN3.js → SettingAdvertisements-C2AIT4s4.js} +12 -12
  54. package/dist/Settings-DI_tryQV.js +230 -0
  55. package/dist/Store-BV2JTRNZ.js +2615 -0
  56. package/dist/{StoreRewards-DILeipMG.js → StoreRewards-Bk55YXyO.js} +15 -15
  57. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BZZ1fqwg.js +1331 -0
  58. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-C7lVeybl.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BrEzWVrH.js} +2 -2
  59. package/dist/{Tier-BAZ1xuKL.js → Tier-CO2K30Ew.js} +2576 -757
  60. package/dist/{Title-CcNAt47f.js → Title-qProQh3T.js} +41 -37
  61. package/dist/Transaction-qL5L-fE_.js +45 -0
  62. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-hUjQVZ_U.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-Co1BPScS.js} +26 -26
  63. package/dist/Voucher-VFD1LY9Y.js +837 -0
  64. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-CTQDxc5l.js → VoucherEditor.vue_vue_type_script_setup_true_lang-9QyTl7iq.js} +118 -124
  65. package/dist/WhatsappAccount-CxSGqm7H.js +325 -0
  66. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-D8L6izf0.js +96 -0
  67. package/dist/WhatsappBot-C4Oz7Xwv.js +441 -0
  68. package/dist/WhatsappBotSettings-CKqaWzwE.js +136 -0
  69. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DuRKA4cj.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bcsi94dw.js} +2 -2
  70. package/dist/{app-Z-UKRG5V.js → app-BEYzXWZO.js} +50954 -42517
  71. package/dist/app.js +1 -1
  72. package/dist/base.export-S_82Elmg.js +75 -0
  73. package/dist/browser-BSAOEeIM.js +1478 -0
  74. package/dist/{business-C7EF6cKC.js → business-DH7djUl8.js} +5 -5
  75. package/dist/campaign-DlHDgoFX.js +100 -0
  76. package/dist/campaign-k_WHxsOR.js +400 -0
  77. package/dist/{campaign.enum-BNN2gLFY.js → campaign.enum-Dx-Zo68Q.js} +1 -1
  78. package/dist/{campaign.fn-Bd34dVnx.js → campaign.fn-B-4JRzft.js} +67 -67
  79. package/dist/{collectible.enum-DO9HdJGH.js → collectible.enum-Liy2wH3s.js} +1 -1
  80. package/dist/collection.fn-zQwWDzZT.js +26 -0
  81. package/dist/currency-CQVHXBFe.js +7 -0
  82. package/dist/{duplicateCampaign-2ODeDw3a.js → duplicateCampaign-YTXMbJTj.js} +11 -11
  83. package/dist/{effect-BcB8IlTI.js → effect-CQkVLHWi.js} +1 -1
  84. package/dist/{email-addresses-BcTeU4Sh.js → email-addresses-BIoVbPGC.js} +209 -201
  85. package/dist/google-C3S8u0mT.js +4 -0
  86. package/dist/{helper-BSgrCJRv.js → helper-BCkTvF4m.js} +1 -1
  87. package/dist/{index-CoHWpylO.js → index-B-bQnb0_.js} +2115 -2557
  88. package/dist/index-BAJOC43K.js +14550 -0
  89. package/dist/{index-HXiYGO4_.js → index-BFIHEBnX.js} +6343 -7693
  90. package/dist/{index-VlFWaBrg.js → index-BJIQe3QJ.js} +1 -1
  91. package/dist/{index-BpI-BI4H.js → index-BJkRTH5T.js} +4 -4
  92. package/dist/index-BOJogkKQ.js +172 -0
  93. package/dist/{index-BoYEqLif.js → index-BRPajAkE.js} +1517 -263
  94. package/dist/{index-CsoBDon4.js → index-BTkxgos0.js} +1590 -1523
  95. package/dist/index-BUP4aHq8.js +32438 -0
  96. package/dist/index-BYvnqARr.js +902 -0
  97. package/dist/{index-hlyg-wxV.js → index-Bonq819P.js} +1 -1
  98. package/dist/{index-CIBPhxlC.js → index-C6mOI2Pp.js} +105 -123
  99. package/dist/{index-Bf6jNZit.js → index-CDIe15AY.js} +24 -9
  100. package/dist/index-CTrcdIkt.js +137 -0
  101. package/dist/index-C_H8jFYf.js +2743 -0
  102. package/dist/index-CpnchVe1.js +74 -0
  103. package/dist/index-D5AR7A5e.js +151 -0
  104. package/dist/index-D7-Q86HI.js +54 -0
  105. package/dist/index-DdOj8Hew.js +53 -0
  106. package/dist/{index-iMPtFp54.js → index-Dvqguh2B.js} +10 -9
  107. package/dist/{index-Bm0QPucw.js → index-hAKRfE-4.js} +14 -14
  108. package/dist/index-o2Ga_qaX.js +39 -0
  109. package/dist/{index.esm2017-CM7OnEyP.js → index.esm2017-D0fhMMPG.js} +128 -128
  110. package/dist/{loading-CSXr0Yqz.js → loading-C686AMVG.js} +1 -1
  111. package/dist/{lodash-Bh7XKI-R.js → lodash-CANlWUWW.js} +1 -1
  112. package/dist/member-import-UzJ6ByIS.js +188 -0
  113. package/dist/membership-DCVzFaFy.js +274 -0
  114. package/dist/{money-BZIST_m9.js → money-DuazwoX7.js} +1 -1
  115. package/dist/{number-DXLR2w95.js → number-B2HFiV0g.js} +1 -1
  116. package/dist/objectid-Bq-oVMdP.js +145 -0
  117. package/dist/onboarding-BxvNxz-9.js +131 -0
  118. package/dist/onboardingSetup-CcvKmyx8.js +17 -0
  119. package/dist/{plugins-4FlbwoES.js → plugins-C39O5j42.js} +13 -12
  120. package/dist/remy-Qz_pNsUS.js +13 -0
  121. package/dist/{reward-DUbl79bZ.js → reward-HYt-2nxt.js} +1 -1
  122. package/dist/{rule-BQUoZ4l_.js → rule-3xNIYM7z.js} +337 -275
  123. package/dist/style.css +1 -1
  124. package/dist/{template-BoiSG7G7.js → template-D37Z_b0m.js} +6 -6
  125. package/dist/timezone-JwnQgpaU.js +20 -0
  126. package/dist/transaction.fn-C5vswLI_.js +71 -0
  127. package/dist/{trigger-D5g5m6tT.js → trigger-Bc6s2cvq.js} +17 -17
  128. package/dist/useMarketingMaterialActions-DMGyAXcy.js +96 -0
  129. package/dist/{usePagination-DHePBBoR.js → usePagination-DLOOwiiY.js} +1 -1
  130. package/dist/{user-C_ToSo-g.js → user-CTIGugVF.js} +1 -1
  131. package/dist/{vue-i18n-BcYh6_51.js → vue-i18n-Dpic36zz.js} +287 -287
  132. package/dist/{xlsx-h4G1C-xj.js → xlsx-CT9_1SFr.js} +786 -786
  133. package/dist/{zod-CgigfJar.js → zod-CGVrMcDl.js} +1 -1
  134. package/package.json +10 -6
  135. package/dist/Broadcast-C9akM-TB.js +0 -266
  136. package/dist/Card-DRkIYs0M.js +0 -910
  137. package/dist/Credit-V5YA_hGx.js +0 -260
  138. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +0 -58
  139. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-CYQMXARx.js +0 -3377
  140. package/dist/Experience-WTWy5yY6.js +0 -259
  141. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +0 -129
  142. package/dist/Game-BwOfTCW5.js +0 -330
  143. package/dist/LoyaltyDashboard-CJdhYiea.js +0 -1082
  144. package/dist/MainLayout-Du5kZOtA.js +0 -41
  145. package/dist/Member-DUV_vbPI.js +0 -280
  146. package/dist/MemberList-Ye4nOk-i.js +0 -1601
  147. package/dist/Mission-BBmCGpt8.js +0 -334
  148. package/dist/Point-Bzg6hi6o.js +0 -262
  149. package/dist/Promotion-BMXIp_ef.js +0 -397
  150. package/dist/Review-CYNPPxYU.js +0 -1141
  151. package/dist/ReviewFacebookCallback-0SUkKAaC.js +0 -243
  152. package/dist/ReviewGoogleCallback-BZEzx68n.js +0 -208
  153. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-C4vohf6c.js +0 -181
  154. package/dist/Setting-jHAjccod.js +0 -2047
  155. package/dist/Store-Cu-hKmVa.js +0 -1996
  156. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CGz6CTWA.js +0 -1130
  157. package/dist/Transaction-D7DO3dKQ.js +0 -39
  158. package/dist/Voucher-Cq-n1CaC.js +0 -421
  159. package/dist/campaign--MjoY1Mn.js +0 -219
  160. package/dist/campaign-DHBuP4UA.js +0 -277
  161. package/dist/export-CjB7qxZ9.js +0 -97
  162. package/dist/index-BIAjmMga.js +0 -85
  163. package/dist/index-Bv4MBLQ5.js +0 -52
  164. package/dist/index-hbyCVNa7.js +0 -30289
  165. package/dist/membership-CfredTm3.js +0 -255
  166. package/dist/objectid-Dg4ZodlT.js +0 -145
  167. package/dist/useMarketingMaterialActions-B-Jlw2Z9.js +0 -107
@@ -1,38 +1,41 @@
1
- import { z as e, F as n, m, a as L } from "./index-hbyCVNa7.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-CoHWpylO.js";
3
- import { _ as M, l as H, a as F } from "./index-CsoBDon4.js";
4
- import { i as p } from "./helper-BSgrCJRv.js";
5
- import { a as f } from "./index-iMPtFp54.js";
6
- function _(o, a) {
1
+ import { F as n, m, b as A } from "./index-BFIHEBnX.js";
2
+ import { z as e } from "./index-C_H8jFYf.js";
3
+ import { r as M, s as F, t as G, u as g } from "./index-B-bQnb0_.js";
4
+ import { _ as k, l as v, f as B } from "./index-BTkxgos0.js";
5
+ import { i as p } from "./helper-BCkTvF4m.js";
6
+ import { d as z, b as U, e as d } from "./index-BAJOC43K.js";
7
+ import { d as V } from "./index-BYvnqARr.js";
8
+ import { F as T } from "./index-Dvqguh2B.js";
9
+ function b(o, a) {
7
10
  let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
8
11
  const l = r.length;
9
12
  for (let c = 0; c < o; c++)
10
13
  i += r.charAt(Math.floor(Math.random() * l));
11
14
  return i;
12
15
  }
13
- function y(o) {
16
+ function H(o) {
14
17
  return !o.property && "rules" in o;
15
18
  }
16
- function k(o) {
19
+ function W(o) {
17
20
  return "property" in o && !!o.property;
18
21
  }
19
- const B = "g_schedule";
20
- function V(o) {
22
+ const Y = "g_schedule";
23
+ function K(o) {
21
24
  return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
22
25
  `).trim();
23
26
  }
24
- function Y(o, a = !1) {
25
- const i = M.cloneDeep(o);
26
- if (k(i)) {
27
+ function q(o, a = !1) {
28
+ const i = k.cloneDeep(o);
29
+ if (W(i)) {
27
30
  const r = i.conditions;
28
- return !a && r && typeof r._rrule == "string" && (r._rrule = V(
31
+ return !a && r && typeof r._rrule == "string" && (r._rrule = K(
29
32
  r._rrule
30
33
  )), i;
31
34
  }
32
- if (y(i))
35
+ if (H(i))
33
36
  for (const r in i.rules) {
34
- const l = i.rules[r], c = a || y(l) && l.name === B;
35
- i.rules[r] = Y(
37
+ const l = i.rules[r], c = a || H(l) && l.name === Y;
38
+ i.rules[r] = q(
36
39
  l,
37
40
  c
38
41
  );
@@ -42,14 +45,14 @@ function Y(o, a = !1) {
42
45
  class t {
43
46
  static scaffoldGroup(a) {
44
47
  return {
45
- name: a ?? `g_${_(4)}`,
48
+ name: a ?? `g_${b(4)}`,
46
49
  rules: {},
47
50
  logic: ""
48
51
  };
49
52
  }
50
53
  static scaffoldEntry(a) {
51
54
  return {
52
- name: `r_${_(4)}`,
55
+ name: `r_${b(4)}`,
53
56
  property: a ?? "",
54
57
  conditions: {},
55
58
  negated: !1
@@ -57,7 +60,7 @@ class t {
57
60
  }
58
61
  static constructEntry(a, i, r, l) {
59
62
  return {
60
- name: l ?? `e_${_(4)}`,
63
+ name: l ?? `e_${b(4)}`,
61
64
  property: a,
62
65
  conditions: {
63
66
  [i]: r
@@ -70,16 +73,16 @@ class t {
70
73
  }
71
74
  static constructLogic(a, i) {
72
75
  const r = i ?? t.getLogic(a);
73
- return Object.entries(a.rules).map(([l, c]) => y(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
76
+ return Object.entries(a.rules).map(([l, c]) => H(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
74
77
  }
75
78
  static setRuleToGroup(a, i, r) {
76
- let l = H.cloneDeep(a);
79
+ let l = v.cloneDeep(a);
77
80
  return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
78
81
  l.rules[c.name] = c;
79
82
  }) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
80
83
  }
81
84
  static removeEntry(a, i, r) {
82
- const l = H.cloneDeep(a);
85
+ const l = v.cloneDeep(a);
83
86
  return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
84
87
  }
85
88
  static constructRule(a) {
@@ -111,18 +114,18 @@ class t {
111
114
  static isRuleExceed(a, i) {
112
115
  const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
113
116
  if (l > 10)
114
- throw new K(10, l);
117
+ throw new X(10, l);
115
118
  return !0;
116
119
  }
117
120
  }
118
- class K extends Error {
121
+ class X extends Error {
119
122
  constructor(a, i) {
120
123
  super(
121
124
  `Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
122
125
  ), this.name = "MaxRulesExceededError";
123
126
  }
124
127
  }
125
- const W = {
128
+ const Q = {
126
129
  collectionName: "AuditLogs",
127
130
  transform: {
128
131
  _id: "oid",
@@ -135,7 +138,7 @@ const W = {
135
138
  fromCollection: "Businesses"
136
139
  }
137
140
  }
138
- }, X = e.enum([
141
+ }, $ = e.enum([
139
142
  "GET",
140
143
  "POST",
141
144
  "PUT",
@@ -144,7 +147,7 @@ const W = {
144
147
  "OPTIONS",
145
148
  "HEAD",
146
149
  "ALL"
147
- ]), q = e.enum([
150
+ ]), Z = e.enum([
148
151
  "CAMPAIGN",
149
152
  "LOCATION",
150
153
  "MARKETING MATERIALS",
@@ -154,15 +157,15 @@ const W = {
154
157
  "SETTINGS",
155
158
  "SEGMENTATION",
156
159
  "USER"
157
- ]), Q = e.object({
158
- httpMethod: X,
160
+ ]), ee = e.object({
161
+ httpMethod: $,
159
162
  url: e.string().min(1),
160
163
  userAgent: e.string(),
161
164
  host: e.string().min(1),
162
165
  params: e.object({}).passthrough().nullish(),
163
166
  query: e.object({}).passthrough().nullish(),
164
167
  body: e.object({}).passthrough().nullish()
165
- }), $ = e.object({
168
+ }), te = e.object({
166
169
  statusCode: e.number().int().min(100).max(599),
167
170
  body: e.object({}).passthrough().nullish()
168
171
  });
@@ -170,15 +173,15 @@ e.object({
170
173
  _id: n,
171
174
  user: e.string().length(28),
172
175
  userName: e.string().min(1),
173
- userPhoneNumber: e.string().refine((o) => x(o)).nullish(),
174
- moduleType: q,
176
+ userPhoneNumber: e.string().refine((o) => M(o)).nullish(),
177
+ moduleType: Z,
175
178
  business: n.nullish(),
176
179
  clientIp: e.string().nullish(),
177
180
  timestamp: e.string().datetime(),
178
- request: Q,
179
- response: $
180
- }).describe(m.describe(W));
181
- const We = {
181
+ request: ee,
182
+ response: te
183
+ }).describe(m.describe(Q));
184
+ const it = {
182
185
  PROMOTION: {
183
186
  name: "Promotion Template",
184
187
  description: "Promotion template for campaign creation.",
@@ -889,17 +892,32 @@ const We = {
889
892
  type: "target_location"
890
893
  }
891
894
  ]
895
+ },
896
+ {
897
+ name: "connect.template.notify_audience",
898
+ fields: [
899
+ {
900
+ label: "connect.template.send_notification",
901
+ property: "campaign.notify",
902
+ type: "switch"
903
+ }
904
+ ]
905
+ },
906
+ {
907
+ name: "connect.template.notify_message",
908
+ fields: [
909
+ {
910
+ label: "connect.template.notification_message",
911
+ property: "campaign.notifyMessage",
912
+ type: "message",
913
+ extras: "ISSUE_REWARD"
914
+ }
915
+ ],
916
+ condition: {
917
+ property: "campaign.notify",
918
+ value: !0
919
+ }
892
920
  }
893
- // {
894
- // name: 'connect.template.notify_audience',
895
- // fields: [
896
- // {
897
- // label: 'connect.template.send_notification',
898
- // property: 'campaign.notify',
899
- // type: 'switch',
900
- // },
901
- // ],
902
- // },
903
921
  ]
904
922
  }
905
923
  ],
@@ -1076,17 +1094,32 @@ const We = {
1076
1094
  type: "target_location"
1077
1095
  }
1078
1096
  ]
1097
+ },
1098
+ {
1099
+ name: "connect.template.notify_audience",
1100
+ fields: [
1101
+ {
1102
+ label: "connect.template.send_notification",
1103
+ property: "campaign.notify",
1104
+ type: "switch"
1105
+ }
1106
+ ]
1107
+ },
1108
+ {
1109
+ name: "connect.template.notify_message",
1110
+ fields: [
1111
+ {
1112
+ label: "connect.template.notification_message",
1113
+ property: "campaign.notifyMessage",
1114
+ type: "message",
1115
+ extras: "ISSUE_REWARD"
1116
+ }
1117
+ ],
1118
+ condition: {
1119
+ property: "campaign.notify",
1120
+ value: !0
1121
+ }
1079
1122
  }
1080
- // {
1081
- // name: 'connect.template.notify_audience',
1082
- // fields: [
1083
- // {
1084
- // label: 'connect.template.send_notification',
1085
- // property: 'campaign.notify',
1086
- // type: 'switch',
1087
- // },
1088
- // ],
1089
- // },
1090
1123
  ]
1091
1124
  }
1092
1125
  ],
@@ -1263,17 +1296,32 @@ const We = {
1263
1296
  type: "target_location"
1264
1297
  }
1265
1298
  ]
1299
+ },
1300
+ {
1301
+ name: "connect.template.notify_audience",
1302
+ fields: [
1303
+ {
1304
+ label: "connect.template.send_notification",
1305
+ property: "campaign.notify",
1306
+ type: "switch"
1307
+ }
1308
+ ]
1309
+ },
1310
+ {
1311
+ name: "connect.template.notify_message",
1312
+ fields: [
1313
+ {
1314
+ label: "connect.template.notification_message",
1315
+ property: "campaign.notifyMessage",
1316
+ type: "message",
1317
+ extras: "ISSUE_REWARD"
1318
+ }
1319
+ ],
1320
+ condition: {
1321
+ property: "campaign.notify",
1322
+ value: !0
1323
+ }
1266
1324
  }
1267
- // {
1268
- // name: 'connect.template.notify_audience',
1269
- // fields: [
1270
- // {
1271
- // label: 'connect.template.send_notification',
1272
- // property: 'campaign.notify',
1273
- // type: 'switch',
1274
- // },
1275
- // ],
1276
- // },
1277
1325
  ]
1278
1326
  }
1279
1327
  ],
@@ -1947,13 +1995,411 @@ t.scaffoldGroup(), p("STAMP", {
1947
1995
  business: null,
1948
1996
  noCampaign: !1
1949
1997
  });
1950
- ({
1951
- ...t.scaffoldGroup()
1952
- }, p("VOUCHER", {
1953
- name: "",
1954
- business: null,
1955
- noCampaign: !1
1956
- }));
1998
+ const lt = {
1999
+ _id: "",
2000
+ intention: [],
2001
+ name: "Spend and get voucher",
2002
+ name_locale: {
2003
+ "en-US": "Spend and get voucher",
2004
+ "th-TH": "ใช้จ่ายและรับคูปอง",
2005
+ "zh-Hant": "消費即得優惠券",
2006
+ "zh-CN": "消费即得优惠券",
2007
+ "ja-JP": "購入でバウチャーゲット"
2008
+ },
2009
+ description: "Create a min spend to boost sales for every single bill",
2010
+ description_locale: {
2011
+ "en-US": "Create a min spend to boost sales for every single bill",
2012
+ "th-TH": "กำหนดยอดขั้นต่ำเพื่อเพิ่มยอดขายในทุกบิล",
2013
+ "zh-Hant": "設定最低消費額以提升每筆訂單的銷售額",
2014
+ "zh-CN": "设定最低消费额以提升每笔订单的销售额",
2015
+ "ja-JP": "毎回の注文に最低購入金額を設定して売上を伸ばしましょう"
2016
+ },
2017
+ steps: [
2018
+ {
2019
+ name: "connect.template.general_information",
2020
+ name_locale: {
2021
+ "en-US": "General information",
2022
+ "th-TH": "ข้อมูลทั่วไป",
2023
+ "zh-Hant": "基本信息",
2024
+ "zh-CN": "基本信息",
2025
+ "ja-JP": "一般情報"
2026
+ },
2027
+ groups: [
2028
+ {
2029
+ name: "connect.template.general",
2030
+ name_locale: {
2031
+ "en-US": "General",
2032
+ "th-TH": "ทั่วไป",
2033
+ "zh-Hant": "常規",
2034
+ "zh-CN": "常规",
2035
+ "ja-JP": "一般"
2036
+ },
2037
+ fields: [
2038
+ {
2039
+ label: "connect.template.campaign_name",
2040
+ label_locale: {
2041
+ "en-US": "Campaign name",
2042
+ "th-TH": "ชื่อแคมเปญ",
2043
+ "zh-Hant": "活動名稱",
2044
+ "zh-CN": "活动名称",
2045
+ "ja-JP": "キャンペーン名"
2046
+ },
2047
+ property: "campaign.name",
2048
+ type: "text"
2049
+ },
2050
+ {
2051
+ label: "connect.template.campaign_description",
2052
+ label_locale: {
2053
+ "en-US": "Campaign description",
2054
+ "th-TH": "คำอธิบายแคมเปญ",
2055
+ "zh-Hant": "活動描述",
2056
+ "zh-CN": "活动描述",
2057
+ "ja-JP": "キャンペーンの説明"
2058
+ },
2059
+ property: "campaign.description",
2060
+ type: "textarea"
2061
+ },
2062
+ {
2063
+ label: "connect.template.campaign_period",
2064
+ label_locale: {
2065
+ "en-US": "Campaign period",
2066
+ "th-TH": "ระยะเวลาแคมเปญ",
2067
+ "zh-Hant": "活動週期",
2068
+ "zh-CN": "活动周期",
2069
+ "ja-JP": "キャンペーン期間"
2070
+ },
2071
+ property: "campaign.timeframeOptions",
2072
+ type: "timeframe"
2073
+ }
2074
+ ]
2075
+ }
2076
+ ]
2077
+ },
2078
+ {
2079
+ name: "connect.template.discount",
2080
+ name_locale: {
2081
+ "en-US": "Discount",
2082
+ "th-TH": "ส่วนลด",
2083
+ "zh-Hant": "折扣",
2084
+ "zh-CN": "折扣",
2085
+ "ja-JP": "割引"
2086
+ },
2087
+ groups: [
2088
+ {
2089
+ name: "connect.template.discount",
2090
+ name_locale: {
2091
+ "en-US": "Discount",
2092
+ "th-TH": "ส่วนลด",
2093
+ "zh-Hant": "折扣",
2094
+ "zh-CN": "折扣",
2095
+ "ja-JP": "割引"
2096
+ },
2097
+ fields: [
2098
+ {
2099
+ label: void 0,
2100
+ label_locale: {},
2101
+ property: "configs.extras.effect",
2102
+ type: "effect"
2103
+ }
2104
+ ]
2105
+ },
2106
+ {
2107
+ name: "connect.template.voucher_detail",
2108
+ name_locale: {
2109
+ "en-US": "Voucher detail",
2110
+ "th-TH": "รายละเอียดบัตรกำนัล",
2111
+ "zh-Hant": "優惠券詳情",
2112
+ "zh-CN": "优惠券详情",
2113
+ "ja-JP": "バウチャー詳細"
2114
+ },
2115
+ fields: [
2116
+ {
2117
+ label: "connect.template.voucher_name",
2118
+ label_locale: {
2119
+ "en-US": "Voucher name",
2120
+ "th-TH": "ชื่อบัตรกำนัล",
2121
+ "zh-Hant": "優惠券名稱",
2122
+ "zh-CN": "优惠券名称",
2123
+ "ja-JP": "バウチャー名"
2124
+ },
2125
+ property: "configs.name",
2126
+ type: "text"
2127
+ },
2128
+ {
2129
+ label: "connect.template.voucher_description",
2130
+ label_locale: {
2131
+ "en-US": "Voucher description",
2132
+ "th-TH": "คำอธิบายบัตรกำนัล",
2133
+ "zh-Hant": "優惠券描述",
2134
+ "zh-CN": "优惠券描述",
2135
+ "ja-JP": "バウチャーの説明"
2136
+ },
2137
+ property: "configs.description",
2138
+ type: "textarea"
2139
+ },
2140
+ {
2141
+ label: "connect.template.voucher_image",
2142
+ label_locale: {
2143
+ "en-US": "Voucher Image",
2144
+ "th-TH": "รูปภาพคูปอง",
2145
+ "zh-Hant": "優惠券圖片",
2146
+ "zh-CN": "优惠券图片",
2147
+ "ja-JP": "バウチャー画像"
2148
+ },
2149
+ property: "configs.image",
2150
+ type: "image"
2151
+ }
2152
+ ]
2153
+ }
2154
+ ]
2155
+ },
2156
+ {
2157
+ name: "connect.template.terms_conditions",
2158
+ name_locale: {
2159
+ "en-US": "Terms and conditions",
2160
+ "th-TH": "ข้อตกลงและเงื่อนไข",
2161
+ "zh-Hant": "條款和條件",
2162
+ "zh-CN": "条款和条件",
2163
+ "ja-JP": "利用規約"
2164
+ },
2165
+ groups: [
2166
+ {
2167
+ name: "connect.template.time_limitation",
2168
+ name_locale: {
2169
+ "en-US": "Time limitation",
2170
+ "th-TH": "ข้อจำกัดเวลา",
2171
+ "zh-Hant": "時間限制",
2172
+ "zh-CN": "时间限制",
2173
+ "ja-JP": "時間制限"
2174
+ },
2175
+ fields: [
2176
+ {
2177
+ label: void 0,
2178
+ label_locale: {},
2179
+ property: "campaign.event.rule",
2180
+ type: "rule_time",
2181
+ extras: "campaign.type"
2182
+ }
2183
+ ],
2184
+ condition: {
2185
+ not: !0,
2186
+ property: "campaign.event.type",
2187
+ value: "SCHEDULE"
2188
+ }
2189
+ },
2190
+ {
2191
+ name: "connect.template.spending_criteria",
2192
+ name_locale: {
2193
+ "en-US": "Spending criteria",
2194
+ "th-TH": "เกณฑ์การใช้จ่าย",
2195
+ "zh-Hant": "消費標準",
2196
+ "zh-CN": "消费标准",
2197
+ "ja-JP": "購入条件"
2198
+ },
2199
+ fields: [
2200
+ {
2201
+ label: "Min Spend",
2202
+ label_locale: {
2203
+ "en-US": "Min Spend",
2204
+ "th-TH": "ยอดใช้จ่ายขั้นต่ำ",
2205
+ "zh-Hant": "最低消費",
2206
+ "zh-CN": "最低消费",
2207
+ "ja-JP": "最低購入金額"
2208
+ },
2209
+ property: "campaign.event.rule.rules.g_bill.rules.r_minspend.conditions._moreThanOrEqual",
2210
+ type: "number",
2211
+ isRuleChildren: !0
2212
+ },
2213
+ {
2214
+ label: void 0,
2215
+ label_locale: {},
2216
+ property: "campaign.event.rule",
2217
+ type: "rule_bill"
2218
+ }
2219
+ ],
2220
+ condition: {
2221
+ property: "campaign.event.type",
2222
+ value: "BILL_COMPLETED"
2223
+ }
2224
+ },
2225
+ {
2226
+ name: "connect.template.target_audience",
2227
+ name_locale: {
2228
+ "en-US": "Target audience",
2229
+ "th-TH": "กลุ่มเป้าหมาย",
2230
+ "zh-Hant": "目標受眾",
2231
+ "zh-CN": "目标受众",
2232
+ "ja-JP": "対象者"
2233
+ },
2234
+ fields: [
2235
+ {
2236
+ label: void 0,
2237
+ label_locale: {},
2238
+ property: "campaign.event.rule",
2239
+ type: "rule_user"
2240
+ }
2241
+ ]
2242
+ },
2243
+ {
2244
+ name: "connect.template.voucher_usage_configuration",
2245
+ name_locale: {
2246
+ "en-US": "Voucher usage configuration",
2247
+ "th-TH": "การกำหนดค่าการใช้งานบัตรกำนัล",
2248
+ "zh-Hant": "優惠券使用配置",
2249
+ "zh-CN": "优惠券使用配置",
2250
+ "ja-JP": "バウチャー使用設定"
2251
+ },
2252
+ fields: [
2253
+ {
2254
+ label: void 0,
2255
+ label_locale: {},
2256
+ property: "configs.options",
2257
+ type: "collectible_options"
2258
+ }
2259
+ ]
2260
+ }
2261
+ ]
2262
+ },
2263
+ {
2264
+ name: "connect.template.configuration",
2265
+ name_locale: {
2266
+ "en-US": "Configuration",
2267
+ "th-TH": "การกำหนดค่า",
2268
+ "zh-Hant": "配置",
2269
+ "zh-CN": "配置",
2270
+ "ja-JP": "設定"
2271
+ },
2272
+ groups: [
2273
+ {
2274
+ name: "connect.template.location",
2275
+ name_locale: {
2276
+ "en-US": "Location",
2277
+ "th-TH": "สาขา",
2278
+ "zh-Hant": "位置",
2279
+ "zh-CN": "位置",
2280
+ "ja-JP": "場所"
2281
+ },
2282
+ fields: [
2283
+ {
2284
+ label: "connect.template.target_location",
2285
+ label_locale: {
2286
+ "en-US": "Target location",
2287
+ "th-TH": "สาขาเป้าหมาย",
2288
+ "zh-Hant": "目標位置",
2289
+ "zh-CN": "目标位置",
2290
+ "ja-JP": "対象店舗"
2291
+ },
2292
+ property: "campaign.targetLocation",
2293
+ type: "target_location"
2294
+ }
2295
+ ]
2296
+ },
2297
+ {
2298
+ name: "connect.template.notify_audience",
2299
+ name_locale: {
2300
+ "en-US": "Notify audience",
2301
+ "th-TH": "แจ้งเตือนกลุ่มเป้าหมาย",
2302
+ "zh-Hant": "通知受眾",
2303
+ "zh-CN": "通知受众",
2304
+ "ja-JP": "対象者への通知"
2305
+ },
2306
+ fields: [
2307
+ {
2308
+ label: "connect.template.send_notification",
2309
+ label_locale: {
2310
+ "en-US": "Send notification",
2311
+ "th-TH": "ส่งการแจ้งเตือน",
2312
+ "zh-Hant": "發送通知",
2313
+ "zh-CN": "发送通知",
2314
+ "ja-JP": "通知を送信"
2315
+ },
2316
+ property: "campaign.notify",
2317
+ type: "switch"
2318
+ }
2319
+ ]
2320
+ },
2321
+ {
2322
+ name: "connect.template.notify_message",
2323
+ name_locale: {
2324
+ "en-US": "Notify message",
2325
+ "th-TH": "ข้อความแจ้งเตือน",
2326
+ "zh-Hant": "通知消息",
2327
+ "zh-CN": "通知消息",
2328
+ "ja-JP": "通知メッセージ"
2329
+ },
2330
+ fields: [
2331
+ {
2332
+ label: "connect.template.notification_message",
2333
+ label_locale: {
2334
+ "en-US": "Notification message",
2335
+ "th-TH": "ข้อความแจ้งเตือน",
2336
+ "zh-Hant": "通知消息",
2337
+ "zh-CN": "通知消息",
2338
+ "ja-JP": "通知メッセージ"
2339
+ },
2340
+ property: "campaign.notifyMessage",
2341
+ type: "message",
2342
+ extras: "ISSUE_REWARD"
2343
+ }
2344
+ ],
2345
+ condition: {
2346
+ property: "campaign.notify",
2347
+ value: !0
2348
+ }
2349
+ }
2350
+ ]
2351
+ }
2352
+ ],
2353
+ defaultValue: {
2354
+ templateId: "",
2355
+ campaign: {
2356
+ collectible: "",
2357
+ type: "VOUCHER",
2358
+ templateId: "",
2359
+ name: "",
2360
+ description: "",
2361
+ image: "",
2362
+ event: {
2363
+ type: "BILL_COMPLETED",
2364
+ rule: {
2365
+ ...t.scaffoldGroup(),
2366
+ rules: {
2367
+ g_bill: {
2368
+ name: "g_bill",
2369
+ rules: {
2370
+ r_minspend: {
2371
+ name: "r_minspend",
2372
+ property: "bill.amount",
2373
+ conditions: {
2374
+ _moreThanOrEqual: 0
2375
+ },
2376
+ negated: !1
2377
+ }
2378
+ },
2379
+ logic: "r_minspend"
2380
+ }
2381
+ },
2382
+ logic: "g_bill"
2383
+ }
2384
+ },
2385
+ group: null,
2386
+ targetLocation: null,
2387
+ timeframeOptions: {
2388
+ type: "timeframe",
2389
+ property: "__now"
2390
+ },
2391
+ earningOption: {
2392
+ type: "FIXED",
2393
+ amount: 1
2394
+ }
2395
+ },
2396
+ configs: p("VOUCHER", {
2397
+ name: "",
2398
+ business: null,
2399
+ noCampaign: !1
2400
+ })
2401
+ }
2402
+ };
1957
2403
  ({
1958
2404
  ...t.scaffoldGroup()
1959
2405
  }, p("VOUCHER", {
@@ -1967,9 +2413,339 @@ t.scaffoldGroup(), p("STAMP", {
1967
2413
  ({
1968
2414
  ...t.scaffoldGroup()
1969
2415
  });
1970
- ({
1971
- ...t.scaffoldGroup()
1972
- });
2416
+ const rt = {
2417
+ _id: "",
2418
+ intention: [],
2419
+ name: "Spend and earn points",
2420
+ name_locale: {
2421
+ "en-US": "Spend and earn points",
2422
+ "th-TH": "ใช้จ่ายและสะสมคะแนน",
2423
+ "zh-Hant": "消費累積點數",
2424
+ "zh-CN": "消费累积积分",
2425
+ "ja-JP": "購入でポイント獲得"
2426
+ },
2427
+ description: "Reward customers by giving points for every purchase they make",
2428
+ description_locale: {
2429
+ "en-US": "Reward customers by giving points for every purchase they make",
2430
+ "th-TH": "ให้รางวัลลูกค้าด้วยการมอบคะแนนทุกครั้งที่มีการใช้จ่าย",
2431
+ "zh-Hant": "透過每筆消費贈送點數來回饋顧客",
2432
+ "zh-CN": "通过每笔消费赠送积分来回馈顾客",
2433
+ "ja-JP": "購入のたびにポイントを付与して顧客を報酬"
2434
+ },
2435
+ steps: [
2436
+ {
2437
+ name: "connect.template.general_information",
2438
+ name_locale: {
2439
+ "en-US": "General information",
2440
+ "th-TH": "ข้อมูลทั่วไป",
2441
+ "zh-Hant": "基本信息",
2442
+ "zh-CN": "基本信息",
2443
+ "ja-JP": "一般情報"
2444
+ },
2445
+ groups: [
2446
+ {
2447
+ name: "connect.template.general",
2448
+ name_locale: {
2449
+ "en-US": "General",
2450
+ "th-TH": "ทั่วไป",
2451
+ "zh-Hant": "常規",
2452
+ "zh-CN": "常规",
2453
+ "ja-JP": "一般"
2454
+ },
2455
+ fields: [
2456
+ {
2457
+ label: "connect.template.campaign_name",
2458
+ label_locale: {
2459
+ "en-US": "Campaign name",
2460
+ "th-TH": "ชื่อแคมเปญ",
2461
+ "zh-Hant": "活動名稱",
2462
+ "zh-CN": "活动名称",
2463
+ "ja-JP": "キャンペーン名"
2464
+ },
2465
+ property: "campaign.name",
2466
+ type: "text"
2467
+ },
2468
+ {
2469
+ label: "connect.template.campaign_description",
2470
+ label_locale: {
2471
+ "en-US": "Campaign description",
2472
+ "th-TH": "คำอธิบายแคมเปญ",
2473
+ "zh-Hant": "活動描述",
2474
+ "zh-CN": "活动描述",
2475
+ "ja-JP": "キャンペーンの説明"
2476
+ },
2477
+ property: "campaign.description",
2478
+ type: "textarea"
2479
+ },
2480
+ {
2481
+ label: "connect.template.campaign_period",
2482
+ label_locale: {
2483
+ "en-US": "Campaign period",
2484
+ "th-TH": "ระยะเวลาแคมเปญ",
2485
+ "zh-Hant": "活動週期",
2486
+ "zh-CN": "活动周期",
2487
+ "ja-JP": "キャンペーン期間"
2488
+ },
2489
+ property: "campaign.timeframeOptions",
2490
+ type: "timeframe"
2491
+ }
2492
+ ]
2493
+ }
2494
+ ]
2495
+ },
2496
+ {
2497
+ name: "connect.template.terms_conditions",
2498
+ name_locale: {
2499
+ "en-US": "Terms and conditions",
2500
+ "th-TH": "ข้อตกลงและเงื่อนไข",
2501
+ "zh-Hant": "條款和條件",
2502
+ "zh-CN": "条款和条件",
2503
+ "ja-JP": "利用規約"
2504
+ },
2505
+ groups: [
2506
+ {
2507
+ name: "connect.template.time_limitation",
2508
+ name_locale: {
2509
+ "en-US": "Time limitation",
2510
+ "th-TH": "ข้อจำกัดเวลา",
2511
+ "zh-Hant": "時間限制",
2512
+ "zh-CN": "时间限制",
2513
+ "ja-JP": "時間制限"
2514
+ },
2515
+ fields: [
2516
+ {
2517
+ label: void 0,
2518
+ label_locale: {},
2519
+ property: "campaign.event.rule",
2520
+ type: "rule_time",
2521
+ extras: "campaign.type"
2522
+ }
2523
+ ],
2524
+ condition: {
2525
+ not: !0,
2526
+ property: "campaign.event.type",
2527
+ value: "SCHEDULE"
2528
+ }
2529
+ },
2530
+ {
2531
+ name: "connect.template.spending_criteria",
2532
+ name_locale: {
2533
+ "en-US": "Spending criteria",
2534
+ "th-TH": "เกณฑ์การใช้จ่าย",
2535
+ "zh-Hant": "消費標準",
2536
+ "zh-CN": "消费标准",
2537
+ "ja-JP": "購入条件"
2538
+ },
2539
+ fields: [
2540
+ {
2541
+ label: "Min Spend",
2542
+ label_locale: {
2543
+ "en-US": "Min Spend",
2544
+ "th-TH": "ยอดใช้จ่ายขั้นต่ำ",
2545
+ "zh-Hant": "最低消費",
2546
+ "zh-CN": "最低消费",
2547
+ "ja-JP": "最低購入金額"
2548
+ },
2549
+ property: "campaign.event.rule.rules.g_bill.rules.r_minspend.conditions._moreThanOrEqual",
2550
+ type: "number",
2551
+ isRuleChildren: !0
2552
+ },
2553
+ {
2554
+ label: void 0,
2555
+ label_locale: {},
2556
+ property: "campaign.event.rule",
2557
+ type: "rule_bill"
2558
+ }
2559
+ ],
2560
+ condition: {
2561
+ property: "campaign.event.type",
2562
+ value: "BILL_COMPLETED"
2563
+ }
2564
+ },
2565
+ {
2566
+ name: "connect.template.target_audience",
2567
+ name_locale: {
2568
+ "en-US": "Target audience",
2569
+ "th-TH": "กลุ่มเป้าหมาย",
2570
+ "zh-Hant": "目標受眾",
2571
+ "zh-CN": "目标受众",
2572
+ "ja-JP": "対象者"
2573
+ },
2574
+ fields: [
2575
+ {
2576
+ label: void 0,
2577
+ label_locale: {},
2578
+ property: "campaign.event.rule",
2579
+ type: "rule_user"
2580
+ }
2581
+ ]
2582
+ }
2583
+ ]
2584
+ },
2585
+ {
2586
+ name: "connect.template.configuration",
2587
+ name_locale: {
2588
+ "en-US": "Configuration",
2589
+ "th-TH": "การกำหนดค่า",
2590
+ "zh-Hant": "配置",
2591
+ "zh-CN": "配置",
2592
+ "ja-JP": "設定"
2593
+ },
2594
+ groups: [
2595
+ {
2596
+ name: "connect.template.earning_type",
2597
+ name_locale: {
2598
+ "en-US": "Earning type",
2599
+ "th-TH": "ประเภทการสร้างรายได้",
2600
+ "zh-Hant": "獲取類型",
2601
+ "zh-CN": "获取类型",
2602
+ "ja-JP": "獲得タイプ"
2603
+ },
2604
+ fields: [
2605
+ {
2606
+ label: void 0,
2607
+ label_locale: {},
2608
+ property: "campaign.earningOption",
2609
+ type: "earning_option",
2610
+ extras: ""
2611
+ },
2612
+ {
2613
+ label: void 0,
2614
+ label_locale: {},
2615
+ property: "campaign.config.validityOption",
2616
+ type: "validity_option"
2617
+ }
2618
+ ]
2619
+ },
2620
+ {
2621
+ name: "connect.template.location",
2622
+ name_locale: {
2623
+ "en-US": "Location",
2624
+ "th-TH": "สาขา",
2625
+ "zh-Hant": "位置",
2626
+ "zh-CN": "位置",
2627
+ "ja-JP": "場所"
2628
+ },
2629
+ fields: [
2630
+ {
2631
+ label: "connect.template.target_location",
2632
+ label_locale: {
2633
+ "en-US": "Target location",
2634
+ "th-TH": "สาขาเป้าหมาย",
2635
+ "zh-Hant": "目標位置",
2636
+ "zh-CN": "目标位置",
2637
+ "ja-JP": "対象店舗"
2638
+ },
2639
+ property: "campaign.targetLocation",
2640
+ type: "target_location"
2641
+ }
2642
+ ]
2643
+ },
2644
+ {
2645
+ name: "connect.template.notify_audience",
2646
+ name_locale: {
2647
+ "en-US": "Notify audience",
2648
+ "th-TH": "แจ้งเตือนกลุ่มเป้าหมาย",
2649
+ "zh-Hant": "通知受眾",
2650
+ "zh-CN": "通知受众",
2651
+ "ja-JP": "対象者への通知"
2652
+ },
2653
+ fields: [
2654
+ {
2655
+ label: "connect.template.send_notification",
2656
+ label_locale: {
2657
+ "en-US": "Send notification",
2658
+ "th-TH": "ส่งการแจ้งเตือน",
2659
+ "zh-Hant": "發送通知",
2660
+ "zh-CN": "发送通知",
2661
+ "ja-JP": "通知を送信"
2662
+ },
2663
+ property: "campaign.notify",
2664
+ type: "switch"
2665
+ }
2666
+ ]
2667
+ },
2668
+ {
2669
+ name: "connect.template.notify_message",
2670
+ name_locale: {
2671
+ "en-US": "Notify message",
2672
+ "th-TH": "ข้อความแจ้งเตือน",
2673
+ "zh-Hant": "通知消息",
2674
+ "zh-CN": "通知消息",
2675
+ "ja-JP": "通知メッセージ"
2676
+ },
2677
+ fields: [
2678
+ {
2679
+ label: "connect.template.notification_message",
2680
+ label_locale: {
2681
+ "en-US": "Notification message",
2682
+ "th-TH": "ข้อความแจ้งเตือน",
2683
+ "zh-Hant": "通知消息",
2684
+ "zh-CN": "通知消息",
2685
+ "ja-JP": "通知メッセージ"
2686
+ },
2687
+ property: "campaign.notifyMessage",
2688
+ type: "message",
2689
+ extras: "ISSUE_REWARD"
2690
+ }
2691
+ ],
2692
+ condition: {
2693
+ property: "campaign.notify",
2694
+ value: !0
2695
+ }
2696
+ }
2697
+ ]
2698
+ }
2699
+ ],
2700
+ defaultValue: {
2701
+ templateId: "",
2702
+ campaign: {
2703
+ collectible: "",
2704
+ type: "COIN",
2705
+ templateId: "",
2706
+ name: "",
2707
+ description: "",
2708
+ image: "",
2709
+ event: {
2710
+ type: "BILL_COMPLETED",
2711
+ rule: {
2712
+ ...t.scaffoldGroup(),
2713
+ rules: {
2714
+ g_bill: {
2715
+ name: "g_bill",
2716
+ rules: {
2717
+ r_minspend: {
2718
+ name: "r_minspend",
2719
+ property: "bill.amount",
2720
+ conditions: {
2721
+ _moreThanOrEqual: 0
2722
+ },
2723
+ negated: !1
2724
+ }
2725
+ },
2726
+ logic: "r_minspend"
2727
+ }
2728
+ },
2729
+ logic: "g_bill"
2730
+ }
2731
+ },
2732
+ group: null,
2733
+ config: {
2734
+ validityOption: {}
2735
+ },
2736
+ targetLocation: null,
2737
+ timeframeOptions: {
2738
+ type: "timeframe",
2739
+ property: "__now"
2740
+ },
2741
+ earningOption: {
2742
+ type: "PROPORTIONAL",
2743
+ amount: 1,
2744
+ every: 1
2745
+ }
2746
+ }
2747
+ }
2748
+ };
1973
2749
  t.setRuleToGroup(
1974
2750
  t.scaffoldGroup(),
1975
2751
  t.setRuleToGroup(
@@ -2063,13 +2839,359 @@ t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
2063
2839
  business: null,
2064
2840
  noCampaign: !1
2065
2841
  });
2066
- ({
2067
- ...t.scaffoldGroup()
2068
- }, p("VOUCHER", {
2069
- name: "",
2070
- business: null,
2071
- noCampaign: !1
2072
- }));
2842
+ const ct = {
2843
+ _id: "",
2844
+ intention: [],
2845
+ name: "Welcome voucher",
2846
+ name_locale: {
2847
+ "en-US": "Welcome voucher",
2848
+ "th-TH": "คูปองต้อนรับ",
2849
+ "zh-Hant": "歡迎優惠券",
2850
+ "zh-CN": "欢迎优惠券",
2851
+ "ja-JP": "ウェルカムバウチャー"
2852
+ },
2853
+ description: "Distribute a voucher to new members upon joining.",
2854
+ description_locale: {
2855
+ "en-US": "Distribute a voucher to new members upon joining.",
2856
+ "th-TH": "แจกคูปองให้สมาชิกใหม่เมื่อเข้าร่วม",
2857
+ "zh-Hant": "新會員加入時發放歡迎優惠券",
2858
+ "zh-CN": "新会员加入时发放欢迎优惠券",
2859
+ "ja-JP": "新規会員入会時にバウチャーを配布"
2860
+ },
2861
+ steps: [
2862
+ {
2863
+ name: "connect.template.general_information",
2864
+ name_locale: {
2865
+ "en-US": "General information",
2866
+ "th-TH": "ข้อมูลทั่วไป",
2867
+ "zh-Hant": "基本信息",
2868
+ "zh-CN": "基本信息",
2869
+ "ja-JP": "一般情報"
2870
+ },
2871
+ groups: [
2872
+ {
2873
+ name: "connect.template.general",
2874
+ name_locale: {
2875
+ "en-US": "General",
2876
+ "th-TH": "ทั่วไป",
2877
+ "zh-Hant": "常規",
2878
+ "zh-CN": "常规",
2879
+ "ja-JP": "一般"
2880
+ },
2881
+ fields: [
2882
+ {
2883
+ label: "connect.template.campaign_name",
2884
+ label_locale: {
2885
+ "en-US": "Campaign name",
2886
+ "th-TH": "ชื่อแคมเปญ",
2887
+ "zh-Hant": "活動名稱",
2888
+ "zh-CN": "活动名称",
2889
+ "ja-JP": "キャンペーン名"
2890
+ },
2891
+ property: "campaign.name",
2892
+ type: "text"
2893
+ },
2894
+ {
2895
+ label: "connect.template.campaign_description",
2896
+ label_locale: {
2897
+ "en-US": "Campaign description",
2898
+ "th-TH": "คำอธิบายแคมเปญ",
2899
+ "zh-Hant": "活動描述",
2900
+ "zh-CN": "活动描述",
2901
+ "ja-JP": "キャンペーンの説明"
2902
+ },
2903
+ property: "campaign.description",
2904
+ type: "textarea"
2905
+ },
2906
+ {
2907
+ label: "connect.template.campaign_period",
2908
+ label_locale: {
2909
+ "en-US": "Campaign period",
2910
+ "th-TH": "ระยะเวลาแคมเปญ",
2911
+ "zh-Hant": "活動週期",
2912
+ "zh-CN": "活动周期",
2913
+ "ja-JP": "キャンペーン期間"
2914
+ },
2915
+ property: "campaign.timeframeOptions",
2916
+ type: "timeframe"
2917
+ }
2918
+ ]
2919
+ }
2920
+ ]
2921
+ },
2922
+ {
2923
+ name: "connect.template.discount",
2924
+ name_locale: {
2925
+ "en-US": "Discount",
2926
+ "th-TH": "ส่วนลด",
2927
+ "zh-Hant": "折扣",
2928
+ "zh-CN": "折扣",
2929
+ "ja-JP": "割引"
2930
+ },
2931
+ groups: [
2932
+ {
2933
+ name: "connect.template.discount",
2934
+ name_locale: {
2935
+ "en-US": "Discount",
2936
+ "th-TH": "ส่วนลด",
2937
+ "zh-Hant": "折扣",
2938
+ "zh-CN": "折扣",
2939
+ "ja-JP": "割引"
2940
+ },
2941
+ fields: [
2942
+ {
2943
+ label: void 0,
2944
+ label_locale: {},
2945
+ property: "configs.extras.effect",
2946
+ type: "effect"
2947
+ }
2948
+ ]
2949
+ },
2950
+ {
2951
+ name: "connect.template.voucher_detail",
2952
+ name_locale: {
2953
+ "en-US": "Voucher detail",
2954
+ "th-TH": "รายละเอียดบัตรกำนัล",
2955
+ "zh-Hant": "優惠券詳情",
2956
+ "zh-CN": "优惠券详情",
2957
+ "ja-JP": "バウチャー詳細"
2958
+ },
2959
+ fields: [
2960
+ {
2961
+ label: "connect.template.voucher_name",
2962
+ label_locale: {
2963
+ "en-US": "Voucher name",
2964
+ "th-TH": "ชื่อบัตรกำนัล",
2965
+ "zh-Hant": "優惠券名稱",
2966
+ "zh-CN": "优惠券名称",
2967
+ "ja-JP": "バウチャー名"
2968
+ },
2969
+ property: "configs.name",
2970
+ type: "text"
2971
+ },
2972
+ {
2973
+ label: "connect.template.voucher_description",
2974
+ label_locale: {
2975
+ "en-US": "Voucher description",
2976
+ "th-TH": "คำอธิบายบัตรกำนัล",
2977
+ "zh-Hant": "優惠券描述",
2978
+ "zh-CN": "优惠券描述",
2979
+ "ja-JP": "バウチャーの説明"
2980
+ },
2981
+ property: "configs.description",
2982
+ type: "textarea"
2983
+ },
2984
+ {
2985
+ label: "connect.template.voucher_image",
2986
+ label_locale: {
2987
+ "en-US": "Voucher Image",
2988
+ "th-TH": "รูปภาพคูปอง",
2989
+ "zh-Hant": "優惠券圖片",
2990
+ "zh-CN": "优惠券图片",
2991
+ "ja-JP": "バウチャー画像"
2992
+ },
2993
+ property: "configs.image",
2994
+ type: "image"
2995
+ }
2996
+ ]
2997
+ }
2998
+ ]
2999
+ },
3000
+ {
3001
+ name: "connect.template.terms_conditions",
3002
+ name_locale: {
3003
+ "en-US": "Terms and conditions",
3004
+ "th-TH": "ข้อตกลงและเงื่อนไข",
3005
+ "zh-Hant": "條款和條件",
3006
+ "zh-CN": "条款和条件",
3007
+ "ja-JP": "利用規約"
3008
+ },
3009
+ groups: [
3010
+ {
3011
+ name: "connect.template.time_limitation",
3012
+ name_locale: {
3013
+ "en-US": "Time limitation",
3014
+ "th-TH": "ข้อจำกัดเวลา",
3015
+ "zh-Hant": "時間限制",
3016
+ "zh-CN": "时间限制",
3017
+ "ja-JP": "時間制限"
3018
+ },
3019
+ fields: [
3020
+ {
3021
+ label: void 0,
3022
+ label_locale: {},
3023
+ property: "campaign.event.rule",
3024
+ type: "rule_time",
3025
+ extras: "campaign.type"
3026
+ }
3027
+ ],
3028
+ condition: {
3029
+ not: !0,
3030
+ property: "campaign.event.type",
3031
+ value: "SCHEDULE"
3032
+ }
3033
+ },
3034
+ {
3035
+ name: "connect.template.target_audience",
3036
+ name_locale: {
3037
+ "en-US": "Target audience",
3038
+ "th-TH": "กลุ่มเป้าหมาย",
3039
+ "zh-Hant": "目標受眾",
3040
+ "zh-CN": "目标受众",
3041
+ "ja-JP": "対象者"
3042
+ },
3043
+ fields: [
3044
+ {
3045
+ label: void 0,
3046
+ label_locale: {},
3047
+ property: "campaign.event.rule",
3048
+ type: "rule_user"
3049
+ }
3050
+ ]
3051
+ },
3052
+ {
3053
+ name: "connect.template.voucher_usage_configuration",
3054
+ name_locale: {
3055
+ "en-US": "Voucher usage configuration",
3056
+ "th-TH": "การกำหนดค่าการใช้งานบัตรกำนัล",
3057
+ "zh-Hant": "優惠券使用配置",
3058
+ "zh-CN": "优惠券使用配置",
3059
+ "ja-JP": "バウチャー使用設定"
3060
+ },
3061
+ fields: [
3062
+ {
3063
+ label: void 0,
3064
+ label_locale: {},
3065
+ property: "configs.options",
3066
+ type: "collectible_options"
3067
+ }
3068
+ ]
3069
+ }
3070
+ ]
3071
+ },
3072
+ {
3073
+ name: "connect.template.configuration",
3074
+ name_locale: {
3075
+ "en-US": "Configuration",
3076
+ "th-TH": "การกำหนดค่า",
3077
+ "zh-Hant": "配置",
3078
+ "zh-CN": "配置",
3079
+ "ja-JP": "設定"
3080
+ },
3081
+ groups: [
3082
+ {
3083
+ name: "connect.template.location",
3084
+ name_locale: {
3085
+ "en-US": "Location",
3086
+ "th-TH": "สาขา",
3087
+ "zh-Hant": "位置",
3088
+ "zh-CN": "位置",
3089
+ "ja-JP": "場所"
3090
+ },
3091
+ fields: [
3092
+ {
3093
+ label: "connect.template.target_location",
3094
+ label_locale: {
3095
+ "en-US": "Target location",
3096
+ "th-TH": "สาขาเป้าหมาย",
3097
+ "zh-Hant": "目標位置",
3098
+ "zh-CN": "目标位置",
3099
+ "ja-JP": "対象店舗"
3100
+ },
3101
+ property: "campaign.targetLocation",
3102
+ type: "target_location"
3103
+ }
3104
+ ]
3105
+ },
3106
+ {
3107
+ name: "connect.template.notify_audience",
3108
+ name_locale: {
3109
+ "en-US": "Notify audience",
3110
+ "th-TH": "แจ้งเตือนกลุ่มเป้าหมาย",
3111
+ "zh-Hant": "通知受眾",
3112
+ "zh-CN": "通知受众",
3113
+ "ja-JP": "対象者への通知"
3114
+ },
3115
+ fields: [
3116
+ {
3117
+ label: "connect.template.send_notification",
3118
+ label_locale: {
3119
+ "en-US": "Send notification",
3120
+ "th-TH": "ส่งการแจ้งเตือน",
3121
+ "zh-Hant": "發送通知",
3122
+ "zh-CN": "发送通知",
3123
+ "ja-JP": "通知を送信"
3124
+ },
3125
+ property: "campaign.notify",
3126
+ type: "switch"
3127
+ }
3128
+ ]
3129
+ },
3130
+ {
3131
+ name: "connect.template.notify_message",
3132
+ name_locale: {
3133
+ "en-US": "Notify message",
3134
+ "th-TH": "ข้อความแจ้งเตือน",
3135
+ "zh-Hant": "通知消息",
3136
+ "zh-CN": "通知消息",
3137
+ "ja-JP": "通知メッセージ"
3138
+ },
3139
+ fields: [
3140
+ {
3141
+ label: "connect.template.notification_message",
3142
+ label_locale: {
3143
+ "en-US": "Notification message",
3144
+ "th-TH": "ข้อความแจ้งเตือน",
3145
+ "zh-Hant": "通知消息",
3146
+ "zh-CN": "通知消息",
3147
+ "ja-JP": "通知メッセージ"
3148
+ },
3149
+ property: "campaign.notifyMessage",
3150
+ type: "message",
3151
+ extras: "ISSUE_REWARD"
3152
+ }
3153
+ ],
3154
+ condition: {
3155
+ property: "campaign.notify",
3156
+ value: !0
3157
+ }
3158
+ }
3159
+ ]
3160
+ }
3161
+ ],
3162
+ defaultValue: {
3163
+ templateId: "",
3164
+ campaign: {
3165
+ collectible: "",
3166
+ type: "VOUCHER",
3167
+ templateId: "",
3168
+ name: "",
3169
+ description: "",
3170
+ image: "",
3171
+ event: {
3172
+ type: "MEMBERSHIP_JOINED",
3173
+ rule: {
3174
+ ...t.scaffoldGroup()
3175
+ }
3176
+ },
3177
+ group: null,
3178
+ targetLocation: null,
3179
+ timeframeOptions: {
3180
+ type: "timeframe",
3181
+ property: "__now"
3182
+ },
3183
+ earningOption: {
3184
+ type: "FIXED",
3185
+ amount: 1
3186
+ }
3187
+ },
3188
+ configs: p("VOUCHER", {
3189
+ name: "",
3190
+ business: null,
3191
+ noCampaign: !1
3192
+ })
3193
+ }
3194
+ };
2073
3195
  t.setRuleToGroup(t.scaffoldGroup(), [
2074
3196
  t.setRuleToGroup(
2075
3197
  t.scaffoldGroup("g_schedule"),
@@ -2117,7 +3239,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2117
3239
  ({
2118
3240
  ...t.scaffoldGroup()
2119
3241
  });
2120
- const Z = e.enum([
3242
+ const ae = e.enum([
2121
3243
  "MEMBER_REWARD",
2122
3244
  "PAID_LOYALTY",
2123
3245
  "COLLECT_FEEDBACK",
@@ -2127,7 +3249,7 @@ const Z = e.enum([
2127
3249
  "BROADCAST",
2128
3250
  "BIRTHDAY",
2129
3251
  "GAME"
2130
- ]), ee = e.enum([
3252
+ ]), ne = e.enum([
2131
3253
  "text",
2132
3254
  "number",
2133
3255
  "textarea",
@@ -2157,28 +3279,28 @@ const Z = e.enum([
2157
3279
  "grab_effect",
2158
3280
  "grab_quota",
2159
3281
  "grab_conditions"
2160
- ]), te = e.object({
3282
+ ]), oe = e.object({
2161
3283
  label: e.string().optional(),
2162
3284
  label_locale: e.record(e.string()).nullish(),
2163
3285
  property: e.string().or(e.any()),
2164
- type: ee,
3286
+ type: ne,
2165
3287
  extras: e.string().optional(),
2166
3288
  isRuleChildren: e.boolean().optional()
2167
- }), z = e.object({
3289
+ }), S = e.object({
2168
3290
  not: e.boolean().optional(),
2169
3291
  property: e.string(),
2170
3292
  value: e.any()
2171
- }), ae = e.object({
3293
+ }), ie = e.object({
2172
3294
  name: e.string().optional(),
2173
3295
  name_locale: e.record(e.string()).nullish(),
2174
- fields: e.array(te),
2175
- condition: z.optional().or(
2176
- e.array(z)
3296
+ fields: e.array(oe),
3297
+ condition: S.optional().or(
3298
+ e.array(S)
2177
3299
  )
2178
- }), ne = e.object({
3300
+ }), le = e.object({
2179
3301
  name: e.string(),
2180
3302
  name_locale: e.record(e.string()).nullish(),
2181
- groups: e.array(ae)
3303
+ groups: e.array(ie)
2182
3304
  });
2183
3305
  e.object({
2184
3306
  _id: n,
@@ -2186,11 +3308,11 @@ e.object({
2186
3308
  name_locale: e.record(e.string()).nullish(),
2187
3309
  description: e.string().nullish(),
2188
3310
  description_locale: e.record(e.string()).nullish(),
2189
- steps: e.array(ne).min(1),
2190
- intention: e.array(Z),
3311
+ steps: e.array(le).min(1),
3312
+ intention: e.array(ae),
2191
3313
  defaultValue: e.any()
2192
3314
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
2193
- const oe = {
3315
+ const re = {
2194
3316
  collectionName: "Businesses",
2195
3317
  transform: {
2196
3318
  _id: "oid"
@@ -2202,69 +3324,171 @@ e.object({
2202
3324
  name: e.string(),
2203
3325
  credit: e.number(),
2204
3326
  forceSend: e.boolean().optional()
2205
- }).describe(m.describe(oe));
2206
- const v = e.enum(["PHONE"]), ie = e.enum([
3327
+ }).describe(m.describe(re));
3328
+ const P = e.enum(["PHONE"]), ce = e.enum([
2207
3329
  "MOCEAN",
2208
3330
  "SLACK",
2209
3331
  "SMS",
2210
3332
  "EMAIL",
2211
3333
  "WHATSAPP"
2212
- ]), le = e.enum(["PENDING", "COMPLETED", "FAILED"]), re = e.enum([
3334
+ ]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
2213
3335
  "General",
2214
3336
  "Otp",
2215
3337
  "Marketing",
2216
3338
  "Ordering",
2217
3339
  "MemberInvitation",
2218
3340
  "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 = {
3341
+ ]), se = e.object({
3342
+ type: P
3343
+ }), j = se.extend({
3344
+ type: e.literal(P.enum.PHONE),
3345
+ provider: ce,
3346
+ usage: me.optional()
3347
+ }), E = e.enum([
3348
+ "Accepted",
3349
+ "PartiallyAccepted",
3350
+ "Queued",
3351
+ "Unknown",
3352
+ "Failed"
3353
+ ]), ge = e.enum([
3354
+ "PENDING",
3355
+ "SUBMITTED",
3356
+ "SETTLED",
3357
+ "FAILED"
3358
+ ]), J = e.object({
3359
+ channel: e.string(),
3360
+ status: e.string(),
3361
+ statusDetails: e.string().nullish()
3362
+ }), de = {
2226
3363
  collectionName: "Notifications",
2227
- transform: { _id: "oid", business: "oid" }
3364
+ transform: {
3365
+ _id: "oid",
3366
+ business: "oid",
3367
+ campaign: "oid",
3368
+ member: "oid"
3369
+ }
2228
3370
  };
2229
3371
  e.object({
2230
3372
  _id: n,
2231
3373
  business: n,
2232
- target: e.string(),
3374
+ status: pe,
3375
+ ref: e.string().optional(),
2233
3376
  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({
3377
+ // Single-channel fields. Absent on multi-channel dispatches, which carry
3378
+ // their content per channel in the submitted request instead.
3379
+ target: e.string().optional(),
3380
+ message: e.string().optional(),
3381
+ option: j.optional(),
3382
+ // Multi-channel dispatch fields.
3383
+ campaign: n.nullish(),
3384
+ member: n.nullish(),
3385
+ /**
3386
+ * The scheduled run this dispatch belongs to. With campaign and member it
3387
+ * identifies one intended send, so a redelivered queue job is recognised
3388
+ * rather than sent twice.
3389
+ */
3390
+ runAt: e.coerce.date().nullish(),
3391
+ mode: z.nullish(),
3392
+ channels: e.array(U).nullish(),
3393
+ /**
3394
+ * Local submission state, kept separate from the upstream outcome so an
3395
+ * interrupted worker can tell "never sent" from "sent, result unknown".
3396
+ */
3397
+ state: ge.nullish(),
3398
+ outcome: E.nullish(),
3399
+ /** Upstream correlation id, preserved even when the request failed. */
3400
+ requestId: e.string().nullish(),
3401
+ attempts: e.array(J).nullish(),
3402
+ /** Credit consumed upstream, recorded for reconciliation. */
3403
+ creditUsed: d.nullish(),
3404
+ balanceAfter: d.nullish(),
3405
+ error: e.string().nullish(),
3406
+ createdAt: e.coerce.date().nullish(),
3407
+ submittedAt: e.coerce.date().nullish(),
3408
+ settledAt: e.coerce.date().nullish()
3409
+ }).describe(m.describe(de));
3410
+ const ue = e.object({
2240
3411
  target: e.string(),
2241
3412
  title: e.string().optional(),
2242
3413
  message: e.string(),
2243
- option: S,
3414
+ option: j,
2244
3415
  ref: e.string().optional()
3416
+ }), he = e.object({
3417
+ memberId: e.string(),
3418
+ name: e.string().nullish(),
3419
+ phoneNumber: e.string().nullish(),
3420
+ email: e.string().nullish(),
3421
+ /**
3422
+ * Shared Firebase uid required by App Inbox and Push, sourced from
3423
+ * `FdoUserV2.externalMemberId`. Optional there, so it can legitimately be
3424
+ * absent for a member; upstream decides what that means for a channel.
3425
+ */
3426
+ firebaseUid: e.string().nullish()
3427
+ });
3428
+ e.object({
3429
+ businessId: e.string(),
3430
+ forceSend: e.boolean(),
3431
+ mode: z,
3432
+ channels: e.array(
3433
+ e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
3434
+ ),
3435
+ metadata: e.object({
3436
+ source: e.string(),
3437
+ refValue: e.string()
3438
+ }),
3439
+ content: e.record(e.string(), e.unknown())
2245
3440
  });
2246
3441
  e.object({
3442
+ requestId: e.string().nullish(),
3443
+ status: E.nullish(),
3444
+ attempts: e.array(J).nullish(),
3445
+ creditUsed: d.nullish(),
3446
+ balance: d.nullish()
3447
+ });
3448
+ const _e = e.object({
2247
3449
  campaignId: e.string(),
2248
- notification: me,
2249
- business: e.string()
3450
+ business: e.string(),
3451
+ runAt: e.coerce.date(),
3452
+ recipient: he,
3453
+ /** Personalised, editor-data-free content keyed by channel. */
3454
+ content: e.record(e.string(), e.unknown()),
3455
+ mode: z,
3456
+ channels: e.array(U)
3457
+ });
3458
+ e.object({
3459
+ campaignId: e.string(),
3460
+ /** Absent only on multi-channel jobs, which carry `dispatch` instead. */
3461
+ notification: ue.optional(),
3462
+ business: e.string(),
3463
+ /**
3464
+ * Present only for multi-channel broadcasts. When set the job takes the
3465
+ * multi-channel dispatch path; when absent the legacy single-channel path
3466
+ * runs unchanged.
3467
+ */
3468
+ dispatch: _e.optional()
3469
+ }).superRefine((o, a) => {
3470
+ !o.notification && !o.dispatch && a.addIssue({
3471
+ code: e.ZodIssueCode.custom,
3472
+ message: "Job must carry either a notification or a dispatch"
3473
+ });
2250
3474
  });
2251
3475
  e.object({
2252
3476
  phone: e.string(),
2253
3477
  message: e.string()
2254
3478
  });
2255
- const C = e.object({
3479
+ const N = e.object({
2256
3480
  name: e.string().optional(),
2257
3481
  address: e.string()
2258
- }), se = e.object({
3482
+ }), ye = e.object({
2259
3483
  filename: e.string(),
2260
3484
  content: e.instanceof(Uint8Array)
2261
3485
  });
2262
3486
  e.object({
2263
- from: C.optional(),
2264
- to: e.array(C),
3487
+ from: N.optional(),
3488
+ to: e.array(N),
2265
3489
  subject: e.string(),
2266
3490
  html: e.string().optional(),
2267
- attachments: e.array(se).optional()
3491
+ attachments: e.array(ye).optional()
2268
3492
  });
2269
3493
  e.object({
2270
3494
  subject: e.string(),
@@ -2304,7 +3528,7 @@ e.object({
2304
3528
  billId: e.string()
2305
3529
  });
2306
3530
  e.object({
2307
- amount: L,
3531
+ amount: A,
2308
3532
  member: e.string(),
2309
3533
  bill: e.string(),
2310
3534
  otp: e.string().nullish(),
@@ -2313,15 +3537,15 @@ e.object({
2313
3537
  e.object({
2314
3538
  orderId: e.string()
2315
3539
  });
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);
3540
+ var O = /* @__PURE__ */ ((o) => (o[o.feedMe = 0] = "feedMe", o[o.business = 1] = "business", o[o.restaurant = 2] = "restaurant", o))(O || {});
3541
+ e.nativeEnum(O);
2318
3542
  e.enum(["manage", "create", "read", "update", "delete"]);
2319
3543
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2320
3544
  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);
3545
+ 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 || {});
3546
+ e.nativeEnum(I);
2323
3547
  e.enum(["restaurant"]);
2324
- const ge = e.object({
3548
+ const fe = e.object({
2325
3549
  label: e.string(),
2326
3550
  subject: e.union([e.string(), e.array(e.string())]),
2327
3551
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2336,7 +3560,7 @@ e.object({
2336
3560
  userId: e.string(),
2337
3561
  email: e.string().nullish(),
2338
3562
  phoneNo: e.string().nullish(),
2339
- permissions: e.array(e.lazy(() => ge))
3563
+ permissions: e.array(e.lazy(() => fe))
2340
3564
  }).describe(
2341
3565
  m.describe({
2342
3566
  collectionName: "PermissionUsers",
@@ -2345,27 +3569,27 @@ e.object({
2345
3569
  }
2346
3570
  })
2347
3571
  );
2348
- const P = e.object({
3572
+ const R = e.object({
2349
3573
  userId: e.string(),
2350
3574
  level: e.number(),
2351
3575
  role: e.string().optional(),
2352
3576
  businessId: e.string().optional(),
2353
3577
  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())));
3578
+ }), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
2355
3579
  e.object({
2356
- isAdmin: de,
2357
- getRules: ue
3580
+ isAdmin: be,
3581
+ getRules: He
2358
3582
  });
2359
3583
  e.object({
2360
- transactions: e.array(D),
2361
- collections: e.array(w)
3584
+ transactions: e.array(F),
3585
+ collections: e.array(G)
2362
3586
  });
2363
- const j = e.enum([
3587
+ const L = e.enum([
2364
3588
  "ROCK_PAPER_SCISSOR"
2365
3589
  ]);
2366
- j.enum.ROCK_PAPER_SCISSOR + "";
3590
+ L.enum.ROCK_PAPER_SCISSOR + "";
2367
3591
  e.object({
2368
- type: j
3592
+ type: L
2369
3593
  });
2370
3594
  e.object({
2371
3595
  host: e.string().url(),
@@ -2374,7 +3598,7 @@ e.object({
2374
3598
  roomId: e.string()
2375
3599
  });
2376
3600
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
2377
- const he = {
3601
+ const ze = {
2378
3602
  collectionName: "MarketingMaterials",
2379
3603
  transform: {
2380
3604
  _id: "oid",
@@ -2388,7 +3612,7 @@ e.object({
2388
3612
  headline: e.string(),
2389
3613
  caption: e.string(),
2390
3614
  editedAt: e.coerce.date()
2391
- }).describe(m.describe(he));
3615
+ }).describe(m.describe(ze));
2392
3616
  e.object({
2393
3617
  id: e.number(),
2394
3618
  name: e.string(),
@@ -2408,12 +3632,12 @@ e.object({
2408
3632
  phone: e.string().optional(),
2409
3633
  email: e.string().optional()
2410
3634
  });
2411
- const _e = e.enum([
3635
+ const Te = e.enum([
2412
3636
  "PENDING",
2413
3637
  "SUCCESS",
2414
3638
  "FAILED",
2415
3639
  "RETRYING"
2416
- ]), ye = {
3640
+ ]), Ce = {
2417
3641
  collectionName: "WebhookLogs",
2418
3642
  transform: {
2419
3643
  _id: "oid",
@@ -2425,18 +3649,18 @@ e.object({
2425
3649
  business: n,
2426
3650
  type: e.string(),
2427
3651
  payload: e.record(e.any()),
2428
- status: _e,
3652
+ status: Te,
2429
3653
  response: e.any().optional(),
2430
3654
  error: e.string().optional()
2431
- }).describe(m.describe(ye));
2432
- const fe = e.enum(["AUTO", "MANUAL"]);
3655
+ }).describe(m.describe(Ce));
3656
+ const ve = e.enum(["AUTO", "MANUAL"]);
2433
3657
  e.enum(["IN_PROGRESS", "COMPLETED"]);
2434
- const J = e.object({
3658
+ const x = e.object({
2435
3659
  _id: n,
2436
3660
  name: e.string().min(1, "Name is required").max(50),
2437
- type: fe,
2438
- event: A.optional()
2439
- }), be = e.object({
3661
+ type: ve,
3662
+ event: V.optional()
3663
+ }), Se = e.object({
2440
3664
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2441
3665
  to: e.number().int("Must be integer").nullish()
2442
3666
  }).superRefine((o, a) => {
@@ -2444,16 +3668,16 @@ const J = e.object({
2444
3668
  code: "custom",
2445
3669
  message: "Max referral count must be more than min referral count"
2446
3670
  });
2447
- }), He = e.object({
2448
- threshold: be,
3671
+ }), Ne = e.object({
3672
+ threshold: Se,
2449
3673
  rewards: e.array(n),
2450
- pf_reward: e.array(f).optional()
2451
- }), b = e.object({
3674
+ pf_reward: e.array(T).optional()
3675
+ }), C = e.object({
2452
3676
  id: e.string(),
2453
3677
  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 = {
3678
+ rule: B.optional(),
3679
+ rewards: e.array(Ne)
3680
+ }), Ue = {
2457
3681
  collectionName: "ReferralRecords",
2458
3682
  transform: {
2459
3683
  _id: "oid",
@@ -2462,25 +3686,25 @@ const J = e.object({
2462
3686
  referee: "oid",
2463
3687
  refereeReward: "oid"
2464
3688
  }
2465
- }, Ce = e.object({
3689
+ }, Pe = e.object({
2466
3690
  completedAt: e.coerce.date(),
2467
3691
  criteria: n,
2468
3692
  ref: e.string()
2469
- }), Te = e.object({
3693
+ }), je = e.object({
2470
3694
  _id: n,
2471
3695
  business: n,
2472
3696
  referer: n,
2473
3697
  referee: n,
2474
- criteria: e.array(J),
2475
- reward: e.array(b),
3698
+ criteria: e.array(x),
3699
+ reward: e.array(C),
2476
3700
  refereeReward: e.array(n).optional(),
2477
- criteria_progress: e.array(Ce),
3701
+ criteria_progress: e.array(Pe),
2478
3702
  status: e.string(),
2479
3703
  pf_referer: g.optional(),
2480
3704
  pf_referee: g.optional(),
2481
- pf_refereeReward: e.array(f).optional()
2482
- }).describe(m.describe(ze));
2483
- Te.pick({
3705
+ pf_refereeReward: e.array(T).optional()
3706
+ }).describe(m.describe(Ue));
3707
+ je.pick({
2484
3708
  _id: !0,
2485
3709
  business: !0,
2486
3710
  referer: !0,
@@ -2495,33 +3719,33 @@ Te.pick({
2495
3719
  photoUrl: !0
2496
3720
  })
2497
3721
  });
2498
- const ve = {
3722
+ const Ee = {
2499
3723
  collectionName: "ReferralProgram",
2500
3724
  transform: {
2501
3725
  _id: "oid",
2502
3726
  business: "oid"
2503
3727
  }
2504
- }, E = e.object({
3728
+ }, D = e.object({
2505
3729
  _id: n,
2506
3730
  business: n,
2507
3731
  term_and_condition: e.string().optional(),
2508
3732
  refereeReward: e.array(n).optional(),
2509
- reward: e.array(b),
2510
- criteria: e.array(J)
2511
- }).describe(m.describe(ve));
3733
+ reward: e.array(C),
3734
+ criteria: e.array(x)
3735
+ }).describe(m.describe(Ee));
2512
3736
  e.object({
2513
3737
  referer: n,
2514
3738
  referee: n,
2515
3739
  business: n
2516
3740
  });
2517
3741
  e.object({
2518
- program: E.pick({
3742
+ program: D.pick({
2519
3743
  _id: !0,
2520
3744
  business: !0,
2521
3745
  term_and_condition: !0
2522
3746
  }).extend({
2523
- reward: b.optional(),
2524
- pf_refereeReward: e.array(f).optional()
3747
+ reward: C.optional(),
3748
+ pf_refereeReward: e.array(T).optional()
2525
3749
  }),
2526
3750
  referralCount: e.number(),
2527
3751
  successReferralCount: e.number(),
@@ -2532,33 +3756,37 @@ e.object({
2532
3756
  photoUrl: !0
2533
3757
  }).optional()
2534
3758
  });
2535
- E.extend({
3759
+ D.extend({
2536
3760
  updateReferralRecord: e.boolean().optional()
2537
3761
  });
2538
- const Se = e.object({
3762
+ const Je = e.object({
2539
3763
  facebookPageId: e.string(),
2540
3764
  pageName: e.string(),
2541
3765
  pageProfileImageUrl: e.string(),
2542
3766
  pageAccessToken: e.string().optional(),
2543
3767
  locationIds: e.array(n)
2544
- }), Ne = e.object({
3768
+ }), Oe = e.object({
2545
3769
  locationId: n.nullable(),
2546
3770
  googleLocationName: e.string(),
2547
3771
  displayName: e.string().optional()
2548
- }), Ue = e.object({
3772
+ }), Ie = e.object({
2549
3773
  accessToken: e.string().nullable(),
2550
3774
  refreshToken: e.string().nullable(),
2551
3775
  accessTokenExpiresAt: e.date().nullable(),
2552
- locations: e.array(Ne)
2553
- }), Pe = e.object({
3776
+ locations: e.array(Oe),
3777
+ lastSyncTime: e.coerce.date().nullish(),
3778
+ syncFrequency: e.number().int().min(1).max(30).default(30)
3779
+ }), Re = e.object({
2554
3780
  token: e.string().nullable(),
2555
- pages: e.array(Se)
3781
+ pages: e.array(Je),
3782
+ lastSyncTime: e.coerce.date().nullish(),
3783
+ syncFrequency: e.number().int().min(1).max(30).default(30)
2556
3784
  });
2557
3785
  e.object({
2558
3786
  _id: n,
2559
3787
  businessId: n,
2560
- google: Ue.nullable(),
2561
- facebook: Pe.nullable()
3788
+ google: Ie.nullable(),
3789
+ facebook: Re.nullable()
2562
3790
  }).describe(
2563
3791
  m.describe({
2564
3792
  collectionName: "ReviewSourceConfig",
@@ -2604,7 +3832,9 @@ e.object({
2604
3832
  displayName: e.string().optional(),
2605
3833
  locationId: e.string().nullable()
2606
3834
  })
2607
- )
3835
+ ),
3836
+ lastSyncTime: e.string().datetime().nullable(),
3837
+ syncFrequency: e.number().int().min(1).max(30)
2608
3838
  }).nullable(),
2609
3839
  facebook: e.object({
2610
3840
  token: e.string().nullable(),
@@ -2615,107 +3845,120 @@ e.object({
2615
3845
  pageProfileImageUrl: e.string(),
2616
3846
  locationIds: e.array(e.string())
2617
3847
  })
2618
- )
3848
+ ),
3849
+ lastSyncTime: e.string().datetime().nullable(),
3850
+ syncFrequency: e.number().int().min(1).max(30)
2619
3851
  }).nullable()
2620
3852
  });
2621
- const O = e.object({
3853
+ const u = e.object({
2622
3854
  name: e.string(),
2623
- pictureUrl: e.string()
2624
- }), je = O.extend({
3855
+ pictureUrl: e.string(),
3856
+ phoneNumber: e.string().optional()
3857
+ }), Le = u.extend({
2625
3858
  isAnonymous: e.boolean().optional()
2626
- }), Je = O.extend({
3859
+ }), xe = u.extend({
2627
3860
  id: e.string().optional()
2628
- }), d = e.object({
3861
+ }), h = e.object({
2629
3862
  comment: e.string(),
2630
3863
  updateTime: e.coerce.date()
2631
- }), s = e.object({
3864
+ });
3865
+ e.object({
3866
+ comment: e.string().trim().min(1).max(4096)
3867
+ });
3868
+ const s = e.object({
2632
3869
  externalId: e.string().optional(),
2633
3870
  thumbnailUrl: e.string(),
2634
3871
  thumbnailLabel: e.string(),
2635
3872
  videoUrl: e.string().optional()
2636
- }), Ee = {
3873
+ }), De = {
2637
3874
  collectionName: "Reviews",
2638
3875
  transform: {
2639
3876
  _id: "oid",
2640
3877
  businessId: "oid",
2641
3878
  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
- }
3879
+ restaurantId: "oid"
2653
3880
  }
2654
- }, I = e.enum([
3881
+ }, w = e.enum([
2655
3882
  "google",
2656
3883
  "facebook",
2657
3884
  "feedme",
2658
3885
  "feedvibe"
2659
3886
  ]);
2660
- I.options;
3887
+ w.options;
2661
3888
  e.enum(["google", "facebook"]);
2662
- const Oe = e.enum([
3889
+ const we = e.enum([
2663
3890
  "createTime_desc",
2664
3891
  "createTime_asc",
2665
3892
  "rating_asc",
2666
3893
  "rating_desc"
2667
3894
  ]);
2668
3895
  e.object({
2669
- source: I.array().optional(),
3896
+ source: w.array().optional(),
2670
3897
  dateFrom: e.string().datetime({ offset: !0 }).optional(),
2671
3898
  dateTo: e.string().datetime({ offset: !0 }).optional(),
2672
3899
  locationId: e.string().optional(),
2673
3900
  excludeDeleted: e.boolean().optional(),
2674
- sort: Oe.optional(),
3901
+ sort: we.optional(),
2675
3902
  limit: e.coerce.number().int().positive().optional(),
2676
3903
  skip: e.coerce.number().int().min(0).optional()
2677
3904
  });
2678
- const R = e.object({
3905
+ const pt = e.object({
3906
+ averageScore: e.number(),
3907
+ total: e.number().int().nonnegative(),
3908
+ starCounts: e.array(
3909
+ e.object({
3910
+ star: e.number().int().min(1).max(5),
3911
+ count: e.number().int().nonnegative()
3912
+ })
3913
+ )
3914
+ }), _ = e.object({
2679
3915
  name: e.string(),
2680
- pictureUrl: e.string()
2681
- }), Ie = R.extend({
3916
+ pictureUrl: e.string().optional(),
3917
+ phoneNumber: e.string().optional()
3918
+ }), Ae = _.extend({
3919
+ _id: e.string().optional()
3920
+ }), Me = _.extend({
3921
+ _id: e.string()
3922
+ }), Fe = _.extend({
2682
3923
  isAnonymous: e.boolean().optional()
2683
- }), Re = R.extend({
3924
+ }), Ge = _.extend({
2684
3925
  id: e.string().optional()
2685
- }), u = e.object({
3926
+ }), y = e.object({
2686
3927
  _id: n,
2687
3928
  comment: e.string(),
2688
3929
  createTime: e.coerce.date(),
2689
3930
  updateTime: e.coerce.date().nullish(),
2690
- locationId: n
2691
- }), Le = u.extend({
3931
+ restaurantId: n,
3932
+ restaurantName: e.string()
3933
+ }), ke = y.extend({
2692
3934
  source: e.literal("google"),
2693
3935
  externalId: e.string().min(1),
2694
- reviewer: Ie.optional(),
2695
- reply: d.optional(),
3936
+ translatedComment: e.string().optional(),
3937
+ reviewer: Fe.optional(),
3938
+ reply: h.optional(),
2696
3939
  mediaItems: e.array(s),
2697
3940
  starRating: e.number(),
2698
3941
  locationName: e.string(),
2699
- locationDisplayName: e.string()
2700
- }), xe = u.extend({
3942
+ locationDisplayName: e.string(),
3943
+ originalUrl: e.string().optional()
3944
+ }), Be = y.extend({
2701
3945
  source: e.literal("facebook"),
2702
3946
  externalId: e.string().min(1),
2703
- reviewer: Re.optional(),
3947
+ reviewer: Ge.optional(),
2704
3948
  isPositive: e.boolean().optional(),
2705
3949
  pageId: e.string(),
2706
3950
  pageName: e.string()
2707
- }), De = u.extend({
3951
+ }), Ve = y.extend({
2708
3952
  source: e.literal("feedme"),
2709
- reviewer: T,
2710
- reply: d.optional(),
3953
+ reviewer: Ae.optional(),
3954
+ reply: h.optional(),
2711
3955
  starRating: e.number(),
2712
- location: G.optional(),
2713
3956
  mediaItems: e.array(s),
2714
3957
  billId: e.string()
2715
- }), we = u.extend({
3958
+ }), We = y.extend({
2716
3959
  source: e.literal("feedvibe"),
2717
3960
  externalId: e.string().min(1),
2718
- reviewer: T.optional(),
3961
+ reviewer: Me.optional(),
2719
3962
  rating: e.object({
2720
3963
  overall: e.number(),
2721
3964
  food: e.number(),
@@ -2726,58 +3969,64 @@ const R = e.object({
2726
3969
  mediaItems: e.array(s).default([])
2727
3970
  });
2728
3971
  e.discriminatedUnion("source", [
2729
- Le,
2730
- xe,
2731
- De,
2732
- we
3972
+ ke,
3973
+ Be,
3974
+ Ve,
3975
+ We
2733
3976
  ]);
2734
3977
  e.object({
2735
3978
  comment: e.string(),
2736
3979
  starRating: e.number(),
2737
3980
  billId: e.string(),
3981
+ isAnonymous: e.boolean(),
2738
3982
  mediaItems: e.array(s).optional()
2739
3983
  });
2740
- const h = e.object({
3984
+ e.object({
3985
+ name: e.string().trim().min(1),
3986
+ phoneNumber: e.string().trim().min(1).optional()
3987
+ });
3988
+ const f = e.object({
2741
3989
  _id: n,
2742
3990
  businessId: n,
2743
3991
  comment: e.string(),
2744
3992
  createTime: e.coerce.date(),
2745
3993
  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,
3994
+ restaurantId: n,
3995
+ restaurantName: e.string(),
2750
3996
  deletedAt: e.coerce.date().optional()
2751
- }), Ae = h.extend({
3997
+ }), Ye = f.extend({
2752
3998
  source: e.literal("google"),
2753
3999
  externalId: e.string().min(1),
2754
- reviewer: je.optional(),
2755
- reply: d.optional(),
4000
+ translatedComment: e.string().optional(),
4001
+ reviewer: Le.optional(),
4002
+ reply: h.optional(),
2756
4003
  mediaItems: e.array(s),
2757
4004
  starRating: e.number(),
2758
4005
  locationName: e.string(),
2759
- locationDisplayName: e.string()
2760
- }), Ge = h.extend({
4006
+ locationDisplayName: e.string(),
4007
+ originalUrl: e.string().optional()
4008
+ }), Ke = f.extend({
2761
4009
  source: e.literal("facebook"),
2762
4010
  externalId: e.string().min(1),
2763
- reviewer: Je.optional(),
4011
+ reviewer: xe.optional(),
2764
4012
  isPositive: e.boolean().optional(),
2765
4013
  pageId: e.string(),
2766
4014
  pageName: e.string()
2767
- }), Me = h.extend({
4015
+ }), qe = f.extend({
2768
4016
  source: e.literal("feedme"),
2769
- reviewerId: n,
2770
- reviewer: e.any().optional(),
2771
- reply: d.optional(),
4017
+ isAnonymous: e.boolean(),
4018
+ metadata: e.record(e.string(), e.unknown()).optional(),
4019
+ reviewerId: n.optional(),
4020
+ reviewer: u.optional(),
4021
+ reply: h.optional(),
2772
4022
  starRating: e.number(),
2773
4023
  billId: e.string(),
2774
- location: e.any().optional(),
2775
4024
  mediaItems: e.array(s)
2776
- }), Fe = h.extend({
4025
+ }), Xe = f.extend({
2777
4026
  source: e.literal("feedvibe"),
2778
4027
  externalId: e.string().min(1),
2779
4028
  reviewerId: n,
2780
- reviewer: e.any().optional(),
4029
+ reviewer: u,
2781
4030
  rating: e.object({
2782
4031
  overall: e.number(),
2783
4032
  food: e.number(),
@@ -2788,21 +4037,26 @@ const h = e.object({
2788
4037
  mediaItems: e.array(s).default([])
2789
4038
  });
2790
4039
  e.discriminatedUnion("source", [
2791
- Ae,
2792
- Ge,
2793
- Me,
2794
- Fe
2795
- ]).describe(m.describe(Ee));
4040
+ Ye,
4041
+ Ke,
4042
+ qe,
4043
+ Xe
4044
+ ]).describe(m.describe(De));
2796
4045
  export {
2797
- Z as F,
4046
+ ae as F,
2798
4047
  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
4048
+ lt as S,
4049
+ it as T,
4050
+ ct as W,
4051
+ H as a,
4052
+ rt as b,
4053
+ Ne as c,
4054
+ x as d,
4055
+ C as e,
4056
+ $ as f,
4057
+ Z as g,
4058
+ pt as h,
4059
+ W as i,
4060
+ h as j,
4061
+ q as s
2808
4062
  };