Skip to content

Commit bf35423

Browse files
committed
chore: update community links from discord to slack
1 parent 5e3a6f4 commit bf35423

27 files changed

+47
-32
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Considering that the SDKs are autogenerated, please make sure to submit your Pul
3939

4040
### Have a question or problem?
4141

42-
Please do not open issues for general support or usage questions. Instead, join us over in the [OpenFGA discussions](https://github.com/orgs/openfga/discussions) or [support community](https://discord.gg/8naAwJfWN6).
42+
Please do not open issues for general support or usage questions. Instead, join us over in the [OpenFGA discussions](https://github.com/orgs/openfga/discussions) or [support community](https://openfga.dev/community).
4343

4444
### Vulnerability Reporting
4545

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Release](https://img.shields.io/github/v/release/openfga/js-sdk?sort=semver&color=green)](https://github.com/openfga/js-sdk/releases)
55
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)
66
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.heygears.com%2Fopenfga%2Fjs-sdk.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.heygears.com%2Fopenfga%2Fjs-sdk?ref=badge_shield)
7-
[![Discord Server](https://img.shields.io/discord/759188666072825867?color=7289da&logo=discord "Discord Server")](https://discord.gg/8naAwJfWN6)
7+
[![Join our community](https://img.shields.io/badge/slack-cncf_%23openfga-40abb8.svg?logo=slack)](https://openfga.dev/community)
88
[![Twitter](https://img.shields.io/twitter/follow/openfga?color=%23179CF0&logo=twitter&style=flat-square "@openfga on Twitter")](https://twitter.com/openfga)
99

1010
This is an autogenerated JavaScript SDK for OpenFGA. It provides a wrapper around the [OpenFGA API definition](https://openfga.dev/api), and includes TS typings.
@@ -60,7 +60,7 @@ OpenFGA is designed to make it easy for application builders to model their perm
6060
- [OpenFGA Documentation](https://openfga.dev/docs)
6161
- [OpenFGA API Documentation](https://openfga.dev/api/service)
6262
- [Twitter](https://twitter.com/openfga)
63-
- [OpenFGA Discord Community](https://discord.gg/8naAwJfWN6)
63+
- [OpenFGA Community](https://openfga.dev/community)
6464
- [Zanzibar Academy](https://zanzibar.academy)
6565
- [Google's Zanzibar Paper (2019)](https://research.google/pubs/pub48190/)
6666

@@ -86,7 +86,7 @@ yarn add @openfga/sdk
8686

8787
The documentation below refers to the `OpenFgaClient`, to read the documentation for `OpenFgaApi`, check out the [`v0.2.2` documentation](https://github.com/openfga/js-sdk/tree/v0.2.2#readme).
8888

89-
> The OpenFgaClient will by default retry API requests up to 15 times on 429 and 5xx errors.
89+
> The `OpenFgaClient` will by default retry API requests up to 15 times on 429 and 5xx errors.
9090
9191
#### No Credentials
9292

api.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

apiModel.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* API version: 0.1
77
* Website: https://openfga.dev
88
* Documentation: https://openfga.dev/docs
9-
* Support: https://discord.gg/8naAwJfWN6
9+
* Support: https://openfga.dev/community
1010
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
1111
*
1212
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
@@ -44,7 +44,7 @@ import {
4444
import { BaseAPI } from "./base";
4545
import { CallResult, PromiseResult } from "./common";
4646
import { Configuration, RetryParams, UserConfigurationParams } from "./configuration";
47-
import {FgaApiAuthenticationError, FgaRequiredParamError, FgaValidationError} from "./errors";
47+
import { FgaApiAuthenticationError, FgaRequiredParamError, FgaValidationError } from "./errors";
4848
import {
4949
chunkArray,
5050
generateRandomIdWithNonUniqueFallback,

common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

configuration.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
@@ -21,7 +21,7 @@ const DEFAULT_MAX_RETRY = 15;
2121
// default minimum wait period in retry - but will backoff exponentially
2222
const DEFAULT_MIN_WAIT_MS = 100;
2323

24-
const DEFAULT_USER_AGENT = "openfga-sdk js/0.3.2";
24+
const DEFAULT_USER_AGENT = "openfga-sdk js/0.3.3";
2525

2626
export interface RetryParams {
2727
maxRetry?: number;
@@ -74,7 +74,7 @@ export class Configuration {
7474
* @type {string}
7575
* @memberof Configuration
7676
*/
77-
private static sdkVersion = "0.3.2";
77+
private static sdkVersion = "0.3.3";
7878

7979
/**
8080
* provide the full api URL (e.g. `https://api.fga.example`)

credentials/credentials.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

credentials/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

credentials/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

errors.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

example/example1/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"start": "node example1.mjs"
1010
},
1111
"dependencies": {
12-
"@openfga/sdk": "^0.3.2"
12+
"@openfga/sdk": "^0.3.3"
1313
},
1414
"engines": {
1515
"node": ">=16.13.0"

index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* API version: 0.1
77
* Website: https://openfga.dev
88
* Documentation: https://openfga.dev/docs
9-
* Support: https://discord.gg/8naAwJfWN6
9+
* Support: https://openfga.dev/community
1010
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
1111
*
1212
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

tests/client.test.ts

+16-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.
@@ -270,6 +270,7 @@ describe("OpenFGA Client", () => {
270270
const scope1 = nocks.write(baseConfig.storeId!).matchHeader("X-OpenFGA-Client-Method", "Write");
271271
const scope2 = nocks.write(baseConfig.storeId!).matchHeader("X-OpenFGA-Client-Method", "Write");
272272
const modelId = "01GXSA8YR785C4FYS3C0RTG7B1";
273+
const scope3 = nocks.readSingleAuthzModel(defaultConfiguration.storeId!, modelId);
273274

274275
expect(scope0.isDone()).toBe(false);
275276
expect(scope1.isDone()).toBe(false);
@@ -284,6 +285,7 @@ describe("OpenFGA Client", () => {
284285
expect(scope0.isDone()).toBe(true);
285286
expect(scope1.isDone()).toBe(true);
286287
expect(scope2.isDone()).toBe(false);
288+
expect(scope3.isDone()).toBe(false);
287289
expect(data).toMatchObject({});
288290
});
289291

@@ -308,6 +310,7 @@ describe("OpenFGA Client", () => {
308310
"message": "relation 'workspace#reader' not found"
309311
}, 400).matchHeader("X-OpenFGA-Client-Method", "Write");
310312
const modelId = "01GXSA8YR785C4FYS3C0RTG7B1";
313+
const scope3 = nocks.readSingleAuthzModel(defaultConfiguration.storeId!, modelId);
311314

312315
expect(scope0.isDone()).toBe(false);
313316
expect(scope1.isDone()).toBe(false);
@@ -322,6 +325,7 @@ describe("OpenFGA Client", () => {
322325
expect(scope0.isDone()).toBe(true);
323326
expect(scope1.isDone()).toBe(true);
324327
expect(scope2.isDone()).toBe(true);
328+
expect(scope3.isDone()).toBe(false);
325329
expect(data.writes.length).toBe(3);
326330
expect(data.deletes.length).toBe(0);
327331
expect(data.writes.find(tuple => tuple.tuple_key.object === tuples[0].object)?.status).toBe(ClientWriteStatus.SUCCESS);
@@ -338,6 +342,9 @@ describe("OpenFGA Client", () => {
338342
}];
339343

340344
const scope0 = nocks.write(baseConfig.storeId!, defaultConfiguration.getBasePath(), {}, 401).matchHeader("X-OpenFGA-Client-Method", "Write");
345+
const scope1 = nock(defaultConfiguration.getBasePath())
346+
.get(`/stores/${baseConfig.storeId!}/authorization-models/${authModelId}`)
347+
.reply(401, {});
341348
try {
342349
const tuples = [{
343350
user: "user:81684243-9356-4421-8fbf-a4f8d36aa31b",
@@ -354,6 +361,7 @@ describe("OpenFGA Client", () => {
354361
expect(err).toBeInstanceOf(FgaApiAuthenticationError);
355362
} finally {
356363
expect(scope0.isDone()).toBe(true);
364+
expect(scope1.isDone()).toBe(false);
357365
}
358366
});
359367

@@ -456,6 +464,12 @@ describe("OpenFGA Client", () => {
456464
"code": "validation_error",
457465
"message": "relation 'workspace#reader' not found"
458466
}, 400).matchHeader("X-OpenFGA-Client-Method", "BatchCheck");
467+
const scope3 = nock(defaultConfiguration.getBasePath())
468+
.get(`/stores/${defaultConfiguration.storeId!}/authorization-models`)
469+
.query({ page_size: 1 })
470+
.reply(200, {
471+
authorization_models: [],
472+
});
459473

460474
expect(scope0.isDone()).toBe(false);
461475
expect(scope1.isDone()).toBe(false);
@@ -465,6 +479,7 @@ describe("OpenFGA Client", () => {
465479
expect(scope0.isDone()).toBe(true);
466480
expect(scope1.isDone()).toBe(true);
467481
expect(scope2.isDone()).toBe(true);
482+
expect(scope3.isDone()).toBe(false);
468483
expect(response.responses.length).toBe(3);
469484
expect(response.responses.sort((a, b) => String(a._request.object).localeCompare(b._request.object)))
470485
.toMatchObject(expect.arrayContaining([

tests/helpers/default-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

tests/helpers/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

tests/helpers/nocks.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

tests/index.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

tests/validation.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/assert-never.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/chunk-array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/generate-random-id.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/set-header-if-not-set.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

utils/set-not-enumerable-property.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

validation.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* API version: 0.1
55
* Website: https://openfga.dev
66
* Documentation: https://openfga.dev/docs
7-
* Support: https://discord.gg/8naAwJfWN6
7+
* Support: https://openfga.dev/community
88
* License: [Apache-2.0](https://github.com/openfga/js-sdk/blob/main/LICENSE)
99
*
1010
* NOTE: This file was auto generated by OpenAPI Generator (https://openapi-generator.tech). DO NOT EDIT.

0 commit comments

Comments
 (0)