Skip to content

Commit fe10847

Browse files
authored
Merge pull request #1127 from ReuschelCGN/updates
feat: RSVP tracking via api Poracle PR#928
2 parents cc911e3 + e5858c5 commit fe10847

11 files changed

Lines changed: 60 additions & 14 deletions

File tree

packages/locales/lib/human/de.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -798,5 +798,9 @@
798798
"filters": "Filter",
799799
"active": "aktiv",
800800
"inactive": "inaktiv",
801-
"bread_time_window": "Du kannst von 6Uhr bis 21Uhr an Dyna-Kämpfen teilnehmen."
801+
"bread_time_window": "Du kannst von 6Uhr bis 21Uhr an Dyna-Kämpfen teilnehmen.",
802+
"rsvp_0": "ohne RSVP",
803+
"rsvp_1": "RSVP",
804+
"rsvp_2": "nur_RSVP",
805+
"rsvp_changes": "RSVP Änderungen"
802806
}

packages/locales/lib/human/en.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -826,6 +826,10 @@
826826
"active": "Active",
827827
"inactive": "Inactive",
828828
"bread_time_window": "You can take on Max Battles between 6AM and 9PM.",
829+
"rsvp_0": "no rsvp",
830+
"rsvp_1": "rsvp",
831+
"rsvp_2": "rsvp_only",
832+
"rsvp_changes": "RSVP changes",
829833
"expert_basic_syntax": "Basic Syntax 🔎",
830834
"expert_clause_description": "The fundamental building block of a filter is a clause. A clause consists of a prefix (what you're filtering), followed by a value or a range.",
831835
"expert_format_description": "The basic format is: [Prefix][Value] or [Prefix][MinValue]-[MaxValue]",

packages/locales/lib/human/es.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,5 +617,9 @@
617617
"hide_editor": "Ocultar Editor",
618618
"reported_error": "Este error ha sido reportado al servidor con el identificador",
619619
"dark_mode": "Modo Oscuro",
620-
"bread_time_window": "Puedes acceder a los Combates Max de 6h a 21h."
620+
"bread_time_window": "Puedes acceder a los Combates Max de 6h a 21h.",
621+
"rsvp_0": "no rsvp",
622+
"rsvp_1": "rsvp",
623+
"rsvp_2": "rsvp_only",
624+
"rsvp_changes": "RSVP cambios"
621625
}

packages/locales/lib/human/fr.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,5 +773,9 @@
773773
"weather_audio": "Son de météo",
774774
"active": "Actif",
775775
"inactive": "Inactif",
776-
"bread_time_window": "Tu peux participer à des Combats Dynamax entre 6h et 21h."
776+
"bread_time_window": "Tu peux participer à des Combats Dynamax entre 6h et 21h.",
777+
"rsvp_0": "no rsvp",
778+
"rsvp_1": "rsvp",
779+
"rsvp_2": "rsvp_only",
780+
"rsvp_changes": "RSVP changements"
777781
}

packages/locales/lib/human/nl.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,5 +469,9 @@
469469
"webhook_advanced_save_width": 2,
470470
"login_button": 5,
471471
"join_button": 5,
472-
"all": "Alle"
472+
"all": "Alle",
473+
"rsvp_0": "no rsvp",
474+
"rsvp_1": "rsvp",
475+
"rsvp_2": "rsvp_only",
476+
"rsvp_changes": "RSVP veranderingen"
473477
}

packages/locales/lib/human/pl.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,10 @@
522522
"route_type": "Typ scieżki",
523523
"routes": "Scieżki",
524524
"routes_subtitle": "Wyświetl scieżki w grze i związane z nimi informacje na mapie",
525+
"rsvp_0": "no rsvp",
526+
"rsvp_1": "rsvp",
527+
"rsvp_2": "rsvp_only",
528+
"rsvp_changes": "RSVP zmiany",
525529
"s2_cell_level": "Poziom {{level}} S2 Cell",
526530
"s2_cell_limit_0": "Próbowałeś wygenerować więcej niż 20 000 komórek ({{variable_0}})",
527531
"s2cells": "Komórki S2",

