@feedmepos/mf-connect 0.1.38-beta.74 → 0.1.38-beta.76
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-BrBxRQue.js +761 -0
- package/dist/App-CE_19YJc.js +4642 -0
- package/dist/AuditLogs-CQtMmVIp.js +1991 -0
- package/dist/Bin-D9CHhiUb.js +166 -0
- package/dist/Broadcast-Dg6eBL_f.js +267 -0
- package/dist/CampaignTypeDialog.vue_vue_type_script_setup_true_lang-CSv0R9XX.js +121 -0
- package/dist/Card-BTkf67i1.js +910 -0
- package/dist/ChipMenu.vue_vue_type_script_setup_true_lang-BPpZZNkr.js +97 -0
- package/dist/Collections-Czq4nsdu.js +541 -0
- package/dist/Credit-B3nX8aJA.js +261 -0
- package/dist/CustomSelect.vue_vue_type_script_setup_true_lang-Du7fRSZC.js +128 -0
- package/dist/DateInput.vue_vue_type_script_setup_true_lang-BN4Q5Y3l.js +54 -0
- package/dist/DateRangeChip.vue_vue_type_script_setup_true_lang-eIoPtgO5.js +58 -0
- package/dist/EditCampaignSheet.vue_vue_type_script_setup_true_lang-D2gTuN97.js +3120 -0
- package/dist/EffectSheet.vue_vue_type_style_index_0_lang-5U6cSZGZ.js +351 -0
- package/dist/Experience-B9Vn3NTH.js +260 -0
- package/dist/FileSaver.min-CJaOkSQt.js +74 -0
- package/dist/FilterChip.vue_vue_type_script_setup_true_lang-DaU-9GzO.js +129 -0
- package/dist/Game-DTx_EsM3.js +331 -0
- package/dist/GenerateMaterial-C3J9_YHw.js +589 -0
- package/dist/Grab-B29W7rka.js +301 -0
- package/dist/ImageInput.vue_vue_type_script_setup_true_lang-DyegKNzM.js +145 -0
- package/dist/Index-Fk8EP5dG.js +259 -0
- package/dist/JsonViewer-v8_C7l5N.js +87 -0
- package/dist/LocationPicker.vue_vue_type_script_setup_true_lang-D2XPGgTM.js +48 -0
- package/dist/LottieAnimation.vue_vue_type_script_setup_true_lang-K8qUYrPk.js +18737 -0
- package/dist/MainLayout-BFmqJkE_.js +41 -0
- package/dist/Marketing-BRHQHAWD.js +145 -0
- package/dist/MarketingMaterialEdit-7s3WEDyJ.js +746 -0
- package/dist/Member-DwPJNAo9.js +280 -0
- package/dist/MemberList-mS1W0qHY.js +1601 -0
- package/dist/MemberOverview-wL_ailso.js +58 -0
- package/dist/MemberTransactions-BV3xvFYS.js +45 -0
- package/dist/MessageInput.vue_vue_type_script_setup_true_lang-DzKqVp2O.js +60799 -0
- package/dist/Mission-QmoURSu4.js +335 -0
- package/dist/Overview-CaTMLlq-.js +1078 -0
- package/dist/Point-CjG77Sma.js +263 -0
- package/dist/Promotion-C5I-1qPN.js +397 -0
- package/dist/Queue-BaIBCCaX.js +259 -0
- package/dist/Record-DqpGwZIU.js +341 -0
- package/dist/Review-Bq-edSOO.js +621 -0
- package/dist/ReviewFacebookCallback-yaC4rLki.js +243 -0
- package/dist/ReviewGoogleCallback-uxrrCQdu.js +213 -0
- package/dist/Reward-DGP65n5t.js +442 -0
- package/dist/RewardGroup.vue_vue_type_script_setup_true_lang-bNMoMZOy.js +149 -0
- package/dist/RuleGroup.vue_vue_type_script_setup_true_lang-Dgrc6vXF.js +1912 -0
- package/dist/Segment-CNz0sR3c.js +881 -0
- package/dist/SelectItems.vue_vue_type_script_setup_true_lang-DLZEzpve.js +181 -0
- package/dist/SendCollectionSheet.vue_vue_type_script_setup_true_lang-CLdIeyef.js +188 -0
- package/dist/SendVoucherSheet.vue_vue_type_script_setup_true_lang-ocCdtbbe.js +147 -0
- package/dist/Setting-BKDSGYBR.js +2000 -0
- package/dist/SettingAdvertisements-B2GMFfN9.js +264 -0
- package/dist/Store-C6uLl_Ue.js +1996 -0
- package/dist/StoreRewards-D4728UDf.js +535 -0
- package/dist/StoreTransactions.vue_vue_type_script_setup_true_lang-CG09fJTP.js +1129 -0
- package/dist/TargetLocationInput.vue_vue_type_script_setup_true_lang-B0_bMK5u.js +7005 -0
- package/dist/Tier-BNzTa1_w.js +970 -0
- package/dist/Title-DY5knovF.js +568 -0
- package/dist/Transaction-Ct4yAJ9n.js +39 -0
- package/dist/UserRuleGroup.vue_vue_type_script_setup_true_lang-CHnxi3XZ.js +130 -0
- package/dist/Voucher-DFTMRPT0.js +422 -0
- package/dist/VoucherEditor.vue_vue_type_script_setup_true_lang-DZU7XVlZ.js +421 -0
- package/dist/ZodTextField.vue_vue_type_script_setup_true_lang-BndLHmHB.js +56 -0
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/app-6lG4w5PT.js +59396 -0
- package/dist/app-wDQR6dpb.js +39 -0
- package/dist/app.js +7 -0
- package/dist/business-CrfQ56D0.js +82 -0
- package/dist/campaign-B9fR7RwT.js +100 -0
- package/dist/campaign-B_iIaTKz.js +253 -0
- package/dist/campaign-CpzFl8Vr.js +4 -0
- package/dist/campaign.enum-BAHf0dSv.js +26 -0
- package/dist/campaign.fn-DDEgBzH2.js +776 -0
- package/dist/collectible.enum-9os2zr5a.js +19 -0
- package/dist/collection.fn-7qP_m2MW.js +26 -0
- package/dist/dto-C2hLQKuu.js +222 -0
- package/dist/duplicateCampaign-C6RXfeWE.js +51 -0
- package/dist/effect-DGVfWyIc.js +89 -0
- package/dist/email-addresses-BHa_qQBd.js +705 -0
- package/dist/export-CRPfo4hq.js +97 -0
- package/dist/feedme.ico +0 -0
- package/dist/helper-0_zrz4kj.js +86 -0
- package/dist/index-4Vl1VXum.js +2639 -0
- package/dist/index-4bX0ewBJ.js +31 -0
- package/dist/index-Bj0TV_D5.js +36 -0
- package/dist/index-BpdSswT6.js +48 -0
- package/dist/index-By2wenzb.js +32 -0
- package/dist/index-C8L2jQ_6.js +28897 -0
- package/dist/index-CO5kQMIK.js +85 -0
- package/dist/index-CW_ub4cF.js +8912 -0
- package/dist/index-Cp8wkBus.js +124 -0
- package/dist/index-CuvNtC_M.js +61 -0
- package/dist/index-D6Te1BQZ.js +54 -0
- package/dist/index-DbJGJ2fB.js +146 -0
- package/dist/index-DeaGdUSH.js +30289 -0
- package/dist/index-Dp1J9Fxa.js +3 -0
- package/dist/index-QUvYZydO.js +67 -0
- package/dist/index-lwxV5iX0.js +3431 -0
- package/dist/index-vh86FiIQ.js +10 -0
- package/dist/index.esm2017-ofRmIpjY.js +3069 -0
- package/dist/loading-8_73fcXo.js +71 -0
- package/dist/lodash-Bz_vrY3P.js +3678 -0
- package/dist/membership-CpB39vNW.js +235 -0
- package/dist/moment-D7p2TMB-.js +2583 -0
- package/dist/money-DALHjzjF.js +15 -0
- package/dist/number-D_GJahxw.js +12 -0
- package/dist/object-qECH92oz.js +26 -0
- package/dist/objectId-dwaoBfJX.js +7 -0
- package/dist/objectid-BZSH63yc.js +145 -0
- package/dist/plugins-A4jDcmfS.js +1817 -0
- package/dist/remy-D_Deb3ue.js +13 -0
- package/dist/reward-BqFB2Yn2.js +36 -0
- package/dist/rule-DNylZfIG.js +1969 -0
- package/dist/rule-builder-2iT04EOj.js +102 -0
- package/dist/style.css +13 -0
- package/dist/template-D7rpG7FN.js +188 -0
- package/dist/tier-BJDhpH6X.js +4 -0
- package/dist/tiers/tier=1.png +0 -0
- package/dist/tiers/tier=2.png +0 -0
- package/dist/tiers/tier=3.png +0 -0
- package/dist/tiers/tier=4.png +0 -0
- package/dist/timezone-BW17tvi2.js +1154 -0
- package/dist/titles/type=diamond.png +0 -0
- package/dist/titles/type=drinks.png +0 -0
- package/dist/titles/type=food.png +0 -0
- package/dist/titles/type=heart.png +0 -0
- package/dist/titles/type=medal.png +0 -0
- package/dist/titles/type=spend.png +0 -0
- package/dist/titles/type=thank-you.png +0 -0
- package/dist/titles/type=thumbs-up.png +0 -0
- package/dist/titles/type=years.png +0 -0
- package/dist/trigger-CbVrS2i6.js +213 -0
- package/dist/tslib.es6-BCqqvLQ_.js +44 -0
- package/dist/type_drinks-D6jnpvwV.js +4 -0
- package/dist/usePagination-dXSoqxfG.js +266 -0
- package/dist/user-Ck-m3cB3.js +55 -0
- package/dist/vue-i18n-BvqmcBWZ.js +2365 -0
- package/dist/xlsx-CkqDfUNs.js +15491 -0
- package/dist/zod-B0YxCfoE.js +91 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2639 @@
|
|
|
1
|
+
import { z as e, F as a, m as i, a as P } from "./index-DeaGdUSH.js";
|
|
2
|
+
import { A as j, B as J, C as E, D as O, E as r, G as I, H as L } from "./index-lwxV5iX0.js";
|
|
3
|
+
import { a as R } from "./index-CW_ub4cF.js";
|
|
4
|
+
import { R as t } from "./rule-builder-2iT04EOj.js";
|
|
5
|
+
import { i as o } from "./helper-0_zrz4kj.js";
|
|
6
|
+
import { a as p } from "./index-D6Te1BQZ.js";
|
|
7
|
+
const x = {
|
|
8
|
+
collectionName: "AuditLogs",
|
|
9
|
+
transform: {
|
|
10
|
+
_id: "oid",
|
|
11
|
+
business: "oid",
|
|
12
|
+
timestamp: "date"
|
|
13
|
+
},
|
|
14
|
+
lookups: {
|
|
15
|
+
business: {
|
|
16
|
+
as: "pf_business",
|
|
17
|
+
fromCollection: "Businesses"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}, D = e.enum([
|
|
21
|
+
"GET",
|
|
22
|
+
"POST",
|
|
23
|
+
"PUT",
|
|
24
|
+
"PATCH",
|
|
25
|
+
"DELETE",
|
|
26
|
+
"OPTIONS",
|
|
27
|
+
"HEAD",
|
|
28
|
+
"ALL"
|
|
29
|
+
]), w = e.enum([
|
|
30
|
+
"CAMPAIGN",
|
|
31
|
+
"LOCATION",
|
|
32
|
+
"MARKETING MATERIALS",
|
|
33
|
+
"MEMBERSHIP",
|
|
34
|
+
"STORE",
|
|
35
|
+
"TRANSACTION",
|
|
36
|
+
"SETTINGS",
|
|
37
|
+
"SEGMENTATION",
|
|
38
|
+
"USER"
|
|
39
|
+
]), A = e.object({
|
|
40
|
+
httpMethod: D,
|
|
41
|
+
url: e.string().min(1),
|
|
42
|
+
userAgent: e.string(),
|
|
43
|
+
host: e.string().min(1),
|
|
44
|
+
params: e.object({}).passthrough().nullish(),
|
|
45
|
+
query: e.object({}).passthrough().nullish(),
|
|
46
|
+
body: e.object({}).passthrough().nullish()
|
|
47
|
+
}), G = e.object({
|
|
48
|
+
statusCode: e.number().int().min(100).max(599),
|
|
49
|
+
body: e.object({}).passthrough().nullish()
|
|
50
|
+
});
|
|
51
|
+
e.object({
|
|
52
|
+
_id: a,
|
|
53
|
+
user: e.string().length(28),
|
|
54
|
+
userName: e.string().min(1),
|
|
55
|
+
userPhoneNumber: e.string().refine((n) => j(n)).nullish(),
|
|
56
|
+
moduleType: w,
|
|
57
|
+
business: a.nullish(),
|
|
58
|
+
clientIp: e.string().nullish(),
|
|
59
|
+
timestamp: e.string().datetime(),
|
|
60
|
+
request: A,
|
|
61
|
+
response: G
|
|
62
|
+
}).describe(i.describe(x));
|
|
63
|
+
const Re = {
|
|
64
|
+
PROMOTION: {
|
|
65
|
+
name: "Promotion Template",
|
|
66
|
+
description: "Promotion template for campaign creation.",
|
|
67
|
+
steps: [
|
|
68
|
+
{
|
|
69
|
+
name: "connect.template.general_information",
|
|
70
|
+
groups: [
|
|
71
|
+
{
|
|
72
|
+
name: "connect.template.general",
|
|
73
|
+
fields: [
|
|
74
|
+
{
|
|
75
|
+
label: "connect.template.campaign_name",
|
|
76
|
+
property: "campaign.name",
|
|
77
|
+
type: "text"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: "connect.template.campaign_description",
|
|
81
|
+
property: "campaign.description",
|
|
82
|
+
type: "textarea"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
label: "connect.template.campaign_period",
|
|
86
|
+
property: "campaign.timeframeOptions",
|
|
87
|
+
type: "timeframe"
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
name: "connect.template.trigger",
|
|
93
|
+
fields: [
|
|
94
|
+
{
|
|
95
|
+
label: void 0,
|
|
96
|
+
property: "campaign.event.type",
|
|
97
|
+
type: "trigger",
|
|
98
|
+
extras: "campaign.type"
|
|
99
|
+
}
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
name: "connect.template.discount",
|
|
106
|
+
groups: [
|
|
107
|
+
{
|
|
108
|
+
name: "connect.template.discount",
|
|
109
|
+
fields: [
|
|
110
|
+
{
|
|
111
|
+
label: void 0,
|
|
112
|
+
property: "campaign.effect",
|
|
113
|
+
type: "effect"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
label: "connect.template.campaign_image",
|
|
117
|
+
property: "campaign.image",
|
|
118
|
+
type: "image"
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: "connect.template.terms_conditions",
|
|
126
|
+
groups: [
|
|
127
|
+
{
|
|
128
|
+
name: "connect.template.time_limitation",
|
|
129
|
+
fields: [
|
|
130
|
+
{
|
|
131
|
+
label: void 0,
|
|
132
|
+
property: "campaign.event.rule",
|
|
133
|
+
type: "rule_time",
|
|
134
|
+
extras: "campaign.type"
|
|
135
|
+
}
|
|
136
|
+
]
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
name: "connect.template.target_audience",
|
|
140
|
+
fields: [
|
|
141
|
+
{
|
|
142
|
+
label: void 0,
|
|
143
|
+
property: "campaign.event.rule",
|
|
144
|
+
type: "rule_user"
|
|
145
|
+
}
|
|
146
|
+
]
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
name: "connect.template.game_configuration",
|
|
150
|
+
fields: [
|
|
151
|
+
{
|
|
152
|
+
label: void 0,
|
|
153
|
+
property: "campaign.gameConfig",
|
|
154
|
+
type: "promotion_game_type"
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
name: "connect.template.location",
|
|
160
|
+
fields: [
|
|
161
|
+
{
|
|
162
|
+
label: "connect.template.target_location",
|
|
163
|
+
property: "campaign.targetLocation",
|
|
164
|
+
type: "target_location"
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
}
|
|
168
|
+
]
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
defaultValue: {
|
|
172
|
+
// TODO: templateId use in db
|
|
173
|
+
templateId: "",
|
|
174
|
+
campaign: {
|
|
175
|
+
type: "PROMOTION",
|
|
176
|
+
// TODO: templateId use in db
|
|
177
|
+
templateId: "",
|
|
178
|
+
name: "",
|
|
179
|
+
description: "",
|
|
180
|
+
image: "",
|
|
181
|
+
effect: null,
|
|
182
|
+
event: {
|
|
183
|
+
type: "MAKING_ORDER",
|
|
184
|
+
rule: t.scaffoldGroup()
|
|
185
|
+
},
|
|
186
|
+
group: null,
|
|
187
|
+
targetLocation: null,
|
|
188
|
+
timeframeOptions: {
|
|
189
|
+
type: "timeframe",
|
|
190
|
+
property: "__now"
|
|
191
|
+
},
|
|
192
|
+
gameConfig: null
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
VOUCHER: {
|
|
197
|
+
name: "Voucher Template",
|
|
198
|
+
description: "Voucher template for campaign creation.",
|
|
199
|
+
steps: [
|
|
200
|
+
{
|
|
201
|
+
name: "connect.template.general_information",
|
|
202
|
+
groups: [
|
|
203
|
+
{
|
|
204
|
+
name: "connect.template.general",
|
|
205
|
+
fields: [
|
|
206
|
+
{
|
|
207
|
+
label: "connect.template.campaign_name",
|
|
208
|
+
property: "campaign.name",
|
|
209
|
+
type: "text"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
label: "connect.template.campaign_description",
|
|
213
|
+
property: "campaign.description",
|
|
214
|
+
type: "textarea"
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
label: "connect.template.campaign_period",
|
|
218
|
+
property: "campaign.timeframeOptions",
|
|
219
|
+
type: "timeframe"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "connect.template.trigger",
|
|
225
|
+
fields: [
|
|
226
|
+
{
|
|
227
|
+
label: void 0,
|
|
228
|
+
property: "campaign.event.type",
|
|
229
|
+
type: "trigger",
|
|
230
|
+
extras: "campaign.type"
|
|
231
|
+
}
|
|
232
|
+
]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: "",
|
|
236
|
+
fields: [
|
|
237
|
+
{
|
|
238
|
+
label: void 0,
|
|
239
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
240
|
+
type: "rule_schedule",
|
|
241
|
+
extras: "campaign.timeframeOptions"
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
condition: {
|
|
245
|
+
property: "campaign.event.type",
|
|
246
|
+
value: "SCHEDULE"
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
]
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
name: "connect.template.discount",
|
|
253
|
+
groups: [
|
|
254
|
+
{
|
|
255
|
+
name: "connect.template.discount",
|
|
256
|
+
fields: [
|
|
257
|
+
{
|
|
258
|
+
label: void 0,
|
|
259
|
+
property: "configs.extras.effect",
|
|
260
|
+
type: "effect"
|
|
261
|
+
}
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
name: "connect.template.voucher_detail",
|
|
266
|
+
fields: [
|
|
267
|
+
{
|
|
268
|
+
label: "connect.template.voucher_name",
|
|
269
|
+
property: "configs.name",
|
|
270
|
+
type: "text"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
label: "connect.template.voucher_description",
|
|
274
|
+
property: "configs.description",
|
|
275
|
+
type: "textarea"
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
label: "connect.template.voucher_image",
|
|
279
|
+
property: "configs.image",
|
|
280
|
+
type: "image"
|
|
281
|
+
}
|
|
282
|
+
]
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
name: "connect.template.terms_conditions",
|
|
288
|
+
groups: [
|
|
289
|
+
{
|
|
290
|
+
name: "connect.template.time_limitation",
|
|
291
|
+
fields: [
|
|
292
|
+
{
|
|
293
|
+
label: void 0,
|
|
294
|
+
property: "campaign.event.rule",
|
|
295
|
+
type: "rule_time",
|
|
296
|
+
extras: "campaign.type"
|
|
297
|
+
}
|
|
298
|
+
],
|
|
299
|
+
condition: {
|
|
300
|
+
not: !0,
|
|
301
|
+
property: "campaign.event.type",
|
|
302
|
+
value: "SCHEDULE"
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
name: "connect.template.spending_criteria",
|
|
307
|
+
fields: [
|
|
308
|
+
{
|
|
309
|
+
label: void 0,
|
|
310
|
+
property: "campaign.event.rule",
|
|
311
|
+
type: "rule_bill"
|
|
312
|
+
}
|
|
313
|
+
],
|
|
314
|
+
condition: {
|
|
315
|
+
property: "campaign.event.type",
|
|
316
|
+
value: "BILL_COMPLETED"
|
|
317
|
+
}
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
name: "connect.template.feedback_criteria",
|
|
321
|
+
fields: [
|
|
322
|
+
{
|
|
323
|
+
label: void 0,
|
|
324
|
+
property: "campaign.event.rule",
|
|
325
|
+
type: "rule_feedback"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
condition: {
|
|
329
|
+
property: "campaign.event.type",
|
|
330
|
+
value: "FEEDBACK"
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
name: "connect.template.target_audience",
|
|
335
|
+
fields: [
|
|
336
|
+
{
|
|
337
|
+
label: void 0,
|
|
338
|
+
property: "campaign.event.rule",
|
|
339
|
+
type: "rule_user"
|
|
340
|
+
}
|
|
341
|
+
// {
|
|
342
|
+
// label: 'Birthday config',
|
|
343
|
+
// property: 'campaign.event.__rule',
|
|
344
|
+
// type: 'rule_birthday',
|
|
345
|
+
// },
|
|
346
|
+
]
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
name: "connect.template.voucher_usage_configuration",
|
|
350
|
+
fields: [
|
|
351
|
+
{
|
|
352
|
+
label: void 0,
|
|
353
|
+
property: "configs.options",
|
|
354
|
+
type: "collectible_options"
|
|
355
|
+
}
|
|
356
|
+
]
|
|
357
|
+
}
|
|
358
|
+
]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
name: "connect.template.configuration",
|
|
362
|
+
groups: [
|
|
363
|
+
{
|
|
364
|
+
name: "connect.template.location",
|
|
365
|
+
fields: [
|
|
366
|
+
{
|
|
367
|
+
label: "connect.template.target_location",
|
|
368
|
+
property: "campaign.targetLocation",
|
|
369
|
+
type: "target_location"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
},
|
|
373
|
+
// {
|
|
374
|
+
// name: 'Hide in App (FeedVibe)',
|
|
375
|
+
// fields: [
|
|
376
|
+
// {
|
|
377
|
+
// label: 'Hide',
|
|
378
|
+
// property: 'campaign.hideInApp',
|
|
379
|
+
// type: 'switch',
|
|
380
|
+
// },
|
|
381
|
+
// ],
|
|
382
|
+
// condition: {
|
|
383
|
+
// property: 'campaign.event.type',
|
|
384
|
+
// value: 'SIMPLE_CLAIM',
|
|
385
|
+
// },
|
|
386
|
+
// },
|
|
387
|
+
{
|
|
388
|
+
name: "connect.template.redemption",
|
|
389
|
+
fields: [
|
|
390
|
+
{
|
|
391
|
+
label: "connect.template.code",
|
|
392
|
+
property: "campaign.code",
|
|
393
|
+
type: "text"
|
|
394
|
+
}
|
|
395
|
+
],
|
|
396
|
+
condition: [
|
|
397
|
+
{
|
|
398
|
+
property: "campaign.event.type",
|
|
399
|
+
value: "SIMPLE_CLAIM"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
property: "campaign.hideInApp",
|
|
403
|
+
value: !0
|
|
404
|
+
}
|
|
405
|
+
]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
name: "connect.template.notify_audience",
|
|
409
|
+
fields: [
|
|
410
|
+
{
|
|
411
|
+
label: "connect.template.send_notification",
|
|
412
|
+
property: "campaign.notify",
|
|
413
|
+
type: "switch"
|
|
414
|
+
}
|
|
415
|
+
]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: "connect.template.notify_message",
|
|
419
|
+
fields: [
|
|
420
|
+
{
|
|
421
|
+
label: "connect.template.notification_message",
|
|
422
|
+
property: "campaign.notifyMessage",
|
|
423
|
+
type: "message",
|
|
424
|
+
extras: "ISSUE_REWARD"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
condition: {
|
|
428
|
+
property: "campaign.notify",
|
|
429
|
+
value: !0
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
],
|
|
435
|
+
defaultValue: {
|
|
436
|
+
templateId: "",
|
|
437
|
+
campaign: {
|
|
438
|
+
collectible: "",
|
|
439
|
+
type: "VOUCHER",
|
|
440
|
+
templateId: "",
|
|
441
|
+
name: "",
|
|
442
|
+
description: "",
|
|
443
|
+
image: "",
|
|
444
|
+
code: "",
|
|
445
|
+
event: {
|
|
446
|
+
type: "BILL_COMPLETED",
|
|
447
|
+
rule: t.scaffoldGroup()
|
|
448
|
+
},
|
|
449
|
+
group: null,
|
|
450
|
+
targetLocation: null,
|
|
451
|
+
timeframeOptions: {
|
|
452
|
+
type: "timeframe",
|
|
453
|
+
property: "__now"
|
|
454
|
+
},
|
|
455
|
+
earningOption: {
|
|
456
|
+
type: "FIXED",
|
|
457
|
+
amount: 1
|
|
458
|
+
},
|
|
459
|
+
notify: !1,
|
|
460
|
+
// notifyMessage: {
|
|
461
|
+
// channel: 'SMS',
|
|
462
|
+
// content: 'You received a reward.',
|
|
463
|
+
// language: 'en',
|
|
464
|
+
// variables: ['transaction.amount', 'collectible.name'],
|
|
465
|
+
// imageUrl: '',
|
|
466
|
+
// },
|
|
467
|
+
hideInApp: !0
|
|
468
|
+
},
|
|
469
|
+
configs: o("VOUCHER", {
|
|
470
|
+
name: "",
|
|
471
|
+
business: null,
|
|
472
|
+
noCampaign: !1
|
|
473
|
+
})
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
BROADCAST: {
|
|
477
|
+
name: "Broadcast Template",
|
|
478
|
+
description: "Broadcast template for campaign creation.",
|
|
479
|
+
steps: [
|
|
480
|
+
{
|
|
481
|
+
name: "connect.template.general_information",
|
|
482
|
+
groups: [
|
|
483
|
+
{
|
|
484
|
+
name: "connect.template.general",
|
|
485
|
+
fields: [
|
|
486
|
+
{
|
|
487
|
+
label: "connect.template.campaign_name",
|
|
488
|
+
property: "campaign.name",
|
|
489
|
+
type: "text"
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
label: "connect.template.campaign_description",
|
|
493
|
+
property: "campaign.description",
|
|
494
|
+
type: "textarea"
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
label: "connect.template.campaign_period",
|
|
498
|
+
property: "campaign.timeframeOptions",
|
|
499
|
+
type: "timeframe"
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
{
|
|
504
|
+
name: "connect.template.trigger",
|
|
505
|
+
fields: [
|
|
506
|
+
{
|
|
507
|
+
label: void 0,
|
|
508
|
+
property: "campaign.event.type",
|
|
509
|
+
type: "trigger",
|
|
510
|
+
extras: "campaign.type"
|
|
511
|
+
}
|
|
512
|
+
]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
name: "connect.template.broadcast_configuration",
|
|
516
|
+
fields: [
|
|
517
|
+
{
|
|
518
|
+
label: void 0,
|
|
519
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
520
|
+
type: "rule_schedule",
|
|
521
|
+
extras: "campaign.timeframeOptions"
|
|
522
|
+
}
|
|
523
|
+
],
|
|
524
|
+
condition: {
|
|
525
|
+
property: "campaign.event.type",
|
|
526
|
+
value: "SCHEDULE"
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
]
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
name: "connect.template.terms_conditions",
|
|
533
|
+
groups: [
|
|
534
|
+
{
|
|
535
|
+
name: "connect.template.target_audience",
|
|
536
|
+
fields: [
|
|
537
|
+
{
|
|
538
|
+
label: void 0,
|
|
539
|
+
property: "campaign.event.rule",
|
|
540
|
+
type: "rule_user"
|
|
541
|
+
}
|
|
542
|
+
]
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
name: "connect.template.feedback_criteria",
|
|
546
|
+
fields: [
|
|
547
|
+
{
|
|
548
|
+
label: void 0,
|
|
549
|
+
property: "campaign.event.rule",
|
|
550
|
+
type: "rule_feedback"
|
|
551
|
+
}
|
|
552
|
+
],
|
|
553
|
+
condition: {
|
|
554
|
+
property: "campaign.event.type",
|
|
555
|
+
value: "FEEDBACK"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
name: "connect.template.configuration",
|
|
562
|
+
groups: [
|
|
563
|
+
{
|
|
564
|
+
name: "connect.template.content",
|
|
565
|
+
fields: [
|
|
566
|
+
{
|
|
567
|
+
label: void 0,
|
|
568
|
+
property: "campaign.message",
|
|
569
|
+
type: "message"
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: "connect.template.location",
|
|
575
|
+
fields: [
|
|
576
|
+
{
|
|
577
|
+
label: void 0,
|
|
578
|
+
property: "campaign.targetLocation",
|
|
579
|
+
type: "target_location"
|
|
580
|
+
}
|
|
581
|
+
]
|
|
582
|
+
}
|
|
583
|
+
]
|
|
584
|
+
}
|
|
585
|
+
],
|
|
586
|
+
defaultValue: {
|
|
587
|
+
templateId: "",
|
|
588
|
+
campaign: {
|
|
589
|
+
type: "BROADCAST",
|
|
590
|
+
// TODO: templateId use in db
|
|
591
|
+
templateId: "",
|
|
592
|
+
name: "",
|
|
593
|
+
description: "",
|
|
594
|
+
image: "",
|
|
595
|
+
event: {
|
|
596
|
+
type: "SCHEDULE",
|
|
597
|
+
rule: t.setRuleToGroup(
|
|
598
|
+
t.scaffoldGroup(),
|
|
599
|
+
t.setRuleToGroup(
|
|
600
|
+
t.scaffoldGroup("g_schedule"),
|
|
601
|
+
[
|
|
602
|
+
t.constructEntry(
|
|
603
|
+
"trigger.date",
|
|
604
|
+
"_rrule",
|
|
605
|
+
"RRULE:FREQ=DAILY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU"
|
|
606
|
+
),
|
|
607
|
+
t.constructEntry(
|
|
608
|
+
"trigger.time",
|
|
609
|
+
"_isOnTime",
|
|
610
|
+
"00:00"
|
|
611
|
+
)
|
|
612
|
+
],
|
|
613
|
+
"&&"
|
|
614
|
+
)
|
|
615
|
+
)
|
|
616
|
+
},
|
|
617
|
+
group: null,
|
|
618
|
+
targetLocation: null,
|
|
619
|
+
timeframeOptions: {
|
|
620
|
+
type: "timeframe",
|
|
621
|
+
property: "__now"
|
|
622
|
+
},
|
|
623
|
+
message: {
|
|
624
|
+
channel: "SMS",
|
|
625
|
+
content: "",
|
|
626
|
+
language: "en",
|
|
627
|
+
variables: []
|
|
628
|
+
}
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
},
|
|
632
|
+
POINT: {
|
|
633
|
+
name: "Experience Template",
|
|
634
|
+
description: "Experience template for campaign creation.",
|
|
635
|
+
steps: [
|
|
636
|
+
{
|
|
637
|
+
name: "connect.template.general_information",
|
|
638
|
+
groups: [
|
|
639
|
+
{
|
|
640
|
+
name: "connect.template.general",
|
|
641
|
+
fields: [
|
|
642
|
+
{
|
|
643
|
+
label: "connect.template.campaign_name",
|
|
644
|
+
property: "campaign.name",
|
|
645
|
+
type: "text"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
label: "connect.template.campaign_description",
|
|
649
|
+
property: "campaign.description",
|
|
650
|
+
type: "textarea"
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
label: "connect.template.campaign_period",
|
|
654
|
+
property: "campaign.timeframeOptions",
|
|
655
|
+
type: "timeframe"
|
|
656
|
+
}
|
|
657
|
+
]
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
name: "connect.template.trigger",
|
|
661
|
+
fields: [
|
|
662
|
+
{
|
|
663
|
+
label: void 0,
|
|
664
|
+
property: "campaign.event.type",
|
|
665
|
+
type: "trigger",
|
|
666
|
+
extras: "campaign.type"
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
},
|
|
670
|
+
{
|
|
671
|
+
name: void 0,
|
|
672
|
+
fields: [
|
|
673
|
+
{
|
|
674
|
+
label: void 0,
|
|
675
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
676
|
+
type: "rule_schedule",
|
|
677
|
+
extras: "campaign.timeframeOptions"
|
|
678
|
+
}
|
|
679
|
+
],
|
|
680
|
+
condition: {
|
|
681
|
+
property: "campaign.event.type",
|
|
682
|
+
value: "SCHEDULE"
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
]
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
name: "connect.template.terms_conditions",
|
|
689
|
+
groups: [
|
|
690
|
+
{
|
|
691
|
+
name: "connect.template.time_limitation",
|
|
692
|
+
fields: [
|
|
693
|
+
{
|
|
694
|
+
label: void 0,
|
|
695
|
+
property: "campaign.event.rule",
|
|
696
|
+
type: "rule_time",
|
|
697
|
+
extras: "campaign.type"
|
|
698
|
+
}
|
|
699
|
+
],
|
|
700
|
+
condition: {
|
|
701
|
+
not: !0,
|
|
702
|
+
property: "campaign.event.type",
|
|
703
|
+
value: "SCHEDULE"
|
|
704
|
+
}
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
name: "connect.template.spending_criteria",
|
|
708
|
+
fields: [
|
|
709
|
+
{
|
|
710
|
+
label: void 0,
|
|
711
|
+
property: "campaign.event.rule",
|
|
712
|
+
type: "rule_bill"
|
|
713
|
+
}
|
|
714
|
+
],
|
|
715
|
+
condition: {
|
|
716
|
+
property: "campaign.event.type",
|
|
717
|
+
value: "BILL_COMPLETED"
|
|
718
|
+
}
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
name: "connect.template.feedback_criteria",
|
|
722
|
+
fields: [
|
|
723
|
+
{
|
|
724
|
+
label: void 0,
|
|
725
|
+
property: "campaign.event.rule",
|
|
726
|
+
type: "rule_feedback"
|
|
727
|
+
}
|
|
728
|
+
],
|
|
729
|
+
condition: {
|
|
730
|
+
property: "campaign.event.type",
|
|
731
|
+
value: "FEEDBACK"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
name: "connect.template.target_audience",
|
|
736
|
+
fields: [
|
|
737
|
+
{
|
|
738
|
+
label: void 0,
|
|
739
|
+
property: "campaign.event.rule",
|
|
740
|
+
type: "rule_user"
|
|
741
|
+
}
|
|
742
|
+
]
|
|
743
|
+
}
|
|
744
|
+
]
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: "connect.template.configuration",
|
|
748
|
+
groups: [
|
|
749
|
+
{
|
|
750
|
+
name: "connect.template.earning_type",
|
|
751
|
+
fields: [
|
|
752
|
+
{
|
|
753
|
+
label: void 0,
|
|
754
|
+
property: "campaign.earningOption",
|
|
755
|
+
type: "earning_option",
|
|
756
|
+
extras: ""
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
label: void 0,
|
|
760
|
+
property: "campaign.config.validityOption",
|
|
761
|
+
type: "validity_option"
|
|
762
|
+
}
|
|
763
|
+
]
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
name: "connect.template.location",
|
|
767
|
+
fields: [
|
|
768
|
+
{
|
|
769
|
+
label: "connect.template.target_location",
|
|
770
|
+
property: "campaign.targetLocation",
|
|
771
|
+
type: "target_location"
|
|
772
|
+
}
|
|
773
|
+
]
|
|
774
|
+
}
|
|
775
|
+
// {
|
|
776
|
+
// name: 'connect.template.notify_audience',
|
|
777
|
+
// fields: [
|
|
778
|
+
// {
|
|
779
|
+
// label: 'connect.template.send_notification',
|
|
780
|
+
// property: 'campaign.notify',
|
|
781
|
+
// type: 'switch',
|
|
782
|
+
// },
|
|
783
|
+
// ],
|
|
784
|
+
// },
|
|
785
|
+
]
|
|
786
|
+
}
|
|
787
|
+
],
|
|
788
|
+
defaultValue: {
|
|
789
|
+
// TODO: templateId use in db
|
|
790
|
+
templateId: "",
|
|
791
|
+
campaign: {
|
|
792
|
+
collectible: "",
|
|
793
|
+
type: "POINT",
|
|
794
|
+
// TODO: templateId use in db
|
|
795
|
+
templateId: "",
|
|
796
|
+
name: "",
|
|
797
|
+
description: "",
|
|
798
|
+
image: "",
|
|
799
|
+
event: {
|
|
800
|
+
type: "BILL_COMPLETED",
|
|
801
|
+
rule: t.scaffoldGroup()
|
|
802
|
+
},
|
|
803
|
+
group: null,
|
|
804
|
+
targetLocation: null,
|
|
805
|
+
timeframeOptions: {
|
|
806
|
+
type: "timeframe",
|
|
807
|
+
property: "__now"
|
|
808
|
+
},
|
|
809
|
+
earningOption: {
|
|
810
|
+
type: "FIXED",
|
|
811
|
+
amount: 1
|
|
812
|
+
},
|
|
813
|
+
config: {
|
|
814
|
+
validityOption: {}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
},
|
|
819
|
+
COIN: {
|
|
820
|
+
name: "Point Template",
|
|
821
|
+
description: "Point template for campaign creation.",
|
|
822
|
+
steps: [
|
|
823
|
+
{
|
|
824
|
+
name: "connect.template.general_information",
|
|
825
|
+
groups: [
|
|
826
|
+
{
|
|
827
|
+
name: "connect.template.general",
|
|
828
|
+
fields: [
|
|
829
|
+
{
|
|
830
|
+
label: "connect.template.campaign_name",
|
|
831
|
+
property: "campaign.name",
|
|
832
|
+
type: "text"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
label: "connect.template.campaign_description",
|
|
836
|
+
property: "campaign.description",
|
|
837
|
+
type: "textarea"
|
|
838
|
+
},
|
|
839
|
+
{
|
|
840
|
+
label: "connect.template.campaign_period",
|
|
841
|
+
property: "campaign.timeframeOptions",
|
|
842
|
+
type: "timeframe"
|
|
843
|
+
}
|
|
844
|
+
]
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
name: "connect.template.trigger",
|
|
848
|
+
fields: [
|
|
849
|
+
{
|
|
850
|
+
label: void 0,
|
|
851
|
+
property: "campaign.event.type",
|
|
852
|
+
type: "trigger",
|
|
853
|
+
extras: "campaign.type"
|
|
854
|
+
}
|
|
855
|
+
]
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
name: void 0,
|
|
859
|
+
fields: [
|
|
860
|
+
{
|
|
861
|
+
label: void 0,
|
|
862
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
863
|
+
type: "rule_schedule",
|
|
864
|
+
extras: "campaign.timeframeOptions"
|
|
865
|
+
}
|
|
866
|
+
],
|
|
867
|
+
condition: {
|
|
868
|
+
property: "campaign.event.type",
|
|
869
|
+
value: "SCHEDULE"
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
]
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: "connect.template.terms_conditions",
|
|
876
|
+
groups: [
|
|
877
|
+
{
|
|
878
|
+
name: "connect.template.time_limitation",
|
|
879
|
+
fields: [
|
|
880
|
+
{
|
|
881
|
+
label: void 0,
|
|
882
|
+
property: "campaign.event.rule",
|
|
883
|
+
type: "rule_time",
|
|
884
|
+
extras: "campaign.type"
|
|
885
|
+
}
|
|
886
|
+
],
|
|
887
|
+
condition: {
|
|
888
|
+
not: !0,
|
|
889
|
+
property: "campaign.event.type",
|
|
890
|
+
value: "SCHEDULE"
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
name: "connect.template.spending_criteria",
|
|
895
|
+
fields: [
|
|
896
|
+
{
|
|
897
|
+
label: void 0,
|
|
898
|
+
property: "campaign.event.rule",
|
|
899
|
+
type: "rule_bill"
|
|
900
|
+
}
|
|
901
|
+
],
|
|
902
|
+
condition: {
|
|
903
|
+
property: "campaign.event.type",
|
|
904
|
+
value: "BILL_COMPLETED"
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
name: "connect.template.feedback_criteria",
|
|
909
|
+
fields: [
|
|
910
|
+
{
|
|
911
|
+
label: void 0,
|
|
912
|
+
property: "campaign.event.rule",
|
|
913
|
+
type: "rule_feedback"
|
|
914
|
+
}
|
|
915
|
+
],
|
|
916
|
+
condition: {
|
|
917
|
+
property: "campaign.event.type",
|
|
918
|
+
value: "FEEDBACK"
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: "connect.template.target_audience",
|
|
923
|
+
fields: [
|
|
924
|
+
{
|
|
925
|
+
label: void 0,
|
|
926
|
+
property: "campaign.event.rule",
|
|
927
|
+
type: "rule_user"
|
|
928
|
+
}
|
|
929
|
+
]
|
|
930
|
+
}
|
|
931
|
+
]
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
name: "connect.template.configuration",
|
|
935
|
+
groups: [
|
|
936
|
+
{
|
|
937
|
+
name: "connect.template.earning_type",
|
|
938
|
+
fields: [
|
|
939
|
+
{
|
|
940
|
+
label: void 0,
|
|
941
|
+
property: "campaign.earningOption",
|
|
942
|
+
type: "earning_option",
|
|
943
|
+
extras: ""
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
label: void 0,
|
|
947
|
+
property: "campaign.config.validityOption",
|
|
948
|
+
type: "validity_option"
|
|
949
|
+
}
|
|
950
|
+
]
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
name: "connect.template.location",
|
|
954
|
+
fields: [
|
|
955
|
+
{
|
|
956
|
+
label: "connect.template.target_location",
|
|
957
|
+
property: "campaign.targetLocation",
|
|
958
|
+
type: "target_location"
|
|
959
|
+
}
|
|
960
|
+
]
|
|
961
|
+
}
|
|
962
|
+
// {
|
|
963
|
+
// name: 'connect.template.notify_audience',
|
|
964
|
+
// fields: [
|
|
965
|
+
// {
|
|
966
|
+
// label: 'connect.template.send_notification',
|
|
967
|
+
// property: 'campaign.notify',
|
|
968
|
+
// type: 'switch',
|
|
969
|
+
// },
|
|
970
|
+
// ],
|
|
971
|
+
// },
|
|
972
|
+
]
|
|
973
|
+
}
|
|
974
|
+
],
|
|
975
|
+
defaultValue: {
|
|
976
|
+
// TODO: templateId use in db
|
|
977
|
+
templateId: "",
|
|
978
|
+
campaign: {
|
|
979
|
+
collectible: "",
|
|
980
|
+
type: "COIN",
|
|
981
|
+
// TODO: templateId use in db
|
|
982
|
+
templateId: "",
|
|
983
|
+
name: "",
|
|
984
|
+
description: "",
|
|
985
|
+
image: "",
|
|
986
|
+
event: {
|
|
987
|
+
type: "BILL_COMPLETED",
|
|
988
|
+
rule: t.scaffoldGroup()
|
|
989
|
+
},
|
|
990
|
+
group: null,
|
|
991
|
+
targetLocation: null,
|
|
992
|
+
timeframeOptions: {
|
|
993
|
+
type: "timeframe",
|
|
994
|
+
property: "__now"
|
|
995
|
+
},
|
|
996
|
+
earningOption: {
|
|
997
|
+
type: "FIXED",
|
|
998
|
+
amount: 1
|
|
999
|
+
},
|
|
1000
|
+
config: {
|
|
1001
|
+
validityOption: {}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
CREDIT: {
|
|
1007
|
+
name: "Credit Template",
|
|
1008
|
+
description: "Credit template for campaign creation.",
|
|
1009
|
+
steps: [
|
|
1010
|
+
{
|
|
1011
|
+
name: "connect.template.general_information",
|
|
1012
|
+
groups: [
|
|
1013
|
+
{
|
|
1014
|
+
name: "connect.template.general",
|
|
1015
|
+
fields: [
|
|
1016
|
+
{
|
|
1017
|
+
label: "connect.template.campaign_name",
|
|
1018
|
+
property: "campaign.name",
|
|
1019
|
+
type: "text"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
label: "connect.template.campaign_description",
|
|
1023
|
+
property: "campaign.description",
|
|
1024
|
+
type: "textarea"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
label: "connect.template.campaign_period",
|
|
1028
|
+
property: "campaign.timeframeOptions",
|
|
1029
|
+
type: "timeframe"
|
|
1030
|
+
}
|
|
1031
|
+
]
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: "connect.template.trigger",
|
|
1035
|
+
fields: [
|
|
1036
|
+
{
|
|
1037
|
+
label: void 0,
|
|
1038
|
+
property: "campaign.event.type",
|
|
1039
|
+
type: "trigger",
|
|
1040
|
+
extras: "campaign.type"
|
|
1041
|
+
}
|
|
1042
|
+
]
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
name: void 0,
|
|
1046
|
+
fields: [
|
|
1047
|
+
{
|
|
1048
|
+
label: void 0,
|
|
1049
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
1050
|
+
type: "rule_schedule",
|
|
1051
|
+
extras: "campaign.timeframeOptions"
|
|
1052
|
+
}
|
|
1053
|
+
],
|
|
1054
|
+
condition: {
|
|
1055
|
+
property: "campaign.event.type",
|
|
1056
|
+
value: "SCHEDULE"
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
]
|
|
1060
|
+
},
|
|
1061
|
+
{
|
|
1062
|
+
name: "connect.template.terms_conditions",
|
|
1063
|
+
groups: [
|
|
1064
|
+
{
|
|
1065
|
+
name: "connect.template.time_limitation",
|
|
1066
|
+
fields: [
|
|
1067
|
+
{
|
|
1068
|
+
label: void 0,
|
|
1069
|
+
property: "campaign.event.rule",
|
|
1070
|
+
type: "rule_time",
|
|
1071
|
+
extras: "campaign.type"
|
|
1072
|
+
}
|
|
1073
|
+
],
|
|
1074
|
+
condition: {
|
|
1075
|
+
not: !0,
|
|
1076
|
+
property: "campaign.event.type",
|
|
1077
|
+
value: "SCHEDULE"
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
{
|
|
1081
|
+
name: "connect.template.spending_criteria",
|
|
1082
|
+
fields: [
|
|
1083
|
+
{
|
|
1084
|
+
label: void 0,
|
|
1085
|
+
property: "campaign.event.rule",
|
|
1086
|
+
type: "rule_bill"
|
|
1087
|
+
}
|
|
1088
|
+
],
|
|
1089
|
+
condition: {
|
|
1090
|
+
property: "campaign.event.type",
|
|
1091
|
+
value: "BILL_COMPLETED"
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
name: "connect.template.feedback_criteria",
|
|
1096
|
+
fields: [
|
|
1097
|
+
{
|
|
1098
|
+
label: void 0,
|
|
1099
|
+
property: "campaign.event.rule",
|
|
1100
|
+
type: "rule_feedback"
|
|
1101
|
+
}
|
|
1102
|
+
],
|
|
1103
|
+
condition: {
|
|
1104
|
+
property: "campaign.event.type",
|
|
1105
|
+
value: "FEEDBACK"
|
|
1106
|
+
}
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
name: "connect.template.target_audience",
|
|
1110
|
+
fields: [
|
|
1111
|
+
{
|
|
1112
|
+
label: void 0,
|
|
1113
|
+
property: "campaign.event.rule",
|
|
1114
|
+
type: "rule_user"
|
|
1115
|
+
}
|
|
1116
|
+
]
|
|
1117
|
+
}
|
|
1118
|
+
]
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
name: "connect.template.configuration",
|
|
1122
|
+
groups: [
|
|
1123
|
+
{
|
|
1124
|
+
name: "connect.template.earning_type",
|
|
1125
|
+
fields: [
|
|
1126
|
+
{
|
|
1127
|
+
label: void 0,
|
|
1128
|
+
property: "campaign.earningOption",
|
|
1129
|
+
type: "earning_option",
|
|
1130
|
+
extras: ""
|
|
1131
|
+
},
|
|
1132
|
+
{
|
|
1133
|
+
label: void 0,
|
|
1134
|
+
property: "campaign.config.validityOption",
|
|
1135
|
+
type: "validity_option"
|
|
1136
|
+
}
|
|
1137
|
+
]
|
|
1138
|
+
},
|
|
1139
|
+
{
|
|
1140
|
+
name: "connect.template.location",
|
|
1141
|
+
fields: [
|
|
1142
|
+
{
|
|
1143
|
+
label: "connect.template.target_location",
|
|
1144
|
+
property: "campaign.targetLocation",
|
|
1145
|
+
type: "target_location"
|
|
1146
|
+
}
|
|
1147
|
+
]
|
|
1148
|
+
}
|
|
1149
|
+
// {
|
|
1150
|
+
// name: 'connect.template.notify_audience',
|
|
1151
|
+
// fields: [
|
|
1152
|
+
// {
|
|
1153
|
+
// label: 'connect.template.send_notification',
|
|
1154
|
+
// property: 'campaign.notify',
|
|
1155
|
+
// type: 'switch',
|
|
1156
|
+
// },
|
|
1157
|
+
// ],
|
|
1158
|
+
// },
|
|
1159
|
+
]
|
|
1160
|
+
}
|
|
1161
|
+
],
|
|
1162
|
+
defaultValue: {
|
|
1163
|
+
// TODO: templateId use in db
|
|
1164
|
+
templateId: "",
|
|
1165
|
+
campaign: {
|
|
1166
|
+
collectible: "",
|
|
1167
|
+
type: "CREDIT",
|
|
1168
|
+
// TODO: templateId use in db
|
|
1169
|
+
templateId: "",
|
|
1170
|
+
name: "",
|
|
1171
|
+
description: "",
|
|
1172
|
+
image: "",
|
|
1173
|
+
event: {
|
|
1174
|
+
type: "BILL_COMPLETED",
|
|
1175
|
+
rule: t.scaffoldGroup()
|
|
1176
|
+
},
|
|
1177
|
+
group: null,
|
|
1178
|
+
targetLocation: null,
|
|
1179
|
+
timeframeOptions: {
|
|
1180
|
+
type: "timeframe",
|
|
1181
|
+
property: "__now"
|
|
1182
|
+
},
|
|
1183
|
+
earningOption: {
|
|
1184
|
+
type: "FIXED",
|
|
1185
|
+
amount: 1
|
|
1186
|
+
},
|
|
1187
|
+
config: {
|
|
1188
|
+
validityOption: {
|
|
1189
|
+
validForDay: 1
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
},
|
|
1195
|
+
GAME: {
|
|
1196
|
+
name: "Token Template",
|
|
1197
|
+
description: "Token template for campaign creation.",
|
|
1198
|
+
steps: [
|
|
1199
|
+
{
|
|
1200
|
+
name: "connect.template.general_information",
|
|
1201
|
+
groups: [
|
|
1202
|
+
{
|
|
1203
|
+
name: "connect.template.general",
|
|
1204
|
+
fields: [
|
|
1205
|
+
{
|
|
1206
|
+
label: "connect.template.campaign_name",
|
|
1207
|
+
property: "campaign.name",
|
|
1208
|
+
type: "text"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
label: "connect.template.campaign_description",
|
|
1212
|
+
property: "campaign.description",
|
|
1213
|
+
type: "textarea"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
label: "connect.template.campaign_period",
|
|
1217
|
+
property: "campaign.timeframeOptions",
|
|
1218
|
+
type: "timeframe"
|
|
1219
|
+
}
|
|
1220
|
+
]
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: "connect.template.trigger",
|
|
1224
|
+
fields: [
|
|
1225
|
+
{
|
|
1226
|
+
label: void 0,
|
|
1227
|
+
property: "campaign.event.type",
|
|
1228
|
+
type: "trigger",
|
|
1229
|
+
extras: "campaign.type"
|
|
1230
|
+
}
|
|
1231
|
+
]
|
|
1232
|
+
},
|
|
1233
|
+
{
|
|
1234
|
+
name: void 0,
|
|
1235
|
+
fields: [
|
|
1236
|
+
{
|
|
1237
|
+
label: void 0,
|
|
1238
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
1239
|
+
type: "rule_schedule",
|
|
1240
|
+
extras: "campaign.timeframeOptions"
|
|
1241
|
+
}
|
|
1242
|
+
],
|
|
1243
|
+
condition: {
|
|
1244
|
+
property: "campaign.event.type",
|
|
1245
|
+
value: "SCHEDULE"
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
]
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
name: "connect.template.terms_conditions",
|
|
1252
|
+
groups: [
|
|
1253
|
+
{
|
|
1254
|
+
name: "connect.template.time_limitation",
|
|
1255
|
+
fields: [
|
|
1256
|
+
{
|
|
1257
|
+
label: void 0,
|
|
1258
|
+
property: "campaign.event.rule",
|
|
1259
|
+
type: "rule_time",
|
|
1260
|
+
extras: "campaign.type"
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
condition: {
|
|
1264
|
+
not: !0,
|
|
1265
|
+
property: "campaign.event.type",
|
|
1266
|
+
value: "SCHEDULE"
|
|
1267
|
+
}
|
|
1268
|
+
},
|
|
1269
|
+
{
|
|
1270
|
+
name: "connect.template.spending_criteria",
|
|
1271
|
+
fields: [
|
|
1272
|
+
{
|
|
1273
|
+
label: void 0,
|
|
1274
|
+
property: "campaign.event.rule",
|
|
1275
|
+
type: "rule_bill"
|
|
1276
|
+
}
|
|
1277
|
+
],
|
|
1278
|
+
condition: {
|
|
1279
|
+
property: "campaign.event.type",
|
|
1280
|
+
value: "BILL_COMPLETED"
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
name: "connect.template.feedback_criteria",
|
|
1285
|
+
fields: [
|
|
1286
|
+
{
|
|
1287
|
+
label: void 0,
|
|
1288
|
+
property: "campaign.event.rule",
|
|
1289
|
+
type: "rule_feedback"
|
|
1290
|
+
}
|
|
1291
|
+
],
|
|
1292
|
+
condition: {
|
|
1293
|
+
property: "campaign.event.type",
|
|
1294
|
+
value: "FEEDBACK"
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
{
|
|
1298
|
+
name: "connect.template.target_audience",
|
|
1299
|
+
fields: [
|
|
1300
|
+
{
|
|
1301
|
+
label: void 0,
|
|
1302
|
+
property: "campaign.event.rule",
|
|
1303
|
+
type: "rule_user"
|
|
1304
|
+
}
|
|
1305
|
+
]
|
|
1306
|
+
}
|
|
1307
|
+
]
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
name: "connect.template.configuration",
|
|
1311
|
+
groups: [
|
|
1312
|
+
{
|
|
1313
|
+
name: "connect.template.earning_type",
|
|
1314
|
+
fields: [
|
|
1315
|
+
{
|
|
1316
|
+
label: void 0,
|
|
1317
|
+
property: "campaign.earningOption",
|
|
1318
|
+
type: "earning_option",
|
|
1319
|
+
extras: ""
|
|
1320
|
+
},
|
|
1321
|
+
{
|
|
1322
|
+
label: void 0,
|
|
1323
|
+
property: "campaign.config.validityOption",
|
|
1324
|
+
type: "validity_option"
|
|
1325
|
+
}
|
|
1326
|
+
]
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
name: "connect.template.location",
|
|
1330
|
+
fields: [
|
|
1331
|
+
{
|
|
1332
|
+
label: "connect.template.target_location",
|
|
1333
|
+
property: "campaign.targetLocation",
|
|
1334
|
+
type: "target_location"
|
|
1335
|
+
}
|
|
1336
|
+
]
|
|
1337
|
+
}
|
|
1338
|
+
]
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
name: "connect.template.game_configuration",
|
|
1342
|
+
groups: [
|
|
1343
|
+
{
|
|
1344
|
+
name: "connect.template.game_type",
|
|
1345
|
+
fields: [
|
|
1346
|
+
{
|
|
1347
|
+
label: "connect.template.select_game",
|
|
1348
|
+
property: "configs.extras.gameType",
|
|
1349
|
+
type: "game_type"
|
|
1350
|
+
}
|
|
1351
|
+
]
|
|
1352
|
+
}
|
|
1353
|
+
]
|
|
1354
|
+
},
|
|
1355
|
+
{
|
|
1356
|
+
name: "connect.template.reward_pool",
|
|
1357
|
+
groups: [
|
|
1358
|
+
{
|
|
1359
|
+
name: "connect.template.reward_pool",
|
|
1360
|
+
fields: [
|
|
1361
|
+
{
|
|
1362
|
+
label: "Configure the reward type and weightage given to your customer.",
|
|
1363
|
+
property: "campaign.game.rewards",
|
|
1364
|
+
type: "reward_pool"
|
|
1365
|
+
}
|
|
1366
|
+
]
|
|
1367
|
+
}
|
|
1368
|
+
]
|
|
1369
|
+
}
|
|
1370
|
+
],
|
|
1371
|
+
defaultValue: {
|
|
1372
|
+
// TODO: templateId use in db
|
|
1373
|
+
templateId: "",
|
|
1374
|
+
campaign: {
|
|
1375
|
+
collectible: "",
|
|
1376
|
+
type: "GAME",
|
|
1377
|
+
// TODO: templateId use in db
|
|
1378
|
+
templateId: "",
|
|
1379
|
+
name: "",
|
|
1380
|
+
description: "",
|
|
1381
|
+
image: "",
|
|
1382
|
+
event: {
|
|
1383
|
+
type: "BILL_COMPLETED",
|
|
1384
|
+
rule: t.scaffoldGroup()
|
|
1385
|
+
},
|
|
1386
|
+
group: null,
|
|
1387
|
+
targetLocation: null,
|
|
1388
|
+
timeframeOptions: {
|
|
1389
|
+
type: "timeframe",
|
|
1390
|
+
property: "__now"
|
|
1391
|
+
},
|
|
1392
|
+
earningOption: {
|
|
1393
|
+
type: "FIXED",
|
|
1394
|
+
amount: 1
|
|
1395
|
+
},
|
|
1396
|
+
config: {
|
|
1397
|
+
validityOption: {}
|
|
1398
|
+
},
|
|
1399
|
+
game: {
|
|
1400
|
+
event: {
|
|
1401
|
+
type: "GAME_COMPLETED",
|
|
1402
|
+
rule: t.scaffoldGroup()
|
|
1403
|
+
},
|
|
1404
|
+
name: "rewardpool_",
|
|
1405
|
+
targetLocation: null,
|
|
1406
|
+
timeframeOptions: {
|
|
1407
|
+
type: "timeframe",
|
|
1408
|
+
property: "__now"
|
|
1409
|
+
},
|
|
1410
|
+
type: "REWARD_POOL",
|
|
1411
|
+
rewards: []
|
|
1412
|
+
}
|
|
1413
|
+
},
|
|
1414
|
+
configs: o("GAME", {
|
|
1415
|
+
name: "Token",
|
|
1416
|
+
business: null,
|
|
1417
|
+
noCampaign: !1
|
|
1418
|
+
})
|
|
1419
|
+
}
|
|
1420
|
+
},
|
|
1421
|
+
MISSION: {
|
|
1422
|
+
name: "Mission Template",
|
|
1423
|
+
description: "Mission template for campaign creation.",
|
|
1424
|
+
steps: [
|
|
1425
|
+
{
|
|
1426
|
+
name: "connect.template.general_information",
|
|
1427
|
+
groups: [
|
|
1428
|
+
{
|
|
1429
|
+
name: "connect.template.general",
|
|
1430
|
+
fields: [
|
|
1431
|
+
{
|
|
1432
|
+
label: "connect.template.campaign_name",
|
|
1433
|
+
property: "campaign.name",
|
|
1434
|
+
type: "text"
|
|
1435
|
+
},
|
|
1436
|
+
{
|
|
1437
|
+
label: "connect.template.campaign_description",
|
|
1438
|
+
property: "campaign.description",
|
|
1439
|
+
type: "textarea"
|
|
1440
|
+
},
|
|
1441
|
+
{
|
|
1442
|
+
label: "connect.template.campaign_period",
|
|
1443
|
+
property: "campaign.timeframeOptions",
|
|
1444
|
+
type: "timeframe"
|
|
1445
|
+
}
|
|
1446
|
+
]
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
name: "connect.template.trigger",
|
|
1450
|
+
fields: [
|
|
1451
|
+
{
|
|
1452
|
+
label: void 0,
|
|
1453
|
+
property: "campaign.event.type",
|
|
1454
|
+
type: "trigger",
|
|
1455
|
+
extras: "campaign.type"
|
|
1456
|
+
}
|
|
1457
|
+
]
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
name: void 0,
|
|
1461
|
+
fields: [
|
|
1462
|
+
{
|
|
1463
|
+
label: void 0,
|
|
1464
|
+
property: "campaign.event.rule.rules.g_schedule",
|
|
1465
|
+
type: "rule_schedule",
|
|
1466
|
+
extras: "campaign.timeframeOptions"
|
|
1467
|
+
}
|
|
1468
|
+
],
|
|
1469
|
+
condition: {
|
|
1470
|
+
property: "campaign.event.type",
|
|
1471
|
+
value: "SCHEDULE"
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
]
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
name: "connect.template.terms_conditions",
|
|
1478
|
+
groups: [
|
|
1479
|
+
{
|
|
1480
|
+
name: "connect.template.time_limitation",
|
|
1481
|
+
fields: [
|
|
1482
|
+
{
|
|
1483
|
+
label: void 0,
|
|
1484
|
+
property: "campaign.event.rule",
|
|
1485
|
+
type: "rule_time",
|
|
1486
|
+
extras: "campaign.type"
|
|
1487
|
+
}
|
|
1488
|
+
],
|
|
1489
|
+
condition: {
|
|
1490
|
+
not: !0,
|
|
1491
|
+
property: "campaign.event.type",
|
|
1492
|
+
value: "SCHEDULE"
|
|
1493
|
+
}
|
|
1494
|
+
},
|
|
1495
|
+
{
|
|
1496
|
+
name: "connect.template.feedback_criteria",
|
|
1497
|
+
fields: [
|
|
1498
|
+
{
|
|
1499
|
+
label: void 0,
|
|
1500
|
+
property: "campaign.event.rule",
|
|
1501
|
+
type: "rule_feedback"
|
|
1502
|
+
}
|
|
1503
|
+
],
|
|
1504
|
+
condition: {
|
|
1505
|
+
property: "campaign.event.type",
|
|
1506
|
+
value: "FEEDBACK"
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1509
|
+
{
|
|
1510
|
+
name: "connect.template.target_audience",
|
|
1511
|
+
fields: [
|
|
1512
|
+
{
|
|
1513
|
+
label: void 0,
|
|
1514
|
+
property: "campaign.event.rule",
|
|
1515
|
+
type: "rule_user"
|
|
1516
|
+
}
|
|
1517
|
+
]
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
name: "connect.template.spending_criteria",
|
|
1521
|
+
fields: [
|
|
1522
|
+
{
|
|
1523
|
+
label: void 0,
|
|
1524
|
+
property: "campaign.event.rule",
|
|
1525
|
+
type: "rule_bill"
|
|
1526
|
+
}
|
|
1527
|
+
],
|
|
1528
|
+
condition: {
|
|
1529
|
+
property: "campaign.event.type",
|
|
1530
|
+
value: "BILL_COMPLETED"
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
]
|
|
1534
|
+
},
|
|
1535
|
+
{
|
|
1536
|
+
name: "connect.template.configuration",
|
|
1537
|
+
groups: [
|
|
1538
|
+
// {
|
|
1539
|
+
// name: 'Earning type',
|
|
1540
|
+
// fields: [
|
|
1541
|
+
// {
|
|
1542
|
+
// label: undefined,
|
|
1543
|
+
// property: 'campaign.earningOption',
|
|
1544
|
+
// type: 'earning_option',
|
|
1545
|
+
// extras: 'campaign',
|
|
1546
|
+
// },
|
|
1547
|
+
// ],
|
|
1548
|
+
// },
|
|
1549
|
+
{
|
|
1550
|
+
name: "connect.template.location",
|
|
1551
|
+
fields: [
|
|
1552
|
+
{
|
|
1553
|
+
label: "connect.template.target_location",
|
|
1554
|
+
property: "campaign.targetLocation",
|
|
1555
|
+
type: "target_location"
|
|
1556
|
+
}
|
|
1557
|
+
]
|
|
1558
|
+
}
|
|
1559
|
+
]
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
name: "connect.template.mission_configuration",
|
|
1563
|
+
groups: [
|
|
1564
|
+
{
|
|
1565
|
+
name: void 0,
|
|
1566
|
+
fields: [
|
|
1567
|
+
{
|
|
1568
|
+
label: void 0,
|
|
1569
|
+
property: "campaign.mission",
|
|
1570
|
+
type: "mission"
|
|
1571
|
+
}
|
|
1572
|
+
]
|
|
1573
|
+
},
|
|
1574
|
+
{
|
|
1575
|
+
name: "connect.template.earning_type",
|
|
1576
|
+
fields: [
|
|
1577
|
+
{
|
|
1578
|
+
label: void 0,
|
|
1579
|
+
property: "campaign.earningOption",
|
|
1580
|
+
type: "earning_option",
|
|
1581
|
+
extras: ""
|
|
1582
|
+
}
|
|
1583
|
+
]
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
name: "connect.template.validity_configuration",
|
|
1587
|
+
fields: [
|
|
1588
|
+
{
|
|
1589
|
+
label: void 0,
|
|
1590
|
+
property: "campaign.config.validityOption",
|
|
1591
|
+
type: "validity_option"
|
|
1592
|
+
}
|
|
1593
|
+
]
|
|
1594
|
+
},
|
|
1595
|
+
{
|
|
1596
|
+
name: "connect.template.mission_participation",
|
|
1597
|
+
fields: [
|
|
1598
|
+
{
|
|
1599
|
+
label: void 0,
|
|
1600
|
+
property: "configs.options",
|
|
1601
|
+
type: "collectible_options",
|
|
1602
|
+
extras: "campaign.type"
|
|
1603
|
+
}
|
|
1604
|
+
]
|
|
1605
|
+
}
|
|
1606
|
+
]
|
|
1607
|
+
},
|
|
1608
|
+
{
|
|
1609
|
+
name: "connect.template.reward_setup",
|
|
1610
|
+
groups: [
|
|
1611
|
+
{
|
|
1612
|
+
name: "connect.template.configure_reward",
|
|
1613
|
+
fields: [
|
|
1614
|
+
{
|
|
1615
|
+
label: "connect.template.configure_reward_customer",
|
|
1616
|
+
property: "campaign.rewards",
|
|
1617
|
+
type: "mission_pool",
|
|
1618
|
+
extras: "campaign"
|
|
1619
|
+
}
|
|
1620
|
+
]
|
|
1621
|
+
}
|
|
1622
|
+
]
|
|
1623
|
+
}
|
|
1624
|
+
],
|
|
1625
|
+
defaultValue: {
|
|
1626
|
+
// TODO: templateId use in db
|
|
1627
|
+
templateId: "",
|
|
1628
|
+
campaign: {
|
|
1629
|
+
type: "MISSION",
|
|
1630
|
+
business: "",
|
|
1631
|
+
collectible: "",
|
|
1632
|
+
name: "",
|
|
1633
|
+
earningOption: {
|
|
1634
|
+
amount: 1,
|
|
1635
|
+
type: "FIXED"
|
|
1636
|
+
},
|
|
1637
|
+
event: {
|
|
1638
|
+
type: "BILL_COMPLETED",
|
|
1639
|
+
rule: t.scaffoldGroup()
|
|
1640
|
+
},
|
|
1641
|
+
mission: {
|
|
1642
|
+
type: "STAMP",
|
|
1643
|
+
end: 10
|
|
1644
|
+
},
|
|
1645
|
+
rewards: [],
|
|
1646
|
+
config: {
|
|
1647
|
+
validityOption: {
|
|
1648
|
+
followFirstReceive: !0
|
|
1649
|
+
}
|
|
1650
|
+
},
|
|
1651
|
+
timeframeOptions: {
|
|
1652
|
+
type: "timeframe"
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
configs: o("STAMP", {
|
|
1656
|
+
business: null,
|
|
1657
|
+
noCampaign: !1
|
|
1658
|
+
})
|
|
1659
|
+
}
|
|
1660
|
+
},
|
|
1661
|
+
GRAB: {
|
|
1662
|
+
name: "Grab Campaign Template",
|
|
1663
|
+
description: "Grab campaign template for campaign creation.",
|
|
1664
|
+
steps: [
|
|
1665
|
+
{
|
|
1666
|
+
name: "connect.template.general_information",
|
|
1667
|
+
groups: [
|
|
1668
|
+
{
|
|
1669
|
+
name: "connect.template.general",
|
|
1670
|
+
fields: [
|
|
1671
|
+
{
|
|
1672
|
+
label: "connect.template.campaign_name",
|
|
1673
|
+
property: "campaign.name",
|
|
1674
|
+
type: "text"
|
|
1675
|
+
},
|
|
1676
|
+
{
|
|
1677
|
+
label: "connect.template.campaign_period",
|
|
1678
|
+
property: "campaign.timeframeOptions",
|
|
1679
|
+
type: "timeframe"
|
|
1680
|
+
}
|
|
1681
|
+
]
|
|
1682
|
+
}
|
|
1683
|
+
]
|
|
1684
|
+
},
|
|
1685
|
+
{
|
|
1686
|
+
name: "connect.template.discount",
|
|
1687
|
+
groups: [
|
|
1688
|
+
{
|
|
1689
|
+
name: "connect.template.discount",
|
|
1690
|
+
fields: [
|
|
1691
|
+
{
|
|
1692
|
+
label: void 0,
|
|
1693
|
+
property: "campaign.discount",
|
|
1694
|
+
type: "grab_effect"
|
|
1695
|
+
}
|
|
1696
|
+
]
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
name: "connect.template.grab_quota",
|
|
1700
|
+
fields: [
|
|
1701
|
+
{
|
|
1702
|
+
label: void 0,
|
|
1703
|
+
property: "campaign.quotas",
|
|
1704
|
+
type: "grab_quota"
|
|
1705
|
+
}
|
|
1706
|
+
]
|
|
1707
|
+
},
|
|
1708
|
+
{
|
|
1709
|
+
name: "connect.template.grab_condition",
|
|
1710
|
+
fields: [
|
|
1711
|
+
{
|
|
1712
|
+
label: void 0,
|
|
1713
|
+
property: "campaign.conditions",
|
|
1714
|
+
type: "grab_conditions"
|
|
1715
|
+
}
|
|
1716
|
+
]
|
|
1717
|
+
}
|
|
1718
|
+
]
|
|
1719
|
+
},
|
|
1720
|
+
{
|
|
1721
|
+
name: "connect.template.terms_conditions",
|
|
1722
|
+
groups: [
|
|
1723
|
+
{
|
|
1724
|
+
name: "Location",
|
|
1725
|
+
fields: [
|
|
1726
|
+
{
|
|
1727
|
+
label: "Target location",
|
|
1728
|
+
property: "campaign.targetLocation",
|
|
1729
|
+
type: "target_location"
|
|
1730
|
+
}
|
|
1731
|
+
]
|
|
1732
|
+
}
|
|
1733
|
+
]
|
|
1734
|
+
}
|
|
1735
|
+
],
|
|
1736
|
+
defaultValue: {
|
|
1737
|
+
templateId: "",
|
|
1738
|
+
campaign: {
|
|
1739
|
+
type: "GRAB",
|
|
1740
|
+
templateId: "",
|
|
1741
|
+
name: "",
|
|
1742
|
+
description: "",
|
|
1743
|
+
image: "",
|
|
1744
|
+
discount: null,
|
|
1745
|
+
group: null,
|
|
1746
|
+
event: {
|
|
1747
|
+
type: "MAKING_ORDER",
|
|
1748
|
+
rule: t.scaffoldGroup()
|
|
1749
|
+
},
|
|
1750
|
+
quotas: {
|
|
1751
|
+
totalCount: 10,
|
|
1752
|
+
totalCountPerUser: 2
|
|
1753
|
+
},
|
|
1754
|
+
conditions: {
|
|
1755
|
+
startTime: "",
|
|
1756
|
+
endTime: "",
|
|
1757
|
+
eaterType: "all",
|
|
1758
|
+
minBasketAmount: 10,
|
|
1759
|
+
bundleQuantity: 2,
|
|
1760
|
+
workingHour: {
|
|
1761
|
+
sun: {
|
|
1762
|
+
periods: [
|
|
1763
|
+
{
|
|
1764
|
+
startTime: "11:30",
|
|
1765
|
+
endTime: "14:00"
|
|
1766
|
+
}
|
|
1767
|
+
]
|
|
1768
|
+
},
|
|
1769
|
+
mon: {
|
|
1770
|
+
periods: [
|
|
1771
|
+
{
|
|
1772
|
+
startTime: "11:30",
|
|
1773
|
+
endTime: "14:00"
|
|
1774
|
+
}
|
|
1775
|
+
]
|
|
1776
|
+
},
|
|
1777
|
+
tue: {
|
|
1778
|
+
periods: [
|
|
1779
|
+
{
|
|
1780
|
+
startTime: "11:30",
|
|
1781
|
+
endTime: "14:00"
|
|
1782
|
+
}
|
|
1783
|
+
]
|
|
1784
|
+
},
|
|
1785
|
+
wed: {
|
|
1786
|
+
periods: [
|
|
1787
|
+
{
|
|
1788
|
+
startTime: "11:30",
|
|
1789
|
+
endTime: "14:00"
|
|
1790
|
+
}
|
|
1791
|
+
]
|
|
1792
|
+
},
|
|
1793
|
+
thu: {
|
|
1794
|
+
periods: [
|
|
1795
|
+
{
|
|
1796
|
+
startTime: "11:30",
|
|
1797
|
+
endTime: "14:00"
|
|
1798
|
+
}
|
|
1799
|
+
]
|
|
1800
|
+
},
|
|
1801
|
+
fri: {
|
|
1802
|
+
periods: [
|
|
1803
|
+
{
|
|
1804
|
+
startTime: "11:30",
|
|
1805
|
+
endTime: "14:00"
|
|
1806
|
+
}
|
|
1807
|
+
]
|
|
1808
|
+
},
|
|
1809
|
+
sat: {
|
|
1810
|
+
periods: [
|
|
1811
|
+
{
|
|
1812
|
+
startTime: "11:30",
|
|
1813
|
+
endTime: "14:00"
|
|
1814
|
+
}
|
|
1815
|
+
]
|
|
1816
|
+
}
|
|
1817
|
+
}
|
|
1818
|
+
},
|
|
1819
|
+
targetLocation: null,
|
|
1820
|
+
timeframeOptions: {
|
|
1821
|
+
type: "timeframe",
|
|
1822
|
+
property: "__now"
|
|
1823
|
+
}
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
}
|
|
1827
|
+
};
|
|
1828
|
+
t.scaffoldGroup(), o("STAMP", {
|
|
1829
|
+
business: null,
|
|
1830
|
+
noCampaign: !1
|
|
1831
|
+
});
|
|
1832
|
+
({
|
|
1833
|
+
...t.scaffoldGroup()
|
|
1834
|
+
}, o("VOUCHER", {
|
|
1835
|
+
name: "",
|
|
1836
|
+
business: null,
|
|
1837
|
+
noCampaign: !1
|
|
1838
|
+
}));
|
|
1839
|
+
({
|
|
1840
|
+
...t.scaffoldGroup()
|
|
1841
|
+
}, o("VOUCHER", {
|
|
1842
|
+
name: "",
|
|
1843
|
+
business: null,
|
|
1844
|
+
noCampaign: !1
|
|
1845
|
+
}));
|
|
1846
|
+
({
|
|
1847
|
+
...t.scaffoldGroup()
|
|
1848
|
+
});
|
|
1849
|
+
({
|
|
1850
|
+
...t.scaffoldGroup()
|
|
1851
|
+
});
|
|
1852
|
+
({
|
|
1853
|
+
...t.scaffoldGroup()
|
|
1854
|
+
});
|
|
1855
|
+
t.setRuleToGroup(
|
|
1856
|
+
t.scaffoldGroup(),
|
|
1857
|
+
t.setRuleToGroup(
|
|
1858
|
+
t.scaffoldGroup("g_user"),
|
|
1859
|
+
[t.constructEntry("user.member", "_isIn", [!0])],
|
|
1860
|
+
"&&"
|
|
1861
|
+
)
|
|
1862
|
+
);
|
|
1863
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1864
|
+
t.setRuleToGroup(
|
|
1865
|
+
t.scaffoldGroup("g_user"),
|
|
1866
|
+
[
|
|
1867
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1868
|
+
op: "this",
|
|
1869
|
+
unit: "month",
|
|
1870
|
+
ignoreYear: !0
|
|
1871
|
+
})
|
|
1872
|
+
],
|
|
1873
|
+
"&&"
|
|
1874
|
+
)
|
|
1875
|
+
]);
|
|
1876
|
+
({
|
|
1877
|
+
...t.scaffoldGroup()
|
|
1878
|
+
});
|
|
1879
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1880
|
+
t.setRuleToGroup(
|
|
1881
|
+
t.scaffoldGroup("g_user"),
|
|
1882
|
+
[
|
|
1883
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1884
|
+
op: "this",
|
|
1885
|
+
unit: "month",
|
|
1886
|
+
ignoreYear: !0
|
|
1887
|
+
})
|
|
1888
|
+
],
|
|
1889
|
+
"&&"
|
|
1890
|
+
)
|
|
1891
|
+
]);
|
|
1892
|
+
({
|
|
1893
|
+
...t.scaffoldGroup()
|
|
1894
|
+
});
|
|
1895
|
+
({
|
|
1896
|
+
...t.scaffoldGroup()
|
|
1897
|
+
}, o("VOUCHER", {
|
|
1898
|
+
name: "",
|
|
1899
|
+
business: null,
|
|
1900
|
+
noCampaign: !1
|
|
1901
|
+
}));
|
|
1902
|
+
t.setRuleToGroup(
|
|
1903
|
+
t.scaffoldGroup(),
|
|
1904
|
+
t.setRuleToGroup(
|
|
1905
|
+
t.scaffoldGroup("g_schedule"),
|
|
1906
|
+
[
|
|
1907
|
+
t.constructEntry("trigger.date", "_isOnDate", ""),
|
|
1908
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1909
|
+
],
|
|
1910
|
+
"&&"
|
|
1911
|
+
)
|
|
1912
|
+
);
|
|
1913
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1914
|
+
t.setRuleToGroup(
|
|
1915
|
+
t.scaffoldGroup("g_schedule"),
|
|
1916
|
+
[
|
|
1917
|
+
t.constructEntry(
|
|
1918
|
+
"trigger.date",
|
|
1919
|
+
"_rrule",
|
|
1920
|
+
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1921
|
+
),
|
|
1922
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1923
|
+
],
|
|
1924
|
+
"&&"
|
|
1925
|
+
)
|
|
1926
|
+
]);
|
|
1927
|
+
({ ...t.scaffoldGroup() });
|
|
1928
|
+
t.setRuleToGroup(
|
|
1929
|
+
t.scaffoldGroup(),
|
|
1930
|
+
t.setRuleToGroup(
|
|
1931
|
+
t.scaffoldGroup("g_schedule"),
|
|
1932
|
+
[
|
|
1933
|
+
t.constructEntry(
|
|
1934
|
+
"trigger.date",
|
|
1935
|
+
"_rrule",
|
|
1936
|
+
"RRULE:FREQ=WEEKLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYDAY=MO"
|
|
1937
|
+
),
|
|
1938
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1939
|
+
],
|
|
1940
|
+
"&&"
|
|
1941
|
+
)
|
|
1942
|
+
);
|
|
1943
|
+
t.scaffoldGroup(), t.scaffoldGroup(), o("GAME", {
|
|
1944
|
+
name: "Token",
|
|
1945
|
+
business: null,
|
|
1946
|
+
noCampaign: !1
|
|
1947
|
+
});
|
|
1948
|
+
({
|
|
1949
|
+
...t.scaffoldGroup()
|
|
1950
|
+
}, o("VOUCHER", {
|
|
1951
|
+
name: "",
|
|
1952
|
+
business: null,
|
|
1953
|
+
noCampaign: !1
|
|
1954
|
+
}));
|
|
1955
|
+
t.setRuleToGroup(t.scaffoldGroup(), [
|
|
1956
|
+
t.setRuleToGroup(
|
|
1957
|
+
t.scaffoldGroup("g_schedule"),
|
|
1958
|
+
[
|
|
1959
|
+
t.constructEntry(
|
|
1960
|
+
"trigger.date",
|
|
1961
|
+
"_rrule",
|
|
1962
|
+
"RRULE:FREQ=MONTHLY;INTERVAL=1;BYHOUR=0;BYMINUTE=0;BYSECOND=0;WKST=SU;BYMONTHDAY=1"
|
|
1963
|
+
),
|
|
1964
|
+
t.constructEntry("trigger.time", "_isOnTime", "00:00")
|
|
1965
|
+
],
|
|
1966
|
+
"&&"
|
|
1967
|
+
),
|
|
1968
|
+
t.setRuleToGroup(
|
|
1969
|
+
t.scaffoldGroup("g_user"),
|
|
1970
|
+
[
|
|
1971
|
+
t.constructEntry("user.birthday", "_isRange", {
|
|
1972
|
+
op: "this",
|
|
1973
|
+
unit: "month",
|
|
1974
|
+
ignoreYear: !0
|
|
1975
|
+
})
|
|
1976
|
+
],
|
|
1977
|
+
"&&"
|
|
1978
|
+
)
|
|
1979
|
+
]), o("VOUCHER", {
|
|
1980
|
+
name: "",
|
|
1981
|
+
business: null,
|
|
1982
|
+
noCampaign: !1
|
|
1983
|
+
});
|
|
1984
|
+
({
|
|
1985
|
+
...t.scaffoldGroup()
|
|
1986
|
+
});
|
|
1987
|
+
({
|
|
1988
|
+
...t.scaffoldGroup()
|
|
1989
|
+
});
|
|
1990
|
+
({
|
|
1991
|
+
...t.scaffoldGroup()
|
|
1992
|
+
});
|
|
1993
|
+
({
|
|
1994
|
+
...t.scaffoldGroup()
|
|
1995
|
+
});
|
|
1996
|
+
({
|
|
1997
|
+
...t.scaffoldGroup()
|
|
1998
|
+
});
|
|
1999
|
+
({
|
|
2000
|
+
...t.scaffoldGroup()
|
|
2001
|
+
});
|
|
2002
|
+
const M = e.enum([
|
|
2003
|
+
"MEMBER_REWARD",
|
|
2004
|
+
"PAID_LOYALTY",
|
|
2005
|
+
"COLLECT_FEEDBACK",
|
|
2006
|
+
"REVISITING",
|
|
2007
|
+
"SPEND_MORE",
|
|
2008
|
+
"PRODUCT_LAUNCHING",
|
|
2009
|
+
"BROADCAST",
|
|
2010
|
+
"BIRTHDAY",
|
|
2011
|
+
"GAME"
|
|
2012
|
+
]), F = e.enum([
|
|
2013
|
+
"text",
|
|
2014
|
+
"number",
|
|
2015
|
+
"textarea",
|
|
2016
|
+
"trigger",
|
|
2017
|
+
"timeframe",
|
|
2018
|
+
"image",
|
|
2019
|
+
"switch",
|
|
2020
|
+
"collectible_options",
|
|
2021
|
+
"target_location",
|
|
2022
|
+
"effect",
|
|
2023
|
+
"message",
|
|
2024
|
+
"earning_option",
|
|
2025
|
+
"validity_option",
|
|
2026
|
+
"game_type",
|
|
2027
|
+
"reward_pool",
|
|
2028
|
+
"mission",
|
|
2029
|
+
"mission_type",
|
|
2030
|
+
"mission_end",
|
|
2031
|
+
"mission_pool",
|
|
2032
|
+
"rule_schedule",
|
|
2033
|
+
"rule_user",
|
|
2034
|
+
"rule_time",
|
|
2035
|
+
"rule_bill",
|
|
2036
|
+
"rule_feedback",
|
|
2037
|
+
"rule_birthday",
|
|
2038
|
+
"promotion_game_type",
|
|
2039
|
+
"grab_effect",
|
|
2040
|
+
"grab_quota",
|
|
2041
|
+
"grab_conditions"
|
|
2042
|
+
]), k = e.object({
|
|
2043
|
+
label: e.string().optional(),
|
|
2044
|
+
label_locale: e.record(e.string()).nullish(),
|
|
2045
|
+
property: e.string().or(e.any()),
|
|
2046
|
+
type: F,
|
|
2047
|
+
extras: e.string().optional(),
|
|
2048
|
+
isRuleChildren: e.boolean().optional()
|
|
2049
|
+
}), d = e.object({
|
|
2050
|
+
not: e.boolean().optional(),
|
|
2051
|
+
property: e.string(),
|
|
2052
|
+
value: e.any()
|
|
2053
|
+
}), B = e.object({
|
|
2054
|
+
name: e.string().optional(),
|
|
2055
|
+
name_locale: e.record(e.string()).nullish(),
|
|
2056
|
+
fields: e.array(k),
|
|
2057
|
+
condition: d.optional().or(
|
|
2058
|
+
e.array(d)
|
|
2059
|
+
)
|
|
2060
|
+
}), V = e.object({
|
|
2061
|
+
name: e.string(),
|
|
2062
|
+
name_locale: e.record(e.string()).nullish(),
|
|
2063
|
+
groups: e.array(B)
|
|
2064
|
+
});
|
|
2065
|
+
e.object({
|
|
2066
|
+
_id: a,
|
|
2067
|
+
name: e.string(),
|
|
2068
|
+
name_locale: e.record(e.string()).nullish(),
|
|
2069
|
+
description: e.string().nullish(),
|
|
2070
|
+
description_locale: e.record(e.string()).nullish(),
|
|
2071
|
+
steps: e.array(V).min(1),
|
|
2072
|
+
intention: e.array(M),
|
|
2073
|
+
defaultValue: e.any()
|
|
2074
|
+
}).describe(JSON.stringify({ collectionName: "MarketingTemplates" }));
|
|
2075
|
+
const Y = {
|
|
2076
|
+
collectionName: "Businesses",
|
|
2077
|
+
transform: {
|
|
2078
|
+
_id: "oid"
|
|
2079
|
+
}
|
|
2080
|
+
};
|
|
2081
|
+
e.object({
|
|
2082
|
+
_id: a,
|
|
2083
|
+
ownerId: e.string(),
|
|
2084
|
+
name: e.string(),
|
|
2085
|
+
credit: e.number(),
|
|
2086
|
+
forceSend: e.boolean().optional()
|
|
2087
|
+
}).describe(i.describe(Y));
|
|
2088
|
+
const _ = e.enum(["PHONE"]), K = e.enum([
|
|
2089
|
+
"MOCEAN",
|
|
2090
|
+
"SLACK",
|
|
2091
|
+
"SMS",
|
|
2092
|
+
"EMAIL",
|
|
2093
|
+
"WHATSAPP"
|
|
2094
|
+
]), W = e.enum(["PENDING", "COMPLETED", "FAILED"]), X = e.enum([
|
|
2095
|
+
"General",
|
|
2096
|
+
"Otp",
|
|
2097
|
+
"Marketing",
|
|
2098
|
+
"Ordering",
|
|
2099
|
+
"MemberInvitation",
|
|
2100
|
+
"MarketingPromotion"
|
|
2101
|
+
]), q = e.object({
|
|
2102
|
+
type: _
|
|
2103
|
+
}), y = q.extend({
|
|
2104
|
+
type: e.literal(_.enum.PHONE),
|
|
2105
|
+
provider: K,
|
|
2106
|
+
usage: X.optional()
|
|
2107
|
+
}), Q = {
|
|
2108
|
+
collectionName: "Notifications",
|
|
2109
|
+
transform: { _id: "oid", business: "oid" }
|
|
2110
|
+
};
|
|
2111
|
+
e.object({
|
|
2112
|
+
_id: a,
|
|
2113
|
+
business: a,
|
|
2114
|
+
target: e.string(),
|
|
2115
|
+
title: e.string().optional(),
|
|
2116
|
+
message: e.string(),
|
|
2117
|
+
option: y,
|
|
2118
|
+
status: W,
|
|
2119
|
+
ref: e.string().optional()
|
|
2120
|
+
}).describe(i.describe(Q));
|
|
2121
|
+
const Z = e.object({
|
|
2122
|
+
target: e.string(),
|
|
2123
|
+
title: e.string().optional(),
|
|
2124
|
+
message: e.string(),
|
|
2125
|
+
option: y,
|
|
2126
|
+
ref: e.string().optional()
|
|
2127
|
+
});
|
|
2128
|
+
e.object({
|
|
2129
|
+
campaignId: e.string(),
|
|
2130
|
+
notification: Z,
|
|
2131
|
+
business: e.string()
|
|
2132
|
+
});
|
|
2133
|
+
e.object({
|
|
2134
|
+
phone: e.string(),
|
|
2135
|
+
message: e.string()
|
|
2136
|
+
});
|
|
2137
|
+
const h = e.object({
|
|
2138
|
+
name: e.string().optional(),
|
|
2139
|
+
address: e.string()
|
|
2140
|
+
}), $ = e.object({
|
|
2141
|
+
filename: e.string(),
|
|
2142
|
+
content: e.instanceof(Uint8Array)
|
|
2143
|
+
});
|
|
2144
|
+
e.object({
|
|
2145
|
+
from: h.optional(),
|
|
2146
|
+
to: e.array(h),
|
|
2147
|
+
subject: e.string(),
|
|
2148
|
+
html: e.string().optional(),
|
|
2149
|
+
attachments: e.array($).optional()
|
|
2150
|
+
});
|
|
2151
|
+
e.object({
|
|
2152
|
+
subject: e.string(),
|
|
2153
|
+
body: e.string()
|
|
2154
|
+
});
|
|
2155
|
+
e.object({
|
|
2156
|
+
target: e.string(),
|
|
2157
|
+
message: e.string(),
|
|
2158
|
+
mediaUrl: e.string().optional()
|
|
2159
|
+
});
|
|
2160
|
+
e.enum(["send_notification", "TRIGGER_EVENT"]);
|
|
2161
|
+
e.enum([
|
|
2162
|
+
"campaign.general",
|
|
2163
|
+
"campaign.broadcast",
|
|
2164
|
+
"notification.send",
|
|
2165
|
+
"BILL_CREATE"
|
|
2166
|
+
]);
|
|
2167
|
+
e.object({
|
|
2168
|
+
claimIds: e.array(e.string()),
|
|
2169
|
+
billId: e.string()
|
|
2170
|
+
});
|
|
2171
|
+
e.object({
|
|
2172
|
+
claimIds: e.array(e.string())
|
|
2173
|
+
});
|
|
2174
|
+
e.object({
|
|
2175
|
+
claimIds: e.array(e.string())
|
|
2176
|
+
});
|
|
2177
|
+
e.object({
|
|
2178
|
+
userId: e.string().optional(),
|
|
2179
|
+
ids: e.array(e.string()),
|
|
2180
|
+
type: e.enum(["DINE_IN", "PICKUP", "DELIVERY"]),
|
|
2181
|
+
restaurantId: e.string(),
|
|
2182
|
+
orderId: e.string().optional()
|
|
2183
|
+
});
|
|
2184
|
+
e.object({
|
|
2185
|
+
claimIds: e.array(e.string()),
|
|
2186
|
+
billId: e.string()
|
|
2187
|
+
});
|
|
2188
|
+
e.object({
|
|
2189
|
+
amount: P,
|
|
2190
|
+
member: e.string(),
|
|
2191
|
+
bill: e.string(),
|
|
2192
|
+
otp: e.string().nullish(),
|
|
2193
|
+
businessId: e.string()
|
|
2194
|
+
});
|
|
2195
|
+
e.object({
|
|
2196
|
+
orderId: e.string()
|
|
2197
|
+
});
|
|
2198
|
+
var f = /* @__PURE__ */ ((n) => (n[n.feedMe = 0] = "feedMe", n[n.business = 1] = "business", n[n.restaurant = 2] = "restaurant", n))(f || {});
|
|
2199
|
+
e.nativeEnum(f);
|
|
2200
|
+
e.enum(["manage", "create", "read", "update", "delete"]);
|
|
2201
|
+
e.enum(["all", "restaurant", "business", "delivery", "agent"]);
|
|
2202
|
+
e.enum(["quota"]);
|
|
2203
|
+
var b = /* @__PURE__ */ ((n) => (n.marketing = "business::marketing", n.campaign = "business::campaign", n.counter = "business::counter", n.permission = "business::permission", n.role = "business::role", n))(b || {});
|
|
2204
|
+
e.nativeEnum(b);
|
|
2205
|
+
e.enum(["restaurant"]);
|
|
2206
|
+
const ee = e.object({
|
|
2207
|
+
label: e.string(),
|
|
2208
|
+
subject: e.union([e.string(), e.array(e.string())]),
|
|
2209
|
+
actions: e.union([e.string(), e.array(e.string())]),
|
|
2210
|
+
fields: e.array(e.string()).optional(),
|
|
2211
|
+
conditions: e.any().optional(),
|
|
2212
|
+
inverted: e.boolean().optional(),
|
|
2213
|
+
reason: e.string().optional()
|
|
2214
|
+
});
|
|
2215
|
+
e.object({
|
|
2216
|
+
_id: a,
|
|
2217
|
+
businessId: e.string(),
|
|
2218
|
+
userId: e.string(),
|
|
2219
|
+
email: e.string().nullish(),
|
|
2220
|
+
phoneNo: e.string().nullish(),
|
|
2221
|
+
permissions: e.array(e.lazy(() => ee))
|
|
2222
|
+
}).describe(
|
|
2223
|
+
i.describe({
|
|
2224
|
+
collectionName: "PermissionUsers",
|
|
2225
|
+
transform: {
|
|
2226
|
+
_id: "oid"
|
|
2227
|
+
}
|
|
2228
|
+
})
|
|
2229
|
+
);
|
|
2230
|
+
const H = e.object({
|
|
2231
|
+
userId: e.string(),
|
|
2232
|
+
level: e.number(),
|
|
2233
|
+
role: e.string().optional(),
|
|
2234
|
+
businessId: e.string().optional(),
|
|
2235
|
+
restaurantId: e.string().optional()
|
|
2236
|
+
}), te = e.function().args(e.any(), H).returns(e.boolean()), ae = e.function().args(H).returns(e.promise(e.array(e.any())));
|
|
2237
|
+
e.object({
|
|
2238
|
+
isAdmin: te,
|
|
2239
|
+
getRules: ae
|
|
2240
|
+
});
|
|
2241
|
+
e.object({
|
|
2242
|
+
transactions: e.array(J),
|
|
2243
|
+
collections: e.array(E)
|
|
2244
|
+
});
|
|
2245
|
+
const z = e.enum([
|
|
2246
|
+
"ROCK_PAPER_SCISSOR"
|
|
2247
|
+
]);
|
|
2248
|
+
z.enum.ROCK_PAPER_SCISSOR + "";
|
|
2249
|
+
e.object({
|
|
2250
|
+
type: z
|
|
2251
|
+
});
|
|
2252
|
+
e.object({
|
|
2253
|
+
host: e.string().url(),
|
|
2254
|
+
player: e.string().url(),
|
|
2255
|
+
token: e.string(),
|
|
2256
|
+
roomId: e.string()
|
|
2257
|
+
});
|
|
2258
|
+
e.enum(["FACEBOOK", "INSTAGRAM", "TV", "BRAND_APP"]);
|
|
2259
|
+
const ne = {
|
|
2260
|
+
collectionName: "MarketingMaterials",
|
|
2261
|
+
transform: {
|
|
2262
|
+
_id: "oid",
|
|
2263
|
+
business: "oid"
|
|
2264
|
+
}
|
|
2265
|
+
};
|
|
2266
|
+
e.object({
|
|
2267
|
+
_id: a,
|
|
2268
|
+
business: a,
|
|
2269
|
+
imageUrl: e.string().url(),
|
|
2270
|
+
headline: e.string(),
|
|
2271
|
+
caption: e.string(),
|
|
2272
|
+
editedAt: e.coerce.date()
|
|
2273
|
+
}).describe(i.describe(ne));
|
|
2274
|
+
e.object({
|
|
2275
|
+
id: e.number(),
|
|
2276
|
+
name: e.string(),
|
|
2277
|
+
email: e.string(),
|
|
2278
|
+
phone: e.string(),
|
|
2279
|
+
birthday: e.string(),
|
|
2280
|
+
address: e.string().nullable(),
|
|
2281
|
+
avatar: e.string(),
|
|
2282
|
+
tier: e.string(),
|
|
2283
|
+
visitCount: e.number().nullable(),
|
|
2284
|
+
lastVisit: e.string().nullable(),
|
|
2285
|
+
averageSpending: e.number().nullable(),
|
|
2286
|
+
point: e.number()
|
|
2287
|
+
});
|
|
2288
|
+
e.object({
|
|
2289
|
+
businessId: e.string(),
|
|
2290
|
+
phone: e.string().optional(),
|
|
2291
|
+
email: e.string().optional()
|
|
2292
|
+
});
|
|
2293
|
+
const oe = e.enum([
|
|
2294
|
+
"PENDING",
|
|
2295
|
+
"SUCCESS",
|
|
2296
|
+
"FAILED",
|
|
2297
|
+
"RETRYING"
|
|
2298
|
+
]), ie = {
|
|
2299
|
+
collectionName: "WebhookLogs",
|
|
2300
|
+
transform: {
|
|
2301
|
+
_id: "oid",
|
|
2302
|
+
business: "oid"
|
|
2303
|
+
}
|
|
2304
|
+
};
|
|
2305
|
+
e.object({
|
|
2306
|
+
_id: a,
|
|
2307
|
+
business: a,
|
|
2308
|
+
type: e.string(),
|
|
2309
|
+
payload: e.record(e.any()),
|
|
2310
|
+
status: oe,
|
|
2311
|
+
response: e.any().optional(),
|
|
2312
|
+
error: e.string().optional()
|
|
2313
|
+
}).describe(i.describe(ie));
|
|
2314
|
+
const le = e.enum(["AUTO", "MANUAL"]);
|
|
2315
|
+
e.enum(["IN_PROGRESS", "COMPLETED"]);
|
|
2316
|
+
const C = e.object({
|
|
2317
|
+
_id: a,
|
|
2318
|
+
name: e.string().min(1, "Name is required").max(50),
|
|
2319
|
+
type: le,
|
|
2320
|
+
event: O.optional()
|
|
2321
|
+
}), re = e.object({
|
|
2322
|
+
from: e.number().int("Must be integer").min(1, "Min referral count need to start from 1"),
|
|
2323
|
+
to: e.number().int("Must be integer").nullish()
|
|
2324
|
+
}).superRefine((n, U) => {
|
|
2325
|
+
n.from && n.to && n.from > n.to && U.addIssue({
|
|
2326
|
+
code: "custom",
|
|
2327
|
+
message: "Max referral count must be more than min referral count"
|
|
2328
|
+
});
|
|
2329
|
+
}), ce = e.object({
|
|
2330
|
+
threshold: re,
|
|
2331
|
+
rewards: e.array(a),
|
|
2332
|
+
pf_reward: e.array(p).optional()
|
|
2333
|
+
}), m = e.object({
|
|
2334
|
+
id: e.string(),
|
|
2335
|
+
name: e.string().min(1, "Name is required").max(50, "Name must be less than 50 characters"),
|
|
2336
|
+
rule: R.optional(),
|
|
2337
|
+
rewards: e.array(ce)
|
|
2338
|
+
}), pe = {
|
|
2339
|
+
collectionName: "ReferralRecords",
|
|
2340
|
+
transform: {
|
|
2341
|
+
_id: "oid",
|
|
2342
|
+
business: "oid",
|
|
2343
|
+
referer: "oid",
|
|
2344
|
+
referee: "oid",
|
|
2345
|
+
refereeReward: "oid"
|
|
2346
|
+
}
|
|
2347
|
+
}, me = e.object({
|
|
2348
|
+
completedAt: e.coerce.date(),
|
|
2349
|
+
criteria: a,
|
|
2350
|
+
ref: e.string()
|
|
2351
|
+
}), se = e.object({
|
|
2352
|
+
_id: a,
|
|
2353
|
+
business: a,
|
|
2354
|
+
referer: a,
|
|
2355
|
+
referee: a,
|
|
2356
|
+
criteria: e.array(C),
|
|
2357
|
+
reward: e.array(m),
|
|
2358
|
+
refereeReward: e.array(a).optional(),
|
|
2359
|
+
criteria_progress: e.array(me),
|
|
2360
|
+
status: e.string(),
|
|
2361
|
+
pf_referer: r.optional(),
|
|
2362
|
+
pf_referee: r.optional(),
|
|
2363
|
+
pf_refereeReward: e.array(p).optional()
|
|
2364
|
+
}).describe(i.describe(pe));
|
|
2365
|
+
se.pick({
|
|
2366
|
+
_id: !0,
|
|
2367
|
+
business: !0,
|
|
2368
|
+
referer: !0,
|
|
2369
|
+
referee: !0,
|
|
2370
|
+
criteria_progress: !0,
|
|
2371
|
+
criteria: !0
|
|
2372
|
+
}).extend({
|
|
2373
|
+
pf_referee: r.pick({
|
|
2374
|
+
_id: !0,
|
|
2375
|
+
name: !0,
|
|
2376
|
+
phoneNumber: !0,
|
|
2377
|
+
photoUrl: !0
|
|
2378
|
+
})
|
|
2379
|
+
});
|
|
2380
|
+
const ge = {
|
|
2381
|
+
collectionName: "ReferralProgram",
|
|
2382
|
+
transform: {
|
|
2383
|
+
_id: "oid",
|
|
2384
|
+
business: "oid"
|
|
2385
|
+
}
|
|
2386
|
+
}, T = e.object({
|
|
2387
|
+
_id: a,
|
|
2388
|
+
business: a,
|
|
2389
|
+
term_and_condition: e.string().optional(),
|
|
2390
|
+
refereeReward: e.array(a).optional(),
|
|
2391
|
+
reward: e.array(m),
|
|
2392
|
+
criteria: e.array(C)
|
|
2393
|
+
}).describe(i.describe(ge));
|
|
2394
|
+
e.object({
|
|
2395
|
+
referer: a,
|
|
2396
|
+
referee: a,
|
|
2397
|
+
business: a
|
|
2398
|
+
});
|
|
2399
|
+
e.object({
|
|
2400
|
+
program: T.pick({
|
|
2401
|
+
_id: !0,
|
|
2402
|
+
business: !0,
|
|
2403
|
+
term_and_condition: !0
|
|
2404
|
+
}).extend({
|
|
2405
|
+
reward: m.optional(),
|
|
2406
|
+
pf_refereeReward: e.array(p).optional()
|
|
2407
|
+
}),
|
|
2408
|
+
referralCount: e.number(),
|
|
2409
|
+
successReferralCount: e.number(),
|
|
2410
|
+
referredBy: r.pick({
|
|
2411
|
+
_id: !0,
|
|
2412
|
+
name: !0,
|
|
2413
|
+
phoneNumber: !0,
|
|
2414
|
+
photoUrl: !0
|
|
2415
|
+
}).optional()
|
|
2416
|
+
});
|
|
2417
|
+
T.extend({
|
|
2418
|
+
updateReferralRecord: e.boolean().optional()
|
|
2419
|
+
});
|
|
2420
|
+
const de = e.object({
|
|
2421
|
+
facebookPageId: e.string(),
|
|
2422
|
+
pageName: e.string(),
|
|
2423
|
+
pageProfileImageUrl: e.string(),
|
|
2424
|
+
pageAccessToken: e.string().optional(),
|
|
2425
|
+
locationIds: e.array(a)
|
|
2426
|
+
}), he = e.object({
|
|
2427
|
+
locationId: a.nullable(),
|
|
2428
|
+
googleLocationName: e.string(),
|
|
2429
|
+
displayName: e.string().optional()
|
|
2430
|
+
}), ue = e.object({
|
|
2431
|
+
token: e.string().nullable(),
|
|
2432
|
+
locations: e.array(he)
|
|
2433
|
+
}), _e = e.object({
|
|
2434
|
+
token: e.string().nullable(),
|
|
2435
|
+
pages: e.array(de)
|
|
2436
|
+
});
|
|
2437
|
+
e.object({
|
|
2438
|
+
_id: a,
|
|
2439
|
+
businessId: a,
|
|
2440
|
+
google: ue.nullable(),
|
|
2441
|
+
facebook: _e.nullable()
|
|
2442
|
+
}).describe(
|
|
2443
|
+
i.describe({
|
|
2444
|
+
collectionName: "reviewSourceConfig",
|
|
2445
|
+
transform: {
|
|
2446
|
+
_id: "oid",
|
|
2447
|
+
businessId: "oid"
|
|
2448
|
+
}
|
|
2449
|
+
})
|
|
2450
|
+
);
|
|
2451
|
+
e.object({
|
|
2452
|
+
token: e.string()
|
|
2453
|
+
});
|
|
2454
|
+
e.object({
|
|
2455
|
+
locations: e.array(
|
|
2456
|
+
e.object({
|
|
2457
|
+
googleLocationName: e.string(),
|
|
2458
|
+
locationId: e.string().nullable(),
|
|
2459
|
+
displayName: e.string().optional()
|
|
2460
|
+
})
|
|
2461
|
+
)
|
|
2462
|
+
});
|
|
2463
|
+
e.object({
|
|
2464
|
+
token: e.string()
|
|
2465
|
+
});
|
|
2466
|
+
e.object({
|
|
2467
|
+
pages: e.array(
|
|
2468
|
+
e.object({
|
|
2469
|
+
facebookPageId: e.string(),
|
|
2470
|
+
locationIds: e.array(e.string())
|
|
2471
|
+
})
|
|
2472
|
+
)
|
|
2473
|
+
});
|
|
2474
|
+
const u = e.object({
|
|
2475
|
+
_id: e.string(),
|
|
2476
|
+
name: e.string()
|
|
2477
|
+
});
|
|
2478
|
+
e.object({
|
|
2479
|
+
_id: e.string(),
|
|
2480
|
+
google: e.object({
|
|
2481
|
+
token: e.string().nullable(),
|
|
2482
|
+
locations: e.array(
|
|
2483
|
+
e.object({
|
|
2484
|
+
googleLocationName: e.string(),
|
|
2485
|
+
displayName: e.string().optional(),
|
|
2486
|
+
location: u.nullable()
|
|
2487
|
+
})
|
|
2488
|
+
)
|
|
2489
|
+
}).nullable(),
|
|
2490
|
+
facebook: e.object({
|
|
2491
|
+
token: e.string().nullable(),
|
|
2492
|
+
pages: e.array(
|
|
2493
|
+
e.object({
|
|
2494
|
+
facebookPageId: e.string(),
|
|
2495
|
+
pageName: e.string(),
|
|
2496
|
+
pageProfileImageUrl: e.string(),
|
|
2497
|
+
locations: e.array(u)
|
|
2498
|
+
})
|
|
2499
|
+
)
|
|
2500
|
+
}).nullable()
|
|
2501
|
+
});
|
|
2502
|
+
const v = e.object({
|
|
2503
|
+
name: e.string(),
|
|
2504
|
+
pictureUrl: e.string()
|
|
2505
|
+
}), ye = v.extend({
|
|
2506
|
+
isAnonymous: e.boolean().optional()
|
|
2507
|
+
}), fe = v.extend({
|
|
2508
|
+
id: e.string().optional()
|
|
2509
|
+
}), c = e.object({
|
|
2510
|
+
comment: e.string(),
|
|
2511
|
+
updateTime: e.coerce.date()
|
|
2512
|
+
}), l = e.object({
|
|
2513
|
+
thumbnailUrl: e.string(),
|
|
2514
|
+
thumbnailLabel: e.string(),
|
|
2515
|
+
videoUrl: e.string().optional()
|
|
2516
|
+
}), be = {
|
|
2517
|
+
collectionName: "reviews",
|
|
2518
|
+
transform: {
|
|
2519
|
+
_id: "oid",
|
|
2520
|
+
businessId: "oid",
|
|
2521
|
+
locationId: "oid"
|
|
2522
|
+
},
|
|
2523
|
+
lookups: {
|
|
2524
|
+
reviewerId: {
|
|
2525
|
+
as: "reviewer",
|
|
2526
|
+
fromCollection: "UsersV2"
|
|
2527
|
+
},
|
|
2528
|
+
locationId: {
|
|
2529
|
+
as: "location",
|
|
2530
|
+
fromCollection: "Locations"
|
|
2531
|
+
}
|
|
2532
|
+
}
|
|
2533
|
+
}, S = e.enum(["google", "facebook", "feedme"]);
|
|
2534
|
+
S.options;
|
|
2535
|
+
e.enum(["google", "facebook"]);
|
|
2536
|
+
const He = e.enum([
|
|
2537
|
+
"createTime_desc",
|
|
2538
|
+
"createTime_asc",
|
|
2539
|
+
"rating_asc",
|
|
2540
|
+
"rating_desc"
|
|
2541
|
+
]);
|
|
2542
|
+
e.object({
|
|
2543
|
+
source: S.optional(),
|
|
2544
|
+
dateFrom: e.coerce.date().optional(),
|
|
2545
|
+
dateTo: e.coerce.date().optional(),
|
|
2546
|
+
locationId: e.string().optional(),
|
|
2547
|
+
sort: He.optional(),
|
|
2548
|
+
limit: e.coerce.number().int().positive().optional(),
|
|
2549
|
+
skip: e.coerce.number().int().min(0).optional()
|
|
2550
|
+
});
|
|
2551
|
+
const N = e.object({
|
|
2552
|
+
name: e.string(),
|
|
2553
|
+
pictureUrl: e.string()
|
|
2554
|
+
}), ze = N.extend({
|
|
2555
|
+
isAnonymous: e.boolean().optional()
|
|
2556
|
+
}), Ce = N.extend({
|
|
2557
|
+
id: e.string().optional()
|
|
2558
|
+
}), s = e.object({
|
|
2559
|
+
_id: a,
|
|
2560
|
+
comment: e.string(),
|
|
2561
|
+
createTime: e.coerce.date(),
|
|
2562
|
+
businessId: a
|
|
2563
|
+
}), Te = s.extend({
|
|
2564
|
+
source: e.literal("google"),
|
|
2565
|
+
reviewer: ze.optional(),
|
|
2566
|
+
reply: c.optional(),
|
|
2567
|
+
mediaItems: e.array(l),
|
|
2568
|
+
starRating: e.number(),
|
|
2569
|
+
locationName: e.string(),
|
|
2570
|
+
locationDisplayName: e.string()
|
|
2571
|
+
}), ve = s.extend({
|
|
2572
|
+
source: e.literal("facebook"),
|
|
2573
|
+
reviewer: Ce.optional(),
|
|
2574
|
+
isPositive: e.boolean().optional(),
|
|
2575
|
+
pageId: e.string(),
|
|
2576
|
+
pageName: e.string()
|
|
2577
|
+
}), Se = s.extend({
|
|
2578
|
+
source: e.literal("feedme"),
|
|
2579
|
+
reviewer: I,
|
|
2580
|
+
reply: c.optional(),
|
|
2581
|
+
starRating: e.number(),
|
|
2582
|
+
location: L.optional(),
|
|
2583
|
+
mediaItems: e.array(l)
|
|
2584
|
+
});
|
|
2585
|
+
e.discriminatedUnion("source", [
|
|
2586
|
+
Te,
|
|
2587
|
+
ve,
|
|
2588
|
+
Se
|
|
2589
|
+
]);
|
|
2590
|
+
e.object({
|
|
2591
|
+
comment: e.string(),
|
|
2592
|
+
starRating: e.number(),
|
|
2593
|
+
locationId: e.string().optional(),
|
|
2594
|
+
mediaItems: e.array(l).optional()
|
|
2595
|
+
});
|
|
2596
|
+
const g = e.object({
|
|
2597
|
+
_id: a,
|
|
2598
|
+
externalId: e.string().optional(),
|
|
2599
|
+
comment: e.string(),
|
|
2600
|
+
createTime: e.coerce.date(),
|
|
2601
|
+
businessId: a
|
|
2602
|
+
}), Ne = g.extend({
|
|
2603
|
+
source: e.literal("google"),
|
|
2604
|
+
reviewer: ye.optional(),
|
|
2605
|
+
reply: c.optional(),
|
|
2606
|
+
mediaItems: e.array(l),
|
|
2607
|
+
starRating: e.number(),
|
|
2608
|
+
locationName: e.string(),
|
|
2609
|
+
locationDisplayName: e.string()
|
|
2610
|
+
}), Ue = g.extend({
|
|
2611
|
+
source: e.literal("facebook"),
|
|
2612
|
+
reviewer: fe.optional(),
|
|
2613
|
+
isPositive: e.boolean().optional(),
|
|
2614
|
+
pageId: e.string(),
|
|
2615
|
+
pageName: e.string()
|
|
2616
|
+
}), Pe = g.extend({
|
|
2617
|
+
source: e.literal("feedme"),
|
|
2618
|
+
reviewerId: a,
|
|
2619
|
+
reviewer: e.any().optional(),
|
|
2620
|
+
reply: c.optional(),
|
|
2621
|
+
starRating: e.number(),
|
|
2622
|
+
locationId: a.optional(),
|
|
2623
|
+
location: e.any().optional(),
|
|
2624
|
+
mediaItems: e.array(l)
|
|
2625
|
+
});
|
|
2626
|
+
e.discriminatedUnion("source", [
|
|
2627
|
+
Ne,
|
|
2628
|
+
Ue,
|
|
2629
|
+
Pe
|
|
2630
|
+
]).describe(i.describe(be));
|
|
2631
|
+
export {
|
|
2632
|
+
M as F,
|
|
2633
|
+
Re as T,
|
|
2634
|
+
ce as a,
|
|
2635
|
+
C as b,
|
|
2636
|
+
m as c,
|
|
2637
|
+
D as d,
|
|
2638
|
+
w as e
|
|
2639
|
+
};
|