-
Notifications
You must be signed in to change notification settings - Fork 6
/
settings.json
725 lines (724 loc) · 31.3 KB
/
settings.json
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
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
// STRAUTOMATOR CORE SETTINGS
// Here are most of the Strautomator settings, and these should be considered
// production ready (not including secrets and credentials).
{
"ai": {
// Cache generated AI content for 1 minute.
"cacheDuration": 60,
// List of humours (adjectives) to be used on the AI generated content.
"humours": ["absurd", "ancient", "boring", "clever", "comical", "dry", "exquisite", "funny", "goofy", "hilarious", "ironic", "playful", "sarcastic", "satirical", "sexy", "silly", "technical", "wicked", "witty"],
// Max tokens per generation.
"maxTokens": {
"name": 50,
"description": 220,
"insights": 7000,
// If max tokens were not enough, try again with a 20% higher limit.
"multiplier": 1.2
},
"insights": {
// Exported CSV datasets should have activities for the past 3 years.
"datasetWeeks": 156,
// For the AI insights, consider activities from the past 4 weeks.
"recentWeeks": 4
}
},
"app": {
// Application title.
"title": "Strautomator",
// The server will look for the files strautomator.cert and strautomator.key on the
// app root to start a HTTPS server on port 8443. If these files are not there,
// the server will listen on HTTP port 8080 instead.
"port": null,
// You can set the app URL on your settings.secret.json file or
// via the $SMU_app_url environment variable.
"url": "https://strautomator.com/",
// Listen to all incoming connections by default.
"ip": "0.0.0.0",
// Hashtag used on social media.
"hashtag": "#strautomator.com",
// Express trust proxy settings.
"trustProxy": 2,
// URL redirections.
"redirects": [
{
"from": "/calendar/upcoming",
"to": "/map"
}
]
},
"api": {
// API is rate limited to 900 requests per minute per instance by default. If you wish to disable
// rate limiting altogether, set "rateLimit" to false.
"rateLimit": {
"statusCode": 429,
"max": 900,
"windowMs": 60000,
"standardHeaders": true,
"legacyHeaders": false,
"message": "Too many request, please try again later"
},
// Only accept connections coming via Cloudflare by default.
"requireCloudflare": true
},
"affiliates": {
"baseUrl": "https://links.devv.com/"
},
"announcements": {
// Active announcements should be cached for up to 30 minutes.
"cacheDuration": 1800
},
// Anthropic API options.
"anthropic": {
"api": {
"version": "2023-06-01",
"baseUrl": "https://api.anthropic.com/v1/",
// Maximum concurrent requests per instance.
"maxConcurrent": 2,
// Maximum requests per minute per instance.
"maxPerMinute": 40
}
},
"axios": {
// User agent used to emulate a browser.
"uaBrowser": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36",
// Start throttling requests if we reach over 90% of the extracted quota. Value in percent (0 to 100).
"backoffThreshold": 90,
// Back-off base delay when we're about to hit API rate limits.
// Value set in milliseconds, will increase as we get closer to the limits.
"backoffInterval": 500,
// Retry axios requests after 1.1 seconds. Value set in milliseconds.
"retryInterval": 1100,
// Default timeout of 2.5 minutes for axios requests. Value set in milliseconds.
"timeout": 150000
},
"calendar": {
// Default activity fields to be added to event details, based on the activity type.
// Each item is a line, and multiple fields can be added to same line separated by comma.
"activityFields": {
"default": ["distance,elevationGain", "speedAvg,paceAvg", "calories", "hrAvg,hrMax,wattsAvg", "totalTime", "description"],
"ride": ["distance,elevationGain", "speedAvg", "calories", "hrAvg,hrMax,wattsAvg,wattsMax", "totalTime,movingTime", "description"],
"run": ["distance,elevationGain", "paceAvg,speedAvg", "calories", "hrAvg,hrMax,wattsAvg", "totalTime,movingTime", "description"],
"swim": ["distance", "speedAvg", "calories", "hrAvg,hrMax,wattsAvg", "totalTime", "description"],
"workout": ["calories", "hrAvg,hrMax,wattsAvg", "totalTime", "description"]
},
// Speed up first calendar generation by shortening the date ranges and
// limiting the number of events added to 50. Set to null or false to disable.
"partialFirstBuild": 50,
// Calendar base name.
"name": "Strava",
// Default template for the event summary.
"eventSummary": "${name} ${icon}",
// Default event duration in minutes (ie. for past club events).
"eventDurationMinutes": 15,
// A calendar will be deleted if no client requests it after 4 days.
"maxCacheDuration": 345600,
// Calendar events will cached if they're older than 30 days, by default.
"minAgeForCachingDays": 30
},
"cookie": {
"sessionName": "strautsession",
// This secret should be updated via the settings.secret.json file or
// via the $SMU_cookie_secret environment variable.
"secret": "Strautocookie-Super-Secret"
},
"database": {
// If you're hosting multiple sites or services within the same Google Project,
// you might add a default suffix to Firestore collection names.
"collectionSuffix": "",
// Cache duration to keep database documents in memory for different colletions. Value set in seconds.
"cacheDuration": null,
// Encryption options.
"crypto": {
"algorithm": "aes-256-cbc",
// List of property names that should be saved in encrypted format.
"fields": ["accessToken", "previousAccessToken", "refreshToken", "urlToken", "password", "cryptoKey"],
// Encryption key and IV must be set on the settings.secret.json file, or via the
// $SMU_database_crypto_key and $SMU_database_crypto_iv environment variables.
"key": null,
"iv": null
},
// Ignore undefined properties?
"ignoreUndefinedProperties": true,
// Disable writing to the database? Useful while troubleshooting data from production.
"writeDisabled": false
},
"faq": {
// Download questions from the database four times a day by default. Value set in milliseconds.
"refreshSeconds": 21600
},
"functions": {
// Scheduled functions default batch size.
"batchSize": 8
},
"garmin": {
"api": {
"baseUrl": "https://apis.garmin.com/",
"authUrl": "https://connectapi.garmin.com/oauth-service/oauth/",
"loginUrl": "https://connect.garmin.com/oauthConfirm",
// Maximum concurrent requests per instance.
"maxConcurrent": 4,
// Maximum requests per minute per instance.
"maxPerMinute": 120,
// Token to be appended to the URL of Garmin webhooks, for
// extra security. Can only include alphanumeric characters.
// This MUST be set on the settings.secret.json file or via
// via the SMU_garmin_api_urlToken environment variable.
"urlToken": null
},
// Cache profiles and Garmin data for up to 2 minutes. Value set in seconds.
"cacheDuration": 120,
// Garmin data will be stored in the database for up to 10 days.
"maxCacheDuration": 864000
},
"gcp": {
// The project ID on Google Cloud must be set on the settings.secret.json file
// or via the SMU_gcp_projectId environment variable.
"projectId": null,
// Default GCP location when creating resources on-the-fly.
"location": "europe-west4",
// If you wish the app to download settings from Google Cloud Storage on startup, please
// specify the bucket name and filename below on your secret settings or via the
// SMU_gcp_downloadSettings_bucket and SMU_gcp_downloadSettings_filename environment
// variables. It's HIGHLY recommended to have the settings files encrypted there.
"downloadSettings": {
"bucket": null,
"target": "/tmp/",
"filename": "settings.secret.json"
}
},
"gdpr": {
// Users can request an archive download once every 10 days.
"requestDays": 10
},
"gearwear": {
// By default, when update distance for gear components, get activities that happened
// 2 days ago (so users will have some time to set the correct activity gear).
"delayDays": 2,
// Wait at least 10 days before sending another GearWear reminder.
"reminderDays": 10,
// Remind user if tracking was not reset and current usage has passed 15% of the target alert value.
"reminderThreshold": 1.15
},
"gemini": {
"api": {
// Maximum concurrent requests per instance.
"maxConcurrent": 2,
// Maximum requests per minute per instance.
"maxPerMinute": 40
}
},
"github": {
"api": {
"baseUrl": "https://api.github.com/",
"repo": "strautomator/web",
"coreRepo": "strautomator/core",
"username": "igoramadas"
}
},
"komoot": {
"api": {
// Base Komoot API URL.
"baseUrl": "https://api.komoot.de/v007/"
},
// Base Komoot HTML / end user URL.
"baseUrl": "https://www.komoot.com/",
// Route details are cached normally for around 12 hours. Value set in seconds.
"cacheDuration": 43200,
// Route details are cached in the database for up to 4 days. Value set in seconds.
"maxCacheDuration": 345600
},
"locationiq": {
"baseUrl": "https://eu1.locationiq.com/v1/",
// The token must be set via secret settings or via the SMU_locationiq_token environment variable.
"token": null,
// Maximum concurrent requests and requests per minute, per instance.
"maxConcurrent": 1,
"maxPerMinute": 100,
"minTime": 500
},
"mailer": {
// Default contact email.
"contact": "info@strautomator.com",
// The default "from" on sent emails should be set on settings.secret.json file
// or via the SMU_mailer_from environment variable.
"from": "noreply@strautomator.com",
// Optional BCC address to be added to all sent emails.
"bcc": null,
// Default SMTP settings are valid for Amazon SES. You can overwrite these on
// on your secret settings or via environment variables.
"smtp": {
"secure": true,
"host": "email-smtp.us-east-1.amazonaws.com",
"port": 465,
"auth": {
// User and password must be set via the settings.secret.json file
// or using environment variables.
"user": null,
"pass": null
}
},
// An extra SMTP server might be configured as a fallback. Use the same
// property names defined on the "smtp" above. The fallback will only
// be enabled if you have defined a user and password.
"smtpFallback": {
"secure": true,
"host": "in-v3.mailjet.com",
"port": 465,
"auth": {
"user": null,
"pass": null
}
}
},
"maps": {
// Geocoded results are cached down to a precision of around 1km (2 decimal digits).
"cachePrecision": 2,
// Cache geolocation results in memory for up to 12 hours. Value set in seconds.
"cacheDuration": 43200,
// Geolocation will be cached on the database for up to 10 days. Value set in seconds.
"maxCacheDuration": 864000,
// Circle color, will also be used as a fill color with half opacity.
"circleColor": "0x0066CC",
// Default marker style and color.
"defaultStyle": "color:red",
// Default map size in pixels.
"defaultSize": 380,
// Default zoom level 10 (far) to 19 (closer).
"defaultZoom": 16,
// The Google Maps API key must be set on settings.secret.json file or
// via the SMU_maps_api_key environment variable.
"api": {
"key": null,
// Static maps base URL.
"baseStaticUrl": "https://maps.googleapis.com/maps/api/staticmap?"
}
},
// musixmatch integration. The API key must be set via secret settings or
// via the SMU_musixmatch_api_key environment variable.
"musixmatch": {
"api": {
"baseUrl": "https://api.musixmatch.com/ws/1.1/"
},
// Track lyrics are cached in memory for up to 1 minute. Value set in seconds.
"cacheDuration": 60,
// Track lyrics cached for up to 30 days in the database. Value set in seconds.
"maxCacheDuration": 2592000
},
"notifications": {
// Cache notification results for up to 4 seconds.
"cacheDuration": 4,
// Messages will auto expire after 6 months.
"defaultExpireDays": 180,
// Send notifications via email if unread notifications hits a certain count.
"emailReminderCount": 10,
// Delete read messages after 90 days.
"readDeleteAfterDays": 90
},
"oauth": {
// Auth failure date is reset after 14 days by default.
"reauthResetDays": 14,
// Alert users after 3 token failures.
"tokenFailuresAlert": 3,
// Suspend further API requests if user reaches 10 failures on that specific API.
"tokenFailuresDisable": 10,
// Token exchange requests times out in 6 seconds. This applies to all
// OAuth2 modules (Strava, PayPal, etc).
"tokenTimeout": 6000
},
"openai": {
"api": {
"baseUrl": "https://api.openai.com/v1/",
// Custom assistant ID.
"assistantId": "asst_yBraLh0JhbxWiTXudiSRFjNJ",
// Maximum concurrent requests per instance.
"maxConcurrent": 2,
// Maximum requests per minute per instance.
"maxPerMinute": 120
}
},
"paddle": {
"api": {
"environment": "production",
// Default page size is the max of 200.
"pageSize": 200,
// The API key and client token must be set on the settings.secret.json file,
// or via the SMU_paddle_api_key and SMU_paddle_api_clientToken env variables.
"key": null,
"clientToken": null
},
// The price and webhook IDs must be taken from Paddle and set on the settings.secret.json file,
// or via the SMU_paddle_priceId and SMU_paddle_webhookId env variables.
"priceId": null,
"webhookId": null,
// If you wish to accept Paddle webhook events from any IP, set the ips to null.
"ips": ["34.232.58.13", "34.195.105.136", "34.237.3.244", "35.155.119.135", "52.11.166.252", "34.212.5.7"]
},
"paypal": {
"api": {
"mode": "live",
"baseUrl": "https://api.paypal.com/",
"mBaseUrl": "https://api-m.paypal.com/",
// Token to be appended to the URL of PayPal webhooks, for
// extra security. Can only include alphanumeric characters.
// This MUST be set on the settings.secret.json file or via
// via the SMU_paypal_api_urlToken environment variable.
"urlToken": null,
// The PayPal API client ID and secret must be set on the settings.secret.json file,
// or via the SMU_paypal_api_clientId and SMU_paypal_api_clientSecret env variables.
// Please note that on development it will default the sandbox environment.
"clientId": null,
"clientSecret": null,
// List of webhook event types that Strautomator should listen to. The payment events
// are specially important to automatically manage PRO accounts.
"webhookEvents": [
"PAYMENT.SALE.COMPLETED",
"PAYMENT.SALE.DENIED",
"PAYMENT.SALE.PENDING",
"PAYMENT.SALE.REFUNDED",
"PAYMENT.SALE.REVERSED",
"BILLING.SUBSCRIPTION.CREATED",
"BILLING.SUBSCRIPTION.ACTIVATED",
"BILLING.SUBSCRIPTION.UPDATED",
"BILLING.SUBSCRIPTION.EXPIRED",
"BILLING.SUBSCRIPTION.CANCELLED",
"BILLING.SUBSCRIPTION.SUSPENDED",
"BILLING.SUBSCRIPTION.PAYMENT.FAILED"
]
},
"billingPlan": {
// Accept payments in USD, EUR and GBP.
"currency": ["CHF", "EUR", "USD", "GBP"],
// Names and descriptions used on PayPal billing plans.
"name": "Strautomator Pro subscription",
"productName": "Strautomator Pro account",
"description": "Subscription to get a PRO account on Strautomator.",
// Subscription agreements are set to start 5 minutes after they are approved.
"startMinutes": 5
}
},
"plans": {
"free": {
"apiConcurrency": 4,
// Free accounts are limited to 3 recipes and 2 gearwear configuration.
"maxRecipes": 3,
"maxGearWear": 2,
"maxClubs": 5,
// Free accounts can trigger batch automations for activities up to 30 days old.
"batchDays": 30,
// Free accounts limited to 6 months in the past and up to 5 days in the future.
"pastCalendarDays": 180,
"futureCalendarDays": 5,
// Free calendars are cached for around 12 hours.
"calendarCacheDuration": 43200,
// Links on 1 out of 5 processed activities on free accounts by default.
"linksOn": 5,
// Track personal records for which sports?
"recordSports": ["Ride", "VirtualRide", "Run", "VirtualRun"],
// Use AI and weather parameters on 33% of "AI generate" recipe actions.
"generatedNames": {
"ai": 33,
"weather": 33
},
"generatedImages": {
"perWeek": 1
}
},
"pro": {
"apiConcurrency": 6,
// PRO accounts are limited to 999 (virtually unlimited) recipes and gearwear configs.
"maxRecipes": 999,
"maxGearWear": 999,
"maxClubs": 999,
// PRO accounts can trigger batch automations for activities up to 5 years old.
"batchDays": 1825,
// PRO accounts limited to 10 years in the past and up to 1 year in the future.
"pastCalendarDays": 3650,
"futureCalendarDays": 365,
// PRO calendars are cached for around 3 hours.
"calendarCacheDuration": 10800,
// No links on PRO accounts processed activities.
"linksOn": 0,
// Allow personal records for all sports.
"recordSports": true,
// Use AI and weather parameters on around 99% of "AI generate" recipe actions.
"generatedNames": {
"ai": 99,
"weather": 99
},
"generatedImages": {
"perWeek": 5
}
}
},
"recipes": {
// Linkback text (will have the app title appended to it).
"linkTexts": {
"default": "Automated with",
"aiContent": "Powered by",
"aiInsights": "AI insights by"
},
// How many times a recipe can fail before getting disabled automatically.
"maxFailures": 10,
// Max number of activity IDs kept on the recipe stats.
"maxActivityIds": 500,
// Max length for specific properties.
"maxLength": {
"title": 40,
"conditionValue": 800,
"actionValue": 1000
},
// Webhook timeout is set to 3 seconds by default. Value in milliseconds.
"webhook": {
"timeout": 3000
}
},
// Navigation routes options (GPS routing, not URLs).
"routes": {
// Total estimated route will add 40min (in seconds) for every few hours of riding or running,
// depending on the user's fitness level.
"breakTime": 2400,
// A maximum of 15 routes can be zipped for downloading.
"zipLimit": 15
},
// Spotify integration. The "clientId" and "clientSecret" must be set via secret settings
// or via the SMU_spotify_api_clientId and SMU_spotify_api_clientSecret environment variables.
"spotify": {
"api": {
"baseUrl": "https://api.spotify.com/v1/",
"authUrl": "https://accounts.spotify.com/authorize",
"tokenUrl": "https://accounts.spotify.com/api/token",
"scopes": "user-read-email,user-read-recently-played"
},
// Cache profiles and recently played tracks for up to 1 minute. Value set in seconds.
"cacheDuration": 60,
// Include tracks that started / ended within a minute of the activity date.
"dateBufferSeconds": 60,
// Maximum number of tracks returned.
"trackLimit": 50
},
// Cloud Storage buckets, with optional TTLs (in days). If you wish to specify the bucket location,
// please add a "location" parameter. Otherwise the default will be taken from "gcp.location".
"storage": {
"buckets": {
"ai": {"name": "strautomator-ai", "ttlDays": 90},
"calendar": {"name": "bucket-calendar.strautomator.com", "ttlDays": 7},
"gdpr": {"name": "bucket-gdpr.strautomator.com", "ttlDays": 2}
},
// Storage buckets are configured as CNAME in production.
"cname": true
},
"strava": {
// API endpoints and credentials from Strava. The "clientId" and "clientSecret" must be set via secret
// settings or via the SMU_strava_api_clientId and SMU_strava_api_clientSecret environment variables.
"api": {
"baseUrl": "https://www.strava.com/api/v3/",
"authUrl": "https://www.strava.com/oauth/authorize",
"deauthUrl": "https://www.strava.com/oauth/deauthorize",
"tokenUrl": "https://www.strava.com/oauth/token",
"scopes": "read,profile:read_all,profile:write,activity:read_all,activity:write",
// Maximum concurrent requests per instance.
"maxConcurrent": 8,
// Maximum requests per minute per instance.
"maxPerMinute": 400,
// Default page size is the max of 200.
"pageSize": 200,
// Token to be appended to the URL of Strava webhooks, for
// extra security. Can only include alphanumeric characters.
// This MUST be set on the settings.secret.json file or via
// via the SMU_strava_api_urlToken environment variable.
"urlToken": null,
// Default verification token to be sent by Strava on subcriptions, MUST be set
// via secret settings or the SMU_strava_api_verifyToken environment variable.
"verifyToken": null,
// Strava will be considered as having an incident going on if more than 20
// timeouts have happened in less than 10 minutes.
"timeoutThresholds": {
"count": 20,
"seconds": 600
}
},
// Some Strava resources might be cached. Duration in seconds.
"cacheDuration": {
"activities-streams": 1209600,
"athletes-stats": 180,
"clubs": 7200,
"clubs-group-events": 1800,
"gear": 600,
"routes": 7200,
"power-intervals": 2419200
},
// Do not process club events with more than 2 years of age (past or future).
"clubs": {
"maxAgeDays": 730
},
"ftp": {
// Estimated FTP will go down by 1% for each retroactive week of no activities.
"idleLossPerWeek": 0.01,
// User's FTP will be estimated based on activities from the last 10 weeks.
"weeks": 10,
// FTP can be updated only once every 24 hours.
"sinceLastHours": 24,
// FTP must have changed by at least 2% to be updated automatically.
"saveThreshold": 0.02
},
"fitnessLevel": {
// Fitness levels will be estimated based on activities from the last 12 weeks by default.
"weeks": 12,
// Minimum activity time (ride and run), in seconds, to consider for the fitness level estimation.
"minRunTime": 720,
"minRideTime": 1200
},
"processedActivities": {
// Activities containing this hashtag on their names will be ignored by Strautomator.
"ignoreHashtag": "#strautomator-ignore",
// Processed activity details will be deleted from the database after 2 years. Value set in days.
"maxAgeDays": 730
},
"processingQueue": {
// Default delay for queued activities is 10 minutes, value set in seconds.
"delayedSeconds": 600,
// A single batch operation per user per 24 hours.
"batchPerHours": 24,
// Default batch size when processing queued activities.
"batchSize": 60,
// How long can activities stayed queued for processing?
// By default 4 days, value set in seconds.
"maxAge": 345600,
// Retry processing queued activities up to 5 times.
"retry": 5
},
"records": {
// For "average" records, consider only the activities that have at least 20 minutes of moving time.
"minMovingTimeAvg": 1200
}
},
"users": {
// Consider users idle (for deletion) if they are suspended for longer than 6 months or
// haven't done any Strava activities for more than 2 years.
"idleDays": {
// Default value in days for data to be considered idle if not updated.
"default": 180,
// Users with no activities from Strava are considered idle after 2 years.
"noActivities": 730,
// How many days to wait before acting on pending or cancelled subscriptions.
"subscriptions": 5
}
},
// xAI API options.
"xai": {
"api": {
"baseUrl": "https://api.x.ai/v1/",
// Maximum concurrent requests per instance.
"maxConcurrent": 2,
// Maximum requests per minute per instance.
"maxPerMinute": 20
}
},
"wahoo": {
"api": {
"baseUrl": "https://api.wahooligan.com/",
"scopes": "email user_read workouts_read offline_data",
// Maximum concurrent requests per instance.
"maxConcurrent": 4,
// Maximum requests per minute per instance.
"maxPerMinute": 60,
// Token to be appended to the URL of Wahoo webhooks, for
// extra security. Can only include alphanumeric characters.
// This MUST be set on the settings.secret.json file or via
// via the SMU_wahoo_api_urlToken environment variable.
"urlToken": null
},
// Cache profiles and Wahoo data for up to 2 minutes. Value set in seconds.
"cacheDuration": 120,
// Wahoo data will be stored in the database for up to 10 days.
"maxCacheDuration": 864000
},
// Weather settings. The rate limits set here should be enough for basic usage using free accounts,
// but should be updated in production when used with a paid plan.
"weather": {
// Cache weather results for 15 minutes. Value set in seconds.
"cacheDuration": 900,
// Provider will temporarily stop requests if it fails more than 5 times in a row.
"maxRepeatedErrors": 5,
// When fetching weather, add a buffer of 30 minutes before and 60 after the target date.
"dateSubtractMinutes": 30,
"dateAddMinutes": 60,
// Add N/A if a specific weather property was not returned by the provider.
"emptyString": "N/A",
// Set the default weather providers.
"defaultProviders": {
"free": ["openmeteo", "weatherapi"],
"pro": ["openmeteo", "tomorrow"]
},
// Open-Meteo API settings.
"openmeteo": {
"baseUrl": "https://api.open-meteo.com/v1/forecast",
"aqiBaseUrl": "https://air-quality-api.open-meteo.com/v1/air-quality",
// Open-Meteo API rate limits.
"rateLimit": {
"maxConcurrent": 4,
"perHour": 1000,
"perDay": 5000
},
// The Open-Meteo API does not need a secret.
"secret": true
},
// OpenWeatherMap API settings.
"openweathermap": {
"baseUrl": "https://api.openweathermap.org/data/3.0/onecall",
"aqiBaseUrl": "https://api.openweathermap.org/data/2.5/air_pollution",
// OpenWeatherMap API rate limits.
"rateLimit": {
"maxConcurrent": 4,
"perHour": 200,
"perDay": 1000
},
// The OpenWeatherMap API secret MUST be set via secret settings or
// via the SMU_weather_openweathermap_secret environment variable.
"secret": null
},
// Tomorrow API settings.
"tomorrow": {
"baseUrl": "https://api.tomorrow.io/v4/",
// Tomorrow API rate limits.
"rateLimit": {
"maxConcurrent": 2,
"perHour": 20,
"perDay": 450
},
// The Tomorrow API secret MUST be set via secret settings or
// via the SMU_tomorrow_api_secret environment variable.
"secret": null
},
// Visual Crossing API settings.
"visualcrossing": {
"baseUrl": "https://weather.visualcrossing.com/VisualCrossingWebServices/rest/services/",
/// Visual Crossing API rate limits.
"rateLimit": {
"maxConcurrent": 1,
"perHour": 100,
"perDay": 500
},
// The Visual Crossing API secret MUST be set via secret settings or
// via the SMU_weather_visualcrossing_secret environment variable.
"secret": null
},
// WeatherAPI.com settings.
"weatherapi": {
"baseUrl": "https://api.weatherapi.com/v1/",
// WeatherAPI.com rate limits.
"rateLimit": {
"maxConcurrent": 4,
"perHour": 1000,
"perDay": 5000
},
// The WeatherAPI.com secret MUST be set via secret settings or
// via the SMU_weather_weatherapi_secret environment variable.
"secret": null
}
},
"webhooks": {
// Retry the webhooks setup every 30 seconds (if failed). Value in milliseconds.
"retryInterval": 30000
}
}