mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 08:13:56 +10:00
feat: add organisations (#1820)
This commit is contained in:
@ -9,3 +9,16 @@ export const fancyId = customAlphabet('abcdefhiklmnorstuvwxyz', 16);
|
||||
export const prefixedId = (prefix: string, length = 16) => {
|
||||
return `${prefix}_${fancyId(length)}`;
|
||||
};
|
||||
|
||||
type DatabaseIdPrefix =
|
||||
| 'org'
|
||||
| 'org_claim'
|
||||
| 'org_group'
|
||||
| 'org_setting'
|
||||
| 'member'
|
||||
| 'member_invite'
|
||||
| 'group_member'
|
||||
| 'team_group'
|
||||
| 'team_setting';
|
||||
|
||||
export const generateDatabaseId = (prefix: DatabaseIdPrefix) => prefixedId(prefix, 16);
|
||||
|
||||
Reference in New Issue
Block a user