@authsome/client 0.0.3 → 0.0.4

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.
Files changed (73) hide show
  1. package/dist/client.d.ts +86 -37
  2. package/dist/client.js +65 -17
  3. package/dist/index.d.ts +21 -17
  4. package/dist/index.js +65 -53
  5. package/dist/plugins/admin.d.ts +18 -6
  6. package/dist/plugins/admin.js +12 -12
  7. package/dist/plugins/apikey.d.ts +13 -5
  8. package/dist/plugins/apikey.js +12 -14
  9. package/dist/plugins/backupauth.d.ts +15 -5
  10. package/dist/plugins/backupauth.js +10 -10
  11. package/dist/plugins/cms.d.ts +54 -0
  12. package/dist/plugins/cms.js +139 -0
  13. package/dist/plugins/compliance.d.ts +90 -30
  14. package/dist/plugins/compliance.js +60 -60
  15. package/dist/plugins/consent.d.ts +24 -8
  16. package/dist/plugins/consent.js +16 -16
  17. package/dist/plugins/emailverification.d.ts +12 -0
  18. package/dist/plugins/emailverification.js +33 -0
  19. package/dist/plugins/idverification.d.ts +21 -7
  20. package/dist/plugins/idverification.js +14 -14
  21. package/dist/plugins/impersonation.d.ts +3 -1
  22. package/dist/plugins/impersonation.js +2 -2
  23. package/dist/plugins/mfa.d.ts +21 -7
  24. package/dist/plugins/mfa.js +14 -14
  25. package/dist/plugins/multiapp.d.ts +40 -13
  26. package/dist/plugins/multiapp.js +26 -26
  27. package/dist/plugins/multisession.d.ts +11 -1
  28. package/dist/plugins/multisession.js +28 -2
  29. package/dist/plugins/notification.d.ts +25 -9
  30. package/dist/plugins/notification.js +16 -16
  31. package/dist/plugins/oidcprovider.d.ts +9 -3
  32. package/dist/plugins/oidcprovider.js +6 -6
  33. package/dist/plugins/organization.d.ts +30 -10
  34. package/dist/plugins/organization.js +20 -20
  35. package/dist/plugins/passkey.d.ts +6 -2
  36. package/dist/plugins/passkey.js +4 -4
  37. package/dist/plugins/permissions.d.ts +12 -0
  38. package/dist/plugins/permissions.js +33 -0
  39. package/dist/plugins/secrets.d.ts +33 -0
  40. package/dist/plugins/secrets.js +63 -0
  41. package/dist/plugins/social.d.ts +11 -2
  42. package/dist/plugins/social.js +7 -5
  43. package/dist/plugins/sso.d.ts +12 -4
  44. package/dist/plugins/sso.js +8 -8
  45. package/dist/plugins/stepup.d.ts +15 -5
  46. package/dist/plugins/stepup.js +10 -10
  47. package/dist/types.d.ts +2878 -2453
  48. package/package.json +2 -1
  49. package/src/client.ts +96 -37
  50. package/src/index.ts +21 -17
  51. package/src/plugins/admin.ts +12 -12
  52. package/src/plugins/apikey.ts +13 -15
  53. package/src/plugins/backupauth.ts +10 -10
  54. package/src/plugins/cms.ts +170 -0
  55. package/src/plugins/compliance.ts +60 -60
  56. package/src/plugins/consent.ts +16 -16
  57. package/src/plugins/emailverification.ts +38 -0
  58. package/src/plugins/idverification.ts +14 -14
  59. package/src/plugins/impersonation.ts +2 -2
  60. package/src/plugins/mfa.ts +14 -14
  61. package/src/plugins/multiapp.ts +26 -26
  62. package/src/plugins/multisession.ts +34 -2
  63. package/src/plugins/notification.ts +18 -18
  64. package/src/plugins/oidcprovider.ts +6 -6
  65. package/src/plugins/organization.ts +20 -20
  66. package/src/plugins/passkey.ts +4 -4
  67. package/src/plugins/permissions.ts +38 -0
  68. package/src/plugins/secrets.ts +76 -0
  69. package/src/plugins/social.ts +7 -5
  70. package/src/plugins/sso.ts +8 -8
  71. package/src/plugins/stepup.ts +10 -10
  72. package/src/types.ts +2989 -2486
  73. package/authsome-client-0.0.2.tgz +0 -0
