@primitivedotdev/sdk 0.6.0 → 0.8.0
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 +114 -210
- package/dist/address-parser-CfPHs3mE.js +113 -0
- package/dist/api/generated/index.js +1 -1
- package/dist/api/generated/sdk.gen.js +17 -0
- package/dist/api/index.d.ts +4 -1877
- package/dist/api/index.js +255 -0
- package/dist/api-BH8PnmHs.js +1338 -0
- package/dist/contract/index.d.ts +3 -2
- package/dist/contract/index.js +3 -1
- package/dist/{index-DLmAI4UQ.d.ts → index-CuuP1JkG.d.ts} +9 -2
- package/dist/index-D9lanVFt.d.ts +2145 -0
- package/dist/index.d.ts +12 -3
- package/dist/index.js +13 -2
- package/dist/openapi/openapi.generated.js +413 -1
- package/dist/openapi/operations.generated.js +16 -0
- package/dist/parser/address-parser.js +129 -0
- package/dist/parser/index.d.ts +105 -3
- package/dist/parser/index.js +2 -1
- package/dist/received-email-C67Z7Dha.d.ts +36 -0
- package/dist/received-email-Q6Cha3wc.js +71 -0
- package/dist/types.generated.js +7 -0
- package/dist/types.js +53 -0
- package/dist/webhook/index.d.ts +4 -3
- package/dist/webhook/index.js +4 -2
- package/dist/webhook/received-email.js +82 -0
- package/dist/{webhook-COe5N_Uj.js → webhook-2TALcBQz.js} +16 -1
- package/oclif.manifest.json +47 -1
- package/package.json +10 -3
- /package/dist/{types-CKFmgitP.d.ts → types-CIOzt1FY.d.ts} +0 -0
package/dist/api/index.d.ts
CHANGED
|
@@ -1,1877 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
interface Auth {
|
|
6
|
-
/**
|
|
7
|
-
* Which part of the request do we use to send the auth?
|
|
8
|
-
*
|
|
9
|
-
* @default 'header'
|
|
10
|
-
*/
|
|
11
|
-
in?: 'header' | 'query' | 'cookie';
|
|
12
|
-
/**
|
|
13
|
-
* Header or query parameter name.
|
|
14
|
-
*
|
|
15
|
-
* @default 'Authorization'
|
|
16
|
-
*/
|
|
17
|
-
name?: string;
|
|
18
|
-
scheme?: 'basic' | 'bearer';
|
|
19
|
-
type: 'apiKey' | 'http';
|
|
20
|
-
} //#endregion
|
|
21
|
-
//#region src/api/generated/core/pathSerializer.gen.d.ts
|
|
22
|
-
interface SerializerOptions<T> {
|
|
23
|
-
/**
|
|
24
|
-
* @default true
|
|
25
|
-
*/
|
|
26
|
-
explode: boolean;
|
|
27
|
-
style: T;
|
|
28
|
-
}
|
|
29
|
-
type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
|
|
30
|
-
type ObjectStyle = 'form' | 'deepObject'; //#endregion
|
|
31
|
-
//#region src/api/generated/core/bodySerializer.gen.d.ts
|
|
32
|
-
type QuerySerializer = (query: Record<string, unknown>) => string;
|
|
33
|
-
type BodySerializer = (body: unknown) => unknown;
|
|
34
|
-
type QuerySerializerOptionsObject = {
|
|
35
|
-
allowReserved?: boolean;
|
|
36
|
-
array?: Partial<SerializerOptions<ArrayStyle>>;
|
|
37
|
-
object?: Partial<SerializerOptions<ObjectStyle>>;
|
|
38
|
-
};
|
|
39
|
-
type QuerySerializerOptions = QuerySerializerOptionsObject & {
|
|
40
|
-
/**
|
|
41
|
-
* Per-parameter serialization overrides. When provided, these settings
|
|
42
|
-
* override the global array/object settings for specific parameter names.
|
|
43
|
-
*/
|
|
44
|
-
parameters?: Record<string, QuerySerializerOptionsObject>;
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
//#endregion
|
|
48
|
-
//#region src/api/generated/core/types.gen.d.ts
|
|
49
|
-
type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
|
|
50
|
-
type Client$1<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
|
|
51
|
-
/**
|
|
52
|
-
* Returns the final request URL.
|
|
53
|
-
*/
|
|
54
|
-
buildUrl: BuildUrlFn;
|
|
55
|
-
getConfig: () => Config$1;
|
|
56
|
-
request: RequestFn;
|
|
57
|
-
setConfig: (config: Config$1) => Config$1;
|
|
58
|
-
} & { [K in HttpMethod]: MethodFn } & ([SseFn] extends [never] ? {
|
|
59
|
-
sse?: never;
|
|
60
|
-
} : {
|
|
61
|
-
sse: { [K in HttpMethod]: SseFn };
|
|
62
|
-
});
|
|
63
|
-
interface Config$1 {
|
|
64
|
-
/**
|
|
65
|
-
* Auth token or a function returning auth token. The resolved value will be
|
|
66
|
-
* added to the request payload as defined by its `security` array.
|
|
67
|
-
*/
|
|
68
|
-
auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
|
|
69
|
-
/**
|
|
70
|
-
* A function for serializing request body parameter. By default,
|
|
71
|
-
* {@link JSON.stringify()} will be used.
|
|
72
|
-
*/
|
|
73
|
-
bodySerializer?: BodySerializer | null;
|
|
74
|
-
/**
|
|
75
|
-
* An object containing any HTTP headers that you want to pre-populate your
|
|
76
|
-
* `Headers` object with.
|
|
77
|
-
*
|
|
78
|
-
* {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
|
|
79
|
-
*/
|
|
80
|
-
headers?: RequestInit['headers'] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
|
|
81
|
-
/**
|
|
82
|
-
* The request method.
|
|
83
|
-
*
|
|
84
|
-
* {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
|
|
85
|
-
*/
|
|
86
|
-
method?: Uppercase<HttpMethod>;
|
|
87
|
-
/**
|
|
88
|
-
* A function for serializing request query parameters. By default, arrays
|
|
89
|
-
* will be exploded in form style, objects will be exploded in deepObject
|
|
90
|
-
* style, and reserved characters are percent-encoded.
|
|
91
|
-
*
|
|
92
|
-
* This method will have no effect if the native `paramsSerializer()` Axios
|
|
93
|
-
* API function is used.
|
|
94
|
-
*
|
|
95
|
-
* {@link https://swagger.io/docs/specification/serialization/#query View examples}
|
|
96
|
-
*/
|
|
97
|
-
querySerializer?: QuerySerializer | QuerySerializerOptions;
|
|
98
|
-
/**
|
|
99
|
-
* A function validating request data. This is useful if you want to ensure
|
|
100
|
-
* the request conforms to the desired shape, so it can be safely sent to
|
|
101
|
-
* the server.
|
|
102
|
-
*/
|
|
103
|
-
requestValidator?: (data: unknown) => Promise<unknown>;
|
|
104
|
-
/**
|
|
105
|
-
* A function transforming response data before it's returned. This is useful
|
|
106
|
-
* for post-processing data, e.g., converting ISO strings into Date objects.
|
|
107
|
-
*/
|
|
108
|
-
responseTransformer?: (data: unknown) => Promise<unknown>;
|
|
109
|
-
/**
|
|
110
|
-
* A function validating response data. This is useful if you want to ensure
|
|
111
|
-
* the response conforms to the desired shape, so it can be safely passed to
|
|
112
|
-
* the transformers and returned to the user.
|
|
113
|
-
*/
|
|
114
|
-
responseValidator?: (data: unknown) => Promise<unknown>;
|
|
115
|
-
} //#endregion
|
|
116
|
-
//#region src/api/generated/core/serverSentEvents.gen.d.ts
|
|
117
|
-
type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, 'method'> & Pick<Config$1, 'method' | 'responseTransformer' | 'responseValidator'> & {
|
|
118
|
-
/**
|
|
119
|
-
* Fetch API implementation. You can use this option to provide a custom
|
|
120
|
-
* fetch instance.
|
|
121
|
-
*
|
|
122
|
-
* @default globalThis.fetch
|
|
123
|
-
*/
|
|
124
|
-
fetch?: typeof fetch;
|
|
125
|
-
/**
|
|
126
|
-
* Implementing clients can call request interceptors inside this hook.
|
|
127
|
-
*/
|
|
128
|
-
onRequest?: (url: string, init: RequestInit) => Promise<Request>;
|
|
129
|
-
/**
|
|
130
|
-
* Callback invoked when a network or parsing error occurs during streaming.
|
|
131
|
-
*
|
|
132
|
-
* This option applies only if the endpoint returns a stream of events.
|
|
133
|
-
*
|
|
134
|
-
* @param error The error that occurred.
|
|
135
|
-
*/
|
|
136
|
-
onSseError?: (error: unknown) => void;
|
|
137
|
-
/**
|
|
138
|
-
* Callback invoked when an event is streamed from the server.
|
|
139
|
-
*
|
|
140
|
-
* This option applies only if the endpoint returns a stream of events.
|
|
141
|
-
*
|
|
142
|
-
* @param event Event streamed from the server.
|
|
143
|
-
* @returns Nothing (void).
|
|
144
|
-
*/
|
|
145
|
-
onSseEvent?: (event: StreamEvent<TData>) => void;
|
|
146
|
-
serializedBody?: RequestInit['body'];
|
|
147
|
-
/**
|
|
148
|
-
* Default retry delay in milliseconds.
|
|
149
|
-
*
|
|
150
|
-
* This option applies only if the endpoint returns a stream of events.
|
|
151
|
-
*
|
|
152
|
-
* @default 3000
|
|
153
|
-
*/
|
|
154
|
-
sseDefaultRetryDelay?: number;
|
|
155
|
-
/**
|
|
156
|
-
* Maximum number of retry attempts before giving up.
|
|
157
|
-
*/
|
|
158
|
-
sseMaxRetryAttempts?: number;
|
|
159
|
-
/**
|
|
160
|
-
* Maximum retry delay in milliseconds.
|
|
161
|
-
*
|
|
162
|
-
* Applies only when exponential backoff is used.
|
|
163
|
-
*
|
|
164
|
-
* This option applies only if the endpoint returns a stream of events.
|
|
165
|
-
*
|
|
166
|
-
* @default 30000
|
|
167
|
-
*/
|
|
168
|
-
sseMaxRetryDelay?: number;
|
|
169
|
-
/**
|
|
170
|
-
* Optional sleep function for retry backoff.
|
|
171
|
-
*
|
|
172
|
-
* Defaults to using `setTimeout`.
|
|
173
|
-
*/
|
|
174
|
-
sseSleepFn?: (ms: number) => Promise<void>;
|
|
175
|
-
url: string;
|
|
176
|
-
};
|
|
177
|
-
interface StreamEvent<TData = unknown> {
|
|
178
|
-
data: TData;
|
|
179
|
-
event?: string;
|
|
180
|
-
id?: string;
|
|
181
|
-
retry?: number;
|
|
182
|
-
}
|
|
183
|
-
type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
|
|
184
|
-
stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
//#endregion
|
|
188
|
-
//#region src/api/generated/client/utils.gen.d.ts
|
|
189
|
-
type ErrInterceptor<Err, Res, Req, Options> = (error: Err, response: Res, request: Req, options: Options) => Err | Promise<Err>;
|
|
190
|
-
type ReqInterceptor<Req, Options> = (request: Req, options: Options) => Req | Promise<Req>;
|
|
191
|
-
type ResInterceptor<Res, Req, Options> = (response: Res, request: Req, options: Options) => Res | Promise<Res>;
|
|
192
|
-
declare class Interceptors<Interceptor> {
|
|
193
|
-
fns: Array<Interceptor | null>;
|
|
194
|
-
clear(): void;
|
|
195
|
-
eject(id: number | Interceptor): void;
|
|
196
|
-
exists(id: number | Interceptor): boolean;
|
|
197
|
-
getInterceptorIndex(id: number | Interceptor): number;
|
|
198
|
-
update(id: number | Interceptor, fn: Interceptor): number | Interceptor | false;
|
|
199
|
-
use(fn: Interceptor): number;
|
|
200
|
-
}
|
|
201
|
-
interface Middleware<Req, Res, Err, Options> {
|
|
202
|
-
error: Interceptors<ErrInterceptor<Err, Res, Req, Options>>;
|
|
203
|
-
request: Interceptors<ReqInterceptor<Req, Options>>;
|
|
204
|
-
response: Interceptors<ResInterceptor<Res, Req, Options>>;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
//#endregion
|
|
208
|
-
//#region src/api/generated/client/types.gen.d.ts
|
|
209
|
-
type ResponseStyle = 'data' | 'fields';
|
|
210
|
-
interface Config<T extends ClientOptions$1 = ClientOptions$1> extends Omit<RequestInit, 'body' | 'headers' | 'method'>, Config$1 {
|
|
211
|
-
/**
|
|
212
|
-
* Base URL for all requests made by this client.
|
|
213
|
-
*/
|
|
214
|
-
baseUrl?: T['baseUrl'];
|
|
215
|
-
/**
|
|
216
|
-
* Fetch API implementation. You can use this option to provide a custom
|
|
217
|
-
* fetch instance.
|
|
218
|
-
*
|
|
219
|
-
* @default globalThis.fetch
|
|
220
|
-
*/
|
|
221
|
-
fetch?: typeof fetch;
|
|
222
|
-
/**
|
|
223
|
-
* Please don't use the Fetch client for Next.js applications. The `next`
|
|
224
|
-
* options won't have any effect.
|
|
225
|
-
*
|
|
226
|
-
* Install {@link https://www.npmjs.com/package/@hey-api/client-next `@hey-api/client-next`} instead.
|
|
227
|
-
*/
|
|
228
|
-
next?: never;
|
|
229
|
-
/**
|
|
230
|
-
* Return the response data parsed in a specified format. By default, `auto`
|
|
231
|
-
* will infer the appropriate method from the `Content-Type` response header.
|
|
232
|
-
* You can override this behavior with any of the {@link Body} methods.
|
|
233
|
-
* Select `stream` if you don't want to parse response data at all.
|
|
234
|
-
*
|
|
235
|
-
* @default 'auto'
|
|
236
|
-
*/
|
|
237
|
-
parseAs?: 'arrayBuffer' | 'auto' | 'blob' | 'formData' | 'json' | 'stream' | 'text';
|
|
238
|
-
/**
|
|
239
|
-
* Should we return only data or multiple fields (data, error, response, etc.)?
|
|
240
|
-
*
|
|
241
|
-
* @default 'fields'
|
|
242
|
-
*/
|
|
243
|
-
responseStyle?: ResponseStyle;
|
|
244
|
-
/**
|
|
245
|
-
* Throw an error instead of returning it in the response?
|
|
246
|
-
*
|
|
247
|
-
* @default false
|
|
248
|
-
*/
|
|
249
|
-
throwOnError?: T['throwOnError'];
|
|
250
|
-
}
|
|
251
|
-
interface RequestOptions<TData = unknown, TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends Config<{
|
|
252
|
-
responseStyle: TResponseStyle;
|
|
253
|
-
throwOnError: ThrowOnError;
|
|
254
|
-
}>, Pick<ServerSentEventsOptions<TData>, 'onRequest' | 'onSseError' | 'onSseEvent' | 'sseDefaultRetryDelay' | 'sseMaxRetryAttempts' | 'sseMaxRetryDelay'> {
|
|
255
|
-
/**
|
|
256
|
-
* Any body that you want to add to your request.
|
|
257
|
-
*
|
|
258
|
-
* {@link https://developer.mozilla.org/docs/Web/API/fetch#body}
|
|
259
|
-
*/
|
|
260
|
-
body?: unknown;
|
|
261
|
-
path?: Record<string, unknown>;
|
|
262
|
-
query?: Record<string, unknown>;
|
|
263
|
-
/**
|
|
264
|
-
* Security mechanism(s) to use for the request.
|
|
265
|
-
*/
|
|
266
|
-
security?: ReadonlyArray<Auth>;
|
|
267
|
-
url: Url;
|
|
268
|
-
}
|
|
269
|
-
interface ResolvedRequestOptions<TResponseStyle extends ResponseStyle = 'fields', ThrowOnError extends boolean = boolean, Url extends string = string> extends RequestOptions<unknown, TResponseStyle, ThrowOnError, Url> {
|
|
270
|
-
serializedBody?: string;
|
|
271
|
-
}
|
|
272
|
-
type RequestResult<TData = unknown, TError = unknown, ThrowOnError extends boolean = boolean, TResponseStyle extends ResponseStyle = 'fields'> = ThrowOnError extends true ? Promise<TResponseStyle extends 'data' ? TData extends Record<string, unknown> ? TData[keyof TData] : TData : {
|
|
273
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
274
|
-
request: Request;
|
|
275
|
-
response: Response;
|
|
276
|
-
}> : Promise<TResponseStyle extends 'data' ? (TData extends Record<string, unknown> ? TData[keyof TData] : TData) | undefined : ({
|
|
277
|
-
data: TData extends Record<string, unknown> ? TData[keyof TData] : TData;
|
|
278
|
-
error: undefined;
|
|
279
|
-
} | {
|
|
280
|
-
data: undefined;
|
|
281
|
-
error: TError extends Record<string, unknown> ? TError[keyof TError] : TError;
|
|
282
|
-
}) & {
|
|
283
|
-
request: Request;
|
|
284
|
-
response: Response;
|
|
285
|
-
}>;
|
|
286
|
-
interface ClientOptions$1 {
|
|
287
|
-
baseUrl?: string;
|
|
288
|
-
responseStyle?: ResponseStyle;
|
|
289
|
-
throwOnError?: boolean;
|
|
290
|
-
}
|
|
291
|
-
type MethodFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
292
|
-
type SseFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>) => Promise<ServerSentEventsResult<TData, TError>>;
|
|
293
|
-
type RequestFn$1 = <TData = unknown, TError = unknown, ThrowOnError extends boolean = false, TResponseStyle extends ResponseStyle = 'fields'>(options: Omit<RequestOptions<TData, TResponseStyle, ThrowOnError>, 'method'> & Pick<Required<RequestOptions<TData, TResponseStyle, ThrowOnError>>, 'method'>) => RequestResult<TData, TError, ThrowOnError, TResponseStyle>;
|
|
294
|
-
type BuildUrlFn$1 = <TData extends {
|
|
295
|
-
body?: unknown;
|
|
296
|
-
path?: Record<string, unknown>;
|
|
297
|
-
query?: Record<string, unknown>;
|
|
298
|
-
url: string;
|
|
299
|
-
}>(options: TData & Options$2<TData>) => string;
|
|
300
|
-
type Client = Client$1<RequestFn$1, Config, MethodFn$1, BuildUrlFn$1, SseFn$1> & {
|
|
301
|
-
interceptors: Middleware<Request, Response, unknown, ResolvedRequestOptions>;
|
|
302
|
-
};
|
|
303
|
-
/**
|
|
304
|
-
* The `createClientConfig()` function will be called on client initialization
|
|
305
|
-
* and the returned object will become the client's initial configuration.
|
|
306
|
-
*
|
|
307
|
-
* You may want to initialize your client this way instead of calling
|
|
308
|
-
* `setConfig()`. This is useful for example if you're using Next.js
|
|
309
|
-
* to ensure your client always has the correct values.
|
|
310
|
-
*/
|
|
311
|
-
type CreateClientConfig<T extends ClientOptions$1 = ClientOptions$1> = (override?: Config<ClientOptions$1 & T>) => Config<Required<ClientOptions$1> & T>;
|
|
312
|
-
interface TDataShape {
|
|
313
|
-
body?: unknown;
|
|
314
|
-
headers?: unknown;
|
|
315
|
-
path?: unknown;
|
|
316
|
-
query?: unknown;
|
|
317
|
-
url: string;
|
|
318
|
-
}
|
|
319
|
-
type OmitKeys<T, K> = Pick<T, Exclude<keyof T, K>>;
|
|
320
|
-
type Options$2<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown, TResponseStyle extends ResponseStyle = 'fields'> = OmitKeys<RequestOptions<TResponse, TResponseStyle, ThrowOnError>, 'body' | 'path' | 'query' | 'url'> & ([TData] extends [never] ? unknown : Omit<TData, 'url'>);
|
|
321
|
-
|
|
322
|
-
//#endregion
|
|
323
|
-
//#region src/api/generated/types.gen.d.ts
|
|
324
|
-
type ClientOptions = {
|
|
325
|
-
baseUrl: 'https://www.primitive.dev/api/v1' | (string & {});
|
|
326
|
-
};
|
|
327
|
-
type SuccessEnvelope = {
|
|
328
|
-
success: boolean;
|
|
329
|
-
};
|
|
330
|
-
type ListEnvelope = {
|
|
331
|
-
success: boolean;
|
|
332
|
-
meta: PaginationMeta;
|
|
333
|
-
};
|
|
334
|
-
type PaginationMeta = {
|
|
335
|
-
/**
|
|
336
|
-
* Total number of matching records
|
|
337
|
-
*/
|
|
338
|
-
total: number;
|
|
339
|
-
/**
|
|
340
|
-
* Page size used for this request
|
|
341
|
-
*/
|
|
342
|
-
limit: number;
|
|
343
|
-
/**
|
|
344
|
-
* Cursor for the next page, or null if no more results
|
|
345
|
-
*/
|
|
346
|
-
cursor: string | null;
|
|
347
|
-
};
|
|
348
|
-
type ErrorResponse = {
|
|
349
|
-
success: boolean;
|
|
350
|
-
error: {
|
|
351
|
-
code: 'unauthorized' | 'forbidden' | 'not_found' | 'validation_error' | 'rate_limit_exceeded' | 'internal_error' | 'conflict' | 'mx_conflict';
|
|
352
|
-
message: string;
|
|
353
|
-
/**
|
|
354
|
-
* Optional structured data that callers can inspect to recover
|
|
355
|
-
* from the error. The fields present depend on `code`. Additional
|
|
356
|
-
* keys may be added over time without a major-version bump.
|
|
357
|
-
*
|
|
358
|
-
*/
|
|
359
|
-
details?: {
|
|
360
|
-
/**
|
|
361
|
-
* Present when `code == mx_conflict`.
|
|
362
|
-
*/
|
|
363
|
-
mx_conflict?: {
|
|
364
|
-
/**
|
|
365
|
-
* Human-readable name of the detected mailbox provider (e.g. "Google Workspace").
|
|
366
|
-
*/
|
|
367
|
-
provider_name: string;
|
|
368
|
-
/**
|
|
369
|
-
* Subdomain to try instead (e.g. "mail" for `mail.example.com`).
|
|
370
|
-
*/
|
|
371
|
-
suggested_subdomain: string;
|
|
372
|
-
};
|
|
373
|
-
[key: string]: unknown;
|
|
374
|
-
};
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
type Account = {
|
|
378
|
-
id: string;
|
|
379
|
-
email: string;
|
|
380
|
-
plan: string;
|
|
381
|
-
created_at: string;
|
|
382
|
-
onboarding_completed?: boolean;
|
|
383
|
-
onboarding_step?: string | null;
|
|
384
|
-
stripe_subscription_status?: string | null;
|
|
385
|
-
subscription_current_period_end?: string | null;
|
|
386
|
-
subscription_cancel_at_period_end?: boolean | null;
|
|
387
|
-
spam_threshold?: number | null;
|
|
388
|
-
discard_content_on_webhook_confirmed: boolean;
|
|
389
|
-
webhook_secret_rotated_at?: string | null;
|
|
390
|
-
};
|
|
391
|
-
type AccountUpdated = {
|
|
392
|
-
id: string;
|
|
393
|
-
email: string;
|
|
394
|
-
plan: string;
|
|
395
|
-
spam_threshold?: number | null;
|
|
396
|
-
discard_content_on_webhook_confirmed: boolean;
|
|
397
|
-
};
|
|
398
|
-
type UpdateAccountInput = {
|
|
399
|
-
/**
|
|
400
|
-
* Global spam score threshold (0-15). Emails scoring above this are rejected. Set to null to disable.
|
|
401
|
-
*/
|
|
402
|
-
spam_threshold?: number | null;
|
|
403
|
-
/**
|
|
404
|
-
* Whether to discard email content after the webhook endpoint confirms receipt.
|
|
405
|
-
*/
|
|
406
|
-
discard_content_on_webhook_confirmed?: boolean;
|
|
407
|
-
};
|
|
408
|
-
type StorageStats = {
|
|
409
|
-
/**
|
|
410
|
-
* Total storage used in bytes
|
|
411
|
-
*/
|
|
412
|
-
used_bytes: number;
|
|
413
|
-
/**
|
|
414
|
-
* Total storage used in kilobytes (1 decimal)
|
|
415
|
-
*/
|
|
416
|
-
used_kb: number;
|
|
417
|
-
/**
|
|
418
|
-
* Total storage used in megabytes (2 decimals)
|
|
419
|
-
*/
|
|
420
|
-
used_mb: number;
|
|
421
|
-
/**
|
|
422
|
-
* Storage quota in megabytes (based on plan)
|
|
423
|
-
*/
|
|
424
|
-
quota_mb: number;
|
|
425
|
-
/**
|
|
426
|
-
* Percentage of quota used (1 decimal)
|
|
427
|
-
*/
|
|
428
|
-
percentage: number;
|
|
429
|
-
/**
|
|
430
|
-
* Number of stored emails
|
|
431
|
-
*/
|
|
432
|
-
emails_count: number;
|
|
433
|
-
};
|
|
434
|
-
type WebhookSecret = {
|
|
435
|
-
/**
|
|
436
|
-
* The webhook signing secret value
|
|
437
|
-
*/
|
|
438
|
-
secret: string;
|
|
439
|
-
};
|
|
440
|
-
/**
|
|
441
|
-
* A domain can be either verified or unverified. Verified domains have
|
|
442
|
-
* `is_active` and `spam_threshold` fields. Unverified domains have a
|
|
443
|
-
* `verification_token` for DNS verification.
|
|
444
|
-
*
|
|
445
|
-
*/
|
|
446
|
-
type Domain = VerifiedDomain | UnverifiedDomain;
|
|
447
|
-
type VerifiedDomain = {
|
|
448
|
-
id: string;
|
|
449
|
-
org_id: string;
|
|
450
|
-
domain: string;
|
|
451
|
-
verified: boolean;
|
|
452
|
-
is_active: boolean;
|
|
453
|
-
spam_threshold?: number | null;
|
|
454
|
-
verification_token?: string | null;
|
|
455
|
-
created_at: string;
|
|
456
|
-
};
|
|
457
|
-
type UnverifiedDomain = {
|
|
458
|
-
id: string;
|
|
459
|
-
org_id: string;
|
|
460
|
-
domain: string;
|
|
461
|
-
verified: boolean;
|
|
462
|
-
/**
|
|
463
|
-
* Add this value as a TXT record to verify ownership
|
|
464
|
-
*/
|
|
465
|
-
verification_token: string;
|
|
466
|
-
created_at: string;
|
|
467
|
-
};
|
|
468
|
-
type AddDomainInput = {
|
|
469
|
-
/**
|
|
470
|
-
* The domain name to claim (e.g. "example.com")
|
|
471
|
-
*/
|
|
472
|
-
domain: string;
|
|
473
|
-
};
|
|
474
|
-
type UpdateDomainInput = {
|
|
475
|
-
/**
|
|
476
|
-
* Whether the domain accepts incoming emails
|
|
477
|
-
*/
|
|
478
|
-
is_active?: boolean;
|
|
479
|
-
/**
|
|
480
|
-
* Per-domain spam threshold override (Pro plan required)
|
|
481
|
-
*/
|
|
482
|
-
spam_threshold?: number | null;
|
|
483
|
-
};
|
|
484
|
-
type DomainVerifyResult = {
|
|
485
|
-
verified: boolean;
|
|
486
|
-
} | {
|
|
487
|
-
verified: boolean;
|
|
488
|
-
/**
|
|
489
|
-
* Whether MX records point to Primitive
|
|
490
|
-
*/
|
|
491
|
-
mxFound: boolean;
|
|
492
|
-
/**
|
|
493
|
-
* Whether the TXT verification record was found
|
|
494
|
-
*/
|
|
495
|
-
txtFound: boolean;
|
|
496
|
-
/**
|
|
497
|
-
* Human-readable verification failure reason
|
|
498
|
-
*/
|
|
499
|
-
error: string;
|
|
500
|
-
};
|
|
501
|
-
type EmailSummary = {
|
|
502
|
-
id: string;
|
|
503
|
-
message_id?: string | null;
|
|
504
|
-
domain_id?: string | null;
|
|
505
|
-
org_id?: string | null;
|
|
506
|
-
status: 'pending' | 'accepted' | 'completed' | 'rejected';
|
|
507
|
-
sender: string;
|
|
508
|
-
recipient: string;
|
|
509
|
-
subject?: string | null;
|
|
510
|
-
domain: string;
|
|
511
|
-
spam_score?: number | null;
|
|
512
|
-
created_at: string;
|
|
513
|
-
received_at: string;
|
|
514
|
-
raw_size_bytes?: number | null;
|
|
515
|
-
webhook_status?: 'pending' | 'in_flight' | 'fired' | 'failed' | 'exhausted' | null;
|
|
516
|
-
webhook_attempt_count: number;
|
|
517
|
-
};
|
|
518
|
-
type EmailDetail = {
|
|
519
|
-
id: string;
|
|
520
|
-
message_id?: string | null;
|
|
521
|
-
domain_id?: string | null;
|
|
522
|
-
org_id?: string | null;
|
|
523
|
-
sender: string;
|
|
524
|
-
recipient: string;
|
|
525
|
-
subject?: string | null;
|
|
526
|
-
status: 'pending' | 'accepted' | 'completed' | 'rejected';
|
|
527
|
-
domain: string;
|
|
528
|
-
spam_score?: number | null;
|
|
529
|
-
raw_size_bytes?: number | null;
|
|
530
|
-
raw_sha256?: string | null;
|
|
531
|
-
created_at: string;
|
|
532
|
-
received_at: string;
|
|
533
|
-
rejection_reason?: string | null;
|
|
534
|
-
webhook_status?: 'pending' | 'in_flight' | 'fired' | 'failed' | 'exhausted' | null;
|
|
535
|
-
webhook_attempt_count: number;
|
|
536
|
-
webhook_last_attempt_at?: string | null;
|
|
537
|
-
webhook_last_status_code?: number | null;
|
|
538
|
-
webhook_last_error?: string | null;
|
|
539
|
-
webhook_fired_at?: string | null;
|
|
540
|
-
smtp_helo?: string | null;
|
|
541
|
-
smtp_mail_from?: string | null;
|
|
542
|
-
smtp_rcpt_to?: Array<string> | null;
|
|
543
|
-
from_header?: string | null;
|
|
544
|
-
content_discarded_at?: string | null;
|
|
545
|
-
content_discarded_by_delivery_id?: string | null;
|
|
546
|
-
/**
|
|
547
|
-
* Parsed from address (from_header or sender fallback)
|
|
548
|
-
*/
|
|
549
|
-
from_email: string;
|
|
550
|
-
/**
|
|
551
|
-
* Parsed to address (same as recipient)
|
|
552
|
-
*/
|
|
553
|
-
to_email: string;
|
|
554
|
-
};
|
|
555
|
-
type Endpoint = {
|
|
556
|
-
id: string;
|
|
557
|
-
org_id: string;
|
|
558
|
-
url?: string | null;
|
|
559
|
-
enabled: boolean;
|
|
560
|
-
/**
|
|
561
|
-
* Restrict this endpoint to emails from a specific domain
|
|
562
|
-
*/
|
|
563
|
-
domain_id?: string | null;
|
|
564
|
-
/**
|
|
565
|
-
* Endpoint-specific filtering rules
|
|
566
|
-
*/
|
|
567
|
-
rules: {
|
|
568
|
-
[key: string]: unknown;
|
|
569
|
-
};
|
|
570
|
-
created_at: string;
|
|
571
|
-
updated_at: string;
|
|
572
|
-
/**
|
|
573
|
-
* Total webhook deliveries attempted
|
|
574
|
-
*/
|
|
575
|
-
delivery_count: number;
|
|
576
|
-
/**
|
|
577
|
-
* Successful deliveries
|
|
578
|
-
*/
|
|
579
|
-
success_count: number;
|
|
580
|
-
/**
|
|
581
|
-
* Failed deliveries
|
|
582
|
-
*/
|
|
583
|
-
failure_count: number;
|
|
584
|
-
/**
|
|
585
|
-
* Current streak of consecutive failures
|
|
586
|
-
*/
|
|
587
|
-
consecutive_fails: number;
|
|
588
|
-
last_delivery_at?: string | null;
|
|
589
|
-
last_success_at?: string | null;
|
|
590
|
-
last_failure_at?: string | null;
|
|
591
|
-
deactivated_at?: string | null;
|
|
592
|
-
};
|
|
593
|
-
type CreateEndpointInput = {
|
|
594
|
-
/**
|
|
595
|
-
* The webhook URL to deliver events to
|
|
596
|
-
*/
|
|
597
|
-
url: string;
|
|
598
|
-
/**
|
|
599
|
-
* Whether the endpoint is active
|
|
600
|
-
*/
|
|
601
|
-
enabled?: boolean;
|
|
602
|
-
/**
|
|
603
|
-
* Restrict to emails from a specific domain
|
|
604
|
-
*/
|
|
605
|
-
domain_id?: string | null;
|
|
606
|
-
/**
|
|
607
|
-
* Endpoint-specific filtering rules
|
|
608
|
-
*/
|
|
609
|
-
rules?: {
|
|
610
|
-
[key: string]: unknown;
|
|
611
|
-
};
|
|
612
|
-
};
|
|
613
|
-
type UpdateEndpointInput = {
|
|
614
|
-
/**
|
|
615
|
-
* New webhook URL (triggers endpoint rotation)
|
|
616
|
-
*/
|
|
617
|
-
url?: string;
|
|
618
|
-
enabled?: boolean;
|
|
619
|
-
domain_id?: string | null;
|
|
620
|
-
rules?: {
|
|
621
|
-
[key: string]: unknown;
|
|
622
|
-
};
|
|
623
|
-
};
|
|
624
|
-
type TestResult = {
|
|
625
|
-
/**
|
|
626
|
-
* HTTP status code returned by the endpoint
|
|
627
|
-
*/
|
|
628
|
-
status: number;
|
|
629
|
-
/**
|
|
630
|
-
* Response body (truncated to 1000 characters)
|
|
631
|
-
*/
|
|
632
|
-
body: string;
|
|
633
|
-
/**
|
|
634
|
-
* The signature header value sent (if webhook secret is configured)
|
|
635
|
-
*/
|
|
636
|
-
signature?: string;
|
|
637
|
-
};
|
|
638
|
-
type Filter = {
|
|
639
|
-
id: string;
|
|
640
|
-
org_id: string;
|
|
641
|
-
/**
|
|
642
|
-
* If set, filter applies only to this domain
|
|
643
|
-
*/
|
|
644
|
-
domain_id?: string | null;
|
|
645
|
-
type: 'whitelist' | 'blocklist';
|
|
646
|
-
/**
|
|
647
|
-
* Email address or pattern to match (stored lowercase)
|
|
648
|
-
*/
|
|
649
|
-
pattern: string;
|
|
650
|
-
enabled: boolean;
|
|
651
|
-
created_at: string;
|
|
652
|
-
};
|
|
653
|
-
type CreateFilterInput = {
|
|
654
|
-
type: 'whitelist' | 'blocklist';
|
|
655
|
-
/**
|
|
656
|
-
* Email address or pattern to filter
|
|
657
|
-
*/
|
|
658
|
-
pattern: string;
|
|
659
|
-
/**
|
|
660
|
-
* Restrict filter to a specific domain (Pro plan required)
|
|
661
|
-
*/
|
|
662
|
-
domain_id?: string | null;
|
|
663
|
-
};
|
|
664
|
-
type UpdateFilterInput = {
|
|
665
|
-
enabled: boolean;
|
|
666
|
-
};
|
|
667
|
-
type DeliverySummary = {
|
|
668
|
-
/**
|
|
669
|
-
* Delivery ID (numeric string)
|
|
670
|
-
*/
|
|
671
|
-
id: string;
|
|
672
|
-
email_id: string;
|
|
673
|
-
org_id: string;
|
|
674
|
-
endpoint_id: string;
|
|
675
|
-
endpoint_url: string;
|
|
676
|
-
status: 'pending' | 'delivered' | 'header_confirmed' | 'failed';
|
|
677
|
-
attempt_count: number;
|
|
678
|
-
duration_ms?: number | null;
|
|
679
|
-
last_error?: string | null;
|
|
680
|
-
created_at: string;
|
|
681
|
-
updated_at: string;
|
|
682
|
-
email?: {
|
|
683
|
-
sender: string;
|
|
684
|
-
recipient: string;
|
|
685
|
-
subject?: string | null;
|
|
686
|
-
} | null;
|
|
687
|
-
};
|
|
688
|
-
type ReplayResult = {
|
|
689
|
-
/**
|
|
690
|
-
* Number of successful deliveries
|
|
691
|
-
*/
|
|
692
|
-
delivered: number;
|
|
693
|
-
/**
|
|
694
|
-
* Number of failed deliveries
|
|
695
|
-
*/
|
|
696
|
-
failed: number;
|
|
697
|
-
};
|
|
698
|
-
/**
|
|
699
|
-
* Resource UUID
|
|
700
|
-
*/
|
|
701
|
-
type ResourceId = string;
|
|
702
|
-
/**
|
|
703
|
-
* Pagination cursor from a previous response's `meta.cursor` field.
|
|
704
|
-
* Format: `{ISO-datetime}|{id}`
|
|
705
|
-
*
|
|
706
|
-
*/
|
|
707
|
-
type Cursor = string;
|
|
708
|
-
/**
|
|
709
|
-
* Number of results per page
|
|
710
|
-
*/
|
|
711
|
-
type Limit = number;
|
|
712
|
-
type GetAccountData = {
|
|
713
|
-
body?: never;
|
|
714
|
-
path?: never;
|
|
715
|
-
query?: never;
|
|
716
|
-
url: '/account';
|
|
717
|
-
};
|
|
718
|
-
type GetAccountErrors = {
|
|
719
|
-
/**
|
|
720
|
-
* Invalid or missing API key
|
|
721
|
-
*/
|
|
722
|
-
401: ErrorResponse;
|
|
723
|
-
/**
|
|
724
|
-
* Resource not found
|
|
725
|
-
*/
|
|
726
|
-
404: ErrorResponse;
|
|
727
|
-
};
|
|
728
|
-
type GetAccountError = GetAccountErrors[keyof GetAccountErrors];
|
|
729
|
-
type GetAccountResponses = {
|
|
730
|
-
/**
|
|
731
|
-
* Account details
|
|
732
|
-
*/
|
|
733
|
-
200: SuccessEnvelope & {
|
|
734
|
-
data?: Account;
|
|
735
|
-
};
|
|
736
|
-
};
|
|
737
|
-
type GetAccountResponse = GetAccountResponses[keyof GetAccountResponses];
|
|
738
|
-
type UpdateAccountData = {
|
|
739
|
-
body: UpdateAccountInput;
|
|
740
|
-
path?: never;
|
|
741
|
-
query?: never;
|
|
742
|
-
url: '/account';
|
|
743
|
-
};
|
|
744
|
-
type UpdateAccountErrors = {
|
|
745
|
-
/**
|
|
746
|
-
* Invalid request parameters
|
|
747
|
-
*/
|
|
748
|
-
400: ErrorResponse;
|
|
749
|
-
/**
|
|
750
|
-
* Invalid or missing API key
|
|
751
|
-
*/
|
|
752
|
-
401: ErrorResponse;
|
|
753
|
-
/**
|
|
754
|
-
* Resource not found
|
|
755
|
-
*/
|
|
756
|
-
404: ErrorResponse;
|
|
757
|
-
};
|
|
758
|
-
type UpdateAccountError = UpdateAccountErrors[keyof UpdateAccountErrors];
|
|
759
|
-
type UpdateAccountResponses = {
|
|
760
|
-
/**
|
|
761
|
-
* Updated account
|
|
762
|
-
*/
|
|
763
|
-
200: SuccessEnvelope & {
|
|
764
|
-
data?: AccountUpdated;
|
|
765
|
-
};
|
|
766
|
-
};
|
|
767
|
-
type UpdateAccountResponse = UpdateAccountResponses[keyof UpdateAccountResponses];
|
|
768
|
-
type GetStorageStatsData = {
|
|
769
|
-
body?: never;
|
|
770
|
-
path?: never;
|
|
771
|
-
query?: never;
|
|
772
|
-
url: '/account/storage';
|
|
773
|
-
};
|
|
774
|
-
type GetStorageStatsErrors = {
|
|
775
|
-
/**
|
|
776
|
-
* Invalid or missing API key
|
|
777
|
-
*/
|
|
778
|
-
401: ErrorResponse;
|
|
779
|
-
/**
|
|
780
|
-
* Resource not found
|
|
781
|
-
*/
|
|
782
|
-
404: ErrorResponse;
|
|
783
|
-
};
|
|
784
|
-
type GetStorageStatsError = GetStorageStatsErrors[keyof GetStorageStatsErrors];
|
|
785
|
-
type GetStorageStatsResponses = {
|
|
786
|
-
/**
|
|
787
|
-
* Storage statistics
|
|
788
|
-
*/
|
|
789
|
-
200: SuccessEnvelope & {
|
|
790
|
-
data?: StorageStats;
|
|
791
|
-
};
|
|
792
|
-
};
|
|
793
|
-
type GetStorageStatsResponse = GetStorageStatsResponses[keyof GetStorageStatsResponses];
|
|
794
|
-
type GetWebhookSecretData = {
|
|
795
|
-
body?: never;
|
|
796
|
-
path?: never;
|
|
797
|
-
query?: never;
|
|
798
|
-
url: '/account/webhook-secret';
|
|
799
|
-
};
|
|
800
|
-
type GetWebhookSecretErrors = {
|
|
801
|
-
/**
|
|
802
|
-
* Invalid or missing API key
|
|
803
|
-
*/
|
|
804
|
-
401: ErrorResponse;
|
|
805
|
-
/**
|
|
806
|
-
* Resource not found
|
|
807
|
-
*/
|
|
808
|
-
404: ErrorResponse;
|
|
809
|
-
};
|
|
810
|
-
type GetWebhookSecretError = GetWebhookSecretErrors[keyof GetWebhookSecretErrors];
|
|
811
|
-
type GetWebhookSecretResponses = {
|
|
812
|
-
/**
|
|
813
|
-
* Webhook secret
|
|
814
|
-
*/
|
|
815
|
-
200: SuccessEnvelope & {
|
|
816
|
-
data?: WebhookSecret;
|
|
817
|
-
};
|
|
818
|
-
};
|
|
819
|
-
type GetWebhookSecretResponse = GetWebhookSecretResponses[keyof GetWebhookSecretResponses];
|
|
820
|
-
type RotateWebhookSecretData = {
|
|
821
|
-
body?: never;
|
|
822
|
-
path?: never;
|
|
823
|
-
query?: never;
|
|
824
|
-
url: '/account/webhook-secret/rotate';
|
|
825
|
-
};
|
|
826
|
-
type RotateWebhookSecretErrors = {
|
|
827
|
-
/**
|
|
828
|
-
* Invalid request parameters
|
|
829
|
-
*/
|
|
830
|
-
400: ErrorResponse;
|
|
831
|
-
/**
|
|
832
|
-
* Invalid or missing API key
|
|
833
|
-
*/
|
|
834
|
-
401: ErrorResponse;
|
|
835
|
-
/**
|
|
836
|
-
* Resource not found
|
|
837
|
-
*/
|
|
838
|
-
404: ErrorResponse;
|
|
839
|
-
/**
|
|
840
|
-
* Rate limit exceeded
|
|
841
|
-
*/
|
|
842
|
-
429: ErrorResponse;
|
|
843
|
-
};
|
|
844
|
-
type RotateWebhookSecretError = RotateWebhookSecretErrors[keyof RotateWebhookSecretErrors];
|
|
845
|
-
type RotateWebhookSecretResponses = {
|
|
846
|
-
/**
|
|
847
|
-
* New webhook secret
|
|
848
|
-
*/
|
|
849
|
-
200: SuccessEnvelope & {
|
|
850
|
-
data?: WebhookSecret;
|
|
851
|
-
};
|
|
852
|
-
};
|
|
853
|
-
type RotateWebhookSecretResponse = RotateWebhookSecretResponses[keyof RotateWebhookSecretResponses];
|
|
854
|
-
type ListDomainsData = {
|
|
855
|
-
body?: never;
|
|
856
|
-
path?: never;
|
|
857
|
-
query?: never;
|
|
858
|
-
url: '/domains';
|
|
859
|
-
};
|
|
860
|
-
type ListDomainsErrors = {
|
|
861
|
-
/**
|
|
862
|
-
* Invalid or missing API key
|
|
863
|
-
*/
|
|
864
|
-
401: ErrorResponse;
|
|
865
|
-
};
|
|
866
|
-
type ListDomainsError = ListDomainsErrors[keyof ListDomainsErrors];
|
|
867
|
-
type ListDomainsResponses = {
|
|
868
|
-
/**
|
|
869
|
-
* List of domains
|
|
870
|
-
*/
|
|
871
|
-
200: SuccessEnvelope & {
|
|
872
|
-
data?: Array<Domain>;
|
|
873
|
-
};
|
|
874
|
-
};
|
|
875
|
-
type ListDomainsResponse = ListDomainsResponses[keyof ListDomainsResponses];
|
|
876
|
-
type AddDomainData = {
|
|
877
|
-
body: AddDomainInput;
|
|
878
|
-
path?: never;
|
|
879
|
-
query?: never;
|
|
880
|
-
url: '/domains';
|
|
881
|
-
};
|
|
882
|
-
type AddDomainErrors = {
|
|
883
|
-
/**
|
|
884
|
-
* Invalid request parameters
|
|
885
|
-
*/
|
|
886
|
-
400: ErrorResponse;
|
|
887
|
-
/**
|
|
888
|
-
* Invalid or missing API key
|
|
889
|
-
*/
|
|
890
|
-
401: ErrorResponse;
|
|
891
|
-
/**
|
|
892
|
-
* Domain claim conflicts with existing state. Two error codes
|
|
893
|
-
* are possible:
|
|
894
|
-
* * `mx_conflict`: the domain's current MX records point at
|
|
895
|
-
* another mailbox provider. The response includes
|
|
896
|
-
* `error.details.mx_conflict` with the detected provider
|
|
897
|
-
* and a suggested subdomain.
|
|
898
|
-
* * `conflict`: the domain is already claimed by another
|
|
899
|
-
* org, or a pending claim exists for another user.
|
|
900
|
-
*
|
|
901
|
-
*/
|
|
902
|
-
409: ErrorResponse;
|
|
903
|
-
};
|
|
904
|
-
type AddDomainError = AddDomainErrors[keyof AddDomainErrors];
|
|
905
|
-
type AddDomainResponses = {
|
|
906
|
-
/**
|
|
907
|
-
* Domain claim created
|
|
908
|
-
*/
|
|
909
|
-
201: SuccessEnvelope & {
|
|
910
|
-
data?: UnverifiedDomain;
|
|
911
|
-
};
|
|
912
|
-
};
|
|
913
|
-
type AddDomainResponse = AddDomainResponses[keyof AddDomainResponses];
|
|
914
|
-
type DeleteDomainData = {
|
|
915
|
-
body?: never;
|
|
916
|
-
path: {
|
|
917
|
-
/**
|
|
918
|
-
* Resource UUID
|
|
919
|
-
*/
|
|
920
|
-
id: string;
|
|
921
|
-
};
|
|
922
|
-
query?: never;
|
|
923
|
-
url: '/domains/{id}';
|
|
924
|
-
};
|
|
925
|
-
type DeleteDomainErrors = {
|
|
926
|
-
/**
|
|
927
|
-
* Invalid request parameters
|
|
928
|
-
*/
|
|
929
|
-
400: ErrorResponse;
|
|
930
|
-
/**
|
|
931
|
-
* Invalid or missing API key
|
|
932
|
-
*/
|
|
933
|
-
401: ErrorResponse;
|
|
934
|
-
/**
|
|
935
|
-
* Resource not found
|
|
936
|
-
*/
|
|
937
|
-
404: ErrorResponse;
|
|
938
|
-
};
|
|
939
|
-
type DeleteDomainError = DeleteDomainErrors[keyof DeleteDomainErrors];
|
|
940
|
-
type DeleteDomainResponses = {
|
|
941
|
-
/**
|
|
942
|
-
* Resource deleted
|
|
943
|
-
*/
|
|
944
|
-
200: SuccessEnvelope & {
|
|
945
|
-
data?: {
|
|
946
|
-
deleted: boolean;
|
|
947
|
-
};
|
|
948
|
-
};
|
|
949
|
-
};
|
|
950
|
-
type DeleteDomainResponse = DeleteDomainResponses[keyof DeleteDomainResponses];
|
|
951
|
-
type UpdateDomainData = {
|
|
952
|
-
body: UpdateDomainInput;
|
|
953
|
-
path: {
|
|
954
|
-
/**
|
|
955
|
-
* Resource UUID
|
|
956
|
-
*/
|
|
957
|
-
id: string;
|
|
958
|
-
};
|
|
959
|
-
query?: never;
|
|
960
|
-
url: '/domains/{id}';
|
|
961
|
-
};
|
|
962
|
-
type UpdateDomainErrors = {
|
|
963
|
-
/**
|
|
964
|
-
* Invalid request parameters
|
|
965
|
-
*/
|
|
966
|
-
400: ErrorResponse;
|
|
967
|
-
/**
|
|
968
|
-
* Invalid or missing API key
|
|
969
|
-
*/
|
|
970
|
-
401: ErrorResponse;
|
|
971
|
-
/**
|
|
972
|
-
* Resource not found
|
|
973
|
-
*/
|
|
974
|
-
404: ErrorResponse;
|
|
975
|
-
};
|
|
976
|
-
type UpdateDomainError = UpdateDomainErrors[keyof UpdateDomainErrors];
|
|
977
|
-
type UpdateDomainResponses = {
|
|
978
|
-
/**
|
|
979
|
-
* Updated domain
|
|
980
|
-
*/
|
|
981
|
-
200: SuccessEnvelope & {
|
|
982
|
-
data?: VerifiedDomain;
|
|
983
|
-
};
|
|
984
|
-
};
|
|
985
|
-
type UpdateDomainResponse = UpdateDomainResponses[keyof UpdateDomainResponses];
|
|
986
|
-
type VerifyDomainData = {
|
|
987
|
-
body?: never;
|
|
988
|
-
path: {
|
|
989
|
-
/**
|
|
990
|
-
* Resource UUID
|
|
991
|
-
*/
|
|
992
|
-
id: string;
|
|
993
|
-
};
|
|
994
|
-
query?: never;
|
|
995
|
-
url: '/domains/{id}/verify';
|
|
996
|
-
};
|
|
997
|
-
type VerifyDomainErrors = {
|
|
998
|
-
/**
|
|
999
|
-
* Invalid request parameters
|
|
1000
|
-
*/
|
|
1001
|
-
400: ErrorResponse;
|
|
1002
|
-
/**
|
|
1003
|
-
* Invalid or missing API key
|
|
1004
|
-
*/
|
|
1005
|
-
401: ErrorResponse;
|
|
1006
|
-
/**
|
|
1007
|
-
* Resource not found
|
|
1008
|
-
*/
|
|
1009
|
-
404: ErrorResponse;
|
|
1010
|
-
};
|
|
1011
|
-
type VerifyDomainError = VerifyDomainErrors[keyof VerifyDomainErrors];
|
|
1012
|
-
type VerifyDomainResponses = {
|
|
1013
|
-
/**
|
|
1014
|
-
* Verification result
|
|
1015
|
-
*/
|
|
1016
|
-
200: SuccessEnvelope & {
|
|
1017
|
-
data?: DomainVerifyResult;
|
|
1018
|
-
};
|
|
1019
|
-
};
|
|
1020
|
-
type VerifyDomainResponse = VerifyDomainResponses[keyof VerifyDomainResponses];
|
|
1021
|
-
type ListEmailsData = {
|
|
1022
|
-
body?: never;
|
|
1023
|
-
path?: never;
|
|
1024
|
-
query?: {
|
|
1025
|
-
/**
|
|
1026
|
-
* Pagination cursor from a previous response's `meta.cursor` field.
|
|
1027
|
-
* Format: `{ISO-datetime}|{id}`
|
|
1028
|
-
*
|
|
1029
|
-
*/
|
|
1030
|
-
cursor?: string;
|
|
1031
|
-
/**
|
|
1032
|
-
* Number of results per page
|
|
1033
|
-
*/
|
|
1034
|
-
limit?: number;
|
|
1035
|
-
/**
|
|
1036
|
-
* Filter by domain ID
|
|
1037
|
-
*/
|
|
1038
|
-
domain_id?: string;
|
|
1039
|
-
/**
|
|
1040
|
-
* Filter by email status
|
|
1041
|
-
*/
|
|
1042
|
-
status?: 'pending' | 'accepted' | 'completed' | 'rejected';
|
|
1043
|
-
/**
|
|
1044
|
-
* Search subject, sender, and recipient (case-insensitive)
|
|
1045
|
-
*/
|
|
1046
|
-
search?: string;
|
|
1047
|
-
/**
|
|
1048
|
-
* Filter emails created on or after this timestamp
|
|
1049
|
-
*/
|
|
1050
|
-
date_from?: string;
|
|
1051
|
-
/**
|
|
1052
|
-
* Filter emails created on or before this timestamp
|
|
1053
|
-
*/
|
|
1054
|
-
date_to?: string;
|
|
1055
|
-
};
|
|
1056
|
-
url: '/emails';
|
|
1057
|
-
};
|
|
1058
|
-
type ListEmailsErrors = {
|
|
1059
|
-
/**
|
|
1060
|
-
* Invalid request parameters
|
|
1061
|
-
*/
|
|
1062
|
-
400: ErrorResponse;
|
|
1063
|
-
/**
|
|
1064
|
-
* Invalid or missing API key
|
|
1065
|
-
*/
|
|
1066
|
-
401: ErrorResponse;
|
|
1067
|
-
};
|
|
1068
|
-
type ListEmailsError = ListEmailsErrors[keyof ListEmailsErrors];
|
|
1069
|
-
type ListEmailsResponses = {
|
|
1070
|
-
/**
|
|
1071
|
-
* Paginated list of emails
|
|
1072
|
-
*/
|
|
1073
|
-
200: ListEnvelope & {
|
|
1074
|
-
data?: Array<EmailSummary>;
|
|
1075
|
-
};
|
|
1076
|
-
};
|
|
1077
|
-
type ListEmailsResponse = ListEmailsResponses[keyof ListEmailsResponses];
|
|
1078
|
-
type DeleteEmailData = {
|
|
1079
|
-
body?: never;
|
|
1080
|
-
path: {
|
|
1081
|
-
/**
|
|
1082
|
-
* Resource UUID
|
|
1083
|
-
*/
|
|
1084
|
-
id: string;
|
|
1085
|
-
};
|
|
1086
|
-
query?: never;
|
|
1087
|
-
url: '/emails/{id}';
|
|
1088
|
-
};
|
|
1089
|
-
type DeleteEmailErrors = {
|
|
1090
|
-
/**
|
|
1091
|
-
* Invalid request parameters
|
|
1092
|
-
*/
|
|
1093
|
-
400: ErrorResponse;
|
|
1094
|
-
/**
|
|
1095
|
-
* Invalid or missing API key
|
|
1096
|
-
*/
|
|
1097
|
-
401: ErrorResponse;
|
|
1098
|
-
/**
|
|
1099
|
-
* Resource not found
|
|
1100
|
-
*/
|
|
1101
|
-
404: ErrorResponse;
|
|
1102
|
-
};
|
|
1103
|
-
type DeleteEmailError = DeleteEmailErrors[keyof DeleteEmailErrors];
|
|
1104
|
-
type DeleteEmailResponses = {
|
|
1105
|
-
/**
|
|
1106
|
-
* Resource deleted
|
|
1107
|
-
*/
|
|
1108
|
-
200: SuccessEnvelope & {
|
|
1109
|
-
data?: {
|
|
1110
|
-
deleted: boolean;
|
|
1111
|
-
};
|
|
1112
|
-
};
|
|
1113
|
-
};
|
|
1114
|
-
type DeleteEmailResponse = DeleteEmailResponses[keyof DeleteEmailResponses];
|
|
1115
|
-
type GetEmailData = {
|
|
1116
|
-
body?: never;
|
|
1117
|
-
path: {
|
|
1118
|
-
/**
|
|
1119
|
-
* Resource UUID
|
|
1120
|
-
*/
|
|
1121
|
-
id: string;
|
|
1122
|
-
};
|
|
1123
|
-
query?: never;
|
|
1124
|
-
url: '/emails/{id}';
|
|
1125
|
-
};
|
|
1126
|
-
type GetEmailErrors = {
|
|
1127
|
-
/**
|
|
1128
|
-
* Invalid request parameters
|
|
1129
|
-
*/
|
|
1130
|
-
400: ErrorResponse;
|
|
1131
|
-
/**
|
|
1132
|
-
* Invalid or missing API key
|
|
1133
|
-
*/
|
|
1134
|
-
401: ErrorResponse;
|
|
1135
|
-
/**
|
|
1136
|
-
* Resource not found
|
|
1137
|
-
*/
|
|
1138
|
-
404: ErrorResponse;
|
|
1139
|
-
};
|
|
1140
|
-
type GetEmailError = GetEmailErrors[keyof GetEmailErrors];
|
|
1141
|
-
type GetEmailResponses = {
|
|
1142
|
-
/**
|
|
1143
|
-
* Email details
|
|
1144
|
-
*/
|
|
1145
|
-
200: SuccessEnvelope & {
|
|
1146
|
-
data?: EmailDetail;
|
|
1147
|
-
};
|
|
1148
|
-
};
|
|
1149
|
-
type GetEmailResponse = GetEmailResponses[keyof GetEmailResponses];
|
|
1150
|
-
type DownloadRawEmailData = {
|
|
1151
|
-
body?: never;
|
|
1152
|
-
path: {
|
|
1153
|
-
/**
|
|
1154
|
-
* Resource UUID
|
|
1155
|
-
*/
|
|
1156
|
-
id: string;
|
|
1157
|
-
};
|
|
1158
|
-
query?: {
|
|
1159
|
-
/**
|
|
1160
|
-
* Signed download token from webhook payload
|
|
1161
|
-
*/
|
|
1162
|
-
token?: string;
|
|
1163
|
-
};
|
|
1164
|
-
url: '/emails/{id}/raw';
|
|
1165
|
-
};
|
|
1166
|
-
type DownloadRawEmailErrors = {
|
|
1167
|
-
/**
|
|
1168
|
-
* Invalid request parameters
|
|
1169
|
-
*/
|
|
1170
|
-
400: ErrorResponse;
|
|
1171
|
-
/**
|
|
1172
|
-
* Invalid or missing API key
|
|
1173
|
-
*/
|
|
1174
|
-
401: ErrorResponse;
|
|
1175
|
-
/**
|
|
1176
|
-
* Resource not found
|
|
1177
|
-
*/
|
|
1178
|
-
404: ErrorResponse;
|
|
1179
|
-
};
|
|
1180
|
-
type DownloadRawEmailError = DownloadRawEmailErrors[keyof DownloadRawEmailErrors];
|
|
1181
|
-
type DownloadRawEmailResponses = {
|
|
1182
|
-
/**
|
|
1183
|
-
* Raw email file
|
|
1184
|
-
*/
|
|
1185
|
-
200: Blob | File;
|
|
1186
|
-
};
|
|
1187
|
-
type DownloadRawEmailResponse = DownloadRawEmailResponses[keyof DownloadRawEmailResponses];
|
|
1188
|
-
type DownloadAttachmentsData = {
|
|
1189
|
-
body?: never;
|
|
1190
|
-
path: {
|
|
1191
|
-
/**
|
|
1192
|
-
* Resource UUID
|
|
1193
|
-
*/
|
|
1194
|
-
id: string;
|
|
1195
|
-
};
|
|
1196
|
-
query?: {
|
|
1197
|
-
/**
|
|
1198
|
-
* Signed download token from webhook payload
|
|
1199
|
-
*/
|
|
1200
|
-
token?: string;
|
|
1201
|
-
};
|
|
1202
|
-
url: '/emails/{id}/attachments.tar.gz';
|
|
1203
|
-
};
|
|
1204
|
-
type DownloadAttachmentsErrors = {
|
|
1205
|
-
/**
|
|
1206
|
-
* Invalid request parameters
|
|
1207
|
-
*/
|
|
1208
|
-
400: ErrorResponse;
|
|
1209
|
-
/**
|
|
1210
|
-
* Invalid or missing API key
|
|
1211
|
-
*/
|
|
1212
|
-
401: ErrorResponse;
|
|
1213
|
-
/**
|
|
1214
|
-
* Resource not found
|
|
1215
|
-
*/
|
|
1216
|
-
404: ErrorResponse;
|
|
1217
|
-
};
|
|
1218
|
-
type DownloadAttachmentsError = DownloadAttachmentsErrors[keyof DownloadAttachmentsErrors];
|
|
1219
|
-
type DownloadAttachmentsResponses = {
|
|
1220
|
-
/**
|
|
1221
|
-
* Attachments archive
|
|
1222
|
-
*/
|
|
1223
|
-
200: Blob | File;
|
|
1224
|
-
};
|
|
1225
|
-
type DownloadAttachmentsResponse = DownloadAttachmentsResponses[keyof DownloadAttachmentsResponses];
|
|
1226
|
-
type ReplayEmailWebhooksData = {
|
|
1227
|
-
body?: never;
|
|
1228
|
-
path: {
|
|
1229
|
-
/**
|
|
1230
|
-
* Resource UUID
|
|
1231
|
-
*/
|
|
1232
|
-
id: string;
|
|
1233
|
-
};
|
|
1234
|
-
query?: never;
|
|
1235
|
-
url: '/emails/{id}/replay';
|
|
1236
|
-
};
|
|
1237
|
-
type ReplayEmailWebhooksErrors = {
|
|
1238
|
-
/**
|
|
1239
|
-
* Invalid request parameters
|
|
1240
|
-
*/
|
|
1241
|
-
400: ErrorResponse;
|
|
1242
|
-
/**
|
|
1243
|
-
* Invalid or missing API key
|
|
1244
|
-
*/
|
|
1245
|
-
401: ErrorResponse;
|
|
1246
|
-
/**
|
|
1247
|
-
* Resource not found
|
|
1248
|
-
*/
|
|
1249
|
-
404: ErrorResponse;
|
|
1250
|
-
/**
|
|
1251
|
-
* Rate limit exceeded
|
|
1252
|
-
*/
|
|
1253
|
-
429: ErrorResponse;
|
|
1254
|
-
};
|
|
1255
|
-
type ReplayEmailWebhooksError = ReplayEmailWebhooksErrors[keyof ReplayEmailWebhooksErrors];
|
|
1256
|
-
type ReplayEmailWebhooksResponses = {
|
|
1257
|
-
/**
|
|
1258
|
-
* Replay result
|
|
1259
|
-
*/
|
|
1260
|
-
200: SuccessEnvelope & {
|
|
1261
|
-
data?: ReplayResult;
|
|
1262
|
-
};
|
|
1263
|
-
};
|
|
1264
|
-
type ReplayEmailWebhooksResponse = ReplayEmailWebhooksResponses[keyof ReplayEmailWebhooksResponses];
|
|
1265
|
-
type ListEndpointsData = {
|
|
1266
|
-
body?: never;
|
|
1267
|
-
path?: never;
|
|
1268
|
-
query?: never;
|
|
1269
|
-
url: '/endpoints';
|
|
1270
|
-
};
|
|
1271
|
-
type ListEndpointsErrors = {
|
|
1272
|
-
/**
|
|
1273
|
-
* Invalid or missing API key
|
|
1274
|
-
*/
|
|
1275
|
-
401: ErrorResponse;
|
|
1276
|
-
};
|
|
1277
|
-
type ListEndpointsError = ListEndpointsErrors[keyof ListEndpointsErrors];
|
|
1278
|
-
type ListEndpointsResponses = {
|
|
1279
|
-
/**
|
|
1280
|
-
* List of endpoints
|
|
1281
|
-
*/
|
|
1282
|
-
200: SuccessEnvelope & {
|
|
1283
|
-
data?: Array<Endpoint>;
|
|
1284
|
-
};
|
|
1285
|
-
};
|
|
1286
|
-
type ListEndpointsResponse = ListEndpointsResponses[keyof ListEndpointsResponses];
|
|
1287
|
-
type CreateEndpointData = {
|
|
1288
|
-
body: CreateEndpointInput;
|
|
1289
|
-
path?: never;
|
|
1290
|
-
query?: never;
|
|
1291
|
-
url: '/endpoints';
|
|
1292
|
-
};
|
|
1293
|
-
type CreateEndpointErrors = {
|
|
1294
|
-
/**
|
|
1295
|
-
* Invalid request parameters
|
|
1296
|
-
*/
|
|
1297
|
-
400: ErrorResponse;
|
|
1298
|
-
/**
|
|
1299
|
-
* Invalid or missing API key
|
|
1300
|
-
*/
|
|
1301
|
-
401: ErrorResponse;
|
|
1302
|
-
};
|
|
1303
|
-
type CreateEndpointError = CreateEndpointErrors[keyof CreateEndpointErrors];
|
|
1304
|
-
type CreateEndpointResponses = {
|
|
1305
|
-
/**
|
|
1306
|
-
* Endpoint created (or reactivated)
|
|
1307
|
-
*/
|
|
1308
|
-
201: SuccessEnvelope & {
|
|
1309
|
-
data?: Endpoint;
|
|
1310
|
-
};
|
|
1311
|
-
};
|
|
1312
|
-
type CreateEndpointResponse = CreateEndpointResponses[keyof CreateEndpointResponses];
|
|
1313
|
-
type DeleteEndpointData = {
|
|
1314
|
-
body?: never;
|
|
1315
|
-
path: {
|
|
1316
|
-
/**
|
|
1317
|
-
* Resource UUID
|
|
1318
|
-
*/
|
|
1319
|
-
id: string;
|
|
1320
|
-
};
|
|
1321
|
-
query?: never;
|
|
1322
|
-
url: '/endpoints/{id}';
|
|
1323
|
-
};
|
|
1324
|
-
type DeleteEndpointErrors = {
|
|
1325
|
-
/**
|
|
1326
|
-
* Invalid request parameters
|
|
1327
|
-
*/
|
|
1328
|
-
400: ErrorResponse;
|
|
1329
|
-
/**
|
|
1330
|
-
* Invalid or missing API key
|
|
1331
|
-
*/
|
|
1332
|
-
401: ErrorResponse;
|
|
1333
|
-
/**
|
|
1334
|
-
* Resource not found
|
|
1335
|
-
*/
|
|
1336
|
-
404: ErrorResponse;
|
|
1337
|
-
};
|
|
1338
|
-
type DeleteEndpointError = DeleteEndpointErrors[keyof DeleteEndpointErrors];
|
|
1339
|
-
type DeleteEndpointResponses = {
|
|
1340
|
-
/**
|
|
1341
|
-
* Resource deleted
|
|
1342
|
-
*/
|
|
1343
|
-
200: SuccessEnvelope & {
|
|
1344
|
-
data?: {
|
|
1345
|
-
deleted: boolean;
|
|
1346
|
-
};
|
|
1347
|
-
};
|
|
1348
|
-
};
|
|
1349
|
-
type DeleteEndpointResponse = DeleteEndpointResponses[keyof DeleteEndpointResponses];
|
|
1350
|
-
type UpdateEndpointData = {
|
|
1351
|
-
body: UpdateEndpointInput;
|
|
1352
|
-
path: {
|
|
1353
|
-
/**
|
|
1354
|
-
* Resource UUID
|
|
1355
|
-
*/
|
|
1356
|
-
id: string;
|
|
1357
|
-
};
|
|
1358
|
-
query?: never;
|
|
1359
|
-
url: '/endpoints/{id}';
|
|
1360
|
-
};
|
|
1361
|
-
type UpdateEndpointErrors = {
|
|
1362
|
-
/**
|
|
1363
|
-
* Invalid request parameters
|
|
1364
|
-
*/
|
|
1365
|
-
400: ErrorResponse;
|
|
1366
|
-
/**
|
|
1367
|
-
* Invalid or missing API key
|
|
1368
|
-
*/
|
|
1369
|
-
401: ErrorResponse;
|
|
1370
|
-
/**
|
|
1371
|
-
* Resource not found
|
|
1372
|
-
*/
|
|
1373
|
-
404: ErrorResponse;
|
|
1374
|
-
};
|
|
1375
|
-
type UpdateEndpointError = UpdateEndpointErrors[keyof UpdateEndpointErrors];
|
|
1376
|
-
type UpdateEndpointResponses = {
|
|
1377
|
-
/**
|
|
1378
|
-
* Updated endpoint
|
|
1379
|
-
*/
|
|
1380
|
-
200: SuccessEnvelope & {
|
|
1381
|
-
data?: Endpoint;
|
|
1382
|
-
};
|
|
1383
|
-
};
|
|
1384
|
-
type UpdateEndpointResponse = UpdateEndpointResponses[keyof UpdateEndpointResponses];
|
|
1385
|
-
type TestEndpointData = {
|
|
1386
|
-
body?: never;
|
|
1387
|
-
path: {
|
|
1388
|
-
/**
|
|
1389
|
-
* Resource UUID
|
|
1390
|
-
*/
|
|
1391
|
-
id: string;
|
|
1392
|
-
};
|
|
1393
|
-
query?: never;
|
|
1394
|
-
url: '/endpoints/{id}/test';
|
|
1395
|
-
};
|
|
1396
|
-
type TestEndpointErrors = {
|
|
1397
|
-
/**
|
|
1398
|
-
* Invalid request parameters
|
|
1399
|
-
*/
|
|
1400
|
-
400: ErrorResponse;
|
|
1401
|
-
/**
|
|
1402
|
-
* Invalid or missing API key
|
|
1403
|
-
*/
|
|
1404
|
-
401: ErrorResponse;
|
|
1405
|
-
/**
|
|
1406
|
-
* Resource not found
|
|
1407
|
-
*/
|
|
1408
|
-
404: ErrorResponse;
|
|
1409
|
-
/**
|
|
1410
|
-
* Rate limit exceeded
|
|
1411
|
-
*/
|
|
1412
|
-
429: ErrorResponse;
|
|
1413
|
-
};
|
|
1414
|
-
type TestEndpointError = TestEndpointErrors[keyof TestEndpointErrors];
|
|
1415
|
-
type TestEndpointResponses = {
|
|
1416
|
-
/**
|
|
1417
|
-
* Test result
|
|
1418
|
-
*/
|
|
1419
|
-
200: SuccessEnvelope & {
|
|
1420
|
-
data?: TestResult;
|
|
1421
|
-
};
|
|
1422
|
-
};
|
|
1423
|
-
type TestEndpointResponse = TestEndpointResponses[keyof TestEndpointResponses];
|
|
1424
|
-
type ListFiltersData = {
|
|
1425
|
-
body?: never;
|
|
1426
|
-
path?: never;
|
|
1427
|
-
query?: never;
|
|
1428
|
-
url: '/filters';
|
|
1429
|
-
};
|
|
1430
|
-
type ListFiltersErrors = {
|
|
1431
|
-
/**
|
|
1432
|
-
* Invalid or missing API key
|
|
1433
|
-
*/
|
|
1434
|
-
401: ErrorResponse;
|
|
1435
|
-
};
|
|
1436
|
-
type ListFiltersError = ListFiltersErrors[keyof ListFiltersErrors];
|
|
1437
|
-
type ListFiltersResponses = {
|
|
1438
|
-
/**
|
|
1439
|
-
* List of filters
|
|
1440
|
-
*/
|
|
1441
|
-
200: SuccessEnvelope & {
|
|
1442
|
-
data?: Array<Filter>;
|
|
1443
|
-
};
|
|
1444
|
-
};
|
|
1445
|
-
type ListFiltersResponse = ListFiltersResponses[keyof ListFiltersResponses];
|
|
1446
|
-
type CreateFilterData = {
|
|
1447
|
-
body: CreateFilterInput;
|
|
1448
|
-
path?: never;
|
|
1449
|
-
query?: never;
|
|
1450
|
-
url: '/filters';
|
|
1451
|
-
};
|
|
1452
|
-
type CreateFilterErrors = {
|
|
1453
|
-
/**
|
|
1454
|
-
* Invalid request parameters
|
|
1455
|
-
*/
|
|
1456
|
-
400: ErrorResponse;
|
|
1457
|
-
/**
|
|
1458
|
-
* Invalid or missing API key
|
|
1459
|
-
*/
|
|
1460
|
-
401: ErrorResponse;
|
|
1461
|
-
/**
|
|
1462
|
-
* Resource not found
|
|
1463
|
-
*/
|
|
1464
|
-
404: ErrorResponse;
|
|
1465
|
-
};
|
|
1466
|
-
type CreateFilterError = CreateFilterErrors[keyof CreateFilterErrors];
|
|
1467
|
-
type CreateFilterResponses = {
|
|
1468
|
-
/**
|
|
1469
|
-
* Filter created
|
|
1470
|
-
*/
|
|
1471
|
-
201: SuccessEnvelope & {
|
|
1472
|
-
data?: Filter;
|
|
1473
|
-
};
|
|
1474
|
-
};
|
|
1475
|
-
type CreateFilterResponse = CreateFilterResponses[keyof CreateFilterResponses];
|
|
1476
|
-
type DeleteFilterData = {
|
|
1477
|
-
body?: never;
|
|
1478
|
-
path: {
|
|
1479
|
-
/**
|
|
1480
|
-
* Resource UUID
|
|
1481
|
-
*/
|
|
1482
|
-
id: string;
|
|
1483
|
-
};
|
|
1484
|
-
query?: never;
|
|
1485
|
-
url: '/filters/{id}';
|
|
1486
|
-
};
|
|
1487
|
-
type DeleteFilterErrors = {
|
|
1488
|
-
/**
|
|
1489
|
-
* Invalid request parameters
|
|
1490
|
-
*/
|
|
1491
|
-
400: ErrorResponse;
|
|
1492
|
-
/**
|
|
1493
|
-
* Invalid or missing API key
|
|
1494
|
-
*/
|
|
1495
|
-
401: ErrorResponse;
|
|
1496
|
-
/**
|
|
1497
|
-
* Resource not found
|
|
1498
|
-
*/
|
|
1499
|
-
404: ErrorResponse;
|
|
1500
|
-
};
|
|
1501
|
-
type DeleteFilterError = DeleteFilterErrors[keyof DeleteFilterErrors];
|
|
1502
|
-
type DeleteFilterResponses = {
|
|
1503
|
-
/**
|
|
1504
|
-
* Resource deleted
|
|
1505
|
-
*/
|
|
1506
|
-
200: SuccessEnvelope & {
|
|
1507
|
-
data?: {
|
|
1508
|
-
deleted: boolean;
|
|
1509
|
-
};
|
|
1510
|
-
};
|
|
1511
|
-
};
|
|
1512
|
-
type DeleteFilterResponse = DeleteFilterResponses[keyof DeleteFilterResponses];
|
|
1513
|
-
type UpdateFilterData = {
|
|
1514
|
-
body: UpdateFilterInput;
|
|
1515
|
-
path: {
|
|
1516
|
-
/**
|
|
1517
|
-
* Resource UUID
|
|
1518
|
-
*/
|
|
1519
|
-
id: string;
|
|
1520
|
-
};
|
|
1521
|
-
query?: never;
|
|
1522
|
-
url: '/filters/{id}';
|
|
1523
|
-
};
|
|
1524
|
-
type UpdateFilterErrors = {
|
|
1525
|
-
/**
|
|
1526
|
-
* Invalid request parameters
|
|
1527
|
-
*/
|
|
1528
|
-
400: ErrorResponse;
|
|
1529
|
-
/**
|
|
1530
|
-
* Invalid or missing API key
|
|
1531
|
-
*/
|
|
1532
|
-
401: ErrorResponse;
|
|
1533
|
-
/**
|
|
1534
|
-
* Resource not found
|
|
1535
|
-
*/
|
|
1536
|
-
404: ErrorResponse;
|
|
1537
|
-
};
|
|
1538
|
-
type UpdateFilterError = UpdateFilterErrors[keyof UpdateFilterErrors];
|
|
1539
|
-
type UpdateFilterResponses = {
|
|
1540
|
-
/**
|
|
1541
|
-
* Updated filter
|
|
1542
|
-
*/
|
|
1543
|
-
200: SuccessEnvelope & {
|
|
1544
|
-
data?: Filter;
|
|
1545
|
-
};
|
|
1546
|
-
};
|
|
1547
|
-
type UpdateFilterResponse = UpdateFilterResponses[keyof UpdateFilterResponses];
|
|
1548
|
-
type ListDeliveriesData = {
|
|
1549
|
-
body?: never;
|
|
1550
|
-
path?: never;
|
|
1551
|
-
query?: {
|
|
1552
|
-
/**
|
|
1553
|
-
* Pagination cursor from a previous response's `meta.cursor` field.
|
|
1554
|
-
* Format: `{ISO-datetime}|{id}`
|
|
1555
|
-
*
|
|
1556
|
-
*/
|
|
1557
|
-
cursor?: string;
|
|
1558
|
-
/**
|
|
1559
|
-
* Number of results per page
|
|
1560
|
-
*/
|
|
1561
|
-
limit?: number;
|
|
1562
|
-
/**
|
|
1563
|
-
* Filter by email ID
|
|
1564
|
-
*/
|
|
1565
|
-
email_id?: string;
|
|
1566
|
-
/**
|
|
1567
|
-
* Filter by delivery status
|
|
1568
|
-
*/
|
|
1569
|
-
status?: 'pending' | 'delivered' | 'header_confirmed' | 'failed';
|
|
1570
|
-
/**
|
|
1571
|
-
* Filter deliveries created on or after this timestamp
|
|
1572
|
-
*/
|
|
1573
|
-
date_from?: string;
|
|
1574
|
-
/**
|
|
1575
|
-
* Filter deliveries created on or before this timestamp
|
|
1576
|
-
*/
|
|
1577
|
-
date_to?: string;
|
|
1578
|
-
};
|
|
1579
|
-
url: '/webhooks/deliveries';
|
|
1580
|
-
};
|
|
1581
|
-
type ListDeliveriesErrors = {
|
|
1582
|
-
/**
|
|
1583
|
-
* Invalid request parameters
|
|
1584
|
-
*/
|
|
1585
|
-
400: ErrorResponse;
|
|
1586
|
-
/**
|
|
1587
|
-
* Invalid or missing API key
|
|
1588
|
-
*/
|
|
1589
|
-
401: ErrorResponse;
|
|
1590
|
-
};
|
|
1591
|
-
type ListDeliveriesError = ListDeliveriesErrors[keyof ListDeliveriesErrors];
|
|
1592
|
-
type ListDeliveriesResponses = {
|
|
1593
|
-
/**
|
|
1594
|
-
* Paginated list of deliveries
|
|
1595
|
-
*/
|
|
1596
|
-
200: ListEnvelope & {
|
|
1597
|
-
data?: Array<DeliverySummary>;
|
|
1598
|
-
};
|
|
1599
|
-
};
|
|
1600
|
-
type ListDeliveriesResponse = ListDeliveriesResponses[keyof ListDeliveriesResponses];
|
|
1601
|
-
type ReplayDeliveryData = {
|
|
1602
|
-
body?: never;
|
|
1603
|
-
path: {
|
|
1604
|
-
/**
|
|
1605
|
-
* Delivery ID (numeric)
|
|
1606
|
-
*/
|
|
1607
|
-
id: string;
|
|
1608
|
-
};
|
|
1609
|
-
query?: never;
|
|
1610
|
-
url: '/webhooks/deliveries/{id}/replay';
|
|
1611
|
-
};
|
|
1612
|
-
type ReplayDeliveryErrors = {
|
|
1613
|
-
/**
|
|
1614
|
-
* Invalid request parameters
|
|
1615
|
-
*/
|
|
1616
|
-
400: ErrorResponse;
|
|
1617
|
-
/**
|
|
1618
|
-
* Invalid or missing API key
|
|
1619
|
-
*/
|
|
1620
|
-
401: ErrorResponse;
|
|
1621
|
-
/**
|
|
1622
|
-
* Resource not found
|
|
1623
|
-
*/
|
|
1624
|
-
404: ErrorResponse;
|
|
1625
|
-
/**
|
|
1626
|
-
* Rate limit exceeded
|
|
1627
|
-
*/
|
|
1628
|
-
429: ErrorResponse;
|
|
1629
|
-
};
|
|
1630
|
-
type ReplayDeliveryError = ReplayDeliveryErrors[keyof ReplayDeliveryErrors];
|
|
1631
|
-
type ReplayDeliveryResponses = {
|
|
1632
|
-
/**
|
|
1633
|
-
* Replay result
|
|
1634
|
-
*/
|
|
1635
|
-
200: SuccessEnvelope & {
|
|
1636
|
-
data?: ReplayResult;
|
|
1637
|
-
};
|
|
1638
|
-
};
|
|
1639
|
-
type ReplayDeliveryResponse = ReplayDeliveryResponses[keyof ReplayDeliveryResponses]; //#endregion
|
|
1640
|
-
//#region src/api/generated/sdk.gen.d.ts
|
|
1641
|
-
declare namespace sdk_gen_d_exports {
|
|
1642
|
-
export { Options$1 as Options, addDomain, createEndpoint, createFilter, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, downloadAttachments, downloadRawEmail, getAccount, getEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, replayDelivery, replayEmailWebhooks, rotateWebhookSecret, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
|
|
1643
|
-
}
|
|
1644
|
-
type Options$1<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options$2<TData, ThrowOnError, TResponse> & {
|
|
1645
|
-
/**
|
|
1646
|
-
* You can provide a client instance returned by `createClient()` instead of
|
|
1647
|
-
* individual options. This might be also useful if you want to implement a
|
|
1648
|
-
* custom client.
|
|
1649
|
-
*/
|
|
1650
|
-
client?: Client;
|
|
1651
|
-
/**
|
|
1652
|
-
* You can pass arbitrary values through the `meta` object. This can be
|
|
1653
|
-
* used to access values that aren't defined as part of the SDK function.
|
|
1654
|
-
*/
|
|
1655
|
-
meta?: Record<string, unknown>;
|
|
1656
|
-
};
|
|
1657
|
-
/**
|
|
1658
|
-
* Get account info
|
|
1659
|
-
*/
|
|
1660
|
-
declare const getAccount: <ThrowOnError extends boolean = false>(options?: Options$1<GetAccountData, ThrowOnError>) => RequestResult<GetAccountResponses, GetAccountErrors, ThrowOnError, "fields">;
|
|
1661
|
-
/**
|
|
1662
|
-
* Update account settings
|
|
1663
|
-
*/
|
|
1664
|
-
declare const updateAccount: <ThrowOnError extends boolean = false>(options: Options$1<UpdateAccountData, ThrowOnError>) => RequestResult<UpdateAccountResponses, UpdateAccountErrors, ThrowOnError, "fields">;
|
|
1665
|
-
/**
|
|
1666
|
-
* Get storage usage
|
|
1667
|
-
*/
|
|
1668
|
-
declare const getStorageStats: <ThrowOnError extends boolean = false>(options?: Options$1<GetStorageStatsData, ThrowOnError>) => RequestResult<GetStorageStatsResponses, GetStorageStatsErrors, ThrowOnError, "fields">;
|
|
1669
|
-
/**
|
|
1670
|
-
* Get webhook signing secret
|
|
1671
|
-
*
|
|
1672
|
-
* Returns the webhook signing secret for your account. If no secret
|
|
1673
|
-
* exists yet, one is generated automatically on first access.
|
|
1674
|
-
*
|
|
1675
|
-
*/
|
|
1676
|
-
declare const getWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options$1<GetWebhookSecretData, ThrowOnError>) => RequestResult<GetWebhookSecretResponses, GetWebhookSecretErrors, ThrowOnError, "fields">;
|
|
1677
|
-
/**
|
|
1678
|
-
* Rotate webhook signing secret
|
|
1679
|
-
*
|
|
1680
|
-
* Generates a new webhook signing secret, replacing the current one.
|
|
1681
|
-
* Rate limited to once per 60 minutes.
|
|
1682
|
-
*
|
|
1683
|
-
*/
|
|
1684
|
-
declare const rotateWebhookSecret: <ThrowOnError extends boolean = false>(options?: Options$1<RotateWebhookSecretData, ThrowOnError>) => RequestResult<RotateWebhookSecretResponses, RotateWebhookSecretErrors, ThrowOnError, "fields">;
|
|
1685
|
-
/**
|
|
1686
|
-
* List all domains
|
|
1687
|
-
*
|
|
1688
|
-
* Returns all verified and unverified domains for your organization,
|
|
1689
|
-
* sorted by creation date (newest first). Each domain includes a
|
|
1690
|
-
* `verified` boolean to distinguish between the two states.
|
|
1691
|
-
*
|
|
1692
|
-
*/
|
|
1693
|
-
declare const listDomains: <ThrowOnError extends boolean = false>(options?: Options$1<ListDomainsData, ThrowOnError>) => RequestResult<ListDomainsResponses, ListDomainsErrors, ThrowOnError, "fields">;
|
|
1694
|
-
/**
|
|
1695
|
-
* Claim a new domain
|
|
1696
|
-
*
|
|
1697
|
-
* Creates an unverified domain claim. You will receive a
|
|
1698
|
-
* `verification_token` to add as a DNS TXT record before
|
|
1699
|
-
* calling the verify endpoint.
|
|
1700
|
-
*
|
|
1701
|
-
*/
|
|
1702
|
-
declare const addDomain: <ThrowOnError extends boolean = false>(options: Options$1<AddDomainData, ThrowOnError>) => RequestResult<AddDomainResponses, AddDomainErrors, ThrowOnError, "fields">;
|
|
1703
|
-
/**
|
|
1704
|
-
* Delete a domain
|
|
1705
|
-
*
|
|
1706
|
-
* Deletes a verified or unverified domain claim.
|
|
1707
|
-
*/
|
|
1708
|
-
declare const deleteDomain: <ThrowOnError extends boolean = false>(options: Options$1<DeleteDomainData, ThrowOnError>) => RequestResult<DeleteDomainResponses, DeleteDomainErrors, ThrowOnError, "fields">;
|
|
1709
|
-
/**
|
|
1710
|
-
* Update domain settings
|
|
1711
|
-
*
|
|
1712
|
-
* Update a verified domain's settings. Only verified domains can be
|
|
1713
|
-
* updated. Per-domain spam thresholds require a Pro plan.
|
|
1714
|
-
*
|
|
1715
|
-
*/
|
|
1716
|
-
declare const updateDomain: <ThrowOnError extends boolean = false>(options: Options$1<UpdateDomainData, ThrowOnError>) => RequestResult<UpdateDomainResponses, UpdateDomainErrors, ThrowOnError, "fields">;
|
|
1717
|
-
/**
|
|
1718
|
-
* Verify domain ownership
|
|
1719
|
-
*
|
|
1720
|
-
* Checks DNS records (MX and TXT) to verify domain ownership.
|
|
1721
|
-
* On success, the domain is promoted from unverified to verified.
|
|
1722
|
-
* On failure, returns which checks passed and which failed.
|
|
1723
|
-
*
|
|
1724
|
-
*/
|
|
1725
|
-
declare const verifyDomain: <ThrowOnError extends boolean = false>(options: Options$1<VerifyDomainData, ThrowOnError>) => RequestResult<VerifyDomainResponses, VerifyDomainErrors, ThrowOnError, "fields">;
|
|
1726
|
-
/**
|
|
1727
|
-
* List emails
|
|
1728
|
-
*
|
|
1729
|
-
* Returns a paginated list of received emails. Supports filtering by
|
|
1730
|
-
* domain, status, date range, and free-text search across subject,
|
|
1731
|
-
* sender, and recipient fields.
|
|
1732
|
-
*
|
|
1733
|
-
*/
|
|
1734
|
-
declare const listEmails: <ThrowOnError extends boolean = false>(options?: Options$1<ListEmailsData, ThrowOnError>) => RequestResult<ListEmailsResponses, ListEmailsErrors, ThrowOnError, "fields">;
|
|
1735
|
-
/**
|
|
1736
|
-
* Delete an email
|
|
1737
|
-
*/
|
|
1738
|
-
declare const deleteEmail: <ThrowOnError extends boolean = false>(options: Options$1<DeleteEmailData, ThrowOnError>) => RequestResult<DeleteEmailResponses, DeleteEmailErrors, ThrowOnError, "fields">;
|
|
1739
|
-
/**
|
|
1740
|
-
* Get email details
|
|
1741
|
-
*/
|
|
1742
|
-
declare const getEmail: <ThrowOnError extends boolean = false>(options: Options$1<GetEmailData, ThrowOnError>) => RequestResult<GetEmailResponses, GetEmailErrors, ThrowOnError, "fields">;
|
|
1743
|
-
/**
|
|
1744
|
-
* Download raw email
|
|
1745
|
-
*
|
|
1746
|
-
* Downloads the raw RFC 822 email file (.eml). Authenticates via
|
|
1747
|
-
* a signed download token (provided in webhook payloads) or a
|
|
1748
|
-
* valid session.
|
|
1749
|
-
*
|
|
1750
|
-
*/
|
|
1751
|
-
declare const downloadRawEmail: <ThrowOnError extends boolean = false>(options: Options$1<DownloadRawEmailData, ThrowOnError>) => RequestResult<DownloadRawEmailResponses, DownloadRawEmailErrors, ThrowOnError, "fields">;
|
|
1752
|
-
/**
|
|
1753
|
-
* Download email attachments
|
|
1754
|
-
*
|
|
1755
|
-
* Downloads all attachments as a gzip-compressed tar archive.
|
|
1756
|
-
* Authenticates via a signed download token (provided in webhook
|
|
1757
|
-
* payloads) or a valid session.
|
|
1758
|
-
*
|
|
1759
|
-
*/
|
|
1760
|
-
declare const downloadAttachments: <ThrowOnError extends boolean = false>(options: Options$1<DownloadAttachmentsData, ThrowOnError>) => RequestResult<DownloadAttachmentsResponses, DownloadAttachmentsErrors, ThrowOnError, "fields">;
|
|
1761
|
-
/**
|
|
1762
|
-
* Replay email webhooks
|
|
1763
|
-
*
|
|
1764
|
-
* Re-delivers the webhook payload for this email to all active
|
|
1765
|
-
* endpoints matching the email's domain. Rate limited per-email
|
|
1766
|
-
* (short cooldown between successive replays of the same email)
|
|
1767
|
-
* and per-org (burst + sustained windows), sharing an org-wide
|
|
1768
|
-
* budget with delivery replays.
|
|
1769
|
-
*
|
|
1770
|
-
*/
|
|
1771
|
-
declare const replayEmailWebhooks: <ThrowOnError extends boolean = false>(options: Options$1<ReplayEmailWebhooksData, ThrowOnError>) => RequestResult<ReplayEmailWebhooksResponses, ReplayEmailWebhooksErrors, ThrowOnError, "fields">;
|
|
1772
|
-
/**
|
|
1773
|
-
* List webhook endpoints
|
|
1774
|
-
*
|
|
1775
|
-
* Returns all active (non-deleted) webhook endpoints.
|
|
1776
|
-
*/
|
|
1777
|
-
declare const listEndpoints: <ThrowOnError extends boolean = false>(options?: Options$1<ListEndpointsData, ThrowOnError>) => RequestResult<ListEndpointsResponses, ListEndpointsErrors, ThrowOnError, "fields">;
|
|
1778
|
-
/**
|
|
1779
|
-
* Create a webhook endpoint
|
|
1780
|
-
*
|
|
1781
|
-
* Creates a new webhook endpoint. If a deactivated endpoint with the
|
|
1782
|
-
* same URL and domain exists, it is reactivated instead.
|
|
1783
|
-
* Subject to plan limits on the number of active endpoints.
|
|
1784
|
-
*
|
|
1785
|
-
*/
|
|
1786
|
-
declare const createEndpoint: <ThrowOnError extends boolean = false>(options: Options$1<CreateEndpointData, ThrowOnError>) => RequestResult<CreateEndpointResponses, CreateEndpointErrors, ThrowOnError, "fields">;
|
|
1787
|
-
/**
|
|
1788
|
-
* Delete a webhook endpoint
|
|
1789
|
-
*
|
|
1790
|
-
* Soft-deletes a webhook endpoint. The endpoint will no longer
|
|
1791
|
-
* receive webhook deliveries.
|
|
1792
|
-
*
|
|
1793
|
-
*/
|
|
1794
|
-
declare const deleteEndpoint: <ThrowOnError extends boolean = false>(options: Options$1<DeleteEndpointData, ThrowOnError>) => RequestResult<DeleteEndpointResponses, DeleteEndpointErrors, ThrowOnError, "fields">;
|
|
1795
|
-
/**
|
|
1796
|
-
* Update a webhook endpoint
|
|
1797
|
-
*
|
|
1798
|
-
* Updates an active webhook endpoint. If the URL is changed, the old
|
|
1799
|
-
* endpoint is deactivated and a new one is created (or an existing
|
|
1800
|
-
* deactivated endpoint with the new URL is reactivated).
|
|
1801
|
-
*
|
|
1802
|
-
*/
|
|
1803
|
-
declare const updateEndpoint: <ThrowOnError extends boolean = false>(options: Options$1<UpdateEndpointData, ThrowOnError>) => RequestResult<UpdateEndpointResponses, UpdateEndpointErrors, ThrowOnError, "fields">;
|
|
1804
|
-
/**
|
|
1805
|
-
* Send a test webhook
|
|
1806
|
-
*
|
|
1807
|
-
* Sends a sample `email.received` event to the endpoint. The request
|
|
1808
|
-
* includes SSRF protection (private IP rejection and DNS pinning).
|
|
1809
|
-
* Rate limited to 4 per minute and 30 per hour (non-exempt).
|
|
1810
|
-
* Successful deliveries and verified-domain endpoints are exempt
|
|
1811
|
-
* from the rate limit.
|
|
1812
|
-
*
|
|
1813
|
-
*/
|
|
1814
|
-
declare const testEndpoint: <ThrowOnError extends boolean = false>(options: Options$1<TestEndpointData, ThrowOnError>) => RequestResult<TestEndpointResponses, TestEndpointErrors, ThrowOnError, "fields">;
|
|
1815
|
-
/**
|
|
1816
|
-
* List filter rules
|
|
1817
|
-
*
|
|
1818
|
-
* Returns all whitelist and blocklist filter rules.
|
|
1819
|
-
*/
|
|
1820
|
-
declare const listFilters: <ThrowOnError extends boolean = false>(options?: Options$1<ListFiltersData, ThrowOnError>) => RequestResult<ListFiltersResponses, ListFiltersErrors, ThrowOnError, "fields">;
|
|
1821
|
-
/**
|
|
1822
|
-
* Create a filter rule
|
|
1823
|
-
*
|
|
1824
|
-
* Creates a new whitelist or blocklist filter. Per-domain filters
|
|
1825
|
-
* require a Pro plan. Patterns are stored as lowercase.
|
|
1826
|
-
*
|
|
1827
|
-
*/
|
|
1828
|
-
declare const createFilter: <ThrowOnError extends boolean = false>(options: Options$1<CreateFilterData, ThrowOnError>) => RequestResult<CreateFilterResponses, CreateFilterErrors, ThrowOnError, "fields">;
|
|
1829
|
-
/**
|
|
1830
|
-
* Delete a filter rule
|
|
1831
|
-
*/
|
|
1832
|
-
declare const deleteFilter: <ThrowOnError extends boolean = false>(options: Options$1<DeleteFilterData, ThrowOnError>) => RequestResult<DeleteFilterResponses, DeleteFilterErrors, ThrowOnError, "fields">;
|
|
1833
|
-
/**
|
|
1834
|
-
* Update a filter rule
|
|
1835
|
-
*
|
|
1836
|
-
* Toggle a filter's enabled state.
|
|
1837
|
-
*/
|
|
1838
|
-
declare const updateFilter: <ThrowOnError extends boolean = false>(options: Options$1<UpdateFilterData, ThrowOnError>) => RequestResult<UpdateFilterResponses, UpdateFilterErrors, ThrowOnError, "fields">;
|
|
1839
|
-
/**
|
|
1840
|
-
* List webhook deliveries
|
|
1841
|
-
*
|
|
1842
|
-
* Returns a paginated list of webhook delivery attempts. Each delivery
|
|
1843
|
-
* includes a nested `email` object with sender, recipient, and subject.
|
|
1844
|
-
*
|
|
1845
|
-
*/
|
|
1846
|
-
declare const listDeliveries: <ThrowOnError extends boolean = false>(options?: Options$1<ListDeliveriesData, ThrowOnError>) => RequestResult<ListDeliveriesResponses, ListDeliveriesErrors, ThrowOnError, "fields">;
|
|
1847
|
-
/**
|
|
1848
|
-
* Replay a webhook delivery
|
|
1849
|
-
*
|
|
1850
|
-
* Re-sends the stored webhook payload from a previous delivery attempt.
|
|
1851
|
-
* If the original endpoint is still active, it is targeted. If the
|
|
1852
|
-
* original endpoint was deleted, the oldest active endpoint is used.
|
|
1853
|
-
* Deactivated endpoints cannot be replayed to. Rate limited per-org,
|
|
1854
|
-
* sharing an org-wide budget with email replays.
|
|
1855
|
-
*
|
|
1856
|
-
*/
|
|
1857
|
-
declare const replayDelivery: <ThrowOnError extends boolean = false>(options: Options$1<ReplayDeliveryData, ThrowOnError>) => RequestResult<ReplayDeliveryResponses, ReplayDeliveryErrors, ThrowOnError, "fields">;
|
|
1858
|
-
|
|
1859
|
-
//#endregion
|
|
1860
|
-
//#region src/api/index.d.ts
|
|
1861
|
-
declare const DEFAULT_BASE_URL = "https://www.primitive.dev/api/v1";
|
|
1862
|
-
interface PrimitiveApiClientOptions extends Omit<Config, "auth" | "baseUrl"> {
|
|
1863
|
-
apiKey?: string;
|
|
1864
|
-
auth?: Config["auth"];
|
|
1865
|
-
baseUrl?: string;
|
|
1866
|
-
}
|
|
1867
|
-
declare class PrimitiveApiClient {
|
|
1868
|
-
readonly client: Client;
|
|
1869
|
-
constructor(options?: PrimitiveApiClientOptions);
|
|
1870
|
-
getConfig(): Config<ClientOptions$1>;
|
|
1871
|
-
setConfig(config: Config): Config<ClientOptions$1>;
|
|
1872
|
-
}
|
|
1873
|
-
declare function createPrimitiveApiClient(options?: PrimitiveApiClientOptions): PrimitiveApiClient;
|
|
1874
|
-
declare const operations: typeof sdk_gen_d_exports;
|
|
1875
|
-
|
|
1876
|
-
//#endregion
|
|
1877
|
-
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, Auth, ClientOptions, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, Cursor, DEFAULT_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeliverySummary, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailSummary, Endpoint, ErrorResponse, Filter, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, Limit, ListDeliveriesData, ListDeliveriesError, ListDeliveriesErrors, ListDeliveriesResponse, ListDeliveriesResponses, ListDomainsData, ListDomainsError, ListDomainsErrors, ListDomainsResponse, ListDomainsResponses, ListEmailsData, ListEmailsError, ListEmailsErrors, ListEmailsResponse, ListEmailsResponses, ListEndpointsData, ListEndpointsError, ListEndpointsErrors, ListEndpointsResponse, ListEndpointsResponses, ListEnvelope, ListFiltersData, ListFiltersError, ListFiltersErrors, ListFiltersResponse, ListFiltersResponses, Options$1 as Options, PaginationMeta, PrimitiveApiClient, PrimitiveApiClientOptions, Client as PrimitiveGeneratedApiClient, ClientOptions$1 as PrimitiveGeneratedApiClientOptions, Config as PrimitiveGeneratedApiConfig, Options$2 as PrimitiveGeneratedApiOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestResult, UnverifiedDomain, UpdateAccountData, UpdateAccountError, UpdateAccountErrors, UpdateAccountInput, UpdateAccountResponse, UpdateAccountResponses, UpdateDomainData, UpdateDomainError, UpdateDomainErrors, UpdateDomainInput, UpdateDomainResponse, UpdateDomainResponses, UpdateEndpointData, UpdateEndpointError, UpdateEndpointErrors, UpdateEndpointInput, UpdateEndpointResponse, UpdateEndpointResponses, UpdateFilterData, UpdateFilterError, UpdateFilterErrors, UpdateFilterInput, UpdateFilterResponse, UpdateFilterResponses, VerifiedDomain, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, WebhookSecret, addDomain, createEndpoint, createFilter, createPrimitiveApiClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, downloadAttachments, downloadRawEmail, getAccount, getEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, operations, replayDelivery, replayEmailWebhooks, rotateWebhookSecret, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
|
|
1
|
+
import "../types-CIOzt1FY.js";
|
|
2
|
+
import "../received-email-C67Z7Dha.js";
|
|
3
|
+
import { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, Auth, Client, ClientOptions, ClientOptions$1, Config, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, Cursor, DEFAULT_BASE_URL$1 as DEFAULT_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeliveryStatus, DeliverySummary, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailSummary, Endpoint, ErrorResponse, Filter, ForwardInput, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, Limit, ListDeliveriesData, ListDeliveriesError, ListDeliveriesErrors, ListDeliveriesResponse, ListDeliveriesResponses, ListDomainsData, ListDomainsError, ListDomainsErrors, ListDomainsResponse, ListDomainsResponses, ListEmailsData, ListEmailsError, ListEmailsErrors, ListEmailsResponse, ListEmailsResponses, ListEndpointsData, ListEndpointsError, ListEndpointsErrors, ListEndpointsResponse, ListEndpointsResponses, ListEnvelope, ListFiltersData, ListFiltersError, ListFiltersErrors, ListFiltersResponse, ListFiltersResponses, Options, Options$1, PaginationMeta, PrimitiveApiClient$1 as PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError$1 as PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient$1 as PrimitiveClient, PrimitiveClientOptions, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, RequestOptions, RequestResult, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailInput, SendMailResult, SendResult, SendThreadInput, SentEmailStatus, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestResult, UnverifiedDomain, UpdateAccountData, UpdateAccountError, UpdateAccountErrors, UpdateAccountInput, UpdateAccountResponse, UpdateAccountResponses, UpdateDomainData, UpdateDomainError, UpdateDomainErrors, UpdateDomainInput, UpdateDomainResponse, UpdateDomainResponses, UpdateEndpointData, UpdateEndpointError, UpdateEndpointErrors, UpdateEndpointInput, UpdateEndpointResponse, UpdateEndpointResponses, UpdateFilterData, UpdateFilterError, UpdateFilterErrors, UpdateFilterInput, UpdateFilterResponse, UpdateFilterResponses, VerifiedDomain, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, WebhookSecret, addDomain$1 as addDomain, client$1 as client, createEndpoint$1 as createEndpoint, createFilter$1 as createFilter, createPrimitiveApiClient$1 as createPrimitiveApiClient, createPrimitiveClient$1 as createPrimitiveClient, deleteDomain$1 as deleteDomain, deleteEmail$1 as deleteEmail, deleteEndpoint$1 as deleteEndpoint, deleteFilter$1 as deleteFilter, downloadAttachments$1 as downloadAttachments, downloadRawEmail$1 as downloadRawEmail, getAccount$1 as getAccount, getEmail$1 as getEmail, getStorageStats$1 as getStorageStats, getWebhookSecret$1 as getWebhookSecret, listDeliveries$1 as listDeliveries, listDomains$1 as listDomains, listEmails$1 as listEmails, listEndpoints$1 as listEndpoints, listFilters$1 as listFilters, operations$1 as operations, replayDelivery$1 as replayDelivery, replayEmailWebhooks$1 as replayEmailWebhooks, rotateWebhookSecret$1 as rotateWebhookSecret, sendEmail$1 as sendEmail, testEndpoint$1 as testEndpoint, updateAccount$1 as updateAccount, updateDomain$1 as updateDomain, updateEndpoint$1 as updateEndpoint, updateFilter$1 as updateFilter, verifyDomain$1 as verifyDomain } from "../index-D9lanVFt.js";
|
|
4
|
+
export { Account, AccountUpdated, AddDomainData, AddDomainError, AddDomainErrors, AddDomainInput, AddDomainResponse, AddDomainResponses, Auth, ClientOptions, CreateClientConfig, CreateEndpointData, CreateEndpointError, CreateEndpointErrors, CreateEndpointInput, CreateEndpointResponse, CreateEndpointResponses, CreateFilterData, CreateFilterError, CreateFilterErrors, CreateFilterInput, CreateFilterResponse, CreateFilterResponses, Cursor, DEFAULT_BASE_URL, DeleteDomainData, DeleteDomainError, DeleteDomainErrors, DeleteDomainResponse, DeleteDomainResponses, DeleteEmailData, DeleteEmailError, DeleteEmailErrors, DeleteEmailResponse, DeleteEmailResponses, DeleteEndpointData, DeleteEndpointError, DeleteEndpointErrors, DeleteEndpointResponse, DeleteEndpointResponses, DeleteFilterData, DeleteFilterError, DeleteFilterErrors, DeleteFilterResponse, DeleteFilterResponses, DeliveryStatus, DeliverySummary, Domain, DomainVerifyResult, DownloadAttachmentsData, DownloadAttachmentsError, DownloadAttachmentsErrors, DownloadAttachmentsResponse, DownloadAttachmentsResponses, DownloadRawEmailData, DownloadRawEmailError, DownloadRawEmailErrors, DownloadRawEmailResponse, DownloadRawEmailResponses, EmailDetail, EmailSummary, Endpoint, ErrorResponse, Filter, ForwardInput, GateDenial, GateFix, GetAccountData, GetAccountError, GetAccountErrors, GetAccountResponse, GetAccountResponses, GetEmailData, GetEmailError, GetEmailErrors, GetEmailResponse, GetEmailResponses, GetStorageStatsData, GetStorageStatsError, GetStorageStatsErrors, GetStorageStatsResponse, GetStorageStatsResponses, GetWebhookSecretData, GetWebhookSecretError, GetWebhookSecretErrors, GetWebhookSecretResponse, GetWebhookSecretResponses, Limit, ListDeliveriesData, ListDeliveriesError, ListDeliveriesErrors, ListDeliveriesResponse, ListDeliveriesResponses, ListDomainsData, ListDomainsError, ListDomainsErrors, ListDomainsResponse, ListDomainsResponses, ListEmailsData, ListEmailsError, ListEmailsErrors, ListEmailsResponse, ListEmailsResponses, ListEndpointsData, ListEndpointsError, ListEndpointsErrors, ListEndpointsResponse, ListEndpointsResponses, ListEnvelope, ListFiltersData, ListFiltersError, ListFiltersErrors, ListFiltersResponse, ListFiltersResponses, Options, PaginationMeta, PrimitiveApiClient, PrimitiveApiClientOptions, PrimitiveApiError, PrimitiveApiErrorDetails, PrimitiveClient, PrimitiveClientOptions, Client as PrimitiveGeneratedApiClient, ClientOptions$1 as PrimitiveGeneratedApiClientOptions, Config as PrimitiveGeneratedApiConfig, Options$1 as PrimitiveGeneratedApiOptions, RequestOptions as PrimitiveGeneratedApiRequestOptions, RequestResult as PrimitiveGeneratedApiRequestResult, ReplayDeliveryData, ReplayDeliveryError, ReplayDeliveryErrors, ReplayDeliveryResponse, ReplayDeliveryResponses, ReplayEmailWebhooksData, ReplayEmailWebhooksError, ReplayEmailWebhooksErrors, ReplayEmailWebhooksResponse, ReplayEmailWebhooksResponses, ReplayResult, ReplyInput, ResourceId, ResponseStyle, RotateWebhookSecretData, RotateWebhookSecretError, RotateWebhookSecretErrors, RotateWebhookSecretResponse, RotateWebhookSecretResponses, SendEmailData, SendEmailError, SendEmailErrors, SendEmailResponse, SendEmailResponses, SendInput, SendMailInput, SendMailResult, SendResult, SendThreadInput, SentEmailStatus, StorageStats, SuccessEnvelope, TestEndpointData, TestEndpointError, TestEndpointErrors, TestEndpointResponse, TestEndpointResponses, TestResult, UnverifiedDomain, UpdateAccountData, UpdateAccountError, UpdateAccountErrors, UpdateAccountInput, UpdateAccountResponse, UpdateAccountResponses, UpdateDomainData, UpdateDomainError, UpdateDomainErrors, UpdateDomainInput, UpdateDomainResponse, UpdateDomainResponses, UpdateEndpointData, UpdateEndpointError, UpdateEndpointErrors, UpdateEndpointInput, UpdateEndpointResponse, UpdateEndpointResponses, UpdateFilterData, UpdateFilterError, UpdateFilterErrors, UpdateFilterInput, UpdateFilterResponse, UpdateFilterResponses, VerifiedDomain, VerifyDomainData, VerifyDomainError, VerifyDomainErrors, VerifyDomainResponse, VerifyDomainResponses, WebhookSecret, addDomain, client, createEndpoint, createFilter, createPrimitiveApiClient, createPrimitiveClient, deleteDomain, deleteEmail, deleteEndpoint, deleteFilter, downloadAttachments, downloadRawEmail, getAccount, getEmail, getStorageStats, getWebhookSecret, listDeliveries, listDomains, listEmails, listEndpoints, listFilters, operations, replayDelivery, replayEmailWebhooks, rotateWebhookSecret, sendEmail, testEndpoint, updateAccount, updateDomain, updateEndpoint, updateFilter, verifyDomain };
|