@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,234 @@
1
+ export type Provider = "gmail" | "outlook" | "imap";
2
+ export type AccountStatus = "active" | "revoked" | "disabled";
3
+ export type TriageState = "NEEDS_REVIEW" | "WAITING" | "SNOOZED" | "DONE";
4
+ export type Priority = "HIGH" | "MEDIUM" | "LOW";
5
+ export type Direction = "INBOUND" | "OUTBOUND";
6
+ export type MessageStatus = "UNPROCESSED" | "PROCESSED" | "ERROR";
7
+ export type WebhookStatus = "active" | "inactive" | "disabled";
8
+ export type DeliveryStatus = "pending" | "delivered" | "failed";
9
+ export type ApiKeyStatus = "active" | "revoked";
10
+ export type PipelineStep = "classify" | "extract" | "summarize";
11
+ /** Connected email account (credentials are never returned) */
12
+ export interface Account {
13
+ id: string;
14
+ ownerId: string;
15
+ provider: Provider;
16
+ email: string;
17
+ displayName: string | null;
18
+ status: AccountStatus;
19
+ syncCursor: string | null;
20
+ syncState: string | null;
21
+ lastSyncAt: string | null;
22
+ watchExpiry: string | null;
23
+ createdAt: string;
24
+ updatedAt: string;
25
+ }
26
+ export interface Conversation {
27
+ id: string;
28
+ accountId: string;
29
+ externalId: string;
30
+ subject: string;
31
+ lastMessageAt: string;
32
+ isRead: boolean;
33
+ isArchived: boolean;
34
+ deletedAt: string | null;
35
+ triageState: TriageState;
36
+ priority: Priority | null;
37
+ followUpAt: string | null;
38
+ snoozedUntil: string | null;
39
+ classification: string | null;
40
+ classificationConfidence: number | null;
41
+ aiSummary: string | null;
42
+ aiSummaryMessageCount: number | null;
43
+ suggestedActions: unknown | null;
44
+ extraction: Record<string, unknown> | null;
45
+ lastProcessedMessageId: string | null;
46
+ lastSummarizedAt: string | null;
47
+ linkedEntityType: string | null;
48
+ linkedEntityId: string | null;
49
+ linkedEntityRef: string | null;
50
+ createdAt: string;
51
+ updatedAt: string;
52
+ }
53
+ export interface Recipient {
54
+ email: string;
55
+ name?: string;
56
+ }
57
+ export interface Recipients {
58
+ to: Recipient[];
59
+ cc: Recipient[];
60
+ bcc: Recipient[];
61
+ }
62
+ export interface Message {
63
+ id: string;
64
+ conversationId: string;
65
+ externalId: string;
66
+ direction: Direction;
67
+ sender: string;
68
+ senderName: string | null;
69
+ recipients: Recipients;
70
+ subject: string;
71
+ bodyText: string | null;
72
+ bodyHtml: string | null;
73
+ sentAt: string;
74
+ status: MessageStatus;
75
+ classification: string | null;
76
+ classificationConfidence: number | null;
77
+ processingError: string | null;
78
+ processingDurationMs: number | null;
79
+ retryCount: number;
80
+ createdAt: string;
81
+ updatedAt: string;
82
+ }
83
+ export interface Attachment {
84
+ id: string;
85
+ messageId: string;
86
+ externalId: string | null;
87
+ filename: string;
88
+ contentType: string;
89
+ size: number;
90
+ bucketPath: string | null;
91
+ createdAt: string;
92
+ }
93
+ export interface MessageWithAttachments extends Message {
94
+ attachments: Attachment[];
95
+ }
96
+ export interface ConversationWithMessages extends Conversation {
97
+ messages: MessageWithAttachments[];
98
+ }
99
+ export interface Contact {
100
+ id: string;
101
+ ownerId: string;
102
+ email: string;
103
+ displayName: string | null;
104
+ frequency: number;
105
+ lastContactedAt: string | null;
106
+ createdAt: string;
107
+ updatedAt: string;
108
+ }
109
+ export interface WebhookSubscription {
110
+ id: string;
111
+ ownerId: string;
112
+ url: string;
113
+ secret: string;
114
+ events: string[];
115
+ status: WebhookStatus;
116
+ consecutiveFailures: number;
117
+ createdAt: string;
118
+ updatedAt: string;
119
+ }
120
+ export interface WebhookDelivery {
121
+ id: string;
122
+ subscriptionId: string;
123
+ eventType: string;
124
+ payload: unknown;
125
+ status: DeliveryStatus;
126
+ httpStatus: number | null;
127
+ responseBody: string | null;
128
+ durationMs: number | null;
129
+ attempts: number;
130
+ nextRetryAt: string | null;
131
+ createdAt: string;
132
+ }
133
+ export interface ApiKey {
134
+ id: string;
135
+ keyPrefix: string;
136
+ label: string | null;
137
+ lastUsedAt: string | null;
138
+ expiresAt: string | null;
139
+ status: ApiKeyStatus;
140
+ createdAt: string;
141
+ }
142
+ /** Only returned once at creation — key is never shown again */
143
+ export interface CreatedApiKey {
144
+ id: string;
145
+ key: string;
146
+ key_prefix: string;
147
+ label: string | null;
148
+ }
149
+ export interface User {
150
+ id: string;
151
+ email: string;
152
+ owner_id: string;
153
+ display_name: string | null;
154
+ }
155
+ export interface PipelineCategory {
156
+ name: string;
157
+ description: string;
158
+ extract: boolean;
159
+ priority_default?: Priority | null;
160
+ priority?: Priority | null;
161
+ }
162
+ export interface PipelineActionType {
163
+ type: string;
164
+ label: string;
165
+ }
166
+ export interface PipelineConfig {
167
+ categories: PipelineCategory[];
168
+ extraction_schema: Record<string, unknown> | null;
169
+ system_prompts: Record<string, string> | null;
170
+ action_types: PipelineActionType[] | null;
171
+ model_config: Record<string, unknown> | null;
172
+ }
173
+ export interface ConversationCounts {
174
+ all: number;
175
+ unread: number;
176
+ needs_review: number;
177
+ waiting: number;
178
+ snoozed: number;
179
+ done: number;
180
+ archived: number;
181
+ linked: number;
182
+ priority_high: number;
183
+ priority_medium: number;
184
+ priority_low: number;
185
+ }
186
+ export interface ConversationTriageSummary {
187
+ id: string;
188
+ externalId: string;
189
+ triageState: TriageState;
190
+ priority: Priority | null;
191
+ classification: string | null;
192
+ linkedEntityType: string | null;
193
+ linkedEntityId: string | null;
194
+ linkedEntityRef: string | null;
195
+ }
196
+ export interface HealthStatus {
197
+ status: "ok" | "degraded" | "error";
198
+ version: string;
199
+ postgres: boolean;
200
+ redis: boolean;
201
+ }
202
+ export type ConversationFilter = "all" | "unread" | "archived" | "needs_review" | "waiting" | "snoozed" | "done" | "linked" | `classified:${string}`;
203
+ export interface ConversationListParams {
204
+ filter?: ConversationFilter;
205
+ priority?: Priority;
206
+ classification?: string;
207
+ search?: string;
208
+ page?: number;
209
+ pageSize?: number;
210
+ }
211
+ export interface TriageParams {
212
+ triage_state?: TriageState;
213
+ priority?: Priority | null;
214
+ follow_up_at?: string | null;
215
+ snoozed_until?: string | null;
216
+ is_read?: boolean;
217
+ is_archived?: boolean;
218
+ }
219
+ export interface LinkParams {
220
+ type: string;
221
+ id: string;
222
+ ref?: string;
223
+ }
224
+ export interface DraftParams {
225
+ intent?: string;
226
+ }
227
+ export interface UpdatePipelineConfigParams {
228
+ categories?: PipelineCategory[];
229
+ extraction_schema?: Record<string, unknown> | null;
230
+ system_prompts?: Record<string, string> | null;
231
+ action_types?: PipelineActionType[] | null;
232
+ model_config?: Record<string, unknown> | null;
233
+ }
234
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;AACpD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,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C;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACzC,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAChC,iBAAiB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACnD,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAC/C,YAAY,CAAC,EAAE,kBAAkB,EAAE,GAAG,IAAI,CAAC;IAC3C,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;CAC/C"}
package/dist/types.js ADDED
@@ -0,0 +1,3 @@
1
+ // ─── Enums ────────────────────────────────────────────────────────────────────
2
+ export {};
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,iFAAiF"}
@@ -0,0 +1,111 @@
1
+ import type { Priority, TriageState } from "../types.js";
2
+ /** Base shape for every webhook event delivered by the Inbox API. */
3
+ export interface WebhookEnvelope<T extends string, D> {
4
+ event: T;
5
+ timestamp: string;
6
+ data: D;
7
+ }
8
+ export interface ConversationCreatedPayload {
9
+ conversation_id: string;
10
+ subject: string;
11
+ sender: string;
12
+ account_id: string;
13
+ }
14
+ export interface ConversationClassifiedPayload {
15
+ conversation_id: string;
16
+ classification: string;
17
+ confidence: number;
18
+ priority: Priority | null;
19
+ /** Populated when the pipeline is configured to extract structured data. */
20
+ extraction: Record<string, unknown> | null;
21
+ }
22
+ export interface ConversationSummarizedPayload {
23
+ conversation_id: string;
24
+ summary: string;
25
+ suggested_actions: unknown[] | null;
26
+ }
27
+ export interface ConversationUpdatedPayload {
28
+ conversation_id: string;
29
+ changes: {
30
+ triage_state?: TriageState;
31
+ priority?: Priority | null;
32
+ follow_up_at?: string | null;
33
+ snoozed_until?: string | null;
34
+ is_read?: boolean;
35
+ is_archived?: boolean;
36
+ };
37
+ }
38
+ export interface ConversationLinkedPayload {
39
+ conversation_id: string;
40
+ linked_entity: {
41
+ type: string;
42
+ id: string;
43
+ ref?: string;
44
+ };
45
+ }
46
+ export interface ConversationUnlinkedPayload {
47
+ conversation_id: string;
48
+ }
49
+ export interface MessageReceivedPayload {
50
+ conversation_id: string;
51
+ message_id: string;
52
+ sender: string;
53
+ }
54
+ export interface MessageSentPayload {
55
+ conversation_id: string;
56
+ message_id: string;
57
+ }
58
+ export interface MessageProcessedPayload {
59
+ message_id: string;
60
+ conversation_id: string;
61
+ classification: string | null;
62
+ confidence: number | null;
63
+ }
64
+ export interface AccountConnectedPayload {
65
+ account_id: string;
66
+ provider: string;
67
+ email: string;
68
+ }
69
+ export interface AccountSyncCompletedPayload {
70
+ account_id: string;
71
+ new_messages: number;
72
+ new_conversations: number;
73
+ }
74
+ export interface AccountErrorPayload {
75
+ account_id: string;
76
+ error_type: string;
77
+ error_message: string;
78
+ }
79
+ export interface TestPayload {
80
+ message: string;
81
+ }
82
+ export type ConversationCreatedEvent = WebhookEnvelope<"conversation.created", ConversationCreatedPayload>;
83
+ export type ConversationClassifiedEvent = WebhookEnvelope<"conversation.classified", ConversationClassifiedPayload>;
84
+ export type ConversationSummarizedEvent = WebhookEnvelope<"conversation.summarized", ConversationSummarizedPayload>;
85
+ export type ConversationUpdatedEvent = WebhookEnvelope<"conversation.updated", ConversationUpdatedPayload>;
86
+ export type ConversationLinkedEvent = WebhookEnvelope<"conversation.linked", ConversationLinkedPayload>;
87
+ export type ConversationUnlinkedEvent = WebhookEnvelope<"conversation.unlinked", ConversationUnlinkedPayload>;
88
+ export type MessageReceivedEvent = WebhookEnvelope<"message.received", MessageReceivedPayload>;
89
+ export type MessageSentEvent = WebhookEnvelope<"message.sent", MessageSentPayload>;
90
+ export type MessageProcessedEvent = WebhookEnvelope<"message.processed", MessageProcessedPayload>;
91
+ export type AccountConnectedEvent = WebhookEnvelope<"account.connected", AccountConnectedPayload>;
92
+ export type AccountSyncCompletedEvent = WebhookEnvelope<"account.sync_completed", AccountSyncCompletedPayload>;
93
+ export type AccountErrorEvent = WebhookEnvelope<"account.error", AccountErrorPayload>;
94
+ export type TestEvent = WebhookEnvelope<"test", TestPayload>;
95
+ /**
96
+ * All webhook events emitted by the Inbox API.
97
+ * Narrow by `event.event` to get a fully typed payload.
98
+ *
99
+ * @example
100
+ * function handleWebhook(event: InboxWebhookEvent) {
101
+ * switch (event.event) {
102
+ * case "conversation.classified":
103
+ * if (event.data.classification === "LOAD_TENDER") {
104
+ * createLoadFromExtraction(event.data.extraction);
105
+ * }
106
+ * break;
107
+ * }
108
+ * }
109
+ */
110
+ export type InboxWebhookEvent = ConversationCreatedEvent | ConversationClassifiedEvent | ConversationSummarizedEvent | ConversationUpdatedEvent | ConversationLinkedEvent | ConversationUnlinkedEvent | MessageReceivedEvent | MessageSentEvent | MessageProcessedEvent | AccountConnectedEvent | AccountSyncCompletedEvent | AccountErrorEvent | TestEvent;
111
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAIzD,qEAAqE;AACrE,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC;IAClD,KAAK,EAAE,CAAC,CAAC;IACT,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,CAAC,CAAC;CACT;AAID,MAAM,WAAW,0BAA0B;IACzC,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,6BAA6B;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB,cAA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AAClG,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAClG,MAAM,MAAM,yBAAyB,GAAG,eAAe,CAAC,wBAAwB,EAAE,2BAA2B,CAAC,CAAC;AAC/G,MAAM,MAAM,iBAAiB,GAAG,eAAe,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC;AACtF,MAAM,MAAM,SAAS,GAAG,eAAe,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE7D;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,iBAAiB,GACzB,wBAAwB,GACxB,2BAA2B,GAC3B,2BAA2B,GAC3B,wBAAwB,GACxB,uBAAuB,GACvB,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,qBAAqB,GACrB,yBAAyB,GACzB,iBAAiB,GACjB,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/webhooks/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Verify the HMAC-SHA256 signature on an incoming Inbox webhook request.
3
+ *
4
+ * The server signs the raw JSON body with the subscription secret using
5
+ * HMAC-SHA256 and sends the result in the `X-Inbox-Signature` header as
6
+ * `sha256=<hex>`.
7
+ *
8
+ * Uses the Web Crypto API (`globalThis.crypto.subtle`) — available in
9
+ * Node 18+, Bun, Deno, Cloudflare Workers, and all modern browsers.
10
+ *
11
+ * @example
12
+ * // Express / Hono webhook handler
13
+ * const isValid = await verifyWebhookSignature({
14
+ * payload: rawBody, // string — the raw request body before JSON.parse
15
+ * signature: req.headers["x-inbox-signature"],
16
+ * secret: process.env.INBOX_WEBHOOK_SECRET,
17
+ * });
18
+ * if (!isValid) return res.status(401).send("Bad signature");
19
+ * const event: InboxWebhookEvent = JSON.parse(rawBody);
20
+ */
21
+ export declare function verifyWebhookSignature(params: {
22
+ /** Raw request body string (before JSON.parse). */
23
+ payload: string;
24
+ /** Value of the `X-Inbox-Signature` header. */
25
+ signature: string | null | undefined;
26
+ /** Webhook subscription secret (from `webhooks.create()` or stored at subscription time). */
27
+ secret: string;
28
+ }): Promise<boolean>;
29
+ //# sourceMappingURL=verify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.d.ts","sourceRoot":"","sources":["../../src/webhooks/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,sBAAsB,CAAC,MAAM,EAAE;IACnD,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,+CAA+C;IAC/C,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IACrC,6FAA6F;IAC7F,MAAM,EAAE,MAAM,CAAC;CAChB,GAAG,OAAO,CAAC,OAAO,CAAC,CA+BnB"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Verify the HMAC-SHA256 signature on an incoming Inbox webhook request.
3
+ *
4
+ * The server signs the raw JSON body with the subscription secret using
5
+ * HMAC-SHA256 and sends the result in the `X-Inbox-Signature` header as
6
+ * `sha256=<hex>`.
7
+ *
8
+ * Uses the Web Crypto API (`globalThis.crypto.subtle`) — available in
9
+ * Node 18+, Bun, Deno, Cloudflare Workers, and all modern browsers.
10
+ *
11
+ * @example
12
+ * // Express / Hono webhook handler
13
+ * const isValid = await verifyWebhookSignature({
14
+ * payload: rawBody, // string — the raw request body before JSON.parse
15
+ * signature: req.headers["x-inbox-signature"],
16
+ * secret: process.env.INBOX_WEBHOOK_SECRET,
17
+ * });
18
+ * if (!isValid) return res.status(401).send("Bad signature");
19
+ * const event: InboxWebhookEvent = JSON.parse(rawBody);
20
+ */
21
+ export async function verifyWebhookSignature(params) {
22
+ const { payload, signature, secret } = params;
23
+ if (!signature)
24
+ return false;
25
+ // Expected format: "sha256=<hex>"
26
+ const match = /^sha256=([0-9a-f]+)$/i.exec(signature);
27
+ if (!match)
28
+ return false;
29
+ const expectedHex = match[1];
30
+ const enc = new TextEncoder();
31
+ const keyMaterial = await globalThis.crypto.subtle.importKey("raw", enc.encode(secret), { name: "HMAC", hash: "SHA-256" }, false, ["sign"]);
32
+ const signatureBuffer = await globalThis.crypto.subtle.sign("HMAC", keyMaterial, enc.encode(payload));
33
+ const actualHex = Array.from(new Uint8Array(signatureBuffer))
34
+ .map((b) => b.toString(16).padStart(2, "0"))
35
+ .join("");
36
+ // Constant-time comparison to prevent timing attacks
37
+ return constantTimeEqual(actualHex, expectedHex.toLowerCase());
38
+ }
39
+ function constantTimeEqual(a, b) {
40
+ if (a.length !== b.length)
41
+ return false;
42
+ let result = 0;
43
+ for (let i = 0; i < a.length; i++) {
44
+ result |= a.charCodeAt(i) ^ b.charCodeAt(i);
45
+ }
46
+ return result === 0;
47
+ }
48
+ //# sourceMappingURL=verify.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify.js","sourceRoot":"","sources":["../../src/webhooks/verify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,MAO5C;IACC,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC;IAE9C,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAE7B,kCAAkC;IAClC,MAAM,KAAK,GAAG,uBAAuB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAE,CAAC;IAE9B,MAAM,GAAG,GAAG,IAAI,WAAW,EAAE,CAAC;IAC9B,MAAM,WAAW,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAC1D,KAAK,EACL,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,EAClB,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,EACjC,KAAK,EACL,CAAC,MAAM,CAAC,CACT,CAAC;IAEF,MAAM,eAAe,GAAG,MAAM,UAAU,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CACzD,MAAM,EACN,WAAW,EACX,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CACpB,CAAC;IAEF,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,eAAe,CAAC,CAAC;SAC1D,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;SAC3C,IAAI,CAAC,EAAE,CAAC,CAAC;IAEZ,qDAAqD;IACrD,OAAO,iBAAiB,CAAC,SAAS,EAAE,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,SAAS,iBAAiB,CAAC,CAAS,EAAE,CAAS;IAC7C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,MAAM,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,MAAM,KAAK,CAAC,CAAC;AACtB,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@quaillogistics/inbox",
3
+ "version": "0.2.0",
4
+ "description": "TypeScript SDK for the Inbox API",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist"
17
+ ],
18
+ "scripts": {
19
+ "build": "bunx tsc",
20
+ "typecheck": "bunx tsc --noEmit",
21
+ "dev": "bunx tsc --noEmit --watch"
22
+ },
23
+ "keywords": [
24
+ "email",
25
+ "inbox",
26
+ "triage",
27
+ "sdk"
28
+ ],
29
+ "license": "MIT",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/quaillogistics/inbox.git",
33
+ "directory": "packages/sdk"
34
+ },
35
+ "devDependencies": {
36
+ "typescript": "^5.7.3"
37
+ }
38
+ }