@quiltt/core 3.7.2 → 3.7.4
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @quiltt/core
|
|
2
2
|
|
|
3
|
+
## 3.7.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#296](https://github.com/quiltt/quiltt-js/pull/296) [`bff9d1f`](https://github.com/quiltt/quiltt-js/commit/bff9d1fb4f89c9c762de85ca0d8ee9a35dd10f7e) Thanks [@rubendinho](https://github.com/rubendinho)! - Fix typings
|
|
8
|
+
|
|
9
|
+
## 3.7.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#293](https://github.com/quiltt/quiltt-js/pull/293) [`f4b48e6`](https://github.com/quiltt/quiltt-js/commit/f4b48e6db199cae4e880202c28974b481890b7c6) Thanks [@rubendinho](https://github.com/rubendinho)! - Improve documentation
|
|
14
|
+
|
|
3
15
|
## 3.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -48,33 +48,78 @@ type ConnectorSDKCallbacks = {
|
|
|
48
48
|
onExitAbort?: ConnectorSDKOnExitAbortCallback;
|
|
49
49
|
onExitError?: ConnectorSDKOnExitErrorCallback;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
/**
|
|
52
|
+
* Callback function to handle all events from the Connector.
|
|
53
|
+
* @param type The type of event that was emitted
|
|
54
|
+
* @param metadata Metadata about the event that was emitted
|
|
55
|
+
*/
|
|
56
|
+
type ConnectorSDKOnEventCallback = (
|
|
57
|
+
/** The type of event that was emitted */
|
|
58
|
+
type: ConnectorSDKEventType,
|
|
59
|
+
/** The metadata from the event */
|
|
60
|
+
metadata: ConnectorSDKCallbackMetadata) => void;
|
|
61
|
+
/** Callback function to handle the Open event */
|
|
52
62
|
type ConnectorSDKOnOpenCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
63
|
+
/** Callback function to handle the Load event */
|
|
53
64
|
type ConnectorSDKOnLoadCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
65
|
+
/** Callback function to handle all Exit events */
|
|
54
66
|
type ConnectorSDKOnEventExitCallback = (type: ConnectorSDKEventType, metadata: ConnectorSDKCallbackMetadata) => void;
|
|
67
|
+
/** Callback function to handle the ExitSuccess event */
|
|
55
68
|
type ConnectorSDKOnExitSuccessCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
69
|
+
/** Callback function to handle the ExitAbort event */
|
|
56
70
|
type ConnectorSDKOnExitAbortCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
71
|
+
/** Callback function to handle the ExitError event */
|
|
57
72
|
type ConnectorSDKOnExitErrorCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
73
|
+
/**
|
|
74
|
+
* Enum representing the different types of events emitted by the Connector.
|
|
75
|
+
*/
|
|
58
76
|
declare enum ConnectorSDKEventType {
|
|
77
|
+
/** The Connector modal has been opened */
|
|
59
78
|
Open = "opened",
|
|
79
|
+
/** The Connector has loaded successfully */
|
|
60
80
|
Load = "loaded",
|
|
81
|
+
/** The end-user successfully completed the flow */
|
|
61
82
|
ExitSuccess = "exited.successful",
|
|
83
|
+
/** The end-user exited the Connector before completing the flow */
|
|
62
84
|
ExitAbort = "exited.aborted",
|
|
85
|
+
/** The end-user experienced an error during the flow */
|
|
63
86
|
ExitError = "exited.errored"
|
|
64
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Metadata about a Connector event
|
|
90
|
+
* @param connectorId The ID of the Connector that emitted the event
|
|
91
|
+
* @param profileId The ID of the authenticated Profile
|
|
92
|
+
* @param connectionId The ID of the Connection that was created or reconnected
|
|
93
|
+
*/
|
|
65
94
|
type ConnectorSDKCallbackMetadata = {
|
|
95
|
+
/** The ID of the Connector that emitted the event */
|
|
66
96
|
connectorId: string;
|
|
97
|
+
/** The ID of the authenticated Profile */
|
|
67
98
|
profileId?: string;
|
|
99
|
+
/** The ID of the Connection that was created or reconnected */
|
|
68
100
|
connectionId?: string;
|
|
69
101
|
};
|
|
102
|
+
/**
|
|
103
|
+
Options for the standard Connect flow
|
|
104
|
+
@param institution The Institution ID or search term to connect
|
|
105
|
+
*/
|
|
70
106
|
type ConnectorSDKConnectOptions = ConnectorSDKCallbacks & {
|
|
107
|
+
/** The Institution ID or search term to connect */
|
|
71
108
|
institution?: string;
|
|
72
109
|
};
|
|
110
|
+
/**
|
|
111
|
+
* Options for the Reconnect flow
|
|
112
|
+
* @param connectionId The ID of the Connection to reconnect
|
|
113
|
+
*/
|
|
73
114
|
type ConnectorSDKReconnectOptions = ConnectorSDKCallbacks & {
|
|
115
|
+
/** The ID of the Connection to reconnect */
|
|
74
116
|
connectionId: string;
|
|
75
117
|
};
|
|
118
|
+
/** Options to initialize Connector */
|
|
76
119
|
type ConnectorSDKConnectorOptions = ConnectorSDKCallbacks & {
|
|
120
|
+
/** The Institution ID or search term to connect */
|
|
77
121
|
institution?: string;
|
|
122
|
+
/** The ID of the Connection to reconnect */
|
|
78
123
|
connectionId?: string;
|
|
79
124
|
};
|
|
80
125
|
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ApolloLink, ApolloClient } from '@apollo/client/index.js';
|
|
2
2
|
export { InMemoryCache, gql, useMutation, useQuery, useSubscription } from '@apollo/client/index.js';
|
|
3
|
-
import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-
|
|
4
|
-
export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-
|
|
3
|
+
import { G as GlobalStorage, e as endpointGraphQL, v as version, d as debugging, S as SubscriptionLink, a as endpointAuth } from './SubscriptionLink-client-DzYpB3s-.js';
|
|
4
|
+
export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-DzYpB3s-.js';
|
|
5
5
|
import { BatchHttpLink as BatchHttpLink$1 } from '@apollo/client/link/batch-http/index.js';
|
|
6
6
|
import crossfetch from 'cross-fetch';
|
|
7
7
|
import { onError } from '@apollo/client/link/error/index.js';
|
|
@@ -10,11 +10,11 @@ import { RetryLink as RetryLink$1 } from '@apollo/client/link/retry/index.js';
|
|
|
10
10
|
|
|
11
11
|
var ConnectorSDKEventType;
|
|
12
12
|
(function(ConnectorSDKEventType) {
|
|
13
|
-
ConnectorSDKEventType["Open"] = "opened";
|
|
14
|
-
ConnectorSDKEventType["Load"] = "loaded";
|
|
15
|
-
ConnectorSDKEventType["ExitSuccess"] = "exited.successful";
|
|
16
|
-
ConnectorSDKEventType["ExitAbort"] = "exited.aborted";
|
|
17
|
-
ConnectorSDKEventType["ExitError"] = "exited.errored";
|
|
13
|
+
/** The Connector modal has been opened */ ConnectorSDKEventType["Open"] = "opened";
|
|
14
|
+
/** The Connector has loaded successfully */ ConnectorSDKEventType["Load"] = "loaded";
|
|
15
|
+
/** The end-user successfully completed the flow */ ConnectorSDKEventType["ExitSuccess"] = "exited.successful";
|
|
16
|
+
/** The end-user exited the Connector before completing the flow */ ConnectorSDKEventType["ExitAbort"] = "exited.aborted";
|
|
17
|
+
/** The end-user experienced an error during the flow */ ConnectorSDKEventType["ExitError"] = "exited.errored";
|
|
18
18
|
})(ConnectorSDKEventType || (ConnectorSDKEventType = {}));
|
|
19
19
|
|
|
20
20
|
/**
|
package/package.json
CHANGED
package/src/api/browser.ts
CHANGED
|
@@ -45,46 +45,98 @@ export type ConnectorSDKCallbacks = {
|
|
|
45
45
|
onExitError?: ConnectorSDKOnExitErrorCallback
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Callback function to handle all events from the Connector.
|
|
50
|
+
* @param type The type of event that was emitted
|
|
51
|
+
* @param metadata Metadata about the event that was emitted
|
|
52
|
+
*/
|
|
48
53
|
export type ConnectorSDKOnEventCallback = (
|
|
54
|
+
/** The type of event that was emitted */
|
|
49
55
|
type: ConnectorSDKEventType,
|
|
56
|
+
/** The metadata from the event */
|
|
50
57
|
metadata: ConnectorSDKCallbackMetadata
|
|
51
58
|
) => void
|
|
52
59
|
|
|
60
|
+
/** Callback function to handle the Open event */
|
|
53
61
|
export type ConnectorSDKOnOpenCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
62
|
+
|
|
63
|
+
/** Callback function to handle the Load event */
|
|
54
64
|
export type ConnectorSDKOnLoadCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
55
65
|
|
|
66
|
+
/** Callback function to handle all Exit events */
|
|
56
67
|
export type ConnectorSDKOnEventExitCallback = (
|
|
57
68
|
type: ConnectorSDKEventType,
|
|
58
69
|
metadata: ConnectorSDKCallbackMetadata
|
|
59
70
|
) => void
|
|
60
71
|
|
|
72
|
+
/** Callback function to handle the ExitSuccess event */
|
|
61
73
|
export type ConnectorSDKOnExitSuccessCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
74
|
+
|
|
75
|
+
/** Callback function to handle the ExitAbort event */
|
|
62
76
|
export type ConnectorSDKOnExitAbortCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
77
|
+
|
|
78
|
+
/** Callback function to handle the ExitError event */
|
|
63
79
|
export type ConnectorSDKOnExitErrorCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
64
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Enum representing the different types of events emitted by the Connector.
|
|
83
|
+
*/
|
|
65
84
|
export enum ConnectorSDKEventType {
|
|
85
|
+
/** The Connector modal has been opened */
|
|
66
86
|
Open = 'opened',
|
|
87
|
+
|
|
88
|
+
/** The Connector has loaded successfully */
|
|
67
89
|
Load = 'loaded',
|
|
90
|
+
|
|
91
|
+
/** The end-user successfully completed the flow */
|
|
68
92
|
ExitSuccess = 'exited.successful',
|
|
93
|
+
|
|
94
|
+
/** The end-user exited the Connector before completing the flow */
|
|
69
95
|
ExitAbort = 'exited.aborted',
|
|
96
|
+
|
|
97
|
+
/** The end-user experienced an error during the flow */
|
|
70
98
|
ExitError = 'exited.errored',
|
|
71
99
|
}
|
|
72
100
|
|
|
101
|
+
/**
|
|
102
|
+
* Metadata about a Connector event
|
|
103
|
+
* @param connectorId The ID of the Connector that emitted the event
|
|
104
|
+
* @param profileId The ID of the authenticated Profile
|
|
105
|
+
* @param connectionId The ID of the Connection that was created or reconnected
|
|
106
|
+
*/
|
|
73
107
|
export type ConnectorSDKCallbackMetadata = {
|
|
108
|
+
/** The ID of the Connector that emitted the event */
|
|
74
109
|
connectorId: string
|
|
110
|
+
/** The ID of the authenticated Profile */
|
|
75
111
|
profileId?: string
|
|
112
|
+
/** The ID of the Connection that was created or reconnected */
|
|
76
113
|
connectionId?: string
|
|
77
114
|
}
|
|
78
115
|
|
|
116
|
+
/**
|
|
117
|
+
Options for the standard Connect flow
|
|
118
|
+
@param institution The Institution ID or search term to connect
|
|
119
|
+
*/
|
|
79
120
|
export type ConnectorSDKConnectOptions = ConnectorSDKCallbacks & {
|
|
121
|
+
/** The Institution ID or search term to connect */
|
|
80
122
|
institution?: string
|
|
81
123
|
}
|
|
82
124
|
|
|
125
|
+
/**
|
|
126
|
+
* Options for the Reconnect flow
|
|
127
|
+
* @param connectionId The ID of the Connection to reconnect
|
|
128
|
+
*/
|
|
83
129
|
export type ConnectorSDKReconnectOptions = ConnectorSDKCallbacks & {
|
|
130
|
+
/** The ID of the Connection to reconnect */
|
|
84
131
|
connectionId: string
|
|
85
132
|
}
|
|
86
133
|
|
|
134
|
+
/** Options to initialize Connector */
|
|
135
|
+
// @todo: refactor into a union type - it's either or.
|
|
87
136
|
export type ConnectorSDKConnectorOptions = ConnectorSDKCallbacks & {
|
|
137
|
+
/** The Institution ID or search term to connect */
|
|
88
138
|
institution?: string
|
|
139
|
+
|
|
140
|
+
/** The ID of the Connection to reconnect */
|
|
89
141
|
connectionId?: string
|
|
90
142
|
}
|