@quiltt/core 3.6.13 → 3.7.0
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 +12 -0
- package/dist/{SubscriptionLink-client-C-9ecaeZ.js → SubscriptionLink-client-BMe19x44.js} +4 -7
- package/dist/index.d.ts +5 -1
- package/dist/index.js +3 -3
- package/package.json +1 -1
- package/src/api/browser.ts +4 -0
- package/src/api/rest/auth.ts +1 -1
- package/src/configuration.ts +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @quiltt/core
|
|
2
2
|
|
|
3
|
+
## 3.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#281](https://github.com/quiltt/quiltt-js/pull/281) [`0c5fd75`](https://github.com/quiltt/quiltt-js/commit/0c5fd757fa1f688f205431c21c98bb54ea6ea72a) Thanks [@sirwolfgang](https://github.com/sirwolfgang)! - Add bindings for a new onOpen callback event for Connector Modals
|
|
8
|
+
|
|
9
|
+
## 3.6.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#278](https://github.com/quiltt/quiltt-js/pull/278) [`0d9e43d`](https://github.com/quiltt/quiltt-js/commit/0d9e43d580d73279d7c078219749b000ebb59b02) Thanks [@rubendinho](https://github.com/rubendinho)! - Fix debug config during CI
|
|
14
|
+
|
|
3
15
|
## 3.6.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -203,16 +203,13 @@ import { print } from 'graphql';
|
|
|
203
203
|
*/ const GlobalStorage = new Storage();
|
|
204
204
|
|
|
205
205
|
var name = "@quiltt/core";
|
|
206
|
-
var version$1 = "3.
|
|
206
|
+
var version$1 = "3.7.0";
|
|
207
207
|
|
|
208
208
|
const QUILTT_API_INSECURE = (()=>{
|
|
209
209
|
try {
|
|
210
|
-
|
|
211
|
-
return process.env.QUILTT_API_INSECURE === 'true';
|
|
212
|
-
}
|
|
213
|
-
return process.env.QUILTT_API_INSECURE;
|
|
210
|
+
return process.env.QUILTT_API_INSECURE === 'true';
|
|
214
211
|
} catch {
|
|
215
|
-
return
|
|
212
|
+
return false;
|
|
216
213
|
}
|
|
217
214
|
})();
|
|
218
215
|
const QUILTT_API_DOMAIN = (()=>{
|
|
@@ -224,7 +221,7 @@ const QUILTT_API_DOMAIN = (()=>{
|
|
|
224
221
|
})();
|
|
225
222
|
const QUILTT_DEBUG = (()=>{
|
|
226
223
|
try {
|
|
227
|
-
return
|
|
224
|
+
return process.env.NODE_ENV !== 'production' && process.env.QUILTT_DEBUG === 'true';
|
|
228
225
|
} catch {
|
|
229
226
|
return false;
|
|
230
227
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,12 +10,14 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
10
10
|
|
|
11
11
|
interface CallbackManager {
|
|
12
12
|
onEvent(callback: ConnectorSDKOnEventCallback): void;
|
|
13
|
+
onOpen(callback: ConnectorSDKOnOpenCallback): void;
|
|
13
14
|
onLoad(callback: ConnectorSDKOnLoadCallback): void;
|
|
14
15
|
onExit(callback: ConnectorSDKOnEventExitCallback): void;
|
|
15
16
|
onExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void;
|
|
16
17
|
onExitAbort(callback: ConnectorSDKOnExitAbortCallback): void;
|
|
17
18
|
onExitError(callback: ConnectorSDKOnExitErrorCallback): void;
|
|
18
19
|
offEvent(callback: ConnectorSDKOnEventCallback): void;
|
|
20
|
+
offOpen(callback: ConnectorSDKOnOpenCallback): void;
|
|
19
21
|
offLoad(callback: ConnectorSDKOnLoadCallback): void;
|
|
20
22
|
offExit(callback: ConnectorSDKOnEventExitCallback): void;
|
|
21
23
|
offExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void;
|
|
@@ -39,6 +41,7 @@ interface ConnectorSDKConnector extends CallbackManager {
|
|
|
39
41
|
*/
|
|
40
42
|
type ConnectorSDKCallbacks = {
|
|
41
43
|
onEvent?: ConnectorSDKOnEventCallback;
|
|
44
|
+
onOpen?: ConnectorSDKOnOpenCallback;
|
|
42
45
|
onLoad?: ConnectorSDKOnLoadCallback;
|
|
43
46
|
onExit?: ConnectorSDKOnEventExitCallback;
|
|
44
47
|
onExitSuccess?: ConnectorSDKOnExitSuccessCallback;
|
|
@@ -46,6 +49,7 @@ type ConnectorSDKCallbacks = {
|
|
|
46
49
|
onExitError?: ConnectorSDKOnExitErrorCallback;
|
|
47
50
|
};
|
|
48
51
|
type ConnectorSDKOnEventCallback = (type: ConnectorSDKEventType, metadata: ConnectorSDKCallbackMetadata) => void;
|
|
52
|
+
type ConnectorSDKOnOpenCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
49
53
|
type ConnectorSDKOnLoadCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
50
54
|
type ConnectorSDKOnEventExitCallback = (type: ConnectorSDKEventType, metadata: ConnectorSDKCallbackMetadata) => void;
|
|
51
55
|
type ConnectorSDKOnExitSuccessCallback = (metadata: ConnectorSDKCallbackMetadata) => void;
|
|
@@ -364,4 +368,4 @@ declare class Timeoutable {
|
|
|
364
368
|
private broadcast;
|
|
365
369
|
}
|
|
366
370
|
|
|
367
|
-
export { AuthAPI, AuthLink, AuthStrategies, BatchHttpLink, type Claims, type ConnectorSDK, type ConnectorSDKCallbackMetadata, type ConnectorSDKCallbacks, type ConnectorSDKConnectOptions, type ConnectorSDKConnector, type ConnectorSDKConnectorOptions, ConnectorSDKEventType, type ConnectorSDKOnEventCallback, type ConnectorSDKOnEventExitCallback, type ConnectorSDKOnExitAbortCallback, type ConnectorSDKOnExitErrorCallback, type ConnectorSDKOnExitSuccessCallback, type ConnectorSDKOnLoadCallback, type ConnectorSDKReconnectOptions, type DeepPartial, type DeepReadonly, ErrorLink, type Exact, ForwardableLink, GlobalStorage, HttpLink, type InputMaybe, type JsonWebToken, JsonWebTokenParse, LocalStorage, type MakeMaybe, type MakeOptional, type Maybe, MemoryStorage, type Mutable, type Nullable, Observable, type Observer, type PasscodePayload, type PrivateClaims, QuilttClient, type QuilttClientOptions, type QuilttJWT, type RegisteredClaims, RetryLink, type SessionResponse, Storage, SubscriptionLink, TerminatingLink, Timeoutable, type UnprocessableData, type UnprocessableResponse, type UsernamePayload, VersionLink, cdnBase, debugging, endpointAuth, endpointGraphQL, endpointWebsockets, version };
|
|
371
|
+
export { AuthAPI, AuthLink, AuthStrategies, BatchHttpLink, type Claims, type ConnectorSDK, type ConnectorSDKCallbackMetadata, type ConnectorSDKCallbacks, type ConnectorSDKConnectOptions, type ConnectorSDKConnector, type ConnectorSDKConnectorOptions, ConnectorSDKEventType, type ConnectorSDKOnEventCallback, type ConnectorSDKOnEventExitCallback, type ConnectorSDKOnExitAbortCallback, type ConnectorSDKOnExitErrorCallback, type ConnectorSDKOnExitSuccessCallback, type ConnectorSDKOnLoadCallback, type ConnectorSDKOnOpenCallback, type ConnectorSDKReconnectOptions, type DeepPartial, type DeepReadonly, ErrorLink, type Exact, ForwardableLink, GlobalStorage, HttpLink, type InputMaybe, type JsonWebToken, JsonWebTokenParse, LocalStorage, type MakeMaybe, type MakeOptional, type Maybe, MemoryStorage, type Mutable, type Nullable, Observable, type Observer, type PasscodePayload, type PrivateClaims, QuilttClient, type QuilttClientOptions, type QuilttJWT, type RegisteredClaims, RetryLink, type SessionResponse, Storage, SubscriptionLink, TerminatingLink, Timeoutable, type UnprocessableData, type UnprocessableResponse, type UsernamePayload, VersionLink, cdnBase, debugging, endpointAuth, endpointGraphQL, endpointWebsockets, version };
|
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-BMe19x44.js';
|
|
4
|
+
export { L as LocalStorage, M as MemoryStorage, O as Observable, b as Storage, c as cdnBase, f as endpointWebsockets } from './SubscriptionLink-client-BMe19x44.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';
|
|
@@ -164,7 +164,7 @@ var AuthStrategies;
|
|
|
164
164
|
AuthStrategies["Email"] = "email";
|
|
165
165
|
AuthStrategies["Phone"] = "phone";
|
|
166
166
|
})(AuthStrategies || (AuthStrategies = {}));
|
|
167
|
-
// https://www.quiltt.dev/api-reference/
|
|
167
|
+
// https://www.quiltt.dev/api-reference/auth
|
|
168
168
|
class AuthAPI {
|
|
169
169
|
constructor(clientId){
|
|
170
170
|
/**
|
package/package.json
CHANGED
package/src/api/browser.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface CallbackManager {
|
|
2
2
|
onEvent(callback: ConnectorSDKOnEventCallback): void
|
|
3
|
+
onOpen(callback: ConnectorSDKOnOpenCallback): void
|
|
3
4
|
onLoad(callback: ConnectorSDKOnLoadCallback): void
|
|
4
5
|
onExit(callback: ConnectorSDKOnEventExitCallback): void
|
|
5
6
|
onExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void
|
|
@@ -8,6 +9,7 @@ interface CallbackManager {
|
|
|
8
9
|
|
|
9
10
|
// Because it's well within React behavior to try to register a billion functions
|
|
10
11
|
offEvent(callback: ConnectorSDKOnEventCallback): void
|
|
12
|
+
offOpen(callback: ConnectorSDKOnOpenCallback): void
|
|
11
13
|
offLoad(callback: ConnectorSDKOnLoadCallback): void
|
|
12
14
|
offExit(callback: ConnectorSDKOnEventExitCallback): void
|
|
13
15
|
offExitSuccess(callback: ConnectorSDKOnExitSuccessCallback): void
|
|
@@ -35,6 +37,7 @@ export interface ConnectorSDKConnector extends CallbackManager {
|
|
|
35
37
|
*/
|
|
36
38
|
export type ConnectorSDKCallbacks = {
|
|
37
39
|
onEvent?: ConnectorSDKOnEventCallback
|
|
40
|
+
onOpen?: ConnectorSDKOnOpenCallback
|
|
38
41
|
onLoad?: ConnectorSDKOnLoadCallback
|
|
39
42
|
onExit?: ConnectorSDKOnEventExitCallback
|
|
40
43
|
onExitSuccess?: ConnectorSDKOnExitSuccessCallback
|
|
@@ -47,6 +50,7 @@ export type ConnectorSDKOnEventCallback = (
|
|
|
47
50
|
metadata: ConnectorSDKCallbackMetadata
|
|
48
51
|
) => void
|
|
49
52
|
|
|
53
|
+
export type ConnectorSDKOnOpenCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
50
54
|
export type ConnectorSDKOnLoadCallback = (metadata: ConnectorSDKCallbackMetadata) => void
|
|
51
55
|
|
|
52
56
|
export type ConnectorSDKOnEventExitCallback = (
|
package/src/api/rest/auth.ts
CHANGED
|
@@ -33,7 +33,7 @@ type Revoke = NoContentData | UnauthorizedData
|
|
|
33
33
|
export type SessionResponse = FetchResponse<SessionData>
|
|
34
34
|
export type UnprocessableResponse = FetchResponse<UnprocessableData>
|
|
35
35
|
|
|
36
|
-
// https://www.quiltt.dev/api-reference/
|
|
36
|
+
// https://www.quiltt.dev/api-reference/auth
|
|
37
37
|
export class AuthAPI {
|
|
38
38
|
clientId: string | undefined
|
|
39
39
|
|
package/src/configuration.ts
CHANGED
|
@@ -2,12 +2,9 @@ import { name as packageName, version as packageVersion } from '../package.json'
|
|
|
2
2
|
|
|
3
3
|
const QUILTT_API_INSECURE = (() => {
|
|
4
4
|
try {
|
|
5
|
-
|
|
6
|
-
return process.env.QUILTT_API_INSECURE === 'true'
|
|
7
|
-
}
|
|
8
|
-
return process.env.QUILTT_API_INSECURE
|
|
5
|
+
return process.env.QUILTT_API_INSECURE === 'true'
|
|
9
6
|
} catch {
|
|
10
|
-
return
|
|
7
|
+
return false
|
|
11
8
|
}
|
|
12
9
|
})()
|
|
13
10
|
|
|
@@ -21,7 +18,7 @@ const QUILTT_API_DOMAIN = (() => {
|
|
|
21
18
|
|
|
22
19
|
const QUILTT_DEBUG = (() => {
|
|
23
20
|
try {
|
|
24
|
-
return
|
|
21
|
+
return process.env.NODE_ENV !== 'production' && process.env.QUILTT_DEBUG === 'true'
|
|
25
22
|
} catch {
|
|
26
23
|
return false
|
|
27
24
|
}
|