@authsome/client 0.0.3 → 0.0.5
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 +90 -37
- package/dist/client.js +79 -17
- package/dist/index.d.ts +21 -17
- package/dist/index.js +65 -53
- package/dist/plugins/admin.d.ts +19 -7
- package/dist/plugins/admin.js +18 -28
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +15 -7
- package/dist/plugins/apikey.js +29 -17
- package/dist/plugins/backupauth.d.ts +38 -28
- package/dist/plugins/backupauth.js +10 -10
- package/dist/plugins/cms.d.ts +54 -0
- package/dist/plugins/cms.js +149 -0
- package/dist/plugins/compliance.d.ts +93 -33
- package/dist/plugins/compliance.js +63 -61
- package/dist/plugins/consent.d.ts +34 -18
- package/dist/plugins/consent.js +16 -16
- package/dist/plugins/emailverification.d.ts +12 -0
- package/dist/plugins/emailverification.js +35 -0
- package/dist/plugins/idverification.d.ts +25 -11
- package/dist/plugins/idverification.js +14 -14
- package/dist/plugins/impersonation.d.ts +8 -6
- package/dist/plugins/impersonation.js +6 -10
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +16 -8
- package/dist/plugins/mfa.d.ts +26 -12
- package/dist/plugins/mfa.js +17 -21
- package/dist/plugins/multiapp.d.ts +46 -19
- package/dist/plugins/multiapp.js +40 -32
- package/dist/plugins/multisession.d.ts +13 -3
- package/dist/plugins/multisession.js +32 -4
- package/dist/plugins/notification.d.ts +31 -15
- package/dist/plugins/notification.js +27 -21
- package/dist/plugins/oidcprovider.d.ts +18 -12
- package/dist/plugins/oidcprovider.js +18 -12
- package/dist/plugins/organization.d.ts +32 -12
- package/dist/plugins/organization.js +20 -20
- package/dist/plugins/passkey.d.ts +6 -2
- package/dist/plugins/passkey.js +4 -4
- package/dist/plugins/permissions.d.ts +12 -0
- package/dist/plugins/permissions.js +33 -0
- package/dist/plugins/secrets.d.ts +33 -0
- package/dist/plugins/secrets.js +79 -0
- package/dist/plugins/social.d.ts +11 -2
- package/dist/plugins/social.js +7 -5
- package/dist/plugins/sso.d.ts +12 -4
- package/dist/plugins/sso.js +8 -8
- package/dist/plugins/stepup.d.ts +23 -13
- package/dist/plugins/stepup.js +10 -10
- package/dist/plugins/twofa.d.ts +6 -6
- package/dist/plugins/twofa.js +12 -24
- package/dist/plugins/username.d.ts +2 -2
- package/dist/plugins/username.js +8 -4
- package/dist/types.d.ts +3443 -2470
- package/package.json +2 -1
- package/src/client.ts +111 -37
- package/src/index.ts +21 -17
- package/src/plugins/admin.ts +18 -28
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +30 -18
- package/src/plugins/backupauth.ts +61 -61
- package/src/plugins/cms.ts +180 -0
- package/src/plugins/compliance.ts +98 -96
- package/src/plugins/consent.ts +44 -44
- package/src/plugins/emailverification.ts +40 -0
- package/src/plugins/idverification.ts +29 -29
- package/src/plugins/impersonation.ts +13 -17
- package/src/plugins/jwt.ts +18 -10
- package/src/plugins/mfa.ts +28 -32
- package/src/plugins/multiapp.ts +59 -51
- package/src/plugins/multisession.ts +39 -5
- package/src/plugins/notification.ts +44 -38
- package/src/plugins/oidcprovider.ts +32 -26
- package/src/plugins/organization.ts +27 -27
- package/src/plugins/passkey.ts +4 -4
- package/src/plugins/permissions.ts +38 -0
- package/src/plugins/secrets.ts +92 -0
- package/src/plugins/social.ts +7 -5
- package/src/plugins/sso.ts +8 -8
- package/src/plugins/stepup.ts +31 -31
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/types.ts +3773 -2545
- package/authsome-client-0.0.2.tgz +0 -0
|
@@ -10,9 +10,11 @@ class AnonymousPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async signIn() {
|
|
13
|
+
async signIn(request) {
|
|
14
14
|
const path = '/anonymous/signin';
|
|
15
|
-
return this.client.request('POST', path
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
16
18
|
}
|
|
17
19
|
async link(request) {
|
|
18
20
|
const path = '/anonymous/link';
|
package/dist/plugins/apikey.d.ts
CHANGED
|
@@ -5,12 +5,20 @@ export declare class ApikeyPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "apikey";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createAPIKey(request: types.
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
createAPIKey(request: types.CreateAPIKeyRequest): Promise<types.CreateAPIKeyResponse>;
|
|
9
|
+
rotateAPIKey(params: {
|
|
10
|
+
id: string;
|
|
11
|
+
}, request: types.RotateAPIKeyRequest): Promise<types.RotateAPIKeyResponse>;
|
|
12
|
+
listAPIKeys(request?: types.ListAPIKeysRequest): Promise<types.ListAPIKeysResponse>;
|
|
13
|
+
getAPIKey(params: {
|
|
14
|
+
id: string;
|
|
15
|
+
}, request?: types.GetAPIKeyRequest): Promise<types.APIKey>;
|
|
16
|
+
updateAPIKey(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}, request: types.UpdateAPIKeyRequest): Promise<types.APIKey>;
|
|
19
|
+
deleteAPIKey(params: {
|
|
20
|
+
id: string;
|
|
21
|
+
}, request?: types.DeleteAPIKeyRequest): Promise<types.MessageResponse>;
|
|
22
|
+
verifyAPIKey(request: types.VerifyAPIKeyRequest): Promise<types.VerifyAPIKeyResponse>;
|
|
15
23
|
}
|
|
16
24
|
export declare function apikeyClient(): ApikeyPlugin;
|
package/dist/plugins/apikey.js
CHANGED
|
@@ -16,29 +16,41 @@ class ApikeyPlugin {
|
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
async
|
|
20
|
-
const path =
|
|
21
|
-
return this.client.request('
|
|
19
|
+
async rotateAPIKey(params, request) {
|
|
20
|
+
const path = `/${params.id}/rotate`;
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
22
24
|
}
|
|
23
|
-
async
|
|
24
|
-
const path = '
|
|
25
|
-
return this.client.request('GET', path
|
|
25
|
+
async listAPIKeys(request) {
|
|
26
|
+
const path = '/listapikeys';
|
|
27
|
+
return this.client.request('GET', path, {
|
|
28
|
+
query: this.client.toQueryParams(request),
|
|
29
|
+
});
|
|
26
30
|
}
|
|
27
|
-
async
|
|
28
|
-
const path =
|
|
29
|
-
return this.client.request('
|
|
31
|
+
async getAPIKey(params, request) {
|
|
32
|
+
const path = `/${params.id}`;
|
|
33
|
+
return this.client.request('GET', path, {
|
|
34
|
+
query: this.client.toQueryParams(request),
|
|
35
|
+
});
|
|
30
36
|
}
|
|
31
|
-
async
|
|
32
|
-
const path =
|
|
33
|
-
return this.client.request('
|
|
37
|
+
async updateAPIKey(params, request) {
|
|
38
|
+
const path = `/${params.id}`;
|
|
39
|
+
return this.client.request('PUT', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
34
42
|
}
|
|
35
|
-
async
|
|
36
|
-
const path =
|
|
37
|
-
return this.client.request('
|
|
43
|
+
async deleteAPIKey(params, request) {
|
|
44
|
+
const path = `/${params.id}`;
|
|
45
|
+
return this.client.request('DELETE', path, {
|
|
46
|
+
query: this.client.toQueryParams(request),
|
|
47
|
+
});
|
|
38
48
|
}
|
|
39
|
-
async verifyAPIKey() {
|
|
49
|
+
async verifyAPIKey(request) {
|
|
40
50
|
const path = '/verify';
|
|
41
|
-
return this.client.request('POST', path
|
|
51
|
+
return this.client.request('POST', path, {
|
|
52
|
+
body: request,
|
|
53
|
+
});
|
|
42
54
|
}
|
|
43
55
|
}
|
|
44
56
|
exports.ApikeyPlugin = ApikeyPlugin;
|
|
@@ -5,34 +5,44 @@ export declare class BackupauthPlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "backupauth";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
startRecovery(request: types.StartRecoveryRequest): Promise<types.
|
|
9
|
-
continueRecovery(request: types.ContinueRecoveryRequest): Promise<types.
|
|
10
|
-
completeRecovery(request: types.CompleteRecoveryRequest): Promise<types.
|
|
11
|
-
cancelRecovery(request: types.CancelRecoveryRequest): Promise<types.
|
|
12
|
-
generateRecoveryCodes(request: types.GenerateRecoveryCodesRequest): Promise<types.
|
|
13
|
-
verifyRecoveryCode(request: types.VerifyRecoveryCodeRequest): Promise<types.
|
|
14
|
-
setupSecurityQuestions(request: types.SetupSecurityQuestionsRequest): Promise<types.
|
|
15
|
-
getSecurityQuestions(request: types.GetSecurityQuestionsRequest): Promise<types.
|
|
16
|
-
verifySecurityAnswers(request: types.VerifySecurityAnswersRequest): Promise<types.
|
|
17
|
-
addTrustedContact(request: types.AddTrustedContactRequest): Promise<types.
|
|
18
|
-
listTrustedContacts(): Promise<types.
|
|
19
|
-
verifyTrustedContact(request: types.VerifyTrustedContactRequest): Promise<types.
|
|
20
|
-
requestTrustedContactVerification(request: types.RequestTrustedContactVerificationRequest): Promise<types.
|
|
21
|
-
removeTrustedContact(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
8
|
+
startRecovery(request: types.StartRecoveryRequest): Promise<types.BackupAuthRecoveryResponse>;
|
|
9
|
+
continueRecovery(request: types.ContinueRecoveryRequest): Promise<types.BackupAuthRecoveryResponse>;
|
|
10
|
+
completeRecovery(request: types.CompleteRecoveryRequest): Promise<types.BackupAuthStatusResponse>;
|
|
11
|
+
cancelRecovery(request: types.CancelRecoveryRequest): Promise<types.BackupAuthStatusResponse>;
|
|
12
|
+
generateRecoveryCodes(request: types.GenerateRecoveryCodesRequest): Promise<types.BackupAuthCodesResponse>;
|
|
13
|
+
verifyRecoveryCode(request: types.VerifyRecoveryCodeRequest): Promise<types.BackupAuthStatusResponse>;
|
|
14
|
+
setupSecurityQuestions(request: types.SetupSecurityQuestionsRequest): Promise<types.BackupAuthStatusResponse>;
|
|
15
|
+
getSecurityQuestions(request: types.GetSecurityQuestionsRequest): Promise<types.BackupAuthQuestionsResponse>;
|
|
16
|
+
verifySecurityAnswers(request: types.VerifySecurityAnswersRequest): Promise<types.BackupAuthStatusResponse>;
|
|
17
|
+
addTrustedContact(request: types.AddTrustedContactRequest): Promise<types.BackupAuthContactResponse>;
|
|
18
|
+
listTrustedContacts(): Promise<types.BackupAuthContactsResponse>;
|
|
19
|
+
verifyTrustedContact(request: types.VerifyTrustedContactRequest): Promise<types.BackupAuthStatusResponse>;
|
|
20
|
+
requestTrustedContactVerification(request: types.RequestTrustedContactVerificationRequest): Promise<types.BackupAuthStatusResponse>;
|
|
21
|
+
removeTrustedContact(params: {
|
|
22
|
+
id: string;
|
|
23
|
+
}): Promise<types.BackupAuthStatusResponse>;
|
|
24
|
+
sendVerificationCode(request: types.SendVerificationCodeRequest): Promise<types.BackupAuthStatusResponse>;
|
|
25
|
+
verifyCode(request: types.VerifyCodeRequest): Promise<types.BackupAuthStatusResponse>;
|
|
26
|
+
scheduleVideoSession(request: types.ScheduleVideoSessionRequest): Promise<types.BackupAuthVideoResponse>;
|
|
27
|
+
startVideoSession(request: types.StartVideoSessionRequest): Promise<types.BackupAuthVideoResponse>;
|
|
28
|
+
completeVideoSession(request: types.CompleteVideoSessionRequest): Promise<types.BackupAuthStatusResponse>;
|
|
29
|
+
uploadDocument(request: types.UploadDocumentRequest): Promise<types.BackupAuthDocumentResponse>;
|
|
30
|
+
getDocumentVerification(params: {
|
|
31
|
+
id: string;
|
|
32
|
+
}): Promise<types.BackupAuthDocumentResponse>;
|
|
33
|
+
reviewDocument(params: {
|
|
34
|
+
id: string;
|
|
35
|
+
}, request: types.ReviewDocumentRequest): Promise<types.BackupAuthStatusResponse>;
|
|
36
|
+
listRecoverySessions(): Promise<types.BackupAuthSessionsResponse>;
|
|
37
|
+
approveRecovery(params: {
|
|
38
|
+
id: string;
|
|
39
|
+
}, request: types.ApproveRecoveryRequest): Promise<types.BackupAuthStatusResponse>;
|
|
40
|
+
rejectRecovery(params: {
|
|
41
|
+
id: string;
|
|
42
|
+
}, request: types.RejectRecoveryRequest): Promise<types.BackupAuthStatusResponse>;
|
|
43
|
+
getRecoveryStats(): Promise<types.BackupAuthStatsResponse>;
|
|
44
|
+
getRecoveryConfig(): Promise<types.BackupAuthConfigResponse>;
|
|
45
|
+
updateRecoveryConfig(request: types.UpdateRecoveryConfigRequest): Promise<types.BackupAuthConfigResponse>;
|
|
36
46
|
healthCheck(): Promise<void>;
|
|
37
47
|
}
|
|
38
48
|
export declare function backupauthClient(): BackupauthPlugin;
|
|
@@ -86,8 +86,8 @@ class BackupauthPlugin {
|
|
|
86
86
|
body: request,
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
-
async removeTrustedContact() {
|
|
90
|
-
const path =
|
|
89
|
+
async removeTrustedContact(params) {
|
|
90
|
+
const path = `/trusted-contacts/${params.id}`;
|
|
91
91
|
return this.client.request('DELETE', path);
|
|
92
92
|
}
|
|
93
93
|
async sendVerificationCode(request) {
|
|
@@ -126,12 +126,12 @@ class BackupauthPlugin {
|
|
|
126
126
|
body: request,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
|
-
async getDocumentVerification() {
|
|
130
|
-
const path =
|
|
129
|
+
async getDocumentVerification(params) {
|
|
130
|
+
const path = `/documents/${params.id}`;
|
|
131
131
|
return this.client.request('GET', path);
|
|
132
132
|
}
|
|
133
|
-
async reviewDocument(request) {
|
|
134
|
-
const path =
|
|
133
|
+
async reviewDocument(params, request) {
|
|
134
|
+
const path = `/documents/${params.id}/review`;
|
|
135
135
|
return this.client.request('POST', path, {
|
|
136
136
|
body: request,
|
|
137
137
|
});
|
|
@@ -140,14 +140,14 @@ class BackupauthPlugin {
|
|
|
140
140
|
const path = '/sessions';
|
|
141
141
|
return this.client.request('GET', path);
|
|
142
142
|
}
|
|
143
|
-
async approveRecovery(request) {
|
|
144
|
-
const path =
|
|
143
|
+
async approveRecovery(params, request) {
|
|
144
|
+
const path = `/sessions/${params.id}/approve`;
|
|
145
145
|
return this.client.request('POST', path, {
|
|
146
146
|
body: request,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
async rejectRecovery(request) {
|
|
150
|
-
const path =
|
|
149
|
+
async rejectRecovery(params, request) {
|
|
150
|
+
const path = `/sessions/${params.id}/reject`;
|
|
151
151
|
return this.client.request('POST', path, {
|
|
152
152
|
body: request,
|
|
153
153
|
});
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ClientPlugin } from '../plugin';
|
|
2
|
+
import { AuthsomeClient } from '../client';
|
|
3
|
+
import * as types from '../types';
|
|
4
|
+
export declare class CmsPlugin implements ClientPlugin {
|
|
5
|
+
readonly id = "cms";
|
|
6
|
+
private client;
|
|
7
|
+
init(client: AuthsomeClient): void;
|
|
8
|
+
listEntries(): Promise<void>;
|
|
9
|
+
createEntry(request: types.CreateEntryRequest): Promise<void>;
|
|
10
|
+
getEntry(): Promise<void>;
|
|
11
|
+
updateEntry(request: types.UpdateEntryRequest): Promise<void>;
|
|
12
|
+
deleteEntry(): Promise<void>;
|
|
13
|
+
publishEntry(request: types.PublishEntryRequest): Promise<void>;
|
|
14
|
+
unpublishEntry(): Promise<void>;
|
|
15
|
+
archiveEntry(): Promise<void>;
|
|
16
|
+
queryEntries(): Promise<void>;
|
|
17
|
+
bulkPublish(): Promise<void>;
|
|
18
|
+
bulkUnpublish(): Promise<void>;
|
|
19
|
+
bulkDelete(): Promise<void>;
|
|
20
|
+
getEntryStats(): Promise<void>;
|
|
21
|
+
listContentTypes(): Promise<void>;
|
|
22
|
+
createContentType(request: types.CreateContentTypeRequest): Promise<void>;
|
|
23
|
+
getContentType(params: {
|
|
24
|
+
slug: string;
|
|
25
|
+
}): Promise<void>;
|
|
26
|
+
updateContentType(params: {
|
|
27
|
+
slug: string;
|
|
28
|
+
}, request: types.UpdateContentTypeRequest): Promise<void>;
|
|
29
|
+
deleteContentType(params: {
|
|
30
|
+
slug: string;
|
|
31
|
+
}): Promise<void>;
|
|
32
|
+
listFields(): Promise<void>;
|
|
33
|
+
addField(request: types.CreateFieldRequest): Promise<void>;
|
|
34
|
+
getField(params: {
|
|
35
|
+
fieldSlug: string;
|
|
36
|
+
}): Promise<void>;
|
|
37
|
+
updateField(params: {
|
|
38
|
+
fieldSlug: string;
|
|
39
|
+
}, request: types.UpdateFieldRequest): Promise<void>;
|
|
40
|
+
deleteField(params: {
|
|
41
|
+
fieldSlug: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
reorderFields(request: types.ReorderFieldsRequest): Promise<void>;
|
|
44
|
+
getFieldTypes(): Promise<void>;
|
|
45
|
+
listRevisions(): Promise<void>;
|
|
46
|
+
getRevision(params: {
|
|
47
|
+
version: number;
|
|
48
|
+
}): Promise<void>;
|
|
49
|
+
restoreRevision(params: {
|
|
50
|
+
version: number;
|
|
51
|
+
}): Promise<void>;
|
|
52
|
+
compareRevisions(): Promise<void>;
|
|
53
|
+
}
|
|
54
|
+
export declare function cmsClient(): CmsPlugin;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Auto-generated cms plugin
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CmsPlugin = void 0;
|
|
5
|
+
exports.cmsClient = cmsClient;
|
|
6
|
+
class CmsPlugin {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.id = 'cms';
|
|
9
|
+
}
|
|
10
|
+
init(client) {
|
|
11
|
+
this.client = client;
|
|
12
|
+
}
|
|
13
|
+
async listEntries() {
|
|
14
|
+
const path = '/listentries';
|
|
15
|
+
return this.client.request('GET', path);
|
|
16
|
+
}
|
|
17
|
+
async createEntry(request) {
|
|
18
|
+
const path = '/createentry';
|
|
19
|
+
return this.client.request('POST', path, {
|
|
20
|
+
body: request,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
async getEntry() {
|
|
24
|
+
const path = '/getentry';
|
|
25
|
+
return this.client.request('GET', path);
|
|
26
|
+
}
|
|
27
|
+
async updateEntry(request) {
|
|
28
|
+
const path = '/updateentry';
|
|
29
|
+
return this.client.request('PUT', path, {
|
|
30
|
+
body: request,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
async deleteEntry() {
|
|
34
|
+
const path = '/deleteentry';
|
|
35
|
+
return this.client.request('DELETE', path);
|
|
36
|
+
}
|
|
37
|
+
async publishEntry(request) {
|
|
38
|
+
const path = '/publish';
|
|
39
|
+
return this.client.request('POST', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async unpublishEntry() {
|
|
44
|
+
const path = '/unpublish';
|
|
45
|
+
return this.client.request('POST', path);
|
|
46
|
+
}
|
|
47
|
+
async archiveEntry() {
|
|
48
|
+
const path = '/archive';
|
|
49
|
+
return this.client.request('POST', path);
|
|
50
|
+
}
|
|
51
|
+
async queryEntries() {
|
|
52
|
+
const path = '/query';
|
|
53
|
+
return this.client.request('POST', path);
|
|
54
|
+
}
|
|
55
|
+
async bulkPublish() {
|
|
56
|
+
const path = '/publish';
|
|
57
|
+
return this.client.request('POST', path);
|
|
58
|
+
}
|
|
59
|
+
async bulkUnpublish() {
|
|
60
|
+
const path = '/unpublish';
|
|
61
|
+
return this.client.request('POST', path);
|
|
62
|
+
}
|
|
63
|
+
async bulkDelete() {
|
|
64
|
+
const path = '/delete';
|
|
65
|
+
return this.client.request('POST', path);
|
|
66
|
+
}
|
|
67
|
+
async getEntryStats() {
|
|
68
|
+
const path = '/stats';
|
|
69
|
+
return this.client.request('GET', path);
|
|
70
|
+
}
|
|
71
|
+
async listContentTypes() {
|
|
72
|
+
const path = '/listcontenttypes';
|
|
73
|
+
return this.client.request('GET', path);
|
|
74
|
+
}
|
|
75
|
+
async createContentType(request) {
|
|
76
|
+
const path = '/createcontenttype';
|
|
77
|
+
return this.client.request('POST', path, {
|
|
78
|
+
body: request,
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
async getContentType(params) {
|
|
82
|
+
const path = `/${params.slug}`;
|
|
83
|
+
return this.client.request('GET', path);
|
|
84
|
+
}
|
|
85
|
+
async updateContentType(params, request) {
|
|
86
|
+
const path = `/${params.slug}`;
|
|
87
|
+
return this.client.request('PUT', path, {
|
|
88
|
+
body: request,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
async deleteContentType(params) {
|
|
92
|
+
const path = `/${params.slug}`;
|
|
93
|
+
return this.client.request('DELETE', path);
|
|
94
|
+
}
|
|
95
|
+
async listFields() {
|
|
96
|
+
const path = '/listfields';
|
|
97
|
+
return this.client.request('GET', path);
|
|
98
|
+
}
|
|
99
|
+
async addField(request) {
|
|
100
|
+
const path = '/addfield';
|
|
101
|
+
return this.client.request('POST', path, {
|
|
102
|
+
body: request,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
async getField(params) {
|
|
106
|
+
const path = `/${params.fieldSlug}`;
|
|
107
|
+
return this.client.request('GET', path);
|
|
108
|
+
}
|
|
109
|
+
async updateField(params, request) {
|
|
110
|
+
const path = `/${params.fieldSlug}`;
|
|
111
|
+
return this.client.request('PUT', path, {
|
|
112
|
+
body: request,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
async deleteField(params) {
|
|
116
|
+
const path = `/${params.fieldSlug}`;
|
|
117
|
+
return this.client.request('DELETE', path);
|
|
118
|
+
}
|
|
119
|
+
async reorderFields(request) {
|
|
120
|
+
const path = '/reorder';
|
|
121
|
+
return this.client.request('POST', path, {
|
|
122
|
+
body: request,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
async getFieldTypes() {
|
|
126
|
+
const path = '/field-types';
|
|
127
|
+
return this.client.request('GET', path);
|
|
128
|
+
}
|
|
129
|
+
async listRevisions() {
|
|
130
|
+
const path = '/listrevisions';
|
|
131
|
+
return this.client.request('GET', path);
|
|
132
|
+
}
|
|
133
|
+
async getRevision(params) {
|
|
134
|
+
const path = `/${params.version}`;
|
|
135
|
+
return this.client.request('GET', path);
|
|
136
|
+
}
|
|
137
|
+
async restoreRevision(params) {
|
|
138
|
+
const path = `/${params.version}/restore`;
|
|
139
|
+
return this.client.request('POST', path);
|
|
140
|
+
}
|
|
141
|
+
async compareRevisions() {
|
|
142
|
+
const path = '/compare';
|
|
143
|
+
return this.client.request('GET', path);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
exports.CmsPlugin = CmsPlugin;
|
|
147
|
+
function cmsClient() {
|
|
148
|
+
return new CmsPlugin();
|
|
149
|
+
}
|
|
@@ -5,38 +5,98 @@ export declare class CompliancePlugin implements ClientPlugin {
|
|
|
5
5
|
readonly id = "compliance";
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
|
-
createProfile(request: types.CreateProfileRequest): Promise<
|
|
9
|
-
createProfileFromTemplate(request: types.
|
|
10
|
-
getProfile(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
8
|
+
createProfile(request: types.CreateProfileRequest): Promise<types.ComplianceProfileResponse>;
|
|
9
|
+
createProfileFromTemplate(request: types.CreateProfileFromTemplateRequest): Promise<types.ComplianceProfileResponse>;
|
|
10
|
+
getProfile(params: {
|
|
11
|
+
id: string;
|
|
12
|
+
}): Promise<types.ComplianceProfileResponse>;
|
|
13
|
+
getAppProfile(params: {
|
|
14
|
+
appId: string;
|
|
15
|
+
}): Promise<types.ComplianceProfileResponse>;
|
|
16
|
+
updateProfile(params: {
|
|
17
|
+
id: string;
|
|
18
|
+
}, request: types.UpdateProfileRequest): Promise<types.ComplianceProfileResponse>;
|
|
19
|
+
deleteProfile(params: {
|
|
20
|
+
id: string;
|
|
21
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
22
|
+
getComplianceStatus(params: {
|
|
23
|
+
appId: string;
|
|
24
|
+
}): Promise<types.ComplianceStatusDetailsResponse>;
|
|
25
|
+
getDashboard(params: {
|
|
26
|
+
appId: string;
|
|
27
|
+
}): Promise<types.ComplianceDashboardResponse>;
|
|
28
|
+
runCheck(params: {
|
|
29
|
+
profileId: string;
|
|
30
|
+
}, request: types.RunCheckRequest): Promise<types.ComplianceCheckResponse>;
|
|
31
|
+
listChecks(params: {
|
|
32
|
+
profileId: string;
|
|
33
|
+
}): Promise<types.ComplianceChecksResponse>;
|
|
34
|
+
getCheck(params: {
|
|
35
|
+
id: string;
|
|
36
|
+
}): Promise<types.ComplianceCheckResponse>;
|
|
37
|
+
listViolations(params: {
|
|
38
|
+
appId: string;
|
|
39
|
+
}): Promise<types.ComplianceViolationsResponse>;
|
|
40
|
+
getViolation(params: {
|
|
41
|
+
id: string;
|
|
42
|
+
}): Promise<types.ComplianceViolationResponse>;
|
|
43
|
+
resolveViolation(params: {
|
|
44
|
+
id: string;
|
|
45
|
+
}, request: types.ResolveViolationRequest): Promise<types.ComplianceStatusResponse>;
|
|
46
|
+
generateReport(params: {
|
|
47
|
+
appId: string;
|
|
48
|
+
}, request: types.GenerateReportRequest): Promise<types.ComplianceReportResponse>;
|
|
49
|
+
listReports(params: {
|
|
50
|
+
appId: string;
|
|
51
|
+
}): Promise<types.ComplianceReportsResponse>;
|
|
52
|
+
getReport(params: {
|
|
53
|
+
id: string;
|
|
54
|
+
}): Promise<types.ComplianceReportResponse>;
|
|
55
|
+
downloadReport(params: {
|
|
56
|
+
id: string;
|
|
57
|
+
}): Promise<types.ComplianceReportFileResponse>;
|
|
58
|
+
createEvidence(params: {
|
|
59
|
+
appId: string;
|
|
60
|
+
}, request: types.CreateEvidenceRequest): Promise<types.ComplianceEvidenceResponse>;
|
|
61
|
+
listEvidence(params: {
|
|
62
|
+
appId: string;
|
|
63
|
+
}): Promise<types.ComplianceEvidencesResponse>;
|
|
64
|
+
getEvidence(params: {
|
|
65
|
+
id: string;
|
|
66
|
+
}): Promise<types.ComplianceEvidenceResponse>;
|
|
67
|
+
deleteEvidence(params: {
|
|
68
|
+
id: string;
|
|
69
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
70
|
+
createPolicy(params: {
|
|
71
|
+
appId: string;
|
|
72
|
+
}, request: types.CreatePolicyRequest): Promise<types.CompliancePolicyResponse>;
|
|
73
|
+
listPolicies(params: {
|
|
74
|
+
appId: string;
|
|
75
|
+
}): Promise<types.CompliancePoliciesResponse>;
|
|
76
|
+
getPolicy(params: {
|
|
77
|
+
id: string;
|
|
78
|
+
}): Promise<types.CompliancePolicyResponse>;
|
|
79
|
+
updatePolicy(params: {
|
|
80
|
+
id: string;
|
|
81
|
+
}, request: types.UpdatePolicyRequest): Promise<types.CompliancePolicyResponse>;
|
|
82
|
+
deletePolicy(params: {
|
|
83
|
+
id: string;
|
|
84
|
+
}): Promise<types.ComplianceStatusResponse>;
|
|
85
|
+
createTraining(params: {
|
|
86
|
+
appId: string;
|
|
87
|
+
}, request: types.CreateTrainingRequest): Promise<types.ComplianceTrainingResponse>;
|
|
88
|
+
listTraining(params: {
|
|
89
|
+
appId: string;
|
|
90
|
+
}): Promise<types.ComplianceTrainingsResponse>;
|
|
91
|
+
getUserTraining(params: {
|
|
92
|
+
userId: string;
|
|
93
|
+
}): Promise<types.ComplianceUserTrainingResponse>;
|
|
94
|
+
completeTraining(params: {
|
|
95
|
+
id: string;
|
|
96
|
+
}, request: types.CompleteTrainingRequest): Promise<types.ComplianceStatusResponse>;
|
|
97
|
+
listTemplates(): Promise<types.ComplianceTemplatesResponse>;
|
|
98
|
+
getTemplate(params: {
|
|
99
|
+
standard: string;
|
|
100
|
+
}): Promise<types.ComplianceTemplateResponse>;
|
|
41
101
|
}
|
|
42
102
|
export declare function complianceClient(): CompliancePlugin;
|