add sdk changes
This commit is contained in:
@@ -340,7 +340,18 @@
|
|||||||
"type": "string"
|
"type": "string"
|
||||||
},
|
},
|
||||||
"subject": {
|
"subject": {
|
||||||
"type": "string"
|
"type": "string",
|
||||||
|
"description": "Optional when templateId is provided"
|
||||||
|
},
|
||||||
|
"templateId": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "ID of a template from the dashboard"
|
||||||
|
},
|
||||||
|
"variables": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"replyTo": {
|
"replyTo": {
|
||||||
"anyOf": [
|
"anyOf": [
|
||||||
@@ -412,8 +423,7 @@
|
|||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
"to",
|
"to",
|
||||||
"from",
|
"from"
|
||||||
"subject"
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "unsend",
|
"name": "unsend",
|
||||||
"version": "1.3.0",
|
"version": "1.4.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"module": "./dist/index.mjs",
|
"module": "./dist/index.mjs",
|
||||||
|
180
packages/sdk/types/schema.d.ts
vendored
180
packages/sdk/types/schema.d.ts
vendored
@@ -12,35 +12,35 @@ export interface paths {
|
|||||||
200: {
|
200: {
|
||||||
content: {
|
content: {
|
||||||
"application/json": ({
|
"application/json": ({
|
||||||
/**
|
/**
|
||||||
* @description The ID of the domain
|
* @description The ID of the domain
|
||||||
* @example 1
|
* @example 1
|
||||||
*/
|
*/
|
||||||
id: number;
|
id: number;
|
||||||
/**
|
/**
|
||||||
* @description The name of the domain
|
* @description The name of the domain
|
||||||
* @example example.com
|
* @example example.com
|
||||||
*/
|
*/
|
||||||
name: string;
|
name: string;
|
||||||
/**
|
/**
|
||||||
* @description The ID of the team
|
* @description The ID of the team
|
||||||
* @example 1
|
* @example 1
|
||||||
*/
|
*/
|
||||||
teamId: number;
|
teamId: number;
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
status: "NOT_STARTED" | "PENDING" | "SUCCESS" | "FAILED" | "TEMPORARY_FAILURE";
|
||||||
/** @default us-east-1 */
|
/** @default us-east-1 */
|
||||||
region?: string;
|
region?: string;
|
||||||
/** @default false */
|
/** @default false */
|
||||||
clickTracking?: boolean;
|
clickTracking?: boolean;
|
||||||
/** @default false */
|
/** @default false */
|
||||||
openTracking?: boolean;
|
openTracking?: boolean;
|
||||||
publicKey: string;
|
publicKey: string;
|
||||||
dkimStatus?: string | null;
|
dkimStatus?: string | null;
|
||||||
spfDetails?: string | null;
|
spfDetails?: string | null;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
})[];
|
})[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -71,12 +71,12 @@ export interface paths {
|
|||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: string;
|
updatedAt: string;
|
||||||
emailEvents: ({
|
emailEvents: ({
|
||||||
emailId: string;
|
emailId: string;
|
||||||
/** @enum {string} */
|
/** @enum {string} */
|
||||||
status: "SCHEDULED" | "QUEUED" | "SENT" | "DELIVERY_DELAYED" | "BOUNCED" | "REJECTED" | "RENDERING_FAILURE" | "DELIVERED" | "OPENED" | "CLICKED" | "COMPLAINED" | "FAILED" | "CANCELLED";
|
status: "SCHEDULED" | "QUEUED" | "SENT" | "DELIVERY_DELAYED" | "BOUNCED" | "REJECTED" | "RENDERING_FAILURE" | "DELIVERED" | "OPENED" | "CLICKED" | "COMPLAINED" | "FAILED" | "CANCELLED";
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
data?: unknown;
|
data?: unknown;
|
||||||
})[];
|
})[];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -115,16 +115,22 @@ export interface paths {
|
|||||||
"application/json": {
|
"application/json": {
|
||||||
to: string | string[];
|
to: string | string[];
|
||||||
from: string;
|
from: string;
|
||||||
subject: string;
|
/** @description Optional when templateId is provided */
|
||||||
|
subject?: string;
|
||||||
|
/** @description ID of a template from the dashboard */
|
||||||
|
templateId?: string;
|
||||||
|
variables?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
replyTo?: string | string[];
|
replyTo?: string | string[];
|
||||||
cc?: string | string[];
|
cc?: string | string[];
|
||||||
bcc?: string | string[];
|
bcc?: string | string[];
|
||||||
text?: string;
|
text?: string;
|
||||||
html?: string;
|
html?: string;
|
||||||
attachments?: {
|
attachments?: {
|
||||||
filename: string;
|
filename: string;
|
||||||
content: string;
|
content: string;
|
||||||
}[];
|
}[];
|
||||||
/** Format: date-time */
|
/** Format: date-time */
|
||||||
scheduledAt?: string;
|
scheduledAt?: string;
|
||||||
};
|
};
|
||||||
@@ -162,6 +168,40 @@ export interface paths {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
"/v1/contactBooks/{contactBookId}/contacts": {
|
"/v1/contactBooks/{contactBookId}/contacts": {
|
||||||
|
get: {
|
||||||
|
parameters: {
|
||||||
|
query?: {
|
||||||
|
emails?: string;
|
||||||
|
page?: number;
|
||||||
|
limit?: number;
|
||||||
|
ids?: string;
|
||||||
|
};
|
||||||
|
path: {
|
||||||
|
contactBookId: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
responses: {
|
||||||
|
/** @description Retrieve multiple contacts */
|
||||||
|
200: {
|
||||||
|
content: {
|
||||||
|
"application/json": ({
|
||||||
|
id: string;
|
||||||
|
firstName?: string | null;
|
||||||
|
lastName?: string | null;
|
||||||
|
email: string;
|
||||||
|
/** @default true */
|
||||||
|
subscribed?: boolean;
|
||||||
|
properties: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
|
contactBookId: string;
|
||||||
|
createdAt: string;
|
||||||
|
updatedAt: string;
|
||||||
|
})[];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
post: {
|
post: {
|
||||||
parameters: {
|
parameters: {
|
||||||
path: {
|
path: {
|
||||||
@@ -192,7 +232,6 @@ export interface paths {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
"/v1/contactBooks/{contactBookId}/contacts/{contactId}": {
|
"/v1/contactBooks/{contactBookId}/contacts/{contactId}": {
|
||||||
get: {
|
get: {
|
||||||
@@ -224,41 +263,10 @@ export interface paths {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
patch: {
|
|
||||||
parameters: {
|
|
||||||
path: {
|
|
||||||
contactBookId: string;
|
|
||||||
contactId: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
requestBody: {
|
|
||||||
content: {
|
|
||||||
"application/json": {
|
|
||||||
firstName?: string;
|
|
||||||
lastName?: string;
|
|
||||||
properties?: {
|
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
subscribed?: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
responses: {
|
|
||||||
/** @description Retrieve the user */
|
|
||||||
200: {
|
|
||||||
content: {
|
|
||||||
"application/json": {
|
|
||||||
contactId?: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
put: {
|
put: {
|
||||||
parameters: {
|
parameters: {
|
||||||
path: {
|
path: {
|
||||||
contactBookId: string;
|
contactBookId: string;
|
||||||
contactId: string;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
requestBody: {
|
requestBody: {
|
||||||
@@ -303,6 +311,36 @@ export interface paths {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
patch: {
|
||||||
|
parameters: {
|
||||||
|
path: {
|
||||||
|
contactBookId: string;
|
||||||
|
contactId: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
requestBody: {
|
||||||
|
content: {
|
||||||
|
"application/json": {
|
||||||
|
firstName?: string;
|
||||||
|
lastName?: string;
|
||||||
|
properties?: {
|
||||||
|
[key: string]: string;
|
||||||
|
};
|
||||||
|
subscribed?: boolean;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
responses: {
|
||||||
|
/** @description Retrieve the user */
|
||||||
|
200: {
|
||||||
|
content: {
|
||||||
|
"application/json": {
|
||||||
|
contactId?: string;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user