@protobase/client 0.44.4 → 0.45.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/auth.d.ts +1 -0
- package/dist/organizations.d.ts +2 -0
- package/dist/organizations.js +2 -0
- package/dist/static-session.js +1 -0
- package/package.json +3 -3
package/dist/auth.d.ts
CHANGED
|
@@ -107,6 +107,7 @@ export declare const createAuthSession: (options?: AuthSessionOptions) => {
|
|
|
107
107
|
myInvitations: () => Promise<OrganizationInvitation[]>;
|
|
108
108
|
invitation: (token: string) => Promise<InvitationPreview>;
|
|
109
109
|
accept: (token: string) => Promise<unknown>;
|
|
110
|
+
acceptMine: (invitationId: string) => Promise<unknown>;
|
|
110
111
|
signUpFromInvitation: (token: string, input: {
|
|
111
112
|
name: string;
|
|
112
113
|
password?: string;
|
package/dist/organizations.d.ts
CHANGED
|
@@ -120,6 +120,8 @@ export declare const organizationsClient: (client: BetterAuthClient, refreshToke
|
|
|
120
120
|
invitation: (token: string) => Promise<InvitationPreview>;
|
|
121
121
|
/** Accepts an invitation signed in as its address, and works in its organization. */
|
|
122
122
|
accept: (token: string) => Promise<unknown>;
|
|
123
|
+
/** Accepts one of the person's own invitations (`myInvitations`), and works in its organization. */
|
|
124
|
+
acceptMine: (invitationId: string) => Promise<unknown>;
|
|
123
125
|
/** Creates an account for an invited address without one, accepts the invitation and signs in; for either kind of invitation. */
|
|
124
126
|
signUpFromInvitation: (token: string, input: {
|
|
125
127
|
name: string;
|
package/dist/organizations.js
CHANGED
|
@@ -117,6 +117,8 @@ const organizationsClient = (client, refreshToken) => {
|
|
|
117
117
|
invitation: (token) => call("/invitation", "This invitation link is not valid", { query: { token } }),
|
|
118
118
|
/** Accepts an invitation signed in as its address, and works in its organization. */
|
|
119
119
|
accept: async (token) => thenRefresh(await call("/invitation/accept", "Could not accept the invitation", { body: { token } })),
|
|
120
|
+
/** Accepts one of the person's own invitations (`myInvitations`), and works in its organization. */
|
|
121
|
+
acceptMine: async (invitationId) => thenRefresh(await call("/invitation/accept-own", "Could not accept the invitation", { body: { invitationId } })),
|
|
120
122
|
/** Creates an account for an invited address without one, accepts the invitation and signs in; for either kind of invitation. */
|
|
121
123
|
signUpFromInvitation: async (token, input) => thenRefresh(await call("/invitation/sign-up", "Could not create your account", { body: {
|
|
122
124
|
token,
|
package/dist/static-session.js
CHANGED
|
@@ -139,6 +139,7 @@ const createStaticSession = (token, user = {
|
|
|
139
139
|
myInvitations: async () => [],
|
|
140
140
|
invitation: unsupported("read an invitation"),
|
|
141
141
|
accept: unsupported("accept an invitation"),
|
|
142
|
+
acceptMine: unsupported("accept an invitation"),
|
|
142
143
|
signUpFromInvitation: unsupported("accept an invitation")
|
|
143
144
|
}
|
|
144
145
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@protobase/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.0",
|
|
4
4
|
"description": "Typed fetch client for the Protobase REST API.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@better-auth/passkey": "^1.7.12",
|
|
33
|
-
"@protobase/layout": "0.
|
|
34
|
-
"@protobase/schema": "0.
|
|
33
|
+
"@protobase/layout": "0.45.0",
|
|
34
|
+
"@protobase/schema": "0.45.0",
|
|
35
35
|
"@simplewebauthn/browser": "^13.3.0",
|
|
36
36
|
"better-auth": "^1.7.12"
|
|
37
37
|
}
|