@feedmepos/mf-connect 0.1.0-beta.3 → 0.1.0-beta.30

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 (99) hide show
  1. package/dist/Analytic-DLez3H4H.js +424 -0
  2. package/dist/{App-gzbM97vW.js → App-dkNRyYLR.js} +397 -384
  3. package/dist/{Broadcast-BwYZkTs0.js → Broadcast-DlAaBitD.js} +32 -32
  4. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-DIh9rz6T.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BtpiGQEs.js} +8 -8
  5. package/dist/Card-JpWEjzjP.js +897 -0
  6. package/dist/{Collections-Df6tlo8S.js → Collections-D5hUfDJo.js} +4 -4
  7. package/dist/{Credit-BPel8vA9.js → Credit-v3KdCFwT.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-CE2Ar-Ll.js +2198 -0
  10. package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-BT8ucS5G.js → EffectSheet.vue_vue_type_style_index_0_lang-C12m8EXP.js} +8 -8
  11. package/dist/{Experience-CPpz1Zwx.js → Experience-9A41fyZO.js} +8 -8
  12. package/dist/{Game-ByLblISC.js → Game-l1tUsePJ.js} +15 -15
  13. package/dist/Index-rF6OzGw_.js +255 -0
  14. package/dist/Marketing-6zS-6CS3.js +20070 -0
  15. package/dist/{Member-CCc_FEZY.js → Member-B5jPh0DM.js} +4 -4
  16. package/dist/MemberList-c2P1lToO.js +1045 -0
  17. package/dist/{MemberTransactions-DD5ahSbY.js → MemberTransactions-BiwAZyCP.js} +1 -1
  18. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DSPvWk4C.js → MessageInput.vue_vue_type_script_setup_true_lang-CYVOCazs.js} +2 -2
  19. package/dist/{Mission-VH4057I-.js → Mission-BM7abR6J.js} +98 -86
  20. package/dist/Overview-Drjb4oAW.js +1024 -0
  21. package/dist/{Point-Bu3IlpH4.js → Point-BP9YezdW.js} +23 -23
  22. package/dist/{Promotion-B45AOHis.js → Promotion-DiqlNOWk.js} +53 -47
  23. package/dist/Record-DJ2A1L-C.js +209 -0
  24. package/dist/Reward-DN6z6LXf.js +411 -0
  25. package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-CcbzCFUg.js +151 -0
  26. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-CFD10xnG.js +1639 -0
  27. package/dist/Segment-Cm48eZrS.js +567 -0
  28. package/dist/SelectItems.vue_vue_type_script_setup_true_lang-6XokSm7W.js +181 -0
  29. package/dist/{Setting-CF09eRQJ.js → Setting-3jXUi2cS.js} +8 -8
  30. package/dist/Store-Csditfe8.js +1745 -0
  31. package/dist/{StoreRewards-0iGExjqQ.js → StoreRewards-DOMxpeaj.js} +12 -12
  32. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-Csoobxol.js +957 -0
  33. package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-BEfxin47.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-C8UhKTgD.js} +1 -1
  34. package/dist/{Tier-IaeWe7rM.js → Tier-BmhQYaPz.js} +318 -306
  35. package/dist/{Title-DD67Zxh5.js → Title-BJV4yLCu.js} +199 -183
  36. package/dist/{Transaction-BsPDnLzB.js → Transaction-DB81PNYL.js} +2 -2
  37. package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-wyCBPQRj.js +130 -0
  38. package/dist/{Voucher-M7JfcKo0.js → Voucher-B8nnAIUZ.js} +31 -31
  39. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-B4zIOBh0.js +419 -0
  40. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-k0lprU2i.js → ZodTextField.vue_vue_type_script_setup_true_lang-DvfcNsj9.js} +1 -1
  41. package/dist/{app-DwujUNP-.js → app-BYTkNtdY.js} +1 -1
  42. package/dist/{app-HFICF0vL.js → app-sD3N1iqR.js} +1285 -1283
  43. package/dist/app.js +1 -1
  44. package/dist/{business-BaF1QJXa.js → business-B6OFKNz4.js} +1 -1
  45. package/dist/{campaign-CTDtmAE9.js → campaign-DhumfBC6.js} +2 -2
  46. package/dist/collectible.enum-4Gywgj__.js +19 -0
  47. package/dist/{collection.fn-DMW03W4R.js → collection.fn-D-uexOQL.js} +2 -2
  48. package/dist/{dto-gpaNZHzQ.js → dto-b9jcbMWA.js} +78 -86
  49. package/dist/{effect-CBUmtwet.js → effect-CBN4vtSi.js} +9 -9
  50. package/dist/email-addresses-BqgJVUoG.js +705 -0
  51. package/dist/{export-Bdh_PbsW.js → export-D1kS_vMc.js} +3 -3
  52. package/dist/{helper-Cu9elRvl.js → helper-SbkTJZDm.js} +1 -1
  53. package/dist/index-BBBSm4kr.js +54 -0
  54. package/dist/index-BIs-Ed1-.js +29000 -0
  55. package/dist/{index-ogzk-Mj4.js → index-CBwwTcb5.js} +1 -1
  56. package/dist/{index-At6yms5t.js → index-CHg2swyg.js} +30 -26
  57. package/dist/index-Cd94xjeo.js +38 -0
  58. package/dist/{index-CArqG03W.js → index-Cehc8dyz.js} +39 -35
  59. package/dist/index-CsaQJMAR.js +66 -0
  60. package/dist/{index-CtH2S49l.js → index-CxBG7i3n.js} +203 -195
  61. package/dist/{index-DrGrOgZB.js → index-DgJVPeks.js} +13 -1
  62. package/dist/{index-NXiDu42U.js → index-Dp-5hs3q.js} +1 -1
  63. package/dist/{index-Crw-Vgo5.js → index-DtX7V_mF.js} +1500 -1479
  64. package/dist/index-Hhxoo_Eg.js +1067 -0
  65. package/dist/{index-Ch6XwPzF.js → index-OCIxZJKd.js} +1 -1
  66. package/dist/{index-Dfdg2Q3E.js → index-wJ5e3mQa.js} +1 -1
  67. package/dist/{index.esm2017-CeJpvUbA.js → index.esm2017-Bl1OPd9N.js} +33 -33
  68. package/dist/{loading-Cn8ml_vy.js → loading-BghJIv3w.js} +591 -597
  69. package/dist/{membership-CX4AKMlH.js → membership-D532uzUJ.js} +51 -43
  70. package/dist/money-BJmDeENN.js +15 -0
  71. package/dist/number-E_LdkU9a.js +12 -0
  72. package/dist/objectid-DSB8jlsT.js +145 -0
  73. package/dist/remy-vue-client-Cpppk9h-.js +1693 -0
  74. package/dist/reward-CiTzAsCd.js +36 -0
  75. package/dist/{rule-Cv83Y59R.js → rule-0MEHUef9.js} +180 -177
  76. package/dist/{rule-builder-Dew4yB5Q.js → rule-builder-BQZN0Bi4.js} +1 -1
  77. package/dist/style.css +1 -1
  78. package/dist/{template-CSnbgM1o.js → template-2xDKWfij.js} +5 -5
  79. package/dist/trigger-BFmJQkCL.js +114 -0
  80. package/dist/user-B_diJ-ER.js +54 -0
  81. package/dist/{vue-i18n-CNH_IhVd.js → vue-i18n-D0S05G9j.js} +408 -408
  82. package/dist/{xlsx-D4DUZHix.js → xlsx-9pjTnN_k.js} +1 -1
  83. package/package.json +8 -7
  84. package/dist/Analytic-BC5BA6pN.js +0 -622
  85. package/dist/Card-CBYQGKwY.js +0 -825
  86. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-PsrS7I0r.js +0 -2809
  87. package/dist/Marketing-D0vm80e_.js +0 -316
  88. package/dist/MemberList-CrnipE9y.js +0 -1733
  89. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Ijc2OYh9.js +0 -1753
  90. package/dist/Segment-ZWsp48aC.js +0 -437
  91. package/dist/Store-B_G6Dhmq.js +0 -1511
  92. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CaxUr9zl.js +0 -890
  93. package/dist/index-8MaN7rez.js +0 -762
  94. package/dist/index-BjdHxGDn.js +0 -298
  95. package/dist/index-CuvNtC_M.js +0 -61
  96. package/dist/index-RP0XOPRL.js +0 -29193
  97. package/dist/money-BTejgvKu.js +0 -15
  98. package/dist/number-Cen5TucC.js +0 -12
  99. package/dist/user-Bm4KttFq.js +0 -37
