@excali-boards/boards-api-client 1.1.71 → 1.1.73
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/classes/auth.d.ts +1 -0
- package/dist/classes/sessions.d.ts +41 -23
- package/dist/classes/sessions.js +17 -44
- package/dist/classes/users.d.ts +1 -0
- package/dist/external/vars.d.ts +2 -0
- package/dist/external/vars.js +1 -0
- package/package.json +2 -2
- package/prisma/generated/edge.js +4 -16
- package/prisma/generated/index-browser.js +1 -13
- package/prisma/generated/index.d.ts +272 -1548
- package/prisma/generated/index.js +4 -16
- package/prisma/generated/package.json +1 -1
- package/prisma/generated/schema.prisma +2 -18
- package/prisma/generated/wasm.js +4 -16
- package/prisma/schema/user.prisma +2 -18
package/dist/classes/auth.d.ts
CHANGED
|
@@ -28,6 +28,7 @@ export declare class APIAuth {
|
|
|
28
28
|
}[];
|
|
29
29
|
mainGroupId: string | null;
|
|
30
30
|
mainLoginType: import("prisma/generated/index.js").$Enums.Platforms;
|
|
31
|
+
qrLoginRedirectDelay: boolean;
|
|
31
32
|
registrationMethod: import("prisma/generated/index.js").$Enums.RegistrationMethod;
|
|
32
33
|
userId: string;
|
|
33
34
|
}>>;
|
|
@@ -9,10 +9,10 @@ export declare class APISessions {
|
|
|
9
9
|
deleteSession({ auth, dbId, ...rest }: SessionsFunctionsInput['deleteSession']): Promise<import("../types.js").WebResponse<string>>;
|
|
10
10
|
deleteAllSessions({ auth, ...rest }: SessionsFunctionsInput['deleteAllSessions']): Promise<import("../types.js").WebResponse<string>>;
|
|
11
11
|
rotateLinkedSession({ auth, body, ...rest }: SessionsFunctionsInput['rotateLinkedSession']): Promise<import("../types.js").WebResponse<string>>;
|
|
12
|
-
createQrLoginChallenge({ auth, ...rest }: SessionsFunctionsInput['createQrLoginChallenge']): Promise<import("../types.js").WebResponse<QrLoginChallengeOutput>>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
createQrLoginChallenge({ auth, body, ...rest }: SessionsFunctionsInput['createQrLoginChallenge']): Promise<import("../types.js").WebResponse<QrLoginChallengeOutput>>;
|
|
13
|
+
lookupQrLoginChallenge({ auth, body, ...rest }: SessionsFunctionsInput['lookupQrLoginChallenge']): Promise<import("../types.js").WebResponse<QrLoginChallengeLookupOutput>>;
|
|
14
|
+
decideQrLogin({ auth, body, ...rest }: SessionsFunctionsInput['decideQrLogin']): Promise<import("../types.js").WebResponse<QrLoginDecisionOutput>>;
|
|
15
|
+
redeemQrLogin({ auth, body, ...rest }: SessionsFunctionsInput['redeemQrLogin']): Promise<import("../types.js").WebResponse<QrLoginRedeemOutput>>;
|
|
16
16
|
}
|
|
17
17
|
export type SessionsFunctionsInput = WithHeaders<{
|
|
18
18
|
'createSession': {
|
|
@@ -35,18 +35,19 @@ export type SessionsFunctionsInput = WithHeaders<{
|
|
|
35
35
|
};
|
|
36
36
|
'createQrLoginChallenge': {
|
|
37
37
|
auth: string;
|
|
38
|
+
body: QrLoginChallengeCreateInput;
|
|
38
39
|
};
|
|
39
|
-
'
|
|
40
|
+
'lookupQrLoginChallenge': {
|
|
40
41
|
auth: string;
|
|
41
|
-
body:
|
|
42
|
+
body: QrLoginCodeInput;
|
|
42
43
|
};
|
|
43
|
-
'
|
|
44
|
+
'decideQrLogin': {
|
|
44
45
|
auth: string;
|
|
45
|
-
body:
|
|
46
|
+
body: QrLoginDecisionInput;
|
|
46
47
|
};
|
|
47
|
-
'
|
|
48
|
+
'redeemQrLogin': {
|
|
48
49
|
auth: string;
|
|
49
|
-
body:
|
|
50
|
+
body: QrLoginRedeemInput;
|
|
50
51
|
};
|
|
51
52
|
}>;
|
|
52
53
|
export type CreateSessionInput = {
|
|
@@ -76,31 +77,48 @@ export type SessionsOutput = {
|
|
|
76
77
|
isQrLogin: boolean;
|
|
77
78
|
}[];
|
|
78
79
|
};
|
|
79
|
-
export type
|
|
80
|
-
|
|
81
|
-
secret: string;
|
|
80
|
+
export type QrLoginChallengeCreateInput = {
|
|
81
|
+
requestDevice?: string;
|
|
82
82
|
};
|
|
83
|
-
export type QrLoginChallengeOutput =
|
|
83
|
+
export type QrLoginChallengeOutput = {
|
|
84
|
+
deviceCode: string;
|
|
85
|
+
userCode: string;
|
|
84
86
|
expiresAt: Date;
|
|
87
|
+
requestDevice: string | null;
|
|
85
88
|
};
|
|
86
|
-
export type
|
|
87
|
-
|
|
88
|
-
expiresAt?: Date;
|
|
89
|
+
export type QrLoginCodeInput = {
|
|
90
|
+
userCode: string;
|
|
89
91
|
};
|
|
90
|
-
export type
|
|
91
|
-
|
|
92
|
+
export type QrLoginStatus = 'pending' | 'approved' | 'denied';
|
|
93
|
+
export type QrLoginChallengeLookupOutput = {
|
|
94
|
+
status: QrLoginStatus;
|
|
95
|
+
userCode: string;
|
|
96
|
+
expiresAt: Date;
|
|
97
|
+
requestDevice: string | null;
|
|
98
|
+
};
|
|
99
|
+
export type QrLoginDecisionInput = QrLoginCodeInput & {
|
|
100
|
+
decision: 'approve' | 'deny';
|
|
101
|
+
expiresInSeconds?: number;
|
|
92
102
|
};
|
|
93
|
-
export type
|
|
103
|
+
export type QrLoginDecisionOutput = {
|
|
94
104
|
status: 'approved';
|
|
95
105
|
expiresAt: Date;
|
|
106
|
+
} | {
|
|
107
|
+
status: 'denied';
|
|
96
108
|
};
|
|
97
|
-
export type
|
|
109
|
+
export type QrLoginRedeemInput = {
|
|
110
|
+
deviceCode: string;
|
|
98
111
|
device?: Device;
|
|
99
|
-
ip?: string;
|
|
100
112
|
};
|
|
101
|
-
export type
|
|
113
|
+
export type QrLoginRedeemOutput = {
|
|
114
|
+
status: 'pending' | 'denied' | 'expired';
|
|
115
|
+
token?: undefined;
|
|
116
|
+
expiresAt?: undefined;
|
|
117
|
+
} | {
|
|
118
|
+
status: 'approved';
|
|
102
119
|
token: string;
|
|
103
120
|
expiresAt: Date;
|
|
121
|
+
redirectDelay: boolean;
|
|
104
122
|
};
|
|
105
123
|
export type UnlinkLoginMethodInput = {
|
|
106
124
|
platform: Platforms;
|
package/dist/classes/sessions.js
CHANGED
|
@@ -6,57 +6,30 @@ export class APISessions {
|
|
|
6
6
|
}
|
|
7
7
|
// Methods.
|
|
8
8
|
async createSession({ auth, body, ...rest }) {
|
|
9
|
-
return await this.web.request({
|
|
10
|
-
method: 'POST', auth, body, ...rest,
|
|
11
|
-
endpoint: this.web.qp('/sessions'),
|
|
12
|
-
});
|
|
9
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/sessions') });
|
|
13
10
|
}
|
|
14
11
|
async getAllSessions({ auth, ...rest }) {
|
|
15
|
-
return await this.web.request({
|
|
16
|
-
method: 'GET', auth, ...rest,
|
|
17
|
-
endpoint: this.web.qp('/sessions'),
|
|
18
|
-
});
|
|
12
|
+
return await this.web.request({ method: 'GET', auth, ...rest, endpoint: this.web.qp('/sessions') });
|
|
19
13
|
}
|
|
20
14
|
async deleteSession({ auth, dbId, ...rest }) {
|
|
21
|
-
return await this.web.request({
|
|
22
|
-
method: 'DELETE', auth, body: { dbId }, ...rest,
|
|
23
|
-
endpoint: this.web.qp('/sessions'),
|
|
24
|
-
});
|
|
15
|
+
return await this.web.request({ method: 'DELETE', auth, body: { dbId }, ...rest, endpoint: this.web.qp('/sessions') });
|
|
25
16
|
}
|
|
26
17
|
async deleteAllSessions({ auth, ...rest }) {
|
|
27
|
-
return await this.web.request({
|
|
28
|
-
method: 'DELETE', auth, ...rest,
|
|
29
|
-
endpoint: this.web.qp('/sessions/all'),
|
|
30
|
-
});
|
|
18
|
+
return await this.web.request({ method: 'DELETE', auth, ...rest, endpoint: this.web.qp('/sessions/all') });
|
|
31
19
|
}
|
|
32
20
|
async rotateLinkedSession({ auth, body, ...rest }) {
|
|
33
|
-
return await this.web.request({
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
async
|
|
39
|
-
return await this.web.request({
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
async
|
|
45
|
-
return await this.web.request({
|
|
46
|
-
method: 'POST', auth, body, ...rest,
|
|
47
|
-
endpoint: this.web.qp('/auth/qr/challenges/status'),
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
async approveQrLogin({ auth, body, ...rest }) {
|
|
51
|
-
return await this.web.request({
|
|
52
|
-
method: 'POST', auth, body, ...rest,
|
|
53
|
-
endpoint: this.web.qp('/auth/qr/challenges/approve'),
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
async completeQrLogin({ auth, body, ...rest }) {
|
|
57
|
-
return await this.web.request({
|
|
58
|
-
method: 'POST', auth, body, ...rest,
|
|
59
|
-
endpoint: this.web.qp('/auth/qr/challenges/complete'),
|
|
60
|
-
});
|
|
21
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/sessions/rotate') });
|
|
22
|
+
}
|
|
23
|
+
async createQrLoginChallenge({ auth, body, ...rest }) {
|
|
24
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/auth/qr/challenges') });
|
|
25
|
+
}
|
|
26
|
+
async lookupQrLoginChallenge({ auth, body, ...rest }) {
|
|
27
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/auth/qr/challenges/lookup') });
|
|
28
|
+
}
|
|
29
|
+
async decideQrLogin({ auth, body, ...rest }) {
|
|
30
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/auth/qr/challenges/decision') });
|
|
31
|
+
}
|
|
32
|
+
async redeemQrLogin({ auth, body, ...rest }) {
|
|
33
|
+
return await this.web.request({ method: 'POST', auth, body, ...rest, endpoint: this.web.qp('/auth/qr/challenges/redeem') });
|
|
61
34
|
}
|
|
62
35
|
}
|
package/dist/classes/users.d.ts
CHANGED
package/dist/external/vars.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export declare const DBUserSelectArgs: {
|
|
|
7
7
|
invitedBy: true;
|
|
8
8
|
avatarUrl: true;
|
|
9
9
|
mainGroupId: true;
|
|
10
|
+
qrLoginRedirectDelay: true;
|
|
10
11
|
displayName: true;
|
|
11
12
|
mainLoginType: true;
|
|
12
13
|
registrationMethod: true;
|
|
@@ -43,6 +44,7 @@ export declare const DBUserPartial: {
|
|
|
43
44
|
invitedBy: true;
|
|
44
45
|
avatarUrl: true;
|
|
45
46
|
mainGroupId: true;
|
|
47
|
+
qrLoginRedirectDelay: true;
|
|
46
48
|
displayName: true;
|
|
47
49
|
mainLoginType: true;
|
|
48
50
|
registrationMethod: true;
|
package/dist/external/vars.js
CHANGED
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.1.
|
|
2
|
+
"version": "1.1.73",
|
|
3
3
|
"name": "@excali-boards/boards-api-client",
|
|
4
4
|
"description": "A simple API client for the Boards API.",
|
|
5
5
|
"repository": "https://github.com/Excali-Boards/boards-api-client",
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"scripts": {
|
|
8
8
|
"ts": "pnpm install typescript --save-dev -g",
|
|
9
9
|
"init": "pnpm install && pnpm run build",
|
|
10
|
-
"build": "tsc
|
|
10
|
+
"build": "tsc",
|
|
11
11
|
"postinstall": "prisma generate",
|
|
12
12
|
"watch": "tsc --watch",
|
|
13
13
|
"lint": "eslint . --ext .ts",
|