Commit graph

228 commits

Author SHA1 Message Date
860177c0a4 add show_gamertag to user 2025-12-13 20:09:52 -08:00
534414939b add current_membership to crew response 2025-12-13 20:09:44 -08:00
0a069c0324 fix N+1 query in by_event: include user for membership 2025-12-04 03:05:53 -08:00
26718b5a3e gw event improvements: status field, members_during_event endpoint 2025-12-04 03:02:35 -08:00
7d27d3c8b1 allow officers to update joined_at on members and phantoms 2025-12-04 03:02:27 -08:00
0337bc1e92 add by-event score endpoints that auto-create participation 2025-12-04 03:02:22 -08:00
50e2318f59 add filter support to crew members endpoint
GET /crew/members now accepts ?filter param:
- active (default): active members only
- retired: retired members only
- phantom: phantom players only
- all: all members + phantoms

Response includes both members[] and phantoms[] arrays.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 00:07:22 -08:00
4c8f4ffcf3 add phantom players for non-registered crew members
- phantom_players table for tracking scores of non-user members
- claim flow: officer assigns phantom to user, user confirms, scores transfer
- CRUD endpoints plus /assign and /confirm_claim actions
- model/request specs for all functionality (37 examples)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:55:15 -08:00
a3a0138526 add request specs for crew controllers (phases 1-2)
- add crews_spec.rb (18 examples)
- add crew_memberships_spec.rb (13 examples)
- add crew_invitations_spec.rb (15 examples)
- fix crew_memberships authorize_crew_captain! as before_action
- update crew_invitations factory to auto-set invited_by officer

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:47:25 -08:00
7f57c2c3ee fix gw controller params and add request specs
- use gw_participation_id param (matches route param name)
- use gw_crew_score root key for consistency
- add crew_gw_participations request specs
- add gw_crew_scores request specs
- add gw_individual_scores request specs
- fix batch authorization to return early

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:40:38 -08:00
f2a058b6b2 add GW events and scoring system
- create gw_events, crew_gw_participations, gw_crew_scores, gw_individual_scores
- add models, blueprints, controllers for GW tracking
- add model specs and gw_events controller specs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 23:34:54 -08:00
b75a905e2e add crew invitations system
- create crew_invitations table with status enum
- add CrewInvitation model with accept/reject flow
- add CrewInvitationsController for send/accept/reject
- add invitation error classes
- add invitation routes nested under crews
- add pending invitations endpoint for current user
- 38 passing specs for model and controller
2025-12-03 23:06:07 -08:00
872b6fdb59 add crew specs and fix error handling
- add transactional fixtures to rails_helper for test isolation
- restructure crew errors to CrewErrors module for Zeitwerk
- add rescue_from for CrewErrors::CrewError in api_controller
- add model specs for Crew and CrewMembership (34 examples)
- add controller specs for crews and memberships (28 examples)
- add crew-related specs to User model (22 examples)
- add factories for crews and crew_memberships
2025-12-03 22:51:34 -08:00
233dd4fe95 add sync endpoints and collection_id params to controllers 2025-12-03 22:46:17 -08:00
e98e59491d add crew controllers, blueprints, routes, and errors
- CrewsController: create, show, update, members, leave, transfer_captain
- CrewMembershipsController: update, destroy, promote, demote
- CrewAuthorizationConcern for member/officer/captain checks
- blueprints for serialization
- custom error classes for crew operations
2025-12-03 22:41:25 -08:00
658d3d9c49 add rarity filter to collection artifacts index 2025-12-03 21:26:46 -08:00
6cf85a5b3e add artifact import from game data
- Add ArtifactImportService to parse game JSON and create collection artifacts
- Maps game skill_id to our (group, modifier) format using verified mapping
- Handles skill quality -> strength lookup via ArtifactSkill.base_values
- Supports duplicate detection via game_id, with optional update_existing flag
- Quirk artifacts get proficiency from game data; skills stored as empty
- Add POST /collection/artifacts/import endpoint
- Add game_id column to collection_artifacts, collection_weapons,
  collection_summons for tracking game inventory instance IDs
