@authsome/client 0.0.6 → 0.0.8

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 (39) hide show
  1. package/dist/client.d.ts +36 -36
  2. package/dist/client.js +16 -16
  3. package/dist/index.d.ts +16 -16
  4. package/dist/index.js +50 -50
  5. package/dist/plugins/apikey.d.ts +3 -3
  6. package/dist/plugins/apikey.js +8 -8
  7. package/dist/plugins/backupauth.js +23 -23
  8. package/dist/plugins/cms.d.ts +69 -18
  9. package/dist/plugins/cms.js +46 -46
  10. package/dist/plugins/idverification.js +4 -4
  11. package/dist/plugins/jwt.js +2 -2
  12. package/dist/plugins/multiapp.d.ts +19 -4
  13. package/dist/plugins/multiapp.js +20 -20
  14. package/dist/plugins/notification.d.ts +3 -3
  15. package/dist/plugins/notification.js +19 -19
  16. package/dist/plugins/oidcprovider.d.ts +4 -0
  17. package/dist/plugins/oidcprovider.js +26 -4
  18. package/dist/plugins/organization.d.ts +29 -17
  19. package/dist/plugins/organization.js +36 -36
  20. package/dist/plugins/permissions.js +3 -3
  21. package/dist/plugins/secrets.js +2 -2
  22. package/dist/plugins/webhook.d.ts +1 -1
  23. package/dist/types.d.ts +3941 -3113
  24. package/package.json +2 -3
  25. package/src/client.ts +36 -36
  26. package/src/index.ts +16 -16
  27. package/src/plugins/apikey.ts +9 -9
  28. package/src/plugins/backupauth.ts +23 -23
  29. package/src/plugins/cms.ts +51 -51
  30. package/src/plugins/idverification.ts +4 -4
  31. package/src/plugins/jwt.ts +2 -2
  32. package/src/plugins/multiapp.ts +27 -27
  33. package/src/plugins/notification.ts +20 -20
  34. package/src/plugins/oidcprovider.ts +30 -4
  35. package/src/plugins/organization.ts +39 -39
  36. package/src/plugins/permissions.ts +3 -3
  37. package/src/plugins/secrets.ts +2 -2
  38. package/src/plugins/webhook.ts +1 -1
  39. package/src/types.ts +4164 -3201
