@fairandsmart/consents-ce 2.0.7 → 2.0.8
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/consents/interfaces.d.ts +4 -2
- package/consents/interfaces.js +1 -1
- package/fairandsmart-consents-ce-2.0.8.tgz +0 -0
- package/index.d.ts +4 -3
- package/index.js +5 -4
- package/package.json +1 -1
- package/webhooks/api.d.ts +8 -0
- package/webhooks/api.js +61 -0
- package/webhooks/index.d.ts +2 -0
- package/webhooks/index.js +34 -0
- package/webhooks/interfaces.d.ts +22 -0
- package/webhooks/interfaces.js +10 -0
- package/fairandsmart-consents-ce-2.0.7.tgz +0 -0
package/consents/interfaces.d.ts
CHANGED
|
@@ -3,12 +3,12 @@ export declare enum Confirmation {
|
|
|
3
3
|
NONE = "NONE",
|
|
4
4
|
FORM_CODE = "FORM_CODE",
|
|
5
5
|
EMAIL_CODE = "EMAIL_CODE",
|
|
6
|
+
MAGIC_LINK = "MAGIC_LINK",
|
|
6
7
|
SMS_CODE = "SMS_CODE",
|
|
7
8
|
SIGNATURE = "SIGNATURE",
|
|
8
9
|
AUDIO_RECORD = "AUDIO_RECORD",
|
|
9
10
|
VIDEO_RECORD = "VIDEO_RECORD",
|
|
10
|
-
DIGITAL_SIGNATURE = "DIGITAL_SIGNATURE"
|
|
11
|
-
MAGIC_LINK = "MAGIC_LINK"
|
|
11
|
+
DIGITAL_SIGNATURE = "DIGITAL_SIGNATURE"
|
|
12
12
|
}
|
|
13
13
|
export declare const CONFIRMATION_TYPES: Confirmation[];
|
|
14
14
|
export declare enum SubjectInfosKeys {
|
|
@@ -76,6 +76,8 @@ export interface ConsentContext {
|
|
|
76
76
|
notification?: string;
|
|
77
77
|
/** Whether to send an invitation email upon transaction creation */
|
|
78
78
|
sendInvitation?: boolean;
|
|
79
|
+
/** used to tell where consent can be managed if needed */
|
|
80
|
+
managementUrl?: string;
|
|
79
81
|
}
|
|
80
82
|
export interface ConsentTransaction {
|
|
81
83
|
id: string;
|
package/consents/interfaces.js
CHANGED
|
@@ -10,12 +10,12 @@ var Confirmation;
|
|
|
10
10
|
Confirmation["NONE"] = "NONE";
|
|
11
11
|
Confirmation["FORM_CODE"] = "FORM_CODE";
|
|
12
12
|
Confirmation["EMAIL_CODE"] = "EMAIL_CODE";
|
|
13
|
+
Confirmation["MAGIC_LINK"] = "MAGIC_LINK";
|
|
13
14
|
Confirmation["SMS_CODE"] = "SMS_CODE";
|
|
14
15
|
Confirmation["SIGNATURE"] = "SIGNATURE";
|
|
15
16
|
Confirmation["AUDIO_RECORD"] = "AUDIO_RECORD";
|
|
16
17
|
Confirmation["VIDEO_RECORD"] = "VIDEO_RECORD";
|
|
17
18
|
Confirmation["DIGITAL_SIGNATURE"] = "DIGITAL_SIGNATURE";
|
|
18
|
-
Confirmation["MAGIC_LINK"] = "MAGIC_LINK";
|
|
19
19
|
})((Confirmation = exports.Confirmation || (exports.Confirmation = {})));
|
|
20
20
|
exports.CONFIRMATION_TYPES = Object.keys(Confirmation);
|
|
21
21
|
var SubjectInfosKeys;
|
|
Binary file
|
package/index.d.ts
CHANGED
|
@@ -2,9 +2,10 @@ export * from './http';
|
|
|
2
2
|
export * from './common';
|
|
3
3
|
export { RightConsents } from './api';
|
|
4
4
|
export * as ConsentsResource from './consents';
|
|
5
|
-
export * as
|
|
5
|
+
export * as FormResource from './forms';
|
|
6
6
|
export * as KeysResource from './keys';
|
|
7
|
-
export * as
|
|
7
|
+
export * as ModelsResource from './models';
|
|
8
|
+
export * as PeerResources from './peers';
|
|
8
9
|
export * as RecordsResource from './records';
|
|
9
10
|
export * as StatsResource from './statistics';
|
|
10
11
|
export * as SubjectsResource from './subjects';
|
|
@@ -12,4 +13,4 @@ export * as SystemResource from './system';
|
|
|
12
13
|
export * as TokensResource from './tokens';
|
|
13
14
|
export * as UsersResource from './users';
|
|
14
15
|
export { ConsentCollector } from './forms';
|
|
15
|
-
export declare const version = "
|
|
16
|
+
export declare const version = "v2.0.8 (ce)";
|
package/index.js
CHANGED
|
@@ -26,15 +26,16 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.version = exports.ConsentCollector = exports.UsersResource = exports.TokensResource = exports.SystemResource = exports.SubjectsResource = exports.StatsResource = exports.RecordsResource = exports.
|
|
29
|
+
exports.version = exports.ConsentCollector = exports.UsersResource = exports.TokensResource = exports.SystemResource = exports.SubjectsResource = exports.StatsResource = exports.RecordsResource = exports.PeerResources = exports.ModelsResource = exports.KeysResource = exports.FormResource = exports.ConsentsResource = exports.RightConsents = void 0;
|
|
30
30
|
__exportStar(require("./http"), exports);
|
|
31
31
|
__exportStar(require("./common"), exports);
|
|
32
32
|
var api_1 = require("./api");
|
|
33
33
|
Object.defineProperty(exports, "RightConsents", { enumerable: true, get: function () { return api_1.RightConsents; } });
|
|
34
34
|
exports.ConsentsResource = __importStar(require("./consents"));
|
|
35
|
-
exports.
|
|
35
|
+
exports.FormResource = __importStar(require("./forms"));
|
|
36
36
|
exports.KeysResource = __importStar(require("./keys"));
|
|
37
|
-
exports.
|
|
37
|
+
exports.ModelsResource = __importStar(require("./models"));
|
|
38
|
+
exports.PeerResources = __importStar(require("./peers"));
|
|
38
39
|
exports.RecordsResource = __importStar(require("./records"));
|
|
39
40
|
exports.StatsResource = __importStar(require("./statistics"));
|
|
40
41
|
exports.SubjectsResource = __importStar(require("./subjects"));
|
|
@@ -43,4 +44,4 @@ exports.TokensResource = __importStar(require("./tokens"));
|
|
|
43
44
|
exports.UsersResource = __importStar(require("./users"));
|
|
44
45
|
var forms_1 = require("./forms");
|
|
45
46
|
Object.defineProperty(exports, "ConsentCollector", { enumerable: true, get: function () { return forms_1.ConsentCollector; } });
|
|
46
|
-
exports.version = "
|
|
47
|
+
exports.version = "v2.0.8 (ce)";
|
package/package.json
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { WebhookDto } from './interfaces';
|
|
3
|
+
import { RCApiOptions } from '../http';
|
|
4
|
+
export declare function listWebhooks(options?: RCApiOptions): Observable<WebhookDto>;
|
|
5
|
+
export declare function createWebhook(webhook: WebhookDto, options?: RCApiOptions): Observable<WebhookDto>;
|
|
6
|
+
export declare function getWebhook(webhookid: string, options?: RCApiOptions): Observable<WebhookDto>;
|
|
7
|
+
export declare function updateWebhook(webhookid: string, webhook: WebhookDto, options?: RCApiOptions): Observable<WebhookDto>;
|
|
8
|
+
export declare function deleteWebhook(webhookid: string, options?: RCApiOptions): Observable<WebhookDto>;
|
package/webhooks/api.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteWebhook =
|
|
4
|
+
exports.updateWebhook =
|
|
5
|
+
exports.getWebhook =
|
|
6
|
+
exports.createWebhook =
|
|
7
|
+
exports.listWebhooks =
|
|
8
|
+
void 0;
|
|
9
|
+
var api_1 = require("../api");
|
|
10
|
+
function listWebhooks(options) {
|
|
11
|
+
return api_1.RightConsents.http({
|
|
12
|
+
method: "GET",
|
|
13
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/webhooks"),
|
|
14
|
+
options: options,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
exports.listWebhooks = listWebhooks;
|
|
18
|
+
function createWebhook(webhook, options) {
|
|
19
|
+
return api_1.RightConsents.http({
|
|
20
|
+
method: "POST",
|
|
21
|
+
url: "".concat(api_1.RightConsents.config.apiRoot, "/webhooks"),
|
|
22
|
+
body: webhook,
|
|
23
|
+
resolveHeaders: true,
|
|
24
|
+
headers: {
|
|
25
|
+
"Content-Type": "application/json",
|
|
26
|
+
},
|
|
27
|
+
options: options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
exports.createWebhook = createWebhook;
|
|
31
|
+
function getWebhook(webhookid, options) {
|
|
32
|
+
return api_1.RightConsents.http({
|
|
33
|
+
method: "GET",
|
|
34
|
+
url: ""
|
|
35
|
+
.concat(api_1.RightConsents.config.apiRoot, "/webhooks/")
|
|
36
|
+
.concat(webhookid),
|
|
37
|
+
options: options,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
exports.getWebhook = getWebhook;
|
|
41
|
+
function updateWebhook(webhookid, webhook, options) {
|
|
42
|
+
return api_1.RightConsents.http({
|
|
43
|
+
method: "PUT",
|
|
44
|
+
url: ""
|
|
45
|
+
.concat(api_1.RightConsents.config.apiRoot, "/webhooks/")
|
|
46
|
+
.concat(webhookid),
|
|
47
|
+
body: webhook,
|
|
48
|
+
options: options,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
exports.updateWebhook = updateWebhook;
|
|
52
|
+
function deleteWebhook(webhookid, options) {
|
|
53
|
+
return api_1.RightConsents.http({
|
|
54
|
+
method: "DELETE",
|
|
55
|
+
url: ""
|
|
56
|
+
.concat(api_1.RightConsents.config.apiRoot, "/webhooks/")
|
|
57
|
+
.concat(webhookid),
|
|
58
|
+
options: options,
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
exports.deleteWebhook = deleteWebhook;
|
|
@@ -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,22 @@
|
|
|
1
|
+
export interface WebhookDto {
|
|
2
|
+
id?: string;
|
|
3
|
+
name: string;
|
|
4
|
+
targetUrl: string;
|
|
5
|
+
subscribedActions: SubscribedActions[];
|
|
6
|
+
delivery?: WebhookDeliveryDto[];
|
|
7
|
+
}
|
|
8
|
+
export declare enum SubscribedActions {
|
|
9
|
+
CONSENT_COMMIT = "CONSENT_COMMIT"
|
|
10
|
+
}
|
|
11
|
+
export interface WebhookDeliveryDto {
|
|
12
|
+
id?: string;
|
|
13
|
+
sourceId: string;
|
|
14
|
+
webhookId: string;
|
|
15
|
+
redelivery: boolean;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
deliveredAt: string;
|
|
18
|
+
duration: string;
|
|
19
|
+
status: string;
|
|
20
|
+
statusCode: number;
|
|
21
|
+
action: SubscribedActions;
|
|
22
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubscribedActions = void 0;
|
|
4
|
+
var SubscribedActions;
|
|
5
|
+
(function (SubscribedActions) {
|
|
6
|
+
SubscribedActions["CONSENT_COMMIT"] = "CONSENT_COMMIT";
|
|
7
|
+
})(
|
|
8
|
+
(SubscribedActions =
|
|
9
|
+
exports.SubscribedActions || (exports.SubscribedActions = {})),
|
|
10
|
+
);
|
|
Binary file
|