@dench.com/cli 3.12.11 → 3.12.12-staging.1261

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 CHANGED
@@ -3730,6 +3730,31 @@ export interface ApiRequests {
3730
3730
  /** Summaries and Brief — conversations are summarised and each record keeps a Brief. */
3731
3731
  intelligence?: boolean;
3732
3732
  };
3733
+ /** List the workspace's Slack announcement channel groups and the channels in each right now (admin). A group is a rule on channel names or channels picked by hand. Read only: it cannot send an announcement or change a group. — `dench settings announcement-groups` — GET /api/v1/settings/announcement-groups */
3734
+ "settings.announcementGroups.list": {
3735
+ /** One group's name (any case): only that group, with every channel in it. */
3736
+ group?: string;
3737
+ };
3738
+ /** Make or change a Slack announcement channel group (admin): a rule on channel names, or channels picked by name; add or take out single channels without restating the group; rename it. It sends nothing: a group only ticks channels in the New announcement dialog. — `dench settings announcement-groups save` — POST /api/v1/settings/announcement-groups */
3739
+ "settings.announcementGroups.save": {
3740
+ /** The existing group to change. Omit to make a group called name, or to change the group that already has that name. */
3741
+ group?: string;
3742
+ /** The group's name; with group, its new name. */
3743
+ name?: string;
3744
+ /** Makes it a rule on channel names: dench-* starts with dench-, *-acme ends with -acme, a bare word is found anywhere, a comma means or. */
3745
+ rule?: string;
3746
+ /** Makes it exactly these channels, picked by name (with or without #). */
3747
+ channels?: string[];
3748
+ /** Channels to put in: one more pick, or one a rule left out. */
3749
+ addChannels?: string[];
3750
+ /** Channels to take out: one pick fewer, or one for a rule to leave out. */
3751
+ removeChannels?: string[];
3752
+ };
3753
+ /** Delete a Slack announcement channel group by name (admin). Announcements already sent or scheduled keep their channels. — `dench settings announcement-groups delete` — DELETE /api/v1/settings/announcement-groups/{name} */
3754
+ "settings.announcementGroups.delete": {
3755
+ /** The group's name (any case). */
3756
+ name: string;
3757
+ };
3733
3758
  }
3734
3759
 
3735
3760
  export interface ApiResponses {
@@ -8770,6 +8795,76 @@ export interface ApiResponses {
8770
8795
  leadAutoQualify: boolean;
8771
8796
  intelligence: boolean;
8772
8797
  };
8798
+ "settings.announcementGroups.list": {
8799
+ /** connected: each group's channels were read from Slack. Otherwise the groups are named without channels and notes says why. */
8800
+ slack: "connected" | "not_connected" | "account_not_linked";
8801
+ groups: Array<{
8802
+ name: string;
8803
+ /** rule: every channel whose name matches the rule, now and later. picked: channels chosen by hand. */
8804
+ kind: "rule" | "picked";
8805
+ /** A rule group's rule: dench-* starts with dench-, *-acme ends with -acme, a bare word is found anywhere, a comma means or. */
8806
+ rule?: string;
8807
+ /** Channels in the group right now. */
8808
+ channelCount?: number;
8809
+ channels?: {
8810
+ name: string;
8811
+ isPrivate?: true;
8812
+ /** Slack Connect: people from another company are in it. */
8813
+ isShared?: true;
8814
+ }[];
8815
+ /** Private channels in it that are counted, not named. */
8816
+ privateChannelsNotNamed?: number;
8817
+ /** Channels in it past the names one answer carries; ask for the group by name to see all. */
8818
+ channelsNotListed?: number;
8819
+ /** Channels its rule matches that the group leaves out. */
8820
+ leftOutCount?: number;
8821
+ leftOut?: {
8822
+ name: string;
8823
+ isPrivate?: true;
8824
+ /** Slack Connect: people from another company are in it. */
8825
+ isShared?: true;
8826
+ }[];
8827
+ }>;
8828
+ /** What the answer leaves out, in plain sentences. */
8829
+ notes: string[];
8830
+ };
8831
+ "settings.announcementGroups.save": {
8832
+ /** connected: each group's channels were read from Slack. Otherwise the groups are named without channels and notes says why. */
8833
+ slack: "connected" | "not_connected" | "account_not_linked";
8834
+ groups: Array<{
8835
+ name: string;
8836
+ /** rule: every channel whose name matches the rule, now and later. picked: channels chosen by hand. */
8837
+ kind: "rule" | "picked";
8838
+ /** A rule group's rule: dench-* starts with dench-, *-acme ends with -acme, a bare word is found anywhere, a comma means or. */
8839
+ rule?: string;
8840
+ /** Channels in the group right now. */
8841
+ channelCount?: number;
8842
+ channels?: {
8843
+ name: string;
8844
+ isPrivate?: true;
8845
+ /** Slack Connect: people from another company are in it. */
8846
+ isShared?: true;
8847
+ }[];
8848
+ /** Private channels in it that are counted, not named. */
8849
+ privateChannelsNotNamed?: number;
8850
+ /** Channels in it past the names one answer carries; ask for the group by name to see all. */
8851
+ channelsNotListed?: number;
8852
+ /** Channels its rule matches that the group leaves out. */
8853
+ leftOutCount?: number;
8854
+ leftOut?: {
8855
+ name: string;
8856
+ isPrivate?: true;
8857
+ /** Slack Connect: people from another company are in it. */
8858
+ isShared?: true;
8859
+ }[];
8860
+ }>;
8861
+ /** What the answer leaves out, in plain sentences. */
8862
+ notes: string[];
8863
+ outcome: "created" | "changed";
8864
+ };
8865
+ "settings.announcementGroups.delete": {
8866
+ deleted: string;
8867
+ };
8773
8868
  }
