@feedmepos/mf-connect 0.1.0-beta.4 → 0.1.0-beta.40

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 (106) hide show
  1. package/dist/Analytic-DArrGnk-.js +426 -0
  2. package/dist/{App-BnQwjxIr.js → App-CxJaPSSE.js} +397 -384
  3. package/dist/{Broadcast-y1kP18mo.js → Broadcast-C5CtxHYC.js} +32 -32
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Dj0JUMOk.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DJAGRlyI.js} +6 -8
  5. package/dist/Card-ZsgNMrz5.js +894 -0
  6. package/dist/{Collections-DPfbZMg1.js → Collections-CodLm2hP.js} +28 -34
  7. package/dist/{Credit-QleM_b6q.js → Credit-8qliEPqA.js} +14 -14
  8. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +108 -0
  9. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DZOeB8YS.js +2209 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-2hRTF1EJ.js → EffectSheet.vue_vue_type_style_index_0_lang-Cf4nXUmp.js} +8 -8
  11. package/dist/{Experience-DGKj8ChY.js → Experience-DR0_RUqZ.js} +8 -8
  12. package/dist/{Game-BxRdzSma.js → Game-BZkQZDV_.js} +15 -15
  13. package/dist/Index-BP9YGCex.js +255 -0
  14. package/dist/Marketing-Bt-ViwTP.js +20070 -0
  15. package/dist/{Member-CteeBDi2.js → Member-DW_uVRyE.js} +4 -4
  16. package/dist/MemberList-BQcsV-Bz.js +1554 -0
  17. package/dist/MemberTransactions-xJaYPP7W.js +45 -0
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-CZ2M8huU.js → MessageInput.vue_vue_type_script_setup_true_lang-Txp1lndf.js} +2 -2
  19. package/dist/{Mission-CZgXBa09.js → Mission-CQ2PlxLv.js} +98 -86
  20. package/dist/Overview-CWhTf5Tz.js +1063 -0
  21. package/dist/{Point-C2vzEfRP.js → Point-BCvUsXLl.js} +23 -23
  22. package/dist/{Promotion-337OT0sP.js → Promotion-CrROpksP.js} +53 -47
  23. package/dist/Record-B6RRMDQn.js +337 -0
  24. package/dist/Reward-CTZ3IllK.js +432 -0
  25. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-C19vRccs.js +149 -0
  26. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-C3irbjUK.js +1637 -0
  27. package/dist/Segment-h-HRoL19.js +566 -0
  28. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-D5kijSzp.js +181 -0
  29. package/dist/{Setting-DVK2594u.js → Setting-CZIFruFT.js} +8 -8
  30. package/dist/Store-CbjSMVfb.js +1743 -0
  31. package/dist/{StoreRewards-BpEmNueE.js → StoreRewards-zkEVickE.js} +12 -12
  32. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-DU5v6oro.js +1099 -0
  33. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-DT48bSiH.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-i_y1gFyL.js} +1 -1
  34. package/dist/{Tier-BwvOhyXR.js → Tier-BCgp2Ngt.js} +325 -317
  35. package/dist/{Title-DRPdKYRO.js → Title-CJNx0TkK.js} +197 -183
  36. package/dist/{Transaction-BnLvacwW.js → Transaction-DWvfvfsk.js} +2 -2
  37. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-Dkln_L8k.js +130 -0
  38. package/dist/{Voucher-BQL8J_EA.js → Voucher-bYVNHe4l.js} +31 -31
  39. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-BX0Fo_5O.js +419 -0
  40. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-B316b_ta.js → ZodTextField.vue_vue_type_script_setup_true_lang-D5Idn8So.js} +1 -1
  41. package/dist/{app-BVaQwBvq.js → app-CdJSO9Ad.js} +1 -1
  42. package/dist/{app-zO552-Dl.js → app-fsxaQBSg.js} +1183 -1154
  43. package/dist/app.js +1 -1
  44. package/dist/{business-BSl6NSdS.js → business-CDeQ06qx.js} +1 -1
  45. package/dist/{campaign-CxN6mq_l.js → campaign-D8lQOOTp.js} +2 -2
  46. package/dist/campaign-Dwea7uho.js +1810 -0
  47. package/dist/campaign.enum-CF_gt52u.js +20 -0
  48. package/dist/campaign.fn-BavlaqB6.js +758 -0
  49. package/dist/collectible.enum-DVZRkRwR.js +19 -0
  50. package/dist/{collection.fn-C-2dyWp9.js → collection.fn-CIicjfIz.js} +2 -2
  51. package/dist/dto-CMkenMV_.js +214 -0
  52. package/dist/{effect-D8y0J47O.js → effect-IbJ225qB.js} +9 -9
  53. package/dist/email-addresses-LDTzLm79.js +705 -0
  54. package/dist/{export-BxTrifKO.js → export-BCSOuQ5g.js} +3 -3
  55. package/dist/{helper-bEmZlTwA.js → helper-BZxLzAuG.js} +1 -1
  56. package/dist/{index-B2qriSSk.js → index-0Lmb_8CU.js} +1 -1
  57. package/dist/{index-JBp0chol.js → index-B3r9-9qd.js} +1500 -1479
  58. package/dist/{index-BFWCbVq2.js → index-BVd0uPuT.js} +1 -1
  59. package/dist/{index-Dnv999nc.js → index-BtFnlSuJ.js} +1 -1
  60. package/dist/{index-Ckz-D_AP.js → index-BxrHVPJL.js} +2188 -931
  61. package/dist/index-C0VSGU1p.js +32 -0
  62. package/dist/{index-DuYb25dY.js → index-CYLAuP7e.js} +34 -4
  63. package/dist/index-CcpRLc8R.js +44 -0
  64. package/dist/index-CsaQJMAR.js +66 -0
  65. package/dist/index-CvW4f2DA.js +29000 -0
  66. package/dist/{index-DHTYWfTs.js → index-DG0LFjr2.js} +207 -195
  67. package/dist/index-DbmWadFy.js +54 -0
  68. package/dist/index-vh86FiIQ.js +10 -0
  69. package/dist/{index-C_WyKCqN.js → index-xoJ0Hv7u.js} +1 -1
  70. package/dist/{index.esm2017-Tw7KabwI.js → index.esm2017-CaKC72Zr.js} +33 -33
  71. package/dist/{loading-60xYxow_.js → loading-CmdIDK9W.js} +591 -597
  72. package/dist/{membership-43FU3EmV.js → membership-BKNbXD5h.js} +52 -44
  73. package/dist/money-DbuB1-Ff.js +15 -0
  74. package/dist/number-CJ4JetR2.js +12 -0
  75. package/dist/objectid-CSzIZWFn.js +145 -0
  76. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  77. package/dist/reward-BlvDqH4n.js +36 -0
  78. package/dist/{rule-DlHrKp8K.js → rule-Csn-Prz_.js} +180 -177
  79. package/dist/{rule-builder-CU8P8b8U.js → rule-builder-BKMY8R7O.js} +1 -1
  80. package/dist/style.css +1 -1
  81. package/dist/{template-9StyN-b7.js → template-DyhD97jJ.js} +5 -5
  82. package/dist/trigger-Cb8-87Qi.js +114 -0
  83. package/dist/{xlsx-CrRvm5Vs.js → usePagination-9TxpwvcN.js} +3183 -2962
  84. package/dist/user-Drjp-FP9.js +54 -0
  85. package/dist/{vue-i18n-UKlvivrG.js → vue-i18n-CDCNED_Y.js} +155 -155
  86. package/package.json +8 -7
  87. package/dist/Analytic-BtldByrt.js +0 -622
  88. package/dist/Card-kW7k8kOl.js +0 -825
  89. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-BtI2rY4y.js +0 -2813
  90. package/dist/Marketing-CG4GQdax.js +0 -316
  91. package/dist/MemberList-CANkPyR0.js +0 -1733
  92. package/dist/MemberTransactions-CcCa21fY.js +0 -38
  93. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dh3naMXv.js +0 -1753
  94. package/dist/Segment-Clstp5D-.js +0 -437
  95. package/dist/Store-PnpBvIoo.js +0 -1511
  96. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CrDhK2dt.js +0 -890
  97. package/dist/dto-B20bsdh6.js +0 -2770
  98. package/dist/index-BUCjM4jq.js +0 -29193
  99. package/dist/index-Ceu2PcnH.js +0 -206
  100. package/dist/index-CuvNtC_M.js +0 -61
  101. package/dist/index-D3DAgTFI.js +0 -762
  102. package/dist/index-Kjelmo0Y.js +0 -298
  103. package/dist/money-CmR3-qMz.js +0 -15
  104. package/dist/number-CZlrO6Sq.js +0 -12
  105. package/dist/usePagination-BeF5K3M7.js +0 -223
  106. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,113 +1,10 @@
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-60xYxow_.js";
3
- import "./index-JBp0chol.js";
4
- import { R as t } from "./rule-builder-CU8P8b8U.js";
5
- import { i as o } from "./helper-bEmZlTwA.js";
6
- import { b as K, c as W } from "./index-Ceu2PcnH.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
- }
37
- },
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
- };
109
- }
110
- }), ve = {
1
+ import { z as e, F as n, m as o } from "./loading-CmdIDK9W.js";
2
+ import { c as v } from "./index-B3r9-9qd.js";
3
+ import { R as t } from "./rule-builder-BKMY8R7O.js";
4
+ import { i } from "./helper-BZxLzAuG.js";
5
+ import { y as E, z as O, A as I, B as p } from "./index-BxrHVPJL.js";
6
+ import { F as r } from "./index-DbmWadFy.js";
7
+ const $ = {
111
8
  PROMOTION: {
112
9
  name: "Promotion Template",
113
10
  description: "Promotion template for campaign creation.",
@@ -160,26 +57,6 @@ const X = {
160
57
  type: "effect"
161
58
  }
162
59
  ]
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
60
  }
184
61
  ]
