MCPcopy Index your code
hub / github.com/simstudioai/sim / makeSubscription

Function makeSubscription

apps/sim/lib/workspace-events/emitter.test.ts:71–91  ·  view source on GitHub ↗
(
  config: SimSubscriptionConfig,
  overrides: { subscriberWorkflowId?: string; blockId?: string } = {}
)

Source from the content-addressed store, hash-verified

69}
70
71function makeSubscription(
72 config: SimSubscriptionConfig,
73 overrides: { subscriberWorkflowId?: string; blockId?: string } = {}
74) {
75 const subscriberWorkflowId = overrides.subscriberWorkflowId ?? 'wf-subscriber'
76 return {
77 webhook: {
78 id: `wh-${subscriberWorkflowId}`,
79 workflowId: subscriberWorkflowId,
80 blockId: overrides.blockId ?? 'block-1',
81 path: 'block-1',
82 provider: 'sim',
83 providerConfig: config,
84 isActive: true,
85 },
86 workflow: {
87 id: subscriberWorkflowId,
88 name: 'Subscriber Workflow',
89 },
90 }
91}
92
93function makeLog(overrides: Partial<WorkflowExecutionLog> = {}): WorkflowExecutionLog {
94 return {

Callers 1

emitter.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected