chore: import upstream snapshot with attribution
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

This commit is contained in:
wehub-resource-sync
2026-07-13 13:20:55 +08:00
commit d25d482dc2
13754 changed files with 4996608 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
export { linqMessageDeliveredTrigger } from './message_delivered'
export { linqMessageFailedTrigger } from './message_failed'
export { linqMessageReadTrigger } from './message_read'
export { linqMessageReceivedTrigger } from './message_received'
export { linqReactionAddedTrigger } from './reaction_added'
export { linqWebhookTrigger } from './webhook'
@@ -0,0 +1,38 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Linq Message Delivered Trigger
* Fires when a sent message is confirmed delivered to the recipient.
*/
export const linqMessageDeliveredTrigger: TriggerConfig = {
id: 'linq_message_delivered',
name: 'Linq Message Delivered',
provider: 'linq',
description: 'Trigger workflow when a message is delivered',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_message_delivered',
triggerOptions: linqTriggerOptions,
setupInstructions: linqSetupInstructions('message.delivered'),
extraFields: buildLinqExtraFields('linq_message_delivered'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}
+38
View File
@@ -0,0 +1,38 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Linq Message Failed Trigger
* Fires when a sent message fails to deliver.
*/
export const linqMessageFailedTrigger: TriggerConfig = {
id: 'linq_message_failed',
name: 'Linq Message Failed',
provider: 'linq',
description: 'Trigger workflow when a message fails to deliver',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_message_failed',
triggerOptions: linqTriggerOptions,
setupInstructions: linqSetupInstructions('message.failed'),
extraFields: buildLinqExtraFields('linq_message_failed'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}
+38
View File
@@ -0,0 +1,38 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Linq Message Read Trigger
* Fires when a recipient reads a sent message (1:1 iMessage/RCS).
*/
export const linqMessageReadTrigger: TriggerConfig = {
id: 'linq_message_read',
name: 'Linq Message Read',
provider: 'linq',
description: 'Trigger workflow when a message is read',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_message_read',
triggerOptions: linqTriggerOptions,
setupInstructions: linqSetupInstructions('message.read'),
extraFields: buildLinqExtraFields('linq_message_read'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}
@@ -0,0 +1,39 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Linq Message Received Trigger
* Fires when an inbound iMessage, SMS, or RCS message arrives.
*/
export const linqMessageReceivedTrigger: TriggerConfig = {
id: 'linq_message_received',
name: 'Linq Message Received',
provider: 'linq',
description: 'Trigger workflow when an inbound message is received',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_message_received',
triggerOptions: linqTriggerOptions,
includeDropdown: true,
setupInstructions: linqSetupInstructions('message.received'),
extraFields: buildLinqExtraFields('linq_message_received'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}
+38
View File
@@ -0,0 +1,38 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Linq Reaction Added Trigger
* Fires when a tapback or custom reaction is added to a message.
*/
export const linqReactionAddedTrigger: TriggerConfig = {
id: 'linq_reaction_added',
name: 'Linq Reaction Added',
provider: 'linq',
description: 'Trigger workflow when a reaction is added to a message',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_reaction_added',
triggerOptions: linqTriggerOptions,
setupInstructions: linqSetupInstructions('reaction.added'),
extraFields: buildLinqExtraFields('linq_reaction_added'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}
+143
View File
@@ -0,0 +1,143 @@
import type { SubBlockConfig } from '@/blocks/types'
import type { TriggerOutput } from '@/triggers/types'
/**
* Maps Sim Linq trigger IDs to a single Linq webhook event type.
* Kept in sync with subscription registration in the `linq` webhook provider.
*/
export const LINQ_TRIGGER_TO_EVENT_TYPE: Record<string, string> = {
linq_message_received: 'message.received',
linq_message_delivered: 'message.delivered',
linq_message_failed: 'message.failed',
linq_message_read: 'message.read',
linq_reaction_added: 'reaction.added',
}
/**
* Every Linq webhook event type, registered for the catch-all `linq_webhook` trigger.
* Mirrors the Linq OpenAPI `WebhookEventType` enum verbatim (all 27 values).
*/
export const LINQ_ALL_WEBHOOK_EVENT_TYPES: string[] = [
'message.sent',
'message.received',
'message.read',
'message.delivered',
'message.failed',
'message.edited',
'reaction.added',
'reaction.removed',
'participant.added',
'participant.removed',
'chat.created',
'chat.group_name_updated',
'chat.group_icon_updated',
'chat.group_name_update_failed',
'chat.group_icon_update_failed',
'chat.typing_indicator.started',
'chat.typing_indicator.stopped',
'phone_number.status_updated',
'call.initiated',
'call.ringing',
'call.answered',
'call.ended',
'call.failed',
'call.declined',
'call.no_answer',
'location.sharing.started',
'location.sharing.stopped',
]
/** Shared trigger dropdown options for all Linq triggers. */
export const linqTriggerOptions = [
{ label: 'Message Received', id: 'linq_message_received' },
{ label: 'Message Delivered', id: 'linq_message_delivered' },
{ label: 'Message Failed', id: 'linq_message_failed' },
{ label: 'Message Read', id: 'linq_message_read' },
{ label: 'Reaction Added', id: 'linq_reaction_added' },
{ label: 'Webhook (All Events)', id: 'linq_webhook' },
]
/**
* Generates setup instructions for Linq webhooks.
* The subscription is created and deleted automatically via the Linq API.
*/
export function linqSetupInstructions(eventType: string): string {
const instructions = [
'Enter your Linq API Key above.',
'You can find your API key in the <a href="https://docs.linqapp.com/" target="_blank" rel="noopener noreferrer">Linq partner dashboard</a>.',
'Optionally restrict delivery to specific phone numbers (E.164, comma-separated). Leave empty to receive events from all numbers.',
`Click <strong>"Save Configuration"</strong> to automatically create the webhook subscription in Linq for <strong>${eventType}</strong>.`,
'The subscription is automatically deleted when you remove this trigger.',
]
return instructions
.map(
(instruction, index) =>
`<div class="mb-3"><strong>${index + 1}.</strong> ${instruction}</div>`
)
.join('')
}
/**
* Builds Linq-specific extra fields for the trigger UI.
* Includes the required API key and an optional phone-number filter.
* Use with the generic `buildTriggerSubBlocks` from `@/triggers`.
*/
export function buildLinqExtraFields(triggerId: string): SubBlockConfig[] {
return [
{
id: 'triggerApiKey',
title: 'API Key',
type: 'short-input',
placeholder: 'Enter your Linq API key',
description: 'Required to create the webhook subscription in Linq.',
password: true,
paramVisibility: 'user-only',
required: true,
mode: 'trigger',
condition: { field: 'selectedTriggerId', value: triggerId },
},
{
id: 'triggerPhoneNumbers',
title: 'Phone Numbers (Optional)',
type: 'short-input',
placeholder: 'Leave empty for all numbers (e.g. +15551234567, +15557654321)',
description: 'Comma-separated E.164 numbers to restrict which numbers deliver events.',
mode: 'trigger',
condition: { field: 'selectedTriggerId', value: triggerId },
},
]
}
/**
* Outputs exposed by every Linq trigger.
*
* Only the delivery-envelope fields are documented in the Linq OpenAPI spec; the
* per-event `data` shape is not enumerated, so it is surfaced as a JSON passthrough
* rather than fabricating typed sub-fields.
*/
export function buildLinqOutputs(): Record<string, TriggerOutput> {
return {
eventType: {
type: 'string',
description: 'Event type (e.g. message.received, message.delivered, reaction.added)',
},
eventId: {
type: 'string',
description: 'Unique event identifier used for deduplication',
},
createdAt: {
type: 'string',
description: 'ISO 8601 timestamp of when the event occurred',
},
webhookVersion: {
type: 'string',
description: 'Payload schema version of the delivered event',
},
data: {
type: 'json',
description:
'Full event payload (shape varies by event type — message, reaction, chat, etc.)',
},
}
}
+40
View File
@@ -0,0 +1,40 @@
import { LinqIcon } from '@/components/icons'
import { buildTriggerSubBlocks } from '@/triggers'
import {
buildLinqExtraFields,
buildLinqOutputs,
linqSetupInstructions,
linqTriggerOptions,
} from '@/triggers/linq/utils'
import type { TriggerConfig } from '@/triggers/types'
/**
* Generic Linq Webhook Trigger
* Subscribes to every Linq webhook event type (messages, reactions, participants,
* chats, typing, phone number status, location sharing). Use the <code>data</code>
* output for the full payload, which varies by <code>eventType</code>.
*/
export const linqWebhookTrigger: TriggerConfig = {
id: 'linq_webhook',
name: 'Linq Webhook (All Events)',
provider: 'linq',
description: 'Trigger on any Linq webhook event (messages, reactions, chats, and more)',
version: '1.0.0',
icon: LinqIcon,
subBlocks: buildTriggerSubBlocks({
triggerId: 'linq_webhook',
triggerOptions: linqTriggerOptions,
setupInstructions: linqSetupInstructions('All Events'),
extraFields: buildLinqExtraFields('linq_webhook'),
}),
outputs: buildLinqOutputs(),
webhook: {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
},
}