@feedmepos/mf-connect 0.1.0-beta.5 → 0.1.0-beta.50

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 (112) hide show
  1. package/dist/Analytic-D-yp03jJ.js +427 -0
  2. package/dist/{App-C8Qfnkhz.js → App-CeQWTGNK.js} +441 -420
  3. package/dist/AuditLogs-2qzwcMXR.js +1885 -0
  4. package/dist/Bin-D1b2NbbA.js +191 -0
  5. package/dist/{Broadcast-BK-1MQkL.js → Broadcast-bKF9mIns.js} +13 -12
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BLzpFQoc.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-B_q5K-cx.js} +6 -8
  7. package/dist/Card-BCAyfBLi.js +896 -0
  8. package/dist/{Collections-TA4iW1r0.js → Collections-Yz3F55bv.js} +27 -31
  9. package/dist/{Credit-Df9iFQjZ.js → Credit-Ceptt_g_.js} +17 -16
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  11. package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-CLFeMi0j.js +169 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-TjNinQ8e.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BCRVyPwl.js → EffectSheet.vue_vue_type_style_index_0_lang-D3Bt-Vuu.js} +6 -6
  14. package/dist/{Experience-ByLFXKn6.js → Experience-DskHKzfo.js} +26 -25
  15. package/dist/{Game-B6Ez0pfW.js → Game-IJ6X0AXM.js} +21 -20
  16. package/dist/Index-CEl2y9X6.js +259 -0
  17. package/dist/Marketing-CWekLb4c.js +20071 -0
  18. package/dist/{Member-TobP1ISp.js → Member-BUZPQ5Lb.js} +4 -4
  19. package/dist/MemberList-BmVNqvbm.js +1598 -0
  20. package/dist/MemberTransactions-B3XhEOK_.js +45 -0
  21. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ-w6iZi.js → MessageInput.vue_vue_type_script_setup_true_lang-C6YIbQtM.js} +6 -6
  22. package/dist/{Mission-D9uTVo0G.js → Mission-Ci9ed_ph.js} +97 -84
  23. package/dist/Overview-CU9uhC-k.js +1078 -0
  24. package/dist/{Point-4rDr-53e.js → Point-wuuR7AEb.js} +26 -25
  25. package/dist/{Promotion-BKO_dtQk.js → Promotion-BMi3kyE8.js} +55 -48
  26. package/dist/Record-Wmh-g8WY.js +340 -0
  27. package/dist/Reward-BL4lxhIB.js +442 -0
  28. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CqXuTxun.js +150 -0
  29. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dbik0PEw.js +1637 -0
  30. package/dist/Segment-DObdjyYi.js +568 -0
  31. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-BAuM6qP5.js +181 -0
  32. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BfyRVxWM.js +147 -0
  33. package/dist/{Setting-B7oISD0D.js → Setting-Dqgnd7TR.js} +610 -586
  34. package/dist/Store--Z4So__g.js +1744 -0
  35. package/dist/{StoreRewards-AMxIYhjZ.js → StoreRewards-DPFVXWwm.js} +33 -32
  36. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CNsdA106.js +939 -0
  37. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B2szciPk.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-CGOmGozY.js} +1 -1
  38. package/dist/{Tier-DkxdNj-K.js → Tier-36IfhsnP.js} +327 -318
  39. package/dist/{Title-VFpCOsMO.js → Title-XH56OOug.js} +199 -184
  40. package/dist/{Transaction-BgKD8n2L.js → Transaction-BUQcSmBs.js} +2 -2
  41. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-BVCfeG5T.js +130 -0
  42. package/dist/Voucher-CvmH0kcF.js +353 -0
  43. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BQOD6uEf.js +419 -0
  44. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B2FGvyza.js → ZodTextField.vue_vue_type_script_setup_true_lang-CcIcCt4N.js} +1 -1
  45. package/dist/{app-DUl5dav5.js → app-DeW5_DB0.js} +1754 -1496
  46. package/dist/{app-DA-t-2Zt.js → app-TN8KEPMu.js} +1 -1
  47. package/dist/app.js +1 -1
  48. package/dist/{business-CeCitOY4.js → business-D1mLhSME.js} +1 -1
  49. package/dist/campaign-0tnkhu78.js +1810 -0
  50. package/dist/{campaign-CcLM6e4s.js → campaign-B-12Im0w.js} +2 -2
  51. package/dist/campaign.enum-C8m-HHZE.js +20 -0
  52. package/dist/campaign.fn-CxkhbK9i.js +758 -0
  53. package/dist/collectible.enum-6Syq-vQ6.js +19 -0
  54. package/dist/{collection.fn-CAEP7YxB.js → collection.fn-BUj75Jp2.js} +2 -2
  55. package/dist/dto-8wODhIIC.js +214 -0
  56. package/dist/{effect-Dt7rXOBy.js → effect-BEZEjcJu.js} +9 -9
  57. package/dist/email-addresses-PwjkdYYD.js +705 -0
  58. package/dist/{export-CyioiboQ.js → export-BB-0vgwy.js} +5 -5
  59. package/dist/{helper-FA_9AhGV.js → helper-DOt8-wns.js} +1 -1
  60. package/dist/{index-DLN4Kzz_.js → index-B1qUjniH.js} +1 -1
  61. package/dist/index-BTMIZz4v.js +44 -0
  62. package/dist/{index-igxrd5jC.js → index-By-GlmG7.js} +1500 -1479
  63. package/dist/index-C7zBkoZ4.js +115 -0
  64. package/dist/{index-CyNdsVrw.js → index-CNlHabtk.js} +1 -1
  65. package/dist/{index-DbbO3wip.js → index-CXGiIgdK.js} +48 -4
  66. package/dist/{index-C20XBD7G.js → index-Cjn1LVjC.js} +2192 -931
  67. package/dist/index-CpfUrdgw.js +29000 -0
  68. package/dist/index-CsaQJMAR.js +66 -0
  69. package/dist/index-DZuEmMyY.js +54 -0
  70. package/dist/{index-CCdXvb92.js → index-D_zwqIhq.js} +1 -1
  71. package/dist/index-DabUEw_c.js +32 -0
  72. package/dist/{index-BiFueJiF.js → index-X-FfC49l.js} +258 -192
  73. package/dist/index-vh86FiIQ.js +10 -0
  74. package/dist/{index.esm2017-Dl_CdTcK.js → index.esm2017-DJOUiVjR.js} +33 -33
  75. package/dist/loading-aCWVsOPY.js +71 -0
  76. package/dist/{membership-DFiY8aVd.js → membership-1etsHC5G.js} +54 -46
  77. package/dist/money-DzWRURZ5.js +15 -0
  78. package/dist/number-BxIQO1i3.js +12 -0
  79. package/dist/objectid-DjhmYkn-.js +145 -0
  80. package/dist/{loading-CZ0fiViM.js → plugins-CSPFAU50.js} +2990 -3062
  81. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  82. package/dist/reward-Bh4Li9f0.js +36 -0
  83. package/dist/{rule-C3e1xTqN.js → rule-CHTTTUFB.js} +180 -177
  84. package/dist/{rule-builder-MEVb_AiZ.js → rule-builder-OHfUJTIA.js} +1 -1
  85. package/dist/style.css +1 -1
  86. package/dist/{template-C2OKWd_e.js → template-ZGxXqkaC.js} +5 -5
  87. package/dist/trigger-Ogu5FDs0.js +144 -0
  88. package/dist/user-DBuU81tO.js +54 -0
  89. package/dist/{vue-i18n-CjxDUnX6.js → vue-i18n-CKpKQ6iE.js} +216 -216
  90. package/dist/{xlsx-CtXdl3ls.js → xlsx-DJDZBIeg.js} +1 -1
  91. package/package.json +9 -7
  92. package/dist/Analytic-C_ZFR5jh.js +0 -622
  93. package/dist/Card-C7dUFJKe.js +0 -825
  94. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-Bgl90veU.js +0 -2813
  95. package/dist/Marketing-BaqZUeVI.js +0 -316
  96. package/dist/MemberList-B9cutmEh.js +0 -1733
  97. package/dist/MemberTransactions-DRHA7AOF.js +0 -38
  98. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BHCoDSTg.js +0 -1753
  99. package/dist/Segment-Dj8nc3AE.js +0 -437
  100. package/dist/Store-CJ3wcohQ.js +0 -1511
  101. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-wXUTfQQF.js +0 -890
  102. package/dist/Voucher-BbTLt8Pt.js +0 -490
  103. package/dist/dto-CRJma6eX.js +0 -2770
  104. package/dist/index-B1e0LtDe.js +0 -99
  105. package/dist/index-Be2ZYDy_.js +0 -298
  106. package/dist/index-CDkITvze.js +0 -762
  107. package/dist/index-CuvNtC_M.js +0 -61
  108. package/dist/index-DPP5F3bT.js +0 -206
  109. package/dist/index-Dbo3DDwp.js +0 -29193
  110. package/dist/money-D8hUEfP4.js +0 -15
  111. package/dist/number-DL3GAeVt.js +0 -12
  112. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,113 +1,66 @@
