- POST /exec now accepts environmentId (UUID) and credentials (alias → UUID) instead of raw payloads; resolves entities via EnvironmentService and CredentialService before passing data to browserService.exec - exec_code MCP tool updated with same schema: environmentId + credentials map - CredentialModule imported into BrowserModule and McpModule - docs(scenario): rewrite script runtime section for single context argument - docs(mcp): update exec_code description to reflect new parameter shapes - style: reorder imports across server source (formatter)
39 lines
837 B
TypeScript
39 lines
837 B
TypeScript
import {
|
|
Column,
|
|
CreateDateColumn,
|
|
Entity,
|
|
JoinColumn,
|
|
ManyToOne,
|
|
PrimaryGeneratedColumn,
|
|
Unique,
|
|
} from "typeorm";
|
|
import { CredentialEntity } from "../credential/credential.entity";
|
|
import { ScenarioEntity } from "./scenario.entity";
|
|
|
|
@Entity("scenario_credentials")
|
|
@Unique(["scenarioId", "alias"])
|
|
export class ScenarioCredentialEntity {
|
|
@PrimaryGeneratedColumn("uuid")
|
|
id: string;
|
|
|
|
@Column("text")
|
|
scenarioId: string;
|
|
|
|
@Column("text")
|
|
credentialId: string;
|
|
|
|
@Column()
|
|
alias: string;
|
|
|
|
@ManyToOne(() => ScenarioEntity, { onDelete: "CASCADE" })
|
|
@JoinColumn({ name: "scenarioId" })
|
|
scenario: ScenarioEntity;
|
|
|
|
@ManyToOne(() => CredentialEntity, { onDelete: "CASCADE", eager: true })
|
|
@JoinColumn({ name: "credentialId" })
|
|
credential: CredentialEntity;
|
|
|
|
@CreateDateColumn()
|
|
createdAt: Date;
|
|
}
|