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

@robinpath/zoho

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/zoho - 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 ZohoModule: ModuleAdapter;
export default ZohoModule;
export { ZohoModule };
export { ZohoFunctions, ZohoFunctionMetadata, ZohoModuleMetadata, ZohoCredentialTypes, } from "./zoho.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,UAAU,EAAE,aAQjB,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,WAAW,CAAC"}
import { ZohoFunctions, ZohoFunctionMetadata, ZohoModuleMetadata, ZohoCredentialTypes, configureZoho, } from "./zoho.js";
const ZohoModule = {
name: "zoho",
functions: ZohoFunctions,
functionMetadata: ZohoFunctionMetadata,
moduleMetadata: ZohoModuleMetadata,
credentialTypes: ZohoCredentialTypes,
configure: configureZoho,
global: false,
};
export default ZohoModule;
export { ZohoModule };
export { ZohoFunctions, ZohoFunctionMetadata, ZohoModuleMetadata, ZohoCredentialTypes, } from "./zoho.js";
//# sourceMappingURL=index.js.map
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,aAAa,GACd,MAAM,WAAW,CAAC;AAEnB,MAAM,UAAU,GAAkB;IAChC,IAAI,EAAE,MAAM;IACZ,SAAS,EAAE,aAAa;IACxB,gBAAgB,EAAE,oBAAoB;IACtC,cAAc,EAAE,kBAAkB;IAClC,eAAe,EAAE,mBAAmB;IACpC,SAAS,EAAE,aAAa;IACxB,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,eAAe,UAAU,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,CAAC;AACtB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,WAAW,CAAC"}
/**
* RobinPath Zoho CRM Module (Node port)
*
* Zoho CRM API v2 — modules, records. Mirror of the canonical
* credential-vault adapter shape so the visual editor renders it
* identically to every other module.
*
* Authentication is OAuth 2.0 with per-region data centers. The stored
* credential carries `client_id`, `client_secret`, `access_token`,
* `refresh_token`, and an optional `api_domain` that pins the regional
* base. Zoho's consent flow returns both `api_domain`
* (e.g. `https://www.zohoapis.com` for US, `https://www.zohoapis.eu`
* for EU) and `accounts-server` URLs; if `api_domain` is present the
* module uses it verbatim for every API call AND for refresh
* (`<api_domain>/oauth/v2/token`). Without it, we fall back to the
* global `zohoapis.com` + `accounts.zoho.com`.
*
* On 401 the module posts to `<api_domain>/oauth/v2/token` and writes
* the rotated access token back to the vault before retrying once.
* Zoho does NOT rotate refresh tokens on refresh.
*
* Credential type declared by this module:
* - zoho : { client_id, client_secret, access_token, refresh_token, api_domain? }
*/
import type { BuiltinHandler, CredentialTypeSchema, FunctionMetadata, ModuleHost, ModuleMetadata } from "@robinpath/core";
export declare function configureZoho(h: ModuleHost): void;
export declare const ZohoFunctions: Record<string, BuiltinHandler>;
export declare const ZohoCredentialTypes: CredentialTypeSchema[];
export declare const ZohoFunctionMetadata: Record<string, FunctionMetadata>;
export declare const ZohoModuleMetadata: ModuleMetadata;
//# sourceMappingURL=zoho.d.ts.map
{"version":3,"file":"zoho.d.ts","sourceRoot":"","sources":["../src/zoho.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,UAAU,EACV,cAAc,EAEf,MAAM,iBAAiB,CAAC;AAezB,wBAAgB,aAAa,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI,CAEjD;AAgbD,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAKxD,CAAC;AAIF,eAAO,MAAM,mBAAmB,EAAE,oBAAoB,EAoDrD,CAAC;AAsDF,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CA6IjE,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,cAqBhC,CAAC"}
/**
* RobinPath Zoho CRM Module (Node port)
*
* Zoho CRM API v2 — modules, records. Mirror of the canonical
* credential-vault adapter shape so the visual editor renders it
* identically to every other module.
*
* Authentication is OAuth 2.0 with per-region data centers. The stored
* credential carries `client_id`, `client_secret`, `access_token`,
* `refresh_token`, and an optional `api_domain` that pins the regional
* base. Zoho's consent flow returns both `api_domain`
* (e.g. `https://www.zohoapis.com` for US, `https://www.zohoapis.eu`
* for EU) and `accounts-server` URLs; if `api_domain` is present the
* module uses it verbatim for every API call AND for refresh
* (`<api_domain>/oauth/v2/token`). Without it, we fall back to the
* global `zohoapis.com` + `accounts.zoho.com`.
*
* On 401 the module posts to `<api_domain>/oauth/v2/token` and writes
* the rotated access token back to the vault before retrying once.
* Zoho does NOT rotate refresh tokens on refresh.
*
* Credential type declared by this module:
* - zoho : { client_id, client_secret, access_token, refresh_token, api_domain? }
*/
// ── Module-local state (populated by configure hook) ────────────────────
const state = {};
function host() {
if (!state.host) {
throw new Error("Zoho module not initialized. Pass the adapter to rp.installModule() so its configure() hook runs first.");
}
return state.host;
}
export function configureZoho(h) {
state.host = h;
}
// ── Constants ──────────────────────────────────────────────────────────
const DEFAULT_API_DOMAIN = "https://www.zohoapis.com";
const API_PATH = "/crm/v2/";
const CREDENTIAL_TYPE = "zoho";
function errorReturn(error, code, extra = {}) {
return { error, code, ...extra };
}
function isErr(x) {
return (typeof x === "object" &&
x !== null &&
"error" in x &&
"code" in x);
}
async function readCredential(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");
}
return fields;
}
function requireCredentialFields(slug, fields) {
const clientId = String(fields.client_id ?? "");
const clientSecret = String(fields.client_secret ?? "");
const accessToken = String(fields.access_token ?? "");
const refreshToken = String(fields.refresh_token ?? "");
const rawDomain = String(fields.api_domain ?? "").trim();
const apiDomain = rawDomain !== "" ? rawDomain.replace(/\/+$/, "") : DEFAULT_API_DOMAIN;
if (!clientId) {
return errorReturn("Credential has no `client_id` field.", "client_id_missing");
}
if (!clientSecret) {
return errorReturn("Credential has no `client_secret` field.", "client_secret_missing");
}
if (!accessToken) {
return errorReturn("Credential has no `access_token` field.", "access_token_missing");
}
if (!refreshToken) {
return errorReturn("Credential has no `refresh_token` field.", "refresh_token_missing");
}
return {
slug,
clientId,
clientSecret,
accessToken,
refreshToken,
apiDomain,
};
}
async function persistTokens(slug, fields, patch) {
try {
await host().credentials.set(slug, CREDENTIAL_TYPE, { ...fields, ...patch });
}
catch {
// Best-effort.
}
}
// ── OAuth token refresh ────────────────────────────────────────────────
async function refreshAccessToken(resolved, originalFields) {
const body = new URLSearchParams();
body.set("grant_type", "refresh_token");
body.set("refresh_token", resolved.refreshToken);
body.set("client_id", resolved.clientId);
body.set("client_secret", resolved.clientSecret);
// Zoho refresh lives at <api_domain>/oauth/v2/token — same regional root.
const tokenUrl = `${resolved.apiDomain}/oauth/v2/token`;
let response;
try {
response = await fetch(tokenUrl, {
method: "POST",
headers: {
"Content-Type": "application/x-www-form-urlencoded",
Accept: "application/json",
},
body: body.toString(),
});
}
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) {
return errorReturn("Zoho refused the refresh token — re-authorize the connection.", "refresh_failed", { status: response.status, zoho_error: decoded });
}
const tok = (decoded ?? {});
const newAccess = String(tok.access_token ?? "");
// Zoho does NOT rotate refresh tokens; keep the existing one.
if (!newAccess) {
return errorReturn("Refresh response had no `access_token`.", "refresh_failed", { zoho_error: decoded });
}
// Zoho may echo `api_domain` — honor it if present.
const returnedDomain = String(tok.api_domain ?? "").trim();
const newDomain = returnedDomain !== ""
? returnedDomain.replace(/\/+$/, "")
: resolved.apiDomain;
const patch = { access_token: newAccess };
if (returnedDomain !== "")
patch.api_domain = newDomain;
await persistTokens(resolved.slug, originalFields, patch);
return { ...resolved, accessToken: newAccess, apiDomain: newDomain };
}
// ── HTTP helper with single-shot 401 refresh-and-retry ─────────────────
async function request(resolved, method, pathAndQuery, body) {
const url = resolved.apiDomain + API_PATH + pathAndQuery.replace(/^\/+/, "");
const headers = {
// NOTE: Zoho uses `Zoho-oauthtoken <token>`, NOT `Bearer`.
Authorization: `Zoho-oauthtoken ${resolved.accessToken}`,
Accept: "application/json",
};
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(url, 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 };
}
return { status: response.status, decoded, raw };
}
/**
* Zoho returns `INVALID_TOKEN` as a 401 body with a successful-looking
* top-level structure. Treat either a 401 status OR the sentinel code
* as "refresh needed".
*/
function isAuthError(resp) {
if (resp.status === 401)
return true;
if (resp.decoded &&
typeof resp.decoded === "object" &&
"code" in resp.decoded) {
const c = String(resp.decoded.code ?? "");
if (c === "INVALID_TOKEN" || c === "AUTHENTICATION_FAILURE")
return true;
}
return false;
}
async function http(credentialSlug, method, pathAndQuery, body) {
const fields = await readCredential(credentialSlug);
if (isErr(fields))
return fields;
let resolved = requireCredentialFields(credentialSlug, fields);
if (isErr(resolved))
return resolved;
let originalFields = fields;
let response = await request(resolved, method, pathAndQuery, body);
if (isErr(response))
return response;
if (isAuthError(response)) {
const refreshed = await refreshAccessToken(resolved, originalFields);
if (isErr(refreshed))
return refreshed;
resolved = refreshed;
originalFields = {
...originalFields,
access_token: refreshed.accessToken,
api_domain: refreshed.apiDomain,
};
response = await request(resolved, method, pathAndQuery, body);
if (isErr(response))
return response;
}
if (response.status >= 200 && response.status < 300) {
return response.decoded ?? { ok: true };
}
// Zoho errors: { code, details: {...}, message, status } or { data: [{ code, message, status }] }
let message = `Zoho returned HTTP ${response.status}.`;
const d = response.decoded;
if (d && typeof d === "object") {
const obj = d;
if (typeof obj.message === "string")
message = obj.message;
else if (Array.isArray(obj.data) && obj.data.length > 0) {
const first = obj.data[0];
if (typeof first.message === "string")
message = first.message;
}
}
let code = "zoho_error";
if (response.status === 429)
code = "rate_limited";
else if (response.status === 404)
code = "not_found";
else if (response.status === 403 || response.status === 401)
code = "unauthorized";
return errorReturn(message, code, {
status: response.status,
zoho_error: response.decoded,
});
}
// ── Helpers ────────────────────────────────────────────────────────────
function asString(v) {
if (v === undefined || v === null)
return "";
return String(v);
}
function asOpts(v) {
return v && typeof v === "object" && !Array.isArray(v)
? v
: {};
}
function buildQuery(opts) {
const params = new URLSearchParams();
for (const [k, v] of Object.entries(opts)) {
if (v === undefined || v === null || v === "")
continue;
if (Array.isArray(v)) {
params.set(k, v.map((x) => String(x)).join(","));
}
else {
params.set(k, String(v));
}
}
const qs = params.toString();
return qs ? `?${qs}` : "";
}
/**
* Zoho's write endpoints expect a top-level `{data: [...]}` envelope.
* Normalize single-record inputs and pass-through pre-wrapped envelopes.
*/
function buildWriteBody(input) {
if (input === undefined || input === null) {
return errorReturn("Payload is required.", "fields_missing");
}
if (Array.isArray(input)) {
return { data: input };
}
if (typeof input === "object") {
const obj = input;
if (Array.isArray(obj.data))
return obj;
return { data: [obj] };
}
return errorReturn("Payload must be an object or array.", "fields_missing");
}
// ── Handlers: Modules (schema) ─────────────────────────────────────────
const listModules = async (args) => {
const cred = asString(args[0]);
return (await http(cred, "GET", "settings/modules"));
};
// ── Handlers: Records ──────────────────────────────────────────────────
const listRecords = async (args) => {
const cred = asString(args[0]);
const moduleName = asString(args[1]);
const opts = asOpts(args[2]);
if (!moduleName) {
return errorReturn("`moduleName` is required (e.g. 'Leads', 'Contacts', 'Deals').", "module_missing");
}
const path = `${encodeURIComponent(moduleName)}${buildQuery(opts)}`;
return (await http(cred, "GET", path));
};
const createRecord = async (args) => {
const cred = asString(args[0]);
const moduleName = asString(args[1]);
const input = args[2];
if (!moduleName) {
return errorReturn("`moduleName` is required.", "module_missing");
}
const body = buildWriteBody(input);
if (isErr(body))
return body;
return (await http(cred, "POST", encodeURIComponent(moduleName), body));
};
const updateRecord = async (args) => {
const cred = asString(args[0]);
const moduleName = asString(args[1]);
const recordId = asString(args[2]);
const input = args[3];
if (!moduleName) {
return errorReturn("`moduleName` is required.", "module_missing");
}
if (!recordId) {
return errorReturn("`recordId` is required.", "record_id_missing");
}
const body = buildWriteBody(input);
if (isErr(body))
return body;
const path = `${encodeURIComponent(moduleName)}/${encodeURIComponent(recordId)}`;
return (await http(cred, "PUT", path, body));
};
// ── Exports: functions map ─────────────────────────────────────────────
export const ZohoFunctions = {
listModules,
listRecords,
createRecord,
updateRecord,
};
// ── Exports: credential types ──────────────────────────────────────────
export const ZohoCredentialTypes = [
{
slug: CREDENTIAL_TYPE,
title: "Zoho CRM (OAuth 2.0)",
icon: "briefcase",
fields: [
{
name: "client_id",
title: "Client ID",
type: "text",
required: true,
placeholder: "1000.…",
description: "From your Zoho self-client or server app at api-console.zoho.com.",
},
{
name: "client_secret",
title: "Client Secret",
type: "password",
required: true,
placeholder: "•••••…",
description: "Paired secret for the client id above.",
},
{
name: "access_token",
title: "Access Token",
type: "password",
required: true,
placeholder: "1000.…",
description: "Short-lived bearer token (~1 hour). Obtained via the Zoho OAuth consent flow. The module refreshes this automatically on 401.",
},
{
name: "refresh_token",
title: "Refresh Token",
type: "password",
required: true,
placeholder: "1000.…",
description: "Long-lived refresh token from the same consent flow. Zoho does NOT rotate it on refresh.",
},
{
name: "api_domain",
title: "API Domain",
type: "text",
required: false,
placeholder: "https://www.zohoapis.com",
description: "Regional data center root. Returned by the OAuth flow as `api_domain` (e.g. `https://www.zohoapis.com` for US, `.eu` for EU, `.in` for India, `.com.cn` for China, `.com.au` for AU). Defaults to the US root.",
},
],
},
];
// ── Exports: metadata ──────────────────────────────────────────────────
const credentialParam = {
name: "credential",
title: "Credential",
description: "Slug of a saved `zoho` credential (OAuth client + tokens).",
dataType: "string",
formInputType: "resource",
required: true,
allowExpression: true,
placeholder: "my_zoho",
resource: {
type: "credential",
listFn: "credential.list",
modes: ["list", "expression"],
searchable: true,
filter: { type: CREDENTIAL_TYPE },
},
};
const moduleNameParam = {
name: "moduleName",
title: "Module",
description: "Zoho module API name. Built-ins: Leads, Contacts, Accounts, Deals, Tasks, Events, Calls, Products, Quotes, Invoices, Vendors. Custom modules use their API Name from Setup → Developer Space.",
dataType: "string",
formInputType: "text",
required: true,
allowExpression: true,
placeholder: "Leads",
};
const commonErrors = {
credential_not_found: "No credential with that slug exists in the vault.",
client_id_missing: "The credential exists but has no `client_id` field.",
client_secret_missing: "The credential exists but has no `client_secret` field.",
access_token_missing: "The credential exists but has no `access_token` field.",
refresh_token_missing: "The credential exists but has no `refresh_token` field.",
module_missing: "`moduleName` is required.",
record_id_missing: "`recordId` is required.",
refresh_failed: "Refresh token rejected — run the Zoho OAuth consent flow again to mint a fresh pair.",
fields_missing: "Payload is required.",
transport: "Network failure calling the Zoho API domain.",
zoho_error: "Zoho returned an error — see `zoho_error` for detail.",
rate_limited: "Zoho rate limited the request (per-day and per-minute caps vary by plan).",
not_found: "Record or module not found.",
unauthorized: "Zoho rejected the credential — check the OAuth scopes on your Zoho app.",
};
export const ZohoFunctionMetadata = {
listModules: {
title: "List modules",
summary: "Enumerate CRM modules (entities) visible to this token",
description: "Calls `GET /crm/v2/settings/modules`. Returns both built-in and custom modules with their API names — essential for picker UIs and discovering custom entities.",
group: "schema",
action: "query",
icon: "layers",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["zoho", "schema", "modules"],
parameters: [credentialParam],
returnType: "object",
returnDescription: "{ modules: [{ api_name, singular_label, plural_label, module_name, ... }] }",
errors: commonErrors,
example: 'zoho.listModules "my_zoho"',
},
listRecords: {
title: "List records",
summary: "List records from a module with optional filtering",
description: "Calls `GET /crm/v2/{moduleName}`. Supports per_page/page pagination, field projection, sorting, and scoping to a custom view.",
group: "records",
action: "query",
icon: "list",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["zoho", "records", "list"],
parameters: [
credentialParam,
moduleNameParam,
{
name: "options",
title: "Options",
description: "Recognized keys:\n fields : comma list — projection, e.g. 'Last_Name,Email'\n ids : comma-separated record IDs\n sort_by : field API name\n sort_order : 'asc' | 'desc'\n page : 1-indexed (default 1)\n per_page : 1–200 (default 200)\n cvid : custom view id\n territory_id\n include_child : bool — include records in child territories",
dataType: "object",
formInputType: "json",
required: false,
allowExpression: true,
language: "json",
rows: 5,
advanced: true,
},
],
returnType: "object",
returnDescription: "{ data: [...], info: { per_page, count, page, more_records } }",
errors: commonErrors,
example: 'zoho.listRecords "my_zoho" "Leads" {per_page: 50, sort_by: "Created_Time", sort_order: "desc"}',
},
createRecord: {
title: "Create record(s)",
summary: "Create one or many records in a module",
description: "Calls `POST /crm/v2/{moduleName}`. Accepts a single record object (wrapped automatically), an array of records (bulk — max 100), or a pre-wrapped `{data: [...]}` envelope.",
group: "records",
action: "write",
icon: "plus",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: false,
since: "1.0.0",
tags: ["zoho", "records", "create"],
parameters: [
credentialParam,
moduleNameParam,
{
name: "record",
title: "Record payload",
description: "ONE of:\n • single record object (e.g. for Leads: {Last_Name, Email, Company})\n • array of record objects (bulk, max 100)\n • {data: [...]} — pre-wrapped envelope\n\nLookup fields use the referenced record id as a plain string (e.g. {Account_Name: '4150868000000123456'}) — Zoho resolves it server-side.",
dataType: "any",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 8,
placeholder: '{\n "Last_Name": "Smith",\n "Email": "jane@example.com",\n "Company": "Acme Corp"\n}',
},
],
returnType: "object",
returnDescription: "{ data: [{ code, details: {id, ...}, message, status }] }",
errors: commonErrors,
example: 'zoho.createRecord "my_zoho" "Leads" {Last_Name: "Smith", Email: "jane@acme.com", Company: "Acme"}',
},
updateRecord: {
title: "Update record",
summary: "Partially update a single record",
description: "Calls `PUT /crm/v2/{moduleName}/{recordId}`. Only fields you supply are changed. For bulk updates, call with a pre-wrapped `{data: [{id, …}]}` envelope and omit the recordId.",
group: "records",
action: "write",
icon: "edit-3",
capability: "manage_options",
sideEffects: ["makes_http_call"],
idempotent: true,
since: "1.0.0",
tags: ["zoho", "records", "update"],
parameters: [
credentialParam,
moduleNameParam,
{
name: "recordId",
title: "Record ID",
description: "Zoho record ID (numeric string), e.g. '4150868000000123456'.",
dataType: "string",
formInputType: "text",
required: true,
allowExpression: true,
placeholder: "4150868000000123456",
},
{
name: "fields",
title: "Fields to update",
description: "Object of field API name → new value. Only fields supplied are changed.",
dataType: "object",
formInputType: "json",
required: true,
allowExpression: true,
language: "json",
rows: 6,
placeholder: '{\n "Lead_Status": "Contacted",\n "Description": "Followed up by phone."\n}',
},
],
returnType: "object",
returnDescription: "{ data: [{ code, details: {id, ...}, message, status }] }",
errors: commonErrors,
example: 'zoho.updateRecord "my_zoho" "Leads" "4150868000000123456" {Lead_Status: "Contacted"}',
},
};
export const ZohoModuleMetadata = {
slug: "zoho",
title: "Zoho CRM",
summary: "Read and write Zoho CRM records — leads, contacts, deals, accounts, and custom modules",
description: "Zoho CRM API v2 — module schema and record CRUD. Works with both built-in modules (Leads, Contacts, Accounts, Deals, Tasks, …) and custom modules using their API name.\n\nAuth is OAuth 2.0 with per-region data centers. The credential stores `client_id`, `client_secret`, an access token, and a long-lived refresh token; set `api_domain` to the regional root returned by consent (`https://www.zohoapis.com`, `.eu`, `.in`, `.com.cn`, `.com.au`). On 401 the module refreshes at `<api_domain>/oauth/v2/token` and retries once. Note that Zoho uses `Authorization: Zoho-oauthtoken <token>`, not `Bearer`.\n\nFor operations not covered here (bulk APIs, related lists, attachments, blueprint, COQL queries) drop to `http.*` with the same credential via `credential.field`.",
category: "crm",
icon: "icon.svg",
color: "#E42527",
version: "0.2.0",
docsUrl: "https://docs.robinpath.com/modules/zoho",
status: "stable",
requires: [],
minNodeVersion: "18.0.0",
credentialsType: CREDENTIAL_TYPE,
operationGroups: {
schema: { title: "Schema", description: "Module discovery.", order: 1 },
records: { title: "Records", description: "Record CRUD.", order: 2 },
},
methods: Object.keys(ZohoFunctions),
};
//# sourceMappingURL=zoho.js.map
{"version":3,"file":"zoho.js","sourceRoot":"","sources":["../src/zoho.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,2EAA2E;AAE3E,MAAM,KAAK,GAA0B,EAAE,CAAC;AAExC,SAAS,IAAI;IACX,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;QAChB,MAAM,IAAI,KAAK,CACb,yGAAyG,CAC1G,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,CAAa;IACzC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;AACjB,CAAC;AAED,0EAA0E;AAE1E,MAAM,kBAAkB,GAAG,0BAA0B,CAAC;AACtD,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,eAAe,GAA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,QAAQ;IACxB,eAAe,EAAE,eAAe;IAChC,eAAe,EAAE;QACf,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,mBAAmB,EAAE,KAAK,EAAE,CAAC,EAAE;QACvE,OAAO,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,EAAE;KACrE;IACD,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;CACpC,CAAC"}
+19
-9
{
"name": "@robinpath/zoho",
"version": "0.1.1",
"version": "0.3.0",
"publishConfig": {

@@ -23,12 +23,15 @@ "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": "Zoho module for RobinPath.",
"description": "Zoho CRM API v2 — modules and record CRUD. OAuth 2.0 with per-region data centers and auto-refresh via the encrypted credential vault.",
"keywords": [
"zoho",
"crm"
"crm",
"leads",
"contacts",
"deals"
],

@@ -38,7 +41,14 @@ "license": "MIT",

"category": "crm",
"type": "integration",
"auth": "api-key",
"functionCount": 21,
"baseUrl": "https://www.zohoapis.com"
"type": "module",
"auth": "credential-vault",
"credentialType": "zoho",
"functionCount": 4,
"baseUrl": "https://www.zohoapis.com/crm/v2",
"language": "nodejs",
"platforms": [
"cloud",
"cli",
"desktop"
]
}
}

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

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

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