add sdk changes

This commit is contained in:
KMKoushik
2025-03-08 22:44:32 +11:00
committed by KM Koushik
parent 1c7d2a85a0
commit 48395915f0
3 changed files with 123 additions and 75 deletions

View File

@@ -340,7 +340,18 @@
"type": "string"
},
"subject": {
"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": {
"anyOf": [
@@ -412,8 +423,7 @@
},
"required": [
"to",
"from",
"subject"
"from"
]
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "unsend",
"version": "1.3.0",
"version": "1.4.0",
"description": "",
"main": "./dist/index.js",
"module": "./dist/index.mjs",

View File

@@ -115,7 +115,13 @@ export interface paths {
"application/json": {
to: string | 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[];
cc?: string | string[];
bcc?: string | string[];
@@ -162,6 +168,40 @@ export interface paths {
};
};
"/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: {
parameters: {
path: {
@@ -192,7 +232,6 @@ export interface paths {
};
};
};
};
"/v1/contactBooks/{contactBookId}/contacts/{contactId}": {
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: {
parameters: {
path: {
contactBookId: string;
contactId: string;
};
};
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;
};
};
};
};
};
};
}