Files
simstudioai--sim/apps/sim/triggers/jsm/webhook.ts
T
wehub-resource-sync d25d482dc2
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:20:55 +08:00

88 lines
2.2 KiB
TypeScript

import { JiraServiceManagementIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildJsmExtraFields,
buildJsmRequestOutputs,
jsmSetupInstructions,
jsmTriggerOptions,
} from '@/triggers/jsm/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Generic JSM Webhook Trigger
*
* Captures all Jira Service Management webhook events.
*/
export const jsmWebhookTrigger: TriggerConfig = {
id: 'jsm_webhook',
name: 'JSM Webhook (All Events)',
provider: 'jsm',
description: 'Trigger workflow on any Jira Service Management webhook event',
version: '1.0.0',
icon: JiraServiceManagementIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'jsm_webhook',
triggerOptions: jsmTriggerOptions,
setupInstructions: jsmSetupInstructions('All Events'),
extraFields: buildJsmExtraFields('jsm_webhook'),
}),
outputs: {
...buildJsmRequestOutputs(),
changelog: {
id: {
type: 'string',
description: 'Changelog ID',
},
items: {
type: 'array',
description:
'Array of changed items. Each item contains field, fieldtype, from, fromString, to, toString',
},
},
comment: {
id: {
type: 'string',
description: 'Comment ID',
},
body: {
type: 'json',
description:
'Comment body in Atlassian Document Format (ADF). On Jira Server this may be a plain string.',
},
author: {
displayName: {
type: 'string',
description: 'Comment author display name',
},
accountId: {
type: 'string',
description: 'Comment author account ID',
},
emailAddress: {
type: 'string',
description: 'Comment author email address',
},
},
created: {
type: 'string',
description: 'Comment creation date (ISO format)',
},
updated: {
type: 'string',
description: 'Comment last updated date (ISO format)',
},
},
},
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Hub-Signature': 'sha256=...',
'X-Atlassian-Webhook-Identifier': 'unique-webhook-id',
},
},
}