@authsome/client 0.0.5 → 0.0.7
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/client.d.ts +43 -43
- package/dist/client.js +20 -20
- package/dist/index.d.ts +20 -20
- package/dist/index.js +62 -62
- package/dist/plugins/apikey.d.ts +3 -3
- package/dist/plugins/apikey.js +6 -6
- package/dist/plugins/notification.d.ts +3 -3
- package/dist/plugins/notification.js +6 -6
- package/dist/plugins/oidcprovider.d.ts +4 -0
- package/dist/plugins/oidcprovider.js +22 -0
- package/dist/plugins/organization.d.ts +15 -15
- package/dist/plugins/organization.js +28 -28
- package/dist/plugins/passkey.js +7 -7
- package/dist/plugins/webhook.js +4 -4
- package/dist/types.d.ts +3912 -3148
- package/package.json +2 -2
- package/src/client.ts +43 -43
- package/src/index.ts +20 -20
- package/src/plugins/apikey.ts +7 -7
- package/src/plugins/notification.ts +7 -7
- package/src/plugins/oidcprovider.ts +26 -0
- package/src/plugins/organization.ts +35 -35
- package/src/plugins/passkey.ts +7 -7
- package/src/plugins/webhook.ts +4 -4
- package/src/types.ts +4098 -3201
|
@@ -14,34 +14,6 @@ class OrganizationPlugin {
|
|
|
14
14
|
const path = '/createorganization';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
|
-
async updateOrganization(params) {
|
|
18
|
-
const path = `/${params.id}`;
|
|
19
|
-
return this.client.request('PATCH', path);
|
|
20
|
-
}
|
|
21
|
-
async deleteOrganization(params) {
|
|
22
|
-
const path = `/${params.id}`;
|
|
23
|
-
return this.client.request('DELETE', path);
|
|
24
|
-
}
|
|
25
|
-
async inviteMember() {
|
|
26
|
-
const path = '/invite';
|
|
27
|
-
return this.client.request('POST', path);
|
|
28
|
-
}
|
|
29
|
-
async removeMember(params) {
|
|
30
|
-
const path = `/${params.memberId}`;
|
|
31
|
-
return this.client.request('DELETE', path);
|
|
32
|
-
}
|
|
33
|
-
async createTeam() {
|
|
34
|
-
const path = '/createteam';
|
|
35
|
-
return this.client.request('POST', path);
|
|
36
|
-
}
|
|
37
|
-
async updateTeam(params) {
|
|
38
|
-
const path = `/${params.teamId}`;
|
|
39
|
-
return this.client.request('PATCH', path);
|
|
40
|
-
}
|
|
41
|
-
async deleteTeam(params) {
|
|
42
|
-
const path = `/${params.teamId}`;
|
|
43
|
-
return this.client.request('DELETE', path);
|
|
44
|
-
}
|
|
45
17
|
async getOrganization(params) {
|
|
46
18
|
const path = `/${params.id}`;
|
|
47
19
|
return this.client.request('GET', path);
|
|
@@ -50,6 +22,14 @@ class OrganizationPlugin {
|
|
|
50
22
|
const path = '/listorganizations';
|
|
51
23
|
return this.client.request('GET', path);
|
|
52
24
|
}
|
|
25
|
+
async updateOrganization(params) {
|
|
26
|
+
const path = `/${params.id}`;
|
|
27
|
+
return this.client.request('PATCH', path);
|
|
28
|
+
}
|
|
29
|
+
async deleteOrganization(params) {
|
|
30
|
+
const path = `/${params.id}`;
|
|
31
|
+
return this.client.request('DELETE', path);
|
|
32
|
+
}
|
|
53
33
|
async getOrganizationBySlug(params) {
|
|
54
34
|
const path = `/slug/${params.slug}`;
|
|
55
35
|
return this.client.request('GET', path);
|
|
@@ -58,10 +38,18 @@ class OrganizationPlugin {
|
|
|
58
38
|
const path = '/listmembers';
|
|
59
39
|
return this.client.request('GET', path);
|
|
60
40
|
}
|
|
41
|
+
async inviteMember() {
|
|
42
|
+
const path = '/invite';
|
|
43
|
+
return this.client.request('POST', path);
|
|
44
|
+
}
|
|
61
45
|
async updateMember(params) {
|
|
62
46
|
const path = `/${params.memberId}`;
|
|
63
47
|
return this.client.request('PATCH', path);
|
|
64
48
|
}
|
|
49
|
+
async removeMember(params) {
|
|
50
|
+
const path = `/${params.memberId}`;
|
|
51
|
+
return this.client.request('DELETE', path);
|
|
52
|
+
}
|
|
65
53
|
async acceptInvitation(params) {
|
|
66
54
|
const path = `/${params.token}/accept`;
|
|
67
55
|
return this.client.request('POST', path);
|
|
@@ -74,6 +62,18 @@ class OrganizationPlugin {
|
|
|
74
62
|
const path = '/listteams';
|
|
75
63
|
return this.client.request('GET', path);
|
|
76
64
|
}
|
|
65
|
+
async createTeam() {
|
|
66
|
+
const path = '/createteam';
|
|
67
|
+
return this.client.request('POST', path);
|
|
68
|
+
}
|
|
69
|
+
async updateTeam(params) {
|
|
70
|
+
const path = `/${params.teamId}`;
|
|
71
|
+
return this.client.request('PATCH', path);
|
|
72
|
+
}
|
|
73
|
+
async deleteTeam(params) {
|
|
74
|
+
const path = `/${params.teamId}`;
|
|
75
|
+
return this.client.request('DELETE', path);
|
|
76
|
+
}
|
|
77
77
|
}
|
|
78
78
|
exports.OrganizationPlugin = OrganizationPlugin;
|
|
79
79
|
function organizationClient() {
|
package/dist/plugins/passkey.js
CHANGED
|
@@ -11,31 +11,31 @@ class PasskeyPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async beginRegister() {
|
|
14
|
-
const path = '/register/begin';
|
|
14
|
+
const path = '/passkey/register/begin';
|
|
15
15
|
return this.client.request('POST', path);
|
|
16
16
|
}
|
|
17
17
|
async finishRegister() {
|
|
18
|
-
const path = '/register/finish';
|
|
18
|
+
const path = '/passkey/register/finish';
|
|
19
19
|
return this.client.request('POST', path);
|
|
20
20
|
}
|
|
21
21
|
async beginLogin() {
|
|
22
|
-
const path = '/login/begin';
|
|
22
|
+
const path = '/passkey/login/begin';
|
|
23
23
|
return this.client.request('POST', path);
|
|
24
24
|
}
|
|
25
25
|
async finishLogin() {
|
|
26
|
-
const path = '/login/finish';
|
|
26
|
+
const path = '/passkey/login/finish';
|
|
27
27
|
return this.client.request('POST', path);
|
|
28
28
|
}
|
|
29
29
|
async list() {
|
|
30
|
-
const path = '/list';
|
|
30
|
+
const path = '/passkey/list';
|
|
31
31
|
return this.client.request('GET', path);
|
|
32
32
|
}
|
|
33
33
|
async update(params) {
|
|
34
|
-
const path =
|
|
34
|
+
const path = `/passkey/${params.id}`;
|
|
35
35
|
return this.client.request('PUT', path);
|
|
36
36
|
}
|
|
37
37
|
async delete(params) {
|
|
38
|
-
const path =
|
|
38
|
+
const path = `/passkey/${params.id}`;
|
|
39
39
|
return this.client.request('DELETE', path);
|
|
40
40
|
}
|
|
41
41
|
}
|
package/dist/plugins/webhook.js
CHANGED
|
@@ -11,27 +11,27 @@ class WebhookPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async create(request) {
|
|
14
|
-
const path = '/webhooks';
|
|
14
|
+
const path = '/api/auth/webhooks';
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
auth: true,
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
async list() {
|
|
21
|
-
const path = '/webhooks';
|
|
21
|
+
const path = '/api/auth/webhooks';
|
|
22
22
|
return this.client.request('GET', path, {
|
|
23
23
|
auth: true,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
async update(request) {
|
|
27
|
-
const path = '/webhooks/update';
|
|
27
|
+
const path = '/api/auth/webhooks/update';
|
|
28
28
|
return this.client.request('POST', path, {
|
|
29
29
|
body: request,
|
|
30
30
|
auth: true,
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
33
|
async delete(request) {
|
|
34
|
-
const path = '/webhooks/delete';
|
|
34
|
+
const path = '/api/auth/webhooks/delete';
|
|
35
35
|
return this.client.request('POST', path, {
|
|
36
36
|
body: request,
|
|
37
37
|
auth: true,
|