Skip to content

Add API changes from PoracleJS PRs #910 and #930#11

Merged
jfberry merged 1 commit intoshared-configfrom
api_changes
Mar 16, 2026
Merged

Add API changes from PoracleJS PRs #910 and #930#11
jfberry merged 1 commit intoshared-configfrom
api_changes

Conversation

@jfberry
Copy link
Copy Markdown
Owner

@jfberry jfberry commented Mar 15, 2026

Summary

  • New POST /api/humans endpoint to create users with optional community membership and default profile
  • New POST /api/humans/:id/adminDisabled endpoint to set/clear the admin_disable flag
  • ?profile_no query param on all tracking GET and POST routes to override the user's current_profile_no
  • ?silent / ?suppressMessage query param on all tracking POST routes to suppress Discord/Telegram confirmation messages
  • Richer POST responses with newUids, alreadyPresent, updates, and insert counts
  • Egg and raid level accepts int | int[] — one DB row created per level value
  • Raid pokemon_form field — array of {pokemon_id, form} for pokemon-specific raid tracking
  • insertQuery supports returning parameter for RETURNING uid clause

Based on upstream PoracleJS#910 and PoracleJS#930.

Test plan

  • POST /api/humans creates a user and default profile
  • POST /api/humans/:id/adminDisabled toggles the flag
  • Tracking GET routes respect ?profile_no
  • Tracking POST routes respect ?profile_no, ?silent, ?suppressMessage
  • POST responses include newUids, alreadyPresent, updates, insert
  • Egg/raid POST with level: [1,3,5] creates one row per level
  • Raid POST with pokemon_form creates pokemon-specific tracking rows

🤖 Generated with Claude Code

@jfberry jfberry force-pushed the api_changes branch 4 times, most recently from cacb89b to 67aa1b6 Compare March 16, 2026 10:46
New endpoints:
- POST /api/humans — create a new user with optional community/profile
- POST /api/humans/:id/adminDisabled — set/clear admin_disable flag

All tracking GET routes:
- Support ?profile_no query param to override current_profile_no

All tracking POST routes:
- Support ?profile_no query param to override current_profile_no
- Support ?silent and ?suppressMessage to skip confirmation messages
- Return richer response: newUids, alreadyPresent, updates, insert counts

Egg and raid POST:
- level field now accepts int or int[] (one DB row per level)

Raid POST:
- New pokemon_form field: array of {pokemon_id, form} objects for
  pokemon-specific raid tracking (each becomes a row with level=9000)

insertQuery:
- Accepts optional 'returning' parameter for RETURNING clause support

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jfberry jfberry merged commit 49c8ae3 into shared-config Mar 16, 2026
@Fabio1988 Fabio1988 deleted the api_changes branch March 16, 2026 21:11
jfberry added a commit that referenced this pull request Mar 22, 2026
Worker pool deadlock (#2):
- Added context to ProcessorService. Close() cancels before Wait().
  All 9 handlers use select — no blocking at shutdown.

Response body leak (#4):
- Sender: nil-guarded defer resp.Body.Close() before error check.

Blocked alerts matching (#7):
- BlockedAlertsSet parsed from JSON at load time. O(1) map lookup
  replaces strings.Contains in 4 matching files.

Encounter tracker growth (#8):
- InsertedAt timestamp + 4-hour max age eviction for entries with
  disappearTime=0.

PVP evolution form (#11):
- Form field added to LeagueRank, preserving form ID for PVP
  evolution matching (matches original JS behaviour).

Fort change_types matching (#14):
- json.Unmarshal replaces strings.Contains on JSON text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jfberry added a commit that referenced this pull request Mar 23, 2026
Worker pool deadlock (#2):
- Added context to ProcessorService. Close() cancels before Wait().
  All 9 handlers use select — no blocking at shutdown.

Response body leak (#4):
- Sender: nil-guarded defer resp.Body.Close() before error check.

Blocked alerts matching (#7):
- BlockedAlertsSet parsed from JSON at load time. O(1) map lookup
  replaces strings.Contains in 4 matching files.

Encounter tracker growth (#8):
- InsertedAt timestamp + 4-hour max age eviction for entries with
  disappearTime=0.

PVP evolution form (#11):
- Form field added to LeagueRank, preserving form ID for PVP
  evolution matching (matches original JS behaviour).

Fort change_types matching (#14):
- json.Unmarshal replaces strings.Contains on JSON text.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant