@dench.com/cli 3.11.7-staging.488 → 3.11.8-staging.501
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 +27 -0
- package/lib/api-schemas.ts +35 -19
- package/lib/command-registry.ts +1 -1
- package/package.json +1 -1
package/app-sdk.d.ts
CHANGED
|
@@ -970,6 +970,27 @@ export interface ApiRequests {
|
|
|
970
970
|
defaultView?: "table" | "kanban" | "calendar" | "timeline" | "gallery" | "list";
|
|
971
971
|
/** Hugeicons (or legacy Lucide) icon name, e.g. user-multiple, target-01. */
|
|
972
972
|
icon?: string;
|
|
973
|
+
/** Fields to add after the built-in Notes, in column order. The object and its fields are created in one transaction: if any field is rejected, nothing is created. */
|
|
974
|
+
fields?: Array<{
|
|
975
|
+
name: string;
|
|
976
|
+
/** Defaults to text. */
|
|
977
|
+
type?: "text" | "email" | "phone" | "url" | "number" | "boolean" | "date" | "richtext" | "file" | "user" | "enum" | "relation" | "tags" | "action";
|
|
978
|
+
required?: boolean;
|
|
979
|
+
defaultValue?: string;
|
|
980
|
+
/** Target object for `relation` fields. */
|
|
981
|
+
relatedObjectName?: string;
|
|
982
|
+
/** Relation cardinality for a `relation` field. */
|
|
983
|
+
relationshipType?: "many_to_one" | "many_to_many";
|
|
984
|
+
/** Options for `enum` fields. */
|
|
985
|
+
enumValues?: string[];
|
|
986
|
+
/** Hex colors aligned to enumValues. */
|
|
987
|
+
enumColors?: string[];
|
|
988
|
+
/** Allow multi-select enum. */
|
|
989
|
+
enumMultiple?: boolean;
|
|
990
|
+
description?: string;
|
|
991
|
+
/** Index for filter/search/sort. */
|
|
992
|
+
indexed?: boolean;
|
|
993
|
+
}>;
|
|
973
994
|
};
|
|
974
995
|
/** Update a CRM object. — `dench crm objects update` — PATCH /api/v1/crm/objects/{name} */
|
|
975
996
|
"crm.objects.update": {
|
|
@@ -1269,6 +1290,7 @@ export interface ApiRequests {
|
|
|
1269
1290
|
"crm.privacy.get": Record<string, unknown>;
|
|
1270
1291
|
/** Hide (`hidden: true`) or show the caller's own emails / messages with this record to the workspace. An account covers every contact and opportunity linked to it; existing ledger rows are restamped and the shared Brief regenerates. — `dench crm privacy hide|show` — PUT /api/v1/crm/entries/{entryId}/privacy */
|
|
1271
1292
|
"crm.privacy.set": {
|
|
1293
|
+
entryId: string;
|
|
1272
1294
|
hidden: boolean;
|
|
1273
1295
|
};
|
|
1274
1296
|
/** List account-detection verdicts — why a domain (or personal address) did or did not become an account: verdict, counterparty type, probabilities, evidence threads, the rows created. `kind` picks the creator: `detections` (email + sweep), `linkedin` (the LinkedIn resolver's rows) or `all` (default). Newest first. — `dench crm detections list` — GET /api/v1/crm/detections */
|
|
@@ -4628,6 +4650,11 @@ export interface ApiResponses {
|
|
|
4628
4650
|
} | null;
|
|
4629
4651
|
"crm.objects.create": {
|
|
4630
4652
|
id: string;
|
|
4653
|
+
/** The fields created from `fields`, in order. */
|
|
4654
|
+
fields?: {
|
|
4655
|
+
id: string;
|
|
4656
|
+
name: string;
|
|
4657
|
+
}[];
|
|
4631
4658
|
references?: Array<{
|
|
4632
4659
|
kind: "crm-entry";
|
|
4633
4660
|
objectName: string;
|
package/lib/api-schemas.ts
CHANGED
|
@@ -174,6 +174,30 @@ const relationshipType = z
|
|
|
174
174
|
.enum(["many_to_one", "many_to_many"])
|
|
175
175
|
.describe("Relation cardinality for a `relation` field.");
|
|
176
176
|
|
|
177
|
+
/** A new field's settings: `crm.fields.create`, and each of `crm.objects.create`'s `fields`. */
|
|
178
|
+
const newCrmField = {
|
|
179
|
+
name: z.string(),
|
|
180
|
+
type: fieldType.optional().describe("Defaults to text."),
|
|
181
|
+
required: z.boolean().optional(),
|
|
182
|
+
defaultValue: z.string().optional(),
|
|
183
|
+
relatedObjectName: z
|
|
184
|
+
.string()
|
|
185
|
+
.optional()
|
|
186
|
+
.describe("Target object for `relation` fields."),
|
|
187
|
+
relationshipType: relationshipType.optional(),
|
|
188
|
+
enumValues: z
|
|
189
|
+
.array(z.string())
|
|
190
|
+
.optional()
|
|
191
|
+
.describe("Options for `enum` fields."),
|
|
192
|
+
enumColors: z
|
|
193
|
+
.array(z.string())
|
|
194
|
+
.optional()
|
|
195
|
+
.describe("Hex colors aligned to enumValues."),
|
|
196
|
+
enumMultiple: z.boolean().optional().describe("Allow multi-select enum."),
|
|
197
|
+
description: z.string().optional(),
|
|
198
|
+
indexed: z.boolean().optional().describe("Index for filter/search/sort."),
|
|
199
|
+
};
|
|
200
|
+
|
|
177
201
|
const memoryKind = z
|
|
178
202
|
.enum([
|
|
179
203
|
"fact",
|
|
@@ -4026,6 +4050,12 @@ export const requestSchemas: Record<string, ZodTypeAny> = {
|
|
|
4026
4050
|
.describe(
|
|
4027
4051
|
"Hugeicons (or legacy Lucide) icon name, e.g. user-multiple, target-01.",
|
|
4028
4052
|
),
|
|
4053
|
+
fields: z
|
|
4054
|
+
.array(z.object(newCrmField))
|
|
4055
|
+
.optional()
|
|
4056
|
+
.describe(
|
|
4057
|
+
"Fields to add after the built-in Notes, in column order. The object and its fields are created in one transaction: if any field is rejected, nothing is created.",
|
|
4058
|
+
),
|
|
4029
4059
|
}),
|
|
4030
4060
|
"crm.objects.update": z.object({
|
|
4031
4061
|
name: z.string(),
|
|
@@ -4113,30 +4143,12 @@ export const requestSchemas: Record<string, ZodTypeAny> = {
|
|
|
4113
4143
|
"crm.fields.listCompact": z.object({ objectName: z.string() }),
|
|
4114
4144
|
"crm.fields.create": z.object({
|
|
4115
4145
|
objectName: z.string(),
|
|
4116
|
-
|
|
4146
|
+
...newCrmField,
|
|
4117
4147
|
type: fieldType
|
|
4118
4148
|
.optional()
|
|
4119
4149
|
.describe(
|
|
4120
4150
|
"Defaults to boolean with calculation, otherwise text. Calculations require boolean.",
|
|
4121
4151
|
),
|
|
4122
|
-
required: z.boolean().optional(),
|
|
4123
|
-
defaultValue: z.string().optional(),
|
|
4124
|
-
relatedObjectName: z
|
|
4125
|
-
.string()
|
|
4126
|
-
.optional()
|
|
4127
|
-
.describe("Target object for `relation` fields."),
|
|
4128
|
-
relationshipType: relationshipType.optional(),
|
|
4129
|
-
enumValues: z
|
|
4130
|
-
.array(z.string())
|
|
4131
|
-
.optional()
|
|
4132
|
-
.describe("Options for `enum` fields."),
|
|
4133
|
-
enumColors: z
|
|
4134
|
-
.array(z.string())
|
|
4135
|
-
.optional()
|
|
4136
|
-
.describe("Hex colors aligned to enumValues."),
|
|
4137
|
-
enumMultiple: z.boolean().optional().describe("Allow multi-select enum."),
|
|
4138
|
-
description: z.string().optional(),
|
|
4139
|
-
indexed: z.boolean().optional().describe("Index for filter/search/sort."),
|
|
4140
4152
|
enrichment: enrichmentConfig.optional(),
|
|
4141
4153
|
calculation: campaignCalculation.optional(),
|
|
4142
4154
|
}),
|
|
@@ -5898,6 +5910,10 @@ export const responseSchemas: Record<string, ZodTypeAny> = {
|
|
|
5898
5910
|
.nullable(),
|
|
5899
5911
|
"crm.objects.create": z.object({
|
|
5900
5912
|
id: z.string(),
|
|
5913
|
+
fields: z
|
|
5914
|
+
.array(z.object({ id: z.string(), name: z.string() }))
|
|
5915
|
+
.optional()
|
|
5916
|
+
.describe("The fields created from `fields`, in order."),
|
|
5901
5917
|
...optionalWorkspaceReferenceFields,
|
|
5902
5918
|
}),
|
|
5903
5919
|
"crm.objects.update": okResponse,
|
package/lib/command-registry.ts
CHANGED
|
@@ -1858,7 +1858,7 @@ const rawApiOperations = [
|
|
|
1858
1858
|
cli: "dench crm privacy hide|show",
|
|
1859
1859
|
method: "PUT",
|
|
1860
1860
|
path: "/crm/entries/{entryId}/privacy",
|
|
1861
|
-
requestSchema: z.object({ hidden: z.boolean() }),
|
|
1861
|
+
requestSchema: z.object({ entryId: z.string(), hidden: z.boolean() }),
|
|
1862
1862
|
responseSchema: anyResponse,
|
|
1863
1863
|
backend: {
|
|
1864
1864
|
...convex("mutation", "functions/crm/recordPrivacy:setRecordPrivacy"),
|