@workwae/sdk 0.0.0-stage → 0.1.0-alpha.2

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 (65) hide show
  1. package/README.md +233 -2
  2. package/client.d.ts +36 -0
  3. package/contract/accounts/models.d.ts +766 -0
  4. package/contract/accounts/routes.d.ts +1480 -0
  5. package/contract/ai/models.d.ts +29 -0
  6. package/contract/ai/routes.d.ts +98 -0
  7. package/contract/audit-log/models.d.ts +121 -0
  8. package/contract/audit-log/routes.d.ts +81 -0
  9. package/contract/calendar/models.d.ts +1012 -0
  10. package/contract/calendar/routes.d.ts +1843 -0
  11. package/contract/connect/models.d.ts +284 -0
  12. package/contract/connect/routes.d.ts +570 -0
  13. package/contract/contacts/models.d.ts +259 -0
  14. package/contract/contacts/routes.d.ts +648 -0
  15. package/contract/email-validation/models.d.ts +119 -0
  16. package/contract/email-validation/routes.d.ts +106 -0
  17. package/contract/errors.d.ts +116 -0
  18. package/contract/events/models.d.ts +2424 -0
  19. package/contract/events/routes.d.ts +117 -0
  20. package/contract/exports/models.d.ts +67 -0
  21. package/contract/exports/routes.d.ts +206 -0
  22. package/contract/identities/models.d.ts +98 -0
  23. package/contract/identities/routes.d.ts +318 -0
  24. package/contract/limits.d.ts +118 -0
  25. package/contract/mail/models.d.ts +571 -0
  26. package/contract/mail/routes.d.ts +1189 -0
  27. package/contract/mcp-keys/models.d.ts +125 -0
  28. package/contract/mcp-keys/routes.d.ts +151 -0
  29. package/contract/meetings/models.d.ts +227 -0
  30. package/contract/meetings/routes.d.ts +405 -0
  31. package/contract/oauth-apps/models.d.ts +86 -0
  32. package/contract/oauth-apps/routes.d.ts +195 -0
  33. package/contract/org-connections/models.d.ts +427 -0
  34. package/contract/org-connections/routes.d.ts +1107 -0
  35. package/contract/plans/credit-packs.d.ts +30 -0
  36. package/contract/plans/models.d.ts +208 -0
  37. package/contract/primitives.d.ts +85 -0
  38. package/contract/public.d.ts +32 -0
  39. package/contract/reasons.d.ts +1222 -0
  40. package/contract/router.d.ts +12986 -0
  41. package/contract/scheduling/models.d.ts +405 -0
  42. package/contract/scheduling/routes.d.ts +756 -0
  43. package/contract/send/models.d.ts +787 -0
  44. package/contract/send/routes.d.ts +1488 -0
  45. package/contract/settings/models.d.ts +163 -0
  46. package/contract/settings/routes.d.ts +162 -0
  47. package/contract/suppressions/models.d.ts +224 -0
  48. package/contract/suppressions/routes.d.ts +365 -0
  49. package/contract/templates/models.d.ts +155 -0
  50. package/contract/templates/routes.d.ts +305 -0
  51. package/contract/threads/models.d.ts +112 -0
  52. package/contract/threads/routes.d.ts +376 -0
  53. package/contract/tracking-domain/models.d.ts +41 -0
  54. package/contract/tracking-domain/routes.d.ts +193 -0
  55. package/contract/usage/models.d.ts +185 -0
  56. package/contract/usage/routes.d.ts +109 -0
  57. package/contract/webhooks/models.d.ts +894 -0
  58. package/contract/webhooks/routes.d.ts +882 -0
  59. package/contract/webhooks/signing.d.ts +19 -0
  60. package/errors.d.ts +15 -0
  61. package/index.d.ts +6 -0
  62. package/index.js +1 -0
  63. package/package.json +44 -4
  64. package/pagination.d.ts +40 -0
  65. package/webhooks.d.ts +28 -0
