@deliverd/sdk 0.13.0 → 0.15.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/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
  /**