@fonderie/workspaces 5.2.2 → 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.
package/dist/index.d.cts CHANGED
@@ -36,6 +36,14 @@ declare class WorkspacesModule implements IFonderieModule {
36
36
  private provisionPersonalWorkspace;
37
37
  }
38
38
 
39
+ declare const DEFAULT_TEMPLATES: {
40
+ "workspace-invitation": {
41
+ subject: string;
42
+ html: string;
43
+ text: string;
44
+ };
45
+ };
46
+
39
47
  interface IWorkspaceAddressDTO {
40
48
  line1: string;
41
49
  line2: string;
@@ -234,4 +242,4 @@ declare function workspaceExportContributor(store: IStoreAdapter): {
234
242
  collect: (userId: string) => Promise<unknown>;
235
243
  };
236
244
 
237
- export { EVENT_KEYS, type IImportMembership, type IImportRole, type IImportWorkspace, IInvitation, type IInvitationDTO, IMember, type IMemberDTO, IRole, type IRoleDTO, IWorkspace, type IWorkspaceDTO, IWorkspaceSettings, type IWorkspaceSettingsDTO, type IWorkspacesConfig, MESSAGE_KEYS, type WorkspacesEventKey, type WorkspacesMessageKey, WorkspacesModule, deleteUserData, exportUserData, importMembership, importRole, importWorkspace, schemas, toInvitationDTO, toMemberDTO, toRoleDTO, toSettingsDTO, toWorkspaceDTO, workspaceExportContributor };
245
+ export { DEFAULT_TEMPLATES, EVENT_KEYS, type IImportMembership, type IImportRole, type IImportWorkspace, IInvitation, type IInvitationDTO, IMember, type IMemberDTO, IRole, type IRoleDTO, IWorkspace, type IWorkspaceDTO, IWorkspaceSettings, type IWorkspaceSettingsDTO, type IWorkspacesConfig, MESSAGE_KEYS, type WorkspacesEventKey, type WorkspacesMessageKey, WorkspacesModule, deleteUserData, exportUserData, importMembership, importRole, importWorkspace, schemas, toInvitationDTO, toMemberDTO, toRoleDTO, toSettingsDTO, toWorkspaceDTO, workspaceExportContributor };
package/dist/index.d.ts CHANGED
@@ -36,6 +36,14 @@ declare class WorkspacesModule implements IFonderieModule {
36
36
  private provisionPersonalWorkspace;
37
37
  }
38
38
 
39
+ declare const DEFAULT_TEMPLATES: {
40
+ "workspace-invitation": {
41
+ subject: string;
42
+ html: string;
43
+ text: string;
44
+ };
45
+ };
46
+
39
47
  interface IWorkspaceAddressDTO {
40
48
  line1: string;
41
49
  line2: string;
@@ -234,4 +242,4 @@ declare function workspaceExportContributor(store: IStoreAdapter): {
234
242
  collect: (userId: string) => Promise<unknown>;
235
243
  };
236
244
 
237
- export { EVENT_KEYS, type IImportMembership, type IImportRole, type IImportWorkspace, IInvitation, type IInvitationDTO, IMember, type IMemberDTO, IRole, type IRoleDTO, IWorkspace, type IWorkspaceDTO, IWorkspaceSettings, type IWorkspaceSettingsDTO, type IWorkspacesConfig, MESSAGE_KEYS, type WorkspacesEventKey, type WorkspacesMessageKey, WorkspacesModule, deleteUserData, exportUserData, importMembership, importRole, importWorkspace, schemas, toInvitationDTO, toMemberDTO, toRoleDTO, toSettingsDTO, toWorkspaceDTO, workspaceExportContributor };
245
+ export { DEFAULT_TEMPLATES, EVENT_KEYS, type IImportMembership, type IImportRole, type IImportWorkspace, IInvitation, type IInvitationDTO, IMember, type IMemberDTO, IRole, type IRoleDTO, IWorkspace, type IWorkspaceDTO, IWorkspaceSettings, type IWorkspaceSettingsDTO, type IWorkspacesConfig, MESSAGE_KEYS, type WorkspacesEventKey, type WorkspacesMessageKey, WorkspacesModule, deleteUserData, exportUserData, importMembership, importRole, importWorkspace, schemas, toInvitationDTO, toMemberDTO, toRoleDTO, toSettingsDTO, toWorkspaceDTO, workspaceExportContributor };
package/dist/index.js CHANGED
@@ -1417,6 +1417,27 @@ var WorkspacesModule = class {
1417
1417
  }
1418
1418
  };
1419
1419
 
1420
+ // src/templates.ts
1421
+ var DEFAULT_TEMPLATES = {
1422
+ // Payload carries { token, pin }; the code path is PIN-based, so the copy
1423
+ // uses {{pin}} only — token is intentionally not surfaced.
1424
+ [MESSAGE_KEYS.workspaceInvitation]: {
1425
+ subject: "You've been invited to a workspace",
1426
+ html: `<h1>You&rsquo;ve been invited</h1>
1427
+ <p>You&rsquo;ve been invited to join a workspace. Use this code to accept the invitation:</p>
1428
+ <p><span class="pin-code">{{pin}}</span></p>
1429
+ <p class="muted">Enter this code on the invitation screen to join the team.</p>`,
1430
+ text: `You've been invited
1431
+
1432
+ You've been invited to join a workspace. Use this code to accept the invitation: {{pin}}
1433
+
1434
+ Enter this code on the invitation screen to join the team.`
1435
+ }
1436
+ };
1437
+ var SAMPLE_PAYLOADS = {
1438
+ [MESSAGE_KEYS.workspaceInvitation]: { token: "inv_abc123", pin: "123456" }
1439
+ };
1440
+
1420
1441
  // src/middlewares/require-workspace.ts
1421
1442
  import { setApiResponse as setApiResponse6, HTTP as HTTP6 } from "@fonderie/core";
1422
1443
  var requireWorkspace = async (ctx, next) => {
@@ -1524,6 +1545,7 @@ function workspaceExportContributor(store) {
1524
1545
  return { name: "workspaces", collect: (userId) => exportUserData(store, userId) };
1525
1546
  }
1526
1547
  export {
1548
+ DEFAULT_TEMPLATES,
1527
1549
  EVENT_KEYS,
1528
1550
  MESSAGE_KEYS,
1529
1551
  WorkspacesModule,