Conversation
| @@ -0,0 +1,348 @@ | |||
| import { TServiceParams } from "@digital-alchemy/core"; | |||
| import { and, eq } from "drizzle-orm"; | |||
There was a problem hiding this comment.
🚫 [tsc] <6133> reported by reviewdog 🐶
'and' is declared but its value is never read.
| "/:versionId", | ||
| { schema: { body: UpdateDraftBody, params: versionParams } }, | ||
| ({ body, params: { versionId } }) => | ||
| code_glue.automationVersion.updateDraft(versionId, { |
There was a problem hiding this comment.
🚫 [tsc] <2379> reported by reviewdog 🐶
Argument of type '{ body: string | undefined; name: string | undefined; notes: string | undefined; }' is not assignable to parameter of type '{ body?: string; name?: string; notes?: string; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'body' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
| "/:versionId/finalize", | ||
| { schema: { body: FinalizeBody, params: versionParams } }, | ||
| ({ body, params: { versionId } }) => | ||
| code_glue.automationVersion.finalizeVersion(versionId, { |
There was a problem hiding this comment.
🚫 [tsc] <2379> reported by reviewdog 🐶
Argument of type '{ name: string | undefined; notes: string | undefined; wasAutoSaved: boolean; makeActive: boolean | undefined; }' is not assignable to parameter of type '{ name?: string; notes?: string; wasAutoSaved: boolean; makeActive?: boolean; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'name' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
| day: "numeric", | ||
| }); | ||
|
|
||
| const version = await database.automationVersion.create({ |
There was a problem hiding this comment.
🚫 [tsc] <2379> reported by reviewdog 🐶
Argument of type '{ automationId: string; body: string; createDate: string; isActive: true; isDraft: false; name: string; notes: undefined; parentVersionId: undefined; wasAutoSaved: false; writtenByAi: false; }' is not assignable to parameter of type '{ name?: string; notes?: string; parentVersionId?: string; automationId: string; body: string; isActive: boolean; createDate: string; isDraft: boolean; wasAutoSaved: boolean; writtenByAi: boolean; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'notes' are incompatible.
Type 'undefined' is not assignable to type 'string'.
| body: string, | ||
| parentVersionId: string | undefined, | ||
| ) { | ||
| return await database.automationVersion.create({ |
There was a problem hiding this comment.
🚫 [tsc] <2379> reported by reviewdog 🐶
Argument of type '{ automationId: string; body: string; createDate: string; isActive: false; isDraft: true; name: undefined; notes: undefined; parentVersionId: string | undefined; wasAutoSaved: false; writtenByAi: false; }' is not assignable to parameter of type '{ name?: string; notes?: string; parentVersionId?: string; automationId: string; body: string; isActive: boolean; createDate: string; isDraft: boolean; wasAutoSaved: boolean; writtenByAi: boolean; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'name' are incompatible.
Type 'undefined' is not assignable to type 'string'.
| throw new Error(`Automation ${version.automationId} not found`); | ||
| } | ||
|
|
||
| const updated = await database.automationVersion.update(versionId, { |
There was a problem hiding this comment.
🚫 [tsc] <2379> reported by reviewdog 🐶
Argument of type '{ isActive: boolean; isDraft: false; name: string | undefined; notes: string | undefined; wasAutoSaved: boolean; }' is not assignable to parameter of type '{ name?: string; body?: string; isActive?: boolean; createDate?: string; isDraft?: boolean; notes?: string; parentVersionId?: string; wasAutoSaved?: boolean; writtenByAi?: boolean; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'name' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
| }; | ||
|
|
||
| function loadRow(row: VersionRow): AutomationVersion { | ||
| return { |
There was a problem hiding this comment.
🚫 [tsc] <2375> reported by reviewdog 🐶
Type '{ automationId: string; body: string; createDate: string; id: string; isActive: boolean; isDraft: boolean; name: string | undefined; notes: string | undefined; parentVersionId: string | undefined; wasAutoSaved: boolean; writtenByAi: boolean; }' is not assignable to type '{ name?: string; notes?: string; parentVersionId?: string; automationId: string; body: string; id: string; isActive: boolean; createDate: string; isDraft: boolean; wasAutoSaved: boolean; writtenByAi: boolean; }' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties.
Types of property 'name' are incompatible.
Type 'string | undefined' is not assignable to type 'string'.
Type 'undefined' is not assignable to type 'string'.
No description provided.