Skip to content

Commit

Permalink
release(v0.2.10): with dependency upgrades (#38)
Browse files Browse the repository at this point in the history
rhamzeh authored Nov 1, 2023
2 parents 444fa78 + 7984193 commit 8725ba2
Showing 8 changed files with 363 additions and 256 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -18,10 +18,12 @@ jobs:
node-version: [14.x, 16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up node
uses: actions/setup-node@v4
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
@@ -39,10 +41,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up node
uses: actions/setup-node@v4
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: '18'
cache: 'npm'
@@ -68,10 +72,12 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Set up node
uses: actions/setup-node@v4
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
@@ -95,9 +101,11 @@ jobs:
contents: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- uses: Roang-zero1/github-create-release-action@57eb9bdce7a964e48788b9e78b5ac766cb684803
- uses: Roang-zero1/github-create-release-action@5cf058ddffa6fa04e5cda07c98570c757dc4a0e1 # v3.0.1
with:
version_regex: ^v[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+
env:
4 changes: 3 additions & 1 deletion .github/workflows/semgrep.yaml
Original file line number Diff line number Diff line change
@@ -11,7 +11,9 @@ jobs:
image: returntocorp/semgrep
if: (github.actor != 'dependabot[bot]' && github.actor != 'snyk-bot')
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.2
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0
- run: semgrep ci
env:
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## v0.2.10

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

- chore(deps): update dependencies
updates axios to `^1.6.0` to resolve [SNYK-JS-AXIOS-6032459](https://security.snyk.io/vuln/SNYK-JS-AXIOS-6032459)

## v0.2.9

### [0.2.9](https://github.com/openfga/js-sdk/compare/v0.2.8...v0.2.9) (2023-10-20)
8 changes: 4 additions & 4 deletions api.ts
Original file line number Diff line number Diff line change
@@ -268,7 +268,7 @@ export const OpenFgaApiAxiosParamCreator = function (configuration: Configuratio
};
},
/**
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first. The objects given will not be sorted, and therefore two identical calls can give a given different set of objects.
* @summary List all objects of the given type that the user has a relation with
* @param {ListObjectsRequest} body
* @param {*} [options] Override http request option.
@@ -725,7 +725,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials);
},
/**
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first. The objects given will not be sorted, and therefore two identical calls can give a given different set of objects.
* @summary List all objects of the given type that the user has a relation with
* @param {ListObjectsRequest} body
* @param {*} [options] Override http request option.
@@ -898,7 +898,7 @@ export const OpenFgaApiFactory = function (configuration: Configuration, credent
return localVarFp.getStore(options).then((request) => request(axios));
},
/**
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first. The objects given will not be sorted, and therefore two identical calls can give a given different set of objects.
* @summary List all objects of the given type that the user has a relation with
* @param {ListObjectsRequest} body
* @param {*} [options] Override http request option.
@@ -1071,7 +1071,7 @@ export class OpenFgaApi extends BaseAPI {
}

/**
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first.
* The ListObjects API returns a list of all the objects of the given type that the user has a relation with. To achieve this, both the store tuples and the authorization model are used. An `authorization_model_id` may be specified in the body. If it is not specified, the latest authorization model ID will be used. It is strongly recommended to specify authorization model id for better performance. You may also specify `contextual_tuples` that will be treated as regular tuples. The response will contain the related objects in an array in the \"objects\" field of the response and they will be strings in the object format `<type>:<id>` (e.g. \"document:roadmap\"). The number of objects in the response array will be limited by the execution timeout specified in the flag OPENFGA_LIST_OBJECTS_DEADLINE and by the upper bound specified in the flag OPENFGA_LIST_OBJECTS_MAX_RESULTS, whichever is hit first. The objects given will not be sorted, and therefore two identical calls can give a given different set of objects.
* @summary List all objects of the given type that the user has a relation with
* @param {ListObjectsRequest} body
* @param {*} [options] Override http request option.
4 changes: 2 additions & 2 deletions configuration.ts
Original file line number Diff line number Diff line change
@@ -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.9";
const DEFAULT_USER_AGENT = "openfga-sdk js/0.2.10";

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

/**
* provide scheme (e.g. `https`)
4 changes: 2 additions & 2 deletions errors.ts
Original file line number Diff line number Diff line change
@@ -11,7 +11,7 @@
*/


import { AxiosError, Method } from "axios";
import { AxiosError, AxiosHeaderValue, Method } from "axios";
import {
ErrorCode,
InternalErrorCode,
@@ -84,7 +84,7 @@ export class FgaApiError extends FgaError {
public apiErrorMessage?: string;
public requestData?: any;
public responseData?: any;
public responseHeader?: Record<string, string>;
public responseHeader?: Record<string, AxiosHeaderValue | undefined>;
public requestId?: string;

constructor(err: AxiosError, msg?: string) {
546 changes: 321 additions & 225 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 8 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfga/sdk",
"version": "0.2.9",
"version": "0.2.10",
"description": "JavaScript and Node.js SDK for OpenFGA",
"author": "OpenFGA",
"keywords": [
@@ -22,18 +22,18 @@
"lint:fix": "eslint . --ext .ts --fix"
},
"dependencies": {
"axios": "^0.27.2",
"axios": "^1.6.0",
"tiny-async-pool": "^2.1.0"
},
"devDependencies": {
"@types/jest": "^29.5.6",
"@types/node": "^20.8.7",
"@types/jest": "^29.5.7",
"@types/node": "^20.8.10",
"@types/tiny-async-pool": "^2.0.1",
"@typescript-eslint/eslint-plugin": "^6.8.0",
"@typescript-eslint/parser": "^6.8.0",
"eslint": "^8.51.0",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.9.1",
"eslint": "^8.52.0",
"jest": "^29.7.0",
"nock": "^13.3.6",
"nock": "^13.3.7",
"ts-jest": "^29.1.1",
"typescript": "^5.2.2"
},
@@ -52,12 +52,6 @@
"url": "https://github.com/openfga/js-sdk/issues"
},
"homepage": "https://github.com/openfga/js-sdk#readme",
"overrides": {
"axios": {
"follow-redirects": "1.15.2"
},
"semver": "^7.5.3"
},
"engines": {
"node": ">=14.17.0"
},

0 comments on commit 8725ba2

Please sign in to comment.