@authsome/client 0.0.6 → 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 +39 -39
- package/dist/client.js +18 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +56 -56
- package/dist/plugins/admin.js +11 -11
- package/dist/plugins/apikey.d.ts +3 -3
- package/dist/plugins/apikey.js +12 -12
- package/dist/plugins/backupauth.js +29 -29
- package/dist/plugins/cms.js +29 -29
- package/dist/plugins/idverification.js +11 -11
- package/dist/plugins/impersonation.js +6 -6
- package/dist/plugins/jwt.js +5 -5
- package/dist/plugins/multiapp.js +19 -19
- package/dist/plugins/multisession.js +9 -9
- 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 +35 -13
- package/dist/plugins/organization.d.ts +15 -15
- package/dist/plugins/organization.js +37 -37
- package/dist/plugins/permissions.js +3 -3
- package/dist/plugins/secrets.js +11 -11
- package/dist/plugins/sso.js +6 -6
- package/dist/plugins/stepup.js +14 -14
- package/dist/types.d.ts +3905 -3118
- package/package.json +3 -3
- package/src/client.ts +40 -40
- package/src/index.ts +18 -18
- package/src/plugins/admin.ts +11 -11
- package/src/plugins/apikey.ts +13 -13
- package/src/plugins/backupauth.ts +29 -29
- package/src/plugins/cms.ts +29 -29
- package/src/plugins/idverification.ts +11 -11
- package/src/plugins/impersonation.ts +6 -6
- package/src/plugins/jwt.ts +5 -5
- package/src/plugins/multiapp.ts +19 -19
- package/src/plugins/multisession.ts +9 -9
- package/src/plugins/notification.ts +7 -7
- package/src/plugins/oidcprovider.ts +39 -13
- package/src/plugins/organization.ts +41 -41
- package/src/plugins/permissions.ts +3 -3
- package/src/plugins/secrets.ts +11 -11
- package/src/plugins/sso.ts +6 -6
- package/src/plugins/stepup.ts +14 -14
- package/src/types.ts +4105 -3185
package/src/plugins/cms.ts
CHANGED
|
@@ -13,163 +13,163 @@ export class CmsPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async listEntries(): Promise<void> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/listentries';
|
|
17
17
|
return this.client.request<void>('GET', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async createEntry(request: types.CreateEntryRequest): Promise<void> {
|
|
21
|
-
const path = '/
|
|
21
|
+
const path = '/createentry';
|
|
22
22
|
return this.client.request<void>('POST', path, {
|
|
23
23
|
body: request,
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getEntry(): Promise<void> {
|
|
28
|
-
const path = '/
|
|
28
|
+
const path = '/getentry';
|
|
29
29
|
return this.client.request<void>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async updateEntry(request: types.UpdateEntryRequest): Promise<void> {
|
|
33
|
-
const path = '/
|
|
33
|
+
const path = '/updateentry';
|
|
34
34
|
return this.client.request<void>('PUT', path, {
|
|
35
35
|
body: request,
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async deleteEntry(): Promise<void> {
|
|
40
|
-
const path = '/
|
|
40
|
+
const path = '/deleteentry';
|
|
41
41
|
return this.client.request<void>('DELETE', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async publishEntry(request: types.PublishEntryRequest): Promise<void> {
|
|
45
|
-
const path = '/
|
|
45
|
+
const path = '/publish';
|
|
46
46
|
return this.client.request<void>('POST', path, {
|
|
47
47
|
body: request,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async unpublishEntry(): Promise<void> {
|
|
52
|
-
const path = '/
|
|
52
|
+
const path = '/unpublish';
|
|
53
53
|
return this.client.request<void>('POST', path);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
async archiveEntry(): Promise<void> {
|
|
57
|
-
const path = '/
|
|
57
|
+
const path = '/archive';
|
|
58
58
|
return this.client.request<void>('POST', path);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async queryEntries(): Promise<void> {
|
|
62
|
-
const path = '/
|
|
62
|
+
const path = '/query';
|
|
63
63
|
return this.client.request<void>('POST', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async bulkPublish(): Promise<void> {
|
|
67
|
-
const path = '/
|
|
67
|
+
const path = '/publish';
|
|
68
68
|
return this.client.request<void>('POST', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async bulkUnpublish(): Promise<void> {
|
|
72
|
-
const path = '/
|
|
72
|
+
const path = '/unpublish';
|
|
73
73
|
return this.client.request<void>('POST', path);
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
async bulkDelete(): Promise<void> {
|
|
77
|
-
const path = '/
|
|
77
|
+
const path = '/delete';
|
|
78
78
|
return this.client.request<void>('POST', path);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
async getEntryStats(): Promise<void> {
|
|
82
|
-
const path = '/
|
|
82
|
+
const path = '/stats';
|
|
83
83
|
return this.client.request<void>('GET', path);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
async listContentTypes(): Promise<void> {
|
|
87
|
-
const path = '/
|
|
87
|
+
const path = '/listcontenttypes';
|
|
88
88
|
return this.client.request<void>('GET', path);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
async createContentType(request: types.CreateContentTypeRequest): Promise<void> {
|
|
92
|
-
const path = '/
|
|
92
|
+
const path = '/createcontenttype';
|
|
93
93
|
return this.client.request<void>('POST', path, {
|
|
94
94
|
body: request,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
async getContentType(params: { slug: string }): Promise<void> {
|
|
99
|
-
const path =
|
|
99
|
+
const path = `/${params.slug}`;
|
|
100
100
|
return this.client.request<void>('GET', path);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
async updateContentType(params: { slug: string }, request: types.UpdateContentTypeRequest): Promise<void> {
|
|
104
|
-
const path =
|
|
104
|
+
const path = `/${params.slug}`;
|
|
105
105
|
return this.client.request<void>('PUT', path, {
|
|
106
106
|
body: request,
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
async deleteContentType(params: { slug: string }): Promise<void> {
|
|
111
|
-
const path =
|
|
111
|
+
const path = `/${params.slug}`;
|
|
112
112
|
return this.client.request<void>('DELETE', path);
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
async listFields(): Promise<void> {
|
|
116
|
-
const path = '/
|
|
116
|
+
const path = '/listfields';
|
|
117
117
|
return this.client.request<void>('GET', path);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
async addField(request: types.CreateFieldRequest): Promise<void> {
|
|
121
|
-
const path = '/
|
|
121
|
+
const path = '/addfield';
|
|
122
122
|
return this.client.request<void>('POST', path, {
|
|
123
123
|
body: request,
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
async getField(params: { fieldSlug: string }): Promise<void> {
|
|
128
|
-
const path =
|
|
128
|
+
const path = `/${params.fieldSlug}`;
|
|
129
129
|
return this.client.request<void>('GET', path);
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
async updateField(params: { fieldSlug: string }, request: types.UpdateFieldRequest): Promise<void> {
|
|
133
|
-
const path =
|
|
133
|
+
const path = `/${params.fieldSlug}`;
|
|
134
134
|
return this.client.request<void>('PUT', path, {
|
|
135
135
|
body: request,
|
|
136
136
|
});
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
async deleteField(params: { fieldSlug: string }): Promise<void> {
|
|
140
|
-
const path =
|
|
140
|
+
const path = `/${params.fieldSlug}`;
|
|
141
141
|
return this.client.request<void>('DELETE', path);
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
async reorderFields(request: types.ReorderFieldsRequest): Promise<void> {
|
|
145
|
-
const path = '/
|
|
145
|
+
const path = '/reorder';
|
|
146
146
|
return this.client.request<void>('POST', path, {
|
|
147
147
|
body: request,
|
|
148
148
|
});
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
async getFieldTypes(): Promise<void> {
|
|
152
|
-
const path = '/
|
|
152
|
+
const path = '/field-types';
|
|
153
153
|
return this.client.request<void>('GET', path);
|
|
154
154
|
}
|
|
155
155
|
|
|
156
156
|
async listRevisions(): Promise<void> {
|
|
157
|
-
const path = '/
|
|
157
|
+
const path = '/listrevisions';
|
|
158
158
|
return this.client.request<void>('GET', path);
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
async getRevision(params: { version: number }): Promise<void> {
|
|
162
|
-
const path =
|
|
162
|
+
const path = `/${params.version}`;
|
|
163
163
|
return this.client.request<void>('GET', path);
|
|
164
164
|
}
|
|
165
165
|
|
|
166
166
|
async restoreRevision(params: { version: number }): Promise<void> {
|
|
167
|
-
const path =
|
|
167
|
+
const path = `/${params.version}/restore`;
|
|
168
168
|
return this.client.request<void>('POST', path);
|
|
169
169
|
}
|
|
170
170
|
|
|
171
171
|
async compareRevisions(): Promise<void> {
|
|
172
|
-
const path = '/
|
|
172
|
+
const path = '/compare';
|
|
173
173
|
return this.client.request<void>('GET', path);
|
|
174
174
|
}
|
|
175
175
|
|
|
@@ -13,63 +13,63 @@ export class IdverificationPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createVerificationSession(request: types.CreateVerificationSession_req): Promise<types.IDVerificationSessionResponse> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/sessions';
|
|
17
17
|
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async getVerificationSession(params: { id: string }): Promise<types.IDVerificationSessionResponse> {
|
|
23
|
-
const path = `/
|
|
23
|
+
const path = `/sessions/${params.id}`;
|
|
24
24
|
return this.client.request<types.IDVerificationSessionResponse>('GET', path);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
async getVerification(params: { id: string }): Promise<types.IDVerificationResponse> {
|
|
28
|
-
const path =
|
|
28
|
+
const path = `/${params.id}`;
|
|
29
29
|
return this.client.request<types.IDVerificationResponse>('GET', path);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
async getUserVerifications(): Promise<types.IDVerificationListResponse> {
|
|
33
|
-
const path = '/
|
|
33
|
+
const path = '/me';
|
|
34
34
|
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
async getUserVerificationStatus(): Promise<types.IDVerificationStatusResponse> {
|
|
38
|
-
const path = '/
|
|
38
|
+
const path = '/me/status';
|
|
39
39
|
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
async requestReverification(request: types.RequestReverification_req): Promise<types.IDVerificationSessionResponse> {
|
|
43
|
-
const path = '/
|
|
43
|
+
const path = '/me/reverify';
|
|
44
44
|
return this.client.request<types.IDVerificationSessionResponse>('POST', path, {
|
|
45
45
|
body: request,
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
async handleWebhook(params: { provider: string }): Promise<types.IDVerificationWebhookResponse> {
|
|
50
|
-
const path = `/
|
|
50
|
+
const path = `/webhook/${params.provider}`;
|
|
51
51
|
return this.client.request<types.IDVerificationWebhookResponse>('POST', path);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
async adminBlockUser(params: { userId: string }, request: types.AdminBlockUser_req): Promise<types.IDVerificationStatusResponse> {
|
|
55
|
-
const path = `/
|
|
55
|
+
const path = `/users/${params.userId}/block`;
|
|
56
56
|
return this.client.request<types.IDVerificationStatusResponse>('POST', path, {
|
|
57
57
|
body: request,
|
|
58
58
|
});
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async adminUnblockUser(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
62
|
-
const path = `/
|
|
62
|
+
const path = `/users/${params.userId}/unblock`;
|
|
63
63
|
return this.client.request<types.IDVerificationStatusResponse>('POST', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
async adminGetUserVerificationStatus(params: { userId: string }): Promise<types.IDVerificationStatusResponse> {
|
|
67
|
-
const path = `/
|
|
67
|
+
const path = `/users/${params.userId}/status`;
|
|
68
68
|
return this.client.request<types.IDVerificationStatusResponse>('GET', path);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async adminGetUserVerifications(params: { userId: string }): Promise<types.IDVerificationListResponse> {
|
|
72
|
-
const path = `/
|
|
72
|
+
const path = `/users/${params.userId}/verifications`;
|
|
73
73
|
return this.client.request<types.IDVerificationListResponse>('GET', path);
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -13,32 +13,32 @@ export class ImpersonationPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async startImpersonation(): Promise<types.ImpersonationStartResponse> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/start';
|
|
17
17
|
return this.client.request<types.ImpersonationStartResponse>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async endImpersonation(): Promise<types.ImpersonationEndResponse> {
|
|
21
|
-
const path = '/
|
|
21
|
+
const path = '/end';
|
|
22
22
|
return this.client.request<types.ImpersonationEndResponse>('POST', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async getImpersonation(params: { id: string }): Promise<types.ImpersonationSession> {
|
|
26
|
-
const path =
|
|
26
|
+
const path = `/${params.id}`;
|
|
27
27
|
return this.client.request<types.ImpersonationSession>('GET', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async listImpersonations(): Promise<types.ImpersonationListResponse> {
|
|
31
|
-
const path = '/
|
|
31
|
+
const path = '/';
|
|
32
32
|
return this.client.request<types.ImpersonationListResponse>('GET', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
async listAuditEvents(): Promise<types.ImpersonationAuditResponse> {
|
|
36
|
-
const path = '/
|
|
36
|
+
const path = '/audit';
|
|
37
37
|
return this.client.request<types.ImpersonationAuditResponse>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
async verifyImpersonation(): Promise<types.ImpersonationVerifyResponse> {
|
|
41
|
-
const path = '/
|
|
41
|
+
const path = '/verify';
|
|
42
42
|
return this.client.request<types.ImpersonationVerifyResponse>('POST', path);
|
|
43
43
|
}
|
|
44
44
|
|
package/src/plugins/jwt.ts
CHANGED
|
@@ -13,33 +13,33 @@ export class JwtPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createJWTKey(request: types.CreateJWTKeyRequest): Promise<types.JWTKey> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/createjwtkey';
|
|
17
17
|
return this.client.request<types.JWTKey>('POST', path, {
|
|
18
18
|
body: request,
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async listJWTKeys(request?: types.ListJWTKeysRequest): Promise<types.ListJWTKeysResponse> {
|
|
23
|
-
const path = '/
|
|
23
|
+
const path = '/listjwtkeys';
|
|
24
24
|
return this.client.request<types.ListJWTKeysResponse>('GET', path, {
|
|
25
25
|
query: this.client.toQueryParams(request),
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async getJWKS(): Promise<types.JWKSResponse> {
|
|
30
|
-
const path = '/
|
|
30
|
+
const path = '/jwks';
|
|
31
31
|
return this.client.request<types.JWKSResponse>('GET', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async generateToken(request: types.GenerateTokenRequest): Promise<types.GenerateTokenResponse> {
|
|
35
|
-
const path = '/
|
|
35
|
+
const path = '/generate';
|
|
36
36
|
return this.client.request<types.GenerateTokenResponse>('POST', path, {
|
|
37
37
|
body: request,
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
async verifyToken(request: types.VerifyTokenRequest): Promise<types.VerifyTokenResponse> {
|
|
42
|
-
const path = '/
|
|
42
|
+
const path = '/verify';
|
|
43
43
|
return this.client.request<types.VerifyTokenResponse>('POST', path, {
|
|
44
44
|
body: request,
|
|
45
45
|
});
|
package/src/plugins/multiapp.ts
CHANGED
|
@@ -13,107 +13,107 @@ export class MultiappPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async createApp(): Promise<types.App> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/createapp';
|
|
17
17
|
return this.client.request<types.App>('POST', path);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
async getApp(params: { appId: string }): Promise<types.App> {
|
|
21
|
-
const path =
|
|
21
|
+
const path = `/${params.appId}`;
|
|
22
22
|
return this.client.request<types.App>('GET', path);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
async updateApp(params: { appId: string }): Promise<types.App> {
|
|
26
|
-
const path =
|
|
26
|
+
const path = `/${params.appId}`;
|
|
27
27
|
return this.client.request<types.App>('PUT', path);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async deleteApp(params: { appId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
31
|
-
const path =
|
|
31
|
+
const path = `/${params.appId}`;
|
|
32
32
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
async listApps(): Promise<types.AppsListResponse> {
|
|
36
|
-
const path = '/
|
|
36
|
+
const path = '/listapps';
|
|
37
37
|
return this.client.request<types.AppsListResponse>('GET', path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
async removeMember(params: { memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
41
|
-
const path =
|
|
41
|
+
const path = `/${params.memberId}`;
|
|
42
42
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
async listMembers(): Promise<types.MembersListResponse> {
|
|
46
|
-
const path = '/
|
|
46
|
+
const path = '/listmembers';
|
|
47
47
|
return this.client.request<types.MembersListResponse>('GET', path);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
async inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation> {
|
|
51
|
-
const path = '/
|
|
51
|
+
const path = '/invite';
|
|
52
52
|
return this.client.request<types.Invitation>('POST', path, {
|
|
53
53
|
body: request,
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
async updateMember(params: { memberId: string }, request: types.UpdateMemberRequest): Promise<types.Member> {
|
|
58
|
-
const path =
|
|
58
|
+
const path = `/${params.memberId}`;
|
|
59
59
|
return this.client.request<types.Member>('PUT', path, {
|
|
60
60
|
body: request,
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
async getInvitation(params: { token: string }): Promise<types.Invitation> {
|
|
65
|
-
const path =
|
|
65
|
+
const path = `/${params.token}`;
|
|
66
66
|
return this.client.request<types.Invitation>('GET', path);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
async acceptInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
|
|
70
|
-
const path =
|
|
70
|
+
const path = `/${params.token}/accept`;
|
|
71
71
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path);
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
async declineInvitation(params: { token: string }): Promise<types.MultitenancyStatusResponse> {
|
|
75
|
-
const path =
|
|
75
|
+
const path = `/${params.token}/decline`;
|
|
76
76
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
async createTeam(request: types.CreateTeamRequest): Promise<types.Team> {
|
|
80
|
-
const path = '/
|
|
80
|
+
const path = '/createteam';
|
|
81
81
|
return this.client.request<types.Team>('POST', path, {
|
|
82
82
|
body: request,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
async getTeam(params: { teamId: string }): Promise<types.Team> {
|
|
87
|
-
const path =
|
|
87
|
+
const path = `/${params.teamId}`;
|
|
88
88
|
return this.client.request<types.Team>('GET', path);
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
async updateTeam(params: { teamId: string }, request: types.UpdateTeamRequest): Promise<types.Team> {
|
|
92
|
-
const path =
|
|
92
|
+
const path = `/${params.teamId}`;
|
|
93
93
|
return this.client.request<types.Team>('PUT', path, {
|
|
94
94
|
body: request,
|
|
95
95
|
});
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
async deleteTeam(params: { teamId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
99
|
-
const path =
|
|
99
|
+
const path = `/${params.teamId}`;
|
|
100
100
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
async listTeams(): Promise<types.TeamsListResponse> {
|
|
104
|
-
const path = '/
|
|
104
|
+
const path = '/listteams';
|
|
105
105
|
return this.client.request<types.TeamsListResponse>('GET', path);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
async addTeamMember(params: { teamId: string }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse> {
|
|
109
|
-
const path =
|
|
109
|
+
const path = `/${params.teamId}/members`;
|
|
110
110
|
return this.client.request<types.MultitenancyStatusResponse>('POST', path, {
|
|
111
111
|
body: request,
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
async removeTeamMember(params: { teamId: string; memberId: string }): Promise<types.MultitenancyStatusResponse> {
|
|
116
|
-
const path =
|
|
116
|
+
const path = `/${params.teamId}/members/${params.memberId}`;
|
|
117
117
|
return this.client.request<types.MultitenancyStatusResponse>('DELETE', path);
|
|
118
118
|
}
|
|
119
119
|
|
|
@@ -13,53 +13,53 @@ export class MultisessionPlugin implements ClientPlugin {
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
async list(request?: types.ListSessionsRequest): Promise<types.ListSessionsResponse> {
|
|
16
|
-
const path = '/
|
|
16
|
+
const path = '/list';
|
|
17
17
|
return this.client.request<types.ListSessionsResponse>('GET', path, {
|
|
18
18
|
query: this.client.toQueryParams(request),
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
async setActive(request: types.SetActiveRequest): Promise<types.SessionTokenResponse> {
|
|
23
|
-
const path = '/
|
|
23
|
+
const path = '/set-active';
|
|
24
24
|
return this.client.request<types.SessionTokenResponse>('POST', path, {
|
|
25
25
|
body: request,
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
async delete(params: { id: string }): Promise<types.StatusResponse> {
|
|
30
|
-
const path = `/
|
|
30
|
+
const path = `/delete/${params.id}`;
|
|
31
31
|
return this.client.request<types.StatusResponse>('POST', path);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
async getCurrent(): Promise<types.SessionTokenResponse> {
|
|
35
|
-
const path = '/
|
|
35
|
+
const path = '/current';
|
|
36
36
|
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
async getByID(params: { id: string }): Promise<types.SessionTokenResponse> {
|
|
40
|
-
const path =
|
|
40
|
+
const path = `/${params.id}`;
|
|
41
41
|
return this.client.request<types.SessionTokenResponse>('GET', path);
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
async revokeAll(request: types.RevokeAllRequest): Promise<types.RevokeResponse> {
|
|
45
|
-
const path = '/
|
|
45
|
+
const path = '/revoke-all';
|
|
46
46
|
return this.client.request<types.RevokeResponse>('POST', path, {
|
|
47
47
|
body: request,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
async revokeOthers(): Promise<types.RevokeResponse> {
|
|
52
|
-
const path = '/
|
|
52
|
+
const path = '/revoke-others';
|
|
53
53
|
return this.client.request<types.RevokeResponse>('POST', path);
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
async refresh(): Promise<types.SessionTokenResponse> {
|
|
57
|
-
const path = '/
|
|
57
|
+
const path = '/refresh';
|
|
58
58
|
return this.client.request<types.SessionTokenResponse>('POST', path);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async getStats(): Promise<types.SessionStatsResponse> {
|
|
62
|
-
const path = '/
|
|
62
|
+
const path = '/stats';
|
|
63
63
|
return this.client.request<types.SessionStatsResponse>('GET', path);
|
|
64
64
|
}
|
|
65
65
|
|
|
@@ -12,13 +12,6 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
12
12
|
this.client = client;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse> {
|
|
16
|
-
const path = `/${params.id}/preview`;
|
|
17
|
-
return this.client.request<types.NotificationPreviewResponse>('POST', path, {
|
|
18
|
-
body: request,
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
|
|
22
15
|
async createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse> {
|
|
23
16
|
const path = '/createtemplate';
|
|
24
17
|
return this.client.request<types.NotificationTemplateResponse>('POST', path, {
|
|
@@ -63,6 +56,13 @@ export class NotificationPlugin implements ClientPlugin {
|
|
|
63
56
|
return this.client.request<types.NotificationTemplateListResponse>('GET', path);
|
|
64
57
|
}
|
|
65
58
|
|
|
59
|
+
async previewTemplate(params: { id: string }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse> {
|
|
60
|
+
const path = `/${params.id}/preview`;
|
|
61
|
+
return this.client.request<types.NotificationPreviewResponse>('POST', path, {
|
|
62
|
+
body: request,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
66
|
async renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse> {
|
|
67
67
|
const path = '/render';
|
|
68
68
|
return this.client.request<types.NotificationPreviewResponse>('POST', path, {
|