Skip to content

Interface: CreateSubscriptionRequest

@kortexya/reasoninglayer


@kortexya/reasoninglayer / CreateSubscriptionRequest

Defined in: src/types/subscriptions.ts:22

Create a durable term-change subscription.

optional backoffMs?: number

Defined in: src/types/subscriptions.ts:61

Backoff between attempts, in milliseconds. Default 1000.


optional exact?: boolean

Defined in: src/types/subscriptions.ts:47

Match that exact sort instead of by subsumption. Default false.


optional features?: Record<string, string>

Defined in: src/types/subscriptions.ts:57

ANDed feature equalities, checked against the event’s rendered values.

The keys are feature names and reach the engine verbatim — they are not rewritten to snake_case.


optional kinds?: SubscriptionEventKind[]

Defined in: src/types/subscriptions.ts:49

Kinds to deliver. Omit or leave empty for all four.


optional maxRetries?: number

Defined in: src/types/subscriptions.ts:59

Retry attempts after a failed delivery. Default 3.


name: string

Defined in: src/types/subscriptions.ts:24

Human-readable name.


optional sort?: string

Defined in: src/types/subscriptions.ts:45

The sort the pattern selects. Omit to match every sort.

Matching is by SUBSUMPTION: a subscription on person also receives an employee event. Set CreateSubscriptionRequest.exact to demand name equality.


url: string

Defined in: src/types/subscriptions.ts:36

Delivery target — an http/https URL the engine POSTs each event to.

SSRF-checked: a loopback host name (localhost, *.localhost), a private, loopback or unspecified address in any spelling (0x7f.1, 2130706433, [::ffff:127.0.0.1], 0.0.0.0/8, ::) is refused with 400. Delivery checks again at connect time — a host name that resolves only to refused addresses fails every delivery — and follows no redirect: a 3xx is a failed delivery, not retried.