From 7d42e75ae48ba801246ef0e5cd808fc4967c83e7 Mon Sep 17 00:00:00 2001 From: Raghd Hamzeh Date: Mon, 29 Apr 2024 22:09:53 -0400 Subject: [PATCH] release: v0.4.0 with ListUsers support --- .github/dependabot.yaml | 4 ++-- CHANGELOG.md | 11 +++++++++++ README.md | 8 ++++---- configuration.ts | 4 ++-- example/README.md | 2 +- example/example1/package.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 8 files changed, 24 insertions(+), 13 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index c27eabb..7ce60d7 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -8,8 +8,6 @@ updates: dependencies: patterns: - "*" - exclude-patterns: - - "eslint" - package-ecosystem: "github-actions" directory: "/" schedule: @@ -18,3 +16,5 @@ updates: dependencies: patterns: - "*" + exclude-patterns: + - "eslint" diff --git a/CHANGELOG.md b/CHANGELOG.md index 2000866..8c61725 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Changelog +## v0.4.0 + +### [0.4.0](https://github.com/openfga/js-sdk/compare/v0.3.5...v0.4.0) (2024-04-30) + +- feat: support the [ListUsers](https://github.com/openfga/rfcs/blob/main/20231214-listUsers-api.md) endpoint (#97) +- feat!: support overriding storeId per request (#97) + `OpenFgaClient` now supports specifying the storeId in the options to override it per request + + [BREAKING CHANGE] the underlying `OpenFgaApi` now expects `storeId` as the first param on relevant methods, + if you are still using this class, make sure you update your references when needed. + ## v0.3.5 ### [0.3.5](https://github.com/openfga/js-sdk/compare/v0.3.4...v0.3.5) (2024-03-19) diff --git a/README.md b/README.md index 7ceabd1..edd4075 100644 --- a/README.md +++ b/README.md @@ -463,7 +463,7 @@ const { responses } = await fgaClient.batchCheck([{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "viewer", object: "document:roadmap", - contextualTuples: [{ + contextual_tuples: [{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "writer", object: "document:roadmap" @@ -492,7 +492,7 @@ responses = [{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "viewer", object: "document:roadmap", - contextualTuples: [{ + contextual_tuples: [{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "writer", object: "document:roadmap" @@ -538,7 +538,7 @@ const response = await fgaClient.listObjects({ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "viewer", type: "document", - contextualTuples: [{ + contextual_tuples: [{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "writer", object: "document:budget" @@ -564,7 +564,7 @@ const response = await fgaClient.listRelations({ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", object: "document:roadmap", relations: ["can_view", "can_edit", "can_delete"], - contextualTuples: [{ + contextual_tuples: [{ user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b", relation: "writer", object: "document:roadmap" diff --git a/configuration.ts b/configuration.ts index 2749b94..af5e3b6 100644 --- a/configuration.ts +++ b/configuration.ts @@ -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.3.5"; +const DEFAULT_USER_AGENT = "openfga-sdk js/0.4.0"; export interface RetryParams { maxRetry?: number; @@ -73,7 +73,7 @@ export class Configuration { * @type {string} * @memberof Configuration */ - private static sdkVersion = "0.3.5"; + private static sdkVersion = "0.4.0"; /** * provide the full api URL (e.g. `https://api.fga.example`) diff --git a/example/README.md b/example/README.md index 924be45..829bf65 100644 --- a/example/README.md +++ b/example/README.md @@ -28,7 +28,7 @@ Steps 2. In the Example `package.json` change the `@openfga/sdk` dependency from a semver range like below ```json "dependencies": { - "@openfga/sdk": "^0.3.5" + "@openfga/sdk": "^0.4.0" } ``` to a `file:` reference like below diff --git a/example/example1/package.json b/example/example1/package.json index 1f36dd5..4c75681 100644 --- a/example/example1/package.json +++ b/example/example1/package.json @@ -9,7 +9,7 @@ "start": "node example1.mjs" }, "dependencies": { - "@openfga/sdk": "^0.3.5" + "@openfga/sdk": "^0.4.0" }, "engines": { "node": ">=16.13.0" diff --git a/package-lock.json b/package-lock.json index 4f39bba..fe395c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@openfga/sdk", - "version": "0.3.5", + "version": "0.4.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@openfga/sdk", - "version": "0.3.5", + "version": "0.4.0", "license": "Apache-2.0", "dependencies": { "axios": "^1.6.8", diff --git a/package.json b/package.json index 365d3c4..14e3e66 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@openfga/sdk", - "version": "0.3.5", + "version": "0.4.0", "description": "JavaScript and Node.js SDK for OpenFGA", "author": "OpenFGA", "keywords": [