@authsome/client 0.0.7 → 0.0.9

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 (48) hide show
  1. package/dist/client.d.ts +42 -42
  2. package/dist/client.js +20 -20
  3. package/dist/index.d.ts +20 -20
  4. package/dist/index.js +62 -62
  5. package/dist/plugins/admin.js +11 -11
  6. package/dist/plugins/apikey.js +7 -7
  7. package/dist/plugins/backupauth.js +6 -6
  8. package/dist/plugins/cms.d.ts +69 -18
  9. package/dist/plugins/cms.js +47 -47
  10. package/dist/plugins/idverification.js +11 -11
  11. package/dist/plugins/impersonation.js +6 -6
  12. package/dist/plugins/jwt.js +5 -5
  13. package/dist/plugins/multiapp.d.ts +19 -4
  14. package/dist/plugins/multiapp.js +23 -23
  15. package/dist/plugins/multisession.js +9 -9
  16. package/dist/plugins/notification.js +14 -14
  17. package/dist/plugins/oidcprovider.d.ts +3 -3
  18. package/dist/plugins/oidcprovider.js +17 -17
  19. package/dist/plugins/organization.d.ts +16 -4
  20. package/dist/plugins/organization.js +20 -20
  21. package/dist/plugins/permissions.js +3 -3
  22. package/dist/plugins/secrets.d.ts +1 -1
  23. package/dist/plugins/secrets.js +11 -11
  24. package/dist/plugins/sso.js +6 -6
  25. package/dist/plugins/stepup.js +14 -14
  26. package/dist/plugins/webhook.d.ts +1 -1
  27. package/dist/types.d.ts +3837 -3787
  28. package/package.json +1 -2
  29. package/src/client.ts +42 -42
  30. package/src/index.ts +20 -20
  31. package/src/plugins/admin.ts +11 -11
  32. package/src/plugins/apikey.ts +7 -7
  33. package/src/plugins/backupauth.ts +6 -6
  34. package/src/plugins/cms.ts +52 -52
  35. package/src/plugins/idverification.ts +11 -11
  36. package/src/plugins/impersonation.ts +6 -6
  37. package/src/plugins/jwt.ts +5 -5
  38. package/src/plugins/multiapp.ts +30 -30
  39. package/src/plugins/multisession.ts +9 -9
  40. package/src/plugins/notification.ts +14 -14
  41. package/src/plugins/oidcprovider.ts +23 -23
  42. package/src/plugins/organization.ts +24 -24
  43. package/src/plugins/permissions.ts +3 -3
  44. package/src/plugins/secrets.ts +12 -12
  45. package/src/plugins/sso.ts +6 -6
  46. package/src/plugins/stepup.ts +14 -14
  47. package/src/plugins/webhook.ts +1 -1
  48. package/src/types.ts +3928 -3877
@@ -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
+ typeSlug: string;
16
+ entryId: 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,136 +10,136 @@ class CmsPlugin {
10
10
  init(client) {
11
11
  this.client = client;
12
12
  }
13
- async listEntries() {
14
- const path = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/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 = '/listcontenttypes';
72
+ const path = '/cms/types';
73
73
  return this.client.request('GET', path);
74
74
  }
75
75
  async createContentType(request) {
76
- const path = '/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 = `/${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 = `/${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 = `/${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 = '/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 = '/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 = `/${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 = `/${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 = `/${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 = '/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
  });
124
124
  }
125
125
  async getFieldTypes() {
126
- const path = '/field-types';
126
+ const path = '/cms/field-types';
127
127
  return this.client.request('GET', path);
128
128
  }
129
- async listRevisions() {
130
- const path = '/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 = `/${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 = `/${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 = '/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
  }
@@ -11,53 +11,53 @@ class IdverificationPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createVerificationSession(request) {
14
- const path = '/sessions';
14
+ const path = '/verification/sessions';
15
15
  return this.client.request('POST', path, {
16
16
  body: request,
17
17
  });
18
18
  }
19
19
  async getVerificationSession(params) {
20
- const path = `/sessions/${params.id}`;
20
+ const path = `/verification/sessions/${params.id}`;
21
21
  return this.client.request('GET', path);
22
22
  }
23
23
  async getVerification(params) {
24
- const path = `/${params.id}`;
24
+ const path = `/verification/${params.id}`;
25
25
  return this.client.request('GET', path);
26
26
  }
27
27
  async getUserVerifications() {
28
- const path = '/me';
28
+ const path = '/verification/me';
29
29
  return this.client.request('GET', path);
30
30
  }
31
31
  async getUserVerificationStatus() {
32
- const path = '/me/status';
32
+ const path = '/verification/me/status';
33
33
  return this.client.request('GET', path);
34
34
  }
35
35
  async requestReverification(request) {
36
- const path = '/me/reverify';
36
+ const path = '/verification/me/reverify';
37
37
  return this.client.request('POST', path, {
38
38
  body: request,
39
39
  });
40
40
  }
41
41
  async handleWebhook(params) {
42
- const path = `/webhook/${params.provider}`;
42
+ const path = `/verification/webhook/${params.provider}`;
43
43
  return this.client.request('POST', path);
44
44
  }
