@quaillogistics/inbox 0.2.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.
Files changed (69) hide show
  1. package/dist/client.d.ts +69 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/client.js +68 -0
  4. package/dist/client.js.map +1 -0
  5. package/dist/error.d.ts +8 -0
  6. package/dist/error.d.ts.map +1 -0
  7. package/dist/error.js +26 -0
  8. package/dist/error.js.map +1 -0
  9. package/dist/http.d.ts +32 -0
  10. package/dist/http.d.ts.map +1 -0
  11. package/dist/http.js +105 -0
  12. package/dist/http.js.map +1 -0
  13. package/dist/index.d.ts +12 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +9 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/query-keys.d.ts +56 -0
  18. package/dist/query-keys.d.ts.map +1 -0
  19. package/dist/query-keys.js +55 -0
  20. package/dist/query-keys.js.map +1 -0
  21. package/dist/resources/accounts.d.ts +41 -0
  22. package/dist/resources/accounts.d.ts.map +1 -0
  23. package/dist/resources/accounts.js +38 -0
  24. package/dist/resources/accounts.js.map +1 -0
  25. package/dist/resources/api-keys.d.ts +22 -0
  26. package/dist/resources/api-keys.d.ts.map +1 -0
  27. package/dist/resources/api-keys.js +24 -0
  28. package/dist/resources/api-keys.js.map +1 -0
  29. package/dist/resources/attachments.d.ts +18 -0
  30. package/dist/resources/attachments.d.ts.map +1 -0
  31. package/dist/resources/attachments.js +26 -0
  32. package/dist/resources/attachments.js.map +1 -0
  33. package/dist/resources/auth.d.ts +36 -0
  34. package/dist/resources/auth.d.ts.map +1 -0
  35. package/dist/resources/auth.js +29 -0
  36. package/dist/resources/auth.js.map +1 -0
  37. package/dist/resources/contacts.d.ts +14 -0
  38. package/dist/resources/contacts.d.ts.map +1 -0
  39. package/dist/resources/contacts.js +15 -0
  40. package/dist/resources/contacts.js.map +1 -0
  41. package/dist/resources/conversations.d.ts +65 -0
  42. package/dist/resources/conversations.d.ts.map +1 -0
  43. package/dist/resources/conversations.js +75 -0
  44. package/dist/resources/conversations.js.map +1 -0
  45. package/dist/resources/messages.d.ts +38 -0
  46. package/dist/resources/messages.d.ts.map +1 -0
  47. package/dist/resources/messages.js +30 -0
  48. package/dist/resources/messages.js.map +1 -0
  49. package/dist/resources/pipeline.d.ts +19 -0
  50. package/dist/resources/pipeline.d.ts.map +1 -0
  51. package/dist/resources/pipeline.js +21 -0
  52. package/dist/resources/pipeline.js.map +1 -0
  53. package/dist/resources/webhooks.d.ts +50 -0
  54. package/dist/resources/webhooks.d.ts.map +1 -0
  55. package/dist/resources/webhooks.js +40 -0
  56. package/dist/resources/webhooks.js.map +1 -0
  57. package/dist/types.d.ts +234 -0
  58. package/dist/types.d.ts.map +1 -0
  59. package/dist/types.js +3 -0
  60. package/dist/types.js.map +1 -0
  61. package/dist/webhooks/types.d.ts +111 -0
  62. package/dist/webhooks/types.d.ts.map +1 -0
  63. package/dist/webhooks/types.js +2 -0
  64. package/dist/webhooks/types.js.map +1 -0
  65. package/dist/webhooks/verify.d.ts +29 -0
  66. package/dist/webhooks/verify.d.ts.map +1 -0
  67. package/dist/webhooks/verify.js +48 -0
  68. package/dist/webhooks/verify.js.map +1 -0
  69. package/package.json +38 -0
