@segmentstream/ontology 0.125.0 → 0.126.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -0
- package/dist/analyze.js +4 -17
- package/dist/index.d.ts +1 -1
- package/dist/manifest.d.ts +405 -9
- package/dist/manifest.js +29 -2
- package/dist/migrate/model.d.ts +230 -6
- package/dist/service/schemas.d.ts +56 -0
- package/dist/service/webhooks.d.ts +22 -6
- package/dist/service/webhooks.js +131 -50
- package/dist/service/workflows.js +8 -6
- package/dist/webhooks.d.ts +105 -2
- package/dist/webhooks.js +293 -2
- package/dist/workflow.d.ts +10 -5
- package/dist/workflows.d.ts +1 -1
- package/package.json +1 -1
package/dist/workflow.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { AnyConnectionHandle } from "./connection.js";
|
|
|
4
4
|
import type { ActionHandle, AnyStoredEntity } from "./entity.js";
|
|
5
5
|
import type { Edit } from "./runtime/history.js";
|
|
6
6
|
import type { Principal } from "./runtime.js";
|
|
7
|
-
import type { WebhookDelivery, WebhookSignatureScheme } from "./webhooks.js";
|
|
7
|
+
import type { WebhookDelivery, WebhookHmacFormat, WebhookSignatureScheme } from "./webhooks.js";
|
|
8
8
|
/** Marks the values `workflow(…)` returns, so that `check` can tell them from look-alikes. */
|
|
9
9
|
export declare const WorkflowTypeId: unique symbol;
|
|
10
10
|
/** Marks the values trigger constructors such as `cron(…)` and `after(…)` return. */
|
|
@@ -123,13 +123,18 @@ export interface ActionTrigger<Name extends string = string, Input = unknown> {
|
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Where a webhook's deliveries are checked: a provider's signature format and the workspace secret
|
|
126
|
-
* that holds its signing secret. Without one, the webhook's URL ends in a token.
|
|
126
|
+
* that holds its signing secret. Without one, the webhook's URL ends in a token. `stripe` and `meta`
|
|
127
|
+
* name published formats; `hmac` declares any other HMAC format with the trigger.
|
|
127
128
|
*/
|
|
128
|
-
export
|
|
129
|
-
readonly scheme: WebhookSignatureScheme
|
|
129
|
+
export type WebhookSignature = {
|
|
130
|
+
readonly scheme: Exclude<WebhookSignatureScheme, "hmac">;
|
|
130
131
|
/** A workspace secret's name, such as `stripe-webhook-signing-secret`; its value stays in the platform. */
|
|
131
132
|
readonly secret: string;
|
|
132
|
-
}
|
|
133
|
+
} | ({
|
|
134
|
+
readonly scheme: "hmac";
|
|
135
|
+
/** A workspace secret's name, such as `btcpay-webhook-secret`; its value stays in the platform. */
|
|
136
|
+
readonly secret: string;
|
|
137
|
+
} & WebhookHmacFormat);
|
|
133
138
|
/** Meta's registration handshake; the verify token is a workspace secret, separate from the app secret. */
|
|
134
139
|
export interface WebhookVerification {
|
|
135
140
|
readonly scheme: "meta";
|
package/dist/workflows.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { p } from "./property.js";
|
|
|
14
14
|
export type { AnyProperty, NumberOptions, Property, PropertyOptions, TextOptions, } from "./property.js";
|
|
15
15
|
export { after, changed, cron, cronNeverFires, cronProblem, isWorkflow, isWorkflowTrigger, MAX_ACTION_TRIGGERS, MAX_WORKFLOWS, nextCronTime, webhook, workflow, } from "./workflow.js";
|
|
16
16
|
export { MAX_WEBHOOK_BODY_BYTES, MAX_META_WEBHOOK_BODY_BYTES, MAX_WEBHOOK_HEADERS, MAX_WEBHOOKS, WEBHOOK_BASE_PATH, WEBHOOK_SIGNATURE_SCHEMES, webhookDelivery, webhookHeaderProblem, webhookPath, } from "./webhooks.js";
|
|
17
|
-
export type { WebhookDelivery, WebhookSignatureScheme } from "./webhooks.js";
|
|
17
|
+
export type { WebhookDelivery, WebhookHmacFormat, WebhookSignatureScheme, WebhookSignedPart, } from "./webhooks.js";
|
|
18
18
|
export type { ActionEvent, ActionTrigger, AfterOptions, AnyActionHandle, AnyWorkflow, ChangedBounds, CronOptions, CronProblem, CronTrigger, TriggerFunction, TriggerRecord, WebhookOptions, WebhookSignature, WebhookVerification, WebhookTrigger, Workflow, WorkflowFunction, WorkflowOptions, WorkflowRunContext, WorkflowTrigger, } from "./workflow.js";
|
|
19
19
|
export { run, WORKFLOW_BASE_PATH, WorkflowStepRequired } from "./workflow-runtime.js";
|
|
20
20
|
export { recoverWorkflowStarts, StartRecoveryWorkflowRequired } from "./start-recovery.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@segmentstream/ontology",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.126.0",
|
|
4
4
|
"description": "Define a SegmentStream workspace app's ontology: entities, relationships, roles and actions, written with Effect.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "SegmentStream",
|