@feedmepos/mf-connect 0.1.38-beta.9 → 0.1.38-beta.92

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 (161) hide show
  1. package/dist/{Analytic-3MN2saaU.js → Analytic-CWhVZ2N2.js} +31 -32
  2. package/dist/{App-Co8X5Wdy.js → App-BzHDZ550.js} +741 -728
  3. package/dist/AuditLogs-DjJOfxWr.js +2013 -0
  4. package/dist/{Bin-8a56ZDib.js → Bin-H9Mc0kOX.js} +10 -10
  5. package/dist/Broadcast-BlKv9pTl.js +266 -0
  6. package/dist/{CampaignTypeDialog.vue_vue_type_script_setup_true_lang-BVXlfq31.js → CampaignTypeDialog.vue_vue_type_script_setup_true_lang-Bfpr1EuT.js} +6 -6
  7. package/dist/{Card-B8_09LJu.js → Card-ByEYCMZi.js} +145 -140
  8. package/dist/Collections-BjlqpQR0.js +540 -0
  9. package/dist/Credit-DyBVTpfr.js +260 -0
  10. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
  11. package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
  12. package/dist/{DateRangeChip.vue_vue_type_script_setup_true_lang-BUzUIIUW.js → DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js} +1 -1
  13. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DP50lRfA.js +3120 -0
  14. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-BCQxJpVP.js +351 -0
  15. package/dist/Experience-Cf6lxdu_.js +259 -0
  16. package/dist/{FileSaver.min-NlMItPOc.js → FileSaver.min-BIgeA5yw.js} +1 -1
  17. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
  18. package/dist/FmTableSelection.vue_vue_type_script_setup_true_lang-DzcUc0_w.js +52 -0
  19. package/dist/Game-CCgsa5as.js +330 -0
  20. package/dist/Grab-oIvB2uUc.js +300 -0
  21. package/dist/{ImageInput.vue_vue_type_script_setup_true_lang-rWUkV9gn.js → ImageInput.vue_vue_type_script_setup_true_lang-BuiY288K.js} +49 -48
  22. package/dist/{Index-DLF71mx_.js → Index--bmiSYq2.js} +54 -54
  23. package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-BQMZvHq2.js +48 -0
  24. package/dist/{LottieAnimation.vue_vue_type_script_setup_true_lang-CyGJxUol.js → LottieAnimation.vue_vue_type_script_setup_true_lang-Bj6wuosW.js} +1 -1
  25. package/dist/{MainLayout-B1aJoR95.js → MainLayout-DTva8da3.js} +1 -1
  26. package/dist/Marketing-D-5rvdRJ.js +236 -0
  27. package/dist/MarketingMaterialEdit-CZvsnFG5.js +1036 -0
  28. package/dist/{Member-Bkw4aqtv.js → Member-CxKA1iM1.js} +38 -37
  29. package/dist/{MemberList-a3PdVYB3.js → MemberList-CmBZ6w5v.js} +485 -489
  30. package/dist/{MemberTransactions-CPDBd-n3.js → MemberTransactions-Dc9uE1Jy.js} +1 -1
  31. package/dist/{MessageInput.vue_vue_type_script_setup_true_lang-pbN8pN1m.js → MessageInput.vue_vue_type_script_setup_true_lang-DiOsNoiJ.js} +10392 -9967
  32. package/dist/Mission-D9ruHJsQ.js +334 -0
  33. package/dist/{Overview-De97NDoe.js → Overview-B4eiwvqi.js} +34 -34
  34. package/dist/Point-MXmcuDtD.js +262 -0
  35. package/dist/Promotion-CBoCcEhJ.js +397 -0
  36. package/dist/{Queue-ISVZxCE2.js → Queue-if5Lji0q.js} +18 -18
  37. package/dist/{Record-2FMByNC6.js → Record-XLXvSqlF.js} +15 -14
  38. package/dist/Review-BKIkmxLd.js +621 -0
  39. package/dist/ReviewFacebookCallback-B6TIL_H7.js +243 -0
  40. package/dist/ReviewGoogleCallback-D3sQbfuc.js +213 -0
  41. package/dist/{Reward-DPRyQ37x.js → Reward-DaymLqOP.js} +16 -16
  42. package/dist/{RewardGroup.vue_vue_type_script_setup_true_lang-Ba7-3bL-.js → RewardGroup.vue_vue_type_script_setup_true_lang-cGyeUFlK.js} +13 -14
  43. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-BOJdm376.js +1912 -0
  44. package/dist/Segment-o7srzt8o.js +1015 -0
  45. package/dist/{SelectItems.vue_vue_type_script_setup_true_lang-DZbyDVid.js → SelectItems.vue_vue_type_script_setup_true_lang-DnA83SVT.js} +23 -23
  46. package/dist/{SendCollectionSheet.vue_vue_type_script_setup_true_lang-ioMFYIwK.js → SendCollectionSheet.vue_vue_type_script_setup_true_lang-RKn_DhW0.js} +12 -12
  47. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-mzGtatEl.js +226 -0
  48. package/dist/Setting-Clbp5X2E.js +2039 -0
  49. package/dist/SettingAdvertisements-D9KTw00Q.js +264 -0
  50. package/dist/Store-DApDz7rO.js +1996 -0
  51. package/dist/StoreRewards-DTraNhDh.js +537 -0
  52. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-BusvWI37.js +1130 -0
  53. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-D5HOiiLG.js +7007 -0
  54. package/dist/{Tier-CwRj0oJ1.js → Tier-BWiO5an3.js} +562 -480
  55. package/dist/{Title-EII5OxSP.js → Title-Dur74Of5.js} +151 -149
  56. package/dist/{Transaction-1MTkAfej.js → Transaction-x3fZwXdy.js} +2 -2
  57. package/dist/{UserRuleGroup.vue_vue_type_script_setup_true_lang-BlQVWQHJ.js → UserRuleGroup.vue_vue_type_script_setup_true_lang-9XLlfUdp.js} +7 -7
  58. package/dist/Voucher-DH7x7NAS.js +421 -0
  59. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-CNn4GR2l.js +421 -0
  60. package/dist/{ZodTextField.vue_vue_type_script_setup_true_lang-CTeGK4bk.js → ZodTextField.vue_vue_type_script_setup_true_lang-W-qWPW20.js} +2 -2
  61. package/dist/app-IRmnrMb8.js +59647 -0
  62. package/dist/app.js +1 -1
  63. package/dist/{business-DjnN-J4U.js → business-BZG7VHN8.js} +11 -8
  64. package/dist/campaign-BUvMmYOk.js +219 -0
  65. package/dist/campaign-BeRxvBzZ.js +254 -0
  66. package/dist/campaign.enum-BmFHrnub.js +26 -0
  67. package/dist/campaign.fn-B0sgTkC-.js +776 -0
  68. package/dist/{collectible.enum-r6N115Lu.js → collectible.enum-J0aolcpF.js} +1 -1
  69. package/dist/{collection.fn-CSsfVv26.js → collection.fn-BOhZm8S0.js} +2 -2
  70. package/dist/dto-CSNH3rWF.js +222 -0
  71. package/dist/duplicateCampaign-CAOL6p7n.js +51 -0
  72. package/dist/effect-DTL3F8d_.js +89 -0
  73. package/dist/{email-addresses-D8uheCCF.js → email-addresses-Bw8rSTHa.js} +2 -2
  74. package/dist/{export-Ver6WiX6.js → export-CY5VAxnU.js} +4 -4
  75. package/dist/{helper-Bg4xoFbh.js → helper-1sIKNm6C.js} +22 -7
  76. package/dist/{index-Dn_bmcns.js → index-BX_igCG6.js} +3 -3
  77. package/dist/index-B_-tEYD0.js +3625 -0
  78. package/dist/{index-BZZ4iF4-.js → index-BultP2zY.js} +23 -12
  79. package/dist/index-CAIsxBzT.js +48 -0
  80. package/dist/index-CVbL8J7-.js +85 -0
  81. package/dist/index-CuvNtC_M.js +61 -0
  82. package/dist/{index-D4JOeJJJ.js → index-D4Bx6J2q.js} +1 -1
  83. package/dist/{index-hJUxCNsF.js → index-DO2AYnVc.js} +1 -1
  84. package/dist/index-DPmqQmoC.js +30289 -0
  85. package/dist/{index-CNhr0_Zx.js → index-DoupH575.js} +617 -191
  86. package/dist/{index-Bb0CHeNx.js → index-DpXwZYX4.js} +3 -3
  87. package/dist/{index-BPQyQc4q.js → index-Gr5htFUW.js} +1 -1
  88. package/dist/index-KC-9_cY4.js +8910 -0
  89. package/dist/index-nMxh2OZ2.js +28900 -0
  90. package/dist/{index.esm2017-hK1Mi9yY.js → index.esm2017-0cVB_6L1.js} +122 -122
  91. package/dist/{loading-kIQFOTwH.js → loading-BUAN8WyV.js} +4 -3
  92. package/dist/{lodash-B5I3zXaY.js → lodash-C7OD0MNW.js} +1 -1
  93. package/dist/{membership--xR-HZoa.js → membership-CZkPkDiM.js} +38 -18
  94. package/dist/{moment-BWErdI6_.js → moment-D7p2TMB-.js} +6 -1
  95. package/dist/{money-c-ITXnlg.js → money-CdTox5sS.js} +1 -1
  96. package/dist/{number-DfZSBLOY.js → number-CxHO_EhJ.js} +1 -1
  97. package/dist/objectid-DL2GZe9v.js +145 -0
  98. package/dist/{campaign-BpJ1O6KS.js → plugins-BR4hQ6yY.js} +677 -699
  99. package/dist/remy-D_Deb3ue.js +13 -0
  100. package/dist/{reward-CE0ifMHS.js → reward-DWwwkcS3.js} +1 -1
  101. package/dist/{rule-DrjdmpaB.js → rule-CY_w8dsS.js} +505 -487
  102. package/dist/rule-builder-DMdUBkxB.js +102 -0
  103. package/dist/string-Gcy5IM_H.js +32 -0
  104. package/dist/style.css +11 -2
  105. package/dist/template-tuIzBpOC.js +188 -0
  106. package/dist/timezone-Dt3UFIE2.js +1156 -0
  107. package/dist/trigger-B9pWO76n.js +213 -0
  108. package/dist/useMarketingMaterialActions-C7XoKutU.js +96 -0
  109. package/dist/usePagination-Dvqiv0Ms.js +220 -0
  110. package/dist/{user-Cl3IotYV.js → user-DlrL0A8u.js} +15 -14
  111. package/dist/{vue-i18n-DKh0SMhL.js → vue-i18n-B2srUL0h.js} +449 -449
  112. package/dist/{xlsx-BDBzdOuM.js → xlsx-B9pnBbNc.js} +1 -1
  113. package/dist/{zod-Bg2FbC-D.js → zod-CO0ds3MB.js} +32 -31
  114. package/package.json +14 -6
  115. package/dist/AuditLogs-DTq6IAuc.js +0 -1887
  116. package/dist/Broadcast-UreS5Kiq.js +0 -227
  117. package/dist/Collections-B0I5ULxR.js +0 -465
  118. package/dist/Credit-B4Ad8DWP.js +0 -222
  119. package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-DLnvDVgf.js +0 -108
  120. package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-DjgACf9F.js +0 -2185
  121. package/dist/EffectSheet.vue_vue_type_style_index_0_lang-y5JnuIev.js +0 -347
  122. package/dist/Experience-xO5KpTTm.js +0 -223
  123. package/dist/FilterChip.vue_vue_type_script_setup_true_lang-d8rh38tD.js +0 -114
  124. package/dist/Game-ChgrVvz5.js +0 -278
  125. package/dist/Marketing-BlmRXSGl.js +0 -20073
  126. package/dist/Mission-B07wK0HX.js +0 -296
  127. package/dist/Point-Ckj9QIeH.js +0 -226
  128. package/dist/Promotion-aGNCOeRN.js +0 -289
  129. package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-DWj-421v.js +0 -1751
  130. package/dist/Segment-CRMNJ11X.js +0 -882
  131. package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-Cfp8XXdO.js +0 -147
  132. package/dist/Setting-c0FWRZsD.js +0 -1936
  133. package/dist/Store-Bm1_15s8.js +0 -1842
  134. package/dist/StoreRewards-BCQHHfay.js +0 -423
  135. package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CfTF2l-D.js +0 -1029
  136. package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-rvhoxo0w.js +0 -139
  137. package/dist/Voucher-CYvjCb-v.js +0 -384
  138. package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-63Jr71dJ.js +0 -419
  139. package/dist/_commonjsHelpers-BkfeUUK-.js +0 -28
  140. package/dist/app-BJLHk8ao.js +0 -33357
  141. package/dist/app-BzIk1ojT.js +0 -7086
  142. package/dist/campaign-BHNS5kXt.js +0 -96
  143. package/dist/campaign.enum-CJDWE_Om.js +0 -20
  144. package/dist/campaign.fn-C0HQE9uh.js +0 -758
  145. package/dist/dto-Byq51uVH.js +0 -214
  146. package/dist/effect-Do3yTM-_.js +0 -78
  147. package/dist/index-B1V9UnI9.js +0 -76
  148. package/dist/index-BM9CWjC6.js +0 -38
  149. package/dist/index-CsaQJMAR.js +0 -66
  150. package/dist/index-D6VxioBg.js +0 -30038
  151. package/dist/index-DGKlRWn3.js +0 -32260
  152. package/dist/index-DLKyOu7W.js +0 -8861
  153. package/dist/index-DyYF6HYL.js +0 -121
  154. package/dist/index-UXtH44XQ.js +0 -3120
  155. package/dist/objectid-DKbha9-x.js +0 -145
  156. package/dist/plugins-DtakupKW.js +0 -208
  157. package/dist/remy-vue-client-Cpppk9h-.js +0 -1693
  158. package/dist/rule-builder-B_hCyq3x.js +0 -89
  159. package/dist/template-WI4a-lFY.js +0 -190
  160. package/dist/trigger-DieDHht3.js +0 -144
  161. package/dist/usePagination-BeF5K3M7.js +0 -223
