🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@robinpath/sendgrid

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@robinpath/sendgrid - npm Package Compare versions

Comparing version
0.1.1
to
0.3.0
+6
dist/index.d.ts
import type { ModuleAdapter } from "@robinpath/core";
declare const SendgridModule: ModuleAdapter;
export default SendgridModule;
export { SendgridModule };
export { SendgridFunctions, SendgridFunctionMetadata, SendgridModuleMetadata, SendgridCredentialTypes, } from "./sendgrid.js";
//# sourceMappingURL=index.d.ts.map
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AASrD,QAAA,MAAM,cAAc,EAAE,aAQrB,CAAC;AAEF,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
import { SendgridFunctions, SendgridFunctionMetadata, SendgridModuleMetadata, SendgridCredentialTypes, configureSendgrid, } from "./sendgrid.js";
const SendgridModule = {
name: "sendgrid",
functions: SendgridFunctions,
functionMetadata: SendgridFunctionMetadata,
moduleMetadata: SendgridModuleMetadata,
credentialTypes: SendgridCredentialTypes,
configure: configureSendgrid,
global: false,
};
export default SendgridModule;
export { SendgridModule };
export { SendgridFunctions, SendgridFunctionMetadata, SendgridModuleMetadata, SendgridCredentialTypes, } from "./sendgrid.js";
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,eAAe,CAAC;AAEvB,MAAM,cAAc,GAAkB;IACpC,IAAI,EAAE,UAAU;IAChB,SAAS,EAAE,iBAAiB;IAC5B,gBAAgB,EAAE,wBAAwB;IAC1C,cAAc,EAAE,sBAAsB;IACtC,eAAe,EAAE,uBAAuB;IACxC,SAAS,EAAE,iBAAiB;IAC5B,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,eAAe,cAAc,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,eAAe,CAAC"}
/**
* RobinPath SendGrid Module (Node port)
*
* Twilio SendGrid integration: transactional email (Mail Send v3),
* dynamic templates, marketing contacts and lists, stats. Mirror of
* packages/php/sendgrid/src/index.php for the WordPress plugin; shares
* the same credential contract, metadata shape, and error taxonomy so
* the visual editor can render both identically.
*
* Authentication uses the RobinPath credential vault. Every handler
* takes a credential slug as its first argument. The host registers a
* CredentialStore on the runtime and this module resolves the API key
* at call time via the injected ModuleHost.
*
* Credential type declared by this module:
* - sendgrid : { api_key } → Bearer auth with a SendGrid API key
*/
import type { BuiltinHandler, CredentialTypeSchema, FunctionMetadata, ModuleHost, ModuleMetadata } from "@robinpath/core";
export declare function configureSendgrid(h: ModuleHost): void;
export declare const SendgridFunctions: Record<string, BuiltinHandler>;
export declare const SendgridCredentialTypes: CredentialTypeSchema[];
export declare const SendgridFunctionMetadata: Record<string, FunctionMetadata>;
export declare const SendgridModuleMetadata: ModuleMetadata;
//# sourceMappingURL=sendgrid.d.ts.map
{"version":3,"file":"sendgrid.d.ts","sourceRoot":"","sources":["../src/sendgrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAezB,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAErD;AAkeD,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAU5D,CAAC;AAIF,eAAO,MAAM,uBAAuB,EAAE,oBAAoB,EAkBzD,CAAC;AA2CF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA8UrE,CAAC;AAIF,eAAO,MAAM,sBAAsB,EAAE,cAuCpC,CAAC"}
/**
* RobinPath SendGrid Module (Node port)
*
* Twilio SendGrid integration: transactional email (Mail Send v3),
* dynamic templates, marketing contacts and lists, stats. Mirror of
* packages/php/sendgrid/src/index.php for the WordPress plugin; shares
* the same credential contract, metadata shape, and error taxonomy so
* the visual editor can render both identically.
*
* Authentication uses the RobinPath credential vault. Every handler
* takes a credential slug as its first argument. The host registers a
* CredentialStore on the runtime and this module resolves the API key
* at call time via the injected ModuleHost.
*
* Credential type declared by this module:
* - sendgrid : { api_key } → Bearer auth with a SendGrid API key
*/
// ── Module-local state (populated by configure hook) ────────────────────
const state = {};
function host() {
if (!state.host) {
throw new Error("SendGrid module not initialized. Pass the adapter to rp.installModule() so its configure() hook runs first.");
}
return state.host;
}
export function configureSendgrid(h) {
state.host = h;
}
// ── Constants ──────────────────────────────────────────────────────────
const API_BASE = "https://api.sendgrid.com/v3/";
const CREDENTIAL_TYPE = "sendgrid";
function errorReturn(error, code, extra = {}) {
return { error, code, ...extra };
}
// ── Credential resolver (mirrors PHP resolveApiKey) ────────────────────
async function resolveApiKey(credentialSlug) {
if (!credentialSlug) {
return errorReturn("Credential slug is required.", "credential_not_found");
}
let fields;
try {
fields = await host().credentials.get(credentialSlug);
}
catch (e) {
return errorReturn(e instanceof Error ? e.message : String(e), "credential_not_found");
}
if (!fields) {
return errorReturn(`Credential '${credentialSlug}' not found.`, "credential_not_found");
}
const apiKey = String(fields.api_key ?? "");
if (!apiKey) {
return errorReturn("Credential has no `api_key` field.", "api_key_missing");
}
return { apiKey };
}
// ── HTTP helper (normalized envelope, never throws for API errors) ─────
async function http(apiKey, method, pathAndQuery, body) {
const headers = {
Authorization: `Bearer ${apiKey}`,
};
if (body !== undefined && body !== null) {
headers["Content-Type"] = "application/json";
}
const init = { method, headers };
if (body !== undefined && body !== null) {
init.body = JSON.stringify(body);
}
let response;
try {
response = await fetch(`${API_BASE}${pathAndQuery.replace(/^\/+/, "")}`, init);
}
catch (e) {
return errorReturn(e instanceof Error ? e.message : String(e), "transport");
}
const raw = await response.text();
let decoded;
try {
decoded = raw ? JSON.parse(raw) : null;
}
catch {
decoded = { raw };
}
if (response.status >= 200 && response.status < 300) {
// 202 / 204: no body → treat as ok; otherwise return decoded body.
if (response.status === 202 || response.status === 204) {
if (decoded && typeof decoded === "object")
return decoded;
return { ok: true };
}
if (decoded && typeof decoded === "object")
return decoded;
return { raw };
}
const decodedObj = (decoded && typeof decoded === "object")
? decoded
: {};
const errors = decodedObj.errors;
let message = `SendGrid returned HTTP ${response.status}.`;
if (Array.isArray(errors) && errors.length > 0) {
const first = errors[0];
if (first && typeof first === "object" && "message" in first) {
message = String(first.message);
}
}
const code = response.status === 429 ? "rate_limited" : "sendgrid_error";
return errorReturn(message, code, {
status: response.status,
sendgrid_error: decodedObj,
});
}
// ── Mail body builders (mirror PHP buildMailBody / normalizeEmail) ─────
function isPlainObject(v) {
return !!v && typeof v === "object" && !Array.isArray(v);
}
function normalizeEmail(value) {
if (isPlainObject(value)) {
const out = {};
const email = value.email !== undefined ? String(value.email) : "";
if (email !== "")
out.email = email;
if (value.name !== undefined && value.name !== null && String(value.name) !== "") {
out.name = String(value.name);
}
return out;
}
return { email: String(value ?? "") };
}
function normalizeEmailList(value) {
if (!Array.isArray(value)) {
if (isPlainObject(value) && "email" in value) {
return [normalizeEmail(value)];
}
return [normalizeEmail(value)];
}
return value.map((v) => normalizeEmail(v));
}
function buildMailBody(fields) {
// Required validation.
if (!fields.to || !fields.from) {
return errorReturn("`to` and `from` are required.", "validation_failed");
}
if (!fields.template_id &&
!fields.subject &&
!fields.html &&
!fields.text) {
return errorReturn("Provide either `template_id` or `subject` + `html`/`text`.", "validation_failed");
}
const personalization = {
to: normalizeEmailList(fields.to),
};
if (fields.cc !== undefined) {
personalization.cc = normalizeEmailList(fields.cc);
}
if (fields.bcc !== undefined) {
personalization.bcc = normalizeEmailList(fields.bcc);
}
if (fields.subject !== undefined) {
personalization.subject = String(fields.subject);
}
if (fields.dynamic_template_data !== undefined) {
personalization.dynamic_template_data = fields.dynamic_template_data;
}
if (fields.custom_args !== undefined) {
personalization.custom_args = fields.custom_args;
}
if (fields.send_at !== undefined) {
personalization.send_at = Number(fields.send_at) | 0;
}
const body = {
personalizations: [personalization],
from: normalizeEmail(fields.from),
};
if (fields.reply_to !== undefined) {
body.reply_to = normalizeEmail(fields.reply_to);
}
if (fields.subject !== undefined) {
body.subject = String(fields.subject);
}
// Content — plain + html.
const content = [];
if (fields.text !== undefined) {
content.push({ type: "text/plain", value: String(fields.text) });
}
if (fields.html !== undefined) {
content.push({ type: "text/html", value: String(fields.html) });
}
if (content.length > 0) {
body.content = content;
}
const passthroughKeys = [
"template_id",
"attachments",
"categories",
"send_at",
"asm",
"tracking_settings",
"mail_settings",
"headers",
"batch_id",
];
for (const key of passthroughKeys) {
if (fields[key] !== undefined) {
body[key] = fields[key];
}
}
return body;
}
// ── Mail send caller ───────────────────────────────────────────────────
async function callMailSend(credentialSlug, body) {
const resolved = await resolveApiKey(credentialSlug);
if ("error" in resolved)
return resolved;
const headers = {
Authorization: `Bearer ${resolved.apiKey}`,
"Content-Type": "application/json",
};
let response;
try {
response = await fetch(`${API_BASE}mail/send`, {
method: "POST",
headers,
body: JSON.stringify(body),
});
}
catch (e) {
return {
ok: false,
error: e instanceof Error ? e.message : String(e),
code: "transport",
};
}
const status = response.status;
if (status >= 200 && status < 300) {
const messageId = response.headers.get("x-message-id") ??
response.headers.get("X-Message-Id") ??
"";
return {
ok: true,
status,
message_id: messageId,
};
}
const raw = await response.text();
let decoded;
try {
decoded = raw ? JSON.parse(raw) : null;
}
catch {
decoded = { raw };
}
const decodedObj = (decoded && typeof decoded === "object")
? decoded
: {};
const errors = decodedObj.errors;
let message = `SendGrid returned HTTP ${status}.`;
if (Array.isArray(errors) && errors.length > 0) {
const first = errors[0];
if (first && typeof first === "object" && "message" in first) {
message = String(first.message);
}
}
const code = status === 429 ? "rate_limited" : "sendgrid_error";
return {
error: message,
code,
status,
sendgrid_error: decodedObj,
};
}
// ── Generic JSON caller (wraps http + credential resolution) ───────────
async function callJson(credentialSlug, method, path, body) {
const resolved = await resolveApiKey(credentialSlug);
if ("error" in resolved)
return resolved;
return http(resolved.apiKey, method, path, body);
}
// ── Handlers ───────────────────────────────────────────────────────────
const sendEmail = async (args) => {
const cred = String(args[0] ?? "");
const fields = (isPlainObject(args[1]) ? args[1] : {});
const body = buildMailBody(fields);
if ("error" in body)
return body;
return (await callMailSend(cred, body));
};
const sendTemplate = async (args) => {
const cred = String(args[0] ?? "");
const fields = (isPlainObject(args[1]) ? args[1] : {});
if (!fields.template_id) {
return errorReturn("`template_id` is required.", "validation_failed");
}
const body = buildMailBody(fields);
if ("error" in body)
return body;
return (await callMailSend(cred, body));
};
const addContact = async (args) => {
const cred = String(args[0] ?? "");
const fields = (isPlainObject(args[1]) ? args[1] : {});
const listIds = Array.isArray(args[2]) ? args[2] : [];
if (!fields.email) {
return errorReturn("`email` is required.", "validation_failed");
}
const body = { contacts: [fields] };
if (listIds.length > 0) {
body.list_ids = listIds;
}
return (await callJson(cred, "PUT", "marketing/contacts", body));
};
const removeContact = async (args) => {
const cred = String(args[0] ?? "");
const ids = args[1];
const idsCsv = Array.isArray(ids)
? ids.map((v) => String(v)).join(",")
: String(ids ?? "");
if (idsCsv === "") {
return errorReturn("Contact IDs required.", "validation_failed");
}
return (await callJson(cred, "DELETE", `marketing/contacts?ids=${encodeURIComponent(idsCsv)}`));
};
const listContacts = async (args) => {
const cred = String(args[0] ?? "");
const opts = (isPlainObject(args[1]) ? args[1] : {});
const params = new URLSearchParams();
if (opts.page_size !== undefined) {
params.set("page_size", String(Number(opts.page_size) | 0));
}
if (opts.page_token !== undefined) {
params.set("page_token", String(opts.page_token));
}
let path = "marketing/contacts";
const qs = params.toString();
if (qs)
path += `?${qs}`;
return (await callJson(cred, "GET", path));
};
const createList = async (args) => {
const cred = String(args[0] ?? "");
const name = String(args[1] ?? "");
if (name === "") {
return errorReturn("List name is required.", "validation_failed");
}
return (await callJson(cred, "POST", "marketing/lists", { name }));
};
const addToList = async (args) => {
const cred = String(args[0] ?? "");
const listId = String(args[1] ?? "");
const contacts = Array.isArray(args[2]) ? args[2] : [];
if (listId === "") {
return errorReturn("List ID required.", "validation_failed");
}
if (contacts.length === 0) {
return errorReturn("At least one contact is required.", "validation_failed");
}
return (await callJson(cred, "PUT", "marketing/contacts", {
list_ids: [listId],
contacts,
}));
};
const removeFromList = async (args) => {
const cred = String(args[0] ?? "");
const listId = String(args[1] ?? "");
const contactIds = args[2];
if (listId === "") {
return errorReturn("List ID required.", "validation_failed");
}
const idsCsv = Array.isArray(contactIds)
? contactIds.map((v) => String(v)).join(",")
: String(contactIds ?? "");
if (idsCsv === "") {
return errorReturn("Contact IDs required.", "validation_failed");
}
return (await callJson(cred, "DELETE", `marketing/lists/${listId}/contacts?contact_ids=${encodeURIComponent(idsCsv)}`));
};
const getStats = async (args) => {
const cred = String(args[0] ?? "");
const opts = (isPlainObject(args[1]) ? args[1] : {});
if (!opts.start_date) {
return errorReturn("`start_date` is required (YYYY-MM-DD).", "validation_failed");
}
const params = new URLSearchParams();
if (opts.start_date !== undefined && opts.start_date !== "") {
params.set("start_date", String(opts.start_date));
}
if (opts.end_date !== undefined && opts.end_date !== "") {
params.set("end_date", String(opts.end_date));
}
if (opts.aggregated_by !== undefined && opts.aggregated_by !== "") {
params.set("aggregated_by", String(opts.aggregated_by));
}
if (Array.isArray(opts.categories) && opts.categories.length > 0) {
params.set("categories", opts.categories.map((v) => String(v)).join(","));
}
return (await callJson(cred, "GET", `stats?${params.toString()}`));
};
// ── Exports: functions map ─────────────────────────────────────────────
export const SendgridFunctions = {
sendEmail,
sendTemplate,
addContact,
removeContact,
listContacts,
createList,
addToList,
removeFromList,
getStats,
};
// ── Exports: credential types ──────────────────────────────────────────
export const SendgridCredentialTypes = [
{
slug: CREDENTIAL_TYPE,
title: "SendGrid",
icon: "mail",
fields: [
{
name: "api_key",
title: "API Key",
type: "password",
required: true,
placeholder: "SG.…",
description: "Create one at app.sendgrid.com → Settings → API Keys. Needs at least Mail Send + Marketing scopes.",
pattern: "^SG\\.",
},
],
},
];
// ── Shared parameter metadata ──────────────────────────────────────────
const credentialParam = {
name: "credential",
title: "Credential",
description: "Slug of a saved `sendgrid` credential.",
dataType: "string",
formInputType: "resource",
required: true,
allowExpression: true,
placeholder: "my_sendgrid",
resource: {
type: "credential",
listFn: "credential.list",
modes: ["list", "expression"],
searchable: true,
filter: { type: CREDENTIAL_TYPE },
},
};
const listIdParam = {
name: "listId",
title: "List",
description: "SendGrid List ID (UUID).",
dataType: "string",
formInputType: "resource",
required: true,
allowExpression: true,
placeholder: "abc123-…",
};
const commonErrors = {
credential_not_found: "No credential with that slug exists in the vault.",
api_key_missing: "The credential exists but has no `api_key` field.",
transport: "Network failure calling api.sendgrid.com.",
sendgrid_error: "SendGrid returned an error — see `sendgrid_error.errors`.",
rate_limited: "SendGrid rate limited the request.",
};
// ── Exports: function metadata ─────────────────────────────────────────
export const SendgridFunctionMetadata = {
// ── Send ──────────────────────────────────────────────────
sendEmail: {
title: "Send email",
summary: "Send a transactional email via the Mail Send v3 API",
description: "Calls `/mail/send`. Sends an email immediately. For high-volume marketing, use `sendTemplate` with a saved dynamic template instead.",
group: "send",
action: "write",
icon: "send",
capability: "manage_options",
sideEffects: ["makes_http_call", "sends_email"],
idempotent: false,
since: "1.0.0",
tags: ["sendgrid", "email", "send", "transactional"],
parameters: [
credentialParam,
{
name: "fields",
title: "Fields",
description: "Email fields. Required: `to`, `from`, `subject`, and one of `text`/`html`. Common shape:\n to : 'a@b.com' OR ['a@b.com','c@d.com'] OR [{email,name},…]\n from : 'sender@b.com' OR {email, name}\n reply_to : 'reply@b.com' OR {email, name}\n subject : string\n text : plain-text body\n html : HTML body\n cc, bcc : same shapes as `to`\n attachments : [{content (base64), type, filename, disposition?}]\n categories : ['signup','newsletter'] — for stats grouping\n custom_args : {…} — appears in webhook events\n send_at : Unix timestamp to schedule\n asm : { group_id, groups_to_display? } — unsubscribe groups\n tracking_settings : { click_tracking: {enable:true}, open_tracking: {enable:true} }",
dataType: "object",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 8,
placeholder: '{\n "to": "customer@example.com",\n "from": "hello@yourbrand.com",\n "subject": "Welcome",\n "html": "<p>Thanks for signing up!</p>"\n}',
},
],
returnType: "object",
returnDescription: "{ ok: bool, status: int, message_id?: string } — message_id from the X-Message-Id header.",
errors: commonErrors,
examples: [
{
title: "Welcome email",
code: 'sendgrid.sendEmail "my_sendgrid" {\n to: {{ user.email }},\n from: "hello@brand.com",\n subject: "Welcome to Brand",\n html: "<h1>Hi {{ user.name }}</h1><p>Glad you\'re here.</p>"\n}',
},
],
example: 'sendgrid.sendEmail "my_sendgrid" {to:"a@b", from:"x@y", subject:"hi", text:"hello"}',
},
sendTemplate: {
title: "Send dynamic template",
summary: "Send via a saved SendGrid dynamic template with substitutions",
description: "Same as `sendEmail` but adds `template_id` and `dynamic_template_data`. Designs live in SendGrid; you supply the data and recipient.",
group: "send",
action: "write",
icon: "mail-plus",
capability: "manage_options",
sideEffects: ["makes_http_call", "sends_email"],
idempotent: false,
since: "1.0.0",
tags: ["sendgrid", "template", "dynamic"],
parameters: [
credentialParam,
{
name: "fields",
title: "Fields",
description: "Required keys:\n to : recipient (same shapes as sendEmail)\n from : sender\n template_id : 'd-…'\n dynamic_template_data: {…} — substitutions referenced in the template\n\nOptional: subject (overrides template), reply_to, cc, bcc, attachments, categories, send_at, asm, tracking_settings.",
dataType: "object",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 8,
},
],
returnType: "object",
errors: commonErrors,
example: 'sendgrid.sendTemplate "my_sendgrid" {to:"a@b", from:"x@y", template_id:"d-…", dynamic_template_data:{name:"Ada"}}',
},
// ── Contacts ──────────────────────────────────────────────
addContact: {
title: "Add or update contact",
summary: "Upsert a marketing contact (and optionally subscribe to lists)",
description: "Calls `PUT /marketing/contacts`. Asynchronous — returns a `job_id`. The contact is matched by email address.",
group: "contacts",
action: "write",
icon: "user-plus",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "contact", "marketing"],
parameters: [
credentialParam,
{
name: "fields",
title: "Fields",
description: "Recognized keys:\n email : required\n first_name, last_name, alternate_emails, address_line_1/2, city, state_province_region, country, postal_code, phone_number\n custom_fields : { id_a1b2: 'value', … }",
dataType: "object",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 6,
},
{
name: "listIds",
title: "List IDs",
description: "Optional list IDs to also subscribe the contact to.",
dataType: "array",
formInputType: "json",
required: false,
allowExpression: true,
language: "json",
rows: 3,
},
],
returnType: "object",
returnDescription: "{ job_id: string }",
errors: commonErrors,
examples: [
{
title: "Subscribe form submitter",
code: 'sendgrid.addContact "my_sendgrid" {email: {{ form.email }}, first_name: {{ form.name }}} ["abc-list-id"]',
},
],
example: 'sendgrid.addContact "my_sendgrid" {email:"a@b.com"}',
},
removeContact: {
title: "Delete contacts",
summary: "Remove one or more contacts entirely",
description: "Calls `DELETE /marketing/contacts?ids=…`. Permanent. To remove from a list without deleting the contact, use `removeFromList`.",
group: "contacts",
action: "delete",
icon: "trash-2",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "contact", "delete"],
parameters: [
credentialParam,
{
name: "contactIds",
title: "Contact IDs",
description: "Comma-separated string OR array of contact IDs.",
dataType: "any",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 3,
},
],
returnType: "object",
errors: commonErrors,
example: 'sendgrid.removeContact "my_sendgrid" ["abc","def"]',
},
listContacts: {
title: "List contacts",
summary: "List marketing contacts (paginated)",
description: "Calls `GET /marketing/contacts`. Returns up to 50 contacts per page.",
group: "contacts",
action: "query",
icon: "list",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "contact", "list"],
parameters: [
credentialParam,
{
name: "options",
title: "Options",
description: "Recognized keys:\n page_size : default 50, max 50\n page_token: pagination cursor",
dataType: "object",
formInputType: "json",
required: false,
allowExpression: true,
language: "json",
rows: 3,
advanced: true,
},
],
returnType: "object",
returnDescription: "{ result: [], _metadata: { next: …, prev: … } }",
errors: commonErrors,
example: 'sendgrid.listContacts "my_sendgrid"',
},
// ── Lists ─────────────────────────────────────────────────
createList: {
title: "Create list",
summary: "Create a new marketing list",
description: "Calls `POST /marketing/lists`.",
group: "lists",
action: "write",
icon: "folder-plus",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: false,
since: "1.0.0",
tags: ["sendgrid", "list", "audience"],
parameters: [
credentialParam,
{
name: "name",
title: "Name",
description: "List name (max 100 chars).",
dataType: "string",
formInputType: "text",
required: true,
allowExpression: true,
placeholder: "Newsletter subscribers",
},
],
returnType: "object",
returnDescription: "{ id, name, contact_count }",
errors: commonErrors,
example: 'sendgrid.createList "my_sendgrid" "Newsletter"',
},
addToList: {
title: "Add contacts to list",
summary: "Subscribe one or more contact emails to a list",
description: "Calls `PUT /marketing/contacts` with `list_ids: [listId]`. Async — returns a `job_id`.",
group: "lists",
action: "write",
icon: "user-plus",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "list", "subscribe"],
parameters: [
credentialParam,
listIdParam,
{
name: "contacts",
title: "Contacts",
description: "Array of `{email, first_name?, last_name?}` objects. The contact is upserted.",
dataType: "array",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 5,
},
],
returnType: "object",
errors: commonErrors,
example: 'sendgrid.addToList "my_sendgrid" "list-uuid" [{email:"a@b.com"}]',
},
removeFromList: {
title: "Remove from list",
summary: "Unsubscribe contacts from a list (without deleting them)",
description: "Calls `DELETE /marketing/lists/{listId}/contacts?contact_ids=…`. Contacts remain in your account; just removed from this list.",
group: "lists",
action: "delete",
icon: "user-minus",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "list", "unsubscribe"],
parameters: [
credentialParam,
listIdParam,
{
name: "contactIds",
title: "Contact IDs",
description: "Comma-separated string OR array of contact IDs.",
dataType: "any",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 3,
},
],
returnType: "object",
errors: commonErrors,
example: 'sendgrid.removeFromList "my_sendgrid" "list-uuid" ["contact-id"]',
},
// ── Reports ───────────────────────────────────────────────
getStats: {
title: "Get email stats",
summary: "Aggregated delivery stats over a date range",
description: "Calls `GET /stats`. Returns daily breakdown of opens, clicks, bounces, etc.",
group: "reports",
action: "read",
icon: "bar-chart-3",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["sendgrid", "stats", "reports"],
parameters: [
credentialParam,
{
name: "options",
title: "Options",
description: "Recognized keys:\n start_date : YYYY-MM-DD (required)\n end_date : YYYY-MM-DD\n aggregated_by : 'day' (default) | 'week' | 'month'\n categories : array of categories to filter",
dataType: "object",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 4,
},
],
returnType: "array",
returnDescription: "Array of `{ date, stats: [{metrics: {…}}] }` entries.",
errors: commonErrors,
example: 'sendgrid.getStats "my_sendgrid" {start_date:"2026-04-01"}',
},
};
// ── Exports: module metadata ───────────────────────────────────────────
export const SendgridModuleMetadata = {
slug: "sendgrid",
title: "SendGrid",
summary: "Transactional email (Mail Send v3) + marketing contacts, lists, templates, stats",
description: "Use SendGrid when `wp_mail` isn't enough — high deliverability, click tracking, dynamic templates, dedicated IPs.\n\nFor transactional sends, use `sendEmail` (raw HTML/text) or `sendTemplate` (SendGrid dynamic template with substitutions). For newsletters, use `addContact` + lists. `getStats` returns delivery/open/click metrics.",
category: "marketing",
icon: "icon.svg",
color: "#1A82E2",
version: "0.2.0",
docsUrl: "https://docs.robinpath.com/modules/sendgrid",
status: "stable",
requires: [],
minNodeVersion: "18.0.0",
credentialsType: CREDENTIAL_TYPE,
operationGroups: {
send: {
title: "Send",
description: "Transactional email + dynamic templates.",
order: 1,
},
contacts: {
title: "Contacts",
description: "Marketing contacts CRUD.",
order: 2,
},
lists: {
title: "Lists",
description: "Audience segmentation.",
order: 3,
},
reports: {
title: "Reports",
description: "Aggregated stats.",
order: 4,
},
},
methods: Object.keys(SendgridFunctions),
};
//# sourceMappingURL=sendgrid.js.map
{"version":3,"file":"sendgrid.js","sourceRoot":"","sources":["../src/sendgrid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAWH,2EAA2E;AAE3E,MAAM,KAAK,GAA0B,EAAE,CAAC;AAExC,SAAS,IAAI;IACX,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,6GAA6G,CAC9G,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,iBAAiB,CAAC,CAAa;IAC7C,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,0EAA0E;AAE1E,MAAM,QAAQ,GAAG,8BAA8B,CAAC;AAChD,MAAM,eAAe,GAAG,UAAU,CAAC;AAWnC,SAAS,WAAW,CAClB,KAAa,EACb,IAAY,EACZ,QAAiC,EAAE;IAEnC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAiB,CAAC;AAClD,CAAC;AAED,0EAA0E;AAE1E,KAAK,UAAU,aAAa,CAC1B,cAAsB;IAEtB,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,WAAW,CAAC,8BAA8B,EAAE,sBA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AAE,CAAC;SACT;QACD,OAAO,EAAE;YACP,KAAK,EAAE,SAAS;YAChB,WAAW,EAAE,mBAAmB;YAChC,KAAK,EAAE,CAAC;SACT;KACF;IACD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,iBAAiB,CAAC;CACxC,CAAC"}
+19
-8
{
"name": "@robinpath/sendgrid",
"version": "0.1.1",
"version": "0.3.0",
"publishConfig": {

@@ -23,12 +23,17 @@ "access": "public"

"peerDependencies": {
"@robinpath/core": ">=0.20.0"
"@robinpath/core": ">=0.40.0"
},
"devDependencies": {
"@robinpath/core": "^0.30.1",
"@robinpath/core": "^0.40.0",
"typescript": "^5.6.0"
},
"description": "SendGrid module for RobinPath.",
"description": "SendGrid transactional email + marketing — send mail, dynamic templates, contact + list management, stats. Uses the encrypted credential vault for API keys.",
"keywords": [
"sendgrid",
"email marketing"
"email marketing",
"email",
"transactional",
"marketing",
"newsletter",
"smtp"
],

@@ -38,7 +43,13 @@ "license": "MIT",

"category": "email-marketing",
"type": "integration",
"auth": "api-key",
"type": "module",
"auth": "credential-vault",
"functionCount": 20,
"baseUrl": "https://api.sendgrid.com/v3"
"baseUrl": "https://api.sendgrid.com/v3",
"language": "nodejs",
"platforms": [
"cloud",
"cli",
"desktop"
]
}
}

@@ -22,3 +22,3 @@ # @robinpath/sendgrid

```bash
npm install @robinpath/sendgrid
robinpath add @robinpath/sendgrid
```

@@ -25,0 +25,0 @@