Skip to content

Commit

Permalink
release(js-sdk): v0.6.1 (#389)
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris authored Jul 11, 2024
2 parents c53b7c0 + bf99097 commit 3719938
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
8 changes: 8 additions & 0 deletions config/clients/js/CHANGELOG.md.mustache
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## v0.6.1

### [0.6.1](https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}/compare/v0.6.0...v0.6.1) (2024-07-11)
- fix(metrics): add missing request model id attribute (#122)

> [!IMPORTANT]
> In this release we have changed our TypeScript compile target to ES2020 to align with our stated supported environments

## v0.6.0

### [0.6.0](https://{{gitHost}}/{{gitUserId}}/{{gitRepoId}}/compare/v0.5.0...v0.6.0) (2024-06-28)
Expand Down
2 changes: 1 addition & 1 deletion config/clients/js/config.overrides.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"sdkId": "js",
"gitRepoId": "js-sdk",
"packageName": "@openfga/sdk",
"packageVersion": "0.6.0",
"packageVersion": "0.6.1",
"packageDescription": "JavaScript and Node.js SDK for OpenFGA",
"packageDetailedDescription": "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.",
"npmRegistry": "https://registry.npmjs.org/",
Expand Down
28 changes: 14 additions & 14 deletions config/clients/js/patches/add-method-specific-attributes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index e45e6c2..260e0bc 100644
--- a/api.ts
+++ b/api.ts
@@ -759,6 +759,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.check(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.check(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "check",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -13,15 +13,15 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -785,6 +788,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteStore(storeId, options);
const localVarAxiosArgs = localVarAxiosParamCreator.deleteStore(storeId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "deleteStore",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -799,6 +803,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.expand(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.expand(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "expand",
+ [attributeNames.requestModelId]: body.authorization_model_id,
Expand All @@ -30,15 +30,15 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -812,6 +818,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.getStore(storeId, options);
const localVarAxiosArgs = localVarAxiosParamCreator.getStore(storeId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "getStore",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -826,6 +833,9 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.listObjects(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.listObjects(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "listObjects",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -48,7 +48,7 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -854,6 +864,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.listUsers(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.listUsers(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "listUsers",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -57,15 +57,15 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -868,6 +880,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.read(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.read(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "read",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -882,6 +895,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.readAssertions(storeId, authorizationModelId, options);
const localVarAxiosArgs = localVarAxiosParamCreator.readAssertions(storeId, authorizationModelId, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "readAssertions",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -74,31 +74,31 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -896,6 +911,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.readAuthorizationModel(storeId, id, options);
const localVarAxiosArgs = localVarAxiosParamCreator.readAuthorizationModel(storeId, id, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "readAuthorizationModel",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -911,6 +927,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.readAuthorizationModels(storeId, pageSize, continuationToken, options);
const localVarAxiosArgs = localVarAxiosParamCreator.readAuthorizationModels(storeId, pageSize, continuationToken, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "readAuthorizationModels",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -927,6 +944,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.readChanges(storeId, type, pageSize, continuationToken, options);
const localVarAxiosArgs = localVarAxiosParamCreator.readChanges(storeId, type, pageSize, continuationToken, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "readChanges",
+ [attributeNames.requestStoreId]: storeId,
});
},
/**
@@ -941,6 +959,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.write(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.write(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "write",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -107,7 +107,7 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -956,6 +976,8 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.writeAssertions(storeId, authorizationModelId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.writeAssertions(storeId, authorizationModelId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "writeAssertions",
+ [attributeNames.requestStoreId]: storeId,
Expand All @@ -116,7 +116,7 @@ index e45e6c2..260e0bc 100644
},
/**
@@ -970,6 +992,7 @@ export const OpenFgaApiFp = function(configuration: Configuration, credentials:
const localVarAxiosArgs = await localVarAxiosParamCreator.writeAuthorizationModel(storeId, body, options);
const localVarAxiosArgs = localVarAxiosParamCreator.writeAuthorizationModel(storeId, body, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "writeAuthorizationModel",
+ [attributeNames.requestStoreId]: storeId,
Expand Down
4 changes: 2 additions & 2 deletions config/clients/js/template/apiInner.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const {{classname}}AxiosParamCreator = function (configuration: Configura
* @deprecated{{/isDeprecated}}
* @throws { FgaError }
*/
{{nickname}}: async ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): Promise<RequestArgs> => {
{{nickname}}: ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options: any = {}): RequestArgs => {
{{#allParams}}
{{#required}}
// verify required parameter '{{paramName}}' is not null or undefined
Expand Down Expand Up @@ -210,7 +210,7 @@ export const {{classname}}Fp = function(configuration: Configuration, credential
* @throws { FgaError }
*/
async {{nickname}}({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}options?: any): Promise<(axios?: AxiosInstance) => PromiseResult<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
const localVarAxiosArgs = localVarAxiosParamCreator.{{nickname}}({{#allParams}}{{paramName}}, {{/allParams}}options);
return createRequestFunction(localVarAxiosArgs, globalAxios, configuration, credentials, {
[attributeNames.requestMethod]: "{{nickname}}",
});
Expand Down
2 changes: 1 addition & 1 deletion config/clients/js/template/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"declaration": true,
"target": "es6",
"target": "es2020",
"module": "commonjs",
"noImplicitAny": true,
"strict": true,
Expand Down

0 comments on commit 3719938

Please sign in to comment.