Skip to content

Commit

Permalink
chore(types,backend,clerk-react): Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Nov 20, 2023
1 parent f81ebb3 commit 6c59374
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/types/src/organizationMembership.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,35 @@ declare global {
[k: string]: unknown;
}

/**
* If you want to provide custom types for the organizationMembership.permissions
* array, simply redeclare this rule in the global namespace.
* Every utility function or component will use the provided type.
* ```
* interface OrganizationCustomPermissions {
* "org:appointment:accept":"org:appointment:accept";
* "org:appointment:decline":"org:appointment:decline";
* "org:patients:create":"org:patients:create";
* }
* ```
*/
interface OrganizationCustomPermissions {
[k: string]: string;
}

/**
* If you want to provide custom types for the organizationMembership.role
* property, simply redeclare this rule in the global namespace.
* Every utility function or component will use the provided type.
* ```
* interface OrganizationCustomPermissions {
* "org:role1":"org:role1";
* "org:role2":"org:role2";
* }
* ```
* `organizationMembership.role` will be equal to "org:role1" | "org:role2"
*
*/
interface OrganizationCustomRoles {
[k: string]: string;
}
Expand Down

0 comments on commit 6c59374

Please sign in to comment.