@@ -18,18 +18,28 @@ export declare class BackupauthPlugin implements ClientPlugin {
18
18
  listTrustedContacts(): Promise<types.ErrorResponse>;
19
19
  verifyTrustedContact(request: types.VerifyTrustedContactRequest): Promise<types.ErrorResponse>;
20
20
  requestTrustedContactVerification(request: types.RequestTrustedContactVerificationRequest): Promise<types.ErrorResponse>;
21
- removeTrustedContact(): Promise<types.SuccessResponse>;
21
+ removeTrustedContact(params: {
22
+ id: string;
23
+ }): Promise<types.SuccessResponse>;
22
24
  sendVerificationCode(request: types.SendVerificationCodeRequest): Promise<types.ErrorResponse>;
23
25
  verifyCode(request: types.VerifyCodeRequest): Promise<types.ErrorResponse>;
24
26
  scheduleVideoSession(request: types.ScheduleVideoSessionRequest): Promise<types.ErrorResponse>;
25
27
  startVideoSession(request: types.StartVideoSessionRequest): Promise<types.ErrorResponse>;
26
28
  completeVideoSession(request: types.CompleteVideoSessionRequest): Promise<types.ErrorResponse>;
27
29
  uploadDocument(request: types.UploadDocumentRequest): Promise<types.ErrorResponse>;
28
- getDocumentVerification(): Promise<types.ErrorResponse>;
29
- reviewDocument(request: types.ReviewDocumentRequest): Promise<types.SuccessResponse>;
30
+ getDocumentVerification(params: {
31
+ id: string;
32
+ }): Promise<types.ErrorResponse>;
33
+ reviewDocument(params: {
34
+ id: string;
35
+ }, request: types.ReviewDocumentRequest): Promise<types.SuccessResponse>;
30
36
  listRecoverySessions(): Promise<void>;
31
- approveRecovery(request: types.ApproveRecoveryRequest): Promise<types.ErrorResponse>;
32
- rejectRecovery(request: types.RejectRecoveryRequest): Promise<types.ErrorResponse>;
37
+ approveRecovery(params: {
38
+ id: string;
39
+ }, request: types.ApproveRecoveryRequest): Promise<types.ErrorResponse>;
40
+ rejectRecovery(params: {
41
+ id: string;
42
+ }, request: types.RejectRecoveryRequest): Promise<types.ErrorResponse>;
33
43
  getRecoveryStats(): Promise<void>;
34
44
  getRecoveryConfig(): Promise<void>;
35
45
  updateRecoveryConfig(request: types.UpdateRecoveryConfigRequest): Promise<types.SuccessResponse>;
@@ -86,8 +86,8 @@ class BackupauthPlugin {
86
86
  body: request,
87
87
  });
88
88
  }
