Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release(v0.3.0): with conditions support #43

Merged
merged 4 commits into from
Dec 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading