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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (56) hide show
  1. package/README.md +233 -2
  2. package/client.d.ts +36 -0
  3. package/contract/accounts/models.d.ts +726 -0
  4. package/contract/accounts/routes.d.ts +1318 -0
  5. package/contract/ai/models.d.ts +30 -0
  6. package/contract/ai/routes.d.ts +89 -0
  7. package/contract/audit-log/models.d.ts +107 -0
  8. package/contract/audit-log/routes.d.ts +72 -0
  9. package/contract/calendar/models.d.ts +837 -0
  10. package/contract/calendar/routes.d.ts +1299 -0
  11. package/contract/connect/models.d.ts +272 -0
  12. package/contract/connect/routes.d.ts +531 -0
  13. package/contract/contacts/models.d.ts +269 -0
  14. package/contract/contacts/routes.d.ts +634 -0
  15. package/contract/errors.d.ts +108 -0
  16. package/contract/events/models.d.ts +2364 -0
  17. package/contract/events/routes.d.ts +107 -0
  18. package/contract/exports/models.d.ts +67 -0
  19. package/contract/exports/routes.d.ts +196 -0
  20. package/contract/identities/models.d.ts +100 -0
  21. package/contract/identities/routes.d.ts +249 -0
  22. package/contract/limits.d.ts +170 -0
  23. package/contract/mail/models.d.ts +528 -0
  24. package/contract/mail/routes.d.ts +749 -0
  25. package/contract/meetings/models.d.ts +232 -0
  26. package/contract/meetings/routes.d.ts +386 -0
  27. package/contract/oauth-apps/models.d.ts +92 -0
  28. package/contract/oauth-apps/routes.d.ts +187 -0
  29. package/contract/org-connections/models.d.ts +383 -0
  30. package/contract/org-connections/routes.d.ts +830 -0
  31. package/contract/primitives.d.ts +140 -0
  32. package/contract/public.d.ts +26 -0
  33. package/contract/reasons.d.ts +711 -0
  34. package/contract/router.d.ts +9773 -0
  35. package/contract/send/models.d.ts +750 -0
  36. package/contract/send/routes.d.ts +1239 -0
  37. package/contract/settings/models.d.ts +103 -0
  38. package/contract/settings/routes.d.ts +110 -0
  39. package/contract/suppressions/models.d.ts +231 -0
  40. package/contract/suppressions/routes.d.ts +317 -0
  41. package/contract/templates/models.d.ts +169 -0
  42. package/contract/templates/routes.d.ts +281 -0
  43. package/contract/threads/models.d.ts +117 -0
  44. package/contract/threads/routes.d.ts +336 -0
  45. package/contract/usage/models.d.ts +213 -0
  46. package/contract/usage/routes.d.ts +81 -0
  47. package/contract/webhooks/models.d.ts +879 -0
  48. package/contract/webhooks/routes.d.ts +839 -0
  49. package/contract/webhooks/signing.d.ts +35 -0
  50. package/errors.d.ts +15 -0
  51. package/index.d.ts +6 -0
  52. package/index.js +4334 -0
  53. package/index.js.map +59 -0
  54. package/package.json +45 -4
  55. package/pagination.d.ts +40 -0
  56. package/webhooks.d.ts +28 -0