8774
8869
 
8775
8870
  export type ApiOperationId = keyof ApiRequests;
@@ -9814,6 +9909,14 @@ export type DenchApiTree = {
9814
9909
  set(args: Req<"secrets.set">): Promise<Res<"secrets.set">>;
9815
9910
  };
9816
9911
  settings: {
9912
+ announcementGroups: {
9913
+ /** Delete a Slack announcement channel group by name (admin). Announcements already sent or scheduled keep their channels. (`dench settings announcement-groups delete`) */
9914
+ delete(args: Req<"settings.announcementGroups.delete">): Promise<Res<"settings.announcementGroups.delete">>;
9915
+ /** List the workspace's Slack announcement channel groups and the channels in each right now (admin). A group is a rule on channel names or channels picked by hand. Read only: it cannot send an announcement or change a group. (`dench settings announcement-groups`) */
9916
+ list(args?: Req<"settings.announcementGroups.list">): Promise<Res<"settings.announcementGroups.list">>;
9917
+ /** Make or change a Slack announcement channel group (admin): a rule on channel names, or channels picked by name; add or take out single channels without restating the group; rename it. It sends nothing: a group only ticks channels in the New announcement dialog. (`dench settings announcement-groups save`) */
9918
+ save(args: Req<"settings.announcementGroups.save">): Promise<Res<"settings.announcementGroups.save">>;
9919
+ };
9817
9920
  sync: {
9818
9921
  /** Read the workspace's Sync switches (accounts from email, contacts from LinkedIn, Slack Connect, calendar, dossier, tasks from email, lead auto-qualify, summaries and Brief). All on by default. (`dench settings sync`) */
9819
9922
  get(args?: Req<"settings.sync.get">): Promise<Res<"settings.sync.get">>;
package/dench.ts CHANGED
@@ -546,6 +546,9 @@ Notifications (the bell's inbox):
546
546
  Workspace settings (Settings → Sync: what Dench creates and keeps current on its own):
547
547
  dench settings sync [--json] the eight switches, all on by default
548
548
  dench settings sync set <key> on|off [--json] admin-only; off stops new work, removes nothing
549
+ dench settings announcement-groups [name] [--json] admin-only; the Slack announcement groups and their channels
550
+ dench settings announcement-groups save <name> [--rule <pattern>] [--channels a,b] [--add a,b] [--remove a,b] [--rename <new name>]
551
+ dench settings announcement-groups delete <name> admin-only; a group only ticks channels, it never sends
549
552
  Help: dench settings help
550
553
 
551
554
  Workspace members (for CRM \`user\`-type fields, and who's doing what):
@@ -4924,8 +4927,9 @@ async function main() {
4924
4927
  }
4925
4928
 
4926
4929
  if (command === "settings") {
4927
- // Settings → Sync from the terminal. Same auth shape as `dench crm`;
4928
- // the write is admin-only server-side.
4930
+ // Settings → Sync, and the Slack announcement groups, from the
4931
+ // terminal. Same auth shape as `dench crm`; admin-only work is refused
4932
+ // server-side.
4929
4933
  const subArgs = stripRuntimeFlags(args.slice(args.indexOf("settings") + 1));
4930
4934
  const sub = subArgs[0];
4931
4935
  const { runSettingsCommand } = await import("./settings");
@@ -1568,6 +1568,66 @@ const syncSettingsShape = z
1568
1568
  "Settings → Sync, resolved: absent switches read as true. Off stops new work; nothing already created is removed.",
1569
1569
  );
1570
1570
 
1571
+ const announcementGroupChannelShape = z.object({
1572
+ name: z.string(),
1573
+ isPrivate: z.literal(true).optional(),
1574
+ isShared: z
1575
+ .literal(true)
1576
+ .optional()
1577
+ .describe("Slack Connect: people from another company are in it."),
1578
+ });
1579
+
1580
+ const announcementGroupsShape = z
1581
+ .object({
1582
+ slack: z
1583
+ .enum(["connected", "not_connected", "account_not_linked"])
1584
+ .describe(
1585
+ "connected: each group's channels were read from Slack. Otherwise the groups are named without channels and notes says why.",
1586
+ ),
1587
+ groups: z.array(
1588
+ z.object({
1589
+ name: z.string(),
1590
+ kind: z
1591
+ .enum(["rule", "picked"])
1592
+ .describe(
1593
+ "rule: every channel whose name matches the rule, now and later. picked: channels chosen by hand.",
1594
+ ),
1595
+ rule: z
1596
+ .string()
1597
+ .optional()
1598
+ .describe(
1599
+ "A rule group's rule: dench-* starts with dench-, *-acme ends with -acme, a bare word is found anywhere, a comma means or.",
1600
+ ),
1601
+ channelCount: z
1602
+ .number()
1603
+ .optional()
1604
+ .describe("Channels in the group right now."),
1605
+ channels: z.array(announcementGroupChannelShape).optional(),
1606
+ privateChannelsNotNamed: z
1607
+ .number()
1608
+ .optional()
1609
+ .describe("Private channels in it that are counted, not named."),
1610
+ channelsNotListed: z
1611
+ .number()
1612
+ .optional()
1613
+ .describe(
1614
+ "Channels in it past the names one answer carries; ask for the group by name to see all.",
1615
+ ),
1616
+ leftOutCount: z
1617
+ .number()
1618
+ .optional()
1619
+ .describe("Channels its rule matches that the group leaves out."),
1620
+ leftOut: z.array(announcementGroupChannelShape).optional(),
1621
+ }),
1622
+ ),
1623
+ notes: z
1624
+ .array(z.string())
1625
+ .describe("What the answer leaves out, in plain sentences."),
1626
+ })
1627
+ .describe(
1628
+ "Settings → Dench in Slack → Announcements: the saved channel groups and the channels a send from the Dench app reaches in each.",
1629
+ );
1630
+
1571
1631
  const syncSettingsPatchShape = z.object({
1572
1632
  detectAccounts: z
1573
1633
  .boolean()
@@ -5375,6 +5435,58 @@ export const requestSchemas: Record<string, ZodTypeAny> = {
5375
5435
  "notifications.archive": z.object({ notificationId: z.string() }),
5376
5436
  "settings.sync.get": noInput,
5377
5437
  "settings.sync.update": syncSettingsPatchShape,
5438
+ "settings.announcementGroups.list": z.object({
5439
+ group: z
5440
+ .string()
5441
+ .max(40)
5442
+ .optional()
5443
+ .describe(
5444
+ "One group's name (any case): only that group, with every channel in it.",
5445
+ ),
5446
+ }),
5447
+ "settings.announcementGroups.save": z.object({
5448
+ group: z
5449
+ .string()
5450
+ .max(40)
5451
+ .optional()
5452
+ .describe(
5453
+ "The existing group to change. Omit to make a group called name, or to change the group that already has that name.",
5454
+ ),
5455
+ name: z
5456
+ .string()
5457
+ .max(40)
5458
+ .optional()
5459
+ .describe("The group's name; with group, its new name."),
5460
+ rule: z
5461
+ .string()
5462
+ .max(200)
5463
+ .optional()
5464
+ .describe(
5465
+ "Makes it a rule on channel names: dench-* starts with dench-, *-acme ends with -acme, a bare word is found anywhere, a comma means or.",
5466
+ ),
5467
+ channels: z
5468
+ .array(z.string().max(100))
5469
+ .max(200)
5470
+ .optional()
5471
+ .describe(
5472
+ "Makes it exactly these channels, picked by name (with or without #).",
5473
+ ),
5474
+ addChannels: z
5475
+ .array(z.string().max(100))
5476
+ .max(200)
5477
+ .optional()
5478
+ .describe("Channels to put in: one more pick, or one a rule left out."),
5479
+ removeChannels: z
5480
+ .array(z.string().max(100))
5481
+ .max(200)
5482
+ .optional()
5483
+ .describe(
5484
+ "Channels to take out: one pick fewer, or one for a rule to leave out.",
5485
+ ),
5486
+ }),
5487
+ "settings.announcementGroups.delete": z.object({
5488
+ name: z.string().min(1).max(40).describe("The group's name (any case)."),
5489
+ }),
5378
5490
  "notifications.preferences.get": noInput,
5379
5491
  "notifications.preferences.update": z.object({
5380
5492
  inAppEnabled: z.boolean().optional(),
@@ -6271,6 +6383,11 @@ export const responseSchemas: Record<string, ZodTypeAny> = {
6271
6383
  // Workspace settings
6272
6384
  "settings.sync.get": syncSettingsShape,
6273
6385
  "settings.sync.update": syncSettingsShape,
6386
+ "settings.announcementGroups.list": announcementGroupsShape,
6387
+ "settings.announcementGroups.save": announcementGroupsShape.extend({
6388
+ outcome: z.enum(["created", "changed"]),
6389
+ }),
6390
+ "settings.announcementGroups.delete": z.object({ deleted: z.string() }),
6274
6391
 
6275
6392
  // CRM query + search
6276
6393
  "crm.query": referenceListResponse(
@@ -7291,6 +7408,10 @@ export const requestExamples: Record<string, unknown> = {
7291
7408
  perKind: { entry_activity: { email: false } },
7292
7409
  },
7293
7410
  "settings.sync.update": { linkedinContacts: false },
7411
+ "settings.announcementGroups.save": {
7412
+ name: "YC customers",
7413
+ channels: ["dench-acme", "dench-globex"],
7414
+ },
7294
7415
  "me.profile.update": {
7295
7416
  tagline: "Head of Ops",
7296
7417
  timezone: "America/New_York",
@@ -517,6 +517,9 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
517
517
  {"id":"notifications.preferences.update","group":"notifications","summary":"Update your notification preferences.","cli":"dench notifications prefs --set","method":"PATCH","path":"/notifications/preferences","permission":"notifications:write","pathParams":[]},
518
518
  {"id":"settings.sync.get","group":"settings","summary":"Read the workspace's Sync switches (accounts from email, contacts from LinkedIn, Slack Connect, calendar, dossier, tasks from email, lead auto-qualify, summaries and Brief). All on by default.","cli":"dench settings sync","method":"GET","path":"/settings/sync","permission":"settings:read","pathParams":[]},
519
519
  {"id":"settings.sync.update","group":"settings","summary":"Flip Sync switches (admin). Partial patch: only the keys sent change. Off stops new work; nothing already created is removed.","cli":"dench settings sync set","method":"PATCH","path":"/settings/sync","permission":"settings:write","pathParams":[]},
520
+ {"id":"settings.announcementGroups.list","group":"settings","summary":"List the workspace's Slack announcement channel groups and the channels in each right now (admin). A group is a rule on channel names or channels picked by hand. Read only: it cannot send an announcement or change a group.","cli":"dench settings announcement-groups","method":"GET","path":"/settings/announcement-groups","permission":"settings:read","pathParams":[]},
521
+ {"id":"settings.announcementGroups.save","group":"settings","summary":"Make or change a Slack announcement channel group (admin): a rule on channel names, or channels picked by name; add or take out single channels without restating the group; rename it. It sends nothing: a group only ticks channels in the New announcement dialog.","cli":"dench settings announcement-groups save","method":"POST","path":"/settings/announcement-groups","permission":"settings:write","pathParams":[]},
522
+ {"id":"settings.announcementGroups.delete","group":"settings","summary":"Delete a Slack announcement channel group by name (admin). Announcements already sent or scheduled keep their channels.","cli":"dench settings announcement-groups delete","method":"DELETE","path":"/settings/announcement-groups/{name}","permission":"settings:write","pathParams":["name"]},
520
523
  ];
521
524
 
522
525
  /** CLI-only operation ids (sessions, fs, imports): never callable from an app. */
@@ -5985,6 +5985,56 @@ const rawApiOperations = [
5985
5985
  transformArgs: (input) => ({ patch: input }),
5986
5986
  },
5987
5987
  }),
5988
+
5989
+ // Slack announcement channel groups (Settings → Dench in Slack →
5990
+ // Announcements → New announcement): which exist and what is in each,
5991
+ // and making, changing and deleting one. Admin-only server-side. No
5992
+ // operation drafts or sends an announcement: that stays a person's click.
5993
+ op({
5994
+ id: "settings.announcementGroups.list",
5995
+ group: "settings",
5996
+ summary:
5997
+ "List the workspace's Slack announcement channel groups and the channels in each right now (admin). A group is a rule on channel names or channels picked by hand. Read only: it cannot send an announcement or change a group.",
5998
+ cli: "dench settings announcement-groups",
5999
+ method: "GET",
6000
+ path: "/settings/announcement-groups",
6001
+ requestSchema: noBody,
6002
+ responseSchema: anyResponse,
6003
+ backend: convex(
6004
+ "action",
6005
+ "functions/slackAnnouncementsNode:listGroupsForCaller",
6006
+ ),
6007
+ }),
6008
+ op({
6009
+ id: "settings.announcementGroups.save",
6010
+ group: "settings",
6011
+ summary:
6012
+ "Make or change a Slack announcement channel group (admin): a rule on channel names, or channels picked by name; add or take out single channels without restating the group; rename it. It sends nothing: a group only ticks channels in the New announcement dialog.",
6013
+ cli: "dench settings announcement-groups save",
6014
+ method: "POST",
6015
+ path: "/settings/announcement-groups",
6016
+ requestSchema: anyObject,
6017
+ responseSchema: anyResponse,
6018
+ backend: convex(
6019
+ "action",
6020
+ "functions/slackAnnouncementsNode:saveGroupForCaller",
6021
+ ),
6022
+ }),
6023
+ op({
6024
+ id: "settings.announcementGroups.delete",
6025
+ group: "settings",
6026
+ summary:
6027
+ "Delete a Slack announcement channel group by name (admin). Announcements already sent or scheduled keep their channels.",
6028
+ cli: "dench settings announcement-groups delete",
6029
+ method: "DELETE",
6030
+ path: "/settings/announcement-groups/{name}",
6031
+ requestSchema: z.object({ name: z.string().min(1).max(40) }).strict(),
6032
+ responseSchema: anyResponse,
6033
+ backend: convex(
6034
+ "mutation",
6035
+ "functions/slackAnnouncements:deleteGroupForCaller",
6036
+ ),
6037
+ }),
5988
6038
  ] as const satisfies readonly ApiOperation[];
5989
6039
 
5990
6040
  /**