@workwae/sdk 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (64) hide show
  1. package/README.md +7 -7
  2. package/client.d.ts +1 -1
  3. package/contract/accounts/models.d.ts +85 -45
  4. package/contract/accounts/routes.d.ts +191 -29
  5. package/contract/ai/models.d.ts +0 -1
  6. package/contract/ai/routes.d.ts +9 -0
  7. package/contract/audit-log/models.d.ts +22 -5
  8. package/contract/audit-log/routes.d.ts +11 -1
  9. package/contract/calendar/models.d.ts +249 -74
  10. package/contract/calendar/routes.d.ts +574 -30
  11. package/contract/connect/models.d.ts +30 -16
  12. package/contract/connect/routes.d.ts +51 -7
  13. package/contract/connect-domain/models.d.ts +41 -0
  14. package/contract/connect-domain/routes.d.ts +197 -0
  15. package/contract/contacts/models.d.ts +0 -10
  16. package/contract/contacts/routes.d.ts +14 -0
  17. package/contract/custom-domain.d.ts +12 -0
  18. package/contract/email-validation/models.d.ts +119 -0
  19. package/contract/email-validation/routes.d.ts +106 -0
  20. package/contract/errors.d.ts +28 -20
  21. package/contract/events/models.d.ts +139 -79
  22. package/contract/events/routes.d.ts +54 -44
  23. package/contract/exports/routes.d.ts +10 -0
  24. package/contract/identities/models.d.ts +7 -9
  25. package/contract/identities/routes.d.ts +79 -10
  26. package/contract/limits.d.ts +27 -73
  27. package/contract/mail/models.d.ts +230 -50
  28. package/contract/mail/routes.d.ts +649 -59
  29. package/contract/mcp-keys/models.d.ts +125 -0
  30. package/contract/mcp-keys/routes.d.ts +151 -0
  31. package/contract/meetings/models.d.ts +39 -33
  32. package/contract/meetings/routes.d.ts +121 -23
  33. package/contract/oauth-apps/models.d.ts +6 -6
  34. package/contract/oauth-apps/routes.d.ts +34 -4
  35. package/contract/org-connections/models.d.ts +93 -39
  36. package/contract/org-connections/routes.d.ts +352 -43
  37. package/contract/plans/credit-packs.d.ts +30 -0
  38. package/contract/plans/models.d.ts +208 -0
  39. package/contract/primitives.d.ts +7 -62
  40. package/contract/public.d.ts +7 -0
  41. package/contract/reasons.d.ts +559 -21
  42. package/contract/router.d.ts +6447 -2719
  43. package/contract/scheduling/models.d.ts +405 -0
  44. package/contract/scheduling/routes.d.ts +756 -0
  45. package/contract/send/models.d.ts +140 -45
  46. package/contract/send/routes.d.ts +310 -31
  47. package/contract/settings/models.d.ts +73 -13
  48. package/contract/settings/routes.d.ts +56 -4
  49. package/contract/suppressions/models.d.ts +21 -28
  50. package/contract/suppressions/routes.d.ts +62 -14
  51. package/contract/templates/models.d.ts +0 -14
  52. package/contract/templates/routes.d.ts +30 -6
  53. package/contract/threads/models.d.ts +0 -5
  54. package/contract/threads/routes.d.ts +40 -0
  55. package/contract/tracking-domain/models.d.ts +41 -0
  56. package/contract/tracking-domain/routes.d.ts +193 -0
  57. package/contract/usage/models.d.ts +98 -126
  58. package/contract/usage/routes.d.ts +48 -20
  59. package/contract/webhooks/models.d.ts +45 -30
  60. package/contract/webhooks/routes.d.ts +52 -9
  61. package/contract/webhooks/signing.d.ts +0 -16
  62. package/index.js +1 -4334
  63. package/package.json +6 -7
  64. package/index.js.map +0 -59
@@ -45,7 +45,6 @@ export declare const Compose: z.ZodObject<{
45
45
  }>>;
46
46
  }, z.core.$strip>;
47
47
  export type Compose = z.infer<typeof Compose>;
