forked from clerk/javascript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathorganizationInvitation.ts
More file actions
31 lines (27 loc) · 986 Bytes
/
Copy pathorganizationInvitation.ts
File metadata and controls
31 lines (27 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import type { OrganizationCustomRoleKey } from './organizationMembership';
import type { ClerkResource } from './resource';
declare global {
/**
* If you want to provide custom types for the organizationInvitation.publicMetadata
* object, simply redeclare this rule in the global namespace.
* Every organizationInvitation object will use the provided type.
*/
interface OrganizationInvitationPublicMetadata {
[k: string]: unknown;
}
interface OrganizationInvitationPrivateMetadata {
[k: string]: unknown;
}
}
export interface OrganizationInvitationResource extends ClerkResource {
id: string;
emailAddress: string;
organizationId: string;
publicMetadata: OrganizationInvitationPublicMetadata;
role: OrganizationCustomRoleKey;
status: OrganizationInvitationStatus;
createdAt: Date;
updatedAt: Date;
revoke: () => Promise<OrganizationInvitationResource>;
}
export type OrganizationInvitationStatus = 'pending' | 'accepted' | 'revoked';