Skip to content

Commit 1c5cd76

Browse files
committed
fix: regression in getter method namings
1 parent c502ddf commit 1c5cd76

10 files changed

Lines changed: 85 additions & 76 deletions

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
11
## 2.0.0 (2024-11-25)
22

33
### Breaking Changes
4-
4+
* tenant administrator methods moved to separate entity
55
* Sub entity method names are changed to be more user friendly and descriptive.
66
List of changed methods:
77

8+
| old | new |
9+
|-------------------|---------------------|
10+
| `roles` | |
11+
| addPermissions | assignPermissions |
12+
| removePermissions | unassignPermissions |
13+
| removeRoles | unassignRoles |
14+
| `roleGroups` | |
15+
| addRoles | assignRoles |
16+
| addRoleGroups | assignRoleGroups |
17+
| removeRoles | unassignRoles |
18+

dist/plusauth-rest-js.cjs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -259,31 +259,31 @@ var CustomDomainService = class extends HttpService {
259259
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
260260
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
261261
*/
262-
async getAll(queryParams) {
262+
async getCustomDomains(queryParams) {
263263
return await this.http.get(`/custom-domain/${encodedQueryString(queryParams)}`);
264264
}
265265
/**
266266
* @param data Tenant Custom Domain object
267267
*/
268-
async register(data) {
268+
async registerCustomDomain(data) {
269269
return await this.http.post(`/custom-domain/`, data);
270270
}
271271
/**
272272
* @param domain Custom Domain specifier
273273
*/
274-
async get(domain) {
274+
async getCustomDomain(domain) {
275275
return await this.http.get(`/custom-domain/$${domain}`);
276276
}
277277
/**
278278
* @param domain Custom Domain specifier
279279
*/
280-
async remove(domain) {
280+
async removeCustomDomain(domain) {
281281
return await this.http.delete(`/custom-domain/$${domain}`);
282282
}
283283
/**
284284
* @param domain Custom Domain specifier
285285
*/
286-
async verifyOwnership(domain) {
286+
async verifyCustomDomainOwnership(domain) {
287287
return await this.http.get(`/custom-domain/$${domain}/verify`);
288288
}
289289
};
@@ -656,52 +656,52 @@ var RoleGroupService = class extends HttpService {
656656
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
657657
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
658658
*/
659-
async getAll(queryParams) {
659+
async getRoleGroups(queryParams) {
660660
return await this.http.get(`/role-groups/${encodedQueryString(queryParams)}`);
661661
}
662662
/**
663663
* @param data Role Group object
664664
*/
665-
async create(data) {
665+
async createRoleGroup(data) {
666666
return await this.http.post(`/role-groups/`, data);
667667
}
668668
/**
669669
* @param roleGroupId Role Group identifier
670670
*/
671-
async get(roleGroupId) {
671+
async getRoleGroup(roleGroupId) {
672672
return await this.http.get(`/role-groups/${roleGroupId}`);
673673
}
674674
/**
675675
* @param roleGroupId Role Group identifier
676676
* @param data Object containing to be updated values
677677
*/
678-
async update(roleGroupId, data) {
678+
async updateRoleGroup(roleGroupId, data) {
679679
return await this.http.patch(`/role-groups/${roleGroupId}`, data);
680680
}
681681
/**
682682
* @param roleGroupId Role Group identifier
683683
*/
684-
async remove(roleGroupId) {
684+
async removeRoleGroup(roleGroupId) {
685685
return await this.http.delete(`/role-groups/${roleGroupId}`);
686686
}
687687
/**
688688
* @param roleGroupId Role Group identifier
689689
*/
690-
async getRoles(roleGroupId) {
690+
async getRoleGroupRoles(roleGroupId) {
691691
return await this.http.get(`/role-groups/${roleGroupId}/roles`);
692692
}
693693
/**
694694
* @param roleGroupId Role Group identifier
695695
* @param roleIdList List of role ID's to be assigned to the role group
696696
*/
697-
async assignRoles(roleGroupId, roleIdList) {
697+
async assignRolesToRoleGroup(roleGroupId, roleIdList) {
698698
return await this.http.post(`/role-groups/${roleGroupId}/roles`, roleIdList);
699699
}
700700
/**
701701
* @param roleGroupId Role Group identifier
702702
* @param roleIdList List of role ID's to be unassigned from the role group
703703
*/
704-
async unassignRoles(roleGroupId, roleIdList) {
704+
async unassignRolesFromRoleGroup(roleGroupId, roleIdList) {
705705
return await this.http.delete(`/role-groups/${roleGroupId}/roles`, roleIdList);
706706
}
707707
/**
@@ -713,7 +713,7 @@ var RoleGroupService = class extends HttpService {
713713
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
714714
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
715715
*/
716-
async getUsers(roleGroupId, queryParams) {
716+
async getRoleGroupUsers(roleGroupId, queryParams) {
717717
return await this.http.get(`/role-groups/${roleGroupId}/users${encodedQueryString(queryParams)}`);
718718
}
719719
};
@@ -750,20 +750,20 @@ var TenantAdministratorService = class extends HttpService {
750750
* @param tenantId Tenant identifier
751751
* @param invitationDetails Invitation details
752752
*/
753-
async invite(tenantId, invitationDetails) {
753+
async inviteTenantAdministrator(tenantId, invitationDetails) {
754754
return await this.http.post(`/tenants/${tenantId}/invite`, invitationDetails);
755755
}
756756
/**
757757
* @param tenantId Tenant identifier
758758
*/
759-
async getAll(tenantId) {
759+
async getTenantAdministrators(tenantId) {
760760
return await this.http.get(`/tenants/${tenantId}/administrators`);
761761
}
762762
/**
763763
* @param tenantId Tenant identifier
764764
* @param adminId Administrator identifier
765765
*/
766-
async remove(tenantId, adminId) {
766+
async removeTenantAdministrator(tenantId, adminId) {
767767
return await this.http.delete(`/tenants/${tenantId}/administrators/${adminId}`);
768768
}
769769
/**

dist/plusauth-rest-js.d.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3135,7 +3135,7 @@ declare class CustomDomainService extends HttpService {
31353135
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
31363136
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
31373137
*/
3138-
getAll(queryParams?: {
3138+
getCustomDomains(queryParams?: {
31393139
limit?: number;
31403140
offset?: number;
31413141
q?: string;
@@ -3145,19 +3145,19 @@ declare class CustomDomainService extends HttpService {
31453145
/**
31463146
* @param data Tenant Custom Domain object
31473147
*/
3148-
register(data: CreateTenantCustomDomain): Promise<TenantCustomDomain>;
3148+
registerCustomDomain(data: CreateTenantCustomDomain): Promise<TenantCustomDomain>;
31493149
/**
31503150
* @param domain Custom Domain specifier
31513151
*/
3152-
get(domain: string): Promise<TenantCustomDomain>;
3152+
getCustomDomain(domain: string): Promise<TenantCustomDomain>;
31533153
/**
31543154
* @param domain Custom Domain specifier
31553155
*/
3156-
remove(domain: string): Promise<void>;
3156+
removeCustomDomain(domain: string): Promise<void>;
31573157
/**
31583158
* @param domain Custom Domain specifier
31593159
*/
3160-
verifyOwnership(domain: string): Promise<Record<string, any>>;
3160+
verifyCustomDomainOwnership(domain: string): Promise<Record<string, any>>;
31613161
}
31623162

31633163
/**
@@ -6294,7 +6294,7 @@ declare class RoleGroupService extends HttpService {
62946294
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
62956295
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
62966296
*/
6297-
getAll(queryParams?: {
6297+
getRoleGroups(queryParams?: {
62986298
limit?: number;
62996299
offset?: number;
63006300
q?: string;
@@ -6304,34 +6304,34 @@ declare class RoleGroupService extends HttpService {
63046304
/**
63056305
* @param data Role Group object
63066306
*/
6307-
create(data: CreateRoleGroup): Promise<RoleGroup>;
6307+
createRoleGroup(data: CreateRoleGroup): Promise<RoleGroup>;
63086308
/**
63096309
* @param roleGroupId Role Group identifier
63106310
*/
6311-
get(roleGroupId: string): Promise<RoleGroup>;
6311+
getRoleGroup(roleGroupId: string): Promise<RoleGroup>;
63126312
/**
63136313
* @param roleGroupId Role Group identifier
63146314
* @param data Object containing to be updated values
63156315
*/
6316-
update(roleGroupId: string, data: UpdateRoleGroup): Promise<RoleGroup>;
6316+
updateRoleGroup(roleGroupId: string, data: UpdateRoleGroup): Promise<RoleGroup>;
63176317
/**
63186318
* @param roleGroupId Role Group identifier
63196319
*/
6320-
remove(roleGroupId: string): Promise<void>;
6320+
removeRoleGroup(roleGroupId: string): Promise<void>;
63216321
/**
63226322
* @param roleGroupId Role Group identifier
63236323
*/
6324-
getRoles(roleGroupId: string): Promise<Record<string, any>>;
6324+
getRoleGroupRoles(roleGroupId: string): Promise<Record<string, any>>;
63256325
/**
63266326
* @param roleGroupId Role Group identifier
63276327
* @param roleIdList List of role ID's to be assigned to the role group
63286328
*/
6329-
assignRoles(roleGroupId: string, roleIdList: string[]): Promise<void>;
6329+
assignRolesToRoleGroup(roleGroupId: string, roleIdList: string[]): Promise<void>;
63306330
/**
63316331
* @param roleGroupId Role Group identifier
63326332
* @param roleIdList List of role ID's to be unassigned from the role group
63336333
*/
6334-
unassignRoles(roleGroupId: string, roleIdList: string[]): Promise<void>;
6334+
unassignRolesFromRoleGroup(roleGroupId: string, roleIdList: string[]): Promise<void>;
63356335
/**
63366336
* @param roleGroupId Role Group identifier
63376337
* @param queryParams Query parameters
@@ -6341,7 +6341,7 @@ declare class RoleGroupService extends HttpService {
63416341
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
63426342
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
63436343
*/
6344-
getUsers(roleGroupId: string, queryParams?: {
6344+
getRoleGroupUsers(roleGroupId: string, queryParams?: {
63456345
limit?: number;
63466346
offset?: number;
63476347
q?: string;
@@ -7701,19 +7701,19 @@ declare class TenantAdministratorService extends HttpService {
77017701
* @param tenantId Tenant identifier
77027702
* @param invitationDetails Invitation details
77037703
*/
7704-
invite(tenantId: string, invitationDetails: {
7704+
inviteTenantAdministrator(tenantId: string, invitationDetails: {
77057705
email: string;
77067706
permissions?: string[];
77077707
}): Promise<void>;
77087708
/**
77097709
* @param tenantId Tenant identifier
77107710
*/
7711-
getAll(tenantId: string): Promise<TenantAdministrator[]>;
7711+
getTenantAdministrators(tenantId: string): Promise<TenantAdministrator[]>;
77127712
/**
77137713
* @param tenantId Tenant identifier
77147714
* @param adminId Administrator identifier
77157715
*/
7716-
remove(tenantId: string, adminId: string): Promise<void>;
7716+
removeTenantAdministrator(tenantId: string, adminId: string): Promise<void>;
77177717
/**
77187718
* @param tenantId Tenant identifier
77197719
* @param adminId Administrator identifier

dist/plusauth-rest-js.global.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/plusauth-rest-js.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -221,31 +221,31 @@ var CustomDomainService = class extends HttpService {
221221
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
222222
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
223223
*/
224-
async getAll(queryParams) {
224+
async getCustomDomains(queryParams) {
225225
return await this.http.get(`/custom-domain/${encodedQueryString(queryParams)}`);
226226
}
227227
/**
228228
* @param data Tenant Custom Domain object
229229
*/
230-
async register(data) {
230+
async registerCustomDomain(data) {
231231
return await this.http.post(`/custom-domain/`, data);
232232
}
233233
/**
234234
* @param domain Custom Domain specifier
235235
*/
236-
async get(domain) {
236+
async getCustomDomain(domain) {
237237
return await this.http.get(`/custom-domain/$${domain}`);
238238
}
239239
/**
240240
* @param domain Custom Domain specifier
241241
*/
242-
async remove(domain) {
242+
async removeCustomDomain(domain) {
243243
return await this.http.delete(`/custom-domain/$${domain}`);
244244
}
245245
/**
246246
* @param domain Custom Domain specifier
247247
*/
248-
async verifyOwnership(domain) {
248+
async verifyCustomDomainOwnership(domain) {
249249
return await this.http.get(`/custom-domain/$${domain}/verify`);
250250
}
251251
};
@@ -618,52 +618,52 @@ var RoleGroupService = class extends HttpService {
618618
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
619619
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
620620
*/
621-
async getAll(queryParams) {
621+
async getRoleGroups(queryParams) {
622622
return await this.http.get(`/role-groups/${encodedQueryString(queryParams)}`);
623623
}
624624
/**
625625
* @param data Role Group object
626626
*/
627-
async create(data) {
627+
async createRoleGroup(data) {
628628
return await this.http.post(`/role-groups/`, data);
629629
}
630630
/**
631631
* @param roleGroupId Role Group identifier
632632
*/
633-
async get(roleGroupId) {
633+
async getRoleGroup(roleGroupId) {
634634
return await this.http.get(`/role-groups/${roleGroupId}`);
635635
}
636636
/**
637637
* @param roleGroupId Role Group identifier
638638
* @param data Object containing to be updated values
639639
*/
640-
async update(roleGroupId, data) {
640+
async updateRoleGroup(roleGroupId, data) {
641641
return await this.http.patch(`/role-groups/${roleGroupId}`, data);
642642
}
643643
/**
644644
* @param roleGroupId Role Group identifier
645645
*/
646-
async remove(roleGroupId) {
646+
async removeRoleGroup(roleGroupId) {
647647
return await this.http.delete(`/role-groups/${roleGroupId}`);
648648
}
649649
/**
650650
* @param roleGroupId Role Group identifier
651651
*/
652-
async getRoles(roleGroupId) {
652+
async getRoleGroupRoles(roleGroupId) {
653653
return await this.http.get(`/role-groups/${roleGroupId}/roles`);
654654
}
655655
/**
656656
* @param roleGroupId Role Group identifier
657657
* @param roleIdList List of role ID's to be assigned to the role group
658658
*/
659-
async assignRoles(roleGroupId, roleIdList) {
659+
async assignRolesToRoleGroup(roleGroupId, roleIdList) {
660660
return await this.http.post(`/role-groups/${roleGroupId}/roles`, roleIdList);
661661
}
662662
/**
663663
* @param roleGroupId Role Group identifier
664664
* @param roleIdList List of role ID's to be unassigned from the role group
665665
*/
666-
async unassignRoles(roleGroupId, roleIdList) {
666+
async unassignRolesFromRoleGroup(roleGroupId, roleIdList) {
667667
return await this.http.delete(`/role-groups/${roleGroupId}/roles`, roleIdList);
668668
}
669669
/**
@@ -675,7 +675,7 @@ var RoleGroupService = class extends HttpService {
675675
* @param queryParams.sort_by Properties that should be ordered by, with their ordering type. To define order type append it to the field with dot. You can pass this parameter multiple times or you can include all values separated by commas.
676676
* @param queryParams.fields Include only defined fields. You can pass this parameter multiple times or you can include all values separated by commas.
677677
*/
678-
async getUsers(roleGroupId, queryParams) {
678+
async getRoleGroupUsers(roleGroupId, queryParams) {
679679
return await this.http.get(`/role-groups/${roleGroupId}/users${encodedQueryString(queryParams)}`);
680680
}
681681
};
@@ -712,20 +712,20 @@ var TenantAdministratorService = class extends HttpService {
712712
* @param tenantId Tenant identifier
713713
* @param invitationDetails Invitation details
714714
*/
715-
async invite(tenantId, invitationDetails) {
715+
async inviteTenantAdministrator(tenantId, invitationDetails) {
716716
return await this.http.post(`/tenants/${tenantId}/invite`, invitationDetails);
717717
}
718718
/**
719719
* @param tenantId Tenant identifier
720720
*/
721-
async getAll(tenantId) {
721+
async getTenantAdministrators(tenantId) {
722722
return await this.http.get(`/tenants/${tenantId}/administrators`);
723723
}
724724
/**
725725
* @param tenantId Tenant identifier
726726
* @param adminId Administrator identifier
727727
*/
728-
async remove(tenantId, adminId) {
728+
async removeTenantAdministrator(tenantId, adminId) {
729729
return await this.http.delete(`/tenants/${tenantId}/administrators/${adminId}`);
730730
}
731731
/**

0 commit comments

Comments
 (0)