@feedmepos/mf-connect 0.1.0-beta.6 → 0.1.0-beta.60

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 (118) hide show
  1. package/dist/Analytic-CXegtSEd.js +427 -0
  2. package/dist/{App-C2616cfr.js → App-m9A9s3wd.js} +445 -420
  3. package/dist/AuditLogs-CpUOkyXq.js +1886 -0
  4. package/dist/Bin-m6mPl3FE.js +166 -0
  5. package/dist/{Broadcast-CqSwLTAq.js → Broadcast-DNjHnlPp.js} +56 -54
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DrR9Pmtb.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-cjdNZLkE.js} +6 -8
  7. package/dist/Card-CAvS5aaN.js +896 -0
  8. package/dist/Collections-3C9I2byH.js +459 -0
  9. package/dist/{Credit-CPcLgnsq.js → Credit-DcAmLeMb.js} +36 -34
  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-BUzUIIUW.js +58 -0
  12. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-wGFMCV-y.js +2181 -0
  13. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-D2buK6Dj.js → EffectSheet.vue_vue_type_style_index_0_lang-CIEn1N24.js} +6 -6
  14. package/dist/{Experience-BoBikt-x.js → Experience-GF9yOrlE.js} +32 -30
  15. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-BrPLkFX8.js +118 -0
  16. package/dist/{Game-DR8PyYZa.js → Game-CzBn_Li3.js} +39 -37
  17. package/dist/Index-Bhmkdb4n.js +259 -0
  18. package/dist/Marketing-DlbcOoiN.js +20071 -0
  19. package/dist/Member-CdXG5uEN.js +317 -0
  20. package/dist/MemberList-xIOXAHJf.js +1598 -0
  21. package/dist/MemberTransactions-CsW9vso0.js +45 -0
  22. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DhtIZCjT.js → MessageInput.vue_vue_type_script_setup_true_lang-jtjk9NjI.js} +83 -71
  23. package/dist/{Mission-CMpvz9zN.js → Mission-2UjKrmGe.js} +101 -87
  24. package/dist/Overview-ClittdS6.js +1078 -0
  25. package/dist/{Point-DkZn6p9s.js → Point-BON4g7zE.js} +55 -53
  26. package/dist/{Promotion-B7YzwPc_.js → Promotion-qUEZmmm8.js} +65 -57
  27. package/dist/Queue-DA4glGdE.js +244 -0
  28. package/dist/Record-EUAnp1--.js +340 -0
  29. package/dist/Reward-ChbsdQuW.js +442 -0
  30. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CUFw56sf.js +150 -0
  31. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BKesht7Y.js +1637 -0
  32. package/dist/Segment-DbwFx6vD.js +568 -0
  33. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-lwpYOWMR.js +181 -0
  34. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-BbuOPEGY.js +147 -0
  35. package/dist/Setting-FMTftvlU.js +1931 -0
  36. package/dist/Store-BkUwiBUq.js +1751 -0
  37. package/dist/{StoreRewards-6BzVwZqr.js → StoreRewards-Z8uhK0v1.js} +33 -32
  38. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DwFYJ1Iz.js +943 -0
  39. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-B6cAveco.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-D6mrJp05.js} +1 -1
  40. package/dist/{Tier-CW-46oJS.js → Tier-COCmcJJF.js} +327 -318
  41. package/dist/{Title-CE9rWVdi.js → Title-7qCjbur9.js} +199 -184
  42. package/dist/{Transaction-B21RrC4M.js → Transaction-9FS_K2hv.js} +2 -2
  43. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Fx-J2gcK.js +130 -0
  44. package/dist/Voucher-Dx70JAgw.js +354 -0
  45. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CECJsKRJ.js +419 -0
  46. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-BiVZwBuG.js → ZodTextField.vue_vue_type_script_setup_true_lang-Bne_nxYS.js} +1 -1
  47. package/dist/{app-CjhXHUQv.js → app-CWKpKW78.js} +1 -1
  48. package/dist/app-q6W6-faT.js +7059 -0
  49. package/dist/app.js +1 -1
  50. package/dist/{business-aHhRUXc0.js → business-D5AQBRGS.js} +1 -1
  51. package/dist/campaign-BGiM8ccX.js +1810 -0
  52. package/dist/{campaign-DH9NUNf_.js → campaign-v8MAkDo-.js} +2 -2
  53. package/dist/campaign.enum-Dro6UEcE.js +20 -0
  54. package/dist/campaign.fn-DsJUr-gE.js +758 -0
  55. package/dist/collectible.enum-BH9pX7PE.js +19 -0
  56. package/dist/{collection.fn-CYlsA-kW.js → collection.fn-CHiRShK_.js} +2 -2
  57. package/dist/dto-CeX9egUp.js +214 -0
  58. package/dist/{effect-LSc9YanX.js → effect-DtJQE1cD.js} +9 -9
  59. package/dist/email-addresses-DKOsgzML.js +705 -0
  60. package/dist/{export-Cf0-C5Ly.js → export-Daiv_zH9.js} +5 -5
  61. package/dist/{helper-CiZpeMCM.js → helper-B5Emawnj.js} +1 -1
  62. package/dist/index-9WBy0L7U.js +54 -0
  63. package/dist/{index-D6cEOHP4.js → index-BSHuLDD0.js} +1501 -1480
  64. package/dist/{index-BVb5-Ht8.js → index-CUl_8M_c.js} +259 -173
  65. package/dist/{index-gxwjKu3-.js → index-CgCcvX_L.js} +2212 -871
  66. package/dist/index-CsaQJMAR.js +66 -0
  67. package/dist/{index-D_83JP2i.js → index-DrWrGAHJ.js} +48 -4
  68. package/dist/index-DteeKoFo.js +115 -0
  69. package/dist/{index-DW3PRjPL.js → index-Dw2RtHKR.js} +1 -1
  70. package/dist/{index-kPhrD63q.js → index-ICbXrXiP.js} +1 -1
  71. package/dist/index-Xwc07I54.js +29000 -0
  72. package/dist/{index-DtsDOuDx.js → index-ZBSI6ViG.js} +24 -21
  73. package/dist/index-g9NNHS8s.js +32 -0
  74. package/dist/index-p6F08hhh.js +44 -0
  75. package/dist/index-vh86FiIQ.js +10 -0
  76. package/dist/{index.esm2017-B7oVYIbY.js → index.esm2017-B-SDA6Y2.js} +121 -121
  77. package/dist/loading-CDbkBsRr.js +71 -0
  78. package/dist/{membership-Dw1ylJ9Y.js → membership-B8uwuntJ.js} +54 -46
  79. package/dist/money-DRKB3Rpe.js +15 -0
  80. package/dist/number-DtyC1DJU.js +12 -0
  81. package/dist/objectid-wGrq9P1h.js +145 -0
  82. package/dist/{loading-7yq1tinq.js → plugins-DKNh-lBz.js} +3871 -3943
  83. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  84. package/dist/reward-C2jv5dmJ.js +36 -0
  85. package/dist/{rule-C0Q_SHow.js → rule-C5AMTchR.js} +180 -177
  86. package/dist/{rule-builder-iu17XIof.js → rule-builder-DLOGHT1l.js} +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/{template-CyOanTMu.js → template-C-fz1DXI.js} +5 -5
  89. package/dist/trigger-DTErX60D.js +144 -0
  90. package/dist/user-CVRoQGCF.js +54 -0
  91. package/dist/{vue-i18n-B0fLJH7a.js → vue-i18n-CxMxiW_u.js} +366 -366
  92. package/dist/{xlsx-BYO_bB9J.js → xlsx-CARvMJN_.js} +1 -1
  93. package/package.json +10 -6
  94. package/dist/Analytic-muDf0oMG.js +0 -622
  95. package/dist/Card-bhLoK0ZV.js +0 -825
  96. package/dist/Collections-DjtsAiol.js +0 -453
  97. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-U_QZneS6.js +0 -2813
  98. package/dist/Marketing-Dny2nMUl.js +0 -316
  99. package/dist/Member-CP_smyk8.js +0 -69
  100. package/dist/MemberList-CR3eYI9p.js +0 -1733
  101. package/dist/MemberTransactions-RTx_lKFb.js +0 -38
  102. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Cs67_GLE.js +0 -1753
  103. package/dist/Segment-Bb4gHt5V.js +0 -437
  104. package/dist/Setting-Xj0AVzh3.js +0 -1901
  105. package/dist/Store-BWRHQ6Ie.js +0 -1511
  106. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BsFnT8BS.js +0 -890
  107. package/dist/Voucher-KK9fBI0u.js +0 -490
  108. package/dist/app-Dvf_JNMf.js +0 -5764
  109. package/dist/dto-DArfyZAI.js +0 -2770
  110. package/dist/index-Bi_LGEtY.js +0 -99
  111. package/dist/index-CiQDG7Cm.js +0 -762
  112. package/dist/index-CuvNtC_M.js +0 -61
  113. package/dist/index-DQfjSSMF.js +0 -206
  114. package/dist/index-DcxssxPi.js +0 -29193
  115. package/dist/index-DqJVH2kv.js +0 -298
  116. package/dist/money-CPd0XTNv.js +0 -15
  117. package/dist/number-BgXY4un8.js +0 -12
  118. 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-7yq1tinq.js";
3
- import "./index-D6cEOHP4.js";
4
- import { R as t } from "./rule-builder-iu17XIof.js";
5
- import { i as o } from "./helper-CiZpeMCM.js";
6
- import { b as K, c as W } from "./index-DQfjSSMF.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-DKNh-lBz.js";
2
+ import { A as v, B as E, D as O, E as I, G as p } from "./index-CgCcvX_L.js";
3
+ import { c as L } from "./index-BSHuLDD0.js";
4
+ import { R as t } from "./rule-builder-DLOGHT1l.js";
5
+ import { i } from "./helper-B5Emawnj.js";
6
+ import { a as r } from "./index-9WBy0L7U.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.",
@@ -502,7 +455,7 @@ const X = {
502
455
  // },
503
456
  hideInApp: !0
504
457
  },
505
- configs: o("VOUCHER", {
458
+ configs: i("VOUCHER", {
506
459
  name: "",
507
460
  business: null,
508
461
  noCampaign: !1
@@ -1216,7 +1169,9 @@ const X = {
1216
1169
  amount: 1
1217
1170
  },
1218
1171
  config: {
1219
- validityOption: {}
1172
+ validityOption: {
1173
+ validForDay: 1
1174
+ }
1220
1175
  }
1221
1176
  }
1222
1177
  }
@@ -1440,7 +1395,7 @@ const X = {
1440
1395
  rewards: []
1441
1396
  }
1442
1397
  },
1443
- configs: o("GAME", {
1398
+ configs: i("GAME", {
1444
1399
  name: "Token",
1445
1400
  business: null,
1446
1401
  noCampaign: !1
@@ -1681,27 +1636,27 @@ const X = {
1681
1636
  type: "timeframe"
1682
1637
  }
1683
1638
  },
1684
- configs: o("STAMP", {
1639
+ configs: i("STAMP", {
1685
1640
  business: null,
1686
1641
  noCampaign: !1
1687
1642
  })
1688
1643
  }
1689
1644
  }
1690
1645
  };
1691
- t.scaffoldGroup(), o("STAMP", {
1646
+ t.scaffoldGroup(), i("STAMP", {
1692
1647
  business: null,
1693
1648
  noCampaign: !1
1694
1649
  });
1695
1650
  ({
1696
1651
  ...t.scaffoldGroup()
1697
- }, o("VOUCHER", {
1652
+ }, i("VOUCHER", {
1698
1653
  name: "",
1699
1654
  business: null,
1700
1655
  noCampaign: !1
1701
1656
  }));
1702
1657
  ({
1703
1658
  ...t.scaffoldGroup()
1704
- }, o("VOUCHER", {
1659
+ }, i("VOUCHER", {
1705
1660
  name: "",
1706
1661
  business: null,
1707
1662
  noCampaign: !1
@@ -1744,7 +1699,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1744
1699
  });
1745
1700
  ({
1746
1701
  ...t.scaffoldGroup()
1747
- }, o("VOUCHER", {
1702
+ }, i("VOUCHER", {
1748
1703
  name: "",
1749
1704
  business: null,
1750
1705
  noCampaign: !1
@@ -1790,14 +1745,14 @@ t.setRuleToGroup(
1790
1745
  "&&"
1791
1746
  )
1792
1747
  );
1793
- t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
1748
+ t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1794
1749
  name: "Token",
1795
1750
  business: null,
1796
1751
  noCampaign: !1
1797
1752
  });
1798
1753
  ({
1799
1754
  ...t.scaffoldGroup()
1800
- }, o("VOUCHER", {
1755
+ }, i("VOUCHER", {
1801
1756
  name: "",
1802
1757
  business: null,
1803
1758
  noCampaign: !1
@@ -1826,7 +1781,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1826
1781
  ],
1827
1782
  "&&"
1828
1783
  )
1829
- ]), o("VOUCHER", {
1784
+ ]), i("VOUCHER", {
1830
1785
  name: "",
1831
1786
  business: null,
1832
1787
  noCampaign: !1
@@ -1849,7 +1804,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1849
1804
  ({
1850
1805
  ...t.scaffoldGroup()
1851
1806
  });
1852
- const Q = e.enum([
1807
+ const S = e.enum([
1853
1808
  "MEMBER_REWARD",
1854
1809
  "PAID_LOYALTY",
1855
1810
  "COLLECT_FEEDBACK",
@@ -1859,7 +1814,7 @@ const Q = e.enum([
1859
1814
  "BROADCAST",
1860
1815
  "BIRTHDAY",
1861
1816
  "GAME"
1862
- ]), J = e.enum([
1817
+ ]), D = e.enum([
1863
1818
  "text",
1864
1819
  "number",
1865
1820
  "textarea",
@@ -1886,95 +1841,95 @@ const Q = e.enum([
1886
1841
  "rule_feedback",
1887
1842
  "rule_birthday",
1888
1843
  "promotion_game_type"
1889
- ]), $ = e.object({
1844
+ ]), A = e.object({
1890
1845
  label: e.string().optional(),
1891
1846
  property: e.string().or(e.any()),
1892
- type: J,
1847
+ type: D,
1893
1848
  extras: e.string().optional(),
1894
1849
  isRuleChildren: e.boolean().optional()
1895
- }), Z = e.object({
1850
+ }), M = e.object({
1896
1851
  name: e.string().optional(),
1897
- fields: e.array($),
1852
+ fields: e.array(A),
1898
1853
  condition: e.object({
1899
1854
  not: e.boolean().optional(),
1900
1855
  property: e.string(),
1901
1856
  value: e.any()
1902
1857
  }).optional()
1903
- }), ee = e.object({
1858
+ }), N = e.object({
1904
1859
  name: e.string(),
1905
- groups: e.array(Z)
1860
+ groups: e.array(M)
1906
1861
  });
1907
1862
  e.object({
1908
- _id: c,
1863
+ _id: n,
1909
1864
  name: e.string(),
1910
1865
  description: e.string().nullish(),
1911
- steps: e.array(ee).min(1),
1912
- intention: e.array(Q),
1866
+ steps: e.array(N).min(1),
1867
+ intention: e.array(S),
1913
1868
  defaultValue: e.any()
1914
1869
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1915
- const te = {
1870
+ const w = {
1916
1871
  collectionName: "Businesses",
1917
1872
  transform: {
1918
1873
  _id: "oid"
1919
1874
  }
1920
1875
  };
1921
1876
  e.object({
1922
- _id: c,
1877
+ _id: n,
1923
1878
  ownerId: e.string(),
1924
1879
  name: e.string(),
1925
1880
  credit: e.number(),
1926
1881
  forceSend: e.boolean().optional()
1927
- }).describe(f.describe(te));
1928
- 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([
1929
1884
  "General",
1930
1885
  "Otp",
1931
1886
  "Marketing",
1932
1887
  "Ordering",
1933
1888
  "MemberInvitation"
1934
- ]), oe = e.object({
1935
- type: D
1936
- }), T = oe.extend({
1937
- type: e.literal(D.enum.PHONE),
1938
- provider: ne,
1939
- usage: ie.optional()
1940
- }), pe = {
1889
+ ]), G = e.object({
1890
+ type: m
1891
+ }), s = G.extend({
1892
+ type: e.literal(m.enum.PHONE),
1893
+ provider: U,
1894
+ usage: P.optional()
1895
+ }), B = {
1941
1896
  collectionName: "Notifications",
1942
1897
  transform: { _id: "oid", business: "oid" }
1943
1898
  };
1944
1899
  e.object({
1945
- _id: c,
1946
- business: c,
1900
+ _id: n,
1901
+ business: n,
1947
1902
  target: e.string(),
1948
1903
  title: e.string().optional(),
1949
1904
  message: e.string(),
1950
- option: T,
1951
- status: ae,
1905
+ option: s,
1906
+ status: F,
1952
1907
  ref: e.string().optional()
1953
- }).describe(f.describe(pe));
1908
+ }).describe(o.describe(B));
1954
1909
  e.object({
1955
1910
  target: e.string(),
1956
1911
  title: e.string().optional(),
1957
1912
  message: e.string(),
1958
- option: T,
1913
+ option: s,
1959
1914
  ref: e.string().optional()
1960
1915
  });
1961
1916
  e.object({
1962
1917
  phone: e.string(),
1963
1918
  message: e.string()
1964
1919
  });
1965
- const C = e.object({
1966
- name: e.string(),
1920
+ const c = e.object({
1921
+ name: e.string().optional(),
1967
1922
  address: e.string()
1968
- }), re = e.object({
1923
+ }), H = e.object({
1969
1924
  filename: e.string(),
1970
1925
  content: e.instanceof(Uint8Array)
1971
1926
  });
1972
1927
  e.object({
1973
- from: C,
1974
- to: e.array(C),
1928
+ from: c.optional(),
1929
+ to: e.array(c),
1975
1930
  subject: e.string(),
1976
1931
  html: e.string().optional(),
1977
- attachments: e.array(re).optional()
1932
+ attachments: e.array(H).optional()
1978
1933
  });
1979
1934
  e.object({
1980
1935
  subject: e.string(),
@@ -2007,15 +1962,15 @@ e.object({
2007
1962
  claimIds: e.array(e.string()),
2008
1963
  billId: e.string()
2009
1964
  });
2010
- var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
2011
- 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);
2012
1967
  e.enum(["manage", "create", "read", "update", "delete"]);
2013
1968
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2014
1969
  e.enum(["quota"]);
2015
- 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 || {});
2016
- 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);
2017
1972
  e.enum(["restaurant"]);
2018
- const le = e.object({
1973
+ const V = e.object({
2019
1974
  label: e.string(),
2020
1975
  subject: e.union([e.string(), e.array(e.string())]),
2021
1976
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2025,41 +1980,41 @@ const le = e.object({
2025
1980
  reason: e.string().optional()
2026
1981
  });
2027
1982
  e.object({
2028
- _id: c,
1983
+ _id: n,
2029
1984
  businessId: e.string(),
2030
1985
  userId: e.string(),
2031
1986
  email: e.string().nullish(),
2032
1987
  phoneNo: e.string().nullish(),
2033
- permissions: e.array(e.lazy(() => le))
1988
+ permissions: e.array(e.lazy(() => V))
2034
1989
  }).describe(
2035
- f.describe({
1990
+ o.describe({
2036
1991
  collectionName: "PermissionUsers",
2037
1992
  transform: {
2038
1993
  _id: "oid"
2039
1994
  }
2040
1995
  })
2041
1996
  );
2042
- const M = e.object({
1997
+ const y = e.object({
2043
1998
  userId: e.string(),
2044
1999
  level: e.number(),
2045
2000
  role: e.string().optional(),
2046
2001
  businessId: e.string().optional(),
2047
2002
  restaurantId: e.string().optional()
2048
- }), 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())));
2049
2004
  e.object({
2050
- isAdmin: ce,
2051
- getRules: me
2005
+ isAdmin: k,
2006
+ getRules: j
2052
2007
  });
2053
2008
  e.object({
2054
- transactions: e.array(K),
2055
- collections: e.array(W)
2009
+ transactions: e.array(E),
2010
+ collections: e.array(O)
2056
2011
  });
2057
- const A = e.enum([
2012
+ const u = e.enum([
2058
2013
  "ROCK_PAPER_SCISSOR"
2059
2014
  ]);
2060
- A.enum.ROCK_PAPER_SCISSOR + "";
2015
+ u.enum.ROCK_PAPER_SCISSOR + "";
2061
2016
  e.object({
2062
- type: A
2017
+ type: u
2063
2018
  });
2064
2019
  e.object({
2065
2020
  host: e.string().url(),
@@ -2086,8 +2041,139 @@ e.object({
2086
2041
  phone: e.string().optional(),
2087
2042
  email: e.string().optional()
2088
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
+ });
2089
2171
  export {
2090
- Q as F,
2091
- ve as T,
2092
- _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
2093
2179
  };