Skip to content

Commit

Permalink
fix permit context error
Browse files Browse the repository at this point in the history
  • Loading branch information
asafc committed May 14, 2023
1 parent cde2eb0 commit 7a247f4
Show file tree
Hide file tree
Showing 13 changed files with 122 additions and 122 deletions.
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 @@ -26,7 +26,7 @@ interface IConditionSetRulesApi {
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError;

Expand All @@ -40,7 +40,7 @@ interface IConditionSetRulesApi {
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError;

Expand All @@ -53,7 +53,7 @@ interface IConditionSetRulesApi {
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError;

Expand All @@ -64,7 +64,7 @@ interface IConditionSetRulesApi {
* @return The created {@link ConditionSetRuleRead} object.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError;

Expand All @@ -74,7 +74,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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError;
}
Expand Down Expand Up @@ -123,7 +123,7 @@ private String getConditionSetRulesUrl(String url) {
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page, int perPage) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand Down Expand Up @@ -166,7 +166,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey, int page) throws IOException, PermitApiError, PermitContextError {
return this.list(userSetKey, permissionKey, resourceSetKey, page, 100);
Expand All @@ -182,7 +182,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @return An array of {@link ConditionSetRuleRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, String resourceSetKey) throws IOException, PermitApiError, PermitContextError {
return this.list(userSetKey, permissionKey, resourceSetKey, 1);
Expand All @@ -195,7 +195,7 @@ public ConditionSetRuleRead[] list(String userSetKey, String permissionKey, Stri
* @return The created {@link ConditionSetRuleRead} object.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRuleRead create(ConditionSetRuleCreate rule) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand All @@ -217,7 +217,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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public void delete(ConditionSetRuleRemove rule) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
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 @@ -63,7 +63,7 @@ private String getConditionSetsUrl(String url) {
* @return An array of {@link ConditionSetRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead[] list(int page, int perPage) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand Down Expand Up @@ -93,7 +93,7 @@ public ConditionSetRead[] list(int page, int perPage) throws IOException, Permit
* @return An array of {@link ConditionSetRead} objects.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead[] list(int page) throws IOException, PermitApiError, PermitContextError {
return this.list(page, 100);
Expand All @@ -105,7 +105,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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead[] list() throws IOException, PermitApiError, PermitContextError {
return this.list(1);
Expand All @@ -118,7 +118,7 @@ public ConditionSetRead[] list() throws IOException, PermitApiError, PermitConte
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead get(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand All @@ -139,7 +139,7 @@ public ConditionSetRead get(String conditionSetKey) throws IOException, PermitAp
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead getByKey(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
return this.get(conditionSetKey);
Expand All @@ -152,7 +152,7 @@ public ConditionSetRead getByKey(String conditionSetKey) throws IOException, Per
* @return The {@link ConditionSetRead} object representing the condition set.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitApiError, PermitContextError {
return this.get(conditionSetId.toString());
Expand All @@ -165,7 +165,7 @@ public ConditionSetRead getById(UUID conditionSetId) throws IOException, PermitA
* @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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand All @@ -189,7 +189,7 @@ public ConditionSetRead create(ConditionSetCreate conditionSetData) throws IOExc
* @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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public ConditionSetRead update(String conditionSetKey, ConditionSetUpdate conditionSetData) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand All @@ -211,7 +211,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 the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public void delete(String conditionSetKey) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
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 @@ -31,7 +31,7 @@ public ElementsApi(OkHttpClient client, PermitConfig config) {
* @return The embedded login authentication session data.
* @throws IOException If an I/O error occurs while sending the request.
* @throws PermitApiError If the Permit API returns a response with an error status code.
* @throws PermitContextError If the Permit context is not properly configured.
* @throws PermitContextError If the configured {@link io.permit.sdk.PermitContext} does not match the required endpoint context.
*/
public EmbeddedLoginRequestOutput loginAs(String userKey, String tenantKey) throws IOException, PermitApiError, PermitContextError {
ensureContext(ApiKeyLevel.ENVIRONMENT_LEVEL_API_KEY);
Expand Down
Loading

0 comments on commit 7a247f4

Please sign in to comment.