89
- async removeTrustedContact() {
90
- const path = '/trusted-contacts/:id';
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 = '/documents/:id';
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 = '/documents/:id/review';
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 = '/sessions/:id/approve';
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 = '/sessions/:id/reject';
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(): Promise<void>;
10
+ getEntry(): Promise<void>;
11
+ updateEntry(): Promise<void>;
12
+ deleteEntry(): Promise<void>;
13
+ publishEntry(): Promise<void>;
14
+ unpublishEntry(): Promise<void>;
15
+ archiveEntry(): Promise<void>;
16
+ queryEntries(): Promise<void>;
17
+ bulkPublish(request: types.BulkRequest): Promise<void>;
18
+ bulkUnpublish(request: types.BulkRequest): Promise<void>;
19
+ bulkDelete(request: types.BulkRequest): Promise<void>;
20
+ getEntryStats(): Promise<void>;
21
+ listContentTypes(): Promise<void>;
22
+ createContentType(): Promise<void>;
23
+ getContentType(params: {
24
+ slug: string;
25
+ }): Promise<void>;
26
+ updateContentType(params: {
27
+ slug: string;
28
+ }): Promise<void>;
29
+ deleteContentType(params: {
30
+ slug: string;
31
+ }): Promise<void>;
32
+ listFields(): Promise<void>;
33
+ addField(): Promise<void>;
34
+ getField(params: {
35
+ fieldSlug: string;
36
+ }): Promise<void>;
37
+ updateField(params: {
38
+ fieldSlug: string;
39
+ }): Promise<void>;
40
+ deleteField(params: {
41
+ fieldSlug: string;
42
+ }): Promise<void>;
43
+ reorderFields(): 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,139 @@
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() {
18
+ const path = '/createentry';
19
+ return this.client.request('POST', path);
20
+ }
21
+ async getEntry() {
22
+ const path = '/getentry';
23
+ return this.client.request('GET', path);
24
+ }
25
+ async updateEntry() {
26
+ const path = '/updateentry';
27
+ return this.client.request('PUT', path);
28
+ }
29
+ async deleteEntry() {
30
+ const path = '/deleteentry';
31
+ return this.client.request('DELETE', path);
32
+ }
33
+ async publishEntry() {
34
+ const path = '/publish';
35
+ return this.client.request('POST', path);
36
+ }
37
+ async unpublishEntry() {
38
+ const path = '/unpublish';
39
+ return this.client.request('POST', path);
40
+ }
41
+ async archiveEntry() {
42
+ const path = '/archive';
43
+ return this.client.request('POST', path);
44
+ }
45
+ async queryEntries() {
46
+ const path = '/query';
47
+ return this.client.request('POST', path);
48
+ }
49
+ async bulkPublish(request) {
50
+ const path = '/publish';
51
+ return this.client.request('POST', path, {
52
+ body: request,
53
+ });
54
+ }
55
+ async bulkUnpublish(request) {
56
+ const path = '/unpublish';
57
+ return this.client.request('POST', path, {
58
+ body: request,
59
+ });
60
+ }
61
+ async bulkDelete(request) {
62
+ const path = '/delete';
63
+ return this.client.request('POST', path, {
64
+ body: request,
65
+ });
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() {
76
+ const path = '/createcontenttype';
77
+ return this.client.request('POST', path);
78
+ }
79
+ async getContentType(params) {
80
+ const path = `/${params.slug}`;
81
+ return this.client.request('GET', path);
82
+ }
83
+ async updateContentType(params) {
84
+ const path = `/${params.slug}`;
85
+ return this.client.request('PUT', path);
86
+ }
87
+ async deleteContentType(params) {
88
+ const path = `/${params.slug}`;
89
+ return this.client.request('DELETE', path);
90
+ }
91
+ async listFields() {
92
+ const path = '/listfields';
93
+ return this.client.request('GET', path);
94
+ }
95
+ async addField() {
96
+ const path = '/addfield';
97
+ return this.client.request('POST', path);
98
+ }
99
+ async getField(params) {
100
+ const path = `/${params.fieldSlug}`;
101
+ return this.client.request('GET', path);
102
+ }
103
+ async updateField(params) {
104
+ const path = `/${params.fieldSlug}`;
105
+ return this.client.request('PUT', path);
106
+ }
107
+ async deleteField(params) {
108
+ const path = `/${params.fieldSlug}`;
109
+ return this.client.request('DELETE', path);
110
+ }
111
+ async reorderFields() {
112
+ const path = '/reorder';
113
+ return this.client.request('POST', path);
114
+ }
115
+ async getFieldTypes() {
116
+ const path = '/field-types';
117
+ return this.client.request('GET', path);
118
+ }
119
+ async listRevisions() {
120
+ const path = '/listrevisions';
121
+ return this.client.request('GET', path);
122
+ }
123
+ async getRevision(params) {
124
+ const path = `/${params.version}`;
125
+ return this.client.request('GET', path);
126
+ }
127
+ async restoreRevision(params) {
128
+ const path = `/${params.version}/restore`;
129
+ return this.client.request('POST', path);
130
+ }
131
+ async compareRevisions() {
132
+ const path = '/compare';
133
+ return this.client.request('GET', path);
134
+ }
135
+ }
136
+ exports.CmsPlugin = CmsPlugin;
137
+ function cmsClient() {
138
+ return new CmsPlugin();
139
+ }
@@ -7,36 +7,96 @@ export declare class CompliancePlugin implements ClientPlugin {
7
7
  init(client: AuthsomeClient): void;
8
8
  createProfile(request: types.CreateProfileRequest): Promise<void>;
9
9
  createProfileFromTemplate(request: types.CreateProfileFromTemplate_req): Promise<void>;
10
- getProfile(): Promise<void>;
11
- getAppProfile(): Promise<void>;
12
- updateProfile(request: types.UpdateProfileRequest): Promise<void>;
13
- deleteProfile(): Promise<void>;
14
- getComplianceStatus(): Promise<void>;
15
- getDashboard(): Promise<void>;
16
- runCheck(request: types.RunCheck_req): Promise<void>;
17
- listChecks(): Promise<void>;
18
- getCheck(): Promise<void>;
19
- listViolations(): Promise<void>;
20
- getViolation(): Promise<void>;
21
- resolveViolation(): Promise<void>;
22
- generateReport(request: types.GenerateReport_req): Promise<void>;
23
- listReports(): Promise<void>;
24
- getReport(): Promise<void>;
25
- downloadReport(): Promise<void>;
26
- createEvidence(request: types.CreateEvidence_req): Promise<void>;
27
- listEvidence(): Promise<void>;
28
- getEvidence(): Promise<void>;
29
- deleteEvidence(): Promise<void>;
30
- createPolicy(request: types.CreatePolicy_req): Promise<void>;
31
- listPolicies(): Promise<void>;
32
- getPolicy(): Promise<void>;
33
- updatePolicy(request: types.UpdatePolicy_req): Promise<void>;
34
- deletePolicy(): Promise<void>;
35
- createTraining(request: types.CreateTraining_req): Promise<void>;
36
- listTraining(): Promise<void>;
37
- getUserTraining(): Promise<void>;
38
- completeTraining(request: types.CompleteTraining_req): Promise<void>;
10
+ getProfile(params: {
11
+ id: string;
12
+ }): Promise<void>;
13
+ getAppProfile(params: {
14
+ appId: string;
15
+ }): Promise<void>;
16
+ updateProfile(params: {
17
+ id: string;
18
+ }, request: types.UpdateProfileRequest): Promise<void>;
19
+ deleteProfile(params: {
20
+ id: string;
21
+ }): Promise<void>;
22
+ getComplianceStatus(params: {
23
+ appId: string;
24
+ }): Promise<void>;
25
+ getDashboard(params: {
26
+ appId: string;
27
+ }): Promise<void>;
28
+ runCheck(params: {
29
+ profileId: string;
30
+ }, request: types.RunCheck_req): Promise<void>;
31
+ listChecks(params: {
32
+ profileId: string;
33
+ }): Promise<void>;
34
+ getCheck(params: {
35
+ id: string;
36
+ }): Promise<void>;
37
+ listViolations(params: {
38
+ appId: string;
39
+ }): Promise<void>;
40
+ getViolation(params: {
41
+ id: string;
42
+ }): Promise<void>;
43
+ resolveViolation(params: {
44
+ id: string;
45
+ }): Promise<void>;
46
+ generateReport(params: {
47
+ appId: string;
48
+ }, request: types.GenerateReport_req): Promise<void>;
49
+ listReports(params: {
50
+ appId: string;
51
+ }): Promise<void>;
52
+ getReport(params: {
53
+ id: string;
54
+ }): Promise<void>;
55
+ downloadReport(params: {
56
+ id: string;
57
+ }): Promise<void>;
58
+ createEvidence(params: {
59
+ appId: string;
60
+ }, request: types.CreateEvidence_req): Promise<void>;
61
+ listEvidence(params: {
62
+ appId: string;
63
+ }): Promise<void>;
64
+ getEvidence(params: {
65
+ id: string;
66
+ }): Promise<void>;
67
+ deleteEvidence(params: {
68
+ id: string;
69
+ }): Promise<void>;
70
+ createPolicy(params: {
71
+ appId: string;
72
+ }, request: types.CreatePolicy_req): Promise<void>;
73
+ listPolicies(params: {
74
+ appId: string;
75
+ }): Promise<void>;
76
+ getPolicy(params: {
77
+ id: string;
78
+ }): Promise<void>;
79
+ updatePolicy(params: {
80
+ id: string;
81
+ }, request: types.UpdatePolicy_req): Promise<void>;
82
+ deletePolicy(params: {
83
+ id: string;
84
+ }): Promise<void>;
85
+ createTraining(params: {
86
+ appId: string;
87
+ }, request: types.CreateTraining_req): Promise<void>;
88
+ listTraining(params: {
89
+ appId: string;
90
+ }): Promise<void>;
91
+ getUserTraining(params: {
92
+ userId: string;
93
+ }): Promise<void>;
94
+ completeTraining(params: {
95
+ id: string;
96
+ }, request: types.CompleteTraining_req): Promise<void>;
39
97
  listTemplates(): Promise<void>;
40
- getTemplate(): Promise<void>;
98
+ getTemplate(params: {
99
+ standard: string;
100
+ }): Promise<void>;
41
101
  }
42
102
  export declare function complianceClient(): CompliancePlugin;
@@ -22,134 +22,134 @@ class CompliancePlugin {
22
22
  body: request,
23
23
  });