@@ -5,19 +5,51 @@ export declare class CmsPlugin implements ClientPlugin {
5
5
  readonly id = "cms";
6
6
  private client;
7
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>;
8
+ listEntries(params: {
9
+ typeSlug: string;
10
+ }): Promise<void>;
11
+ createEntry(params: {
12
+ typeSlug: string;
13
+ }, request: types.CreateEntryRequest): Promise<void>;
14
+ getEntry(params: {
15
+ entryId: string;
16
+ typeSlug: string;
17
+ }): Promise<void>;
18
+ updateEntry(params: {
19
+ typeSlug: string;
20
+ entryId: string;
21
+ }, request: types.UpdateEntryRequest): Promise<void>;
22
+ deleteEntry(params: {
23
+ typeSlug: string;
24
+ entryId: string;
25
+ }): Promise<void>;
26
+ publishEntry(params: {
27
+ typeSlug: string;
28
+ entryId: string;
29
+ }, request: types.PublishEntryRequest): Promise<void>;
30
+ unpublishEntry(params: {
31
+ typeSlug: string;
32
+ entryId: string;
33
+ }): Promise<void>;
34
+ archiveEntry(params: {
35
+ typeSlug: string;
36
+ entryId: string;
37
+ }): Promise<void>;
38
+ queryEntries(params: {
39
+ typeSlug: string;
40
+ }): Promise<void>;
41
+ bulkPublish(params: {
42
+ typeSlug: string;
43
+ }): Promise<void>;
44
+ bulkUnpublish(params: {
45
+ typeSlug: string;
46
+ }): Promise<void>;
47
+ bulkDelete(params: {
48
+ typeSlug: string;
49
+ }): Promise<void>;
50
+ getEntryStats(params: {
51
+ typeSlug: string;
52
+ }): Promise<void>;
21
53
  listContentTypes(): Promise<void>;
22
54
  createContentType(request: types.CreateContentTypeRequest): Promise<void>;
23
55
  getContentType(params: {
@@ -29,26 +61,45 @@ export declare class CmsPlugin implements ClientPlugin {
29
61
  deleteContentType(params: {
30
62
  slug: string;
31
63
  }): Promise<void>;
32
- listFields(): Promise<void>;
33
- addField(request: types.CreateFieldRequest): Promise<void>;
64
+ listFields(params: {
65
+ slug: string;
66
+ }): Promise<void>;
67
+ addField(params: {
68
+ slug: string;
69
+ }, request: types.CreateFieldRequest): Promise<void>;
34
70
  getField(params: {
71
+ slug: string;
35
72
  fieldSlug: string;
36
73
  }): Promise<void>;
37
74
  updateField(params: {
75
+ slug: string;
38
76
  fieldSlug: string;
39
77
  }, request: types.UpdateFieldRequest): Promise<void>;
40
78
  deleteField(params: {
79
+ slug: string;
41
80
  fieldSlug: string;
42
81
  }): Promise<void>;
43
- reorderFields(request: types.ReorderFieldsRequest): Promise<void>;
82
+ reorderFields(params: {
83
+ slug: string;
84
+ }, request: types.ReorderFieldsRequest): Promise<void>;
44
85
  getFieldTypes(): Promise<void>;
45
- listRevisions(): Promise<void>;
86
+ listRevisions(params: {
87
+ typeSlug: string;
88
+ entryId: string;
89
+ }): Promise<void>;
46
90
  getRevision(params: {
91
+ typeSlug: string;
92
+ entryId: string;
47
93
  version: number;
48
94
  }): Promise<void>;
49
95
  restoreRevision(params: {
96
+ entryId: string;
50
97
  version: number;
98
+ typeSlug: string;
99
+ }): Promise<void>;
100
+ compareRevisions(params: {
101
+ typeSlug: string;
102
+ entryId: string;
51
103
  }): Promise<void>;
52
- compareRevisions(): Promise<void>;
53
104
  }
54
105
  export declare function cmsClient(): CmsPlugin;
@@ -10,114 +10,114 @@ class CmsPlugin {
10
10
  init(client) {
11
11
  this.client = client;
12
12
  }
13
- async listEntries() {
14
- const path = '/cms/listentries';
13
+ async listEntries(params) {
14
+ const path = `/cms/${params.typeSlug}`;
15
15
  return this.client.request('GET', path);
16
16
  }
17
- async createEntry(request) {
18
- const path = '/cms/createentry';
17
+ async createEntry(params, request) {
18
+ const path = `/cms/${params.typeSlug}`;
19
19
  return this.client.request('POST', path, {
20
20
  body: request,
21
21
  });
22
22
  }
23
- async getEntry() {
24
- const path = '/cms/getentry';
23
+ async getEntry(params) {
24
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
25
25
  return this.client.request('GET', path);
26
26
  }
27
- async updateEntry(request) {
28
- const path = '/cms/updateentry';
27
+ async updateEntry(params, request) {
28
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
29
29
  return this.client.request('PUT', path, {
30
30
  body: request,
31
31
  });
32
32
  }
33
- async deleteEntry() {
34
- const path = '/cms/deleteentry';
33
+ async deleteEntry(params) {
34
+ const path = `/cms/${params.typeSlug}/${params.entryId}`;
35
35
  return this.client.request('DELETE', path);
36
36
  }
37
- async publishEntry(request) {
38
- const path = '/cms/publish';
37
+ async publishEntry(params, request) {
38
+ const path = `/cms/${params.typeSlug}/${params.entryId}/publish`;
39
39
  return this.client.request('POST', path, {
40
40
  body: request,
41
41
  });
42
42
  }
43
- async unpublishEntry() {
44
- const path = '/cms/unpublish';
43
+ async unpublishEntry(params) {
44
+ const path = `/cms/${params.typeSlug}/${params.entryId}/unpublish`;
45
45
  return this.client.request('POST', path);
46
46
  }
47
- async archiveEntry() {
48
- const path = '/cms/archive';
47
+ async archiveEntry(params) {
48
+ const path = `/cms/${params.typeSlug}/${params.entryId}/archive`;
49
49
  return this.client.request('POST', path);
50
50
  }
51
- async queryEntries() {
52
- const path = '/cms/query';
51
+ async queryEntries(params) {
52
+ const path = `/cms/${params.typeSlug}/query`;
53
53
  return this.client.request('POST', path);
54
54
  }
55
- async bulkPublish() {
56
- const path = '/cms/publish';
55
+ async bulkPublish(params) {
56
+ const path = `/cms/${params.typeSlug}/bulk/publish`;
57
57
  return this.client.request('POST', path);
58
58
  }
59
- async bulkUnpublish() {
60
- const path = '/cms/unpublish';
59
+ async bulkUnpublish(params) {
60
+ const path = `/cms/${params.typeSlug}/bulk/unpublish`;
61
61
  return this.client.request('POST', path);
62
62
  }
63
- async bulkDelete() {
64
- const path = '/cms/delete';
63
+ async bulkDelete(params) {
64
+ const path = `/cms/${params.typeSlug}/bulk/delete`;
65
65
  return this.client.request('POST', path);
66
66
  }
67
- async getEntryStats() {
68
- const path = '/cms/stats';
67
+ async getEntryStats(params) {
68
+ const path = `/cms/${params.typeSlug}/stats`;
69
69
  return this.client.request('GET', path);
70
70
  }
71
71
  async listContentTypes() {
72
- const path = '/cms/listcontenttypes';
72
+ const path = '/cms/types';
73
73
  return this.client.request('GET', path);
74
74
  }
75
75
  async createContentType(request) {
76
- const path = '/cms/createcontenttype';
76
+ const path = '/cms/types';
77
77
  return this.client.request('POST', path, {
78
78
  body: request,
79
79
  });
80
80
  }
81
81
  async getContentType(params) {
82
- const path = `/cms/${params.slug}`;
82
+ const path = `/cms/types/${params.slug}`;
83
83
  return this.client.request('GET', path);
84
84
  }
85
85
  async updateContentType(params, request) {
86
- const path = `/cms/${params.slug}`;
86
+ const path = `/cms/types/${params.slug}`;
87
87
  return this.client.request('PUT', path, {
88
88
  body: request,
89
89
  });
90
90
  }
91
91
  async deleteContentType(params) {
92
- const path = `/cms/${params.slug}`;
92
+ const path = `/cms/types/${params.slug}`;
93
93
  return this.client.request('DELETE', path);
94
94
  }
95
- async listFields() {
96
- const path = '/cms/listfields';
95
+ async listFields(params) {
96
+ const path = `/cms/types/${params.slug}/fields`;
97
97
  return this.client.request('GET', path);
98
98
  }
99
- async addField(request) {
100
- const path = '/cms/addfield';
99
+ async addField(params, request) {
100
+ const path = `/cms/types/${params.slug}/fields`;
101
101
  return this.client.request('POST', path, {
102
102
  body: request,
103
103
  });
104
104
  }
105
105
  async getField(params) {
106
- const path = `/cms/${params.fieldSlug}`;
106
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
107
107
  return this.client.request('GET', path);
108
108
  }
109
109
  async updateField(params, request) {
110
- const path = `/cms/${params.fieldSlug}`;
110
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
111
111
  return this.client.request('PUT', path, {
112
112
  body: request,
113
113
  });
114
114
  }
115
115
  async deleteField(params) {
116
- const path = `/cms/${params.fieldSlug}`;
116
+ const path = `/cms/types/${params.slug}/fields/${params.fieldSlug}`;
117
117
  return this.client.request('DELETE', path);
118
118
  }
119
- async reorderFields(request) {
120
- const path = '/cms/reorder';
119
+ async reorderFields(params, request) {
120
+ const path = `/cms/types/${params.slug}/fields/reorder`;
121
121
  return this.client.request('POST', path, {
122
122
  body: request,
123
123
  });
@@ -126,20 +126,20 @@ class CmsPlugin {
126
126
  const path = '/cms/field-types';
127
127
  return this.client.request('GET', path);
128
128
  }
129
- async listRevisions() {
130
- const path = '/cms/listrevisions';
129
+ async listRevisions(params) {
130
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions`;
131
131
  return this.client.request('GET', path);
132
132
  }
133
133
  async getRevision(params) {
134
- const path = `/cms/${params.version}`;
134
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/${params.version}`;
135
135
  return this.client.request('GET', path);
136
136
  }
137
137
  async restoreRevision(params) {
138
- const path = `/cms/${params.version}/restore`;
138
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/${params.version}/restore`;
139
139
  return this.client.request('POST', path);
140
140
  }
141
- async compareRevisions() {
142
- const path = '/cms/compare';
141
+ async compareRevisions(params) {
142
+ const path = `/cms/${params.typeSlug}/${params.entryId}/revisions/compare`;
143
143
  return this.client.request('GET', path);
144
144
  }
145
145
  }
@@ -43,21 +43,21 @@ class IdverificationPlugin {
43
43
  return this.client.request('POST', path);
44
44
  }
45
45
  async adminBlockUser(params, request) {
46
- const path = `/verification/users/${params.userId}/block`;
46
+ const path = `/verification/admin/users/${params.userId}/block`;
47
47
  return this.client.request('POST', path, {
48
48
  body: request,
49
49
  });
50
50
  }
51
51
  async adminUnblockUser(params) {
52
- const path = `/verification/users/${params.userId}/unblock`;
52
+ const path = `/verification/admin/users/${params.userId}/unblock`;
53
53
  return this.client.request('POST', path);
54
54
  }
55
55
  async adminGetUserVerificationStatus(params) {
56
- const path = `/verification/users/${params.userId}/status`;
56
+ const path = `/verification/admin/users/${params.userId}/status`;
57
57
  return this.client.request('GET', path);
58
58
  }
59
59
  async adminGetUserVerifications(params) {
60
- const path = `/verification/users/${params.userId}/verifications`;
60
+ const path = `/verification/admin/users/${params.userId}/verifications`;
61
61
  return this.client.request('GET', path);
62
62
  }
63
63
  }
@@ -11,13 +11,13 @@ class JwtPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createJWTKey(request) {
14
- const path = '/jwt/createjwtkey';
14
+ const path = '/jwt/keys';
15
15
  return this.client.request('POST', path, {
16
16
  body: request,
17
17
  });
18
18
  }
19
19
  async listJWTKeys(request) {
20
- const path = '/jwt/listjwtkeys';
20
+ const path = '/jwt/keys';
21
21
  return this.client.request('GET', path, {
22
22
  query: this.client.toQueryParams(request),
23
23
  });
@@ -17,11 +17,17 @@ export declare class MultiappPlugin implements ClientPlugin {
17
17
  }): Promise<types.MultitenancyStatusResponse>;
18
18
  listApps(): Promise<types.AppsListResponse>;
19
19
  removeMember(params: {
20
+ appId: string;
20
21
  memberId: string;
21
22
  }): Promise<types.MultitenancyStatusResponse>;
22
- listMembers(): Promise<types.MembersListResponse>;
23
- inviteMember(request: types.InviteMemberRequest): Promise<types.Invitation>;
23
+ listMembers(params: {
24
+ appId: string;
25
+ }): Promise<types.MembersListResponse>;
26
+ inviteMember(params: {
27
+ appId: string;
28
+ }, request: types.InviteMemberRequest): Promise<types.Invitation>;
24
29
  updateMember(params: {
30
+ appId: string;
25
31
  memberId: string;
26
32
  }, request: types.UpdateMemberRequest): Promise<types.Member>;
27
33
  getInvitation(params: {
@@ -33,23 +39,32 @@ export declare class MultiappPlugin implements ClientPlugin {
33
39
  declineInvitation(params: {
34
40
  token: string;
35
41
  }): Promise<types.MultitenancyStatusResponse>;
36
- createTeam(request: types.CreateTeamRequest): Promise<types.Team>;
42
+ createTeam(params: {
43
+ appId: string;
44
+ }, request: types.CreateTeamRequest): Promise<types.Team>;
37
45
  getTeam(params: {
46
+ appId: string;
38
47
  teamId: string;
39
48
  }): Promise<types.Team>;
40
49
  updateTeam(params: {
50
+ appId: string;
41
51
  teamId: string;
42
52
  }, request: types.UpdateTeamRequest): Promise<types.Team>;
43
53
  deleteTeam(params: {
54
+ appId: string;
44
55
  teamId: string;
45
56
  }): Promise<types.MultitenancyStatusResponse>;
46
- listTeams(): Promise<types.TeamsListResponse>;
57
+ listTeams(params: {
58
+ appId: string;
59
+ }): Promise<types.TeamsListResponse>;
47
60
  addTeamMember(params: {
61
+ appId: string;
48
62
  teamId: string;
49
63
  }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse>;
50
64
  removeTeamMember(params: {
51
65
  teamId: string;
52
66
  memberId: string;
67
+ appId: string;
53
68
  }): Promise<types.MultitenancyStatusResponse>;
54
69
  }
55
70
  export declare function multiappClient(): MultiappPlugin;
@@ -11,7 +11,7 @@ class MultiappPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createApp() {
14
- const path = '/apps/createapp';
14
+ const path = '/apps';
15
15
  return this.client.request('POST', path);
16
16
  }
17
17
  async getApp(params) {
@@ -27,73 +27,73 @@ class MultiappPlugin {
27
27
  return this.client.request('DELETE', path);
28
28
  }
29
29
  async listApps() {
30
- const path = '/apps/listapps';
30
+ const path = '/apps';
31
31
  return this.client.request('GET', path);
32
32
  }
33
33
  async removeMember(params) {
34
- const path = `/apps/${params.memberId}`;
34
+ const path = `/apps/${params.appId}/members/${params.memberId}`;
35
35
  return this.client.request('DELETE', path);
36
36
  }
37
- async listMembers() {
38
- const path = '/apps/listmembers';
37
+ async listMembers(params) {
38
+ const path = `/apps/${params.appId}/members`;
39
39
  return this.client.request('GET', path);
40
40
  }
41
- async inviteMember(request) {
42
- const path = '/apps/invite';
41
+ async inviteMember(params, request) {
42
+ const path = `/apps/${params.appId}/members/invite`;
43
43
  return this.client.request('POST', path, {
44
44
  body: request,
45
45
  });
46
46
  }
47
47
  async updateMember(params, request) {
48
- const path = `/apps/${params.memberId}`;
48
+ const path = `/apps/${params.appId}/members/${params.memberId}`;
49
49
  return this.client.request('PUT', path, {
50
50
  body: request,
51
51
  });
52
52
  }
53
53
  async getInvitation(params) {
54
- const path = `/apps/${params.token}`;
54
+ const path = `/invitations/${params.token}`;
55
55
  return this.client.request('GET', path);
56
56
  }
57
57
  async acceptInvitation(params) {
58
- const path = `/apps/${params.token}/accept`;
58
+ const path = `/invitations/${params.token}/accept`;
59
59
  return this.client.request('POST', path);
60
60
  }
61
61
  async declineInvitation(params) {
62
- const path = `/apps/${params.token}/decline`;
62
+ const path = `/invitations/${params.token}/decline`;
63
63
  return this.client.request('POST', path);
64
64
  }
65
- async createTeam(request) {
66
- const path = '/apps/createteam';
65
+ async createTeam(params, request) {
66
+ const path = `/apps/${params.appId}/teams`;
67
67
  return this.client.request('POST', path, {
68
68
  body: request,
69
69
  });
70
70
  }
71
71
  async getTeam(params) {
72
- const path = `/apps/${params.teamId}`;
72
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
73
73
  return this.client.request('GET', path);
74
74
  }
75
75
  async updateTeam(params, request) {
76
- const path = `/apps/${params.teamId}`;
76
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
77
77
  return this.client.request('PUT', path, {
78
78
  body: request,
79
79
  });
80
80
  }
81
81
  async deleteTeam(params) {
82
- const path = `/apps/${params.teamId}`;
82
+ const path = `/apps/${params.appId}/teams/${params.teamId}`;
83
83
  return this.client.request('DELETE', path);
84
84
  }
85
- async listTeams() {
86
- const path = '/apps/listteams';
85
+ async listTeams(params) {
86
+ const path = `/apps/${params.appId}/teams`;
87
87
  return this.client.request('GET', path);
88
88
  }
89
89
  async addTeamMember(params, request) {
90
- const path = `/apps/${params.teamId}/members`;
90
+ const path = `/apps/${params.appId}/teams/${params.teamId}/members`;
91
91
  return this.client.request('POST', path, {
92
92
  body: request,
93
93
  });
94
94
  }
95
95
  async removeTeamMember(params) {
96
- const path = `/apps/${params.teamId}/members/${params.memberId}`;
96
+ const path = `/apps/${params.appId}/teams/${params.teamId}/members/${params.memberId}`;
97
97
  return this.client.request('DELETE', path);
98
98
  }
99
99
  }
@@ -5,9 +5,6 @@ export declare class NotificationPlugin implements ClientPlugin {
5
5
  readonly id = "notification";
6
6
  private client;
7
7
  init(client: AuthsomeClient): void;
8
- previewTemplate(params: {
9
- id: string;
10
- }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse>;
11
8
  createTemplate(request: types.CreateTemplateRequest): Promise<types.NotificationTemplateResponse>;
12
9
  getTemplate(params: {
13
10
  id: string;
@@ -24,6 +21,9 @@ export declare class NotificationPlugin implements ClientPlugin {
24
21
  }): Promise<types.NotificationStatusResponse>;
25
22
  resetAllTemplates(): Promise<types.NotificationStatusResponse>;
26
23
  getTemplateDefaults(): Promise<types.NotificationTemplateListResponse>;
24
+ previewTemplate(params: {
25
+ id: string;
26
+ }, request: types.PreviewTemplate_req): Promise<types.NotificationPreviewResponse>;
27
27
  renderTemplate(request: types.RenderTemplate_req): Promise<types.NotificationPreviewResponse>;
28
28
  sendNotification(request: types.SendRequest): Promise<types.NotificationResponse>;
29
29
  getNotification(params: {
@@ -10,70 +10,70 @@ class NotificationPlugin {
10
10
  init(client) {
11
11
  this.client = client;
12
12
  }
13
- async previewTemplate(params, request) {
14
- const path = `/${params.id}/preview`;
15
- return this.client.request('POST', path, {
16
- body: request,
17
- });
18
- }
19
13
  async createTemplate(request) {
20
- const path = '/createtemplate';
14
+ const path = '/templates';
21
15
  return this.client.request('POST', path, {
22
16
  body: request,
23
17
  });
24
18
  }
25
19
  async getTemplate(params) {
26
- const path = `/${params.id}`;
20
+ const path = `/templates/${params.id}`;
27
21
  return this.client.request('GET', path);
28
22
  }
29
23
  async listTemplates() {
30
- const path = '/listtemplates';
24
+ const path = '/templates';
31
25
  return this.client.request('GET', path);
32
26
  }
33
27
  async updateTemplate(params, request) {
34
- const path = `/${params.id}`;
28
+ const path = `/templates/${params.id}`;
35
29
  return this.client.request('PUT', path, {
36
30
  body: request,
37
31
  });
38
32
  }
39
33
  async deleteTemplate(params) {
40
- const path = `/${params.id}`;
34
+ const path = `/templates/${params.id}`;
41
35
  return this.client.request('DELETE', path);
42
36
  }
43
37
  async resetTemplate(params) {
44
- const path = `/${params.id}/reset`;
38
+ const path = `/templates/${params.id}/reset`;
45
39
  return this.client.request('POST', path);
46
40
  }
47
41
  async resetAllTemplates() {
48
- const path = '/reset-all';
42
+ const path = '/templates/reset-all';
49
43
  return this.client.request('POST', path);
50
44
  }
51
45
  async getTemplateDefaults() {
52
- const path = '/defaults';
46
+ const path = '/templates/defaults';
53
47
  return this.client.request('GET', path);
54
48
  }
49
+ async previewTemplate(params, request) {
50
+ const path = `/templates/${params.id}/preview`;
51
+ return this.client.request('POST', path, {
52
+ body: request,
53
+ });
54
+ }
55
55
  async renderTemplate(request) {
56
- const path = '/render';
56
+ const path = '/templates/render';
57
57
  return this.client.request('POST', path, {
58
58
  body: request,
59
59
  });
60
60
  }
61
61
  async sendNotification(request) {
62
- const path = '/send';
62
+ const path = '/notifications/send';
63
63
  return this.client.request('POST', path, {
64
64
  body: request,
65
65
  });
66
66
  }
67
67
  async getNotification(params) {
68
- const path = `/${params.id}`;
68
+ const path = `/notifications/${params.id}`;
69
69
  return this.client.request('GET', path);
70
70
  }
71
71
  async listNotifications() {
72
- const path = '/listnotifications';
72
+ const path = '/notifications';
73
73
  return this.client.request('GET', path);
74
74
  }
75
75
  async resendNotification(params) {
76
- const path = `/${params.id}/resend`;
76
+ const path = `/notifications/${params.id}/resend`;
77
77
  return this.client.request('POST', path);
78
78
  }
79
79
  async handleWebhook(params) {
@@ -24,5 +24,9 @@ export declare class OidcproviderPlugin implements ClientPlugin {
24
24
  userInfo(): Promise<types.UserInfoResponse>;
25
25
  introspectToken(request: types.TokenIntrospectionRequest): Promise<types.TokenIntrospectionResponse>;
26
26
  revokeToken(request: types.TokenRevocationRequest): Promise<types.StatusResponse>;
27
+ deviceAuthorize(request: types.DeviceAuthorizationRequest): Promise<types.DeviceAuthorizationResponse>;
28
+ deviceCodeEntry(): Promise<void>;
29
+ deviceVerify(request: types.DeviceVerificationRequest): Promise<void>;
30
+ deviceAuthorizeDecision(request: types.DeviceAuthorizationDecisionRequest): Promise<void>;
27
31
  }
28
32
  export declare function oidcproviderClient(): OidcproviderPlugin;