@authsome/client 0.0.4 → 0.0.6
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 +41 -37
- package/dist/client.js +32 -18
- package/dist/index.d.ts +18 -18
- package/dist/index.js +56 -56
- package/dist/plugins/admin.d.ts +5 -5
- package/dist/plugins/admin.js +21 -31
- package/dist/plugins/anonymous.d.ts +1 -1
- package/dist/plugins/anonymous.js +4 -2
- package/dist/plugins/apikey.d.ts +7 -7
- package/dist/plugins/apikey.js +41 -27
- package/dist/plugins/backupauth.d.ts +28 -28
- package/dist/plugins/backupauth.js +29 -29
- package/dist/plugins/cms.d.ts +11 -11
- package/dist/plugins/cms.js +67 -57
- package/dist/plugins/compliance.d.ts +33 -33
- package/dist/plugins/compliance.js +4 -2
- package/dist/plugins/consent.d.ts +18 -18
- package/dist/plugins/emailverification.d.ts +2 -2
- package/dist/plugins/emailverification.js +4 -2
- package/dist/plugins/idverification.d.ts +11 -11
- package/dist/plugins/idverification.js +11 -11
- package/dist/plugins/impersonation.d.ts +6 -6
- package/dist/plugins/impersonation.js +11 -15
- package/dist/plugins/jwt.d.ts +6 -5
- package/dist/plugins/jwt.js +21 -13
- package/dist/plugins/mfa.d.ts +9 -9
- package/dist/plugins/mfa.js +4 -8
- package/dist/plugins/multiapp.d.ts +19 -19
- package/dist/plugins/multiapp.js +35 -27
- package/dist/plugins/multisession.d.ts +5 -5
- package/dist/plugins/multisession.js +13 -11
- package/dist/plugins/notification.d.ts +15 -15
- package/dist/plugins/notification.js +12 -6
- package/dist/plugins/oidcprovider.d.ts +11 -11
- package/dist/plugins/oidcprovider.js +25 -19
- package/dist/plugins/organization.d.ts +5 -5
- package/dist/plugins/organization.js +16 -16
- package/dist/plugins/passkey.js +7 -7
- package/dist/plugins/permissions.js +3 -3
- package/dist/plugins/secrets.d.ts +10 -10
- package/dist/plugins/secrets.js +43 -27
- package/dist/plugins/social.js +1 -1
- package/dist/plugins/sso.js +6 -6
- package/dist/plugins/stepup.d.ts +13 -13
- package/dist/plugins/stepup.js +14 -14
- 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/plugins/webhook.js +4 -4
- package/dist/types.d.ts +3316 -2791
- package/package.json +3 -3
- package/src/client.ts +52 -37
- package/src/index.ts +18 -18
- package/src/plugins/admin.ts +21 -31
- package/src/plugins/anonymous.ts +4 -2
- package/src/plugins/apikey.ts +35 -21
- package/src/plugins/backupauth.ts +85 -85
- package/src/plugins/cms.ts +67 -57
- package/src/plugins/compliance.ts +68 -66
- package/src/plugins/consent.ts +36 -36
- package/src/plugins/emailverification.ts +6 -4
- package/src/plugins/idverification.ts +33 -33
- package/src/plugins/impersonation.ts +18 -22
- package/src/plugins/jwt.ts +23 -15
- package/src/plugins/mfa.ts +18 -22
- package/src/plugins/multiapp.ts +65 -57
- package/src/plugins/multisession.ts +20 -18
- package/src/plugins/notification.ts +36 -30
- package/src/plugins/oidcprovider.ts +41 -35
- package/src/plugins/organization.ts +26 -26
- package/src/plugins/passkey.ts +7 -7
- package/src/plugins/permissions.ts +3 -3
- package/src/plugins/secrets.ts +47 -31
- package/src/plugins/social.ts +1 -1
- package/src/plugins/sso.ts +6 -6
- package/src/plugins/stepup.ts +40 -40
- package/src/plugins/twofa.ts +12 -24
- package/src/plugins/username.ts +8 -4
- package/src/plugins/webhook.ts +4 -4
- package/src/types.ts +3576 -2874
package/dist/plugins/apikey.js
CHANGED
|
@@ -10,33 +10,47 @@ class ApikeyPlugin {
|
|
|
10
10
|
init(client) {
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
|
-
async createAPIKey() {
|
|
14
|
-
const path = '/createapikey';
|
|
15
|
-
return this.client.request('POST', path
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
async
|
|
26
|
-
const path =
|
|
27
|
-
return this.client.request('GET', path
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
async
|
|
38
|
-
const path =
|
|
39
|
-
return this.client.request('
|
|
13
|
+
async createAPIKey(request) {
|
|
14
|
+
const path = '/api-keys/createapikey';
|
|
15
|
+
return this.client.request('POST', path, {
|
|
16
|
+
body: request,
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
async rotateAPIKey(params, request) {
|
|
20
|
+
const path = `/api-keys/${params.id}/rotate`;
|
|
21
|
+
return this.client.request('POST', path, {
|
|
22
|
+
body: request,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
async listAPIKeys(request) {
|
|
26
|
+
const path = '/api-keys/listapikeys';
|
|
27
|
+
return this.client.request('GET', path, {
|
|
28
|
+
query: this.client.toQueryParams(request),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
async getAPIKey(params, request) {
|
|
32
|
+
const path = `/api-keys/${params.id}`;
|
|
33
|
+
return this.client.request('GET', path, {
|
|
34
|
+
query: this.client.toQueryParams(request),
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
async updateAPIKey(params, request) {
|
|
38
|
+
const path = `/api-keys/${params.id}`;
|
|
39
|
+
return this.client.request('PUT', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
async deleteAPIKey(params, request) {
|
|
44
|
+
const path = `/api-keys/${params.id}`;
|
|
45
|
+
return this.client.request('DELETE', path, {
|
|
46
|
+
query: this.client.toQueryParams(request),
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
async verifyAPIKey(request) {
|
|
50
|
+
const path = '/api-keys/verify';
|
|
51
|
+
return this.client.request('POST', path, {
|
|
52
|
+
body: request,
|
|
53
|
+
});
|
|
40
54
|
}
|
|
41
55
|
}
|
|
42
56
|
exports.ApikeyPlugin = ApikeyPlugin;
|
|
@@ -5,44 +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.
|
|
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
21
|
removeTrustedContact(params: {
|
|
22
22
|
id: string;
|
|
23
|
-
}): Promise<types.
|
|
24
|
-
sendVerificationCode(request: types.SendVerificationCodeRequest): Promise<types.
|
|
25
|
-
verifyCode(request: types.VerifyCodeRequest): Promise<types.
|
|
26
|
-
scheduleVideoSession(request: types.ScheduleVideoSessionRequest): Promise<types.
|
|
27
|
-
startVideoSession(request: types.StartVideoSessionRequest): Promise<types.
|
|
28
|
-
completeVideoSession(request: types.CompleteVideoSessionRequest): Promise<types.
|
|
29
|
-
uploadDocument(request: types.UploadDocumentRequest): Promise<types.
|
|
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
30
|
getDocumentVerification(params: {
|
|
31
31
|
id: string;
|
|
32
|
-
}): Promise<types.
|
|
32
|
+
}): Promise<types.BackupAuthDocumentResponse>;
|
|
33
33
|
reviewDocument(params: {
|
|
34
34
|
id: string;
|
|
35
|
-
}, request: types.ReviewDocumentRequest): Promise<types.
|
|
36
|
-
listRecoverySessions(): Promise<
|
|
35
|
+
}, request: types.ReviewDocumentRequest): Promise<types.BackupAuthStatusResponse>;
|
|
36
|
+
listRecoverySessions(): Promise<types.BackupAuthSessionsResponse>;
|
|
37
37
|
approveRecovery(params: {
|
|
38
38
|
id: string;
|
|
39
|
-
}, request: types.ApproveRecoveryRequest): Promise<types.
|
|
39
|
+
}, request: types.ApproveRecoveryRequest): Promise<types.BackupAuthStatusResponse>;
|
|
40
40
|
rejectRecovery(params: {
|
|
41
41
|
id: string;
|
|
42
|
-
}, request: types.RejectRecoveryRequest): Promise<types.
|
|
43
|
-
getRecoveryStats(): Promise<
|
|
44
|
-
getRecoveryConfig(): Promise<
|
|
45
|
-
updateRecoveryConfig(request: types.UpdateRecoveryConfigRequest): Promise<types.
|
|
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>;
|
|
46
46
|
healthCheck(): Promise<void>;
|
|
47
47
|
}
|
|
48
48
|
export declare function backupauthClient(): BackupauthPlugin;
|
|
@@ -11,163 +11,163 @@ class BackupauthPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async startRecovery(request) {
|
|
14
|
-
const path = '/recovery/start';
|
|
14
|
+
const path = '/admin/recovery/start';
|
|
15
15
|
return this.client.request('POST', path, {
|
|
16
16
|
body: request,
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
async continueRecovery(request) {
|
|
20
|
-
const path = '/recovery/continue';
|
|
20
|
+
const path = '/admin/recovery/continue';
|
|
21
21
|
return this.client.request('POST', path, {
|
|
22
22
|
body: request,
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
async completeRecovery(request) {
|
|
26
|
-
const path = '/recovery/complete';
|
|
26
|
+
const path = '/admin/recovery/complete';
|
|
27
27
|
return this.client.request('POST', path, {
|
|
28
28
|
body: request,
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
async cancelRecovery(request) {
|
|
32
|
-
const path = '/recovery/cancel';
|
|
32
|
+
const path = '/admin/recovery/cancel';
|
|
33
33
|
return this.client.request('POST', path, {
|
|
34
34
|
body: request,
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
async generateRecoveryCodes(request) {
|
|
38
|
-
const path = '/recovery-codes/generate';
|
|
38
|
+
const path = '/admin/recovery-codes/generate';
|
|
39
39
|
return this.client.request('POST', path, {
|
|
40
40
|
body: request,
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
async verifyRecoveryCode(request) {
|
|
44
|
-
const path = '/recovery-codes/verify';
|
|
44
|
+
const path = '/admin/recovery-codes/verify';
|
|
45
45
|
return this.client.request('POST', path, {
|
|
46
46
|
body: request,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
async setupSecurityQuestions(request) {
|
|
50
|
-
const path = '/security-questions/setup';
|
|
50
|
+
const path = '/admin/security-questions/setup';
|
|
51
51
|
return this.client.request('POST', path, {
|
|
52
52
|
body: request,
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
async getSecurityQuestions(request) {
|
|
56
|
-
const path = '/security-questions/get';
|
|
56
|
+
const path = '/admin/security-questions/get';
|
|
57
57
|
return this.client.request('POST', path, {
|
|
58
58
|
body: request,
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
async verifySecurityAnswers(request) {
|
|
62
|
-
const path = '/security-questions/verify';
|
|
62
|
+
const path = '/admin/security-questions/verify';
|
|
63
63
|
return this.client.request('POST', path, {
|
|
64
64
|
body: request,
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
async addTrustedContact(request) {
|
|
68
|
-
const path = '/trusted-contacts/add';
|
|
68
|
+
const path = '/admin/trusted-contacts/add';
|
|
69
69
|
return this.client.request('POST', path, {
|
|
70
70
|
body: request,
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
async listTrustedContacts() {
|
|
74
|
-
const path = '/trusted-contacts';
|
|
74
|
+
const path = '/admin/trusted-contacts';
|
|
75
75
|
return this.client.request('GET', path);
|
|
76
76
|
}
|
|
77
77
|
async verifyTrustedContact(request) {
|
|
78
|
-
const path = '/trusted-contacts/verify';
|
|
78
|
+
const path = '/admin/trusted-contacts/verify';
|
|
79
79
|
return this.client.request('POST', path, {
|
|
80
80
|
body: request,
|
|
81
81
|
});
|
|
82
82
|
}
|
|
83
83
|
async requestTrustedContactVerification(request) {
|
|
84
|
-
const path = '/trusted-contacts/request-verification';
|
|
84
|
+
const path = '/admin/trusted-contacts/request-verification';
|
|
85
85
|
return this.client.request('POST', path, {
|
|
86
86
|
body: request,
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
89
|
async removeTrustedContact(params) {
|
|
90
|
-
const path = `/trusted-contacts/${params.id}`;
|
|
90
|
+
const path = `/admin/trusted-contacts/${params.id}`;
|
|
91
91
|
return this.client.request('DELETE', path);
|
|
92
92
|
}
|
|
93
93
|
async sendVerificationCode(request) {
|
|
94
|
-
const path = '/verification/send';
|
|
94
|
+
const path = '/admin/verification/send';
|
|
95
95
|
return this.client.request('POST', path, {
|
|
96
96
|
body: request,
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
async verifyCode(request) {
|
|
100
|
-
const path = '/verification/verify';
|
|
100
|
+
const path = '/admin/verification/verify';
|
|
101
101
|
return this.client.request('POST', path, {
|
|
102
102
|
body: request,
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
async scheduleVideoSession(request) {
|
|
106
|
-
const path = '/video/schedule';
|
|
106
|
+
const path = '/admin/video/schedule';
|
|
107
107
|
return this.client.request('POST', path, {
|
|
108
108
|
body: request,
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
async startVideoSession(request) {
|
|
112
|
-
const path = '/video/start';
|
|
112
|
+
const path = '/admin/video/start';
|
|
113
113
|
return this.client.request('POST', path, {
|
|
114
114
|
body: request,
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
async completeVideoSession(request) {
|
|
118
|
-
const path = '/video/complete';
|
|
118
|
+
const path = '/admin/video/complete';
|
|
119
119
|
return this.client.request('POST', path, {
|
|
120
120
|
body: request,
|
|
121
121
|
});
|
|
122
122
|
}
|
|
123
123
|
async uploadDocument(request) {
|
|
124
|
-
const path = '/documents/upload';
|
|
124
|
+
const path = '/admin/documents/upload';
|
|
125
125
|
return this.client.request('POST', path, {
|
|
126
126
|
body: request,
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
async getDocumentVerification(params) {
|
|
130
|
-
const path = `/documents/${params.id}`;
|
|
130
|
+
const path = `/admin/documents/${params.id}`;
|
|
131
131
|
return this.client.request('GET', path);
|
|
132
132
|
}
|
|
133
133
|
async reviewDocument(params, request) {
|
|
134
|
-
const path = `/documents/${params.id}/review`;
|
|
134
|
+
const path = `/admin/documents/${params.id}/review`;
|
|
135
135
|
return this.client.request('POST', path, {
|
|
136
136
|
body: request,
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
async listRecoverySessions() {
|
|
140
|
-
const path = '/sessions';
|
|
140
|
+
const path = '/admin/sessions';
|
|
141
141
|
return this.client.request('GET', path);
|
|
142
142
|
}
|
|
143
143
|
async approveRecovery(params, request) {
|
|
144
|
-
const path = `/sessions/${params.id}/approve`;
|
|
144
|
+
const path = `/admin/sessions/${params.id}/approve`;
|
|
145
145
|
return this.client.request('POST', path, {
|
|
146
146
|
body: request,
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
async rejectRecovery(params, request) {
|
|
150
|
-
const path = `/sessions/${params.id}/reject`;
|
|
150
|
+
const path = `/admin/sessions/${params.id}/reject`;
|
|
151
151
|
return this.client.request('POST', path, {
|
|
152
152
|
body: request,
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
async getRecoveryStats() {
|
|
156
|
-
const path = '/stats';
|
|
156
|
+
const path = '/admin/stats';
|
|
157
157
|
return this.client.request('GET', path);
|
|
158
158
|
}
|
|
159
159
|
async getRecoveryConfig() {
|
|
160
|
-
const path = '/config';
|
|
160
|
+
const path = '/admin/config';
|
|
161
161
|
return this.client.request('GET', path);
|
|
162
162
|
}
|
|
163
163
|
async updateRecoveryConfig(request) {
|
|
164
|
-
const path = '/config';
|
|
164
|
+
const path = '/admin/config';
|
|
165
165
|
return this.client.request('PUT', path, {
|
|
166
166
|
body: request,
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
async healthCheck() {
|
|
170
|
-
const path = '/health';
|
|
170
|
+
const path = '/admin/health';
|
|
171
171
|
return this.client.request('GET', path);
|
|
172
172
|
}
|
|
173
173
|
}
|
package/dist/plugins/cms.d.ts
CHANGED
|
@@ -6,41 +6,41 @@ export declare class CmsPlugin implements ClientPlugin {
|
|
|
6
6
|
private client;
|
|
7
7
|
init(client: AuthsomeClient): void;
|
|
8
8
|
listEntries(): Promise<void>;
|
|
9
|
-
createEntry(): Promise<void>;
|
|
9
|
+
createEntry(request: types.CreateEntryRequest): Promise<void>;
|
|
10
10
|
getEntry(): Promise<void>;
|
|
11
|
-
updateEntry(): Promise<void>;
|
|
11
|
+
updateEntry(request: types.UpdateEntryRequest): Promise<void>;
|
|
12
12
|
deleteEntry(): Promise<void>;
|
|
13
|
-
publishEntry(): Promise<void>;
|
|
13
|
+
publishEntry(request: types.PublishEntryRequest): Promise<void>;
|
|
14
14
|
unpublishEntry(): Promise<void>;
|
|
15
15
|
archiveEntry(): Promise<void>;
|
|
16
16
|
queryEntries(): Promise<void>;
|
|
17
|
-
bulkPublish(
|
|
18
|
-
bulkUnpublish(
|
|
19
|
-
bulkDelete(
|
|
17
|
+
bulkPublish(): Promise<void>;
|
|
18
|
+
bulkUnpublish(): Promise<void>;
|
|
19
|
+
bulkDelete(): Promise<void>;
|
|
20
20
|
getEntryStats(): Promise<void>;
|
|
21
21
|
listContentTypes(): Promise<void>;
|
|
22
|
-
createContentType(): Promise<void>;
|
|
22
|
+
createContentType(request: types.CreateContentTypeRequest): Promise<void>;
|
|
23
23
|
getContentType(params: {
|
|
24
24
|
slug: string;
|
|
25
25
|
}): Promise<void>;
|
|
26
26
|
updateContentType(params: {
|
|
27
27
|
slug: string;
|
|
28
|
-
}): Promise<void>;
|
|
28
|
+
}, request: types.UpdateContentTypeRequest): Promise<void>;
|
|
29
29
|
deleteContentType(params: {
|
|
30
30
|
slug: string;
|
|
31
31
|
}): Promise<void>;
|
|
32
32
|
listFields(): Promise<void>;
|
|
33
|
-
addField(): Promise<void>;
|
|
33
|
+
addField(request: types.CreateFieldRequest): Promise<void>;
|
|
34
34
|
getField(params: {
|
|
35
35
|
fieldSlug: string;
|
|
36
36
|
}): Promise<void>;
|
|
37
37
|
updateField(params: {
|
|
38
38
|
fieldSlug: string;
|
|
39
|
-
}): Promise<void>;
|
|
39
|
+
}, request: types.UpdateFieldRequest): Promise<void>;
|
|
40
40
|
deleteField(params: {
|
|
41
41
|
fieldSlug: string;
|
|
42
42
|
}): Promise<void>;
|
|
43
|
-
reorderFields(): Promise<void>;
|
|
43
|
+
reorderFields(request: types.ReorderFieldsRequest): Promise<void>;
|
|
44
44
|
getFieldTypes(): Promise<void>;
|
|
45
45
|
listRevisions(): Promise<void>;
|
|
46
46
|
getRevision(params: {
|
package/dist/plugins/cms.js
CHANGED
|
@@ -11,125 +11,135 @@ class CmsPlugin {
|
|
|
11
11
|
this.client = client;
|
|
12
12
|
}
|
|
13
13
|
async listEntries() {
|
|
14
|
-
const path = '/listentries';
|
|
14
|
+
const path = '/cms/listentries';
|
|
15
15
|
return this.client.request('GET', path);
|
|
16
16
|
}
|
|
17
|
-
async createEntry() {
|
|
18
|
-
const path = '/createentry';
|
|
19
|
-
return this.client.request('POST', path
|
|
17
|
+
async createEntry(request) {
|
|
18
|
+
const path = '/cms/createentry';
|
|
19
|
+
return this.client.request('POST', path, {
|
|
20
|
+
body: request,
|
|
21
|
+
});
|
|
20
22
|
}
|
|
21
23
|
async getEntry() {
|
|
22
|
-
const path = '/getentry';
|
|
24
|
+
const path = '/cms/getentry';
|
|
23
25
|
return this.client.request('GET', path);
|
|
24
26
|
}
|
|
25
|
-
async updateEntry() {
|
|
26
|
-
const path = '/updateentry';
|
|
27
|
-
return this.client.request('PUT', path
|
|
27
|
+
async updateEntry(request) {
|
|
28
|
+
const path = '/cms/updateentry';
|
|
29
|
+
return this.client.request('PUT', path, {
|
|
30
|
+
body: request,
|
|
31
|
+
});
|
|
28
32
|
}
|
|
29
33
|
async deleteEntry() {
|
|
30
|
-
const path = '/deleteentry';
|
|
34
|
+
const path = '/cms/deleteentry';
|
|
31
35
|
return this.client.request('DELETE', path);
|
|
32
36
|
}
|
|
33
|
-
async publishEntry() {
|
|
34
|
-
const path = '/publish';
|
|
35
|
-
return this.client.request('POST', path
|
|
37
|
+
async publishEntry(request) {
|
|
38
|
+
const path = '/cms/publish';
|
|
39
|
+
return this.client.request('POST', path, {
|
|
40
|
+
body: request,
|
|
41
|
+
});
|
|
36
42
|
}
|
|
37
43
|
async unpublishEntry() {
|
|
38
|
-
const path = '/unpublish';
|
|
44
|
+
const path = '/cms/unpublish';
|
|
39
45
|
return this.client.request('POST', path);
|
|
40
46
|
}
|
|
41
47
|
async archiveEntry() {
|
|
42
|
-
const path = '/archive';
|
|
48
|
+
const path = '/cms/archive';
|
|
43
49
|
return this.client.request('POST', path);
|
|
44
50
|
}
|
|
45
51
|
async queryEntries() {
|
|
46
|
-
const path = '/query';
|
|
52
|
+
const path = '/cms/query';
|
|
47
53
|
return this.client.request('POST', path);
|
|
48
54
|
}
|
|
49
|
-
async bulkPublish(
|
|
50
|
-
const path = '/publish';
|
|
51
|
-
return this.client.request('POST', path
|
|
52
|
-
body: request,
|
|
53
|
-
});
|
|
55
|
+
async bulkPublish() {
|
|
56
|
+
const path = '/cms/publish';
|
|
57
|
+
return this.client.request('POST', path);
|
|
54
58
|
}
|
|
55
|
-
async bulkUnpublish(
|
|
56
|
-
const path = '/unpublish';
|
|
57
|
-
return this.client.request('POST', path
|
|
58
|
-
body: request,
|
|
59
|
-
});
|
|
59
|
+
async bulkUnpublish() {
|
|
60
|
+
const path = '/cms/unpublish';
|
|
61
|
+
return this.client.request('POST', path);
|
|
60
62
|
}
|
|
61
|
-
async bulkDelete(
|
|
62
|
-
const path = '/delete';
|
|
63
|
-
return this.client.request('POST', path
|
|
64
|
-
body: request,
|
|
65
|
-
});
|
|
63
|
+
async bulkDelete() {
|
|
64
|
+
const path = '/cms/delete';
|
|
65
|
+
return this.client.request('POST', path);
|
|
66
66
|
}
|
|
67
67
|
async getEntryStats() {
|
|
68
|
-
const path = '/stats';
|
|
68
|
+
const path = '/cms/stats';
|
|
69
69
|
return this.client.request('GET', path);
|
|
70
70
|
}
|
|
71
71
|
async listContentTypes() {
|
|
72
|
-
const path = '/listcontenttypes';
|
|
72
|
+
const path = '/cms/listcontenttypes';
|
|
73
73
|
return this.client.request('GET', path);
|
|
74
74
|
}
|
|
75
|
-
async createContentType() {
|
|
76
|
-
const path = '/createcontenttype';
|
|
77
|
-
return this.client.request('POST', path
|
|
75
|
+
async createContentType(request) {
|
|
76
|
+
const path = '/cms/createcontenttype';
|
|
77
|
+
return this.client.request('POST', path, {
|
|
78
|
+
body: request,
|
|
79
|
+
});
|
|
78
80
|
}
|
|
79
81
|
async getContentType(params) {
|
|
80
|
-
const path =
|
|
82
|
+
const path = `/cms/${params.slug}`;
|
|
81
83
|
return this.client.request('GET', path);
|
|
82
84
|
}
|
|
83
|
-
async updateContentType(params) {
|
|
84
|
-
const path =
|
|
85
|
-
return this.client.request('PUT', path
|
|
85
|
+
async updateContentType(params, request) {
|
|
86
|
+
const path = `/cms/${params.slug}`;
|
|
87
|
+
return this.client.request('PUT', path, {
|
|
88
|
+
body: request,
|
|
89
|
+
});
|
|
86
90
|
}
|
|
87
91
|
async deleteContentType(params) {
|
|
88
|
-
const path =
|
|
92
|
+
const path = `/cms/${params.slug}`;
|
|
89
93
|
return this.client.request('DELETE', path);
|
|
90
94
|
}
|
|
91
95
|
async listFields() {
|
|
92
|
-
const path = '/listfields';
|
|
96
|
+
const path = '/cms/listfields';
|
|
93
97
|
return this.client.request('GET', path);
|
|
94
98
|
}
|
|
95
|
-
async addField() {
|
|
96
|
-
const path = '/addfield';
|
|
97
|
-
return this.client.request('POST', path
|
|
99
|
+
async addField(request) {
|
|
100
|
+
const path = '/cms/addfield';
|
|
101
|
+
return this.client.request('POST', path, {
|
|
102
|
+
body: request,
|
|
103
|
+
});
|
|
98
104
|
}
|
|
99
105
|
async getField(params) {
|
|
100
|
-
const path =
|
|
106
|
+
const path = `/cms/${params.fieldSlug}`;
|
|
101
107
|
return this.client.request('GET', path);
|
|
102
108
|
}
|
|
103
|
-
async updateField(params) {
|
|
104
|
-
const path =
|
|
105
|
-
return this.client.request('PUT', path
|
|
109
|
+
async updateField(params, request) {
|
|
110
|
+
const path = `/cms/${params.fieldSlug}`;
|
|
111
|
+
return this.client.request('PUT', path, {
|
|
112
|
+
body: request,
|
|
113
|
+
});
|
|
106
114
|
}
|
|
107
115
|
async deleteField(params) {
|
|
108
|
-
const path =
|
|
116
|
+
const path = `/cms/${params.fieldSlug}`;
|
|
109
117
|
return this.client.request('DELETE', path);
|
|
110
118
|
}
|
|
111
|
-
async reorderFields() {
|
|
112
|
-
const path = '/reorder';
|
|
113
|
-
return this.client.request('POST', path
|
|
119
|
+
async reorderFields(request) {
|
|
120
|
+
const path = '/cms/reorder';
|
|
121
|
+
return this.client.request('POST', path, {
|
|
122
|
+
body: request,
|
|
123
|
+
});
|
|
114
124
|
}
|
|
115
125
|
async getFieldTypes() {
|
|
116
|
-
const path = '/field-types';
|
|
126
|
+
const path = '/cms/field-types';
|
|
117
127
|
return this.client.request('GET', path);
|
|
118
128
|
}
|
|
119
129
|
async listRevisions() {
|
|
120
|
-
const path = '/listrevisions';
|
|
130
|
+
const path = '/cms/listrevisions';
|
|
121
131
|
return this.client.request('GET', path);
|
|
122
132
|
}
|
|
123
133
|
async getRevision(params) {
|
|
124
|
-
const path =
|
|
134
|
+
const path = `/cms/${params.version}`;
|
|
125
135
|
return this.client.request('GET', path);
|
|
126
136
|
}
|
|
127
137
|
async restoreRevision(params) {
|
|
128
|
-
const path =
|
|
138
|
+
const path = `/cms/${params.version}/restore`;
|
|
129
139
|
return this.client.request('POST', path);
|
|
130
140
|
}
|
|
131
141
|
async compareRevisions() {
|
|
132
|
-
const path = '/compare';
|
|
142
|
+
const path = '/cms/compare';
|
|
133
143
|
return this.client.request('GET', path);
|
|
134
144
|
}
|
|
135
145
|
}
|