@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,1107 @@
1
+ import * as z from "zod";
2
+ export declare const orgConnections: {
3
+ list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
4
+ items: z.ZodArray<z.ZodObject<{
5
+ id: z.ZodUUID;
6
+ kind: z.ZodEnum<{
7
+ google_delegation: "google_delegation";
8
+ microsoft_app: "microsoft_app";
9
+ }>;
10
+ name: z.ZodString;
11
+ clientId: z.ZodString;
12
+ status: z.ZodEnum<{
13
+ active: "active";
14
+ unverified: "unverified";
15
+ failing: "failing";
16
+ pending_consent: "pending_consent";
17
+ }>;
18
+ statusDetail: z.ZodNullable<z.ZodString>;
19
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
20
+ google: z.ZodNullable<z.ZodObject<{
21
+ domain: z.ZodString;
22
+ serviceAccountEmail: z.ZodString;
23
+ directoryAdmin: z.ZodNullable<z.ZodString>;
24
+ scopes: z.ZodArray<z.ZodString>;
25
+ groupsEnabled: z.ZodBoolean;
26
+ }, z.core.$strip>>;
27
+ microsoft: z.ZodNullable<z.ZodObject<{
28
+ cloud: z.ZodEnum<{
29
+ global: "global";
30
+ "gcc-high": "gcc-high";
31
+ dod: "dod";
32
+ china: "china";
33
+ }>;
34
+ credentialType: z.ZodEnum<{
35
+ platform: "platform";
36
+ client_secret: "client_secret";
37
+ certificate: "certificate";
38
+ }>;
39
+ directoryId: z.ZodNullable<z.ZodString>;
40
+ permissions: z.ZodArray<z.ZodObject<{
41
+ name: z.ZodString;
42
+ isRequired: z.ZodBoolean;
43
+ }, z.core.$strip>>;
44
+ }, z.core.$strip>>;
45
+ accounts: z.ZodNumber;
46
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
47
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
48
+ }, z.core.$strip>>;
49
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
50
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
51
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
52
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
53
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
54
+ readonly role_forbidden: "The member's role does not allow the operation.";
55
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
56
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
57
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
58
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
59
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
60
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
61
+ readonly payload_too_large: "The request body is larger than the API accepts.";
62
+ readonly internal_error: "An unexpected failure on our side.";
63
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
64
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
65
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
66
+ }>>, Record<never, never>>;
67
+ create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodDiscriminatedUnion<[
68
+ z.ZodObject<{
69
+ kind: z.ZodLiteral<"google_delegation">;
70
+ name: z.ZodString;
71
+ serviceAccountKey: z.ZodString;
72
+ domain: z.ZodString;
73
+ calendarEnabled: z.ZodDefault<z.ZodBoolean>;
74
+ contactsEnabled: z.ZodDefault<z.ZodBoolean>;
75
+ directoryAdmin: z.ZodOptional<z.ZodEmail>;
76
+ groupsEnabled: z.ZodDefault<z.ZodBoolean>;
77
+ }, z.core.$strip>,
78
+ z.ZodObject<{
79
+ kind: z.ZodLiteral<"microsoft_app">;
80
+ name: z.ZodString;
81
+ cloud: z.ZodDefault<z.ZodEnum<{
82
+ global: "global";
83
+ "gcc-high": "gcc-high";
84
+ dod: "dod";
85
+ china: "china";
86
+ }>>;
87
+ credential: z.ZodDiscriminatedUnion<[
88
+ z.ZodObject<{
89
+ type: z.ZodLiteral<"platform">;
90
+ }, z.core.$strip>,
91
+ z.ZodObject<{
92
+ type: z.ZodLiteral<"client_secret">;
93
+ clientId: z.ZodString;
94
+ clientSecret: z.ZodString;
95
+ }, z.core.$strip>,
96
+ z.ZodObject<{
97
+ type: z.ZodLiteral<"certificate">;
98
+ clientId: z.ZodString;
99
+ certificate: z.ZodString;
100
+ privateKey: z.ZodString;
101
+ }, z.core.$strip>
102
+ ], "type">;
103
+ directoryId: z.ZodOptional<z.ZodString>;
104
+ }, z.core.$strip>
105
+ ], "kind">, z.ZodObject<{
106
+ id: z.ZodUUID;
107
+ kind: z.ZodEnum<{
108
+ google_delegation: "google_delegation";
109
+ microsoft_app: "microsoft_app";
110
+ }>;
111
+ name: z.ZodString;
112
+ clientId: z.ZodString;
113
+ status: z.ZodEnum<{
114
+ active: "active";
115
+ unverified: "unverified";
116
+ failing: "failing";
117
+ pending_consent: "pending_consent";
118
+ }>;
119
+ statusDetail: z.ZodNullable<z.ZodString>;
120
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
121
+ google: z.ZodNullable<z.ZodObject<{
122
+ domain: z.ZodString;
123
+ serviceAccountEmail: z.ZodString;
124
+ directoryAdmin: z.ZodNullable<z.ZodString>;
125
+ scopes: z.ZodArray<z.ZodString>;
126
+ groupsEnabled: z.ZodBoolean;
127
+ }, z.core.$strip>>;
128
+ microsoft: z.ZodNullable<z.ZodObject<{
129
+ cloud: z.ZodEnum<{
130
+ global: "global";
131
+ "gcc-high": "gcc-high";
132
+ dod: "dod";
133
+ china: "china";
134
+ }>;
135
+ credentialType: z.ZodEnum<{
136
+ platform: "platform";
137
+ client_secret: "client_secret";
138
+ certificate: "certificate";
139
+ }>;
140
+ directoryId: z.ZodNullable<z.ZodString>;
141
+ permissions: z.ZodArray<z.ZodObject<{
142
+ name: z.ZodString;
143
+ isRequired: z.ZodBoolean;
144
+ }, z.core.$strip>>;
145
+ }, z.core.$strip>>;
146
+ accounts: z.ZodNumber;
147
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
148
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
149
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
150
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
151
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
152
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
153
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
154
+ readonly role_forbidden: "The member's role does not allow the operation.";
155
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
156
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
157
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
158
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
159
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
160
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
161
+ readonly payload_too_large: "The request body is larger than the API accepts.";
162
+ readonly internal_error: "An unexpected failure on our side.";
163
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
164
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
165
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
166
+ }>>, {
167
+ provider_not_configured: {
168
+ status: 400;
169
+ message: string;
170
+ };
171
+ invalid_certificate: {
172
+ status: 400;
173
+ message: string;
174
+ };
175
+ invalid_service_account_key: {
176
+ status: 400;
177
+ message: string;
178
+ };
179
+ directory_id_not_allowed: {
180
+ status: 400;
181
+ message: string;
182
+ };
183
+ }>, Record<never, never>>;
184
+ get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
185
+ connectionId: z.ZodUUID;
186
+ }, z.core.$strip>, z.ZodObject<{
187
+ id: z.ZodUUID;
188
+ kind: z.ZodEnum<{
189
+ google_delegation: "google_delegation";
190
+ microsoft_app: "microsoft_app";
191
+ }>;
192
+ name: z.ZodString;
193
+ clientId: z.ZodString;
194
+ status: z.ZodEnum<{
195
+ active: "active";
196
+ unverified: "unverified";
197
+ failing: "failing";
198
+ pending_consent: "pending_consent";
199
+ }>;
200
+ statusDetail: z.ZodNullable<z.ZodString>;
201
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
202
+ google: z.ZodNullable<z.ZodObject<{
203
+ domain: z.ZodString;
204
+ serviceAccountEmail: z.ZodString;
205
+ directoryAdmin: z.ZodNullable<z.ZodString>;
206
+ scopes: z.ZodArray<z.ZodString>;
207
+ groupsEnabled: z.ZodBoolean;
208
+ }, z.core.$strip>>;
209
+ microsoft: z.ZodNullable<z.ZodObject<{
210
+ cloud: z.ZodEnum<{
211
+ global: "global";
212
+ "gcc-high": "gcc-high";
213
+ dod: "dod";
214
+ china: "china";
215
+ }>;
216
+ credentialType: z.ZodEnum<{
217
+ platform: "platform";
218
+ client_secret: "client_secret";
219
+ certificate: "certificate";
220
+ }>;
221
+ directoryId: z.ZodNullable<z.ZodString>;
222
+ permissions: z.ZodArray<z.ZodObject<{
223
+ name: z.ZodString;
224
+ isRequired: z.ZodBoolean;
225
+ }, z.core.$strip>>;
226
+ }, z.core.$strip>>;
227
+ accounts: z.ZodNumber;
228
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
229
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
230
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
231
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
232
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
233
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
234
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
235
+ readonly role_forbidden: "The member's role does not allow the operation.";
236
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
237
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
238
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
239
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
240
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
241
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
242
+ readonly payload_too_large: "The request body is larger than the API accepts.";
243
+ readonly internal_error: "An unexpected failure on our side.";
244
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
245
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
246
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
247
+ }>>, import("../errors.js").DeclaredErrors<{
248
+ readonly org_connection_not_found: "The organization connection does not exist.";
249
+ }>>, Record<never, never>>;
250
+ update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
251
+ connectionId: z.ZodUUID;
252
+ name: z.ZodOptional<z.ZodString>;
253
+ serviceAccountKey: z.ZodOptional<z.ZodString>;
254
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
255
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
256
+ groupsEnabled: z.ZodOptional<z.ZodBoolean>;
257
+ directoryAdmin: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
258
+ clientSecret: z.ZodOptional<z.ZodString>;
259
+ certificate: z.ZodOptional<z.ZodString>;
260
+ privateKey: z.ZodOptional<z.ZodString>;
261
+ directoryId: z.ZodOptional<z.ZodString>;
262
+ }, z.core.$strip>, z.ZodObject<{
263
+ id: z.ZodUUID;
264
+ kind: z.ZodEnum<{
265
+ google_delegation: "google_delegation";
266
+ microsoft_app: "microsoft_app";
267
+ }>;
268
+ name: z.ZodString;
269
+ clientId: z.ZodString;
270
+ status: z.ZodEnum<{
271
+ active: "active";
272
+ unverified: "unverified";
273
+ failing: "failing";
274
+ pending_consent: "pending_consent";
275
+ }>;
276
+ statusDetail: z.ZodNullable<z.ZodString>;
277
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
278
+ google: z.ZodNullable<z.ZodObject<{
279
+ domain: z.ZodString;
280
+ serviceAccountEmail: z.ZodString;
281
+ directoryAdmin: z.ZodNullable<z.ZodString>;
282
+ scopes: z.ZodArray<z.ZodString>;
283
+ groupsEnabled: z.ZodBoolean;
284
+ }, z.core.$strip>>;
285
+ microsoft: z.ZodNullable<z.ZodObject<{
286
+ cloud: z.ZodEnum<{
287
+ global: "global";
288
+ "gcc-high": "gcc-high";
289
+ dod: "dod";
290
+ china: "china";
291
+ }>;
292
+ credentialType: z.ZodEnum<{
293
+ platform: "platform";
294
+ client_secret: "client_secret";
295
+ certificate: "certificate";
296
+ }>;
297
+ directoryId: z.ZodNullable<z.ZodString>;
298
+ permissions: z.ZodArray<z.ZodObject<{
299
+ name: z.ZodString;
300
+ isRequired: z.ZodBoolean;
301
+ }, z.core.$strip>>;
302
+ }, z.core.$strip>>;
303
+ accounts: z.ZodNumber;
304
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
305
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
306
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
307
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
308
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
309
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
310
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
311
+ readonly role_forbidden: "The member's role does not allow the operation.";
312
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
313
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
314
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
315
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
316
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
317
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
318
+ readonly payload_too_large: "The request body is larger than the API accepts.";
319
+ readonly internal_error: "An unexpected failure on our side.";
320
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
321
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
322
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
323
+ }>>, {
324
+ credential_mismatch: {
325
+ status: 400;
326
+ message: string;
327
+ };
328
+ invalid_certificate: {
329
+ status: 400;
330
+ message: string;
331
+ };
332
+ invalid_service_account_key: {
333
+ status: 400;
334
+ message: string;
335
+ };
336
+ directory_id_not_allowed: {
337
+ status: 400;
338
+ message: string;
339
+ };
340
+ org_connection_not_found: {
341
+ status: 404;
342
+ message: string;
343
+ };
344
+ }>, Record<never, never>>;
345
+ delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
346
+ connectionId: z.ZodUUID;
347
+ }, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
348
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
349
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
350
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
351
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
352
+ readonly role_forbidden: "The member's role does not allow the operation.";
353
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
354
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
355
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
356
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
357
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
358
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
359
+ readonly payload_too_large: "The request body is larger than the API accepts.";
360
+ readonly internal_error: "An unexpected failure on our side.";
361
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
362
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
363
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
364
+ }>>, {
365
+ connection_in_use: {
366
+ status: 409;
367
+ message: string;
368
+ };
369
+ org_connection_not_found: {
370
+ status: 404;
371
+ message: string;
372
+ };
373
+ }>, Record<never, never>>;
374
+ consent: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
375
+ connectionId: z.ZodUUID;
376
+ redirectUri: z.ZodURL;
377
+ state: z.ZodOptional<z.ZodString>;
378
+ }, z.core.$strip>, z.ZodObject<{
379
+ consentUrl: z.ZodURL;
380
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
381
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
382
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
383
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
384
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
385
+ readonly role_forbidden: "The member's role does not allow the operation.";
386
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
387
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
388
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
389
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
390
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
391
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
392
+ readonly payload_too_large: "The request body is larger than the API accepts.";
393
+ readonly internal_error: "An unexpected failure on our side.";
394
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
395
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
396
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
397
+ }>>, {
398
+ provider_not_configured: {
399
+ status: 400;
400
+ message: string;
401
+ };
402
+ session_required: {
403
+ status: 403;
404
+ message: string;
405
+ };
406
+ redirect_uri_not_allowed: {
407
+ status: 400;
408
+ message: string;
409
+ };
410
+ not_microsoft: {
411
+ status: 400;
412
+ message: string;
413
+ };
414
+ org_connection_not_found: {
415
+ status: 404;
416
+ message: string;
417
+ };
418
+ }>, Record<never, never>>;
419
+ test: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
420
+ connectionId: z.ZodUUID;
421
+ user: z.ZodOptional<z.ZodEmail>;
422
+ }, z.core.$strip>, z.ZodObject<{
423
+ connection: z.ZodObject<{
424
+ id: z.ZodUUID;
425
+ kind: z.ZodEnum<{
426
+ google_delegation: "google_delegation";
427
+ microsoft_app: "microsoft_app";
428
+ }>;
429
+ name: z.ZodString;
430
+ clientId: z.ZodString;
431
+ status: z.ZodEnum<{
432
+ active: "active";
433
+ unverified: "unverified";
434
+ failing: "failing";
435
+ pending_consent: "pending_consent";
436
+ }>;
437
+ statusDetail: z.ZodNullable<z.ZodString>;
438
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
439
+ google: z.ZodNullable<z.ZodObject<{
440
+ domain: z.ZodString;
441
+ serviceAccountEmail: z.ZodString;
442
+ directoryAdmin: z.ZodNullable<z.ZodString>;
443
+ scopes: z.ZodArray<z.ZodString>;
444
+ groupsEnabled: z.ZodBoolean;
445
+ }, z.core.$strip>>;
446
+ microsoft: z.ZodNullable<z.ZodObject<{
447
+ cloud: z.ZodEnum<{
448
+ global: "global";
449
+ "gcc-high": "gcc-high";
450
+ dod: "dod";
451
+ china: "china";
452
+ }>;
453
+ credentialType: z.ZodEnum<{
454
+ platform: "platform";
455
+ client_secret: "client_secret";
456
+ certificate: "certificate";
457
+ }>;
458
+ directoryId: z.ZodNullable<z.ZodString>;
459
+ permissions: z.ZodArray<z.ZodObject<{
460
+ name: z.ZodString;
461
+ isRequired: z.ZodBoolean;
462
+ }, z.core.$strip>>;
463
+ }, z.core.$strip>>;
464
+ accounts: z.ZodNumber;
465
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
466
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
467
+ }, z.core.$strip>;
468
+ checks: z.ZodArray<z.ZodObject<{
469
+ name: z.ZodString;
470
+ isOk: z.ZodBoolean;
471
+ isRequired: z.ZodBoolean;
472
+ detail: z.ZodString;
473
+ }, z.core.$strip>>;
474
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
475
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
476
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
477
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
478
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
479
+ readonly role_forbidden: "The member's role does not allow the operation.";
480
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
481
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
482
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
483
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
484
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
485
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
486
+ readonly payload_too_large: "The request body is larger than the API accepts.";
487
+ readonly internal_error: "An unexpected failure on our side.";
488
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
489
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
490
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
491
+ }>>, {
492
+ user_required: {
493
+ status: 400;
494
+ message: string;
495
+ };
496
+ consent_required: {
497
+ status: 409;
498
+ message: string;
499
+ };
500
+ org_connection_not_found: {
501
+ status: 404;
502
+ message: string;
503
+ };
504
+ }>, Record<never, never>>;
505
+ directoryEntries: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
506
+ connectionId: z.ZodUUID;
507
+ cursor: z.ZodOptional<z.ZodString>;
508
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
509
+ query: z.ZodOptional<z.ZodString>;
510
+ }, z.core.$strip>, z.ZodObject<{
511
+ items: z.ZodArray<z.ZodObject<{
512
+ id: z.ZodString;
513
+ email: z.ZodString;
514
+ displayName: z.ZodNullable<z.ZodString>;
515
+ accountId: z.ZodNullable<z.ZodUUID>;
516
+ }, z.core.$strip>>;
517
+ nextCursor: z.ZodNullable<z.ZodString>;
518
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
519
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
520
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
521
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
522
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
523
+ readonly role_forbidden: "The member's role does not allow the operation.";
524
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
525
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
526
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
527
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
528
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
529
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
530
+ readonly payload_too_large: "The request body is larger than the API accepts.";
531
+ readonly internal_error: "An unexpected failure on our side.";
532
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
533
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
534
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
535
+ }>>, {
536
+ directory_unavailable: {
537
+ status: 409;
538
+ message: string;
539
+ };
540
+ provider_not_found: {
541
+ status: 404;
542
+ message: string;
543
+ };
544
+ provider_rejected: {
545
+ status: 400;
546
+ message: string;
547
+ };
548
+ provider_unavailable: {
549
+ status: 502;
550
+ message: string;
551
+ };
552
+ provider_throttled: {
553
+ status: 429;
554
+ message: string;
555
+ };
556
+ invalid_cursor: {
557
+ status: 400;
558
+ message: string;
559
+ };
560
+ consent_required: {
561
+ status: 409;
562
+ message: string;
563
+ };
564
+ org_connection_not_found: {
565
+ status: 404;
566
+ message: string;
567
+ };
568
+ }>, Record<never, never>>;
569
+ addAccounts: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
570
+ connectionId: z.ZodUUID;
571
+ mailboxes: z.ZodArray<z.ZodObject<{
572
+ email: z.ZodEmail;
573
+ displayName: z.ZodOptional<z.ZodString>;
574
+ externalRef: z.ZodOptional<z.ZodString>;
575
+ }, z.core.$strip>>;
576
+ settings: z.ZodOptional<z.ZodObject<{
577
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
578
+ none: "none";
579
+ cache: "cache";
580
+ full: "full";
581
+ }>>;
582
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
583
+ mailEnabled: z.ZodOptional<z.ZodBoolean>;
584
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
585
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
586
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
587
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
588
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
589
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
590
+ suppressionCheck: z.ZodOptional<z.ZodEnum<{
591
+ lists: "lists";
592
+ always: "always";
593
+ }>>;
594
+ sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
595
+ }, z.core.$strip>>;
596
+ }, z.core.$strip>, z.ZodObject<{
597
+ items: z.ZodArray<z.ZodObject<{
598
+ email: z.ZodString;
599
+ status: z.ZodEnum<{
600
+ failed: "failed";
601
+ created: "created";
602
+ exists: "exists";
603
+ }>;
604
+ accountId: z.ZodNullable<z.ZodUUID>;
605
+ error: z.ZodNullable<z.ZodObject<{
606
+ reason: z.ZodString;
607
+ message: z.ZodString;
608
+ }, z.core.$strip>>;
609
+ }, z.core.$strip>>;
610
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
611
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
612
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
613
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
614
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
615
+ readonly role_forbidden: "The member's role does not allow the operation.";
616
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
617
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
618
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
619
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
620
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
621
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
622
+ readonly payload_too_large: "The request body is larger than the API accepts.";
623
+ readonly internal_error: "An unexpected failure on our side.";
624
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
625
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
626
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
627
+ }>>, {
628
+ billing_past_due: {
629
+ status: 402;
630
+ message: string;
631
+ };
632
+ plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
633
+ storage_unavailable: {
634
+ status: 400;
635
+ message: string;
636
+ };
637
+ consent_required: {
638
+ status: 409;
639
+ message: string;
640
+ };
641
+ org_connection_not_found: {
642
+ status: 404;
643
+ message: string;
644
+ };
645
+ }>, Record<never, never>>;
646
+ addGroup: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
647
+ connectionId: z.ZodUUID;
648
+ email: z.ZodEmail;
649
+ relayEmail: z.ZodEmail;
650
+ displayName: z.ZodOptional<z.ZodString>;
651
+ externalRef: z.ZodOptional<z.ZodString>;
652
+ settings: z.ZodOptional<z.ZodObject<{
653
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
654
+ none: "none";
655
+ cache: "cache";
656
+ full: "full";
657
+ }>>;
658
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
659
+ mailEnabled: z.ZodOptional<z.ZodBoolean>;
660
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
661
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
662
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
663
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
664
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
665
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
666
+ suppressionCheck: z.ZodOptional<z.ZodEnum<{
667
+ lists: "lists";
668
+ always: "always";
669
+ }>>;
670
+ sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
671
+ }, z.core.$strip>>;
672
+ }, z.core.$strip>, z.ZodObject<{
673
+ id: z.ZodUUID;
674
+ externalRef: z.ZodNullable<z.ZodString>;
675
+ provider: z.ZodEnum<{
676
+ gmail: "gmail";
677
+ graph: "graph";
678
+ imap: "imap";
679
+ }>;
680
+ email: z.ZodString;
681
+ displayName: z.ZodNullable<z.ZodString>;
682
+ oauthAppId: z.ZodNullable<z.ZodUUID>;
683
+ cloud: z.ZodNullable<z.ZodEnum<{
684
+ global: "global";
685
+ "gcc-high": "gcc-high";
686
+ dod: "dod";
687
+ china: "china";
688
+ }>>;
689
+ status: z.ZodEnum<{
690
+ active: "active";
691
+ paused: "paused";
692
+ reauth_required: "reauth_required";
693
+ disabled: "disabled";
694
+ }>;
695
+ statusReason: z.ZodNullable<z.ZodString>;
696
+ settings: z.ZodObject<{
697
+ bodyStorage: z.ZodEnum<{
698
+ none: "none";
699
+ cache: "cache";
700
+ full: "full";
701
+ }>;
702
+ syncWindowDays: z.ZodNullable<z.ZodNumber>;
703
+ mailEnabled: z.ZodBoolean;
704
+ calendarEnabled: z.ZodBoolean;
705
+ contactsEnabled: z.ZodBoolean;
706
+ undoSendSeconds: z.ZodNumber;
707
+ trackOpens: z.ZodBoolean;
708
+ trackClicks: z.ZodBoolean;
709
+ trackingHoneypot: z.ZodBoolean;
710
+ suppressionCheck: z.ZodEnum<{
711
+ lists: "lists";
712
+ always: "always";
713
+ }>;
714
+ sendsPerMinute: z.ZodNullable<z.ZodNumber>;
715
+ }, z.core.$strip>;
716
+ settingsOverride: z.ZodObject<{
717
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
718
+ none: "none";
719
+ cache: "cache";
720
+ full: "full";
721
+ }>>;
722
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
723
+ mailEnabled: z.ZodOptional<z.ZodBoolean>;
724
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
725
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
726
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
727
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
728
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
729
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
730
+ suppressionCheck: z.ZodOptional<z.ZodEnum<{
731
+ lists: "lists";
732
+ always: "always";
733
+ }>>;
734
+ sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
735
+ }, z.core.$strip>;
736
+ runtime: z.ZodNullable<z.ZodObject<{
737
+ state: z.ZodEnum<{
738
+ error: "error";
739
+ pending: "pending";
740
+ connecting: "connecting";
741
+ connected: "connected";
742
+ stopped: "stopped";
743
+ }>;
744
+ detail: z.ZodNullable<z.ZodString>;
745
+ ownerInstanceId: z.ZodNullable<z.ZodUUID>;
746
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
747
+ }, z.core.$strip>>;
748
+ imap: z.ZodNullable<z.ZodObject<{
749
+ imap: z.ZodObject<{
750
+ host: z.ZodString;
751
+ port: z.ZodNumber;
752
+ security: z.ZodEnum<{
753
+ none: "none";
754
+ tls: "tls";
755
+ starttls: "starttls";
756
+ }>;
757
+ user: z.ZodString;
758
+ }, z.core.$strip>;
759
+ smtp: z.ZodNullable<z.ZodObject<{
760
+ host: z.ZodString;
761
+ port: z.ZodNumber;
762
+ security: z.ZodEnum<{
763
+ none: "none";
764
+ tls: "tls";
765
+ starttls: "starttls";
766
+ }>;
767
+ user: z.ZodString;
768
+ }, z.core.$strip>>;
769
+ auth: z.ZodEnum<{
770
+ google: "google";
771
+ microsoft: "microsoft";
772
+ password: "password";
773
+ }>;
774
+ appendSent: z.ZodBoolean;
775
+ dav: z.ZodNullable<z.ZodObject<{
776
+ calendarUrl: z.ZodNullable<z.ZodString>;
777
+ contactsUrl: z.ZodNullable<z.ZodString>;
778
+ user: z.ZodString;
779
+ auth: z.ZodEnum<{
780
+ imap_password: "imap_password";
781
+ dav_password: "dav_password";
782
+ }>;
783
+ }, z.core.$strip>>;
784
+ }, z.core.$strip>>;
785
+ auth: z.ZodObject<{
786
+ method: z.ZodEnum<{
787
+ password: "password";
788
+ oauth: "oauth";
789
+ google_delegation: "google_delegation";
790
+ microsoft_app: "microsoft_app";
791
+ shared_mailbox: "shared_mailbox";
792
+ google_group: "google_group";
793
+ }>;
794
+ orgConnectionId: z.ZodNullable<z.ZodUUID>;
795
+ delegateAccountId: z.ZodNullable<z.ZodUUID>;
796
+ relayEmail: z.ZodNullable<z.ZodEmail>;
797
+ }, z.core.$strip>;
798
+ initializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
799
+ calendarInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
800
+ contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
801
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
802
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
803
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
804
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
805
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
806
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
807
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
808
+ readonly role_forbidden: "The member's role does not allow the operation.";
809
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
810
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
811
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
812
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
813
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
814
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
815
+ readonly payload_too_large: "The request body is larger than the API accepts.";
816
+ readonly internal_error: "An unexpected failure on our side.";
817
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
818
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
819
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
820
+ }>>, {
821
+ account_exists: {
822
+ status: 409;
823
+ message: string;
824
+ };
825
+ scope_missing: {
826
+ status: 400;
827
+ message: string;
828
+ };
829
+ group_unsupported: {
830
+ status: 400;
831
+ message: string;
832
+ };
833
+ group_relay_inaccessible: {
834
+ status: 422;
835
+ message: string;
836
+ };
837
+ group_alias_unverified: {
838
+ status: 409;
839
+ message: string;
840
+ };
841
+ provider_unavailable: {
842
+ status: 502;
843
+ message: string;
844
+ };
845
+ provider_throttled: {
846
+ status: 429;
847
+ message: string;
848
+ };
849
+ billing_past_due: {
850
+ status: 402;
851
+ message: string;
852
+ };
853
+ plan_limit_accounts: import("../errors.js").DeclaredError<"plan_limit_accounts">;
854
+ plan_required: import("../errors.js").DeclaredError<"plan_required">;
855
+ spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
856
+ plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
857
+ storage_unavailable: {
858
+ status: 400;
859
+ message: string;
860
+ };
861
+ plan_module_unavailable: {
862
+ status: 403;
863
+ message: string;
864
+ };
865
+ org_connection_not_found: {
866
+ status: 404;
867
+ message: string;
868
+ };
869
+ }>, Record<never, never>>;
870
+ };
871
+ export declare const sharedMailboxes: {
872
+ create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
873
+ accountId: z.ZodUUID;
874
+ email: z.ZodEmail;
875
+ displayName: z.ZodOptional<z.ZodString>;
876
+ externalRef: z.ZodOptional<z.ZodString>;
877
+ settings: z.ZodOptional<z.ZodObject<{
878
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
879
+ none: "none";
880
+ cache: "cache";
881
+ full: "full";
882
+ }>>;
883
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
884
+ mailEnabled: z.ZodOptional<z.ZodBoolean>;
885
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
886
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
887
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
888
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
889
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
890
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
891
+ suppressionCheck: z.ZodOptional<z.ZodEnum<{
892
+ lists: "lists";
893
+ always: "always";
894
+ }>>;
895
+ sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
896
+ }, z.core.$strip>>;
897
+ }, z.core.$strip>, z.ZodObject<{
898
+ id: z.ZodUUID;
899
+ externalRef: z.ZodNullable<z.ZodString>;
900
+ provider: z.ZodEnum<{
901
+ gmail: "gmail";
902
+ graph: "graph";
903
+ imap: "imap";
904
+ }>;
905
+ email: z.ZodString;
906
+ displayName: z.ZodNullable<z.ZodString>;
907
+ oauthAppId: z.ZodNullable<z.ZodUUID>;
908
+ cloud: z.ZodNullable<z.ZodEnum<{
909
+ global: "global";
910
+ "gcc-high": "gcc-high";
911
+ dod: "dod";
912
+ china: "china";
913
+ }>>;
914
+ status: z.ZodEnum<{
915
+ active: "active";
916
+ paused: "paused";
917
+ reauth_required: "reauth_required";
918
+ disabled: "disabled";
919
+ }>;
920
+ statusReason: z.ZodNullable<z.ZodString>;
921
+ settings: z.ZodObject<{
922
+ bodyStorage: z.ZodEnum<{
923
+ none: "none";
924
+ cache: "cache";
925
+ full: "full";
926
+ }>;
927
+ syncWindowDays: z.ZodNullable<z.ZodNumber>;
928
+ mailEnabled: z.ZodBoolean;
929
+ calendarEnabled: z.ZodBoolean;
930
+ contactsEnabled: z.ZodBoolean;
931
+ undoSendSeconds: z.ZodNumber;
932
+ trackOpens: z.ZodBoolean;
933
+ trackClicks: z.ZodBoolean;
934
+ trackingHoneypot: z.ZodBoolean;
935
+ suppressionCheck: z.ZodEnum<{
936
+ lists: "lists";
937
+ always: "always";
938
+ }>;
939
+ sendsPerMinute: z.ZodNullable<z.ZodNumber>;
940
+ }, z.core.$strip>;
941
+ settingsOverride: z.ZodObject<{
942
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
943
+ none: "none";
944
+ cache: "cache";
945
+ full: "full";
946
+ }>>;
947
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
948
+ mailEnabled: z.ZodOptional<z.ZodBoolean>;
949
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
950
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
951
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
952
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
953
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
954
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
955
+ suppressionCheck: z.ZodOptional<z.ZodEnum<{
956
+ lists: "lists";
957
+ always: "always";
958
+ }>>;
959
+ sendsPerMinute: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
960
+ }, z.core.$strip>;
961
+ runtime: z.ZodNullable<z.ZodObject<{
962
+ state: z.ZodEnum<{
963
+ error: "error";
964
+ pending: "pending";
965
+ connecting: "connecting";
966
+ connected: "connected";
967
+ stopped: "stopped";
968
+ }>;
969
+ detail: z.ZodNullable<z.ZodString>;
970
+ ownerInstanceId: z.ZodNullable<z.ZodUUID>;
971
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
972
+ }, z.core.$strip>>;
973
+ imap: z.ZodNullable<z.ZodObject<{
974
+ imap: z.ZodObject<{
975
+ host: z.ZodString;
976
+ port: z.ZodNumber;
977
+ security: z.ZodEnum<{
978
+ none: "none";
979
+ tls: "tls";
980
+ starttls: "starttls";
981
+ }>;
982
+ user: z.ZodString;
983
+ }, z.core.$strip>;
984
+ smtp: z.ZodNullable<z.ZodObject<{
985
+ host: z.ZodString;
986
+ port: z.ZodNumber;
987
+ security: z.ZodEnum<{
988
+ none: "none";
989
+ tls: "tls";
990
+ starttls: "starttls";
991
+ }>;
992
+ user: z.ZodString;
993
+ }, z.core.$strip>>;
994
+ auth: z.ZodEnum<{
995
+ google: "google";
996
+ microsoft: "microsoft";
997
+ password: "password";
998
+ }>;
999
+ appendSent: z.ZodBoolean;
1000
+ dav: z.ZodNullable<z.ZodObject<{
1001
+ calendarUrl: z.ZodNullable<z.ZodString>;
1002
+ contactsUrl: z.ZodNullable<z.ZodString>;
1003
+ user: z.ZodString;
1004
+ auth: z.ZodEnum<{
1005
+ imap_password: "imap_password";
1006
+ dav_password: "dav_password";
1007
+ }>;
1008
+ }, z.core.$strip>>;
1009
+ }, z.core.$strip>>;
1010
+ auth: z.ZodObject<{
1011
+ method: z.ZodEnum<{
1012
+ password: "password";
1013
+ oauth: "oauth";
1014
+ google_delegation: "google_delegation";
1015
+ microsoft_app: "microsoft_app";
1016
+ shared_mailbox: "shared_mailbox";
1017
+ google_group: "google_group";
1018
+ }>;
1019
+ orgConnectionId: z.ZodNullable<z.ZodUUID>;
1020
+ delegateAccountId: z.ZodNullable<z.ZodUUID>;
1021
+ relayEmail: z.ZodNullable<z.ZodEmail>;
1022
+ }, z.core.$strip>;
1023
+ initializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
1024
+ calendarInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
1025
+ contactsInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
1026
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
1027
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
1028
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
1029
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
1030
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
1031
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
1032
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
1033
+ readonly role_forbidden: "The member's role does not allow the operation.";
1034
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
1035
+ readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
1036
+ readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
1037
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
1038
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
1039
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
1040
+ readonly payload_too_large: "The request body is larger than the API accepts.";
1041
+ readonly internal_error: "An unexpected failure on our side.";
1042
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
1043
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
1044
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
1045
+ }>>, {
1046
+ account_exists: {
1047
+ status: 409;
1048
+ message: string;
1049
+ };
1050
+ account_not_found: {
1051
+ status: 404;
1052
+ message: string;
1053
+ };
1054
+ shared_mailbox_unsupported: {
1055
+ status: 400;
1056
+ message: string;
1057
+ };
1058
+ scope_missing: {
1059
+ status: 400;
1060
+ message: string;
1061
+ };
1062
+ shared_mailbox_inaccessible: {
1063
+ status: 422;
1064
+ message: string;
1065
+ };
1066
+ provider_unavailable: {
1067
+ status: 502;
1068
+ message: string;
1069
+ };
1070
+ provider_throttled: {
1071
+ status: 429;
1072
+ message: string;
1073
+ };
1074
+ account_paused: {
1075
+ status: 409;
1076
+ message: string;
1077
+ };
1078
+ account_disabled: {
1079
+ status: 409;
1080
+ message: string;
1081
+ };
1082
+ account_reauth_required: {
1083
+ status: 409;
1084
+ message: string;
1085
+ };
1086
+ account_misconfigured: {
1087
+ status: 409;
1088
+ message: string;
1089
+ };
1090
+ billing_past_due: {
1091
+ status: 402;
1092
+ message: string;
1093
+ };
1094
+ plan_limit_accounts: import("../errors.js").DeclaredError<"plan_limit_accounts">;
1095
+ plan_required: import("../errors.js").DeclaredError<"plan_required">;
1096
+ spend_cap_reached: import("../errors.js").DeclaredError<"spend_cap_reached">;
1097
+ plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
1098
+ storage_unavailable: {
1099
+ status: 400;
1100
+ message: string;
1101
+ };
1102
+ plan_module_unavailable: {
1103
+ status: 403;
1104
+ message: string;
1105
+ };
1106
+ }>, Record<never, never>>;
1107
+ };