@workwae/sdk 0.1.0-alpha.1 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +22 -5
- package/contract/audit-log/routes.d.ts +11 -1
- package/contract/calendar/models.d.ts +249 -74
- package/contract/calendar/routes.d.ts +574 -30
- package/contract/connect/models.d.ts +30 -16
- package/contract/connect/routes.d.ts +51 -7
- package/contract/connect-domain/models.d.ts +41 -0
- package/contract/connect-domain/routes.d.ts +197 -0
- package/contract/contacts/models.d.ts +0 -10
- package/contract/contacts/routes.d.ts +14 -0
- package/contract/custom-domain.d.ts +12 -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 +27 -73
- package/contract/mail/models.d.ts +230 -50
- package/contract/mail/routes.d.ts +649 -59
- package/contract/mcp-keys/models.d.ts +125 -0
- package/contract/mcp-keys/routes.d.ts +151 -0
- package/contract/meetings/models.d.ts +39 -33
- package/contract/meetings/routes.d.ts +121 -23
- package/contract/oauth-apps/models.d.ts +6 -6
- package/contract/oauth-apps/routes.d.ts +34 -4
- package/contract/org-connections/models.d.ts +93 -39
- package/contract/org-connections/routes.d.ts +352 -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 +7 -0
- package/contract/reasons.d.ts +559 -21
- package/contract/router.d.ts +6447 -2719
- package/contract/scheduling/models.d.ts +405 -0
- package/contract/scheduling/routes.d.ts +756 -0
- package/contract/send/models.d.ts +140 -45
- package/contract/send/routes.d.ts +310 -31
- 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
package/contract/reasons.d.ts
CHANGED
|
@@ -1,31 +1,51 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
/** The HTTP statuses API errors answer with. */
|
|
3
2
|
export type ErrorStatus = 400 | 401 | 402 | 403 | 404 | 409 | 410 | 413 | 422 | 429 | 500 | 502 | 503 | 507;
|
|
4
3
|
export interface ReasonDefinition {
|
|
5
4
|
readonly status: ErrorStatus;
|
|
6
|
-
/** The schema of the error's `data`, for a reason that carries structured extras. */
|
|
7
5
|
readonly data?: z.ZodType;
|
|
8
6
|
}
|
|
9
7
|
export type ReasonTable = Record<string, ReasonDefinition>;
|
|
10
|
-
/** One input problem: where in the input (`path`, empty for the input as a whole) and what. */
|
|
11
8
|
export declare const InputIssue: z.ZodObject<{
|
|
12
|
-
path: z.ZodArray<z.ZodUnion<readonly [
|
|
9
|
+
path: z.ZodArray<z.ZodUnion<readonly [
|
|
10
|
+
z.ZodString,
|
|
11
|
+
z.ZodNumber
|
|
12
|
+
]>>;
|
|
13
13
|
message: z.ZodString;
|
|
14
14
|
}, z.core.$strip>;
|
|
15
15
|
export type InputIssue = z.infer<typeof InputIssue>;
|
|
16
16
|
export declare const InvalidInputData: z.ZodObject<{
|
|
17
17
|
issues: z.ZodArray<z.ZodObject<{
|
|
18
|
-
path: z.ZodArray<z.ZodUnion<readonly [
|
|
18
|
+
path: z.ZodArray<z.ZodUnion<readonly [
|
|
19
|
+
z.ZodString,
|
|
20
|
+
z.ZodNumber
|
|
21
|
+
]>>;
|
|
19
22
|
message: z.ZodString;
|
|
20
23
|
}, z.core.$strip>>;
|
|
21
24
|
}, z.core.$strip>;
|
|
22
25
|
export type InvalidInputData = z.infer<typeof InvalidInputData>;
|
|
23
|
-
/** The ids a request named that the tenant does not have. */
|
|
24
26
|
export declare const UnknownIdsData: z.ZodObject<{
|
|
25
27
|
ids: z.ZodArray<z.ZodUUID>;
|
|
26
28
|
}, z.core.$strip>;
|
|
27
29
|
export type UnknownIdsData = z.infer<typeof UnknownIdsData>;
|
|
28
|
-
|
|
30
|
+
export declare const SuppressedData: z.ZodObject<{
|
|
31
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type SuppressedData = z.infer<typeof SuppressedData>;
|
|
34
|
+
export declare const SyncKindsData: z.ZodObject<{
|
|
35
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
36
|
+
mail: "mail";
|
|
37
|
+
calendar: "calendar";
|
|
38
|
+
contacts: "contacts";
|
|
39
|
+
}>>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type SyncKindsData = z.infer<typeof SyncKindsData>;
|
|
42
|
+
export declare const PlanFeatureData: z.ZodObject<{
|
|
43
|
+
feature: z.ZodEnum<{
|
|
44
|
+
sso: "sso";
|
|
45
|
+
scim: "scim";
|
|
46
|
+
}>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type PlanFeatureData = z.infer<typeof PlanFeatureData>;
|
|
29
49
|
export declare const TemplateFieldData: z.ZodObject<{
|
|
30
50
|
field: z.ZodEnum<{
|
|
31
51
|
text: "text";
|
|
@@ -35,12 +55,140 @@ export declare const TemplateFieldData: z.ZodObject<{
|
|
|
35
55
|
}>;
|
|
36
56
|
}, z.core.$strip>;
|
|
37
57
|
export type TemplateFieldData = z.infer<typeof TemplateFieldData>;
|
|
58
|
+
export declare const SsoRequiredData: z.ZodObject<{
|
|
59
|
+
providerId: z.ZodString;
|
|
60
|
+
organization: z.ZodString;
|
|
61
|
+
}, z.core.$strip>;
|
|
62
|
+
export type SsoRequiredData = z.infer<typeof SsoRequiredData>;
|
|
63
|
+
export declare const PLAN_LIMIT_KINDS: readonly [
|
|
64
|
+
"mail_accounts",
|
|
65
|
+
"calendar_contacts_accounts",
|
|
66
|
+
"meeting_accounts",
|
|
67
|
+
"accounts",
|
|
68
|
+
"sends_per_day",
|
|
69
|
+
"sends_per_month",
|
|
70
|
+
"webhook_endpoints",
|
|
71
|
+
"validations_per_day",
|
|
72
|
+
"storage_bytes",
|
|
73
|
+
"body_storage",
|
|
74
|
+
"ai_classifications",
|
|
75
|
+
"ai_drafts",
|
|
76
|
+
"validation_credits",
|
|
77
|
+
"spend_cap",
|
|
78
|
+
"plan"
|
|
79
|
+
];
|
|
80
|
+
export declare const PlanLimitKind: z.ZodEnum<{
|
|
81
|
+
accounts: "accounts";
|
|
82
|
+
mail_accounts: "mail_accounts";
|
|
83
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
84
|
+
meeting_accounts: "meeting_accounts";
|
|
85
|
+
sends_per_day: "sends_per_day";
|
|
86
|
+
sends_per_month: "sends_per_month";
|
|
87
|
+
webhook_endpoints: "webhook_endpoints";
|
|
88
|
+
validations_per_day: "validations_per_day";
|
|
89
|
+
storage_bytes: "storage_bytes";
|
|
90
|
+
body_storage: "body_storage";
|
|
91
|
+
ai_classifications: "ai_classifications";
|
|
92
|
+
ai_drafts: "ai_drafts";
|
|
93
|
+
validation_credits: "validation_credits";
|
|
94
|
+
spend_cap: "spend_cap";
|
|
95
|
+
plan: "plan";
|
|
96
|
+
}>;
|
|
97
|
+
export type PlanLimitKind = z.infer<typeof PlanLimitKind>;
|
|
98
|
+
export declare const PlanLimitData: z.ZodObject<{
|
|
99
|
+
limit: z.ZodEnum<{
|
|
100
|
+
accounts: "accounts";
|
|
101
|
+
mail_accounts: "mail_accounts";
|
|
102
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
103
|
+
meeting_accounts: "meeting_accounts";
|
|
104
|
+
sends_per_day: "sends_per_day";
|
|
105
|
+
sends_per_month: "sends_per_month";
|
|
106
|
+
webhook_endpoints: "webhook_endpoints";
|
|
107
|
+
validations_per_day: "validations_per_day";
|
|
108
|
+
storage_bytes: "storage_bytes";
|
|
109
|
+
body_storage: "body_storage";
|
|
110
|
+
ai_classifications: "ai_classifications";
|
|
111
|
+
ai_drafts: "ai_drafts";
|
|
112
|
+
validation_credits: "validation_credits";
|
|
113
|
+
spend_cap: "spend_cap";
|
|
114
|
+
plan: "plan";
|
|
115
|
+
}>;
|
|
116
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
117
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
118
|
+
upgradeUrl: z.ZodString;
|
|
119
|
+
}, z.core.$strip>;
|
|
120
|
+
export type PlanLimitData = z.infer<typeof PlanLimitData>;
|
|
121
|
+
export declare const ValidationCreditsData: z.ZodObject<{
|
|
122
|
+
limit: z.ZodEnum<{
|
|
123
|
+
accounts: "accounts";
|
|
124
|
+
mail_accounts: "mail_accounts";
|
|
125
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
126
|
+
meeting_accounts: "meeting_accounts";
|
|
127
|
+
sends_per_day: "sends_per_day";
|
|
128
|
+
sends_per_month: "sends_per_month";
|
|
129
|
+
webhook_endpoints: "webhook_endpoints";
|
|
130
|
+
validations_per_day: "validations_per_day";
|
|
131
|
+
storage_bytes: "storage_bytes";
|
|
132
|
+
body_storage: "body_storage";
|
|
133
|
+
ai_classifications: "ai_classifications";
|
|
134
|
+
ai_drafts: "ai_drafts";
|
|
135
|
+
validation_credits: "validation_credits";
|
|
136
|
+
spend_cap: "spend_cap";
|
|
137
|
+
plan: "plan";
|
|
138
|
+
}>;
|
|
139
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
140
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
141
|
+
upgradeUrl: z.ZodString;
|
|
142
|
+
balance: z.ZodNumber;
|
|
143
|
+
needed: z.ZodNumber;
|
|
144
|
+
}, z.core.$strip>;
|
|
145
|
+
export type ValidationCreditsData = z.infer<typeof ValidationCreditsData>;
|
|
146
|
+
export declare const LIMIT_DATA_REASONS: readonly [
|
|
147
|
+
"plan_limit_accounts",
|
|
148
|
+
"plan_limit_sends",
|
|
149
|
+
"plan_limit_validations",
|
|
150
|
+
"plan_limit_ai",
|
|
151
|
+
"plan_limit_webhooks",
|
|
152
|
+
"plan_limit_storage",
|
|
153
|
+
"plan_required",
|
|
154
|
+
"validation_credits_exhausted",
|
|
155
|
+
"spend_cap_reached"
|
|
156
|
+
];
|
|
157
|
+
export type LimitDataReason = (typeof LIMIT_DATA_REASONS)[number];
|
|
158
|
+
export declare const LIMIT_HIT_REASONS: readonly [
|
|
159
|
+
"plan_limit_accounts",
|
|
160
|
+
"plan_limit_sends",
|
|
161
|
+
"plan_limit_validations",
|
|
162
|
+
"plan_limit_ai",
|
|
163
|
+
"plan_limit_webhooks",
|
|
164
|
+
"plan_limit_storage",
|
|
165
|
+
"plan_required",
|
|
166
|
+
"validation_credits_exhausted",
|
|
167
|
+
"spend_cap_reached",
|
|
168
|
+
"plan_feature_unavailable"
|
|
169
|
+
];
|
|
170
|
+
export declare const LimitHitReason: z.ZodEnum<{
|
|
171
|
+
plan_limit_accounts: "plan_limit_accounts";
|
|
172
|
+
plan_required: "plan_required";
|
|
173
|
+
spend_cap_reached: "spend_cap_reached";
|
|
174
|
+
plan_limit_sends: "plan_limit_sends";
|
|
175
|
+
plan_limit_validations: "plan_limit_validations";
|
|
176
|
+
plan_limit_ai: "plan_limit_ai";
|
|
177
|
+
plan_limit_webhooks: "plan_limit_webhooks";
|
|
178
|
+
plan_limit_storage: "plan_limit_storage";
|
|
179
|
+
validation_credits_exhausted: "validation_credits_exhausted";
|
|
180
|
+
plan_feature_unavailable: "plan_feature_unavailable";
|
|
181
|
+
}>;
|
|
182
|
+
export type LimitHitReason = z.infer<typeof LimitHitReason>;
|
|
38
183
|
export declare const REASONS: {
|
|
39
184
|
readonly invalid_input: {
|
|
40
185
|
readonly status: 400;
|
|
41
186
|
readonly data: z.ZodObject<{
|
|
42
187
|
issues: z.ZodArray<z.ZodObject<{
|
|
43
|
-
path: z.ZodArray<z.ZodUnion<readonly [
|
|
188
|
+
path: z.ZodArray<z.ZodUnion<readonly [
|
|
189
|
+
z.ZodString,
|
|
190
|
+
z.ZodNumber
|
|
191
|
+
]>>;
|
|
44
192
|
message: z.ZodString;
|
|
45
193
|
}, z.core.$strip>>;
|
|
46
194
|
}, z.core.$strip>;
|
|
@@ -99,6 +247,15 @@ export declare const REASONS: {
|
|
|
99
247
|
readonly account_token_forbidden: {
|
|
100
248
|
readonly status: 403;
|
|
101
249
|
};
|
|
250
|
+
readonly account_scope_forbidden: {
|
|
251
|
+
readonly status: 403;
|
|
252
|
+
};
|
|
253
|
+
readonly api_key_required: {
|
|
254
|
+
readonly status: 403;
|
|
255
|
+
};
|
|
256
|
+
readonly mcp_only_key: {
|
|
257
|
+
readonly status: 403;
|
|
258
|
+
};
|
|
102
259
|
readonly session_required: {
|
|
103
260
|
readonly status: 403;
|
|
104
261
|
};
|
|
@@ -114,24 +271,240 @@ export declare const REASONS: {
|
|
|
114
271
|
readonly console_only: {
|
|
115
272
|
readonly status: 403;
|
|
116
273
|
};
|
|
274
|
+
readonly sso_required: {
|
|
275
|
+
readonly status: 403;
|
|
276
|
+
readonly data: z.ZodObject<{
|
|
277
|
+
providerId: z.ZodString;
|
|
278
|
+
organization: z.ZodString;
|
|
279
|
+
}, z.core.$strip>;
|
|
280
|
+
};
|
|
281
|
+
readonly two_factor_required: {
|
|
282
|
+
readonly status: 403;
|
|
283
|
+
};
|
|
284
|
+
readonly session_not_fresh: {
|
|
285
|
+
readonly status: 403;
|
|
286
|
+
};
|
|
287
|
+
readonly cross_site_request: {
|
|
288
|
+
readonly status: 403;
|
|
289
|
+
};
|
|
117
290
|
readonly plan_limit_accounts: {
|
|
118
291
|
readonly status: 403;
|
|
292
|
+
readonly data: z.ZodObject<{
|
|
293
|
+
limit: z.ZodEnum<{
|
|
294
|
+
accounts: "accounts";
|
|
295
|
+
mail_accounts: "mail_accounts";
|
|
296
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
297
|
+
meeting_accounts: "meeting_accounts";
|
|
298
|
+
sends_per_day: "sends_per_day";
|
|
299
|
+
sends_per_month: "sends_per_month";
|
|
300
|
+
webhook_endpoints: "webhook_endpoints";
|
|
301
|
+
validations_per_day: "validations_per_day";
|
|
302
|
+
storage_bytes: "storage_bytes";
|
|
303
|
+
body_storage: "body_storage";
|
|
304
|
+
ai_classifications: "ai_classifications";
|
|
305
|
+
ai_drafts: "ai_drafts";
|
|
306
|
+
validation_credits: "validation_credits";
|
|
307
|
+
spend_cap: "spend_cap";
|
|
308
|
+
plan: "plan";
|
|
309
|
+
}>;
|
|
310
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
311
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
312
|
+
upgradeUrl: z.ZodString;
|
|
313
|
+
}, z.core.$strip>;
|
|
119
314
|
};
|
|
120
315
|
readonly plan_limit_sends: {
|
|
121
316
|
readonly status: 403;
|
|
317
|
+
readonly data: z.ZodObject<{
|
|
318
|
+
limit: z.ZodEnum<{
|
|
319
|
+
accounts: "accounts";
|
|
320
|
+
mail_accounts: "mail_accounts";
|
|
321
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
322
|
+
meeting_accounts: "meeting_accounts";
|
|
323
|
+
sends_per_day: "sends_per_day";
|
|
324
|
+
sends_per_month: "sends_per_month";
|
|
325
|
+
webhook_endpoints: "webhook_endpoints";
|
|
326
|
+
validations_per_day: "validations_per_day";
|
|
327
|
+
storage_bytes: "storage_bytes";
|
|
328
|
+
body_storage: "body_storage";
|
|
329
|
+
ai_classifications: "ai_classifications";
|
|
330
|
+
ai_drafts: "ai_drafts";
|
|
331
|
+
validation_credits: "validation_credits";
|
|
332
|
+
spend_cap: "spend_cap";
|
|
333
|
+
plan: "plan";
|
|
334
|
+
}>;
|
|
335
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
336
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
337
|
+
upgradeUrl: z.ZodString;
|
|
338
|
+
}, z.core.$strip>;
|
|
339
|
+
};
|
|
340
|
+
readonly plan_limit_validations: {
|
|
341
|
+
readonly status: 403;
|
|
342
|
+
readonly data: z.ZodObject<{
|
|
343
|
+
limit: z.ZodEnum<{
|
|
344
|
+
accounts: "accounts";
|
|
345
|
+
mail_accounts: "mail_accounts";
|
|
346
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
347
|
+
meeting_accounts: "meeting_accounts";
|
|
348
|
+
sends_per_day: "sends_per_day";
|
|
349
|
+
sends_per_month: "sends_per_month";
|
|
350
|
+
webhook_endpoints: "webhook_endpoints";
|
|
351
|
+
validations_per_day: "validations_per_day";
|
|
352
|
+
storage_bytes: "storage_bytes";
|
|
353
|
+
body_storage: "body_storage";
|
|
354
|
+
ai_classifications: "ai_classifications";
|
|
355
|
+
ai_drafts: "ai_drafts";
|
|
356
|
+
validation_credits: "validation_credits";
|
|
357
|
+
spend_cap: "spend_cap";
|
|
358
|
+
plan: "plan";
|
|
359
|
+
}>;
|
|
360
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
361
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
362
|
+
upgradeUrl: z.ZodString;
|
|
363
|
+
}, z.core.$strip>;
|
|
364
|
+
};
|
|
365
|
+
readonly plan_limit_ai: {
|
|
366
|
+
readonly status: 403;
|
|
367
|
+
readonly data: z.ZodObject<{
|
|
368
|
+
limit: z.ZodEnum<{
|
|
369
|
+
accounts: "accounts";
|
|
370
|
+
mail_accounts: "mail_accounts";
|
|
371
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
372
|
+
meeting_accounts: "meeting_accounts";
|
|
373
|
+
sends_per_day: "sends_per_day";
|
|
374
|
+
sends_per_month: "sends_per_month";
|
|
375
|
+
webhook_endpoints: "webhook_endpoints";
|
|
376
|
+
validations_per_day: "validations_per_day";
|
|
377
|
+
storage_bytes: "storage_bytes";
|
|
378
|
+
body_storage: "body_storage";
|
|
379
|
+
ai_classifications: "ai_classifications";
|
|
380
|
+
ai_drafts: "ai_drafts";
|
|
381
|
+
validation_credits: "validation_credits";
|
|
382
|
+
spend_cap: "spend_cap";
|
|
383
|
+
plan: "plan";
|
|
384
|
+
}>;
|
|
385
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
386
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
387
|
+
upgradeUrl: z.ZodString;
|
|
388
|
+
}, z.core.$strip>;
|
|
122
389
|
};
|
|
123
390
|
readonly plan_limit_webhooks: {
|
|
124
391
|
readonly status: 403;
|
|
392
|
+
readonly data: z.ZodObject<{
|
|
393
|
+
limit: z.ZodEnum<{
|
|
394
|
+
accounts: "accounts";
|
|
395
|
+
mail_accounts: "mail_accounts";
|
|
396
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
397
|
+
meeting_accounts: "meeting_accounts";
|
|
398
|
+
sends_per_day: "sends_per_day";
|
|
399
|
+
sends_per_month: "sends_per_month";
|
|
400
|
+
webhook_endpoints: "webhook_endpoints";
|
|
401
|
+
validations_per_day: "validations_per_day";
|
|
402
|
+
storage_bytes: "storage_bytes";
|
|
403
|
+
body_storage: "body_storage";
|
|
404
|
+
ai_classifications: "ai_classifications";
|
|
405
|
+
ai_drafts: "ai_drafts";
|
|
406
|
+
validation_credits: "validation_credits";
|
|
407
|
+
spend_cap: "spend_cap";
|
|
408
|
+
plan: "plan";
|
|
409
|
+
}>;
|
|
410
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
411
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
412
|
+
upgradeUrl: z.ZodString;
|
|
413
|
+
}, z.core.$strip>;
|
|
125
414
|
};
|
|
126
415
|
readonly plan_limit_storage: {
|
|
127
416
|
readonly status: 403;
|
|
417
|
+
readonly data: z.ZodObject<{
|
|
418
|
+
limit: z.ZodEnum<{
|
|
419
|
+
accounts: "accounts";
|
|
420
|
+
mail_accounts: "mail_accounts";
|
|
421
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
422
|
+
meeting_accounts: "meeting_accounts";
|
|
423
|
+
sends_per_day: "sends_per_day";
|
|
424
|
+
sends_per_month: "sends_per_month";
|
|
425
|
+
webhook_endpoints: "webhook_endpoints";
|
|
426
|
+
validations_per_day: "validations_per_day";
|
|
427
|
+
storage_bytes: "storage_bytes";
|
|
428
|
+
body_storage: "body_storage";
|
|
429
|
+
ai_classifications: "ai_classifications";
|
|
430
|
+
ai_drafts: "ai_drafts";
|
|
431
|
+
validation_credits: "validation_credits";
|
|
432
|
+
spend_cap: "spend_cap";
|
|
433
|
+
plan: "plan";
|
|
434
|
+
}>;
|
|
435
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
436
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
437
|
+
upgradeUrl: z.ZodString;
|
|
438
|
+
}, z.core.$strip>;
|
|
439
|
+
};
|
|
440
|
+
readonly plan_required: {
|
|
441
|
+
readonly status: 402;
|
|
442
|
+
readonly data: z.ZodObject<{
|
|
443
|
+
limit: z.ZodEnum<{
|
|
444
|
+
accounts: "accounts";
|
|
445
|
+
mail_accounts: "mail_accounts";
|
|
446
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
447
|
+
meeting_accounts: "meeting_accounts";
|
|
448
|
+
sends_per_day: "sends_per_day";
|
|
449
|
+
sends_per_month: "sends_per_month";
|
|
450
|
+
webhook_endpoints: "webhook_endpoints";
|
|
451
|
+
validations_per_day: "validations_per_day";
|
|
452
|
+
storage_bytes: "storage_bytes";
|
|
453
|
+
body_storage: "body_storage";
|
|
454
|
+
ai_classifications: "ai_classifications";
|
|
455
|
+
ai_drafts: "ai_drafts";
|
|
456
|
+
validation_credits: "validation_credits";
|
|
457
|
+
spend_cap: "spend_cap";
|
|
458
|
+
plan: "plan";
|
|
459
|
+
}>;
|
|
460
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
461
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
462
|
+
upgradeUrl: z.ZodString;
|
|
463
|
+
}, z.core.$strip>;
|
|
464
|
+
};
|
|
465
|
+
readonly spend_cap_reached: {
|
|
466
|
+
readonly status: 402;
|
|
467
|
+
readonly data: z.ZodObject<{
|
|
468
|
+
limit: z.ZodEnum<{
|
|
469
|
+
accounts: "accounts";
|
|
470
|
+
mail_accounts: "mail_accounts";
|
|
471
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
472
|
+
meeting_accounts: "meeting_accounts";
|
|
473
|
+
sends_per_day: "sends_per_day";
|
|
474
|
+
sends_per_month: "sends_per_month";
|
|
475
|
+
webhook_endpoints: "webhook_endpoints";
|
|
476
|
+
validations_per_day: "validations_per_day";
|
|
477
|
+
storage_bytes: "storage_bytes";
|
|
478
|
+
body_storage: "body_storage";
|
|
479
|
+
ai_classifications: "ai_classifications";
|
|
480
|
+
ai_drafts: "ai_drafts";
|
|
481
|
+
validation_credits: "validation_credits";
|
|
482
|
+
spend_cap: "spend_cap";
|
|
483
|
+
plan: "plan";
|
|
484
|
+
}>;
|
|
485
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
486
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
487
|
+
upgradeUrl: z.ZodString;
|
|
488
|
+
}, z.core.$strip>;
|
|
128
489
|
};
|
|
129
490
|
readonly plan_module_unavailable: {
|
|
130
491
|
readonly status: 403;
|
|
131
492
|
};
|
|
493
|
+
readonly plan_feature_unavailable: {
|
|
494
|
+
readonly status: 403;
|
|
495
|
+
readonly data: z.ZodObject<{
|
|
496
|
+
feature: z.ZodEnum<{
|
|
497
|
+
sso: "sso";
|
|
498
|
+
scim: "scim";
|
|
499
|
+
}>;
|
|
500
|
+
}, z.core.$strip>;
|
|
501
|
+
};
|
|
132
502
|
readonly storage_unavailable: {
|
|
133
503
|
readonly status: 400;
|
|
134
504
|
};
|
|
505
|
+
readonly connect_grants_nothing: {
|
|
506
|
+
readonly status: 400;
|
|
507
|
+
};
|
|
135
508
|
readonly tenant_not_found: {
|
|
136
509
|
readonly status: 404;
|
|
137
510
|
};
|
|
@@ -144,6 +517,9 @@ export declare const REASONS: {
|
|
|
144
517
|
readonly billing_unavailable: {
|
|
145
518
|
readonly status: 502;
|
|
146
519
|
};
|
|
520
|
+
readonly billing_tax_failed: {
|
|
521
|
+
readonly status: 502;
|
|
522
|
+
};
|
|
147
523
|
readonly billing_subscription_exists: {
|
|
148
524
|
readonly status: 409;
|
|
149
525
|
};
|
|
@@ -153,6 +529,66 @@ export declare const REASONS: {
|
|
|
153
529
|
readonly plan_not_billable: {
|
|
154
530
|
readonly status: 409;
|
|
155
531
|
};
|
|
532
|
+
readonly plan_not_offered: {
|
|
533
|
+
readonly status: 409;
|
|
534
|
+
};
|
|
535
|
+
readonly billing_subscription_missing: {
|
|
536
|
+
readonly status: 409;
|
|
537
|
+
};
|
|
538
|
+
readonly billing_not_active: {
|
|
539
|
+
readonly status: 409;
|
|
540
|
+
};
|
|
541
|
+
readonly billing_cancel_pending: {
|
|
542
|
+
readonly status: 409;
|
|
543
|
+
};
|
|
544
|
+
readonly plan_unchanged: {
|
|
545
|
+
readonly status: 409;
|
|
546
|
+
};
|
|
547
|
+
readonly plan_currency_mismatch: {
|
|
548
|
+
readonly status: 409;
|
|
549
|
+
};
|
|
550
|
+
readonly plan_interval_unavailable: {
|
|
551
|
+
readonly status: 409;
|
|
552
|
+
};
|
|
553
|
+
readonly plan_interval_change: {
|
|
554
|
+
readonly status: 409;
|
|
555
|
+
};
|
|
556
|
+
readonly billing_payment_failed: {
|
|
557
|
+
readonly status: 402;
|
|
558
|
+
};
|
|
559
|
+
readonly plan_change_quote_changed: {
|
|
560
|
+
readonly status: 409;
|
|
561
|
+
};
|
|
562
|
+
readonly billing_checkout_in_progress: {
|
|
563
|
+
readonly status: 409;
|
|
564
|
+
};
|
|
565
|
+
readonly validation_credits_exhausted: {
|
|
566
|
+
readonly status: 402;
|
|
567
|
+
readonly data: z.ZodObject<{
|
|
568
|
+
limit: z.ZodEnum<{
|
|
569
|
+
accounts: "accounts";
|
|
570
|
+
mail_accounts: "mail_accounts";
|
|
571
|
+
calendar_contacts_accounts: "calendar_contacts_accounts";
|
|
572
|
+
meeting_accounts: "meeting_accounts";
|
|
573
|
+
sends_per_day: "sends_per_day";
|
|
574
|
+
sends_per_month: "sends_per_month";
|
|
575
|
+
webhook_endpoints: "webhook_endpoints";
|
|
576
|
+
validations_per_day: "validations_per_day";
|
|
577
|
+
storage_bytes: "storage_bytes";
|
|
578
|
+
body_storage: "body_storage";
|
|
579
|
+
ai_classifications: "ai_classifications";
|
|
580
|
+
ai_drafts: "ai_drafts";
|
|
581
|
+
validation_credits: "validation_credits";
|
|
582
|
+
spend_cap: "spend_cap";
|
|
583
|
+
plan: "plan";
|
|
584
|
+
}>;
|
|
585
|
+
value: z.ZodNullable<z.ZodNumber>;
|
|
586
|
+
usage: z.ZodNullable<z.ZodNumber>;
|
|
587
|
+
upgradeUrl: z.ZodString;
|
|
588
|
+
balance: z.ZodNumber;
|
|
589
|
+
needed: z.ZodNumber;
|
|
590
|
+
}, z.core.$strip>;
|
|
591
|
+
};
|
|
156
592
|
readonly account_not_found: {
|
|
157
593
|
readonly status: 404;
|
|
158
594
|
};
|
|
@@ -174,12 +610,31 @@ export declare const REASONS: {
|
|
|
174
610
|
readonly account_misconfigured: {
|
|
175
611
|
readonly status: 409;
|
|
176
612
|
};
|
|
613
|
+
readonly mail_disabled: {
|
|
614
|
+
readonly status: 409;
|
|
615
|
+
};
|
|
177
616
|
readonly calendar_disabled: {
|
|
178
617
|
readonly status: 409;
|
|
179
618
|
};
|
|
180
619
|
readonly contacts_disabled: {
|
|
181
620
|
readonly status: 409;
|
|
182
621
|
};
|
|
622
|
+
readonly sync_kinds_disabled: {
|
|
623
|
+
readonly status: 409;
|
|
624
|
+
readonly data: z.ZodObject<{
|
|
625
|
+
kinds: z.ZodArray<z.ZodEnum<{
|
|
626
|
+
mail: "mail";
|
|
627
|
+
calendar: "calendar";
|
|
628
|
+
contacts: "contacts";
|
|
629
|
+
}>>;
|
|
630
|
+
}, z.core.$strip>;
|
|
631
|
+
};
|
|
632
|
+
readonly mcp_key_not_found: {
|
|
633
|
+
readonly status: 404;
|
|
634
|
+
};
|
|
635
|
+
readonly mcp_key_limit: {
|
|
636
|
+
readonly status: 409;
|
|
637
|
+
};
|
|
183
638
|
readonly provider_not_found: {
|
|
184
639
|
readonly status: 404;
|
|
185
640
|
};
|
|
@@ -216,6 +671,12 @@ export declare const REASONS: {
|
|
|
216
671
|
readonly mailbox_not_label: {
|
|
217
672
|
readonly status: 400;
|
|
218
673
|
};
|
|
674
|
+
readonly mailbox_protected: {
|
|
675
|
+
readonly status: 409;
|
|
676
|
+
};
|
|
677
|
+
readonly mailbox_parent: {
|
|
678
|
+
readonly status: 400;
|
|
679
|
+
};
|
|
219
680
|
readonly thread_not_found: {
|
|
220
681
|
readonly status: 404;
|
|
221
682
|
};
|
|
@@ -240,6 +701,9 @@ export declare const REASONS: {
|
|
|
240
701
|
readonly send_not_found: {
|
|
241
702
|
readonly status: 404;
|
|
242
703
|
};
|
|
704
|
+
readonly mail_merge_not_found: {
|
|
705
|
+
readonly status: 404;
|
|
706
|
+
};
|
|
243
707
|
readonly attachments_too_large: {
|
|
244
708
|
readonly status: 400;
|
|
245
709
|
};
|
|
@@ -263,6 +727,9 @@ export declare const REASONS: {
|
|
|
263
727
|
};
|
|
264
728
|
readonly suppressed: {
|
|
265
729
|
readonly status: 400;
|
|
730
|
+
readonly data: z.ZodObject<{
|
|
731
|
+
addresses: z.ZodArray<z.ZodString>;
|
|
732
|
+
}, z.core.$strip>;
|
|
266
733
|
};
|
|
267
734
|
readonly no_recipients: {
|
|
268
735
|
readonly status: 400;
|
|
@@ -276,6 +743,9 @@ export declare const REASONS: {
|
|
|
276
743
|
readonly send_not_cancellable: {
|
|
277
744
|
readonly status: 409;
|
|
278
745
|
};
|
|
746
|
+
readonly duplicate_message_id: {
|
|
747
|
+
readonly status: 409;
|
|
748
|
+
};
|
|
279
749
|
readonly suppression_list_not_found: {
|
|
280
750
|
readonly status: 404;
|
|
281
751
|
};
|
|
@@ -291,6 +761,45 @@ export declare const REASONS: {
|
|
|
291
761
|
readonly suppression_list_not_empty: {
|
|
292
762
|
readonly status: 409;
|
|
293
763
|
};
|
|
764
|
+
readonly tracking_domain_unavailable: {
|
|
765
|
+
readonly status: 400;
|
|
766
|
+
};
|
|
767
|
+
readonly tracking_domain_not_found: {
|
|
768
|
+
readonly status: 404;
|
|
769
|
+
};
|
|
770
|
+
readonly tracking_domain_not_allowed: {
|
|
771
|
+
readonly status: 400;
|
|
772
|
+
};
|
|
773
|
+
readonly tracking_domain_taken: {
|
|
774
|
+
readonly status: 409;
|
|
775
|
+
};
|
|
776
|
+
readonly tracking_domain_edge_unavailable: {
|
|
777
|
+
readonly status: 502;
|
|
778
|
+
};
|
|
779
|
+
readonly connect_domain_unavailable: {
|
|
780
|
+
readonly status: 400;
|
|
781
|
+
};
|
|
782
|
+
readonly connect_domain_not_found: {
|
|
783
|
+
readonly status: 404;
|
|
784
|
+
};
|
|
785
|
+
readonly connect_domain_not_allowed: {
|
|
786
|
+
readonly status: 400;
|
|
787
|
+
};
|
|
788
|
+
readonly connect_domain_taken: {
|
|
789
|
+
readonly status: 409;
|
|
790
|
+
};
|
|
791
|
+
readonly connect_domain_in_use: {
|
|
792
|
+
readonly status: 409;
|
|
793
|
+
};
|
|
794
|
+
readonly connect_domain_edge_unavailable: {
|
|
795
|
+
readonly status: 502;
|
|
796
|
+
};
|
|
797
|
+
readonly connect_domain_inactive: {
|
|
798
|
+
readonly status: 409;
|
|
799
|
+
};
|
|
800
|
+
readonly connect_domain_unsupported: {
|
|
801
|
+
readonly status: 400;
|
|
802
|
+
};
|
|
294
803
|
readonly template_not_found: {
|
|
295
804
|
readonly status: 404;
|
|
296
805
|
};
|
|
@@ -352,6 +861,9 @@ export declare const REASONS: {
|
|
|
352
861
|
readonly calendar_read_only: {
|
|
353
862
|
readonly status: 403;
|
|
354
863
|
};
|
|
864
|
+
readonly calendar_primary: {
|
|
865
|
+
readonly status: 409;
|
|
866
|
+
};
|
|
355
867
|
readonly organizer_cannot_respond: {
|
|
356
868
|
readonly status: 409;
|
|
357
869
|
};
|
|
@@ -361,6 +873,21 @@ export declare const REASONS: {
|
|
|
361
873
|
readonly invalid_working_hours: {
|
|
362
874
|
readonly status: 400;
|
|
363
875
|
};
|
|
876
|
+
readonly scheduling_link_not_found: {
|
|
877
|
+
readonly status: 404;
|
|
878
|
+
};
|
|
879
|
+
readonly booking_not_found: {
|
|
880
|
+
readonly status: 404;
|
|
881
|
+
};
|
|
882
|
+
readonly slot_unavailable: {
|
|
883
|
+
readonly status: 409;
|
|
884
|
+
};
|
|
885
|
+
readonly slot_taken: {
|
|
886
|
+
readonly status: 409;
|
|
887
|
+
};
|
|
888
|
+
readonly booking_cancelled: {
|
|
889
|
+
readonly status: 409;
|
|
890
|
+
};
|
|
364
891
|
readonly mixed_event_times: {
|
|
365
892
|
readonly status: 400;
|
|
366
893
|
};
|
|
@@ -511,6 +1038,9 @@ export declare const REASONS: {
|
|
|
511
1038
|
readonly invalid_client: {
|
|
512
1039
|
readonly status: 400;
|
|
513
1040
|
};
|
|
1041
|
+
readonly interaction_required: {
|
|
1042
|
+
readonly status: 400;
|
|
1043
|
+
};
|
|
514
1044
|
readonly invalid_grant: {
|
|
515
1045
|
readonly status: 400;
|
|
516
1046
|
};
|
|
@@ -616,6 +1146,18 @@ export declare const REASONS: {
|
|
|
616
1146
|
readonly shared_mailbox_inaccessible: {
|
|
617
1147
|
readonly status: 422;
|
|
618
1148
|
};
|
|
1149
|
+
readonly group_unsupported: {
|
|
1150
|
+
readonly status: 400;
|
|
1151
|
+
};
|
|
1152
|
+
readonly group_relay_inaccessible: {
|
|
1153
|
+
readonly status: 422;
|
|
1154
|
+
};
|
|
1155
|
+
readonly group_alias_unverified: {
|
|
1156
|
+
readonly status: 409;
|
|
1157
|
+
};
|
|
1158
|
+
readonly group_alias_missing: {
|
|
1159
|
+
readonly status: 409;
|
|
1160
|
+
};
|
|
619
1161
|
readonly webhook_endpoint_not_found: {
|
|
620
1162
|
readonly status: 404;
|
|
621
1163
|
};
|
|
@@ -682,30 +1224,26 @@ export declare const REASONS: {
|
|
|
682
1224
|
readonly unknown_message: {
|
|
683
1225
|
readonly status: 422;
|
|
684
1226
|
};
|
|
1227
|
+
readonly email_validation_disabled: {
|
|
1228
|
+
readonly status: 400;
|
|
1229
|
+
};
|
|
1230
|
+
readonly email_validation_unavailable: {
|
|
1231
|
+
readonly status: 502;
|
|
1232
|
+
};
|
|
1233
|
+
readonly email_validation_suspended: {
|
|
1234
|
+
readonly status: 502;
|
|
1235
|
+
};
|
|
685
1236
|
};
|
|
686
1237
|
export type Reasons = typeof REASONS;
|
|
687
|
-
/** A reason the /v1 API answers with. The workspace's ErrorReason (index.ts) adds the console's. */
|
|
688
1238
|
export type ErrorReason = keyof Reasons;
|
|
689
|
-
/** The HTTP status `R` answers with. */
|
|
690
1239
|
export type ReasonStatus<R extends ErrorReason> = Reasons[R]["status"];
|
|
691
|
-
/** The schema of `R`'s data, or undefined for a reason without data. */
|
|
692
1240
|
export type ReasonDataSchema<R extends ErrorReason> = Reasons[R] extends {
|
|
693
1241
|
data: infer S extends z.ZodType;
|
|
694
1242
|
} ? S : undefined;
|
|
695
|
-
/** The data an error with reason `R` carries (undefined for a reason without data). */
|
|
696
1243
|
export type ReasonData<R extends ErrorReason> = ReasonDataSchema<R> extends z.ZodType ? z.output<ReasonDataSchema<R>> : undefined;
|
|
697
|
-
/** The reason checks over a table: the /v1 one below, the console's merged one in console/. */
|
|
698
1244
|
export declare function reasonGuards<T extends ReasonTable>(table: T): {
|
|
699
1245
|
isReason: (code: unknown) => code is keyof T & string;
|
|
700
|
-
/**
|
|
701
|
-
* The reason of an API error: the `code` of an oRPC error (or any `{ code }` error body) when
|
|
702
|
-
* it is in the table, else null. The one way every app reads a refusal's reason.
|
|
703
|
-
*/
|
|
704
1246
|
reasonOf(error: unknown): (keyof T & string) | null;
|
|
705
1247
|
};
|
|
706
1248
|
export declare const isErrorReason: (code: unknown) => code is ErrorReason;
|
|
707
|
-
/**
|
|
708
|
-
* The reason of an API error: the `code` of an oRPC error (or any `{ code }` error body) when it
|
|
709
|
-
* is one of REASONS, else null. The one way every app reads a refusal's reason.
|
|
710
|
-
*/
|
|
711
1249
|
export declare const reasonOf: (error: unknown) => ErrorReason | null;
|