@fairandsmart/consents-ce 3.1.5 → 3.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fairandsmart/consents-ce",
3
- "version": "3.1.5",
3
+ "version": "3.1.6",
4
4
  "description": "TypeScript mappings for the Fair&Smart's Right Consents Community features",
5
5
  "sideEffects": false,
6
6
  "scripts": {},
package/subjects/api.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import { Observable } from 'rxjs';
2
- import { SubjectDto } from './interfaces';
2
+ import { SubjectDto, SubjectFilter } from './interfaces';
3
3
  import { RecordsMap } from '../records';
4
4
  import { RCApiOptions } from '../http';
5
+ import { CollectionPage } from '../common';
5
6
  export declare function listSubjects(name: string, options?: RCApiOptions): Observable<SubjectDto[]>;
7
+ export declare function getSubjects(filter: SubjectFilter, options?: RCApiOptions): Observable<CollectionPage<SubjectDto>>;
6
8
  export declare function getSubject(name: string, options?: RCApiOptions): Observable<SubjectDto>;
7
9
  export declare function createSubject(subject: SubjectDto, options?: RCApiOptions): Observable<SubjectDto>;
8
10
  export declare function updateSubject(subject: SubjectDto, options?: RCApiOptions): Observable<SubjectDto>;
package/subjects/api.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeAlias = exports.setAlias = exports.getAliases = exports.listSubjectRecords = exports.updateSubject = exports.createSubject = exports.getSubject = exports.listSubjects = void 0;
3
+ exports.removeAlias = exports.setAlias = exports.getAliases = exports.listSubjectRecords = exports.updateSubject = exports.createSubject = exports.getSubject = exports.getSubjects = exports.listSubjects = void 0;
4
4
  var api_1 = require("../api");
5
5
  function listSubjects(name, options) {
6
6
  return api_1.RightConsents.http({
@@ -11,6 +11,15 @@ function listSubjects(name, options) {
11
11
  });
12
12
  }
13
13
  exports.listSubjects = listSubjects;
14
+ function getSubjects(filter, options) {
15
+ return api_1.RightConsents.http({
16
+ method: 'GET',
17
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/subjects/paged"),
18
+ params: filter,
19
+ options: options
20
+ });
21
+ }
22
+ exports.getSubjects = getSubjects;
14
23
  function getSubject(name, options) {
15
24
  return api_1.RightConsents.http({
16
25
  method: 'GET',
@@ -1,3 +1,4 @@
1
+ import { SortDirection } from "../common";
1
2
  export interface SubjectDto {
2
3
  id: string;
3
4
  name: string;
@@ -7,3 +8,11 @@ export interface SubjectDto {
7
8
  supersededBy: string;
8
9
  superseded: string[];
9
10
  }
11
+ export interface SubjectFilter {
12
+ name?: string;
13
+ emailAddress?: string;
14
+ page?: number;
15
+ size?: number;
16
+ order?: string;
17
+ direction?: SortDirection;
18
+ }