@feedmepos/mf-connect 0.1.117-dev → 0.1.118-prod

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 (146) hide show
  1. package/dist/{App-BpcsgH7K.js → App-BHcTqLff.js} +89 -97
  2. package/dist/{Bin-Cm0wjQeR.js → Bin-DWhXJmHo.js} +8 -8
  3. package/dist/{Broadcast-BoJaHqnO.js → Broadcast-Ct1DL8Pd.js} +21 -22
  4. package/dist/{CampaignAnalytic-Eg4xZW0B.js → CampaignAnalytic-BSEKCM-4.js} +7 -7
  5. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BXylK6Ze.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BxRg2Wu8.js} +10 -9
  6. package/dist/{Card-BfkMcFaG.js → Card-B7DwrAPH.js} +23 -23
  7. package/dist/{Collections-RXmxQbII.js → Collections-BJw4JJq_.js} +185 -197
  8. package/dist/{Credit-CsRPM1jv.js → Credit-BteIGXkp.js} +20 -21
  9. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-D2tvK7pw.js → DateRangeChip.vue_vue_type_script_setup_true_lang-CSFwIzOS.js} +1 -1
  10. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BJotVIKM.js +3496 -0
  11. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-CUx8UIIq.js → EffectSheet.vue_vue_type_style_index_0_lang-BDZ21UHA.js} +30 -30
  12. package/dist/{Experience-BC8Pj-v9.js → Experience-C_VQVfJX.js} +31 -32
  13. package/dist/{FileSaver.min-DzmoQFA0.js → FileSaver.min-CMiQUZQE.js} +1 -1
  14. package/dist/{Game-DJXNHFBs.js → Game-BiHMrMBF.js} +18 -19
  15. package/dist/{GiftCardSetup-_0n8lU-t.js → GiftCardSetup-DtJIm6oI.js} +31 -31
  16. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-C-AiJdui.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BKGnPAEj.js} +7 -7
  17. package/dist/{Goals-DSZwKpds.js → Goals-B7VjLMDT.js} +4 -4
  18. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BZb-H4fM.js → ImageInput.vue_vue_type_script_setup_true_lang-C9ecPgpJ.js} +1 -1
  19. package/dist/{Index-Cbi0bquE.js → Index-D_DIHKZG.js} +10 -10
  20. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-GLhMtvzi.js → LocationPicker.vue_vue_type_script_setup_true_lang-DSwB0Ubn.js} +1 -1
  21. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-Bt9CO_QR.js → LottieAnimation.vue_vue_type_script_setup_true_lang-dk8_eVwd.js} +1 -1
  22. package/dist/{LoyaltyDashboard-fK90c27A.js → LoyaltyDashboard-DOgHeJdK.js} +15 -15
  23. package/dist/{MainLayout-Bf-l9yL4.js → MainLayout-CfYgoXLS.js} +1 -1
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-COR6YYYI.js → MainLayout.vue_vue_type_script_setup_true_lang-Bz2LGHUd.js} +3 -3
  25. package/dist/{Marketing-B7cZGsO-.js → Marketing-B6TCrwaR.js} +4 -4
  26. package/dist/{MarketingMaterialEdit-5IcV2ct6.js → MarketingMaterialEdit-Bu3a9NGj.js} +211 -214
  27. package/dist/{Member-BGTrRVdq.js → Member-X51KrYXV.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-DJr2hV2W.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-CYU21JaO.js} +48 -40
  29. package/dist/{MemberImportHistory--FxkTJmu.js → MemberImportHistory-CHd9fx7E.js} +7 -7
  30. package/dist/{MemberList-EjY5dgwt.js → MemberList-D4L3bSlw.js} +105 -103
  31. package/dist/{MemberTransactions-Oia7LIFK.js → MemberTransactions-CEgjfhnX.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CLOQZCYy.js → MessageInput.vue_vue_type_script_setup_true_lang-zsaig_yK.js} +12 -12
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-Ev3bB8cg.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-YZQkKG66.js} +1 -1
  34. package/dist/{Mission-BFHYb4aT.js → Mission-BEVtvY0-.js} +21 -22
  35. package/dist/{Overview-d5U37aot.js → Overview-4QRkldza.js} +144 -145
  36. package/dist/{Overview-BVNyQxFL.js → Overview-DVoXXZ16.js} +21 -21
  37. package/dist/{Point-CXkqH02Z.js → Point-BJmebaL9.js} +21 -22
  38. package/dist/{Promotion-DdxNvlOO.js → Promotion-DWZZBofu.js} +131 -137
  39. package/dist/{Queue-C96oNKyP.js → Queue-DLdsyhCT.js} +46 -46
  40. package/dist/{Record-Bj2e2Y4i.js → Record-QOD3XELf.js} +9 -9
  41. package/dist/{Review-CJK5S1oI.js → Review-CKmhyuqj.js} +2 -2
  42. package/dist/ReviewFacebookCallback-C6DlaJ_j.js +238 -0
  43. package/dist/{ReviewGoogleCallback-Dmk4VyGA.js → ReviewGoogleCallback-CDriVQPZ.js} +5 -5
  44. package/dist/{Reward-Dh2YI0Xb.js → Reward-DftoZfPN.js} +16 -16
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-U47m3AAn.js → RewardGroup.vue_vue_type_script_setup_true_lang-ZgYX2QwC.js} +14 -14
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DHmBwLNP.js +1884 -0
  47. package/dist/{Segment-FYvtCkqH.js → Segment-URdB0lnl.js} +307 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-DPZZz2e0.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DmI2LAsz.js} +15 -15
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-D8wBgLlS.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-BCEgZzA4.js} +4 -4
  50. package/dist/{Setting-CUAWjCqa.js → Setting-BDIHH2Wk.js} +148 -159
  51. package/dist/{SettingAdvertisements-COIQwUD6.js → SettingAdvertisements-CkJYZnIN.js} +12 -12
  52. package/dist/Settings-9gaegvYJ.js +179 -0
  53. package/dist/{Store-BAXwiyvx.js → Store-CV0kYncl.js} +29 -29
  54. package/dist/{StoreRewards-2mUavtUg.js → StoreRewards-30kSkAZ_.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Dgwyk3NA.js +1265 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-CDUhH6wp.js +142 -0
  57. package/dist/{Tier-BmAOzRHL.js → Tier-DiQSC3iv.js} +688 -2576
  58. package/dist/{Title-DMxiUg30.js → Title-DixxpjAg.js} +95 -96
  59. package/dist/{Transaction-CF6hXEpN.js → Transaction-DQK4LUGD.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BON_t0dL.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-CL-GKkuD.js} +26 -26
  61. package/dist/{Voucher-DrtITxq-.js → Voucher-CSVlk_Hr.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-1DZOzJKx.js → VoucherEditor.vue_vue_type_script_setup_true_lang-CiSoy0Ky.js} +12 -12
  63. package/dist/{WhatsappAccount-Bb0Y7ikk.js → WhatsappAccount-CQYbv2Ew.js} +66 -64
  64. package/dist/{WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-CPlyzkp4.js → WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-DjgRo9iA.js} +1 -1
  65. package/dist/{WhatsappBot-DNvvaPey.js → WhatsappBot-DdO9Bfvh.js} +324 -322
  66. package/dist/{WhatsappBotLogs-C8M-1pvv.js → WhatsappBotLogs-CjjWJGND.js} +11 -11
  67. package/dist/{WhatsappBotSettings-D6egqUyU.js → WhatsappBotSettings-DYGx-kRr.js} +287 -288
  68. package/dist/{WhatsappLayout-DeQTPuF6.js → WhatsappLayout-B6k_79Kl.js} +3 -3
  69. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DTUytfe5.js +261 -0
  70. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CKZscSjU.js → ZodTextField.vue_vue_type_script_setup_true_lang-DdCUr_Zm.js} +2 -2
  71. package/dist/{app-BjdLqYQq.js → app-CqQeNnGq.js} +3382 -4110
  72. package/dist/app.js +3 -4
  73. package/dist/{base.export-B68z5BF6.js → base.export-Dls5LQeu.js} +2 -2
  74. package/dist/{business-D9fgkHxb.js → business-gvLSQklz.js} +1 -1
  75. package/dist/{campaign-Dw_ujovr.js → campaign-BqazvOUj.js} +94 -121
  76. package/dist/{campaign-eMaPX8r6.js → campaign-Cd6GmA4U.js} +25 -31
  77. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-BqekIiiN.js} +1 -2
  78. package/dist/{campaign.fn-DFjGNvmN.js → campaign.fn-C0oMb1fs.js} +99 -99
  79. package/dist/{collection.fn-CCOWtB-c.js → collection.fn-CERMsFPh.js} +2 -2
  80. package/dist/{currency-CTLKReFC.js → currency-IkiKiNg1.js} +1 -1
  81. package/dist/{effect-CTI1ZH57.js → effect-j_T62HBN.js} +1 -1
  82. package/dist/{email-addresses-B74e3bnB.js → email-addresses-CN1kPlEj.js} +2 -2
  83. package/dist/{feature-flag-DVdEaChJ.js → feature-flag-DDfyOLsv.js} +88 -88
  84. package/dist/google-C3S8u0mT.js +4 -0
  85. package/dist/{helper-as9K-piK.js → helper-DVUe13eh.js} +1 -1
  86. package/dist/{index-BW7FoVEA.js → index-9RBtEPPj.js} +1 -1
  87. package/dist/{index-Czg-2Ni0.js → index-BmIfGArh.js} +3 -3
  88. package/dist/{index-DKI8401o.js → index-BvkqHehI.js} +7 -7
  89. package/dist/{index-B0h0iYWP.js → index-BvoOJdfc.js} +2 -2
  90. package/dist/{index-CWLOcQ6j.js → index-C-IajuP1.js} +9 -9
  91. package/dist/{index-3LjKJhQa.js → index-COuLtOaw.js} +1 -1
  92. package/dist/{index-QHqcSN2q.js → index-CPyK4a5J.js} +4 -4
  93. package/dist/{index-BbVbqe4Y.js → index-CWGbeg5X.js} +6 -19
  94. package/dist/{index-CHU3UePP.js → index-C_SaKemI.js} +1 -1
  95. package/dist/{index-BEKMTiFb.js → index-Cjy0SXCn.js} +197 -197
  96. package/dist/{index-C5V6u2Qd.js → index-DALsfLV7.js} +2613 -2699
  97. package/dist/{index-CQxkDpX0.js → index-DMiaWY0s.js} +581 -682
  98. package/dist/{index-B_wRpO02.js → index-D_1pnadB.js} +15 -29
  99. package/dist/{index-TAoQpeLQ.js → index-DzbVgUEP.js} +1 -1
  100. package/dist/{index-C-iwb2Ln.js → index-I9lmcd2w.js} +2 -2
  101. package/dist/{index-wsCCqwdr.js → index-UJHdDEG1.js} +2 -2
  102. package/dist/{index-DcZiikOH.js → index-ep_Kxxid.js} +2 -2
  103. package/dist/{index-BhTrG89b.js → index-fNYUguDQ.js} +232 -389
  104. package/dist/{index-Ba719MYq.js → index-jS16KX9p.js} +1 -1
  105. package/dist/{index-Ckz6u3ac.js → index-k7FFxt_M.js} +2 -2
  106. package/dist/{index-8mBfDn3M.js → index-lzQ6ehOk.js} +251 -608
  107. package/dist/{index.esm2017-DL6rTGDW.js → index.esm2017-vJKhLfdu.js} +177 -177
  108. package/dist/{loading-x6IScY4K.js → loading-jZV2Dm--.js} +1 -1
  109. package/dist/{lodash-nwnDizYo.js → lodash-C2pLek0l.js} +1 -1
  110. package/dist/{member-import-C-b01Tyd.js → member-import-BKI7soRD.js} +1 -1
  111. package/dist/{membership-DfarOMtO.js → membership-smdlFpPr.js} +2 -2
  112. package/dist/{money-CFn-jR4W.js → money-5XyTnYwW.js} +1 -1
  113. package/dist/{number-CSlyDL2x.js → number-DHU9qJJQ.js} +1 -1
  114. package/dist/objectid-jT5g6pGt.js +145 -0
  115. package/dist/{onboarding-DyaFaaF2.js → onboarding-C_5pyGx-.js} +25 -25
  116. package/dist/{onboardingSetup-DQt91O9f.js → onboardingSetup-Bd1V-Ipy.js} +2 -2
  117. package/dist/{plugins-DEHr0UOe.js → plugins-D1Ru-da5.js} +3 -3
  118. package/dist/{reward-Du_Pv-4p.js → reward-BqPl68Xk.js} +1 -1
  119. package/dist/{rule-DfqmQTVK.js → rule-WBrRXwL-.js} +492 -572
  120. package/dist/rule-builder-DAlSbaWh.js +102 -0
  121. package/dist/style.css +1 -1
  122. package/dist/template-DDquG4Xc.js +236 -0
  123. package/dist/{timezone-_4tabIaK.js → timezone-O4qrCDcK.js} +1 -1
  124. package/dist/{transaction.fn-C46PHwCV.js → transaction.fn-CY_F8Nb8.js} +2 -2
  125. package/dist/{trigger-Dipr6btC.js → trigger-D-vySeIB.js} +8 -8
  126. package/dist/{useMarketingMaterialActions-BAw2ZjeF.js → useMarketingMaterialActions-kA6SLHy_.js} +4 -4
  127. package/dist/{usePagination-D6RZ18zS.js → usePagination-AYE_RJH2.js} +1 -1
  128. package/dist/{user-BCexQj3Q.js → user-DJcMkYXP.js} +1 -1
  129. package/dist/vue-i18n-kXHiDb_1.js +2365 -0
  130. package/dist/{xlsx-BTxt_Jg6.js → xlsx--s3hBdDk.js} +224 -224
  131. package/dist/{zod-T4wMYjWT.js → zod-IpHRbxaJ.js} +1 -1
  132. package/package.json +2 -6
  133. package/dist/AuditLogs-BNnUiVnD.js +0 -2016
  134. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BgPeHurN.js +0 -4442
  135. package/dist/Grab-DDc7e-AC.js +0 -301
  136. package/dist/ReviewFacebookCallback-ChG7TRy5.js +0 -225
  137. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-2L6ZGMW7.js +0 -1923
  138. package/dist/Settings-D2gFPvmW.js +0 -286
  139. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-5g3yIL1a.js +0 -1319
  140. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-DHi4rdT1.js +0 -7007
  141. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DI0pcHcE.js +0 -253
  142. package/dist/duplicateCampaign-BcpBfUGL.js +0 -51
  143. package/dist/google-BQK68wbe.js +0 -5
  144. package/dist/objectid-zcT6ESET.js +0 -145
  145. package/dist/template-CcbNF4PF.js +0 -188
  146. package/dist/vue-i18n-DXvyTCZf.js +0 -2365
@@ -1,187 +1,13 @@
1
- import { F as n, m, b as A } from "./index-Czg-2Ni0.js";
2
1
  import { z as e } from "./index-C_H8jFYf.js";
3
- import { l as M, m as F, n as G, o as g } from "./index-CQxkDpX0.js";
4
- import { _ as k, l as v, f as B } from "./index-C5V6u2Qd.js";
5
- import { i as p } from "./helper-as9K-piK.js";
6
- import { d as z, b as U, e as d } from "./index-BEKMTiFb.js";
7
- import { d as V } from "./index-BhTrG89b.js";
8
- import { F as T } from "./index-B0h0iYWP.js";
9
- function b(o, a) {
10
- let i = "", r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
11
- const l = r.length;
12
- for (let c = 0; c < o; c++)
13
- i += r.charAt(Math.floor(Math.random() * l));
14
- return i;
15
- }
16
- function H(o) {
17
- return !o.property && "rules" in o;
18
- }
19
- function W(o) {
20
- return "property" in o && !!o.property;
21
- }
22
- const Y = "g_schedule";
23
- function K(o) {
24
- return o.split(/\r?\n/).filter((a) => !a.trim().toUpperCase().startsWith("DTSTART")).join(`
25
- `).trim();
26
- }
27
- function q(o, a = !1) {
28
- const i = k.cloneDeep(o);
29
- if (W(i)) {
30
- const r = i.conditions;
31
- return !a && r && typeof r._rrule == "string" && (r._rrule = K(
32
- r._rrule
33
- )), i;
34
- }
35
- if (H(i))
36
- for (const r in i.rules) {
37
- const l = i.rules[r], c = a || H(l) && l.name === Y;
38
- i.rules[r] = q(
39
- l,
40
- c
41
- );
42
- }
43
- return i;
44
- }
45
- class t {
46
- static scaffoldGroup(a) {
47
- return {
48
- name: a ?? `g_${b(4)}`,
49
- rules: {},
50
- logic: ""
51
- };
52
- }
53
- static scaffoldEntry(a) {
54
- return {
55
- name: `r_${b(4)}`,
56
- property: a ?? "",
57
- conditions: {},
58
- negated: !1
59
- };
60
- }
61
- static constructEntry(a, i, r, l) {
62
- return {
63
- name: l ?? `e_${b(4)}`,
64
- property: a,
65
- conditions: {
66
- [i]: r
67
- },
68
- negated: !1
69
- };
70
- }
71
- static getLogic(a) {
72
- return (a.logic ?? "").includes("||") ? "||" : "&&";
73
- }
74
- static constructLogic(a, i) {
75
- const r = i ?? t.getLogic(a);
76
- return Object.entries(a.rules).map(([l, c]) => H(c) ? l : `${c.negated ? "!" : ""}${l}`).join(` ${r} `);
77
- }
78
- static setRuleToGroup(a, i, r) {
79
- let l = v.cloneDeep(a);
80
- return Object.keys(l.rules).length === 0 && (l = t.scaffoldGroup(l.name)), Array.isArray(i) ? i.forEach((c) => {
81
- l.rules[c.name] = c;
82
- }) : l.rules[i.name] = i, l.logic = t.constructLogic(l, r), l;
83
- }
84
- static removeEntry(a, i, r) {
85
- const l = v.cloneDeep(a);
86
- return delete l.rules[i], l.logic = t.constructLogic(l, r), l;
87
- }
88
- static constructRule(a) {
89
- switch (a.type) {
90
- case "timeframe": {
91
- const i = a.property, r = t.scaffoldGroup("timeframe"), l = [];
92
- return (a.start || a.end) && l.push(
93
- t.constructEntry(i, "_isBetween", {
94
- start: a.start || void 0,
95
- end: a.end || void 0
96
- })
97
- ), t.setRuleToGroup(r, l, "&&");
98
- }
99
- default:
100
- throw Error("invalid config type");
101
- }
102
- }
103
- static getRules(a) {
104
- return a && "rules" in a ? Object.values(a.rules) : [];
105
- }
106
- static simplify(a) {
107
- const [i] = Object.entries(a.conditions);
108
- return i[0], {
109
- property: a.property,
110
- operator: i[0],
111
- equator: i[1]
112
- };
113
- }
114
- static isRuleExceed(a, i) {
115
- const l = Object.keys(a.rules).length + (Array.isArray(i) ? i.length : 1);
116
- if (l > 10)
117
- throw new X(10, l);
118
- return !0;
119
- }
120
- }
121
- class X extends Error {
122
- constructor(a, i) {
123
- super(
124
- `Maximum of ${a} rules allowed per group. Attempted to add ${i} rules.`
125
- ), this.name = "MaxRulesExceededError";
126
- }
127
- }
128
- const Q = {
129
- collectionName: "AuditLogs",
130
- transform: {
131
- _id: "oid",
132
- business: "oid",
133
- timestamp: "date"
134
- },
135
- lookups: {
136
- business: {
137
- as: "pf_business",
138
- fromCollection: "Businesses"
139
- }
140
- }
141
- }, $ = e.enum([
142
- "GET",
143
- "POST",
144
- "PUT",
145
- "PATCH",
146
- "DELETE",
147
- "OPTIONS",
148
- "HEAD",
149
- "ALL"
150
- ]), Z = e.enum([
151
- "CAMPAIGN",
152
- "LOCATION",
153
- "MARKETING MATERIALS",
154
- "MEMBERSHIP",
155
- "STORE",
156
- "TRANSACTION",
157
- "SETTINGS",
158
- "SEGMENTATION",
159
- "USER"
160
- ]), ee = e.object({
161
- httpMethod: $,
162
- url: e.string().min(1),
163
- userAgent: e.string(),
164
- host: e.string().min(1),
165
- params: e.object({}).passthrough().nullish(),
166
- query: e.object({}).passthrough().nullish(),
167
- body: e.object({}).passthrough().nullish()
168
- }), te = e.object({
169
- statusCode: e.number().int().min(100).max(599),
170
- body: e.object({}).passthrough().nullish()
171
- });
172
- e.object({
173
- _id: n,
174
- user: e.string().length(28),
175
- userName: e.string().min(1),
176
- userPhoneNumber: e.string().refine((o) => M(o)).nullish(),
177
- moduleType: Z,
178
- business: n.nullish(),
179
- clientIp: e.string().nullish(),
180
- timestamp: e.string().datetime(),
181
- request: ee,
182
- response: te
183
- }).describe(m.describe(Q));
184
- const it = {
2
+ import { F as a, m as i, b as O } from "./index-BmIfGArh.js";
3
+ import { d as I } from "./index-DALsfLV7.js";
4
+ import { R as t } from "./rule-builder-DAlSbaWh.js";
5
+ import { i as o } from "./helper-DVUe13eh.js";
6
+ import { e as u, b as H, f as r } from "./index-Cjy0SXCn.js";
7
+ import { k as R, l as L, j as c } from "./index-DMiaWY0s.js";
8
+ import { d as x } from "./index-fNYUguDQ.js";
9
+ import { F as _ } from "./index-BvoOJdfc.js";
10
+ const Me = {
185
11
  PROMOTION: {
186
12
  name: "Promotion Template",
187
13
  description: "Promotion template for campaign creation.",
@@ -587,7 +413,7 @@ const it = {
587
413
  // },
588
414
  hideInApp: !0
589
415
  },
590
- configs: p("VOUCHER", {
416
+ configs: o("VOUCHER", {
591
417
  name: "",
592
418
  business: null,
593
419
  noCampaign: !1
@@ -1577,7 +1403,7 @@ const it = {
1577
1403
  rewards: []
1578
1404
  }
1579
1405
  },
1580
- configs: p("GAME", {
1406
+ configs: o("GAME", {
1581
1407
  name: "Token",
1582
1408
  business: null,
1583
1409
  noCampaign: !1
@@ -1818,184 +1644,18 @@ const it = {
1818
1644
  type: "timeframe"
1819
1645
  }
1820
1646
  },
1821
- configs: p("STAMP", {
1647
+ configs: o("STAMP", {
1822
1648
  business: null,
1823
1649
  noCampaign: !1
1824
1650
  })
1825
1651
  }
1826
- },
1827
- GRAB: {
1828
- name: "Grab Campaign Template",
1829
- description: "Grab campaign template for campaign creation.",
1830
- steps: [
1831
- {
1832
- name: "connect.template.general_information",
1833
- groups: [
1834
- {
1835
- name: "connect.template.general",
1836
- fields: [
1837
- {
1838
- label: "connect.template.campaign_name",
1839
- property: "campaign.name",
1840
- type: "text"
1841
- },
1842
- {
1843
- label: "connect.template.campaign_period",
1844
- property: "campaign.timeframeOptions",
1845
- type: "timeframe"
1846
- }
1847
- ]
1848
- }
1849
- ]
1850
- },
1851
- {
1852
- name: "connect.template.discount",
1853
- groups: [
1854
- {
1855
- name: "connect.template.discount",
1856
- fields: [
1857
- {
1858
- label: void 0,
1859
- property: "campaign.discount",
1860
- type: "grab_effect"
1861
- }
1862
- ]
1863
- },
1864
- {
1865
- name: "connect.template.grab_quota",
1866
- fields: [
1867
- {
1868
- label: void 0,
1869
- property: "campaign.quotas",
1870
- type: "grab_quota"
1871
- }
1872
- ]
1873
- },
1874
- {
1875
- name: "connect.template.grab_condition",
1876
- fields: [
1877
- {
1878
- label: void 0,
1879
- property: "campaign.conditions",
1880
- type: "grab_conditions"
1881
- }
1882
- ]
1883
- }
1884
- ]
1885
- },
1886
- {
1887
- name: "connect.template.terms_conditions",
1888
- groups: [
1889
- {
1890
- name: "Location",
1891
- fields: [
1892
- {
1893
- label: "Target location",
1894
- property: "campaign.targetLocation",
1895
- type: "target_location"
1896
- }
1897
- ]
1898
- }
1899
- ]
1900
- }
1901
- ],
1902
- defaultValue: {
1903
- templateId: "",
1904
- campaign: {
1905
- type: "GRAB",
1906
- templateId: "",
1907
- name: "",
1908
- description: "",
1909
- image: "",
1910
- discount: null,
1911
- group: null,
1912
- event: {
1913
- type: "MAKING_ORDER",
1914
- rule: t.scaffoldGroup()
1915
- },
1916
- quotas: {
1917
- totalCount: 10,
1918
- totalCountPerUser: 2
1919
- },
1920
- conditions: {
1921
- startTime: "",
1922
- endTime: "",
1923
- eaterType: "all",
1924
- minBasketAmount: 10,
1925
- bundleQuantity: 2,
1926
- workingHour: {
1927
- sun: {
1928
- periods: [
1929
- {
1930
- startTime: "11:30",
1931
- endTime: "14:00"
1932
- }
1933
- ]
1934
- },
1935
- mon: {
1936
- periods: [
1937
- {
1938
- startTime: "11:30",
1939
- endTime: "14:00"
1940
- }
1941
- ]
1942
- },
1943
- tue: {
1944
- periods: [
1945
- {
1946
- startTime: "11:30",
1947
- endTime: "14:00"
1948
- }
1949
- ]
1950
- },
1951
- wed: {
1952
- periods: [
1953
- {
1954
- startTime: "11:30",
1955
- endTime: "14:00"
1956
- }
1957
- ]
1958
- },
1959
- thu: {
1960
- periods: [
1961
- {
1962
- startTime: "11:30",
1963
- endTime: "14:00"
1964
- }
1965
- ]
1966
- },
1967
- fri: {
1968
- periods: [
1969
- {
1970
- startTime: "11:30",
1971
- endTime: "14:00"
1972
- }
1973
- ]
1974
- },
1975
- sat: {
1976
- periods: [
1977
- {
1978
- startTime: "11:30",
1979
- endTime: "14:00"
1980
- }
1981
- ]
1982
- }
1983
- }
1984
- },
1985
- targetLocation: null,
1986
- timeframeOptions: {
1987
- type: "timeframe",
1988
- property: "__now"
1989
- }
1990
- }
1991
- }
1992
1652
  }
1993
1653
  };
1994
- t.scaffoldGroup(), p("STAMP", {
1654
+ t.scaffoldGroup(), o("STAMP", {
1995
1655
  business: null,
1996
1656
  noCampaign: !1
1997
1657
  });
1998
- const lt = {
1658
+ const Ge = {
1999
1659
  _id: "",
2000
1660
  intention: [],
2001
1661
  name: "Spend and get voucher",
@@ -2393,7 +2053,7 @@ const lt = {
2393
2053
  amount: 1
2394
2054
  }
2395
2055
  },
2396
- configs: p("VOUCHER", {
2056
+ configs: o("VOUCHER", {
2397
2057
  name: "",
2398
2058
  business: null,
2399
2059
  noCampaign: !1
@@ -2402,7 +2062,7 @@ const lt = {
2402
2062
  };
2403
2063
  ({
2404
2064
  ...t.scaffoldGroup()
2405
- }, p("VOUCHER", {
2065
+ }, o("VOUCHER", {
2406
2066
  name: "",
2407
2067
  business: null,
2408
2068
  noCampaign: !1
@@ -2413,7 +2073,7 @@ const lt = {
2413
2073
  ({
2414
2074
  ...t.scaffoldGroup()
2415
2075
  });
2416
- const rt = {
2076
+ const ke = {
2417
2077
  _id: "",
2418
2078
  intention: [],
2419
2079
  name: "Spend and earn points",
@@ -2788,7 +2448,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2788
2448
  });
2789
2449
  ({
2790
2450
  ...t.scaffoldGroup()
2791
- }, p("VOUCHER", {
2451
+ }, o("VOUCHER", {
2792
2452
  name: "",
2793
2453
  business: null,
2794
2454
  noCampaign: !1
@@ -2834,12 +2494,12 @@ t.setRuleToGroup(
2834
2494
  "&&"
2835
2495
  )
2836
2496
  );
2837
- t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
2497
+ t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
2838
2498
  name: "Token",
2839
2499
  business: null,
2840
2500
  noCampaign: !1
2841
2501
  });
2842
- const ct = {
2502
+ const Be = {
2843
2503
  _id: "",
2844
2504
  intention: [],
2845
2505
  name: "Welcome voucher",
@@ -3185,7 +2845,7 @@ const ct = {
3185
2845
  amount: 1
3186
2846
  }
3187
2847
  },
3188
- configs: p("VOUCHER", {
2848
+ configs: o("VOUCHER", {
3189
2849
  name: "",
3190
2850
  business: null,
3191
2851
  noCampaign: !1
@@ -3216,7 +2876,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
3216
2876
  ],
3217
2877
  "&&"
3218
2878
  )
3219
- ]), p("VOUCHER", {
2879
+ ]), o("VOUCHER", {
3220
2880
  name: "",
3221
2881
  business: null,
3222
2882
  noCampaign: !1
@@ -3239,7 +2899,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
3239
2899
  ({
3240
2900
  ...t.scaffoldGroup()
3241
2901
  });
3242
- const ae = e.enum([
2902
+ const D = e.enum([
3243
2903
  "MEMBER_REWARD",
3244
2904
  "PAID_LOYALTY",
3245
2905
  "COLLECT_FEEDBACK",
@@ -3249,7 +2909,7 @@ const ae = e.enum([
3249
2909
  "BROADCAST",
3250
2910
  "BIRTHDAY",
3251
2911
  "GAME"
3252
- ]), ne = e.enum([
2912
+ ]), w = e.enum([
3253
2913
  "text",
3254
2914
  "number",
3255
2915
  "textarea",
@@ -3275,91 +2935,88 @@ const ae = e.enum([
3275
2935
  "rule_bill",
3276
2936
  "rule_feedback",
3277
2937
  "rule_birthday",
3278
- "promotion_game_type",
3279
- "grab_effect",
3280
- "grab_quota",
3281
- "grab_conditions"
3282
- ]), oe = e.object({
2938
+ "promotion_game_type"
2939
+ ]), A = e.object({
3283
2940
  label: e.string().optional(),
3284
2941
  label_locale: e.record(e.string()).nullish(),
3285
2942
  property: e.string().or(e.any()),
3286
- type: ne,
2943
+ type: w,
3287
2944
  extras: e.string().optional(),
3288
2945
  isRuleChildren: e.boolean().optional()
3289
- }), S = e.object({
2946
+ }), f = e.object({
3290
2947
  not: e.boolean().optional(),
3291
2948
  property: e.string(),
3292
2949
  value: e.any()
3293
- }), ie = e.object({
2950
+ }), F = e.object({
3294
2951
  name: e.string().optional(),
3295
2952
  name_locale: e.record(e.string()).nullish(),
3296
- fields: e.array(oe),
3297
- condition: S.optional().or(
3298
- e.array(S)
2953
+ fields: e.array(A),
2954
+ condition: f.optional().or(
2955
+ e.array(f)
3299
2956
  )
3300
- }), le = e.object({
2957
+ }), M = e.object({
3301
2958
  name: e.string(),
3302
2959
  name_locale: e.record(e.string()).nullish(),
3303
- groups: e.array(ie)
2960
+ groups: e.array(F)
3304
2961
  });
3305
2962
  e.object({
3306
- _id: n,
2963
+ _id: a,
3307
2964
  name: e.string(),
3308
2965
  name_locale: e.record(e.string()).nullish(),
3309
2966
  description: e.string().nullish(),
3310
2967
  description_locale: e.record(e.string()).nullish(),
3311
- steps: e.array(le).min(1),
3312
- intention: e.array(ae),
2968
+ steps: e.array(M).min(1),
2969
+ intention: e.array(D),
3313
2970
  defaultValue: e.any()
3314
2971
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
3315
- const re = {
2972
+ const G = {
3316
2973
  collectionName: "Businesses",
3317
2974
  transform: {
3318
2975
  _id: "oid"
3319
2976
  }
3320
2977
  };
3321
2978
  e.object({
3322
- _id: n,
2979
+ _id: a,
3323
2980
  ownerId: e.string(),
3324
2981
  name: e.string(),
3325
2982
  credit: e.number(),
3326
2983
  forceSend: e.boolean().optional()
3327
- }).describe(m.describe(re));
3328
- const P = e.enum(["PHONE"]), ce = e.enum([
2984
+ }).describe(i.describe(G));
2985
+ const z = e.enum(["PHONE"]), k = e.enum([
3329
2986
  "MOCEAN",
3330
2987
  "SLACK",
3331
2988
  "SMS",
3332
2989
  "EMAIL",
3333
2990
  "WHATSAPP"
3334
- ]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
2991
+ ]), B = e.enum(["PENDING", "COMPLETED", "FAILED"]), V = e.enum([
3335
2992
  "General",
3336
2993
  "Otp",
3337
2994
  "Marketing",
3338
2995
  "Ordering",
3339
2996
  "MemberInvitation",
3340
2997
  "MarketingPromotion"
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([
2998
+ ]), W = e.object({
2999
+ type: z
3000
+ }), C = W.extend({
3001
+ type: e.literal(z.enum.PHONE),
3002
+ provider: k,
3003
+ usage: V.optional()
3004
+ }), T = e.enum([
3348
3005
  "Accepted",
3349
3006
  "PartiallyAccepted",
3350
3007
  "Queued",
3351
3008
  "Unknown",
3352
3009
  "Failed"
3353
- ]), ge = e.enum([
3010
+ ]), Y = e.enum([
3354
3011
  "PENDING",
3355
3012
  "SUBMITTED",
3356
3013
  "SETTLED",
3357
3014
  "FAILED"
3358
- ]), J = e.object({
3015
+ ]), v = e.object({
3359
3016
  channel: e.string(),
3360
3017
  status: e.string(),
3361
3018
  statusDetails: e.string().nullish()
3362
- }), de = {
3019
+ }), K = {
3363
3020
  collectionName: "Notifications",
3364
3021
  transform: {
3365
3022
  _id: "oid",
@@ -3369,51 +3026,51 @@ const P = e.enum(["PHONE"]), ce = e.enum([
3369
3026
  }
3370
3027
  };
3371
3028
  e.object({
3372
- _id: n,
3373
- business: n,
3374
- status: pe,
3029
+ _id: a,
3030
+ business: a,
3031
+ status: B,
3375
3032
  ref: e.string().optional(),
3376
3033
  title: e.string().optional(),
3377
3034
  // Single-channel fields. Absent on multi-channel dispatches, which carry
3378
3035
  // their content per channel in the submitted request instead.
3379
3036
  target: e.string().optional(),
3380
3037
  message: e.string().optional(),
3381
- option: j.optional(),
3038
+ option: C.optional(),
3382
3039
  // Multi-channel dispatch fields.
3383
- campaign: n.nullish(),
3384
- member: n.nullish(),
3040
+ campaign: a.nullish(),
3041
+ member: a.nullish(),
3385
3042
  /**
3386
3043
  * The scheduled run this dispatch belongs to. With campaign and member it
3387
3044
  * identifies one intended send, so a redelivered queue job is recognised
3388
3045
  * rather than sent twice.
3389
3046
  */
3390
3047
  runAt: e.coerce.date().nullish(),
3391
- mode: z.nullish(),
3392
- channels: e.array(U).nullish(),
3048
+ mode: u.nullish(),
3049
+ channels: e.array(H).nullish(),
3393
3050
  /**
3394
3051
  * Local submission state, kept separate from the upstream outcome so an
3395
3052
  * interrupted worker can tell "never sent" from "sent, result unknown".
3396
3053
  */
3397
- state: ge.nullish(),
3398
- outcome: E.nullish(),
3054
+ state: Y.nullish(),
3055
+ outcome: T.nullish(),
3399
3056
  /** Upstream correlation id, preserved even when the request failed. */
3400
3057
  requestId: e.string().nullish(),
3401
- attempts: e.array(J).nullish(),
3058
+ attempts: e.array(v).nullish(),
3402
3059
  /** Credit consumed upstream, recorded for reconciliation. */
3403
- creditUsed: d.nullish(),
3404
- balanceAfter: d.nullish(),
3060
+ creditUsed: r.nullish(),
3061
+ balanceAfter: r.nullish(),
3405
3062
  error: e.string().nullish(),
3406
3063
  createdAt: e.coerce.date().nullish(),
3407
3064
  submittedAt: e.coerce.date().nullish(),
3408
3065
  settledAt: e.coerce.date().nullish()
3409
- }).describe(m.describe(de));
3410
- const ue = e.object({
3066
+ }).describe(i.describe(K));
3067
+ const X = e.object({
3411
3068
  target: e.string(),
3412
3069
  title: e.string().optional(),
3413
3070
  message: e.string(),
3414
- option: j,
3071
+ option: C,
3415
3072
  ref: e.string().optional()
3416
- }), he = e.object({
3073
+ }), q = e.object({
3417
3074
  memberId: e.string(),
3418
3075
  name: e.string().nullish(),
3419
3076
  phoneNumber: e.string().nullish(),
@@ -3428,7 +3085,7 @@ const ue = e.object({
3428
3085
  e.object({
3429
3086
  businessId: e.string(),
3430
3087
  forceSend: e.boolean(),
3431
- mode: z,
3088
+ mode: u,
3432
3089
  channels: e.array(
3433
3090
  e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
3434
3091
  ),
@@ -3440,34 +3097,34 @@ e.object({
3440
3097
  });
3441
3098
  e.object({
3442
3099
  requestId: e.string().nullish(),
3443
- status: E.nullish(),
3444
- attempts: e.array(J).nullish(),
3445
- creditUsed: d.nullish(),
3446
- balance: d.nullish()
3100
+ status: T.nullish(),
3101
+ attempts: e.array(v).nullish(),
3102
+ creditUsed: r.nullish(),
3103
+ balance: r.nullish()
3447
3104
  });
3448
- const _e = e.object({
3105
+ const Q = e.object({
3449
3106
  campaignId: e.string(),
3450
3107
  business: e.string(),
3451
3108
  runAt: e.coerce.date(),
3452
- recipient: he,
3109
+ recipient: q,
3453
3110
  /** Personalised, editor-data-free content keyed by channel. */
3454
3111
  content: e.record(e.string(), e.unknown()),
3455
- mode: z,
3456
- channels: e.array(U)
3112
+ mode: u,
3113
+ channels: e.array(H)
3457
3114
  });
3458
3115
  e.object({
3459
3116
  campaignId: e.string(),
3460
3117
  /** Absent only on multi-channel jobs, which carry `dispatch` instead. */
3461
- notification: ue.optional(),
3118
+ notification: X.optional(),
3462
3119
  business: e.string(),
3463
3120
  /**
3464
3121
  * Present only for multi-channel broadcasts. When set the job takes the
3465
3122
  * multi-channel dispatch path; when absent the legacy single-channel path
3466
3123
  * runs unchanged.
3467
3124
  */
3468
- dispatch: _e.optional()
3469
- }).superRefine((o, a) => {
3470
- !o.notification && !o.dispatch && a.addIssue({
3125
+ dispatch: Q.optional()
3126
+ }).superRefine((n, h) => {
3127
+ !n.notification && !n.dispatch && h.addIssue({
3471
3128
  code: e.ZodIssueCode.custom,
3472
3129
  message: "Job must carry either a notification or a dispatch"
3473
3130
  });
@@ -3476,19 +3133,19 @@ e.object({
3476
3133
  phone: e.string(),
3477
3134
  message: e.string()
3478
3135
  });
3479
- const N = e.object({
3136
+ const b = e.object({
3480
3137
  name: e.string().optional(),
3481
3138
  address: e.string()
3482
- }), ye = e.object({
3139
+ }), Z = e.object({
3483
3140
  filename: e.string(),
3484
3141
  content: e.instanceof(Uint8Array)
3485
3142
  });
3486
3143
  e.object({
3487
- from: N.optional(),
3488
- to: e.array(N),
3144
+ from: b.optional(),
3145
+ to: e.array(b),
3489
3146
  subject: e.string(),
3490
3147
  html: e.string().optional(),
3491
- attachments: e.array(ye).optional()
3148
+ attachments: e.array(Z).optional()
3492
3149
  });
3493
3150
  e.object({
3494
3151
  subject: e.string(),
@@ -3528,7 +3185,7 @@ e.object({
3528
3185
  billId: e.string()
3529
3186
  });
3530
3187
  e.object({
3531
- amount: A,
3188
+ amount: O,
3532
3189
  member: e.string(),
3533
3190
  bill: e.string(),
3534
3191
  otp: e.string().nullish(),
@@ -3537,15 +3194,15 @@ e.object({
3537
3194
  e.object({
3538
3195
  orderId: e.string()
3539
3196
  });
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);
3197
+ var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
3198
+ e.nativeEnum(S);
3542
3199
  e.enum(["manage", "create", "read", "update", "delete"]);
3543
3200
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
3544
3201
  e.enum(["quota"]);
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);
3202
+ var N = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(N || {});
3203
+ e.nativeEnum(N);
3547
3204
  e.enum(["restaurant"]);
3548
- const fe = e.object({
3205
+ const $ = e.object({
3549
3206
  label: e.string(),
3550
3207
  subject: e.union([e.string(), e.array(e.string())]),
3551
3208
  actions: e.union([e.string(), e.array(e.string())]),
@@ -3555,41 +3212,41 @@ const fe = e.object({
3555
3212
  reason: e.string().optional()
3556
3213
  });
3557
3214
  e.object({
3558
- _id: n,
3215
+ _id: a,
3559
3216
  businessId: e.string(),
3560
3217
  userId: e.string(),
3561
3218
  email: e.string().nullish(),
3562
3219
  phoneNo: e.string().nullish(),
3563
- permissions: e.array(e.lazy(() => fe))
3220
+ permissions: e.array(e.lazy(() => $))
3564
3221
  }).describe(
3565
- m.describe({
3222
+ i.describe({
3566
3223
  collectionName: "PermissionUsers",
3567
3224
  transform: {
3568
3225
  _id: "oid"
3569
3226
  }
3570
3227
  })
3571
3228
  );
3572
- const R = e.object({
3229
+ const U = e.object({
3573
3230
  userId: e.string(),
3574
3231
  level: e.number(),
3575
3232
  role: e.string().optional(),
3576
3233
  businessId: e.string().optional(),
3577
3234
  restaurantId: e.string().optional()
3578
- }), be = e.function().args(e.any(), R).returns(e.boolean()), He = e.function().args(R).returns(e.promise(e.array(e.any())));
3235
+ }), ee = e.function().args(e.any(), U).returns(e.boolean()), te = e.function().args(U).returns(e.promise(e.array(e.any())));
3579
3236
  e.object({
3580
- isAdmin: be,
3581
- getRules: He
3237
+ isAdmin: ee,
3238
+ getRules: te
3582
3239
  });
3583
3240
  e.object({
3584
- transactions: e.array(F),
3585
- collections: e.array(G)
3241
+ transactions: e.array(R),
3242
+ collections: e.array(L)
3586
3243
  });
3587
- const L = e.enum([
3244
+ const P = e.enum([
3588
3245
  "ROCK_PAPER_SCISSOR"
3589
3246
  ]);
3590
- L.enum.ROCK_PAPER_SCISSOR + "";
3247
+ P.enum.ROCK_PAPER_SCISSOR + "";
3591
3248
  e.object({
3592
- type: L
3249
+ type: P
3593
3250
  });
3594
3251
  e.object({
3595
3252
  host: e.string().url(),
@@ -3598,7 +3255,7 @@ e.object({
3598
3255
  roomId: e.string()
3599
3256
  });
3600
3257
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
3601
- const ze = {
3258
+ const ae = {
3602
3259
  collectionName: "MarketingMaterials",
3603
3260
  transform: {
3604
3261
  _id: "oid",
@@ -3606,14 +3263,14 @@ const ze = {
3606
3263
  }
3607
3264
  };
3608
3265
  e.object({
3609
- _id: n,
3610
- business: n,
3266
+ _id: a,
3267
+ business: a,
3611
3268
  imageUrl: e.string().url(),
3612
3269
  headline: e.string(),
3613
3270
  caption: e.string(),
3614
3271
  editedAt: e.coerce.date(),
3615
3272
  deletedAt: e.coerce.date().optional()
3616
- }).describe(m.describe(ze));
3273
+ }).describe(i.describe(ae));
3617
3274
  e.object({
3618
3275
  id: e.number(),
3619
3276
  name: e.string(),
@@ -3633,12 +3290,12 @@ e.object({
3633
3290
  phone: e.string().optional(),
3634
3291
  email: e.string().optional()
3635
3292
  });
3636
- const Te = e.enum([
3293
+ const ne = e.enum([
3637
3294
  "PENDING",
3638
3295
  "SUCCESS",
3639
3296
  "FAILED",
3640
3297
  "RETRYING"
3641
- ]), Ce = {
3298
+ ]), oe = {
3642
3299
  collectionName: "WebhookLogs",
3643
3300
  transform: {
3644
3301
  _id: "oid",
@@ -3646,39 +3303,39 @@ const Te = e.enum([
3646
3303
  }
3647
3304
  };
3648
3305
  e.object({
3649
- _id: n,
3650
- business: n,
3306
+ _id: a,
3307
+ business: a,
3651
3308
  type: e.string(),
3652
3309
  payload: e.record(e.any()),
3653
- status: Te,
3310
+ status: ne,
3654
3311
  response: e.any().optional(),
3655
3312
  error: e.string().optional()
3656
- }).describe(m.describe(Ce));
3657
- const ve = e.enum(["AUTO", "MANUAL"]);
3313
+ }).describe(i.describe(oe));
3314
+ const ie = e.enum(["AUTO", "MANUAL"]);
3658
3315
  e.enum(["IN_PROGRESS", "COMPLETED"]);
3659
- const x = e.object({
3660
- _id: n,
3316
+ const j = e.object({
3317
+ _id: a,
3661
3318
  name: e.string().min(1, "Name is required").max(50),
3662
- type: ve,
3663
- event: V.optional()
3664
- }), Se = e.object({
3319
+ type: ie,
3320
+ event: x.optional()
3321
+ }), le = e.object({
3665
3322
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
3666
3323
  to: e.number().int("Must be integer").nullish()
3667
- }).superRefine((o, a) => {
3668
- o.from && o.to && o.from > o.to && a.addIssue({
3324
+ }).superRefine((n, h) => {
3325
+ n.from && n.to && n.from > n.to && h.addIssue({
3669
3326
  code: "custom",
3670
3327
  message: "Max referral count must be more than min referral count"
3671
3328
  });
3672
- }), Ne = e.object({
3673
- threshold: Se,
3674
- rewards: e.array(n),
3675
- pf_reward: e.array(T).optional()
3676
- }), C = e.object({
3329
+ }), re = e.object({
3330
+ threshold: le,
3331
+ rewards: e.array(a),
3332
+ pf_reward: e.array(_).optional()
3333
+ }), y = e.object({
3677
3334
  id: e.string(),
3678
3335
  name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
3679
- rule: B.optional(),
3680
- rewards: e.array(Ne)
3681
- }), Ue = {
3336
+ rule: I.optional(),
3337
+ rewards: e.array(re)
3338
+ }), ce = {
3682
3339
  collectionName: "ReferralRecords",
3683
3340
  transform: {
3684
3341
  _id: "oid",
@@ -3687,25 +3344,25 @@ const x = e.object({
3687
3344
  referee: "oid",
3688
3345
  refereeReward: "oid"
3689
3346
  }
3690
- }, Pe = e.object({
3347
+ }, pe = e.object({
3691
3348
  completedAt: e.coerce.date(),
3692
- criteria: n,
3349
+ criteria: a,
3693
3350
  ref: e.string()
3694
- }), je = e.object({
3695
- _id: n,
3696
- business: n,
3697
- referer: n,
3698
- referee: n,
3699
- criteria: e.array(x),
3700
- reward: e.array(C),
3701
- refereeReward: e.array(n).optional(),
3702
- criteria_progress: e.array(Pe),
3351
+ }), me = e.object({
3352
+ _id: a,
3353
+ business: a,
3354
+ referer: a,
3355
+ referee: a,
3356
+ criteria: e.array(j),
3357
+ reward: e.array(y),
3358
+ refereeReward: e.array(a).optional(),
3359
+ criteria_progress: e.array(pe),
3703
3360
  status: e.string(),
3704
- pf_referer: g.optional(),
3705
- pf_referee: g.optional(),
3706
- pf_refereeReward: e.array(T).optional()
3707
- }).describe(m.describe(Ue));
3708
- je.pick({
3361
+ pf_referer: c.optional(),
3362
+ pf_referee: c.optional(),
3363
+ pf_refereeReward: e.array(_).optional()
3364
+ }).describe(i.describe(ce));
3365
+ me.pick({
3709
3366
  _id: !0,
3710
3367
  business: !0,
3711
3368
  referer: !0,
@@ -3713,83 +3370,79 @@ je.pick({
3713
3370
  criteria_progress: !0,
3714
3371
  criteria: !0
3715
3372
  }).extend({
3716
- pf_referee: g.pick({
3373
+ pf_referee: c.pick({
3717
3374
  _id: !0,
3718
3375
  name: !0,
3719
3376
  phoneNumber: !0,
3720
3377
  photoUrl: !0
3721
3378
  })
3722
3379
  });
3723
- const Ee = {
3380
+ const se = {
3724
3381
  collectionName: "ReferralProgram",
3725
3382
  transform: {
3726
3383
  _id: "oid",
3727
3384
  business: "oid"
3728
3385
  }
3729
- }, D = e.object({
3730
- _id: n,
3731
- business: n,
3386
+ }, J = e.object({
3387
+ _id: a,
3388
+ business: a,
3732
3389
  term_and_condition: e.string().optional(),
3733
- refereeReward: e.array(n).optional(),
3734
- reward: e.array(C),
3735
- criteria: e.array(x)
3736
- }).describe(m.describe(Ee));
3390
+ refereeReward: e.array(a).optional(),
3391
+ reward: e.array(y),
3392
+ criteria: e.array(j)
3393
+ }).describe(i.describe(se));
3737
3394
  e.object({
3738
- referer: n,
3739
- referee: n,
3740
- business: n
3395
+ referer: a,
3396
+ referee: a,
3397
+ business: a
3741
3398
  });
3742
3399
  e.object({
3743
- program: D.pick({
3400
+ program: J.pick({
3744
3401
  _id: !0,
3745
3402
  business: !0,
3746
3403
  term_and_condition: !0
3747
3404
  }).extend({
3748
- reward: C.optional(),
3749
- pf_refereeReward: e.array(T).optional()
3405
+ reward: y.optional(),
3406
+ pf_refereeReward: e.array(_).optional()
3750
3407
  }),
3751
3408
  referralCount: e.number(),
3752
3409
  successReferralCount: e.number(),
3753
- referredBy: g.pick({
3410
+ referredBy: c.pick({
3754
3411
  _id: !0,
3755
3412
  name: !0,
3756
3413
  phoneNumber: !0,
3757
3414
  photoUrl: !0
3758
3415
  }).optional()
3759
3416
  });
3760
- D.extend({
3417
+ J.extend({
3761
3418
  updateReferralRecord: e.boolean().optional()
3762
3419
  });
3763
- const Je = e.object({
3420
+ const ge = e.object({
3764
3421
  facebookPageId: e.string(),
3765
3422
  pageName: e.string(),
3766
3423
  pageProfileImageUrl: e.string(),
3767
3424
  pageAccessToken: e.string().optional(),
3768
- locationIds: e.array(n)
3769
- }), Oe = e.object({
3770
- locationId: n.nullable(),
3425
+ locationIds: e.array(a)
3426
+ }), de = e.object({
3427
+ locationId: a.nullable(),
3771
3428
  googleLocationName: e.string(),
3772
3429
  displayName: e.string().optional()
3773
- }), Ie = e.object({
3430
+ }), he = e.object({
3774
3431
  accessToken: e.string().nullable(),
3775
3432
  refreshToken: e.string().nullable(),
3776
3433
  accessTokenExpiresAt: e.date().nullable(),
3777
- locations: e.array(Oe),
3778
- lastSyncTime: e.coerce.date().nullish(),
3779
- syncFrequency: e.number().int().min(1).max(30).default(30)
3780
- }), Re = e.object({
3434
+ locations: e.array(de)
3435
+ }), ue = e.object({
3781
3436
  token: e.string().nullable(),
3782
- pages: e.array(Je),
3783
- lastSyncTime: e.coerce.date().nullish(),
3784
- syncFrequency: e.number().int().min(1).max(30).default(30)
3437
+ pages: e.array(ge)
3785
3438
  });
3786
3439
  e.object({
3787
- _id: n,
3788
- businessId: n,
3789
- google: Ie.nullable(),
3790
- facebook: Re.nullable()
3440
+ _id: a,
3441
+ businessId: a,
3442
+ google: he.nullable(),
3443
+ facebook: ue.nullable()
3791
3444
  }).describe(
3792
- m.describe({
3445
+ i.describe({
3793
3446
  collectionName: "ReviewSourceConfig",
3794
3447
  transform: {
3795
3448
  _id: "oid",
@@ -3833,9 +3486,7 @@ e.object({
3833
3486
  displayName: e.string().optional(),
3834
3487
  locationId: e.string().nullable()
3835
3488
  })
3836
- ),
3837
- lastSyncTime: e.string().datetime().nullable(),
3838
- syncFrequency: e.number().int().min(1).max(30)
3489
+ )
3839
3490
  }).nullable(),
3840
3491
  facebook: e.object({
3841
3492
  token: e.string().nullable(),
@@ -3846,32 +3497,30 @@ e.object({
3846
3497
  pageProfileImageUrl: e.string(),
3847
3498
  locationIds: e.array(e.string())
3848
3499
  })
3849
- ),
3850
- lastSyncTime: e.string().datetime().nullable(),
3851
- syncFrequency: e.number().int().min(1).max(30)
3500
+ )
3852
3501
  }).nullable()
3853
3502
  });
3854
- const u = e.object({
3503
+ const p = e.object({
3855
3504
  name: e.string(),
3856
3505
  pictureUrl: e.string(),
3857
3506
  phoneNumber: e.string().optional()
3858
- }), Le = u.extend({
3507
+ }), _e = p.extend({
3859
3508
  isAnonymous: e.boolean().optional()
3860
- }), xe = u.extend({
3509
+ }), ye = p.extend({
3861
3510
  id: e.string().optional()
3862
- }), h = e.object({
3511
+ }), m = e.object({
3863
3512
  comment: e.string(),
3864
3513
  updateTime: e.coerce.date()
3865
3514
  });
3866
3515
  e.object({
3867
3516
  comment: e.string().trim().min(1).max(4096)
3868
3517
  });
3869
- const s = e.object({
3518
+ const l = e.object({
3870
3519
  externalId: e.string().optional(),
3871
3520
  thumbnailUrl: e.string(),
3872
3521
  thumbnailLabel: e.string(),
3873
3522
  videoUrl: e.string().optional()
3874
- }), De = {
3523
+ }), fe = {
3875
3524
  collectionName: "Reviews",
3876
3525
  transform: {
3877
3526
  _id: "oid",
@@ -3879,31 +3528,31 @@ const s = e.object({
3879
3528
  reviewerId: "oid",
3880
3529
  restaurantId: "oid"
3881
3530
  }
3882
- }, w = e.enum([
3531
+ }, E = e.enum([
3883
3532
  "google",
3884
3533
  "facebook",
3885
3534
  "feedme",
3886
3535
  "feedvibe"
3887
3536
  ]);
3888
- w.options;
3537
+ E.options;
3889
3538
  e.enum(["google", "facebook"]);
3890
- const we = e.enum([
3539
+ const be = e.enum([
3891
3540
  "createTime_desc",
3892
3541
  "createTime_asc",
3893
3542
  "rating_asc",
3894
3543
  "rating_desc"
3895
3544
  ]);
3896
3545
  e.object({
3897
- source: w.array().optional(),
3546
+ source: E.array().optional(),
3898
3547
  dateFrom: e.string().datetime({ offset: !0 }).optional(),
3899
3548
  dateTo: e.string().datetime({ offset: !0 }).optional(),
3900
3549
  locationId: e.string().optional(),
3901
3550
  excludeDeleted: e.boolean().optional(),
3902
- sort: we.optional(),
3551
+ sort: be.optional(),
3903
3552
  limit: e.coerce.number().int().positive().optional(),
3904
3553
  skip: e.coerce.number().int().min(0).optional()
3905
3554
  });
3906
- const pt = e.object({
3555
+ const Ve = e.object({
3907
3556
  averageScore: e.number(),
3908
3557
  total: e.number().int().nonnegative(),
3909
3558
  starCounts: e.array(
@@ -3912,54 +3561,54 @@ const pt = e.object({
3912
3561
  count: e.number().int().nonnegative()
3913
3562
  })
3914
3563
  )
3915
- }), _ = e.object({
3564
+ }), s = e.object({
3916
3565
  name: e.string(),
3917
3566
  pictureUrl: e.string().optional(),
3918
3567
  phoneNumber: e.string().optional()
3919
- }), Ae = _.extend({
3568
+ }), He = s.extend({
3920
3569
  _id: e.string().optional()
3921
- }), Me = _.extend({
3570
+ }), ze = s.extend({
3922
3571
  _id: e.string()
3923
- }), Fe = _.extend({
3572
+ }), Ce = s.extend({
3924
3573
  isAnonymous: e.boolean().optional()
3925
- }), Ge = _.extend({
3574
+ }), Te = s.extend({
3926
3575
  id: e.string().optional()
3927
- }), y = e.object({
3928
- _id: n,
3576
+ }), g = e.object({
3577
+ _id: a,
3929
3578
  comment: e.string(),
3930
3579
  createTime: e.coerce.date(),
3931
3580
  updateTime: e.coerce.date().nullish(),
3932
- restaurantId: n,
3581
+ restaurantId: a,
3933
3582
  restaurantName: e.string()
3934
- }), ke = y.extend({
3583
+ }), ve = g.extend({
3935
3584
  source: e.literal("google"),
3936
3585
  externalId: e.string().min(1),
3937
3586
  translatedComment: e.string().optional(),
3938
- reviewer: Fe.optional(),
3939
- reply: h.optional(),
3940
- mediaItems: e.array(s),
3587
+ reviewer: Ce.optional(),
3588
+ reply: m.optional(),
3589
+ mediaItems: e.array(l),
3941
3590
  starRating: e.number(),
3942
3591
  locationName: e.string(),
3943
3592
  locationDisplayName: e.string(),
3944
3593
  originalUrl: e.string().optional()
3945
- }), Be = y.extend({
3594
+ }), Se = g.extend({
3946
3595
  source: e.literal("facebook"),
3947
3596
  externalId: e.string().min(1),
3948
- reviewer: Ge.optional(),
3597
+ reviewer: Te.optional(),
3949
3598
  isPositive: e.boolean().optional(),
3950
3599
  pageId: e.string(),
3951
3600
  pageName: e.string()
3952
- }), Ve = y.extend({
3601
+ }), Ne = g.extend({
3953
3602
  source: e.literal("feedme"),
3954
- reviewer: Ae.optional(),
3955
- reply: h.optional(),
3603
+ reviewer: He.optional(),
3604
+ reply: m.optional(),
3956
3605
  starRating: e.number(),
3957
- mediaItems: e.array(s),
3606
+ mediaItems: e.array(l),
3958
3607
  billId: e.string()
3959
- }), We = y.extend({
3608
+ }), Ue = g.extend({
3960
3609
  source: e.literal("feedvibe"),
3961
3610
  externalId: e.string().min(1),
3962
- reviewer: Me.optional(),
3611
+ reviewer: ze.optional(),
3963
3612
  rating: e.object({
3964
3613
  overall: e.number(),
3965
3614
  food: e.number(),
@@ -3967,67 +3616,67 @@ const pt = e.object({
3967
3616
  atmosphere: e.number()
3968
3617
  }),
3969
3618
  verified: e.boolean(),
3970
- mediaItems: e.array(s).default([])
3619
+ mediaItems: e.array(l).default([])
3971
3620
  });
3972
3621
  e.discriminatedUnion("source", [
3973
- ke,
3974
- Be,
3975
- Ve,
3976
- We
3622
+ ve,
3623
+ Se,
3624
+ Ne,
3625
+ Ue
3977
3626
  ]);
3978
3627
  e.object({
3979
3628
  comment: e.string(),
3980
3629
  starRating: e.number(),
3981
3630
  billId: e.string(),
3982
3631
  isAnonymous: e.boolean(),
3983
- mediaItems: e.array(s).optional()
3632
+ mediaItems: e.array(l).optional()
3984
3633
  });
3985
3634
  e.object({
3986
3635
  name: e.string().trim().min(1),
3987
3636
  phoneNumber: e.string().trim().min(1).optional()
3988
3637
  });
3989
- const f = e.object({
3990
- _id: n,
3991
- businessId: n,
3638
+ const d = e.object({
3639
+ _id: a,
3640
+ businessId: a,
3992
3641
  comment: e.string(),
3993
3642
  createTime: e.coerce.date(),
3994
3643
  updateTime: e.coerce.date().nullish(),
3995
- restaurantId: n,
3644
+ restaurantId: a,
3996
3645
  restaurantName: e.string(),
3997
3646
  deletedAt: e.coerce.date().optional()
3998
- }), Ye = f.extend({
3647
+ }), Pe = d.extend({
3999
3648
  source: e.literal("google"),
4000
3649
  externalId: e.string().min(1),
4001
3650
  translatedComment: e.string().optional(),
4002
- reviewer: Le.optional(),
4003
- reply: h.optional(),
4004
- mediaItems: e.array(s),
3651
+ reviewer: _e.optional(),
3652
+ reply: m.optional(),
3653
+ mediaItems: e.array(l),
4005
3654
  starRating: e.number(),
4006
3655
  locationName: e.string(),
4007
3656
  locationDisplayName: e.string(),
4008
3657
  originalUrl: e.string().optional()
4009
- }), Ke = f.extend({
3658
+ }), je = d.extend({
4010
3659
  source: e.literal("facebook"),
4011
3660
  externalId: e.string().min(1),
4012
- reviewer: xe.optional(),
3661
+ reviewer: ye.optional(),
4013
3662
  isPositive: e.boolean().optional(),
4014
3663
  pageId: e.string(),
4015
3664
  pageName: e.string()
4016
- }), qe = f.extend({
3665
+ }), Je = d.extend({
4017
3666
  source: e.literal("feedme"),
4018
3667
  isAnonymous: e.boolean(),
4019
3668
  metadata: e.record(e.string(), e.unknown()).optional(),
4020
- reviewerId: n.optional(),
4021
- reviewer: u.optional(),
4022
- reply: h.optional(),
3669
+ reviewerId: a.optional(),
3670
+ reviewer: p.optional(),
3671
+ reply: m.optional(),
4023
3672
  starRating: e.number(),
4024
3673
  billId: e.string(),
4025
- mediaItems: e.array(s)
4026
- }), Xe = f.extend({
3674
+ mediaItems: e.array(l)
3675
+ }), Ee = d.extend({
4027
3676
  source: e.literal("feedvibe"),
4028
3677
  externalId: e.string().min(1),
4029
- reviewerId: n,
4030
- reviewer: u,
3678
+ reviewerId: a,
3679
+ reviewer: p,
4031
3680
  rating: e.object({
4032
3681
  overall: e.number(),
4033
3682
  food: e.number(),
@@ -4035,29 +3684,23 @@ const f = e.object({
4035
3684
  atmosphere: e.number()
4036
3685
  }),
4037
3686
  verified: e.boolean(),
4038
- mediaItems: e.array(s).default([])
3687
+ mediaItems: e.array(l).default([])
4039
3688
  });
4040
3689
  e.discriminatedUnion("source", [
4041
- Ye,
4042
- Ke,
4043
- qe,
4044
- Xe
4045
- ]).describe(m.describe(De));
3690
+ Pe,
3691
+ je,
3692
+ Je,
3693
+ Ee
3694
+ ]).describe(i.describe(fe));
4046
3695
  export {
4047
- ae as F,
4048
- t as R,
4049
- lt as S,
4050
- it as T,
4051
- ct as W,
4052
- H as a,
4053
- rt as b,
4054
- Ne as c,
4055
- x as d,
4056
- C as e,
4057
- $ as f,
4058
- Z as g,
4059
- pt as h,
4060
- W as i,
4061
- h as j,
4062
- q as s
3696
+ D as F,
3697
+ Ge as S,
3698
+ Me as T,
3699
+ Be as W,
3700
+ ke as a,
3701
+ re as b,
3702
+ j as c,
3703
+ y as d,
3704
+ Ve as e,
3705
+ m as f
4063
3706
  };