Skip to content

Commit

Permalink
release(v0.3.0): with conditions support
Browse files Browse the repository at this point in the history
  • Loading branch information
rhamzeh committed Dec 11, 2023
1 parent aaf11c4 commit b2686fe
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
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
4 changes: 2 additions & 2 deletions configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const DEFAULT_MAX_RETRY = 15;
// default minimum wait period in retry - but will backoff exponentially
const DEFAULT_MIN_WAIT_MS = 100;

const DEFAULT_USER_AGENT = "openfga-sdk js/0.2.10";
const DEFAULT_USER_AGENT = "openfga-sdk js/0.3.0";

export interface RetryParams {
maxRetry?: number;
Expand Down Expand Up @@ -67,7 +67,7 @@ export class Configuration {
* @type {string}
* @memberof Configuration
*/
private static sdkVersion = "0.2.10";
private static sdkVersion = "0.3.0";

/**
* provide scheme (e.g. `https`)
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfga/sdk",
"version": "0.2.10",
"version": "0.3.0",
"description": "JavaScript and Node.js SDK for OpenFGA",
"author": "OpenFGA",
"keywords": [
Expand Down

0 comments on commit b2686fe

Please sign in to comment.