@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.
- package/README.md +233 -2
- package/client.d.ts +36 -0
- package/contract/accounts/models.d.ts +726 -0
- package/contract/accounts/routes.d.ts +1318 -0
- package/contract/ai/models.d.ts +30 -0
- package/contract/ai/routes.d.ts +89 -0
- package/contract/audit-log/models.d.ts +107 -0
- package/contract/audit-log/routes.d.ts +72 -0
- package/contract/calendar/models.d.ts +837 -0
- package/contract/calendar/routes.d.ts +1299 -0
- package/contract/connect/models.d.ts +272 -0
- package/contract/connect/routes.d.ts +531 -0
- package/contract/contacts/models.d.ts +269 -0
- package/contract/contacts/routes.d.ts +634 -0
- package/contract/errors.d.ts +108 -0
- package/contract/events/models.d.ts +2364 -0
- package/contract/events/routes.d.ts +107 -0
- package/contract/exports/models.d.ts +67 -0
- package/contract/exports/routes.d.ts +196 -0
- package/contract/identities/models.d.ts +100 -0
- package/contract/identities/routes.d.ts +249 -0
- package/contract/limits.d.ts +170 -0
- package/contract/mail/models.d.ts +528 -0
- package/contract/mail/routes.d.ts +749 -0
- package/contract/meetings/models.d.ts +232 -0
- package/contract/meetings/routes.d.ts +386 -0
- package/contract/oauth-apps/models.d.ts +92 -0
- package/contract/oauth-apps/routes.d.ts +187 -0
- package/contract/org-connections/models.d.ts +383 -0
- package/contract/org-connections/routes.d.ts +830 -0
- package/contract/primitives.d.ts +140 -0
- package/contract/public.d.ts +26 -0
- package/contract/reasons.d.ts +711 -0
- package/contract/router.d.ts +9773 -0
- package/contract/send/models.d.ts +750 -0
- package/contract/send/routes.d.ts +1239 -0
- package/contract/settings/models.d.ts +103 -0
- package/contract/settings/routes.d.ts +110 -0
- package/contract/suppressions/models.d.ts +231 -0
- package/contract/suppressions/routes.d.ts +317 -0
- package/contract/templates/models.d.ts +169 -0
- package/contract/templates/routes.d.ts +281 -0
- package/contract/threads/models.d.ts +117 -0
- package/contract/threads/routes.d.ts +336 -0
- package/contract/usage/models.d.ts +213 -0
- package/contract/usage/routes.d.ts +81 -0
- package/contract/webhooks/models.d.ts +879 -0
- package/contract/webhooks/routes.d.ts +839 -0
- package/contract/webhooks/signing.d.ts +35 -0
- package/errors.d.ts +15 -0
- package/index.d.ts +6 -0
- package/index.js +4334 -0
- package/index.js.map +59 -0
- package/package.json +45 -4
- package/pagination.d.ts +40 -0
- package/webhooks.d.ts +28 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const threads: {
|
|
3
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
4
|
+
accountId: z.ZodUUID;
|
|
5
|
+
mailboxId: z.ZodOptional<z.ZodUUID>;
|
|
6
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
7
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
9
|
+
items: z.ZodArray<z.ZodObject<{
|
|
10
|
+
id: z.ZodString;
|
|
11
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
12
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
13
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
14
|
+
name: z.ZodNullable<z.ZodString>;
|
|
15
|
+
address: z.ZodString;
|
|
16
|
+
}, z.core.$strip>>;
|
|
17
|
+
messageCount: z.ZodNumber;
|
|
18
|
+
unreadCount: z.ZodNumber;
|
|
19
|
+
isFlagged: z.ZodBoolean;
|
|
20
|
+
hasAttachments: z.ZodBoolean;
|
|
21
|
+
hasDrafts: z.ZodBoolean;
|
|
22
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
23
|
+
latestMessageId: z.ZodUUID;
|
|
24
|
+
lastMessageAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
25
|
+
}, z.core.$strip>>;
|
|
26
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
28
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
29
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
30
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
31
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
32
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
33
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
34
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
35
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
36
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
37
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
38
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
39
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
40
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
41
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
42
|
+
}>>, {
|
|
43
|
+
unknown_mailbox: import("../errors.js").DeclaredError<"unknown_mailbox">;
|
|
44
|
+
invalid_cursor: {
|
|
45
|
+
status: 400;
|
|
46
|
+
message: string;
|
|
47
|
+
};
|
|
48
|
+
account_not_found: {
|
|
49
|
+
status: 404;
|
|
50
|
+
message: string;
|
|
51
|
+
};
|
|
52
|
+
}>, Record<never, never>>;
|
|
53
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
54
|
+
accountId: z.ZodUUID;
|
|
55
|
+
threadId: z.ZodString;
|
|
56
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
57
|
+
id: z.ZodString;
|
|
58
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
59
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
60
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
61
|
+
name: z.ZodNullable<z.ZodString>;
|
|
62
|
+
address: z.ZodString;
|
|
63
|
+
}, z.core.$strip>>;
|
|
64
|
+
messageCount: z.ZodNumber;
|
|
65
|
+
unreadCount: z.ZodNumber;
|
|
66
|
+
isFlagged: z.ZodBoolean;
|
|
67
|
+
hasAttachments: z.ZodBoolean;
|
|
68
|
+
hasDrafts: z.ZodBoolean;
|
|
69
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
70
|
+
latestMessageId: z.ZodUUID;
|
|
71
|
+
lastMessageAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
72
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
73
|
+
id: z.ZodUUID;
|
|
74
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
75
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
76
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
77
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
78
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
79
|
+
name: z.ZodNullable<z.ZodString>;
|
|
80
|
+
address: z.ZodString;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
to: z.ZodArray<z.ZodObject<{
|
|
83
|
+
name: z.ZodNullable<z.ZodString>;
|
|
84
|
+
address: z.ZodString;
|
|
85
|
+
}, z.core.$strip>>;
|
|
86
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
87
|
+
name: z.ZodNullable<z.ZodString>;
|
|
88
|
+
address: z.ZodString;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
91
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
92
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
93
|
+
isRead: z.ZodBoolean;
|
|
94
|
+
isFlagged: z.ZodBoolean;
|
|
95
|
+
isDraft: z.ZodBoolean;
|
|
96
|
+
hasAttachments: z.ZodBoolean;
|
|
97
|
+
categories: z.ZodArray<z.ZodString>;
|
|
98
|
+
direction: z.ZodEnum<{
|
|
99
|
+
inbound: "inbound";
|
|
100
|
+
outbound: "outbound";
|
|
101
|
+
}>;
|
|
102
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
103
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
104
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
105
|
+
normal: "normal";
|
|
106
|
+
high: "high";
|
|
107
|
+
low: "low";
|
|
108
|
+
}>>;
|
|
109
|
+
}, z.core.$strip>>;
|
|
110
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
111
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
112
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
113
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
114
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
115
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
116
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
117
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
118
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
119
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
120
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
121
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
122
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
123
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
124
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
125
|
+
}>>, {
|
|
126
|
+
thread_not_found: {
|
|
127
|
+
status: 404;
|
|
128
|
+
message: string;
|
|
129
|
+
};
|
|
130
|
+
account_not_found: {
|
|
131
|
+
status: 404;
|
|
132
|
+
message: string;
|
|
133
|
+
};
|
|
134
|
+
}>, Record<never, never>>;
|
|
135
|
+
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
136
|
+
accountId: z.ZodUUID;
|
|
137
|
+
threadId: z.ZodString;
|
|
138
|
+
isRead: z.ZodOptional<z.ZodBoolean>;
|
|
139
|
+
mailboxId: z.ZodOptional<z.ZodUUID>;
|
|
140
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
141
|
+
id: z.ZodString;
|
|
142
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
143
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
144
|
+
participants: z.ZodArray<z.ZodObject<{
|
|
145
|
+
name: z.ZodNullable<z.ZodString>;
|
|
146
|
+
address: z.ZodString;
|
|
147
|
+
}, z.core.$strip>>;
|
|
148
|
+
messageCount: z.ZodNumber;
|
|
149
|
+
unreadCount: z.ZodNumber;
|
|
150
|
+
isFlagged: z.ZodBoolean;
|
|
151
|
+
hasAttachments: z.ZodBoolean;
|
|
152
|
+
hasDrafts: z.ZodBoolean;
|
|
153
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
154
|
+
latestMessageId: z.ZodUUID;
|
|
155
|
+
lastMessageAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
156
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
157
|
+
id: z.ZodUUID;
|
|
158
|
+
threadId: z.ZodNullable<z.ZodString>;
|
|
159
|
+
internetMessageId: z.ZodNullable<z.ZodString>;
|
|
160
|
+
mailboxIds: z.ZodArray<z.ZodUUID>;
|
|
161
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
162
|
+
from: z.ZodNullable<z.ZodObject<{
|
|
163
|
+
name: z.ZodNullable<z.ZodString>;
|
|
164
|
+
address: z.ZodString;
|
|
165
|
+
}, z.core.$strip>>;
|
|
166
|
+
to: z.ZodArray<z.ZodObject<{
|
|
167
|
+
name: z.ZodNullable<z.ZodString>;
|
|
168
|
+
address: z.ZodString;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
cc: z.ZodArray<z.ZodObject<{
|
|
171
|
+
name: z.ZodNullable<z.ZodString>;
|
|
172
|
+
address: z.ZodString;
|
|
173
|
+
}, z.core.$strip>>;
|
|
174
|
+
snippet: z.ZodNullable<z.ZodString>;
|
|
175
|
+
receivedAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
176
|
+
sentAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
177
|
+
isRead: z.ZodBoolean;
|
|
178
|
+
isFlagged: z.ZodBoolean;
|
|
179
|
+
isDraft: z.ZodBoolean;
|
|
180
|
+
hasAttachments: z.ZodBoolean;
|
|
181
|
+
categories: z.ZodArray<z.ZodString>;
|
|
182
|
+
direction: z.ZodEnum<{
|
|
183
|
+
inbound: "inbound";
|
|
184
|
+
outbound: "outbound";
|
|
185
|
+
}>;
|
|
186
|
+
outboxId: z.ZodNullable<z.ZodUUID>;
|
|
187
|
+
reference: z.ZodNullable<z.ZodString>;
|
|
188
|
+
importance: z.ZodNullable<z.ZodEnum<{
|
|
189
|
+
normal: "normal";
|
|
190
|
+
high: "high";
|
|
191
|
+
low: "low";
|
|
192
|
+
}>>;
|
|
193
|
+
}, z.core.$strip>>;
|
|
194
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
195
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
196
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
197
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
198
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
199
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
200
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
201
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
202
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
203
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
204
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
205
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
206
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
207
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
208
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
209
|
+
}>>, {
|
|
210
|
+
unknown_mailbox: import("../errors.js").DeclaredError<"unknown_mailbox">;
|
|
211
|
+
provider_not_found: {
|
|
212
|
+
status: 404;
|
|
213
|
+
message: string;
|
|
214
|
+
};
|
|
215
|
+
provider_forbidden: {
|
|
216
|
+
status: 403;
|
|
217
|
+
message: string;
|
|
218
|
+
};
|
|
219
|
+
provider_conflict: {
|
|
220
|
+
status: 409;
|
|
221
|
+
message: string;
|
|
222
|
+
};
|
|
223
|
+
provider_unsupported: {
|
|
224
|
+
status: 400;
|
|
225
|
+
message: string;
|
|
226
|
+
};
|
|
227
|
+
provider_rejected: {
|
|
228
|
+
status: 400;
|
|
229
|
+
message: string;
|
|
230
|
+
};
|
|
231
|
+
provider_unavailable: {
|
|
232
|
+
status: 502;
|
|
233
|
+
message: string;
|
|
234
|
+
};
|
|
235
|
+
provider_throttled: {
|
|
236
|
+
status: 429;
|
|
237
|
+
message: string;
|
|
238
|
+
};
|
|
239
|
+
account_paused: {
|
|
240
|
+
status: 409;
|
|
241
|
+
message: string;
|
|
242
|
+
};
|
|
243
|
+
account_disabled: {
|
|
244
|
+
status: 409;
|
|
245
|
+
message: string;
|
|
246
|
+
};
|
|
247
|
+
account_reauth_required: {
|
|
248
|
+
status: 409;
|
|
249
|
+
message: string;
|
|
250
|
+
};
|
|
251
|
+
account_misconfigured: {
|
|
252
|
+
status: 409;
|
|
253
|
+
message: string;
|
|
254
|
+
};
|
|
255
|
+
thread_not_found: {
|
|
256
|
+
status: 404;
|
|
257
|
+
message: string;
|
|
258
|
+
};
|
|
259
|
+
account_not_found: {
|
|
260
|
+
status: 404;
|
|
261
|
+
message: string;
|
|
262
|
+
};
|
|
263
|
+
}>, Record<never, never>>;
|
|
264
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
265
|
+
accountId: z.ZodUUID;
|
|
266
|
+
threadId: z.ZodString;
|
|
267
|
+
}, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
268
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
269
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
270
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
271
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
272
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
273
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
274
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
275
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
276
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
277
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
278
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
279
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
280
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
281
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
282
|
+
}>>, {
|
|
283
|
+
provider_not_found: {
|
|
284
|
+
status: 404;
|
|
285
|
+
message: string;
|
|
286
|
+
};
|
|
287
|
+
provider_forbidden: {
|
|
288
|
+
status: 403;
|
|
289
|
+
message: string;
|
|
290
|
+
};
|
|
291
|
+
provider_conflict: {
|
|
292
|
+
status: 409;
|
|
293
|
+
message: string;
|
|
294
|
+
};
|
|
295
|
+
provider_unsupported: {
|
|
296
|
+
status: 400;
|
|
297
|
+
message: string;
|
|
298
|
+
};
|
|
299
|
+
provider_rejected: {
|
|
300
|
+
status: 400;
|
|
301
|
+
message: string;
|
|
302
|
+
};
|
|
303
|
+
provider_unavailable: {
|
|
304
|
+
status: 502;
|
|
305
|
+
message: string;
|
|
306
|
+
};
|
|
307
|
+
provider_throttled: {
|
|
308
|
+
status: 429;
|
|
309
|
+
message: string;
|
|
310
|
+
};
|
|
311
|
+
account_paused: {
|
|
312
|
+
status: 409;
|
|
313
|
+
message: string;
|
|
314
|
+
};
|
|
315
|
+
account_disabled: {
|
|
316
|
+
status: 409;
|
|
317
|
+
message: string;
|
|
318
|
+
};
|
|
319
|
+
account_reauth_required: {
|
|
320
|
+
status: 409;
|
|
321
|
+
message: string;
|
|
322
|
+
};
|
|
323
|
+
account_misconfigured: {
|
|
324
|
+
status: 409;
|
|
325
|
+
message: string;
|
|
326
|
+
};
|
|
327
|
+
thread_not_found: {
|
|
328
|
+
status: 404;
|
|
329
|
+
message: string;
|
|
330
|
+
};
|
|
331
|
+
account_not_found: {
|
|
332
|
+
status: 404;
|
|
333
|
+
message: string;
|
|
334
|
+
};
|
|
335
|
+
}>, Record<never, never>>;
|
|
336
|
+
};
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/** The optional capabilities a plan includes. Mail is always included. */
|
|
3
|
+
export declare const PlanModules: z.ZodObject<{
|
|
4
|
+
calendar: z.ZodBoolean;
|
|
5
|
+
contacts: z.ZodBoolean;
|
|
6
|
+
tracking: z.ZodBoolean;
|
|
7
|
+
ai: z.ZodBoolean;
|
|
8
|
+
meetings: z.ZodBoolean;
|
|
9
|
+
sharedMailboxes: z.ZodBoolean;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
export type PlanModules = z.infer<typeof PlanModules>;
|
|
12
|
+
export type PlanModule = keyof PlanModules;
|
|
13
|
+
/** What the base fee covers; null = all of it (no overage billed). */
|
|
14
|
+
export declare const PlanIncluded: z.ZodObject<{
|
|
15
|
+
accounts: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
17
|
+
aiCallsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
18
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
export type PlanIncluded = z.infer<typeof PlanIncluded>;
|
|
21
|
+
export declare const PlanStripePrices: z.ZodObject<{
|
|
22
|
+
basePrice: z.ZodNullable<z.ZodString>;
|
|
23
|
+
accountPrice: z.ZodNullable<z.ZodString>;
|
|
24
|
+
sendsPrice: z.ZodNullable<z.ZodString>;
|
|
25
|
+
aiCallsPrice: z.ZodNullable<z.ZodString>;
|
|
26
|
+
storagePrice: z.ZodNullable<z.ZodString>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type PlanStripePrices = z.infer<typeof PlanStripePrices>;
|
|
29
|
+
export declare const PlanPricing: z.ZodObject<{
|
|
30
|
+
currency: z.ZodString;
|
|
31
|
+
baseMonthly: z.ZodNumber;
|
|
32
|
+
perAccountMonthly: z.ZodNumber;
|
|
33
|
+
sendsPer1k: z.ZodNumber;
|
|
34
|
+
aiCallsPer1k: z.ZodNumber;
|
|
35
|
+
storagePerGbMonth: z.ZodNumber;
|
|
36
|
+
stripe: z.ZodObject<{
|
|
37
|
+
basePrice: z.ZodNullable<z.ZodString>;
|
|
38
|
+
accountPrice: z.ZodNullable<z.ZodString>;
|
|
39
|
+
sendsPrice: z.ZodNullable<z.ZodString>;
|
|
40
|
+
aiCallsPrice: z.ZodNullable<z.ZodString>;
|
|
41
|
+
storagePrice: z.ZodNullable<z.ZodString>;
|
|
42
|
+
}, z.core.$strip>;
|
|
43
|
+
}, z.core.$strip>;
|
|
44
|
+
export type PlanPricing = z.infer<typeof PlanPricing>;
|
|
45
|
+
/** Count limits: null = unlimited. They are abuse ceilings; usage between included and a limit
|
|
46
|
+
* is billed as overage. */
|
|
47
|
+
export declare const PlanLimits: z.ZodObject<{
|
|
48
|
+
maxAccounts: z.ZodNullable<z.ZodNumber>;
|
|
49
|
+
sendsPerDay: z.ZodNullable<z.ZodNumber>;
|
|
50
|
+
apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
51
|
+
apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
|
|
52
|
+
webhookEndpoints: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
bodyStorageAllowed: z.ZodBoolean;
|
|
54
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
55
|
+
modules: z.ZodObject<{
|
|
56
|
+
calendar: z.ZodBoolean;
|
|
57
|
+
contacts: z.ZodBoolean;
|
|
58
|
+
tracking: z.ZodBoolean;
|
|
59
|
+
ai: z.ZodBoolean;
|
|
60
|
+
meetings: z.ZodBoolean;
|
|
61
|
+
sharedMailboxes: z.ZodBoolean;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
included: z.ZodObject<{
|
|
64
|
+
accounts: z.ZodNullable<z.ZodNumber>;
|
|
65
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
66
|
+
aiCallsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
67
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
pricing: z.ZodNullable<z.ZodObject<{
|
|
70
|
+
currency: z.ZodString;
|
|
71
|
+
baseMonthly: z.ZodNumber;
|
|
72
|
+
perAccountMonthly: z.ZodNumber;
|
|
73
|
+
sendsPer1k: z.ZodNumber;
|
|
74
|
+
aiCallsPer1k: z.ZodNumber;
|
|
75
|
+
storagePerGbMonth: z.ZodNumber;
|
|
76
|
+
stripe: z.ZodObject<{
|
|
77
|
+
basePrice: z.ZodNullable<z.ZodString>;
|
|
78
|
+
accountPrice: z.ZodNullable<z.ZodString>;
|
|
79
|
+
sendsPrice: z.ZodNullable<z.ZodString>;
|
|
80
|
+
aiCallsPrice: z.ZodNullable<z.ZodString>;
|
|
81
|
+
storagePrice: z.ZodNullable<z.ZodString>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
}, z.core.$strip>>;
|
|
84
|
+
}, z.core.$strip>;
|
|
85
|
+
export type PlanLimits = z.infer<typeof PlanLimits>;
|
|
86
|
+
/** The plan a tenant runs under; id null = no plan assigned, the platform defaults apply. */
|
|
87
|
+
export declare const EffectivePlan: z.ZodObject<{
|
|
88
|
+
id: z.ZodNullable<z.ZodUUID>;
|
|
89
|
+
name: z.ZodString;
|
|
90
|
+
limits: z.ZodObject<{
|
|
91
|
+
maxAccounts: z.ZodNullable<z.ZodNumber>;
|
|
92
|
+
sendsPerDay: z.ZodNullable<z.ZodNumber>;
|
|
93
|
+
apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
94
|
+
apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
|
|
95
|
+
webhookEndpoints: z.ZodNullable<z.ZodNumber>;
|
|
96
|
+
bodyStorageAllowed: z.ZodBoolean;
|
|
97
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
98
|
+
modules: z.ZodObject<{
|
|
99
|
+
calendar: z.ZodBoolean;
|
|
100
|
+
contacts: z.ZodBoolean;
|
|
101
|
+
tracking: z.ZodBoolean;
|
|
102
|
+
ai: z.ZodBoolean;
|
|
103
|
+
meetings: z.ZodBoolean;
|
|
104
|
+
sharedMailboxes: z.ZodBoolean;
|
|
105
|
+
}, z.core.$strip>;
|
|
106
|
+
included: z.ZodObject<{
|
|
107
|
+
accounts: z.ZodNullable<z.ZodNumber>;
|
|
108
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
109
|
+
aiCallsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
110
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
111
|
+
}, z.core.$strip>;
|
|
112
|
+
pricing: z.ZodNullable<z.ZodObject<{
|
|
113
|
+
currency: z.ZodString;
|
|
114
|
+
baseMonthly: z.ZodNumber;
|
|
115
|
+
perAccountMonthly: z.ZodNumber;
|
|
116
|
+
sendsPer1k: z.ZodNumber;
|
|
117
|
+
aiCallsPer1k: z.ZodNumber;
|
|
118
|
+
storagePerGbMonth: z.ZodNumber;
|
|
119
|
+
stripe: z.ZodObject<{
|
|
120
|
+
basePrice: z.ZodNullable<z.ZodString>;
|
|
121
|
+
accountPrice: z.ZodNullable<z.ZodString>;
|
|
122
|
+
sendsPrice: z.ZodNullable<z.ZodString>;
|
|
123
|
+
aiCallsPrice: z.ZodNullable<z.ZodString>;
|
|
124
|
+
storagePrice: z.ZodNullable<z.ZodString>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
}, z.core.$strip>>;
|
|
127
|
+
}, z.core.$strip>;
|
|
128
|
+
}, z.core.$strip>;
|
|
129
|
+
export type EffectivePlan = z.infer<typeof EffectivePlan>;
|
|
130
|
+
export declare const UsageDay: z.ZodObject<{
|
|
131
|
+
day: z.ZodISODate;
|
|
132
|
+
liveAccounts: z.ZodNumber;
|
|
133
|
+
apiCalls: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
134
|
+
sends: z.ZodNumber;
|
|
135
|
+
webhookDeliveries: z.ZodNumber;
|
|
136
|
+
aiCalls: z.ZodNumber;
|
|
137
|
+
storedBytes: z.ZodNullable<z.ZodNumber>;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
export type UsageDay = z.infer<typeof UsageDay>;
|
|
140
|
+
/** Where the tenant stands against its plan right now. */
|
|
141
|
+
export declare const CurrentUsage: z.ZodObject<{
|
|
142
|
+
accounts: z.ZodNumber;
|
|
143
|
+
webhookEndpoints: z.ZodNumber;
|
|
144
|
+
sendsToday: z.ZodNumber;
|
|
145
|
+
storedBytes: z.ZodNumber;
|
|
146
|
+
}, z.core.$strip>;
|
|
147
|
+
export type CurrentUsage = z.infer<typeof CurrentUsage>;
|
|
148
|
+
export declare const Usage: z.ZodObject<{
|
|
149
|
+
plan: z.ZodObject<{
|
|
150
|
+
id: z.ZodNullable<z.ZodUUID>;
|
|
151
|
+
name: z.ZodString;
|
|
152
|
+
limits: z.ZodObject<{
|
|
153
|
+
maxAccounts: z.ZodNullable<z.ZodNumber>;
|
|
154
|
+
sendsPerDay: z.ZodNullable<z.ZodNumber>;
|
|
155
|
+
apiCallsPerMinute: z.ZodNullable<z.ZodNumber>;
|
|
156
|
+
apiCallsPerMinutePerKey: z.ZodNullable<z.ZodNumber>;
|
|
157
|
+
webhookEndpoints: z.ZodNullable<z.ZodNumber>;
|
|
158
|
+
bodyStorageAllowed: z.ZodBoolean;
|
|
159
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
160
|
+
modules: z.ZodObject<{
|
|
161
|
+
calendar: z.ZodBoolean;
|
|
162
|
+
contacts: z.ZodBoolean;
|
|
163
|
+
tracking: z.ZodBoolean;
|
|
164
|
+
ai: z.ZodBoolean;
|
|
165
|
+
meetings: z.ZodBoolean;
|
|
166
|
+
sharedMailboxes: z.ZodBoolean;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
included: z.ZodObject<{
|
|
169
|
+
accounts: z.ZodNullable<z.ZodNumber>;
|
|
170
|
+
sendsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
171
|
+
aiCallsPerMonth: z.ZodNullable<z.ZodNumber>;
|
|
172
|
+
storageBytes: z.ZodNullable<z.ZodNumber>;
|
|
173
|
+
}, z.core.$strip>;
|
|
174
|
+
pricing: z.ZodNullable<z.ZodObject<{
|
|
175
|
+
currency: z.ZodString;
|
|
176
|
+
baseMonthly: z.ZodNumber;
|
|
177
|
+
perAccountMonthly: z.ZodNumber;
|
|
178
|
+
sendsPer1k: z.ZodNumber;
|
|
179
|
+
aiCallsPer1k: z.ZodNumber;
|
|
180
|
+
storagePerGbMonth: z.ZodNumber;
|
|
181
|
+
stripe: z.ZodObject<{
|
|
182
|
+
basePrice: z.ZodNullable<z.ZodString>;
|
|
183
|
+
accountPrice: z.ZodNullable<z.ZodString>;
|
|
184
|
+
sendsPrice: z.ZodNullable<z.ZodString>;
|
|
185
|
+
aiCallsPrice: z.ZodNullable<z.ZodString>;
|
|
186
|
+
storagePrice: z.ZodNullable<z.ZodString>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
}, z.core.$strip>>;
|
|
189
|
+
}, z.core.$strip>;
|
|
190
|
+
}, z.core.$strip>;
|
|
191
|
+
current: z.ZodObject<{
|
|
192
|
+
accounts: z.ZodNumber;
|
|
193
|
+
webhookEndpoints: z.ZodNumber;
|
|
194
|
+
sendsToday: z.ZodNumber;
|
|
195
|
+
storedBytes: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>;
|
|
197
|
+
days: z.ZodArray<z.ZodObject<{
|
|
198
|
+
day: z.ZodISODate;
|
|
199
|
+
liveAccounts: z.ZodNumber;
|
|
200
|
+
apiCalls: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
201
|
+
sends: z.ZodNumber;
|
|
202
|
+
webhookDeliveries: z.ZodNumber;
|
|
203
|
+
aiCalls: z.ZodNumber;
|
|
204
|
+
storedBytes: z.ZodNullable<z.ZodNumber>;
|
|
205
|
+
}, z.core.$strip>>;
|
|
206
|
+
}, z.core.$strip>;
|
|
207
|
+
export type Usage = z.infer<typeof Usage>;
|
|
208
|
+
/** UTC days, both ends included: from defaults to 30 days before to, to to today. */
|
|
209
|
+
export declare const UsageQuery: z.ZodObject<{
|
|
210
|
+
from: z.ZodOptional<z.ZodISODate>;
|
|
211
|
+
to: z.ZodOptional<z.ZodISODate>;
|
|
212
|
+
}, z.core.$strip>;
|
|
213
|
+
export type UsageQuery = z.infer<typeof UsageQuery>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export declare const usage: {
|
|
2
|
+
get: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<import("zod").ZodObject<{
|
|
3
|
+
from: import("zod").ZodOptional<import("zod").ZodISODate>;
|
|
4
|
+
to: import("zod").ZodOptional<import("zod").ZodISODate>;
|
|
5
|
+
}, import("zod/v4/core").$strip>, import("zod").ZodObject<{
|
|
6
|
+
plan: import("zod").ZodObject<{
|
|
7
|
+
id: import("zod").ZodNullable<import("zod").ZodUUID>;
|
|
8
|
+
name: import("zod").ZodString;
|
|
9
|
+
limits: import("zod").ZodObject<{
|
|
10
|
+
maxAccounts: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
11
|
+
sendsPerDay: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
12
|
+
apiCallsPerMinute: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
13
|
+
apiCallsPerMinutePerKey: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
14
|
+
webhookEndpoints: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
15
|
+
bodyStorageAllowed: import("zod").ZodBoolean;
|
|
16
|
+
storageBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
17
|
+
modules: import("zod").ZodObject<{
|
|
18
|
+
calendar: import("zod").ZodBoolean;
|
|
19
|
+
contacts: import("zod").ZodBoolean;
|
|
20
|
+
tracking: import("zod").ZodBoolean;
|
|
21
|
+
ai: import("zod").ZodBoolean;
|
|
22
|
+
meetings: import("zod").ZodBoolean;
|
|
23
|
+
sharedMailboxes: import("zod").ZodBoolean;
|
|
24
|
+
}, import("zod/v4/core").$strip>;
|
|
25
|
+
included: import("zod").ZodObject<{
|
|
26
|
+
accounts: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
27
|
+
sendsPerMonth: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
28
|
+
aiCallsPerMonth: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
29
|
+
storageBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
30
|
+
}, import("zod/v4/core").$strip>;
|
|
31
|
+
pricing: import("zod").ZodNullable<import("zod").ZodObject<{
|
|
32
|
+
currency: import("zod").ZodString;
|
|
33
|
+
baseMonthly: import("zod").ZodNumber;
|
|
34
|
+
perAccountMonthly: import("zod").ZodNumber;
|
|
35
|
+
sendsPer1k: import("zod").ZodNumber;
|
|
36
|
+
aiCallsPer1k: import("zod").ZodNumber;
|
|
37
|
+
storagePerGbMonth: import("zod").ZodNumber;
|
|
38
|
+
stripe: import("zod").ZodObject<{
|
|
39
|
+
basePrice: import("zod").ZodNullable<import("zod").ZodString>;
|
|
40
|
+
accountPrice: import("zod").ZodNullable<import("zod").ZodString>;
|
|
41
|
+
sendsPrice: import("zod").ZodNullable<import("zod").ZodString>;
|
|
42
|
+
aiCallsPrice: import("zod").ZodNullable<import("zod").ZodString>;
|
|
43
|
+
storagePrice: import("zod").ZodNullable<import("zod").ZodString>;
|
|
44
|
+
}, import("zod/v4/core").$strip>;
|
|
45
|
+
}, import("zod/v4/core").$strip>>;
|
|
46
|
+
}, import("zod/v4/core").$strip>;
|
|
47
|
+
}, import("zod/v4/core").$strip>;
|
|
48
|
+
current: import("zod").ZodObject<{
|
|
49
|
+
accounts: import("zod").ZodNumber;
|
|
50
|
+
webhookEndpoints: import("zod").ZodNumber;
|
|
51
|
+
sendsToday: import("zod").ZodNumber;
|
|
52
|
+
storedBytes: import("zod").ZodNumber;
|
|
53
|
+
}, import("zod/v4/core").$strip>;
|
|
54
|
+
days: import("zod").ZodArray<import("zod").ZodObject<{
|
|
55
|
+
day: import("zod").ZodISODate;
|
|
56
|
+
liveAccounts: import("zod").ZodNumber;
|
|
57
|
+
apiCalls: import("zod").ZodRecord<import("zod").ZodString, import("zod").ZodNumber>;
|
|
58
|
+
sends: import("zod").ZodNumber;
|
|
59
|
+
webhookDeliveries: import("zod").ZodNumber;
|
|
60
|
+
aiCalls: import("zod").ZodNumber;
|
|
61
|
+
storedBytes: import("zod").ZodNullable<import("zod").ZodNumber>;
|
|
62
|
+
}, import("zod/v4/core").$strip>>;
|
|
63
|
+
}, import("zod/v4/core").$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
64
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
65
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
66
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
67
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
68
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
69
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
70
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
71
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
72
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
73
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
74
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
75
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
76
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
77
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
78
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
79
|
+
readonly invalid_range: "from is after to (or after today, with to left out), or the range spans more than 366 days.";
|
|
80
|
+
}>>, Record<never, never>>;
|
|
81
|
+
};
|