@dench.com/cli 3.11.17-staging.559 → 3.11.18-staging.567
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/app-sdk.d.ts +9 -18
- package/crm.ts +2 -2
- package/lib/api-schemas.ts +11 -23
- package/lib/crm-enrichment.ts +18 -5
- package/lib/references.generated.json +8 -8
- package/package.json +1 -1
- package/tools.ts +1 -1
package/app-sdk.d.ts
CHANGED
|
@@ -1166,12 +1166,14 @@ export interface ApiRequests {
|
|
|
1166
1166
|
description?: string;
|
|
1167
1167
|
/** Index for filter/search/sort. */
|
|
1168
1168
|
indexed?: boolean;
|
|
1169
|
-
/** Enrichment binding that lets the field auto-fill
|
|
1169
|
+
/** Enrichment binding that lets the field auto-fill. */
|
|
1170
1170
|
enrichment?: {
|
|
1171
1171
|
category: "people" | "company";
|
|
1172
1172
|
key: string;
|
|
1173
|
-
|
|
1173
|
+
/** Dotted path to the value in the enrichment result. Required. */
|
|
1174
|
+
responsePath?: string;
|
|
1174
1175
|
inputFieldName?: string;
|
|
1176
|
+
[key: string]: unknown;
|
|
1175
1177
|
};
|
|
1176
1178
|
/** Read-only campaign activity boolean on people or lead (through Contact), not an expression. Cannot be required, indexed, enriched or have a default value. */
|
|
1177
1179
|
calculation?: {
|
|
@@ -1194,12 +1196,14 @@ export interface ApiRequests {
|
|
|
1194
1196
|
enumColors?: string[];
|
|
1195
1197
|
enumMultiple?: boolean;
|
|
1196
1198
|
indexed?: boolean;
|
|
1197
|
-
/** Enrichment binding that lets the field auto-fill
|
|
1199
|
+
/** Enrichment binding that lets the field auto-fill. */
|
|
1198
1200
|
enrichment?: {
|
|
1199
1201
|
category: "people" | "company";
|
|
1200
1202
|
key: string;
|
|
1201
|
-
|
|
1203
|
+
/** Dotted path to the value in the enrichment result. Required. */
|
|
1204
|
+
responsePath?: string;
|
|
1202
1205
|
inputFieldName?: string;
|
|
1206
|
+
[key: string]: unknown;
|
|
1203
1207
|
};
|
|
1204
1208
|
clearEnrichment?: boolean;
|
|
1205
1209
|
/** Replace an existing calculation's metric/source. Stored fields cannot be converted; create a new column instead. */
|
|
@@ -8022,10 +8026,6 @@ export interface ApiResponses {
|
|
|
8022
8026
|
entities?: Record<string, unknown>[];
|
|
8023
8027
|
[key: string]: unknown;
|
|
8024
8028
|
}[];
|
|
8025
|
-
resolvedSearchType?: string;
|
|
8026
|
-
autopromptString?: string;
|
|
8027
|
-
requestId?: string;
|
|
8028
|
-
costDollars?: Record<string, unknown>;
|
|
8029
8029
|
[key: string]: unknown;
|
|
8030
8030
|
};
|
|
8031
8031
|
"search.contents": {
|
|
@@ -8045,10 +8045,6 @@ export interface ApiResponses {
|
|
|
8045
8045
|
entities?: Record<string, unknown>[];
|
|
8046
8046
|
[key: string]: unknown;
|
|
8047
8047
|
}[];
|
|
8048
|
-
resolvedSearchType?: string;
|
|
8049
|
-
autopromptString?: string;
|
|
8050
|
-
requestId?: string;
|
|
8051
|
-
costDollars?: Record<string, unknown>;
|
|
8052
8048
|
[key: string]: unknown;
|
|
8053
8049
|
};
|
|
8054
8050
|
"search.answer": {
|
|
@@ -8069,7 +8065,6 @@ export interface ApiResponses {
|
|
|
8069
8065
|
entities?: Record<string, unknown>[];
|
|
8070
8066
|
[key: string]: unknown;
|
|
8071
8067
|
}[];
|
|
8072
|
-
costDollars?: Record<string, unknown>;
|
|
8073
8068
|
[key: string]: unknown;
|
|
8074
8069
|
};
|
|
8075
8070
|
"web.scrape": unknown;
|
|
@@ -8174,8 +8169,6 @@ export interface ApiResponses {
|
|
|
8174
8169
|
reconnect?: Record<string, unknown>;
|
|
8175
8170
|
[key: string]: unknown;
|
|
8176
8171
|
}>;
|
|
8177
|
-
/** Deprecated: the unprocessed provider response. Do not depend on it. */
|
|
8178
|
-
raw: unknown;
|
|
8179
8172
|
[key: string]: unknown;
|
|
8180
8173
|
};
|
|
8181
8174
|
"apps.list": unknown;
|
|
@@ -8226,8 +8219,6 @@ export interface ApiResponses {
|
|
|
8226
8219
|
reconnect?: Record<string, unknown>;
|
|
8227
8220
|
[key: string]: unknown;
|
|
8228
8221
|
}>;
|
|
8229
|
-
/** Deprecated: the unprocessed provider response. Do not depend on it. */
|
|
8230
|
-
raw: unknown;
|
|
8231
8222
|
[key: string]: unknown;
|
|
8232
8223
|
};
|
|
8233
8224
|
"tool.connect": {
|
|
@@ -8296,7 +8287,7 @@ export interface ApiResponses {
|
|
|
8296
8287
|
};
|
|
8297
8288
|
"tool.labels.list": {
|
|
8298
8289
|
labels: {
|
|
8299
|
-
|
|
8290
|
+
connectionId: string;
|
|
8300
8291
|
displayName: string;
|
|
8301
8292
|
}[];
|
|
8302
8293
|
};
|
package/crm.ts
CHANGED
|
@@ -4312,8 +4312,8 @@ function readFieldEnrichment(
|
|
|
4312
4312
|
typeof candidate.category === "string" ? candidate.category : undefined,
|
|
4313
4313
|
);
|
|
4314
4314
|
const key = typeof candidate.key === "string" ? candidate.key : undefined;
|
|
4315
|
-
const apolloPath
|
|
4316
|
-
|
|
4315
|
+
const storedPath = candidate.apolloPath ?? candidate.responsePath;
|
|
4316
|
+
const apolloPath = typeof storedPath === "string" ? storedPath : undefined;
|
|
4317
4317
|
const inputFieldName =
|
|
4318
4318
|
typeof candidate.inputFieldName === "string"
|
|
4319
4319
|
? candidate.inputFieldName
|
package/lib/api-schemas.ts
CHANGED
|
@@ -382,16 +382,19 @@ const cellValue = z
|
|
|
382
382
|
"Cell value. Enum=option string, tags=string array, user=one member userId or a userId array, relation=related entry id, boolean=true/false.",
|
|
383
383
|
);
|
|
384
384
|
|
|
385
|
+
// `passthrough` keeps the pre-rename key older CLIs still send.
|
|
385
386
|
const enrichmentConfig = z
|
|
386
387
|
.object({
|
|
387
388
|
category: z.enum(["people", "company"]),
|
|
388
389
|
key: z.string(),
|
|
389
|
-
|
|
390
|
+
responsePath: z
|
|
391
|
+
.string()
|
|
392
|
+
.optional()
|
|
393
|
+
.describe("Dotted path to the value in the enrichment result. Required."),
|
|
390
394
|
inputFieldName: z.string().optional(),
|
|
391
395
|
})
|
|
392
|
-
.
|
|
393
|
-
|
|
394
|
-
);
|
|
396
|
+
.passthrough()
|
|
397
|
+
.describe("Enrichment binding that lets the field auto-fill.");
|
|
395
398
|
|
|
396
399
|
const crmOp = z
|
|
397
400
|
.union([
|
|
@@ -1932,10 +1935,6 @@ const exaResultItem = z
|
|
|
1932
1935
|
const exaSearchResponse = z
|
|
1933
1936
|
.object({
|
|
1934
1937
|
results: z.array(exaResultItem),
|
|
1935
|
-
resolvedSearchType: z.string().optional(),
|
|
1936
|
-
autopromptString: z.string().optional(),
|
|
1937
|
-
requestId: z.string().optional(),
|
|
1938
|
-
costDollars: z.record(z.string(), z.unknown()).optional(),
|
|
1939
1938
|
})
|
|
1940
1939
|
.passthrough()
|
|
1941
1940
|
.describe("A web search response.");
|
|
@@ -1944,7 +1943,6 @@ const exaAnswerResponse = z
|
|
|
1944
1943
|
.object({
|
|
1945
1944
|
answer: z.string(),
|
|
1946
1945
|
citations: z.array(exaResultItem).optional(),
|
|
1947
|
-
costDollars: z.record(z.string(), z.unknown()).optional(),
|
|
1948
1946
|
})
|
|
1949
1947
|
.passthrough()
|
|
1950
1948
|
.describe(
|
|
@@ -1979,7 +1977,7 @@ const imageEnvelope = z
|
|
|
1979
1977
|
.optional(),
|
|
1980
1978
|
})
|
|
1981
1979
|
.passthrough()
|
|
1982
|
-
.describe("
|
|
1980
|
+
.describe("Generated or edited image, saved to the workspace.");
|
|
1983
1981
|
|
|
1984
1982
|
const composioConnection = z
|
|
1985
1983
|
.object({
|
|
@@ -2008,11 +2006,6 @@ const composioConnectionsResponse = z
|
|
|
2008
2006
|
connections: z
|
|
2009
2007
|
.array(composioConnection)
|
|
2010
2008
|
.describe("Alias of items for older clients."),
|
|
2011
|
-
raw: z
|
|
2012
|
-
.unknown()
|
|
2013
|
-
.describe(
|
|
2014
|
-
"Deprecated: the unprocessed provider response. Do not depend on it.",
|
|
2015
|
-
),
|
|
2016
2009
|
})
|
|
2017
2010
|
.passthrough();
|
|
2018
2011
|
|
|
@@ -6758,7 +6751,7 @@ export const responseSchemas: Record<string, ZodTypeAny> = {
|
|
|
6758
6751
|
.describe("Delete response."),
|
|
6759
6752
|
"tool.labels.list": z.object({
|
|
6760
6753
|
labels: z.array(
|
|
6761
|
-
z.object({
|
|
6754
|
+
z.object({ connectionId: z.string(), displayName: z.string() }),
|
|
6762
6755
|
),
|
|
6763
6756
|
}),
|
|
6764
6757
|
"tool.label.set": z.object({
|
|
@@ -8737,9 +8730,6 @@ export const responseExamples: Record<string, unknown> = {
|
|
|
8737
8730
|
id: "https://example.com/ai-crm",
|
|
8738
8731
|
},
|
|
8739
8732
|
],
|
|
8740
|
-
resolvedSearchType: "neural",
|
|
8741
|
-
requestId: "req_abc123",
|
|
8742
|
-
costDollars: { total: 0.005 },
|
|
8743
8733
|
},
|
|
8744
8734
|
"search.contents": {
|
|
8745
8735
|
results: [
|
|
@@ -8750,7 +8740,6 @@ export const responseExamples: Record<string, unknown> = {
|
|
|
8750
8740
|
summary: "AI CRMs automate lead routing.",
|
|
8751
8741
|
},
|
|
8752
8742
|
],
|
|
8753
|
-
costDollars: { total: 0.002 },
|
|
8754
8743
|
},
|
|
8755
8744
|
"search.answer": {
|
|
8756
8745
|
answer: "Dench is an AI agent workspace with a built-in CRM.",
|
|
@@ -8761,7 +8750,6 @@ export const responseExamples: Record<string, unknown> = {
|
|
|
8761
8750
|
id: "https://www.dench.com",
|
|
8762
8751
|
},
|
|
8763
8752
|
],
|
|
8764
|
-
costDollars: { total: 0.005 },
|
|
8765
8753
|
},
|
|
8766
8754
|
"image.generate": {
|
|
8767
8755
|
ok: true,
|
|
@@ -9036,11 +9024,11 @@ export const responseExamples: Record<string, unknown> = {
|
|
|
9036
9024
|
bootstrap: { completed: false, template: "Welcome! Let's set up." },
|
|
9037
9025
|
},
|
|
9038
9026
|
"agentConfig.model.default": {
|
|
9039
|
-
defaultChatModelId: "
|
|
9027
|
+
defaultChatModelId: "model_default",
|
|
9040
9028
|
},
|
|
9041
9029
|
"agentConfig.model.thread": {
|
|
9042
9030
|
threadId: "th_abc123",
|
|
9043
|
-
modelOverride: "
|
|
9031
|
+
modelOverride: "model_alternate",
|
|
9044
9032
|
},
|
|
9045
9033
|
"agentConfig.daily.today": {
|
|
9046
9034
|
agentConfig: {
|
package/lib/crm-enrichment.ts
CHANGED
|
@@ -121,7 +121,11 @@ export const PEOPLE_ENRICHMENT_COLUMNS: readonly EnrichmentColumnDef[] = [
|
|
|
121
121
|
fieldType: "url",
|
|
122
122
|
apolloPath: "person.linkedin_url",
|
|
123
123
|
requiredFields: ["linkedinID"],
|
|
124
|
-
extractionFallbacks: [
|
|
124
|
+
extractionFallbacks: [
|
|
125
|
+
"linkedin_url",
|
|
126
|
+
"URLs.linkedin",
|
|
127
|
+
"person.URLs.linkedin",
|
|
128
|
+
],
|
|
125
129
|
},
|
|
126
130
|
{
|
|
127
131
|
label: "Twitter URL",
|
|
@@ -254,7 +258,8 @@ export function findEnrichmentColumn(args: {
|
|
|
254
258
|
columns.find((column) => {
|
|
255
259
|
return (
|
|
256
260
|
(args.key !== undefined && column.key === args.key) ||
|
|
257
|
-
(args.apolloPath !== undefined &&
|
|
261
|
+
(args.apolloPath !== undefined &&
|
|
262
|
+
column.apolloPath === args.apolloPath) ||
|
|
258
263
|
(normalizedLabel !== undefined &&
|
|
259
264
|
column.label.toLowerCase() === normalizedLabel)
|
|
260
265
|
);
|
|
@@ -387,13 +392,20 @@ export function parseEnrichmentMeta(
|
|
|
387
392
|
const enrichment = (parsed as { enrichment?: unknown }).enrichment;
|
|
388
393
|
if (!enrichment || typeof enrichment !== "object") return null;
|
|
389
394
|
const meta = enrichment as Record<string, unknown>;
|
|
395
|
+
// The API returns the path as `responsePath`; older servers and the
|
|
396
|
+
// stored shape use `apolloPath`.
|
|
397
|
+
const apolloPath = meta.apolloPath ?? meta.responsePath;
|
|
390
398
|
if (
|
|
391
399
|
(meta.category === "people" || meta.category === "company") &&
|
|
392
400
|
typeof meta.key === "string" &&
|
|
393
|
-
typeof
|
|
401
|
+
typeof apolloPath === "string" &&
|
|
394
402
|
typeof meta.inputFieldName === "string"
|
|
395
403
|
) {
|
|
396
|
-
|
|
404
|
+
const { responsePath: _responsePath, ...stored } = meta;
|
|
405
|
+
return {
|
|
406
|
+
...(parsed as Record<string, unknown>),
|
|
407
|
+
enrichment: { ...stored, apolloPath },
|
|
408
|
+
} as EnrichmentFieldMeta;
|
|
397
409
|
}
|
|
398
410
|
} catch {
|
|
399
411
|
// Not enrichment metadata.
|
|
@@ -450,7 +462,8 @@ function computeFullName(payload: Record<string, unknown>): string | null {
|
|
|
450
462
|
return explicit.trim();
|
|
451
463
|
}
|
|
452
464
|
const parts = [person.first_name, person.last_name].filter(
|
|
453
|
-
(part): part is string =>
|
|
465
|
+
(part): part is string =>
|
|
466
|
+
typeof part === "string" && part.trim().length > 0,
|
|
454
467
|
);
|
|
455
468
|
return parts.length > 0 ? parts.join(" ") : null;
|
|
456
469
|
}
|