@eventsdk/sdk 0.0.0-stage → 0.4.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.
Files changed (178) hide show
  1. package/LICENSE +201 -0
  2. package/NOTICE +9 -0
  3. package/dist/compatibility-http/bridge/receive.d.ts +3 -0
  4. package/dist/compatibility-http/bridge/types.d.ts +44 -0
  5. package/dist/compatibility-http/index.d.ts +4 -0
  6. package/dist/compatibility-http/index.js +1 -0
  7. package/dist/compatibility-http/policy/validate-policy.d.ts +3 -0
  8. package/dist/conformance/admission/harness.d.ts +20 -0
  9. package/dist/conformance/admission/run-suite.d.ts +2 -0
  10. package/dist/conformance/consumer/harness.d.ts +24 -0
  11. package/dist/conformance/consumer/run-apply-suite.d.ts +2 -0
  12. package/dist/conformance/consumer/run-worker-suite.d.ts +2 -0
  13. package/dist/conformance/event-link/harness.d.ts +13 -0
  14. package/dist/conformance/event-link/run-suite.d.ts +2 -0
  15. package/dist/conformance/fanout/harness.d.ts +39 -0
  16. package/dist/conformance/fanout/run-suite.d.ts +2 -0
  17. package/dist/conformance/gap/harness.d.ts +19 -0
  18. package/dist/conformance/gap/run-suite.d.ts +2 -0
  19. package/dist/conformance/index.d.ts +22 -0
  20. package/dist/conformance/index.js +1 -0
  21. package/dist/conformance/producer/harness.d.ts +21 -0
  22. package/dist/conformance/producer/run-suite.d.ts +2 -0
  23. package/dist/conformance/receipt/harness.d.ts +12 -0
  24. package/dist/conformance/receipt/projection-harness.d.ts +9 -0
  25. package/dist/conformance/receipt/run-projection-suite.d.ts +2 -0
  26. package/dist/conformance/receipt/run-suite.d.ts +2 -0
  27. package/dist/conformance/reliability/checks.d.ts +4 -0
  28. package/dist/conformance/result/harness.d.ts +15 -0
  29. package/dist/conformance/result/run-suite.d.ts +2 -0
  30. package/dist/conformance/version/compatibility.d.ts +13 -0
  31. package/dist/contracts/canonical/canonical-json.d.ts +1 -0
  32. package/dist/contracts/contract-types.d.ts +34 -0
  33. package/dist/contracts/generated/business-receipt.d.ts +21 -0
  34. package/dist/contracts/generated/cloud-event-context.d.ts +32 -0
  35. package/dist/contracts/generated/cloud-event-fanout.d.ts +33 -0
  36. package/dist/contracts/generated/cloud-event.d.ts +24 -0
  37. package/dist/contracts/generated/event-link-authorization-request.d.ts +22 -0
  38. package/dist/contracts/generated/event-link-proposal.d.ts +27 -0
  39. package/dist/contracts/generated/event-link-token-request.d.ts +7 -0
  40. package/dist/contracts/generated/event-origin-claims.d.ts +13 -0
  41. package/dist/contracts/generated/exchange-grant.d.ts +11 -0
  42. package/dist/contracts/generated/exchange-registration.d.ts +24 -0
  43. package/dist/contracts/generated/fanout-event-draft.d.ts +28 -0
  44. package/dist/contracts/generated/gap-baseline.d.ts +18 -0
  45. package/dist/contracts/generated/gap-recovery-command.d.ts +7 -0
  46. package/dist/contracts/generated/identity-context.d.ts +15 -0
  47. package/dist/contracts/generated/namespaced-reference.d.ts +4 -0
  48. package/dist/contracts/generated/native-event-catalog.d.ts +19 -0
  49. package/dist/contracts/generated/node-connection-profile.d.ts +217 -0
  50. package/dist/contracts/generated/node-worker-observation.d.ts +7 -0
  51. package/dist/contracts/generated/outbox-recovery-command.d.ts +8 -0
  52. package/dist/contracts/generated/portable-event-link-authorization-request.d.ts +98 -0
  53. package/dist/contracts/generated/portable-event-link-proposal.d.ts +121 -0
  54. package/dist/contracts/generated/portable-event-link-token-request.d.ts +34 -0
  55. package/dist/contracts/generated/portable-exchange-registration.d.ts +109 -0
  56. package/dist/contracts/generated/portable-gap-baseline.d.ts +93 -0
  57. package/dist/contracts/generated/portable-gap-recovery-command.d.ts +35 -0
  58. package/dist/contracts/generated/portable-outbox-recovery-command.d.ts +37 -0
  59. package/dist/contracts/generated/public-jwks-snapshot.d.ts +141 -0
  60. package/dist/contracts/generated/result-ref.d.ts +8 -0
  61. package/dist/contracts/generated/supported-profiles.d.ts +3 -0
  62. package/dist/contracts/generated/tenant-connection.d.ts +13 -0
  63. package/dist/contracts/generated/tenant-context.d.ts +4 -0
  64. package/dist/contracts/index.d.ts +31 -0
  65. package/dist/contracts/index.js +1 -0
  66. package/dist/contracts/validation/contract-error.d.ts +16 -0
  67. package/dist/contracts/validation/contracts.d.ts +316 -0
  68. package/dist/contracts/validation/decode-cloud-event.d.ts +2 -0
  69. package/dist/contracts/validation/event-link.d.ts +9 -0
  70. package/dist/contracts/validation/identity-context.d.ts +3 -0
  71. package/dist/contracts/validation/origin-proof-wire.d.ts +3 -0
  72. package/dist/contracts/validation/strict-json.d.ts +1 -0
  73. package/dist/core/inbox/accept-delivery.d.ts +26 -0
  74. package/dist/core/inbox/apply-delivery.d.ts +29 -0
  75. package/dist/core/inbox/domain-apply-result.d.ts +13 -0
  76. package/dist/core/inbox/inbox-worker.d.ts +2 -0
  77. package/dist/core/inbox/read-result.d.ts +12 -0
  78. package/dist/core/inbox/worker-types.d.ts +21 -0
  79. package/dist/core/index.d.ts +50 -0
  80. package/dist/core/index.js +1 -0
  81. package/dist/core/outbox/authorize-recovery.d.ts +75 -0
  82. package/dist/core/outbox/outbox-relay.d.ts +26 -0
  83. package/dist/core/outbox/record-event.d.ts +10 -0
  84. package/dist/core/outbox/record-fanout.d.ts +16 -0
  85. package/dist/core/ports/dead-letter.d.ts +29 -0
  86. package/dist/core/ports/inbox.d.ts +43 -0
  87. package/dist/core/ports/observability.d.ts +21 -0
  88. package/dist/core/ports/origin-refresh.d.ts +5 -0
  89. package/dist/core/ports/outbox.d.ts +46 -0
  90. package/dist/core/ports/result-reader.d.ts +14 -0
  91. package/dist/core/ports/transport.d.ts +13 -0
  92. package/dist/core/receipt/receipt-state.d.ts +3 -0
  93. package/dist/core/recovery/event-log.d.ts +28 -0
  94. package/dist/core/recovery/gap-baseline-binding.d.ts +2 -0
  95. package/dist/core/recovery/gap-recovery.d.ts +15 -0
  96. package/dist/core/recovery/receipt-identity-recovery.d.ts +8 -0
  97. package/dist/core/recovery/receipt-recovery.d.ts +14 -0
  98. package/dist/core/recovery/replay-dead-letter.d.ts +4 -0
  99. package/dist/core/runtime/dependencies.d.ts +19 -0
  100. package/dist/core/runtime/errors.d.ts +6 -0
  101. package/dist/core/runtime/event-identity.d.ts +14 -0
  102. package/dist/core/runtime/exchange-connection.d.ts +7 -0
  103. package/dist/core/runtime/fanout-identity.d.ts +6 -0
  104. package/dist/core/runtime/lease.d.ts +6 -0
  105. package/dist/core/runtime/observe-health.d.ts +3 -0
  106. package/dist/core/runtime/operation.d.ts +2 -0
  107. package/dist/core/runtime/retry.d.ts +14 -0
  108. package/dist/event-link/errors.d.ts +5 -0
  109. package/dist/event-link/exchange.d.ts +9 -0
  110. package/dist/event-link/index.d.ts +12 -0
  111. package/dist/event-link/index.js +1 -0
  112. package/dist/event-link/primitives.d.ts +10 -0
  113. package/dist/event-link/protocol.d.ts +21 -0
  114. package/dist/event-link/receiver-ports.d.ts +42 -0
  115. package/dist/event-link/receiver.d.ts +18 -0
  116. package/dist/event-link/registration.d.ts +21 -0
  117. package/dist/event-link/sender.d.ts +22 -0
  118. package/dist/identity-contracts/authorization/authorization-port.d.ts +35 -0
  119. package/dist/identity-contracts/index.d.ts +2 -0
  120. package/dist/identity-contracts/index.js +0 -0
  121. package/dist/identity-contracts/origin/verified-origin.d.ts +28 -0
  122. package/dist/identity-verifier/index.d.ts +6 -0
  123. package/dist/identity-verifier/index.js +1 -0
  124. package/dist/identity-verifier/jwt/service-token-verifier.d.ts +15 -0
  125. package/dist/identity-verifier/origin/event-origin-policy.d.ts +36 -0
  126. package/dist/identity-verifier/origin/event-origin-signer.d.ts +6 -0
  127. package/dist/identity-verifier/origin/event-origin-verifier.d.ts +6 -0
  128. package/dist/index.d.ts +24 -0
  129. package/dist/index.js +22 -0
  130. package/dist/node-config/configuration-error.d.ts +4 -0
  131. package/dist/node-config/diagnostics/check-configuration.d.ts +40 -0
  132. package/dist/node-config/identity/load-identity.d.ts +14 -0
  133. package/dist/node-config/identity/local-recovery-origin.d.ts +3 -0
  134. package/dist/node-config/identity/public-identity.d.ts +87 -0
  135. package/dist/node-config/identity/public-snapshot.d.ts +2 -0
  136. package/dist/node-config/identity/signing-identity.d.ts +5 -0
  137. package/dist/node-config/index.d.ts +12 -0
  138. package/dist/node-config/index.js +1 -0
  139. package/dist/node-config/main.js +3 -0
  140. package/dist/node-config/operations/export-own-public.d.ts +8 -0
  141. package/dist/node-config/operations/refresh-trust.d.ts +10 -0
  142. package/dist/node-config/profile/load-profile.d.ts +6 -0
  143. package/dist/node-config/profile/validate-profile.d.ts +2 -0
  144. package/dist/node-worker/index.d.ts +3 -0
  145. package/dist/node-worker/index.js +1 -0
  146. package/dist/node-worker/lifecycle.d.ts +19 -0
  147. package/dist/node-worker/route-scheduler.d.ts +17 -0
  148. package/dist/node-worker/session.d.ts +15 -0
  149. package/dist/provisioner/application/apply.d.ts +11 -0
  150. package/dist/provisioner/application/ports.d.ts +44 -0
  151. package/dist/provisioner/application/verify.d.ts +7 -0
  152. package/dist/provisioner/cli/arguments.d.ts +9 -0
  153. package/dist/provisioner/cli/live-command.d.ts +7 -0
  154. package/dist/provisioner/cli/main.js +2 -0
  155. package/dist/provisioner/cli/run.d.ts +2 -0
  156. package/dist/provisioner/cli/session-types.d.ts +26 -0
  157. package/dist/provisioner/conformance/policy.d.ts +9 -0
  158. package/dist/provisioner/index.d.ts +17 -0
  159. package/dist/provisioner/index.js +1 -0
  160. package/dist/provisioner/manifest/types.d.ts +55 -0
  161. package/dist/provisioner/manifest/validate.d.ts +3 -0
  162. package/dist/provisioner/nats/inspector.d.ts +13 -0
  163. package/dist/provisioner/nats/types.d.ts +38 -0
  164. package/dist/provisioner/nats/writer-types.d.ts +11 -0
  165. package/dist/provisioner/nats/writer.d.ts +18 -0
  166. package/dist/provisioner/planning/digest.d.ts +1 -0
  167. package/dist/provisioner/planning/plan.d.ts +18 -0
  168. package/dist/transport-nats/connection/delivery-session.d.ts +10 -0
  169. package/dist/transport-nats/connection/verified-connection.d.ts +12 -0
  170. package/dist/transport-nats/consume/delivery-handler.d.ts +34 -0
  171. package/dist/transport-nats/consume/nats-consumer.d.ts +18 -0
  172. package/dist/transport-nats/index.d.ts +12 -0
  173. package/dist/transport-nats/index.js +3 -0
  174. package/dist/transport-nats/publish/nats-publisher.d.ts +24 -0
  175. package/dist/transport-nats/transport-error.d.ts +5 -0
  176. package/licenses/NATS-LICENSE +201 -0
  177. package/package.json +79 -3
  178. package/README.md +0 -3
