@dench.com/cli 3.11.30-staging.642 → 3.11.32-staging.711

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
@@ -3503,6 +3503,8 @@ export interface ApiRequests {
3503
3503
  slug: string;
3504
3504
  pinned: boolean;
3505
3505
  };
3506
+ /** Share an app you added with the workspace (shared) or make it private to you again (private). Owner only. — `dench apps share` — POST /api/v1/apps/{slug}/visibility */
3507
+ "apps.setVisibility": Record<string, unknown>;
3506
3508
  /** Register an inbound webhook for an app. Returns the URL and signing secret ONCE. — `dench apps webhooks register` — POST /api/v1/apps/{slug}/webhooks */
3507
3509
  "apps.webhooks.register": {
3508
3510
  /** Installed app slug. */
@@ -8125,6 +8127,7 @@ export interface ApiResponses {
8125
8127
  "apps.uninstall": unknown;
8126
8128
  "apps.setEnabled": unknown;
8127
8129
  "apps.setPinned": unknown;
8130
+ "apps.setVisibility": unknown;
8128
8131
  "apps.webhooks.register": unknown;
8129
8132
  "apps.webhooks.list": unknown;
8130
8133
  "apps.webhooks.poll": unknown;
@@ -8825,6 +8828,8 @@ export type DenchApiTree = {
8825
8828
  setEnabled(args: Req<"apps.setEnabled">): Promise<Res<"apps.setEnabled">>;
8826
8829
  /** Pin or unpin an installed app in the rail. (`dench apps pin`) */
8827
8830
  setPinned(args: Req<"apps.setPinned">): Promise<Res<"apps.setPinned">>;
8831
+ /** Share an app you added with the workspace (shared) or make it private to you again (private). Owner only. (`dench apps share`) */
8832
+ setVisibility(args: Req<"apps.setVisibility">): Promise<Res<"apps.setVisibility">>;
8828
8833
  /** Uninstall an app from the workspace. (`dench apps uninstall`) */
8829
8834
  uninstall(args: Req<"apps.uninstall">): Promise<Res<"apps.uninstall">>;
8830
8835
  webhooks: {
package/apps.ts CHANGED
@@ -35,6 +35,9 @@ const api = {
35
35
  "functions/appStore:setEnabled",
36
36
  ),
37
37
  setPinned: makeFunctionReference<"mutation">("functions/appStore:setPinned"),
38
+ setVisibility: makeFunctionReference<"mutation">(
39
+ "functions/appStore:setVisibility",
40
+ ),
38
41
  listTree: makeFunctionReference<"query">("functions/files:listTree"),
39
42
  getFileContent: makeFunctionReference<"query">(
40
43
  "functions/files:getFileContent",
@@ -105,11 +108,12 @@ export function appsHelpText(): string {
105
108
  Scaffold .dench.yaml + index.html and register it
106
109
  dench apps install <listingId> [--json] Install a gallery listing into this workspace
107
110
  dench apps publish <appPath> --slug <slug> --name "My App" \\
108
- [--description "…"] [--icon <name>] [--visibility org|public|official|unlisted] [--version 1.0.0]
111
+ [--description "…"] [--icon <name>] [--visibility private|org|public|official|unlisted] [--version 1.0.0]
109
112
  Bundle an app's files into a version + listing
110
113
  dench apps uninstall <slug> Remove an installed app
111
114
  dench apps enable | disable <slug> Toggle whether the app loads
112
115
  dench apps pin | unpin <slug> Toggle the rail pin
116
+ dench apps share | unshare <slug> Share your app with the workspace, or make it private again
113
117
  dench apps validate <appPath> [--json] Check the manifest, permissions and every window.dench call
114
118
  (local folder, or a workspace path like /apps/x.dench.app)
115
119
  dench apps webhooks register <slug> <hookName> [--rotate]
@@ -434,6 +438,22 @@ export async function runAppsCommand(opts: {
434
438
  out(ctx, { ok: true, slug, pinned: sub === "pin" });
435
439
  return;
436
440
  }
441
+ case "share":
442
+ case "unshare": {
443
+ const slug = ctx.args.shift();
444
+ if (!slug) {
445
+ throw new AppsCliError(
446
+ `Missing app slug. Usage: dench apps ${sub} <slug>`,
447
+ );
448
+ }
449
+ const visibility = sub === "share" ? "shared" : "private";
450
+ await ctx.convex.mutation(
451
+ api.setVisibility,
452
+ withAuth(ctx, { slug, visibility }),
453
+ );
454
+ out(ctx, { ok: true, slug, visibility });
455
+ return;
456
+ }
437
457
  default: {
438
458
  const suggestion = closestMatch(sub, APPS_SUBCOMMANDS);
439
459
  throw new AppsCliError(
@@ -458,6 +478,8 @@ const APPS_SUBCOMMANDS = [
458
478
  "disable",
459
479
  "pin",
460
480
  "unpin",
481
+ "share",
482
+ "unshare",
461
483
  "validate",
462
484
  "webhooks",
463
485
  "help",
package/email.ts CHANGED
@@ -396,8 +396,8 @@ ${EMAIL_INBOX_HELP}
396
396
  dench email draft signature <id> [--json] # read signature HTML; insert visibly into the body
397
397
  # Identical native create/send invocations reuse a saved request ID. Use --request-id <new-id> for another identical email.
398
398
  dench email send --to <email> [--subject <subject>] (--text <body> | --html <body> | --text-file <path> | --html-file <path>) [--mailbox <id/email>] [--cc <emails>] [--bcc <emails>] [--request-id <id>] [--wait <seconds>|--no-wait] [--json] # native default; observe the same receipt for 10s by default (--wait 0..60)
399
- dench email identity verify --from founder@example.com [--private] [--json]
400
- dench email identity verify --domain example.com [--from founder@example.com] [--private] [--json]
399
+ dench email identity verify --from founder@example.com [--shared] [--json] # private to you (and admins) unless --shared
400
+ dench email identity verify --domain example.com [--from founder@example.com] [--shared] [--json]
401
401
  dench email identity list [--domain example.com] [--json]
402
402
  dench email identity dns --identity <identityId|domain|email> [--json]
403
403
  dench email identity status --identity founder@example.com [--json]
@@ -966,7 +966,14 @@ async function runIdentity(ctx: EmailCliContext) {
966
966
  fromName: getFlag(ctx.args, "--from-name"),
967
967
  replyToEmail: getFlag(ctx.args, "--reply-to"),
968
968
  configurationSetName,
969
- ...(hasFlag(ctx.args, "--private") ? { sharing: "restricted" } : {}),
969
+ // Private unless shared (DEN-29): the server restricts a new sender
970
+ // to the member adding it unless `--shared` asks for the workspace.
971
+ // `--private` predates that default and is still accepted.
972
+ ...(hasFlag(ctx.args, "--shared")
973
+ ? { sharing: "org" }
974
+ : hasFlag(ctx.args, "--private")
975
+ ? { sharing: "restricted" }
976
+ : {}),
970
977
  },
971
978
  );
972
979
  const verification = (await callAction(
@@ -468,6 +468,7 @@ export const APP_SDK_OPERATIONS: readonly AppSdkOperationInfo[] = [
468
468
  {"id":"apps.uninstall","group":"apps","summary":"Uninstall an app from the workspace.","cli":"dench apps uninstall","method":"DELETE","path":"/apps/{slug}","permission":"apps:write","pathParams":["slug"]},
469
469
  {"id":"apps.setEnabled","group":"apps","summary":"Enable or disable an installed app.","cli":"dench apps enable","method":"PATCH","path":"/apps/{slug}","permission":"apps:write","pathParams":["slug"]},
470
470
  {"id":"apps.setPinned","group":"apps","summary":"Pin or unpin an installed app in the rail.","cli":"dench apps pin","method":"POST","path":"/apps/{slug}/pin","permission":"apps:write","pathParams":["slug"]},
471
+ {"id":"apps.setVisibility","group":"apps","summary":"Share an app you added with the workspace (shared) or make it private to you again (private). Owner only.","cli":"dench apps share","method":"POST","path":"/apps/{slug}/visibility","permission":"apps:write","pathParams":["slug"]},
471
472
  {"id":"apps.webhooks.register","group":"apps","summary":"Register an inbound webhook for an app. Returns the URL and signing secret ONCE.","cli":"dench apps webhooks register","method":"POST","path":"/apps/{slug}/webhooks","permission":"webhooks:receive","pathParams":["slug"]},
472
473
  {"id":"apps.webhooks.list","group":"apps","summary":"List an app's registered webhooks (URLs, never secrets).","cli":"dench apps webhooks list","method":"GET","path":"/apps/{slug}/webhooks","permission":"webhooks:receive","pathParams":["slug"]},
473
474
  {"id":"apps.webhooks.poll","group":"apps","summary":"Read events an app webhook received since a timestamp.","cli":"dench apps webhooks poll","method":"GET","path":"/apps/{slug}/webhooks/{hookName}/events","permission":"webhooks:receive","pathParams":["slug","hookName"]},
@@ -117,9 +117,16 @@ export const COMMAND_ARGUMENTS = [
117
117
  [1, 1],
118
118
  "--slug --name --description --icon --visibility --version",
119
119
  ),
120
- ...["install", "uninstall", "enable", "disable", "pin", "unpin"].map((verb) =>
121
- spec(`apps ${verb}`, [1, 1]),
122
- ),
120
+ ...[
121
+ "install",
122
+ "uninstall",
123
+ "enable",
124
+ "disable",
125
+ "pin",
126
+ "unpin",
127
+ "share",
128
+ "unshare",
129
+ ].map((verb) => spec(`apps ${verb}`, [1, 1])),
123
130
  spec("apps webhooks register", [2, 2], "", "--rotate"),
124
131
  spec("apps webhooks delete", [2, 2]),
125
132
  spec("apps validate", [1, 1]),
@@ -5353,6 +5353,18 @@ const rawApiOperations = [
5353
5353
  responseSchema: anyResponse,
5354
5354
  backend: convex("mutation", "functions/appStore:setPinned"),
5355
5355
  }),
5356
+ op({
5357
+ id: "apps.setVisibility",
5358
+ group: "apps",
5359
+ summary:
5360
+ "Share an app you added with the workspace (shared) or make it private to you again (private). Owner only.",
5361
+ cli: "dench apps share",
5362
+ method: "POST",
5363
+ path: "/apps/{slug}/visibility",
5364
+ requestSchema: anyObject,
5365
+ responseSchema: anyResponse,
5366
+ backend: convex("mutation", "functions/appStore:setVisibility"),
5367
+ }),
5356
5368
  op({
5357
5369
  id: "apps.validate",
5358
5370
  group: "apps",