Skip to content

Commit

Permalink
docs(en): adding addStatement documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
roggervalf committed Dec 5, 2020
1 parent f9681e6 commit 0fca966
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
3 changes: 3 additions & 0 deletions dist/main.d.ts
Expand Up @@ -210,6 +210,7 @@ declare class ActionBasedPolicy<T extends object> extends Policy<T, ActionBasedT
private allowStatements;
private statements;
constructor({ statements, conditionResolver, context }: ActionBasedPolicyInterface<T>);
addStatement(this: ActionBasedPolicy<T>, statement: ActionBasedType): void;
getStatements(this: ActionBasedPolicy<T>): ActionBasedType[];
evaluate(this: ActionBasedPolicy<T>, { action, context }: EvaluateActionBasedInterface<T>): boolean;
can(this: ActionBasedPolicy<T>, { action, context }: EvaluateActionBasedInterface<T>): boolean;
Expand All @@ -227,6 +228,7 @@ declare class IdentityBasedPolicy<T extends object> extends Policy<T, IdentityBa
private allowStatements;
private statements;
constructor({ statements, conditionResolver, context }: IdentityBasedPolicyInterface<T>);
addStatement(this: IdentityBasedPolicy<T>, statement: IdentityBasedType): void;
getStatements(this: IdentityBasedPolicy<T>): IdentityBasedType[];
evaluate(this: IdentityBasedPolicy<T>, { action, resource, context }: EvaluateIdentityBasedInterface<T>): boolean;
can(this: IdentityBasedPolicy<T>, { action, resource, context }: EvaluateIdentityBasedInterface<T>): boolean;
Expand All @@ -243,6 +245,7 @@ declare class ResourceBasedPolicy<T extends object> extends Policy<T, ResourceBa
private allowStatements;
private statements;
constructor({ statements, conditionResolver, context }: ResourceBasedPolicyInterface<T>);
addStatement(this: ResourceBasedPolicy<T>, statement: ResourceBasedType): void;
getStatements(this: ResourceBasedPolicy<T>): ResourceBasedType[];
evaluate(this: ResourceBasedPolicy<T>, { principal, action, resource, principalType, context }: EvaluateResourceBasedInterface<T>): boolean;
can(this: ResourceBasedPolicy<T>, { principal, action, resource, principalType, context }: EvaluateResourceBasedInterface<T>): boolean;
Expand Down
30 changes: 30 additions & 0 deletions dist/main.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main.es.js.map

Large diffs are not rendered by default.

30 changes: 30 additions & 0 deletions dist/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/main.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions www/src/docs/en.md
Expand Up @@ -422,6 +422,10 @@ const actionBasedPolicy = new ActionBasedPolicy({

### Methods

#### actionBasedPolicy.addStatement(statement)

_public_: Add a new `statement` to this Policy.

#### actionBasedPolicy.getStatements()

_public_: Returns `statements[]` (statements array).
Expand Down Expand Up @@ -525,6 +529,10 @@ const identityBasedPolicy = new IdentityBasedPolicy({

### Methods

#### identityBasedPolicy.addStatement(statement)

_public_: Add a new `statement` to this Policy.

#### identityBasedPolicy.getStatements()

_public_: Returns `statements[]` (statements array).
Expand Down Expand Up @@ -617,6 +625,10 @@ const resourceBasedPolicy = new ResourceBasedPolicy({

### Methods

#### resourceBasedPolicy.addStatement(statement)

_public_: Add a new `statement` to this Policy.

#### resourceBasedPolicy.getStatements()

_public_: Returns `statements[]` (statements array).
Expand Down

0 comments on commit 0fca966

Please sign in to comment.