@fairandsmart/consents-ce 1.3.7
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/LICENSE.txt +21 -0
- package/README.md +116 -0
- package/api.d.ts +19 -0
- package/api.js +67 -0
- package/common.d.ts +8 -0
- package/common.js +2 -0
- package/consents/api.d.ts +9 -0
- package/consents/api.js +69 -0
- package/consents/helpers.d.ts +6 -0
- package/consents/helpers.js +24 -0
- package/consents/index.d.ts +3 -0
- package/consents/index.js +35 -0
- package/consents/interfaces.d.ts +74 -0
- package/consents/interfaces.js +32 -0
- package/css-autocomplete.d.ts +14 -0
- package/css-autocomplete.js +809 -0
- package/forms/consent-collector.d.ts +11 -0
- package/forms/consent-collector.js +115 -0
- package/forms/index.d.ts +2 -0
- package/forms/index.js +34 -0
- package/forms/interfaces.d.ts +12 -0
- package/forms/interfaces.js +2 -0
- package/http.d.ts +37 -0
- package/http.js +46 -0
- package/index.d.ts +15 -0
- package/index.js +46 -0
- package/keys/api.d.ts +6 -0
- package/keys/api.js +29 -0
- package/keys/index.d.ts +2 -0
- package/keys/index.js +34 -0
- package/keys/interfaces.d.ts +15 -0
- package/keys/interfaces.js +2 -0
- package/models/api.d.ts +23 -0
- package/models/api.js +228 -0
- package/models/helpers.d.ts +6 -0
- package/models/helpers.js +29 -0
- package/models/index.d.ts +3 -0
- package/models/index.js +35 -0
- package/models/interfaces.d.ts +246 -0
- package/models/interfaces.js +139 -0
- package/package.json +48 -0
- package/receipts/api.d.ts +3 -0
- package/receipts/api.js +16 -0
- package/receipts/index.d.ts +1 -0
- package/receipts/index.js +33 -0
- package/receipts/interfaces.d.ts +0 -0
- package/receipts/interfaces.js +1 -0
- package/records/api.d.ts +6 -0
- package/records/api.js +38 -0
- package/records/index.d.ts +2 -0
- package/records/index.js +34 -0
- package/records/interfaces.d.ts +116 -0
- package/records/interfaces.js +60 -0
- package/statistics/api.d.ts +4 -0
- package/statistics/api.js +12 -0
- package/statistics/index.d.ts +2 -0
- package/statistics/index.js +34 -0
- package/statistics/interfaces.d.ts +20 -0
- package/statistics/interfaces.js +10 -0
- package/subjects/api.d.ts +9 -0
- package/subjects/api.js +58 -0
- package/subjects/index.d.ts +2 -0
- package/subjects/index.js +34 -0
- package/subjects/interfaces.d.ts +7 -0
- package/subjects/interfaces.js +2 -0
- package/system/api.d.ts +5 -0
- package/system/api.js +20 -0
- package/system/index.d.ts +2 -0
- package/system/index.js +34 -0
- package/system/interfaces.d.ts +20 -0
- package/system/interfaces.js +2 -0
- package/tokens/api.d.ts +4 -0
- package/tokens/api.js +14 -0
- package/tokens/index.d.ts +2 -0
- package/tokens/index.js +34 -0
- package/tokens/interfaces.d.ts +5 -0
- package/tokens/interfaces.js +2 -0
- package/users/api.d.ts +9 -0
- package/users/api.js +28 -0
- package/users/index.d.ts +2 -0
- package/users/index.js +34 -0
- package/users/interfaces.d.ts +10 -0
- package/users/interfaces.js +2 -0
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fairandsmart/consents-ce",
|
|
3
|
+
"version": "1.3.7",
|
|
4
|
+
"description": "TypeScript mappings for the Fair&Smart's Right Consents Community features",
|
|
5
|
+
"sideEffects": false,
|
|
6
|
+
"scripts": {},
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/fairandsmart/consent-manager-lib-ce.git"
|
|
10
|
+
},
|
|
11
|
+
"author": "Alan Balbo",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/fairandsmart/consent-manager-lib-ce"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"Fair & Smart",
|
|
18
|
+
"Consent Manager",
|
|
19
|
+
"Right Consents",
|
|
20
|
+
"TypeScript"
|
|
21
|
+
],
|
|
22
|
+
"homepage": "https://github.com/fairandsmart/consent-manager-lib-ce",
|
|
23
|
+
"devDependencies": {},
|
|
24
|
+
"dependencies": {},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"rxjs": "^6.6.3",
|
|
27
|
+
"jsonpath": "^1.1.1"
|
|
28
|
+
},
|
|
29
|
+
"main": "./index.js",
|
|
30
|
+
"types": "./index.d.ts",
|
|
31
|
+
"module": "./index.js",
|
|
32
|
+
"exports": {
|
|
33
|
+
".": "./index.js",
|
|
34
|
+
"./api": "./api.js",
|
|
35
|
+
"./http": "./http.js",
|
|
36
|
+
"./common": "./common.js",
|
|
37
|
+
"./consents": "./consents/index.js",
|
|
38
|
+
"./keys": "./keys/index.js",
|
|
39
|
+
"./models": "./models/index.js",
|
|
40
|
+
"./receipts": "./receipts/index.js",
|
|
41
|
+
"./records": "./records/index.js",
|
|
42
|
+
"./statistics": "./statistics/index.js",
|
|
43
|
+
"./subjects": "./subjects/index.js",
|
|
44
|
+
"./system": "./system/index.js",
|
|
45
|
+
"./tokens": "./tokens/index.js",
|
|
46
|
+
"./users": "./users/index.js"
|
|
47
|
+
}
|
|
48
|
+
}
|
package/receipts/api.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getReceiptPdf = void 0;
|
|
4
|
+
var api_1 = require("../api");
|
|
5
|
+
function getReceiptPdf(transactionId, theme, options) {
|
|
6
|
+
return api_1.RightConsents.http({
|
|
7
|
+
method: "GET",
|
|
8
|
+
url: ""
|
|
9
|
+
.concat(api_1.RightConsents.config.apiRoot, "/receipts/")
|
|
10
|
+
.concat(transactionId),
|
|
11
|
+
params: { theme: theme, format: "application/pdf" },
|
|
12
|
+
responseType: "arraybuffer",
|
|
13
|
+
options: options,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.getReceiptPdf = getReceiptPdf;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './api';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./api"), exports);
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
package/records/api.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ExtractionConfigDto, ExtractionResultDto, RecordsMap } from './interfaces';
|
|
3
|
+
import { RCApiOptions } from '../http';
|
|
4
|
+
export declare function listRecordsOfSubject(subject: string, options?: RCApiOptions): Observable<RecordsMap>;
|
|
5
|
+
export declare function extractRecords(config: ExtractionConfigDto, options?: RCApiOptions): Observable<ExtractionResultDto[]>;
|
|
6
|
+
export declare function extractRecordsCsv(config: ExtractionConfigDto, options?: RCApiOptions): Observable<string>;
|
package/records/api.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.extractRecordsCsv =
|
|
4
|
+
exports.extractRecords =
|
|
5
|
+
exports.listRecordsOfSubject =
|
|
6
|
+
void 0;
|
|
7
|
+
var api_1 = require("../api");
|
|
8
|
+
function listRecordsOfSubject(subject, options) {
|
|
9
|
+
return api_1.RightConsents.http({
|
|
10
|
+
method: "GET",
|
|
11
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/records"),
|
|
12
|
+
params: { subject: subject },
|
|
13
|
+
options: options,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
exports.listRecordsOfSubject = listRecordsOfSubject;
|
|
17
|
+
function extractRecords(config, options) {
|
|
18
|
+
return api_1.RightConsents.http({
|
|
19
|
+
method: "POST",
|
|
20
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/records/extraction"),
|
|
21
|
+
body: config,
|
|
22
|
+
options: options,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
exports.extractRecords = extractRecords;
|
|
26
|
+
function extractRecordsCsv(config, options) {
|
|
27
|
+
return api_1.RightConsents.http({
|
|
28
|
+
method: "POST",
|
|
29
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/records/extraction"),
|
|
30
|
+
body: config,
|
|
31
|
+
headers: {
|
|
32
|
+
Accept: "text/csv",
|
|
33
|
+
},
|
|
34
|
+
responseType: "text",
|
|
35
|
+
options: options,
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
exports.extractRecordsCsv = extractRecordsCsv;
|
package/records/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./interfaces"), exports);
|
|
34
|
+
__exportStar(require("./api"), exports);
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { SortDirection } from '../common';
|
|
2
|
+
export declare enum RecordStates {
|
|
3
|
+
PENDING = "PENDING",
|
|
4
|
+
COMMITTED = "COMMITTED",
|
|
5
|
+
DELETED = "DELETED"
|
|
6
|
+
}
|
|
7
|
+
export declare enum RecordStatus {
|
|
8
|
+
VALID = "VALID",
|
|
9
|
+
OBSOLETE = "OBSOLETE",
|
|
10
|
+
EXPIRED = "EXPIRED",
|
|
11
|
+
IRRELEVANT = "IRRELEVANT",
|
|
12
|
+
UNKNOWN = "UNKNOWN"
|
|
13
|
+
}
|
|
14
|
+
export declare enum RecordStatusExplanation {
|
|
15
|
+
LATEST_VALID = "LATEST_VALID",
|
|
16
|
+
OBSOLETE = "OBSOLETE",
|
|
17
|
+
EXPIRED = "EXPIRED",
|
|
18
|
+
INFO_SERIAL_ARCHIVED = "INFO_SERIAL_ARCHIVED",
|
|
19
|
+
BODY_SERIAL_ARCHIVED = "BODY_SERIAL_ARCHIVED",
|
|
20
|
+
STILL_PENDING = "STILL_PENDING",
|
|
21
|
+
ENTRY_DELETED = "ENTRY_DELETED"
|
|
22
|
+
}
|
|
23
|
+
export interface RecordFilter {
|
|
24
|
+
page?: number;
|
|
25
|
+
size?: number;
|
|
26
|
+
subject?: string;
|
|
27
|
+
states?: RecordStates[];
|
|
28
|
+
infos?: string[];
|
|
29
|
+
elements?: string[];
|
|
30
|
+
origin?: string;
|
|
31
|
+
after?: number;
|
|
32
|
+
before?: number;
|
|
33
|
+
value?: string;
|
|
34
|
+
order?: string;
|
|
35
|
+
direction?: SortDirection;
|
|
36
|
+
}
|
|
37
|
+
export interface EntryRecord {
|
|
38
|
+
id: string;
|
|
39
|
+
key: string;
|
|
40
|
+
type: string;
|
|
41
|
+
name: string;
|
|
42
|
+
identifier: string;
|
|
43
|
+
value?: string;
|
|
44
|
+
recordCreation?: number;
|
|
45
|
+
recordExpiration?: number;
|
|
46
|
+
comment?: string;
|
|
47
|
+
origin?: string;
|
|
48
|
+
status?: RecordStatus;
|
|
49
|
+
active: boolean;
|
|
50
|
+
versionIndex: number;
|
|
51
|
+
}
|
|
52
|
+
export interface OperatorLogElement {
|
|
53
|
+
type: string;
|
|
54
|
+
key: string;
|
|
55
|
+
identifier: string;
|
|
56
|
+
value: string;
|
|
57
|
+
}
|
|
58
|
+
export interface ExtractionConfigCondition {
|
|
59
|
+
key: string;
|
|
60
|
+
value: string;
|
|
61
|
+
regexpValue: boolean;
|
|
62
|
+
}
|
|
63
|
+
export interface ExtractionConfigDto {
|
|
64
|
+
condition: ExtractionConfigCondition;
|
|
65
|
+
}
|
|
66
|
+
export interface ExtractionResultDto {
|
|
67
|
+
subjectId: string;
|
|
68
|
+
subjectName: string;
|
|
69
|
+
subjectEmail: string;
|
|
70
|
+
recordKey: string;
|
|
71
|
+
recordSerial: string;
|
|
72
|
+
recordValue: string;
|
|
73
|
+
}
|
|
74
|
+
export interface RecordDto {
|
|
75
|
+
serial: string;
|
|
76
|
+
infoKey?: string;
|
|
77
|
+
bodyKey: string;
|
|
78
|
+
subject: string;
|
|
79
|
+
creationTimestamp: number;
|
|
80
|
+
expirationTimestamp: number;
|
|
81
|
+
type: string;
|
|
82
|
+
value: string;
|
|
83
|
+
status: RecordStatus;
|
|
84
|
+
statusExplanation: RecordStatusExplanation;
|
|
85
|
+
origin: string;
|
|
86
|
+
comment: string;
|
|
87
|
+
transaction: string;
|
|
88
|
+
notificationReports: NotificationReport[];
|
|
89
|
+
}
|
|
90
|
+
export interface RecordsMap {
|
|
91
|
+
[key: string]: RecordDto[];
|
|
92
|
+
}
|
|
93
|
+
export declare enum NotificationReportStatus {
|
|
94
|
+
SENT = "SENT",
|
|
95
|
+
DELIVERED = "DELIVERED",
|
|
96
|
+
OPENED = "OPENED",
|
|
97
|
+
INVALID_RECIPIENT = "INVALID_RECIPIENT",
|
|
98
|
+
MAILBOX_FULL = "MAILBOX_FULL",
|
|
99
|
+
ERROR = "ERROR",
|
|
100
|
+
PENDING = "PENDING",
|
|
101
|
+
NONE = "NONE"
|
|
102
|
+
}
|
|
103
|
+
export declare enum NotificationReportType {
|
|
104
|
+
SMS = "SMS",
|
|
105
|
+
EMAIL = "EMAIL",
|
|
106
|
+
FCM = "FCM",
|
|
107
|
+
XMPP = "XMPP",
|
|
108
|
+
NONE = "NONE"
|
|
109
|
+
}
|
|
110
|
+
export interface NotificationReport {
|
|
111
|
+
transaction: string;
|
|
112
|
+
creationTimestamp: number;
|
|
113
|
+
status: NotificationReportStatus;
|
|
114
|
+
type: NotificationReportType;
|
|
115
|
+
explanation: string;
|
|
116
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationReportType =
|
|
4
|
+
exports.NotificationReportStatus =
|
|
5
|
+
exports.RecordStatusExplanation =
|
|
6
|
+
exports.RecordStatus =
|
|
7
|
+
exports.RecordStates =
|
|
8
|
+
void 0;
|
|
9
|
+
var RecordStates;
|
|
10
|
+
(function (RecordStates) {
|
|
11
|
+
RecordStates["PENDING"] = "PENDING";
|
|
12
|
+
RecordStates["COMMITTED"] = "COMMITTED";
|
|
13
|
+
RecordStates["DELETED"] = "DELETED";
|
|
14
|
+
})((RecordStates = exports.RecordStates || (exports.RecordStates = {})));
|
|
15
|
+
var RecordStatus;
|
|
16
|
+
(function (RecordStatus) {
|
|
17
|
+
RecordStatus["VALID"] = "VALID";
|
|
18
|
+
RecordStatus["OBSOLETE"] = "OBSOLETE";
|
|
19
|
+
RecordStatus["EXPIRED"] = "EXPIRED";
|
|
20
|
+
RecordStatus["IRRELEVANT"] = "IRRELEVANT";
|
|
21
|
+
RecordStatus["UNKNOWN"] = "UNKNOWN";
|
|
22
|
+
})((RecordStatus = exports.RecordStatus || (exports.RecordStatus = {})));
|
|
23
|
+
var RecordStatusExplanation;
|
|
24
|
+
(function (RecordStatusExplanation) {
|
|
25
|
+
RecordStatusExplanation["LATEST_VALID"] = "LATEST_VALID";
|
|
26
|
+
RecordStatusExplanation["OBSOLETE"] = "OBSOLETE";
|
|
27
|
+
RecordStatusExplanation["EXPIRED"] = "EXPIRED";
|
|
28
|
+
RecordStatusExplanation["INFO_SERIAL_ARCHIVED"] = "INFO_SERIAL_ARCHIVED";
|
|
29
|
+
RecordStatusExplanation["BODY_SERIAL_ARCHIVED"] = "BODY_SERIAL_ARCHIVED";
|
|
30
|
+
RecordStatusExplanation["STILL_PENDING"] = "STILL_PENDING";
|
|
31
|
+
RecordStatusExplanation["ENTRY_DELETED"] = "ENTRY_DELETED";
|
|
32
|
+
})(
|
|
33
|
+
(RecordStatusExplanation =
|
|
34
|
+
exports.RecordStatusExplanation || (exports.RecordStatusExplanation = {}))
|
|
35
|
+
);
|
|
36
|
+
var NotificationReportStatus;
|
|
37
|
+
(function (NotificationReportStatus) {
|
|
38
|
+
NotificationReportStatus["SENT"] = "SENT";
|
|
39
|
+
NotificationReportStatus["DELIVERED"] = "DELIVERED";
|
|
40
|
+
NotificationReportStatus["OPENED"] = "OPENED";
|
|
41
|
+
NotificationReportStatus["INVALID_RECIPIENT"] = "INVALID_RECIPIENT";
|
|
42
|
+
NotificationReportStatus["MAILBOX_FULL"] = "MAILBOX_FULL";
|
|
43
|
+
NotificationReportStatus["ERROR"] = "ERROR";
|
|
44
|
+
NotificationReportStatus["PENDING"] = "PENDING";
|
|
45
|
+
NotificationReportStatus["NONE"] = "NONE";
|
|
46
|
+
})(
|
|
47
|
+
(NotificationReportStatus =
|
|
48
|
+
exports.NotificationReportStatus || (exports.NotificationReportStatus = {}))
|
|
49
|
+
);
|
|
50
|
+
var NotificationReportType;
|
|
51
|
+
(function (NotificationReportType) {
|
|
52
|
+
NotificationReportType["SMS"] = "SMS";
|
|
53
|
+
NotificationReportType["EMAIL"] = "EMAIL";
|
|
54
|
+
NotificationReportType["FCM"] = "FCM";
|
|
55
|
+
NotificationReportType["XMPP"] = "XMPP";
|
|
56
|
+
NotificationReportType["NONE"] = "NONE";
|
|
57
|
+
})(
|
|
58
|
+
(NotificationReportType =
|
|
59
|
+
exports.NotificationReportType || (exports.NotificationReportType = {}))
|
|
60
|
+
);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getStats = void 0;
|
|
4
|
+
var api_1 = require("../api");
|
|
5
|
+
function getStats(options) {
|
|
6
|
+
return api_1.RightConsents.http({
|
|
7
|
+
method: "GET",
|
|
8
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/stats"),
|
|
9
|
+
options: options,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.getStats = getStats;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./interfaces"), exports);
|
|
34
|
+
__exportStar(require("./api"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare enum TimeScale {
|
|
2
|
+
DAYS = "DAYS",
|
|
3
|
+
WEEKS = "WEEKS",
|
|
4
|
+
MONTHS = "MONTHS"
|
|
5
|
+
}
|
|
6
|
+
export declare const TIME_SCALES: TimeScale[];
|
|
7
|
+
export interface StatsDataSet {
|
|
8
|
+
label: string;
|
|
9
|
+
data: number[];
|
|
10
|
+
}
|
|
11
|
+
export interface StatsData {
|
|
12
|
+
datasets: StatsDataSet[];
|
|
13
|
+
labels: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface StatsChart {
|
|
16
|
+
[key: string]: StatsData;
|
|
17
|
+
}
|
|
18
|
+
export interface StatsBag {
|
|
19
|
+
[key: string]: StatsChart;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TIME_SCALES = exports.TimeScale = void 0;
|
|
4
|
+
var TimeScale;
|
|
5
|
+
(function (TimeScale) {
|
|
6
|
+
TimeScale["DAYS"] = "DAYS";
|
|
7
|
+
TimeScale["WEEKS"] = "WEEKS";
|
|
8
|
+
TimeScale["MONTHS"] = "MONTHS";
|
|
9
|
+
})((TimeScale = exports.TimeScale || (exports.TimeScale = {})));
|
|
10
|
+
exports.TIME_SCALES = Object.keys(TimeScale);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { SubjectDto } from './interfaces';
|
|
3
|
+
import { RecordsMap } from '../records';
|
|
4
|
+
import { RCApiOptions } from '../http';
|
|
5
|
+
export declare function listSubjects(name: string, options?: RCApiOptions): Observable<SubjectDto[]>;
|
|
6
|
+
export declare function getSubject(name: string, options?: RCApiOptions): Observable<SubjectDto>;
|
|
7
|
+
export declare function createSubject(subject: SubjectDto, options?: RCApiOptions): Observable<SubjectDto>;
|
|
8
|
+
export declare function updateSubject(subject: SubjectDto, options?: RCApiOptions): Observable<SubjectDto>;
|
|
9
|
+
export declare function listSubjectRecords(subject: string, options?: RCApiOptions): Observable<RecordsMap>;
|
package/subjects/api.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listSubjectRecords =
|
|
4
|
+
exports.updateSubject =
|
|
5
|
+
exports.createSubject =
|
|
6
|
+
exports.getSubject =
|
|
7
|
+
exports.listSubjects =
|
|
8
|
+
void 0;
|
|
9
|
+
var api_1 = require("../api");
|
|
10
|
+
function listSubjects(name, options) {
|
|
11
|
+
return api_1.RightConsents.http({
|
|
12
|
+
method: "GET",
|
|
13
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/subjects"),
|
|
14
|
+
params: { name: name },
|
|
15
|
+
options: options,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
exports.listSubjects = listSubjects;
|
|
19
|
+
function getSubject(name, options) {
|
|
20
|
+
return api_1.RightConsents.http({
|
|
21
|
+
method: "GET",
|
|
22
|
+
url: ""
|
|
23
|
+
.concat(api_1.RightConsents.config.apiRoot, "/subjects/")
|
|
24
|
+
.concat(name),
|
|
25
|
+
options: options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
exports.getSubject = getSubject;
|
|
29
|
+
function createSubject(subject, options) {
|
|
30
|
+
return api_1.RightConsents.http({
|
|
31
|
+
method: "POST",
|
|
32
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/subjects"),
|
|
33
|
+
body: subject,
|
|
34
|
+
options: options,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
exports.createSubject = createSubject;
|
|
38
|
+
function updateSubject(subject, options) {
|
|
39
|
+
return api_1.RightConsents.http({
|
|
40
|
+
method: "PUT",
|
|
41
|
+
url: ""
|
|
42
|
+
.concat(api_1.RightConsents.config.apiRoot, "/subjects/")
|
|
43
|
+
.concat(subject.id),
|
|
44
|
+
body: subject,
|
|
45
|
+
options: options,
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
exports.updateSubject = updateSubject;
|
|
49
|
+
function listSubjectRecords(subject, options) {
|
|
50
|
+
return api_1.RightConsents.http({
|
|
51
|
+
method: "GET",
|
|
52
|
+
url: ""
|
|
53
|
+
.concat(api_1.RightConsents.config.apiRoot, "/subjects/")
|
|
54
|
+
.concat(subject, "/records"),
|
|
55
|
+
options: options,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
exports.listSubjectRecords = listSubjectRecords;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./interfaces"), exports);
|
|
34
|
+
__exportStar(require("./api"), exports);
|
package/system/api.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ClientConfigDto, SupportInfoDto } from './interfaces';
|
|
3
|
+
import { RCApiOptions } from '../http';
|
|
4
|
+
export declare function getSupportInfo(options?: RCApiOptions): Observable<SupportInfoDto>;
|
|
5
|
+
export declare function getClientConfig(options?: RCApiOptions): Observable<ClientConfigDto>;
|
package/system/api.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getClientConfig = exports.getSupportInfo = void 0;
|
|
4
|
+
var api_1 = require("../api");
|
|
5
|
+
function getSupportInfo(options) {
|
|
6
|
+
return api_1.RightConsents.http({
|
|
7
|
+
method: "GET",
|
|
8
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/system/support/infos"),
|
|
9
|
+
options: options,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
exports.getSupportInfo = getSupportInfo;
|
|
13
|
+
function getClientConfig(options) {
|
|
14
|
+
return api_1.RightConsents.http({
|
|
15
|
+
method: "GET",
|
|
16
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/system/config"),
|
|
17
|
+
options: options,
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
exports.getClientConfig = getClientConfig;
|
package/system/index.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding =
|
|
3
|
+
(this && this.__createBinding) ||
|
|
4
|
+
(Object.create
|
|
5
|
+
? function (o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (
|
|
9
|
+
!desc ||
|
|
10
|
+
("get" in desc ? !m.__esModule : desc.writable || desc.configurable)
|
|
11
|
+
) {
|
|
12
|
+
desc = {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return m[k];
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}
|
|
21
|
+
: function (o, m, k, k2) {
|
|
22
|
+
if (k2 === undefined) k2 = k;
|
|
23
|
+
o[k2] = m[k];
|
|
24
|
+
});
|
|
25
|
+
var __exportStar =
|
|
26
|
+
(this && this.__exportStar) ||
|
|
27
|
+
function (m, exports) {
|
|
28
|
+
for (var p in m)
|
|
29
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p))
|
|
30
|
+
__createBinding(exports, m, p);
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
__exportStar(require("./interfaces"), exports);
|
|
34
|
+
__exportStar(require("./api"), exports);
|