@deliverd/sdk 0.41.0 → 0.42.1

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/src/index.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import { HttpClient, type ClientOptions } from "./http.js";
2
2
  import { Approvals, DecisionSessions, FAST_POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
3
3
  import { Gates, isUnavailable, unavailableDecision, type GateOptions } from "./gates.js";
4
+ import { Events } from "./events.js";
4
5
  import { Comments, Reports, Schedules } from "./reports.js";
5
6
  import { Reviews, type ReviewWaitOptions } from "./reviews.js";
6
7
  import { Collections, type CollectWaitOptions } from "./collections.js";
@@ -29,6 +30,17 @@ import type {
29
30
 
30
31
  export { Approval, Approvals, DecisionSessions, POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
31
32
  export { Gate, Gates, type GateOptions, type GateWaitOptions } from "./gates.js";
33
+ export {
34
+ Events,
35
+ type Decided,
36
+ type EventArguments,
37
+ type EventDefinition,
38
+ type EventName,
39
+ type EventOccurrence,
40
+ type PollInput,
41
+ type PollResult,
42
+ type WatchOptions,
43
+ } from "./events.js";
32
44
  export { Comments, Reports, Schedules } from "./reports.js";
33
45
  export { Review, Reviews, type ReviewWaitOptions } from "./reviews.js";
34
46
  export { Collection, Collections, type CollectWaitOptions } from "./collections.js";
@@ -198,6 +210,8 @@ export class Deliverd {
198
210
  readonly webhookEndpoints: WebhookEndpoints;
199
211
  /** Check a gate's signed yes where the action happens, before it happens. */
200
212
  readonly decisionTokens: DecisionTokens;
213
+ /** Be told instead of asking: MCP Events (approval.decided, gate.decided...) over REST. */
214
+ readonly events: Events;
201
215
  readonly http: HttpClient;
202
216
  /** Whether an imaginary approver is deciding these. */
203
217
  readonly development: boolean;
@@ -235,6 +249,7 @@ export class Deliverd {
235
249
  this.webhooks = new Webhooks();
236
250
  this.webhookEndpoints = new WebhookEndpoints(this.http);
237
251
  this.decisionTokens = new DecisionTokens(this.http.baseUrl, options.fetch);
252
+ this.events = new Events(this.http);
238
253
  }
239
254
 
240
255
  /**