@feedmepos/mf-connect 0.1.0-beta.15 → 0.1.0-beta.17
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.
- package/dist/Analytic-BvsvVIaJ.js +424 -0
- package/dist/{App-BeD6_T_Z.js → App-B6i-kTvi.js} +40 -36
- package/dist/{Broadcast-Di-DP7MU.js → Broadcast-BMNY7jfz.js} +32 -32
- package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BszRUIC8.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Cl-VwkQw.js} +9 -8
- package/dist/Card-BUxMxMv3.js +685 -0
- package/dist/{Collections-kplzfC-n.js → Collections-fJ4dAA8O.js} +10 -9
- package/dist/{Credit-DrZdTG27.js → Credit-DeLJMW7U.js} +14 -14
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-KB_zk3f0.js +2199 -0
- package/dist/{EffectSheet.vue_vue_type_style_index_0_lang-DE7rq_ro.js → EffectSheet.vue_vue_type_style_index_0_lang-Dy2q_1Kh.js} +8 -8
- package/dist/{Experience-BQz_RASv.js → Experience-DNlf2fYa.js} +8 -8
- package/dist/{Game-C5RUfcwo.js → Game-BXj3DErV.js} +15 -15
- package/dist/Index-FMFz2f9Z.js +218 -0
- package/dist/{Marketing-Ca00_q-k.js → Marketing-C8OjZOr2.js} +5 -5
- package/dist/{Member-B-9P7bbG.js → Member-BgwbYQrK.js} +4 -4
- package/dist/{MemberList-DoAOs_FC.js → MemberList-DMQUG_Kt.js} +251 -246
- package/dist/{MemberTransactions-D-qjANZL.js → MemberTransactions-CQO2cHn6.js} +1 -1
- package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-DgWXNnd_.js → MessageInput.vue_vue_type_script_setup_true_lang-Ds_BwKa6.js} +2 -2
- package/dist/{Mission-DrKEtkuB.js → Mission-rHomcJXG.js} +15 -15
- package/dist/Overview-CmwJjXeT.js +864 -0
- package/dist/{Point-vO06ComP.js → Point-Du07BO13.js} +15 -15
- package/dist/{Promotion-DiJLB7iq.js → Promotion-B1gbbfk2.js} +53 -47
- package/dist/Record-0GtBWXRO.js +178 -0
- package/dist/Reward-aH7S8WL3.js +375 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-XdyqSqlC.js +138 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-E7ADhGR7.js +1597 -0
- package/dist/{Segment-x3OLFugO.js → Segment-Ci4BDnan.js} +65 -64
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-I2KT0px7.js +181 -0
- package/dist/{Setting-C27PXvat.js → Setting-Dc9rLPuI.js} +8 -8
- package/dist/{Store-Dn2A_coC.js → Store-B94H-jff.js} +13 -13
- package/dist/{StoreRewards-CZMCXl-k.js → StoreRewards-Cho91MDd.js} +12 -12
- package/dist/{StoreTransactions.vue_vue_type_script_setup_true_lang-DMsmMCOw.js → StoreTransactions.vue_vue_type_script_setup_true_lang-CDiZz1AW.js} +10 -10
- package/dist/{TargetLocationInput.vue_vue_type_script_setup_true_lang-j8UbHQpT.js → TargetLocationInput.vue_vue_type_script_setup_true_lang-BmEP5mI5.js} +1 -1
- package/dist/{Tier-BnbE3qLA.js → Tier-DO9pTl_C.js} +15 -15
- package/dist/{Title-BAGSqm5D.js → Title-CgQD-_3y.js} +15 -15
- package/dist/{Transaction-DWvA09mr.js → Transaction-DPmvpR7n.js} +2 -2
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CJa-Tkws.js +130 -0
- package/dist/{Voucher-CLgdPRSd.js → Voucher-Bq5Ev_fv.js} +31 -31
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DeQTAvCe.js +419 -0
- package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-DweS66z_.js → ZodTextField.vue_vue_type_script_setup_true_lang-DLFDd3Y3.js} +1 -1
- package/dist/{app-CEoOXnMP.js → app-BT6qeigc.js} +509 -391
- package/dist/{app-DbEoLwS2.js → app-CtaeuBcs.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{business-DIsK1ZSi.js → business-Db2WFn9o.js} +1 -1
- package/dist/{campaign-DilFl2u4.js → campaign-Bo2jmBiD.js} +2 -2
- package/dist/collectible.enum-BR9zmyJv.js +19 -0
- package/dist/{collection.fn-DOGveN-U.js → collection.fn-Drj_6HD1.js} +2 -2
- package/dist/{dto-D146MexX.js → dto-BH8EtK7z.js} +54 -54
- package/dist/{effect-BAoY-7Mo.js → effect-l8oNjQBm.js} +1 -1
- package/dist/{email-addresses-D4ptdJi7.js → email-addresses-CBqWAs9Z.js} +1 -1
- package/dist/{export-ZdS0ijA0.js → export-D6S3dr04.js} +3 -3
- package/dist/{helper-CYBvYPRB.js → helper-CS2Hx33Q.js} +1 -1
- package/dist/{index-sJUCCkLn.js → index-5mZIFDhm.js} +21 -17
- package/dist/{index-D5OipTW2.js → index-BfhjAqeE.js} +3 -3
- package/dist/{index-Dw-QQGVh.js → index-Bj5M_at2.js} +1 -1
- package/dist/{index-BJNzAvF6.js → index-BsfC7C2D.js} +1 -1
- package/dist/{index-Dwsdu9aR.js → index-C7kr1TMO.js} +209 -116
- package/dist/{index-CBd5MdRb.js → index-CATw-eQI.js} +1348 -1342
- package/dist/{index-VOFTSIqj.js → index-CVfN0Gmc.js} +2 -2
- package/dist/{index-r3--ddX3.js → index-CXEJbUAO.js} +1 -1
- package/dist/{index-fSC0-_uQ.js → index-CmN2dQk5.js} +55 -44
- package/dist/index-Ct847l9G.js +50 -0
- package/dist/index-D2d2rTPz.js +38 -0
- package/dist/{index-CyvTJWa0.js → index-DVryx2wz.js} +1 -1
- package/dist/{index-DXwoelMh.js → index-XoOcBFvx.js} +39 -35
- package/dist/{index-RKVC43XB.js → index-Z61r-lWj.js} +1 -1
- package/dist/{index.esm2017-ClQvLeXO.js → index.esm2017-Dg7M2BO7.js} +1 -1
- package/dist/{loading-DyvR-Q2q.js → loading-DxWIhKJX.js} +156 -153
- package/dist/{membership-DjHOR91O.js → membership-Df7gtzWJ.js} +51 -43
- package/dist/{money-C9nfcrN2.js → money-Ck4ZGH4F.js} +1 -1
- package/dist/{number-BH4v9H5s.js → number-D8umDJ-5.js} +1 -1
- package/dist/objectid-BGnepAUg.js +145 -0
- package/dist/reward-5b5G4KYr.js +36 -0
- package/dist/{rule-DdzmxL5G.js → rule-BcLntzKp.js} +4 -3
- package/dist/{rule-builder-C3LgxTPd.js → rule-builder-B_RDlrnZ.js} +1 -1
- package/dist/{template-CTOkKogt.js → template-C-myFW3k.js} +4 -4
- package/dist/trigger-CAK3-5M9.js +114 -0
- package/dist/usePagination-BeF5K3M7.js +223 -0
- package/dist/{vue-i18n-Dw456kF3.js → vue-i18n-BC0lAbnG.js} +248 -248
- package/dist/{usePagination-BLsmsO5l.js → xlsx-DNZb1t3l.js} +2962 -3183
- package/package.json +1 -1
- package/dist/Analytic-BudPZ7yo.js +0 -622
- package/dist/Card-BSUIJ4V3.js +0 -824
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DTxdtvAX.js +0 -2816
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BO8_N-Hl.js +0 -1762
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { z as e, F as
|
|
3
|
-
import "./index-
|
|
4
|
-
import { R as t } from "./rule-builder-
|
|
5
|
-
import { i as
|
|
6
|
-
import { d as
|
|
7
|
-
|
|
1
|
+
import { defineComponent as k, ref as j, resolveComponent as g, openBlock as r, createBlock as L, unref as h, withCtx as d, renderSlot as x, createElementBlock as y, toDisplayString as f, createCommentVNode as Y, createVNode as C, normalizeClass as R, createElementVNode as K, Fragment as W, renderList as X } from "vue";
|
|
2
|
+
import { z as e, F as a, m as l } from "./loading-DxWIhKJX.js";
|
|
3
|
+
import { c as q } from "./index-CATw-eQI.js";
|
|
4
|
+
import { R as t } from "./rule-builder-B_RDlrnZ.js";
|
|
5
|
+
import { i as p } from "./helper-CS2Hx33Q.js";
|
|
6
|
+
import { d as z, e as Q } from "./index-5mZIFDhm.js";
|
|
7
|
+
import { n as J } from "./index-CmN2dQk5.js";
|
|
8
|
+
import { F as $ } from "./index-Ct847l9G.js";
|
|
9
|
+
import { b as _ } from "./index-XoOcBFvx.js";
|
|
10
|
+
const Z = {
|
|
8
11
|
key: 0,
|
|
9
12
|
class: "fm-typo-en-body-lg-400 mb-4"
|
|
10
|
-
},
|
|
13
|
+
}, ee = {
|
|
11
14
|
key: 1,
|
|
12
15
|
class: "fm-typo-en-body-lg-400"
|
|
13
|
-
},
|
|
16
|
+
}, te = { class: "rounded-md bg-white shadow-md max-h-[300px] overflow-y-scroll pl-4 py-12" }, Ue = /* @__PURE__ */ k({
|
|
14
17
|
__name: "CustomSelect",
|
|
15
18
|
props: {
|
|
16
19
|
label: {
|
|
@@ -36,66 +39,66 @@ const X = {
|
|
|
36
39
|
}
|
|
37
40
|
},
|
|
38
41
|
emits: ["update:model-value"],
|
|
39
|
-
setup(n, { emit:
|
|
40
|
-
const
|
|
41
|
-
return (
|
|
42
|
-
const
|
|
43
|
-
return r(),
|
|
44
|
-
"show-popover":
|
|
45
|
-
onPopoverChanged:
|
|
42
|
+
setup(n, { emit: U }) {
|
|
43
|
+
const v = U, s = j(!1);
|
|
44
|
+
return (E, O) => {
|
|
45
|
+
const P = g("FmIcon"), B = g("FmField"), G = g("FmMenuItem"), V = g("FmPopover");
|
|
46
|
+
return r(), L(V, {
|
|
47
|
+
"show-popover": h(s),
|
|
48
|
+
onPopoverChanged: O[0] || (O[0] = (i) => s.value = i),
|
|
46
49
|
"z-index": n.zIndex
|
|
47
50
|
}, {
|
|
48
|
-
"popover-button":
|
|
49
|
-
|
|
50
|
-
n.label ? (r(),
|
|
51
|
-
|
|
52
|
-
append:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
name:
|
|
51
|
+
"popover-button": d(() => [
|
|
52
|
+
x(E.$slots, "popover-button", {}, () => [
|
|
53
|
+
n.label ? (r(), y("div", Z, f(n.label), 1)) : Y("", !0),
|
|
54
|
+
C(B, null, {
|
|
55
|
+
append: d(() => [
|
|
56
|
+
x(E.$slots, "append"),
|
|
57
|
+
C(P, {
|
|
58
|
+
name: h(s) ? "expand_less" : "expand_more",
|
|
56
59
|
size: "md",
|
|
57
60
|
color: "black"
|
|
58
61
|
}, null, 8, ["name"])
|
|
59
62
|
]),
|
|
60
|
-
default:
|
|
61
|
-
var
|
|
63
|
+
default: d(() => {
|
|
64
|
+
var i;
|
|
62
65
|
return [
|
|
63
|
-
n.multiselect ? (r(),
|
|
64
|
-
var
|
|
65
|
-
return (
|
|
66
|
-
}).map((
|
|
66
|
+
n.multiselect ? (r(), y("div", ee, f(n.items.filter((o) => {
|
|
67
|
+
var c;
|
|
68
|
+
return (c = n.modelValue) == null ? void 0 : c.includes(o.value);
|
|
69
|
+
}).map((o) => o.label).join(", ")), 1)) : (r(), y("div", {
|
|
67
70
|
key: 0,
|
|
68
|
-
class:
|
|
71
|
+
class: R(["fm-typo-en-body-lg-400", {
|
|
69
72
|
"text-fm-color-typo-secondary": !n.items.find(
|
|
70
|
-
(
|
|
73
|
+
(o) => o.value == n.modelValue
|
|
71
74
|
)
|
|
72
75
|
}])
|
|
73
|
-
}, f(((
|
|
76
|
+
}, f(((i = n.items.find((o) => o.value == n.modelValue)) == null ? void 0 : i.label) || n.placeholder), 3))
|
|
74
77
|
];
|
|
75
78
|
}),
|
|
76
79
|
_: 3
|
|
77
80
|
})
|
|
78
81
|
])
|
|
79
82
|
]),
|
|
80
|
-
default:
|
|
81
|
-
|
|
82
|
-
(r(!0),
|
|
83
|
-
var
|
|
84
|
-
return r(),
|
|
85
|
-
class:
|
|
83
|
+
default: d(() => [
|
|
84
|
+
K("div", te, [
|
|
85
|
+
(r(!0), y(W, null, X(n.items, (i) => {
|
|
86
|
+
var o, c;
|
|
87
|
+
return r(), L(G, {
|
|
88
|
+
class: R(`${n.multiselect ? (o = n.modelValue) != null && o.some((m) => m == i.value) ? "bg-fm-color-system-warning-100" : "" : n.modelValue == i.value}`),
|
|
86
89
|
"has-checkbox": n.multiselect,
|
|
87
|
-
key:
|
|
88
|
-
"model-value": n.multiselect ? (
|
|
89
|
-
label:
|
|
90
|
-
onClick: (
|
|
91
|
-
var
|
|
92
|
-
if (
|
|
93
|
-
|
|
90
|
+
key: i.value,
|
|
91
|
+
"model-value": n.multiselect ? (c = n.modelValue) == null ? void 0 : c.some((m) => m == i.value) : n.modelValue == i.value,
|
|
92
|
+
label: i.label,
|
|
93
|
+
onClick: (m) => {
|
|
94
|
+
var I;
|
|
95
|
+
if (m.stopPropagation(), !n.multiselect)
|
|
96
|
+
s.value = !1, v("update:model-value", i.value);
|
|
94
97
|
else {
|
|
95
|
-
const
|
|
96
|
-
|
|
98
|
+
const H = (I = n.modelValue) == null ? void 0 : I.some((u) => u == i.value);
|
|
99
|
+
v(
|
|
97
100
|
"update:model-value",
|
|
98
|
-
|
|
101
|
+
H ? (n.modelValue ?? []).filter((u) => u !== i.value) : [...n.modelValue ?? [], i.value]
|
|
99
102
|
);
|
|
100
103
|
}
|
|
101
104
|
}
|
|
@@ -107,7 +110,7 @@ const X = {
|
|
|
107
110
|
}, 8, ["show-popover", "z-index"]);
|
|
108
111
|
};
|
|
109
112
|
}
|
|
110
|
-
}),
|
|
113
|
+
}), Pe = {
|
|
111
114
|
PROMOTION: {
|
|
112
115
|
name: "Promotion Template",
|
|
113
116
|
description: "Promotion template for campaign creation.",
|
|
@@ -502,7 +505,7 @@ const X = {
|
|
|
502
505
|
// },
|
|
503
506
|
hideInApp: !0
|
|
504
507
|
},
|
|
505
|
-
configs:
|
|
508
|
+
configs: p("VOUCHER", {
|
|
506
509
|
name: "",
|
|
507
510
|
business: null,
|
|
508
511
|
noCampaign: !1
|
|
@@ -1216,7 +1219,9 @@ const X = {
|
|
|
1216
1219
|
amount: 1
|
|
1217
1220
|
},
|
|
1218
1221
|
config: {
|
|
1219
|
-
validityOption: {
|
|
1222
|
+
validityOption: {
|
|
1223
|
+
validForDay: 1
|
|
1224
|
+
}
|
|
1220
1225
|
}
|
|
1221
1226
|
}
|
|
1222
1227
|
}
|
|
@@ -1440,7 +1445,7 @@ const X = {
|
|
|
1440
1445
|
rewards: []
|
|
1441
1446
|
}
|
|
1442
1447
|
},
|
|
1443
|
-
configs:
|
|
1448
|
+
configs: p("GAME", {
|
|
1444
1449
|
name: "Token",
|
|
1445
1450
|
business: null,
|
|
1446
1451
|
noCampaign: !1
|
|
@@ -1681,27 +1686,27 @@ const X = {
|
|
|
1681
1686
|
type: "timeframe"
|
|
1682
1687
|
}
|
|
1683
1688
|
},
|
|
1684
|
-
configs:
|
|
1689
|
+
configs: p("STAMP", {
|
|
1685
1690
|
business: null,
|
|
1686
1691
|
noCampaign: !1
|
|
1687
1692
|
})
|
|
1688
1693
|
}
|
|
1689
1694
|
}
|
|
1690
1695
|
};
|
|
1691
|
-
t.scaffoldGroup(),
|
|
1696
|
+
t.scaffoldGroup(), p("STAMP", {
|
|
1692
1697
|
business: null,
|
|
1693
1698
|
noCampaign: !1
|
|
1694
1699
|
});
|
|
1695
1700
|
({
|
|
1696
1701
|
...t.scaffoldGroup()
|
|
1697
|
-
},
|
|
1702
|
+
}, p("VOUCHER", {
|
|
1698
1703
|
name: "",
|
|
1699
1704
|
business: null,
|
|
1700
1705
|
noCampaign: !1
|
|
1701
1706
|
}));
|
|
1702
1707
|
({
|
|
1703
1708
|
...t.scaffoldGroup()
|
|
1704
|
-
},
|
|
1709
|
+
}, p("VOUCHER", {
|
|
1705
1710
|
name: "",
|
|
1706
1711
|
business: null,
|
|
1707
1712
|
noCampaign: !1
|
|
@@ -1744,7 +1749,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1744
1749
|
});
|
|
1745
1750
|
({
|
|
1746
1751
|
...t.scaffoldGroup()
|
|
1747
|
-
},
|
|
1752
|
+
}, p("VOUCHER", {
|
|
1748
1753
|
name: "",
|
|
1749
1754
|
business: null,
|
|
1750
1755
|
noCampaign: !1
|
|
@@ -1790,14 +1795,14 @@ t.setRuleToGroup(
|
|
|
1790
1795
|
"&&"
|
|
1791
1796
|
)
|
|
1792
1797
|
);
|
|
1793
|
-
t.scaffoldGroup(), t.scaffoldGroup(),
|
|
1798
|
+
t.scaffoldGroup(), t.scaffoldGroup(), p("GAME", {
|
|
1794
1799
|
name: "Token",
|
|
1795
1800
|
business: null,
|
|
1796
1801
|
noCampaign: !1
|
|
1797
1802
|
});
|
|
1798
1803
|
({
|
|
1799
1804
|
...t.scaffoldGroup()
|
|
1800
|
-
},
|
|
1805
|
+
}, p("VOUCHER", {
|
|
1801
1806
|
name: "",
|
|
1802
1807
|
business: null,
|
|
1803
1808
|
noCampaign: !1
|
|
@@ -1826,7 +1831,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1826
1831
|
],
|
|
1827
1832
|
"&&"
|
|
1828
1833
|
)
|
|
1829
|
-
]),
|
|
1834
|
+
]), p("VOUCHER", {
|
|
1830
1835
|
name: "",
|
|
1831
1836
|
business: null,
|
|
1832
1837
|
noCampaign: !1
|
|
@@ -1849,7 +1854,7 @@ t.setRuleToGroup(t.scaffoldGroup(), [
|
|
|
1849
1854
|
({
|
|
1850
1855
|
...t.scaffoldGroup()
|
|
1851
1856
|
});
|
|
1852
|
-
const
|
|
1857
|
+
const ne = e.enum([
|
|
1853
1858
|
"MEMBER_REWARD",
|
|
1854
1859
|
"PAID_LOYALTY",
|
|
1855
1860
|
"COLLECT_FEEDBACK",
|
|
@@ -1859,7 +1864,7 @@ const Q = e.enum([
|
|
|
1859
1864
|
"BROADCAST",
|
|
1860
1865
|
"BIRTHDAY",
|
|
1861
1866
|
"GAME"
|
|
1862
|
-
]),
|
|
1867
|
+
]), ae = e.enum([
|
|
1863
1868
|
"text",
|
|
1864
1869
|
"number",
|
|
1865
1870
|
"textarea",
|
|
@@ -1886,71 +1891,71 @@ const Q = e.enum([
|
|
|
1886
1891
|
"rule_feedback",
|
|
1887
1892
|
"rule_birthday",
|
|
1888
1893
|
"promotion_game_type"
|
|
1889
|
-
]),
|
|
1894
|
+
]), ie = e.object({
|
|
1890
1895
|
label: e.string().optional(),
|
|
1891
1896
|
property: e.string().or(e.any()),
|
|
1892
|
-
type:
|
|
1897
|
+
type: ae,
|
|
1893
1898
|
extras: e.string().optional(),
|
|
1894
1899
|
isRuleChildren: e.boolean().optional()
|
|
1895
|
-
}),
|
|
1900
|
+
}), oe = e.object({
|
|
1896
1901
|
name: e.string().optional(),
|
|
1897
|
-
fields: e.array(
|
|
1902
|
+
fields: e.array(ie),
|
|
1898
1903
|
condition: e.object({
|
|
1899
1904
|
not: e.boolean().optional(),
|
|
1900
1905
|
property: e.string(),
|
|
1901
1906
|
value: e.any()
|
|
1902
1907
|
}).optional()
|
|
1903
|
-
}),
|
|
1908
|
+
}), pe = e.object({
|
|
1904
1909
|
name: e.string(),
|
|
1905
|
-
groups: e.array(
|
|
1910
|
+
groups: e.array(oe)
|
|
1906
1911
|
});
|
|
1907
1912
|
e.object({
|
|
1908
|
-
_id:
|
|
1913
|
+
_id: a,
|
|
1909
1914
|
name: e.string(),
|
|
1910
1915
|
description: e.string().nullish(),
|
|
1911
|
-
steps: e.array(
|
|
1912
|
-
intention: e.array(
|
|
1916
|
+
steps: e.array(pe).min(1),
|
|
1917
|
+
intention: e.array(ne),
|
|
1913
1918
|
defaultValue: e.any()
|
|
1914
1919
|
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
1915
|
-
const
|
|
1920
|
+
const re = {
|
|
1916
1921
|
collectionName: "Businesses",
|
|
1917
1922
|
transform: {
|
|
1918
1923
|
_id: "oid"
|
|
1919
1924
|
}
|
|
1920
1925
|
};
|
|
1921
1926
|
e.object({
|
|
1922
|
-
_id:
|
|
1927
|
+
_id: a,
|
|
1923
1928
|
ownerId: e.string(),
|
|
1924
1929
|
name: e.string(),
|
|
1925
1930
|
credit: e.number(),
|
|
1926
1931
|
forceSend: e.boolean().optional()
|
|
1927
|
-
}).describe(
|
|
1928
|
-
const S = e.enum(["PHONE"]),
|
|
1932
|
+
}).describe(l.describe(re));
|
|
1933
|
+
const S = e.enum(["PHONE"]), le = e.enum(["MOCEAN", "SLACK", "SMS", "EMAIL"]), ce = e.enum(["PENDING", "COMPLETED", "FAILED"]), me = e.enum([
|
|
1929
1934
|
"General",
|
|
1930
1935
|
"Otp",
|
|
1931
1936
|
"Marketing",
|
|
1932
1937
|
"Ordering",
|
|
1933
1938
|
"MemberInvitation"
|
|
1934
|
-
]),
|
|
1939
|
+
]), se = e.object({
|
|
1935
1940
|
type: S
|
|
1936
|
-
}), D =
|
|
1941
|
+
}), D = se.extend({
|
|
1937
1942
|
type: e.literal(S.enum.PHONE),
|
|
1938
|
-
provider:
|
|
1939
|
-
usage:
|
|
1940
|
-
}),
|
|
1943
|
+
provider: le,
|
|
1944
|
+
usage: me.optional()
|
|
1945
|
+
}), ge = {
|
|
1941
1946
|
collectionName: "Notifications",
|
|
1942
1947
|
transform: { _id: "oid", business: "oid" }
|
|
1943
1948
|
};
|
|
1944
1949
|
e.object({
|
|
1945
|
-
_id:
|
|
1946
|
-
business:
|
|
1950
|
+
_id: a,
|
|
1951
|
+
business: a,
|
|
1947
1952
|
target: e.string(),
|
|
1948
1953
|
title: e.string().optional(),
|
|
1949
1954
|
message: e.string(),
|
|
1950
1955
|
option: D,
|
|
1951
|
-
status:
|
|
1956
|
+
status: ce,
|
|
1952
1957
|
ref: e.string().optional()
|
|
1953
|
-
}).describe(
|
|
1958
|
+
}).describe(l.describe(ge));
|
|
1954
1959
|
e.object({
|
|
1955
1960
|
target: e.string(),
|
|
1956
1961
|
title: e.string().optional(),
|
|
@@ -1962,19 +1967,19 @@ e.object({
|
|
|
1962
1967
|
phone: e.string(),
|
|
1963
1968
|
message: e.string()
|
|
1964
1969
|
});
|
|
1965
|
-
const
|
|
1970
|
+
const T = e.object({
|
|
1966
1971
|
name: e.string(),
|
|
1967
1972
|
address: e.string()
|
|
1968
|
-
}),
|
|
1973
|
+
}), de = e.object({
|
|
1969
1974
|
filename: e.string(),
|
|
1970
1975
|
content: e.instanceof(Uint8Array)
|
|
1971
1976
|
});
|
|
1972
1977
|
e.object({
|
|
1973
|
-
from:
|
|
1974
|
-
to: e.array(
|
|
1978
|
+
from: T,
|
|
1979
|
+
to: e.array(T),
|
|
1975
1980
|
subject: e.string(),
|
|
1976
1981
|
html: e.string().optional(),
|
|
1977
|
-
attachments: e.array(
|
|
1982
|
+
attachments: e.array(de).optional()
|
|
1978
1983
|
});
|
|
1979
1984
|
e.object({
|
|
1980
1985
|
subject: e.string(),
|
|
@@ -2007,15 +2012,15 @@ e.object({
|
|
|
2007
2012
|
claimIds: e.array(e.string()),
|
|
2008
2013
|
billId: e.string()
|
|
2009
2014
|
});
|
|
2010
|
-
var
|
|
2011
|
-
e.nativeEnum(
|
|
2015
|
+
var A = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(A || {});
|
|
2016
|
+
e.nativeEnum(A);
|
|
2012
2017
|
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2013
2018
|
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2014
2019
|
e.enum(["quota"]);
|
|
2015
|
-
var
|
|
2016
|
-
e.nativeEnum(
|
|
2020
|
+
var M = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(M || {});
|
|
2021
|
+
e.nativeEnum(M);
|
|
2017
2022
|
e.enum(["restaurant"]);
|
|
2018
|
-
const
|
|
2023
|
+
const ye = e.object({
|
|
2019
2024
|
label: e.string(),
|
|
2020
2025
|
subject: e.union([e.string(), e.array(e.string())]),
|
|
2021
2026
|
actions: e.union([e.string(), e.array(e.string())]),
|
|
@@ -2025,41 +2030,41 @@ const le = e.object({
|
|
|
2025
2030
|
reason: e.string().optional()
|
|
2026
2031
|
});
|
|
2027
2032
|
e.object({
|
|
2028
|
-
_id:
|
|
2033
|
+
_id: a,
|
|
2029
2034
|
businessId: e.string(),
|
|
2030
2035
|
userId: e.string(),
|
|
2031
2036
|
email: e.string().nullish(),
|
|
2032
2037
|
phoneNo: e.string().nullish(),
|
|
2033
|
-
permissions: e.array(e.lazy(() =>
|
|
2038
|
+
permissions: e.array(e.lazy(() => ye))
|
|
2034
2039
|
}).describe(
|
|
2035
|
-
|
|
2040
|
+
l.describe({
|
|
2036
2041
|
collectionName: "PermissionUsers",
|
|
2037
2042
|
transform: {
|
|
2038
2043
|
_id: "oid"
|
|
2039
2044
|
}
|
|
2040
2045
|
})
|
|
2041
2046
|
);
|
|
2042
|
-
const
|
|
2047
|
+
const w = e.object({
|
|
2043
2048
|
userId: e.string(),
|
|
2044
2049
|
level: e.number(),
|
|
2045
2050
|
role: e.string().optional(),
|
|
2046
2051
|
businessId: e.string().optional(),
|
|
2047
2052
|
restaurantId: e.string().optional()
|
|
2048
|
-
}),
|
|
2053
|
+
}), ue = e.function().args(e.any(), w).returns(e.boolean()), fe = e.function().args(w).returns(e.promise(e.array(e.any())));
|
|
2049
2054
|
e.object({
|
|
2050
|
-
isAdmin:
|
|
2051
|
-
getRules:
|
|
2055
|
+
isAdmin: ue,
|
|
2056
|
+
getRules: fe
|
|
2052
2057
|
});
|
|
2053
2058
|
e.object({
|
|
2054
|
-
transactions: e.array(
|
|
2055
|
-
collections: e.array(
|
|
2059
|
+
transactions: e.array(z),
|
|
2060
|
+
collections: e.array(Q)
|
|
2056
2061
|
});
|
|
2057
|
-
const
|
|
2062
|
+
const N = e.enum([
|
|
2058
2063
|
"ROCK_PAPER_SCISSOR"
|
|
2059
2064
|
]);
|
|
2060
|
-
|
|
2065
|
+
N.enum.ROCK_PAPER_SCISSOR + "";
|
|
2061
2066
|
e.object({
|
|
2062
|
-
type:
|
|
2067
|
+
type: N
|
|
2063
2068
|
});
|
|
2064
2069
|
e.object({
|
|
2065
2070
|
host: e.string().url(),
|
|
@@ -2086,12 +2091,12 @@ e.object({
|
|
|
2086
2091
|
phone: e.string().optional(),
|
|
2087
2092
|
email: e.string().optional()
|
|
2088
2093
|
});
|
|
2089
|
-
const
|
|
2094
|
+
const _e = e.enum([
|
|
2090
2095
|
"PENDING",
|
|
2091
2096
|
"SUCCESS",
|
|
2092
2097
|
"FAILED",
|
|
2093
2098
|
"RETRYING"
|
|
2094
|
-
]),
|
|
2099
|
+
]), be = {
|
|
2095
2100
|
collectionName: "WebhookLogs",
|
|
2096
2101
|
transform: {
|
|
2097
2102
|
_id: "oid",
|
|
@@ -2099,16 +2104,104 @@ const se = e.enum([
|
|
|
2099
2104
|
}
|
|
2100
2105
|
};
|
|
2101
2106
|
e.object({
|
|
2102
|
-
_id:
|
|
2103
|
-
business:
|
|
2107
|
+
_id: a,
|
|
2108
|
+
business: a,
|
|
2104
2109
|
type: e.string(),
|
|
2105
2110
|
payload: e.record(e.any()),
|
|
2106
|
-
status:
|
|
2111
|
+
status: _e,
|
|
2107
2112
|
response: e.any().optional(),
|
|
2108
2113
|
error: e.string().optional()
|
|
2109
|
-
}).describe(
|
|
2114
|
+
}).describe(l.describe(be));
|
|
2115
|
+
const ve = e.enum(["AUTO", "MANUAL"]);
|
|
2116
|
+
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2117
|
+
const F = e.object({
|
|
2118
|
+
_id: a,
|
|
2119
|
+
name: e.string().min(1, "Name is required").max(50),
|
|
2120
|
+
type: ve,
|
|
2121
|
+
event: J.optional()
|
|
2122
|
+
}), Ee = e.object({
|
|
2123
|
+
from: e.number().int("Must be integer").min(0, "Threshold need to be at least 0"),
|
|
2124
|
+
to: e.number().int("Must be integer").nullish()
|
|
2125
|
+
}), Oe = e.object({
|
|
2126
|
+
threshold: Ee,
|
|
2127
|
+
rewards: e.array(a),
|
|
2128
|
+
pf_reward: e.array($).optional()
|
|
2129
|
+
}), b = e.object({
|
|
2130
|
+
id: e.string(),
|
|
2131
|
+
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2132
|
+
rule: q.optional(),
|
|
2133
|
+
rewards: e.array(Oe)
|
|
2134
|
+
}), Ie = {
|
|
2135
|
+
collectionName: "ReferralRecords",
|
|
2136
|
+
transform: {
|
|
2137
|
+
_id: "oid",
|
|
2138
|
+
business: "oid",
|
|
2139
|
+
referer: "oid",
|
|
2140
|
+
referee: "oid"
|
|
2141
|
+
}
|
|
2142
|
+
}, Le = e.object({
|
|
2143
|
+
completedAt: e.date(),
|
|
2144
|
+
criteria: a,
|
|
2145
|
+
ref: e.string()
|
|
2146
|
+
}), he = e.object({
|
|
2147
|
+
_id: a,
|
|
2148
|
+
business: a,
|
|
2149
|
+
referer: a,
|
|
2150
|
+
referee: a,
|
|
2151
|
+
criteria: e.array(F),
|
|
2152
|
+
reward: e.array(b),
|
|
2153
|
+
criteria_progress: e.array(Le),
|
|
2154
|
+
status: e.string(),
|
|
2155
|
+
pf_referer: _.optional(),
|
|
2156
|
+
pf_referee: _.optional()
|
|
2157
|
+
}).describe(l.describe(Ie));
|
|
2158
|
+
he.pick({
|
|
2159
|
+
_id: !0,
|
|
2160
|
+
business: !0,
|
|
2161
|
+
referer: !0,
|
|
2162
|
+
referee: !0
|
|
2163
|
+
}).extend({
|
|
2164
|
+
pf_referee: _.pick({
|
|
2165
|
+
_id: !0,
|
|
2166
|
+
name: !0,
|
|
2167
|
+
phoneNumber: !0,
|
|
2168
|
+
photoUrl: !0
|
|
2169
|
+
})
|
|
2170
|
+
});
|
|
2171
|
+
const xe = {
|
|
2172
|
+
collectionName: "ReferralProgram",
|
|
2173
|
+
transform: {
|
|
2174
|
+
_id: "oid",
|
|
2175
|
+
business: "oid"
|
|
2176
|
+
}
|
|
2177
|
+
}, Ce = e.object({
|
|
2178
|
+
_id: a,
|
|
2179
|
+
business: a,
|
|
2180
|
+
term_and_condition: e.string().optional(),
|
|
2181
|
+
reward: e.array(b),
|
|
2182
|
+
criteria: e.array(F)
|
|
2183
|
+
}).describe(l.describe(xe));
|
|
2184
|
+
e.object({
|
|
2185
|
+
referer: a,
|
|
2186
|
+
referee: a,
|
|
2187
|
+
business: a
|
|
2188
|
+
});
|
|
2189
|
+
e.object({
|
|
2190
|
+
program: Ce.pick({
|
|
2191
|
+
_id: !0,
|
|
2192
|
+
business: !0,
|
|
2193
|
+
term_and_condition: !0
|
|
2194
|
+
}).extend({
|
|
2195
|
+
reward: b.optional()
|
|
2196
|
+
}),
|
|
2197
|
+
referralCount: e.number(),
|
|
2198
|
+
successReferralCount: e.number()
|
|
2199
|
+
});
|
|
2110
2200
|
export {
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2201
|
+
ne as F,
|
|
2202
|
+
Pe as T,
|
|
2203
|
+
Ue as _,
|
|
2204
|
+
Oe as a,
|
|
2205
|
+
F as b,
|
|
2206
|
+
b as c
|
|
2114
2207
|
};
|