@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,317 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const suppressions: {
|
|
3
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithOutput<import("@orpc/contract").Schema<unknown, unknown>, z.ZodObject<{
|
|
4
|
+
items: z.ZodArray<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
name: z.ZodString;
|
|
7
|
+
description: z.ZodNullable<z.ZodString>;
|
|
8
|
+
count: z.ZodNumber;
|
|
9
|
+
counts: z.ZodObject<{
|
|
10
|
+
unsubscribe: z.ZodNumber;
|
|
11
|
+
bounce: z.ZodNumber;
|
|
12
|
+
api: z.ZodNumber;
|
|
13
|
+
reply: z.ZodNumber;
|
|
14
|
+
complaint: z.ZodNumber;
|
|
15
|
+
inactive: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
createdAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
18
|
+
}, z.core.$strip>>;
|
|
19
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
20
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
21
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
22
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
23
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
24
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
25
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
26
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
27
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
28
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
29
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
30
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
31
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
32
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
33
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
34
|
+
}>>, Record<never, never>>;
|
|
35
|
+
create: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
36
|
+
id: z.ZodString;
|
|
37
|
+
name: z.ZodString;
|
|
38
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
id: z.ZodString;
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
description: z.ZodNullable<z.ZodString>;
|
|
43
|
+
count: z.ZodNumber;
|
|
44
|
+
counts: z.ZodObject<{
|
|
45
|
+
unsubscribe: z.ZodNumber;
|
|
46
|
+
bounce: z.ZodNumber;
|
|
47
|
+
api: z.ZodNumber;
|
|
48
|
+
reply: z.ZodNumber;
|
|
49
|
+
complaint: z.ZodNumber;
|
|
50
|
+
inactive: z.ZodNumber;
|
|
51
|
+
}, z.core.$strip>;
|
|
52
|
+
createdAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
53
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
54
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
55
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
56
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
57
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
58
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
59
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
60
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
61
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
62
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
63
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
64
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
65
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
66
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
67
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
68
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
69
|
+
readonly suppression_list_exists: "A list with that id exists.";
|
|
70
|
+
}>>, Record<never, never>>;
|
|
71
|
+
update: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
72
|
+
listId: z.ZodString;
|
|
73
|
+
name: z.ZodOptional<z.ZodString>;
|
|
74
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
id: z.ZodString;
|
|
77
|
+
name: z.ZodString;
|
|
78
|
+
description: z.ZodNullable<z.ZodString>;
|
|
79
|
+
count: z.ZodNumber;
|
|
80
|
+
counts: z.ZodObject<{
|
|
81
|
+
unsubscribe: z.ZodNumber;
|
|
82
|
+
bounce: z.ZodNumber;
|
|
83
|
+
api: z.ZodNumber;
|
|
84
|
+
reply: z.ZodNumber;
|
|
85
|
+
complaint: z.ZodNumber;
|
|
86
|
+
inactive: z.ZodNumber;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
createdAt: z.ZodNullable<z.ZodPreprocess<z.ZodDate, Date>>;
|
|
89
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
90
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
91
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
92
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
93
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
94
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
95
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
96
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
97
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
98
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
99
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
100
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
101
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
102
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
103
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
104
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
105
|
+
readonly suppression_list_not_found: "The list does not exist (the global list has none to change).";
|
|
106
|
+
}>>, Record<never, never>>;
|
|
107
|
+
delete: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
108
|
+
params: z.ZodObject<{
|
|
109
|
+
listId: z.ZodString;
|
|
110
|
+
}, z.core.$strip>;
|
|
111
|
+
query: z.ZodObject<{
|
|
112
|
+
withEntries: z.ZodDefault<z.ZodPipe<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
|
|
113
|
+
true: "true";
|
|
114
|
+
false: "false";
|
|
115
|
+
}>]>, z.ZodTransform<boolean, boolean | "true" | "false">>>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
}, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
118
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
119
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
120
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
121
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
122
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
123
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
124
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
125
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
126
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
127
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
128
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
129
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
130
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
131
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
132
|
+
}>>, {
|
|
133
|
+
suppression_list_not_empty: {
|
|
134
|
+
status: 409;
|
|
135
|
+
message: string;
|
|
136
|
+
};
|
|
137
|
+
suppression_list_not_found: {
|
|
138
|
+
status: 404;
|
|
139
|
+
message: string;
|
|
140
|
+
};
|
|
141
|
+
}>, Record<never, never>>;
|
|
142
|
+
entries: {
|
|
143
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
144
|
+
listId: z.ZodString;
|
|
145
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
146
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
147
|
+
address: z.ZodOptional<z.ZodString>;
|
|
148
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
api: "api";
|
|
150
|
+
bounce: "bounce";
|
|
151
|
+
unsubscribe: "unsubscribe";
|
|
152
|
+
reply: "reply";
|
|
153
|
+
complaint: "complaint";
|
|
154
|
+
inactive: "inactive";
|
|
155
|
+
}>>;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
items: z.ZodArray<z.ZodObject<{
|
|
158
|
+
address: z.ZodString;
|
|
159
|
+
source: z.ZodEnum<{
|
|
160
|
+
api: "api";
|
|
161
|
+
bounce: "bounce";
|
|
162
|
+
unsubscribe: "unsubscribe";
|
|
163
|
+
reply: "reply";
|
|
164
|
+
complaint: "complaint";
|
|
165
|
+
inactive: "inactive";
|
|
166
|
+
}>;
|
|
167
|
+
reason: z.ZodNullable<z.ZodString>;
|
|
168
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
169
|
+
}, z.core.$strip>>;
|
|
170
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
172
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
173
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
174
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
175
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
176
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
177
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
178
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
179
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
180
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
181
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
182
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
183
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
184
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
185
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
186
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
187
|
+
readonly invalid_cursor: "The cursor is not one this list issued.";
|
|
188
|
+
}>>, Record<never, never>>;
|
|
189
|
+
add: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
190
|
+
listId: z.ZodString;
|
|
191
|
+
addresses: z.ZodArray<z.ZodEmail>;
|
|
192
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
193
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
194
|
+
added: z.ZodNumber;
|
|
195
|
+
alreadyListed: z.ZodNumber;
|
|
196
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
197
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
198
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
199
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
200
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
201
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
202
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
203
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
204
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
205
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
206
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
207
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
208
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
209
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
210
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
211
|
+
}>>, Record<never, never>>;
|
|
212
|
+
remove: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
213
|
+
listId: z.ZodString;
|
|
214
|
+
address: z.ZodString;
|
|
215
|
+
}, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
216
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
217
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
218
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
219
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
220
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
221
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
222
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
223
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
224
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
225
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
226
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
227
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
228
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
229
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
230
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
231
|
+
readonly suppression_entry_not_found: "The address is not on the list.";
|
|
232
|
+
}>>, Record<never, never>>;
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
export declare const suppressionReviews: {
|
|
236
|
+
list: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
237
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
238
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
239
|
+
listId: z.ZodOptional<z.ZodString>;
|
|
240
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
241
|
+
items: z.ZodArray<z.ZodObject<{
|
|
242
|
+
id: z.ZodUUID;
|
|
243
|
+
listId: z.ZodString;
|
|
244
|
+
address: z.ZodString;
|
|
245
|
+
source: z.ZodEnum<{
|
|
246
|
+
reply: "reply";
|
|
247
|
+
complaint: "complaint";
|
|
248
|
+
inactive: "inactive";
|
|
249
|
+
}>;
|
|
250
|
+
accountId: z.ZodUUID;
|
|
251
|
+
messageId: z.ZodUUID;
|
|
252
|
+
probability: z.ZodNumber;
|
|
253
|
+
alternateContacts: z.ZodArray<z.ZodString>;
|
|
254
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
255
|
+
}, z.core.$strip>>;
|
|
256
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
257
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
258
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
259
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
260
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
261
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
262
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
263
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
264
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
265
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
266
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
267
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
268
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
269
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
270
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
271
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
272
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
273
|
+
readonly invalid_cursor: "The cursor is not one this list issued.";
|
|
274
|
+
}>>, Record<never, never>>;
|
|
275
|
+
approve: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
276
|
+
reviewId: z.ZodUUID;
|
|
277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
278
|
+
added: z.ZodBoolean;
|
|
279
|
+
}, z.core.$strip>, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
280
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
281
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
282
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
283
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
284
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
285
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
286
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
287
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
288
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
289
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
290
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
291
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
292
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
293
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
294
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
295
|
+
readonly suppression_review_not_found: "The review does not exist.";
|
|
296
|
+
}>>, Record<never, never>>;
|
|
297
|
+
dismiss: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
298
|
+
reviewId: z.ZodUUID;
|
|
299
|
+
}, z.core.$strip>, z.ZodVoid, import("@orpc/contract").MergedErrorMap<import("@orpc/contract").MergedErrorMap<Record<never, never>, import("../errors.js").DeclaredErrors<{
|
|
300
|
+
readonly invalid_input: "The request does not match the operation's input schema (a malformed body included); data.issues names each problem.";
|
|
301
|
+
readonly unauthenticated: "No usable credential: none was sent, or it is malformed, unknown, revoked or an expired account token.";
|
|
302
|
+
readonly api_key_expired: "The API key is past its expiry (or the grace of the rotation that replaced it).";
|
|
303
|
+
readonly missing_scope: "The API key lacks the scope the operation needs.";
|
|
304
|
+
readonly role_forbidden: "The member's role does not allow the operation.";
|
|
305
|
+
readonly account_token_forbidden: "An account token called an operation account tokens cannot call.";
|
|
306
|
+
readonly rate_limited: "The tenant used up its plan's request rate; Retry-After says when the window ends.";
|
|
307
|
+
readonly too_many_requests: "The credential has too many requests in flight at once; retry after Retry-After.";
|
|
308
|
+
readonly overloaded: "The API is shedding load; retry after Retry-After.";
|
|
309
|
+
readonly payload_too_large: "The request body is larger than the API accepts.";
|
|
310
|
+
readonly internal_error: "An unexpected failure on our side.";
|
|
311
|
+
readonly invalid_idempotency_key: "POST only: the Idempotency-Key header is not 1 to 255 printable ASCII characters.";
|
|
312
|
+
readonly idempotency_key_reused: "POST only: the Idempotency-Key was used in the last 24 hours with another method, path or body.";
|
|
313
|
+
readonly idempotency_key_in_progress: "POST only: the request first sent with this Idempotency-Key has not been answered yet.";
|
|
314
|
+
}>>, import("../errors.js").DeclaredErrors<{
|
|
315
|
+
readonly suppression_review_not_found: "The review does not exist.";
|
|
316
|
+
}>>, Record<never, never>>;
|
|
317
|
+
};
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
/** handlebars: written as Handlebars (API, board, EmailEngine import). react-email: compiled from
|
|
3
|
+
* a react-email component and uploaded by `workwae templates push`; the next push overwrites it.
|
|
4
|
+
* Both render the same way. */
|
|
5
|
+
export declare const TemplateSource: z.ZodEnum<{
|
|
6
|
+
handlebars: "handlebars";
|
|
7
|
+
"react-email": "react-email";
|
|
8
|
+
}>;
|
|
9
|
+
export type TemplateSource = z.infer<typeof TemplateSource>;
|
|
10
|
+
/** What the html field holds. markdown: Markdown, converted to HTML after Handlebars renders it;
|
|
11
|
+
* `{{...}}` values are escaped for HTML and Markdown first, so params add text, never markup. Raw
|
|
12
|
+
* HTML the author writes in the Markdown stays, as do `{{{...}}}` values. Without text, the plain
|
|
13
|
+
* text part is the rendered Markdown without the author's tags, its values as given. */
|
|
14
|
+
export declare const TemplateFormat: z.ZodEnum<{
|
|
15
|
+
markdown: "markdown";
|
|
16
|
+
html: "html";
|
|
17
|
+
}>;
|
|
18
|
+
export type TemplateFormat = z.infer<typeof TemplateFormat>;
|
|
19
|
+
/** The content fields Handlebars compiles and renders, which a template error names. */
|
|
20
|
+
export declare const TemplateField: z.ZodEnum<{
|
|
21
|
+
text: "text";
|
|
22
|
+
subject: "subject";
|
|
23
|
+
html: "html";
|
|
24
|
+
previewText: "previewText";
|
|
25
|
+
}>;
|
|
26
|
+
export type TemplateField = z.infer<typeof TemplateField>;
|
|
27
|
+
/** The rendered fields of a template, as Handlebars source. subject and text render without HTML
|
|
28
|
+
* escaping; html and previewText escape `{{...}}` and leave `{{{...}}}` raw. */
|
|
29
|
+
export declare const TemplateFields: z.ZodObject<{
|
|
30
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
31
|
+
html: z.ZodNullable<z.ZodString>;
|
|
32
|
+
text: z.ZodNullable<z.ZodString>;
|
|
33
|
+
previewText: z.ZodNullable<z.ZodString>;
|
|
34
|
+
format: z.ZodEnum<{
|
|
35
|
+
markdown: "markdown";
|
|
36
|
+
html: "html";
|
|
37
|
+
}>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type TemplateFields = z.infer<typeof TemplateFields>;
|
|
40
|
+
export declare const TemplateSummary: z.ZodObject<{
|
|
41
|
+
id: z.ZodUUID;
|
|
42
|
+
accountId: z.ZodNullable<z.ZodUUID>;
|
|
43
|
+
name: z.ZodString;
|
|
44
|
+
description: z.ZodNullable<z.ZodString>;
|
|
45
|
+
source: z.ZodEnum<{
|
|
46
|
+
handlebars: "handlebars";
|
|
47
|
+
"react-email": "react-email";
|
|
48
|
+
}>;
|
|
49
|
+
externalRef: z.ZodNullable<z.ZodString>;
|
|
50
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
51
|
+
updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
export type TemplateSummary = z.infer<typeof TemplateSummary>;
|
|
54
|
+
export declare const Template: z.ZodObject<{
|
|
55
|
+
id: z.ZodUUID;
|
|
56
|
+
accountId: z.ZodNullable<z.ZodUUID>;
|
|
57
|
+
name: z.ZodString;
|
|
58
|
+
description: z.ZodNullable<z.ZodString>;
|
|
59
|
+
source: z.ZodEnum<{
|
|
60
|
+
handlebars: "handlebars";
|
|
61
|
+
"react-email": "react-email";
|
|
62
|
+
}>;
|
|
63
|
+
externalRef: z.ZodNullable<z.ZodString>;
|
|
64
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
65
|
+
updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
66
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
67
|
+
html: z.ZodNullable<z.ZodString>;
|
|
68
|
+
text: z.ZodNullable<z.ZodString>;
|
|
69
|
+
previewText: z.ZodNullable<z.ZodString>;
|
|
70
|
+
format: z.ZodEnum<{
|
|
71
|
+
markdown: "markdown";
|
|
72
|
+
html: "html";
|
|
73
|
+
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type Template = z.infer<typeof Template>;
|
|
76
|
+
export declare const TemplateSummaryPage: z.ZodObject<{
|
|
77
|
+
items: z.ZodArray<z.ZodObject<{
|
|
78
|
+
id: z.ZodUUID;
|
|
79
|
+
accountId: z.ZodNullable<z.ZodUUID>;
|
|
80
|
+
name: z.ZodString;
|
|
81
|
+
description: z.ZodNullable<z.ZodString>;
|
|
82
|
+
source: z.ZodEnum<{
|
|
83
|
+
handlebars: "handlebars";
|
|
84
|
+
"react-email": "react-email";
|
|
85
|
+
}>;
|
|
86
|
+
externalRef: z.ZodNullable<z.ZodString>;
|
|
87
|
+
createdAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
88
|
+
updatedAt: z.ZodPreprocess<z.ZodDate, Date>;
|
|
89
|
+
}, z.core.$strip>>;
|
|
90
|
+
nextCursor: z.ZodNullable<z.ZodString>;
|
|
91
|
+
}, z.core.$strip>;
|
|
92
|
+
export type TemplateSummaryPage = z.infer<typeof TemplateSummaryPage>;
|
|
93
|
+
/** Values for `{{params.*}}`; `{{account.email}}` and `{{account.name}}` are the sending account's.
|
|
94
|
+
* A send naming a listId also gets `{{rcpt.unsubscribeUrl}}`, `{{rcpt.address}}` and
|
|
95
|
+
* `{{rcpt.name}}` (empty strings otherwise). At most MAX_RENDER_PARAMS_BYTES as JSON. */
|
|
96
|
+
export declare const RenderParams: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
97
|
+
export type RenderParams = z.infer<typeof RenderParams>;
|
|
98
|
+
export declare const RenderedTemplate: z.ZodObject<{
|
|
99
|
+
subject: z.ZodNullable<z.ZodString>;
|
|
100
|
+
html: z.ZodNullable<z.ZodString>;
|
|
101
|
+
text: z.ZodNullable<z.ZodString>;
|
|
102
|
+
previewText: z.ZodNullable<z.ZodString>;
|
|
103
|
+
}, z.core.$strip>;
|
|
104
|
+
export type RenderedTemplate = z.infer<typeof RenderedTemplate>;
|
|
105
|
+
export declare const TemplateIdInput: z.ZodObject<{
|
|
106
|
+
templateId: z.ZodUUID;
|
|
107
|
+
}, z.core.$strip>;
|
|
108
|
+
export type TemplateIdInput = z.infer<typeof TemplateIdInput>;
|
|
109
|
+
export declare const ListTemplatesQuery: z.ZodObject<{
|
|
110
|
+
accountId: z.ZodOptional<z.ZodUUID>;
|
|
111
|
+
usableBy: z.ZodOptional<z.ZodUUID>;
|
|
112
|
+
name: z.ZodOptional<z.ZodString>;
|
|
113
|
+
query: z.ZodOptional<z.ZodString>;
|
|
114
|
+
limit: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
115
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
116
|
+
}, z.core.$strip>;
|
|
117
|
+
export type ListTemplatesQuery = z.infer<typeof ListTemplatesQuery>;
|
|
118
|
+
export declare const CreateTemplate: z.ZodObject<{
|
|
119
|
+
accountId: z.ZodOptional<z.ZodUUID>;
|
|
120
|
+
name: z.ZodString;
|
|
121
|
+
description: z.ZodOptional<z.ZodString>;
|
|
122
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
123
|
+
html: z.ZodOptional<z.ZodString>;
|
|
124
|
+
text: z.ZodOptional<z.ZodString>;
|
|
125
|
+
previewText: z.ZodOptional<z.ZodString>;
|
|
126
|
+
format: z.ZodDefault<z.ZodEnum<{
|
|
127
|
+
markdown: "markdown";
|
|
128
|
+
html: "html";
|
|
129
|
+
}>>;
|
|
130
|
+
source: z.ZodDefault<z.ZodEnum<{
|
|
131
|
+
handlebars: "handlebars";
|
|
132
|
+
"react-email": "react-email";
|
|
133
|
+
}>>;
|
|
134
|
+
externalRef: z.ZodOptional<z.ZodString>;
|
|
135
|
+
}, z.core.$strip>;
|
|
136
|
+
export type CreateTemplate = z.infer<typeof CreateTemplate>;
|
|
137
|
+
export declare const UpdateTemplate: z.ZodObject<{
|
|
138
|
+
name: z.ZodOptional<z.ZodString>;
|
|
139
|
+
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
140
|
+
subject: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
141
|
+
html: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
142
|
+
text: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
143
|
+
previewText: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
144
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
145
|
+
markdown: "markdown";
|
|
146
|
+
html: "html";
|
|
147
|
+
}>>;
|
|
148
|
+
source: z.ZodOptional<z.ZodEnum<{
|
|
149
|
+
handlebars: "handlebars";
|
|
150
|
+
"react-email": "react-email";
|
|
151
|
+
}>>;
|
|
152
|
+
externalRef: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
153
|
+
}, z.core.$strip>;
|
|
154
|
+
export type UpdateTemplate = z.infer<typeof UpdateTemplate>;
|
|
155
|
+
/** A stored template (templateId) or inline fields, not both: a template replaces them all. */
|
|
156
|
+
export declare const RenderTemplateRequest: z.ZodObject<{
|
|
157
|
+
templateId: z.ZodOptional<z.ZodUUID>;
|
|
158
|
+
accountId: z.ZodOptional<z.ZodUUID>;
|
|
159
|
+
subject: z.ZodOptional<z.ZodString>;
|
|
160
|
+
html: z.ZodOptional<z.ZodString>;
|
|
161
|
+
text: z.ZodOptional<z.ZodString>;
|
|
162
|
+
previewText: z.ZodOptional<z.ZodString>;
|
|
163
|
+
format: z.ZodOptional<z.ZodEnum<{
|
|
164
|
+
markdown: "markdown";
|
|
165
|
+
html: "html";
|
|
166
|
+
}>>;
|
|
167
|
+
params: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
168
|
+
}, z.core.$strip>;
|
|
169
|
+
export type RenderTemplateRequest = z.infer<typeof RenderTemplateRequest>;
|