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

View File

@@ -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",

View File

@@ -115,7 +115,13 @@ 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[];
@@ -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;
};
};
};
};
};
}; };
} }