@@ -1,113 +1,12 @@
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-Cn8ml_vy.js";
3
- import "./index-Crw-Vgo5.js";
4
- import { R as t } from "./rule-builder-Dew4yB5Q.js";
5
- import { i as o } from "./helper-Cu9elRvl.js";
6
- import { b as K, c as W } from "./index-At6yms5t.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-BghJIv3w.js";
2
+ import { c as b } from "./index-DtX7V_mF.js";
3
+ import { R as t } from "./rule-builder-BQZN0Bi4.js";
4
+ import { i } from "./helper-SbkTJZDm.js";
5
+ import { d as v, e as E } from "./index-CHg2swyg.js";
6
+ import { s as O } from "./index-Hhxoo_Eg.js";
7
+ import { F as c } from "./index-BBBSm4kr.js";
8
+ import { b as p } from "./index-Cehc8dyz.js";
9
+ const ee = {
111
10
  PROMOTION: {
112
11
  name: "Promotion Template",
113
12
  description: "Promotion template for campaign creation.",
@@ -160,26 +59,6 @@ const X = {
160
59
  type: "effect"
161
60
  }
162
61
  ]
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
62
  }
184
63
  ]
185
64
  },
@@ -440,7 +319,11 @@ const X = {
440
319
  property: "campaign.code",
441
320
  type: "text"
442
321
  }