@@ -0,0 +1,185 @@
1
+ import * as z from "zod";
2
+ export declare const BillingPeriod: z.ZodObject<{
3
+ start: z.ZodPreprocess<z.ZodDate, Date>;
4
+ end: z.ZodPreprocess<z.ZodDate, Date>;
5
+ firstDay: z.ZodISODate;
6
+ }, z.core.$strip>;
7
+ export type BillingPeriod = z.infer<typeof BillingPeriod>;
8
+ export declare const EffectivePlan: z.ZodObject<{
9
+ id: z.ZodNullable<z.ZodUUID>;
10
+ name: z.ZodString;
11
+ limits: z.ZodObject<{
12
+ maxAccounts: z.ZodNullable<z.ZodNumber>;
13
+ sendsPerDay: z.ZodNullable<z.ZodNumber>;
14
+ emailValidationsPerDay: z.ZodNullable<z.ZodNumber>;
15
+ apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
16
+ apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
17
+ webhookEndpoints: z.ZodNullable<z.ZodNumber>;
18
+ bodyStorageAllowed: z.ZodBoolean;
19
+ storageBytes: z.ZodNullable<z.ZodNumber>;
20
+ included: z.ZodObject<{
21
+ mailAccounts: z.ZodNullable<z.ZodNumber>;
22
+ calendarContactsAccounts: z.ZodNullable<z.ZodNumber>;
23
+ meetingAccounts: z.ZodNullable<z.ZodNumber>;
24
+ sendsPerMonth: z.ZodNullable<z.ZodNumber>;
25
+ aiClassificationsPerMonth: z.ZodNullable<z.ZodNumber>;
26
+ aiDraftsPerMonth: z.ZodNullable<z.ZodNumber>;
27
+ storageBytes: z.ZodNullable<z.ZodNumber>;
28
+ validationCredits: z.ZodNullable<z.ZodNumber>;
29
+ }, z.core.$strip>;
30
+ pricing: z.ZodNullable<z.ZodObject<{
31
+ currency: z.ZodString;
32
+ baseMonthly: z.ZodNumber;
33
+ baseAnnual: z.ZodNullable<z.ZodNumber>;
34
+ components: z.ZodObject<{
35
+ mail: z.ZodNumber;
36
+ calendarContacts: z.ZodNumber;
37
+ ai: z.ZodNumber;
38
+ sharedMailboxes: z.ZodNumber;
39
+ meetings: z.ZodNumber;
40
+ }, z.core.$strip>;
41
+ sendsPer1k: z.ZodNumber;
42
+ aiClassificationsPer1k: z.ZodNumber;
43
+ aiDraftsPer1k: z.ZodNumber;
44
+ storagePerGbMonth: z.ZodNumber;
45
+ creditPacks: z.ZodArray<z.ZodObject<{
46
+ credits: z.ZodNumber;
47
+ amount: z.ZodNumber;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>>;
50
+ features: z.ZodObject<{
51
+ sso: z.ZodBoolean;
52
+ scim: z.ZodBoolean;
53
+ auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
54
+ sla: z.ZodBoolean;
55
+ customDpa: z.ZodBoolean;
56
+ prioritySupport: z.ZodBoolean;
57
+ }, z.core.$strip>;
58
+ }, z.core.$strip>;
59
+ }, z.core.$strip>;
60
+ export type EffectivePlan = z.infer<typeof EffectivePlan>;
61
+ export declare const UsageDay: z.ZodObject<{
62
+ day: z.ZodISODate;
63
+ liveAccounts: z.ZodNumber;
64
+ mailAccounts: z.ZodNumber;
65
+ calendarContactsAccounts: z.ZodNumber;
66
+ meetingAccounts: z.ZodNumber;
67
+ apiCalls: z.ZodRecord<z.ZodString, z.ZodNumber>;
68
+ sends: z.ZodNumber;
69
+ webhookDeliveries: z.ZodNumber;
70
+ aiClassifications: z.ZodNumber;
71
+ aiDrafts: z.ZodNumber;
72
+ emailValidations: z.ZodNumber;
73
+ storedBytes: z.ZodNullable<z.ZodNumber>;
74
+ }, z.core.$strip>;
75
+ export type UsageDay = z.infer<typeof UsageDay>;
76
+ export declare const ValidationCreditBalance: z.ZodObject<{
77
+ included: z.ZodNumber;
78
+ includedExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
79
+ purchased: z.ZodNumber;
80
+ }, z.core.$strip>;
81
+ export type ValidationCreditBalance = z.infer<typeof ValidationCreditBalance>;
82
+ export declare const CurrentUsage: z.ZodObject<{
83
+ accounts: z.ZodNumber;
84
+ webhookEndpoints: z.ZodNumber;
85
+ sendsToday: z.ZodNumber;
86
+ emailValidationsToday: z.ZodNumber;
87
+ validationCredits: z.ZodNullable<z.ZodObject<{
88
+ included: z.ZodNumber;
89
+ includedExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
90
+ purchased: z.ZodNumber;
91
+ }, z.core.$strip>>;
92
+ storedBytes: z.ZodNumber;
93
+ }, z.core.$strip>;
94
+ export type CurrentUsage = z.infer<typeof CurrentUsage>;
95
+ export declare const Usage: z.ZodObject<{
96
+ plan: z.ZodObject<{
97
+ id: z.ZodNullable<z.ZodUUID>;
98
+ name: z.ZodString;
99
+ limits: z.ZodObject<{
100
+ maxAccounts: z.ZodNullable<z.ZodNumber>;
101
+ sendsPerDay: z.ZodNullable<z.ZodNumber>;
102
+ emailValidationsPerDay: z.ZodNullable<z.ZodNumber>;
103
+ apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
104
+ apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
105
+ webhookEndpoints: z.ZodNullable<z.ZodNumber>;
106
+ bodyStorageAllowed: z.ZodBoolean;
107
+ storageBytes: z.ZodNullable<z.ZodNumber>;
108
+ included: z.ZodObject<{
109
+ mailAccounts: z.ZodNullable<z.ZodNumber>;
110
+ calendarContactsAccounts: z.ZodNullable<z.ZodNumber>;
111
+ meetingAccounts: z.ZodNullable<z.ZodNumber>;
112
+ sendsPerMonth: z.ZodNullable<z.ZodNumber>;
113
+ aiClassificationsPerMonth: z.ZodNullable<z.ZodNumber>;
114
+ aiDraftsPerMonth: z.ZodNullable<z.ZodNumber>;
115
+ storageBytes: z.ZodNullable<z.ZodNumber>;
116
+ validationCredits: z.ZodNullable<z.ZodNumber>;
117
+ }, z.core.$strip>;
118
+ pricing: z.ZodNullable<z.ZodObject<{
119
+ currency: z.ZodString;
120
+ baseMonthly: z.ZodNumber;
121
+ baseAnnual: z.ZodNullable<z.ZodNumber>;
122
+ components: z.ZodObject<{
123
+ mail: z.ZodNumber;
124
+ calendarContacts: z.ZodNumber;
125
+ ai: z.ZodNumber;
126
+ sharedMailboxes: z.ZodNumber;
127
+ meetings: z.ZodNumber;
128
+ }, z.core.$strip>;
129
+ sendsPer1k: z.ZodNumber;
130
+ aiClassificationsPer1k: z.ZodNumber;
131
+ aiDraftsPer1k: z.ZodNumber;
132
+ storagePerGbMonth: z.ZodNumber;
133
+ creditPacks: z.ZodArray<z.ZodObject<{
134
+ credits: z.ZodNumber;
135
+ amount: z.ZodNumber;
136
+ }, z.core.$strip>>;
137
+ }, z.core.$strip>>;
138
+ features: z.ZodObject<{
139
+ sso: z.ZodBoolean;
140
+ scim: z.ZodBoolean;
141
+ auditLogRetentionDays: z.ZodNullable<z.ZodNumber>;
142
+ sla: z.ZodBoolean;
143
+ customDpa: z.ZodBoolean;
144
+ prioritySupport: z.ZodBoolean;
145
+ }, z.core.$strip>;
146
+ }, z.core.$strip>;
147
+ }, z.core.$strip>;
148
+ current: z.ZodObject<{
149
+ accounts: z.ZodNumber;
150
+ webhookEndpoints: z.ZodNumber;
151
+ sendsToday: z.ZodNumber;
152
+ emailValidationsToday: z.ZodNumber;
153
+ validationCredits: z.ZodNullable<z.ZodObject<{
154
+ included: z.ZodNumber;
155
+ includedExpiresAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
156
+ purchased: z.ZodNumber;
157
+ }, z.core.$strip>>;
158
+ storedBytes: z.ZodNumber;
159
+ }, z.core.$strip>;
160
+ days: z.ZodArray<z.ZodObject<{
161
+ day: z.ZodISODate;
162
+ liveAccounts: z.ZodNumber;
163
+ mailAccounts: z.ZodNumber;
164
+ calendarContactsAccounts: z.ZodNumber;
165
+ meetingAccounts: z.ZodNumber;
166
+ apiCalls: z.ZodRecord<z.ZodString, z.ZodNumber>;
167
+ sends: z.ZodNumber;
168
+ webhookDeliveries: z.ZodNumber;
169
+ aiClassifications: z.ZodNumber;
170
+ aiDrafts: z.ZodNumber;
171
+ emailValidations: z.ZodNumber;
172
+ storedBytes: z.ZodNullable<z.ZodNumber>;
173
+ }, z.core.$strip>>;
174
+ period: z.ZodNullable<z.ZodObject<{
175
+ start: z.ZodPreprocess<z.ZodDate, Date>;
176
+ end: z.ZodPreprocess<z.ZodDate, Date>;
177
+ firstDay: z.ZodISODate;
178
+ }, z.core.$strip>>;
179
+ }, z.core.$strip>;
180
+ export type Usage = z.infer<typeof Usage>;
181
+ export declare const UsageQuery: z.ZodObject<{
182
+ from: z.ZodOptional<z.ZodISODate>;
183
+ to: z.ZodOptional<z.ZodISODate>;
184
+ }, z.core.$strip>;
185
+ export type UsageQuery = z.infer<typeof UsageQuery>;
@@ -0,0 +1,109 @@
1
+ export declare const usage: {
2
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
3
+ from: import("zod").ZodOptional<import("zod").ZodISODate>;
4
+ to: import("zod").ZodOptional<import("zod").ZodISODate>;
5
+ }, import("zod/v4/core").$strip>, import("zod").ZodObject<{
6
+ plan: import("zod").ZodObject<{
7
+ id: import("zod").ZodNullable<import("zod").ZodUUID>;
8
+ name: import("zod").ZodString;
9
+ limits: import("zod").ZodObject<{
10
+ maxAccounts: import("zod").ZodNullable<import("zod").ZodNumber>;
11
+ sendsPerDay: import("zod").ZodNullable<import("zod").ZodNumber>;
12
+ emailValidationsPerDay: import("zod").ZodNullable<import("zod").ZodNumber>;
13
+ apiCallsPerMinute: import("zod").ZodNullable<import("zod").ZodNumber>;
14
+ apiCallsPerMinutePerKey: import("zod").ZodNullable<import("zod").ZodNumber>;
15
+ webhookEndpoints: import("zod").ZodNullable<import("zod").ZodNumber>;
16
+ bodyStorageAllowed: import("zod").ZodBoolean;
17
+ storageBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
18
+ included: import("zod").ZodObject<{
19
+ mailAccounts: import("zod").ZodNullable<import("zod").ZodNumber>;
20
+ calendarContactsAccounts: import("zod").ZodNullable<import("zod").ZodNumber>;
21
+ meetingAccounts: import("zod").ZodNullable<import("zod").ZodNumber>;
22
+ sendsPerMonth: import("zod").ZodNullable<import("zod").ZodNumber>;
23
+ aiClassificationsPerMonth: import("zod").ZodNullable<import("zod").ZodNumber>;
24
+ aiDraftsPerMonth: import("zod").ZodNullable<import("zod").ZodNumber>;
25
+ storageBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
26
+ validationCredits: import("zod").ZodNullable<import("zod").ZodNumber>;
27
+ }, import("zod/v4/core").$strip>;
28
+ pricing: import("zod").ZodNullable<import("zod").ZodObject<{
29
+ currency: import("zod").ZodString;
30
+ baseMonthly: import("zod").ZodNumber;
31
+ baseAnnual: import("zod").ZodNullable<import("zod").ZodNumber>;
32
+ components: import("zod").ZodObject<{
33
+ mail: import("zod").ZodNumber;
34
+ calendarContacts: import("zod").ZodNumber;
35
+ ai: import("zod").ZodNumber;
36
+ sharedMailboxes: import("zod").ZodNumber;
37
+ meetings: import("zod").ZodNumber;
38
+ }, import("zod/v4/core").$strip>;
39
+ sendsPer1k: import("zod").ZodNumber;
40
+ aiClassificationsPer1k: import("zod").ZodNumber;
41
+ aiDraftsPer1k: import("zod").ZodNumber;
42
+ storagePerGbMonth: import("zod").ZodNumber;
43
+ creditPacks: import("zod").ZodArray<import("zod").ZodObject<{
44
+ credits: import("zod").ZodNumber;
45
+ amount: import("zod").ZodNumber;
46
+ }, import("zod/v4/core").$strip>>;
47
+ }, import("zod/v4/core").$strip>>;
48
+ features: import("zod").ZodObject<{
49
+ sso: import("zod").ZodBoolean;
50
+ scim: import("zod").ZodBoolean;
51
+ auditLogRetentionDays: import("zod").ZodNullable<import("zod").ZodNumber>;
52
+ sla: import("zod").ZodBoolean;
53
+ customDpa: import("zod").ZodBoolean;
54
+ prioritySupport: import("zod").ZodBoolean;
55
+ }, import("zod/v4/core").$strip>;
56
+ }, import("zod/v4/core").$strip>;
57
+ }, import("zod/v4/core").$strip>;
58
+ current: import("zod").ZodObject<{
59
+ accounts: import("zod").ZodNumber;
60
+ webhookEndpoints: import("zod").ZodNumber;
61
+ sendsToday: import("zod").ZodNumber;
62
+ emailValidationsToday: import("zod").ZodNumber;
63
+ validationCredits: import("zod").ZodNullable<import("zod").ZodObject<{
64
+ included: import("zod").ZodNumber;
65
+ includedExpiresAt: import("zod").ZodNullable<import("zod").ZodPreprocess<import("zod").ZodDate, Date>>;
66
+ purchased: import("zod").ZodNumber;
67
+ }, import("zod/v4/core").$strip>>;
68
+ storedBytes: import("zod").ZodNumber;
69
+ }, import("zod/v4/core").$strip>;
70
+ days: import("zod").ZodArray<import("zod").ZodObject<{
71
+ day: import("zod").ZodISODate;
72
+ liveAccounts: import("zod").ZodNumber;
73
+ mailAccounts: import("zod").ZodNumber;
74
+ calendarContactsAccounts: import("zod").ZodNumber;
75
+ meetingAccounts: import("zod").ZodNumber;
76
+ apiCalls: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>;
77
+ sends: import("zod").ZodNumber;
78
+ webhookDeliveries: import("zod").ZodNumber;
79
+ aiClassifications: import("zod").ZodNumber;
80
+ aiDrafts: import("zod").ZodNumber;
81
+ emailValidations: import("zod").ZodNumber;
82
+ storedBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
83
+ }, import("zod/v4/core").$strip>>;
84
+ period: import("zod").ZodNullable<import("zod").ZodObject<{
85
+ start: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
86
+ end: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
87
+ firstDay: import("zod").ZodISODate;
88
+ }, import("zod/v4/core").$strip>>;
89
+ }, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
90
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
91
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
92
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
93
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
94
+ readonly role_forbidden: "The member's role does not allow the operation.";
95
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
96
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
97
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
98
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
99
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
100
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
101
+ readonly payload_too_large: "The request body is larger than the API accepts.";
102
+ readonly internal_error: "An unexpected failure on our side.";
103
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
104
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
105
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
106
+ }>>, import("../errors.js").DeclaredErrors<{
107
+ readonly invalid_range: "from is after to (or after today, with to left out), or the range spans more than 366 days.";
108
+ }>>, Record<never, never>>;
109
+ };