@excali-boards/boards-api-client 1.1.1 → 1.1.2
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.
|
@@ -10,6 +10,7 @@ export declare class APIInvites {
|
|
|
10
10
|
getInviteDetails({ auth, code }: InvitesFunctionsInput['getInviteDetails']): Promise<import("..").WebResponse<InviteDetails>>;
|
|
11
11
|
createInvite({ auth, body }: InvitesFunctionsInput['createInvite']): Promise<import("..").WebResponse<CreateInviteOutput>>;
|
|
12
12
|
useInvite({ auth, code }: InvitesFunctionsInput['useInvite']): Promise<import("..").WebResponse<UseInviteOutput>>;
|
|
13
|
+
renewInvite({ auth, code }: InvitesFunctionsInput['renewInvite']): Promise<import("..").WebResponse<RenewInviteOutput>>;
|
|
13
14
|
revokeInvite({ auth, code }: InvitesFunctionsInput['revokeInvite']): Promise<import("..").WebResponse<string>>;
|
|
14
15
|
}
|
|
15
16
|
export type InvitesFunctionsInput = {
|
|
@@ -36,6 +37,10 @@ export type InvitesFunctionsInput = {
|
|
|
36
37
|
auth: string;
|
|
37
38
|
code: string;
|
|
38
39
|
};
|
|
40
|
+
'renewInvite': {
|
|
41
|
+
auth: string;
|
|
42
|
+
code: string;
|
|
43
|
+
};
|
|
39
44
|
};
|
|
40
45
|
export type ViewInvitesQuery = {
|
|
41
46
|
type: ResourceType;
|
|
@@ -58,6 +63,9 @@ export type CreateInviteOutput = {
|
|
|
58
63
|
expiresAt: string;
|
|
59
64
|
maxUses: number;
|
|
60
65
|
};
|
|
66
|
+
export type RenewInviteOutput = CreateInviteOutput & {
|
|
67
|
+
currentUses: number;
|
|
68
|
+
};
|
|
61
69
|
export type GetUserInvitesOutput = {
|
|
62
70
|
invites: InviteData[];
|
|
63
71
|
canInvite: boolean;
|
|
@@ -82,11 +90,7 @@ export type UseInviteOutput = {
|
|
|
82
90
|
}[];
|
|
83
91
|
};
|
|
84
92
|
};
|
|
85
|
-
export type InviteDetails = {
|
|
86
|
-
code: string;
|
|
87
|
-
expiresAt: string;
|
|
88
|
-
maxUses: number;
|
|
89
|
-
currentUses: number;
|
|
93
|
+
export type InviteDetails = RenewInviteOutput & {
|
|
90
94
|
invitedBy: {
|
|
91
95
|
userId: string;
|
|
92
96
|
displayName: string;
|
package/dist/classes/invites.js
CHANGED
|
@@ -38,6 +38,12 @@ class APIInvites {
|
|
|
38
38
|
endpoint: this.web.qp(`/invites/${code}`),
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
+
async renewInvite({ auth, code }) {
|
|
42
|
+
return await this.web.request({
|
|
43
|
+
method: 'PATCH', auth,
|
|
44
|
+
endpoint: this.web.qp(`/invites/${code}`),
|
|
45
|
+
});
|
|
46
|
+
}
|
|
41
47
|
async revokeInvite({ auth, code }) {
|
|
42
48
|
return await this.web.request({
|
|
43
49
|
method: 'DELETE', auth,
|
package/package.json
CHANGED