185
62
  },
@@ -440,7 +317,11 @@ const X = {
440
317
  property: "campaign.code",
441
318
  type: "text"
442
319
  }
443
- ]
320
+ ],
321
+ condition: {
322
+ property: "campaign.event.type",
323
+ value: "SIMPLE_CLAIM"
324
+ }
444
325
  },
445
326
  {
446
327
  name: "Hide in App (FeedVibe)",
@@ -518,7 +399,7 @@ const X = {
518
399
  // },
519
400
  hideInApp: !0
520
401
  },
521
- configs: o("VOUCHER", {
402
+ configs: i("VOUCHER", {
522
403
  name: "",
523
404
  business: null,
524
405
  noCampaign: !1
@@ -1232,7 +1113,9 @@ const X = {
1232
1113
  amount: 1
1233
1114
  },
1234
1115
  config: {
1235
- validityOption: {}
1116
+ validityOption: {
1117
+ validForDay: 1
1118
+ }
1236
1119
  }
1237
1120
  }
1238
1121
  }
@@ -1456,7 +1339,7 @@ const X = {
1456
1339
  rewards: []
1457
1340
  }
1458
1341
  },
1459
- configs: o("GAME", {
1342
+ configs: i("GAME", {
1460
1343
  name: "Token",
1461
1344
  business: null,
1462
1345
  noCampaign: !1
@@ -1697,27 +1580,27 @@ const X = {
1697
1580
  type: "timeframe"
1698
1581
  }
1699
1582
  },
1700
- configs: o("STAMP", {
1583
+ configs: i("STAMP", {
1701
1584
  business: null,
1702
1585
  noCampaign: !1
1703
1586
  })
1704
1587
  }
1705
1588
  }
1706
1589
  };
1707
- t.scaffoldGroup(), o("STAMP", {
1590
+ t.scaffoldGroup(), i("STAMP", {
1708
1591
  business: null,
1709
1592
  noCampaign: !1
1710
1593
  });
1711
1594
  ({
1712
1595
  ...t.scaffoldGroup()
1713
- }, o("VOUCHER", {
1596
+ }, i("VOUCHER", {
1714
1597
  name: "",
1715
1598
  business: null,
1716
1599
  noCampaign: !1
1717
1600
  }));
1718
1601
  ({
1719
1602
  ...t.scaffoldGroup()
1720
- }, o("VOUCHER", {
1603
+ }, i("VOUCHER", {
1721
1604
  name: "",
1722
1605
  business: null,
1723
1606
  noCampaign: !1
@@ -1760,7 +1643,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1760
1643
  });
1761
1644
  ({
1762
1645
  ...t.scaffoldGroup()
1763
- }, o("VOUCHER", {
1646
+ }, i("VOUCHER", {
1764
1647
  name: "",
1765
1648
  business: null,
1766
1649
  noCampaign: !1
@@ -1806,14 +1689,14 @@ t.setRuleToGroup(
1806
1689
  "&&"
1807
1690
  )
1808
1691
  );
1809
- t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
1692
+ t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1810
1693
  name: "Token",
1811
1694
  business: null,
1812
1695
  noCampaign: !1
1813
1696
  });
1814
1697
  ({
1815
1698
  ...t.scaffoldGroup()
1816
- }, o("VOUCHER", {
1699
+ }, i("VOUCHER", {
1817
1700
  name: "",
1818
1701
  business: null,
1819
1702
  noCampaign: !1
@@ -1842,7 +1725,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1842
1725
  ],
1843
1726
  "&&"
1844
1727
  )
1845
- ]), o("VOUCHER", {
1728
+ ]), i("VOUCHER", {
1846
1729
  name: "",
1847
1730
  business: null,
1848
1731
  noCampaign: !1
@@ -1865,7 +1748,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1865
1748
  ({
1866
1749
  ...t.scaffoldGroup()
1867
1750
  });
1868
- const Q = e.enum([
1751
+ const L = e.enum([
1869
1752
  "MEMBER_REWARD",
1870
1753
  "PAID_LOYALTY",
1871
1754
  "COLLECT_FEEDBACK",
@@ -1875,7 +1758,7 @@ const Q = e.enum([
1875
1758
  "BROADCAST",
1876
1759
  "BIRTHDAY",
1877
1760
  "GAME"
1878
- ]), J = e.enum([
1761
+ ]), h = e.enum([
1879
1762
  "text",
1880
1763
  "number",
1881
1764
  "textarea",
@@ -1902,95 +1785,95 @@ const Q = e.enum([
1902
1785
  "rule_feedback",
1903
1786
  "rule_birthday",
1904
1787
  "promotion_game_type"
1905
- ]), $ = e.object({
1788
+ ]), R = e.object({
1906
1789
  label: e.string().optional(),
1907
1790
  property: e.string().or(e.any()),
1908
- type: J,
1791
+ type: h,
1909
1792
  extras: e.string().optional(),
1910
1793
  isRuleChildren: e.boolean().optional()
1911
- }), Z = e.object({
1794
+ }), x = e.object({
1912
1795
  name: e.string().optional(),
1913
- fields: e.array($),
1796
+ fields: e.array(R),
1914
1797
  condition: e.object({
1915
1798
  not: e.boolean().optional(),
1916
1799
  property: e.string(),
1917
1800
  value: e.any()
1918
1801
  }).optional()
1919
- }), ee = e.object({
1802
+ }), C = e.object({
1920
1803
  name: e.string(),
1921
- groups: e.array(Z)
1804
+ groups: e.array(x)
1922
1805
  });
1923
1806
  e.object({
1924
- _id: c,
1807
+ _id: n,
1925
1808
  name: e.string(),
1926
1809
  description: e.string().nullish(),
1927
- steps: e.array(ee).min(1),
1928
- intention: e.array(Q),
1810
+ steps: e.array(C).min(1),
1811
+ intention: e.array(L),
1929
1812
  defaultValue: e.any()
1930
1813
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1931
- const te = {
1814
+ const T = {
1932
1815
  collectionName: "Businesses",
1933
1816
  transform: {
1934
1817
  _id: "oid"
1935
1818
  }
1936
1819
  };
1937
1820
  e.object({
1938
- _id: c,
1821
+ _id: n,
1939
1822
  ownerId: e.string(),
1940
1823
  name: e.string(),
1941
1824
  credit: e.number(),
1942
1825
  forceSend: e.boolean().optional()
1943
- }).describe(f.describe(te));
1944
- const D = e.enum(["PHONE"]), ne = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), ae = e.enum(["PENDING", "COMPLETED", "FAILED"]), ie = e.enum([
1826
+ }).describe(o.describe(T));
1827
+ const m = e.enum(["PHONE"]), D = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), S = e.enum(["PENDING", "COMPLETED", "FAILED"]), A = e.enum([
1945
1828
  "General",
1946
1829
  "Otp",
1947
1830
  "Marketing",
1948
1831
  "Ordering",
1949
1832
  "MemberInvitation"
1950
- ]), oe = e.object({
1951
- type: D
1952
- }), T = oe.extend({
1953
- type: e.literal(D.enum.PHONE),
1954
- provider: ne,
1955
- usage: ie.optional()
1956
- }), pe = {
1833
+ ]), M = e.object({
1834
+ type: m
1835
+ }), s = M.extend({
1836
+ type: e.literal(m.enum.PHONE),
1837
+ provider: D,
1838
+ usage: A.optional()
1839
+ }), w = {
1957
1840
  collectionName: "Notifications",
1958
1841
  transform: { _id: "oid", business: "oid" }
1959
1842
  };
1960
1843
  e.object({
1961
- _id: c,
1962
- business: c,
1844
+ _id: n,
1845
+ business: n,
1963
1846
  target: e.string(),
1964
1847
  title: e.string().optional(),
1965
1848
  message: e.string(),
1966
- option: T,
1967
- status: ae,
1849
+ option: s,
1850
+ status: S,
1968
1851
  ref: e.string().optional()
1969
- }).describe(f.describe(pe));
1852
+ }).describe(o.describe(w));
1970
1853
  e.object({
1971
1854
  target: e.string(),
1972
1855
  title: e.string().optional(),
1973
1856
  message: e.string(),
1974
- option: T,
1857
+ option: s,
1975
1858
  ref: e.string().optional()
1976
1859
  });
1977
1860
  e.object({
1978
1861
  phone: e.string(),
1979
1862
  message: e.string()
1980
1863
  });
1981
- const C = e.object({
1864
+ const c = e.object({
1982
1865
  name: e.string(),
1983
1866
  address: e.string()
1984
- }), re = e.object({
1867
+ }), N = e.object({
1985
1868
  filename: e.string(),
1986
1869
  content: e.instanceof(Uint8Array)
1987
1870
  });
1988
1871
  e.object({
1989
- from: C,
1990
- to: e.array(C),
1872
+ from: c,
1873
+ to: e.array(c),
1991
1874
  subject: e.string(),
1992
1875
  html: e.string().optional(),
1993
- attachments: e.array(re).optional()
1876
+ attachments: e.array(N).optional()
1994
1877
  });
1995
1878
  e.object({
1996
1879
  subject: e.string(),
@@ -2023,15 +1906,15 @@ e.object({
2023
1906
  claimIds: e.array(e.string()),
2024
1907
  billId: e.string()
2025
1908
  });
2026
- var S = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(S || {});
2027
- e.nativeEnum(S);
1909
+ var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
1910
+ e.nativeEnum(g);
2028
1911
  e.enum(["manage", "create", "read", "update", "delete"]);
2029
1912
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2030
1913
  e.enum(["quota"]);
2031
- 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 || {});
2032
- e.nativeEnum(R);
1914
+ 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 || {});
1915
+ e.nativeEnum(d);
2033
1916
  e.enum(["restaurant"]);
2034
- const le = e.object({
1917
+ const U = e.object({
2035
1918
  label: e.string(),
2036
1919
  subject: e.union([e.string(), e.array(e.string())]),
2037
1920
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2041,41 +1924,41 @@ const le = e.object({
2041
1924
  reason: e.string().optional()
2042
1925
  });
2043
1926
  e.object({
2044
- _id: c,
1927
+ _id: n,
2045
1928
  businessId: e.string(),
2046
1929
  userId: e.string(),
2047
1930
  email: e.string().nullish(),
2048
1931
  phoneNo: e.string().nullish(),
2049
- permissions: e.array(e.lazy(() => le))
1932
+ permissions: e.array(e.lazy(() => U))
2050
1933
  }).describe(
2051
- f.describe({
1934
+ o.describe({
2052
1935
  collectionName: "PermissionUsers",
2053
1936
  transform: {
2054
1937
  _id: "oid"
2055
1938
  }
2056
1939
  })
2057
1940
  );
2058
- const M = e.object({
1941
+ const y = e.object({
2059
1942
  userId: e.string(),
2060
1943
  level: e.number(),
2061
1944
  role: e.string().optional(),
2062
1945
  businessId: e.string().optional(),
2063
1946
  restaurantId: e.string().optional()
2064
- }), ce = e.function().args(e.any(), M).returns(e.boolean()), me = e.function().args(M).returns(e.promise(e.array(e.any())));
1947
+ }), F = e.function().args(e.any(), y).returns(e.boolean()), P = e.function().args(y).returns(e.promise(e.array(e.any())));
2065
1948
  e.object({
2066
- isAdmin: ce,
2067
- getRules: me
1949
+ isAdmin: F,
1950
+ getRules: P
2068
1951
  });
2069
1952
  e.object({
2070
- transactions: e.array(K),
2071
- collections: e.array(W)
1953
+ transactions: e.array(E),
1954
+ collections: e.array(O)
2072
1955
  });
2073
- const A = e.enum([
1956
+ const u = e.enum([
2074
1957
  "ROCK_PAPER_SCISSOR"
2075
1958
  ]);
2076
- A.enum.ROCK_PAPER_SCISSOR + "";
1959
+ u.enum.ROCK_PAPER_SCISSOR + "";
2077
1960
  e.object({
2078
- type: A
1961
+ type: u
2079
1962
  });
2080
1963
  e.object({
2081
1964
  host: e.string().url(),
@@ -2102,8 +1985,137 @@ e.object({
2102
1985
  phone: e.string().optional(),
2103
1986
  email: e.string().optional()
2104
1987
  });
1988
+ const B = e.enum([
1989
+ "PENDING",
1990
+ "SUCCESS",
1991
+ "FAILED",
1992
+ "RETRYING"
1993
+ ]), G = {
1994
+ collectionName: "WebhookLogs",
1995
+ transform: {
1996
+ _id: "oid",
1997
+ business: "oid"
1998
+ }
1999
+ };
2000
+ e.object({
2001
+ _id: n,
2002
+ business: n,
2003
+ type: e.string(),
2004
+ payload: e.record(e.any()),
2005
+ status: B,
2006
+ response: e.any().optional(),
2007
+ error: e.string().optional()
2008
+ }).describe(o.describe(G));
2009
+ const H = e.enum(["AUTO", "MANUAL"]);
2010
+ e.enum(["IN_PROGRESS", "COMPLETED"]);
2011
+ const f = e.object({
2012
+ _id: n,
2013
+ name: e.string().min(1, "Name is required").max(50),
2014
+ type: H,
2015
+ event: I.optional()
2016
+ }), V = e.object({
2017
+ from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2018
+ to: e.number().int("Must be integer").nullish()
2019
+ }).superRefine((a, b) => {
2020
+ a.from && a.to && a.from > a.to && b.addIssue({
2021
+ code: "custom",
2022
+ message: "Max referral count must be more than min referral count"
2023
+ });
2024
+ }), k = e.object({
2025
+ threshold: V,
2026
+ rewards: e.array(n),
2027
+ pf_reward: e.array(r).optional()
2028
+ }), l = e.object({
2029
+ id: e.string(),
2030
+ name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2031
+ rule: v.optional(),
2032
+ rewards: e.array(k)
2033
+ }), j = {
2034
+ collectionName: "ReferralRecords",
2035
+ transform: {
2036
+ _id: "oid",
2037
+ business: "oid",
2038
+ referer: "oid",
2039
+ referee: "oid",
2040
+ refereeReward: "oid"
2041
+ }
2042
+ }, Y = e.object({
2043
+ completedAt: e.coerce.date(),
2044
+ criteria: n,
2045
+ ref: e.string()
2046
+ }), K = e.object({
2047
+ _id: n,
2048
+ business: n,
2049
+ referer: n,
2050
+ referee: n,
2051
+ criteria: e.array(f),
2052
+ reward: e.array(l),
2053
+ refereeReward: e.array(n).optional(),
2054
+ criteria_progress: e.array(Y),
2055
+ status: e.string(),
2056
+ pf_referer: p.optional(),
2057
+ pf_referee: p.optional(),
2058
+ pf_refereeReward: e.array(r).optional()
2059
+ }).describe(o.describe(j));
2060
+ K.pick({
2061
+ _id: !0,
2062
+ business: !0,
2063
+ referer: !0,
2064
+ referee: !0,
2065
+ criteria_progress: !0,
2066
+ criteria: !0
2067
+ }).extend({
2068
+ pf_referee: p.pick({
2069
+ _id: !0,
2070
+ name: !0,
2071
+ phoneNumber: !0,
2072
+ photoUrl: !0
2073
+ })
2074
+ });
2075
+ const W = {
2076
+ collectionName: "ReferralProgram",
2077
+ transform: {
2078
+ _id: "oid",
2079
+ business: "oid"
2080
+ }
2081
+ }, _ = e.object({
2082
+ _id: n,
2083
+ business: n,
2084
+ term_and_condition: e.string().optional(),
2085
+ refereeReward: e.array(n).optional(),
2086
+ reward: e.array(l),
2087
+ criteria: e.array(f)
2088
+ }).describe(o.describe(W));
2089
+ e.object({
2090
+ referer: n,
2091
+ referee: n,
2092
+ business: n
2093
+ });
2094
+ e.object({
2095
+ program: _.pick({
2096
+ _id: !0,
2097
+ business: !0,
2098
+ term_and_condition: !0
2099
+ }).extend({
2100
+ reward: l.optional(),
2101
+ pf_refereeReward: e.array(r).optional()
2102
+ }),
2103
+ referralCount: e.number(),
2104
+ successReferralCount: e.number(),
2105
+ referredBy: p.pick({
2106
+ _id: !0,
2107
+ name: !0,
2108
+ phoneNumber: !0,
2109
+ photoUrl: !0
2110
+ }).optional()
2111
+ });
2112
+ _.extend({
2113
+ updateReferralRecord: e.boolean().optional()
2114
+ });
2105
2115
  export {
2106
- Q as F,
2107
- ve as T,
2108
- _e as _
2116
+ L as F,
2117
+ $ as T,
2118
+ k as a,
2119
+ f as b,
2120
+ l as c
2109
2121
  };
@@ -0,0 +1,54 @@
1
+ import { F as o, e as t, g as a } from "./index-B3r9-9qd.js";
2
+ import { z as e, F as i, m as d } from "./loading-CmdIDK9W.js";
3
+ import { a as c } from "./collectible.enum-DVZRkRwR.js";
4
+ const l = e.enum(["VOUCHER", "LOYALTY"]), n = e.object({
5
+ type: e.literal(l.enum.VOUCHER),
6
+ collectible: i,
7
+ collectibleConfig: e.lazy(() => o._def.right.options[0]),
8
+ earningOption: e.lazy(() => t)
9
+ }), s = e.object({
10
+ type: e.literal(l.enum.LOYALTY),
11
+ collectibleType: c,
12
+ collectible: i,
13
+ earningOption: e.lazy(() => t),
14
+ validityOption: e.lazy(() => a)
15
+ }), r = e.discriminatedUnion("type", [
16
+ n,
17
+ s
18
+ ]), p = e.discriminatedUnion("type", [
19
+ n.extend({
20
+ collectible: i.nullish(),
21
+ business: i.nullish()
22
+ }),
23
+ s.extend({
24
+ collectible: i.nullish(),
25
+ collectibleConfig: o.nullish(),
26
+ business: i.nullish()
27
+ })
28
+ ]), m = {
29
+ collectionName: "RewardTemplates",
30
+ transform: {
31
+ _id: "oid",
32
+ business: "oid",
33
+ deletedAt: "date"
34
+ }
35
+ }, b = e.object({
36
+ _id: i,
37
+ business: i,
38
+ name: e.string(),
39
+ option: r,
40
+ deletedAt: e.date().optional(),
41
+ collectibleConfig: e.lazy(() => o.nullish())
42
+ }).describe(d.describe(m)), u = b.extend({
43
+ _id: i.nullish(),
44
+ business: i.nullish(),
45
+ option: p,
46
+ name: e.string().min(1, { message: "Name is required" })
47
+ });
48
+ u.extend({
49
+ updateCollection: e.boolean().optional()
50
+ });
51
+ export {
52
+ b as F,
53
+ u as a
54
+ };
@@ -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
+ };
@@ -1,4 +1,4 @@
1
- import { g as e, S as n, b as o } from "./index-BUCjM4jq.js";
1
+ import { g as e, S as n, b as o } from "./index-CvW4f2DA.js";
2
2
  const t = () => {
3
3
  const a = n.getBusinessId();
4
4
  if (!a) throw new Error("Invalid business ID");