@twilltac/compliance-sdk 0.2.0 → 0.2.2
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/README.md
CHANGED
|
@@ -99,7 +99,8 @@ plugin.on('session:expired', () => {
|
|
|
99
99
|
| `flow.journey.started` | `void` | Emits when the user starts the journey and Initial Disclosure Document is generated. |
|
|
100
100
|
| `flow.journey.section:started` | `SectionStartedEvent` | Emits when the user starts a section. |
|
|
101
101
|
| `flow.journey.section:completed` | `SectionEndedEvent` | Emits when the user completes the question set and submits their recommendations. |
|
|
102
|
-
| `flow.
|
|
102
|
+
| `flow.journey:completed` | `void` | Emits when the user completes the journey and summary page is presented. |
|
|
103
|
+
| `flow.documents:list` | `ComplianceDocument[]` | Emits when with a list of available documents. |
|
|
103
104
|
| `session:expired` | `void` | Emits when the session has expired. This would typically trigger your auth flow followed by re-initialising the plugin. |
|
|
104
105
|
|
|
105
106
|
#### Type Definitions
|
package/build-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
26837922091-1
|
package/index.cjs
CHANGED
|
@@ -88,12 +88,14 @@ var CompliancePlugin = class {
|
|
|
88
88
|
opts.postMessageBus.on("journey:started", () => this._events.emit("flow.journey.started"));
|
|
89
89
|
opts.postMessageBus.on("journey.section:started", (data) => this._events.emit("flow.journey.section:started", data));
|
|
90
90
|
opts.postMessageBus.on("journey.section:completed", (data) => this._events.emit("flow.journey.section:completed", data));
|
|
91
|
+
opts.postMessageBus.on("journey:completed", () => this._events.emit("flow.journey:completed"));
|
|
91
92
|
opts.postMessageBus.on("documents:loaded", (data) => this._events.emit("flow.documents:list", data));
|
|
92
93
|
const eventNames = [
|
|
93
94
|
"session:expired",
|
|
94
95
|
"flow.journey.started",
|
|
95
96
|
"flow.journey.section:started",
|
|
96
97
|
"flow.journey.section:completed",
|
|
98
|
+
"flow.journey:completed",
|
|
97
99
|
"flow.documents:list"
|
|
98
100
|
];
|
|
99
101
|
for (const eventName of eventNames) {
|
package/index.js
CHANGED
|
@@ -62,12 +62,14 @@ var CompliancePlugin = class {
|
|
|
62
62
|
opts.postMessageBus.on("journey:started", () => this._events.emit("flow.journey.started"));
|
|
63
63
|
opts.postMessageBus.on("journey.section:started", (data) => this._events.emit("flow.journey.section:started", data));
|
|
64
64
|
opts.postMessageBus.on("journey.section:completed", (data) => this._events.emit("flow.journey.section:completed", data));
|
|
65
|
+
opts.postMessageBus.on("journey:completed", () => this._events.emit("flow.journey:completed"));
|
|
65
66
|
opts.postMessageBus.on("documents:loaded", (data) => this._events.emit("flow.documents:list", data));
|
|
66
67
|
const eventNames = [
|
|
67
68
|
"session:expired",
|
|
68
69
|
"flow.journey.started",
|
|
69
70
|
"flow.journey.section:started",
|
|
70
71
|
"flow.journey.section:completed",
|
|
72
|
+
"flow.journey:completed",
|
|
71
73
|
"flow.documents:list"
|
|
72
74
|
];
|
|
73
75
|
for (const eventName of eventNames) {
|
|
@@ -24,7 +24,9 @@ export interface CompliancePluginEvents {
|
|
|
24
24
|
['flow.journey.section:started']: SectionStartedEvent;
|
|
25
25
|
/** Emits when the user completes the question set and submits their recommendations. */
|
|
26
26
|
['flow.journey.section:completed']: SectionEndedEvent;
|
|
27
|
-
/** Emits when the user completes the journey and
|
|
27
|
+
/** Emits when the user completes the journey and summary page is presented. */
|
|
28
|
+
['flow.journey:completed']: void;
|
|
29
|
+
/** Emits when with a list of available documents. */
|
|
28
30
|
['flow.documents:list']: ComplianceDocument[];
|
|
29
31
|
/** Emits when the session has expired. This would typically trigger your auth flow followed by re-initialising the plugin. */
|
|
30
32
|
['session:expired']: void;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import '@testing-library/jest-dom';
|