@@ -0,0 +1,13 @@
1
+ export interface VersionSet {
2
+ readonly sdkVersion: string;
3
+ readonly profile: string;
4
+ readonly cloudEvents: string;
5
+ readonly schemaMajor: number;
6
+ }
7
+ export type Compatibility = {
8
+ readonly compatible: true;
9
+ } | {
10
+ readonly compatible: false;
11
+ readonly reason: 'UNSUPPORTED_VERSION' | 'PROFILE_MISMATCH';
12
+ };
13
+ export declare function checkCompatibility(producer: VersionSet, consumer: VersionSet): Compatibility;
@@ -0,0 +1 @@
1
+ export declare function canonicalJson(value: unknown): string;
@@ -0,0 +1,34 @@
1
+ import type { CloudEventFanout } from './generated/cloud-event-fanout.js';
2
+ import type { FanoutEventDraft as GeneratedFanoutDraft } from './generated/fanout-event-draft.js';
3
+ import type { CloudEventContext as GeneratedContextEvent } from './generated/cloud-event-context.js';
4
+ import type { NamespacedReference as GeneratedReference } from './generated/namespaced-reference.js';
5
+ import type { IdentityContext as GeneratedIdentityContext } from './generated/identity-context.js';
6
+ import type { CloudEvent as GeneratedEvent } from './generated/cloud-event.js';
7
+ import type { BusinessReceipt as GeneratedReceipt } from './generated/business-receipt.js';
8
+ import type { ResultRef as GeneratedResult } from './generated/result-ref.js';
9
+ import type { TenantContext as GeneratedContext } from './generated/tenant-context.js';
10
+ import type { TenantConnection as GeneratedConnection } from './generated/tenant-connection.js';
11
+ import type { ExchangeGrant as GeneratedGrant } from './generated/exchange-grant.js';
12
+ type Immutable<T> = T extends readonly (infer U)[] ? readonly Immutable<U>[] : T extends object ? {
13
+ readonly [Key in keyof T]: Immutable<T[Key]>;
14
+ } : T;
15
+ export type JsonValue = null | boolean | number | string | readonly JsonValue[] | {
16
+ readonly [key: string]: JsonValue;
17
+ };
18
+ export type CloudEventV1 = Immutable<GeneratedEvent>;
19
+ export type CloudEventV11 = Immutable<GeneratedContextEvent>;
20
+ export type CloudEventV12 = Immutable<CloudEventFanout>;
21
+ export type FanoutEventDraft = Immutable<GeneratedFanoutDraft>;
22
+ export type CloudEvent = CloudEventV1 | CloudEventV11 | CloudEventV12;
23
+ export type NamespacedReference = Immutable<GeneratedReference>;
24
+ export type IdentityContext = Immutable<GeneratedIdentityContext>;
25
+ export type BusinessReceipt = Immutable<GeneratedReceipt>;
26
+ export type ReceiptDisposition = BusinessReceipt['disposition'];
27
+ export type ResultRef = Immutable<GeneratedResult>;
28
+ export type TenantContext = Immutable<GeneratedContext>;
29
+ export type TenantConnection = Immutable<GeneratedConnection>;
30
+ export type ExchangeGrant = Immutable<GeneratedGrant>;
31
+ export type { EventOriginClaims } from './generated/event-origin-claims.js';
32
+ export type { NodeConnectionProfile } from './generated/node-connection-profile.js';
33
+ export type { PublicJwksSnapshot } from './generated/public-jwks-snapshot.js';
34
+ export type { ExchangeRegistration } from './generated/exchange-registration.js';
@@ -0,0 +1,21 @@
1
+ export interface BusinessReceipt {
2
+ receiptRef: string;
3
+ originSource: string;
4
+ originEventId: string;
5
+ deliveryRef: string;
6
+ consumerRef: string;
7
+ targetScope: string;
8
+ disposition: 'RECEIVED' | 'APPLIED' | 'REJECTED' | 'HOLD' | 'UNKNOWN';
9
+ recordedAt: string;
10
+ revision: number;
11
+ reasonCode?: string;
12
+ resultRef?: ResultRef;
13
+ }
14
+ export interface ResultRef {
15
+ sourceSystem: string;
16
+ resourceType: string;
17
+ resourceId: string;
18
+ revision: string;
19
+ digest: string;
20
+ evidenceRef?: string;
21
+ }
@@ -0,0 +1,32 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [k: string]: JsonValue;
3
+ };
4
+ export interface CloudEventContext {
5
+ specversion: '1.0';
6
+ id: string;
7
+ source: string;
8
+ type: string;
9
+ time: string;
10
+ dataschema: string;
11
+ datacontenttype: 'application/json';
12
+ profile: 'eventsdk/1.1';
13
+ kind: 'EVENT' | 'HANDOFF' | 'RECEIPT';
14
+ serviceorigin: string;
15
+ sourcetenant: string;
16
+ audience: string;
17
+ connectionref: string;
18
+ grantref: string;
19
+ grantversion: number;
20
+ correlationid: string;
21
+ causationid?: string;
22
+ subject?: string;
23
+ data: JsonValue;
24
+ orgnamespace?: string;
25
+ orgref?: string;
26
+ projectnamespace?: string;
27
+ projectref?: string;
28
+ principalnamespace?: string;
29
+ principalref?: string;
30
+ resourcenamespace?: string;
31
+ resourceref?: string;
32
+ }
@@ -0,0 +1,33 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [k: string]: JsonValue;
3
+ };
4
+ export interface CloudEventFanout {
5
+ specversion: '1.0';
6
+ id: string;
7
+ source: string;
8
+ type: string;
9
+ time: string;
10
+ dataschema: string;
11
+ datacontenttype: 'application/json';
12
+ profile: 'eventsdk/1.2';
13
+ kind: 'EVENT';
14
+ serviceorigin: string;
15
+ sourcetenant: string;
16
+ audience: string;
17
+ connectionref: string;
18
+ grantref: string;
19
+ grantversion: number;
20
+ correlationid: string;
21
+ causationid?: string;
22
+ subject?: string;
23
+ data: JsonValue;
24
+ orgnamespace?: string;
25
+ orgref?: string;
26
+ projectnamespace?: string;
27
+ projectref?: string;
28
+ principalnamespace?: string;
29
+ principalref?: string;
30
+ resourcenamespace?: string;
31
+ resourceref?: string;
32
+ deliveryid: string;
33
+ }
@@ -0,0 +1,24 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [k: string]: JsonValue;
3
+ };
4
+ export interface CloudEvent {
5
+ specversion: '1.0';
6
+ id: string;
7
+ source: string;
8
+ type: string;
9
+ time: string;
10
+ dataschema: string;
11
+ datacontenttype: 'application/json';
12
+ profile: 'eventsdk/1.0';
13
+ kind: 'EVENT' | 'HANDOFF' | 'RECEIPT';
14
+ serviceorigin: string;
15
+ sourcetenant: string;
16
+ audience: string;
17
+ connectionref: string;
18
+ grantref: string;
19
+ grantversion: number;
20
+ correlationid: string;
21
+ causationid?: string;
22
+ subject?: string;
23
+ data: JsonValue;
24
+ }
@@ -0,0 +1,22 @@
1
+ export interface EventLinkAuthorizationRequest {
2
+ profile: 'event-link/1';
3
+ response_type: 'code';
4
+ client_id: string;
5
+ redirect_uri: string;
6
+ scope: 'eventsdk.connection.authorize';
7
+ state: string;
8
+ code_challenge: string;
9
+ code_challenge_method: 'S256';
10
+ request_id: string;
11
+ source: Source;
12
+ event_type: string;
13
+ grant_ref: string;
14
+ grant_version: '1';
15
+ }
16
+ export interface Source {
17
+ source: string;
18
+ serviceRef: string;
19
+ tenantRef: string;
20
+ issuer: string;
21
+ subject: string;
22
+ }
@@ -0,0 +1,27 @@
1
+ export interface EventLinkProposal {
2
+ schemaVersion: 1;
3
+ requestId: string;
4
+ source: Source;
5
+ target: TenantContext;
6
+ grant: {
7
+ grantRef: string;
8
+ version: 1;
9
+ eventType: string;
10
+ consumerRef: string;
11
+ };
12
+ connectionRef: string;
13
+ targetDisplayName: string;
14
+ approvalRef: string;
15
+ expiresAt: string;
16
+ }
17
+ export interface Source {
18
+ source: string;
19
+ serviceRef: string;
20
+ tenantRef: string;
21
+ issuer: string;
22
+ subject: string;
23
+ }
24
+ export interface TenantContext {
25
+ serviceRef: string;
26
+ tenantRef: string;
27
+ }
@@ -0,0 +1,7 @@
1
+ export interface EventLinkTokenRequest {
2
+ grant_type: 'authorization_code';
3
+ client_id: string;
4
+ redirect_uri: string;
5
+ code: string;
6
+ code_verifier: string;
7
+ }
@@ -0,0 +1,13 @@
1
+ export interface EventOriginClaims {
2
+ schemaVersion: 1;
3
+ purpose: 'eventsdk-origin/1';
4
+ issuer: string;
5
+ subject: string;
6
+ serviceRef: string;
7
+ audience: string;
8
+ source: string;
9
+ eventId: string;
10
+ deliveryId?: string;
11
+ eventDigest: string;
12
+ signedAt: string;
13
+ }
@@ -0,0 +1,11 @@
1
+ export interface ExchangeGrant {
2
+ grantRef: string;
3
+ version: number;
4
+ connectionRef: string;
5
+ direction: 'OUTBOUND' | 'INBOUND';
6
+ status: 'ACTIVE' | 'SUSPENDED' | 'REVOKED';
7
+ eventTypes: [string, ...string[]];
8
+ audience: string;
9
+ notBefore: string;
10
+ expiresAt: string;
11
+ }
@@ -0,0 +1,24 @@
1
+ export interface ExchangeRegistration {
2
+ schemaVersion: 1;
3
+ requestId: string;
4
+ expectedRevision: number | null;
5
+ source: {
6
+ source: string;
7
+ serviceRef: string;
8
+ tenantRef: string;
9
+ issuer: string;
10
+ subject: string;
11
+ };
12
+ target: TenantContext;
13
+ grant: {
14
+ grantRef: string;
15
+ version: number;
16
+ eventType: string;
17
+ consumerRef: string;
18
+ };
19
+ status: 'ACTIVE' | 'REVOKED';
20
+ }
21
+ export interface TenantContext {
22
+ serviceRef: string;
23
+ tenantRef: string;
24
+ }
@@ -0,0 +1,28 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [k: string]: JsonValue;
3
+ };
4
+ export interface FanoutEventDraft {
5
+ specversion: '1.0';
6
+ id: string;
7
+ source: string;
8
+ type: string;
9
+ time: string;
10
+ dataschema: string;
11
+ datacontenttype: 'application/json';
12
+ profile: 'eventsdk/1.2';
13
+ kind: 'EVENT';
14
+ serviceorigin: string;
15
+ sourcetenant: string;
16
+ correlationid: string;
17
+ causationid?: string;
18
+ subject?: string;
19
+ data: JsonValue;
20
+ orgnamespace?: string;
21
+ orgref?: string;
22
+ projectnamespace?: string;
23
+ projectref?: string;
24
+ principalnamespace?: string;
25
+ principalref?: string;
26
+ resourcenamespace?: string;
27
+ resourceref?: string;
28
+ }
@@ -0,0 +1,18 @@
1
+ export interface GapBaseline {
2
+ schemaVersion: 1;
3
+ baselineRef: string;
4
+ source: string;
5
+ sourceTenant: string;
6
+ targetService: string;
7
+ targetTenant: string;
8
+ connectionRef: string;
9
+ grantRef: string;
10
+ grantVersion: number;
11
+ previousWatermark: string;
12
+ retainedThrough: string;
13
+ watermark: string;
14
+ sourceRevision: string;
15
+ createdAt: string;
16
+ readModel: 'AUTHORITATIVE_ON_DEMAND';
17
+ directoryRef: string;
18
+ }
@@ -0,0 +1,7 @@
1
+ export interface GapRecoveryCommand {
2
+ schemaVersion: 1;
3
+ requestId: string;
4
+ connectionRef: string;
5
+ expectedCursor: string;
6
+ expectedOldestAvailableCursor: string;
7
+ }
@@ -0,0 +1,15 @@
1
+ export interface IdentityContext {
2
+ sourceTenant: TenantContext;
3
+ organization?: NamespacedReference;
4
+ project?: NamespacedReference;
5
+ actorPrincipal?: NamespacedReference;
6
+ resource?: NamespacedReference;
7
+ }
8
+ export interface TenantContext {
9
+ serviceRef: string;
10
+ tenantRef: string;
11
+ }
12
+ export interface NamespacedReference {
13
+ namespace: string;
14
+ ref: string;
15
+ }
@@ -0,0 +1,4 @@
1
+ export interface NamespacedReference {
2
+ namespace: string;
3
+ ref: string;
4
+ }
@@ -0,0 +1,19 @@
1
+ export type JsonValue = null | boolean | number | string | JsonValue[] | {
2
+ [k: string]: JsonValue;
3
+ };
4
+ export interface NativeEventCatalog {
5
+ schemaVersion: 1;
6
+ serviceRef: string;
7
+ events: {
8
+ type: string;
9
+ dataschema: string;
10
+ description: string;
11
+ dataSchema: {
12
+ [k: string]: JsonValue;
13
+ };
14
+ resourceAccess: {
15
+ providerPath: string;
16
+ tools: [string, ...string[]];
17
+ };
18
+ }[];
19
+ }
@@ -0,0 +1,217 @@
1
+ export type Ref = string;
2
+ export type File = string;
3
+ export type Issuer = string;
4
+ export type Algorithm = 'RS256' | 'PS256' | 'ES256' | 'EdDSA';
5
+ export type Name = string;
6
+ export interface NodeConnectionProfile {
7
+ schemaVersion: 1;
8
+ profile: 'eventsdk-node/1';
9
+ serviceRef: Ref;
10
+ installationSource: string;
11
+ mode: 'DISABLED' | 'SHADOW' | 'ACTIVE';
12
+ broker: {
13
+ serverUrl: string;
14
+ expectedDnsName: Ref;
15
+ deploymentDomainRef: Ref;
16
+ credentialsFile: File;
17
+ authentication: 'NATS_CREDS' | 'NKEY_SEED';
18
+ caFile?: File;
19
+ timeoutMs: number;
20
+ maxPayloadBytes: number;
21
+ };
22
+ identity: {
23
+ originProof: 'eventsdk-origin/1';
24
+ signer: null | {
25
+ issuer: Issuer;
26
+ subject: Ref;
27
+ keyId: Ref;
28
+ algorithm: Algorithm;
29
+ privateKeyFile: File;
30
+ publicSnapshotFile: File;
31
+ audiences: [Ref, ...Ref[]];
32
+ jwksUri: Issuer;
33
+ };
34
+ trustedSources: {
35
+ source: string;
36
+ serviceRef: Ref;
37
+ issuer: Issuer;
38
+ subject: Ref;
39
+ audience: Ref;
40
+ algorithms: [Algorithm] | [Algorithm, Algorithm] | [Algorithm, Algorithm, Algorithm] | [Algorithm, Algorithm, Algorithm, Algorithm];
41
+ jwksUri: Issuer;
42
+ publicSnapshotFile: File;
43
+ }[];
44
+ };
45
+ publisher: null | {
46
+ subject: Ref;
47
+ expectedStream: Name;
48
+ audienceRoutes?: [
49
+ {
50
+ audience: Ref;
51
+ subject: Ref;
52
+ expectedStream: Name;
53
+ },
54
+ ...{
55
+ audience: Ref;
56
+ subject: Ref;
57
+ expectedStream: Name;
58
+ }[]
59
+ ];
60
+ };
61
+ consumer: null | {
62
+ consumerRef: Ref;
63
+ stream: Name;
64
+ durableName: Name;
65
+ subject: Ref;
66
+ batchSize: number;
67
+ fetchExpiresMs: number;
68
+ additionalBindings?: [
69
+ {
70
+ stream: Name;
71
+ durableName: Name;
72
+ subject: Ref;
73
+ }
74
+ ] | [
75
+ {
76
+ stream: Name;
77
+ durableName: Name;
78
+ subject: Ref;
79
+ },
80
+ {
81
+ stream: Name;
82
+ durableName: Name;
83
+ subject: Ref;
84
+ }
85
+ ] | [
86
+ {
87
+ stream: Name;
88
+ durableName: Name;
89
+ subject: Ref;
90
+ },
91
+ {
92
+ stream: Name;
93
+ durableName: Name;
94
+ subject: Ref;
95
+ },
96
+ {
97
+ stream: Name;
98
+ durableName: Name;
99
+ subject: Ref;
100
+ }
101
+ ] | [
102
+ {
103
+ stream: Name;
104
+ durableName: Name;
105
+ subject: Ref;
106
+ },
107
+ {
108
+ stream: Name;
109
+ durableName: Name;
110
+ subject: Ref;
111
+ },
112
+ {
113
+ stream: Name;
114
+ durableName: Name;
115
+ subject: Ref;
116
+ },
117
+ {
118
+ stream: Name;
119
+ durableName: Name;
120
+ subject: Ref;
121
+ }
122
+ ] | [
123
+ {
124
+ stream: Name;
125
+ durableName: Name;
126
+ subject: Ref;
127
+ },
128
+ {
129
+ stream: Name;
130
+ durableName: Name;
131
+ subject: Ref;
132
+ },
133
+ {
134
+ stream: Name;
135
+ durableName: Name;
136
+ subject: Ref;
137
+ },
138
+ {
139
+ stream: Name;
140
+ durableName: Name;
141
+ subject: Ref;
142
+ },
143
+ {
144
+ stream: Name;
145
+ durableName: Name;
146
+ subject: Ref;
147
+ }
148
+ ] | [
149
+ {
150
+ stream: Name;
151
+ durableName: Name;
152
+ subject: Ref;
153
+ },
154
+ {
155
+ stream: Name;
156
+ durableName: Name;
157
+ subject: Ref;
158
+ },
159
+ {
160
+ stream: Name;
161
+ durableName: Name;
162
+ subject: Ref;
163
+ },
164
+ {
165
+ stream: Name;
166
+ durableName: Name;
167
+ subject: Ref;
168
+ },
169
+ {
170
+ stream: Name;
171
+ durableName: Name;
172
+ subject: Ref;
173
+ },
174
+ {
175
+ stream: Name;
176
+ durableName: Name;
177
+ subject: Ref;
178
+ }
179
+ ] | [
180
+ {
181
+ stream: Name;
182
+ durableName: Name;
183
+ subject: Ref;
184
+ },
185
+ {
186
+ stream: Name;
187
+ durableName: Name;
188
+ subject: Ref;
189
+ },
190
+ {
191
+ stream: Name;
192
+ durableName: Name;
193
+ subject: Ref;
194
+ },
195
+ {
196
+ stream: Name;
197
+ durableName: Name;
198
+ subject: Ref;
199
+ },
200
+ {
201
+ stream: Name;
202
+ durableName: Name;
203
+ subject: Ref;
204
+ },
205
+ {
206
+ stream: Name;
207
+ durableName: Name;
208
+ subject: Ref;
209
+ },
210
+ {
211
+ stream: Name;
212
+ durableName: Name;
213
+ subject: Ref;
214
+ }
215
+ ];
216
+ };
217
+ }
@@ -0,0 +1,7 @@
1
+ export interface NodeWorkerObservation {
2
+ schemaVersion: 1;
3
+ status: 'DISABLED' | 'CONNECTED' | 'RECONNECTING' | 'STOPPED';
4
+ connected: boolean;
5
+ at: string;
6
+ revision?: string;
7
+ }
@@ -0,0 +1,8 @@
1
+ export interface OutboxRecoveryCommand {
2
+ schemaVersion: 1;
3
+ requestId: string;
4
+ source: string;
5
+ id: string;
6
+ deliveryid: string;
7
+ expectedGeneration: number;
8
+ }