443
- ]
322
+ ],
323
+ condition: {
324
+ property: "campaign.event.type",
325
+ value: "SIMPLE_CLAIM"
326
+ }
444
327
  },
445
328
  {
446
329
  name: "Hide in App (FeedVibe)",
@@ -518,7 +401,7 @@ const X = {
518
401
  // },
519
402
  hideInApp: !0
520
403
  },
521
- configs: o("VOUCHER", {
404
+ configs: i("VOUCHER", {
522
405
  name: "",
523
406
  business: null,
524
407
  noCampaign: !1
@@ -1232,7 +1115,9 @@ const X = {
1232
1115
  amount: 1
1233
1116
  },
1234
1117
  config: {
1235
- validityOption: {}
1118
+ validityOption: {
1119
+ validForDay: 1
1120
+ }
1236
1121
  }
1237
1122
  }
1238
1123
  }
@@ -1456,7 +1341,7 @@ const X = {
1456
1341
  rewards: []
1457
1342
  }
1458
1343
  },
1459
- configs: o("GAME", {
1344
+ configs: i("GAME", {
1460
1345
  name: "Token",
1461
1346
  business: null,
1462
1347
  noCampaign: !1
@@ -1697,27 +1582,27 @@ const X = {
1697
1582
  type: "timeframe"
1698
1583
  }
1699
1584
  },
1700
- configs: o("STAMP", {
1585
+ configs: i("STAMP", {
1701
1586
  business: null,
1702
1587
  noCampaign: !1
1703
1588
  })
1704
1589
  }
1705
1590
  }
1706
1591
  };
1707
- t.scaffoldGroup(), o("STAMP", {
1592
+ t.scaffoldGroup(), i("STAMP", {
1708
1593
  business: null,
1709
1594
  noCampaign: !1
1710
1595
  });
1711
1596
  ({
1712
1597
  ...t.scaffoldGroup()
1713
- }, o("VOUCHER", {
1598
+ }, i("VOUCHER", {
1714
1599
  name: "",
1715
1600
  business: null,
1716
1601
  noCampaign: !1
1717
1602
  }));
1718
1603
  ({
1719
1604
  ...t.scaffoldGroup()
1720
- }, o("VOUCHER", {
1605
+ }, i("VOUCHER", {
1721
1606
  name: "",
1722
1607
  business: null,
1723
1608
  noCampaign: !1
@@ -1760,7 +1645,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1760
1645
  });
1761
1646
  ({
1762
1647
  ...t.scaffoldGroup()
1763
- }, o("VOUCHER", {
1648
+ }, i("VOUCHER", {
1764
1649
  name: "",
1765
1650
  business: null,
1766
1651
  noCampaign: !1
@@ -1806,14 +1691,14 @@ t.setRuleToGroup(
1806
1691
  "&&"
1807
1692
  )
1808
1693
  );
1809
- t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
1694
+ t.scaffoldGroup(), t.scaffoldGroup(), i("GAME", {
1810
1695
  name: "Token",
1811
1696
  business: null,
1812
1697
  noCampaign: !1
1813
1698
  });
1814
1699
  ({
1815
1700
  ...t.scaffoldGroup()
1816
- }, o("VOUCHER", {
1701
+ }, i("VOUCHER", {
1817
1702
  name: "",
1818
1703
  business: null,
1819
1704
  noCampaign: !1
@@ -1842,7 +1727,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1842
1727
  ],
1843
1728
  "&&"
1844
1729
  )
1845
- ]), o("VOUCHER", {
1730
+ ]), i("VOUCHER", {
1846
1731
  name: "",
1847
1732
  business: null,
1848
1733
  noCampaign: !1
@@ -1865,7 +1750,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
1865
1750
  ({
1866
1751
  ...t.scaffoldGroup()
1867
1752
  });
1868
- const Q = e.enum([
1753
+ const I = e.enum([
1869
1754
  "MEMBER_REWARD",
1870
1755
  "PAID_LOYALTY",
1871
1756
  "COLLECT_FEEDBACK",
@@ -1875,7 +1760,7 @@ const Q = e.enum([
1875
1760
  "BROADCAST",
1876
1761
  "BIRTHDAY",
1877
1762
  "GAME"
1878
- ]), J = e.enum([
1763
+ ]), L = e.enum([
1879
1764
  "text",
1880
1765
  "number",
1881
1766
  "textarea",
@@ -1902,95 +1787,95 @@ const Q = e.enum([
1902
1787
  "rule_feedback",
1903
1788
  "rule_birthday",
1904
1789
  "promotion_game_type"
1905
- ]), $ = e.object({
1790
+ ]), h = e.object({
1906
1791
  label: e.string().optional(),
1907
1792
  property: e.string().or(e.any()),
1908
- type: J,
1793
+ type: L,
1909
1794
  extras: e.string().optional(),
1910
1795
  isRuleChildren: e.boolean().optional()
1911
- }), Z = e.object({
1796
+ }), R = e.object({
1912
1797
  name: e.string().optional(),
1913
- fields: e.array($),
1798
+ fields: e.array(h),
1914
1799
  condition: e.object({
1915
1800
  not: e.boolean().optional(),
1916
1801
  property: e.string(),
1917
1802
  value: e.any()
1918
1803
  }).optional()
1919
- }), ee = e.object({
1804
+ }), C = e.object({
1920
1805
  name: e.string(),
1921
- groups: e.array(Z)
1806
+ groups: e.array(R)
1922
1807
  });
1923
1808
  e.object({
1924
- _id: c,
1809
+ _id: n,
1925
1810
  name: e.string(),
1926
1811
  description: e.string().nullish(),
1927
- steps: e.array(ee).min(1),
1928
- intention: e.array(Q),
1812
+ steps: e.array(C).min(1),
1813
+ intention: e.array(I),
1929
1814
  defaultValue: e.any()
1930
1815
  }).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
1931
- const te = {
1816
+ const x = {
1932
1817
  collectionName: "Businesses",
1933
1818
  transform: {
1934
1819
  _id: "oid"
1935
1820
  }
1936
1821
  };
1937
1822
  e.object({
1938
- _id: c,
1823
+ _id: n,
1939
1824
  ownerId: e.string(),
1940
1825
  name: e.string(),
1941
1826
  credit: e.number(),
1942
1827
  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([
1828
+ }).describe(o.describe(x));
1829
+ const m = e.enum(["PHONE"]), T = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), D = e.enum(["PENDING", "COMPLETED", "FAILED"]), S = e.enum([
1945
1830
  "General",
1946
1831
  "Otp",
1947
1832
  "Marketing",
1948
1833
  "Ordering",
1949
1834
  "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 = {
1835
+ ]), A = e.object({
1836
+ type: m
1837
+ }), s = A.extend({
1838
+ type: e.literal(m.enum.PHONE),
1839
+ provider: T,
1840
+ usage: S.optional()
1841
+ }), M = {
1957
1842
  collectionName: "Notifications",
1958
1843
  transform: { _id: "oid", business: "oid" }
1959
1844
  };
1960
1845
  e.object({
1961
- _id: c,
1962
- business: c,
1846
+ _id: n,
1847
+ business: n,
1963
1848
  target: e.string(),
1964
1849
  title: e.string().optional(),
1965
1850
  message: e.string(),
1966
- option: T,
1967
- status: ae,
1851
+ option: s,
1852
+ status: D,
1968
1853
  ref: e.string().optional()
1969
- }).describe(f.describe(pe));
1854
+ }).describe(o.describe(M));
1970
1855
  e.object({
1971
1856
  target: e.string(),
1972
1857
  title: e.string().optional(),
1973
1858
  message: e.string(),
1974
- option: T,
1859
+ option: s,
1975
1860
  ref: e.string().optional()
1976
1861
  });
1977
1862
  e.object({
1978
1863
  phone: e.string(),
1979
1864
  message: e.string()
1980
1865
  });
1981
- const C = e.object({
1866
+ const l = e.object({
1982
1867
  name: e.string(),
1983
1868
  address: e.string()
1984
- }), re = e.object({
1869
+ }), w = e.object({
1985
1870
  filename: e.string(),
1986
1871
  content: e.instanceof(Uint8Array)
1987
1872
  });
1988
1873
  e.object({
1989
- from: C,
1990
- to: e.array(C),
1874
+ from: l,
1875
+ to: e.array(l),
1991
1876
  subject: e.string(),
1992
1877
  html: e.string().optional(),
1993
- attachments: e.array(re).optional()
1878
+ attachments: e.array(w).optional()
1994
1879
  });
1995
1880
  e.object({
1996
1881
  subject: e.string(),
@@ -2023,15 +1908,15 @@ e.object({
2023
1908
  claimIds: e.array(e.string()),
2024
1909
  billId: e.string()
2025
1910
  });
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);
1911
+ var g = /* @__PURE__ */ ((a) => (a[a.feedMe = 0] = "feedMe", a[a.business = 1] = "business", a[a.restaurant = 2] = "restaurant", a))(g || {});
1912
+ e.nativeEnum(g);
2028
1913
  e.enum(["manage", "create", "read", "update", "delete"]);
2029
1914
  e.enum(["all", "restaurant", "business", "delivery", "agent"]);
2030
1915
  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);
1916
+ 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 || {});
1917
+ e.nativeEnum(d);
2033
1918
  e.enum(["restaurant"]);
2034
- const le = e.object({
1919
+ const N = e.object({
2035
1920
  label: e.string(),
2036
1921
  subject: e.union([e.string(), e.array(e.string())]),
2037
1922
  actions: e.union([e.string(), e.array(e.string())]),
@@ -2041,41 +1926,41 @@ const le = e.object({
2041
1926
  reason: e.string().optional()
2042
1927
  });
2043
1928
  e.object({
2044
- _id: c,
1929
+ _id: n,
2045
1930
  businessId: e.string(),
2046
1931
  userId: e.string(),
2047
1932
  email: e.string().nullish(),
2048
1933
  phoneNo: e.string().nullish(),
2049
- permissions: e.array(e.lazy(() => le))
1934
+ permissions: e.array(e.lazy(() => N))
2050
1935
  }).describe(
2051
- f.describe({
1936
+ o.describe({
2052
1937
  collectionName: "PermissionUsers",
2053
1938
  transform: {
2054
1939
  _id: "oid"
2055
1940
  }
2056
1941
  })
2057
1942
  );
2058
- const M = e.object({
1943
+ const y = e.object({
2059
1944
  userId: e.string(),
2060
1945
  level: e.number(),
2061
1946
  role: e.string().optional(),
2062
1947
  businessId: e.string().optional(),
2063
1948
  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())));
1949
+ }), U = e.function().args(e.any(), y).returns(e.boolean()), F = e.function().args(y).returns(e.promise(e.array(e.any())));
2065
1950
  e.object({
2066
- isAdmin: ce,
2067
- getRules: me
1951
+ isAdmin: U,
1952
+ getRules: F
2068
1953
  });
2069
1954
  e.object({
2070
- transactions: e.array(K),
2071
- collections: e.array(W)
1955
+ transactions: e.array(v),
1956
+ collections: e.array(E)
2072
1957
  });
2073
- const A = e.enum([
1958
+ const u = e.enum([
2074
1959
  "ROCK_PAPER_SCISSOR"
2075
1960
  ]);
2076
- A.enum.ROCK_PAPER_SCISSOR + "";
1961
+ u.enum.ROCK_PAPER_SCISSOR + "";
2077
1962
  e.object({
2078
- type: A
1963
+ type: u
2079
1964
  });
2080
1965
  e.object({
2081
1966
  host: e.string().url(),
@@ -2102,8 +1987,131 @@ e.object({
2102
1987
  phone: e.string().optional(),
2103
1988
  email: e.string().optional()
2104
1989
  });
1990
+ const P = e.enum([
1991
+ "PENDING",
1992
+ "SUCCESS",
1993
+ "FAILED",
1994
+ "RETRYING"
1995
+ ]), B = {
1996
+ collectionName: "WebhookLogs",
1997
+ transform: {
1998
+ _id: "oid",
1999
+ business: "oid"
2000
+ }
2001
+ };
2002
+ e.object({
2003
+ _id: n,
2004
+ business: n,
2005
+ type: e.string(),
2006
+ payload: e.record(e.any()),
2007
+ status: P,
2008
+ response: e.any().optional(),
2009
+ error: e.string().optional()
2010
+ }).describe(o.describe(B));
2011
+ const G = e.enum(["AUTO", "MANUAL"]);
2012
+ e.enum(["IN_PROGRESS", "COMPLETED"]);
2013
+ const f = e.object({
2014
+ _id: n,
2015
+ name: e.string().min(1, "Name is required").max(50),
2016
+ type: G,
2017
+ event: O.optional()
2018
+ }), H = e.object({
2019
+ from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
2020
+ to: e.number().int("Must be integer").nullish()
2021
+ }), V = e.object({
2022
+ threshold: H,
2023
+ rewards: e.array(n),
2024
+ pf_reward: e.array(c).optional()
2025
+ }), r = e.object({
2026
+ id: e.string(),
2027
+ name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
2028
+ rule: b.optional(),
2029
+ rewards: e.array(V)
2030
+ }), k = {
2031
+ collectionName: "ReferralRecords",
2032
+ transform: {
2033
+ _id: "oid",
2034
+ business: "oid",
2035
+ referer: "oid",
2036
+ referee: "oid",
2037
+ refereeReward: "oid"
2038
+ }
2039
+ }, j = e.object({
2040
+ completedAt: e.coerce.date(),
2041
+ criteria: n,
2042
+ ref: e.string()
2043
+ }), Y = e.object({
2044
+ _id: n,
2045
+ business: n,
2046
+ referer: n,
2047
+ referee: n,
2048
+ criteria: e.array(f),
2049
+ reward: e.array(r),
2050
+ refereeReward: e.array(n).optional(),
2051
+ criteria_progress: e.array(j),
2052
+ status: e.string(),
2053
+ pf_referer: p.optional(),
2054
+ pf_referee: p.optional(),
2055
+ pf_refereeReward: e.array(c).optional()
2056
+ }).describe(o.describe(k));
2057
+ Y.pick({
2058
+ _id: !0,
2059
+ business: !0,
2060
+ referer: !0,
2061
+ referee: !0,
2062
+ criteria_progress: !0,
2063
+ criteria: !0
2064
+ }).extend({
2065
+ pf_referee: p.pick({
2066
+ _id: !0,
2067
+ name: !0,
2068
+ phoneNumber: !0,
2069
+ photoUrl: !0
2070
+ })
2071
+ });
2072
+ const K = {
2073
+ collectionName: "ReferralProgram",
2074
+ transform: {
2075
+ _id: "oid",
2076
+ business: "oid"
2077
+ }
2078
+ }, _ = e.object({
2079
+ _id: n,
2080
+ business: n,
2081
+ term_and_condition: e.string().optional(),
2082
+ refereeReward: e.array(n).optional(),
2083
+ reward: e.array(r),
2084
+ criteria: e.array(f)
2085
+ }).describe(o.describe(K));
2086
+ e.object({
2087
+ referer: n,
2088
+ referee: n,
2089
+ business: n
2090
+ });
2091
+ e.object({
2092
+ program: _.pick({
2093
+ _id: !0,
2094
+ business: !0,
2095
+ term_and_condition: !0
2096
+ }).extend({
2097
+ reward: r.optional()
2098
+ }),
2099
+ referralCount: e.number(),
2100
+ successReferralCount: e.number(),
2101
+ referredBy: p.pick({
2102
+ _id: !0,
2103
+ name: !0,
2104
+ phoneNumber: !0,
2105
+ photoUrl: !0
2106
+ }).optional()
2107
+ });
2108
+ _.extend({
2109
+ updateReferralRecord: e.boolean().optional()
2110
+ });
2105
2111
  export {
2106
- Q as F,
2107
- ve as T,
2108
- _e as _
2112
+ I as F,
2113
+ ee as T,
2114
+ V as a,
2115
+ f as b,
2116
+ r as c
2109
2117
  };
@@ -1,4 +1,4 @@
1
- import { g as t, S as n, b as u } from "./index-RP0XOPRL.js";
1
+ import { g as t, S as n, b as u } from "./index-BIs-Ed1-.js";
2
2
  const a = () => {
3
3
  const e = n.getBusinessId();
4
4
  if (!e) throw new Error("Invalid business ID");
@@ -45,6 +45,12 @@ const a = () => {
45
45
  await a().put("store/bundle", e)
46
46
  );
47
47
  },
48
+ async sendBundle(e) {
49
+ return t(await a().post("store/bundle/send", e));
50
+ },
51
+ async refundStoreTransaction(e) {
52
+ return t(await a().post("store/refund", e));
53
+ },
48
54
  async readRewards() {
49
55
  return t(await a().get("rewards"));
50
56
  },
@@ -81,6 +87,12 @@ const a = () => {
81
87
  await a().post("/cards", e)
82
88
  );
83
89
  },
90
+ async updateCard(e) {
91
+ return t(await a().put("cards", e));
92
+ },
93
+ async deleteCard(e) {
94
+ return t(await a().delete(`cards/${e}`));
95
+ },
84
96
  async updateReward(e, r) {
85
97
  return t(
86
98
  await a().put(`rewards/${e}`, r)
@@ -1,4 +1,4 @@
1
- import { g as e, S as n, b as o } from "./index-RP0XOPRL.js";
1
+ import { g as e, S as n, b as o } from "./index-BIs-Ed1-.js";
2
2
  const t = () => {
3
3
  const a = n.getBusinessId();
4
4
  if (!a) throw new Error("Invalid business ID");