packages/types/lib/poracle.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ export interface PoracleRaid {
6666
distance: number
6767
template: string
6868
team: number
69+
rsvp_changes: number
6970
gym_id: string
7071
form: number
7172
move: number
@@ -84,6 +85,7 @@ export interface PoracleEgg {
8485
distance: number
8586
template: string
8687
team: number
88+
rsvp_changes: number
8789
gym_id: string
8890
description: string
8991
}

server/src/graphql/typeDefs/poracle.graphql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ type PoracleRaid {
6161
distance: Int
6262
template: String
6363
team: Int
64+
rsvp_changes: Int
6465
gym_id: String
6566
form: Int
6667
move: Int
@@ -80,6 +81,7 @@ type PoracleEgg {
8081
distance: Int
8182
template: String
8283
team: Int
84+
rsvp_changes: Int
8385
gym_id: String
8486
description: String
8587
}

server/src/services/Poracle.js

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,11 @@ class PoracleAPI {
223223

224224
if (
225225
major < 4 ||
226-
(major === 4 && minor < 6) ||
227-
(major === 4 && minor === 6 && patch < 0)
226+
(major === 4 && minor < 8) ||
227+
(major === 4 && minor === 8 && patch < 4)
228228
) {
229229
throw new Error(
230-
`Poracle must be at least version 4.6.0, current version is ${this.version}`,
230+
`Poracle must be at least version 4.8.4, current version is ${this.version}`,
231231
)
232232
}
233233
const { providerURL, addressFormat, ...rest } = remoteConfig
@@ -796,6 +796,7 @@ class PoracleAPI {
796796
exclusive: false,
797797
level: 9000,
798798
team: 4,
799+
rsvp_changes: 0,
799800
gym_id: null,
800801
byDistance: false,
801802
allMoves: true,
@@ -813,11 +814,12 @@ class PoracleAPI {
813814
disabled: true,
814815
options: [],
815816
xs: 6,
816-
sm: 3,
817+
sm: 4,
817818
},
818-
{ name: 'template', options: [], xs: 6, sm: 3 },
819-
{ name: 'team', options: [0, 1, 2, 3, 4], xs: 6, sm: 3 },
820-
{ name: 'move', options: [], xs: 6, sm: 3 },
819+
{ name: 'template', options: [], xs: 6, sm: 4 },
820+
{ name: 'team', options: [0, 1, 2, 3, 4], xs: 6, sm: 4 },
821+
{ name: 'move', options: [], xs: 6, sm: 5 },
822+
{ name: 'rsvp_changes', options: [0, 1, 2], xs: 6, sm: 5 },
821823
],
822824
booleans: [
823825
{ name: 'clean', xs: 6, sm: 3 },
@@ -869,6 +871,7 @@ class PoracleAPI {
869871
exclusive: false,
870872
level: 9000,
871873
team: 4,
874+
rsvp_changes: 0,
872875
gym_id: null,
873876
byDistance: false,
874877
everything_individually:
@@ -884,10 +887,11 @@ class PoracleAPI {
884887
disabled: true,
885888
options: [],
886889
xs: 6,
887-
sm: 4,
890+
sm: 3,
888891
},
889-
{ name: 'template', options: [], xs: 6, sm: 4 },
890-
{ name: 'team', options: [0, 1, 2, 3, 4], xs: 6, sm: 4 },
892+
{ name: 'template', options: [], xs: 6, sm: 3 },
893+
{ name: 'team', options: [0, 1, 2, 3, 4], xs: 6, sm: 3 },
894+
{ name: 'rsvp_changes', options: [0, 1, 2], xs: 6, sm: 3 },
891895
],
892896
booleans: [
893897
{ name: 'clean', xs: 6, sm: 6 },

src/features/webhooks/WebhookAdv.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ const skipFields = new Set([
6666
'gym_id',
6767
'slot_changes',
6868
'team',
69+
'rsvp_changes',
6970
'battle_changes',
7071
'shiny',
7172
'everything_individually',
@@ -328,6 +329,15 @@ export function WebhookAdvanced() {
328329
),
329330
)
330331
break
332+
case 'rsvp_changes':
333+
option.options.forEach((rsvp_changes) =>
334+
menuItems.push(
335+
<MenuItem key={rsvp_changes} value={rsvp_changes} dense>
336+
{t(`rsvp_${rsvp_changes}`)}
337+
</MenuItem>,
338+
),
339+
)
340+
break
331341
case 'move':
332342
menuItems.push(
333343
<MenuItem key={9000} value={9000} dense>
@@ -410,6 +420,8 @@ export function WebhookAdvanced() {
410420
return ` ${t('battle_changes_poracle')} `
411421
if (field === 'team' && poracleValues.team !== 4)
412422
return t(`team_${poracleValues.team}`)
423+
if (field === 'rsvp_changes' && poracleValues.rsvp_changes !== 0)
424+
return t(`rsvp_${poracleValues.rsvp_changes}`)
413425
if (
414426
field === 'everything_individually' &&
415427
poracleValues.everything_individually

0 commit comments

Comments
 (0)