@feedmepos/mf-connect 0.1.115-dev → 0.1.115-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 (154) hide show
  1. package/README.md +1 -66
  2. package/dist/{App-43mZfFAr.js → App-CvtSY8ZO.js} +618 -652
  3. package/dist/{Bin-CA7v180Y.js → Bin-B3gS9QVZ.js} +8 -8
  4. package/dist/{Broadcast-qmdifF2Y.js → Broadcast-DAeb-HaN.js} +21 -22
  5. package/dist/{CampaignAnalytic-xnrDxqaH.js → CampaignAnalytic-BfTaHVem.js} +7 -7
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zjk-QdtX.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-zsei4OfG.js} +9 -9
  7. package/dist/{Card-D8icsk7L.js → Card-JFeVIwFs.js} +24 -25
  8. package/dist/{Collections--THcD-E_.js → Collections-xcDpEhIm.js} +185 -197
  9. package/dist/{Credit-JrbtVMBp.js → Credit-C9HJZjDS.js} +20 -21
  10. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-DrwKtnE5.js → DateRangeChip.vue_vue_type_script_setup_true_lang-DSqVY91w.js} +1 -1
  11. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D_jXVE2I.js +3494 -0
  12. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-hVgqWdD0.js → EffectSheet.vue_vue_type_style_index_0_lang-C3J0rCTt.js} +32 -32
  13. package/dist/{Experience-CFeRqBoj.js → Experience-DszS8gto.js} +31 -32
  14. package/dist/{FileSaver.min-CCXIBm58.js → FileSaver.min-CFVQKaC-.js} +1 -1
  15. package/dist/{Game-CPxq6Ex3.js → Game-DhgeN7E2.js} +18 -19
  16. package/dist/{GiftCardSetup-D0esVZDp.js → GiftCardSetup-CWm6IhrS.js} +75 -75
  17. package/dist/{GoalPickerPanel.vue_vue_type_script_setup_true_lang-CJ1-vL-K.js → GoalPickerPanel.vue_vue_type_script_setup_true_lang-BuKADvmK.js} +7 -7
  18. package/dist/{Goals-DaKI6uXt.js → Goals-DtRVierH.js} +4 -4
  19. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-BOnL0GxM.js → ImageInput.vue_vue_type_script_setup_true_lang-DlEFyu6h.js} +1 -1
  20. package/dist/{Index-2kENoaZm.js → Index-DFRcu_qE.js} +10 -10
  21. package/dist/{LocationPicker.vue_vue_type_script_setup_true_lang-BtWnJKU_.js → LocationPicker.vue_vue_type_script_setup_true_lang-B3Br4Xvi.js} +1 -1
  22. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CX_Sspu5.js → LottieAnimation.vue_vue_type_script_setup_true_lang-CjNJj3qj.js} +1 -1
  23. package/dist/{LoyaltyDashboard-CB93Fz8u.js → LoyaltyDashboard-BWHKDPzk.js} +15 -15
  24. package/dist/{MainLayout.vue_vue_type_script_setup_true_lang-Du8fw5v_.js → MainLayout-BmpNNAiE.js} +4 -5
  25. package/dist/Marketing-BKK45Eve.js +236 -0
  26. package/dist/{remy-icon-BhUGu2NI.js → MarketingMaterialEdit-x3c_N7Gs.js} +1031 -2
  27. package/dist/{Member-B--nYyr0.js → Member-xEzrBW_p.js} +7 -7
  28. package/dist/{MemberDetailSheet.vue_vue_type_script_setup_true_lang-BBlzO7Db.js → MemberDetailSheet.vue_vue_type_script_setup_true_lang-DRoC-I0t.js} +50 -43
  29. package/dist/{MemberImportHistory-D52Y4RTC.js → MemberImportHistory-CEQpBBF8.js} +7 -7
  30. package/dist/{MemberList-13Owa1fj.js → MemberList-CCvzkHv8.js} +105 -103
  31. package/dist/{MemberTransactions-CpXEWNbq.js → MemberTransactions-Bmh39J2W.js} +1 -1
  32. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DlELjFM0.js → MessageInput.vue_vue_type_script_setup_true_lang-D3Pmk80l.js} +14 -14
  33. package/dist/{MetricInfoTooltip.vue_vue_type_script_setup_true_lang-C_y0rM8c.js → MetricInfoTooltip.vue_vue_type_script_setup_true_lang-DIBKAwHP.js} +1 -1
  34. package/dist/{Mission-Ci-UzXSu.js → Mission-CpUo2Bgw.js} +21 -22
  35. package/dist/{Overview-CKxSfAGF.js → Overview-CwQqQ1Tn.js} +144 -145
  36. package/dist/{Overview-CXen9Ram.js → Overview-DcDZmDXA.js} +22 -23
  37. package/dist/{Point-CR3YOaag.js → Point-CUNQsQIx.js} +21 -22
  38. package/dist/{Promotion-tw3J4ul-.js → Promotion-Cqdim7aW.js} +131 -137
  39. package/dist/{Queue-BZGA5ZXt.js → Queue-CNBVh1UG.js} +45 -46
  40. package/dist/{Record-BTevVXnT.js → Record-BYwz4l4o.js} +9 -9
  41. package/dist/{Review-BU7c8ZF0.js → Review-CqLcZFj8.js} +2 -2
  42. package/dist/ReviewFacebookCallback-DbSCILNN.js +238 -0
  43. package/dist/{ReviewGoogleCallback-xpdPHSdg.js → ReviewGoogleCallback-Dg8R7QlO.js} +5 -5
  44. package/dist/{Reward-jlA_7cxz.js → Reward-M8GZ8eHq.js} +29 -29
  45. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-D3z_n42G.js → RewardGroup.vue_vue_type_script_setup_true_lang-BkM9-Sx-.js} +15 -16
  46. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CnaL93TF.js +1883 -0
  47. package/dist/{Segment-C1Bwm--Q.js → Segment-CrMi6xrp.js} +305 -304
  48. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-B6apgWTM.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-DKH5_9db.js} +30 -31
  49. package/dist/{SendVoucherSheet.vue_vue_type_script_setup_true_lang-B7m2F9UV.js → SendVoucherSheet.vue_vue_type_script_setup_true_lang-CyeAQ-hg.js} +4 -4
  50. package/dist/Setting-BnFRI0Se.js +2037 -0
  51. package/dist/{SettingAdvertisements-4XEAJzlL.js → SettingAdvertisements-Dh7v4c1D.js} +12 -12
  52. package/dist/Settings-BvT8_tkQ.js +179 -0
  53. package/dist/{Store-C56dXtc4.js → Store-CV-BmK5b.js} +30 -31
  54. package/dist/{StoreRewards-DQ1Q6WS6.js → StoreRewards-DPhSLvSZ.js} +15 -15
  55. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CDu1QySl.js +1264 -0
  56. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Dqz6jTlH.js +142 -0
  57. package/dist/{Tier-D4CPZqw7.js → Tier-ChvYps23.js} +687 -2576
  58. package/dist/{Title-DCbwhUic.js → Title-v-Ivswr1.js} +92 -94
  59. package/dist/{Transaction-C5LrasXr.js → Transaction-CRqE1Ix0.js} +2 -2
  60. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-Cl9b4mrK.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-B0Uh9iuj.js} +26 -26
  61. package/dist/{Voucher-rrVbNZKR.js → Voucher-Bg8FOuzD.js} +19 -19
  62. package/dist/{VoucherEditor.vue_vue_type_script_setup_true_lang-BIq227nz.js → VoucherEditor.vue_vue_type_script_setup_true_lang-HKxivQMF.js} +16 -16
  63. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-C39_95SZ.js → ZodTextField.vue_vue_type_script_setup_true_lang-8d290Dcp.js} +2 -2
  64. package/dist/{app-CgimGODl.js → app-DdNKsn2Q.js} +7107 -8874
  65. package/dist/app.js +3 -4
  66. package/dist/{base.export-D2P6HFvo.js → base.export-R97FrSQL.js} +2 -2
  67. package/dist/{business-Bu5TqSA0.js → business-Ce8vq3wQ.js} +1 -1
  68. package/dist/{campaign-zJxttSIk.js → campaign-BTllt2LH.js} +25 -31
  69. package/dist/{campaign-BFIXSgdJ.js → campaign-C19If7bW.js} +94 -121
  70. package/dist/{campaign.enum-Dx-Zo68Q.js → campaign.enum-9CCbalR4.js} +2 -3
  71. package/dist/{campaign.fn-gvjlcEfe.js → campaign.fn-B4g03h0A.js} +78 -78
  72. package/dist/{collectible.enum-Liy2wH3s.js → collectible.enum-MvqF7mSg.js} +1 -1
  73. package/dist/{collection.fn-DOm0HsSh.js → collection.fn-CR0bD33S.js} +2 -2
  74. package/dist/{currency-BpbQvbm8.js → currency-DmlguGIM.js} +1 -1
  75. package/dist/{effect-D-GtNB3n.js → effect-Dx3zfl28.js} +1 -1
  76. package/dist/{email-addresses-BKMoAtMi.js → email-addresses-De5PGOY4.js} +2 -2
  77. package/dist/{feature-flag-BJ_eyKsq.js → feature-flag-CD9V1V0h.js} +74 -74
  78. package/dist/google-C3S8u0mT.js +4 -0
  79. package/dist/{helper-CkfjBgMM.js → helper-CEiv7SaO.js} +1 -1
  80. package/dist/{index-zTvr2GR4.js → index-649OZ_e1.js} +2 -2
  81. package/dist/{index-feCrYhi6.js → index-B8meeQoD.js} +1 -1
  82. package/dist/{index-CIej31pF.js → index-B8yWVB8P.js} +3 -4
  83. package/dist/{index-BKsxIwbi.js → index-BAXKd9Gg.js} +198 -198
  84. package/dist/{index-BAtUrtqM.js → index-BDPnyro2.js} +6 -19
  85. package/dist/{index-DUAZOMVJ.js → index-BR9h5DTI.js} +1 -1
  86. package/dist/{index-DwU3fsLW.js → index-BVdYxi3l.js} +15 -29
  87. package/dist/{index-D0JK99Ko.js → index-BW6eb3n6.js} +252 -611
  88. package/dist/{index-LygS9WsG.js → index-BYI9ttxy.js} +10767 -8028
  89. package/dist/{index-BdEXUNoG.js → index-BquSqx6K.js} +4 -4
  90. package/dist/{index-BpTIulTX.js → index-CBJy9bxB.js} +1 -1
  91. package/dist/{index-B6kU3PkV.js → index-CPODug8b.js} +2613 -2700
  92. package/dist/{index-CfQuYqXn.js → index-CWUrODxL.js} +1 -1
  93. package/dist/{index-DKxN1mMS.js → index-CqOCJTeR.js} +232 -390
  94. package/dist/{index-CuREApMc.js → index-D4d3l0gw.js} +7 -8
  95. package/dist/{index-Bhl5IRXy.js → index-DT3S00_Y.js} +10 -11
  96. package/dist/{index-DqGs6RJG.js → index-IZRfmmde.js} +581 -683
  97. package/dist/{index-CQ8XFbBk.js → index-__UT3_Ey.js} +2 -2
  98. package/dist/{index-CCEXSPxk.js → index-xct3mnu8.js} +7 -7
  99. package/dist/{index.esm2017-DZi9IQPS.js → index.esm2017-AVbZ9btd.js} +177 -177
  100. package/dist/{loading-Brid2wnu.js → loading-BvHm1m3K.js} +1 -1
  101. package/dist/{lodash-C1epw3Kv.js → lodash-Dvrceo7x.js} +1 -1
  102. package/dist/{member-import-DAIxTIiu.js → member-import-c9avpiSS.js} +5 -6
  103. package/dist/{membership-BZmljFhF.js → membership-D-pZS634.js} +3 -3
  104. package/dist/{money-cLcyGcSZ.js → money-D4skwMkD.js} +1 -1
  105. package/dist/{number-C2jPLJr2.js → number-DJ6ncfT6.js} +1 -1
  106. package/dist/objectid-DEMM_jdR.js +145 -0
  107. package/dist/{onboarding-oRfy_g05.js → onboarding-t7R1d3h-.js} +25 -25
  108. package/dist/{onboardingSetup-BLD6m8HY.js → onboardingSetup-lTaJc0oT.js} +2 -2
  109. package/dist/{plugins-CUsr9vB0.js → plugins-DQNOWwRC.js} +3 -3
  110. package/dist/{reward-UOT03odb.js → reward-BK150pjm.js} +1 -1
  111. package/dist/{rule-BgJnPjkI.js → rule-COcdAnUu.js} +492 -572
  112. package/dist/rule-builder-Deufb6h_.js +102 -0
  113. package/dist/style.css +1 -1
  114. package/dist/template-DeebIqJ_.js +236 -0
  115. package/dist/{timezone-BXA4wq7Y.js → timezone-BP6UC4KL.js} +1 -1
  116. package/dist/{transaction.fn-CQ4fpRt3.js → transaction.fn-BY0hzon0.js} +2 -2
  117. package/dist/{trigger-DXJCGT0q.js → trigger-DVBjVPbN.js} +8 -8
  118. package/dist/useMarketingMaterialActions-DpQCQHFI.js +96 -0
  119. package/dist/{usePagination-Pp4okWr8.js → usePagination-QT552XyF.js} +1 -1
  120. package/dist/{user-B3gXcAIy.js → user-CmAxNc7T.js} +1 -1
  121. package/dist/vue-i18n-Cze706-f.js +2365 -0
  122. package/dist/{xlsx-CCaDUTgW.js → xlsx-DAczoc8y.js} +224 -224
  123. package/dist/{zod-CPwjOxvW.js → zod-Aj-GuVQL.js} +1 -1
  124. package/package.json +2 -6
  125. package/dist/AuditLogs-BPpdm96t.js +0 -2016
  126. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DgdAlHU7.js +0 -4442
  127. package/dist/Grab-BWzdN_cd.js +0 -301
  128. package/dist/MainLayout-DwnjGXh6.js +0 -4
  129. package/dist/Marketing-DCco__2F.js +0 -273
  130. package/dist/MarketingMaterialEdit-BbgFtrYP.js +0 -1037
  131. package/dist/ReviewFacebookCallback-BnMF6Arh.js +0 -225
  132. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CsHxqH9h.js +0 -1923
  133. package/dist/Setting-CDM4RhLW.js +0 -574
  134. package/dist/Settings-D-0tvZRr.js +0 -286
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-LLD91Rz6.js +0 -1319
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-Bvy4NJMd.js +0 -7007
  137. package/dist/WhatsappAccount-oJDo5zTr.js +0 -159
  138. package/dist/WhatsappAccountStatusLabel.vue_vue_type_script_setup_true_lang-aCQCYFYq.js +0 -39
  139. package/dist/WhatsappBot-Cl64wG_F.js +0 -876
  140. package/dist/WhatsappBotLogs-D3uT4EiB.js +0 -372
  141. package/dist/WhatsappBotSettings-Cs1lLxh-.js +0 -705
  142. package/dist/WhatsappLayout-C639d2HP.js +0 -21
  143. package/dist/WhatsappNotificationGroupDialog.vue_vue_type_script_setup_true_lang-DpPxWp2x.js +0 -253
  144. package/dist/browser-BSAOEeIM.js +0 -1478
  145. package/dist/duplicateCampaign-CvsvjRE9.js +0 -51
  146. package/dist/feature-flag-Bo-k5sIG.js +0 -50
  147. package/dist/google-BQK68wbe.js +0 -5
  148. package/dist/index-C-iwb2Ln.js +0 -109
  149. package/dist/index-C_H8jFYf.js +0 -2743
  150. package/dist/index-DQ8JJhxs.js +0 -74
  151. package/dist/objectid-C-wocWKI.js +0 -145
  152. package/dist/template-BZyFhr73.js +0 -188
  153. package/dist/useMarketingMaterialActions-B-Wib5ga.js +0 -125
  154. package/dist/vue-i18n-DWGiC_vs.js +0 -2365
