@spine-event-engine/auth 2.0.0-snapshot.2

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 (57) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +112 -0
  3. package/REFERENCE.md +94 -0
  4. package/dist/gateway/dynamic-subscription-creator.d.ts +52 -0
  5. package/dist/gateway/dynamic-subscription-creator.d.ts.map +1 -0
  6. package/dist/gateway/dynamic-subscription-creator.js +71 -0
  7. package/dist/gateway/dynamic-subscription-creator.js.map +1 -0
  8. package/dist/gateway/dynamic-unary-forwarder.d.ts +130 -0
  9. package/dist/gateway/dynamic-unary-forwarder.d.ts.map +1 -0
  10. package/dist/gateway/dynamic-unary-forwarder.js +185 -0
  11. package/dist/gateway/dynamic-unary-forwarder.js.map +1 -0
  12. package/dist/gateway/index.d.ts +164 -0
  13. package/dist/gateway/index.d.ts.map +1 -0
  14. package/dist/gateway/index.js +195 -0
  15. package/dist/gateway/index.js.map +1 -0
  16. package/dist/index.d.ts +433 -0
  17. package/dist/index.d.ts.map +1 -0
  18. package/dist/index.js +56 -0
  19. package/dist/index.js.map +1 -0
  20. package/dist/native/index.d.ts +182 -0
  21. package/dist/native/index.d.ts.map +1 -0
  22. package/dist/native/index.js +463 -0
  23. package/dist/native/index.js.map +1 -0
  24. package/dist/oidc/contracts.d.ts +334 -0
  25. package/dist/oidc/contracts.d.ts.map +1 -0
  26. package/dist/oidc/contracts.js +15 -0
  27. package/dist/oidc/contracts.js.map +1 -0
  28. package/dist/oidc/index.d.ts +41 -0
  29. package/dist/oidc/index.d.ts.map +1 -0
  30. package/dist/oidc/index.js +825 -0
  31. package/dist/oidc/index.js.map +1 -0
  32. package/dist/providers/index.d.ts +154 -0
  33. package/dist/providers/index.d.ts.map +1 -0
  34. package/dist/providers/index.js +574 -0
  35. package/dist/providers/index.js.map +1 -0
  36. package/dist/request/index.d.ts +10 -0
  37. package/dist/request/index.d.ts.map +1 -0
  38. package/dist/request/index.js +81 -0
  39. package/dist/request/index.js.map +1 -0
  40. package/dist/sessions/cookies.d.ts +104 -0
  41. package/dist/sessions/cookies.d.ts.map +1 -0
  42. package/dist/sessions/cookies.js +295 -0
  43. package/dist/sessions/cookies.js.map +1 -0
  44. package/dist/sessions/opaque.d.ts +163 -0
  45. package/dist/sessions/opaque.d.ts.map +1 -0
  46. package/dist/sessions/opaque.js +268 -0
  47. package/dist/sessions/opaque.js.map +1 -0
  48. package/dist/sessions/signed.d.ts +245 -0
  49. package/dist/sessions/signed.d.ts.map +1 -0
  50. package/dist/sessions/signed.js +534 -0
  51. package/dist/sessions/signed.js.map +1 -0
  52. package/dist/subscriptions/index.d.ts +463 -0
  53. package/dist/subscriptions/index.d.ts.map +1 -0
  54. package/dist/subscriptions/index.js +814 -0
  55. package/dist/subscriptions/index.js.map +1 -0
  56. package/dist/tsconfig.tsbuildinfo +1 -0
  57. package/package.json +37 -0