2025-12-03 14:20:21 -08:00
4715591545 add artifact image download endpoints
- POST /artifacts/:id/download_image (sync single size)
- POST /artifacts/:id/download_images (async all sizes)
- GET /artifacts/:id/download_status (poll job status)
2025-12-03 13:37:24 -08:00
fd1c363352 add POST /artifacts/grade endpoint
allows grading artifact skills without persisting a record
2025-12-03 13:32:57 -08:00
8787aa34a3 include reroll_slot and grades in artifact responses 2025-12-03 13:27:35 -08:00
e6438eaabe support series_slug filter in weapon_keys endpoint 2025-12-03 12:59:07 -08:00
cc7ac1956b add artifact controllers and routes 2025-12-03 12:58:44 -08:00
bd5f1b0240 add weapon_series API endpoints and update blueprints 2025-12-03 10:45:57 -08:00
99292f20ef add batch endpoints for collection items
POST /collection/{characters,weapons,summons}/batch
2025-12-03 09:03:37 -08:00
4a471dd273 add filtering/sorting params to collection characters endpoint 2025-12-02 17:19:15 -08:00
5bc179afa8 unify collection api: single endpoint for all users
- restructure routes: read via /users/:id/collection/*, write via /collection/*
- add user lookup + privacy check to collection_characters_controller
- add race, proficiency, gender scopes to model
- delete old collection_controller
2025-12-02 15:31:39 -08:00
32bc9f5872 fix /users/me endpoint to use current_user 2025-12-02 06:54:12 -08:00
9c5c859da6 add season/series/promotions filters to search endpoints 2025-12-02 05:54:52 -08:00
05dd8996a4 weapons/summons controllers: permit promotions param 2025-12-02 04:40:22 -08:00
db048dc4e9 characters: permit season, series, gacha_available params 2025-12-02 04:18:37 -08:00
f5760b1833 add batch_preview endpoint for entity import 2025-12-01 23:39:49 -08:00
707c0436c5 api: add update endpoints for characters, weapons, and summons
Add PATCH/PUT update actions to all three entity controllers with
editor role authorization. Routes updated to include :update action.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:23:24 -08:00
29cb276a2a weapons: add validate, create, download endpoints
Add weapon entity creation API following the established pattern from
characters and summons controllers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 03:04:15 -08:00
a27bdecde0 summons: add validate, create, download endpoints 2025-12-01 02:41:16 -08:00
deb5cfddb2 add character creation + image download API
- validate granblue_id via HEAD request to GBF CDN
- create characters with editor role check (role >= 7)
- async image download job with Redis status polling
- download_status endpoint for progress tracking
2025-12-01 00:48:40 -08:00
916b72d58d fix grid_characters: don't overwrite resolved IDs in assign_raw_attributes 2025-11-30 20:17:07 -08:00
af202716a2 add related characters endpoint 2025-11-30 20:16:46 -08:00
be5be0c3fe fix blueprints: use correct association names instead of 'object' 2025-11-29 17:41:29 -08:00
144b5cab58 Return proper REST response for deleting a party for more endpoints 2025-09-22 02:51:50 -07:00
4eee998cea Return proper REST response for deleting a party 2025-09-22 00:50:30 -07:00
5c6865ce0d Add dates view to search endpoint responses 2025-09-19 23:38:06 -07:00
f0e44249b7 Use full view for individual resource show endpoints 2025-09-19 23:37:38 -07:00
7a1e2fc8f9 Update uncap level endpoints to use uncap view
- Change response view from :nested/:full to :uncap for update_uncap_level
- Add default value of 0 for transcendence_step when not provided
- Fix max_uncap_level method call in GridSummonsController
2025-09-19 23:36:43 -07:00
2860552c94 Fix total_pages calculation to respect X-Per-Page header
The total_pages method was using the hardcoded SEARCH_PER_PAGE constant
instead of the dynamic search_page_size value from the X-Per-Page header.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:59:41 -07:00
42c811c112 Make search parameter optional for search endpoints
Allow search endpoints to work without the 'search' key in the request body.
When no search key is provided, return an empty hash to show all items.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:54:40 -07:00
8225340eec Fix error handling for ActionController::ParameterMissing
The render_unprocessable_entity_response method was calling to_hash
on all exceptions, but ActionController::ParameterMissing doesn't
have that method. Updated to handle different exception types properly.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-17 05:51:58 -07:00
07e5488e0b Add custom page size support via X-Per-Page header
- Add page_size helper method to read from X-Per-Page header
- Set min (1) and max (100) bounds for page sizes
- Update all paginated endpoints to use dynamic page size
- Maintain backward compatibility with default sizes
2025-09-17 05:44:14 -07:00
8c05cd838c Add batch grid update endpoint
- POST /parties/:id/grid_update for atomic multi-operations
- Support move, swap, and remove operations
- Validate all operations before executing
- Use transaction for atomicity
- Optional character sequence maintenance
2025-09-16 03:33:02 -07:00
311e8254d0 Add summon position update and swap endpoints
- PUT /parties/:party_id/grid_summons/:id/position
- POST /parties/:party_id/grid_summons/swap
- Restrict main and friend summon positions
- Validate sub/subaura slot transitions
2025-09-16 03:32:45 -07:00
5ed8a68ab6 Add character position update and swap endpoints
- PUT /parties/:party_id/grid_characters/:id/position
- POST /parties/:party_id/grid_characters/swap
- Auto-compact main slots to maintain sequential filling
- Handle main/extra slot transitions
2025-09-16 03:28:26 -07:00