Add node SDK (#19)
This commit is contained in:
4
packages/sdk/types/index.ts
Normal file
4
packages/sdk/types/index.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export type ErrorResponse = {
|
||||
message: string;
|
||||
code: string;
|
||||
};
|
134
packages/sdk/types/schema.d.ts
vendored
Normal file
134
packages/sdk/types/schema.d.ts
vendored
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* This file was auto-generated by openapi-typescript.
|
||||
* Do not make direct changes to the file.
|
||||
*/
|
||||
|
||||
|
||||
export interface paths {
|
||||
"/v1/domains": {
|
||||
get: {
|
||||
responses: {
|
||||
/** @description Retrieve the user */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": ({
|
||||
/**
|
||||
* @description The ID of the domain
|
||||
* @example 1
|
||||
*/
|
||||
id: number;
|
||||
/**
|
||||
* @description The name of the domain
|
||||
* @example example.com
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* @description The ID of the team
|
||||
* @example 1
|
||||
*/
|
||||
teamId: number;
|
||||
/** @enum {string} */
|
||||
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
||||
/** @default us-east-1 */
|
||||
region?: string;
|
||||
/** @default false */
|
||||
clickTracking?: boolean;
|
||||
/** @default false */
|
||||
openTracking?: boolean;
|
||||
publicKey: string;
|
||||
dkimStatus?: string | null;
|
||||
spfDetails?: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
})[];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/emails/{emailId}": {
|
||||
get: {
|
||||
parameters: {
|
||||
path: {
|
||||
emailId: string;
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Retrieve the user */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": {
|
||||
id: string;
|
||||
teamId: number;
|
||||
to: string;
|
||||
from: string;
|
||||
subject: string;
|
||||
html: string | null;
|
||||
text: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
emailEvents: ({
|
||||
emailId: string;
|
||||
/** @enum {string} */
|
||||
status: "QUEUED" | "SENT" | "OPENED" | "CLICKED" | "BOUNCED" | "COMPLAINED" | "DELIVERED" | "REJECTED" | "RENDERING_FAILURE" | "DELIVERY_DELAYED";
|
||||
createdAt: string;
|
||||
data?: unknown;
|
||||
})[];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
"/v1/emails": {
|
||||
post: {
|
||||
requestBody: {
|
||||
content: {
|
||||
"application/json": {
|
||||
/** Format: email */
|
||||
to: string;
|
||||
/** Format: email */
|
||||
from: string;
|
||||
subject: string;
|
||||
replyTo?: string;
|
||||
text?: string;
|
||||
html?: string;
|
||||
attachments?: {
|
||||
filename: string;
|
||||
content: string;
|
||||
}[];
|
||||
};
|
||||
};
|
||||
};
|
||||
responses: {
|
||||
/** @description Retrieve the user */
|
||||
200: {
|
||||
content: {
|
||||
"application/json": {
|
||||
emailId?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export type webhooks = Record<string, never>;
|
||||
|
||||
export interface components {
|
||||
schemas: {
|
||||
};
|
||||
responses: never;
|
||||
parameters: {
|
||||
};
|
||||
requestBodies: never;
|
||||
headers: never;
|
||||
pathItems: never;
|
||||
}
|
||||
|
||||
export type $defs = Record<string, never>;
|
||||
|
||||
export type external = Record<string, never>;
|
||||
|
||||
export type operations = Record<string, never>;
|
Reference in New Issue
Block a user