Skip to content

Commit

Permalink
release(v0.3.0): with conditions support (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
adriantam authored Dec 11, 2023
2 parents 7376d04 + 312bdf1 commit 44c13d4
Show file tree
Hide file tree
Showing 11 changed files with 540 additions and 503 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml → .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: 2
updates:
- package-ecosystem: "gomod"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '18'
node-version: '20'
cache: 'npm'

- name: Install dependencies
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
- name: Set up node
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4.0.0
with:
node-version: '18'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
scope: '@openfga'
always-auth: false
Expand Down
1 change: 1 addition & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.github/CODEOWNERS
.github/ISSUE_TEMPLATE/bug_report.md
.github/ISSUE_TEMPLATE/feature_request.md
.github/dependabot.yaml
.github/workflows/main.yaml
.github/workflows/semgrep.yaml
.gitignore
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

## v0.3.0

### [0.3.0](https://github.com/openfga/js-sdk/compare/v0.2.10...v0.3.0) (2023-11-01)
### [0.3.0](https://github.com/openfga/js-sdk/compare/v0.2.10...v0.3.0) (2023-12-11)

- feat!: support for conditions
- feat: support for conditions
- chore: use latest API interfaces
- chore: dependency updates

## v0.2.10

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ The documentation below refers to the `OpenFgaClient`, to read the documentation
const { OpenFgaClient } = require('@openfga/sdk'); // OR import { OpenFgaClient } from '@openfga/sdk';

const fgaClient = new OpenFgaClient({
apiScheme: OPENFGA_API_SCHEME, // optional, defaults to "https"
apiHost: OPENFGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: OPENFGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: OPENFGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
apiScheme: process.env.FGA_API_SCHEME, // optional, defaults to "https"
apiHost: process.env.FGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: process.env.FGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: process.env.FGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
});
```

Expand All @@ -107,14 +107,14 @@ const fgaClient = new OpenFgaClient({
const { OpenFgaClient } = require('@openfga/sdk'); // OR import { OpenFgaClient } from '@openfga/sdk';

const fgaClient = new OpenFgaClient({
apiScheme: OPENFGA_API_SCHEME, // optional, defaults to "https"
apiHost: OPENFGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: OPENFGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: OPENFGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
apiScheme: process.env.FGA_API_SCHEME, // optional, defaults to "https"
apiHost: process.env.FGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: process.env.FGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: process.env.FGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
credentials: {
method: CredentialsMethod.ApiToken,
config: {
token: OPENFGA_API_TOKEN, // will be passed as the "Authorization: Bearer ${ApiToken}" request header
token: process.env.FGA_API_TOKEN, // will be passed as the "Authorization: Bearer ${ApiToken}" request header
}
}
});
Expand All @@ -126,17 +126,17 @@ const fgaClient = new OpenFgaClient({
const { OpenFgaClient } = require('@openfga/sdk'); // OR import { OpenFgaClient } from '@openfga/sdk';

const fgaClient = new OpenFgaClient({
apiScheme: OPENFGA_API_SCHEME, // optional, defaults to "https"
apiHost: OPENFGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: OPENFGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: OPENFGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
apiScheme: process.env.FGA_API_SCHEME, // optional, defaults to "https"
apiHost: process.env.FGA_API_HOST, // required, define without the scheme (e.g. api.fga.example instead of https://api.fga.example)
storeId: process.env.FGA_STORE_ID, // not needed when calling `CreateStore` or `ListStores`
authorizationModelId: process.env.FGA_AUTHORIZATION_MODEL_ID, // Optional, can be overridden per request
credentials: {
method: CredentialsMethod.ClientCredentials,
config: {
apiTokenIssuer: OPENFGA_API_TOKEN_ISSUER,
apiAudience: OPENFGA_API_AUDIENCE,
clientId: OPENFGA_CLIENT_ID,
clientSecret: OPENFGA_CLIENT_SECRET,
apiTokenIssuer: process.env.FGA_API_TOKEN_ISSUER,
apiAudience: process.env.FGA_API_AUDIENCE,
clientId: process.env.FGA_CLIENT_ID,
clientSecret: process.env.FGA_CLIENT_SECRET,
}
}
});
Expand Down
Loading

0 comments on commit 44c13d4

Please sign in to comment.