@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.
Files changed (83) hide show
  1. package/LICENSE.txt +21 -0
  2. package/README.md +116 -0
  3. package/api.d.ts +19 -0
  4. package/api.js +67 -0
  5. package/common.d.ts +8 -0
  6. package/common.js +2 -0
  7. package/consents/api.d.ts +9 -0
  8. package/consents/api.js +69 -0
  9. package/consents/helpers.d.ts +6 -0
  10. package/consents/helpers.js +24 -0
  11. package/consents/index.d.ts +3 -0
  12. package/consents/index.js +35 -0
  13. package/consents/interfaces.d.ts +74 -0
  14. package/consents/interfaces.js +32 -0
  15. package/css-autocomplete.d.ts +14 -0
  16. package/css-autocomplete.js +809 -0
  17. package/forms/consent-collector.d.ts +11 -0
  18. package/forms/consent-collector.js +115 -0
  19. package/forms/index.d.ts +2 -0
  20. package/forms/index.js +34 -0
  21. package/forms/interfaces.d.ts +12 -0
  22. package/forms/interfaces.js +2 -0
  23. package/http.d.ts +37 -0
  24. package/http.js +46 -0
  25. package/index.d.ts +15 -0
  26. package/index.js +46 -0
  27. package/keys/api.d.ts +6 -0
  28. package/keys/api.js +29 -0
  29. package/keys/index.d.ts +2 -0
  30. package/keys/index.js +34 -0
  31. package/keys/interfaces.d.ts +15 -0
  32. package/keys/interfaces.js +2 -0
  33. package/models/api.d.ts +23 -0
  34. package/models/api.js +228 -0
  35. package/models/helpers.d.ts +6 -0
  36. package/models/helpers.js +29 -0
  37. package/models/index.d.ts +3 -0
  38. package/models/index.js +35 -0
  39. package/models/interfaces.d.ts +246 -0
  40. package/models/interfaces.js +139 -0
  41. package/package.json +48 -0
  42. package/receipts/api.d.ts +3 -0
  43. package/receipts/api.js +16 -0
  44. package/receipts/index.d.ts +1 -0
  45. package/receipts/index.js +33 -0
  46. package/receipts/interfaces.d.ts +0 -0
  47. package/receipts/interfaces.js +1 -0
  48. package/records/api.d.ts +6 -0
  49. package/records/api.js +38 -0
  50. package/records/index.d.ts +2 -0
  51. package/records/index.js +34 -0
  52. package/records/interfaces.d.ts +116 -0
  53. package/records/interfaces.js +60 -0
  54. package/statistics/api.d.ts +4 -0
  55. package/statistics/api.js +12 -0
  56. package/statistics/index.d.ts +2 -0
  57. package/statistics/index.js +34 -0
  58. package/statistics/interfaces.d.ts +20 -0
  59. package/statistics/interfaces.js +10 -0
  60. package/subjects/api.d.ts +9 -0
  61. package/subjects/api.js +58 -0
  62. package/subjects/index.d.ts +2 -0
  63. package/subjects/index.js +34 -0
  64. package/subjects/interfaces.d.ts +7 -0
  65. package/subjects/interfaces.js +2 -0
  66. package/system/api.d.ts +5 -0
  67. package/system/api.js +20 -0
  68. package/system/index.d.ts +2 -0
  69. package/system/index.js +34 -0
  70. package/system/interfaces.d.ts +20 -0
  71. package/system/interfaces.js +2 -0
  72. package/tokens/api.d.ts +4 -0
  73. package/tokens/api.js +14 -0
  74. package/tokens/index.d.ts +2 -0
  75. package/tokens/index.js +34 -0
  76. package/tokens/interfaces.d.ts +5 -0
  77. package/tokens/interfaces.js +2 -0
  78. package/users/api.d.ts +9 -0
  79. package/users/api.js +28 -0
  80. package/users/index.d.ts +2 -0
  81. package/users/index.js +34 -0
  82. package/users/interfaces.d.ts +10 -0
  83. package/users/interfaces.js +2 -0
package/models/api.js ADDED
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.importEntry =
4
+ exports.exportEntry =
5
+ exports.deleteVersion =
6
+ exports.getVersionPreview =
7
+ exports.updateVersionType =
8
+ exports.updateVersionStatus =
9
+ exports.updateVersion =
10
+ exports.getVersion =
11
+ exports.getActiveVersion =
12
+ exports.getLatestVersion =
13
+ exports.createVersion =
14
+ exports.listVersions =
15
+ exports.setDefaultInfoModel =
16
+ exports.deleteEntry =
17
+ exports.updateEntry =
18
+ exports.getEntry =
19
+ exports.createEntry =
20
+ exports.listEntries =
21
+ exports.NEW_VERSION_UUID =
22
+ void 0;
23
+ var api_1 = require("../api");
24
+ exports.NEW_VERSION_UUID = "11111111-9999-1111-9999-111111111111";
25
+ function listEntries(filter, options) {
26
+ if (options === void 0) {
27
+ options = { noAuth: true };
28
+ }
29
+ return api_1.RightConsents.http({
30
+ method: "GET",
31
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models"),
32
+ params: filter,
33
+ options: options,
34
+ });
35
+ }
36
+ exports.listEntries = listEntries;
37
+ function createEntry(dto, options) {
38
+ return api_1.RightConsents.http({
39
+ method: "POST",
40
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models"),
41
+ body: dto,
42
+ options: options,
43
+ });
44
+ }
45
+ exports.createEntry = createEntry;
46
+ function getEntry(id, options) {
47
+ if (options === void 0) {
48
+ options = { noAuth: true };
49
+ }
50
+ return api_1.RightConsents.http({
51
+ method: "GET",
52
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models/").concat(id),
53
+ options: options,
54
+ });
55
+ }
56
+ exports.getEntry = getEntry;
57
+ function updateEntry(id, dto, options) {
58
+ return api_1.RightConsents.http({
59
+ method: "PUT",
60
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models/").concat(id),
61
+ body: dto,
62
+ options: options,
63
+ });
64
+ }
65
+ exports.updateEntry = updateEntry;
66
+ function deleteEntry(id, options) {
67
+ return api_1.RightConsents.http({
68
+ method: "DELETE",
69
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models/").concat(id),
70
+ options: options,
71
+ });
72
+ }
73
+ exports.deleteEntry = deleteEntry;
74
+ function setDefaultInfoModel(user, operator, form, options) {
75
+ return api_1.RightConsents.http({
76
+ method: "POST",
77
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models/defaultinfo"),
78
+ params: { user: user, operator: operator, form: form },
79
+ options: options,
80
+ });
81
+ }
82
+ exports.setDefaultInfoModel = setDefaultInfoModel;
83
+ function listVersions(id, options) {
84
+ if (options === void 0) {
85
+ options = { noAuth: true };
86
+ }
87
+ return api_1.RightConsents.http({
88
+ method: "GET",
89
+ url: ""
90
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
91
+ .concat(id, "/versions"),
92
+ options: options,
93
+ });
94
+ }
95
+ exports.listVersions = listVersions;
96
+ function createVersion(id, dto, options) {
97
+ return api_1.RightConsents.http({
98
+ method: "POST",
99
+ url: ""
100
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
101
+ .concat(id, "/versions"),
102
+ body: dto,
103
+ options: options,
104
+ });
105
+ }
106
+ exports.createVersion = createVersion;
107
+ function getLatestVersion(id, options) {
108
+ if (options === void 0) {
109
+ options = { noAuth: true };
110
+ }
111
+ return api_1.RightConsents.http({
112
+ method: "GET",
113
+ url: ""
114
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
115
+ .concat(id, "/versions/latest"),
116
+ options: options,
117
+ });
118
+ }
119
+ exports.getLatestVersion = getLatestVersion;
120
+ function getActiveVersion(id, options) {
121
+ if (options === void 0) {
122
+ options = { noAuth: true };
123
+ }
124
+ return api_1.RightConsents.http({
125
+ method: "GET",
126
+ url: ""
127
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
128
+ .concat(id, "/versions/active"),
129
+ options: options,
130
+ });
131
+ }
132
+ exports.getActiveVersion = getActiveVersion;
133
+ function getVersion(id, versionId, options) {
134
+ if (options === void 0) {
135
+ options = { noAuth: true };
136
+ }
137
+ return api_1.RightConsents.http({
138
+ method: "GET",
139
+ url: ""
140
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
141
+ .concat(id, "/versions/")
142
+ .concat(versionId),
143
+ options: options,
144
+ });
145
+ }
146
+ exports.getVersion = getVersion;
147
+ function updateVersion(id, versionId, dto, options) {
148
+ return api_1.RightConsents.http({
149
+ method: "PUT",
150
+ url: ""
151
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
152
+ .concat(id, "/versions/")
153
+ .concat(versionId),
154
+ body: dto,
155
+ options: options,
156
+ });
157
+ }
158
+ exports.updateVersion = updateVersion;
159
+ function updateVersionStatus(id, versionId, status, options) {
160
+ return api_1.RightConsents.http({
161
+ method: "PUT",
162
+ url: ""
163
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
164
+ .concat(id, "/versions/")
165
+ .concat(versionId, "/status"),
166
+ body: { status: status },
167
+ options: options,
168
+ });
169
+ }
170
+ exports.updateVersionStatus = updateVersionStatus;
171
+ function updateVersionType(id, versionId, type, options) {
172
+ return api_1.RightConsents.http({
173
+ method: "PUT",
174
+ url: ""
175
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
176
+ .concat(id, "/versions/")
177
+ .concat(versionId, "/type"),
178
+ body: { type: type },
179
+ options: options,
180
+ });
181
+ }
182
+ exports.updateVersionType = updateVersionType;
183
+ function getVersionPreview(id, vid, dto, options) {
184
+ return api_1.RightConsents.http({
185
+ method: "POST",
186
+ url: ""
187
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
188
+ .concat(id, "/versions/")
189
+ .concat(vid, "/preview"),
190
+ body: dto,
191
+ responseType: "text",
192
+ options: options,
193
+ });
194
+ }
195
+ exports.getVersionPreview = getVersionPreview;
196
+ function deleteVersion(id, versionId, options) {
197
+ return api_1.RightConsents.http({
198
+ method: "DELETE",
199
+ url: ""
200
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
201
+ .concat(id, "/versions/")
202
+ .concat(versionId),
203
+ options: options,
204
+ });
205
+ }
206
+ exports.deleteVersion = deleteVersion;
207
+ function exportEntry(id, options) {
208
+ if (options === void 0) {
209
+ options = { noAuth: true };
210
+ }
211
+ return api_1.RightConsents.http({
212
+ method: "GET",
213
+ url: ""
214
+ .concat(api_1.RightConsents.config.apiRoot, "/models/")
215
+ .concat(id, "/export"),
216
+ options: options,
217
+ });
218
+ }
219
+ exports.exportEntry = exportEntry;
220
+ function importEntry(dto, options) {
221
+ return api_1.RightConsents.http({
222
+ method: "POST",
223
+ url: "".concat(api_1.RightConsents.config.apiRoot, "/models/import"),
224
+ body: dto,
225
+ options: options,
226
+ });
227
+ }
228
+ exports.importEntry = importEntry;
@@ -0,0 +1,6 @@
1
+ import { ModelData, ModelEntryDto, ModelVersionDtoLight } from './interfaces';
2
+ export declare class ModelEntryHelper {
3
+ static getActiveVersionIdentifier(model: ModelEntryDto): string | null;
4
+ static getActiveVersion<T extends ModelData = ModelData>(model: ModelEntryDto): ModelVersionDtoLight<T> | undefined;
5
+ static hasActiveVersion(model: ModelEntryDto): boolean;
6
+ }
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModelEntryHelper = void 0;
4
+ var interfaces_1 = require("./interfaces");
5
+ var ModelEntryHelper = /** @class */ (function () {
6
+ function ModelEntryHelper() {}
7
+ ModelEntryHelper.getActiveVersionIdentifier = function (model) {
8
+ var activeVersion = ModelEntryHelper.getActiveVersion(model);
9
+ return activeVersion != null
10
+ ? ""
11
+ .concat(model.type, "/")
12
+ .concat(model.key, "/")
13
+ .concat(activeVersion.serial)
14
+ : null;
15
+ };
16
+ ModelEntryHelper.getActiveVersion = function (model) {
17
+ return model.versions.find(function (v) {
18
+ return v.status === interfaces_1.ModelVersionStatus.ACTIVE;
19
+ });
20
+ };
21
+ ModelEntryHelper.hasActiveVersion = function (model) {
22
+ return (
23
+ model.status !== interfaces_1.ModelEntryStatus.DELETED &&
24
+ ModelEntryHelper.getActiveVersion(model) != null
25
+ );
26
+ };
27
+ return ModelEntryHelper;
28
+ })();
29
+ exports.ModelEntryHelper = ModelEntryHelper;
@@ -0,0 +1,3 @@
1
+ export * from './interfaces';
2
+ export * from './api';
3
+ export * from './helpers';
@@ -0,0 +1,35 @@
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);
35
+ __exportStar(require("./helpers"), exports);
@@ -0,0 +1,246 @@
1
+ import { SortDirection } from '../common';
2
+ export declare enum ModelEntryStatus {
3
+ ACTIVE = "ACTIVE",
4
+ INACTIVE = "INACTIVE",
5
+ DELETED = "DELETED"
6
+ }
7
+ export declare type ModelEntryStatuses = keyof ModelEntryStatus;
8
+ export declare const MODEL_ENTRY_STATUSES: ModelEntryStatuses[];
9
+ export interface ModelData {
10
+ type: ModelDataType;
11
+ }
12
+ export declare enum ModelVersionStatus {
13
+ DRAFT = "DRAFT",
14
+ ACTIVE = "ACTIVE",
15
+ ARCHIVED = "ARCHIVED"
16
+ }
17
+ export declare enum ModelVersionType {
18
+ MAJOR = "MAJOR",
19
+ MINOR = "MINOR"
20
+ }
21
+ export interface Information extends ModelData {
22
+ type: 'information';
23
+ title: string;
24
+ header: string;
25
+ footer: string;
26
+ jurisdiction: string;
27
+ jurisdictionVisible: boolean;
28
+ dataController: Controller;
29
+ dataControllerVisible: boolean;
30
+ scope: string;
31
+ scopeVisible: boolean;
32
+ shortNoticeLink: string;
33
+ shortNoticeLinkVisible: boolean;
34
+ privacyPolicyUrl: string;
35
+ customPrivacyPolicyText: string;
36
+ }
37
+ export declare enum DefaultInfoTag {
38
+ DEFAULT_INFO_USER = "DEFAULT_INFO_USER",
39
+ DEFAULT_INFO_OPERATOR = "DEFAULT_INFO_OPERATOR",
40
+ DEFAULT_INFO_FORM = "DEFAULT_INFO_FORM"
41
+ }
42
+ export declare const DEFAULT_INFO_TAGS: string[];
43
+ export interface Controller {
44
+ company: string;
45
+ info: string;
46
+ address: string;
47
+ email: string;
48
+ phoneNumber: string;
49
+ }
50
+ export declare enum RetentionUnit {
51
+ YEAR = "YEAR",
52
+ MONTH = "MONTH",
53
+ WEEK = "WEEK"
54
+ }
55
+ export declare const RETENTION_UNITS: string[];
56
+ export declare enum ProcessingPurpose {
57
+ CONSENT_CORE_SERVICE = "CONSENT_CORE_SERVICE",
58
+ CONSENT_IMPROVED_SERVICE = "CONSENT_IMPROVED_SERVICE",
59
+ CONSENT_MARKETING = "CONSENT_MARKETING",
60
+ CONSENT_THIRD_PART_SHARING = "CONSENT_THIRD_PART_SHARING",
61
+ CONSENT_RESEARCH = "CONSENT_RESEARCH"
62
+ }
63
+ export declare const PROCESSING_PURPOSES: string[];
64
+ export declare enum ProcessingLegalBasis {
65
+ LEGAL_BASIS_CONSENT = "LEGAL_BASIS_CONSENT",
66
+ LEGAL_BASIS_CONTRACT = "LEGAL_BASIS_CONTRACT",
67
+ LEGAL_BASIS_LEGITIMATE_INTEREST = "LEGAL_BASIS_LEGITIMATE_INTEREST",
68
+ LEGAL_BASIS_LEGAL_OBLIGATION = "LEGAL_BASIS_LEGAL_OBLIGATION",
69
+ LEGAL_BASIS_PUBLIC_INTEREST = "LEGAL_BASIS_PUBLIC_INTEREST",
70
+ LEGAL_BASIS_VITAL_INTEREST = "LEGAL_BASIS_VITAL_INTEREST"
71
+ }
72
+ export declare const PROCESSING_LEGAL_BASES: string[];
73
+ export interface RetentionInfo {
74
+ label: string;
75
+ value: number;
76
+ unit: RetentionUnit;
77
+ fullText: string;
78
+ }
79
+ export interface Processing extends ModelData {
80
+ type: 'processing';
81
+ title: string;
82
+ legalBasis: ProcessingLegalBasis;
83
+ data: string;
84
+ retention: RetentionInfo;
85
+ usage: string;
86
+ purposes: ProcessingPurpose[];
87
+ containsSensitiveData: boolean;
88
+ containsMedicalData: boolean;
89
+ dataController: Controller;
90
+ dataControllerVisible: boolean;
91
+ thirdParties: {
92
+ name: string;
93
+ value: string;
94
+ }[];
95
+ }
96
+ export declare enum PreferenceValueType {
97
+ TOGGLE = "TOGGLE",
98
+ CHECKBOXES = "CHECKBOXES",
99
+ RADIO_BUTTONS = "RADIO_BUTTONS",
100
+ LIST_SINGLE = "LIST_SINGLE",
101
+ LIST_MULTI = "LIST_MULTI",
102
+ FREE_TEXT = "FREE_TEXT"
103
+ }
104
+ export declare const PREFERENCE_VALUE_TYPES: PreferenceValueType[];
105
+ export interface Preference extends ModelData {
106
+ type: 'preference';
107
+ label: string;
108
+ description: string;
109
+ options: string[];
110
+ valueType: PreferenceValueType;
111
+ includeDefault: boolean;
112
+ defaultValues: string[];
113
+ optional: boolean;
114
+ }
115
+ export interface Conditions extends ModelData {
116
+ type: 'conditions';
117
+ title: string;
118
+ body: string;
119
+ refusable?: boolean;
120
+ }
121
+ export declare enum LogoPosition {
122
+ LEFT = "LEFT",
123
+ CENTER = "CENTER",
124
+ RIGHT = "RIGHT"
125
+ }
126
+ export declare const LOGO_POSITIONS: string[];
127
+ export interface Theme extends ModelData {
128
+ type: 'theme';
129
+ name: string;
130
+ icon: string;
131
+ css: string;
132
+ logoPath?: string;
133
+ logoAltText?: string;
134
+ logoPosition?: LogoPosition;
135
+ }
136
+ export interface Email extends ModelData {
137
+ type: 'email';
138
+ sender: string;
139
+ subject: string;
140
+ title: string;
141
+ body: string;
142
+ buttonLabel: string;
143
+ footer: string;
144
+ signature: string;
145
+ }
146
+ export interface FormLayout extends ModelData {
147
+ type: 'layout';
148
+ info: string;
149
+ elements: string[];
150
+ theme?: string;
151
+ notification?: string;
152
+ orientation?: FormLayoutOrientation;
153
+ existingElementsVisible?: boolean;
154
+ validityVisible?: boolean;
155
+ includeIFrameResizer?: boolean;
156
+ acceptAllVisible?: boolean;
157
+ acceptAllText?: string;
158
+ submitText?: string;
159
+ cancelText?: string;
160
+ cancelVisible?: boolean;
161
+ footerOnTop?: boolean;
162
+ }
163
+ export declare enum FormLayoutOrientation {
164
+ HORIZONTAL = "HORIZONTAL",
165
+ VERTICAL = "VERTICAL"
166
+ }
167
+ export declare const CONSENT_FORM_ORIENTATIONS: FormLayoutOrientation[];
168
+ export declare enum ConsentOrigin {
169
+ WEBFORM = "WEBFORM",
170
+ OPERATOR = "OPERATOR",
171
+ USER = "USER"
172
+ }
173
+ export declare const CONSENT_ORIGIN: ConsentOrigin[];
174
+ export declare type ModelDataType = 'information' | 'processing' | 'conditions' | 'theme' | 'email' | 'preference' | 'layout';
175
+ export declare enum PreviewType {
176
+ FORM = "FORM",
177
+ RECEIPT = "RECEIPT",
178
+ EMAIL = "EMAIL"
179
+ }
180
+ export declare const PREVIEW_TYPES: string[];
181
+ export interface ModelFilter {
182
+ types?: ModelDataType[];
183
+ keys?: string[];
184
+ keyword?: string;
185
+ statuses?: ModelEntryStatus[];
186
+ languages?: string[];
187
+ page?: number;
188
+ size?: number;
189
+ order?: string;
190
+ direction?: SortDirection;
191
+ tags?: string[];
192
+ }
193
+ export interface PreviewDto {
194
+ language: string;
195
+ orientation: FormLayoutOrientation;
196
+ data?: ModelData;
197
+ previewType?: PreviewType;
198
+ }
199
+ export interface CreateModelDto {
200
+ key: string;
201
+ name: string;
202
+ description: string;
203
+ type: ModelDataType;
204
+ }
205
+ export interface UpdateModelDto {
206
+ name: string;
207
+ description: string;
208
+ }
209
+ export interface ModelVersionDtoLight<T extends ModelData = ModelData> {
210
+ id?: string;
211
+ serial?: string;
212
+ parent?: string;
213
+ child?: string;
214
+ author?: string;
215
+ defaultLanguage?: string;
216
+ availableLanguages?: string[];
217
+ status?: ModelVersionStatus;
218
+ type?: ModelVersionType;
219
+ creationDate?: number;
220
+ modificationDate?: number;
221
+ identifier?: string;
222
+ }
223
+ export interface ModelVersionDto<T extends ModelData = ModelData> extends ModelVersionDtoLight {
224
+ data: {
225
+ [language: string]: T;
226
+ };
227
+ }
228
+ export interface ModelEntryDtoPartial {
229
+ id: string;
230
+ key: string;
231
+ name: string;
232
+ description: string;
233
+ type: ModelDataType;
234
+ creationDate: number;
235
+ modificationDate: number;
236
+ status: ModelEntryStatus;
237
+ defaultLanguage: string;
238
+ availableLanguages: string[];
239
+ tags?: string[];
240
+ }
241
+ export interface ModelEntryDto extends ModelEntryDtoPartial {
242
+ versions: ModelVersionDtoLight[];
243
+ }
244
+ export interface ModelEntryExportDto extends ModelEntryDtoPartial {
245
+ versions: ModelVersionDto[];
246
+ }
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PREVIEW_TYPES =
4
+ exports.PreviewType =
5
+ exports.CONSENT_ORIGIN =
6
+ exports.ConsentOrigin =
7
+ exports.CONSENT_FORM_ORIENTATIONS =
8
+ exports.FormLayoutOrientation =
9
+ exports.LOGO_POSITIONS =
10
+ exports.LogoPosition =
11
+ exports.PREFERENCE_VALUE_TYPES =
12
+ exports.PreferenceValueType =
13
+ exports.PROCESSING_LEGAL_BASES =
14
+ exports.ProcessingLegalBasis =
15
+ exports.PROCESSING_PURPOSES =
16
+ exports.ProcessingPurpose =
17
+ exports.RETENTION_UNITS =
18
+ exports.RetentionUnit =
19
+ exports.DEFAULT_INFO_TAGS =
20
+ exports.DefaultInfoTag =
21
+ exports.ModelVersionType =
22
+ exports.ModelVersionStatus =
23
+ exports.MODEL_ENTRY_STATUSES =
24
+ exports.ModelEntryStatus =
25
+ void 0;
26
+ var ModelEntryStatus;
27
+ (function (ModelEntryStatus) {
28
+ ModelEntryStatus["ACTIVE"] = "ACTIVE";
29
+ ModelEntryStatus["INACTIVE"] = "INACTIVE";
30
+ ModelEntryStatus["DELETED"] = "DELETED";
31
+ })(
32
+ (ModelEntryStatus =
33
+ exports.ModelEntryStatus || (exports.ModelEntryStatus = {}))
34
+ );
35
+ exports.MODEL_ENTRY_STATUSES = Object.keys(ModelEntryStatus);
36
+ var ModelVersionStatus;
37
+ (function (ModelVersionStatus) {
38
+ ModelVersionStatus["DRAFT"] = "DRAFT";
39
+ ModelVersionStatus["ACTIVE"] = "ACTIVE";
40
+ ModelVersionStatus["ARCHIVED"] = "ARCHIVED";
41
+ })(
42
+ (ModelVersionStatus =
43
+ exports.ModelVersionStatus || (exports.ModelVersionStatus = {}))
44
+ );
45
+ var ModelVersionType;
46
+ (function (ModelVersionType) {
47
+ ModelVersionType["MAJOR"] = "MAJOR";
48
+ ModelVersionType["MINOR"] = "MINOR";
49
+ })(
50
+ (ModelVersionType =
51
+ exports.ModelVersionType || (exports.ModelVersionType = {}))
52
+ );
53
+ var DefaultInfoTag;
54
+ (function (DefaultInfoTag) {
55
+ DefaultInfoTag["DEFAULT_INFO_USER"] = "DEFAULT_INFO_USER";
56
+ DefaultInfoTag["DEFAULT_INFO_OPERATOR"] = "DEFAULT_INFO_OPERATOR";
57
+ DefaultInfoTag["DEFAULT_INFO_FORM"] = "DEFAULT_INFO_FORM";
58
+ })((DefaultInfoTag = exports.DefaultInfoTag || (exports.DefaultInfoTag = {})));
59
+ exports.DEFAULT_INFO_TAGS = Object.keys(DefaultInfoTag);
60
+ var RetentionUnit;
61
+ (function (RetentionUnit) {
62
+ RetentionUnit["YEAR"] = "YEAR";
63
+ RetentionUnit["MONTH"] = "MONTH";
64
+ RetentionUnit["WEEK"] = "WEEK";
65
+ })((RetentionUnit = exports.RetentionUnit || (exports.RetentionUnit = {})));
66
+ exports.RETENTION_UNITS = Object.keys(RetentionUnit);
67
+ var ProcessingPurpose;
68
+ (function (ProcessingPurpose) {
69
+ ProcessingPurpose["CONSENT_CORE_SERVICE"] = "CONSENT_CORE_SERVICE";
70
+ ProcessingPurpose["CONSENT_IMPROVED_SERVICE"] = "CONSENT_IMPROVED_SERVICE";
71
+ ProcessingPurpose["CONSENT_MARKETING"] = "CONSENT_MARKETING";
72
+ ProcessingPurpose["CONSENT_THIRD_PART_SHARING"] =
73
+ "CONSENT_THIRD_PART_SHARING";
74
+ ProcessingPurpose["CONSENT_RESEARCH"] = "CONSENT_RESEARCH";
75
+ })(
76
+ (ProcessingPurpose =
77
+ exports.ProcessingPurpose || (exports.ProcessingPurpose = {}))
78
+ );
79
+ exports.PROCESSING_PURPOSES = Object.keys(ProcessingPurpose);
80
+ var ProcessingLegalBasis;
81
+ (function (ProcessingLegalBasis) {
82
+ ProcessingLegalBasis["LEGAL_BASIS_CONSENT"] = "LEGAL_BASIS_CONSENT";
83
+ ProcessingLegalBasis["LEGAL_BASIS_CONTRACT"] = "LEGAL_BASIS_CONTRACT";
84
+ ProcessingLegalBasis["LEGAL_BASIS_LEGITIMATE_INTEREST"] =
85
+ "LEGAL_BASIS_LEGITIMATE_INTEREST";
86
+ ProcessingLegalBasis["LEGAL_BASIS_LEGAL_OBLIGATION"] =
87
+ "LEGAL_BASIS_LEGAL_OBLIGATION";
88
+ ProcessingLegalBasis["LEGAL_BASIS_PUBLIC_INTEREST"] =
89
+ "LEGAL_BASIS_PUBLIC_INTEREST";
90
+ ProcessingLegalBasis["LEGAL_BASIS_VITAL_INTEREST"] =
91
+ "LEGAL_BASIS_VITAL_INTEREST";
92
+ })(
93
+ (ProcessingLegalBasis =
94
+ exports.ProcessingLegalBasis || (exports.ProcessingLegalBasis = {}))
95
+ );
96
+ exports.PROCESSING_LEGAL_BASES = Object.keys(ProcessingLegalBasis);
97
+ var PreferenceValueType;
98
+ (function (PreferenceValueType) {
99
+ PreferenceValueType["TOGGLE"] = "TOGGLE";
100
+ PreferenceValueType["CHECKBOXES"] = "CHECKBOXES";
101
+ PreferenceValueType["RADIO_BUTTONS"] = "RADIO_BUTTONS";
102
+ PreferenceValueType["LIST_SINGLE"] = "LIST_SINGLE";
103
+ PreferenceValueType["LIST_MULTI"] = "LIST_MULTI";
104
+ PreferenceValueType["FREE_TEXT"] = "FREE_TEXT";
105
+ })(
106
+ (PreferenceValueType =
107
+ exports.PreferenceValueType || (exports.PreferenceValueType = {}))
108
+ );
109
+ exports.PREFERENCE_VALUE_TYPES = Object.keys(PreferenceValueType);
110
+ var LogoPosition;
111
+ (function (LogoPosition) {
112
+ LogoPosition["LEFT"] = "LEFT";
113
+ LogoPosition["CENTER"] = "CENTER";
114
+ LogoPosition["RIGHT"] = "RIGHT";
115
+ })((LogoPosition = exports.LogoPosition || (exports.LogoPosition = {})));
116
+ exports.LOGO_POSITIONS = Object.keys(LogoPosition);
117
+ var FormLayoutOrientation;
118
+ (function (FormLayoutOrientation) {
119
+ FormLayoutOrientation["HORIZONTAL"] = "HORIZONTAL";
120
+ FormLayoutOrientation["VERTICAL"] = "VERTICAL";
121
+ })(
122
+ (FormLayoutOrientation =
123
+ exports.FormLayoutOrientation || (exports.FormLayoutOrientation = {}))
124
+ );
125
+ exports.CONSENT_FORM_ORIENTATIONS = Object.keys(FormLayoutOrientation);
126
+ var ConsentOrigin;
127
+ (function (ConsentOrigin) {
128
+ ConsentOrigin["WEBFORM"] = "WEBFORM";
129
+ ConsentOrigin["OPERATOR"] = "OPERATOR";
130
+ ConsentOrigin["USER"] = "USER";
131
+ })((ConsentOrigin = exports.ConsentOrigin || (exports.ConsentOrigin = {})));
132
+ exports.CONSENT_ORIGIN = Object.keys(ConsentOrigin);
133
+ var PreviewType;
134
+ (function (PreviewType) {
135
+ PreviewType["FORM"] = "FORM";
136
+ PreviewType["RECEIPT"] = "RECEIPT";
137
+ PreviewType["EMAIL"] = "EMAIL";
138
+ })((PreviewType = exports.PreviewType || (exports.PreviewType = {})));
139
+ exports.PREVIEW_TYPES = Object.keys(PreviewType);