chore: Rename the promotion connection path parameter from id to promotionConnectionId (#38288)

Co-authored-by: n8n-cat-bot[bot] <n8n-cat-bot[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: Sam Wooler <swooler592@gmail.com>
This commit is contained in:
n8n-cat-bot[bot] 2026-09-10 14:16:37 +00:00 committed by GitHub
parent c7c731ac3b
commit ade15ea42d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 116 additions and 91 deletions

View File

@ -115,7 +115,7 @@ export class PromotionsPublicController {
};
}
@Get('/providers/:id')
@Get('/providers/:promotionProviderId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:read')
@GlobalScope('gitConnection:read')
@ -128,12 +128,13 @@ export class PromotionsPublicController {
async getPromotionProvider(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionProviderIdParamSchema) id: string,
@Param('promotionProviderId', promotionProviderIdParamSchema)
promotionProviderId: string,
): Promise<PromotionProviderPublicDto> {
return await (await this.providersService()).findOne(id);
return await (await this.providersService()).findOne(promotionProviderId);
}
@Put('/providers/:id')
@Put('/providers/:promotionProviderId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:update')
@GlobalScope('gitConnection:update')
@ -148,13 +149,14 @@ export class PromotionsPublicController {
async updatePromotionProvider(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionProviderIdParamSchema) id: string,
@Param('promotionProviderId', promotionProviderIdParamSchema)
promotionProviderId: string,
@Body input: UpdatePromotionProviderDto,
): Promise<PromotionProviderPublicDto> {
return await (await this.providersService()).update(id, input);
return await (await this.providersService()).update(promotionProviderId, input);
}
@Delete('/providers/:id')
@Delete('/providers/:promotionProviderId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:delete')
@GlobalScope('gitConnection:delete')
@ -168,9 +170,10 @@ export class PromotionsPublicController {
async deletePromotionProvider(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionProviderIdParamSchema) id: string,
@Param('promotionProviderId', promotionProviderIdParamSchema)
promotionProviderId: string,
): Promise<void> {
await (await this.providersService()).delete(id);
await (await this.providersService()).delete(promotionProviderId);
}
// -- Connections ---------------------------------------------------------
@ -224,7 +227,7 @@ export class PromotionsPublicController {
};
}
@Get('/connections/:id')
@Get('/connections/:promotionConnectionId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:read')
@GlobalScope('gitConnection:read')
@ -237,12 +240,13 @@ export class PromotionsPublicController {
async getPromotionConnection(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
): Promise<PromotionConnectionPublicDto> {
return await (await this.connectionsService()).findOne(id);
return await (await this.connectionsService()).findOne(promotionConnectionId);
}
@Put('/connections/:id')
@Put('/connections/:promotionConnectionId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:update')
@GlobalScope('gitConnection:update')
@ -257,13 +261,14 @@ export class PromotionsPublicController {
async updatePromotionConnection(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Body input: UpdatePromotionConnectionDto,
): Promise<PromotionConnectionPublicDto> {
return await (await this.connectionsService()).update(id, input);
return await (await this.connectionsService()).update(promotionConnectionId, input);
}
@Delete('/connections/:id')
@Delete('/connections/:promotionConnectionId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:delete')
@GlobalScope('gitConnection:delete')
@ -278,14 +283,15 @@ export class PromotionsPublicController {
async deletePromotionConnection(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
): Promise<void> {
await (await this.connectionsService()).delete(id);
await (await this.connectionsService()).delete(promotionConnectionId);
}
// -- Configurations ------------------------------------------------------
@Put('/connections/:id/configs/apply')
@Put('/connections/:promotionConnectionId/configs/apply')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:update')
@GlobalScope('gitConnection:update')
@ -301,16 +307,17 @@ export class PromotionsPublicController {
async upsertPromotionApplyConfig(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Body input: UpsertPromotionApplyConfigDto,
): Promise<PromotionApplyConfigPublicDto> {
return await (await this.connectionsService()).upsertConfig(id, {
return await (await this.connectionsService()).upsertConfig(promotionConnectionId, {
config: { direction: 'apply', settings: input.settings },
name: input.name,
});
}
@Put('/connections/:id/configs/promote')
@Put('/connections/:promotionConnectionId/configs/promote')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:update')
@GlobalScope('gitConnection:update')
@ -326,16 +333,17 @@ export class PromotionsPublicController {
async upsertPromotionPromoteConfig(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Body input: UpsertPromotionPromoteConfigDto,
): Promise<PromotionPromoteConfigPublicDto> {
return await (await this.connectionsService()).upsertConfig(id, {
return await (await this.connectionsService()).upsertConfig(promotionConnectionId, {
config: { direction: 'promote', settings: input.settings },
name: input.name,
});
}
@Delete('/connections/:id/configs/:direction')
@Delete('/connections/:promotionConnectionId/configs/:direction')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:update')
@GlobalScope('gitConnection:update')
@ -348,15 +356,19 @@ export class PromotionsPublicController {
async deletePromotionConfig(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Param('direction', promotionDirectionParamSchema) direction: string,
): Promise<void> {
await (await this.connectionsService()).deleteConfig(id, parseDirection(direction));
await (await this.connectionsService()).deleteConfig(
promotionConnectionId,
parseDirection(direction),
);
}
// -- Local checkouts -----------------------------------------------------
@Post('/connections/:id/:direction/clone')
@Post('/connections/:promotionConnectionId/:direction/clone')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:clone')
@GlobalScope('gitConnection:clone')
@ -372,13 +384,17 @@ export class PromotionsPublicController {
async clonePromotionCheckout(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Param('direction', promotionDirectionParamSchema) direction: string,
): Promise<PromotionCheckoutPublicDto> {
return await (await this.promotionsService()).clone(id, parseDirection(direction));
return await (await this.promotionsService()).clone(
promotionConnectionId,
parseDirection(direction),
);
}
@Post('/connections/:id/:direction/disconnect')
@Post('/connections/:promotionConnectionId/:direction/disconnect')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:clone')
@GlobalScope('gitConnection:clone')
@ -393,15 +409,19 @@ export class PromotionsPublicController {
async disconnectPromotionCheckout(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Param('direction', promotionDirectionParamSchema) direction: string,
): Promise<PromotionCheckoutPublicDto> {
return await (await this.promotionsService()).disconnect(id, parseDirection(direction));
return await (await this.promotionsService()).disconnect(
promotionConnectionId,
parseDirection(direction),
);
}
// -- Project links -------------------------------------------------------
@Get('/connections/:id/projects')
@Get('/connections/:promotionConnectionId/projects')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:read')
@GlobalScope('gitConnection:read')
@ -413,12 +433,13 @@ export class PromotionsPublicController {
async getPromotionConnectionProjects(
_req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
): Promise<PromotionConnectionProjectListPublicDto> {
return await (await this.connectionsService()).listProjects(id);
return await (await this.connectionsService()).listProjects(promotionConnectionId);
}
@Post('/connections/:id/projects/:projectId')
@Post('/connections/:promotionConnectionId/projects/:projectId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:manageProjects')
@GlobalScope('gitConnection:manageProjects')
@ -436,17 +457,18 @@ export class PromotionsPublicController {
async addProjectToPromotionConnection(
req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Param('projectId', projectIdParamSchema) projectId: string,
): Promise<PromotionConnectionProjectPublicDto> {
return await (await this.connectionsService()).addProject({
user: req.user,
connectionId: id,
connectionId: promotionConnectionId,
projectId,
});
}
@Delete('/connections/:id/projects/:projectId')
@Delete('/connections/:promotionConnectionId/projects/:projectId')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:manageProjects')
@GlobalScope('gitConnection:manageProjects')
@ -460,19 +482,20 @@ export class PromotionsPublicController {
async removeProjectFromPromotionConnection(
req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Param('projectId', projectIdParamSchema) projectId: string,
): Promise<void> {
await (await this.connectionsService()).removeProject({
user: req.user,
connectionId: id,
connectionId: promotionConnectionId,
projectId,
});
}
// -- Package operations --------------------------------------------------
@Post('/connections/:id/promote')
@Post('/connections/:promotionConnectionId/promote')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:push')
@GlobalScope('gitConnection:push')
@ -488,16 +511,17 @@ export class PromotionsPublicController {
async promotePackage(
req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
@Body input: PromotePackageDto,
): Promise<PromotePackageResultDto> {
return await (await this.promotionsService()).promote(id, req.user, {
return await (await this.promotionsService()).promote(promotionConnectionId, req.user, {
...input,
canExportVariableValues: req.tokenGrant?.apiKeyScopes?.includes('variable:list') ?? false,
});
}
@Post('/connections/:id/apply')
@Post('/connections/:promotionConnectionId/apply')
@Licensed(LICENSE_FEATURES.GIT_CONNECTIONS)
@ApiKeyScope('gitConnection:pull')
@GlobalScope('gitConnection:pull')
@ -515,9 +539,10 @@ export class PromotionsPublicController {
async applyPackage(
req: AuthenticatedRequest,
_res: Response,
@Param('id', promotionConnectionIdParamSchema) id: string,
@Param('promotionConnectionId', promotionConnectionIdParamSchema)
promotionConnectionId: string,
): Promise<ApplyPackageResultDto> {
return await (await this.promotionsService()).apply(id, req.user);
return await (await this.promotionsService()).apply(promotionConnectionId, req.user);
}
// -- Module access -------------------------------------------------------

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
- schema:
type: string

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
responses:
'200':

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
- schema:
type: string

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
- schema:
type: string

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
responses:
'204':

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion provider.
name: id
name: promotionProviderId
in: path
responses:
'204':

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
- schema:
type: string

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
responses:
'200':

View File

@ -11,7 +11,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
responses:
'200':

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion provider.
name: id
name: promotionProviderId
in: path
responses:
'200':

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
requestBody:
required: true

View File

@ -11,7 +11,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
- schema:
type: string

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
requestBody:
required: true

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion provider.
name: id
name: promotionProviderId
in: path
requestBody:
required: true

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
requestBody:
required: true

View File

@ -12,7 +12,7 @@ parameters:
type: string
required: true
description: The ID of the promotion connection.
name: id
name: promotionConnectionId
in: path
requestBody:
required: true

View File

@ -46,7 +46,7 @@ paths:
$ref: ./handlers/promotions/spec/paths/createPromotionProvider.generated.yml
get:
$ref: ./handlers/promotions/spec/paths/getPromotionProviders.generated.yml
/promotions/providers/{id}:
/promotions/providers/{promotionProviderId}:
get:
$ref: ./handlers/promotions/spec/paths/getPromotionProvider.generated.yml
put:
@ -58,40 +58,40 @@ paths:
$ref: ./handlers/promotions/spec/paths/createPromotionConnection.generated.yml
get:
$ref: ./handlers/promotions/spec/paths/getPromotionConnections.generated.yml
/promotions/connections/{id}:
/promotions/connections/{promotionConnectionId}:
get:
$ref: ./handlers/promotions/spec/paths/getPromotionConnection.generated.yml
put:
$ref: ./handlers/promotions/spec/paths/updatePromotionConnection.generated.yml
delete:
$ref: ./handlers/promotions/spec/paths/deletePromotionConnection.generated.yml
/promotions/connections/{id}/configs/apply:
/promotions/connections/{promotionConnectionId}/configs/apply:
put:
$ref: ./handlers/promotions/spec/paths/upsertPromotionApplyConfig.generated.yml
/promotions/connections/{id}/configs/promote:
/promotions/connections/{promotionConnectionId}/configs/promote:
put:
$ref: ./handlers/promotions/spec/paths/upsertPromotionPromoteConfig.generated.yml
/promotions/connections/{id}/configs/{direction}:
/promotions/connections/{promotionConnectionId}/configs/{direction}:
delete:
$ref: ./handlers/promotions/spec/paths/deletePromotionConfig.generated.yml
/promotions/connections/{id}/{direction}/clone:
/promotions/connections/{promotionConnectionId}/{direction}/clone:
post:
$ref: ./handlers/promotions/spec/paths/clonePromotionCheckout.generated.yml
/promotions/connections/{id}/{direction}/disconnect:
/promotions/connections/{promotionConnectionId}/{direction}/disconnect:
post:
$ref: ./handlers/promotions/spec/paths/disconnectPromotionCheckout.generated.yml
/promotions/connections/{id}/projects:
/promotions/connections/{promotionConnectionId}/projects:
get:
$ref: ./handlers/promotions/spec/paths/getPromotionConnectionProjects.generated.yml
/promotions/connections/{id}/projects/{projectId}:
/promotions/connections/{promotionConnectionId}/projects/{projectId}:
post:
$ref: ./handlers/promotions/spec/paths/addProjectToPromotionConnection.generated.yml
delete:
$ref: ./handlers/promotions/spec/paths/removeProjectFromPromotionConnection.generated.yml
/promotions/connections/{id}/promote:
/promotions/connections/{promotionConnectionId}/promote:
post:
$ref: ./handlers/promotions/spec/paths/promotePackage.generated.yml
/promotions/connections/{id}/apply:
/promotions/connections/{promotionConnectionId}/apply:
post:
$ref: ./handlers/promotions/spec/paths/applyPackage.generated.yml
/role-mapping-rules:

View File

@ -235,13 +235,13 @@
"POST /promotions/providers": {
"status": "gap"
},
"GET /promotions/providers/{id}": {
"GET /promotions/providers/{promotionProviderId}": {
"status": "gap"
},
"PUT /promotions/providers/{id}": {
"PUT /promotions/providers/{promotionProviderId}": {
"status": "gap"
},
"DELETE /promotions/providers/{id}": {
"DELETE /promotions/providers/{promotionProviderId}": {
"status": "gap"
},
"GET /promotions/connections": {
@ -250,43 +250,43 @@
"POST /promotions/connections": {
"status": "gap"
},
"GET /promotions/connections/{id}": {
"GET /promotions/connections/{promotionConnectionId}": {
"status": "gap"
},
"PUT /promotions/connections/{id}": {
"PUT /promotions/connections/{promotionConnectionId}": {
"status": "gap"
},
"DELETE /promotions/connections/{id}": {
"DELETE /promotions/connections/{promotionConnectionId}": {
"status": "gap"
},
"PUT /promotions/connections/{id}/configs/apply": {
"PUT /promotions/connections/{promotionConnectionId}/configs/apply": {
"status": "gap"
},
"PUT /promotions/connections/{id}/configs/promote": {
"PUT /promotions/connections/{promotionConnectionId}/configs/promote": {
"status": "gap"
},
"DELETE /promotions/connections/{id}/configs/{direction}": {
"DELETE /promotions/connections/{promotionConnectionId}/configs/{direction}": {
"status": "gap"
},
"POST /promotions/connections/{id}/{direction}/clone": {
"POST /promotions/connections/{promotionConnectionId}/{direction}/clone": {
"status": "gap"
},
"POST /promotions/connections/{id}/{direction}/disconnect": {
"POST /promotions/connections/{promotionConnectionId}/{direction}/disconnect": {
"status": "gap"
},
"GET /promotions/connections/{id}/projects": {
"GET /promotions/connections/{promotionConnectionId}/projects": {
"status": "gap"
},
"POST /promotions/connections/{id}/projects/{projectId}": {
"POST /promotions/connections/{promotionConnectionId}/projects/{projectId}": {
"status": "gap"
},
"DELETE /promotions/connections/{id}/projects/{projectId}": {
"DELETE /promotions/connections/{promotionConnectionId}/projects/{projectId}": {
"status": "gap"
},
"POST /promotions/connections/{id}/promote": {
"POST /promotions/connections/{promotionConnectionId}/promote": {
"status": "gap"
},
"POST /promotions/connections/{id}/apply": {
"POST /promotions/connections/{promotionConnectionId}/apply": {
"status": "gap"
},
"GET /settings/security-policy": {