diff --git a/fluxer_api/src/api/oauth/OAuth2Controller.ts b/fluxer_api/src/api/oauth/OAuth2Controller.ts index 4bedaad2e..e97e9c6df 100644 --- a/fluxer_api/src/api/oauth/OAuth2Controller.ts +++ b/fluxer_api/src/api/oauth/OAuth2Controller.ts @@ -369,7 +369,7 @@ export function OAuth2Controller(app: HonoApp) { }, ); app.delete( - '/oauth2/@me/authorizations/:applicationId', + '/oauth2/@me/authorizations/:application_id', RateLimitMiddleware(RateLimitConfigs.OAUTH_INTROSPECT), LoginRequired, DefaultUserOnly, @@ -386,7 +386,7 @@ export function OAuth2Controller(app: HonoApp) { }), async (ctx) => { const user = ctx.get('user'); - const applicationId = ctx.req.valid('param').applicationId; + const applicationId = ctx.req.valid('param').application_id; await ctx.get('oauth2RequestService').deleteAuthorization(user.id, applicationId); return ctx.body(null, 204); }, diff --git a/fluxer_api/src/api/openapi/openapi.json b/fluxer_api/src/api/openapi/openapi.json index 6c820f56e..669519e81 100644 --- a/fluxer_api/src/api/openapi/openapi.json +++ b/fluxer_api/src/api/openapi/openapi.json @@ -11768,7 +11768,7 @@ ] } }, - "/harvest-downloads/{harvestId}": { + "/harvest-downloads/{harvest_id}": { "get": { "operationId": "download_data_harvest_archive", "summary": "Download data harvest archive", @@ -11816,7 +11816,7 @@ "description": "Streams a completed data harvest archive. Authorised by a signed, expiring token rather than a session, so the link works from the harvest completion email. Only active when presigned harvest downloads are disabled.", "parameters": [ { - "name": "harvestId", + "name": "harvest_id", "in": "path", "required": true, "schema": {"description": "The ID of the harvest request", "$ref": "#/components/schemas/SnowflakeType"}, @@ -12771,7 +12771,7 @@ } } }, - "/oauth2/@me/authorizations/{applicationId}": { + "/oauth2/@me/authorizations/{application_id}": { "delete": { "operationId": "delete_user_oauth2_authorization", "summary": "Revoke OAuth2 authorization", @@ -12821,7 +12821,7 @@ "security": [{"sessionToken": []}], "parameters": [ { - "name": "applicationId", + "name": "application_id", "in": "path", "required": true, "schema": {"description": "The ID of the application", "$ref": "#/components/schemas/SnowflakeType"}, @@ -21239,7 +21239,7 @@ "security": [{"sessionToken": []}] } }, - "/users/@me/harvest/{harvestId}": { + "/users/@me/harvest/{harvest_id}": { "get": { "operationId": "get_data_harvest_status", "summary": "Get data harvest status", @@ -21292,7 +21292,7 @@ "security": [{"sessionToken": []}], "parameters": [ { - "name": "harvestId", + "name": "harvest_id", "in": "path", "required": true, "schema": {"description": "The ID of the harvest request", "$ref": "#/components/schemas/SnowflakeType"}, @@ -21301,7 +21301,7 @@ ] } }, - "/users/@me/harvest/{harvestId}/download": { + "/users/@me/harvest/{harvest_id}/download": { "get": { "operationId": "get_data_harvest_download_url", "summary": "Get data harvest download URL", @@ -21354,7 +21354,7 @@ "security": [{"sessionToken": []}], "parameters": [ { - "name": "harvestId", + "name": "harvest_id", "in": "path", "required": true, "schema": {"description": "The ID of the harvest request", "$ref": "#/components/schemas/SnowflakeType"}, diff --git a/fluxer_api/src/api/user/controllers/UserContentController.ts b/fluxer_api/src/api/user/controllers/UserContentController.ts index 3a124c204..843183c12 100644 --- a/fluxer_api/src/api/user/controllers/UserContentController.ts +++ b/fluxer_api/src/api/user/controllers/UserContentController.ts @@ -253,7 +253,7 @@ export function UserContentController(app: HonoApp) { }, ); app.get( - '/users/@me/harvest/:harvestId', + '/users/@me/harvest/:harvest_id', RateLimitMiddleware(RateLimitConfigs.USER_HARVEST_STATUS), LoginRequired, DefaultUserOnly, @@ -269,7 +269,7 @@ export function UserContentController(app: HonoApp) { 'Retrieves detailed status information for a specific data harvest. Shows progress, completion status, and other metadata about the harvest request.', }), async (ctx) => { - const {harvestId} = ctx.req.valid('param'); + const {harvest_id: harvestId} = ctx.req.valid('param'); const harvest = await ctx.get('userContentRequestService').getHarvestStatus({ userId: ctx.get('user').id, harvestId, @@ -278,7 +278,7 @@ export function UserContentController(app: HonoApp) { }, ); app.get( - '/harvest-downloads/:harvestId', + '/harvest-downloads/:harvest_id', RateLimitMiddleware(RateLimitConfigs.USER_HARVEST_DOWNLOAD_FILE), Validator('param', HarvestIdParam), Validator('query', HarvestDownloadQuery, (result, ctx) => @@ -296,7 +296,7 @@ export function UserContentController(app: HonoApp) { 'Streams a completed data harvest archive. Authorised by a signed, expiring token rather than a session, so the link works from the harvest completion email. Only active when presigned harvest downloads are disabled.', }), async (ctx) => { - const {harvestId} = ctx.req.valid('param'); + const {harvest_id: harvestId} = ctx.req.valid('param'); const {token} = ctx.req.valid('query'); try { const result = await ctx.get('userContentRequestService').streamHarvestDownload({ @@ -330,7 +330,7 @@ export function UserContentController(app: HonoApp) { }, ); app.get( - '/users/@me/harvest/:harvestId/download', + '/users/@me/harvest/:harvest_id/download', RateLimitMiddleware(RateLimitConfigs.USER_HARVEST_DOWNLOAD), LoginRequired, DefaultUserOnly, @@ -346,7 +346,7 @@ export function UserContentController(app: HonoApp) { 'Retrieves the download URL for a completed data harvest. The URL is temporary and expires after a set time. Can only be accessed for completed harvests.', }), async (ctx) => { - const {harvestId} = ctx.req.valid('param'); + const {harvest_id: harvestId} = ctx.req.valid('param'); const result = await ctx.get('userContentRequestService').getHarvestDownloadUrl({ userId: ctx.get('user').id, harvestId, diff --git a/fluxer_api/src/api/user/tests/DateOfBirthStep.test.ts b/fluxer_api/src/api/user/tests/DateOfBirthStep.test.ts index 1763d9b2c..31e21095f 100644 --- a/fluxer_api/src/api/user/tests/DateOfBirthStep.test.ts +++ b/fluxer_api/src/api/user/tests/DateOfBirthStep.test.ts @@ -287,8 +287,8 @@ describe('Date of birth gate route coverage', () => { 'GET /experiments', 'GET /gateway/bot', 'GET /users/@me', - 'GET /users/@me/harvest/:harvestId', - 'GET /users/@me/harvest/:harvestId/download', + 'GET /users/@me/harvest/:harvest_id', + 'GET /users/@me/harvest/:harvest_id/download', 'GET /users/@me/harvest/latest', 'GET /users/@me/settings', 'GET /users/@me/sudo/mfa-methods', diff --git a/packages/schema/src/domains/common/CommonParamSchemas.ts b/packages/schema/src/domains/common/CommonParamSchemas.ts index afdb1f64b..a0e5aba86 100644 --- a/packages/schema/src/domains/common/CommonParamSchemas.ts +++ b/packages/schema/src/domains/common/CommonParamSchemas.ts @@ -101,7 +101,7 @@ export const TargetIdParam = z.object({ export type TargetIdParam = z.infer; export const ApplicationAuthorizationIdParam = z.object({ - applicationId: SnowflakeType.describe('The ID of the application'), + application_id: SnowflakeType.describe('The ID of the application'), }); export type ApplicationAuthorizationIdParam = z.infer; @@ -199,7 +199,7 @@ export const JobIdParam = z.object({ export type JobIdParam = z.infer; export const HarvestIdParam = z.object({ - harvestId: SnowflakeType.describe('The ID of the harvest request'), + harvest_id: SnowflakeType.describe('The ID of the harvest request'), }); export type HarvestIdParam = z.infer;