@general-input/cli 0.12.0 → 0.13.0
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.
- package/dist/cli.js +954 -841
- package/dist/cli.js.map +1 -1
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -2217,17 +2217,17 @@ var require_cipherModes = __commonJS({
|
|
|
2217
2217
|
}
|
|
2218
2218
|
};
|
|
2219
2219
|
modes.gcm.prototype.tableMultiply = function(x) {
|
|
2220
|
-
var
|
|
2220
|
+
var z52 = [0, 0, 0, 0];
|
|
2221
2221
|
for (var i = 0; i < 32; ++i) {
|
|
2222
2222
|
var idx = i / 8 | 0;
|
|
2223
2223
|
var x_i = x[idx] >>> (7 - i % 8) * 4 & 15;
|
|
2224
2224
|
var ah = this._m[i][x_i];
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2225
|
+
z52[0] ^= ah[0];
|
|
2226
|
+
z52[1] ^= ah[1];
|
|
2227
|
+
z52[2] ^= ah[2];
|
|
2228
|
+
z52[3] ^= ah[3];
|
|
2229
2229
|
}
|
|
2230
|
-
return
|
|
2230
|
+
return z52;
|
|
2231
2231
|
};
|
|
2232
2232
|
modes.gcm.prototype.ghash = function(h, y, x) {
|
|
2233
2233
|
y[0] ^= x[0];
|
|
@@ -5972,26 +5972,26 @@ var require_jsbn = __commonJS({
|
|
|
5972
5972
|
function bnpIsEven() {
|
|
5973
5973
|
return (this.t > 0 ? this.data[0] & 1 : this.s) == 0;
|
|
5974
5974
|
}
|
|
5975
|
-
function bnpExp(e,
|
|
5975
|
+
function bnpExp(e, z52) {
|
|
5976
5976
|
if (e > 4294967295 || e < 1) return BigInteger.ONE;
|
|
5977
|
-
var r = nbi(), r2 = nbi(), g =
|
|
5977
|
+
var r = nbi(), r2 = nbi(), g = z52.convert(this), i = nbits(e) - 1;
|
|
5978
5978
|
g.copyTo(r);
|
|
5979
5979
|
while (--i >= 0) {
|
|
5980
|
-
|
|
5981
|
-
if ((e & 1 << i) > 0)
|
|
5980
|
+
z52.sqrTo(r, r2);
|
|
5981
|
+
if ((e & 1 << i) > 0) z52.mulTo(r2, g, r);
|
|
5982
5982
|
else {
|
|
5983
5983
|
var t = r;
|
|
5984
5984
|
r = r2;
|
|
5985
5985
|
r2 = t;
|
|
5986
5986
|
}
|
|
5987
5987
|
}
|
|
5988
|
-
return
|
|
5988
|
+
return z52.revert(r);
|
|
5989
5989
|
}
|
|
5990
5990
|
function bnModPowInt(e, m) {
|
|
5991
|
-
var
|
|
5992
|
-
if (e < 256 || m.isEven())
|
|
5993
|
-
else
|
|
5994
|
-
return this.exp(e,
|
|
5991
|
+
var z52;
|
|
5992
|
+
if (e < 256 || m.isEven()) z52 = new Classic(m);
|
|
5993
|
+
else z52 = new Montgomery(m);
|
|
5994
|
+
return this.exp(e, z52);
|
|
5995
5995
|
}
|
|
5996
5996
|
BigInteger.prototype.copyTo = bnpCopyTo;
|
|
5997
5997
|
BigInteger.prototype.fromInt = bnpFromInt;
|
|
@@ -6049,13 +6049,13 @@ var require_jsbn = __commonJS({
|
|
|
6049
6049
|
if (this.signum() == 0 || b < 2 || b > 36) return "0";
|
|
6050
6050
|
var cs = this.chunkSize(b);
|
|
6051
6051
|
var a = Math.pow(b, cs);
|
|
6052
|
-
var d = nbv(a), y = nbi(),
|
|
6053
|
-
this.divRemTo(d, y,
|
|
6052
|
+
var d = nbv(a), y = nbi(), z52 = nbi(), r = "";
|
|
6053
|
+
this.divRemTo(d, y, z52);
|
|
6054
6054
|
while (y.signum() > 0) {
|
|
6055
|
-
r = (a +
|
|
6056
|
-
y.divRemTo(d, y,
|
|
6055
|
+
r = (a + z52.intValue()).toString(b).substr(1) + r;
|
|
6056
|
+
y.divRemTo(d, y, z52);
|
|
6057
6057
|
}
|
|
6058
|
-
return
|
|
6058
|
+
return z52.intValue().toString(b) + r;
|
|
6059
6059
|
}
|
|
6060
6060
|
function bnpFromRadix(s, b) {
|
|
6061
6061
|
this.fromInt(0);
|
|
@@ -6428,7 +6428,7 @@ var require_jsbn = __commonJS({
|
|
|
6428
6428
|
Barrett.prototype.mulTo = barrettMulTo;
|
|
6429
6429
|
Barrett.prototype.sqrTo = barrettSqrTo;
|
|
6430
6430
|
function bnModPow(e, m) {
|
|
6431
|
-
var i = e.bitLength(), k, r = nbv(1),
|
|
6431
|
+
var i = e.bitLength(), k, r = nbv(1), z52;
|
|
6432
6432
|
if (i <= 0) return r;
|
|
6433
6433
|
else if (i < 18) k = 1;
|
|
6434
6434
|
else if (i < 48) k = 3;
|
|
@@ -6436,19 +6436,19 @@ var require_jsbn = __commonJS({
|
|
|
6436
6436
|
else if (i < 768) k = 5;
|
|
6437
6437
|
else k = 6;
|
|
6438
6438
|
if (i < 8)
|
|
6439
|
-
|
|
6439
|
+
z52 = new Classic(m);
|
|
6440
6440
|
else if (m.isEven())
|
|
6441
|
-
|
|
6441
|
+
z52 = new Barrett(m);
|
|
6442
6442
|
else
|
|
6443
|
-
|
|
6443
|
+
z52 = new Montgomery(m);
|
|
6444
6444
|
var g = new Array(), n = 3, k1 = k - 1, km = (1 << k) - 1;
|
|
6445
|
-
g[1] =
|
|
6445
|
+
g[1] = z52.convert(this);
|
|
6446
6446
|
if (k > 1) {
|
|
6447
6447
|
var g2 = nbi();
|
|
6448
|
-
|
|
6448
|
+
z52.sqrTo(g[1], g2);
|
|
6449
6449
|
while (n <= km) {
|
|
6450
6450
|
g[n] = nbi();
|
|
6451
|
-
|
|
6451
|
+
z52.mulTo(g2, g[n - 2], g[n]);
|
|
6452
6452
|
n += 2;
|
|
6453
6453
|
}
|
|
6454
6454
|
}
|
|
@@ -6474,20 +6474,20 @@ var require_jsbn = __commonJS({
|
|
|
6474
6474
|
is1 = false;
|
|
6475
6475
|
} else {
|
|
6476
6476
|
while (n > 1) {
|
|
6477
|
-
|
|
6478
|
-
|
|
6477
|
+
z52.sqrTo(r, r2);
|
|
6478
|
+
z52.sqrTo(r2, r);
|
|
6479
6479
|
n -= 2;
|
|
6480
6480
|
}
|
|
6481
|
-
if (n > 0)
|
|
6481
|
+
if (n > 0) z52.sqrTo(r, r2);
|
|
6482
6482
|
else {
|
|
6483
6483
|
t = r;
|
|
6484
6484
|
r = r2;
|
|
6485
6485
|
r2 = t;
|
|
6486
6486
|
}
|
|
6487
|
-
|
|
6487
|
+
z52.mulTo(r2, g[w], r);
|
|
6488
6488
|
}
|
|
6489
6489
|
while (j >= 0 && (e.data[j] & 1 << i) == 0) {
|
|
6490
|
-
|
|
6490
|
+
z52.sqrTo(r, r2);
|
|
6491
6491
|
t = r;
|
|
6492
6492
|
r = r2;
|
|
6493
6493
|
r2 = t;
|
|
@@ -6497,7 +6497,7 @@ var require_jsbn = __commonJS({
|
|
|
6497
6497
|
}
|
|
6498
6498
|
}
|
|
6499
6499
|
}
|
|
6500
|
-
return
|
|
6500
|
+
return z52.revert(r);
|
|
6501
6501
|
}
|
|
6502
6502
|
function bnGCD(a) {
|
|
6503
6503
|
var x = this.s < 0 ? this.negate() : this.clone();
|
|
@@ -18288,7 +18288,7 @@ import chalk4 from "chalk";
|
|
|
18288
18288
|
// package.json
|
|
18289
18289
|
var package_default = {
|
|
18290
18290
|
name: "@general-input/cli",
|
|
18291
|
-
version: "0.
|
|
18291
|
+
version: "0.13.0",
|
|
18292
18292
|
type: "module",
|
|
18293
18293
|
description: "The agent-facing CLI for General Input. Authenticate, manage workflows, run bash with operator credentials injected by the cloud.",
|
|
18294
18294
|
license: "SEE LICENSE IN LICENSE",
|
|
@@ -18317,7 +18317,7 @@ var package_default = {
|
|
|
18317
18317
|
],
|
|
18318
18318
|
scripts: {
|
|
18319
18319
|
dev: "tsup --watch",
|
|
18320
|
-
build: "tsup",
|
|
18320
|
+
build: "tsc --noEmit && tsup",
|
|
18321
18321
|
clean: "rm -rf dist",
|
|
18322
18322
|
typecheck: "tsc --noEmit",
|
|
18323
18323
|
lint: "eslint . --max-warnings 0",
|
|
@@ -19481,7 +19481,7 @@ var CrmService = class {
|
|
|
19481
19481
|
async deleteCompanies(ids) {
|
|
19482
19482
|
return (await this.crm()).deleteCompanies(ids);
|
|
19483
19483
|
}
|
|
19484
|
-
// ── Sequences (reads + draft CRUD;
|
|
19484
|
+
// ── Sequences (reads + draft CRUD; syncing is dashboard-only) ──────
|
|
19485
19485
|
async listSequences(args) {
|
|
19486
19486
|
return (await this.crm()).listSequences(args);
|
|
19487
19487
|
}
|
|
@@ -19500,12 +19500,33 @@ var CrmService = class {
|
|
|
19500
19500
|
async deleteSequence(id) {
|
|
19501
19501
|
await (await this.crm()).deleteSequence(id);
|
|
19502
19502
|
}
|
|
19503
|
-
// ──
|
|
19504
|
-
async
|
|
19505
|
-
return (await this.crm()).
|
|
19503
|
+
// ── Campaigns (CRUD + membership; syncing is dashboard-only) ────────
|
|
19504
|
+
async listCampaigns(query) {
|
|
19505
|
+
return (await this.crm()).listCampaigns(query);
|
|
19506
19506
|
}
|
|
19507
|
-
async
|
|
19508
|
-
return (await this.crm()).
|
|
19507
|
+
async getCampaign(id) {
|
|
19508
|
+
return (await this.crm()).getCampaign(id);
|
|
19509
|
+
}
|
|
19510
|
+
async createCampaign(body) {
|
|
19511
|
+
return (await this.crm()).createCampaign(body);
|
|
19512
|
+
}
|
|
19513
|
+
async updateCampaign(id, body) {
|
|
19514
|
+
return (await this.crm()).updateCampaign(id, body);
|
|
19515
|
+
}
|
|
19516
|
+
async deleteCampaign(id) {
|
|
19517
|
+
await (await this.crm()).deleteCampaign(id);
|
|
19518
|
+
}
|
|
19519
|
+
async listCampaignMembers(campaignId, query) {
|
|
19520
|
+
return (await this.crm()).listCampaignMembers(campaignId, query);
|
|
19521
|
+
}
|
|
19522
|
+
async addCampaignPeople(campaignId, personIds) {
|
|
19523
|
+
return (await this.crm()).addCampaignPeople(campaignId, personIds);
|
|
19524
|
+
}
|
|
19525
|
+
async removeCampaignPeople(campaignId, personIds) {
|
|
19526
|
+
return (await this.crm()).removeCampaignPeople(campaignId, personIds);
|
|
19527
|
+
}
|
|
19528
|
+
async listPersonCampaigns(personId) {
|
|
19529
|
+
return (await this.crm()).listPersonCampaigns(personId);
|
|
19509
19530
|
}
|
|
19510
19531
|
// ── Employments / contact points ───────────────────────────────────
|
|
19511
19532
|
async addEmployment(personId, body) {
|
|
@@ -20168,12 +20189,12 @@ var CrmApiClient = class {
|
|
|
20168
20189
|
body: { ids }
|
|
20169
20190
|
});
|
|
20170
20191
|
}
|
|
20171
|
-
// ── Sequences (reads + draft CRUD —
|
|
20192
|
+
// ── Sequences (reads + draft CRUD — syncing is dashboard-only) ──────
|
|
20172
20193
|
async listSequences(args) {
|
|
20173
20194
|
this.http.requireAuthed();
|
|
20174
20195
|
const params = new URLSearchParams();
|
|
20175
|
-
if (args.status) params.set("status", args.status);
|
|
20176
20196
|
if (args.query) params.set("q", args.query);
|
|
20197
|
+
if (args.campaignId) params.set("campaignId", args.campaignId);
|
|
20177
20198
|
const queryString = params.toString();
|
|
20178
20199
|
return this.http.fetch(
|
|
20179
20200
|
`${CRM}/sequences${queryString ? `?${queryString}` : ""}`
|
|
@@ -20207,14 +20228,55 @@ var CrmApiClient = class {
|
|
|
20207
20228
|
method: "DELETE"
|
|
20208
20229
|
});
|
|
20209
20230
|
}
|
|
20210
|
-
// ──
|
|
20211
|
-
async
|
|
20231
|
+
// ── Campaigns (CRUD + membership — syncing is dashboard-only) ───────
|
|
20232
|
+
async listCampaigns(query) {
|
|
20233
|
+
this.http.requireAuthed();
|
|
20234
|
+
return this.http.fetch(`${CRM}/campaigns${query ? `?q=${enc(query)}` : ""}`);
|
|
20235
|
+
}
|
|
20236
|
+
async getCampaign(campaignId) {
|
|
20212
20237
|
this.http.requireAuthed();
|
|
20213
|
-
return this.http.fetch(`${CRM}/
|
|
20238
|
+
return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`);
|
|
20214
20239
|
}
|
|
20215
|
-
async
|
|
20240
|
+
async createCampaign(body) {
|
|
20216
20241
|
this.http.requireAuthed();
|
|
20217
|
-
return this.http.fetch(`${CRM}/
|
|
20242
|
+
return this.http.fetch(`${CRM}/campaigns`, { method: "POST", body });
|
|
20243
|
+
}
|
|
20244
|
+
async updateCampaign(campaignId, body) {
|
|
20245
|
+
this.http.requireAuthed();
|
|
20246
|
+
return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
|
|
20247
|
+
method: "PUT",
|
|
20248
|
+
body
|
|
20249
|
+
});
|
|
20250
|
+
}
|
|
20251
|
+
async deleteCampaign(campaignId) {
|
|
20252
|
+
this.http.requireAuthed();
|
|
20253
|
+
await this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}`, {
|
|
20254
|
+
method: "DELETE"
|
|
20255
|
+
});
|
|
20256
|
+
}
|
|
20257
|
+
async listCampaignMembers(campaignId, query) {
|
|
20258
|
+
this.http.requireAuthed();
|
|
20259
|
+
return this.http.fetch(
|
|
20260
|
+
`${CRM}/campaigns/${enc(campaignId)}/members${query ? `?q=${enc(query)}` : ""}`
|
|
20261
|
+
);
|
|
20262
|
+
}
|
|
20263
|
+
async addCampaignPeople(campaignId, personIds) {
|
|
20264
|
+
this.http.requireAuthed();
|
|
20265
|
+
return this.http.fetch(`${CRM}/campaigns/${enc(campaignId)}/people`, {
|
|
20266
|
+
method: "POST",
|
|
20267
|
+
body: { personIds }
|
|
20268
|
+
});
|
|
20269
|
+
}
|
|
20270
|
+
async removeCampaignPeople(campaignId, personIds) {
|
|
20271
|
+
this.http.requireAuthed();
|
|
20272
|
+
return this.http.fetch(
|
|
20273
|
+
`${CRM}/campaigns/${enc(campaignId)}/people/remove`,
|
|
20274
|
+
{ method: "POST", body: { personIds } }
|
|
20275
|
+
);
|
|
20276
|
+
}
|
|
20277
|
+
async listPersonCampaigns(personId) {
|
|
20278
|
+
this.http.requireAuthed();
|
|
20279
|
+
return this.http.fetch(`${CRM}/campaigns/people/${enc(personId)}`);
|
|
20218
20280
|
}
|
|
20219
20281
|
// ── Employments (person sub-records) ───────────────────────────────
|
|
20220
20282
|
async addEmployment(personId, body) {
|
|
@@ -23906,7 +23968,7 @@ import {
|
|
|
23906
23968
|
var geni_default = "---\nname: geni\ndescription: Use the operator's connected services (Slack, Gmail, GitHub, Stripe, anything they've authorized in General Input) to fulfill their request, or build them a saved workflow (scheduled or event-driven automation). Load this whenever the user wants you to take an action on their behalf against an external SaaS account, fetch data from one of their tools, wire something up that crosses service boundaries, or set up a recurring/triggered automation.\n---\n\n# geni\n\n`geni` is a CLI that gives you credentialed access to the operator's\nconnected accounts. The cloud injects their tokens into a fresh bash\nsubprocess as env vars; you write the `curl`, you never see the\nsecret. Run `geni --help` for the full command surface.\n\n## How to talk about geni\n\nTreat geni as a teammate \u2014 the integration specialist who picks the\nright operation and runs the credentialed call. You're the one\nsynthesizing and replying.\n\nIn summaries of multi-step work, credit geni naturally: \"Geni pulled\nthe last 30 days of charges from Stripe; I rolled them into the report\nbelow.\" Skip the credit on trivial single calls; don't manufacture\nteam language (\"with geni's help\u2026\") to fill space. Lowercase `geni`\nin commands; capitalize \"Geni\" when personifying.\n\n## Request flow\n\nDiscovery first. Don't guess URLs, params, or env var names \u2014 the\noperation docs have them.\n\n1. `geni credential list [--service <slug>]` \u2014 find a connected\n credential id. If nothing's connected for the service, run\n `geni integration list -q \"<keyword>\"` to confirm the slug, then\n `geni credential connect <service>` (see \"Connecting a missing\n credential\" below).\n2. `geni integration operations <service> [-q \"<keyword>\"]` \u2014 find\n the operation you need.\n3. `geni integration operation <id> --format markdown` \u2014 read the\n HTTP shape, params, and **exact env var names** this call will set.\n4. `geni exec bash --cred <cred_id> --reason \"<what + why>\" -- '<curl>'`\n\n## Connecting a missing credential\n\n`geni credential connect <service>` opens the integration's\ndashboard page in the operator's browser. Tell the operator to\nfinish the connection there and come back \u2014 then re-run `geni\ncredential list --service <service>` to pick up the new id. Don't\npoll, don't loop. In non-interactive shells, add `--print-url` so\nthe URL prints to stdout instead.\n\n## Env vars\n\nRead the names off the operation docs; never derive them. Two flavors\nemitted per credential:\n\n- **Suffixed**: `<SERVICE>_<FIELD>_<id>` (e.g. `$SLACK_BOT_TOKEN_ABC`,\n `$SALESFORCE_INSTANCE_URL_KG`). The `<id>` is the credential id with\n `cred_` stripped, uppercased. Use these when fanning out across\n multiple credentials of the same service in one call.\n- **Canonical aliases**: well-known SDK names (`$GH_TOKEN`,\n `$SLACK_BOT_TOKEN`, `$OPENAI_API_KEY`, `$STRIPE_API_KEY`, \u2026) for\n tools that hardcode them.\n\nPlus `$PLATFORM_API_KEY` and `$PLATFORM_BASE_URL` on every exec \u2014 use\nthem to call General Input's first-party services (web search, image\ngen, weather, send-email) without `--cred`.\n\n## --reason is per-call\n\nEvery `geni exec bash --cred ...` requires `--reason`. It lands in\nthe operator's audit log and is shown to them. Be specific\n(\"Posting daily digest to #engineering\"), not generic (\"Slack call\").\nRe-state it on every call \u2014 the log is per-call, not per-session.\n\n## Output is scrubbed\n\nstdout and stderr pass through a streaming scrubber that replaces\nevery registered secret with `[REDACTED:credential_<id>]`. Don't try\nto exfiltrate via `echo $TOKEN | base64`; common encodings are\ncaught too. You don't need to see the secret to use it \u2014 the\nsubprocess can.\n\n## Building resources (workflows, apps, and skills)\n\n`geni exec bash` is for one-off actions. When the user wants something\nsaved and reusable, build a **resource**. A resource is one of four\ntypes: a `code` **workflow** (deterministic, fixed steps, runs on a\nschedule or trigger), an `agent` **workflow** (LLM-driven, variable-length\ntasks like research or triage), an `app` (an interactive React mini-app\nwith server-side handlers, like a dashboard or internal tool), or a\n`skill` (a SKILL.md instruction bundle the platform's cloud agents load\nas context \u2014 not executed). The shared lifecycle lives under `geni\nresource`; type-specific tools under `geni workflow` and `geni app`.\n\nYou author the files locally with your own editor; the cloud validates,\nconfigures, publishes, and runs them. This is the same build loop as the\ngeni chat, just on the user's machine with your brain driving it. Same\nloop for every type; apps add a build step and handler tools (see\n\"Building apps\" below), skills drop the config step (see \"Building\nskills\" below).\n\n**Read the spec first.** `geni resource spec <code|agent|app|skill>`\nprints the full contract: required files, the runtime API, allowed and\nforbidden patterns. Don't write a single file before reading it.\n\nThe loop:\n\n1. `geni resource create --type code --name \"Daily Digest\"`: creates the\n resource in the cloud and scaffolds its files into the current\n directory, with a `.geni-resource.json` marker so later commands here\n resolve the id automatically.\n2. Edit the files (`workflow.json`, `main.ts`, `package.json`) with your\n normal Read/Write/Edit tools. **Don't run `npm install`, `tsc`, or\n `bun` locally**: `@general-input/core` only resolves server-side, so\n a local compile always fails on the missing module. That's not a real\n error.\n3. `geni resource validate`: server-side spec + wiring + TypeScript\n check. Exit 9 means invalid; fix what it reports and re-run. A green\n validate is the compile gate.\n4. `geni resource config set`: wire what the workflow needs. Find\n credential ids with `geni credential list`; set them with\n `--cred <service>=<credentialId>`. Set consts with `--const k=v`,\n schedules with `--schedule <triggerId>=<cron>`. `geni resource config\nget` shows the current state. Find trigger providers with\n `geni trigger list`.\n5. `geni resource publish --summary \"<one plain sentence>\"`: promote\n your local files to the live version. Required before a test reflects\n your latest edits.\n6. `geni workflow test --payload '{...}'`: run a real cloud test\n execution and wait for the result, output, and logs. Iterate from\n step 2 until it does what the user asked.\n\nWhen a run misbehaves, `geni workflow execution <id> --download` writes\nits full trace to `executions/<id>/` (run.json, logs.txt, input.json, and\nthread.json). For an agent workflow, read `thread.json` to see every step\nthe agent took. Use `--thread` or `--input` to print those inline instead.\n\nUse the same discovery tools as exec: `geni integration operations\n<service>` and `geni integration operation <id>` to learn an API's shape\nbefore you write the `fetch` call in `main.ts`.\n\nFor a poll-triggered workflow, `geni workflow trigger-sample` returns\nlive sample records so you see the exact shape `input` receives before\nwriting `main.ts` (wire the trigger's credential and inputs with\n`config set` first). To test a file-type input, `geni workflow\nstage-input <file>` uploads a local file and prints a `store://` URI to\npass as that field's value in `--payload`.\n\n## Building apps\n\nAn `app` workflow is a React SPA (rendered in the dashboard's iframe)\nthat calls server-side handlers. Create it with `geni resource create\n--type app`; read the contract with `geni resource spec app`. The shared\ncommands work the same (validate, config set for credential slots,\npublish), with these differences:\n\n- The scaffold is a whole Vite project. Edit only `app.json`, `src/App.tsx`,\n `src/pages/*`, your own `src/components/*`, and `handlers/*.ts`. Leave\n the platform-owned files alone.\n- `geni resource publish` builds the app; the result's `build` reports\n whether the Vite build passed. You can't preview the UI from the CLI,\n so drive correctness through handlers and the build.\n- `geni app run-handler <name> --input '{...}'` runs a handler\n against the live app (publish first). `geni app invocations`\n shows recent handler runs, `geni app errors` shows browser\n errors the iframe reported, `geni app build-status` shows the\n build, and `geni app clear-cache` flushes the handler cache.\n\nThe loop: create --type app -> edit handlers + pages -> validate ->\nconfig set (wire credential slots) -> publish (builds) -> app run-handler\nto verify -> tell the user to open it in their dashboard.\n\n## Building skills\n\nA `skill` is a SKILL.md bundle (frontmatter `name` slug + `description`,\nthen the instructions body; optional `scripts/`, `references/`,\n`assets/`) that the platform's cloud agents load as context. It is not\nexecuted, so the loop is shorter: create --type skill -> edit SKILL.md ->\nvalidate -> publish. No `config set` (nothing to wire) and publish needs\nno `--summary`. The frontmatter `description` is the only thing agents\nsee before deciding to load it, so it must say what the skill does AND\nwhen to use it. Skill ids are `skl_`-prefixed; pull/validate/publish\nwork on them like any resource.\n\nA skill is never run and has no triggers. Once published, tell the user\nit's in their dashboard Skills page, ready for their agents to load into\nfuture work. Commands accept the skill id as a positional or infer it\nfrom the marker in the current directory.\n\n## Exit codes worth knowing\n\n- `0` \u2014 success; `1\u2013125` \u2014 subprocess's own exit (curl, jq, etc.)\n- `4` \u2014 resource not found (bad cred id, slug, operation id)\n- `77` \u2014 server refused to resolve a credential. Don't retry; surface\n to the operator.\n- `78` \u2014 session expired. Tell the operator to run `geni login`.\n\n## Don't\n\n- Don't construct a curl without reading the operation docs first.\n Guessing at URLs and env var names is the most common failure mode.\n- Don't hand-write workflow files before reading `geni resource spec\n<type>`. Don't try to compile or `npm install` them locally; let\n `geni resource validate` be the gate.\n- Use `--json` on list/get commands when you're going to parse the\n output. Table output is for humans.\n";
|
|
23907
23969
|
|
|
23908
23970
|
// src/skills/geni-crm.md
|
|
23909
|
-
var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the operator\'s General Input CRM from the command line. Load this whenever the user wants you to look something up in their CRM, pull a list of people or companies, check a deal pipeline, find or verify someone\'s email or phone (enrichment),
|
|
23971
|
+
var geni_crm_default = '---\nname: geni-crm\ndescription: Read and write the operator\'s General Input CRM from the command line. Load this whenever the user wants you to look something up in their CRM, pull a list of people or companies, check a deal pipeline, find or verify someone\'s email or phone (enrichment), work outbound campaigns and their sequence drafts, OR change CRM data (create or update people/companies, manage lists and tags, add notes, create and resolve tasks, move deals through stages, log touchpoints). Full read/write access to people, companies, pipelines, deals, lists, tags, notes, tasks, enrichment, campaigns, and sequence drafts.\n---\n\n# geni crm\n\n`geni crm` reads and writes the operator\'s General Input CRM: the lead database\n(people and companies), deal pipelines and their cards, lists, tags, notes,\ntasks, touchpoints, custom fields, and outbound campaigns with their sequence\ndrafts. It is part of the same `geni` CLI, so it\nuses the same session and active workspace. The workspace must have CRM access,\nor these commands return a 403. Run `geni crm --help` for the full surface, and\n`geni crm <noun> --help` for a noun\'s verbs.\n\nThe shape is `geni crm <noun> <verb>`. Each noun is a group: `people`,\n`companies`, `lists`, `tags`, `notes`, `tasks`, `pipelines`, `stages`, `cards`,\n`touchpoints`, `fields`, `employments`, `contact-points`, `campaigns`,\n`sequences`, `waterfalls`, `enrich`, plus a top-level `search`.\n\n## Finding things, then acting on them\n\nThe same two-step flow as the rest of geni: find an id, then read or write it.\n\n1. Find by name with one query across everything:\n `geni crm search "<text>" [--type person|company|list|pipeline|card]`. Or\n list one kind: `geni crm people "<text>"`, `geni crm companies "<text>"`,\n `geni crm pipelines`, `geni crm lists`, `geni crm tags`, `geni crm tasks`.\n `people` and `companies` also take `--filter`, a JSON array of column\n conditions, e.g. `--filter \'[{"field":"seniority","operator":"any_of","values":["vp"]},{"field":"icpScore","operator":"gte","value":70}]\'` \u2014\n see `--help` for the field and operator lists (custom fields filter as\n `custom.<key>`).\n2. Read one record: `geni crm people get <id>`, `geni crm companies get <id>`,\n `geni crm cards get <id>`, `geni crm pipelines get <id>` (add `--board` for\n its cards), `geni crm tasks get <id>`.\n\n## Writing\n\nCreates and updates take the record body as `--json`; the server validates it,\nso a 400 means the body was wrong (read the error and fix the JSON). Run\n`geni crm <noun> <verb> --help` to see the expected fields.\n\n- **Create / update records** (JSON body):\n - `geni crm people create --json \'[{"fullName":"Ada Lovelace","companyName":"Acme","email":"ada@acme.com"}]\'` (batch, find-or-create, deduped). `companies create` mirrors it. A `"created": false` result matched an existing record by identity key (email/LinkedIn; domain for companies) \u2014 the CLI warns on stderr when the matched name differs, e.g. a shared inbox collapsing distinct people.\n - `geni crm people update --json \'[{"id":"<id>","title":"VP Eng","linkedinUrl":"https://\u2026"}]\'` (batch, ids inline). `companies update` mirrors it. Writes take the create field names (`title`, `linkedinUrl`), not the read names you see on `get` (`currentTitle`, `primaryLinkedinUrl`); unknown keys are rejected with a 400 naming them.\n - `geni crm lists create --json \'{"name":"Q3 ICP","type":"company"}\'`, `geni crm tags create --json \'{"name":"Customer","entityType":"company"}\'`, `geni crm tasks create --json \'{"title":"Follow up","entity":{"type":"person","id":"<id>"}}\'`, `geni crm cards create <pipelineId> --json \'{"title":"Acme renewal","amount":50000}\'`.\n- **Notes** take the text directly: `geni crm notes create person <id> --body "Met at the conference"`.\n- **State-change verbs** (no JSON, just flags/ids):\n - Lists/tags: `geni crm lists add <listId> <entityIds...>`, `geni crm tags assign <tagId> <entityIds...>` (and `remove` / `unassign`).\n - Tasks: `geni crm tasks done <id>` (also `dismiss`, `reopen`, `delete`).\n - Cards: `geni crm cards move <id> --stage <stageId>`, `geni crm cards status <id> --status won|lost|open [--reason "..."]`, `geni crm cards archive <id>`, `geni crm cards add-contact <cardId> <personId>`.\n- **Deals/touchpoints**: `geni crm touchpoints log <cardId> --json \'{"channel":"call","occurredAt":"2026-07-01T15:00:00Z","summary":"Pricing call"}\'`.\n- **Delete** is `<noun> delete <id...>` (people/companies/lists take multiple ids; most others take one).\n\nCard edits, moves, and status changes use optimistic concurrency. Pass\n`--expected-updated-at <ts>` to enforce it; omit it and the CLI reads the card\'s\ncurrent version first (last-write-wins), which is usually what you want from a\nscript. With the token, a stale card fails with an HTTP 409 conflict; re-read\nthe card and retry.\n\n## Output\n\nList commands print a table; pass `--json` to parse. `get` commands and all\nwrites print the affected record as JSON (state-change verbs print a short\nconfirmation). The single-record `get` commands take `--field <path>` to pull\none value, e.g. `geni crm cards get <id> --field status`.\n\nJSON shapes vary by verb: searches print `{"results": [...]}` (people/companies\nadd `nextCursor`), `people get` prints `{person, company, contactPoints, ...}`,\nand bare noun lists wrap in a named key (e.g. `{"lists": [...]}`) \u2014 check before\npiping into a parser.\n\n## Enrichment\n\nFind and verify contact info for people through the workspace\'s configured\nprovider waterfalls. This is **paid** (it spends credits per provider call), so\nevery verb requires `--yes` and a run is capped at 25 people. Only enrich when\nthe operator has asked you to. Found emails and numbers save onto the person\'s\ncontact points automatically.\n\n- See what\'s wired first: `geni crm waterfalls` lists the provider chain for each\n capability (email-enrichment, email-validation, phone-enrichment). An empty\n chain finds nothing and spends nothing.\n- `geni crm enrich emails <personIds...> --yes` finds work emails;\n `geni crm enrich phones <personIds...> --yes` finds mobile numbers (both take\n `--retry-unverified`).\n- `geni crm enrich validate <personIds...> --yes` checks deliverability \u2014 run it\n before sequencing so you don\'t send to a bad address.\n\n## Campaigns and sequences (draft here \u2014 the dashboard delivers)\n\nOutbound is prep + export: campaigns group people under one purpose, each\nmember gets a fully personalized per-person sequence **draft**, and the\noperator syncs the campaign to an external sequencer (Instantly, Smartlead,\nCSV) from the dashboard. There is no sending from General Input, and the CLI\ncannot sync \u2014 by design. When drafts are ready, tell the operator to review\nand sync from the campaign\'s page in the dashboard.\n\n- `geni crm campaigns [query]` lists campaigns with member/sequence rollups;\n `get <id>` shows one (its `purpose` is the messaging angle every draft in it\n must serve); `--person <id>` lists the campaigns a person is in.\n- `geni crm campaigns create --json \'{"name":"Q3 fintech CFOs","purpose":"Book intro calls about closing automation"}\'`.\n Names are unique per workspace. `update <id>` and `delete <id>` exist;\n deleting removes the campaign\'s drafts too.\n- Membership first: `geni crm campaigns add <campaignId> <personIds...>` adds\n people; `members <id>` shows who is in and who still has no draft.\n `remove` also deletes the member\'s synced leads from linked sequencers \u2014\n it\'s how "stop emailing them" propagates.\n- `geni crm sequences [query] [--person <id>] [--campaign <id>]` lists\n drafts; `get <id>` shows the steps.\n- Draft: `geni crm sequences create --person <id> --campaign <id> --json \'{"steps":[{"subject":"\u2026","body":"\u2026","waitDays":0},{"body":"\u2026","waitDays":3}]}\'`.\n The first step carries the subject; follow-ups reply in-thread after\n `waitDays` with no reply. Read the campaign\'s `purpose` first and write to\n it. A member has ONE draft per campaign \u2014 creating again rewrites it (and\n the next sync updates the lead instead of duplicating it).\n- `geni crm sequences update <id> --json \'\u2026\'` replaces a draft wholesale;\n `delete <id>` removes a draft (the person stays a member).\n- Consider `geni crm enrich validate` on recipients first so the operator\n isn\'t syncing mail to a dead address.\n\n## Composing with the rest of geni\n\nThe CRM is the source of who and what; connected credentials are how you act on\nthe outside world. To add contact info, prefer `geni crm enrich` (it runs the\nworkspace\'s provider waterfalls and saves results). For anything else, pull\npeople or a company from the CRM, reach a service through `geni exec bash` (send\nan email, update an external system), and write the result back to the CRM (a\nnote, a task, a touchpoint, a moved card). Credit each tool naturally in your\nsummary.\n\n## Exit codes worth knowing\n\n- `0` success.\n- `4` not found (bad id, or it is not in the active workspace).\n- `5` forbidden (the workspace lacks CRM access, or the record is out of scope).\n- `9` stale write (a card changed since you read it; re-read and retry, or pass `--expected-updated-at`).\n- `78` session expired. Tell the operator to run `geni login`.\n';
|
|
23910
23972
|
|
|
23911
23973
|
// src/lib/skills.ts
|
|
23912
23974
|
var GENI_SKILL_NAME = "geni";
|
|
@@ -24252,7 +24314,7 @@ function parseJsonObjectArg(raw) {
|
|
|
24252
24314
|
}
|
|
24253
24315
|
|
|
24254
24316
|
// src/lib/leadFilterArg.ts
|
|
24255
|
-
import { z as
|
|
24317
|
+
import { z as z50 } from "zod";
|
|
24256
24318
|
|
|
24257
24319
|
// ../../packages/crm-api/dist/types/enums.js
|
|
24258
24320
|
import { z as z12 } from "zod";
|
|
@@ -24283,14 +24345,6 @@ var ReachabilitySchema = z12.enum([
|
|
|
24283
24345
|
"mobile_only",
|
|
24284
24346
|
"none"
|
|
24285
24347
|
]);
|
|
24286
|
-
var OutreachStatusSchema = z12.enum([
|
|
24287
|
-
"none",
|
|
24288
|
-
"queued",
|
|
24289
|
-
"contacted",
|
|
24290
|
-
"replied",
|
|
24291
|
-
"bounced",
|
|
24292
|
-
"unsubscribed"
|
|
24293
|
-
]);
|
|
24294
24348
|
|
|
24295
24349
|
// ../../packages/crm-api/dist/types/concurrency.js
|
|
24296
24350
|
import { z as z13 } from "zod";
|
|
@@ -24304,7 +24358,6 @@ var CrmSubjectTypeSchema = z14.enum([
|
|
|
24304
24358
|
"person",
|
|
24305
24359
|
"company",
|
|
24306
24360
|
"list",
|
|
24307
|
-
"conversation",
|
|
24308
24361
|
"pipeline",
|
|
24309
24362
|
"card"
|
|
24310
24363
|
]);
|
|
@@ -24735,101 +24788,8 @@ var UpdateScheduledAgentRequestSchema = z25.object({
|
|
|
24735
24788
|
}).merge(ExpectedUpdatedAtSchema);
|
|
24736
24789
|
|
|
24737
24790
|
// ../../packages/crm-api/dist/types/leadFilters.js
|
|
24738
|
-
import { z as z27 } from "zod";
|
|
24739
|
-
|
|
24740
|
-
// ../../packages/crm-api/dist/types/sequence.js
|
|
24741
24791
|
import { z as z26 } from "zod";
|
|
24742
|
-
var
|
|
24743
|
-
"draft",
|
|
24744
|
-
"queued",
|
|
24745
|
-
"sending",
|
|
24746
|
-
"completed",
|
|
24747
|
-
"stopped",
|
|
24748
|
-
// The person replied — a positive terminal outcome, distinct from a halt.
|
|
24749
|
-
"replied"
|
|
24750
|
-
]);
|
|
24751
|
-
var SequenceListSortSchema = z26.enum([
|
|
24752
|
-
"recent",
|
|
24753
|
-
"person",
|
|
24754
|
-
"company",
|
|
24755
|
-
"from",
|
|
24756
|
-
"to",
|
|
24757
|
-
"messages",
|
|
24758
|
-
"status",
|
|
24759
|
-
"activity"
|
|
24760
|
-
]);
|
|
24761
|
-
var SequenceListRequestSchema = z26.object({
|
|
24762
|
-
status: PersonSequenceStatusSchema.optional(),
|
|
24763
|
-
query: z26.string().trim().min(1).optional(),
|
|
24764
|
-
sort: SequenceListSortSchema.default("recent"),
|
|
24765
|
-
// Direction for the column sort; omitted falls back to the sort's default.
|
|
24766
|
-
direction: LeadSortDirectionSchema.optional()
|
|
24767
|
-
});
|
|
24768
|
-
var SequenceStepInputSchema = z26.object({
|
|
24769
|
-
subject: z26.string().min(1).max(300).nullish(),
|
|
24770
|
-
body: z26.string().min(1).max(2e4),
|
|
24771
|
-
waitDays: z26.number().int().min(0).max(90)
|
|
24772
|
-
});
|
|
24773
|
-
var SetPersonSequenceRequestSchema = z26.object({
|
|
24774
|
-
steps: z26.array(SequenceStepInputSchema).min(1).max(10),
|
|
24775
|
-
emailAccountId: z26.string().nullish(),
|
|
24776
|
-
recipientContactPointId: z26.string().nullish()
|
|
24777
|
-
});
|
|
24778
|
-
var BulkSequenceIdsRequestSchema = z26.object({
|
|
24779
|
-
ids: z26.array(z26.uuid()).min(1).max(1e3)
|
|
24780
|
-
});
|
|
24781
|
-
var BulkQueueSequencesRequestSchema = z26.object({
|
|
24782
|
-
ids: z26.array(z26.uuid()).min(1).max(1e3),
|
|
24783
|
-
emailAccountId: z26.uuid()
|
|
24784
|
-
});
|
|
24785
|
-
var BulkQueueSkipReasonSchema = z26.enum([
|
|
24786
|
-
"not_draft",
|
|
24787
|
-
"no_steps",
|
|
24788
|
-
"no_verified_email",
|
|
24789
|
-
"suppressed",
|
|
24790
|
-
"failed"
|
|
24791
|
-
]);
|
|
24792
|
-
var SequenceExportSkipReasonSchema = z26.enum([
|
|
24793
|
-
"no_steps",
|
|
24794
|
-
"no_email",
|
|
24795
|
-
"no_linkedin_url",
|
|
24796
|
-
"suppressed",
|
|
24797
|
-
"not_found"
|
|
24798
|
-
]);
|
|
24799
|
-
var SequenceExportDestinationIdSchema = z26.enum([
|
|
24800
|
-
"csv",
|
|
24801
|
-
"instantly",
|
|
24802
|
-
"smartlead",
|
|
24803
|
-
"apollo",
|
|
24804
|
-
"heyreach",
|
|
24805
|
-
"expandi"
|
|
24806
|
-
]);
|
|
24807
|
-
var ExportSequencesRequestSchema = z26.object({
|
|
24808
|
-
ids: z26.array(z26.uuid()).min(1).max(500),
|
|
24809
|
-
destination: SequenceExportDestinationIdSchema,
|
|
24810
|
-
/** Required for campaign destinations, ignored by file destinations. */
|
|
24811
|
-
campaignName: z26.string().min(1).max(120).optional()
|
|
24812
|
-
});
|
|
24813
|
-
function isValidTimeZone(timeZone) {
|
|
24814
|
-
try {
|
|
24815
|
-
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
24816
|
-
return true;
|
|
24817
|
-
} catch {
|
|
24818
|
-
return false;
|
|
24819
|
-
}
|
|
24820
|
-
}
|
|
24821
|
-
var SequenceSendScheduleInputSchema = z26.object({
|
|
24822
|
-
name: z26.string().min(1).max(120),
|
|
24823
|
-
timezone: z26.string().refine(isValidTimeZone, "Unknown timezone"),
|
|
24824
|
-
startHour: z26.number().int().min(0).max(23),
|
|
24825
|
-
endHour: z26.number().int().min(1).max(24),
|
|
24826
|
-
sendDays: z26.array(z26.number().int().min(1).max(7)).min(1).max(7)
|
|
24827
|
-
}).refine((schedule) => schedule.startHour < schedule.endHour, {
|
|
24828
|
-
message: "Start must be before end"
|
|
24829
|
-
});
|
|
24830
|
-
|
|
24831
|
-
// ../../packages/crm-api/dist/types/leadFilters.js
|
|
24832
|
-
var LeadFilterFieldTypeSchema = z27.enum([
|
|
24792
|
+
var LeadFilterFieldTypeSchema = z26.enum([
|
|
24833
24793
|
"text",
|
|
24834
24794
|
"number",
|
|
24835
24795
|
"date",
|
|
@@ -24837,7 +24797,7 @@ var LeadFilterFieldTypeSchema = z27.enum([
|
|
|
24837
24797
|
"stringArray",
|
|
24838
24798
|
"boolean"
|
|
24839
24799
|
]);
|
|
24840
|
-
var LeadFilterOperatorSchema =
|
|
24800
|
+
var LeadFilterOperatorSchema = z26.enum([
|
|
24841
24801
|
// text
|
|
24842
24802
|
"contains",
|
|
24843
24803
|
"not_contains",
|
|
@@ -24870,16 +24830,16 @@ var LeadFilterOperatorSchema = z27.enum([
|
|
|
24870
24830
|
"is_empty",
|
|
24871
24831
|
"is_not_empty"
|
|
24872
24832
|
]);
|
|
24873
|
-
var LeadFilterConditionSchema =
|
|
24874
|
-
field:
|
|
24833
|
+
var LeadFilterConditionSchema = z26.object({
|
|
24834
|
+
field: z26.string().min(1).max(200),
|
|
24875
24835
|
operator: LeadFilterOperatorSchema,
|
|
24876
24836
|
// Single-value operators (contains, gt, before, in_last_days, …).
|
|
24877
|
-
value:
|
|
24837
|
+
value: z26.union([z26.string().max(500), z26.number()]).optional(),
|
|
24878
24838
|
// Multi-value operators (any_of, includes_any, …).
|
|
24879
|
-
values:
|
|
24839
|
+
values: z26.array(z26.string().max(500)).max(100).optional(),
|
|
24880
24840
|
// `between` bounds — numbers, or ISO dates for date fields.
|
|
24881
|
-
min:
|
|
24882
|
-
max:
|
|
24841
|
+
min: z26.union([z26.string().max(100), z26.number()]).optional(),
|
|
24842
|
+
max: z26.union([z26.string().max(100), z26.number()]).optional()
|
|
24883
24843
|
});
|
|
24884
24844
|
function staticOptions(values) {
|
|
24885
24845
|
return values.map((value) => ({
|
|
@@ -24943,13 +24903,6 @@ var PERSON_FILTER_FIELDS = [
|
|
|
24943
24903
|
group: "Segmentation",
|
|
24944
24904
|
options: staticOptions(ReachabilitySchema.options)
|
|
24945
24905
|
},
|
|
24946
|
-
{
|
|
24947
|
-
key: "outreachStatus",
|
|
24948
|
-
label: "Outreach status",
|
|
24949
|
-
type: "enum",
|
|
24950
|
-
group: "Segmentation",
|
|
24951
|
-
options: staticOptions(OutreachStatusSchema.options)
|
|
24952
|
-
},
|
|
24953
24906
|
{ key: "companyName", label: "Company name", type: "text", group: "Company" },
|
|
24954
24907
|
{
|
|
24955
24908
|
key: "companyDomain",
|
|
@@ -24997,13 +24950,6 @@ var PERSON_FILTER_FIELDS = [
|
|
|
24997
24950
|
{ key: "facebook", label: "Facebook", type: "text", group: "Links" },
|
|
24998
24951
|
{ key: "youtube", label: "YouTube", type: "text", group: "Links" },
|
|
24999
24952
|
{ key: "instagram", label: "Instagram", type: "text", group: "Links" },
|
|
25000
|
-
{
|
|
25001
|
-
key: "sequenceStatus",
|
|
25002
|
-
label: "Sequence status",
|
|
25003
|
-
type: "enum",
|
|
25004
|
-
group: "Activity",
|
|
25005
|
-
options: staticOptions(PersonSequenceStatusSchema.options)
|
|
25006
|
-
},
|
|
25007
24953
|
{ key: "createdAt", label: "Added", type: "date", group: "Activity" },
|
|
25008
24954
|
{ key: "updatedAt", label: "Updated", type: "date", group: "Activity" },
|
|
25009
24955
|
{
|
|
@@ -25114,28 +25060,27 @@ function leadFilterConditionsDescription(fields) {
|
|
|
25114
25060
|
}
|
|
25115
25061
|
|
|
25116
25062
|
// ../../packages/crm-api/dist/types/search.js
|
|
25117
|
-
import { z as
|
|
25118
|
-
var PersonSearchFiltersSchema =
|
|
25063
|
+
import { z as z27 } from "zod";
|
|
25064
|
+
var PersonSearchFiltersSchema = z27.object({
|
|
25119
25065
|
// Scope to one company's people (the company detail People tab).
|
|
25120
|
-
companyId:
|
|
25066
|
+
companyId: z27.uuid().optional(),
|
|
25121
25067
|
// Scope to a person list's members.
|
|
25122
|
-
listId:
|
|
25068
|
+
listId: z27.uuid().optional(),
|
|
25123
25069
|
// Carrying ANY of these tags (OR-within, like the other array facets).
|
|
25124
|
-
tagIds:
|
|
25125
|
-
roleCategory:
|
|
25126
|
-
seniority:
|
|
25127
|
-
sizeBand:
|
|
25128
|
-
industry:
|
|
25129
|
-
country:
|
|
25130
|
-
reachability:
|
|
25131
|
-
|
|
25132
|
-
|
|
25133
|
-
|
|
25134
|
-
maxEmployeeCount: z28.number().int().min(0).optional(),
|
|
25070
|
+
tagIds: z27.array(z27.uuid()).optional(),
|
|
25071
|
+
roleCategory: z27.array(z27.string()).optional(),
|
|
25072
|
+
seniority: z27.array(z27.string()).optional(),
|
|
25073
|
+
sizeBand: z27.array(z27.string()).optional(),
|
|
25074
|
+
industry: z27.array(z27.string()).optional(),
|
|
25075
|
+
country: z27.array(z27.string()).optional(),
|
|
25076
|
+
reachability: z27.array(ReachabilitySchema).optional(),
|
|
25077
|
+
minIcpScore: z27.number().min(0).max(100).optional(),
|
|
25078
|
+
minEmployeeCount: z27.number().int().min(0).optional(),
|
|
25079
|
+
maxEmployeeCount: z27.number().int().min(0).optional(),
|
|
25135
25080
|
// Column conditions, ANDed together and with the keys above.
|
|
25136
|
-
conditions:
|
|
25081
|
+
conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(PERSON_FILTER_FIELDS))
|
|
25137
25082
|
});
|
|
25138
|
-
var PersonSearchSortSchema =
|
|
25083
|
+
var PersonSearchSortSchema = z27.enum([
|
|
25139
25084
|
"relevance",
|
|
25140
25085
|
"icp_score",
|
|
25141
25086
|
"recent",
|
|
@@ -25149,32 +25094,32 @@ var PersonSearchSortSchema = z28.enum([
|
|
|
25149
25094
|
"linkedin",
|
|
25150
25095
|
"enriched"
|
|
25151
25096
|
]);
|
|
25152
|
-
var PersonSearchRequestSchema =
|
|
25097
|
+
var PersonSearchRequestSchema = z27.object({
|
|
25153
25098
|
// Free-text keyword query (FTS + fuzzy fallback). Omit for pure facet browse.
|
|
25154
|
-
query:
|
|
25099
|
+
query: z27.string().optional(),
|
|
25155
25100
|
filters: PersonSearchFiltersSchema.optional(),
|
|
25156
25101
|
sort: PersonSearchSortSchema.default("relevance"),
|
|
25157
25102
|
// Direction for the column sort; omitted falls back to the sort's default.
|
|
25158
25103
|
direction: LeadSortDirectionSchema.optional(),
|
|
25159
25104
|
// Keyset pagination — opaque cursor from the previous response.
|
|
25160
|
-
cursor:
|
|
25161
|
-
limit:
|
|
25105
|
+
cursor: z27.string().nullable().optional(),
|
|
25106
|
+
limit: z27.number().int().min(1).max(100).default(25),
|
|
25162
25107
|
// Whether to compute facet counts for this query (extra work; off for paging).
|
|
25163
|
-
includeFacets:
|
|
25108
|
+
includeFacets: z27.boolean().default(false)
|
|
25164
25109
|
});
|
|
25165
|
-
var CompanySearchFiltersSchema =
|
|
25110
|
+
var CompanySearchFiltersSchema = z27.object({
|
|
25166
25111
|
// Scope to a company list's members.
|
|
25167
|
-
listId:
|
|
25112
|
+
listId: z27.uuid().optional(),
|
|
25168
25113
|
// Carrying ANY of these tags (OR-within, like the other array facets).
|
|
25169
|
-
tagIds:
|
|
25170
|
-
industry:
|
|
25171
|
-
hqCountry:
|
|
25172
|
-
minEmployeeCount:
|
|
25173
|
-
maxEmployeeCount:
|
|
25114
|
+
tagIds: z27.array(z27.uuid()).optional(),
|
|
25115
|
+
industry: z27.array(z27.string()).optional(),
|
|
25116
|
+
hqCountry: z27.array(z27.string()).optional(),
|
|
25117
|
+
minEmployeeCount: z27.number().int().min(0).optional(),
|
|
25118
|
+
maxEmployeeCount: z27.number().int().min(0).optional(),
|
|
25174
25119
|
// Column conditions, ANDed together and with the keys above.
|
|
25175
|
-
conditions:
|
|
25120
|
+
conditions: z27.array(LeadFilterConditionSchema).max(20).optional().describe(leadFilterConditionsDescription(COMPANY_FILTER_FIELDS))
|
|
25176
25121
|
});
|
|
25177
|
-
var CompanySearchSortSchema =
|
|
25122
|
+
var CompanySearchSortSchema = z27.enum([
|
|
25178
25123
|
"relevance",
|
|
25179
25124
|
"employee_count",
|
|
25180
25125
|
"recent",
|
|
@@ -25185,222 +25130,300 @@ var CompanySearchSortSchema = z28.enum([
|
|
|
25185
25130
|
"hq",
|
|
25186
25131
|
"enriched"
|
|
25187
25132
|
]);
|
|
25188
|
-
var CompanySearchRequestSchema =
|
|
25189
|
-
query:
|
|
25133
|
+
var CompanySearchRequestSchema = z27.object({
|
|
25134
|
+
query: z27.string().optional(),
|
|
25190
25135
|
filters: CompanySearchFiltersSchema.optional(),
|
|
25191
25136
|
sort: CompanySearchSortSchema.default("relevance"),
|
|
25192
25137
|
direction: LeadSortDirectionSchema.optional(),
|
|
25193
|
-
cursor:
|
|
25194
|
-
limit:
|
|
25195
|
-
includeFacets:
|
|
25138
|
+
cursor: z27.string().nullable().optional(),
|
|
25139
|
+
limit: z27.number().int().min(1).max(100).default(25),
|
|
25140
|
+
includeFacets: z27.boolean().default(false)
|
|
25196
25141
|
});
|
|
25197
25142
|
|
|
25198
25143
|
// ../../packages/crm-api/dist/types/globalSearch.js
|
|
25199
|
-
import { z as
|
|
25200
|
-
var GlobalSearchRequestSchema =
|
|
25201
|
-
query:
|
|
25144
|
+
import { z as z28 } from "zod";
|
|
25145
|
+
var GlobalSearchRequestSchema = z28.object({
|
|
25146
|
+
query: z28.string().min(1).max(200),
|
|
25202
25147
|
// Per-entity cap; the response holds up to 3 × this many results.
|
|
25203
|
-
limitPerType:
|
|
25148
|
+
limitPerType: z28.number().int().min(1).max(20).default(6)
|
|
25204
25149
|
});
|
|
25205
25150
|
|
|
25206
25151
|
// ../../packages/crm-api/dist/types/leadTools.js
|
|
25207
|
-
import { z as
|
|
25152
|
+
import { z as z29 } from "zod";
|
|
25208
25153
|
var LEAD_BATCH_MAX = 100;
|
|
25209
25154
|
var companyEnrichmentFields = {
|
|
25210
|
-
legalName:
|
|
25211
|
-
tagline:
|
|
25212
|
-
linkedinUrl:
|
|
25213
|
-
logoUrl:
|
|
25155
|
+
legalName: z29.string().nullish(),
|
|
25156
|
+
tagline: z29.string().nullish(),
|
|
25157
|
+
linkedinUrl: z29.string().nullish(),
|
|
25158
|
+
logoUrl: z29.string().nullish(),
|
|
25214
25159
|
companyType: CompanyTypeSchema.nullish(),
|
|
25215
|
-
industry:
|
|
25216
|
-
subIndustry:
|
|
25217
|
-
keywords:
|
|
25218
|
-
description:
|
|
25219
|
-
employeeCount:
|
|
25220
|
-
foundedYear:
|
|
25221
|
-
ticker:
|
|
25222
|
-
annualRevenueUsd:
|
|
25223
|
-
totalFundingUsd:
|
|
25224
|
-
lastFundingRound:
|
|
25160
|
+
industry: z29.string().nullish(),
|
|
25161
|
+
subIndustry: z29.string().nullish(),
|
|
25162
|
+
keywords: z29.array(z29.string()).max(50).nullish(),
|
|
25163
|
+
description: z29.string().nullish(),
|
|
25164
|
+
employeeCount: z29.number().int().min(0).nullish(),
|
|
25165
|
+
foundedYear: z29.number().int().nullish(),
|
|
25166
|
+
ticker: z29.string().nullish(),
|
|
25167
|
+
annualRevenueUsd: z29.number().min(0).nullish(),
|
|
25168
|
+
totalFundingUsd: z29.number().min(0).nullish(),
|
|
25169
|
+
lastFundingRound: z29.string().nullish(),
|
|
25225
25170
|
// ISO date, e.g. 2025-03-01
|
|
25226
|
-
lastFundingAt:
|
|
25227
|
-
investors:
|
|
25228
|
-
hqCity:
|
|
25229
|
-
hqRegion:
|
|
25230
|
-
hqCountry:
|
|
25231
|
-
hqAddress:
|
|
25232
|
-
phone:
|
|
25233
|
-
twitterUrl:
|
|
25234
|
-
githubUrl:
|
|
25235
|
-
facebookUrl:
|
|
25236
|
-
youtubeUrl:
|
|
25237
|
-
instagramUrl:
|
|
25238
|
-
crunchbaseUrl:
|
|
25239
|
-
techStack:
|
|
25171
|
+
lastFundingAt: z29.string().nullish(),
|
|
25172
|
+
investors: z29.array(z29.string()).max(50).nullish(),
|
|
25173
|
+
hqCity: z29.string().nullish(),
|
|
25174
|
+
hqRegion: z29.string().nullish(),
|
|
25175
|
+
hqCountry: z29.string().nullish(),
|
|
25176
|
+
hqAddress: z29.string().nullish(),
|
|
25177
|
+
phone: z29.string().nullish(),
|
|
25178
|
+
twitterUrl: z29.string().nullish(),
|
|
25179
|
+
githubUrl: z29.string().nullish(),
|
|
25180
|
+
facebookUrl: z29.string().nullish(),
|
|
25181
|
+
youtubeUrl: z29.string().nullish(),
|
|
25182
|
+
instagramUrl: z29.string().nullish(),
|
|
25183
|
+
crunchbaseUrl: z29.string().nullish(),
|
|
25184
|
+
techStack: z29.array(z29.string()).max(100).nullish()
|
|
25240
25185
|
};
|
|
25241
|
-
var CreateLeadCompanyRequestSchema =
|
|
25242
|
-
name:
|
|
25243
|
-
domain:
|
|
25186
|
+
var CreateLeadCompanyRequestSchema = z29.strictObject({
|
|
25187
|
+
name: z29.string().min(1),
|
|
25188
|
+
domain: z29.string().optional(),
|
|
25244
25189
|
...companyEnrichmentFields
|
|
25245
25190
|
});
|
|
25246
|
-
var LeadPersonEducationInputSchema =
|
|
25247
|
-
school:
|
|
25248
|
-
degree:
|
|
25249
|
-
field:
|
|
25250
|
-
startYear:
|
|
25251
|
-
endYear:
|
|
25191
|
+
var LeadPersonEducationInputSchema = z29.strictObject({
|
|
25192
|
+
school: z29.string().min(1),
|
|
25193
|
+
degree: z29.string().optional(),
|
|
25194
|
+
field: z29.string().optional(),
|
|
25195
|
+
startYear: z29.number().int().optional(),
|
|
25196
|
+
endYear: z29.number().int().optional()
|
|
25252
25197
|
});
|
|
25253
25198
|
var personEnrichmentFields = {
|
|
25254
|
-
title:
|
|
25255
|
-
headline:
|
|
25256
|
-
bio:
|
|
25257
|
-
department:
|
|
25258
|
-
yearsExperience:
|
|
25259
|
-
skills:
|
|
25260
|
-
languages:
|
|
25261
|
-
photoUrl:
|
|
25262
|
-
linkedinUrl:
|
|
25263
|
-
twitterUrl:
|
|
25264
|
-
githubUrl:
|
|
25265
|
-
facebookUrl:
|
|
25266
|
-
youtubeUrl:
|
|
25267
|
-
instagramUrl:
|
|
25268
|
-
personalWebsiteUrl:
|
|
25269
|
-
email:
|
|
25270
|
-
locationCity:
|
|
25271
|
-
locationRegion:
|
|
25272
|
-
locationCountry:
|
|
25199
|
+
title: z29.string().nullish(),
|
|
25200
|
+
headline: z29.string().nullish(),
|
|
25201
|
+
bio: z29.string().nullish(),
|
|
25202
|
+
department: z29.string().nullish(),
|
|
25203
|
+
yearsExperience: z29.number().int().min(0).max(80).nullish(),
|
|
25204
|
+
skills: z29.array(z29.string()).max(50).nullish(),
|
|
25205
|
+
languages: z29.array(z29.string()).max(20).nullish(),
|
|
25206
|
+
photoUrl: z29.string().nullish(),
|
|
25207
|
+
linkedinUrl: z29.string().nullish(),
|
|
25208
|
+
twitterUrl: z29.string().nullish(),
|
|
25209
|
+
githubUrl: z29.string().nullish(),
|
|
25210
|
+
facebookUrl: z29.string().nullish(),
|
|
25211
|
+
youtubeUrl: z29.string().nullish(),
|
|
25212
|
+
instagramUrl: z29.string().nullish(),
|
|
25213
|
+
personalWebsiteUrl: z29.string().nullish(),
|
|
25214
|
+
email: z29.string().nullish(),
|
|
25215
|
+
locationCity: z29.string().nullish(),
|
|
25216
|
+
locationRegion: z29.string().nullish(),
|
|
25217
|
+
locationCountry: z29.string().nullish(),
|
|
25273
25218
|
// IANA timezone, e.g. America/New_York
|
|
25274
|
-
timezone:
|
|
25219
|
+
timezone: z29.string().nullish(),
|
|
25275
25220
|
// Full education history — REPLACES any previously saved entries.
|
|
25276
|
-
educations:
|
|
25221
|
+
educations: z29.array(LeadPersonEducationInputSchema).max(10).optional()
|
|
25277
25222
|
};
|
|
25278
|
-
var CreateLeadPersonRequestSchema =
|
|
25279
|
-
fullName:
|
|
25223
|
+
var CreateLeadPersonRequestSchema = z29.strictObject({
|
|
25224
|
+
fullName: z29.string().min(1),
|
|
25280
25225
|
...personEnrichmentFields,
|
|
25281
|
-
companyId:
|
|
25282
|
-
companyName:
|
|
25283
|
-
companyDomain:
|
|
25226
|
+
companyId: z29.string().optional(),
|
|
25227
|
+
companyName: z29.string().optional(),
|
|
25228
|
+
companyDomain: z29.string().optional()
|
|
25284
25229
|
});
|
|
25285
|
-
var UpdateLeadCompanyRequestSchema =
|
|
25286
|
-
id:
|
|
25287
|
-
name:
|
|
25288
|
-
domain:
|
|
25230
|
+
var UpdateLeadCompanyRequestSchema = z29.strictObject({
|
|
25231
|
+
id: z29.uuid(),
|
|
25232
|
+
name: z29.string().min(1).optional(),
|
|
25233
|
+
domain: z29.string().optional(),
|
|
25289
25234
|
...companyEnrichmentFields,
|
|
25290
25235
|
// Registry-defined custom fields; validated + merged server-side.
|
|
25291
25236
|
custom: CustomFieldValuesSchema.optional()
|
|
25292
25237
|
});
|
|
25293
|
-
var UpdateLeadPersonRequestSchema =
|
|
25294
|
-
id:
|
|
25295
|
-
fullName:
|
|
25238
|
+
var UpdateLeadPersonRequestSchema = z29.strictObject({
|
|
25239
|
+
id: z29.uuid(),
|
|
25240
|
+
fullName: z29.string().min(1).optional(),
|
|
25296
25241
|
...personEnrichmentFields,
|
|
25297
25242
|
// (re)assign current employment — companyId, or companyName/companyDomain
|
|
25298
25243
|
// to find-or-create the company first
|
|
25299
|
-
companyId:
|
|
25300
|
-
companyName:
|
|
25301
|
-
companyDomain:
|
|
25244
|
+
companyId: z29.string().optional(),
|
|
25245
|
+
companyName: z29.string().optional(),
|
|
25246
|
+
companyDomain: z29.string().optional(),
|
|
25302
25247
|
// Set the primary company directly (the people.current_company_id cache shown
|
|
25303
25248
|
// in lists/header). Independent of the employment rows that hold the full set
|
|
25304
25249
|
// of current roles; null clears it. Recompute overwrites it when the current
|
|
25305
25250
|
// employment set changes.
|
|
25306
|
-
primaryCompanyId:
|
|
25251
|
+
primaryCompanyId: z29.string().nullish(),
|
|
25307
25252
|
// Registry-defined custom fields; validated + merged server-side.
|
|
25308
25253
|
custom: CustomFieldValuesSchema.optional()
|
|
25309
25254
|
});
|
|
25310
|
-
var LeadEmploymentInputSchema =
|
|
25311
|
-
companyId:
|
|
25312
|
-
companyName:
|
|
25313
|
-
title:
|
|
25314
|
-
startDate:
|
|
25315
|
-
endDate:
|
|
25316
|
-
isCurrent:
|
|
25255
|
+
var LeadEmploymentInputSchema = z29.strictObject({
|
|
25256
|
+
companyId: z29.uuid().nullish(),
|
|
25257
|
+
companyName: z29.string().nullish(),
|
|
25258
|
+
title: z29.string().nullish(),
|
|
25259
|
+
startDate: z29.string().nullish(),
|
|
25260
|
+
endDate: z29.string().nullish(),
|
|
25261
|
+
isCurrent: z29.boolean().default(false)
|
|
25317
25262
|
});
|
|
25318
|
-
var UpdateLeadEmploymentRequestSchema =
|
|
25319
|
-
companyId:
|
|
25320
|
-
companyName:
|
|
25321
|
-
title:
|
|
25322
|
-
startDate:
|
|
25323
|
-
endDate:
|
|
25324
|
-
isCurrent:
|
|
25263
|
+
var UpdateLeadEmploymentRequestSchema = z29.strictObject({
|
|
25264
|
+
companyId: z29.uuid().nullish(),
|
|
25265
|
+
companyName: z29.string().nullish(),
|
|
25266
|
+
title: z29.string().nullish(),
|
|
25267
|
+
startDate: z29.string().nullish(),
|
|
25268
|
+
endDate: z29.string().nullish(),
|
|
25269
|
+
isCurrent: z29.boolean().optional()
|
|
25325
25270
|
});
|
|
25326
|
-
var LeadContactPointInputSchema =
|
|
25271
|
+
var LeadContactPointInputSchema = z29.strictObject({
|
|
25327
25272
|
kind: ContactPointKindSchema,
|
|
25328
|
-
value:
|
|
25273
|
+
value: z29.string().min(1),
|
|
25329
25274
|
status: ContactPointStatusSchema.optional(),
|
|
25330
|
-
isPrimary:
|
|
25275
|
+
isPrimary: z29.boolean().optional()
|
|
25331
25276
|
});
|
|
25332
|
-
var UpdateLeadContactPointRequestSchema =
|
|
25277
|
+
var UpdateLeadContactPointRequestSchema = z29.strictObject({
|
|
25333
25278
|
kind: ContactPointKindSchema.optional(),
|
|
25334
|
-
value:
|
|
25279
|
+
value: z29.string().min(1).optional(),
|
|
25335
25280
|
status: ContactPointStatusSchema.optional(),
|
|
25336
|
-
isPrimary:
|
|
25281
|
+
isPrimary: z29.boolean().optional()
|
|
25337
25282
|
});
|
|
25338
|
-
var LeadCompanyPeopleRequestSchema =
|
|
25339
|
-
limit:
|
|
25340
|
-
cursor:
|
|
25283
|
+
var LeadCompanyPeopleRequestSchema = z29.object({
|
|
25284
|
+
limit: z29.coerce.number().int().min(1).max(100).default(50),
|
|
25285
|
+
cursor: z29.string().optional(),
|
|
25341
25286
|
sort: PersonSearchSortSchema.default("recent"),
|
|
25342
25287
|
direction: LeadSortDirectionSchema.optional()
|
|
25343
25288
|
});
|
|
25344
|
-
var CreateLeadCompaniesRequestSchema =
|
|
25345
|
-
companies:
|
|
25289
|
+
var CreateLeadCompaniesRequestSchema = z29.strictObject({
|
|
25290
|
+
companies: z29.array(CreateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25346
25291
|
});
|
|
25347
|
-
var CreateLeadPeopleRequestSchema =
|
|
25348
|
-
people:
|
|
25292
|
+
var CreateLeadPeopleRequestSchema = z29.strictObject({
|
|
25293
|
+
people: z29.array(CreateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25349
25294
|
});
|
|
25350
|
-
var UpdateLeadCompaniesRequestSchema =
|
|
25351
|
-
companies:
|
|
25295
|
+
var UpdateLeadCompaniesRequestSchema = z29.strictObject({
|
|
25296
|
+
companies: z29.array(UpdateLeadCompanyRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25352
25297
|
});
|
|
25353
|
-
var UpdateLeadPeopleRequestSchema =
|
|
25354
|
-
people:
|
|
25298
|
+
var UpdateLeadPeopleRequestSchema = z29.strictObject({
|
|
25299
|
+
people: z29.array(UpdateLeadPersonRequestSchema).min(1).max(LEAD_BATCH_MAX)
|
|
25355
25300
|
});
|
|
25356
|
-
var DeleteLeadCompaniesRequestSchema =
|
|
25357
|
-
ids:
|
|
25301
|
+
var DeleteLeadCompaniesRequestSchema = z29.strictObject({
|
|
25302
|
+
ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
|
|
25358
25303
|
});
|
|
25359
|
-
var DeleteLeadPeopleRequestSchema =
|
|
25360
|
-
ids:
|
|
25304
|
+
var DeleteLeadPeopleRequestSchema = z29.strictObject({
|
|
25305
|
+
ids: z29.array(z29.uuid()).min(1).max(LEAD_BATCH_MAX)
|
|
25361
25306
|
});
|
|
25362
25307
|
|
|
25363
|
-
// ../../packages/crm-api/dist/types/
|
|
25308
|
+
// ../../packages/crm-api/dist/types/sequence.js
|
|
25309
|
+
import { z as z30 } from "zod";
|
|
25310
|
+
var SequenceListSortSchema = z30.enum([
|
|
25311
|
+
"recent",
|
|
25312
|
+
"person",
|
|
25313
|
+
"company",
|
|
25314
|
+
"to",
|
|
25315
|
+
"messages",
|
|
25316
|
+
"activity"
|
|
25317
|
+
]);
|
|
25318
|
+
var SequenceListRequestSchema = z30.object({
|
|
25319
|
+
query: z30.string().trim().min(1).optional(),
|
|
25320
|
+
campaignId: z30.uuid().optional(),
|
|
25321
|
+
sort: SequenceListSortSchema.default("recent"),
|
|
25322
|
+
// Direction for the column sort; omitted falls back to the sort's default.
|
|
25323
|
+
direction: LeadSortDirectionSchema.optional()
|
|
25324
|
+
});
|
|
25325
|
+
var SequenceStepInputSchema = z30.object({
|
|
25326
|
+
subject: z30.string().min(1).max(300).nullish(),
|
|
25327
|
+
body: z30.string().min(1).max(2e4),
|
|
25328
|
+
waitDays: z30.number().int().min(0).max(90)
|
|
25329
|
+
});
|
|
25330
|
+
var SetPersonSequenceRequestSchema = z30.object({
|
|
25331
|
+
steps: z30.array(SequenceStepInputSchema).min(1).max(10),
|
|
25332
|
+
recipientContactPointId: z30.string().nullish()
|
|
25333
|
+
});
|
|
25334
|
+
var CreatePersonSequenceRequestSchema = SetPersonSequenceRequestSchema.extend({
|
|
25335
|
+
campaignId: z30.uuid()
|
|
25336
|
+
});
|
|
25337
|
+
var SequenceExportSkipReasonSchema = z30.enum([
|
|
25338
|
+
"no_steps",
|
|
25339
|
+
"no_email",
|
|
25340
|
+
"no_linkedin_url",
|
|
25341
|
+
"suppressed",
|
|
25342
|
+
"not_found"
|
|
25343
|
+
]);
|
|
25344
|
+
var SequenceExportDestinationIdSchema = z30.enum([
|
|
25345
|
+
"csv",
|
|
25346
|
+
"instantly",
|
|
25347
|
+
"smartlead",
|
|
25348
|
+
"apollo",
|
|
25349
|
+
"heyreach",
|
|
25350
|
+
"expandi"
|
|
25351
|
+
]);
|
|
25352
|
+
function isValidTimeZone(timeZone) {
|
|
25353
|
+
try {
|
|
25354
|
+
new Intl.DateTimeFormat("en-US", { timeZone });
|
|
25355
|
+
return true;
|
|
25356
|
+
} catch {
|
|
25357
|
+
return false;
|
|
25358
|
+
}
|
|
25359
|
+
}
|
|
25360
|
+
var SequenceSendScheduleInputSchema = z30.object({
|
|
25361
|
+
name: z30.string().min(1).max(120),
|
|
25362
|
+
timezone: z30.string().refine(isValidTimeZone, "Unknown timezone"),
|
|
25363
|
+
startHour: z30.number().int().min(0).max(23),
|
|
25364
|
+
endHour: z30.number().int().min(1).max(24),
|
|
25365
|
+
sendDays: z30.array(z30.number().int().min(1).max(7)).min(1).max(7)
|
|
25366
|
+
}).refine((schedule) => schedule.startHour < schedule.endHour, {
|
|
25367
|
+
message: "Start must be before end"
|
|
25368
|
+
});
|
|
25369
|
+
|
|
25370
|
+
// ../../packages/crm-api/dist/types/campaign.js
|
|
25364
25371
|
import { z as z31 } from "zod";
|
|
25365
|
-
var
|
|
25366
|
-
|
|
25372
|
+
var CampaignListSortSchema = z31.enum([
|
|
25373
|
+
"recent",
|
|
25374
|
+
"name",
|
|
25375
|
+
"people",
|
|
25376
|
+
"activity"
|
|
25377
|
+
]);
|
|
25378
|
+
var CampaignListRequestSchema = z31.object({
|
|
25379
|
+
query: z31.string().trim().min(1).optional(),
|
|
25380
|
+
sort: CampaignListSortSchema.default("recent"),
|
|
25381
|
+
direction: LeadSortDirectionSchema.optional()
|
|
25382
|
+
});
|
|
25383
|
+
var SetCampaignRequestSchema = z31.object({
|
|
25384
|
+
name: z31.string().trim().min(1).max(120),
|
|
25385
|
+
purpose: z31.string().trim().max(2e3).nullish()
|
|
25386
|
+
});
|
|
25387
|
+
var BulkCampaignIdsRequestSchema = z31.object({
|
|
25388
|
+
ids: z31.array(z31.uuid()).min(1).max(200)
|
|
25389
|
+
});
|
|
25390
|
+
var CampaignSyncRequestSchema = z31.object({
|
|
25391
|
+
destination: SequenceExportDestinationIdSchema,
|
|
25392
|
+
/** File destinations only: 'new' downloads only sequences not yet exported
|
|
25393
|
+
* to this destination. Campaign destinations ignore it. */
|
|
25394
|
+
fileScope: z31.enum(["all", "new"]).default("all"),
|
|
25395
|
+
/** Names the external campaign created on first sync; defaults to the CRM
|
|
25396
|
+
* campaign's name. Ignored once linked. */
|
|
25397
|
+
campaignName: z31.string().trim().min(1).max(120).optional()
|
|
25398
|
+
});
|
|
25399
|
+
var CampaignMemberListSortSchema = z31.enum([
|
|
25400
|
+
"recent",
|
|
25401
|
+
"person",
|
|
25402
|
+
"company"
|
|
25403
|
+
]);
|
|
25404
|
+
var CampaignMemberListRequestSchema = z31.object({
|
|
25405
|
+
query: z31.string().trim().min(1).optional(),
|
|
25406
|
+
sort: CampaignMemberListSortSchema.default("recent"),
|
|
25407
|
+
direction: LeadSortDirectionSchema.optional()
|
|
25408
|
+
});
|
|
25409
|
+
var CampaignPeopleRequestSchema = z31.object({
|
|
25410
|
+
personIds: z31.array(z31.uuid()).min(1).max(1e3)
|
|
25411
|
+
});
|
|
25412
|
+
|
|
25413
|
+
// ../../packages/crm-api/dist/types/suppression.js
|
|
25414
|
+
import { z as z32 } from "zod";
|
|
25415
|
+
var SuppressionKindSchema = z32.enum(["email", "domain", "phone"]);
|
|
25416
|
+
var SuppressionReasonSchema = z32.enum([
|
|
25367
25417
|
"unsubscribed",
|
|
25368
25418
|
"complained",
|
|
25369
25419
|
"hard_bounced",
|
|
25370
25420
|
"manual"
|
|
25371
25421
|
]);
|
|
25372
|
-
var CreateSuppressionRequestSchema =
|
|
25422
|
+
var CreateSuppressionRequestSchema = z32.object({
|
|
25373
25423
|
kind: SuppressionKindSchema,
|
|
25374
|
-
value:
|
|
25424
|
+
value: z32.string().min(1).max(320),
|
|
25375
25425
|
reason: SuppressionReasonSchema,
|
|
25376
|
-
sourcePersonId:
|
|
25377
|
-
});
|
|
25378
|
-
|
|
25379
|
-
// ../../packages/crm-api/dist/types/conversation.js
|
|
25380
|
-
import { z as z32 } from "zod";
|
|
25381
|
-
var ConversationChannelSchema = z32.enum(["email", "linkedin"]);
|
|
25382
|
-
var MessageDirectionSchema = z32.enum(["outbound", "inbound"]);
|
|
25383
|
-
var InboxFilterSchema = z32.enum(["all", "unread"]);
|
|
25384
|
-
var InboxListRequestSchema = z32.object({
|
|
25385
|
-
filter: InboxFilterSchema.default("all"),
|
|
25386
|
-
channel: ConversationChannelSchema.optional(),
|
|
25387
|
-
// Keyset cursor — last page's (lastMessageAt, id), opaque to clients.
|
|
25388
|
-
cursor: z32.string().nullable().optional(),
|
|
25389
|
-
limit: z32.number().int().min(1).max(100).default(30)
|
|
25390
|
-
});
|
|
25391
|
-
var SentListRequestSchema = z32.object({
|
|
25392
|
-
// Keyset cursor — last page's (sentAt, id), opaque to clients.
|
|
25393
|
-
cursor: z32.string().nullable().optional(),
|
|
25394
|
-
limit: z32.number().int().min(1).max(100).default(30)
|
|
25395
|
-
});
|
|
25396
|
-
var ReplyToConversationRequestSchema = z32.object({
|
|
25397
|
-
bodyText: z32.string().min(1).max(2e4)
|
|
25398
|
-
});
|
|
25399
|
-
var DraftReplyRequestSchema = z32.object({
|
|
25400
|
-
/** What the reply should say or avoid — optional steer from the sender. */
|
|
25401
|
-
guidance: z32.string().max(2e3).optional(),
|
|
25402
|
-
/** Composer text to revise; omitted on a fresh draft. */
|
|
25403
|
-
currentDraft: z32.string().max(2e4).optional()
|
|
25426
|
+
sourcePersonId: z32.uuid().nullish()
|
|
25404
25427
|
});
|
|
25405
25428
|
|
|
25406
25429
|
// ../../packages/crm-api/dist/types/enrichment.js
|
|
@@ -25497,9 +25520,9 @@ var UpdateEnrichmentWaterfallsRequestSchema = z34.object({
|
|
|
25497
25520
|
phoneEnrichment: z34.array(PhoneEnrichmentProviderIdSchema).optional()
|
|
25498
25521
|
});
|
|
25499
25522
|
|
|
25500
|
-
// ../../packages/crm-api/dist/types/
|
|
25523
|
+
// ../../packages/crm-api/dist/types/playbook.js
|
|
25501
25524
|
import { z as z35 } from "zod";
|
|
25502
|
-
var
|
|
25525
|
+
var PlaybookIdSchema = z35.enum([
|
|
25503
25526
|
"fill-in-person",
|
|
25504
25527
|
"fill-in-company",
|
|
25505
25528
|
"fill-in-list",
|
|
@@ -25507,7 +25530,6 @@ var SkillIdSchema = z35.enum([
|
|
|
25507
25530
|
"lookalike-person",
|
|
25508
25531
|
"lookalike-company",
|
|
25509
25532
|
"add-enrich",
|
|
25510
|
-
"signal-sweep-list",
|
|
25511
25533
|
"build-list-person",
|
|
25512
25534
|
"build-list-company"
|
|
25513
25535
|
]);
|
|
@@ -25516,81 +25538,40 @@ var AgentQuickActionSchema = z35.enum([
|
|
|
25516
25538
|
"draft_sequence",
|
|
25517
25539
|
"create_lookalikes",
|
|
25518
25540
|
"add_enrich",
|
|
25519
|
-
"signal_sweep",
|
|
25520
25541
|
"build_list"
|
|
25521
25542
|
]);
|
|
25522
|
-
var
|
|
25523
|
-
var
|
|
25543
|
+
var PlaybookEntityTypeSchema = z35.enum(["person", "company"]);
|
|
25544
|
+
var PlaybookListTargetValueSchema = z35.union([
|
|
25524
25545
|
z35.object({
|
|
25525
25546
|
listId: z35.uuid(),
|
|
25526
25547
|
listName: z35.string().trim().min(1).max(200)
|
|
25527
25548
|
}),
|
|
25528
25549
|
z35.object({ newListName: z35.string().trim().min(1).max(200) })
|
|
25529
25550
|
]);
|
|
25530
|
-
var
|
|
25531
|
-
|
|
25532
|
-
|
|
25533
|
-
|
|
25534
|
-
|
|
25535
|
-
|
|
25536
|
-
|
|
25537
|
-
import { z as z36 } from "zod";
|
|
25538
|
-
var AgentMailAttachmentUploadSchema = z36.object({
|
|
25539
|
-
filename: z36.string().min(1).max(255),
|
|
25540
|
-
contentType: z36.string().min(1).max(255),
|
|
25541
|
-
dataBase64: z36.string().min(1).max(28e6)
|
|
25542
|
-
});
|
|
25543
|
-
var CreateAgentMailRequestSchema = z36.object({
|
|
25544
|
-
threadId: z36.string().min(1),
|
|
25545
|
-
subject: z36.string().trim().min(1).max(200),
|
|
25546
|
-
body: z36.string().trim().min(1).max(2e4),
|
|
25547
|
-
senderProvider: z36.string().max(50).nullable(),
|
|
25548
|
-
attachments: z36.array(AgentMailAttachmentUploadSchema).max(8)
|
|
25549
|
-
});
|
|
25550
|
-
|
|
25551
|
-
// ../../packages/crm-api/dist/types/workspaceEmail.js
|
|
25552
|
-
import { z as z37 } from "zod";
|
|
25553
|
-
var GoogleWorkspaceConnectionStatusSchema = z37.enum([
|
|
25554
|
-
"pending_grant",
|
|
25555
|
-
"active",
|
|
25556
|
-
"revoked"
|
|
25557
|
-
]);
|
|
25558
|
-
var EmailAccountDirectoryStatusSchema = z37.enum([
|
|
25559
|
-
"active",
|
|
25560
|
-
"suspended",
|
|
25561
|
-
"removed"
|
|
25551
|
+
var PlaybookCampaignTargetValueSchema = z35.union([
|
|
25552
|
+
z35.object({
|
|
25553
|
+
campaignId: z35.uuid(),
|
|
25554
|
+
campaignName: z35.string().trim().min(1).max(120),
|
|
25555
|
+
campaignPurpose: z35.string().max(2e3).nullish()
|
|
25556
|
+
}),
|
|
25557
|
+
z35.object({ newCampaignName: z35.string().trim().min(1).max(120) })
|
|
25562
25558
|
]);
|
|
25563
|
-
var
|
|
25564
|
-
|
|
25565
|
-
});
|
|
25566
|
-
var UpdateEmailAccountRequestSchema = z37.object({
|
|
25567
|
-
isSendingEnabled: z37.boolean().optional(),
|
|
25568
|
-
dailySendCap: z37.number().int().min(1).max(500).optional()
|
|
25569
|
-
});
|
|
25570
|
-
|
|
25571
|
-
// ../../packages/crm-api/dist/types/mailbox.js
|
|
25572
|
-
import { z as z38 } from "zod";
|
|
25573
|
-
var ConnectCrmMailboxRequestSchema = z38.object({
|
|
25574
|
-
credentialId: z38.string()
|
|
25575
|
-
});
|
|
25576
|
-
var UpdateCrmMailboxRequestSchema = z38.object({
|
|
25577
|
-
isSendingEnabled: z38.boolean().optional(),
|
|
25578
|
-
dailySendCap: z38.number().int().min(1).max(500).optional()
|
|
25579
|
-
});
|
|
25559
|
+
var PlaybookSeedValueSchema = z35.string().trim().min(1).max(2e3);
|
|
25560
|
+
var PlaybookBriefValueSchema = z35.string().trim().min(1).max(2e3);
|
|
25580
25561
|
|
|
25581
25562
|
// ../../packages/api/dist/types/user.js
|
|
25582
|
-
import { z as
|
|
25583
|
-
var UserRoleSchema =
|
|
25563
|
+
import { z as z36 } from "zod";
|
|
25564
|
+
var UserRoleSchema = z36.enum(["God", "Owner", "Admin", "Member"]);
|
|
25584
25565
|
|
|
25585
25566
|
// ../../packages/api/dist/types/credential.js
|
|
25586
|
-
import { z as
|
|
25587
|
-
var CredentialTypeSchema2 =
|
|
25567
|
+
import { z as z37 } from "zod";
|
|
25568
|
+
var CredentialTypeSchema2 = z37.enum([
|
|
25588
25569
|
"oauth2",
|
|
25589
25570
|
"apiKey",
|
|
25590
25571
|
"platform",
|
|
25591
25572
|
"noAuth"
|
|
25592
25573
|
]);
|
|
25593
|
-
var CredentialAuthSourceSchema =
|
|
25574
|
+
var CredentialAuthSourceSchema = z37.enum([
|
|
25594
25575
|
"personal_oauth",
|
|
25595
25576
|
"organization_oauth",
|
|
25596
25577
|
"managed_oauth",
|
|
@@ -25599,8 +25580,8 @@ var CredentialAuthSourceSchema = z40.enum([
|
|
|
25599
25580
|
]);
|
|
25600
25581
|
|
|
25601
25582
|
// ../../packages/api/dist/types/agent.js
|
|
25602
|
-
import { z as
|
|
25603
|
-
var GiAgentMessageTypeSchema =
|
|
25583
|
+
import { z as z38 } from "zod";
|
|
25584
|
+
var GiAgentMessageTypeSchema = z38.enum([
|
|
25604
25585
|
"text",
|
|
25605
25586
|
"tool-call",
|
|
25606
25587
|
"tool-result",
|
|
@@ -25612,7 +25593,7 @@ var GiAgentMessageTypeSchema = z41.enum([
|
|
|
25612
25593
|
// threads still load (an unknown type drops the whole message on read).
|
|
25613
25594
|
"delegating"
|
|
25614
25595
|
]);
|
|
25615
|
-
var GiAgentMessageRoleSchema =
|
|
25596
|
+
var GiAgentMessageRoleSchema = z38.enum([
|
|
25616
25597
|
"user",
|
|
25617
25598
|
"assistant",
|
|
25618
25599
|
"system",
|
|
@@ -25620,215 +25601,215 @@ var GiAgentMessageRoleSchema = z41.enum([
|
|
|
25620
25601
|
"display"
|
|
25621
25602
|
]);
|
|
25622
25603
|
var STORAGE_URI_PREFIX = "store://";
|
|
25623
|
-
var agentStorageUriSchema =
|
|
25604
|
+
var agentStorageUriSchema = z38.string().refine((v) => v.startsWith(STORAGE_URI_PREFIX) || v.startsWith("r2://"), {
|
|
25624
25605
|
message: `Storage URI must start with ${STORAGE_URI_PREFIX}`
|
|
25625
25606
|
});
|
|
25626
|
-
var AgentPersistedImagePartSchema =
|
|
25627
|
-
type:
|
|
25607
|
+
var AgentPersistedImagePartSchema = z38.object({
|
|
25608
|
+
type: z38.literal("image"),
|
|
25628
25609
|
image: agentStorageUriSchema,
|
|
25629
|
-
mimeType:
|
|
25610
|
+
mimeType: z38.string()
|
|
25630
25611
|
}).loose();
|
|
25631
|
-
var AgentPersistedFilePartSchema =
|
|
25632
|
-
type:
|
|
25612
|
+
var AgentPersistedFilePartSchema = z38.object({
|
|
25613
|
+
type: z38.literal("file"),
|
|
25633
25614
|
data: agentStorageUriSchema,
|
|
25634
|
-
mimeType:
|
|
25635
|
-
filename:
|
|
25615
|
+
mimeType: z38.string(),
|
|
25616
|
+
filename: z38.string()
|
|
25636
25617
|
}).loose();
|
|
25637
|
-
var AgentPersistedTextPartSchema =
|
|
25638
|
-
type:
|
|
25639
|
-
text:
|
|
25618
|
+
var AgentPersistedTextPartSchema = z38.object({
|
|
25619
|
+
type: z38.literal("text"),
|
|
25620
|
+
text: z38.string()
|
|
25640
25621
|
}).loose();
|
|
25641
|
-
var AgentPersistedReasoningPartSchema =
|
|
25642
|
-
type:
|
|
25643
|
-
text:
|
|
25622
|
+
var AgentPersistedReasoningPartSchema = z38.object({
|
|
25623
|
+
type: z38.literal("reasoning"),
|
|
25624
|
+
text: z38.string()
|
|
25644
25625
|
}).loose();
|
|
25645
|
-
var AgentPersistedToolCallPartSchema =
|
|
25646
|
-
type:
|
|
25647
|
-
toolCallId:
|
|
25648
|
-
toolName:
|
|
25649
|
-
input:
|
|
25626
|
+
var AgentPersistedToolCallPartSchema = z38.object({
|
|
25627
|
+
type: z38.literal("tool-call"),
|
|
25628
|
+
toolCallId: z38.string(),
|
|
25629
|
+
toolName: z38.string(),
|
|
25630
|
+
input: z38.unknown()
|
|
25650
25631
|
}).loose();
|
|
25651
|
-
var AgentPersistedToolResultPartSchema =
|
|
25652
|
-
type:
|
|
25653
|
-
toolCallId:
|
|
25654
|
-
toolName:
|
|
25655
|
-
output:
|
|
25656
|
-
type:
|
|
25657
|
-
value:
|
|
25632
|
+
var AgentPersistedToolResultPartSchema = z38.object({
|
|
25633
|
+
type: z38.literal("tool-result"),
|
|
25634
|
+
toolCallId: z38.string(),
|
|
25635
|
+
toolName: z38.string(),
|
|
25636
|
+
output: z38.object({
|
|
25637
|
+
type: z38.string(),
|
|
25638
|
+
value: z38.unknown()
|
|
25658
25639
|
}).loose()
|
|
25659
25640
|
}).loose();
|
|
25660
|
-
var AgentPersistedDisplayEventSchema =
|
|
25661
|
-
type:
|
|
25641
|
+
var AgentPersistedDisplayEventSchema = z38.object({
|
|
25642
|
+
type: z38.string()
|
|
25662
25643
|
}).loose();
|
|
25663
|
-
var AgentPersistedUserContentSchema =
|
|
25664
|
-
|
|
25665
|
-
|
|
25666
|
-
|
|
25667
|
-
|
|
25668
|
-
|
|
25669
|
-
type:
|
|
25670
|
-
service:
|
|
25644
|
+
var AgentPersistedUserContentSchema = z38.union([
|
|
25645
|
+
z38.string(),
|
|
25646
|
+
z38.array(z38.union([
|
|
25647
|
+
z38.object({ type: z38.literal("text"), text: z38.string() }).loose(),
|
|
25648
|
+
z38.object({ type: z38.literal("api-mention"), service: z38.string() }).loose(),
|
|
25649
|
+
z38.object({
|
|
25650
|
+
type: z38.literal("platform-api-mention"),
|
|
25651
|
+
service: z38.string()
|
|
25671
25652
|
}).loose(),
|
|
25672
|
-
|
|
25673
|
-
|
|
25674
|
-
type:
|
|
25675
|
-
credentialId:
|
|
25676
|
-
credentialTitle:
|
|
25677
|
-
service:
|
|
25653
|
+
z38.object({ type: z38.literal("trigger-mention"), triggerId: z38.string() }).loose(),
|
|
25654
|
+
z38.object({
|
|
25655
|
+
type: z38.literal("credential-mention"),
|
|
25656
|
+
credentialId: z38.string(),
|
|
25657
|
+
credentialTitle: z38.string(),
|
|
25658
|
+
service: z38.string()
|
|
25678
25659
|
}).loose(),
|
|
25679
|
-
|
|
25680
|
-
type:
|
|
25681
|
-
workflowId:
|
|
25682
|
-
name:
|
|
25660
|
+
z38.object({
|
|
25661
|
+
type: z38.literal("workflow-mention"),
|
|
25662
|
+
workflowId: z38.string(),
|
|
25663
|
+
name: z38.string()
|
|
25683
25664
|
}).loose(),
|
|
25684
|
-
|
|
25685
|
-
type:
|
|
25686
|
-
workflowId:
|
|
25687
|
-
name:
|
|
25665
|
+
z38.object({
|
|
25666
|
+
type: z38.literal("app-mention"),
|
|
25667
|
+
workflowId: z38.string(),
|
|
25668
|
+
name: z38.string()
|
|
25688
25669
|
}).loose(),
|
|
25689
|
-
|
|
25690
|
-
type:
|
|
25691
|
-
skillId:
|
|
25692
|
-
name:
|
|
25670
|
+
z38.object({
|
|
25671
|
+
type: z38.literal("skill-mention"),
|
|
25672
|
+
skillId: z38.string(),
|
|
25673
|
+
name: z38.string()
|
|
25693
25674
|
}).loose(),
|
|
25694
|
-
|
|
25695
|
-
type:
|
|
25696
|
-
name:
|
|
25675
|
+
z38.object({
|
|
25676
|
+
type: z38.literal("platform-skill-mention"),
|
|
25677
|
+
name: z38.string()
|
|
25697
25678
|
}).loose(),
|
|
25698
|
-
|
|
25699
|
-
type:
|
|
25700
|
-
fileId:
|
|
25701
|
-
title:
|
|
25702
|
-
path:
|
|
25679
|
+
z38.object({
|
|
25680
|
+
type: z38.literal("context-file-mention"),
|
|
25681
|
+
fileId: z38.string(),
|
|
25682
|
+
title: z38.string(),
|
|
25683
|
+
path: z38.string()
|
|
25703
25684
|
}).loose(),
|
|
25704
25685
|
AgentPersistedImagePartSchema,
|
|
25705
25686
|
AgentPersistedFilePartSchema
|
|
25706
25687
|
])).min(1)
|
|
25707
25688
|
]);
|
|
25708
|
-
var AgentPersistedAssistantContentSchema =
|
|
25709
|
-
|
|
25710
|
-
|
|
25689
|
+
var AgentPersistedAssistantContentSchema = z38.union([
|
|
25690
|
+
z38.string(),
|
|
25691
|
+
z38.array(z38.union([
|
|
25711
25692
|
AgentPersistedTextPartSchema,
|
|
25712
25693
|
AgentPersistedReasoningPartSchema,
|
|
25713
25694
|
AgentPersistedToolCallPartSchema
|
|
25714
25695
|
])).min(1)
|
|
25715
25696
|
]);
|
|
25716
|
-
var AgentPersistedToolContentSchema =
|
|
25717
|
-
var AgentPersistedSystemContentSchema =
|
|
25718
|
-
var CreateResourceTypeSchema =
|
|
25697
|
+
var AgentPersistedToolContentSchema = z38.array(AgentPersistedToolResultPartSchema).min(1);
|
|
25698
|
+
var AgentPersistedSystemContentSchema = z38.string();
|
|
25699
|
+
var CreateResourceTypeSchema = z38.enum([
|
|
25719
25700
|
"code",
|
|
25720
25701
|
"agent",
|
|
25721
25702
|
"app",
|
|
25722
25703
|
"skill"
|
|
25723
25704
|
]);
|
|
25724
|
-
var QuestionResumePayloadSchema =
|
|
25725
|
-
answer:
|
|
25726
|
-
displayText:
|
|
25705
|
+
var QuestionResumePayloadSchema = z38.object({
|
|
25706
|
+
answer: z38.string(),
|
|
25707
|
+
displayText: z38.string()
|
|
25727
25708
|
});
|
|
25728
|
-
var CreateResourceResumePayloadSchema =
|
|
25729
|
-
action:
|
|
25730
|
-
displayText:
|
|
25709
|
+
var CreateResourceResumePayloadSchema = z38.object({
|
|
25710
|
+
action: z38.enum(["create", "cancel"]),
|
|
25711
|
+
displayText: z38.string()
|
|
25731
25712
|
});
|
|
25732
|
-
var RunWorkflowResumePayloadSchema =
|
|
25733
|
-
action:
|
|
25734
|
-
displayText:
|
|
25713
|
+
var RunWorkflowResumePayloadSchema = z38.object({
|
|
25714
|
+
action: z38.enum(["run", "cancel"]),
|
|
25715
|
+
displayText: z38.string()
|
|
25735
25716
|
});
|
|
25736
|
-
var ConnectCredentialForAccountResumePayloadSchema =
|
|
25737
|
-
credentialId:
|
|
25738
|
-
displayText:
|
|
25717
|
+
var ConnectCredentialForAccountResumePayloadSchema = z38.object({
|
|
25718
|
+
credentialId: z38.string().nullable(),
|
|
25719
|
+
displayText: z38.string()
|
|
25739
25720
|
});
|
|
25740
|
-
var CrmApprovalResumePayloadSchema =
|
|
25741
|
-
decision:
|
|
25742
|
-
displayText:
|
|
25721
|
+
var CrmApprovalResumePayloadSchema = z38.object({
|
|
25722
|
+
decision: z38.enum(["approve", "deny"]),
|
|
25723
|
+
displayText: z38.string()
|
|
25743
25724
|
});
|
|
25744
|
-
var HumanInputResumePayloadSchema =
|
|
25725
|
+
var HumanInputResumePayloadSchema = z38.union([
|
|
25745
25726
|
QuestionResumePayloadSchema,
|
|
25746
25727
|
CreateResourceResumePayloadSchema,
|
|
25747
25728
|
RunWorkflowResumePayloadSchema,
|
|
25748
25729
|
ConnectCredentialForAccountResumePayloadSchema,
|
|
25749
25730
|
CrmApprovalResumePayloadSchema
|
|
25750
25731
|
]);
|
|
25751
|
-
var AgentUserContentSegmentSchema =
|
|
25752
|
-
|
|
25753
|
-
|
|
25754
|
-
type:
|
|
25755
|
-
service:
|
|
25756
|
-
inlinedText:
|
|
25732
|
+
var AgentUserContentSegmentSchema = z38.discriminatedUnion("type", [
|
|
25733
|
+
z38.object({ type: z38.literal("text"), text: z38.string() }),
|
|
25734
|
+
z38.object({
|
|
25735
|
+
type: z38.literal("api-mention"),
|
|
25736
|
+
service: z38.string(),
|
|
25737
|
+
inlinedText: z38.string().optional()
|
|
25757
25738
|
}),
|
|
25758
|
-
|
|
25759
|
-
type:
|
|
25760
|
-
service:
|
|
25761
|
-
inlinedText:
|
|
25739
|
+
z38.object({
|
|
25740
|
+
type: z38.literal("platform-api-mention"),
|
|
25741
|
+
service: z38.string(),
|
|
25742
|
+
inlinedText: z38.string().optional()
|
|
25762
25743
|
}),
|
|
25763
|
-
|
|
25764
|
-
type:
|
|
25765
|
-
triggerId:
|
|
25766
|
-
inlinedText:
|
|
25744
|
+
z38.object({
|
|
25745
|
+
type: z38.literal("trigger-mention"),
|
|
25746
|
+
triggerId: z38.string(),
|
|
25747
|
+
inlinedText: z38.string().optional()
|
|
25767
25748
|
}),
|
|
25768
|
-
|
|
25769
|
-
type:
|
|
25770
|
-
credentialId:
|
|
25771
|
-
credentialTitle:
|
|
25772
|
-
service:
|
|
25773
|
-
inlinedText:
|
|
25749
|
+
z38.object({
|
|
25750
|
+
type: z38.literal("credential-mention"),
|
|
25751
|
+
credentialId: z38.string(),
|
|
25752
|
+
credentialTitle: z38.string(),
|
|
25753
|
+
service: z38.string(),
|
|
25754
|
+
inlinedText: z38.string().optional()
|
|
25774
25755
|
}),
|
|
25775
|
-
|
|
25776
|
-
type:
|
|
25777
|
-
workflowId:
|
|
25778
|
-
name:
|
|
25779
|
-
inlinedText:
|
|
25756
|
+
z38.object({
|
|
25757
|
+
type: z38.literal("workflow-mention"),
|
|
25758
|
+
workflowId: z38.string(),
|
|
25759
|
+
name: z38.string(),
|
|
25760
|
+
inlinedText: z38.string().optional()
|
|
25780
25761
|
}),
|
|
25781
|
-
|
|
25782
|
-
type:
|
|
25783
|
-
workflowId:
|
|
25784
|
-
name:
|
|
25785
|
-
inlinedText:
|
|
25762
|
+
z38.object({
|
|
25763
|
+
type: z38.literal("app-mention"),
|
|
25764
|
+
workflowId: z38.string(),
|
|
25765
|
+
name: z38.string(),
|
|
25766
|
+
inlinedText: z38.string().optional()
|
|
25786
25767
|
}),
|
|
25787
|
-
|
|
25788
|
-
type:
|
|
25789
|
-
skillId:
|
|
25790
|
-
name:
|
|
25791
|
-
inlinedText:
|
|
25768
|
+
z38.object({
|
|
25769
|
+
type: z38.literal("skill-mention"),
|
|
25770
|
+
skillId: z38.string(),
|
|
25771
|
+
name: z38.string(),
|
|
25772
|
+
inlinedText: z38.string().optional()
|
|
25792
25773
|
}),
|
|
25793
25774
|
// A platform-provided skill (ships in code, no DB row) — keyed by slug name.
|
|
25794
|
-
|
|
25795
|
-
type:
|
|
25796
|
-
name:
|
|
25797
|
-
inlinedText:
|
|
25775
|
+
z38.object({
|
|
25776
|
+
type: z38.literal("platform-skill-mention"),
|
|
25777
|
+
name: z38.string(),
|
|
25778
|
+
inlinedText: z38.string().optional()
|
|
25798
25779
|
}),
|
|
25799
|
-
|
|
25800
|
-
type:
|
|
25801
|
-
fileId:
|
|
25802
|
-
title:
|
|
25780
|
+
z38.object({
|
|
25781
|
+
type: z38.literal("context-file-mention"),
|
|
25782
|
+
fileId: z38.string(),
|
|
25783
|
+
title: z38.string(),
|
|
25803
25784
|
/** Agent-workspace path, e.g. `knowledge-base/org/company-overview.md`. */
|
|
25804
|
-
path:
|
|
25805
|
-
inlinedText:
|
|
25785
|
+
path: z38.string(),
|
|
25786
|
+
inlinedText: z38.string().optional()
|
|
25806
25787
|
})
|
|
25807
25788
|
]);
|
|
25808
|
-
var AgentUserContentSchema =
|
|
25809
|
-
var MessageAttachmentSchema =
|
|
25810
|
-
type:
|
|
25811
|
-
key:
|
|
25812
|
-
mimeType:
|
|
25813
|
-
filename:
|
|
25789
|
+
var AgentUserContentSchema = z38.array(AgentUserContentSegmentSchema).min(1);
|
|
25790
|
+
var MessageAttachmentSchema = z38.object({
|
|
25791
|
+
type: z38.enum(["image", "file"]),
|
|
25792
|
+
key: z38.string(),
|
|
25793
|
+
mimeType: z38.string(),
|
|
25794
|
+
filename: z38.string()
|
|
25814
25795
|
});
|
|
25815
25796
|
|
|
25816
25797
|
// ../../packages/api/dist/types/balance.js
|
|
25817
|
-
import { z as
|
|
25818
|
-
var UpdateAutofillSettingsRequestSchema =
|
|
25819
|
-
|
|
25820
|
-
enabled:
|
|
25821
|
-
targetCredits:
|
|
25822
|
-
thresholdCredits:
|
|
25798
|
+
import { z as z39 } from "zod";
|
|
25799
|
+
var UpdateAutofillSettingsRequestSchema = z39.discriminatedUnion("enabled", [
|
|
25800
|
+
z39.object({
|
|
25801
|
+
enabled: z39.literal(true),
|
|
25802
|
+
targetCredits: z39.number().positive(),
|
|
25803
|
+
thresholdCredits: z39.number().nonnegative()
|
|
25823
25804
|
}),
|
|
25824
|
-
|
|
25825
|
-
enabled:
|
|
25805
|
+
z39.object({
|
|
25806
|
+
enabled: z39.literal(false)
|
|
25826
25807
|
})
|
|
25827
25808
|
]);
|
|
25828
25809
|
|
|
25829
25810
|
// ../../packages/api/dist/types/usage.js
|
|
25830
|
-
import { z as
|
|
25831
|
-
var UsageEventTypeSchema =
|
|
25811
|
+
import { z as z40 } from "zod";
|
|
25812
|
+
var UsageEventTypeSchema = z40.enum([
|
|
25832
25813
|
"llm_cost",
|
|
25833
25814
|
"agent_llm_cost",
|
|
25834
25815
|
"sandbox_runtime",
|
|
@@ -25843,16 +25824,17 @@ var UsageEventTypeSchema = z43.enum([
|
|
|
25843
25824
|
"financial_research",
|
|
25844
25825
|
"stock_data",
|
|
25845
25826
|
"send_email",
|
|
25846
|
-
"user_database"
|
|
25827
|
+
"user_database",
|
|
25828
|
+
"voice_transcription"
|
|
25847
25829
|
]);
|
|
25848
25830
|
|
|
25849
25831
|
// ../../packages/api/dist/types/dashboard.js
|
|
25850
|
-
import { z as
|
|
25851
|
-
var DashboardArtifactLayoutSchema =
|
|
25852
|
-
x:
|
|
25853
|
-
y:
|
|
25854
|
-
w:
|
|
25855
|
-
h:
|
|
25832
|
+
import { z as z41 } from "zod";
|
|
25833
|
+
var DashboardArtifactLayoutSchema = z41.object({
|
|
25834
|
+
x: z41.number().int().min(0),
|
|
25835
|
+
y: z41.number().int().min(0),
|
|
25836
|
+
w: z41.number().int().min(1),
|
|
25837
|
+
h: z41.number().int().min(1)
|
|
25856
25838
|
});
|
|
25857
25839
|
|
|
25858
25840
|
// ../../packages/api/dist/types/permission.js
|
|
@@ -26004,23 +25986,23 @@ var WORKFLOW_PERMISSION_ROLE_FLOOR = {
|
|
|
26004
25986
|
};
|
|
26005
25987
|
|
|
26006
25988
|
// ../../packages/api/dist/types/audit.js
|
|
26007
|
-
import { z as
|
|
26008
|
-
var AuditWindowSchema =
|
|
25989
|
+
import { z as z42 } from "zod";
|
|
25990
|
+
var AuditWindowSchema = z42.enum(["1d", "3d", "7d"]);
|
|
26009
25991
|
|
|
26010
25992
|
// ../../packages/api/dist/types/membershipApiKey.js
|
|
26011
|
-
import { z as
|
|
25993
|
+
import { z as z43 } from "zod";
|
|
26012
25994
|
var API_KEY_SCOPES = ["all"];
|
|
26013
|
-
var ApiKeyScopeSchema =
|
|
26014
|
-
var CreateMembershipApiKeyRequestSchema =
|
|
26015
|
-
name:
|
|
26016
|
-
scopes:
|
|
25995
|
+
var ApiKeyScopeSchema = z43.enum(API_KEY_SCOPES);
|
|
25996
|
+
var CreateMembershipApiKeyRequestSchema = z43.object({
|
|
25997
|
+
name: z43.string().min(1).max(255),
|
|
25998
|
+
scopes: z43.array(ApiKeyScopeSchema).min(1).default(["all"])
|
|
26017
25999
|
});
|
|
26018
26000
|
|
|
26019
26001
|
// ../../packages/api/dist/types/notification.js
|
|
26020
|
-
import { z as
|
|
26021
|
-
var NotificationChannelProvider =
|
|
26022
|
-
var NotificationDeliveryChannel =
|
|
26023
|
-
var NotificationType =
|
|
26002
|
+
import { z as z44 } from "zod";
|
|
26003
|
+
var NotificationChannelProvider = z44.enum(["slack"]);
|
|
26004
|
+
var NotificationDeliveryChannel = z44.enum(["email", "slack"]);
|
|
26005
|
+
var NotificationType = z44.enum([
|
|
26024
26006
|
"workflow_auto_disabled",
|
|
26025
26007
|
"trigger_failed",
|
|
26026
26008
|
"balance_auto_refilled",
|
|
@@ -26032,78 +26014,78 @@ var NotificationType = z47.enum([
|
|
|
26032
26014
|
"crm_reply_received",
|
|
26033
26015
|
"crm_task_due"
|
|
26034
26016
|
]);
|
|
26035
|
-
var NotificationPreferencesSchema =
|
|
26036
|
-
var WorkflowAutoDisabledPayloadSchema =
|
|
26037
|
-
type:
|
|
26038
|
-
workflowId:
|
|
26039
|
-
workflowName:
|
|
26040
|
-
reason:
|
|
26017
|
+
var NotificationPreferencesSchema = z44.record(NotificationType, z44.array(NotificationDeliveryChannel));
|
|
26018
|
+
var WorkflowAutoDisabledPayloadSchema = z44.object({
|
|
26019
|
+
type: z44.literal("workflow_auto_disabled"),
|
|
26020
|
+
workflowId: z44.string(),
|
|
26021
|
+
workflowName: z44.string(),
|
|
26022
|
+
reason: z44.string()
|
|
26041
26023
|
});
|
|
26042
|
-
var TriggerFailedPayloadSchema =
|
|
26043
|
-
type:
|
|
26044
|
-
workflowId:
|
|
26045
|
-
workflowName:
|
|
26046
|
-
triggerId:
|
|
26047
|
-
reason:
|
|
26024
|
+
var TriggerFailedPayloadSchema = z44.object({
|
|
26025
|
+
type: z44.literal("trigger_failed"),
|
|
26026
|
+
workflowId: z44.string(),
|
|
26027
|
+
workflowName: z44.string(),
|
|
26028
|
+
triggerId: z44.string(),
|
|
26029
|
+
reason: z44.string()
|
|
26048
26030
|
});
|
|
26049
|
-
var BalanceAutoRefilledPayloadSchema =
|
|
26050
|
-
type:
|
|
26051
|
-
amountDollars:
|
|
26052
|
-
newBalanceDollars:
|
|
26031
|
+
var BalanceAutoRefilledPayloadSchema = z44.object({
|
|
26032
|
+
type: z44.literal("balance_auto_refilled"),
|
|
26033
|
+
amountDollars: z44.number(),
|
|
26034
|
+
newBalanceDollars: z44.number()
|
|
26053
26035
|
});
|
|
26054
|
-
var BalanceLowPayloadSchema =
|
|
26055
|
-
type:
|
|
26056
|
-
balanceDollars:
|
|
26036
|
+
var BalanceLowPayloadSchema = z44.object({
|
|
26037
|
+
type: z44.literal("balance_low"),
|
|
26038
|
+
balanceDollars: z44.number()
|
|
26057
26039
|
});
|
|
26058
|
-
var CredentialRevokedPayloadSchema =
|
|
26059
|
-
type:
|
|
26060
|
-
credentialTitle:
|
|
26061
|
-
service:
|
|
26040
|
+
var CredentialRevokedPayloadSchema = z44.object({
|
|
26041
|
+
type: z44.literal("credential_revoked"),
|
|
26042
|
+
credentialTitle: z44.string(),
|
|
26043
|
+
service: z44.string()
|
|
26062
26044
|
});
|
|
26063
|
-
var WorkflowSharedPayloadSchema =
|
|
26064
|
-
type:
|
|
26065
|
-
workflowId:
|
|
26066
|
-
workflowName:
|
|
26045
|
+
var WorkflowSharedPayloadSchema = z44.object({
|
|
26046
|
+
type: z44.literal("workflow_shared"),
|
|
26047
|
+
workflowId: z44.string(),
|
|
26048
|
+
workflowName: z44.string(),
|
|
26067
26049
|
/** The role the recipient was granted (`viewer` or `runner`).
|
|
26068
26050
|
* Stored as a plain string so this schema doesn't have to import
|
|
26069
26051
|
* the workflow-collaborator role enum and stay in lock-step with
|
|
26070
26052
|
* it. The email service maps it to friendly copy. */
|
|
26071
|
-
role:
|
|
26053
|
+
role: z44.string(),
|
|
26072
26054
|
/** Display name (or email fallback) of the user who shared. Used
|
|
26073
26055
|
* in the email subject + subtitle copy. */
|
|
26074
|
-
sharedByName:
|
|
26056
|
+
sharedByName: z44.string()
|
|
26075
26057
|
});
|
|
26076
|
-
var CredentialSharedPayloadSchema =
|
|
26077
|
-
type:
|
|
26078
|
-
credentialId:
|
|
26079
|
-
credentialTitle:
|
|
26080
|
-
service:
|
|
26058
|
+
var CredentialSharedPayloadSchema = z44.object({
|
|
26059
|
+
type: z44.literal("credential_shared"),
|
|
26060
|
+
credentialId: z44.string(),
|
|
26061
|
+
credentialTitle: z44.string(),
|
|
26062
|
+
service: z44.string(),
|
|
26081
26063
|
/** Display name (or email fallback) of the user who shared. */
|
|
26082
|
-
sharedByName:
|
|
26064
|
+
sharedByName: z44.string()
|
|
26083
26065
|
});
|
|
26084
|
-
var DatabaseSharedPayloadSchema =
|
|
26085
|
-
type:
|
|
26086
|
-
databaseId:
|
|
26087
|
-
databaseName:
|
|
26066
|
+
var DatabaseSharedPayloadSchema = z44.object({
|
|
26067
|
+
type: z44.literal("database_shared"),
|
|
26068
|
+
databaseId: z44.string(),
|
|
26069
|
+
databaseName: z44.string(),
|
|
26088
26070
|
/** The role the recipient was granted. Stored as a plain string so
|
|
26089
26071
|
* this schema doesn't import the database-collaborator role enum. */
|
|
26090
|
-
role:
|
|
26072
|
+
role: z44.string(),
|
|
26091
26073
|
/** Display name (or email fallback) of the user who shared. */
|
|
26092
|
-
sharedByName:
|
|
26074
|
+
sharedByName: z44.string()
|
|
26093
26075
|
});
|
|
26094
|
-
var CrmReplyReceivedPayloadSchema =
|
|
26095
|
-
type:
|
|
26096
|
-
conversationId:
|
|
26076
|
+
var CrmReplyReceivedPayloadSchema = z44.object({
|
|
26077
|
+
type: z44.literal("crm_reply_received"),
|
|
26078
|
+
conversationId: z44.string(),
|
|
26097
26079
|
/** Person's display name, or their email address as a fallback. */
|
|
26098
|
-
fromName:
|
|
26099
|
-
preview:
|
|
26080
|
+
fromName: z44.string(),
|
|
26081
|
+
preview: z44.string()
|
|
26100
26082
|
});
|
|
26101
|
-
var CrmTaskDuePayloadSchema =
|
|
26102
|
-
type:
|
|
26103
|
-
taskId:
|
|
26104
|
-
taskTitle:
|
|
26083
|
+
var CrmTaskDuePayloadSchema = z44.object({
|
|
26084
|
+
type: z44.literal("crm_task_due"),
|
|
26085
|
+
taskId: z44.string(),
|
|
26086
|
+
taskTitle: z44.string()
|
|
26105
26087
|
});
|
|
26106
|
-
var NotificationPayloadSchema =
|
|
26088
|
+
var NotificationPayloadSchema = z44.discriminatedUnion("type", [
|
|
26107
26089
|
WorkflowAutoDisabledPayloadSchema,
|
|
26108
26090
|
TriggerFailedPayloadSchema,
|
|
26109
26091
|
BalanceAutoRefilledPayloadSchema,
|
|
@@ -26115,11 +26097,11 @@ var NotificationPayloadSchema = z47.discriminatedUnion("type", [
|
|
|
26115
26097
|
CrmReplyReceivedPayloadSchema,
|
|
26116
26098
|
CrmTaskDuePayloadSchema
|
|
26117
26099
|
]);
|
|
26118
|
-
var ConnectNotificationChannelRequestSchema =
|
|
26119
|
-
credentialId:
|
|
26100
|
+
var ConnectNotificationChannelRequestSchema = z44.object({
|
|
26101
|
+
credentialId: z44.string().min(1)
|
|
26120
26102
|
});
|
|
26121
|
-
var SetNotificationChannelAddressRequestSchema =
|
|
26122
|
-
address:
|
|
26103
|
+
var SetNotificationChannelAddressRequestSchema = z44.object({
|
|
26104
|
+
address: z44.string().min(1)
|
|
26123
26105
|
});
|
|
26124
26106
|
|
|
26125
26107
|
// ../../packages/api/dist/types/organizationOAuthConnection.js
|
|
@@ -26362,6 +26344,11 @@ var OAUTH_PROVIDER_GROUPS = {
|
|
|
26362
26344
|
title: "Bullhorn",
|
|
26363
26345
|
iconUrl: "https://icons.generalinput.com/bullhorn.png",
|
|
26364
26346
|
services: ["bullhorn"]
|
|
26347
|
+
},
|
|
26348
|
+
videoask: {
|
|
26349
|
+
title: "VideoAsk",
|
|
26350
|
+
iconUrl: "https://icons.generalinput.com/videoask.png",
|
|
26351
|
+
services: ["videoask"]
|
|
26365
26352
|
}
|
|
26366
26353
|
};
|
|
26367
26354
|
|
|
@@ -26385,143 +26372,153 @@ var PERSONAL_OAUTH_PROVIDER_GROUPS = {
|
|
|
26385
26372
|
};
|
|
26386
26373
|
|
|
26387
26374
|
// ../../packages/api/dist/types/prompt.js
|
|
26388
|
-
import { z as
|
|
26389
|
-
var PromptWorkflowTypeSchema =
|
|
26390
|
-
var PromptStatusSchema =
|
|
26391
|
-
var PromptCachedServiceSchema =
|
|
26392
|
-
slug:
|
|
26393
|
-
name:
|
|
26394
|
-
iconUrl:
|
|
26395
|
-
category:
|
|
26375
|
+
import { z as z45 } from "zod";
|
|
26376
|
+
var PromptWorkflowTypeSchema = z45.enum(["code", "agent"]);
|
|
26377
|
+
var PromptStatusSchema = z45.enum(["draft", "published"]);
|
|
26378
|
+
var PromptCachedServiceSchema = z45.object({
|
|
26379
|
+
slug: z45.string(),
|
|
26380
|
+
name: z45.string(),
|
|
26381
|
+
iconUrl: z45.string(),
|
|
26382
|
+
category: z45.string().optional()
|
|
26396
26383
|
});
|
|
26397
|
-
var PromptIntegrationSchema =
|
|
26398
|
-
service:
|
|
26399
|
-
title:
|
|
26400
|
-
iconUrl:
|
|
26384
|
+
var PromptIntegrationSchema = z45.object({
|
|
26385
|
+
service: z45.string(),
|
|
26386
|
+
title: z45.string(),
|
|
26387
|
+
iconUrl: z45.string()
|
|
26401
26388
|
});
|
|
26402
|
-
var PromptFaqSchema =
|
|
26403
|
-
question:
|
|
26404
|
-
answer:
|
|
26389
|
+
var PromptFaqSchema = z45.object({
|
|
26390
|
+
question: z45.string(),
|
|
26391
|
+
answer: z45.string()
|
|
26405
26392
|
});
|
|
26406
|
-
var PromptExampleOutputSchema =
|
|
26407
|
-
kind:
|
|
26408
|
-
value:
|
|
26393
|
+
var PromptExampleOutputSchema = z45.object({
|
|
26394
|
+
kind: z45.enum(["text", "image"]),
|
|
26395
|
+
value: z45.string()
|
|
26409
26396
|
});
|
|
26410
|
-
var PromptCategorySchema =
|
|
26411
|
-
id:
|
|
26412
|
-
slug:
|
|
26413
|
-
name:
|
|
26414
|
-
description:
|
|
26415
|
-
ogImageUrl:
|
|
26416
|
-
icon:
|
|
26417
|
-
sortOrder:
|
|
26418
|
-
updatedAt:
|
|
26397
|
+
var PromptCategorySchema = z45.object({
|
|
26398
|
+
id: z45.string(),
|
|
26399
|
+
slug: z45.string(),
|
|
26400
|
+
name: z45.string(),
|
|
26401
|
+
description: z45.string().nullable(),
|
|
26402
|
+
ogImageUrl: z45.string().nullable(),
|
|
26403
|
+
icon: z45.string(),
|
|
26404
|
+
sortOrder: z45.number(),
|
|
26405
|
+
updatedAt: z45.string()
|
|
26419
26406
|
});
|
|
26420
|
-
var PromptUseCaseSchema =
|
|
26421
|
-
id:
|
|
26422
|
-
slug:
|
|
26423
|
-
name:
|
|
26424
|
-
description:
|
|
26425
|
-
ogImageUrl:
|
|
26426
|
-
icon:
|
|
26427
|
-
sortOrder:
|
|
26428
|
-
updatedAt:
|
|
26407
|
+
var PromptUseCaseSchema = z45.object({
|
|
26408
|
+
id: z45.string(),
|
|
26409
|
+
slug: z45.string(),
|
|
26410
|
+
name: z45.string(),
|
|
26411
|
+
description: z45.string().nullable(),
|
|
26412
|
+
ogImageUrl: z45.string().nullable(),
|
|
26413
|
+
icon: z45.string(),
|
|
26414
|
+
sortOrder: z45.number(),
|
|
26415
|
+
updatedAt: z45.string()
|
|
26429
26416
|
});
|
|
26430
|
-
var PromptSummarySchema =
|
|
26431
|
-
id:
|
|
26432
|
-
slug:
|
|
26433
|
-
title:
|
|
26434
|
-
subtitle:
|
|
26435
|
-
ogImageUrl:
|
|
26417
|
+
var PromptSummarySchema = z45.object({
|
|
26418
|
+
id: z45.string(),
|
|
26419
|
+
slug: z45.string(),
|
|
26420
|
+
title: z45.string(),
|
|
26421
|
+
subtitle: z45.string(),
|
|
26422
|
+
ogImageUrl: z45.string().nullable(),
|
|
26436
26423
|
workflowType: PromptWorkflowTypeSchema,
|
|
26437
26424
|
status: PromptStatusSchema,
|
|
26438
|
-
services:
|
|
26439
|
-
publishedAt:
|
|
26440
|
-
updatedAt:
|
|
26425
|
+
services: z45.array(PromptCachedServiceSchema),
|
|
26426
|
+
publishedAt: z45.string().nullable(),
|
|
26427
|
+
updatedAt: z45.string()
|
|
26441
26428
|
});
|
|
26442
|
-
var PromptDetailSchema =
|
|
26443
|
-
id:
|
|
26444
|
-
slug:
|
|
26445
|
-
title:
|
|
26446
|
-
metaTitle:
|
|
26447
|
-
subtitle:
|
|
26448
|
-
whatItDoes:
|
|
26449
|
-
whatYoullNeed:
|
|
26450
|
-
howToCustomize:
|
|
26451
|
-
promptDoc:
|
|
26429
|
+
var PromptDetailSchema = z45.object({
|
|
26430
|
+
id: z45.string(),
|
|
26431
|
+
slug: z45.string(),
|
|
26432
|
+
title: z45.string(),
|
|
26433
|
+
metaTitle: z45.string().nullable(),
|
|
26434
|
+
subtitle: z45.string(),
|
|
26435
|
+
whatItDoes: z45.array(z45.string()),
|
|
26436
|
+
whatYoullNeed: z45.array(z45.string()),
|
|
26437
|
+
howToCustomize: z45.array(z45.string()),
|
|
26438
|
+
promptDoc: z45.unknown(),
|
|
26452
26439
|
exampleOutput: PromptExampleOutputSchema.nullable(),
|
|
26453
|
-
faqs:
|
|
26454
|
-
ctaTitle:
|
|
26455
|
-
ctaDescription:
|
|
26456
|
-
ogImageUrl:
|
|
26457
|
-
services:
|
|
26440
|
+
faqs: z45.array(PromptFaqSchema),
|
|
26441
|
+
ctaTitle: z45.string().nullable(),
|
|
26442
|
+
ctaDescription: z45.string().nullable(),
|
|
26443
|
+
ogImageUrl: z45.string().nullable(),
|
|
26444
|
+
services: z45.array(PromptCachedServiceSchema),
|
|
26458
26445
|
workflowType: PromptWorkflowTypeSchema,
|
|
26459
26446
|
status: PromptStatusSchema,
|
|
26460
|
-
categories:
|
|
26461
|
-
useCases:
|
|
26462
|
-
relatedPrompts:
|
|
26463
|
-
publishedAt:
|
|
26447
|
+
categories: z45.array(PromptCategorySchema),
|
|
26448
|
+
useCases: z45.array(PromptUseCaseSchema),
|
|
26449
|
+
relatedPrompts: z45.array(PromptSummarySchema),
|
|
26450
|
+
publishedAt: z45.string().nullable()
|
|
26451
|
+
});
|
|
26452
|
+
|
|
26453
|
+
// ../../packages/api/dist/types/voiceDictation.js
|
|
26454
|
+
import { z as z46 } from "zod";
|
|
26455
|
+
var VoiceDictationSessionEndRequestSchema = z46.object({
|
|
26456
|
+
audioSeconds: z46.number().positive().max(900)
|
|
26457
|
+
});
|
|
26458
|
+
var VoiceDictationComposeRequestSchema = z46.object({
|
|
26459
|
+
existingText: z46.string().max(5e4),
|
|
26460
|
+
transcript: z46.string().trim().min(1).max(5e4)
|
|
26464
26461
|
});
|
|
26465
26462
|
|
|
26466
26463
|
// ../../packages/api/dist/types/globalSearch.js
|
|
26467
|
-
import { z as
|
|
26468
|
-
var GlobalSearchRequestSchema2 =
|
|
26469
|
-
query:
|
|
26464
|
+
import { z as z47 } from "zod";
|
|
26465
|
+
var GlobalSearchRequestSchema2 = z47.object({
|
|
26466
|
+
query: z47.string().min(1).max(200),
|
|
26470
26467
|
// Per-entity cap; the response holds up to one block of this many per type.
|
|
26471
|
-
limitPerType:
|
|
26468
|
+
limitPerType: z47.number().int().min(1).max(20).default(6)
|
|
26472
26469
|
});
|
|
26473
|
-
var GlobalSearchRecentsRequestSchema =
|
|
26474
|
-
limitPerType:
|
|
26470
|
+
var GlobalSearchRecentsRequestSchema = z47.object({
|
|
26471
|
+
limitPerType: z47.number().int().min(1).max(20).default(5)
|
|
26475
26472
|
});
|
|
26476
26473
|
|
|
26477
26474
|
// ../../packages/api/dist/types/commandCenter.js
|
|
26478
|
-
import { z as
|
|
26479
|
-
var CommandCenterTileLayoutSchema =
|
|
26480
|
-
x:
|
|
26481
|
-
y:
|
|
26482
|
-
w:
|
|
26483
|
-
h:
|
|
26475
|
+
import { z as z48 } from "zod";
|
|
26476
|
+
var CommandCenterTileLayoutSchema = z48.object({
|
|
26477
|
+
x: z48.number().int().min(0),
|
|
26478
|
+
y: z48.number().int().min(0),
|
|
26479
|
+
w: z48.number().int().min(1),
|
|
26480
|
+
h: z48.number().int().min(1)
|
|
26484
26481
|
});
|
|
26485
26482
|
|
|
26486
26483
|
// ../../packages/api/dist/types/cli/exec.js
|
|
26487
|
-
import { z as
|
|
26488
|
-
var CodeExecutionOutputLineSchema =
|
|
26489
|
-
|
|
26490
|
-
type:
|
|
26491
|
-
level:
|
|
26492
|
-
message:
|
|
26493
|
-
data:
|
|
26484
|
+
import { z as z49 } from "zod";
|
|
26485
|
+
var CodeExecutionOutputLineSchema = z49.discriminatedUnion("type", [
|
|
26486
|
+
z49.object({
|
|
26487
|
+
type: z49.literal("log"),
|
|
26488
|
+
level: z49.enum(["info", "warn", "error"]),
|
|
26489
|
+
message: z49.string(),
|
|
26490
|
+
data: z49.unknown().optional()
|
|
26494
26491
|
}),
|
|
26495
|
-
|
|
26496
|
-
type:
|
|
26497
|
-
data:
|
|
26492
|
+
z49.object({
|
|
26493
|
+
type: z49.literal("result"),
|
|
26494
|
+
data: z49.unknown()
|
|
26498
26495
|
}),
|
|
26499
|
-
|
|
26500
|
-
type:
|
|
26501
|
-
error:
|
|
26502
|
-
stack:
|
|
26496
|
+
z49.object({
|
|
26497
|
+
type: z49.literal("error"),
|
|
26498
|
+
error: z49.string(),
|
|
26499
|
+
stack: z49.string().optional()
|
|
26503
26500
|
})
|
|
26504
26501
|
]);
|
|
26505
|
-
var CodeExecutionResultSchema =
|
|
26506
|
-
|
|
26507
|
-
success:
|
|
26508
|
-
result:
|
|
26509
|
-
logs:
|
|
26510
|
-
level:
|
|
26511
|
-
message:
|
|
26512
|
-
data:
|
|
26502
|
+
var CodeExecutionResultSchema = z49.discriminatedUnion("success", [
|
|
26503
|
+
z49.object({
|
|
26504
|
+
success: z49.literal(true),
|
|
26505
|
+
result: z49.unknown(),
|
|
26506
|
+
logs: z49.array(z49.object({
|
|
26507
|
+
level: z49.string(),
|
|
26508
|
+
message: z49.string(),
|
|
26509
|
+
data: z49.unknown().optional()
|
|
26513
26510
|
})),
|
|
26514
|
-
stderr:
|
|
26511
|
+
stderr: z49.string().optional()
|
|
26515
26512
|
}),
|
|
26516
|
-
|
|
26517
|
-
success:
|
|
26518
|
-
error:
|
|
26519
|
-
logs:
|
|
26520
|
-
level:
|
|
26521
|
-
message:
|
|
26522
|
-
data:
|
|
26513
|
+
z49.object({
|
|
26514
|
+
success: z49.literal(false),
|
|
26515
|
+
error: z49.string(),
|
|
26516
|
+
logs: z49.array(z49.object({
|
|
26517
|
+
level: z49.string(),
|
|
26518
|
+
message: z49.string(),
|
|
26519
|
+
data: z49.unknown().optional()
|
|
26523
26520
|
})),
|
|
26524
|
-
stderr:
|
|
26521
|
+
stderr: z49.string().optional()
|
|
26525
26522
|
})
|
|
26526
26523
|
]);
|
|
26527
26524
|
|
|
@@ -26550,7 +26547,7 @@ function parseLeadFilterArg(raw) {
|
|
|
26550
26547
|
printError(`Invalid --filter: not valid JSON. Example: ${FILTER_EXAMPLE}`);
|
|
26551
26548
|
exit(ExitCode.InternalError);
|
|
26552
26549
|
}
|
|
26553
|
-
const parsed =
|
|
26550
|
+
const parsed = z50.array(LeadFilterConditionSchema).safeParse(value);
|
|
26554
26551
|
if (!parsed.success) {
|
|
26555
26552
|
const issue = parsed.error.issues[0];
|
|
26556
26553
|
const path = issue?.path.map(String).join(".");
|
|
@@ -27698,35 +27695,187 @@ function registerCrmContactPoints(parent) {
|
|
|
27698
27695
|
});
|
|
27699
27696
|
}
|
|
27700
27697
|
|
|
27701
|
-
// src/commands/crm/
|
|
27702
|
-
|
|
27703
|
-
"
|
|
27704
|
-
|
|
27705
|
-
"
|
|
27706
|
-
|
|
27707
|
-
|
|
27708
|
-
"
|
|
27709
|
-
|
|
27710
|
-
|
|
27711
|
-
|
|
27712
|
-
|
|
27713
|
-
|
|
27714
|
-
|
|
27715
|
-
|
|
27716
|
-
|
|
27698
|
+
// src/commands/crm/campaigns.ts
|
|
27699
|
+
function registerCrmCampaigns(parent) {
|
|
27700
|
+
const campaigns = parent.command("campaigns").description(
|
|
27701
|
+
"List outbound campaigns (default), or get / create / update / delete them and manage members. Syncing to a sequencer happens in the dashboard."
|
|
27702
|
+
).argument("[query]", "Match campaign name or purpose.").option("--person <id>", "List this person's campaigns instead.").option("--json", "Machine-readable output.").action(
|
|
27703
|
+
(query, opts) => executeCampaignsList(query, opts)
|
|
27704
|
+
);
|
|
27705
|
+
campaigns.command("get").argument("<id>", "Campaign id.").description(
|
|
27706
|
+
"One campaign with member and sequence rollups. Use --field to extract a value (e.g. purpose)."
|
|
27707
|
+
).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
|
|
27708
|
+
try {
|
|
27709
|
+
printJsonOrField(await crmService.getCampaign(id), opts.field);
|
|
27710
|
+
} catch (error) {
|
|
27711
|
+
exitOnApiError(error, {
|
|
27712
|
+
notFoundMessage: `No campaign with id "${id}" in this workspace.`
|
|
27713
|
+
});
|
|
27714
|
+
}
|
|
27715
|
+
});
|
|
27716
|
+
campaigns.command("create").description(
|
|
27717
|
+
"Create a campaign. --json: { name, purpose? }. Names are unique per workspace; the purpose steers every sequence drafted into it."
|
|
27718
|
+
).requiredOption("--json <body>", "JSON campaign definition.").action(async (opts) => {
|
|
27719
|
+
try {
|
|
27720
|
+
printJson(
|
|
27721
|
+
await crmService.createCampaign(parseJsonObjectArg(opts.json))
|
|
27722
|
+
);
|
|
27723
|
+
} catch (error) {
|
|
27724
|
+
exitOnApiError(error);
|
|
27725
|
+
}
|
|
27726
|
+
});
|
|
27727
|
+
campaigns.command("update").argument("<id>", "Campaign id.").description(
|
|
27728
|
+
"Rename a campaign or change its purpose. --json: { name, purpose? }."
|
|
27729
|
+
).requiredOption("--json <body>", "JSON campaign definition.").action(async (id, opts) => {
|
|
27730
|
+
try {
|
|
27731
|
+
printJson(
|
|
27732
|
+
await crmService.updateCampaign(id, parseJsonObjectArg(opts.json))
|
|
27733
|
+
);
|
|
27734
|
+
} catch (error) {
|
|
27735
|
+
exitOnApiError(error, {
|
|
27736
|
+
notFoundMessage: `No campaign with id "${id}" in this workspace.`
|
|
27737
|
+
});
|
|
27738
|
+
}
|
|
27739
|
+
});
|
|
27740
|
+
campaigns.command("delete").argument("<id>", "Campaign id.").description("Delete a campaign. Its sequence drafts are removed with it.").action(async (id) => {
|
|
27741
|
+
try {
|
|
27742
|
+
await crmService.deleteCampaign(id);
|
|
27743
|
+
printSuccess("Campaign deleted.");
|
|
27744
|
+
} catch (error) {
|
|
27745
|
+
exitOnApiError(error, {
|
|
27746
|
+
notFoundMessage: `No campaign with id "${id}" in this workspace.`
|
|
27747
|
+
});
|
|
27748
|
+
}
|
|
27749
|
+
});
|
|
27750
|
+
campaigns.command("members").argument("<id>", "Campaign id.").argument("[query]", "Match member name or company.").description("The campaign's people with their draft state.").option("--json", "Machine-readable output.").action(
|
|
27751
|
+
async (id, query, opts) => executeMembersList(id, query, opts)
|
|
27752
|
+
);
|
|
27753
|
+
campaigns.command("add").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to add as members.").description(
|
|
27754
|
+
"Add people to a campaign. Members get their sequences drafted from the campaign page."
|
|
27755
|
+
).action(async (campaignId, personIds) => {
|
|
27756
|
+
try {
|
|
27757
|
+
const { addedPersonIds } = await crmService.addCampaignPeople(
|
|
27758
|
+
campaignId,
|
|
27759
|
+
personIds
|
|
27760
|
+
);
|
|
27761
|
+
printSuccess(
|
|
27762
|
+
`Added ${addedPersonIds.length} member(s) to the campaign.`
|
|
27763
|
+
);
|
|
27764
|
+
} catch (error) {
|
|
27765
|
+
exitOnApiError(error);
|
|
27766
|
+
}
|
|
27767
|
+
});
|
|
27768
|
+
campaigns.command("remove").argument("<campaignId>", "Campaign id.").argument("<personIds...>", "Person ids to remove.").description(
|
|
27769
|
+
"Remove members and their drafts in this campaign. Leads already synced to a linked sequencer are deleted there too."
|
|
27770
|
+
).action(async (campaignId, personIds) => {
|
|
27771
|
+
try {
|
|
27772
|
+
const { removedPersonIds } = await crmService.removeCampaignPeople(
|
|
27773
|
+
campaignId,
|
|
27774
|
+
personIds
|
|
27775
|
+
);
|
|
27776
|
+
printSuccess(
|
|
27777
|
+
`Removed ${removedPersonIds.length} member(s) from the campaign.`
|
|
27778
|
+
);
|
|
27779
|
+
} catch (error) {
|
|
27780
|
+
exitOnApiError(error);
|
|
27781
|
+
}
|
|
27782
|
+
});
|
|
27783
|
+
}
|
|
27784
|
+
async function executeCampaignsList(query, opts) {
|
|
27785
|
+
if (opts.person && query) {
|
|
27786
|
+
printError("Pass either a query or --person, not both.");
|
|
27717
27787
|
exit(ExitCode.InternalError);
|
|
27718
27788
|
}
|
|
27719
|
-
|
|
27789
|
+
try {
|
|
27790
|
+
if (opts.person) {
|
|
27791
|
+
const results2 = await crmService.listPersonCampaigns(opts.person);
|
|
27792
|
+
if (opts.json) {
|
|
27793
|
+
printJson({ campaigns: results2 });
|
|
27794
|
+
return;
|
|
27795
|
+
}
|
|
27796
|
+
if (results2.length === 0) {
|
|
27797
|
+
process.stdout.write("Not in any campaigns.\n");
|
|
27798
|
+
return;
|
|
27799
|
+
}
|
|
27800
|
+
printTable(
|
|
27801
|
+
["ID", "NAME", "DRAFTED", "ADDED"],
|
|
27802
|
+
results2.map((campaign) => [
|
|
27803
|
+
campaign.campaignId,
|
|
27804
|
+
campaign.campaignName,
|
|
27805
|
+
campaign.sequenceId ? "yes" : "",
|
|
27806
|
+
campaign.addedAt.slice(0, 10)
|
|
27807
|
+
]),
|
|
27808
|
+
{ colorFn: dimColumn(0) }
|
|
27809
|
+
);
|
|
27810
|
+
return;
|
|
27811
|
+
}
|
|
27812
|
+
const results = await crmService.listCampaigns(query);
|
|
27813
|
+
if (opts.json) {
|
|
27814
|
+
printJson({ campaigns: results });
|
|
27815
|
+
return;
|
|
27816
|
+
}
|
|
27817
|
+
if (results.length === 0) {
|
|
27818
|
+
process.stdout.write(
|
|
27819
|
+
query ? "No campaigns match.\n" : "No campaigns yet.\n"
|
|
27820
|
+
);
|
|
27821
|
+
return;
|
|
27822
|
+
}
|
|
27823
|
+
printTable(
|
|
27824
|
+
["ID", "NAME", "PEOPLE", "SEQUENCES", "EXPORTED", "UPDATED"],
|
|
27825
|
+
results.map((campaign) => [
|
|
27826
|
+
campaign.id,
|
|
27827
|
+
campaign.name,
|
|
27828
|
+
String(campaign.personCount),
|
|
27829
|
+
String(campaign.sequenceCount),
|
|
27830
|
+
campaign.exportedTo.join(","),
|
|
27831
|
+
campaign.updatedAt.slice(0, 10)
|
|
27832
|
+
]),
|
|
27833
|
+
{ colorFn: dimColumn(0) }
|
|
27834
|
+
);
|
|
27835
|
+
} catch (error) {
|
|
27836
|
+
exitOnApiError(error);
|
|
27837
|
+
}
|
|
27838
|
+
}
|
|
27839
|
+
async function executeMembersList(campaignId, query, opts) {
|
|
27840
|
+
try {
|
|
27841
|
+
const results = await crmService.listCampaignMembers(campaignId, query);
|
|
27842
|
+
if (opts.json) {
|
|
27843
|
+
printJson({ members: results });
|
|
27844
|
+
return;
|
|
27845
|
+
}
|
|
27846
|
+
if (results.length === 0) {
|
|
27847
|
+
process.stdout.write(query ? "No members match.\n" : "No members yet.\n");
|
|
27848
|
+
return;
|
|
27849
|
+
}
|
|
27850
|
+
printTable(
|
|
27851
|
+
["PERSON", "NAME", "COMPANY", "STEPS", "TO", "EXPORTED", "ADDED"],
|
|
27852
|
+
results.map((member) => [
|
|
27853
|
+
member.id,
|
|
27854
|
+
member.personName,
|
|
27855
|
+
member.personCompanyName ?? "",
|
|
27856
|
+
member.sequenceStepCount === null ? "" : String(member.sequenceStepCount),
|
|
27857
|
+
member.recipientEmail ?? "",
|
|
27858
|
+
member.exportedTo.join(","),
|
|
27859
|
+
member.addedAt.slice(0, 10)
|
|
27860
|
+
]),
|
|
27861
|
+
{ colorFn: dimColumn(0) }
|
|
27862
|
+
);
|
|
27863
|
+
} catch (error) {
|
|
27864
|
+
exitOnApiError(error, {
|
|
27865
|
+
notFoundMessage: `No campaign with id "${campaignId}" in this workspace.`
|
|
27866
|
+
});
|
|
27867
|
+
}
|
|
27720
27868
|
}
|
|
27869
|
+
|
|
27870
|
+
// src/commands/crm/sequences.ts
|
|
27721
27871
|
function registerCrmSequences(parent) {
|
|
27722
27872
|
const sequences = parent.command("sequences").description(
|
|
27723
|
-
"List
|
|
27724
|
-
).option("--person <id>", "Only this person's
|
|
27725
|
-
|
|
27726
|
-
|
|
27727
|
-
).option("--json", "Machine-readable output.").action((opts) => executeSequencesList(opts));
|
|
27873
|
+
"List sequence drafts (default), or get / create / update / delete them. Every draft lives in a campaign; syncing to a sequencer happens in the dashboard."
|
|
27874
|
+
).argument("[query]", "Match person name, company, or recipient.").option("--person <id>", "Only this person's drafts.").option("--campaign <id>", "Only drafts in this campaign.").option("--json", "Machine-readable output.").action(
|
|
27875
|
+
(query, opts) => executeSequencesList(query, opts)
|
|
27876
|
+
);
|
|
27728
27877
|
sequences.command("get").argument("<id>", "Sequence id.").description(
|
|
27729
|
-
"One
|
|
27878
|
+
"One draft with its steps. Use --field to extract a value (e.g. campaignId)."
|
|
27730
27879
|
).option("--field <path>", "Print one dotted-path value.").action(async (id, opts) => {
|
|
27731
27880
|
try {
|
|
27732
27881
|
printJsonOrField(await crmService.getSequence(id), opts.field);
|
|
@@ -27737,21 +27886,23 @@ function registerCrmSequences(parent) {
|
|
|
27737
27886
|
}
|
|
27738
27887
|
});
|
|
27739
27888
|
sequences.command("create").description(
|
|
27740
|
-
"Draft a sequence for a person. --json: { steps: [{ subject?, body, waitDays }], recipientContactPointId
|
|
27741
|
-
).requiredOption("--person <id>", "Person the sequence targets.").requiredOption("--json <body>", "JSON sequence definition.").action(
|
|
27742
|
-
|
|
27743
|
-
|
|
27744
|
-
|
|
27745
|
-
opts.person,
|
|
27746
|
-
|
|
27747
|
-
|
|
27748
|
-
|
|
27749
|
-
|
|
27750
|
-
|
|
27889
|
+
"Draft a sequence for a person in a campaign (adds them as a member). --json: { steps: [{ subject?, body, waitDays }], recipientContactPointId? }. A member has one draft per campaign \u2014 drafting again rewrites it."
|
|
27890
|
+
).requiredOption("--person <id>", "Person the sequence targets.").requiredOption("--campaign <id>", "Campaign the draft belongs to.").requiredOption("--json <body>", "JSON sequence definition.").action(
|
|
27891
|
+
async (opts) => {
|
|
27892
|
+
try {
|
|
27893
|
+
printJson(
|
|
27894
|
+
await crmService.createSequence(opts.person, {
|
|
27895
|
+
...parseJsonObjectArg(opts.json),
|
|
27896
|
+
campaignId: opts.campaign
|
|
27897
|
+
})
|
|
27898
|
+
);
|
|
27899
|
+
} catch (error) {
|
|
27900
|
+
exitOnApiError(error);
|
|
27901
|
+
}
|
|
27751
27902
|
}
|
|
27752
|
-
|
|
27903
|
+
);
|
|
27753
27904
|
sequences.command("update").argument("<id>", "Sequence id.").description(
|
|
27754
|
-
"Replace a draft wholesale (steps, recipient
|
|
27905
|
+
"Replace a draft wholesale (steps, recipient). The next campaign sync pushes the new copy to linked sequencers."
|
|
27755
27906
|
).requiredOption("--json <body>", "JSON sequence definition.").action(async (id, opts) => {
|
|
27756
27907
|
try {
|
|
27757
27908
|
printJson(
|
|
@@ -27763,7 +27914,7 @@ function registerCrmSequences(parent) {
|
|
|
27763
27914
|
});
|
|
27764
27915
|
}
|
|
27765
27916
|
});
|
|
27766
|
-
sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft
|
|
27917
|
+
sequences.command("delete").argument("<id>", "Sequence id.").description("Delete a draft. The person stays a member of the campaign.").action(async (id) => {
|
|
27767
27918
|
try {
|
|
27768
27919
|
await crmService.deleteSequence(id);
|
|
27769
27920
|
printSuccess("Sequence deleted.");
|
|
@@ -27774,14 +27925,17 @@ function registerCrmSequences(parent) {
|
|
|
27774
27925
|
}
|
|
27775
27926
|
});
|
|
27776
27927
|
}
|
|
27777
|
-
async function executeSequencesList(opts) {
|
|
27778
|
-
|
|
27928
|
+
async function executeSequencesList(query, opts) {
|
|
27929
|
+
if (opts.person && query) {
|
|
27930
|
+
printError("Pass either a query or --person, not both.");
|
|
27931
|
+
exit(ExitCode.InternalError);
|
|
27932
|
+
}
|
|
27779
27933
|
try {
|
|
27780
27934
|
if (opts.person) {
|
|
27781
27935
|
const all = await crmService.listPersonSequences(opts.person);
|
|
27782
|
-
const results2 =
|
|
27936
|
+
const results2 = opts.campaign ? all.filter((sequence) => sequence.campaignId === opts.campaign) : all;
|
|
27783
27937
|
if (opts.json) {
|
|
27784
|
-
printJson(results2);
|
|
27938
|
+
printJson({ sequences: results2 });
|
|
27785
27939
|
return;
|
|
27786
27940
|
}
|
|
27787
27941
|
if (results2.length === 0) {
|
|
@@ -27789,10 +27943,10 @@ async function executeSequencesList(opts) {
|
|
|
27789
27943
|
return;
|
|
27790
27944
|
}
|
|
27791
27945
|
printTable(
|
|
27792
|
-
["ID", "
|
|
27946
|
+
["ID", "CAMPAIGN", "STEPS", "TO", "UPDATED"],
|
|
27793
27947
|
results2.map((sequence) => [
|
|
27794
27948
|
sequence.id,
|
|
27795
|
-
sequence.
|
|
27949
|
+
sequence.campaignName,
|
|
27796
27950
|
String(sequence.steps.length),
|
|
27797
27951
|
sequence.recipientEmail ?? "",
|
|
27798
27952
|
sequence.updatedAt.slice(0, 10)
|
|
@@ -27801,9 +27955,12 @@ async function executeSequencesList(opts) {
|
|
|
27801
27955
|
);
|
|
27802
27956
|
return;
|
|
27803
27957
|
}
|
|
27804
|
-
const results = await crmService.listSequences({
|
|
27958
|
+
const results = await crmService.listSequences({
|
|
27959
|
+
query,
|
|
27960
|
+
campaignId: opts.campaign
|
|
27961
|
+
});
|
|
27805
27962
|
if (opts.json) {
|
|
27806
|
-
printJson(results);
|
|
27963
|
+
printJson({ sequences: results });
|
|
27807
27964
|
return;
|
|
27808
27965
|
}
|
|
27809
27966
|
if (results.length === 0) {
|
|
@@ -27811,13 +27968,14 @@ async function executeSequencesList(opts) {
|
|
|
27811
27968
|
return;
|
|
27812
27969
|
}
|
|
27813
27970
|
printTable(
|
|
27814
|
-
["ID", "PERSON", "
|
|
27971
|
+
["ID", "PERSON", "CAMPAIGN", "STEPS", "TO", "EXPORTED", "UPDATED"],
|
|
27815
27972
|
results.map((sequence) => [
|
|
27816
27973
|
sequence.id,
|
|
27817
27974
|
sequence.personName,
|
|
27818
|
-
sequence.
|
|
27975
|
+
sequence.campaignName,
|
|
27819
27976
|
String(sequence.stepCount),
|
|
27820
27977
|
sequence.recipientEmail ?? "",
|
|
27978
|
+
sequence.exportedTo.join(","),
|
|
27821
27979
|
sequence.updatedAt.slice(0, 10)
|
|
27822
27980
|
]),
|
|
27823
27981
|
{ colorFn: dimColumn(0) }
|
|
@@ -27827,51 +27985,6 @@ async function executeSequencesList(opts) {
|
|
|
27827
27985
|
}
|
|
27828
27986
|
}
|
|
27829
27987
|
|
|
27830
|
-
// src/commands/crm/skills.ts
|
|
27831
|
-
function registerCrmSkills(parent) {
|
|
27832
|
-
const skills = parent.command("skills").description(
|
|
27833
|
-
"List the workspace's agent skill playbooks (default), or get one's content."
|
|
27834
|
-
).option("--json", "Machine-readable output.").action((opts) => executeSkillsList(opts));
|
|
27835
|
-
skills.command("get").argument("<id>", "Skill id (e.g. draft-sequence-person).").description(
|
|
27836
|
-
"A skill's playbook content \u2014 the org's customized variant when one exists, else the default. --json for the full record."
|
|
27837
|
-
).option("--json", "Full record: content, default content, customization.").action(async (id, opts) => {
|
|
27838
|
-
try {
|
|
27839
|
-
const skill = await crmService.getSkill(id);
|
|
27840
|
-
if (opts.json) {
|
|
27841
|
-
printJson(skill);
|
|
27842
|
-
return;
|
|
27843
|
-
}
|
|
27844
|
-
process.stdout.write(`${skill.content}
|
|
27845
|
-
`);
|
|
27846
|
-
} catch (error) {
|
|
27847
|
-
exitOnApiError(error, {
|
|
27848
|
-
notFoundMessage: `No skill "${id}". Run \`geni crm skills\` to list ids.`
|
|
27849
|
-
});
|
|
27850
|
-
}
|
|
27851
|
-
});
|
|
27852
|
-
}
|
|
27853
|
-
async function executeSkillsList(opts) {
|
|
27854
|
-
try {
|
|
27855
|
-
const results = await crmService.listSkills();
|
|
27856
|
-
if (opts.json) {
|
|
27857
|
-
printJson(results);
|
|
27858
|
-
return;
|
|
27859
|
-
}
|
|
27860
|
-
printTable(
|
|
27861
|
-
["ID", "NAME", "CUSTOMIZED", "DESCRIPTION"],
|
|
27862
|
-
results.map((skill) => [
|
|
27863
|
-
skill.id,
|
|
27864
|
-
skill.name,
|
|
27865
|
-
skill.custom ? "yes" : "",
|
|
27866
|
-
skill.description
|
|
27867
|
-
]),
|
|
27868
|
-
{ colorFn: dimColumn(0) }
|
|
27869
|
-
);
|
|
27870
|
-
} catch (error) {
|
|
27871
|
-
exitOnApiError(error);
|
|
27872
|
-
}
|
|
27873
|
-
}
|
|
27874
|
-
|
|
27875
27988
|
// src/commands/crm/waterfalls.ts
|
|
27876
27989
|
function registerCrmWaterfalls(parent) {
|
|
27877
27990
|
parent.command("waterfalls").description(
|
|
@@ -28032,8 +28145,8 @@ function registerCrmCommands(program2) {
|
|
|
28032
28145
|
registerCrmFields(crm);
|
|
28033
28146
|
registerCrmEmployments(crm);
|
|
28034
28147
|
registerCrmContactPoints(crm);
|
|
28148
|
+
registerCrmCampaigns(crm);
|
|
28035
28149
|
registerCrmSequences(crm);
|
|
28036
|
-
registerCrmSkills(crm);
|
|
28037
28150
|
registerCrmWaterfalls(crm);
|
|
28038
28151
|
registerCrmEnrich(crm);
|
|
28039
28152
|
crm.action(() => crm.help());
|
|
@@ -28246,10 +28359,10 @@ function printReport(checks) {
|
|
|
28246
28359
|
import { spawn as spawn3, execFileSync } from "child_process";
|
|
28247
28360
|
import { realpathSync } from "fs";
|
|
28248
28361
|
import { sep as sep2 } from "path";
|
|
28249
|
-
import { z as
|
|
28362
|
+
import { z as z51 } from "zod";
|
|
28250
28363
|
import semver from "semver";
|
|
28251
28364
|
var PACKAGE_NAME = "@general-input/cli";
|
|
28252
|
-
var registryLatestSchema =
|
|
28365
|
+
var registryLatestSchema = z51.object({ version: z51.string() });
|
|
28253
28366
|
function registerUpgradeCommand(program2) {
|
|
28254
28367
|
program2.command("upgrade").description(
|
|
28255
28368
|
"Upgrade geni to the latest published version. Checks the npm registry and reinstalls via `npm install -g` when this install is npm-managed. Use --check to only report whether a newer version exists."
|