From 797ab5714c24672d60e49683af3cda8ecd60bcae Mon Sep 17 00:00:00 2001 From: Warren Parad Date: Tue, 27 Dec 2022 15:38:46 +0100 Subject: [PATCH] Add users and groups to statement DTO. --- CHANGELOG.md | 1 + index.d.ts | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81de602..3b5815a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ This is the changelog for [Authress SDK](readme.md). * Add new `Pagination` type which pagination `next.cursor` to enable paging through resources. * Add `Extensions` api * Upgraded node to 14 +* Add support for users and groups at the statement level of access records. ## 1.2 ## * Removed legacy support for RS512 service client tokens. diff --git a/index.d.ts b/index.d.ts index 56ae773..049c0de 100644 --- a/index.d.ts +++ b/index.d.ts @@ -58,11 +58,11 @@ export interface AccessRecord { */ account?: AccountLink; /** - * The list of users this record applies to + * The list of users this record applies to. Users can either be specified at the record level or at the statement level. * @type {Array} * @memberof AccessRecord */ - users: Array; + users?: Array; /** * The list of admin that can edit this record even if they do not have global record edit permissions. By default the creator of the record has admin access unless explicitly this property is set. * @type {Array} @@ -70,7 +70,7 @@ export interface AccessRecord { */ admins?: Array; /** - * The list of groups this record applies to. Users in these groups will be receive access to the resources listed. + * The list of groups this record applies to. Users in these groups will be receive access to the resources listed. Groups can either be specified at the record level or at the statement level. * @type {Array} * @memberof AccessRecord */ @@ -895,6 +895,18 @@ export interface Statement { * @memberof Statement */ resources: Array; + /** + * The list of users this statement applies to + * @type {Array} + * @memberof AccessRecord + */ + users?: Array; + /** + * The list of groups this statement applies to. Users in these groups will be receive access to the resources listed. + * @type {Array} + * @memberof AccessRecord + */ + groups?: Array; } /**