@@ -1,214 +0,0 @@
1
- import { F as i, z as t } from "./index-DGKlRWn3.js";
2
- import { z as y, a as r, A as h } from "./index-UXtH44XQ.js";
3
- import { F as u } from "./index-DLKyOu7W.js";
4
- import { i as I, R as d } from "./rule-builder-B_hCyq3x.js";
5
- function N(a, e) {
6
- var c, l;
7
- if (!a) return;
8
- const n = a.campaign;
9
- if (!n) return;
10
- const o = n.event.rule;
11
- if (!o || !I(o)) {
12
- e.addIssue({
13
- code: "custom",
14
- path: ["campaign", "event", "rule"],
15
- params: {
16
- i18n: { key: "zodCustom.campaign.rule_required", values: { type: n.event.type } }
17
- }
18
- });
19
- return;
20
- }
21
- switch (n.type) {
22
- case "MISSION": {
23
- n.earningOption.amount > n.mission.end && e.addIssue({
24
- code: "custom",
25
- path: ["campaign", "earningOption"],
26
- params: {
27
- i18n: { key: "zodCustom.campaign.earning_amount_exceed", values: { max: n.mission.end } }
28
- }
29
- });
30
- break;
31
- }
32
- case "CREDIT": {
33
- const p = (c = n.config) == null ? void 0 : c.validityOption;
34
- (!p || ["validForDay", "validBefore"].every((g) => p[g] == null)) && e.addIssue({
35
- code: "custom",
36
- path: ["campaign", "config", "validityOption"],
37
- params: {
38
- i18n: { key: "zodCustom.campaign.credit_validity_required" }
39
- }
40
- });
41
- }
42
- }
43
- switch (n.event.type) {
44
- case "BILL_COMPLETED":
45
- n.type === "MISSION" && n.rewards.length && (n.rewards.forEach((p, m) => {
46
- (p.threshold < 0 || p.threshold > n.mission.end) && e.addIssue({
47
- code: "custom",
48
- path: ["campaign", "rewards", m, "threshold"],
49
- params: {
50
- i18n: { key: "zodCustom.campaign.reward_threshold_range" }
51
- }
52
- });
53
- }), (l = n.config) != null && l.validityOption.followFirstReceive || e.addIssue({
54
- code: "custom",
55
- path: ["campaign", "config", "validityOption"],
56
- params: {
57
- i18n: { key: "zodCustom.campaign.mission_first_receive" }
58
- }
59
- }));
60
- break;
61
- case "SCHEDULE": {
62
- if (!o.rules.g_schedule) {
63
- e.addIssue({
64
- code: "custom",
65
- path: ["campaign", "event", "rule"],
66
- params: {
67
- i18n: { key: "zodCustom.campaign.schedule_period_required" }
68
- },
69
- fatal: !0
70
- });
71
- return;
72
- }
73
- const p = d.getRules(
74
- o.rules.g_schedule
75
- ), m = [
76
- {
77
- property: "trigger.date",
78
- operator: ["_isOnDate", "_rrule"]
79
- },
80
- {
81
- property: "trigger.time",
82
- operator: ["_isOnTime"]
83
- }
84
- ];
85
- m.length == p.length && m.every((O) => p.some((C) => {
86
- const f = d.simplify(C);
87
- return f.property === O.property && O.operator.includes(f.operator);
88
- })) || e.addIssue({
89
- code: "custom",
90
- path: ["campaign", "event", "rule"],
91
- params: {
92
- i18n: { key: "zodCustom.campaign.active_period_invalid" }
93
- }
94
- });
95
- break;
96
- }
97
- default: {
98
- "earningOption" in n && n.earningOption.type != "FIXED" && e.addIssue({
99
- code: "custom",
100
- path: ["campaign", "earningOption"],
101
- params: {
102
- i18n: { key: "zodCustom.campaign.fixed_earning_required" }
103
- }
104
- });
105
- break;
106
- }
107
- }
108
- }
109
- function A(a) {
110
- var n;
111
- if (a.campaign.type === "VOUCHER" && "configs" in a) {
112
- const o = a.configs;
113
- o.extras.targetLocation = a.campaign.targetLocation;
114
- const c = Math.max(
115
- a.campaign.earningOption.amount,
116
- o.options.maxUse ?? 1
117
- );
118
- a.campaign.earningOption.amount = c, o.options.maxUse = c, a.campaign.earningOption = {
119
- type: "FIXED",
120
- amount: 1
121
- };
122
- }
123
- if (a.campaign.type == "MISSION" && "configs" in a) {
124
- const o = a.configs;
125
- o.options.validityOption = (n = a.campaign.config) == null ? void 0 : n.validityOption;
126
- }
127
- const e = a.campaign.event;
128
- return e.type != "BILL_COMPLETED" && e.rule && I(e.rule) && (e.rule = d.removeEntry(e.rule, "g_bill"), a.campaign.event = e), a;
129
- }
130
- function s(a) {
131
- const e = h.optionsMap.get(a).extend({
132
- _id: i.optional(),
133
- collectible: t.string().nullish()
134
- });
135
- switch (a) {
136
- case "VOUCHER":
137
- return t.object({
138
- campaign: e,
139
- templateId: i,
140
- configs: u,
141
- updateCollections: t.boolean().optional(),
142
- code: t.string().optional()
143
- });
144
- case "PROMOTION":
145
- return t.object({
146
- campaign: e,
147
- templateId: i
148
- });
149
- case "POINT":
150
- return t.object({
151
- campaign: e,
152
- templateId: i
153
- });
154
- case "CREDIT":
155
- return t.object({
156
- campaign: e,
157
- templateId: i
158
- });
159
- case "BROADCAST":
160
- return t.object({
161
- campaign: e,
162
- templateId: i
163
- });
164
- case "COIN":
165
- return t.object({
166
- campaign: e,
167
- templateId: i
168
- });
169
- case "REWARD_POOL":
170
- return t.object({
171
- campaign: e,
172
- templateId: i,
173
- updateCollections: t.boolean().optional()
174
- });
175
- case "GAME":
176
- return t.object({
177
- campaign: e,
178
- configs: u,
179
- templateId: i,
180
- updateCollections: t.boolean().optional()
181
- });
182
- case "MISSION":
183
- return t.object({
184
- campaign: e,
185
- configs: u,
186
- templateId: i,
187
- updateCollections: t.boolean().optional()
188
- });
189
- default:
190
- throw new Error("Not implemented");
191
- }
192
- }
193
- const D = y.extend({
194
- _id: i.optional(),
195
- name: t.string().min(1).max(300),
196
- business: i.optional(),
197
- campaigns: t.array(i).optional()
198
- }), T = {
199
- [r.enum.VOUCHER]: s("VOUCHER"),
200
- [r.enum.PROMOTION]: s("PROMOTION"),
201
- [r.enum.POINT]: s("POINT"),
202
- [r.enum.CREDIT]: s("CREDIT"),
203
- [r.enum.BROADCAST]: s("BROADCAST"),
204
- [r.enum.COIN]: s("COIN"),
205
- [r.enum.REWARD_POOL]: s("REWARD_POOL"),
206
- [r.enum.GAME]: s("GAME"),
207
- [r.enum.MISSION]: s("MISSION")
208
- };
209
- export {
210
- T as C,
211
- D as F,
212
- A as a,
213
- N as c
214
- };
@@ -1,78 +0,0 @@
1
- import { c as r } from "./index-D6VxioBg.js";
2
- function m(e) {
3
- if (!e)
4
- return null;
5
- const o = r.Config.getCountry().currency.symbol;
6
- function s(t) {
7
- const n = r.Dinero.fromFdoDecimal({ decimal: t.adjustment.amount });
8
- switch (t.adjustment.type) {
9
- case "BY_PERCENTAGE":
10
- return `${n.toObject().amount}% discount`;
11
- case "BY_AMOUNT":
12
- return `${o}${n.toUnit()} discount`;
13
- case "TO_AMOUNT":
14
- return `to ${o}${n.toUnit()}`;
15
- }
16
- }
17
- function u(t) {
18
- switch (t.options.target) {
19
- case "BILL":
20
- return "Bill Discount";
21
- case "ITEM":
22
- if (t.options.strategy.type === "SIMPLE")
23
- return "Item Discount";
24
- if (t.options.strategy.type === "BUY_X_GET_Y")
25
- return "Buy X Get Y (same product set)";
26
- if (t.options.strategy.type === "BUY_X_GET_Y_V2")
27
- return "Buy X Get Y (mixed product set)";
28
- if (t.options.strategy.type === "BUY_X_ITEM_A_GET_Y_ITEM_B")
29
- return "Buy X Get Y (different product set)";
30
- if (t.options.strategy.type === "COMBO")
31
- return "Combo";
32
- break;
33
- case "PAYMENT":
34
- return "Payment";
35
- default:
36
- throw new Error("Invalid effect target");
37
- }
38
- }
39
- function a(t) {
40
- if (t.options.target === "BILL" || t.options.target === "PAYMENT") {
41
- const n = r.Dinero.fromFdoDecimal({
42
- decimal: t.options.minPurchase
43
- });
44
- return n.toUnit() > 0 ? `min spend ${o}${n.toUnit()}` : "no min spend";
45
- }
46
- if (t.options.target === "ITEM" && t.options.minPurchase) {
47
- const n = r.Dinero.fromFdoDecimal({
48
- decimal: t.options.minPurchase
49
- });
50
- return n.toUnit() > 0 ? `min spend ${o}${n.toUnit()}` : "no min spend";
51
- }
52
- return "no min spend";
53
- }
54
- function c(t) {
55
- var n;
56
- if (((n = t.adjustmentRule) == null ? void 0 : n.type) == "CAPPED_AT") {
57
- const i = r.Dinero.fromFdoDecimal({
58
- decimal: t.adjustmentRule.amount
59
- }).toPositive();
60
- return i.toUnit() > 0 ? `cap at ${o}${i.toUnit()}` : null;
61
- }
62
- return null;
63
- }
64
- return {
65
- type: u(e),
66
- adjustment: s(e),
67
- requirements: a(e),
68
- maxCap: c(e)
69
- };
70
- }
71
- function f(e) {
72
- const o = m(e);
73
- return !e || !o ? null : Object.values(o).filter(Boolean).join(" | ");
74
- }
75
- export {
76
- f as e,
77
- m as s
78
- };
@@ -1,76 +0,0 @@
1
- import { g as t, S as I, u as C, b as w } from "./index-D6VxioBg.js";
2
- const a = () => {
3
- if (!I.getBusinessId()) throw new Error("Invalid business ID");
4
- return C("users");
5
- }, c = () => {
6
- const e = I.getBusinessId();
7
- if (!e) throw new Error("Invalid business ID");
8
- return w(`businesses/${e}/membership`, {
9
- noIdRequired: !0
10
- });
11
- }, y = {
12
- async read(e) {
13
- const s = t(
14
- await a().get("", { params: e })
15
- ), n = s.resources.map((r) => {
16
- var i, o, d, l, p, u, m, b;
17
- return {
18
- ...r,
19
- collection_TIER_0_balance: ((o = (i = r.collection.TIER) == null ? void 0 : i[0]) == null ? void 0 : o.balance) ?? 0,
20
- collection_CREDIT_0_balance: ((l = (d = r.collection.CREDIT) == null ? void 0 : d[0]) == null ? void 0 : l.balance) ?? 0,
21
- collection_COIN_0_balance: ((u = (p = r.collection.COIN) == null ? void 0 : p[0]) == null ? void 0 : u.balance) ?? 0,
22
- collection_TITLE_0_title: ((b = (m = r.collection.TITLE) == null ? void 0 : m[0]) == null ? void 0 : b.title) ?? ""
23
- };
24
- });
25
- return {
26
- meta: s.meta,
27
- resources: n
28
- };
29
- },
30
- async readById(e) {
31
- return t(await a().get(`${e}`));
32
- },
33
- async sendCredit(e, s) {
34
- return t(
35
- await c().post(
36
- `members/${e}/send-credit`,
37
- s
38
- )
39
- );
40
- },
41
- async deductCredit(e, s) {
42
- return t(
43
- await c().post(
44
- `members/${e}/deduct-credit`,
45
- s
46
- )
47
- );
48
- },
49
- async sendCoin(e, s) {
50
- return t(
51
- await c().post(
52
- `members/${e}/send-coin`,
53
- s
54
- )
55
- );
56
- },
57
- async deductCoin(e, s) {
58
- return t(
59
- await c().post(
60
- `members/${e}/deduct-coin`,
61
- s
62
- )
63
- );
64
- },
65
- async updateMember(e, s) {
66
- return t(
67
- await a().put(`${e}`, s)
68
- );
69
- },
70
- async import(e) {
71
- return await a().post("import", e);
72
- }
73
- };
74
- export {
75
- y as m
76
- };
@@ -1,38 +0,0 @@
1
- import { z as t, F as e, m as i } from "./index-DGKlRWn3.js";
2
- const n = t.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]), s = {
3
- collectionName: "MarketingMaterials",
4
- transform: {
5
- _id: "oid",
6
- business: "oid",
7
- campaign: "oid"
8
- }
9
- }, a = t.object({
10
- platform: n,
11
- contents: t.array(
12
- t.object({
13
- type: t.string(),
14
- size: t.object({
15
- width: t.number(),
16
- height: t.number()
17
- }),
18
- images: t.array(t.string())
19
- })
20
- )
21
- });
22
- t.object({
23
- _id: e,
24
- business: e,
25
- campaign: e.nullish(),
26
- name: t.string(),
27
- keywords: t.string(),
28
- image: t.string(),
29
- assets: t.array(t.lazy(() => a)),
30
- headline: t.object({
31
- content: t.string(),
32
- key: t.string().optional()
33
- }),
34
- captions: t.array(t.object({ language: t.string(), content: t.string() }))
35
- }).describe(i.describe(s));
36
- export {
37
- n as F
38
- };
@@ -1,66 +0,0 @@
1
- const d = new RegExp("([\\p{Ll}\\d])(\\p{Lu})", "gu"), R = new RegExp("(\\p{Lu})([\\p{Lu}][\\p{Ll}])", "gu"), C = new RegExp("(\\d)\\p{Ll}|(\\p{L})\\d", "u"), A = /[^\p{L}\d]+/giu, n = "$1\0$2", L = "";
2
- function h(r) {
3
- let e = r.trim();
4
- e = e.replace(d, n).replace(R, n), e = e.replace(A, "\0");
5
- let c = 0, l = e.length;
6
- for (; e.charAt(c) === "\0"; )
7
- c++;
8
- if (c === l)
9
- return [];
10
- for (; e.charAt(l - 1) === "\0"; )
11
- l--;
12
- return e.slice(c, l).split(/\0/g);
13
- }
14
- function w(r) {
15
- const e = h(r);
16
- for (let c = 0; c < e.length; c++) {
17
- const l = e[c], t = C.exec(l);
18
- if (t) {
19
- const a = t.index + (t[1] ?? t[2]).length;
20
- e.splice(c, 1, l.slice(0, a), l.slice(a));
21
- }
22
- }
23
- return e;
24
- }
25
- function m(r, e) {
26
- const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale);
27
- return c + l.map(x(a, s)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
28
- }
29
- function S(r, e) {
30
- const [c, l, t] = P(r, e), a = i(e == null ? void 0 : e.locale), s = E(e == null ? void 0 : e.locale), f = x(a, s);
31
- return c + l.map((u, _) => _ === 0 ? f(u) : a(u)).join((e == null ? void 0 : e.delimiter) ?? " ") + t;
32
- }
33
- function i(r) {
34
- return r === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(r);
35
- }
36
- function E(r) {
37
- return r === !1 ? (e) => e.toUpperCase() : (e) => e.toLocaleUpperCase(r);
38
- }
39
- function x(r, e) {
40
- return (c) => `${e(c[0])}${r(c.slice(1))}`;
41
- }
42
- function P(r, e = {}) {
43
- const c = e.split ?? (e.separateNumbers ? w : h), l = e.prefixCharacters ?? L, t = e.suffixCharacters ?? L;
44
- let a = 0, s = r.length;
45
- for (; a < r.length; ) {
46
- const f = r.charAt(a);
47
- if (!l.includes(f))
48
- break;
49
- a++;
50
- }
51
- for (; s > a; ) {
52
- const f = s - 1, u = r.charAt(f);
53
- if (!t.includes(u))
54
- break;
55
- s = f;
56
- }
57
- return [
58
- r.slice(0, a),
59
- c(r.slice(a, s)),
60
- r.slice(s)
61
- ];
62
- }
63
- export {
64
- m as c,
65
- S as s
66
- };