@@ -1,187 +1,12 @@
1
- import { F as n, m, b as A } from "./index-LygS9WsG.js";
2
- 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-DqGs6RJG.js";
4
- import { _ as k, l as v, f as B } from "./index-B6kU3PkV.js";
5
- import { i as p } from "./helper-CkfjBgMM.js";
6
- import { d as z, b as U, e as d } from "./index-BKsxIwbi.js";
7
- import { d as V } from "./index-DKxN1mMS.js";
8
- import { F as T } from "./index-CuREApMc.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 = {
1
+ import { z as e, F as a, m as i, b as O } from "./index-BYI9ttxy.js";
2
+ import { d as I } from "./index-CPODug8b.js";
3
+ import { R as t } from "./rule-builder-Deufb6h_.js";
4
+ import { i as o } from "./helper-CEiv7SaO.js";
5
+ import { e as u, b as H, f as r } from "./index-BAXKd9Gg.js";
6
+ import { B as R, C as L, A as c } from "./index-IZRfmmde.js";
7
+ import { d as x } from "./index-CqOCJTeR.js";
8
+ import { F as _ } from "./index-D4d3l0gw.js";
9
+ const Fe = {
185
10
  PROMOTION: {
186
11
  name: "Promotion Template",
187
12
  description: "Promotion template for campaign creation.",
@@ -587,7 +412,7 @@ const it = {
587
412
  // },
588
413
  hideInApp: !0
589
414
  },
590
- configs: p("VOUCHER", {
415
+ configs: o("VOUCHER", {
591
416
  name: "",
592
417
  business: null,
593
418
  noCampaign: !1
@@ -1577,7 +1402,7 @@ const it = {
1577
1402
  rewards: []
1578
1403
  }
1579
1404
  },
1580
- configs: p("GAME", {
1405
+ configs: o("GAME", {
1581
1406
  name: "Token",
1582
1407
  business: null,
1583
1408
  noCampaign: !1
@@ -1818,184 +1643,18 @@ const it = {
1818
1643
  type: "timeframe"
1819
1644
  }
1820
1645
  },
1821
- configs: p("STAMP", {
1646
+ configs: o("STAMP", {
1822
1647
  business: null,
1823
1648
  noCampaign: !1
1824
1649
  })
1825
1650
  }
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
1651
  }
1993
1652
  };
1994
- t.scaffoldGroup(), p("STAMP", {
1653
+ t.scaffoldGroup(), o("STAMP", {
1995
1654
  business: null,
1996
1655
  noCampaign: !1
1997
1656
  });
1998
- const lt = {
1657
+ const Me = {
1999
1658
  _id: "",
2000
1659
  intention: [],
2001
1660
  name: "Spend and get voucher",
@@ -2393,7 +2052,7 @@ const lt = {
2393
2052
  amount: 1
2394
2053
  }
2395
2054
  },
2396
- configs: p("VOUCHER", {
2055
+ configs: o("VOUCHER", {
2397
2056
  name: "",
2398
2057
  business: null,
2399
2058
  noCampaign: !1
@@ -2402,7 +2061,7 @@ const lt = {
2402
2061
  };
2403
2062
  ({
2404
2063
  ...t.scaffoldGroup()
2405
- }, p("VOUCHER", {
2064
+ }, o("VOUCHER", {
2406
2065
  name: "",
2407
2066
  business: null,
2408
2067
  noCampaign: !1
@@ -2413,7 +2072,7 @@ const lt = {
2413
2072
  ({
2414
2073
  ...t.scaffoldGroup()
2415
2074
  });
2416
- const rt = {
2075
+ const Ge = {
2417
2076
  _id: "",
2418
2077
  intention: [],
2419
2078
  name: "Spend and earn points",
@@ -2788,7 +2447,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
2788
2447
  });
2789
2448
  ({
2790
2449
  ...t.scaffoldGroup()
2791
- }, p("VOUCHER", {
2450
+ }, o("VOUCHER", {
2792
2451
  name: "",
2793
2452
  business: null,
2794
2453
  noCampaign: !1
@@ -2834,12 +2493,12 @@ t.setRuleToGroup(
2834
2493
  "&&"
2835
2494
  )
2836
2495
  );
2837
- t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
2496
+ t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
2838
2497
  name: "Token",
2839
2498
  business: null,
2840
2499
  noCampaign: !1
2841
2500
  });
2842
- const ct = {
2501
+ const ke = {
2843
2502
  _id: "",
2844
2503
  intention: [],
2845
2504
  name: "Welcome voucher",
@@ -3185,7 +2844,7 @@ const ct = {
3185
2844
  amount: 1
3186
2845
  }
3187
2846
  },
3188
- configs: p("VOUCHER", {
2847
+ configs: o("VOUCHER", {
3189
2848
  name: "",
3190
2849
  business: null,
3191
2850
  noCampaign: !1
@@ -3216,7 +2875,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
3216
2875
  ],
3217
2876
  "&&"
3218
2877
  )
3219
- ]), p("VOUCHER", {
2878
+ ]), o("VOUCHER", {
3220
2879
  name: "",
3221
2880
  business: null,
3222
2881
  noCampaign: !1
@@ -3239,7 +2898,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
3239
2898
  ({
3240
2899
  ...t.scaffoldGroup()
3241
2900
  });
3242
- const ae = e.enum([
2901
+ const D = e.enum([
3243
2902
  "MEMBER_REWARD",
3244
2903
  "PAID_LOYALTY",
3245
2904
  "COLLECT_FEEDBACK",
@@ -3249,7 +2908,7 @@ const ae = e.enum([
3249
2908
  "BROADCAST",
3250
2909
  "BIRTHDAY",
3251
2910
  "GAME"
3252
- ]), ne = e.enum([
2911
+ ]), w = e.enum([
3253
2912
  "text",
3254
2913
  "number",
3255
2914
  "textarea",
@@ -3275,91 +2934,88 @@ const ae = e.enum([
3275
2934
  "rule_bill",
3276
2935
  "rule_feedback",
3277
2936
  "rule_birthday",
3278
- "promotion_game_type",
3279
- "grab_effect",
3280
- "grab_quota",
3281
- "grab_conditions"
3282
- ]), oe = e.object({
2937
+ "promotion_game_type"
2938
+ ]), A = e.object({
3283
2939
  label: e.string().optional(),
3284
2940
  label_locale: e.record(e.string()).nullish(),
3285
2941
  property: e.string().or(e.any()),
3286
- type: ne,
2942
+ type: w,
3287
2943
  extras: e.string().optional(),
3288
2944
  isRuleChildren: e.boolean().optional()
3289
- }), S = e.object({
2945
+ }), f = e.object({
3290
2946
  not: e.boolean().optional(),
3291
2947
  property: e.string(),
3292
2948
  value: e.any()
3293
- }), ie = e.object({
2949
+ }), F = e.object({
3294
2950
  name: e.string().optional(),
3295
2951
  name_locale: e.record(e.string()).nullish(),
3296
- fields: e.array(oe),
3297
- condition: S.optional().or(
3298
- e.array(S)
2952
+ fields: e.array(A),
2953
+ condition: f.optional().or(
2954
+ e.array(f)
3299
2955
  )
3300
- }), le = e.object({
2956
+ }), M = e.object({
3301
2957
  name: e.string(),
3302
2958
  name_locale: e.record(e.string()).nullish(),
3303
- groups: e.array(ie)
2959
+ groups: e.array(F)
3304
2960
  });
3305
2961
  e.object({
3306
- _id: n,
2962
+ _id: a,
3307
2963
  name: e.string(),
3308
2964
  name_locale: e.record(e.string()).nullish(),
3309
2965
  description: e.string().nullish(),
3310
2966
  description_locale: e.record(e.string()).nullish(),
3311
- steps: e.array(le).min(1),
3312
- intention: e.array(ae),
2967
+ steps: e.array(M).min(1),
2968
+ intention: e.array(D),
3313
2969
  defaultValue: e.any()
3314
2970
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
3315
- const re = {
2971
+ const G = {
3316
2972
  collectionName: "Businesses",
3317
2973
  transform: {
3318
2974
  _id: "oid"
3319
2975
  }
3320
2976
  };
3321
2977
  e.object({
3322
- _id: n,
2978
+ _id: a,
3323
2979
  ownerId: e.string(),
3324
2980
  name: e.string(),
3325
2981
  credit: e.number(),
3326
2982
  forceSend: e.boolean().optional()
3327
- }).describe(m.describe(re));
3328
- const P = e.enum(["PHONE"]), ce = e.enum([
2983
+ }).describe(i.describe(G));
2984
+ const z = e.enum(["PHONE"]), k = e.enum([
3329
2985
  "MOCEAN",
3330
2986
  "SLACK",
3331
2987
  "SMS",
3332
2988
  "EMAIL",
3333
2989
  "WHATSAPP"
3334
- ]), pe = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
2990
+ ]), B = e.enum(["PENDING", "COMPLETED", "FAILED"]), V = e.enum([
3335
2991
  "General",
3336
2992
  "Otp",
3337
2993
  "Marketing",
3338
2994
  "Ordering",
3339
2995
  "MemberInvitation",
3340
2996
  "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([
2997
+ ]), W = e.object({
2998
+ type: z
2999
+ }), C = W.extend({
3000
+ type: e.literal(z.enum.PHONE),
3001
+ provider: k,
3002
+ usage: V.optional()
3003
+ }), T = e.enum([
3348
3004
  "Accepted",
3349
3005
  "PartiallyAccepted",
3350
3006
  "Queued",
3351
3007
  "Unknown",
3352
3008
  "Failed"
3353
- ]), ge = e.enum([
3009
+ ]), Y = e.enum([
3354
3010
  "PENDING",
3355
3011
  "SUBMITTED",
3356
3012
  "SETTLED",
3357
3013
  "FAILED"
3358
- ]), J = e.object({
3014
+ ]), v = e.object({
3359
3015
  channel: e.string(),
3360
3016
  status: e.string(),
3361
3017
  statusDetails: e.string().nullish()
3362
- }), de = {
3018
+ }), K = {
3363
3019
  collectionName: "Notifications",
3364
3020
  transform: {
3365
3021
  _id: "oid",
@@ -3369,51 +3025,51 @@ const P = e.enum(["PHONE"]), ce = e.enum([
3369
3025
  }
3370
3026
  };
3371
3027
  e.object({
3372
- _id: n,
3373
- business: n,
3374
- status: pe,
3028
+ _id: a,
3029
+ business: a,
3030
+ status: B,
3375
3031
  ref: e.string().optional(),
3376
3032
  title: e.string().optional(),
3377
3033
  // Single-channel fields. Absent on multi-channel dispatches, which carry
3378
3034
  // their content per channel in the submitted request instead.
3379
3035
  target: e.string().optional(),
3380
3036
  message: e.string().optional(),
3381
- option: j.optional(),
3037
+ option: C.optional(),
3382
3038
  // Multi-channel dispatch fields.
3383
- campaign: n.nullish(),
3384
- member: n.nullish(),
3039
+ campaign: a.nullish(),
3040
+ member: a.nullish(),
3385
3041
  /**
3386
3042
  * The scheduled run this dispatch belongs to. With campaign and member it
3387
3043
  * identifies one intended send, so a redelivered queue job is recognised
3388
3044
  * rather than sent twice.
3389
3045
  */
3390
3046
  runAt: e.coerce.date().nullish(),
3391
- mode: z.nullish(),
3392
- channels: e.array(U).nullish(),
3047
+ mode: u.nullish(),
3048
+ channels: e.array(H).nullish(),
3393
3049
  /**
3394
3050
  * Local submission state, kept separate from the upstream outcome so an
3395
3051
  * interrupted worker can tell "never sent" from "sent, result unknown".
3396
3052
  */
3397
- state: ge.nullish(),
3398
- outcome: E.nullish(),
3053
+ state: Y.nullish(),
3054
+ outcome: T.nullish(),
3399
3055
  /** Upstream correlation id, preserved even when the request failed. */
3400
3056
  requestId: e.string().nullish(),
3401
- attempts: e.array(J).nullish(),
3057
+ attempts: e.array(v).nullish(),
3402
3058
  /** Credit consumed upstream, recorded for reconciliation. */
3403
- creditUsed: d.nullish(),
3404
- balanceAfter: d.nullish(),
3059
+ creditUsed: r.nullish(),
3060
+ balanceAfter: r.nullish(),
3405
3061
  error: e.string().nullish(),
3406
3062
  createdAt: e.coerce.date().nullish(),
3407
3063
  submittedAt: e.coerce.date().nullish(),
3408
3064
  settledAt: e.coerce.date().nullish()
3409
- }).describe(m.describe(de));
3410
- const ue = e.object({
3065
+ }).describe(i.describe(K));
3066
+ const X = e.object({
3411
3067
  target: e.string(),
3412
3068
  title: e.string().optional(),
3413
3069
  message: e.string(),
3414
- option: j,
3070
+ option: C,
3415
3071
  ref: e.string().optional()
3416
- }), he = e.object({
3072
+ }), q = e.object({
3417
3073
  memberId: e.string(),
3418
3074
  name: e.string().nullish(),
3419
3075
  phoneNumber: e.string().nullish(),
@@ -3428,7 +3084,7 @@ const ue = e.object({
3428
3084
  e.object({
3429
3085
  businessId: e.string(),
3430
3086
  forceSend: e.boolean(),
3431
- mode: z,
3087
+ mode: u,
3432
3088
  channels: e.array(
3433
3089
  e.enum(["SMS", "WHATSAPP", "EMAIL", "APP_INBOX", "PUSH_NOTIFICATION"])
3434
3090
  ),
@@ -3440,34 +3096,34 @@ e.object({
3440
3096
  });
3441
3097
  e.object({
3442
3098
  requestId: e.string().nullish(),
3443
- status: E.nullish(),
3444
- attempts: e.array(J).nullish(),
3445
- creditUsed: d.nullish(),
3446
- balance: d.nullish()
3099
+ status: T.nullish(),
3100
+ attempts: e.array(v).nullish(),
3101
+ creditUsed: r.nullish(),
3102
+ balance: r.nullish()
3447
3103
  });
3448
- const _e = e.object({
3104
+ const Q = e.object({
3449
3105
  campaignId: e.string(),
3450
3106
  business: e.string(),
3451
3107
  runAt: e.coerce.date(),
3452
- recipient: he,
3108
+ recipient: q,
3453
3109
  /** Personalised, editor-data-free content keyed by channel. */
3454
3110
  content: e.record(e.string(), e.unknown()),
3455
- mode: z,
3456
- channels: e.array(U)
3111
+ mode: u,
3112
+ channels: e.array(H)
3457
3113
  });
3458
3114
  e.object({
3459
3115
  campaignId: e.string(),
3460
3116
  /** Absent only on multi-channel jobs, which carry `dispatch` instead. */
3461
- notification: ue.optional(),
3117
+ notification: X.optional(),
3462
3118
  business: e.string(),
3463
3119
  /**
3464
3120
  * Present only for multi-channel broadcasts. When set the job takes the
3465
3121
  * multi-channel dispatch path; when absent the legacy single-channel path
3466
3122
  * runs unchanged.
3467
3123
  */
3468
- dispatch: _e.optional()
3469
- }).superRefine((o, a) => {
3470
- !o.notification && !o.dispatch && a.addIssue({
3124
+ dispatch: Q.optional()
3125
+ }).superRefine((n, h) => {
3126
+ !n.notification && !n.dispatch && h.addIssue({
3471
3127
  code: e.ZodIssueCode.custom,
3472
3128
  message: "Job must carry either a notification or a dispatch"
3473
3129
  });
@@ -3476,19 +3132,19 @@ e.object({
3476
3132
  phone: e.string(),
3477
3133
  message: e.string()
3478
3134
  });
3479
- const N = e.object({
3135
+ const b = e.object({
3480
3136
  name: e.string().optional(),
3481
3137
  address: e.string()
3482
- }), ye = e.object({
3138
+ }), Z = e.object({
3483
3139
  filename: e.string(),
3484
3140
  content: e.instanceof(Uint8Array)
3485
3141
  });
3486
3142
  e.object({
3487
- from: N.optional(),
3488
- to: e.array(N),
3143
+ from: b.optional(),
3144
+ to: e.array(b),
3489
3145
  subject: e.string(),
3490
3146
  html: e.string().optional(),
3491
- attachments: e.array(ye).optional()
3147
+ attachments: e.array(Z).optional()
3492
3148
  });
3493
3149
  e.object({
3494
3150
  subject: e.string(),
@@ -3528,7 +3184,7 @@ e.object({
3528
3184
  billId: e.string()
3529
3185
  });
3530
3186
  e.object({
3531
- amount: A,
3187
+ amount: O,
3532
3188
  member: e.string(),
3533
3189
  bill: e.string(),
3534
3190
  otp: e.string().nullish(),
@@ -3537,15 +3193,15 @@ e.object({
3537
3193
  e.object({
3538
3194
  orderId: e.string()
3539
3195
  });
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);
3196
+ var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
3197
+ e.nativeEnum(S);
3542
3198
  e.enum(["manage", "create", "read", "update", "delete"]);
3543
3199
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
3544
3200
  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);
3201
+ 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 || {});
3202
+ e.nativeEnum(N);
3547
3203
  e.enum(["restaurant"]);
3548
- const fe = e.object({
3204
+ const $ = e.object({
3549
3205
  label: e.string(),
3550
3206
  subject: e.union([e.string(), e.array(e.string())]),
3551
3207
  actions: e.union([e.string(), e.array(e.string())]),
@@ -3555,41 +3211,41 @@ const fe = e.object({
3555
3211
  reason: e.string().optional()
3556
3212
  });
3557
3213
  e.object({
3558
- _id: n,
3214
+ _id: a,
3559
3215
  businessId: e.string(),
3560
3216
  userId: e.string(),
3561
3217
  email: e.string().nullish(),
3562
3218
  phoneNo: e.string().nullish(),
3563
- permissions: e.array(e.lazy(() => fe))
3219
+ permissions: e.array(e.lazy(() => $))
3564
3220
  }).describe(
3565
- m.describe({
3221
+ i.describe({
3566
3222
  collectionName: "PermissionUsers",
3567
3223
  transform: {
3568
3224
  _id: "oid"
3569
3225
  }
3570
3226
  })
3571
3227
  );
3572
- const R = e.object({
3228
+ const U = e.object({
3573
3229
  userId: e.string(),
3574
3230
  level: e.number(),
3575
3231
  role: e.string().optional(),
3576
3232
  businessId: e.string().optional(),
3577
3233
  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())));
3234
+ }), ee = e.function().args(e.any(), U).returns(e.boolean()), te = e.function().args(U).returns(e.promise(e.array(e.any())));
3579
3235
  e.object({
3580
- isAdmin: be,
3581
- getRules: He
3236
+ isAdmin: ee,
3237
+ getRules: te
3582
3238
  });
3583
3239
  e.object({
3584
- transactions: e.array(F),
3585
- collections: e.array(G)
3240
+ transactions: e.array(R),
3241
+ collections: e.array(L)
3586
3242
  });
3587
- const L = e.enum([
3243
+ const P = e.enum([
3588
3244
  "ROCK_PAPER_SCISSOR"
3589
3245
  ]);
3590
- L.enum.ROCK_PAPER_SCISSOR + "";
3246
+ P.enum.ROCK_PAPER_SCISSOR + "";
3591
3247
  e.object({
3592
- type: L
3248
+ type: P
3593
3249
  });
3594
3250
  e.object({
3595
3251
  host: e.string().url(),
@@ -3598,7 +3254,7 @@ e.object({
3598
3254
  roomId: e.string()
3599
3255
  });
3600
3256
  e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
3601
- const ze = {
3257
+ const ae = {
3602
3258
  collectionName: "MarketingMaterials",
3603
3259
  transform: {
3604
3260
  _id: "oid",
@@ -3606,14 +3262,13 @@ const ze = {
3606
3262
  }
3607
3263
  };
3608
3264
  e.object({
3609
- _id: n,
3610
- business: n,
3265
+ _id: a,
3266
+ business: a,
3611
3267
  imageUrl: e.string().url(),
3612
3268
  headline: e.string(),
3613
3269
  caption: e.string(),
3614
- editedAt: e.coerce.date(),
3615
- deletedAt: e.coerce.date().optional()
3616
- }).describe(m.describe(ze));
3270
+ editedAt: e.coerce.date()
3271
+ }).describe(i.describe(ae));
3617
3272
  e.object({
3618
3273
  id: e.number(),
3619
3274
  name: e.string(),
@@ -3633,12 +3288,12 @@ e.object({
3633
3288
  phone: e.string().optional(),
3634
3289
  email: e.string().optional()
3635
3290
  });
3636
- const Te = e.enum([
3291
+ const ne = e.enum([
3637
3292
  "PENDING",
3638
3293
  "SUCCESS",
3639
3294
  "FAILED",
3640
3295
  "RETRYING"
3641
- ]), Ce = {
3296
+ ]), oe = {
3642
3297
  collectionName: "WebhookLogs",
3643
3298
  transform: {
3644
3299
  _id: "oid",
@@ -3646,39 +3301,39 @@ const Te = e.enum([
3646
3301
  }
3647
3302
  };
3648
3303
  e.object({
3649
- _id: n,
3650
- business: n,
3304
+ _id: a,
3305
+ business: a,
3651
3306
  type: e.string(),
3652
3307
  payload: e.record(e.any()),
3653
- status: Te,
3308
+ status: ne,
3654
3309
  response: e.any().optional(),
3655
3310
  error: e.string().optional()
3656
- }).describe(m.describe(Ce));
3657
- const ve = e.enum(["AUTO", "MANUAL"]);
3311
+ }).describe(i.describe(oe));
3312
+ const ie = e.enum(["AUTO", "MANUAL"]);
3658
3313
  e.enum(["IN_PROGRESS", "COMPLETED"]);
3659
- const x = e.object({
3660
- _id: n,
3314
+ const j = e.object({
3315
+ _id: a,
3661
3316
  name: e.string().min(1, "Name is required").max(50),
3662
- type: ve,
3663
- event: V.optional()
3664
- }), Se = e.object({
3317
+ type: ie,
3318
+ event: x.optional()
3319
+ }), le = e.object({
3665
3320
  from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
3666
3321
  to: e.number().int("Must be integer").nullish()
3667
- }).superRefine((o, a) => {
3668
- o.from && o.to && o.from > o.to && a.addIssue({
3322
+ }).superRefine((n, h) => {
3323
+ n.from && n.to && n.from > n.to && h.addIssue({
3669
3324
  code: "custom",
3670
3325
  message: "Max referral count must be more than min referral count"
3671
3326
  });
3672
- }), Ne = e.object({
3673
- threshold: Se,
3674
- rewards: e.array(n),
3675
- pf_reward: e.array(T).optional()
3676
- }), C = e.object({
3327
+ }), re = e.object({
3328
+ threshold: le,
3329
+ rewards: e.array(a),
3330
+ pf_reward: e.array(_).optional()
3331
+ }), y = e.object({
3677
3332
  id: e.string(),
3678
3333
  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 = {
3334
+ rule: I.optional(),
3335
+ rewards: e.array(re)
3336
+ }), ce = {
3682
3337
  collectionName: "ReferralRecords",
3683
3338
  transform: {
3684
3339
  _id: "oid",
@@ -3687,25 +3342,25 @@ const x = e.object({
3687
3342
  referee: "oid",
3688
3343
  refereeReward: "oid"
3689
3344
  }
3690
- }, Pe = e.object({
3345
+ }, pe = e.object({
3691
3346
  completedAt: e.coerce.date(),
3692
- criteria: n,
3347
+ criteria: a,
3693
3348
  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),
3349
+ }), me = e.object({
3350
+ _id: a,
3351
+ business: a,
3352
+ referer: a,
3353
+ referee: a,
3354
+ criteria: e.array(j),
3355
+ reward: e.array(y),
3356
+ refereeReward: e.array(a).optional(),
3357
+ criteria_progress: e.array(pe),
3703
3358
  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({
3359
+ pf_referer: c.optional(),
3360
+ pf_referee: c.optional(),
3361
+ pf_refereeReward: e.array(_).optional()
3362
+ }).describe(i.describe(ce));
3363
+ me.pick({
3709
3364
  _id: !0,
3710
3365
  business: !0,
3711
3366
  referer: !0,
@@ -3713,83 +3368,79 @@ je.pick({
3713
3368
  criteria_progress: !0,
3714
3369
  criteria: !0
3715
3370
  }).extend({
3716
- pf_referee: g.pick({
3371
+ pf_referee: c.pick({
3717
3372
  _id: !0,
3718
3373
  name: !0,
3719
3374
  phoneNumber: !0,
3720
3375
  photoUrl: !0
3721
3376
  })
3722
3377
  });
3723
- const Ee = {
3378
+ const se = {
3724
3379
  collectionName: "ReferralProgram",
3725
3380
  transform: {
3726
3381
  _id: "oid",
3727
3382
  business: "oid"
3728
3383
  }
3729
- }, D = e.object({
3730
- _id: n,
3731
- business: n,
3384
+ }, J = e.object({
3385
+ _id: a,
3386
+ business: a,
3732
3387
  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));
3388
+ refereeReward: e.array(a).optional(),
3389
+ reward: e.array(y),
3390
+ criteria: e.array(j)
3391
+ }).describe(i.describe(se));
3737
3392
  e.object({
3738
- referer: n,
3739
- referee: n,
3740
- business: n
3393
+ referer: a,
3394
+ referee: a,
3395
+ business: a
3741
3396
  });
3742
3397
  e.object({
3743
- program: D.pick({
3398
+ program: J.pick({
3744
3399
  _id: !0,
3745
3400
  business: !0,
3746
3401
  term_and_condition: !0
3747
3402
  }).extend({
3748
- reward: C.optional(),
3749
- pf_refereeReward: e.array(T).optional()
3403
+ reward: y.optional(),
3404
+ pf_refereeReward: e.array(_).optional()
3750
3405
  }),
3751
3406
  referralCount: e.number(),
3752
3407
  successReferralCount: e.number(),
3753
- referredBy: g.pick({
3408
+ referredBy: c.pick({
3754
3409
  _id: !0,
3755
3410
  name: !0,
3756
3411
  phoneNumber: !0,
3757
3412
  photoUrl: !0
3758
3413
  }).optional()
3759
3414
  });
3760
- D.extend({
3415
+ J.extend({
3761
3416
  updateReferralRecord: e.boolean().optional()
3762
3417
  });
3763
- const Je = e.object({
3418
+ const ge = e.object({
3764
3419
  facebookPageId: e.string(),
3765
3420
  pageName: e.string(),
3766
3421
  pageProfileImageUrl: e.string(),
3767
3422
  pageAccessToken: e.string().optional(),
3768
- locationIds: e.array(n)
3769
- }), Oe = e.object({
3770
- locationId: n.nullable(),
3423
+ locationIds: e.array(a)
3424
+ }), de = e.object({
3425
+ locationId: a.nullable(),
3771
3426
  googleLocationName: e.string(),
3772
3427
  displayName: e.string().optional()
3773
- }), Ie = e.object({
3428
+ }), he = e.object({
3774
3429
  accessToken: e.string().nullable(),
3775
3430
  refreshToken: e.string().nullable(),
3776
3431
  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({
3432
+ locations: e.array(de)
3433
+ }), ue = e.object({
3781
3434
  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)
3435
+ pages: e.array(ge)
3785
3436
  });
3786
3437
  e.object({
3787
- _id: n,
3788
- businessId: n,
3789
- google: Ie.nullable(),
3790
- facebook: Re.nullable()
3438
+ _id: a,
3439
+ businessId: a,
3440
+ google: he.nullable(),
3441
+ facebook: ue.nullable()
3791
3442
  }).describe(
3792
- m.describe({
3443
+ i.describe({
3793
3444
  collectionName: "ReviewSourceConfig",
3794
3445
  transform: {
3795
3446
  _id: "oid",
@@ -3833,9 +3484,7 @@ e.object({
3833
3484
  displayName: e.string().optional(),
3834
3485
  locationId: e.string().nullable()
3835
3486
  })
3836
- ),
3837
- lastSyncTime: e.string().datetime().nullable(),
3838
- syncFrequency: e.number().int().min(1).max(30)
3487
+ )
3839
3488
  }).nullable(),
3840
3489
  facebook: e.object({
3841
3490
  token: e.string().nullable(),
@@ -3846,32 +3495,30 @@ e.object({
3846
3495
  pageProfileImageUrl: e.string(),
3847
3496
  locationIds: e.array(e.string())
3848
3497
  })
3849
- ),
3850
- lastSyncTime: e.string().datetime().nullable(),
3851
- syncFrequency: e.number().int().min(1).max(30)
3498
+ )
3852
3499
  }).nullable()
3853
3500
  });
3854
- const u = e.object({
3501
+ const p = e.object({
3855
3502
  name: e.string(),
3856
3503
  pictureUrl: e.string(),
3857
3504
  phoneNumber: e.string().optional()
3858
- }), Le = u.extend({
3505
+ }), _e = p.extend({
3859
3506
  isAnonymous: e.boolean().optional()
3860
- }), xe = u.extend({
3507
+ }), ye = p.extend({
3861
3508
  id: e.string().optional()
3862
- }), h = e.object({
3509
+ }), m = e.object({
3863
3510
  comment: e.string(),
3864
3511
  updateTime: e.coerce.date()
3865
3512
  });
3866
3513
  e.object({
3867
3514
  comment: e.string().trim().min(1).max(4096)
3868
3515
  });
3869
- const s = e.object({
3516
+ const l = e.object({
3870
3517
  externalId: e.string().optional(),
3871
3518
  thumbnailUrl: e.string(),
3872
3519
  thumbnailLabel: e.string(),
3873
3520
  videoUrl: e.string().optional()
3874
- }), De = {
3521
+ }), fe = {
3875
3522
  collectionName: "Reviews",
3876
3523
  transform: {
3877
3524
  _id: "oid",
@@ -3879,31 +3526,31 @@ const s = e.object({
3879
3526
  reviewerId: "oid",
3880
3527
  restaurantId: "oid"
3881
3528
  }
3882
- }, w = e.enum([
3529
+ }, E = e.enum([
3883
3530
  "google",
3884
3531
  "facebook",
3885
3532
  "feedme",
3886
3533
  "feedvibe"
3887
3534
  ]);
3888
- w.options;
3535
+ E.options;
3889
3536
  e.enum(["google", "facebook"]);
3890
- const we = e.enum([
3537
+ const be = e.enum([
3891
3538
  "createTime_desc",
3892
3539
  "createTime_asc",
3893
3540
  "rating_asc",
3894
3541
  "rating_desc"
3895
3542
  ]);
3896
3543
  e.object({
3897
- source: w.array().optional(),
3544
+ source: E.array().optional(),
3898
3545
  dateFrom: e.string().datetime({ offset: !0 }).optional(),
3899
3546
  dateTo: e.string().datetime({ offset: !0 }).optional(),
3900
3547
  locationId: e.string().optional(),
3901
3548
  excludeDeleted: e.boolean().optional(),
3902
- sort: we.optional(),
3549
+ sort: be.optional(),
3903
3550
  limit: e.coerce.number().int().positive().optional(),
3904
3551
  skip: e.coerce.number().int().min(0).optional()
3905
3552
  });
3906
- const pt = e.object({
3553
+ const Be = e.object({
3907
3554
  averageScore: e.number(),
3908
3555
  total: e.number().int().nonnegative(),
3909
3556
  starCounts: e.array(
@@ -3912,54 +3559,54 @@ const pt = e.object({
3912
3559
  count: e.number().int().nonnegative()
3913
3560
  })
3914
3561
  )
3915
- }), _ = e.object({
3562
+ }), s = e.object({
3916
3563
  name: e.string(),
3917
3564
  pictureUrl: e.string().optional(),
3918
3565
  phoneNumber: e.string().optional()
3919
- }), Ae = _.extend({
3566
+ }), He = s.extend({
3920
3567
  _id: e.string().optional()
3921
- }), Me = _.extend({
3568
+ }), ze = s.extend({
3922
3569
  _id: e.string()
3923
- }), Fe = _.extend({
3570
+ }), Ce = s.extend({
3924
3571
  isAnonymous: e.boolean().optional()
3925
- }), Ge = _.extend({
3572
+ }), Te = s.extend({
3926
3573
  id: e.string().optional()
3927
- }), y = e.object({
3928
- _id: n,
3574
+ }), g = e.object({
3575
+ _id: a,
3929
3576
  comment: e.string(),
3930
3577
  createTime: e.coerce.date(),
3931
3578
  updateTime: e.coerce.date().nullish(),
3932
- restaurantId: n,
3579
+ restaurantId: a,
3933
3580
  restaurantName: e.string()
3934
- }), ke = y.extend({
3581
+ }), ve = g.extend({
3935
3582
  source: e.literal("google"),
3936
3583
  externalId: e.string().min(1),
3937
3584
  translatedComment: e.string().optional(),
3938
- reviewer: Fe.optional(),
3939
- reply: h.optional(),
3940
- mediaItems: e.array(s),
3585
+ reviewer: Ce.optional(),
3586
+ reply: m.optional(),
3587
+ mediaItems: e.array(l),
3941
3588
  starRating: e.number(),
3942
3589
  locationName: e.string(),
3943
3590
  locationDisplayName: e.string(),
3944
3591
  originalUrl: e.string().optional()
3945
- }), Be = y.extend({
3592
+ }), Se = g.extend({
3946
3593
  source: e.literal("facebook"),
3947
3594
  externalId: e.string().min(1),
3948
- reviewer: Ge.optional(),
3595
+ reviewer: Te.optional(),
3949
3596
  isPositive: e.boolean().optional(),
3950
3597
  pageId: e.string(),
3951
3598
  pageName: e.string()
3952
- }), Ve = y.extend({
3599
+ }), Ne = g.extend({
3953
3600
  source: e.literal("feedme"),
3954
- reviewer: Ae.optional(),
3955
- reply: h.optional(),
3601
+ reviewer: He.optional(),
3602
+ reply: m.optional(),
3956
3603
  starRating: e.number(),
3957
- mediaItems: e.array(s),
3604
+ mediaItems: e.array(l),
3958
3605
  billId: e.string()
3959
- }), We = y.extend({
3606
+ }), Ue = g.extend({
3960
3607
  source: e.literal("feedvibe"),
3961
3608
  externalId: e.string().min(1),
3962
- reviewer: Me.optional(),
3609
+ reviewer: ze.optional(),
3963
3610
  rating: e.object({
3964
3611
  overall: e.number(),
3965
3612
  food: e.number(),
@@ -3967,67 +3614,67 @@ const pt = e.object({
3967
3614
  atmosphere: e.number()
3968
3615
  }),
3969
3616
  verified: e.boolean(),
3970
- mediaItems: e.array(s).default([])
3617
+ mediaItems: e.array(l).default([])
3971
3618
  });
3972
3619
  e.discriminatedUnion("source", [
3973
- ke,
3974
- Be,
3975
- Ve,
3976
- We
3620
+ ve,
3621
+ Se,
3622
+ Ne,
3623
+ Ue
3977
3624
  ]);
3978
3625
  e.object({
3979
3626
  comment: e.string(),
3980
3627
  starRating: e.number(),
3981
3628
  billId: e.string(),
3982
3629
  isAnonymous: e.boolean(),
3983
- mediaItems: e.array(s).optional()
3630
+ mediaItems: e.array(l).optional()
3984
3631
  });
3985
3632
  e.object({
3986
3633
  name: e.string().trim().min(1),
3987
3634
  phoneNumber: e.string().trim().min(1).optional()
3988
3635
  });
3989
- const f = e.object({
3990
- _id: n,
3991
- businessId: n,
3636
+ const d = e.object({
3637
+ _id: a,
3638
+ businessId: a,
3992
3639
  comment: e.string(),
3993
3640
  createTime: e.coerce.date(),
3994
3641
  updateTime: e.coerce.date().nullish(),
3995
- restaurantId: n,
3642
+ restaurantId: a,
3996
3643
  restaurantName: e.string(),
3997
3644
  deletedAt: e.coerce.date().optional()
3998
- }), Ye = f.extend({
3645
+ }), Pe = d.extend({
3999
3646
  source: e.literal("google"),
4000
3647
  externalId: e.string().min(1),
4001
3648
  translatedComment: e.string().optional(),
4002
- reviewer: Le.optional(),
4003
- reply: h.optional(),
4004
- mediaItems: e.array(s),
3649
+ reviewer: _e.optional(),
3650
+ reply: m.optional(),
3651
+ mediaItems: e.array(l),
4005
3652
  starRating: e.number(),
4006
3653
  locationName: e.string(),
4007
3654
  locationDisplayName: e.string(),
4008
3655
  originalUrl: e.string().optional()
4009
- }), Ke = f.extend({
3656
+ }), je = d.extend({
4010
3657
  source: e.literal("facebook"),
4011
3658
  externalId: e.string().min(1),
4012
- reviewer: xe.optional(),
3659
+ reviewer: ye.optional(),
4013
3660
  isPositive: e.boolean().optional(),
4014
3661
  pageId: e.string(),
4015
3662
  pageName: e.string()
4016
- }), qe = f.extend({
3663
+ }), Je = d.extend({
4017
3664
  source: e.literal("feedme"),
4018
3665
  isAnonymous: e.boolean(),
4019
3666
  metadata: e.record(e.string(), e.unknown()).optional(),
4020
- reviewerId: n.optional(),
4021
- reviewer: u.optional(),
4022
- reply: h.optional(),
3667
+ reviewerId: a.optional(),
3668
+ reviewer: p.optional(),
3669
+ reply: m.optional(),
4023
3670
  starRating: e.number(),
4024
3671
  billId: e.string(),
4025
- mediaItems: e.array(s)
4026
- }), Xe = f.extend({
3672
+ mediaItems: e.array(l)
3673
+ }), Ee = d.extend({
4027
3674
  source: e.literal("feedvibe"),
4028
3675
  externalId: e.string().min(1),
4029
- reviewerId: n,
4030
- reviewer: u,
3676
+ reviewerId: a,
3677
+ reviewer: p,
4031
3678
  rating: e.object({
4032
3679
  overall: e.number(),
4033
3680
  food: e.number(),
@@ -4035,29 +3682,23 @@ const f = e.object({
4035
3682
  atmosphere: e.number()
4036
3683
  }),
4037
3684
  verified: e.boolean(),
4038
- mediaItems: e.array(s).default([])
3685
+ mediaItems: e.array(l).default([])
4039
3686
  });
4040
3687
  e.discriminatedUnion("source", [
4041
- Ye,
4042
- Ke,
4043
- qe,
4044
- Xe
4045
- ]).describe(m.describe(De));
3688
+ Pe,
3689
+ je,
3690
+ Je,
3691
+ Ee
3692
+ ]).describe(i.describe(fe));
4046
3693
  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
3694
+ D as F,
3695
+ Me as S,
3696
+ Fe as T,
3697
+ ke as W,
3698
+ Ge as a,
3699
+ re as b,
3700
+ j as c,
3701
+ y as d,
3702
+ Be as e,
3703
+ m as f
4063
3704
  };