45
45
  async adminBlockUser(params, request) {
46
- const path = `/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 = `/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 = `/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 = `/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,27 +11,27 @@ class ImpersonationPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async startImpersonation() {
14
- const path = '/start';
14
+ const path = '/impersonation/start';
15
15
  return this.client.request('POST', path);
16
16
  }
17
17
  async endImpersonation() {
18
- const path = '/end';
18
+ const path = '/impersonation/end';
19
19
  return this.client.request('POST', path);
20
20
  }
21
21
  async getImpersonation(params) {
22
- const path = `/${params.id}`;
22
+ const path = `/impersonation/${params.id}`;
23
23
  return this.client.request('GET', path);
24
24
  }
25
25
  async listImpersonations() {
26
- const path = '/';
26
+ const path = '/impersonation/';
27
27
  return this.client.request('GET', path);
28
28
  }
29
29
  async listAuditEvents() {
30
- const path = '/audit';
30
+ const path = '/impersonation/audit';
31
31
  return this.client.request('GET', path);
32
32
  }
33
33
  async verifyImpersonation() {
34
- const path = '/verify';
34
+ const path = '/impersonation/verify';
35
35
  return this.client.request('POST', path);
36
36
  }
37
37
  }
@@ -11,29 +11,29 @@ class JwtPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createJWTKey(request) {
14
- const path = '/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 = '/listjwtkeys';
20
+ const path = '/jwt/keys';
21
21
  return this.client.request('GET', path, {
22
22
  query: this.client.toQueryParams(request),
23
23
  });
24
24
  }
25
25
  async getJWKS() {
26
- const path = '/jwks';
26
+ const path = '/jwt/jwks';
27
27
  return this.client.request('GET', path);
28
28
  }
29
29
  async generateToken(request) {
30
- const path = '/generate';
30
+ const path = '/jwt/generate';
31
31
  return this.client.request('POST', path, {
32
32
  body: request,
33
33
  });
34
34
  }
35
35
  async verifyToken(request) {
36
- const path = '/verify';
36
+ const path = '/jwt/verify';
37
37
  return this.client.request('POST', path, {
38
38
  body: request,
39
39
  });
@@ -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,21 +39,30 @@ 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: {
48
61
  teamId: string;
62
+ appId: string;
49
63
  }, request: types.AddTeamMember_req): Promise<types.MultitenancyStatusResponse>;
50
64
  removeTeamMember(params: {
65
+ appId: string;
51
66
  teamId: string;
52
67
  memberId: string;
53
68
  }): Promise<types.MultitenancyStatusResponse>;
@@ -11,89 +11,89 @@ class MultiappPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async createApp() {
14
- const path = '/createapp';
14
+ const path = '/apps';
15
15
  return this.client.request('POST', path);
16
16
  }
17
17
  async getApp(params) {
18
- const path = `/${params.appId}`;
18
+ const path = `/apps/${params.appId}`;
19
19
  return this.client.request('GET', path);
20
20
  }
21
21
  async updateApp(params) {
22
- const path = `/${params.appId}`;
22
+ const path = `/apps/${params.appId}`;
23
23
  return this.client.request('PUT', path);
24
24
  }
25
25
  async deleteApp(params) {
26
- const path = `/${params.appId}`;
26
+ const path = `/apps/${params.appId}`;
27
27
  return this.client.request('DELETE', path);
28
28
  }
29
29
  async listApps() {
30
- const path = '/listapps';
30
+ const path = '/apps';
31
31
  return this.client.request('GET', path);
32
32
  }
33
33
  async removeMember(params) {
34
- const path = `/${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 = '/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 = '/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 = `/${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 = `/${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 = `/${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 = `/${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 = '/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 = `/${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 = `/${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 = `/${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 = '/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 = `/${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 = `/${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
  }
@@ -11,45 +11,45 @@ class MultisessionPlugin {
11
11
  this.client = client;
12
12
  }
13
13
  async list(request) {
14
- const path = '/list';
14
+ const path = '/multi-session/list';
15
15
  return this.client.request('GET', path, {
16
16
  query: this.client.toQueryParams(request),
17
17
  });
18
18
  }
19
19
  async setActive(request) {
20
- const path = '/set-active';
20
+ const path = '/multi-session/set-active';
21
21
  return this.client.request('POST', path, {
22
22
  body: request,
23
23
  });
24
24
  }
25
25
  async delete(params) {
26
- const path = `/delete/${params.id}`;
26
+ const path = `/multi-session/delete/${params.id}`;
27
27
  return this.client.request('POST', path);
28
28
  }
29
29
  async getCurrent() {
30
- const path = '/current';
30
+ const path = '/multi-session/current';
31
31
  return this.client.request('GET', path);
32
32
  }
33
33
  async getByID(params) {
34
- const path = `/${params.id}`;
34
+ const path = `/multi-session/${params.id}`;
35
35
  return this.client.request('GET', path);
36
36
  }
37
37
  async revokeAll(request) {
38
- const path = '/revoke-all';
38
+ const path = '/multi-session/revoke-all';
39
39
  return this.client.request('POST', path, {
40
40
  body: request,
41
41
  });
42
42
  }
43
43
  async revokeOthers() {
44
- const path = '/revoke-others';
44
+ const path = '/multi-session/revoke-others';
45
45
  return this.client.request('POST', path);
46
46
  }
47
47
  async refresh() {
48
- const path = '/refresh';
48
+ const path = '/multi-session/refresh';
49
49
  return this.client.request('POST', path);
50
50
  }
51
51
  async getStats() {
52
- const path = '/stats';
52
+ const path = '/multi-session/stats';
53
53
  return this.client.request('GET', path);
54
54
  }
55
55
  }