@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/README.md +21 -0
- package/dist/data-screen.d.ts.map +1 -1
- package/dist/data-screen.js +16 -0
- package/dist/dev.d.ts +7 -0
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +27 -1
- package/dist/events.d.ts +114 -0
- package/dist/events.d.ts.map +1 -0
- package/dist/events.js +120 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/released.d.ts +1 -1
- package/dist/released.d.ts.map +1 -1
- package/dist/released.js +3151 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/data-screen.ts +17 -0
- package/src/dev.ts +31 -1
- package/src/events.ts +230 -0
- package/src/index.ts +15 -0
- package/src/released.ts +3151 -0
- package/src/types.ts +2 -0
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
|
/**
|