@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
|
@@ -22,6 +22,7 @@ export declare const orgConnections: {
|
|
|
22
22
|
serviceAccountEmail: z.ZodString;
|
|
23
23
|
directoryAdmin: z.ZodNullable<z.ZodString>;
|
|
24
24
|
scopes: z.ZodArray<z.ZodString>;
|
|
25
|
+
groupsEnabled: z.ZodBoolean;
|
|
25
26
|
}, z.core.$strip>>;
|
|
26
27
|
microsoft: z.ZodNullable<z.ZodObject<{
|
|
27
28
|
cloud: z.ZodEnum<{
|
|
@@ -52,6 +53,8 @@ export declare const orgConnections: {
|
|
|
52
53
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
53
54
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
54
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.";
|
|
55
58
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
56
59
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
57
60
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -61,37 +64,45 @@ export declare const orgConnections: {
|
|
|
61
64
|
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
62
65
|
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
63
66
|
}>>, Record<never, never>>;
|
|
64
|
-
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodDiscriminatedUnion<[
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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<{
|
|
95
106
|
id: z.ZodUUID;
|
|
96
107
|
kind: z.ZodEnum<{
|
|
97
108
|
google_delegation: "google_delegation";
|
|
@@ -112,6 +123,7 @@ export declare const orgConnections: {
|
|
|
112
123
|
serviceAccountEmail: z.ZodString;
|
|
113
124
|
directoryAdmin: z.ZodNullable<z.ZodString>;
|
|
114
125
|
scopes: z.ZodArray<z.ZodString>;
|
|
126
|
+
groupsEnabled: z.ZodBoolean;
|
|
115
127
|
}, z.core.$strip>>;
|
|
116
128
|
microsoft: z.ZodNullable<z.ZodObject<{
|
|
117
129
|
cloud: z.ZodEnum<{
|
|
@@ -141,6 +153,8 @@ export declare const orgConnections: {
|
|
|
141
153
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
142
154
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
143
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.";
|
|
144
158
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
145
159
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
146
160
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -190,6 +204,7 @@ export declare const orgConnections: {
|
|
|
190
204
|
serviceAccountEmail: z.ZodString;
|
|
191
205
|
directoryAdmin: z.ZodNullable<z.ZodString>;
|
|
192
206
|
scopes: z.ZodArray<z.ZodString>;
|
|
207
|
+
groupsEnabled: z.ZodBoolean;
|
|
193
208
|
}, z.core.$strip>>;
|
|
194
209
|
microsoft: z.ZodNullable<z.ZodObject<{
|
|
195
210
|
cloud: z.ZodEnum<{
|
|
@@ -219,6 +234,8 @@ export declare const orgConnections: {
|
|
|
219
234
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
220
235
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
221
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.";
|
|
222
239
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
223
240
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
224
241
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -236,6 +253,7 @@ export declare const orgConnections: {
|
|
|
236
253
|
serviceAccountKey: z.ZodOptional<z.ZodString>;
|
|
237
254
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
238
255
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
256
|
+
groupsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
239
257
|
directoryAdmin: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
|
|
240
258
|
clientSecret: z.ZodOptional<z.ZodString>;
|
|
241
259
|
certificate: z.ZodOptional<z.ZodString>;
|
|
@@ -262,6 +280,7 @@ export declare const orgConnections: {
|
|
|
262
280
|
serviceAccountEmail: z.ZodString;
|
|
263
281
|
directoryAdmin: z.ZodNullable<z.ZodString>;
|
|
264
282
|
scopes: z.ZodArray<z.ZodString>;
|
|
283
|
+
groupsEnabled: z.ZodBoolean;
|
|
265
284
|
}, z.core.$strip>>;
|
|
266
285
|
microsoft: z.ZodNullable<z.ZodObject<{
|
|
267
286
|
cloud: z.ZodEnum<{
|
|
@@ -291,6 +310,8 @@ export declare const orgConnections: {
|
|
|
291
310
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
292
311
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
293
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.";
|
|
294
315
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
295
316
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
296
317
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -330,6 +351,8 @@ export declare const orgConnections: {
|
|
|
330
351
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
331
352
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
332
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.";
|
|
333
356
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
334
357
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
335
358
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -361,6 +384,8 @@ export declare const orgConnections: {
|
|
|
361
384
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
362
385
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
363
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.";
|
|
364
389
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
365
390
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
366
391
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -416,6 +441,7 @@ export declare const orgConnections: {
|
|
|
416
441
|
serviceAccountEmail: z.ZodString;
|
|
417
442
|
directoryAdmin: z.ZodNullable<z.ZodString>;
|
|
418
443
|
scopes: z.ZodArray<z.ZodString>;
|
|
444
|
+
groupsEnabled: z.ZodBoolean;
|
|
419
445
|
}, z.core.$strip>>;
|
|
420
446
|
microsoft: z.ZodNullable<z.ZodObject<{
|
|
421
447
|
cloud: z.ZodEnum<{
|
|
@@ -452,6 +478,8 @@ export declare const orgConnections: {
|
|
|
452
478
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
453
479
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
454
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.";
|
|
455
483
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
456
484
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
457
485
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -494,6 +522,8 @@ export declare const orgConnections: {
|
|
|
494
522
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
495
523
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
496
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.";
|
|
497
527
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
498
528
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
499
529
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -550,12 +580,18 @@ export declare const orgConnections: {
|
|
|
550
580
|
full: "full";
|
|
551
581
|
}>>;
|
|
552
582
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
583
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
553
584
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
554
585
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
555
586
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
556
587
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
557
588
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
558
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>>;
|
|
559
595
|
}, z.core.$strip>>;
|
|
560
596
|
}, z.core.$strip>, z.ZodObject<{
|
|
561
597
|
items: z.ZodArray<z.ZodObject<{
|
|
@@ -578,6 +614,8 @@ export declare const orgConnections: {
|
|
|
578
614
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
579
615
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
580
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.";
|
|
581
619
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
582
620
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
583
621
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -591,10 +629,7 @@ export declare const orgConnections: {
|
|
|
591
629
|
status: 402;
|
|
592
630
|
message: string;
|
|
593
631
|
};
|
|
594
|
-
plan_limit_storage:
|
|
595
|
-
status: 403;
|
|
596
|
-
message: string;
|
|
597
|
-
};
|
|
632
|
+
plan_limit_storage: import("../errors.js").DeclaredError<"plan_limit_storage">;
|
|
598
633
|
storage_unavailable: {
|
|
599
634
|
status: 400;
|
|
600
635
|
message: string;
|
|
@@ -608,6 +643,230 @@ export declare const orgConnections: {
|
|
|
608
643
|
message: string;
|
|
609
644
|
};
|
|
610
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>>;
|
|
611
870
|
};
|
|
612
871
|
export declare const sharedMailboxes: {
|
|
613
872
|
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
@@ -622,12 +881,18 @@ export declare const sharedMailboxes: {
|
|
|
622
881
|
full: "full";
|
|
623
882
|
}>>;
|
|
624
883
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
884
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
625
885
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
626
886
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
627
887
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
628
888
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
629
889
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
630
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>>;
|
|
631
896
|
}, z.core.$strip>>;
|
|
632
897
|
}, z.core.$strip>, z.ZodObject<{
|
|
633
898
|
id: z.ZodUUID;
|
|
@@ -660,12 +925,18 @@ export declare const sharedMailboxes: {
|
|
|
660
925
|
full: "full";
|
|
661
926
|
}>;
|
|
662
927
|
syncWindowDays: z.ZodNullable<z.ZodNumber>;
|
|
928
|
+
mailEnabled: z.ZodBoolean;
|
|
663
929
|
calendarEnabled: z.ZodBoolean;
|
|
664
930
|
contactsEnabled: z.ZodBoolean;
|
|
665
931
|
undoSendSeconds: z.ZodNumber;
|
|
666
932
|
trackOpens: z.ZodBoolean;
|
|
667
933
|
trackClicks: z.ZodBoolean;
|
|
668
934
|
trackingHoneypot: z.ZodBoolean;
|
|
935
|
+
suppressionCheck: z.ZodEnum<{
|
|
936
|
+
lists: "lists";
|
|
937
|
+
always: "always";
|
|
938
|
+
}>;
|
|
939
|
+
sendsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
669
940
|
}, z.core.$strip>;
|
|
670
941
|
settingsOverride: z.ZodObject<{
|
|
671
942
|
bodyStorage: z.ZodOptional<z.ZodEnum<{
|
|
@@ -674,12 +945,18 @@ export declare const sharedMailboxes: {
|
|
|
674
945
|
full: "full";
|
|
675
946
|
}>>;
|
|
676
947
|
syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
948
|
+
mailEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
677
949
|
calendarEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
678
950
|
contactsEnabled: z.ZodOptional<z.ZodBoolean>;
|
|
679
951
|
undoSendSeconds: z.ZodOptional<z.ZodNumber>;
|
|
680
952
|
trackOpens: z.ZodOptional<z.ZodBoolean>;
|
|
681
953
|
trackClicks: z.ZodOptional<z.ZodBoolean>;
|
|
682
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>>;
|
|
683
960
|
}, z.core.$strip>;
|
|
684
961
|
runtime: z.ZodNullable<z.ZodObject<{
|
|
685
962
|
state: z.ZodEnum<{
|
|
@@ -737,9 +1014,11 @@ export declare const sharedMailboxes: {
|
|
|
737
1014
|
google_delegation: "google_delegation";
|
|
738
1015
|
microsoft_app: "microsoft_app";
|
|
739
1016
|
shared_mailbox: "shared_mailbox";
|
|
1017
|
+
google_group: "google_group";
|
|
740
1018
|
}>;
|
|
741
1019
|
orgConnectionId: z.ZodNullable<z.ZodUUID>;
|
|
742
1020
|
delegateAccountId: z.ZodNullable<z.ZodUUID>;
|
|
1021
|
+
relayEmail: z.ZodNullable<z.ZodEmail>;
|
|
743
1022
|
}, z.core.$strip>;
|
|
744
1023
|
initializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
745
1024
|
calendarInitializedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
@@ -753,6 +1032,8 @@ export declare const sharedMailboxes: {
|
|
|
753
1032
|
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
754
1033
|
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
755
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.";
|
|
756
1037
|
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
757
1038
|
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
758
1039
|
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
@@ -810,14 +1091,10 @@ export declare const sharedMailboxes: {
|
|
|
810
1091
|
status: 402;
|
|
811
1092
|
message: string;
|
|
812
1093
|
};
|
|
813
|
-
plan_limit_accounts:
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
plan_limit_storage: {
|
|
818
|
-
status: 403;
|
|
819
|
-
message: string;
|
|
820
|
-
};
|
|
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">;
|
|
821
1098
|
storage_unavailable: {
|
|
822
1099
|
status: 400;
|
|
823
1100
|
message: string;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export interface PackTerms {
|
|
3
|
+
credits: number;
|
|
4
|
+
amount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const PlanCreditPack: z.ZodObject<{
|
|
7
|
+
credits: z.ZodNumber;
|
|
8
|
+
amount: z.ZodNumber;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
export type PlanCreditPack = z.infer<typeof PlanCreditPack>;
|
|
11
|
+
export declare const PlanCreditPacks: z.ZodArray<z.ZodObject<{
|
|
12
|
+
credits: z.ZodNumber;
|
|
13
|
+
amount: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>>;
|
|
15
|
+
export interface CreditPackProblem {
|
|
16
|
+
index: number;
|
|
17
|
+
field: "credits" | "amount";
|
|
18
|
+
message: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function creditPackProblems(packs: readonly PackTerms[]): CreditPackProblem[];
|
|
21
|
+
export interface PackLine<P extends PackTerms> {
|
|
22
|
+
pack: P;
|
|
23
|
+
count: number;
|
|
24
|
+
}
|
|
25
|
+
export interface PackPurchase<P extends PackTerms> {
|
|
26
|
+
lines: PackLine<P>[];
|
|
27
|
+
credits: number;
|
|
28
|
+
amount: number;
|
|
29
|
+
}
|
|
30
|
+
export declare function cheapestPurchase<P extends PackTerms>(ladder: readonly P[], credits: number): PackPurchase<P> | null;
|