@@ -0,0 +1,463 @@
1
+ import { type ActorContext } from "@spine-event-engine/proto";
2
+ import type { ILogLayer } from "loglayer";
3
+ import type { AuthorizationPolicy, Clock, ContextResolver, RequestCredential, TransportRequestContext } from "../index.js";
4
+ import type { GatewayAdmission } from "../gateway/index.js";
5
+ /**
6
+ * Owned raw Topic protobuf bytes for the `SubscriptionService.Subscribe` RPC. The gateway copies them on admission.
7
+ */
8
+ export interface SubscriptionTopicWire {
9
+ /**
10
+ * Identifies raw bytes as a subscription topic.
11
+ */
12
+ readonly kind: "subscription-topic";
13
+ /**
14
+ * Carries the owned serialized topic.
15
+ */
16
+ readonly bytes: Uint8Array;
17
+ }
18
+ /**
19
+ * Owned raw Subscription protobuf bytes for the public Activate and Cancel RPCs.
20
+ * The gateway copies them on admission.
21
+ */
22
+ export interface PublicSubscriptionWire {
23
+ /**
24
+ * Identifies raw bytes as a public subscription.
25
+ */
26
+ readonly kind: "public-subscription";
27
+ /**
28
+ * Carries the owned serialized subscription.
29
+ */
30
+ readonly bytes: Uint8Array;
31
+ }
32
+ /**
33
+ * Owned serialized public update bytes admitted by the B4 relay.
34
+ */
35
+ export interface SubscriptionUpdateWire {
36
+ /**
37
+ * Identifies raw bytes as a public update.
38
+ */
39
+ readonly kind: "subscription-update";
40
+ /**
41
+ * Carries the owned serialized update.
42
+ */
43
+ readonly bytes: Uint8Array;
44
+ }
45
+ /**
46
+ * Delivers one public update to an asynchronous stream.
47
+ * @param update Supplies the copied public update.
48
+ * @returns Completes after the update is handled.
49
+ */
50
+ export type SubscriptionUpdateSink = (update: SubscriptionUpdateWire) => Promise<void>;
51
+ /**
52
+ * Trusted-infrastructure-only raw backend envelope.
53
+ * It is never returned in a gateway result or decoded browser result.
54
+ */
55
+ export interface BackendSubscriptionEnvelope {
56
+ /**
57
+ * Identifies raw bytes as a trusted backend envelope.
58
+ */
59
+ readonly kind: "backend-subscription-envelope";
60
+ /**
61
+ * Carries the owned serialized backend envelope.
62
+ */
63
+ readonly bytes: Uint8Array;
64
+ }
65
+ /**
66
+ * Standard event-capable cancellation signal supplied to every backend callback.
67
+ */
68
+ export type SubscriptionAbortSignal = AbortSignal;
69
+ /**
70
+ * Processes a fresh canonical subscription definition copy.
71
+ *
72
+ * @param definition Supplies the copied canonical subscription definition.
73
+ * @param signal Cancels the backend effect.
74
+ * @returns Completes after the backend effect ends.
75
+ */
76
+ export type OnSubscriptionDefinition = (definition: PublicSubscriptionWire, signal: SubscriptionAbortSignal) => Promise<void>;
77
+ /**
78
+ * Opaque result of an ownership transition.
79
+ */
80
+ export interface SubscriptionBindingTransition {
81
+ /**
82
+ * Identifies the ownership transition outcome.
83
+ */
84
+ readonly kind: "activated" | "closed" | "denied";
85
+ }
86
+ /**
87
+ * Finite B3 ownership limits. Every supplied value must be a positive safe integer.
88
+ */
89
+ export interface SubscriptionGatewayLimits {
90
+ /**
91
+ * Limits admitted public request bytes.
92
+ */
93
+ readonly maxRequestBytes?: number;
94
+ /**
95
+ * Limits each ephemeral native backend envelope.
96
+ */
97
+ readonly maxBackendEnvelopeBytes?: number;
98
+ /**
99
+ * Limits queued work per binding.
100
+ */
101
+ readonly pendingOperationLimit?: number;
102
+ /**
103
+ * Limits finite backend operations and setup in milliseconds; it never limits an acknowledged active callback.
104
+ */
105
+ readonly operationTimeoutMs?: number;
106
+ /**
107
+ * Limits shutdown cleanup duration in milliseconds.
108
+ */
109
+ readonly shutdownTimeoutMs?: number;
110
+ }
111
+ /**
112
+ * Trusted infrastructure store for logical subscription ownership. Results expose only transition state;
113
+ * canonical definitions enter at creation and reach only the gateway-supplied transition callback as copies.
114
+ */
115
+ export interface SubscriptionBindings {
116
+ /**
117
+ * Creates and retains an inactive canonical subscription from a trusted topic.
118
+ * @param input Supplies the rewritten trusted topic and expiry.
119
+ * @returns Returns the retained public subscription wire.
120
+ */
121
+ create(input: {
122
+ readonly topic: SubscriptionTopicWire;
123
+ readonly whenExpires?: number;
124
+ }): Promise<PublicSubscriptionWire>;
125
+ /**
126
+ * Activates an owned logical binding.
127
+ * @param input Supplies trusted context and the definition callback.
128
+ * @returns Returns the ownership transition outcome.
129
+ */
130
+ activate(input: {
131
+ readonly id: string;
132
+ readonly context: ActorContext;
133
+ readonly nowMs: number;
134
+ readonly onDefinition: OnSubscriptionDefinition;
135
+ /**
136
+ * Active-effect cancellation signal. A pre-aborted signal starts no backend work.
137
+ */
138
+ readonly signal: AbortSignal;
139
+ }): Promise<SubscriptionBindingTransition>;
140
+ /**
141
+ * Cancels an owned logical binding.
142
+ * @param input Supplies ownership facts and the definition callback.
143
+ * @returns Returns the ownership transition outcome.
144
+ */
145
+ cancel(input: {
146
+ readonly id: string;
147
+ readonly context: ActorContext;
148
+ readonly nowMs: number;
149
+ readonly onDefinition: OnSubscriptionDefinition;
150
+ }): Promise<SubscriptionBindingTransition>;
151
+ /**
152
+ * Removes bindings expired at the supplied time.
153
+ * @param nowMs Supplies the current time in milliseconds.
154
+ * @returns Completes after expired bindings are removed.
155
+ */
156
+ purgeExpired(nowMs: number): Promise<void>;
157
+ /**
158
+ * Restores active durable definitions after a Gateway restart when supported.
159
+ *
160
+ * Implementations without durable storage may omit this operation.
161
+ *
162
+ * @param input Supplies the restart time and logical-definition callback.
163
+ * @returns Completes after the bounded recovery pass.
164
+ */
165
+ recoverActive?(input: {
166
+ readonly nowMs: number;
167
+ /**
168
+ * Restores one definition and its expiry.
169
+ *
170
+ * @param definition Supplies the retained public subscription.
171
+ * @param whenExpires Supplies its expiry in epoch milliseconds.
172
+ * @returns Completes after the definition is restored.
173
+ */
174
+ readonly onDefinition: (definition: PublicSubscriptionWire, whenExpires: number) => Promise<void>;
175
+ }): Promise<void>;
176
+ /**
177
+ * Closes all retained bindings.
178
+ * @returns Completes after retained bindings close.
179
+ */
180
+ close(): Promise<void>;
181
+ }
182
+ /**
183
+ * In-memory reference store. It serializes transitions, copies all ingress/egress bytes, and makes close terminal.
184
+ */
185
+ export declare class InMemorySubscriptionBindings implements SubscriptionBindings {
186
+ #private;
187
+ /**
188
+ * Creates the in-memory binding store.
189
+ * @param options Supplies identifiers, process limits, and disposal behavior.
190
+ */
191
+ constructor(options: {
192
+ readonly nextId: () => string;
193
+ readonly limits?: SubscriptionGatewayLimits;
194
+ readonly dispose: OnSubscriptionDefinition;
195
+ });
196
+ /**
197
+ * Returns the number of retained private bindings for lifecycle observability.
198
+ * @returns Returns the retained binding count.
199
+ */
200
+ get size(): number;
201
+ /**
202
+ * Removes already-expired logical bindings without a background timer.
203
+ * @param nowMs Supplies the current time in milliseconds.
204
+ * @returns Completes after expired envelopes are removed.
205
+ */
206
+ purgeExpired(nowMs: number): Promise<void>;
207
+ /**
208
+ * Closes the store by aborting work and waiting for bounded cleanup.
209
+ *
210
+ * Cooperative callbacks allow cleanup to complete before this method resolves.
211
+ * Non-cooperative raw callbacks cause an `AggregateError` after
212
+ * `shutdownTimeoutMs`; their exactly-once disposal remains queued until they
213
+ * settle.
214
+ *
215
+ * @returns Completes after bounded cooperative cleanup, or rejects with an
216
+ * `AggregateError` when cleanup exceeds its shutdown limit.
217
+ */
218
+ close(): Promise<void>;
219
+ /**
220
+ * Creates an inactive binding from a trusted rewritten topic.
221
+ * @param input Supplies the topic and expiry.
222
+ * @returns Returns the retained public subscription wire.
223
+ */
224
+ create(input: {
225
+ readonly topic: SubscriptionTopicWire;
226
+ readonly whenExpires?: number;
227
+ }): Promise<PublicSubscriptionWire>;
228
+ /**
229
+ * Activates only an owned inactive binding and restores retry state after callback failure.
230
+ * @param input Supplies ownership facts and the backend callback.
231
+ * @returns Returns the ownership transition outcome.
232
+ */
233
+ activate(input: {
234
+ readonly id: string;
235
+ readonly context: ActorContext;
236
+ readonly nowMs: number;
237
+ readonly onDefinition: OnSubscriptionDefinition;
238
+ readonly signal: AbortSignal;
239
+ }): Promise<SubscriptionBindingTransition>;
240
+ /**
241
+ * Cancels an owned binding and retains retry state after failed cleanup.
242
+ * @param input Supplies ownership facts and the backend callback.
243
+ * @returns Returns the ownership transition outcome.
244
+ */
245
+ cancel(input: {
246
+ readonly id: string;
247
+ readonly context: ActorContext;
248
+ readonly nowMs: number;
249
+ readonly onDefinition: OnSubscriptionDefinition;
250
+ }): Promise<SubscriptionBindingTransition>;
251
+ }
252
+ /**
253
+ * Admission input for one of the three SubscriptionService RPCs.
254
+ * `wire` is copied immediately and credential is never forwarded.
255
+ */
256
+ export interface SubscriptionGatewayRequest {
257
+ /**
258
+ * Identifies the receiving RPC service.
259
+ */
260
+ readonly service: string;
261
+ /**
262
+ * Identifies the invoked RPC method.
263
+ */
264
+ readonly method: string;
265
+ /**
266
+ * Carries copied public request bytes.
267
+ */
268
+ readonly wire: SubscriptionTopicWire | PublicSubscriptionWire;
269
+ /**
270
+ * Carries the credential used for this admission.
271
+ */
272
+ readonly credential?: RequestCredential | undefined;
273
+ /**
274
+ * Carries allowlisted transport facts.
275
+ */
276
+ readonly transport: TransportRequestContext;
277
+ /**
278
+ * B4 public update admission seam; ignored for Subscribe and Cancel.
279
+ */
280
+ readonly updates?: SubscriptionUpdateSink;
281
+ /**
282
+ * B4 downstream cancellation signal, copied only as a control capability.
283
+ */
284
+ readonly signal?: AbortSignal;
285
+ }
286
+ /**
287
+ * B4-mappable backend seam.
288
+ * It receives copied wire values and requires cleanup of every backend subscription.
289
+ */
290
+ export interface SubscriptionCreator {
291
+ /**
292
+ * Creates one per-node native subscription.
293
+ * @param request Supplies the copied canonical subscription definition.
294
+ * @param signal Cancels the backend operation.
295
+ * @returns Returns the trusted backend envelope.
296
+ */
297
+ subscribe(request: PublicSubscriptionWire, signal: SubscriptionAbortSignal): Promise<BackendSubscriptionEnvelope>;
298
+ /**
299
+ * Activates a backend subscription.
300
+ * @param request Supplies the copied private backend envelope and update sink.
301
+ * @param signal Cancels the backend operation.
302
+ * @returns Completes after activation ends.
303
+ */
304
+ activate(request: {
305
+ readonly wire: BackendSubscriptionEnvelope;
306
+ readonly updates: SubscriptionUpdateSink;
307
+ }, signal: SubscriptionAbortSignal): Promise<void>;
308
+ /**
309
+ * Cancels a backend subscription.
310
+ * @param request Supplies copied canonical subscription bytes.
311
+ * @param signal Cancels the backend operation.
312
+ * @returns Completes after cancellation ends.
313
+ */
314
+ cancel(request: {
315
+ readonly wire: PublicSubscriptionWire;
316
+ }, signal: SubscriptionAbortSignal): Promise<void>;
317
+ /**
318
+ * Removes one per-node native subscription.
319
+ * @param envelope Supplies the copied backend envelope.
320
+ * @param signal Cancels the backend operation.
321
+ * @returns Completes after disposal ends.
322
+ */
323
+ dispose(envelope: BackendSubscriptionEnvelope, signal: SubscriptionAbortSignal): Promise<void>;
324
+ }
325
+ /**
326
+ * Coordinates one logical public subscription without retaining native child envelopes.
327
+ *
328
+ * A coordinator may fan one definition out to several native application nodes. It
329
+ * compensates any partially created native children before it rejects creation.
330
+ */
331
+ export interface SubscriptionCoordinator {
332
+ /**
333
+ * Creates every current native child for a logical definition.
334
+ *
335
+ * @param request Supplies the copied canonical definition.
336
+ * @param signal Cancels logical creation.
337
+ * @param maxBackendEnvelopeBytes Limits each native child envelope.
338
+ * @returns Completes only after all current children are installed.
339
+ */
340
+ subscribe(request: PublicSubscriptionWire, signal: SubscriptionAbortSignal, maxBackendEnvelopeBytes: number): Promise<void>;
341
+ /**
342
+ * Activates the native children and relays their updates until cancellation.
343
+ *
344
+ * @param request Supplies the definition and update sink.
345
+ * @param signal Cancels the active logical subscription.
346
+ * @returns Completes after activation ends.
347
+ */
348
+ activate(request: {
349
+ readonly wire: PublicSubscriptionWire;
350
+ readonly updates: SubscriptionUpdateSink;
351
+ }, signal: SubscriptionAbortSignal): Promise<void>;
352
+ /**
353
+ * Cancels every native child for one logical definition.
354
+ *
355
+ * @param request Supplies the definition to cancel.
356
+ * @param signal Cancels the cleanup operation.
357
+ * @returns Completes after child cleanup settles.
358
+ */
359
+ cancel(request: {
360
+ readonly wire: PublicSubscriptionWire;
361
+ }, signal: SubscriptionAbortSignal): Promise<void>;
362
+ }
363
+ /**
364
+ * Common collaborators for every subscription Gateway admission mode.
365
+ *
366
+ * Pair these with exactly one {@link GatewayAdmission} to form
367
+ * {@link SubscriptionGatewayOptions}.
368
+ */
369
+ export interface SubscriptionGatewayCollaborators {
370
+ /**
371
+ * Stores opaque subscription ownership bindings.
372
+ */
373
+ readonly bindings: SubscriptionBindings;
374
+ /**
375
+ * Allows or rejects an admitted principal for each decoded request.
376
+ */
377
+ readonly authorize: AuthorizationPolicy["authorize"];
378
+ /**
379
+ * Independently resolves trusted actor and tenant context after authorization.
380
+ */
381
+ readonly contexts: ContextResolver;
382
+ /**
383
+ * Supplies trusted timestamps.
384
+ */
385
+ readonly clock: Clock;
386
+ /**
387
+ * Coordinates logical subscriptions across the current native membership.
388
+ */
389
+ readonly creator: SubscriptionCoordinator;
390
+ /**
391
+ * Overrides finite gateway limits.
392
+ */
393
+ readonly limits?: SubscriptionGatewayLimits;
394
+ /**
395
+ * Application-owned logger reserved for component-local records. The component
396
+ * does not retain or close the supplied logger.
397
+ */
398
+ readonly logger?: ILogLayer;
399
+ }
400
+ /**
401
+ * Collaborators for independently admitted and authorized subscription operations.
402
+ */
403
+ export type SubscriptionGatewayOptions = SubscriptionGatewayCollaborators & GatewayAdmission;
404
+ /**
405
+ * Opaque browser-facing operation result.
406
+ * Only subscribed contains a copied public Subscription wire, never backend bytes.
407
+ */
408
+ export type SubscriptionGatewayResult = {
409
+ /**
410
+ * Identifies successful subscription creation.
411
+ */ readonly kind: "subscribed";
412
+ /**
413
+ * Carries copied public subscription bytes.
414
+ */ readonly wire: PublicSubscriptionWire;
415
+ } | {
416
+ /**
417
+ * Identifies successful activation.
418
+ */
419
+ readonly kind: "activated";
420
+ } | {
421
+ /**
422
+ * Identifies successful cancellation.
423
+ */
424
+ readonly kind: "cancelled";
425
+ } | {
426
+ /**
427
+ * Identifies a rejected operation.
428
+ */
429
+ readonly kind: "rejected";
430
+ /**
431
+ * Explains why the operation was rejected.
432
+ */
433
+ readonly reason: "unknown-operation" | "malformed-request" | "unauthenticated" | "forbidden" | "denied" | "request-too-large" | "backend-envelope-too-large" | "binding-busy";
434
+ };
435
+ /**
436
+ * B3 gateway.
437
+ * It serializes operations, admits one transport snapshot, and never reveals backend envelopes.
438
+ */
439
+ export declare class SubscriptionGateway {
440
+ #private;
441
+ /**
442
+ * Creates the subscription gateway.
443
+ * @param options Supplies admission, authorization, binding, and backend collaborators.
444
+ */
445
+ constructor(options: SubscriptionGatewayOptions);
446
+ /**
447
+ * Handles one admitted subscription RPC request.
448
+ * @param request Supplies the copied request admission facts.
449
+ * @returns Returns the opaque operation result.
450
+ */
451
+ handle(request: SubscriptionGatewayRequest): Promise<SubscriptionGatewayResult>;
452
+ /**
453
+ * Closes admission and closes retained bindings.
454
+ * @returns Completes after retained bindings close.
455
+ */
456
+ close(): Promise<void>;
457
+ /**
458
+ * Schedules finite local expiry cleanup for a recovered durable definition.
459
+ * @param whenExpires Supplies the retained expiry in epoch milliseconds.
460
+ */
461
+ scheduleExpiry(whenExpires: number): void;
462
+ }
463
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceR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