Skip to content

Commit

Permalink
fix permit api error
Browse files Browse the repository at this point in the history
  • Loading branch information
asafc committed May 14, 2023
1 parent 5174910 commit cde2eb0
Show file tree
Hide file tree
Showing 14 changed files with 129 additions and 129 deletions.
2 changes: 1 addition & 1 deletion src/main/java/io/permit/sdk/api/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void deleteUser(String userKey) throws IOException, PermitContextError, P

/**
* Creates a new tenant.
* @throws PermitApiError if a tenant already exists with the given key.
* @throws PermitApiError If the Permit API returns a response with an error status code.
*
* @deprecated replaced with permit.api.tenants.create()
* @see io.permit.sdk.api.TenantsApi#create(TenantCreate)
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/io/permit/sdk/api/ConditionSetRulesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface IConditionSetRulesApi {
* @param perPage The number of items per page.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError;
Expand All @@ -39,7 +39,7 @@ interface IConditionSetRulesApi {
* @param page The page number.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError;
Expand All @@ -52,7 +52,7 @@ interface IConditionSetRulesApi {
* @param resourceSetKey The resource set key.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError;
Expand All @@ -63,7 +63,7 @@ interface IConditionSetRulesApi {
* @param rule The condition set rule to create.
* @return The created {@link ConditionSetRuleRead} object.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError;
Expand All @@ -73,7 +73,7 @@ interface IConditionSetRulesApi {
*
* @param rule The condition set rule to delete.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError;
Expand Down Expand Up @@ -122,7 +122,7 @@ private String getConditionSetRulesUrl(String url) {
* @param perPage The number of items per page.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError {
Expand Down Expand Up @@ -165,7 +165,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @param page The page number.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -181,7 +181,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @param resourceSetKey The resource set key.
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -194,7 +194,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @param rule The condition set rule to create.
* @return The created {@link ConditionSetRuleRead} object.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -216,7 +216,7 @@ public ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOExcepti
*
* @param rule The condition set rule to delete.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError {
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/io/permit/sdk/api/ConditionSetsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private String getConditionSetsUrl(String url) {
* @param perPage The number of items per page.
* @return An array of {@link ConditionSetRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError {
Expand Down Expand Up @@ -92,7 +92,7 @@ public ConditionSetRead[] list(int page, int perPage) throws IOException, Permit
* @param page The page number.
* @return An array of {@link ConditionSetRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead[] list(int page) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -104,7 +104,7 @@ public ConditionSetRead[] list(int page) throws IOException, PermitApiError, Per
*
* @return An array of {@link ConditionSetRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead[] list() throws IOException, PermitApiError, PermitContextError {
Expand All @@ -117,7 +117,7 @@ public ConditionSetRead[] list() throws IOException, PermitApiError, PermitConte
* @param conditionSetKey The key of the condition set.
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead get(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -138,7 +138,7 @@ public ConditionSetRead get(String conditionSetKey) throws IOException, PermitAp
* @param conditionSetKey The key of the condition set.
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead getByKey(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -151,7 +151,7 @@ public ConditionSetRead getByKey(String conditionSetKey) throws IOException, Per
* @param conditionSetId The ID of the condition set.
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -164,7 +164,7 @@ public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitA
* @param conditionSetData The data for creating the condition set.
* @return The {@link ConditionSetRead} object representing the created condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -188,7 +188,7 @@ public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOExc
* @param conditionSetData The updated data for the condition set.
* @return The {@link ConditionSetRead} object representing the updated condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public ConditionSetRead update(String conditionSetKey, ConditionSetUpdate conditionSetData) throws IOException, PermitApiError, PermitContextError {
Expand All @@ -210,7 +210,7 @@ public ConditionSetRead update(String conditionSetKey, ConditionSetUpdate condit
*
* @param conditionSetKey The key of the condition set to delete.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public void delete(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/io/permit/sdk/api/ElementsApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public ElementsApi(OkHttpClient client, PermitConfig config) {
* @param tenantKey The key of the active tenant for the logged in user.
* @return The embedded login authentication session data.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If an error occurs in the Permit API.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
*/
public EmbeddedLoginRequestOutput loginAs(String userKey, String tenantKey) throws IOException, PermitApiError, PermitContextError {
Expand Down
Loading

0 comments on commit cde2eb0

Please sign in to comment.