@deliverd/sdk 0.14.0 → 0.16.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.
- package/README.md +65 -4
- package/dist/approvals.d.ts +17 -1
- package/dist/approvals.d.ts.map +1 -1
- package/dist/approvals.js +36 -1
- package/dist/dev.d.ts.map +1 -1
- package/dist/dev.js +3 -0
- package/dist/index.d.ts +8 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -3
- package/dist/released.d.ts +1 -1
- package/dist/released.d.ts.map +1 -1
- package/dist/released.js +1634 -0
- package/dist/reports.d.ts +9 -3
- package/dist/reports.d.ts.map +1 -1
- package/dist/reports.js +14 -3
- package/dist/types.d.ts +140 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/webhook-endpoints.d.ts +57 -0
- package/dist/webhook-endpoints.d.ts.map +1 -0
- package/dist/webhook-endpoints.js +94 -0
- package/package.json +1 -1
- package/src/approvals.ts +43 -1
- package/src/dev.ts +2 -0
- package/src/index.ts +10 -3
- package/src/released.ts +1634 -0
- package/src/reports.ts +20 -3
- package/src/types.ts +152 -0
- package/src/webhook-endpoints.ts +115 -0
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HttpClient, type ClientOptions } from "./http.js";
|
|
2
|
-
import { Approvals, FAST_POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
|
|
2
|
+
import { Approvals, DecisionSessions, FAST_POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
|
|
3
3
|
import { Gates, type GateOptions } from "./gates.js";
|
|
4
4
|
import { Comments, Reports, Schedules } from "./reports.js";
|
|
5
5
|
import { Reviews, type ReviewWaitOptions } from "./reviews.js";
|
|
@@ -7,6 +7,7 @@ import { Collections, type CollectWaitOptions } from "./collections.js";
|
|
|
7
7
|
import { Flows } from "./flows.js";
|
|
8
8
|
import { Tasks } from "./tasks.js";
|
|
9
9
|
import { Webhooks } from "./webhooks.js";
|
|
10
|
+
import { WebhookEndpoints } from "./webhook-endpoints.js";
|
|
10
11
|
import { developmentFetch, type DevelopmentOptions } from "./dev.js";
|
|
11
12
|
import { durationMs, type Duration } from "./duration.js";
|
|
12
13
|
import { DeliverdError } from "./errors.js";
|
|
@@ -22,13 +23,14 @@ import type {
|
|
|
22
23
|
ReviewOutcome,
|
|
23
24
|
} from "./types.js";
|
|
24
25
|
|
|
25
|
-
export { Approval, Approvals, POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
|
|
26
|
+
export { Approval, Approvals, DecisionSessions, POLL_SCHEDULE, type WaitOptions } from "./approvals.js";
|
|
26
27
|
export { Gate, Gates, type GateOptions, type GateWaitOptions } from "./gates.js";
|
|
27
28
|
export { Comments, Reports, Schedules } from "./reports.js";
|
|
28
29
|
export { Review, Reviews, type ReviewWaitOptions } from "./reviews.js";
|
|
29
30
|
export { Collection, Collections, type CollectWaitOptions } from "./collections.js";
|
|
30
31
|
export { Flow, Flows, type FlowPrimitives } from "./flows.js";
|
|
31
32
|
export { Task, Tasks } from "./tasks.js";
|
|
33
|
+
export { WebhookEndpoints } from "./webhook-endpoints.js";
|
|
32
34
|
export {
|
|
33
35
|
constructCallback,
|
|
34
36
|
constructEvent,
|
|
@@ -139,6 +141,8 @@ export interface CollectOptions extends Omit<CreateCollectionInput, "expiresAt">
|
|
|
139
141
|
*/
|
|
140
142
|
export class Deliverd {
|
|
141
143
|
readonly approvals: Approvals;
|
|
144
|
+
/** Pages on which an approver decides inside your product: `approvals.createSession` makes one. */
|
|
145
|
+
readonly decisionSessions: DecisionSessions;
|
|
142
146
|
readonly gates: Gates;
|
|
143
147
|
readonly reviews: Reviews;
|
|
144
148
|
readonly collections: Collections;
|
|
@@ -148,6 +152,7 @@ export class Deliverd {
|
|
|
148
152
|
readonly comments: Comments;
|
|
149
153
|
readonly schedules: Schedules;
|
|
150
154
|
readonly webhooks: Webhooks;
|
|
155
|
+
readonly webhookEndpoints: WebhookEndpoints;
|
|
151
156
|
readonly http: HttpClient;
|
|
152
157
|
/** Whether an imaginary approver is deciding these. */
|
|
153
158
|
readonly development: boolean;
|
|
@@ -165,6 +170,7 @@ export class Deliverd {
|
|
|
165
170
|
});
|
|
166
171
|
|
|
167
172
|
this.approvals = new Approvals(this.http);
|
|
173
|
+
this.decisionSessions = new DecisionSessions(this.http);
|
|
168
174
|
this.gates = new Gates(this.http);
|
|
169
175
|
this.reviews = new Reviews(this.http);
|
|
170
176
|
this.collections = new Collections(this.http);
|
|
@@ -179,6 +185,7 @@ export class Deliverd {
|
|
|
179
185
|
this.comments = new Comments(this.http);
|
|
180
186
|
this.schedules = new Schedules(this.http);
|
|
181
187
|
this.webhooks = new Webhooks();
|
|
188
|
+
this.webhookEndpoints = new WebhookEndpoints(this.http);
|
|
182
189
|
}
|
|
183
190
|
|
|
184
191
|
/**
|
|
@@ -413,7 +420,7 @@ export class Deliverd {
|
|
|
413
420
|
return settled.toCollected();
|
|
414
421
|
}
|
|
415
422
|
|
|
416
|
-
/** Publish HTML to a secure URL. The
|
|
423
|
+
/** Publish HTML to a secure URL. The sixth primitive, one call in. */
|
|
417
424
|
publish(input: PublishReportInput, signal?: AbortSignal): Promise<PublishResult> {
|
|
418
425
|
return this.reports.publish(input, signal);
|
|
419
426
|
}
|