yirlo 1.3.19 → 1.3.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/yirlo.js +2 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yirlo",
3
- "version": "1.3.19",
3
+ "version": "1.3.21",
4
4
  "description": "Yirlo SDK, MCP server and terminal dashboard: run your AI cold email outreach (projects, campaigns, inbox, hot leads, budgets) from code, an AI agent or your terminal.",
5
5
  "type": "module",
6
6
  "main": "yirlo.js",
package/yirlo.js CHANGED
@@ -4,7 +4,7 @@
4
4
  // Another address (a test server): new Yirlo(key, { baseUrl: "https://..." }), or set YIRLO_BASE in the environment. The default is https://yirlo.com.
5
5
  export class YirloError extends Error { constructor(status, body) { super((body && body.detail) || `HTTP ${status}`); this.status = status; this.body = body; } }
6
6
  export class Yirlo {
7
- constructor(apiKey, { baseUrl = (typeof process !== "undefined" && process.env && process.env.YIRLO_BASE) || "https://yirlo.com" } = {}) { if (!apiKey) throw new Error("Pass your Yirlo API key (make one in the Yirlo app: Connect your other apps > API > Create API key)"); this.apiKey = apiKey; this.baseUrl = baseUrl.replace(/\/$/, ""); }
7
+ constructor(apiKey, { baseUrl = (typeof process !== "undefined" && process.env && process.env.YIRLO_BASE) || "https://yirlo.com" } = {}) { if (!apiKey) throw new Error("Pass your Yirlo API key (make one in the Yirlo app: Apps and API > API > Create API key)"); this.apiKey = apiKey; this.baseUrl = baseUrl.replace(/\/$/, ""); }
8
8
  async request(method, path, { query, body, headers } = {}) {
9
9
  const qs = query && Object.keys(query).length ? "?" + new URLSearchParams(Object.entries(query).filter(([, v]) => v != null)) : "";
10
10
  if (!path.startsWith("/public/") && !path.startsWith("/px/")) path = "/public/api/v1" + path;
@@ -53,7 +53,7 @@ export class Yirlo {
53
53
  updateProjectMyCopy(args = {}) { return this._call("PATCH", "/public/api/v1/agentapp/projects/{project_id}/my-copy", args, {"project_id": "path", "mode": "body"}, ["project_id"], "update_project_my_copy", []); }
54
54
  /** Approve campaign lead list. Arguments: campaign_id. */
55
55
  approveCampaign(args = {}) { return this._call("POST", "/public/api/v1/agentapp/campaigns/{campaign_id}/approve", args, {"campaign_id": "path"}, ["campaign_id"], "approve_campaign", []); }
56
- /** Create a campaign from your own leads (up to 30,000). Each lead needs email, first_name, last_name, company_domain and job_title (linkedin_url optional). Answers with a task_id; check it with get_import. Every lead is emailed only after its address passes the email check. Arguments: project_id, name, leads, instructions?. */
56
+ /** Create a campaign from your own leads (up to 30,000). Each lead needs an email; first_name, last_name, company_domain, job_title and linkedin_url are optional. Answers with a task_id; check it with get_import. Every lead is emailed only after its address passes the email check. Arguments: project_id, name, leads, instructions?. */
57
57
  importLeads(args = {}) { return this._call("POST", "/public/api/v1/agentapp/campaigns/import", args, {"project_id": "body", "name": "body", "leads": "body", "instructions": "body"}, ["project_id", "name", "leads"], "import_leads", []); }
58
58
  /** Status and result of import_leads: pending, completed (with campaign_id and counts) or failed. Arguments: task_id. */
59
59
  getImport(args = {}) { return this._call("GET", "/public/api/v1/agentapp/campaigns/import/{task_id}", args, {"task_id": "path"}, ["task_id"], "get_import", []); }