Skip to content

Commit

Permalink
Merge pull request #9 from permitio/asaf/per-5415-java-sdk-add-missin…
Browse files Browse the repository at this point in the history
…g-functionality

Added missing APIs
  • Loading branch information
asafc committed May 14, 2023
2 parents 983f46e + 40e72f6 commit ae3effd
Show file tree
Hide file tree
Showing 58 changed files with 3,631 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ For [Maven](https://maven.apache.org/) projects, use:
<dependency>
<groupId>io.permit</groupId>
<artifactId>permit-sdk-java</artifactId>
<version>1.2.0</version>
<version>1.3.0</version>
</dependency>
```

Expand All @@ -22,7 +22,7 @@ For [Gradle](https://gradle.org/) projects, configure `permit-sdk-java` as a dep
dependencies {
// ...
implementation 'io.permit:permit-sdk-java:1.2.0'
implementation 'io.permit:permit-sdk-java:1.3.0'
}
```

Expand Down
7 changes: 7 additions & 0 deletions schemas/actionblockeditable.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
"title": "Description",
"type": "string",
"description": "optional description string explaining what this action represents in your system"
},
"attributes": {
"title": "Attributes",
"type": "object",
"description": "Arbitrary action attributes that can be used for filtering or enforcement of attribute-based access control policies.",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
}
},
"additionalProperties": false,
Expand Down
7 changes: 7 additions & 0 deletions schemas/actionblockread.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
"type": "string",
"description": "optional description string explaining what this action represents in your system"
},
"attributes": {
"title": "Attributes",
"type": "object",
"description": "Arbitrary action attributes that can be used for filtering or enforcement of attribute-based access control policies.",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
},
"id": {
"title": "Id",
"type": "string",
Expand Down
13 changes: 13 additions & 0 deletions schemas/bulkroleassignmentreport.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "BulkRoleAssignmentReport",
"type": "object",
"properties": {
"assignments_created": {
"title": "Assignments Created",
"type": "integer",
"default": 0
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
13 changes: 13 additions & 0 deletions schemas/bulkroleunassignmentreport.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"title": "BulkRoleUnAssignmentReport",
"type": "object",
"properties": {
"assignments_removed": {
"title": "Assignments Removed",
"type": "integer",
"default": 0
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
5 changes: 5 additions & 0 deletions schemas/conditionsetcreate.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"description": "a boolean expression that consists of multiple conditions, with and/or logic.",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
},
"parent_id": {
"title": "Parent Id",
"type": "string",
"description": "Parent Condition Set"
}
},
"additionalProperties": false,
Expand Down
5 changes: 5 additions & 0 deletions schemas/conditionsetread.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@
"description": "a boolean expression that consists of multiple conditions, with and/or logic.",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
},
"parent_id": {
"title": "Parent Id",
"type": "string",
"description": "Parent Condition Set"
}
},
"additionalProperties": false,
Expand Down
5 changes: 5 additions & 0 deletions schemas/conditionsetupdate.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"description": "a boolean expression that consists of multiple conditions, with and/or logic.",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
},
"parent_id": {
"title": "Parent Id",
"type": "string",
"description": "Parent Condition Set"
}
},
"additionalProperties": false,
Expand Down
49 changes: 49 additions & 0 deletions schemas/environmentcopy.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"title": "EnvironmentCopy",
"required": [
"target_env"
],
"type": "object",
"properties": {
"target_env": {
"title": "Target Env",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyTarget",
"description": "If copying a new environment, the environment configuration. If copying to an existing environment, the environment identifier"
},
"conflict_strategy": {
"title": "Conflict Strategy",
"enum": [
"fail",
"overwrite"
],
"type": "string",
"description": "Action to take when detecting a conflict when copying. Only applies to copying into an existing environment",
"default": "fail"
},
"scope": {
"title": "Scope",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyScope",
"description": "Filters to include and exclude copied objects",
"default": {
"resources": {
"include": [],
"exclude": []
},
"roles": {
"include": [],
"exclude": []
},
"user_sets": {
"include": [],
"exclude": []
},
"resource_sets": {
"include": [],
"exclude": []
}
}
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
44 changes: 44 additions & 0 deletions schemas/environmentcopyscope.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"title": "EnvironmentCopyScope",
"type": "object",
"properties": {
"resources": {
"title": "Resources",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyScopeFilters",
"description": "Resources to copy",
"default": {
"include": [],
"exclude": []
}
},
"roles": {
"title": "Roles",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyScopeFilters",
"description": "Roles to copy",
"default": {
"include": [],
"exclude": []
}
},
"user_sets": {
"title": "User Sets",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyScopeFilters",
"description": "User sets to copy",
"default": {
"include": [],
"exclude": []
}
},
"resource_sets": {
"title": "Resource Sets",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCopyScopeFilters",
"description": "Resource sets to copy",
"default": {
"include": [],
"exclude": []
}
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
26 changes: 26 additions & 0 deletions schemas/environmentcopyscopefilters.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"title": "EnvironmentCopyScopeFilters",
"type": "object",
"properties": {
"include": {
"title": "Include",
"type": "array",
"items": {
"type": "string"
},
"description": "Objects to include (use * as wildcard)",
"default": []
},
"exclude": {
"title": "Exclude",
"type": "array",
"items": {
"type": "string"
},
"description": "Object to exclude (use * as wildcard)",
"default": []
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
18 changes: 18 additions & 0 deletions schemas/environmentcopytarget.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"title": "EnvironmentCopyTarget",
"type": "object",
"properties": {
"existing": {
"title": "Existing",
"type": "string",
"description": "Identifier of an existing environment to copy into"
},
"new": {
"title": "New",
"existingJavaType": "io.permit.sdk.openapi.models.EnvironmentCreate",
"description": "Description of the environment to create. This environment must not already exist."
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
7 changes: 7 additions & 0 deletions schemas/resourceactioncreate.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
"title": "Description",
"type": "string",
"description": "An optional longer description of what this action respresents in your system"
},
"attributes": {
"title": "Attributes",
"type": "object",
"description": "optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action. This metadata can be used to filter actions using query parameters with attr_ prefix",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
}
},
"additionalProperties": false,
Expand Down
43 changes: 43 additions & 0 deletions schemas/resourceactiongroupcreate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"title": "ResourceActionGroupCreate",
"required": [
"key",
"name"
],
"type": "object",
"properties": {
"key": {
"title": "Key",
"pattern": "^[A-Za-z0-9\\-_]+$",
"type": "string",
"description": "A URL-friendly name of the action group (i.e: slug). You will be able to query later using this key instead of the id (UUID) of the action group."
},
"name": {
"title": "Name",
"type": "string",
"description": "The name of the action group"
},
"description": {
"title": "Description",
"type": "string",
"description": "An optional longer description of what this action group represents in your system"
},
"attributes": {
"title": "Attributes",
"type": "object",
"description": "optional dictionary of key-value pairs that can be used to store arbitrary metadata about this action group. This metadata can be used to filter action groups using query parameters with attr_ prefix",
"default": {},
"existingJavaType": "java.util.HashMap<String, Object>"
},
"actions": {
"title": "Actions",
"type": "array",
"items": {
"type": "string"
},
"default": []
}
},
"additionalProperties": false,
"$schema": "http://json-schema.org/schema#"
}
Loading

0 comments on commit ae3effd

Please sign in to comment.