@@ -0,0 +1,24 @@
1
+ export class ApiKeysResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Create a new API key.
8
+ * The raw key is returned **once** — store it immediately.
9
+ * Subsequent requests will only return the key prefix.
10
+ */
11
+ async create(params = {}) {
12
+ return this.http.post("/v1/api-keys", params);
13
+ }
14
+ /** List all API keys for the current owner (prefix and metadata only, no key values). */
15
+ async list() {
16
+ const res = await this.http.get("/v1/api-keys");
17
+ return res.api_keys;
18
+ }
19
+ /** Revoke an API key by ID. Revoked keys cannot be re-activated. */
20
+ async delete(id) {
21
+ return this.http.delete(`/v1/api-keys/${id}`);
22
+ }
23
+ }
24
+ //# sourceMappingURL=api-keys.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.js","sourceRoot":"","sources":["../../src/resources/api-keys.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,eAAe;IACG;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,SAAkD,EAAE;QAC/D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAgB,cAAc,EAAE,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,yFAAyF;IACzF,KAAK,CAAC,IAAI;QACR,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,cAAc,CAAC,CAAC;QACxE,OAAO,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,oEAAoE;IACpE,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAkB,gBAAgB,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import type { HttpClient } from "../http.js";
2
+ export interface AttachmentDownload {
3
+ /** Raw binary data of the attachment. */
4
+ data: Uint8Array;
5
+ filename: string;
6
+ contentType: string;
7
+ }
8
+ export declare class AttachmentsResource {
9
+ private readonly http;
10
+ constructor(http: HttpClient);
11
+ /**
12
+ * Download an attachment by ID.
13
+ * Returns the raw bytes along with the filename and content type
14
+ * derived from the response headers.
15
+ */
16
+ download(id: string): Promise<AttachmentDownload>;
17
+ }
18
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../src/resources/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;;OAIG;IACG,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;CAkBxD"}
@@ -0,0 +1,26 @@
1
+ export class AttachmentsResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Download an attachment by ID.
8
+ * Returns the raw bytes along with the filename and content type
9
+ * derived from the response headers.
10
+ */
11
+ async download(id) {
12
+ const res = await this.http.getRaw(`/v1/attachments/${id}`);
13
+ const contentType = res.headers.get("Content-Type") ?? "application/octet-stream";
14
+ // Extract filename from Content-Disposition: attachment; filename="..."
15
+ const disposition = res.headers.get("Content-Disposition") ?? "";
16
+ const filenameMatch = /filename="?([^";]+)"?/i.exec(disposition);
17
+ const filename = filenameMatch?.[1] ?? `attachment-${id}`;
18
+ const buffer = await res.arrayBuffer();
19
+ return {
20
+ data: new Uint8Array(buffer),
21
+ filename,
22
+ contentType,
23
+ };
24
+ }
25
+ }
26
+ //# sourceMappingURL=attachments.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments.js","sourceRoot":"","sources":["../../src/resources/attachments.ts"],"names":[],"mappings":"AASA,MAAM,OAAO,mBAAmB;IACD;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;;OAIG;IACH,KAAK,CAAC,QAAQ,CAAC,EAAU;QACvB,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,mBAAmB,EAAE,EAAE,CAAC,CAAC;QAE5D,MAAM,WAAW,GACf,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,0BAA0B,CAAC;QAEhE,wEAAwE;QACxE,MAAM,WAAW,GAAG,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,IAAI,EAAE,CAAC;QACjE,MAAM,aAAa,GAAG,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACjE,MAAM,QAAQ,GAAG,aAAa,EAAE,CAAC,CAAC,CAAC,IAAI,cAAc,EAAE,EAAE,CAAC;QAE1D,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC;QACvC,OAAO;YACL,IAAI,EAAE,IAAI,UAAU,CAAC,MAAM,CAAC;YAC5B,QAAQ;YACR,WAAW;SACZ,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,36 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { User } from "../types.js";
3
+ export declare class AuthResource {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ /**
7
+ * Register a new standalone user account.
8
+ * Sets an `ll_session` cookie on success (browser environments only).
9
+ */
10
+ register(params: {
11
+ email: string;
12
+ password: string;
13
+ display_name?: string;
14
+ }): Promise<{
15
+ user: User;
16
+ }>;
17
+ /**
18
+ * Log in with email and password.
19
+ * Sets an `ll_session` cookie on success (browser environments only).
20
+ */
21
+ login(params: {
22
+ email: string;
23
+ password: string;
24
+ }): Promise<{
25
+ user: User;
26
+ }>;
27
+ /** Get the currently authenticated user (session auth only). */
28
+ me(): Promise<{
29
+ user: User;
30
+ }>;
31
+ /** Log out and clear the session cookie. */
32
+ logout(): Promise<{
33
+ ok: boolean;
34
+ }>;
35
+ }
36
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/resources/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAExC,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;OAGG;IACG,QAAQ,CAAC,MAAM,EAAE;QACrB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;KACvB,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAI3B;;;OAGG;IACG,KAAK,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAIjF,gEAAgE;IAC1D,EAAE,IAAI,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAA;KAAE,CAAC;IAInC,4CAA4C;IACtC,MAAM,IAAI,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;CAGzC"}
@@ -0,0 +1,29 @@
1
+ export class AuthResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Register a new standalone user account.
8
+ * Sets an `ll_session` cookie on success (browser environments only).
9
+ */
10
+ async register(params) {
11
+ return this.http.post("/v1/auth/register", params);
12
+ }
13
+ /**
14
+ * Log in with email and password.
15
+ * Sets an `ll_session` cookie on success (browser environments only).
16
+ */
17
+ async login(params) {
18
+ return this.http.post("/v1/auth/login", params);
19
+ }
20
+ /** Get the currently authenticated user (session auth only). */
21
+ async me() {
22
+ return this.http.get("/v1/auth/me");
23
+ }
24
+ /** Log out and clear the session cookie. */
25
+ async logout() {
26
+ return this.http.post("/v1/auth/logout");
27
+ }
28
+ }
29
+ //# sourceMappingURL=auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/resources/auth.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,YAAY;IACM;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,QAAQ,CAAC,MAId;QACC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAiB,mBAAmB,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,MAA2C;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAiB,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAClE,CAAC;IAED,gEAAgE;IAChE,KAAK,CAAC,EAAE;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,aAAa,CAAC,CAAC;IACtD,CAAC;IAED,4CAA4C;IAC5C,KAAK,CAAC,MAAM;QACV,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,iBAAiB,CAAC,CAAC;IAC5D,CAAC;CACF"}
@@ -0,0 +1,14 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { Contact } from "../types.js";
3
+ export declare class ContactsResource {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ /**
7
+ * Autocomplete contacts by name or email prefix.
8
+ * Results are ordered by contact frequency (most-emailed first).
9
+ */
10
+ autocomplete(q: string, options?: {
11
+ limit?: number;
12
+ }): Promise<Contact[]>;
13
+ }
14
+ //# sourceMappingURL=contacts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.d.ts","sourceRoot":"","sources":["../../src/resources/contacts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE3C,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;OAGG;IACG,YAAY,CAChB,CAAC,EAAE,MAAM,EACT,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAO,GAC/B,OAAO,CAAC,OAAO,EAAE,CAAC;CAOtB"}
@@ -0,0 +1,15 @@
1
+ export class ContactsResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Autocomplete contacts by name or email prefix.
8
+ * Results are ordered by contact frequency (most-emailed first).
9
+ */
10
+ async autocomplete(q, options = {}) {
11
+ const res = await this.http.get("/v1/contacts/autocomplete", { q, limit: options.limit });
12
+ return res.contacts;
13
+ }
14
+ }
15
+ //# sourceMappingURL=contacts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contacts.js","sourceRoot":"","sources":["../../src/resources/contacts.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,YAAY,CAChB,CAAS,EACT,UAA8B,EAAE;QAEhC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAC7B,2BAA2B,EAC3B,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAC5B,CAAC;QACF,OAAO,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;CACF"}
@@ -0,0 +1,65 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { Conversation, ConversationCounts, ConversationListParams, ConversationTriageSummary, ConversationWithMessages, DraftParams, LinkParams, TriageParams } from "../types.js";
3
+ export interface ConversationListResult {
4
+ items: Conversation[];
5
+ total: number;
6
+ page: number;
7
+ pageSize: number;
8
+ }
9
+ export declare class ConversationsResource {
10
+ private readonly http;
11
+ constructor(http: HttpClient);
12
+ /** List conversations with optional filters and pagination. */
13
+ list(params?: ConversationListParams): Promise<ConversationListResult>;
14
+ /**
15
+ * Get per-filter counts for sidebar badges.
16
+ * Useful for showing unread/needs-review counts without fetching conversations.
17
+ */
18
+ counts(): Promise<ConversationCounts>;
19
+ /** Get a conversation with its full message thread and attachments. */
20
+ get(id: string): Promise<ConversationWithMessages>;
21
+ /**
22
+ * Update triage state, priority, snooze, archive, or read status.
23
+ * Only fields provided are updated.
24
+ */
25
+ triage(id: string, params: TriageParams): Promise<{
26
+ ok: boolean;
27
+ }>;
28
+ /** Link a conversation to an external entity (e.g. a load or carrier). */
29
+ link(id: string, params: LinkParams): Promise<{
30
+ ok: boolean;
31
+ }>;
32
+ /** Remove the entity link from a conversation. */
33
+ unlink(id: string): Promise<{
34
+ ok: boolean;
35
+ }>;
36
+ /** Clear the AI classification and extraction from a conversation. */
37
+ dismiss(id: string): Promise<{
38
+ ok: boolean;
39
+ }>;
40
+ /** Requeue the latest inbound message through the AI pipeline. */
41
+ reprocess(id: string): Promise<{
42
+ ok: boolean;
43
+ message: string;
44
+ }>;
45
+ /** Trigger AI summarization for the conversation. */
46
+ summarize(id: string): Promise<{
47
+ ok: boolean;
48
+ message: string;
49
+ }>;
50
+ /** Generate an AI reply draft for the conversation. */
51
+ draft(id: string, params?: DraftParams): Promise<{
52
+ draft: {
53
+ body_text: string;
54
+ body_html: string | null;
55
+ };
56
+ }>;
57
+ /**
58
+ * Bulk-fetch triage metadata for a list of external IDs.
59
+ * Efficient for checking which emails have already been triaged.
60
+ */
61
+ bulkTriage(params: {
62
+ external_ids: string[];
63
+ }): Promise<ConversationTriageSummary[]>;
64
+ }
65
+ //# sourceMappingURL=conversations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.d.ts","sourceRoot":"","sources":["../../src/resources/conversations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EACV,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,yBAAyB,EACzB,wBAAwB,EACxB,WAAW,EACX,UAAU,EACV,YAAY,EACb,MAAM,aAAa,CAAC;AAErB,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,YAAY,EAAE,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,+DAA+D;IACzD,IAAI,CAAC,MAAM,GAAE,sBAA2B,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAsBhF;;;OAGG;IACG,MAAM,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAK3C,uEAAuE;IACjE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAIxD;;;OAGG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAIxE,0EAA0E;IACpE,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAIpE,kDAAkD;IAC5C,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAIlD,sEAAsE;IAChE,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAInD,kEAAkE;IAC5D,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAItE,qDAAqD;IAC/C,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAItE,uDAAuD;IACjD,KAAK,CACT,EAAE,EAAE,MAAM,EACV,MAAM,GAAE,WAAgB,GACvB,OAAO,CAAC;QAAE,KAAK,EAAE;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;SAAE,CAAA;KAAE,CAAC;IAOtE;;;OAGG;IACG,UAAU,CAAC,MAAM,EAAE;QACvB,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,GAAG,OAAO,CAAC,yBAAyB,EAAE,CAAC;CAOzC"}
@@ -0,0 +1,75 @@
1
+ export class ConversationsResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /** List conversations with optional filters and pagination. */
7
+ async list(params = {}) {
8
+ const res = await this.http.get("/v1/conversations", {
9
+ filter: params.filter,
10
+ priority: params.priority,
11
+ classification: params.classification,
12
+ search: params.search,
13
+ page: params.page,
14
+ page_size: params.pageSize,
15
+ });
16
+ return {
17
+ items: res.conversations,
18
+ total: res.total,
19
+ page: res.page,
20
+ pageSize: res.page_size,
21
+ };
22
+ }
23
+ /**
24
+ * Get per-filter counts for sidebar badges.
25
+ * Useful for showing unread/needs-review counts without fetching conversations.
26
+ */
27
+ async counts() {
28
+ const res = await this.http.get("/v1/conversations/counts");
29
+ return res.counts;
30
+ }
31
+ /** Get a conversation with its full message thread and attachments. */
32
+ async get(id) {
33
+ return this.http.get(`/v1/conversations/${id}`);
34
+ }
35
+ /**
36
+ * Update triage state, priority, snooze, archive, or read status.
37
+ * Only fields provided are updated.
38
+ */
39
+ async triage(id, params) {
40
+ return this.http.patch(`/v1/conversations/${id}/triage`, params);
41
+ }
42
+ /** Link a conversation to an external entity (e.g. a load or carrier). */
43
+ async link(id, params) {
44
+ return this.http.post(`/v1/conversations/${id}/link`, params);
45
+ }
46
+ /** Remove the entity link from a conversation. */
47
+ async unlink(id) {
48
+ return this.http.post(`/v1/conversations/${id}/unlink`);
49
+ }
50
+ /** Clear the AI classification and extraction from a conversation. */
51
+ async dismiss(id) {
52
+ return this.http.post(`/v1/conversations/${id}/dismiss`);
53
+ }
54
+ /** Requeue the latest inbound message through the AI pipeline. */
55
+ async reprocess(id) {
56
+ return this.http.post(`/v1/conversations/${id}/reprocess`);
57
+ }
58
+ /** Trigger AI summarization for the conversation. */
59
+ async summarize(id) {
60
+ return this.http.post(`/v1/conversations/${id}/summarize`);
61
+ }
62
+ /** Generate an AI reply draft for the conversation. */
63
+ async draft(id, params = {}) {
64
+ return this.http.post(`/v1/conversations/${id}/draft`, params);
65
+ }
66
+ /**
67
+ * Bulk-fetch triage metadata for a list of external IDs.
68
+ * Efficient for checking which emails have already been triaged.
69
+ */
70
+ async bulkTriage(params) {
71
+ const res = await this.http.post("/v1/conversations/bulk-triage", params);
72
+ return res.conversations;
73
+ }
74
+ }
75
+ //# sourceMappingURL=conversations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversations.js","sourceRoot":"","sources":["../../src/resources/conversations.ts"],"names":[],"mappings":"AAmBA,MAAM,OAAO,qBAAqB;IACH;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,+DAA+D;IAC/D,KAAK,CAAC,IAAI,CAAC,SAAiC,EAAE;QAC5C,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAK5B,mBAAmB,EAAE;YACtB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,SAAS,EAAE,MAAM,CAAC,QAAQ;SAC3B,CAAC,CAAC;QACH,OAAO;YACL,KAAK,EAAE,GAAG,CAAC,aAAa;YACxB,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,QAAQ,EAAE,GAAG,CAAC,SAAS;SACxB,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM;QACV,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiC,0BAA0B,CAAC,CAAC;QAC5F,OAAO,GAAG,CAAC,MAAM,CAAC;IACpB,CAAC;IAED,uEAAuE;IACvE,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAA2B,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAC5E,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,MAAoB;QAC3C,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAkB,qBAAqB,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;IACpF,CAAC;IAED,0EAA0E;IAC1E,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,MAAkB;QACvC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,qBAAqB,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IACjF,CAAC;IAED,kDAAkD;IAClD,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,qBAAqB,EAAE,SAAS,CAAC,CAAC;IAC3E,CAAC;IAED,sEAAsE;IACtE,KAAK,CAAC,OAAO,CAAC,EAAU;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAkB,qBAAqB,EAAE,UAAU,CAAC,CAAC;IAC5E,CAAC;IAED,kEAAkE;IAClE,KAAK,CAAC,SAAS,CAAC,EAAU;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAmC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAC/F,CAAC;IAED,qDAAqD;IACrD,KAAK,CAAC,SAAS,CAAC,EAAU;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAmC,qBAAqB,EAAE,YAAY,CAAC,CAAC;IAC/F,CAAC;IAED,uDAAuD;IACvD,KAAK,CAAC,KAAK,CACT,EAAU,EACV,SAAsB,EAAE;QAExB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,qBAAqB,EAAE,QAAQ,EAC/B,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,UAAU,CAAC,MAEhB;QACC,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAC9B,+BAA+B,EAC/B,MAAM,CACP,CAAC;QACF,OAAO,GAAG,CAAC,aAAa,CAAC;IAC3B,CAAC;CACF"}
@@ -0,0 +1,38 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { Message, MessageWithAttachments } from "../types.js";
3
+ export interface SendParams {
4
+ to: {
5
+ email: string;
6
+ name?: string;
7
+ }[];
8
+ subject: string;
9
+ body_text?: string;
10
+ body_html?: string;
11
+ }
12
+ export interface ReplyParams {
13
+ body_text?: string;
14
+ body_html?: string;
15
+ }
16
+ export declare class MessagesResource {
17
+ private readonly http;
18
+ constructor(http: HttpClient);
19
+ /** List all messages in a conversation, ordered oldest-first. */
20
+ list(conversationId: string): Promise<Message[]>;
21
+ /** Get a single message with its attachments. */
22
+ get(id: string): Promise<MessageWithAttachments>;
23
+ /**
24
+ * Reply to a conversation. Sends to the last inbound sender.
25
+ * Returns the message ID of the sent reply.
26
+ */
27
+ reply(conversationId: string, params: ReplyParams): Promise<{
28
+ message_id: string;
29
+ }>;
30
+ /**
31
+ * Send a new outbound message from a conversation's email account.
32
+ * Returns the message ID of the sent message.
33
+ */
34
+ send(conversationId: string, params: SendParams): Promise<{
35
+ message_id: string;
36
+ }>;
37
+ }
38
+ //# sourceMappingURL=messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAEnE,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C,iEAAiE;IAC3D,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAOtD,iDAAiD;IAC3C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAItD;;;OAGG;IACG,KAAK,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IAOzF;;;OAGG;IACG,IAAI,CAAC,cAAc,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,GAAG,OAAO,CAAC;QAAE,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;CAMxF"}
@@ -0,0 +1,30 @@
1
+ export class MessagesResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /** List all messages in a conversation, ordered oldest-first. */
7
+ async list(conversationId) {
8
+ const res = await this.http.get(`/v1/conversations/${conversationId}/messages`);
9
+ return res.messages;
10
+ }
11
+ /** Get a single message with its attachments. */
12
+ async get(id) {
13
+ return this.http.get(`/v1/messages/${id}`);
14
+ }
15
+ /**
16
+ * Reply to a conversation. Sends to the last inbound sender.
17
+ * Returns the message ID of the sent reply.
18
+ */
19
+ async reply(conversationId, params) {
20
+ return this.http.post(`/v1/conversations/${conversationId}/reply`, params);
21
+ }
22
+ /**
23
+ * Send a new outbound message from a conversation's email account.
24
+ * Returns the message ID of the sent message.
25
+ */
26
+ async send(conversationId, params) {
27
+ return this.http.post(`/v1/conversations/${conversationId}/send`, params);
28
+ }
29
+ }
30
+ //# sourceMappingURL=messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messages.js","sourceRoot":"","sources":["../../src/resources/messages.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,iEAAiE;IACjE,KAAK,CAAC,IAAI,CAAC,cAAsB;QAC/B,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAC7B,qBAAqB,cAAc,WAAW,CAC/C,CAAC;QACF,OAAO,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,GAAG,CAAC,EAAU;QAClB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAyB,gBAAgB,EAAE,EAAE,CAAC,CAAC;IACrE,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,KAAK,CAAC,cAAsB,EAAE,MAAmB;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,qBAAqB,cAAc,QAAQ,EAC3C,MAAM,CACP,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,cAAsB,EAAE,MAAkB;QACnD,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,qBAAqB,cAAc,OAAO,EAC1C,MAAM,CACP,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,19 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { PipelineConfig, UpdatePipelineConfigParams } from "../types.js";
3
+ export declare class PipelineResource {
4
+ private readonly http;
5
+ constructor(http: HttpClient);
6
+ /**
7
+ * Get the current AI pipeline configuration.
8
+ * Returns defaults if no custom config has been set.
9
+ */
10
+ getConfig(): Promise<PipelineConfig>;
11
+ /**
12
+ * Create or replace the AI pipeline configuration.
13
+ * Only supplied fields are updated; omitted fields retain their current values.
14
+ */
15
+ updateConfig(params: UpdatePipelineConfigParams): Promise<{
16
+ ok: boolean;
17
+ }>;
18
+ }
19
+ //# sourceMappingURL=pipeline.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/resources/pipeline.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAE9E,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,cAAc,CAAC;IAI1C;;;OAGG;IACG,YAAY,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;CAGjF"}
@@ -0,0 +1,21 @@
1
+ export class PipelineResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Get the current AI pipeline configuration.
8
+ * Returns defaults if no custom config has been set.
9
+ */
10
+ async getConfig() {
11
+ return this.http.get("/v1/pipeline/config");
12
+ }
13
+ /**
14
+ * Create or replace the AI pipeline configuration.
15
+ * Only supplied fields are updated; omitted fields retain their current values.
16
+ */
17
+ async updateConfig(params) {
18
+ return this.http.put("/v1/pipeline/config", params);
19
+ }
20
+ }
21
+ //# sourceMappingURL=pipeline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pipeline.js","sourceRoot":"","sources":["../../src/resources/pipeline.ts"],"names":[],"mappings":"AAGA,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;OAGG;IACH,KAAK,CAAC,SAAS;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAiB,qBAAqB,CAAC,CAAC;IAC9D,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,YAAY,CAAC,MAAkC;QACnD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAkB,qBAAqB,EAAE,MAAM,CAAC,CAAC;IACvE,CAAC;CACF"}
@@ -0,0 +1,50 @@
1
+ import type { HttpClient } from "../http.js";
2
+ import type { WebhookDelivery, WebhookStatus, WebhookSubscription } from "../types.js";
3
+ export type WebhookEvent = "conversation.created" | "conversation.classified" | "conversation.summarized" | "conversation.updated" | "conversation.linked" | "conversation.unlinked" | "message.received" | "message.sent" | "message.processed" | "account.connected" | "account.sync_completed" | "account.error" | "test";
4
+ export interface CreateWebhookParams {
5
+ url: string;
6
+ events: WebhookEvent[];
7
+ /** If omitted, a random secret is generated by the server. */
8
+ secret?: string;
9
+ }
10
+ export interface UpdateWebhookParams {
11
+ url?: string;
12
+ events?: WebhookEvent[];
13
+ status?: WebhookStatus;
14
+ }
15
+ export interface WebhookDeliveryListResult {
16
+ deliveries: WebhookDelivery[];
17
+ }
18
+ export declare class WebhooksResource {
19
+ private readonly http;
20
+ constructor(http: HttpClient);
21
+ /**
22
+ * Create a new webhook subscription.
23
+ * The returned `secret` is used to verify incoming webhook payloads —
24
+ * store it securely; it cannot be retrieved again.
25
+ */
26
+ create(params: CreateWebhookParams): Promise<WebhookSubscription>;
27
+ /** List all webhook subscriptions for the current owner. */
28
+ list(): Promise<WebhookSubscription[]>;
29
+ /** Update a webhook subscription (URL, events, or active/inactive status). */
30
+ update(id: string, params: UpdateWebhookParams): Promise<{
31
+ ok: boolean;
32
+ }>;
33
+ /** Delete a webhook subscription. */
34
+ delete(id: string): Promise<{
35
+ ok: boolean;
36
+ }>;
37
+ /** List delivery attempts for a webhook subscription, newest-first. */
38
+ deliveries(id: string, params?: {
39
+ page?: number;
40
+ page_size?: number;
41
+ }): Promise<WebhookDelivery[]>;
42
+ /**
43
+ * Send a test event to a webhook subscription.
44
+ * Returns the delivery ID so you can inspect the result.
45
+ */
46
+ test(id: string): Promise<{
47
+ delivery_id: string;
48
+ }>;
49
+ }
50
+ //# sourceMappingURL=webhooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/resources/webhooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvF,MAAM,MAAM,YAAY,GACpB,sBAAsB,GACtB,yBAAyB,GACzB,yBAAyB,GACzB,sBAAsB,GACtB,qBAAqB,GACrB,uBAAuB,GACvB,kBAAkB,GAClB,cAAc,GACd,mBAAmB,GACnB,mBAAmB,GACnB,wBAAwB,GACxB,eAAe,GACf,MAAM,CAAC;AAEX,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,YAAY,EAAE,CAAC;IACxB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAE7C;;;;OAIG;IACG,MAAM,CAAC,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAIvE,4DAA4D;IACtD,IAAI,IAAI,OAAO,CAAC,mBAAmB,EAAE,CAAC;IAK5C,8EAA8E;IACxE,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAI/E,qCAAqC;IAC/B,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,EAAE,EAAE,OAAO,CAAA;KAAE,CAAC;IAIlD,uEAAuE;IACjE,UAAU,CACd,EAAE,EAAE,MAAM,EACV,MAAM,GAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAO,GACjD,OAAO,CAAC,eAAe,EAAE,CAAC;IAQ7B;;;OAGG;IACG,IAAI,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAGzD"}
@@ -0,0 +1,40 @@
1
+ export class WebhooksResource {
2
+ http;
3
+ constructor(http) {
4
+ this.http = http;
5
+ }
6
+ /**
7
+ * Create a new webhook subscription.
8
+ * The returned `secret` is used to verify incoming webhook payloads —
9
+ * store it securely; it cannot be retrieved again.
10
+ */
11
+ async create(params) {
12
+ return this.http.post("/v1/webhooks", params);
13
+ }
14
+ /** List all webhook subscriptions for the current owner. */
15
+ async list() {
16
+ const res = await this.http.get("/v1/webhooks");
17
+ return res.webhooks;
18
+ }
19
+ /** Update a webhook subscription (URL, events, or active/inactive status). */
20
+ async update(id, params) {
21
+ return this.http.patch(`/v1/webhooks/${id}`, params);
22
+ }
23
+ /** Delete a webhook subscription. */
24
+ async delete(id) {
25
+ return this.http.delete(`/v1/webhooks/${id}`);
26
+ }
27
+ /** List delivery attempts for a webhook subscription, newest-first. */
28
+ async deliveries(id, params = {}) {
29
+ const res = await this.http.get(`/v1/webhooks/${id}/deliveries`, params);
30
+ return res.deliveries;
31
+ }
32
+ /**
33
+ * Send a test event to a webhook subscription.
34
+ * Returns the delivery ID so you can inspect the result.
35
+ */
36
+ async test(id) {
37
+ return this.http.post(`/v1/webhooks/${id}/test`);
38
+ }
39
+ }
40
+ //# sourceMappingURL=webhooks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../src/resources/webhooks.ts"],"names":[],"mappings":"AAmCA,MAAM,OAAO,gBAAgB;IACE;IAA7B,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD;;;;OAIG;IACH,KAAK,CAAC,MAAM,CAAC,MAA2B;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAsB,cAAc,EAAE,MAAM,CAAC,CAAC;IACrE,CAAC;IAED,4DAA4D;IAC5D,KAAK,CAAC,IAAI;QACR,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsC,cAAc,CAAC,CAAC;QACrF,OAAO,GAAG,CAAC,QAAQ,CAAC;IACtB,CAAC;IAED,8EAA8E;IAC9E,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,MAA2B;QAClD,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAkB,gBAAgB,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;IACxE,CAAC;IAED,qCAAqC;IACrC,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,OAAO,IAAI,CAAC,IAAI,CAAC,MAAM,CAAkB,gBAAgB,EAAE,EAAE,CAAC,CAAC;IACjE,CAAC;IAED,uEAAuE;IACvE,KAAK,CAAC,UAAU,CACd,EAAU,EACV,SAAgD,EAAE;QAElD,MAAM,GAAG,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAC7B,gBAAgB,EAAE,aAAa,EAC/B,MAAM,CACP,CAAC;QACF,OAAO,GAAG,CAAC,UAAU,CAAC;IACxB,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,IAAI,CAAC,EAAU;QACnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAA0B,gBAAgB,EAAE,OAAO,CAAC,CAAC;IAC5E,CAAC;CACF"}