1
- import { defineComponent as V, ref as G, resolveComponent as s, openBlock as p, createBlock as O, unref as I, withCtx as g, renderSlot as L, createElementBlock as d, toDisplayString as u, createCommentVNode as H, createVNode as h, normalizeClass as x, createElementVNode as k, Fragment as Y, renderList as j } from "vue";
2
- import { z as e, F as c, m as f } from "./loading-CZ0fiViM.js";
3
- import "./index-igxrd5jC.js";
4
- import { R as t } from "./rule-builder-MEVb_AiZ.js";
5
- import { i as o } from "./helper-FA_9AhGV.js";
6
- import { b as K, c as W } from "./index-DPP5F3bT.js";
7
- const X = {
8
- key: 0,
9
- class: "fm-typo-en-body-lg-400 mb-4"
10
- }, q = {
11
- key: 1,
12
- class: "fm-typo-en-body-lg-400"
13
- }, z = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, _e = /* @__PURE__ */ V({
14
- __name: "CustomSelect",
15
- props: {
16
- label: {
17
- type: String,
18
- required: !1
19
- },
20
- placeholder: {
21
- type: String,
22
- required: !1
23
- },
24
- items: {
25
- type: Object,
26
- required: !0
27
- },
28
- modelValue: {
29
- type: Object
30
- },
31
- zIndex: {
32
- type: Number
33
- },
34
- multiselect: {
35
- type: Boolean
36
- }
1
+ import { z as e, F as n, m as o } from "./plugins-CSPFAU50.js";
2
+ import { z as v, A as E, B as O, D as I, E as p } from "./index-Cjn1LVjC.js";
3
+ import { c as L } from "./index-By-GlmG7.js";
4
+ import { R as t } from "./rule-builder-OHfUJTIA.js";
5
+ import { i } from "./helper-DOt8-wns.js";
6
+ import { a as r } from "./index-DZuEmMyY.js";
7
+ const h = {
8
+ collectionName: "AuditLogs",
9
+ transform: {
10
+ _id: "oid",
11
+ business: "oid",
12
+ timestamp: "date"
37
13
  },
38
- emits: ["update:model-value"],
39
- setup(n, { emit: w }) {
40
- const _ = w, m = G(!1);
41
- return (v, b) => {
42
- const N = s("FmIcon"), U = s("FmField"), F = s("FmMenuItem"), B = s("FmPopover");
43
- return p(), O(B, {
44
- "show-popover": I(m),
45
- onPopoverChanged: b[0] || (b[0] = (a) => m.value = a),
46
- "z-index": n.zIndex
47
- }, {
48
- "popover-button": g(() => [
49
- L(v.$slots, "popover-button", {}, () => [
50
- n.label ? (p(), d("div", X, u(n.label), 1)) : H("", !0),
51
- h(U, null, {
52
- append: g(() => [
53
- L(v.$slots, "append"),
54
- h(N, {
55
- name: I(m) ? "expand_less" : "expand_more",
56
- size: "md",
57
- color: "black"
58
- }, null, 8, ["name"])
59
- ]),
60
- default: g(() => {
61
- var a;
62
- return [
63
- n.multiselect ? (p(), d("div", q, u(n.items.filter((i) => {
64
- var r;
65
- return (r = n.modelValue) == null ? void 0 : r.includes(i.value);
66
- }).map((i) => i.label).join(", ")), 1)) : (p(), d("div", {
67
- key: 0,
68
- class: x(["fm-typo-en-body-lg-400", {
69
- "text-fm-color-typo-secondary": !n.items.find(
70
- (i) => i.value == n.modelValue
71
- )
72
- }])
73
- }, u(((a = n.items.find((i) => i.value == n.modelValue)) == null ? void 0 : a.label) || n.placeholder), 3))
74
- ];
75
- }),
76
- _: 3
77
- })
78
- ])
79
- ]),
80
- default: g(() => [
81
- k("div", z, [
82
- (p(!0), d(Y, null, j(n.items, (a) => {
83
- var i, r;
84
- return p(), O(F, {
85
- class: x(`${n.multiselect ? (i = n.modelValue) != null && i.some((l) => l == a.value) ? "bg-fm-color-system-warning-100" : "" : n.modelValue == a.value}`),
86
- "has-checkbox": n.multiselect,
87
- key: a.value,
88
- "model-value": n.multiselect ? (r = n.modelValue) == null ? void 0 : r.some((l) => l == a.value) : n.modelValue == a.value,
89
- label: a.label,
90
- onClick: (l) => {
91
- var E;
92
- if (l.stopPropagation(), !n.multiselect)
93
- m.value = !1, _("update:model-value", a.value);
94
- else {
95
- const P = (E = n.modelValue) == null ? void 0 : E.some((y) => y == a.value);
96
- _(
97
- "update:model-value",
98
- P ? (n.modelValue ?? []).filter((y) => y !== a.value) : [...n.modelValue ?? [], a.value]
99
- );
100
- }
101
- }
102
- }, null, 8, ["class", "has-checkbox", "model-value", "label", "onClick"]);
103
- }), 128))
104
- ])
105
- ]),
106
- _: 3
107
- }, 8, ["show-popover", "z-index"]);
108
- };
14
+ lookups: {
15
+ business: {
16
+ as: "pf_business",
17
+ fromCollection: "Businesses"
18
+ }
109
19
  }
110
- }), ve = {
20
+ }, T = e.enum([
21
+ "GET",
22
+ "POST",
23
+ "PUT",
24
+ "PATCH",
25
+ "DELETE",
26
+ "OPTIONS",
27
+ "HEAD",
28
+ "ALL"
29
+ ]), R = e.enum([
30
+ "CAMPAIGN",
31
+ "LOCATION",
32
+ "MARKETING MATERIALS",
33
+ "MEMBERSHIP",
34
+ "STORE",
35
+ "TRANSACTION",
36
+ "SETTINGS",
37
+ "SEGMENTATION",
38
+ "USER"
39
+ ]), C = e.object({
40
+ httpMethod: T,
41
+ url: e.string().min(1),
42
+ userAgent: e.string(),
43
+ host: e.string().min(1),
44
+ params: e.object({}).passthrough().nullish(),
45
+ query: e.object({}).passthrough().nullish(),
46
+ body: e.object({}).passthrough().nullish()
47
+ }), x = e.object({
48
+ statusCode: e.number().int().min(100).max(599),
49
+ body: e.object({}).passthrough().nullish()
50
+ });
51
+ e.object({
52
+ _id: n,
53
+ user: e.string().length(28),
54
+ userName: e.string().min(1),
55
+ userPhoneNumber: e.string().refine((a) => v(a)).nullish(),
56
+ moduleType: R,
57
+ business: n.nullish(),
58
+ clientIp: e.string().nullish(),
59
+ timestamp: e.string().datetime(),
60
+ request: C,
61
+ response: x
62
+ }).describe(o.describe(h));
63
+ const oe = {
111
64
  PROMOTION: {
112
65
  name: "Promotion Template",
113
66
  description: "Promotion template for campaign creation.",
@@ -160,26 +113,6 @@ const X = {
160
113
  type: "effect"
161
114
  }
162
115
  ]
163
- },
164
- {
165
- name: "connect.template.voucher_detail",
166
- fields: [
167
- {
168
- label: "connect.template.voucher_name",
169
- property: "configs.name",
170
- type: "text"
171
- },
172
- {
173
- label: "connect.template.voucher_description",
174
- property: "configs.description",
175
- type: "textarea"
176
- },
177
- {
178
- label: "Voucher Image",
179
- property: "configs.image",
180
- type: "image"
181
- }
182
- ]
183
116
  }
184
117
  ]
185
118
  },
@@ -522,7 +455,7 @@ const X = {
522
455
  // },
523
456
  hideInApp: !0
524
457
  },
525
- configs: o("VOUCHER", {
458
+ configs: i("VOUCHER", {
526
459
  name: "",
527
460
  business: null,
528
461
  noCampaign: !1
@@ -1236,7 +1169,9 @@ const X = {
1236
1169
  amount: 1
1237
1170
  },
1238
1171
  config: {
1239
- validityOption: {}
1172
+ validityOption: {
1173
+ validForDay: 1
1174
+ }
1240
1175
  }
1241
1176
  }
1242
1177
  }
@@ -1460,7 +1395,7 @@ const X = {
1460
1395
  rewards: []
1461
1396
  }
1462
1397
  },
1463
- configs: o("GAME", {
1398
+ configs: i("GAME", {
1464
1399
  name: "Token",
1465
1400
  business: null,
1466
1401
  noCampaign: !1
@@ -1701,27 +1636,27 @@ const X = {
1701
1636
  type: "timeframe"
1702
1637
  }
1703
1638
  },
1704
- configs: o("STAMP", {
1639
+ configs: i("STAMP", {
1705
1640
  business: null,
1706
1641
  noCampaign: !1
1707
1642
  })
1708
1643
  }
1709
1644
  }
1710
1645
  };
1711
- t.scaffoldGroup(), o("STAMP", {
1646
+ t.scaffoldGroup(), i("STAMP", {
1712
1647
  business: null,
1713
1648
  noCampaign: !1
1714
1649
  });
1715
1650
  ({
1716
1651
  ...t.scaffoldGroup()
1717
- }, o("VOUCHER", {
1652
+ }, i("VOUCHER", {
1718
1653
  name: "",
1719
1654
  business: null,
1720
1655
  noCampaign: !1
1721
1656
  }));
1722
1657
  ({
1723
1658
  ...t.scaffoldGroup()
1724
- }, o("VOUCHER", {
1659
+ }, i("VOUCHER", {
1725
1660
  name: "",
1726
1661
  business: null,
1727
1662
  noCampaign: !1
@@ -1764,7 +1699,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1764
1699
  });
1765
1700
  ({
1766
1701
  ...t.scaffoldGroup()
1767
- }, o("VOUCHER", {
1702
+ }, i("VOUCHER", {
1768
1703
  name: "",
1769
1704
  business: null,
1770
1705
  noCampaign: !1
@@ -1810,14 +1745,14 @@ t.setRuleToGroup(
1810
1745
  "&&"
1811
1746
  )
1812
1747
  );
1813
- t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
1748
+ t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1814
1749
  name: "Token",
1815
1750
  business: null,
1816
1751
  noCampaign: !1
1817
1752
  });
1818
1753
  ({
1819
1754
  ...t.scaffoldGroup()
1820
- }, o("VOUCHER", {
1755
+ }, i("VOUCHER", {
1821
1756
  name: "",
1822
1757
  business: null,
1823
1758
  noCampaign: !1
@@ -1846,7 +1781,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1846
1781
  ],
1847
1782
  "&&"
1848
1783
  )
1849
- ]), o("VOUCHER", {
1784
+ ]), i("VOUCHER", {
1850
1785
  name: "",
1851
1786
  business: null,
1852
1787
  noCampaign: !1
@@ -1869,7 +1804,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1869
1804
  ({
1870
1805
  ...t.scaffoldGroup()
1871
1806
  });
1872
- const Q = e.enum([
1807
+ const S = e.enum([
1873
1808
  "MEMBER_REWARD",
1874
1809
  "PAID_LOYALTY",
1875
1810
  "COLLECT_FEEDBACK",
@@ -1879,7 +1814,7 @@ const Q = e.enum([
1879
1814
  "BROADCAST",
1880
1815
  "BIRTHDAY",
1881
1816
  "GAME"
1882
- ]), J = e.enum([
1817
+ ]), D = e.enum([
1883
1818
  "text",
1884
1819
  "number",
1885
1820
  "textarea",
@@ -1906,95 +1841,95 @@ const Q = e.enum([
1906
1841
  "rule_feedback",
1907
1842
  "rule_birthday",
1908
1843
  "promotion_game_type"
1909
- ]), $ = e.object({
1844
+ ]), A = e.object({
1910
1845
  label: e.string().optional(),
1911
1846
  property: e.string().or(e.any()),
1912
- type: J,
1847
+ type: D,
1913
1848
  extras: e.string().optional(),
1914
1849
  isRuleChildren: e.boolean().optional()
1915
- }), Z = e.object({
1850
+ }), M = e.object({
1916
1851
  name: e.string().optional(),
1917
- fields: e.array($),
1852
+ fields: e.array(A),
1918
1853
  condition: e.object({
1919
1854
  not: e.boolean().optional(),
1920
1855
  property: e.string(),
1921
1856
  value: e.any()
1922
1857
  }).optional()
1923
- }), ee = e.object({
1858
+ }), N = e.object({
1924
1859
  name: e.string(),
1925
- groups: e.array(Z)
1860
+ groups: e.array(M)
1926
1861
  });
1927
1862
  e.object({
1928
- _id: c,
1863
+ _id: n,
1929
1864
  name: e.string(),
1930
1865
  description: e.string().nullish(),
1931
- steps: e.array(ee).min(1),
1932
- intention: e.array(Q),
1866
+ steps: e.array(N).min(1),
1867
+ intention: e.array(S),
1933
1868
  defaultValue: e.any()
1934
1869
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1935
- const te = {
1870
+ const w = {
1936
1871
  collectionName: "Businesses",
1937
1872
  transform: {
1938
1873
  _id: "oid"
1939
1874
  }
1940
1875
  };
1941
1876
  e.object({
1942
- _id: c,
1877
+ _id: n,
1943
1878
  ownerId: e.string(),
1944
1879
  name: e.string(),
1945
1880
  credit: e.number(),
1946
1881
  forceSend: e.boolean().optional()
1947
- }).describe(f.describe(te));
1948
- const D = e.enum(["PHONE"]), ne = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), ae = e.enum(["PENDING", "COMPLETED", "FAILED"]), ie = e.enum([
1882
+ }).describe(o.describe(w));
1883
+ const m = e.enum(["PHONE"]), U = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), F = e.enum(["PENDING", "COMPLETED", "FAILED"]), P = e.enum([
1949
1884
  "General",
1950
1885
  "Otp",
1951
1886
  "Marketing",
1952
1887
  "Ordering",
1953
1888
  "MemberInvitation"
1954
- ]), oe = e.object({
1955
- type: D
1956
- }), T = oe.extend({
1957
- type: e.literal(D.enum.PHONE),
1958
- provider: ne,
1959
- usage: ie.optional()
1960
- }), pe = {
1889
+ ]), B = e.object({
1890
+ type: m
1891
+ }), s = B.extend({
1892
+ type: e.literal(m.enum.PHONE),
1893
+ provider: U,
1894
+ usage: P.optional()
1895
+ }), G = {
1961
1896
  collectionName: "Notifications",
1962
1897
  transform: { _id: "oid", business: "oid" }
1963
1898
  };
1964
1899
  e.object({
1965
- _id: c,
1966
- business: c,
1900
+ _id: n,
1901
+ business: n,
1967
1902
  target: e.string(),
1968
1903
  title: e.string().optional(),
1969
1904
  message: e.string(),
1970
- option: T,
1971
- status: ae,
1905
+ option: s,
1906
+ status: F,
1972
1907
  ref: e.string().optional()
1973
- }).describe(f.describe(pe));
1908
+ }).describe(o.describe(G));
1974
1909
  e.object({
1975
1910
  target: e.string(),
1976
1911
  title: e.string().optional(),
1977
1912
  message: e.string(),
1978
- option: T,
1913
+ option: s,
1979
1914
  ref: e.string().optional()
1980
1915
  });
1981
1916
  e.object({
1982
1917
  phone: e.string(),
1983
1918
  message: e.string()
1984
1919
  });
1985
- const C = e.object({
1920
+ const c = e.object({
1986
1921
  name: e.string(),
1987
1922
  address: e.string()
1988
- }), re = e.object({
1923
+ }), H = e.object({
1989
1924
  filename: e.string(),
1990
1925
  content: e.instanceof(Uint8Array)
1991
1926
  });
1992
1927
  e.object({
1993
- from: C,
1994
- to: e.array(C),
1928
+ from: c.optional(),
1929
+ to: e.array(c),
1995
1930
  subject: e.string(),
1996
1931
  html: e.string().optional(),
1997
- attachments: e.array(re).optional()
1932
+ attachments: e.array(H).optional()
1998
1933
  });
1999
1934
  e.object({
2000
1935
  subject: e.string(),
@@ -2027,15 +1962,15 @@ e.object({
2027
1962
  claimIds: e.array(e.string()),
2028
1963
  billId: e.string()
2029
1964
  });
2030
- var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
2031
- e.nativeEnum(S);
1965
+ var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
1966
+ e.nativeEnum(g);
2032
1967
  e.enum(["manage", "create", "read", "update", "delete"]);
2033
1968
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2034
1969
  e.enum(["quota"]);
2035
- var R = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(R || {});
2036
- e.nativeEnum(R);
1970
+ var d = /* @__PURE__ */ ((a) => (a.marketing = "business::marketing", a.campaign = "business::campaign", a.counter = "business::counter", a.permission = "business::permission", a.role = "business::role", a))(d || {});
1971
+ e.nativeEnum(d);
2037
1972
  e.enum(["restaurant"]);
2038
- const le = e.object({
1973
+ const V = e.object({
2039
1974
  label: e.string(),
2040
1975
  subject: e.union([e.string(), e.array(e.string())]),
2041
1976
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2045,41 +1980,41 @@ const le = e.object({
2045
1980
  reason: e.string().optional()
2046
1981
  });
2047
1982
  e.object({
2048
- _id: c,
1983
+ _id: n,
2049
1984
  businessId: e.string(),
2050
1985
  userId: e.string(),
2051
1986
  email: e.string().nullish(),
2052
1987
  phoneNo: e.string().nullish(),
2053
- permissions: e.array(e.lazy(() => le))
1988
+ permissions: e.array(e.lazy(() => V))
2054
1989
  }).describe(
2055
- f.describe({
1990
+ o.describe({
2056
1991
  collectionName: "PermissionUsers",
2057
1992
  transform: {
2058
1993
  _id: "oid"
2059
1994
  }
2060
1995
  })
2061
1996
  );
2062
- const M = e.object({
1997
+ const y = e.object({
2063
1998
  userId: e.string(),
2064
1999
  level: e.number(),
2065
2000
  role: e.string().optional(),
2066
2001
  businessId: e.string().optional(),
2067
2002
  restaurantId: e.string().optional()
2068
- }), ce = e.function().args(e.any(), M).returns(e.boolean()), me = e.function().args(M).returns(e.promise(e.array(e.any())));
2003
+ }), k = e.function().args(e.any(), y).returns(e.boolean()), j = e.function().args(y).returns(e.promise(e.array(e.any())));
2069
2004
  e.object({
2070
- isAdmin: ce,
2071
- getRules: me
2005
+ isAdmin: k,
2006
+ getRules: j
2072
2007
  });
2073
2008
  e.object({
2074
- transactions: e.array(K),
2075
- collections: e.array(W)
2009
+ transactions: e.array(E),
2010
+ collections: e.array(O)
2076
2011
  });
2077
- const A = e.enum([
2012
+ const u = e.enum([
2078
2013
  "ROCK_PAPER_SCISSOR"
2079
2014
  ]);
2080
- A.enum.ROCK_PAPER_SCISSOR + "";
2015
+ u.enum.ROCK_PAPER_SCISSOR + "";
2081
2016
  e.object({
2082
- type: A
2017
+ type: u
2083
2018
  });
2084
2019
  e.object({
2085
2020
  host: e.string().url(),
@@ -2106,8 +2041,139 @@ e.object({
2106
2041
  phone: e.string().optional(),
2107
2042
  email: e.string().optional()
2108
2043
  });
2044
+ const Y = e.enum([
2045
+ "PENDING",
2046
+ "SUCCESS",
2047
+ "FAILED",
2048
+ "RETRYING"
2049
+ ]), K = {
2050
+ collectionName: "WebhookLogs",
2051
+ transform: {
2052
+ _id: "oid",
2053
+ business: "oid"
2054
+ }
2055
+ };
2056
+ e.object({
2057
+ _id: n,
2058
+ business: n,
2059
+ type: e.string(),
2060
+ payload: e.record(e.any()),
2061
+ status: Y,
2062
+ response: e.any().optional(),
2063
+ error: e.string().optional()
2064
+ }).describe(o.describe(K));
2065
+ const W = e.enum(["AUTO", "MANUAL"]);
2066
+ e.enum(["IN_PROGRESS", "COMPLETED"]);
2067
+ const f = e.object({
2068
+ _id: n,
2069
+ name: e.string().min(1, "Name is required").max(50),
2070
+ type: W,
2071
+ event: I.optional()
2072
+ }), X = e.object({
2073
+ from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2074
+ to: e.number().int("Must be integer").nullish()
2075
+ }).superRefine((a, b) => {
2076
+ a.from && a.to && a.from > a.to && b.addIssue({
2077
+ code: "custom",
2078
+ message: "Max referral count must be more than min referral count"
2079
+ });
2080
+ }), q = e.object({
2081
+ threshold: X,
2082
+ rewards: e.array(n),
2083
+ pf_reward: e.array(r).optional()
2084
+ }), l = e.object({
2085
+ id: e.string(),
2086
+ name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2087
+ rule: L.optional(),
2088
+ rewards: e.array(q)
2089
+ }), Q = {
2090
+ collectionName: "ReferralRecords",
2091
+ transform: {
2092
+ _id: "oid",
2093
+ business: "oid",
2094
+ referer: "oid",
2095
+ referee: "oid",
2096
+ refereeReward: "oid"
2097
+ }
2098
+ }, J = e.object({
2099
+ completedAt: e.coerce.date(),
2100
+ criteria: n,
2101
+ ref: e.string()
2102
+ }), z = e.object({
2103
+ _id: n,
2104
+ business: n,
2105
+ referer: n,
2106
+ referee: n,
2107
+ criteria: e.array(f),
2108
+ reward: e.array(l),
2109
+ refereeReward: e.array(n).optional(),
2110
+ criteria_progress: e.array(J),
2111
+ status: e.string(),
2112
+ pf_referer: p.optional(),
2113
+ pf_referee: p.optional(),
2114
+ pf_refereeReward: e.array(r).optional()
2115
+ }).describe(o.describe(Q));
2116
+ z.pick({
2117
+ _id: !0,
2118
+ business: !0,
2119
+ referer: !0,
2120
+ referee: !0,
2121
+ criteria_progress: !0,
2122
+ criteria: !0
2123
+ }).extend({
2124
+ pf_referee: p.pick({
2125
+ _id: !0,
2126
+ name: !0,
2127
+ phoneNumber: !0,
2128
+ photoUrl: !0
2129
+ })
2130
+ });
2131
+ const Z = {
2132
+ collectionName: "ReferralProgram",
2133
+ transform: {
2134
+ _id: "oid",
2135
+ business: "oid"
2136
+ }
2137
+ }, _ = e.object({
2138
+ _id: n,
2139
+ business: n,
2140
+ term_and_condition: e.string().optional(),
2141
+ refereeReward: e.array(n).optional(),
2142
+ reward: e.array(l),
2143
+ criteria: e.array(f)
2144
+ }).describe(o.describe(Z));
2145
+ e.object({
2146
+ referer: n,
2147
+ referee: n,
2148
+ business: n
2149
+ });
2150
+ e.object({
2151
+ program: _.pick({
2152
+ _id: !0,
2153
+ business: !0,
2154
+ term_and_condition: !0
2155
+ }).extend({
2156
+ reward: l.optional(),
2157
+ pf_refereeReward: e.array(r).optional()
2158
+ }),
2159
+ referralCount: e.number(),
2160
+ successReferralCount: e.number(),
2161
+ referredBy: p.pick({
2162
+ _id: !0,
2163
+ name: !0,
2164
+ phoneNumber: !0,
2165
+ photoUrl: !0
2166
+ }).optional()
2167
+ });
2168
+ _.extend({
2169
+ updateReferralRecord: e.boolean().optional()
2170
+ });
2109
2171
  export {
2110
- Q as F,
2111
- ve as T,
2112
- _e as _
2172
+ S as F,
2173
+ oe as T,
2174
+ q as a,
2175
+ f as b,
2176
+ l as c,
2177
+ T as d,
2178
+ R as e
2113
2179
  };
@@ -0,0 +1,10 @@
1
+ const e = {
2
+ sortBy: "_id",
3
+ descending: !1,
4
+ rowsPerPage: 1e3,
5
+ page: 1,
6
+ rowsNumber: 0
7
+ };
8
+ export {
9
+ e
10
+ };