@workwae/sdk 0.1.0-alpha.1 → 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.
- package/README.md +7 -7
- package/client.d.ts +1 -1
- package/contract/accounts/models.d.ts +85 -45
- package/contract/accounts/routes.d.ts +191 -29
- package/contract/ai/models.d.ts +0 -1
- package/contract/ai/routes.d.ts +9 -0
- package/contract/audit-log/models.d.ts +19 -5
- package/contract/audit-log/routes.d.ts +10 -1
- package/contract/calendar/models.d.ts +249 -74
- package/contract/calendar/routes.d.ts +574 -30
- package/contract/connect/models.d.ts +28 -16
- package/contract/connect/routes.d.ts +46 -7
- package/contract/contacts/models.d.ts +0 -10
- package/contract/contacts/routes.d.ts +14 -0
- package/contract/email-validation/models.d.ts +119 -0
- package/contract/email-validation/routes.d.ts +106 -0
- package/contract/errors.d.ts +28 -20
- package/contract/events/models.d.ts +139 -79
- package/contract/events/routes.d.ts +54 -44
- package/contract/exports/routes.d.ts +10 -0
- package/contract/identities/models.d.ts +7 -9
- package/contract/identities/routes.d.ts +79 -10
- package/contract/limits.d.ts +21 -73
- package/contract/mail/models.d.ts +91 -48
- package/contract/mail/routes.d.ts +458 -18
- package/contract/mcp-keys/models.d.ts +125 -0
- package/contract/mcp-keys/routes.d.ts +151 -0
- package/contract/meetings/models.d.ts +28 -33
- package/contract/meetings/routes.d.ts +44 -25
- package/contract/oauth-apps/models.d.ts +0 -6
- package/contract/oauth-apps/routes.d.ts +8 -0
- package/contract/org-connections/models.d.ts +83 -39
- package/contract/org-connections/routes.d.ts +320 -43
- package/contract/plans/credit-packs.d.ts +30 -0
- package/contract/plans/models.d.ts +208 -0
- package/contract/primitives.d.ts +7 -62
- package/contract/public.d.ts +6 -0
- package/contract/reasons.d.ts +532 -21
- package/contract/router.d.ts +6425 -3212
- package/contract/scheduling/models.d.ts +405 -0
- package/contract/scheduling/routes.d.ts +756 -0
- package/contract/send/models.d.ts +82 -45
- package/contract/send/routes.d.ts +281 -32
- package/contract/settings/models.d.ts +73 -13
- package/contract/settings/routes.d.ts +56 -4
- package/contract/suppressions/models.d.ts +21 -28
- package/contract/suppressions/routes.d.ts +62 -14
- package/contract/templates/models.d.ts +0 -14
- package/contract/templates/routes.d.ts +30 -6
- package/contract/threads/models.d.ts +0 -5
- package/contract/threads/routes.d.ts +40 -0
- package/contract/tracking-domain/models.d.ts +41 -0
- package/contract/tracking-domain/routes.d.ts +193 -0
- package/contract/usage/models.d.ts +98 -126
- package/contract/usage/routes.d.ts +48 -20
- package/contract/webhooks/models.d.ts +45 -30
- package/contract/webhooks/routes.d.ts +52 -9
- package/contract/webhooks/signing.d.ts +0 -16
- package/index.js +1 -4334
- package/package.json +6 -7
- package/index.js.map +0 -59
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
/** How an OAuth-connected mailbox is read: the provider's API, or IMAP and SMTP with XOAUTH2. */
|
|
3
2
|
export declare const MailAccess: z.ZodEnum<{
|
|
4
3
|
imap: "imap";
|
|
5
4
|
api: "api";
|
|
6
5
|
}>;
|
|
7
6
|
export type MailAccess = z.infer<typeof MailAccess>;
|
|
8
7
|
export declare const ConnectOptions: z.ZodObject<{
|
|
8
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
9
9
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
10
10
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
11
11
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -20,26 +20,18 @@ export declare const ConnectOptions: z.ZodObject<{
|
|
|
20
20
|
sharedMailboxesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
21
21
|
}, z.core.$strip>;
|
|
22
22
|
export type ConnectOptions = z.infer<typeof ConnectOptions>;
|
|
23
|
-
/** What a hosted connect page offers: an OAuth sign-in, or the IMAP/SMTP form. */
|
|
24
23
|
export declare const ConnectProvider: z.ZodEnum<{
|
|
25
24
|
google: "google";
|
|
26
25
|
microsoft: "microsoft";
|
|
27
26
|
imap: "imap";
|
|
28
27
|
}>;
|
|
29
28
|
export type ConnectProvider = z.infer<typeof ConnectProvider>;
|
|
30
|
-
/** Where a hosted session (account or meeting connect) stands. */
|
|
31
29
|
export declare const ConnectSessionStatus: z.ZodEnum<{
|
|
32
30
|
pending: "pending";
|
|
33
31
|
completed: "completed";
|
|
34
32
|
failed: "failed";
|
|
35
33
|
}>;
|
|
36
34
|
export type ConnectSessionStatus = z.infer<typeof ConnectSessionStatus>;
|
|
37
|
-
/**
|
|
38
|
-
* Why a connect flow failed: the `error` a connect redirect carries (status=error, OAuth and
|
|
39
|
-
* meeting sign-ins, administrator consent, the hosted IMAP form's plan and billing failures) and
|
|
40
|
-
* a failed session's `error`. Not an API reason: these travel in redirect URLs. Every code an
|
|
41
|
-
* OAuth failure carries is one (the API checks this where they flow into a redirect).
|
|
42
|
-
*/
|
|
43
35
|
export declare const ConnectErrorCode: z.ZodEnum<{
|
|
44
36
|
session_used: "session_used";
|
|
45
37
|
session_expired: "session_expired";
|
|
@@ -52,6 +44,7 @@ export declare const ConnectErrorCode: z.ZodEnum<{
|
|
|
52
44
|
unsupported_provider: "unsupported_provider";
|
|
53
45
|
token_exchange_failed: "token_exchange_failed";
|
|
54
46
|
invalid_client: "invalid_client";
|
|
47
|
+
interaction_required: "interaction_required";
|
|
55
48
|
invalid_grant: "invalid_grant";
|
|
56
49
|
missing_refresh_token: "missing_refresh_token";
|
|
57
50
|
scope_denied: "scope_denied";
|
|
@@ -82,7 +75,10 @@ export declare const ConnectErrorCode: z.ZodEnum<{
|
|
|
82
75
|
org_connection_not_found: "org_connection_not_found";
|
|
83
76
|
org_connection_secret_unreadable: "org_connection_secret_unreadable";
|
|
84
77
|
plan_limit_accounts: "plan_limit_accounts";
|
|
78
|
+
plan_required: "plan_required";
|
|
79
|
+
spend_cap_reached: "spend_cap_reached";
|
|
85
80
|
plan_module_unavailable: "plan_module_unavailable";
|
|
81
|
+
connect_grants_nothing: "connect_grants_nothing";
|
|
86
82
|
billing_past_due: "billing_past_due";
|
|
87
83
|
internal_error: "internal_error";
|
|
88
84
|
}>;
|
|
@@ -106,11 +102,15 @@ export declare const ConnectSessionPublic: z.ZodObject<{
|
|
|
106
102
|
failed: "failed";
|
|
107
103
|
}>;
|
|
108
104
|
reauthEmail: z.ZodNullable<z.ZodString>;
|
|
105
|
+
modules: z.ZodObject<{
|
|
106
|
+
mail: z.ZodBoolean;
|
|
107
|
+
calendar: z.ZodBoolean;
|
|
108
|
+
contacts: z.ZodBoolean;
|
|
109
|
+
}, z.core.$strip>;
|
|
109
110
|
loginHint: z.ZodNullable<z.ZodString>;
|
|
110
111
|
expiresAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
111
112
|
}, z.core.$strip>;
|
|
112
113
|
export type ConnectSessionPublic = z.infer<typeof ConnectSessionPublic>;
|
|
113
|
-
/** A hosted connect session as its creator sees it: where it stands, and what it connected. */
|
|
114
114
|
export declare const ConnectSession: z.ZodObject<{
|
|
115
115
|
id: z.ZodUUID;
|
|
116
116
|
status: z.ZodEnum<{
|
|
@@ -130,6 +130,7 @@ export declare const ConnectSession: z.ZodObject<{
|
|
|
130
130
|
unsupported_provider: "unsupported_provider";
|
|
131
131
|
token_exchange_failed: "token_exchange_failed";
|
|
132
132
|
invalid_client: "invalid_client";
|
|
133
|
+
interaction_required: "interaction_required";
|
|
133
134
|
invalid_grant: "invalid_grant";
|
|
134
135
|
missing_refresh_token: "missing_refresh_token";
|
|
135
136
|
scope_denied: "scope_denied";
|
|
@@ -160,19 +161,24 @@ export declare const ConnectSession: z.ZodObject<{
|
|
|
160
161
|
org_connection_not_found: "org_connection_not_found";
|
|
161
162
|
org_connection_secret_unreadable: "org_connection_secret_unreadable";
|
|
162
163
|
plan_limit_accounts: "plan_limit_accounts";
|
|
164
|
+
plan_required: "plan_required";
|
|
165
|
+
spend_cap_reached: "spend_cap_reached";
|
|
163
166
|
plan_module_unavailable: "plan_module_unavailable";
|
|
167
|
+
connect_grants_nothing: "connect_grants_nothing";
|
|
164
168
|
billing_past_due: "billing_past_due";
|
|
165
169
|
internal_error: "internal_error";
|
|
166
170
|
}>>;
|
|
167
171
|
accountId: z.ZodNullable<z.ZodUUID>;
|
|
168
172
|
email: z.ZodNullable<z.ZodString>;
|
|
173
|
+
mcpKeyId: z.ZodNullable<z.ZodUUID>;
|
|
174
|
+
mcpKeySkipped: z.ZodNullable<z.ZodEnum<{
|
|
175
|
+
mcp_key_limit: "mcp_key_limit";
|
|
176
|
+
}>>;
|
|
169
177
|
expiresAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
170
178
|
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
171
179
|
}, z.core.$strip>;
|
|
172
180
|
export type ConnectSession = z.infer<typeof ConnectSession>;
|
|
173
|
-
/** The `state` a redirect flow echoes back. */
|
|
174
181
|
export declare const RedirectState: z.ZodString;
|
|
175
|
-
/** How long a hosted session stays usable. */
|
|
176
182
|
export declare const SessionTtlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
177
183
|
export declare const CreateConnectSession: z.ZodObject<{
|
|
178
184
|
redirectUri: z.ZodOptional<z.ZodURL>;
|
|
@@ -196,6 +202,7 @@ export declare const CreateConnectSession: z.ZodObject<{
|
|
|
196
202
|
state: z.ZodOptional<z.ZodString>;
|
|
197
203
|
accountId: z.ZodOptional<z.ZodUUID>;
|
|
198
204
|
options: z.ZodOptional<z.ZodObject<{
|
|
205
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
199
206
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
200
207
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
201
208
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -209,10 +216,17 @@ export declare const CreateConnectSession: z.ZodObject<{
|
|
|
209
216
|
}>>;
|
|
210
217
|
sharedMailboxesEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
211
218
|
}, z.core.$strip>>;
|
|
219
|
+
mcp: z.ZodOptional<z.ZodObject<{
|
|
220
|
+
scopes: z.ZodArray<z.ZodEnum<{
|
|
221
|
+
read: "read";
|
|
222
|
+
write: "write";
|
|
223
|
+
send: "send";
|
|
224
|
+
}>>;
|
|
225
|
+
name: z.ZodDefault<z.ZodString>;
|
|
226
|
+
}, z.core.$strip>>;
|
|
212
227
|
ttlSeconds: z.ZodDefault<z.ZodNumber>;
|
|
213
228
|
}, z.core.$strip>;
|
|
214
229
|
export type CreateConnectSession = z.infer<typeof CreateConnectSession>;
|
|
215
|
-
/** A hosted session's page, to send its owner to. */
|
|
216
230
|
export declare const SessionLink: z.ZodObject<{
|
|
217
231
|
id: z.ZodUUID;
|
|
218
232
|
url: z.ZodURL;
|
|
@@ -240,6 +254,7 @@ export declare const StartOAuthRequest: z.ZodObject<{
|
|
|
240
254
|
state: z.ZodOptional<z.ZodString>;
|
|
241
255
|
accountId: z.ZodOptional<z.ZodUUID>;
|
|
242
256
|
options: z.ZodOptional<z.ZodObject<{
|
|
257
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
243
258
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
244
259
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
245
260
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -255,17 +270,14 @@ export declare const StartOAuthRequest: z.ZodObject<{
|
|
|
255
270
|
}, z.core.$strip>>;
|
|
256
271
|
}, z.core.$strip>;
|
|
257
272
|
export type StartOAuthRequest = z.infer<typeof StartOAuthRequest>;
|
|
258
|
-
/** Where to send the user to start the headless OAuth flow. */
|
|
259
273
|
export declare const OAuthAuthorization: z.ZodObject<{
|
|
260
274
|
authorizeUrl: z.ZodURL;
|
|
261
275
|
}, z.core.$strip>;
|
|
262
276
|
export type OAuthAuthorization = z.infer<typeof OAuthAuthorization>;
|
|
263
|
-
/** A hosted page's session, by the token in its URL. */
|
|
264
277
|
export declare const SessionTokenInput: z.ZodObject<{
|
|
265
278
|
token: z.ZodString;
|
|
266
279
|
}, z.core.$strip>;
|
|
267
280
|
export type SessionTokenInput = z.infer<typeof SessionTokenInput>;
|
|
268
|
-
/** Where the hosted page sends the browser next (the tenant's redirectUri). */
|
|
269
281
|
export declare const HostedImapResult: z.ZodObject<{
|
|
270
282
|
redirectUrl: z.ZodURL;
|
|
271
283
|
}, z.core.$strip>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const connectSessions: {
|
|
2
|
-
/** Hosted flow: returns a link to the hosted connect page. */
|
|
3
2
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
4
3
|
redirectUri: import("zod").ZodOptional<import("zod").ZodURL>;
|
|
5
4
|
providers: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<{
|
|
@@ -22,6 +21,7 @@ export declare const connectSessions: {
|
|
|
22
21
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
23
22
|
accountId: import("zod").ZodOptional<import("zod").ZodUUID>;
|
|
24
23
|
options: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
24
|
+
mailEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
25
25
|
calendarEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
26
26
|
contactsEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
27
27
|
bodyStorage: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -35,6 +35,14 @@ export declare const connectSessions: {
|
|
|
35
35
|
}>>;
|
|
36
36
|
sharedMailboxesEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
37
37
|
}, import("zod/v4/core").$strip>>;
|
|
38
|
+
mcp: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
39
|
+
scopes: import("zod").ZodArray<import("zod").ZodEnum<{
|
|
40
|
+
read: "read";
|
|
41
|
+
write: "write";
|
|
42
|
+
send: "send";
|
|
43
|
+
}>>;
|
|
44
|
+
name: import("zod").ZodDefault<import("zod").ZodString>;
|
|
45
|
+
}, import("zod/v4/core").$strip>>;
|
|
38
46
|
ttlSeconds: import("zod").ZodDefault<import("zod").ZodNumber>;
|
|
39
47
|
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
40
48
|
id: import("zod").ZodUUID;
|
|
@@ -47,6 +55,8 @@ export declare const connectSessions: {
|
|
|
47
55
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
48
56
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
49
57
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
58
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
59
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
50
60
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
51
61
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
52
62
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -72,10 +82,15 @@ export declare const connectSessions: {
|
|
|
72
82
|
status: 400;
|
|
73
83
|
message: string;
|
|
74
84
|
};
|
|
75
|
-
|
|
85
|
+
mcp_key_limit: {
|
|
86
|
+
status: 409;
|
|
87
|
+
message: string;
|
|
88
|
+
};
|
|
89
|
+
plan_module_unavailable: {
|
|
76
90
|
status: 403;
|
|
77
91
|
message: string;
|
|
78
92
|
};
|
|
93
|
+
plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
|
|
79
94
|
storage_unavailable: {
|
|
80
95
|
status: 400;
|
|
81
96
|
message: string;
|
|
@@ -119,6 +134,7 @@ export declare const connectSessions: {
|
|
|
119
134
|
unsupported_provider: "unsupported_provider";
|
|
120
135
|
token_exchange_failed: "token_exchange_failed";
|
|
121
136
|
invalid_client: "invalid_client";
|
|
137
|
+
interaction_required: "interaction_required";
|
|
122
138
|
invalid_grant: "invalid_grant";
|
|
123
139
|
missing_refresh_token: "missing_refresh_token";
|
|
124
140
|
scope_denied: "scope_denied";
|
|
@@ -149,12 +165,19 @@ export declare const connectSessions: {
|
|
|
149
165
|
org_connection_not_found: "org_connection_not_found";
|
|
150
166
|
org_connection_secret_unreadable: "org_connection_secret_unreadable";
|
|
151
167
|
plan_limit_accounts: "plan_limit_accounts";
|
|
168
|
+
plan_required: "plan_required";
|
|
169
|
+
spend_cap_reached: "spend_cap_reached";
|
|
152
170
|
plan_module_unavailable: "plan_module_unavailable";
|
|
171
|
+
connect_grants_nothing: "connect_grants_nothing";
|
|
153
172
|
billing_past_due: "billing_past_due";
|
|
154
173
|
internal_error: "internal_error";
|
|
155
174
|
}>>;
|
|
156
175
|
accountId: import("zod").ZodNullable<import("zod").ZodUUID>;
|
|
157
176
|
email: import("zod").ZodNullable<import("zod").ZodString>;
|
|
177
|
+
mcpKeyId: import("zod").ZodNullable<import("zod").ZodUUID>;
|
|
178
|
+
mcpKeySkipped: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
179
|
+
mcp_key_limit: "mcp_key_limit";
|
|
180
|
+
}>>;
|
|
158
181
|
expiresAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
159
182
|
createdAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
160
183
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
@@ -164,6 +187,8 @@ export declare const connectSessions: {
|
|
|
164
187
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
165
188
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
166
189
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
190
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
191
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
167
192
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
168
193
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
169
194
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -176,7 +201,6 @@ export declare const connectSessions: {
|
|
|
176
201
|
readonly connect_session_not_found: "No session has this id (or token).";
|
|
177
202
|
}>>, Record<never, never>>;
|
|
178
203
|
};
|
|
179
|
-
/** Headless flow: the URL to send the user to (see the description). */
|
|
180
204
|
export declare const oauthAuthorizations: {
|
|
181
205
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
182
206
|
provider: import("zod").ZodEnum<{
|
|
@@ -195,6 +219,7 @@ export declare const oauthAuthorizations: {
|
|
|
195
219
|
state: import("zod").ZodOptional<import("zod").ZodString>;
|
|
196
220
|
accountId: import("zod").ZodOptional<import("zod").ZodUUID>;
|
|
197
221
|
options: import("zod").ZodOptional<import("zod").ZodObject<{
|
|
222
|
+
mailEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
198
223
|
calendarEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
199
224
|
contactsEnabled: import("zod").ZodOptional<import("zod").ZodBoolean>;
|
|
200
225
|
bodyStorage: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
@@ -217,6 +242,8 @@ export declare const oauthAuthorizations: {
|
|
|
217
242
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
218
243
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
219
244
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
245
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
246
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
220
247
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
221
248
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
222
249
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -234,6 +261,10 @@ export declare const oauthAuthorizations: {
|
|
|
234
261
|
status: 400;
|
|
235
262
|
message: string;
|
|
236
263
|
};
|
|
264
|
+
connect_grants_nothing: {
|
|
265
|
+
status: 400;
|
|
266
|
+
message: string;
|
|
267
|
+
};
|
|
237
268
|
provider_not_configured: {
|
|
238
269
|
status: 400;
|
|
239
270
|
message: string;
|
|
@@ -254,10 +285,7 @@ export declare const oauthAuthorizations: {
|
|
|
254
285
|
status: 403;
|
|
255
286
|
message: string;
|
|
256
287
|
};
|
|
257
|
-
plan_limit_storage:
|
|
258
|
-
status: 403;
|
|
259
|
-
message: string;
|
|
260
|
-
};
|
|
288
|
+
plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
|
|
261
289
|
storage_unavailable: {
|
|
262
290
|
status: 400;
|
|
263
291
|
message: string;
|
|
@@ -303,6 +331,11 @@ export declare const hostedConnectSessions: {
|
|
|
303
331
|
failed: "failed";
|
|
304
332
|
}>;
|
|
305
333
|
reauthEmail: import("zod").ZodNullable<import("zod").ZodString>;
|
|
334
|
+
modules: import("zod").ZodObject<{
|
|
335
|
+
mail: import("zod").ZodBoolean;
|
|
336
|
+
calendar: import("zod").ZodBoolean;
|
|
337
|
+
contacts: import("zod").ZodBoolean;
|
|
338
|
+
}, import("zod/v4/core").$strip>;
|
|
306
339
|
loginHint: import("zod").ZodNullable<import("zod").ZodString>;
|
|
307
340
|
expiresAt: import("zod").ZodPreprocess<import("zod").ZodDate, Date>;
|
|
308
341
|
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
@@ -312,6 +345,8 @@ export declare const hostedConnectSessions: {
|
|
|
312
345
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
313
346
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
314
347
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
348
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
349
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
315
350
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
316
351
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
317
352
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -365,6 +400,8 @@ export declare const hostedConnectSessions: {
|
|
|
365
400
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
366
401
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
367
402
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
403
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
404
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
368
405
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
369
406
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
370
407
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -494,6 +531,8 @@ export declare const hostedConnectSessions: {
|
|
|
494
531
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
495
532
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
496
533
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
534
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
535
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
497
536
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
498
537
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
499
538
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -5,7 +5,6 @@ export declare const ContactEmailType: z.ZodEnum<{
|
|
|
5
5
|
other: "other";
|
|
6
6
|
}>;
|
|
7
7
|
export type ContactEmailType = z.infer<typeof ContactEmailType>;
|
|
8
|
-
/** Microsoft 365 contacts have mobile, home and work numbers only. */
|
|
9
8
|
export declare const ContactPhoneType: z.ZodEnum<{
|
|
10
9
|
home: "home";
|
|
11
10
|
work: "work";
|
|
@@ -13,7 +12,6 @@ export declare const ContactPhoneType: z.ZodEnum<{
|
|
|
13
12
|
mobile: "mobile";
|
|
14
13
|
}>;
|
|
15
14
|
export type ContactPhoneType = z.infer<typeof ContactPhoneType>;
|
|
16
|
-
/** type is null where the provider keeps none (Microsoft 365 addresses). */
|
|
17
15
|
export declare const ContactEmail: z.ZodObject<{
|
|
18
16
|
address: z.ZodString;
|
|
19
17
|
type: z.ZodNullable<z.ZodEnum<{
|
|
@@ -33,7 +31,6 @@ export declare const ContactPhone: z.ZodObject<{
|
|
|
33
31
|
}>>;
|
|
34
32
|
}, z.core.$strip>;
|
|
35
33
|
export type ContactPhone = z.infer<typeof ContactPhone>;
|
|
36
|
-
/** A Microsoft 365 contact folder. Google accounts have none (their contacts carry folderId null). */
|
|
37
34
|
export declare const ContactFolder: z.ZodObject<{
|
|
38
35
|
id: z.ZodUUID;
|
|
39
36
|
name: z.ZodString;
|
|
@@ -119,8 +116,6 @@ export declare const ContactPage: z.ZodObject<{
|
|
|
119
116
|
nextCursor: z.ZodNullable<z.ZodString>;
|
|
120
117
|
}, z.core.$strip>;
|
|
121
118
|
export type ContactPage = z.infer<typeof ContactPage>;
|
|
122
|
-
/** A contact field a contact.updated event names as changed; `photo` is the photo itself (GET
|
|
123
|
-
* .../photo), which can change while hasPhoto stays true. */
|
|
124
119
|
export declare const ContactChangedField: z.ZodEnum<{
|
|
125
120
|
displayName: "displayName";
|
|
126
121
|
folderId: "folderId";
|
|
@@ -158,8 +153,6 @@ export declare const ContactPhoneInput: z.ZodObject<{
|
|
|
158
153
|
}>>;
|
|
159
154
|
}, z.core.$strip>;
|
|
160
155
|
export type ContactPhoneInput = z.infer<typeof ContactPhoneInput>;
|
|
161
|
-
/** A new contact needs at least a name, an organization, an address or a number, so it can be
|
|
162
|
-
* found again (400 otherwise). */
|
|
163
156
|
export declare const CreateContact: z.ZodObject<{
|
|
164
157
|
folderId: z.ZodOptional<z.ZodUUID>;
|
|
165
158
|
displayName: z.ZodOptional<z.ZodString>;
|
|
@@ -191,8 +184,6 @@ export declare const CreateContact: z.ZodObject<{
|
|
|
191
184
|
notes: z.ZodOptional<z.ZodString>;
|
|
192
185
|
}, z.core.$strip>;
|
|
193
186
|
export type CreateContact = z.infer<typeof CreateContact>;
|
|
194
|
-
/** create's input: the account, and a contact with a name, an organization, an email address or
|
|
195
|
-
* a phone number (contact_unidentifiable). */
|
|
196
187
|
export declare const CreateContactInput: z.ZodObject<{
|
|
197
188
|
accountId: z.ZodUUID;
|
|
198
189
|
folderId: z.ZodOptional<z.ZodUUID>;
|
|
@@ -224,7 +215,6 @@ export declare const CreateContactInput: z.ZodObject<{
|
|
|
224
215
|
birthday: z.ZodOptional<z.ZodString>;
|
|
225
216
|
notes: z.ZodOptional<z.ZodString>;
|
|
226
217
|
}, z.core.$strip>;
|
|
227
|
-
/** Fields present change (null clears); absent fields stay. emails and phones replace the list. */
|
|
228
218
|
export declare const UpdateContact: z.ZodObject<{
|
|
229
219
|
displayName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
230
220
|
givenName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -15,6 +15,8 @@ export declare const contactFolders: {
|
|
|
15
15
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
16
16
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
17
17
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
18
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
19
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
18
20
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
19
21
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
20
22
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -87,6 +89,8 @@ export declare const contacts: {
|
|
|
87
89
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
88
90
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
89
91
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
92
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
93
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
90
94
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
91
95
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
92
96
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -159,6 +163,8 @@ export declare const contacts: {
|
|
|
159
163
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
160
164
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
161
165
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
166
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
167
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
162
168
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
163
169
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
164
170
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -195,6 +201,8 @@ export declare const contacts: {
|
|
|
195
201
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
196
202
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
197
203
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
204
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
205
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
198
206
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
199
207
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
200
208
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -334,6 +342,8 @@ export declare const contacts: {
|
|
|
334
342
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
335
343
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
336
344
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
345
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
346
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
337
347
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
338
348
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
339
349
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -481,6 +491,8 @@ export declare const contacts: {
|
|
|
481
491
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
482
492
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
483
493
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
494
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
495
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
484
496
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
485
497
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
486
498
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -565,6 +577,8 @@ export declare const contacts: {
|
|
|
565
577
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
566
578
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
567
579
|
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
580
|
+
readonly account_scope_forbidden: "A credential limited to specific accounts called an operation that reaches beyond them.";
|
|
581
|
+
readonly mcp_only_key: "An MCP-only key (minted for an end user's MCP client) was used outside the MCP server.";
|
|
568
582
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
569
583
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
570
584
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const Reachability: z.ZodEnum<{
|
|
3
|
+
unknown: "unknown";
|
|
4
|
+
safe: "safe";
|
|
5
|
+
risky: "risky";
|
|
6
|
+
invalid: "invalid";
|
|
7
|
+
}>;
|
|
8
|
+
export type Reachability = z.infer<typeof Reachability>;
|
|
9
|
+
export declare const CreateEmailValidation: z.ZodObject<{
|
|
10
|
+
addresses: z.ZodArray<z.ZodEmail>;
|
|
11
|
+
suppressInvalid: z.ZodDefault<z.ZodBoolean>;
|
|
12
|
+
refresh: z.ZodDefault<z.ZodBoolean>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
export type CreateEmailValidation = z.infer<typeof CreateEmailValidation>;
|
|
15
|
+
export declare const EmailValidationResult: z.ZodObject<{
|
|
16
|
+
address: z.ZodString;
|
|
17
|
+
reachability: z.ZodEnum<{
|
|
18
|
+
unknown: "unknown";
|
|
19
|
+
safe: "safe";
|
|
20
|
+
risky: "risky";
|
|
21
|
+
invalid: "invalid";
|
|
22
|
+
}>;
|
|
23
|
+
validSyntax: z.ZodBoolean;
|
|
24
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
25
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
26
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
27
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
28
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
29
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
30
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
31
|
+
suppressed: z.ZodBoolean;
|
|
32
|
+
cached: z.ZodBoolean;
|
|
33
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type EmailValidationResult = z.infer<typeof EmailValidationResult>;
|
|
36
|
+
export declare const EmailValidation: z.ZodObject<{
|
|
37
|
+
results: z.ZodArray<z.ZodObject<{
|
|
38
|
+
address: z.ZodString;
|
|
39
|
+
reachability: z.ZodEnum<{
|
|
40
|
+
unknown: "unknown";
|
|
41
|
+
safe: "safe";
|
|
42
|
+
risky: "risky";
|
|
43
|
+
invalid: "invalid";
|
|
44
|
+
}>;
|
|
45
|
+
validSyntax: z.ZodBoolean;
|
|
46
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
47
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
48
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
49
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
50
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
51
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
52
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
53
|
+
suppressed: z.ZodBoolean;
|
|
54
|
+
cached: z.ZodBoolean;
|
|
55
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
56
|
+
}, z.core.$strip>>;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
export type EmailValidation = z.infer<typeof EmailValidation>;
|
|
59
|
+
export declare const EmailValidationRecord: z.ZodObject<{
|
|
60
|
+
address: z.ZodString;
|
|
61
|
+
reachability: z.ZodEnum<{
|
|
62
|
+
unknown: "unknown";
|
|
63
|
+
safe: "safe";
|
|
64
|
+
risky: "risky";
|
|
65
|
+
invalid: "invalid";
|
|
66
|
+
}>;
|
|
67
|
+
validSyntax: z.ZodBoolean;
|
|
68
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
69
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
70
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
71
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
72
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
73
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
74
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
75
|
+
suppressed: z.ZodBoolean;
|
|
76
|
+
cached: z.ZodBoolean;
|
|
77
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
78
|
+
id: z.ZodUUID;
|
|
79
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
export type EmailValidationRecord = z.infer<typeof EmailValidationRecord>;
|
|
82
|
+
export declare const EmailValidationRecordPage: z.ZodObject<{
|
|
83
|
+
items: z.ZodArray<z.ZodObject<{
|
|
84
|
+
address: z.ZodString;
|
|
85
|
+
reachability: z.ZodEnum<{
|
|
86
|
+
unknown: "unknown";
|
|
87
|
+
safe: "safe";
|
|
88
|
+
risky: "risky";
|
|
89
|
+
invalid: "invalid";
|
|
90
|
+
}>;
|
|
91
|
+
validSyntax: z.ZodBoolean;
|
|
92
|
+
domainAcceptsMail: z.ZodNullable<z.ZodBoolean>;
|
|
93
|
+
deliverable: z.ZodNullable<z.ZodBoolean>;
|
|
94
|
+
disabled: z.ZodNullable<z.ZodBoolean>;
|
|
95
|
+
fullInbox: z.ZodNullable<z.ZodBoolean>;
|
|
96
|
+
catchAll: z.ZodNullable<z.ZodBoolean>;
|
|
97
|
+
disposable: z.ZodNullable<z.ZodBoolean>;
|
|
98
|
+
roleAccount: z.ZodNullable<z.ZodBoolean>;
|
|
99
|
+
suppressed: z.ZodBoolean;
|
|
100
|
+
cached: z.ZodBoolean;
|
|
101
|
+
checkedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
102
|
+
id: z.ZodUUID;
|
|
103
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
104
|
+
}, z.core.$strip>>;
|
|
105
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
106
|
+
}, z.core.$strip>;
|
|
107
|
+
export type EmailValidationRecordPage = z.infer<typeof EmailValidationRecordPage>;
|
|
108
|
+
export declare const ListEmailValidationsQuery: z.ZodObject<{
|
|
109
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
110
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
111
|
+
address: z.ZodOptional<z.ZodString>;
|
|
112
|
+
reachability: z.ZodOptional<z.ZodEnum<{
|
|
113
|
+
unknown: "unknown";
|
|
114
|
+
safe: "safe";
|
|
115
|
+
risky: "risky";
|
|
116
|
+
invalid: "invalid";
|
|
117
|
+
}>>;
|
|
118
|
+
}, z.core.$strip>;
|
|
119
|
+
export type ListEmailValidationsQuery = z.infer<typeof ListEmailValidationsQuery>;
|