Skip to content

Commit 0684382

Browse files
committed
fix(triggers): correct comment.body type to json, fix TriggerOutput description type
- JSM webhook comment.body changed from string to json (ADF format) - Widened TriggerOutput.description to accept TriggerOutput objects, removing unsafe `as unknown as string` casts for Jira description fields
1 parent 4eec324 commit 0684382

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

apps/sim/triggers/jira/utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function buildBaseWebhookOutputs(): Record<string, TriggerOutput> {
154154
type: 'json',
155155
description:
156156
'Issue description in Atlassian Document Format (ADF). On Jira Server this may be a plain string.',
157-
} as unknown as string,
157+
},
158158
updated: {
159159
type: 'string',
160160
description: 'Last updated date (ISO format)',
@@ -670,7 +670,7 @@ export function buildVersionReleasedOutputs(): Record<string, TriggerOutput> {
670670
description: {
671671
type: 'string',
672672
description: 'Version description',
673-
} as unknown as string,
673+
},
674674
archived: {
675675
type: 'boolean',
676676
description: 'Whether the version is archived',

apps/sim/triggers/jsm/webhook.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ export const jsmWebhookTrigger: TriggerConfig = {
4747
description: 'Comment ID',
4848
},
4949
body: {
50-
type: 'string',
51-
description: 'Comment text/body',
50+
type: 'json',
51+
description:
52+
'Comment body in Atlassian Document Format (ADF). On Jira Server this may be a plain string.',
5253
},
5354
author: {
5455
displayName: {

apps/sim/triggers/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
export interface TriggerOutput {
22
type?: string
3-
description?: string
3+
description?: string | TriggerOutput
44
[key: string]: TriggerOutput | string | undefined
55
}
66

0 commit comments

Comments
 (0)