-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathconfig.full.yml
334 lines (334 loc) · 21.6 KB
/
config.full.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
app:
port: 8080
# Secret used to sign the client-side session cookie (with which the session of the user is identified). Generate
# a secure string of reasonable length. E.g. a 32 character, random string including numbers and uppercase and lowercase chars.
# You may want to use a random string generator in the internet or your local computer to generate that string.
sessionSecret:
# Configuration for the session store. The default values should generally be good enough.
sessionStore:
# The filename where the session database should be saved to. The only included session store is sqlite3 (which eases
# the setup) and saves the data in a database file. Multiple app instances are still able to read and write from the
# store.
filename: ./db/sessions.sqlite
# Defines if the app should compress responses itself. This option should generally be enabled, unless you plan to serve
# traffic to the app using a reverse proxy which is doing the compression on-the-fly.
compressResponse: true
# Optional customisation of the website
community:
# The title will be shown in the top navigation bar as well as in the title of the page (visible in the tab or window name)
title: our community
# An optional logo, which is used as an icon in the top navigation bar. Place the file into the /src/assets/custom folder
# and simply name the file here (without the path). Alternatively, you can use an absolute URL when you host your logo somewhere
# else (like https://example.com/assets/logo.png)
logo:
# The discord invite link of your community. Will be listed in the footer and might be helpful in case the donator as an
# issue they want to discuss with you.
discord:
# donationTarget:
# discordChannelId:
# monthly:
# googleAnalytics:
# trackingId:
# privacyPolicy:
# partials:
# - ./document-partials/privacy-policy/intro.txt
# - ./document-partials/privacy-policy/server-logs.txt
# - ./document-partials/privacy-policy/cookies.txt
# - ./document-partials/privacy-policy/paypal.txt
# - ./document-partials/privacy-policy/cftools.txt
# - ./document-partials/privacy-policy/personal-data.txt
orders:
# Donators can redeem an order again after some time, mostly as a use case to resolve errors or when a redeem was marked
# as successful but because of an error of the perk, that it did not work as expected.
# Some perk providers have a (strict) rate limit, which users could abuse when they can redeem at any time, as many times as
# they want.
# With this setting, you can configure how long a cooldown after a redeem of an order should be enforced.
# When a donator redeems, they cannot redeem again as long as this cooldown did not pass. The cooldown is measured in
# hours and need to be a positive, absolute number greater than 0.
redeemCooldownHours: 1
discord:
# The OAuth credentials of the application (https://discord.com/developers/applications) used to sign users in. You
# find these values in the app settings in the section 'OAuth2' -> 'Client information'
# The value needs to be a string (wrapped in ').
clientId:
clientSecret:
# The absolute redirect URL of your website. Should be the public facing URL of your website ending on /auth/discord/callback
redirectUrl: '/auth/discord/callback'
# Optional settings for Discord bot actions. Configuring this section is needed when you want to offer Discord related
# perks to your donators.
bot:
# The token of the discord app to use to manage your discord related perks in your discord server. It may or may not
# be the same discord bot you use for your users to login to this website. The discord bot needs to have a bot user
# in your discord server. In order to provide the bot user the necessary permissions, make sure to at least select the
# following permissions when inviting the bot into your server:
# - Manage Roles
# After you invited the bot, make sure it holds at least one role, which is ranked higher then the highest role of
# the possible donators of that tool. If you fail to do that, your users will not get the discord perks you offer.
#
# The bot user will also use privileged gateway intents, which need to be allowed in the developer portal for that specific
# bot user. For that, go to your app in the Discord Developer portal -> Bot -> Privileged Gateway Intents. Activate at least the
# "Server Members Intent". The bot uses this intent in order to track manual roles assignment and removal of roles which
# would otherwise be managed by this tool.
# You may want to look into https://github.com/FlorianSW/cftools-server-donation/issues/2 to get more information about
# how and why this tool uses this intent.
token:
# The ID of the Discord server (Guild) your perks should be applied to. You can retrieve this ID with the following steps:
# - Open your discord and click on the little cog item next to your user in the bottom left
# - Go to the App Settings -> Advanced section
# - Enable the developer mode
# - Go back to the main Discord view (with all your servers)
# - Right-click on the server you want to have managed by this website
# - Click 'Copy ID' (should be the last option)
# The ID is now in your clipboard, simply paste it here and wrap it with ''.
# The value needs to be a string (wrapped in ').
guildId:
# Uncomment this option if you want to configure the interval in which the tool checks if given discord roles should be removed.
# The time is in milliseconds. Whenever the interval is reached, the tool will evaluate all temporarily given discord roles
# to your donators to remove the ones which are now expired. Given they are expired, they will be removed from the donator.
# You should not need to configure this interval and should avoid changing this configuration if not definitely needed.
# Changing this property may decrease the overall performance of the application.
# When this option is disabled (a comment), the default value (1 hours) is used.
# expireRolesEvery: 60000
# Optional notifications from the website to your discord. During the process of donating, the tool emits events for
# specific actions and errors, which you can opt in to get a notification into a discord channel using a webhook. The
# webhook DOES NOT necessarily need to be in the same discord server your other discord settings relate to (e.g. the
# bot.guildId). You can even create multiple notification rules to, e.g., route one type to another channel as another
# type (or split errors from successful donations to add an alert rule for one channel).
# Make sure that you properly protect the channel you send notifications to. Nearly every message type contains
# information that are not supposed to be seen by the public (e.g. the transaction ID of a specific donation, the
# identifiers of the donator like the Steam ID and discord username).
notifications:
# he webhook URL to send notifications to (see https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks
# for how to setup a webhook)
- webhookUrl:
# A list of types to send notifications for. This list shows all currently available types.
types:
# Send when the payment was successfully processed by PayPal (the transaction is completed), but before the donator
# redeemed their perks.
- DONATED
# Send whenever a donator redeems perks of a package after the donation. This event may occur more often then
# the number of donations the donator made.
- SUCCESSFUL_REDEEM
# Send whenever a perk of a package could not be redeemed (the error message will contain more information on
# what happened)
- REDEEM_ERROR
commands:
# The /donate slash command is an alternative way for users to start a donation process from your discord server.
donate:
# The guild ID where the slash command should be installed to. The bot.token user requires the permission to manage application
# commands in this guild in order to install the slash command and react on interactions of users with it.
guildId: '837085224197423185'
# If you want to stop using the slash command, set this option to true. The tool will, on the next restart, remove
# the app command from your discord. If you just remove the whole configuration block, users will still be able
# to see and use the slash command in your discord (given they have appropriate permission to do so), however the
# donation tool will not respond to any interaction anymore.
disabled: false
# Map discord roles a user (who logs in) might have, to roles the donation tool has. You can have a 1-n mapping, meaning
# one donation tool role can be mapped to multiple discord roles.
roleMapping:
# The auditor role allows users, who have this role, to see the /statistics endpoint in the donation tool. This page
# shows all your donations from one month, be careful to whom you give this role to.
auditor:
# These IDs are role IDs from your discord.
- '864472446031101971'
- '864472446031101972'
steam:
# The absolute redirect URL of your website. Should be the public facing URL of your website ending on /auth/steam/callback
redirectUrl: '/auth/steam/callback'
# The base URL of your website, including protocol and port. If your Redirect URL looks like 'https://example.com/auth/steam/callback'
# then your realm should look like 'http://example.com'
realm: http://localhost:8080
# Your steam api key from https://steamcommunity.com/dev/apikey
apiKey: 'SOME_API_KEY'
# (Conditional) Configure when you want to accept payments with paypal.com.
paypal:
# The environment of PayPal which match to the credentials you configure in the next settings. If you use sandbox
# credentials, use 'sandbox', if you use live credentials, use 'production'.
# Allowed values: sandbox, production
environment: sandbox
# The access credentials of your PayPal application to process payments. You can either use the sandbox credentials
# to test the application. In order to process real funds, you need to have a paypal business account and use
# credentials of a live app.
# You can create these in the PayPal developer portal: https://developer.paypal.com/developer/applications/
clientId:
clientSecret:
# If you want to manage the webhook necessary for Subscriptions to work on your own, set this to true. This is only
# recommended for users who know what they are doing. Otherwise, keep this value to false or omit it completely.
manageWebhook: false
# (Conditional) Configure when you want to accept payments with stripe.com.
# When using stripe.com, you need to setup an account and set an account name.
stripe:
# The secret key of your stripe.com account (Developers -> API Keys -> Secret Key).
secretKey: sk_...
# If you want to manage the webhook necessary for Subscriptions to work on your own, set this to true. This is only
# recommended for users who know what they are doing. Otherwise, keep this value to false or omit it completely.
# If you disable this, subscriptions with stripe cannot work, as there is no way to supply the necessary secret for it.
manageWebhook: false
cftools:
# Credentials of a CFTools application from https://developer.cftools.cloud/applications
# Make sure you have granted this app permission to all servers listed in the perks section (cftools.serverApiId) in
# order to allow the website to manage the priority queue entries.
applicationId:
secret:
# The nitrado config is only needed for DayZ Console server priority queue management.
nitrado:
token: ...
# Uncomment this option if you want to configure the interval in which the tool checks if given priority queue entries should be removed.
# The time is in milliseconds. Whenever the interval is reached, the tool will evaluate all temporarily given priority queue slots
# to your donators to remove the ones which are now expired. Given they are expired, they will be removed from the donator.
# You should not need to configure this interval and should avoid changing this configuration if not definitely needed.
# Changing this property may decrease the overall performance of the application.
# When this option is disabled (a comment), the default value (1 hours) is used.
# expireRolesEvery: 60000
# Configuration for servers that support the lb_ag_pg perk. This is an object where the key is a server ID (which can be used
# in the lb_ag_pg perk) and information about that server. That configuration is:
# * apiUrl: the URL which the donation tool uses to reach the API (see the repository above), e.g. http://111.222.111.222:8080
# * apiKey: the auto-generated API key from the tool (see the config.json of the tool linked above for more info)
# * serverName: an individual (freetext) name of the server the tag will be added for (e.g. "My fancy server")
lb_ag_pg:
serverOne:
apiUrl: http://111.222.111.222:8080
apiKey: abc123...
serverName: My fancy Server
serverTwo:
apiUrl: http://111.222.111.222:8081
apiKey: abc123...
serverName: My other Server
# A mapping between serverApiId and a human readable server name. This information is used on the overview page where
# a potential donator sees the servers they have priority queue already. I suggest to use a name your donators will
# easily recognize.
serverNames:
aServerApiId: some name
# An optional array of strings with the names of package categories. Package categories will be used to group similar packages
# together. They will be shown in sections with this string as the title. The order of the names here will be the order
# of the sections on the start page.
# packageCategories:
# - PC
# - Console
# Packages are the available prices and benefits a donator gets when donating that amount. Each package has the following information
# - name: A human readable name, which is displayed in the perk selection screen as well as on the PayPal receipt (choose
# a name which is not too long, but still descriptive); do not put the price in it
# - description: A freetext, optional description which you can use to give more information about this perk to your donators.
# This field can be omitted when it is not used.
# - id: A unique id over the lifetime of the website. It needs to be unique even _after_ you want to remove the perk.
# Do not re-use an ID from a previous perk. The easiest thing would be to simply count up by one. Needs to be a number
# and will also be available in your PayPal dashboard in the 'custom' reference.
# - image: An optional image name, which needs to be relative to the src/assets/custom/ directory. Put the image there and
# then name it here.
# - category: An optional name of a category this package belongs to. If you omit this, the package will be shown in the
# default category without a name. Same will happen if the category you set here is not contained in the packageCategories
# list (exact match, case-sensitive).
# - price: The price of the perk, as an object of currency and amount. The currency needs to be a supported string from
# PayPal (see https://developer.paypal.com/docs/reports/reference/paypal-supported-currencies/). The amount is a
# string (make sure to quote the value) with a number with two decimals. Optionally, you can specify the type of the price.
# It can be either FIXED or VARIABLE, while FIXED is the default value if omitted.
# - disabled: An optional boolean flag to disable a package from being available to be donated for. You can usually omit this
# field, and the packages will be available to donators to donate for. Set this to `true` when you do not want to offer this
# package for new donations anymore. Disabling, instead of removing, the package ensures that functionality that relies on the
# package information is still available, even given no new donations are possible.
# - perks: Zero, one or more perks; each perk describes a specific benefit a donator earns. A perk consists of the
# following mandatory configuration:
# * type: The type of the perk. The only currently supported value is PRIORITY_QUEUE. The value is currently unused.
# Each perk may have additional configuration, see the below list of available perks for more details.
#
# You should have at least one perk available, and as many as you want to have.
#
# Available perks:
#
# - PRIORITY_QUEUE
# This perk provides a specific amount of days of priority queue for one server, which needs to be registered in CFTools
# Cloud. It requires the following configuration:
# * amountInDays: The amount of priority queue days the donator should get.
# * permanent: Boolean field, should be set to true when the donator should get a permanent priority queue slot. Should not
# be set together with amountInDays.
# * cftools: The cftools serverApiId (in the object with the key serverApiId) of the server the donator will get the perk
# for. Is the Server ID of the server in the CFTools Dashboard (Manage -> Settings -> API Key section). Do not use the API
# key as the ID, it will throw an error that it is unknown.
#
# - WHITELIST
# This perk whitelists the donator on the specific CFTools Cloud server for the specified days (or permanently).
# It required the following configuration:
# * amountInDays: The amount of the whitelisting in days the donator should get.
# * permanent: Boolean field, should be set to true when the donator should get permanently whitelisted. Should not
# be set together with amountInDays.
# * cftools: The cftools serverApiId (in the object with the key serverApiId) of the server the donator will get the perk
# for. Is the Server ID of the server in the CFTools Dashboard (Manage -> Settings -> API Key section). Do not use the API
# key as the ID, it will throw an error that it is unknown.
#
# - DISCORD_ROLE
# A perk which will grant the donator one or more specific roles in your discord server (see the discord.bot settings for
# detailed information on how to setup and configure your discord bot correctly). This perk requires the following
# configuration:
# * roles: An array of discord role IDs (NOT names) to assign when the donation succeeded. You can retrieve the role IDs
# the same way as you did with the guild ID, just right click on the role you want to assign to a donator to copy the ID
# from the context menu.
# * amountInDays: The amount of days the donator should have the discord roles.
#
# - FREETEXT_ONLY
# A perk that is not managed by this application. This website is basically not provisioning anything for the donator
# when the donation is done. This perk is mainly meant to mention perks the donator earns, which will be handled/granted
# in another way then with this website. There's only one configuration option, which is the text that will be shown to
# the donator:
# * text: The text to show to the donator. There's no strict length limitation, however, for the sake of simplicity and
# ease of use, you should try to keep it short (other than this documentation ;)).
#
# - LB_AG_PG
# A perk that aims to provision the donator's steam UID into the configured Advanced Groups prefix group (a DayZ mod from LBmaster)
# to show an in-game tag (e.g. VIP).
# This perk only works together with the https://github.com/FlorianSW/lbmaster-advanced-groups-api You need to setup this API
# first, before you can use this perk.
# The following configuration is offered by this perk:
# * prefixGroup: an object of:
# * name: the name of the prefix group (also a freetext field); does not need to match the one in your Advanced Groups config
# * index: the index of the prefix group (needs to match the group within your Advanced Groups config, starting at 0)
# * servers: an array of server IDs. Each ID listed in this list needs to be configured in the lb_ag_pg config. The ID is the key of
# object in this configuration.
# - NITRADO_PRIORITY_QUEUE
# A perk that provides priority queue using the nitrado Setting `priority`, which is usually used for DayZ Console servers (XBox, PSN).
# When you configure this perk, you _need_ to provide for which kind the priority queue will be used (XBox or PSN), as the tool will
# automatically ensure that the donator, before being able to donate for a package with this perk, has the appropriate account linked
# to their discord. This helps to prevent that people donate for perks they can then not use afterward.
# The following configuration is offered by this perk:
# * amountInDays: The amount of priority queue days the donator should get.
# * nitrado: an object of:
# * serverId: The server ID of the server you want to manage (this ID can be taken from the URL bar in the webconsole of nitrado)
# It's an integer, which needs to be a string here, so wrap it in '' (e.g. '123456')
# * kind: For which console the server is used. Can be either 'xbox' or 'playstation'. Defaults to 'playstation'.
packages:
- name: Allpass
id: 1
price:
currency: USD
amount: '1.00'
perks:
- type: PRIORITY_QUEUE
amountInDays: 30
cftools:
serverApiId:
- type: DISCORD_ROLE
roles:
# These values need to be strings (wrapped in ').
# Donator
- '0000000000000'
# DayZ
- '1111111111111'
- type: FREETEXT_ONLY
text: Some text to show to the donator
- type: LB_AG_PG
prefixGroup:
name: VIP
index: 0
servers:
- serverOne
- serverTwo
- name: Fastpass
id: 2
price:
type: VARIABLE
currency: USD
amount: '1.00'
perks:
- type: PRIORITY_QUEUE
amountInDays: 30
cftools:
serverApiId: