@automagik/omni 2.260908.1 → 2.260908.3
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/db/drizzle/0060_webhook_source_strict_schemas.sql +24 -0
- package/db/drizzle/meta/_journal.json +7 -0
- package/dist/commands/webhooks.d.ts.map +1 -1
- package/dist/index.js +22 -11
- package/dist/sdk/client.d.ts +7 -0
- package/dist/sdk/client.d.ts.map +1 -1
- package/dist/sdk/types.generated.d.ts +106 -18
- package/dist/sdk/types.generated.d.ts.map +1 -1
- package/dist/server/index.js +76 -27
- package/package.json +1 -1
|
@@ -1634,7 +1634,7 @@ export interface paths {
|
|
|
1634
1634
|
put?: never;
|
|
1635
1635
|
/**
|
|
1636
1636
|
* Register or revise an event schema
|
|
1637
|
-
* @description Register a JSON Schema for an event type. Once registered, the webhook ingress and automation emit_event validate payloads of this type before publishing; invalid payloads are dead-lettered with reason schema_validation_failed. Revising an existing registration must be additive-optional (the evolution rule) — an incompatible change is refused with 409 and must ship as a new versioned event type (e.g. custom.github.push.v2).
|
|
1637
|
+
* @description Register a JSON Schema for an event type. Once registered, the webhook ingress and automation emit_event validate payloads of this type before publishing; invalid payloads are dead-lettered with reason schema_validation_failed. Unregistered types pass through unless the emitter is strict (webhook_sources.strictSchemas, or OMNI_STRICT_EMIT_EVENT_SCHEMAS for emit_event), in which case they are dead-lettered with reason schema_not_registered. Revising an existing registration must be additive-optional (the evolution rule) — an incompatible change is refused with 409 and must ship as a new versioned event type (e.g. custom.github.push.v2).
|
|
1638
1638
|
*/
|
|
1639
1639
|
post: operations["registerEventSchema"];
|
|
1640
1640
|
delete?: never;
|
|
@@ -4177,12 +4177,20 @@ export interface components {
|
|
|
4177
4177
|
};
|
|
4178
4178
|
WebhookEventTypeMapping: {
|
|
4179
4179
|
/**
|
|
4180
|
-
* @description
|
|
4180
|
+
* @description Read the semantic event name from a request header
|
|
4181
4181
|
* @enum {string}
|
|
4182
4182
|
*/
|
|
4183
4183
|
source: "header";
|
|
4184
4184
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
4185
4185
|
header: string;
|
|
4186
|
+
} | {
|
|
4187
|
+
/**
|
|
4188
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
4189
|
+
* @enum {string}
|
|
4190
|
+
*/
|
|
4191
|
+
source: "body";
|
|
4192
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
4193
|
+
path: string;
|
|
4186
4194
|
};
|
|
4187
4195
|
WebhookSource: {
|
|
4188
4196
|
/**
|
|
@@ -4213,19 +4221,29 @@ export interface components {
|
|
|
4213
4221
|
/** @description Semantic event-type extraction: a mapped source emits custom.{source}.{event} instead of the collapsed custom.webhook.{source} */
|
|
4214
4222
|
eventTypeMapping: {
|
|
4215
4223
|
/**
|
|
4216
|
-
* @description
|
|
4224
|
+
* @description Read the semantic event name from a request header
|
|
4217
4225
|
* @enum {string}
|
|
4218
4226
|
*/
|
|
4219
4227
|
source: "header";
|
|
4220
4228
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
4221
4229
|
header: string;
|
|
4222
|
-
} |
|
|
4230
|
+
} | {
|
|
4231
|
+
/**
|
|
4232
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
4233
|
+
* @enum {string}
|
|
4234
|
+
*/
|
|
4235
|
+
source: "body";
|
|
4236
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
4237
|
+
path: string;
|
|
4238
|
+
} | unknown;
|
|
4223
4239
|
/** @description Whether a signature secret is stored (secret is write-only) */
|
|
4224
4240
|
hasSignatureSecret: boolean;
|
|
4225
4241
|
/** @description Idempotency key derivation template */
|
|
4226
4242
|
idempotencyKeyTemplate: string;
|
|
4227
4243
|
/** @description Redeliveries acked without creating a second event */
|
|
4228
4244
|
totalDuplicates: number;
|
|
4245
|
+
/** @description Strict schema mode: deliveries resolving to an event type with no enabled registered schema are refused and dead-lettered with reason schema_not_registered */
|
|
4246
|
+
strictSchemas: boolean;
|
|
4229
4247
|
/** @description Whether enabled */
|
|
4230
4248
|
enabled: boolean;
|
|
4231
4249
|
/**
|
|
@@ -4305,16 +4323,26 @@ export interface components {
|
|
|
4305
4323
|
signatureSecret?: string | null;
|
|
4306
4324
|
/** @description How the delivery-identity idempotency key is derived for this source. Placeholders: {source}, {sha256(body)}, {headers.<name>}, {payload.<dot.path>}. A delivery whose key is already journaled is acked (200, duplicate: true) without creating a second event. Defaults to "{source}:{sha256(body)}". This dedupes provider REDELIVERY, not semantic identity. */
|
|
4307
4325
|
idempotencyKeyTemplate?: string;
|
|
4326
|
+
/** @description Strict schema mode (RFC #925 G1 policy switch): when true, a delivery resolving to an event type with no enabled registered schema is refused and dead-lettered with reason schema_not_registered (manual retry only) instead of passing through. Defaults to false (opt-in pass-through). Recommended true for NEW sources — they have no legacy emitters to grandfather. */
|
|
4327
|
+
strictSchemas?: boolean;
|
|
4308
4328
|
/** @description Semantic event-type extraction (e.g. header X-GitHub-Event: push emits custom.{source}.push). Null or absent keeps the legacy collapsed custom.webhook.{source} type for every delivery. */
|
|
4309
4329
|
eventTypeMapping?: {
|
|
4310
4330
|
/**
|
|
4311
|
-
* @description
|
|
4331
|
+
* @description Read the semantic event name from a request header
|
|
4312
4332
|
* @enum {string}
|
|
4313
4333
|
*/
|
|
4314
4334
|
source: "header";
|
|
4315
4335
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
4316
4336
|
header: string;
|
|
4317
|
-
} |
|
|
4337
|
+
} | {
|
|
4338
|
+
/**
|
|
4339
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
4340
|
+
* @enum {string}
|
|
4341
|
+
*/
|
|
4342
|
+
source: "body";
|
|
4343
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
4344
|
+
path: string;
|
|
4345
|
+
} | unknown;
|
|
4318
4346
|
/**
|
|
4319
4347
|
* @description Whether enabled
|
|
4320
4348
|
* @default true
|
|
@@ -11467,19 +11495,29 @@ export interface operations {
|
|
|
11467
11495
|
/** @description Semantic event-type extraction: a mapped source emits custom.{source}.{event} instead of the collapsed custom.webhook.{source} */
|
|
11468
11496
|
eventTypeMapping: {
|
|
11469
11497
|
/**
|
|
11470
|
-
* @description
|
|
11498
|
+
* @description Read the semantic event name from a request header
|
|
11471
11499
|
* @enum {string}
|
|
11472
11500
|
*/
|
|
11473
11501
|
source: "header";
|
|
11474
11502
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
11475
11503
|
header: string;
|
|
11476
|
-
} |
|
|
11504
|
+
} | {
|
|
11505
|
+
/**
|
|
11506
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
11507
|
+
* @enum {string}
|
|
11508
|
+
*/
|
|
11509
|
+
source: "body";
|
|
11510
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
11511
|
+
path: string;
|
|
11512
|
+
} | unknown;
|
|
11477
11513
|
/** @description Whether a signature secret is stored (secret is write-only) */
|
|
11478
11514
|
hasSignatureSecret: boolean;
|
|
11479
11515
|
/** @description Idempotency key derivation template */
|
|
11480
11516
|
idempotencyKeyTemplate: string;
|
|
11481
11517
|
/** @description Redeliveries acked without creating a second event */
|
|
11482
11518
|
totalDuplicates: number;
|
|
11519
|
+
/** @description Strict schema mode: deliveries resolving to an event type with no enabled registered schema are refused and dead-lettered with reason schema_not_registered */
|
|
11520
|
+
strictSchemas: boolean;
|
|
11483
11521
|
/** @description Whether enabled */
|
|
11484
11522
|
enabled: boolean;
|
|
11485
11523
|
/**
|
|
@@ -11573,16 +11611,26 @@ export interface operations {
|
|
|
11573
11611
|
signatureSecret?: string | null;
|
|
11574
11612
|
/** @description How the delivery-identity idempotency key is derived for this source. Placeholders: {source}, {sha256(body)}, {headers.<name>}, {payload.<dot.path>}. A delivery whose key is already journaled is acked (200, duplicate: true) without creating a second event. Defaults to "{source}:{sha256(body)}". This dedupes provider REDELIVERY, not semantic identity. */
|
|
11575
11613
|
idempotencyKeyTemplate?: string;
|
|
11614
|
+
/** @description Strict schema mode (RFC #925 G1 policy switch): when true, a delivery resolving to an event type with no enabled registered schema is refused and dead-lettered with reason schema_not_registered (manual retry only) instead of passing through. Defaults to false (opt-in pass-through). Recommended true for NEW sources — they have no legacy emitters to grandfather. */
|
|
11615
|
+
strictSchemas?: boolean;
|
|
11576
11616
|
/** @description Semantic event-type extraction (e.g. header X-GitHub-Event: push emits custom.{source}.push). Null or absent keeps the legacy collapsed custom.webhook.{source} type for every delivery. */
|
|
11577
11617
|
eventTypeMapping?: {
|
|
11578
11618
|
/**
|
|
11579
|
-
* @description
|
|
11619
|
+
* @description Read the semantic event name from a request header
|
|
11580
11620
|
* @enum {string}
|
|
11581
11621
|
*/
|
|
11582
11622
|
source: "header";
|
|
11583
11623
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
11584
11624
|
header: string;
|
|
11585
|
-
} |
|
|
11625
|
+
} | {
|
|
11626
|
+
/**
|
|
11627
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
11628
|
+
* @enum {string}
|
|
11629
|
+
*/
|
|
11630
|
+
source: "body";
|
|
11631
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
11632
|
+
path: string;
|
|
11633
|
+
} | unknown;
|
|
11586
11634
|
/**
|
|
11587
11635
|
* @description Whether enabled
|
|
11588
11636
|
* @default true
|
|
@@ -11640,19 +11688,29 @@ export interface operations {
|
|
|
11640
11688
|
/** @description Semantic event-type extraction: a mapped source emits custom.{source}.{event} instead of the collapsed custom.webhook.{source} */
|
|
11641
11689
|
eventTypeMapping: {
|
|
11642
11690
|
/**
|
|
11643
|
-
* @description
|
|
11691
|
+
* @description Read the semantic event name from a request header
|
|
11644
11692
|
* @enum {string}
|
|
11645
11693
|
*/
|
|
11646
11694
|
source: "header";
|
|
11647
11695
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
11648
11696
|
header: string;
|
|
11649
|
-
} |
|
|
11697
|
+
} | {
|
|
11698
|
+
/**
|
|
11699
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
11700
|
+
* @enum {string}
|
|
11701
|
+
*/
|
|
11702
|
+
source: "body";
|
|
11703
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
11704
|
+
path: string;
|
|
11705
|
+
} | unknown;
|
|
11650
11706
|
/** @description Whether a signature secret is stored (secret is write-only) */
|
|
11651
11707
|
hasSignatureSecret: boolean;
|
|
11652
11708
|
/** @description Idempotency key derivation template */
|
|
11653
11709
|
idempotencyKeyTemplate: string;
|
|
11654
11710
|
/** @description Redeliveries acked without creating a second event */
|
|
11655
11711
|
totalDuplicates: number;
|
|
11712
|
+
/** @description Strict schema mode: deliveries resolving to an event type with no enabled registered schema are refused and dead-lettered with reason schema_not_registered */
|
|
11713
|
+
strictSchemas: boolean;
|
|
11656
11714
|
/** @description Whether enabled */
|
|
11657
11715
|
enabled: boolean;
|
|
11658
11716
|
/**
|
|
@@ -11780,19 +11838,29 @@ export interface operations {
|
|
|
11780
11838
|
/** @description Semantic event-type extraction: a mapped source emits custom.{source}.{event} instead of the collapsed custom.webhook.{source} */
|
|
11781
11839
|
eventTypeMapping: {
|
|
11782
11840
|
/**
|
|
11783
|
-
* @description
|
|
11841
|
+
* @description Read the semantic event name from a request header
|
|
11784
11842
|
* @enum {string}
|
|
11785
11843
|
*/
|
|
11786
11844
|
source: "header";
|
|
11787
11845
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
11788
11846
|
header: string;
|
|
11789
|
-
} |
|
|
11847
|
+
} | {
|
|
11848
|
+
/**
|
|
11849
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
11850
|
+
* @enum {string}
|
|
11851
|
+
*/
|
|
11852
|
+
source: "body";
|
|
11853
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
11854
|
+
path: string;
|
|
11855
|
+
} | unknown;
|
|
11790
11856
|
/** @description Whether a signature secret is stored (secret is write-only) */
|
|
11791
11857
|
hasSignatureSecret: boolean;
|
|
11792
11858
|
/** @description Idempotency key derivation template */
|
|
11793
11859
|
idempotencyKeyTemplate: string;
|
|
11794
11860
|
/** @description Redeliveries acked without creating a second event */
|
|
11795
11861
|
totalDuplicates: number;
|
|
11862
|
+
/** @description Strict schema mode: deliveries resolving to an event type with no enabled registered schema are refused and dead-lettered with reason schema_not_registered */
|
|
11863
|
+
strictSchemas: boolean;
|
|
11796
11864
|
/** @description Whether enabled */
|
|
11797
11865
|
enabled: boolean;
|
|
11798
11866
|
/**
|
|
@@ -11957,16 +12025,26 @@ export interface operations {
|
|
|
11957
12025
|
signatureSecret?: string | null;
|
|
11958
12026
|
/** @description How the delivery-identity idempotency key is derived for this source. Placeholders: {source}, {sha256(body)}, {headers.<name>}, {payload.<dot.path>}. A delivery whose key is already journaled is acked (200, duplicate: true) without creating a second event. Defaults to "{source}:{sha256(body)}". This dedupes provider REDELIVERY, not semantic identity. */
|
|
11959
12027
|
idempotencyKeyTemplate?: string;
|
|
12028
|
+
/** @description Strict schema mode (RFC #925 G1 policy switch): when true, a delivery resolving to an event type with no enabled registered schema is refused and dead-lettered with reason schema_not_registered (manual retry only) instead of passing through. Defaults to false (opt-in pass-through). Recommended true for NEW sources — they have no legacy emitters to grandfather. */
|
|
12029
|
+
strictSchemas?: boolean;
|
|
11960
12030
|
/** @description Semantic event-type extraction (e.g. header X-GitHub-Event: push emits custom.{source}.push). Null or absent keeps the legacy collapsed custom.webhook.{source} type for every delivery. */
|
|
11961
12031
|
eventTypeMapping?: {
|
|
11962
12032
|
/**
|
|
11963
|
-
* @description
|
|
12033
|
+
* @description Read the semantic event name from a request header
|
|
11964
12034
|
* @enum {string}
|
|
11965
12035
|
*/
|
|
11966
12036
|
source: "header";
|
|
11967
12037
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
11968
12038
|
header: string;
|
|
11969
|
-
} |
|
|
12039
|
+
} | {
|
|
12040
|
+
/**
|
|
12041
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
12042
|
+
* @enum {string}
|
|
12043
|
+
*/
|
|
12044
|
+
source: "body";
|
|
12045
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
12046
|
+
path: string;
|
|
12047
|
+
} | unknown;
|
|
11970
12048
|
/**
|
|
11971
12049
|
* @description Whether enabled
|
|
11972
12050
|
* @default true
|
|
@@ -12024,19 +12102,29 @@ export interface operations {
|
|
|
12024
12102
|
/** @description Semantic event-type extraction: a mapped source emits custom.{source}.{event} instead of the collapsed custom.webhook.{source} */
|
|
12025
12103
|
eventTypeMapping: {
|
|
12026
12104
|
/**
|
|
12027
|
-
* @description
|
|
12105
|
+
* @description Read the semantic event name from a request header
|
|
12028
12106
|
* @enum {string}
|
|
12029
12107
|
*/
|
|
12030
12108
|
source: "header";
|
|
12031
12109
|
/** @description Header carrying the semantic event name (e.g. X-GitHub-Event). 1-200 characters */
|
|
12032
12110
|
header: string;
|
|
12033
|
-
} |
|
|
12111
|
+
} | {
|
|
12112
|
+
/**
|
|
12113
|
+
* @description Read the semantic event name from the JSON body (body-first providers like ClickUp, #984)
|
|
12114
|
+
* @enum {string}
|
|
12115
|
+
*/
|
|
12116
|
+
source: "body";
|
|
12117
|
+
/** @description Dot-path to the event name in the payload (e.g. "event"); numeric segments index arrays. 1-200 characters */
|
|
12118
|
+
path: string;
|
|
12119
|
+
} | unknown;
|
|
12034
12120
|
/** @description Whether a signature secret is stored (secret is write-only) */
|
|
12035
12121
|
hasSignatureSecret: boolean;
|
|
12036
12122
|
/** @description Idempotency key derivation template */
|
|
12037
12123
|
idempotencyKeyTemplate: string;
|
|
12038
12124
|
/** @description Redeliveries acked without creating a second event */
|
|
12039
12125
|
totalDuplicates: number;
|
|
12126
|
+
/** @description Strict schema mode: deliveries resolving to an event type with no enabled registered schema are refused and dead-lettered with reason schema_not_registered */
|
|
12127
|
+
strictSchemas: boolean;
|
|
12040
12128
|
/** @description Whether enabled */
|
|
12041
12129
|
enabled: boolean;
|
|
12042
12130
|
/**
|