48
- /** What composing with templates adds to a draft or a send. */
49
48
  export declare const ComposeWithTemplate: z.ZodObject<{
50
49
  to: z.ZodDefault<z.ZodArray<z.ZodObject<{
51
50
  name: z.ZodOptional<z.ZodString>;
@@ -119,6 +118,8 @@ export declare const OutboxEntry: z.ZodObject<{
119
118
  providerMessageId: z.ZodNullable<z.ZodString>;
120
119
  internetMessageId: z.ZodNullable<z.ZodString>;
121
120
  sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
121
+ sentMessageId: z.ZodNullable<z.ZodUUID>;
122
+ threadId: z.ZodNullable<z.ZodString>;
122
123
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
123
124
  trackOpens: z.ZodBoolean;
124
125
  trackClicks: z.ZodBoolean;
@@ -129,9 +130,9 @@ export declare const OutboxEntry: z.ZodObject<{
129
130
  machineClickCount: z.ZodNumber;
130
131
  firstOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
131
132
  lastOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
133
+ mailMergeId: z.ZodNullable<z.ZodUUID>;
132
134
  }, z.core.$strip>;
133
135
  export type OutboxEntry = z.infer<typeof OutboxEntry>;
134
- /** What queueing a send answers: the entry, and until when cancelling it undoes the send. */
135
136
  export declare const QueuedSend: z.ZodObject<{
136
137
  id: z.ZodUUID;
137
138
  accountId: z.ZodUUID;
@@ -149,6 +150,8 @@ export declare const QueuedSend: z.ZodObject<{
149
150
  providerMessageId: z.ZodNullable<z.ZodString>;
150
151
  internetMessageId: z.ZodNullable<z.ZodString>;
151
152
  sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
153
+ sentMessageId: z.ZodNullable<z.ZodUUID>;
154
+ threadId: z.ZodNullable<z.ZodString>;
152
155
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
153
156
  trackOpens: z.ZodBoolean;
154
157
  trackClicks: z.ZodBoolean;
@@ -159,18 +162,16 @@ export declare const QueuedSend: z.ZodObject<{
159
162
  machineClickCount: z.ZodNumber;
160
163
  firstOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
161
164
  lastOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
165
+ mailMergeId: z.ZodNullable<z.ZodUUID>;
162
166
  undoUntil: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
163
167
  }, z.core.$strip>;
164
168
  export type QueuedSend = z.infer<typeof QueuedSend>;
165
- /** Per-send tracking; an omitted key follows the account's trackOpens / trackClicks /
166
- * trackingHoneypot. `honeypot` only comes with click tracking: true with clicks off is refused. */
167
169
  export declare const SendTracking: z.ZodObject<{
168
170
  opens: z.ZodOptional<z.ZodBoolean>;
169
171
  clicks: z.ZodOptional<z.ZodBoolean>;
170
172
  honeypot: z.ZodOptional<z.ZodBoolean>;
171
173
  }, z.core.$strip>;
172
174
  export type SendTracking = z.infer<typeof SendTracking>;
173
- /** How and when a send or draft-send goes out. */
174
175
  export declare const SendOptions: z.ZodObject<{
175
176
  sendAt: z.ZodOptional<z.ZodPreprocess<z.ZodDate, string | Date>>;
176
177
  reference: z.ZodOptional<z.ZodString>;
@@ -181,8 +182,42 @@ export declare const SendOptions: z.ZodObject<{
181
182
  }, z.core.$strip>>;
182
183
  }, z.core.$strip>;
183
184
  export type SendOptions = z.infer<typeof SendOptions>;
184
- /** One recipient of a mail merge. Checked one by one, so a bad entry fails alone (see
185
- * MailMergeResult); `to.address` and `messageId` are therefore not refused by the schema. */
185
+ export declare const MESSAGE_ID_PATTERN: RegExp;
186
+ export declare const SEND_HEADER_NAMES: readonly [
187
+ "List-Unsubscribe",
188
+ "List-Unsubscribe-Post",
189
+ "List-Id",
190
+ "List-Help",
191
+ "List-Subscribe",
192
+ "List-Post",
193
+ "List-Owner",
194
+ "List-Archive",
195
+ "Auto-Submitted",
196
+ "Precedence",
197
+ "In-Reply-To",
198
+ "References",
199
+ "Feedback-ID",
200
+ "Keywords",
201
+ "Disposition-Notification-To"
202
+ ];
203
+ export declare function isSendHeaderAllowed(name: string): boolean;
204
+ export declare function hasControlCharacters(value: string): boolean;
205
+ export declare const SendHeaders: z.ZodRecord<z.ZodString, z.ZodString>;
206
+ export type SendHeaders = z.infer<typeof SendHeaders>;
207
+ export declare const CalendarInvite: z.ZodObject<{
208
+ method: z.ZodEnum<{
209
+ PUBLISH: "PUBLISH";
210
+ REQUEST: "REQUEST";
211
+ REPLY: "REPLY";
212
+ ADD: "ADD";
213
+ CANCEL: "CANCEL";
214
+ REFRESH: "REFRESH";
215
+ COUNTER: "COUNTER";
216
+ DECLINECOUNTER: "DECLINECOUNTER";
217
+ }>;
218
+ content: z.ZodString;
219
+ }, z.core.$strip>;
220
+ export type CalendarInvite = z.infer<typeof CalendarInvite>;
186
221
  export declare const MailMergeEntry: z.ZodObject<{
187
222
  to: z.ZodObject<{
188
223
  name: z.ZodOptional<z.ZodString>;
@@ -247,9 +282,24 @@ export declare const SendMessageRequest: z.ZodObject<{
247
282
  honeypot: z.ZodOptional<z.ZodBoolean>;
248
283
  }, z.core.$strip>>;
249
284
  listId: z.ZodOptional<z.ZodString>;
285
+ messageId: z.ZodOptional<z.ZodString>;
286
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
287
+ calendar: z.ZodOptional<z.ZodObject<{
288
+ method: z.ZodEnum<{
289
+ PUBLISH: "PUBLISH";
290
+ REQUEST: "REQUEST";
291
+ REPLY: "REPLY";
292
+ ADD: "ADD";
293
+ CANCEL: "CANCEL";
294
+ REFRESH: "REFRESH";
295
+ COUNTER: "COUNTER";
296
+ DECLINECOUNTER: "DECLINECOUNTER";
297
+ }>;
298
+ content: z.ZodString;
299
+ }, z.core.$strip>>;
300
+ wait: z.ZodOptional<z.ZodNumber>;
250
301
  }, z.core.$strip>;
251
302
  export type SendMessageRequest = z.infer<typeof SendMessageRequest>;
252
- /** The send body without to, cc, bcc and render: an unknown field is refused. */
253
303
  export declare const MailMergeRequest: z.ZodObject<{
254
304
  format: z.ZodOptional<z.ZodEnum<{
255
305
  markdown: "markdown";
@@ -323,30 +373,8 @@ export declare const MailMergeFailure: z.ZodObject<{
323
373
  status: z.ZodNumber;
324
374
  }, z.core.$strip>;
325
375
  export type MailMergeFailure = z.infer<typeof MailMergeFailure>;
326
- export declare const MailMergeResult: z.ZodDiscriminatedUnion<[z.ZodObject<{
327
- success: z.ZodLiteral<true>;
328
- to: z.ZodObject<{
329
- name: z.ZodNullable<z.ZodString>;
330
- address: z.ZodString;
331
- }, z.core.$strip>;
332
- outboxId: z.ZodUUID;
333
- messageId: z.ZodString;
334
- sendAt: z.ZodPreprocess<z.ZodDate, Date>;
335
- undoUntil: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
336
- }, z.core.$strip>, z.ZodObject<{
337
- success: z.ZodLiteral<false>;
338
- to: z.ZodObject<{
339
- name: z.ZodNullable<z.ZodString>;
340
- address: z.ZodString;
341
- }, z.core.$strip>;
342
- reason: z.ZodString;
343
- error: z.ZodString;
344
- status: z.ZodNumber;
345
- }, z.core.$strip>], "success">;
346
- export type MailMergeResult = z.infer<typeof MailMergeResult>;
347
- /** What a mail merge answers: one result per entry, in the order given. */
348
- export declare const MailMergeResultList: z.ZodObject<{
349
- items: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
376
+ export declare const MailMergeResult: z.ZodDiscriminatedUnion<[
377
+ z.ZodObject<{
350
378
  success: z.ZodLiteral<true>;
351
379
  to: z.ZodObject<{
352
380
  name: z.ZodNullable<z.ZodString>;
@@ -356,7 +384,8 @@ export declare const MailMergeResultList: z.ZodObject<{
356
384
  messageId: z.ZodString;
357
385
  sendAt: z.ZodPreprocess<z.ZodDate, Date>;
358
386
  undoUntil: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
359
- }, z.core.$strip>, z.ZodObject<{
387
+ }, z.core.$strip>,
388
+ z.ZodObject<{
360
389
  success: z.ZodLiteral<false>;
361
390
  to: z.ZodObject<{
362
391
  name: z.ZodNullable<z.ZodString>;
@@ -365,9 +394,83 @@ export declare const MailMergeResultList: z.ZodObject<{
365
394
  reason: z.ZodString;
366
395
  error: z.ZodString;
367
396
  status: z.ZodNumber;
368
- }, z.core.$strip>], "success">>;
397
+ }, z.core.$strip>
398
+ ], "success">;
399
+ export type MailMergeResult = z.infer<typeof MailMergeResult>;
400
+ export declare const MailMergeResultList: z.ZodObject<{
401
+ items: z.ZodArray<z.ZodDiscriminatedUnion<[
402
+ z.ZodObject<{
403
+ success: z.ZodLiteral<true>;
404
+ to: z.ZodObject<{
405
+ name: z.ZodNullable<z.ZodString>;
406
+ address: z.ZodString;
407
+ }, z.core.$strip>;
408
+ outboxId: z.ZodUUID;
409
+ messageId: z.ZodString;
410
+ sendAt: z.ZodPreprocess<z.ZodDate, Date>;
411
+ undoUntil: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
412
+ }, z.core.$strip>,
413
+ z.ZodObject<{
414
+ success: z.ZodLiteral<false>;
415
+ to: z.ZodObject<{
416
+ name: z.ZodNullable<z.ZodString>;
417
+ address: z.ZodString;
418
+ }, z.core.$strip>;
419
+ reason: z.ZodString;
420
+ error: z.ZodString;
421
+ status: z.ZodNumber;
422
+ }, z.core.$strip>
423
+ ], "success">>;
424
+ id: z.ZodNullable<z.ZodUUID>;
369
425
  }, z.core.$strip>;
370
426
  export type MailMergeResultList = z.infer<typeof MailMergeResultList>;
427
+ export declare const MailMerge: z.ZodObject<{
428
+ id: z.ZodUUID;
429
+ accountId: z.ZodUUID;
430
+ reference: z.ZodNullable<z.ZodString>;
431
+ entryCount: z.ZodNumber;
432
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
433
+ counts: z.ZodObject<{
434
+ queued: z.ZodNumber;
435
+ sending: z.ZodNumber;
436
+ sent: z.ZodNumber;
437
+ failed: z.ZodNumber;
438
+ cancelled: z.ZodNumber;
439
+ }, z.core.$strip>;
440
+ }, z.core.$strip>;
441
+ export type MailMerge = z.infer<typeof MailMerge>;
442
+ export declare const MailMergeIdInput: z.ZodObject<{
443
+ accountId: z.ZodUUID;
444
+ mailMergeId: z.ZodUUID;
445
+ }, z.core.$strip>;
446
+ export type MailMergeIdInput = z.infer<typeof MailMergeIdInput>;
447
+ export declare const MailMergePage: z.ZodObject<{
448
+ items: z.ZodArray<z.ZodObject<{
449
+ id: z.ZodUUID;
450
+ accountId: z.ZodUUID;
451
+ reference: z.ZodNullable<z.ZodString>;
452
+ entryCount: z.ZodNumber;
453
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
454
+ counts: z.ZodObject<{
455
+ queued: z.ZodNumber;
456
+ sending: z.ZodNumber;
457
+ sent: z.ZodNumber;
458
+ failed: z.ZodNumber;
459
+ cancelled: z.ZodNumber;
460
+ }, z.core.$strip>;
461
+ }, z.core.$strip>>;
462
+ nextCursor: z.ZodNullable<z.ZodString>;
463
+ }, z.core.$strip>;
464
+ export type MailMergePage = z.infer<typeof MailMergePage>;
465
+ export declare const ListMailMergesQuery: z.ZodObject<{
466
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
467
+ cursor: z.ZodOptional<z.ZodString>;
468
+ }, z.core.$strip>;
469
+ export type ListMailMergesQuery = z.infer<typeof ListMailMergesQuery>;
470
+ export declare const MailMergeCancelled: z.ZodObject<{
471
+ cancelled: z.ZodNumber;
472
+ }, z.core.$strip>;
473
+ export type MailMergeCancelled = z.infer<typeof MailMergeCancelled>;
371
474
  export declare const OutboxIdInput: z.ZodObject<{
372
475
  accountId: z.ZodUUID;
373
476
  outboxId: z.ZodUUID;
@@ -391,6 +494,8 @@ export declare const OutboxEntryPage: z.ZodObject<{
391
494
  providerMessageId: z.ZodNullable<z.ZodString>;
392
495
  internetMessageId: z.ZodNullable<z.ZodString>;
393
496
  sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
497
+ sentMessageId: z.ZodNullable<z.ZodUUID>;
498
+ threadId: z.ZodNullable<z.ZodString>;
394
499
  createdAt: z.ZodPreprocess<z.ZodDate, Date>;
395
500
  trackOpens: z.ZodBoolean;
396
501
  trackClicks: z.ZodBoolean;
@@ -401,6 +506,7 @@ export declare const OutboxEntryPage: z.ZodObject<{
401
506
  machineClickCount: z.ZodNumber;
402
507
  firstOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
403
508
  lastOpenedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
509
+ mailMergeId: z.ZodNullable<z.ZodUUID>;
404
510
  }, z.core.$strip>>;
405
511
  nextCursor: z.ZodNullable<z.ZodString>;
406
512
  }, z.core.$strip>;
@@ -431,9 +537,6 @@ export declare const TrackingEventKind: z.ZodEnum<{
431
537
  click: "click";
432
538
  }>;
433
539
  export type TrackingEventKind = z.infer<typeof TrackingEventKind>;
434
- /** Who is behind a hit. proxy: fetches for a person who opened the message (Gmail's image
435
- * proxy); prefetch: fetches whether or not anyone reads it (Apple Mail Privacy Protection);
436
- * scanner: a security gateway or bot; unknown: some signal against a person, not enough to say. */
437
540
  export declare const TrackingActor: z.ZodEnum<{
438
541
  unknown: "unknown";
439
542
  human: "human";
@@ -442,10 +545,6 @@ export declare const TrackingActor: z.ZodEnum<{
442
545
  scanner: "scanner";
443
546
  }>;
444
547
  export type TrackingActor = z.infer<typeof TrackingActor>;
445
- /** The mail client behind a hit, from its user agent, the Referer / Origin host it came from and
446
- * the fingerprint rules it matched. gmail_proxy: Gmail's image proxy (the reader's own device is
447
- * hidden); apple_mail_privacy: Apple Mail loading through Mail Privacy Protection's relay;
448
- * webmail: a self-hosted webmail (Roundcube, SOGo, Horde, a webmail.* host). */
449
548
  export declare const TrackingClient: z.ZodEnum<{
450
549
  unknown: "unknown";
451
550
  gmail_proxy: "gmail_proxy";
@@ -493,7 +592,6 @@ export declare const TrackingBrowser: z.ZodEnum<{
493
592
  samsung: "samsung";
494
593
  }>;
495
594
  export type TrackingBrowser = z.infer<typeof TrackingBrowser>;
496
- /** Fetch metadata the browser sent (sec-fetch-*), lower-cased; null where absent. */
497
595
  export declare const TrackingSecFetch: z.ZodObject<{
498
596
  dest: z.ZodNullable<z.ZodString>;
499
597
  mode: z.ZodNullable<z.ZodString>;
@@ -501,8 +599,6 @@ export declare const TrackingSecFetch: z.ZodObject<{
501
599
  user: z.ZodNullable<z.ZodBoolean>;
502
600
  }, z.core.$strip>;
503
601
  export type TrackingSecFetch = z.infer<typeof TrackingSecFetch>;
504
- /** What a hit's request showed, derived when it was recorded; carried by the list API and by
505
- * message.opened / message.clicked. */
506
602
  export declare const TrackingSignals: z.ZodObject<{
507
603
  method: z.ZodString;
508
604
  refererHost: z.ZodNullable<z.ZodString>;
@@ -570,7 +666,6 @@ export declare const TrackingSignals: z.ZodObject<{
570
666
  }, z.core.$strip>;
571
667
  }, z.core.$strip>;
572
668
  export type TrackingSignals = z.infer<typeof TrackingSignals>;
573
- /** One pixel load or link follow of a tracked send. */
574
669
  export declare const TrackingEvent: z.ZodObject<{
575
670
  headers: z.ZodRecord<z.ZodString, z.ZodString>;
576
671
  method: z.ZodString;