24
24
  }
25
- async getProfile() {
26
- const path = '/profiles/:id';
25
+ async getProfile(params) {
26
+ const path = `/profiles/${params.id}`;
27
27
  return this.client.request('GET', path);
28
28
  }
29
- async getAppProfile() {
30
- const path = '/apps/:appId/profile';
29
+ async getAppProfile(params) {
30
+ const path = `/apps/${params.appId}/profile`;
31
31
  return this.client.request('GET', path);
32
32
  }
33
- async updateProfile(request) {
34
- const path = '/profiles/:id';
33
+ async updateProfile(params, request) {
34
+ const path = `/profiles/${params.id}`;
35
35
  return this.client.request('PUT', path, {
36
36
  body: request,
37
37
  });
38
38
  }
39
- async deleteProfile() {
40
- const path = '/profiles/:id';
39
+ async deleteProfile(params) {
40
+ const path = `/profiles/${params.id}`;
41
41
  return this.client.request('DELETE', path);
42
42
  }
43
- async getComplianceStatus() {
44
- const path = '/apps/:appId/status';
43
+ async getComplianceStatus(params) {
44
+ const path = `/apps/${params.appId}/status`;
45
45
  return this.client.request('GET', path);
46
46
  }
47
- async getDashboard() {
48
- const path = '/apps/:appId/dashboard';
47
+ async getDashboard(params) {
48
+ const path = `/apps/${params.appId}/dashboard`;
49
49
  return this.client.request('GET', path);
50
50
  }
51
- async runCheck(request) {
52
- const path = '/profiles/:profileId/checks';
51
+ async runCheck(params, request) {
52
+ const path = `/profiles/${params.profileId}/checks`;
53
53
  return this.client.request('POST', path, {
54
54
  body: request,
55
55
  });
56
56
  }
57
- async listChecks() {
58
- const path = '/profiles/:profileId/checks';
57
+ async listChecks(params) {
58
+ const path = `/profiles/${params.profileId}/checks`;
59
59
  return this.client.request('GET', path);
60
60
  }
61
- async getCheck() {
62
- const path = '/checks/:id';
61
+ async getCheck(params) {
62
+ const path = `/checks/${params.id}`;
63
63
  return this.client.request('GET', path);
64
64
  }
65
- async listViolations() {
66
- const path = '/apps/:appId/violations';
65
+ async listViolations(params) {
66
+ const path = `/apps/${params.appId}/violations`;
67
67
  return this.client.request('GET', path);
68
68
  }
69
- async getViolation() {
70
- const path = '/violations/:id';
69
+ async getViolation(params) {
70
+ const path = `/violations/${params.id}`;
71
71
  return this.client.request('GET', path);
72
72
  }
73
- async resolveViolation() {
74
- const path = '/violations/:id/resolve';
73
+ async resolveViolation(params) {
74
+ const path = `/violations/${params.id}/resolve`;
75
75
  return this.client.request('PUT', path);
76
76
  }
77
- async generateReport(request) {
78
- const path = '/apps/:appId/reports';
77
+ async generateReport(params, request) {
78
+ const path = `/apps/${params.appId}/reports`;
79
79
  return this.client.request('POST', path, {
80
80
  body: request,
81
81
  });
82
82
  }
83
- async listReports() {
84
- const path = '/apps/:appId/reports';
83
+ async listReports(params) {
84
+ const path = `/apps/${params.appId}/reports`;
85
85
  return this.client.request('GET', path);
86
86
  }
87
- async getReport() {
88
- const path = '/reports/:id';
87
+ async getReport(params) {
88
+ const path = `/reports/${params.id}`;
89
89
  return this.client.request('GET', path);
90
90
  }
91
- async downloadReport() {
92
- const path = '/reports/:id/download';
91
+ async downloadReport(params) {
92
+ const path = `/reports/${params.id}/download`;
93
93
  return this.client.request('GET', path);
94
94
  }
95
- async createEvidence(request) {
96
- const path = '/apps/:appId/evidence';
95
+ async createEvidence(params, request) {
96
+ const path = `/apps/${params.appId}/evidence`;
97
97
  return this.client.request('POST', path, {
98
98
  body: request,
99
99
  });
100
100
  }
101
- async listEvidence() {
102
- const path = '/apps/:appId/evidence';
101
+ async listEvidence(params) {
102
+ const path = `/apps/${params.appId}/evidence`;
103
103
  return this.client.request('GET', path);
104
104
  }
105
- async getEvidence() {
106
- const path = '/evidence/:id';
105
+ async getEvidence(params) {
106
+ const path = `/evidence/${params.id}`;
107
107
  return this.client.request('GET', path);
108
108
  }
109
- async deleteEvidence() {
110
- const path = '/evidence/:id';
109
+ async deleteEvidence(params) {
110
+ const path = `/evidence/${params.id}`;
111
111
  return this.client.request('DELETE', path);
112
112
  }
113
- async createPolicy(request) {
114
- const path = '/apps/:appId/policies';
113
+ async createPolicy(params, request) {
114
+ const path = `/apps/${params.appId}/policies`;
115
115
  return this.client.request('POST', path, {
116
116
  body: request,
117
117
  });
118
118
  }
119
- async listPolicies() {
120
- const path = '/apps/:appId/policies';
119
+ async listPolicies(params) {
120
+ const path = `/apps/${params.appId}/policies`;
121
121
  return this.client.request('GET', path);
122
122
  }
123
- async getPolicy() {
124
- const path = '/policies/:id';
123
+ async getPolicy(params) {
124
+ const path = `/policies/${params.id}`;
125
125
  return this.client.request('GET', path);
126
126
  }
127
- async updatePolicy(request) {
128
- const path = '/policies/:id';
127
+ async updatePolicy(params, request) {
128
+ const path = `/policies/${params.id}`;
129
129
  return this.client.request('PUT', path, {
130
130
  body: request,
131
131
  });
132
132
  }
133
- async deletePolicy() {
134
- const path = '/policies/:id';
133
+ async deletePolicy(params) {
134
+ const path = `/policies/${params.id}`;
135
135
  return this.client.request('DELETE', path);
136
136
  }
137
- async createTraining(request) {
138
- const path = '/apps/:appId/training';
137
+ async createTraining(params, request) {
138
+ const path = `/apps/${params.appId}/training`;
139
139
  return this.client.request('POST', path, {
140
140
  body: request,
141
141
  });
142
142
  }
143
- async listTraining() {
144
- const path = '/apps/:appId/training';
143
+ async listTraining(params) {
144
+ const path = `/apps/${params.appId}/training`;
145
145
  return this.client.request('GET', path);
146
146
  }
147
- async getUserTraining() {
148
- const path = '/users/:userId/training';
147
+ async getUserTraining(params) {
148
+ const path = `/users/${params.userId}/training`;
149
149
  return this.client.request('GET', path);
150
150
  }
151
- async completeTraining(request) {
152
- const path = '/training/:id/complete';
151
+ async completeTraining(params, request) {
152
+ const path = `/training/${params.id}/complete`;
153
153
  return this.client.request('PUT', path, {
154
154
  body: request,
155
155
  });
@@ -158,8 +158,8 @@ class CompliancePlugin {
158
158
  const path = '/templates';
159
159
  return this.client.request('GET', path);
160
160
  }
161
- async getTemplate() {
162
- const path = '/templates/:standard';
161
+ async getTemplate(params) {
162
+ const path = `/templates/${params.standard}`;
163
163
  return this.client.request('GET', path);
164
164
  }
165
165
  }
@@ -6,19 +6,35 @@ export declare class ConsentPlugin implements ClientPlugin {
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
8
  createConsent(request: types.CreateConsentRequest): Promise<void>;
9
- getConsent(): Promise<void>;
10
- updateConsent(request: types.UpdateConsentRequest): Promise<void>;
11
- revokeConsent(request: types.UpdateConsentRequest): Promise<types.MessageResponse>;
9
+ getConsent(params: {
10
+ id: string;
11
+ }): Promise<void>;
12
+ updateConsent(params: {
13
+ id: string;
14
+ }, request: types.UpdateConsentRequest): Promise<void>;
15
+ revokeConsent(params: {
16
+ id: string;
17
+ }, request: types.UpdateConsentRequest): Promise<types.MessageResponse>;
12
18
  createConsentPolicy(request: types.CreatePolicyRequest): Promise<void>;
13
- getConsentPolicy(): Promise<void>;
19
+ getConsentPolicy(params: {
20
+ id: string;
21
+ }): Promise<void>;
14
22
  recordCookieConsent(request: types.CookieConsentRequest): Promise<void>;
15
23
  getCookieConsent(): Promise<void>;
16
24
  requestDataExport(request: types.DataExportRequestInput): Promise<void>;
17
- getDataExport(): Promise<void>;
18
- downloadDataExport(): Promise<void>;
25
+ getDataExport(params: {
26
+ id: string;
27
+ }): Promise<void>;
28
+ downloadDataExport(params: {
29
+ id: string;
30
+ }): Promise<void>;
19
31
  requestDataDeletion(request: types.DataDeletionRequestInput): Promise<void>;
20
- getDataDeletion(): Promise<void>;
21
- approveDeletionRequest(): Promise<types.MessageResponse>;
32
+ getDataDeletion(params: {
33
+ id: string;
34
+ }): Promise<void>;
35
+ approveDeletionRequest(params: {
36
+ id: string;
37
+ }): Promise<types.MessageResponse>;
22
38
  getPrivacySettings(): Promise<void>;
23
39
  updatePrivacySettings(request: types.PrivacySettingsRequest): Promise<void>;
24
40
  getConsentAuditLogs(): Promise<void>;