Skip to content

Commit be2ad5c

Browse files
authored
release: v0.3.5 (#79)
2 parents 5f4d2ad + e07b288 commit be2ad5c

File tree

8 files changed

+77
-7
lines changed

8 files changed

+77
-7
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## v0.3.5
4+
5+
### [0.3.5](https://github.com/openfga/js-sdk/compare/v0.3.4...v0.3.5) (2024-03-19)
6+
7+
- feat: add support for modular models metadata
8+
39
## v0.3.4
410

511
### [0.3.4](https://github.com/openfga/js-sdk/compare/v0.3.3...v0.3.4) (2024-03-15)

api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import {
3838
CheckResponse,
3939
Computed,
4040
Condition,
41+
ConditionMetadata,
4142
ConditionParamTypeRef,
4243
ContextualTupleKeys,
4344
CreateStoreRequest,
@@ -71,6 +72,7 @@ import {
7172
RelationMetadata,
7273
RelationReference,
7374
RelationshipCondition,
75+
SourceInfo,
7476
Status,
7577
Store,
7678
Tuple,

apiModel.ts

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,31 @@ export interface Condition {
240240
* @memberof Condition
241241
*/
242242
parameters?: { [key: string]: ConditionParamTypeRef; };
243+
/**
244+
*
245+
* @type {ConditionMetadata}
246+
* @memberof Condition
247+
*/
248+
metadata?: ConditionMetadata;
249+
}
250+
/**
251+
*
252+
* @export
253+
* @interface ConditionMetadata
254+
*/
255+
export interface ConditionMetadata {
256+
/**
257+
*
258+
* @type {string}
259+
* @memberof ConditionMetadata
260+
*/
261+
module?: string;
262+
/**
263+
*
264+
* @type {SourceInfo}
265+
* @memberof ConditionMetadata
266+
*/
267+
source_info?: SourceInfo;
243268
}
244269
/**
245270
*
@@ -636,6 +661,18 @@ export interface Metadata {
636661
* @memberof Metadata
637662
*/
638663
relations?: { [key: string]: RelationMetadata; };
664+
/**
665+
*
666+
* @type {string}
667+
* @memberof Metadata
668+
*/
669+
module?: string;
670+
/**
671+
*
672+
* @type {SourceInfo}
673+
* @memberof Metadata
674+
*/
675+
source_info?: SourceInfo;
639676
}
640677
/**
641678
*
@@ -901,6 +938,18 @@ export interface RelationMetadata {
901938
* @memberof RelationMetadata
902939
*/
903940
directly_related_user_types?: Array<RelationReference>;
941+
/**
942+
*
943+
* @type {string}
944+
* @memberof RelationMetadata
945+
*/
946+
module?: string;
947+
/**
948+
*
949+
* @type {SourceInfo}
950+
* @memberof RelationMetadata
951+
*/
952+
source_info?: SourceInfo;
904953
}
905954
/**
906955
* RelationReference represents a relation of a particular object type (e.g. \'document#viewer\').
@@ -952,6 +1001,19 @@ export interface RelationshipCondition {
9521001
*/
9531002
context?: object;
9541003
}
1004+
/**
1005+
*
1006+
* @export
1007+
* @interface SourceInfo
1008+
*/
1009+
export interface SourceInfo {
1010+
/**
1011+
*
1012+
* @type {string}
1013+
* @memberof SourceInfo
1014+
*/
1015+
file?: string;
1016+
}
9551017
/**
9561018
*
9571019
* @export

configuration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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.4";
24+
const DEFAULT_USER_AGENT = "openfga-sdk js/0.3.5";
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.4";
77+
private static sdkVersion = "0.3.5";
7878

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

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Steps
2828
2. In the Example `package.json` change the `@openfga/sdk` dependency from a semver range like below
2929
```json
3030
"dependencies": {
31-
"@openfga/sdk": "^0.3.4"
31+
"@openfga/sdk": "^0.3.5"
3232
}
3333
```
3434
to a `file:` reference like below

example/example1/package.json

Lines changed: 1 addition & 1 deletion
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.4"
12+
"@openfga/sdk": "^0.3.5"
1313
},
1414
"engines": {
1515
"node": ">=16.13.0"

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openfga/sdk",
3-
"version": "0.3.4",
3+
"version": "0.3.5",
44
"description": "JavaScript and Node.js SDK for OpenFGA",
55
"author": "OpenFGA",
66
"keywords": [

0 commit comments

Comments
 (0)