@fonderie/workspaces 5.2.3 → 5.3.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.
@@ -26,6 +26,8 @@ const MESSAGE_KEYS: { readonly workspaceInvitation: "workspace-invitation"; }
26
26
 
27
27
  const EVENT_KEYS: { readonly personalWorkspaceCreated: "fonderie.workspace.personal.created"; }
28
28
 
29
+ const DEFAULT_TEMPLATES: { "workspace-invitation": { subject: string; html: string; text: string; }; }
30
+
29
31
  type WorkspaceType = 'ORGANIZATION' | 'PERSONAL' | 'TEAM' | 'COMMUNITY' | 'VENDOR';
30
32
 
31
33
  type InvitationStatus = 'PENDING' | 'ACCEPTED' | 'REJECTED' | 'CANCELLED';
package/dist/index.cjs CHANGED
@@ -20,6 +20,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/index.ts
21
21
  var index_exports = {};
22
22
  __export(index_exports, {
23
+ DEFAULT_TEMPLATES: () => DEFAULT_TEMPLATES,
23
24
  EVENT_KEYS: () => EVENT_KEYS,
24
25
  MESSAGE_KEYS: () => MESSAGE_KEYS,
25
26
  WorkspacesModule: () => WorkspacesModule,
@@ -1453,6 +1454,27 @@ var WorkspacesModule = class {
1453
1454
  }
1454
1455
  };
1455
1456
 
1457
+ // src/templates.ts
1458
+ var DEFAULT_TEMPLATES = {
1459
+ // Payload carries { token, pin }; the code path is PIN-based, so the copy
1460
+ // uses {{pin}} only — token is intentionally not surfaced.
1461
+ [MESSAGE_KEYS.workspaceInvitation]: {
1462
+ subject: "You've been invited to a workspace",
1463
+ html: `<h1>You&rsquo;ve been invited</h1>
1464
+ <p>You&rsquo;ve been invited to join a workspace. Use this code to accept the invitation:</p>
1465
+ <p><span class="pin-code">{{pin}}</span></p>
1466
+ <p class="muted">Enter this code on the invitation screen to join the team.</p>`,
1467
+ text: `You've been invited
1468
+
1469
+ You've been invited to join a workspace. Use this code to accept the invitation: {{pin}}
1470
+
1471
+ Enter this code on the invitation screen to join the team.`
1472
+ }
1473
+ };
1474
+ var SAMPLE_PAYLOADS = {
1475
+ [MESSAGE_KEYS.workspaceInvitation]: { token: "inv_abc123", pin: "123456" }
1476
+ };
1477
+
1456
1478
  // src/middlewares/require-workspace.ts
1457
1479
  var import_core6 = require("@fonderie/core");
1458
1480
  var requireWorkspace = async (ctx, next) => {
@@ -1561,6 +1583,7 @@ function workspaceExportContributor(store) {
1561
1583
  }
1562
1584
  // Annotate the CommonJS export names for ESM import in node:
1563
1585
  0 && (module.exports = {
1586
+ DEFAULT_TEMPLATES,
1564
1587
  EVENT_KEYS,
1565
1588
  MESSAGE_KEYS,
1566
1589
  WorkspacesModule,