@@ -0,0 +1,92 @@
1
+ import * as z from "zod";
2
+ /** A Pub/Sub topic id as users.watch takes it: projects/<project id>/topics/<topic>. */
3
+ export declare const PUBSUB_TOPIC_PATTERN: RegExp;
4
+ /**
5
+ * Gmail push for the accounts of a tenant Google app: users.watch publishes to `topic`, which
6
+ * must be in the Cloud project of the app's OAuth client, and the tenant's push subscription
7
+ * delivers to the app's gmailPushEndpoint with OIDC tokens issued for `serviceAccount`.
8
+ */
9
+ export declare const GmailPushSettings: z.ZodObject<{
10
+ topic: z.ZodString;
11
+ serviceAccount: z.ZodEmail;
12
+ }, z.core.$strip>;
13
+ export type GmailPushSettings = z.infer<typeof GmailPushSettings>;
14
+ export declare const OAuthApp: z.ZodObject<{
15
+ id: z.ZodUUID;
16
+ provider: z.ZodEnum<{
17
+ google: "google";
18
+ microsoft: "microsoft";
19
+ }>;
20
+ name: z.ZodString;
21
+ clientId: z.ZodString;
22
+ cloud: z.ZodNullable<z.ZodEnum<{
23
+ global: "global";
24
+ "gcc-high": "gcc-high";
25
+ dod: "dod";
26
+ china: "china";
27
+ }>>;
28
+ authority: z.ZodNullable<z.ZodString>;
29
+ gmailPush: z.ZodNullable<z.ZodObject<{
30
+ topic: z.ZodString;
31
+ serviceAccount: z.ZodEmail;
32
+ }, z.core.$strip>>;
33
+ gmailPushEndpoint: z.ZodNullable<z.ZodURL>;
34
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
35
+ }, z.core.$strip>;
36
+ export type OAuthApp = z.infer<typeof OAuthApp>;
37
+ export declare const OAuthAppList: z.ZodObject<{
38
+ items: z.ZodArray<z.ZodObject<{
39
+ id: z.ZodUUID;
40
+ provider: z.ZodEnum<{
41
+ google: "google";
42
+ microsoft: "microsoft";
43
+ }>;
44
+ name: z.ZodString;
45
+ clientId: z.ZodString;
46
+ cloud: z.ZodNullable<z.ZodEnum<{
47
+ global: "global";
48
+ "gcc-high": "gcc-high";
49
+ dod: "dod";
50
+ china: "china";
51
+ }>>;
52
+ authority: z.ZodNullable<z.ZodString>;
53
+ gmailPush: z.ZodNullable<z.ZodObject<{
54
+ topic: z.ZodString;
55
+ serviceAccount: z.ZodEmail;
56
+ }, z.core.$strip>>;
57
+ gmailPushEndpoint: z.ZodNullable<z.ZodURL>;
58
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
59
+ }, z.core.$strip>>;
60
+ }, z.core.$strip>;
61
+ export type OAuthAppList = z.infer<typeof OAuthAppList>;
62
+ export declare const CreateOAuthApp: z.ZodObject<{
63
+ provider: z.ZodEnum<{
64
+ google: "google";
65
+ microsoft: "microsoft";
66
+ }>;
67
+ cloud: z.ZodOptional<z.ZodEnum<{
68
+ global: "global";
69
+ "gcc-high": "gcc-high";
70
+ dod: "dod";
71
+ china: "china";
72
+ }>>;
73
+ name: z.ZodString;
74
+ clientId: z.ZodString;
75
+ clientSecret: z.ZodString;
76
+ authority: z.ZodOptional<z.ZodString>;
77
+ }, z.core.$strip>;
78
+ export type CreateOAuthApp = z.infer<typeof CreateOAuthApp>;
79
+ export declare const UpdateOAuthApp: z.ZodObject<{
80
+ name: z.ZodOptional<z.ZodString>;
81
+ clientSecret: z.ZodOptional<z.ZodString>;
82
+ authority: z.ZodOptional<z.ZodString>;
83
+ gmailPush: z.ZodOptional<z.ZodNullable<z.ZodObject<{
84
+ topic: z.ZodString;
85
+ serviceAccount: z.ZodEmail;
86
+ }, z.core.$strip>>>;
87
+ }, z.core.$strip>;
88
+ export type UpdateOAuthApp = z.infer<typeof UpdateOAuthApp>;
89
+ export declare const OAuthAppIdInput: z.ZodObject<{
90
+ appId: z.ZodUUID;
91
+ }, z.core.$strip>;
92
+ export type OAuthAppIdInput = z.infer<typeof OAuthAppIdInput>;
@@ -0,0 +1,187 @@
1
+ import * as z from "zod";
2
+ export declare const oauthApps: {
3
+ list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
4
+ items: z.ZodArray<z.ZodObject<{
5
+ id: z.ZodUUID;
6
+ provider: z.ZodEnum<{
7
+ google: "google";
8
+ microsoft: "microsoft";
9
+ }>;
10
+ name: z.ZodString;
11
+ clientId: z.ZodString;
12
+ cloud: z.ZodNullable<z.ZodEnum<{
13
+ global: "global";
14
+ "gcc-high": "gcc-high";
15
+ dod: "dod";
16
+ china: "china";
17
+ }>>;
18
+ authority: z.ZodNullable<z.ZodString>;
19
+ gmailPush: z.ZodNullable<z.ZodObject<{
20
+ topic: z.ZodString;
21
+ serviceAccount: z.ZodEmail;
22
+ }, z.core.$strip>>;
23
+ gmailPushEndpoint: z.ZodNullable<z.ZodURL>;
24
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
25
+ }, z.core.$strip>>;
26
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
27
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
28
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
29
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
30
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
31
+ readonly role_forbidden: "The member's role does not allow the operation.";
32
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
33
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
34
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
35
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
36
+ readonly payload_too_large: "The request body is larger than the API accepts.";
37
+ readonly internal_error: "An unexpected failure on our side.";
38
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
39
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
40
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
41
+ }>>, Record<never, never>>;
42
+ create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
43
+ provider: z.ZodEnum<{
44
+ google: "google";
45
+ microsoft: "microsoft";
46
+ }>;
47
+ cloud: z.ZodOptional<z.ZodEnum<{
48
+ global: "global";
49
+ "gcc-high": "gcc-high";
50
+ dod: "dod";
51
+ china: "china";
52
+ }>>;
53
+ name: z.ZodString;
54
+ clientId: z.ZodString;
55
+ clientSecret: z.ZodString;
56
+ authority: z.ZodOptional<z.ZodString>;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ id: z.ZodUUID;
59
+ provider: z.ZodEnum<{
60
+ google: "google";
61
+ microsoft: "microsoft";
62
+ }>;
63
+ name: z.ZodString;
64
+ clientId: z.ZodString;
65
+ cloud: z.ZodNullable<z.ZodEnum<{
66
+ global: "global";
67
+ "gcc-high": "gcc-high";
68
+ dod: "dod";
69
+ china: "china";
70
+ }>>;
71
+ authority: z.ZodNullable<z.ZodString>;
72
+ gmailPush: z.ZodNullable<z.ZodObject<{
73
+ topic: z.ZodString;
74
+ serviceAccount: z.ZodEmail;
75
+ }, z.core.$strip>>;
76
+ gmailPushEndpoint: z.ZodNullable<z.ZodURL>;
77
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
78
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
79
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
80
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
81
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
82
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
83
+ readonly role_forbidden: "The member's role does not allow the operation.";
84
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
85
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
86
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
87
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
88
+ readonly payload_too_large: "The request body is larger than the API accepts.";
89
+ readonly internal_error: "An unexpected failure on our side.";
90
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
91
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
92
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
93
+ }>>, import("../errors.js").DeclaredErrors<{
94
+ readonly cloud_required: "provider is microsoft and no cloud is given.";
95
+ readonly not_microsoft: "cloud or authority is given for a Google app.";
96
+ }>>, Record<never, never>>;
97
+ update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
98
+ appId: z.ZodUUID;
99
+ name: z.ZodOptional<z.ZodString>;
100
+ clientSecret: z.ZodOptional<z.ZodString>;
101
+ authority: z.ZodOptional<z.ZodString>;
102
+ gmailPush: z.ZodOptional<z.ZodNullable<z.ZodObject<{
103
+ topic: z.ZodString;
104
+ serviceAccount: z.ZodEmail;
105
+ }, z.core.$strip>>>;
106
+ }, z.core.$strip>, z.ZodObject<{
107
+ id: z.ZodUUID;
108
+ provider: z.ZodEnum<{
109
+ google: "google";
110
+ microsoft: "microsoft";
111
+ }>;
112
+ name: z.ZodString;
113
+ clientId: z.ZodString;
114
+ cloud: z.ZodNullable<z.ZodEnum<{
115
+ global: "global";
116
+ "gcc-high": "gcc-high";
117
+ dod: "dod";
118
+ china: "china";
119
+ }>>;
120
+ authority: z.ZodNullable<z.ZodString>;
121
+ gmailPush: z.ZodNullable<z.ZodObject<{
122
+ topic: z.ZodString;
123
+ serviceAccount: z.ZodEmail;
124
+ }, z.core.$strip>>;
125
+ gmailPushEndpoint: z.ZodNullable<z.ZodURL>;
126
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
127
+ }, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
128
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
129
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
130
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
131
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
132
+ readonly role_forbidden: "The member's role does not allow the operation.";
133
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
134
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
135
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
136
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
137
+ readonly payload_too_large: "The request body is larger than the API accepts.";
138
+ readonly internal_error: "An unexpected failure on our side.";
139
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
140
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
141
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
142
+ }>>, {
143
+ gmail_push_unsupported: {
144
+ status: 400;
145
+ message: string;
146
+ };
147
+ push_unavailable: {
148
+ status: 400;
149
+ message: string;
150
+ };
151
+ not_microsoft: {
152
+ status: 400;
153
+ message: string;
154
+ };
155
+ oauth_app_not_found: {
156
+ status: 404;
157
+ message: string;
158
+ };
159
+ }>, Record<never, never>>;
160
+ delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
161
+ appId: z.ZodUUID;
162
+ }, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
163
+ readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
164
+ readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
165
+ readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
166
+ readonly missing_scope: "The API key lacks the scope the operation needs.";
167
+ readonly role_forbidden: "The member's role does not allow the operation.";
168
+ readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
169
+ readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
170
+ readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
171
+ readonly overloaded: "The API is shedding load; retry after Retry-After.";
172
+ readonly payload_too_large: "The request body is larger than the API accepts.";
173
+ readonly internal_error: "An unexpected failure on our side.";
174
+ readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
175
+ readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
176
+ readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
177
+ }>>, {
178
+ oauth_app_in_use: {
179
+ status: 409;
180
+ message: string;
181
+ };
182
+ oauth_app_not_found: {
183
+ status: 404;
184
+ message: string;
185
+ };
186
+ }>, Record<never, never>>;
187
+ };
@@ -0,0 +1,383 @@
1
+ import * as z from "zod";
2
+ export declare const OrgConnectionKind: z.ZodEnum<{
3
+ google_delegation: "google_delegation";
4
+ microsoft_app: "microsoft_app";
5
+ }>;
6
+ export type OrgConnectionKind = z.infer<typeof OrgConnectionKind>;
7
+ /** pending_consent: no Microsoft directory has consented yet. unverified: registered or changed
8
+ * and not tested since. active / failing: the outcome of the last test or consent. */
9
+ export declare const OrgConnectionStatus: z.ZodEnum<{
10
+ active: "active";
11
+ unverified: "unverified";
12
+ failing: "failing";
13
+ pending_consent: "pending_consent";
14
+ }>;
15
+ export type OrgConnectionStatus = z.infer<typeof OrgConnectionStatus>;
16
+ /** platform: the platform's Entra app for the cloud, authorized through admin consent.
17
+ * client_secret / certificate: the tenant's own app registration. */
18
+ export declare const MicrosoftAppCredential: z.ZodEnum<{
19
+ platform: "platform";
20
+ client_secret: "client_secret";
21
+ certificate: "certificate";
22
+ }>;
23
+ export type MicrosoftAppCredential = z.infer<typeof MicrosoftAppCredential>;
24
+ export declare const GoogleDelegation: z.ZodObject<{
25
+ domain: z.ZodString;
26
+ serviceAccountEmail: z.ZodString;
27
+ directoryAdmin: z.ZodNullable<z.ZodString>;
28
+ scopes: z.ZodArray<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ export type GoogleDelegation = z.infer<typeof GoogleDelegation>;
31
+ export declare const GraphPermission: z.ZodObject<{
32
+ name: z.ZodString;
33
+ isRequired: z.ZodBoolean;
34
+ }, z.core.$strip>;
35
+ export type GraphPermission = z.infer<typeof GraphPermission>;
36
+ export declare const MicrosoftAppAccess: z.ZodObject<{
37
+ cloud: z.ZodEnum<{
38
+ global: "global";
39
+ "gcc-high": "gcc-high";
40
+ dod: "dod";
41
+ china: "china";
42
+ }>;
43
+ credentialType: z.ZodEnum<{
44
+ platform: "platform";
45
+ client_secret: "client_secret";
46
+ certificate: "certificate";
47
+ }>;
48
+ directoryId: z.ZodNullable<z.ZodString>;
49
+ permissions: z.ZodArray<z.ZodObject<{
50
+ name: z.ZodString;
51
+ isRequired: z.ZodBoolean;
52
+ }, z.core.$strip>>;
53
+ }, z.core.$strip>;
54
+ export type MicrosoftAppAccess = z.infer<typeof MicrosoftAppAccess>;
55
+ export declare const OrgConnection: z.ZodObject<{
56
+ id: z.ZodUUID;
57
+ kind: z.ZodEnum<{
58
+ google_delegation: "google_delegation";
59
+ microsoft_app: "microsoft_app";
60
+ }>;
61
+ name: z.ZodString;
62
+ clientId: z.ZodString;
63
+ status: z.ZodEnum<{
64
+ active: "active";
65
+ unverified: "unverified";
66
+ failing: "failing";
67
+ pending_consent: "pending_consent";
68
+ }>;
69
+ statusDetail: z.ZodNullable<z.ZodString>;
70
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
71
+ google: z.ZodNullable<z.ZodObject<{
72
+ domain: z.ZodString;
73
+ serviceAccountEmail: z.ZodString;
74
+ directoryAdmin: z.ZodNullable<z.ZodString>;
75
+ scopes: z.ZodArray<z.ZodString>;
76
+ }, z.core.$strip>>;
77
+ microsoft: z.ZodNullable<z.ZodObject<{
78
+ cloud: z.ZodEnum<{
79
+ global: "global";
80
+ "gcc-high": "gcc-high";
81
+ dod: "dod";
82
+ china: "china";
83
+ }>;
84
+ credentialType: z.ZodEnum<{
85
+ platform: "platform";
86
+ client_secret: "client_secret";
87
+ certificate: "certificate";
88
+ }>;
89
+ directoryId: z.ZodNullable<z.ZodString>;
90
+ permissions: z.ZodArray<z.ZodObject<{
91
+ name: z.ZodString;
92
+ isRequired: z.ZodBoolean;
93
+ }, z.core.$strip>>;
94
+ }, z.core.$strip>>;
95
+ accounts: z.ZodNumber;
96
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
97
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
98
+ }, z.core.$strip>;
99
+ export type OrgConnection = z.infer<typeof OrgConnection>;
100
+ export declare const OrgConnectionList: z.ZodObject<{
101
+ items: z.ZodArray<z.ZodObject<{
102
+ id: z.ZodUUID;
103
+ kind: z.ZodEnum<{
104
+ google_delegation: "google_delegation";
105
+ microsoft_app: "microsoft_app";
106
+ }>;
107
+ name: z.ZodString;
108
+ clientId: z.ZodString;
109
+ status: z.ZodEnum<{
110
+ active: "active";
111
+ unverified: "unverified";
112
+ failing: "failing";
113
+ pending_consent: "pending_consent";
114
+ }>;
115
+ statusDetail: z.ZodNullable<z.ZodString>;
116
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
117
+ google: z.ZodNullable<z.ZodObject<{
118
+ domain: z.ZodString;
119
+ serviceAccountEmail: z.ZodString;
120
+ directoryAdmin: z.ZodNullable<z.ZodString>;
121
+ scopes: z.ZodArray<z.ZodString>;
122
+ }, z.core.$strip>>;
123
+ microsoft: z.ZodNullable<z.ZodObject<{
124
+ cloud: z.ZodEnum<{
125
+ global: "global";
126
+ "gcc-high": "gcc-high";
127
+ dod: "dod";
128
+ china: "china";
129
+ }>;
130
+ credentialType: z.ZodEnum<{
131
+ platform: "platform";
132
+ client_secret: "client_secret";
133
+ certificate: "certificate";
134
+ }>;
135
+ directoryId: z.ZodNullable<z.ZodString>;
136
+ permissions: z.ZodArray<z.ZodObject<{
137
+ name: z.ZodString;
138
+ isRequired: z.ZodBoolean;
139
+ }, z.core.$strip>>;
140
+ }, z.core.$strip>>;
141
+ accounts: z.ZodNumber;
142
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
143
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
144
+ }, z.core.$strip>>;
145
+ }, z.core.$strip>;
146
+ export type OrgConnectionList = z.infer<typeof OrgConnectionList>;
147
+ export declare const CreateOrgConnection: z.ZodDiscriminatedUnion<[z.ZodObject<{
148
+ kind: z.ZodLiteral<"google_delegation">;
149
+ name: z.ZodString;
150
+ serviceAccountKey: z.ZodString;
151
+ domain: z.ZodString;
152
+ calendarEnabled: z.ZodDefault<z.ZodBoolean>;
153
+ contactsEnabled: z.ZodDefault<z.ZodBoolean>;
154
+ directoryAdmin: z.ZodOptional<z.ZodEmail>;
155
+ }, z.core.$strip>, z.ZodObject<{
156
+ kind: z.ZodLiteral<"microsoft_app">;
157
+ name: z.ZodString;
158
+ cloud: z.ZodDefault<z.ZodEnum<{
159
+ global: "global";
160
+ "gcc-high": "gcc-high";
161
+ dod: "dod";
162
+ china: "china";
163
+ }>>;
164
+ credential: z.ZodDiscriminatedUnion<[z.ZodObject<{
165
+ type: z.ZodLiteral<"platform">;
166
+ }, z.core.$strip>, z.ZodObject<{
167
+ type: z.ZodLiteral<"client_secret">;
168
+ clientId: z.ZodString;
169
+ clientSecret: z.ZodString;
170
+ }, z.core.$strip>, z.ZodObject<{
171
+ type: z.ZodLiteral<"certificate">;
172
+ clientId: z.ZodString;
173
+ certificate: z.ZodString;
174
+ privateKey: z.ZodString;
175
+ }, z.core.$strip>], "type">;
176
+ directoryId: z.ZodOptional<z.ZodString>;
177
+ }, z.core.$strip>], "kind">;
178
+ export type CreateOrgConnection = z.infer<typeof CreateOrgConnection>;
179
+ export declare const UpdateOrgConnection: z.ZodObject<{
180
+ name: z.ZodOptional<z.ZodString>;
181
+ serviceAccountKey: z.ZodOptional<z.ZodString>;
182
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
183
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
184
+ directoryAdmin: z.ZodOptional<z.ZodNullable<z.ZodEmail>>;
185
+ clientSecret: z.ZodOptional<z.ZodString>;
186
+ certificate: z.ZodOptional<z.ZodString>;
187
+ privateKey: z.ZodOptional<z.ZodString>;
188
+ directoryId: z.ZodOptional<z.ZodString>;
189
+ }, z.core.$strip>;
190
+ export type UpdateOrgConnection = z.infer<typeof UpdateOrgConnection>;
191
+ export declare const OrgConnectionCheck: z.ZodObject<{
192
+ name: z.ZodString;
193
+ isOk: z.ZodBoolean;
194
+ isRequired: z.ZodBoolean;
195
+ detail: z.ZodString;
196
+ }, z.core.$strip>;
197
+ export type OrgConnectionCheck = z.infer<typeof OrgConnectionCheck>;
198
+ export declare const OrgConnectionTestResult: z.ZodObject<{
199
+ connection: z.ZodObject<{
200
+ id: z.ZodUUID;
201
+ kind: z.ZodEnum<{
202
+ google_delegation: "google_delegation";
203
+ microsoft_app: "microsoft_app";
204
+ }>;
205
+ name: z.ZodString;
206
+ clientId: z.ZodString;
207
+ status: z.ZodEnum<{
208
+ active: "active";
209
+ unverified: "unverified";
210
+ failing: "failing";
211
+ pending_consent: "pending_consent";
212
+ }>;
213
+ statusDetail: z.ZodNullable<z.ZodString>;
214
+ checkedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
215
+ google: z.ZodNullable<z.ZodObject<{
216
+ domain: z.ZodString;
217
+ serviceAccountEmail: z.ZodString;
218
+ directoryAdmin: z.ZodNullable<z.ZodString>;
219
+ scopes: z.ZodArray<z.ZodString>;
220
+ }, z.core.$strip>>;
221
+ microsoft: z.ZodNullable<z.ZodObject<{
222
+ cloud: z.ZodEnum<{
223
+ global: "global";
224
+ "gcc-high": "gcc-high";
225
+ dod: "dod";
226
+ china: "china";
227
+ }>;
228
+ credentialType: z.ZodEnum<{
229
+ platform: "platform";
230
+ client_secret: "client_secret";
231
+ certificate: "certificate";
232
+ }>;
233
+ directoryId: z.ZodNullable<z.ZodString>;
234
+ permissions: z.ZodArray<z.ZodObject<{
235
+ name: z.ZodString;
236
+ isRequired: z.ZodBoolean;
237
+ }, z.core.$strip>>;
238
+ }, z.core.$strip>>;
239
+ accounts: z.ZodNumber;
240
+ createdAt: z.ZodPreprocess<z.ZodDate, Date>;
241
+ updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
242
+ }, z.core.$strip>;
243
+ checks: z.ZodArray<z.ZodObject<{
244
+ name: z.ZodString;
245
+ isOk: z.ZodBoolean;
246
+ isRequired: z.ZodBoolean;
247
+ detail: z.ZodString;
248
+ }, z.core.$strip>>;
249
+ }, z.core.$strip>;
250
+ export type OrgConnectionTestResult = z.infer<typeof OrgConnectionTestResult>;
251
+ export declare const DirectoryEntry: z.ZodObject<{
252
+ id: z.ZodString;
253
+ email: z.ZodString;
254
+ displayName: z.ZodNullable<z.ZodString>;
255
+ accountId: z.ZodNullable<z.ZodUUID>;
256
+ }, z.core.$strip>;
257
+ export type DirectoryEntry = z.infer<typeof DirectoryEntry>;
258
+ export declare const DirectoryEntryPage: z.ZodObject<{
259
+ items: z.ZodArray<z.ZodObject<{
260
+ id: z.ZodString;
261
+ email: z.ZodString;
262
+ displayName: z.ZodNullable<z.ZodString>;
263
+ accountId: z.ZodNullable<z.ZodUUID>;
264
+ }, z.core.$strip>>;
265
+ nextCursor: z.ZodNullable<z.ZodString>;
266
+ }, z.core.$strip>;
267
+ export type DirectoryEntryPage = z.infer<typeof DirectoryEntryPage>;
268
+ export declare const AddMailboxInput: z.ZodObject<{
269
+ email: z.ZodEmail;
270
+ displayName: z.ZodOptional<z.ZodString>;
271
+ externalRef: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>;
273
+ export type AddMailboxInput = z.infer<typeof AddMailboxInput>;
274
+ export declare const AddMailboxesRequest: z.ZodObject<{
275
+ mailboxes: z.ZodArray<z.ZodObject<{
276
+ email: z.ZodEmail;
277
+ displayName: z.ZodOptional<z.ZodString>;
278
+ externalRef: z.ZodOptional<z.ZodString>;
279
+ }, z.core.$strip>>;
280
+ settings: z.ZodOptional<z.ZodObject<{
281
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
282
+ none: "none";
283
+ cache: "cache";
284
+ full: "full";
285
+ }>>;
286
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
287
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
288
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
289
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
290
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
291
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
292
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
293
+ }, z.core.$strip>>;
294
+ }, z.core.$strip>;
295
+ export type AddMailboxesRequest = z.infer<typeof AddMailboxesRequest>;
296
+ /** created: a new account. exists: a live account for the mailbox was already there.
297
+ * failed: see error. */
298
+ export declare const AddedMailboxStatus: z.ZodEnum<{
299
+ failed: "failed";
300
+ created: "created";
301
+ exists: "exists";
302
+ }>;
303
+ export type AddedMailboxStatus = z.infer<typeof AddedMailboxStatus>;
304
+ /** Why one mailbox was not added: `reason` is the reason the API would refuse it with (REASONS). */
305
+ export declare const AddedMailboxError: z.ZodObject<{
306
+ reason: z.ZodString;
307
+ message: z.ZodString;
308
+ }, z.core.$strip>;
309
+ export type AddedMailboxError = z.infer<typeof AddedMailboxError>;
310
+ export declare const AddedMailbox: z.ZodObject<{
311
+ email: z.ZodString;
312
+ status: z.ZodEnum<{
313
+ failed: "failed";
314
+ created: "created";
315
+ exists: "exists";
316
+ }>;
317
+ accountId: z.ZodNullable<z.ZodUUID>;
318
+ error: z.ZodNullable<z.ZodObject<{
319
+ reason: z.ZodString;
320
+ message: z.ZodString;
321
+ }, z.core.$strip>>;
322
+ }, z.core.$strip>;
323
+ export type AddedMailbox = z.infer<typeof AddedMailbox>;
324
+ /** One result per requested mailbox, in request order. */
325
+ export declare const AddedMailboxList: z.ZodObject<{
326
+ items: z.ZodArray<z.ZodObject<{
327
+ email: z.ZodString;
328
+ status: z.ZodEnum<{
329
+ failed: "failed";
330
+ created: "created";
331
+ exists: "exists";
332
+ }>;
333
+ accountId: z.ZodNullable<z.ZodUUID>;
334
+ error: z.ZodNullable<z.ZodObject<{
335
+ reason: z.ZodString;
336
+ message: z.ZodString;
337
+ }, z.core.$strip>>;
338
+ }, z.core.$strip>>;
339
+ }, z.core.$strip>;
340
+ export type AddedMailboxList = z.infer<typeof AddedMailboxList>;
341
+ export declare const OrgConnectionIdInput: z.ZodObject<{
342
+ connectionId: z.ZodUUID;
343
+ }, z.core.$strip>;
344
+ export type OrgConnectionIdInput = z.infer<typeof OrgConnectionIdInput>;
345
+ export declare const StartConsentRequest: z.ZodObject<{
346
+ redirectUri: z.ZodURL;
347
+ state: z.ZodOptional<z.ZodString>;
348
+ }, z.core.$strip>;
349
+ export type StartConsentRequest = z.infer<typeof StartConsentRequest>;
350
+ export declare const ConsentLink: z.ZodObject<{
351
+ consentUrl: z.ZodURL;
352
+ }, z.core.$strip>;
353
+ export type ConsentLink = z.infer<typeof ConsentLink>;
354
+ export declare const TestOrgConnectionRequest: z.ZodObject<{
355
+ user: z.ZodOptional<z.ZodEmail>;
356
+ }, z.core.$strip>;
357
+ export type TestOrgConnectionRequest = z.infer<typeof TestOrgConnectionRequest>;
358
+ export declare const ListDirectoryEntriesQuery: z.ZodObject<{
359
+ cursor: z.ZodOptional<z.ZodString>;
360
+ limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
361
+ query: z.ZodOptional<z.ZodString>;
362
+ }, z.core.$strip>;
363
+ export type ListDirectoryEntriesQuery = z.infer<typeof ListDirectoryEntriesQuery>;
364
+ export declare const OpenSharedMailboxRequest: z.ZodObject<{
365
+ email: z.ZodEmail;
366
+ displayName: z.ZodOptional<z.ZodString>;
367
+ externalRef: z.ZodOptional<z.ZodString>;
368
+ settings: z.ZodOptional<z.ZodObject<{
369
+ bodyStorage: z.ZodOptional<z.ZodEnum<{
370
+ none: "none";
371
+ cache: "cache";
372
+ full: "full";
373
+ }>>;
374
+ syncWindowDays: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
375
+ calendarEnabled: z.ZodOptional<z.ZodBoolean>;
376
+ contactsEnabled: z.ZodOptional<z.ZodBoolean>;
377
+ undoSendSeconds: z.ZodOptional<z.ZodNumber>;
378
+ trackOpens: z.ZodOptional<z.ZodBoolean>;
379
+ trackClicks: z.ZodOptional<z.ZodBoolean>;
380
+ trackingHoneypot: z.ZodOptional<z.ZodBoolean>;
381
+ }, z.core.$strip>>;
382
+ }, z.core.$strip>;
383
+ export type OpenSharedMailboxRequest = z.infer<typeof OpenSharedMailboxRequest>;