@forgerock/davinci-client 0.0.0-beta-20250414111925 → 0.0.0-beta-20250414113129
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/dist/src/index.d.ts +2 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +8 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/lib/authorize.utils.d.ts +22 -0
- package/dist/src/lib/authorize.utils.d.ts.map +1 -0
- package/dist/src/lib/authorize.utils.js +47 -0
- package/dist/src/lib/authorize.utils.js.map +1 -0
- package/dist/src/lib/client.store.d.ts +351 -0
- package/dist/src/lib/client.store.d.ts.map +1 -0
- package/dist/src/lib/client.store.js +295 -0
- package/dist/src/lib/client.store.js.map +1 -0
- package/dist/src/lib/client.store.utils.d.ts +61 -0
- package/dist/src/lib/client.store.utils.d.ts.map +1 -0
- package/dist/src/lib/client.store.utils.js +35 -0
- package/dist/src/lib/client.store.utils.js.map +1 -0
- package/dist/src/lib/client.types.d.ts +17 -0
- package/dist/src/lib/client.types.d.ts.map +1 -0
- package/dist/src/lib/client.types.js +2 -0
- package/dist/src/lib/client.types.js.map +1 -0
- package/dist/src/lib/collector.types.d.ts +255 -0
- package/dist/src/lib/collector.types.d.ts.map +1 -0
- package/dist/src/lib/collector.types.js +11 -0
- package/dist/src/lib/collector.types.js.map +1 -0
- package/dist/src/lib/collector.utils.d.ts +100 -0
- package/dist/src/lib/collector.utils.d.ts.map +1 -0
- package/dist/src/lib/collector.utils.js +349 -0
- package/dist/src/lib/collector.utils.js.map +1 -0
- package/dist/src/lib/config.slice.d.ts +42 -0
- package/dist/src/lib/config.slice.d.ts.map +1 -0
- package/dist/src/lib/config.slice.js +59 -0
- package/dist/src/lib/config.slice.js.map +1 -0
- package/dist/src/lib/config.types.d.ts +12 -0
- package/dist/src/lib/config.types.d.ts.map +1 -0
- package/dist/src/lib/config.types.js +2 -0
- package/dist/src/lib/config.types.js.map +1 -0
- package/dist/src/lib/davinci.api.d.ts +29 -0
- package/dist/src/lib/davinci.api.d.ts.map +1 -0
- package/dist/src/lib/davinci.api.js +333 -0
- package/dist/src/lib/davinci.api.js.map +1 -0
- package/dist/src/lib/davinci.types.d.ts +239 -0
- package/dist/src/lib/davinci.types.d.ts.map +1 -0
- package/dist/src/lib/davinci.types.js +11 -0
- package/dist/src/lib/davinci.types.js.map +1 -0
- package/dist/src/lib/davinci.utils.d.ts +25 -0
- package/dist/src/lib/davinci.utils.d.ts.map +1 -0
- package/dist/src/lib/davinci.utils.js +185 -0
- package/dist/src/lib/davinci.utils.js.map +1 -0
- package/dist/src/lib/device.store.d.ts +126 -0
- package/dist/src/lib/device.store.d.ts.map +1 -0
- package/dist/src/lib/device.store.js +200 -0
- package/dist/src/lib/device.store.js.map +1 -0
- package/dist/src/lib/effects/request.effect.mock.d.ts +4 -0
- package/dist/src/lib/effects/request.effect.mock.d.ts.map +1 -0
- package/dist/src/lib/effects/request.effect.mock.js +106 -0
- package/dist/src/lib/effects/request.effect.mock.js.map +1 -0
- package/dist/src/lib/effects/request.effect.types.d.ts +20 -0
- package/dist/src/lib/effects/request.effect.types.d.ts.map +1 -0
- package/dist/src/lib/effects/request.effect.types.js +2 -0
- package/dist/src/lib/effects/request.effect.types.js.map +1 -0
- package/dist/src/lib/effects/request.effect.unions.d.ts +12 -0
- package/dist/src/lib/effects/request.effect.unions.d.ts.map +1 -0
- package/dist/src/lib/effects/request.effect.unions.js +16 -0
- package/dist/src/lib/effects/request.effect.unions.js.map +1 -0
- package/dist/src/lib/effects/request.effect.utils.d.ts +27 -0
- package/dist/src/lib/effects/request.effect.utils.d.ts.map +1 -0
- package/dist/src/lib/effects/request.effect.utils.js +57 -0
- package/dist/src/lib/effects/request.effect.utils.js.map +1 -0
- package/dist/src/lib/error.types.d.ts +6 -0
- package/dist/src/lib/error.types.d.ts.map +1 -0
- package/dist/src/lib/error.types.js +2 -0
- package/dist/src/lib/error.types.js.map +1 -0
- package/dist/src/lib/index.d.ts +3 -0
- package/dist/src/lib/index.d.ts.map +1 -0
- package/dist/src/lib/index.js +9 -0
- package/dist/src/lib/index.js.map +1 -0
- package/dist/src/lib/node.reducer.d.ts +27 -0
- package/dist/src/lib/node.reducer.d.ts.map +1 -0
- package/dist/src/lib/node.reducer.js +143 -0
- package/dist/src/lib/node.reducer.js.map +1 -0
- package/dist/src/lib/node.slice.d.ts +145 -0
- package/dist/src/lib/node.slice.d.ts.map +1 -0
- package/dist/src/lib/node.slice.js +231 -0
- package/dist/src/lib/node.slice.js.map +1 -0
- package/dist/src/lib/node.types.d.ts +118 -0
- package/dist/src/lib/node.types.d.ts.map +1 -0
- package/dist/src/lib/node.types.js +2 -0
- package/dist/src/lib/node.types.js.map +1 -0
- package/dist/src/lib/node.utils.d.ts +4 -0
- package/dist/src/lib/node.utils.d.ts.map +1 -0
- package/dist/src/lib/node.utils.js +32 -0
- package/dist/src/lib/node.utils.js.map +1 -0
- package/dist/src/lib/services/index.d.ts +24 -0
- package/dist/src/lib/services/index.d.ts.map +1 -0
- package/dist/src/lib/services/index.js +81 -0
- package/dist/src/lib/services/index.js.map +1 -0
- package/dist/src/lib/types/binding-device.types.d.ts +31 -0
- package/dist/src/lib/types/binding-device.types.d.ts.map +1 -0
- package/dist/src/lib/types/binding-device.types.js +2 -0
- package/dist/src/lib/types/binding-device.types.js.map +1 -0
- package/dist/src/lib/types/index.d.ts +6 -0
- package/dist/src/lib/types/index.d.ts.map +1 -0
- package/dist/src/lib/types/index.js +12 -0
- package/dist/src/lib/types/index.js.map +1 -0
- package/dist/src/lib/types/oath.types.d.ts +41 -0
- package/dist/src/lib/types/oath.types.d.ts.map +1 -0
- package/dist/src/lib/types/oath.types.js +2 -0
- package/dist/src/lib/types/oath.types.js.map +1 -0
- package/dist/src/lib/types/push-device.types.d.ts +84 -0
- package/dist/src/lib/types/push-device.types.d.ts.map +1 -0
- package/dist/src/lib/types/push-device.types.js +2 -0
- package/dist/src/lib/types/push-device.types.js.map +1 -0
- package/dist/src/lib/types/updateDeviceProfile.types.d.ts +58 -0
- package/dist/src/lib/types/updateDeviceProfile.types.d.ts.map +1 -0
- package/dist/src/lib/types/updateDeviceProfile.types.js +2 -0
- package/dist/src/lib/types/updateDeviceProfile.types.js.map +1 -0
- package/dist/src/lib/types/webauthn.types.d.ts +69 -0
- package/dist/src/lib/types/webauthn.types.d.ts.map +1 -0
- package/dist/src/lib/types/webauthn.types.js +2 -0
- package/dist/src/lib/types/webauthn.types.js.map +1 -0
- package/dist/src/lib/wellknown.api.d.ts +5 -0
- package/dist/src/lib/wellknown.api.d.ts.map +1 -0
- package/dist/src/lib/wellknown.api.js +22 -0
- package/dist/src/lib/wellknown.api.js.map +1 -0
- package/dist/src/lib/wellknown.types.d.ts +38 -0
- package/dist/src/lib/wellknown.types.d.ts.map +1 -0
- package/dist/src/lib/wellknown.types.js +2 -0
- package/dist/src/lib/wellknown.types.js.map +1 -0
- package/dist/src/types.d.ts +31 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +8 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../device-client/src/index.ts"],"names":[],"mappings":"AAMA,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This software may be modified and distributed under the terms
|
|
5
|
+
* of the MIT license. See the LICENSE file for details.
|
|
6
|
+
*/
|
|
7
|
+
export * from './lib/device.store.js';
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../device-client/src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Define the options for the authorization URL
|
|
3
|
+
* @param clientId The client ID of the application
|
|
4
|
+
* @param redirectUri The redirect URI of the application
|
|
5
|
+
* @param responseType The response type of the authorization request
|
|
6
|
+
* @param scope The scope of the authorization request
|
|
7
|
+
*/
|
|
8
|
+
export interface GetAuthorizationUrlOptions {
|
|
9
|
+
clientId: string;
|
|
10
|
+
login: 'redirect';
|
|
11
|
+
redirectUri: string;
|
|
12
|
+
responseType: string;
|
|
13
|
+
scope: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @function createAuthorizeUrl - Create authorization URL for initial call to DaVinci
|
|
17
|
+
* @param baseUrl {string}
|
|
18
|
+
* @param options {GetAuthorizationUrlOptions}
|
|
19
|
+
* @returns {Promise<string>} - the authorization URL
|
|
20
|
+
*/
|
|
21
|
+
export declare function createAuthorizeUrl(authorizeUrl: string, options: GetAuthorizationUrlOptions): Promise<string>;
|
|
22
|
+
//# sourceMappingURL=authorize.utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorize.utils.d.ts","sourceRoot":"","sources":["../../../src/lib/authorize.utils.ts"],"names":[],"mappings":"AAYA;;;;;;GAMG;AACH,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;GAKG;AACH,wBAAsB,kBAAkB,CACtC,YAAY,EAAE,MAAM,EACpB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,MAAM,CAAC,CAkCjB"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2025 Ping Identity Corporation. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
* This software may be modified and distributed under the terms
|
|
5
|
+
* of the MIT license. See the LICENSE file for details.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Import the PKCE and ResponseType utilities from the JavaScript SDK
|
|
9
|
+
*/
|
|
10
|
+
import { PKCE, ResponseType } from '@forgerock/javascript-sdk';
|
|
11
|
+
import { generateAndStoreAuthUrlValues } from '@forgerock/javascript-sdk/src/oauth2-client/state-pkce';
|
|
12
|
+
/**
|
|
13
|
+
* @function createAuthorizeUrl - Create authorization URL for initial call to DaVinci
|
|
14
|
+
* @param baseUrl {string}
|
|
15
|
+
* @param options {GetAuthorizationUrlOptions}
|
|
16
|
+
* @returns {Promise<string>} - the authorization URL
|
|
17
|
+
*/
|
|
18
|
+
export async function createAuthorizeUrl(authorizeUrl, options) {
|
|
19
|
+
/**
|
|
20
|
+
* Generate state and verifier for PKCE
|
|
21
|
+
*/
|
|
22
|
+
const baseUrl = new URL(authorizeUrl).origin;
|
|
23
|
+
const [authorizeUrlOptions, storeOptions] = generateAndStoreAuthUrlValues({
|
|
24
|
+
clientId: options.clientId,
|
|
25
|
+
login: options.login,
|
|
26
|
+
// this type fails when module resolution is Node16
|
|
27
|
+
// Probably because the javascript-sdk is set to bundler
|
|
28
|
+
// so we need to make this correct with .js extensions if possible
|
|
29
|
+
serverConfig: { baseUrl },
|
|
30
|
+
responseType: ResponseType.Code,
|
|
31
|
+
});
|
|
32
|
+
const challenge = await PKCE.createChallenge(authorizeUrlOptions.verifier);
|
|
33
|
+
const requestParams = new URLSearchParams({
|
|
34
|
+
code_challenge: challenge,
|
|
35
|
+
code_challenge_method: 'S256',
|
|
36
|
+
client_id: options.clientId,
|
|
37
|
+
redirect_uri: options.redirectUri,
|
|
38
|
+
response_mode: 'pi.flow',
|
|
39
|
+
response_type: options.responseType,
|
|
40
|
+
scope: options.scope,
|
|
41
|
+
state: authorizeUrlOptions.state,
|
|
42
|
+
});
|
|
43
|
+
const url = new URL(`${authorizeUrl}?${requestParams.toString()}`);
|
|
44
|
+
storeOptions();
|
|
45
|
+
return url.toString();
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=authorize.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorize.utils.js","sourceRoot":"","sources":["../../../src/lib/authorize.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH;;GAEG;AACH,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,MAAM,wDAAwD,CAAC;AAiBvG;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,YAAoB,EACpB,OAAmC;IAEnC;;OAEG;IACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,CAAC,MAAM,CAAC;IAE7C,MAAM,CAAC,mBAAmB,EAAE,YAAY,CAAC,GAAG,6BAA6B,CAAC;QACxE,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,mDAAmD;QACnD,wDAAwD;QACxD,kEAAkE;QAClE,YAAY,EAAE,EAAE,OAAO,EAAE;QACzB,YAAY,EAAE,YAAY,CAAC,IAAI;KAChC,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAE3E,MAAM,aAAa,GAAG,IAAI,eAAe,CAAC;QACxC,cAAc,EAAE,SAAS;QACzB,qBAAqB,EAAE,MAAM;QAC7B,SAAS,EAAE,OAAO,CAAC,QAAQ;QAC3B,YAAY,EAAE,OAAO,CAAC,WAAW;QACjC,aAAa,EAAE,SAAS;QACxB,aAAa,EAAE,OAAO,CAAC,YAAY;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,KAAK,EAAE,mBAAmB,CAAC,KAAK;KACjC,CAAC,CAAC;IAEH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,GAAG,YAAY,IAAI,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IAEnE,YAAY,EAAE,CAAC;IAEf,OAAO,GAAG,CAAC,QAAQ,EAAE,CAAC;AACxB,CAAC"}
|
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Import the DaVinciRequest types
|
|
3
|
+
*/
|
|
4
|
+
import type { DaVinciConfig } from './config.types.js';
|
|
5
|
+
import type { DaVinciAction, DaVinciRequest, OutgoingQueryParams, StartOptions } from './davinci.types.js';
|
|
6
|
+
import type { SingleValueCollectors, IdpCollector, MultiSelectCollector } from './collector.types.js';
|
|
7
|
+
import type { InitFlow, Updater, Validator } from './client.types.js';
|
|
8
|
+
import type { RequestMiddleware } from './effects/request.effect.types.js';
|
|
9
|
+
/**
|
|
10
|
+
* Create a client function that returns a set of methods
|
|
11
|
+
* to interact with and normalize the DaVinci API.
|
|
12
|
+
*
|
|
13
|
+
* @function davinciClient - returns an "observable" client for DaVinci flows
|
|
14
|
+
* @param {ConfigurationOptions} options - the configuration options for the client
|
|
15
|
+
* @returns {Observable} - an observable client for DaVinci flows
|
|
16
|
+
*/
|
|
17
|
+
export declare function davinci({ config, requestMiddleware, }: {
|
|
18
|
+
config: DaVinciConfig;
|
|
19
|
+
requestMiddleware?: RequestMiddleware[];
|
|
20
|
+
}): Promise<{
|
|
21
|
+
subscribe: (listener: () => void) => import("@reduxjs/toolkit").Unsubscribe;
|
|
22
|
+
/**
|
|
23
|
+
* Social Login Handler
|
|
24
|
+
* Use this as part of an event when clicking on
|
|
25
|
+
* a social login button. Pass in the collector responsible
|
|
26
|
+
* for the social login being started.
|
|
27
|
+
*
|
|
28
|
+
* This method will save the `continueUrl`
|
|
29
|
+
* and then replace the window with the authenticate
|
|
30
|
+
* url from the collector
|
|
31
|
+
*
|
|
32
|
+
* Can return an error when no continue url is found
|
|
33
|
+
* or no authenticate url is found in the collectors
|
|
34
|
+
*
|
|
35
|
+
* @method: externalIdp
|
|
36
|
+
* @param collector IdpCollector
|
|
37
|
+
* @returns {function}
|
|
38
|
+
*/
|
|
39
|
+
externalIdp: (collector: IdpCollector) => () => void | import("./client.types.js").InternalErrorResponse;
|
|
40
|
+
/**
|
|
41
|
+
* @method flow - Method for initiating a new flow, different than current flow
|
|
42
|
+
* @param {DaVinciAction} action - the action to initiate the flow
|
|
43
|
+
* @returns {function} - an async function to call the flow
|
|
44
|
+
*/
|
|
45
|
+
flow: (action: DaVinciAction) => InitFlow;
|
|
46
|
+
/**
|
|
47
|
+
* @method next - Method for initiating the next node in the current flow
|
|
48
|
+
* @param {DaVinciRequest} args - the arguments to pass to the next
|
|
49
|
+
* @returns {Promise} - a promise that resolves to the next node
|
|
50
|
+
*/
|
|
51
|
+
next: (args?: DaVinciRequest) => Promise<import("./node.types.js").ContinueNode | import("./node.types.js").ErrorNode | import("./node.types.js").FailureNode | import("./node.types.js").StartNode | import("./node.types.js").SuccessNode | {
|
|
52
|
+
error: string;
|
|
53
|
+
cache: null;
|
|
54
|
+
client: {
|
|
55
|
+
status: "start";
|
|
56
|
+
};
|
|
57
|
+
server: {
|
|
58
|
+
status: "start";
|
|
59
|
+
};
|
|
60
|
+
status: "start";
|
|
61
|
+
}>;
|
|
62
|
+
/**
|
|
63
|
+
* @method: resume - Resume a social login flow when returned to application
|
|
64
|
+
* @returns unknown
|
|
65
|
+
*/
|
|
66
|
+
resume: ({ continueToken }: {
|
|
67
|
+
continueToken: string;
|
|
68
|
+
}) => Promise<import("./node.types.js").ContinueNode | import("./node.types.js").ErrorNode | import("./node.types.js").FailureNode | import("./node.types.js").StartNode | import("./node.types.js").SuccessNode>;
|
|
69
|
+
/**
|
|
70
|
+
* @method start - Method for initiating a DaVinci flow
|
|
71
|
+
* @returns {Promise} - a promise that initiates a DaVinci flow and returns a node
|
|
72
|
+
*/
|
|
73
|
+
start: <QueryParams extends OutgoingQueryParams = OutgoingQueryParams>(options?: StartOptions<QueryParams> | undefined) => Promise<import("./node.types.js").ContinueNode | import("./node.types.js").ErrorNode | import("./node.types.js").FailureNode | import("./node.types.js").StartNode | import("./node.types.js").SuccessNode>;
|
|
74
|
+
/**
|
|
75
|
+
* @method update - Exclusive method for updating the current node with user provided values
|
|
76
|
+
* @param {SingleValueCollector} collector - the collector to update
|
|
77
|
+
* @returns {function} - a function to call for updating collector value
|
|
78
|
+
*/
|
|
79
|
+
update: (collector: SingleValueCollectors | MultiSelectCollector) => Updater;
|
|
80
|
+
/**
|
|
81
|
+
* @method validate - Method for validating the value against validation rules
|
|
82
|
+
* @param {SingleValueCollector} collector - the collector to validate
|
|
83
|
+
* @returns {function} - a function to call for validating collector value
|
|
84
|
+
* @throws {Error} - if the collector is not a SingleValueCollector
|
|
85
|
+
*/
|
|
86
|
+
validate: (collector: SingleValueCollectors) => Validator;
|
|
87
|
+
/**
|
|
88
|
+
* @method client - Selector to get the node.client from state
|
|
89
|
+
* @returns {Node.client} - the client property from the current node
|
|
90
|
+
*/
|
|
91
|
+
getClient: () => {
|
|
92
|
+
action: string;
|
|
93
|
+
collectors: import("./node.types.js").Collectors[];
|
|
94
|
+
description?: string;
|
|
95
|
+
name?: string;
|
|
96
|
+
status: "continue";
|
|
97
|
+
} | {
|
|
98
|
+
action: string;
|
|
99
|
+
collectors: import("./node.types.js").Collectors[];
|
|
100
|
+
description?: string;
|
|
101
|
+
name?: string;
|
|
102
|
+
status: "error";
|
|
103
|
+
} | {
|
|
104
|
+
status: "failure";
|
|
105
|
+
} | {
|
|
106
|
+
status: "start";
|
|
107
|
+
} | {
|
|
108
|
+
authorization?: {
|
|
109
|
+
code?: string;
|
|
110
|
+
state?: string;
|
|
111
|
+
};
|
|
112
|
+
status: "success";
|
|
113
|
+
} | null;
|
|
114
|
+
/**
|
|
115
|
+
* @method collectors - Selector to get the collectors from state
|
|
116
|
+
* @returns {Collector[]} - The collectors from the current node in state
|
|
117
|
+
*/
|
|
118
|
+
getCollectors: () => import("./node.types.js").Collectors[];
|
|
119
|
+
getError: () => import("./node.types.js").DaVinciError | null;
|
|
120
|
+
getErrorCollectors: () => import("./node.types.js").CollectorErrors[];
|
|
121
|
+
/**
|
|
122
|
+
* @method node - Selector to get the node from state
|
|
123
|
+
* @returns {Node} - the current node from state
|
|
124
|
+
*/
|
|
125
|
+
getNode: () => import("./node.types.js").ContinueNode | import("./node.types.js").ErrorNode | import("./node.types.js").FailureNode | import("./node.types.js").StartNode | import("./node.types.js").SuccessNode;
|
|
126
|
+
/**
|
|
127
|
+
* @method server - Selector to get the node.server from state
|
|
128
|
+
* @returns {Node.server} - the server property from the current node
|
|
129
|
+
*/
|
|
130
|
+
getServer: () => {
|
|
131
|
+
_links?: import("./davinci.types.js").Links;
|
|
132
|
+
id?: string;
|
|
133
|
+
interactionId?: string;
|
|
134
|
+
interactionToken?: string;
|
|
135
|
+
href?: string;
|
|
136
|
+
eventName?: string;
|
|
137
|
+
status: "continue";
|
|
138
|
+
} | {
|
|
139
|
+
_links?: import("./davinci.types.js").Links;
|
|
140
|
+
eventName?: string;
|
|
141
|
+
id?: string;
|
|
142
|
+
interactionId?: string;
|
|
143
|
+
interactionToken?: string;
|
|
144
|
+
status: "error";
|
|
145
|
+
} | {
|
|
146
|
+
_links?: import("./davinci.types.js").Links;
|
|
147
|
+
eventName?: string;
|
|
148
|
+
href?: string;
|
|
149
|
+
id?: string;
|
|
150
|
+
interactionId?: string;
|
|
151
|
+
interactionToken?: string;
|
|
152
|
+
status: "failure";
|
|
153
|
+
} | {
|
|
154
|
+
status: "start";
|
|
155
|
+
} | {
|
|
156
|
+
_links?: import("./davinci.types.js").Links;
|
|
157
|
+
eventName?: string;
|
|
158
|
+
id?: string;
|
|
159
|
+
interactionId?: string;
|
|
160
|
+
interactionToken?: string;
|
|
161
|
+
href?: string;
|
|
162
|
+
session?: string;
|
|
163
|
+
status: "success";
|
|
164
|
+
} | null;
|
|
165
|
+
/**
|
|
166
|
+
* Utilities to help query cached responses from server
|
|
167
|
+
*/
|
|
168
|
+
cache: {
|
|
169
|
+
getLatestResponse: () => ((state: import("@reduxjs/toolkit/query").RootState<{
|
|
170
|
+
flow: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
171
|
+
next: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
172
|
+
start: import("@reduxjs/toolkit/query").MutationDefinition<StartOptions<OutgoingQueryParams> | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
173
|
+
resume: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
174
|
+
continueToken: string;
|
|
175
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
176
|
+
}, never, "davinci">) => ({
|
|
177
|
+
requestId?: undefined;
|
|
178
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
179
|
+
data?: undefined;
|
|
180
|
+
error?: undefined;
|
|
181
|
+
endpointName?: string;
|
|
182
|
+
startedTimeStamp?: undefined;
|
|
183
|
+
fulfilledTimeStamp?: undefined;
|
|
184
|
+
} & {
|
|
185
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
186
|
+
isUninitialized: true;
|
|
187
|
+
isLoading: false;
|
|
188
|
+
isSuccess: false;
|
|
189
|
+
isError: false;
|
|
190
|
+
}) | ({
|
|
191
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
192
|
+
} & Omit<{
|
|
193
|
+
requestId: string;
|
|
194
|
+
data?: unknown;
|
|
195
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
196
|
+
endpointName: string;
|
|
197
|
+
startedTimeStamp: number;
|
|
198
|
+
fulfilledTimeStamp?: number;
|
|
199
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
200
|
+
requestId: string;
|
|
201
|
+
data?: unknown;
|
|
202
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
203
|
+
endpointName: string;
|
|
204
|
+
startedTimeStamp: number;
|
|
205
|
+
fulfilledTimeStamp?: number;
|
|
206
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
207
|
+
error: undefined;
|
|
208
|
+
} & {
|
|
209
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
210
|
+
isUninitialized: false;
|
|
211
|
+
isLoading: false;
|
|
212
|
+
isSuccess: true;
|
|
213
|
+
isError: false;
|
|
214
|
+
}) | ({
|
|
215
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
216
|
+
} & {
|
|
217
|
+
requestId: string;
|
|
218
|
+
data?: unknown;
|
|
219
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
220
|
+
endpointName: string;
|
|
221
|
+
startedTimeStamp: number;
|
|
222
|
+
fulfilledTimeStamp?: number;
|
|
223
|
+
} & {
|
|
224
|
+
data?: undefined;
|
|
225
|
+
} & {
|
|
226
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
227
|
+
isUninitialized: false;
|
|
228
|
+
isLoading: true;
|
|
229
|
+
isSuccess: false;
|
|
230
|
+
isError: false;
|
|
231
|
+
}) | ({
|
|
232
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
233
|
+
} & Omit<{
|
|
234
|
+
requestId: string;
|
|
235
|
+
data?: unknown;
|
|
236
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
237
|
+
endpointName: string;
|
|
238
|
+
startedTimeStamp: number;
|
|
239
|
+
fulfilledTimeStamp?: number;
|
|
240
|
+
}, "error"> & Required<Pick<{
|
|
241
|
+
requestId: string;
|
|
242
|
+
data?: unknown;
|
|
243
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
244
|
+
endpointName: string;
|
|
245
|
+
startedTimeStamp: number;
|
|
246
|
+
fulfilledTimeStamp?: number;
|
|
247
|
+
}, "error">> & {
|
|
248
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
249
|
+
isUninitialized: false;
|
|
250
|
+
isLoading: false;
|
|
251
|
+
isSuccess: false;
|
|
252
|
+
isError: true;
|
|
253
|
+
})) | {
|
|
254
|
+
error: {
|
|
255
|
+
message: string;
|
|
256
|
+
type: string;
|
|
257
|
+
};
|
|
258
|
+
};
|
|
259
|
+
getResponseWithId: (requestId: string) => ((state: import("@reduxjs/toolkit/query").RootState<{
|
|
260
|
+
flow: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
261
|
+
next: import("@reduxjs/toolkit/query").MutationDefinition<any, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
262
|
+
start: import("@reduxjs/toolkit/query").MutationDefinition<StartOptions<OutgoingQueryParams> | undefined, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
263
|
+
resume: import("@reduxjs/toolkit/query").QueryDefinition<{
|
|
264
|
+
continueToken: string;
|
|
265
|
+
}, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError, {}, import("@reduxjs/toolkit/query").FetchBaseQueryMeta>, never, unknown, "davinci">;
|
|
266
|
+
}, never, "davinci">) => ({
|
|
267
|
+
requestId?: undefined;
|
|
268
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
269
|
+
data?: undefined;
|
|
270
|
+
error?: undefined;
|
|
271
|
+
endpointName?: string;
|
|
272
|
+
startedTimeStamp?: undefined;
|
|
273
|
+
fulfilledTimeStamp?: undefined;
|
|
274
|
+
} & {
|
|
275
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.uninitialized;
|
|
276
|
+
isUninitialized: true;
|
|
277
|
+
isLoading: false;
|
|
278
|
+
isSuccess: false;
|
|
279
|
+
isError: false;
|
|
280
|
+
}) | ({
|
|
281
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
282
|
+
} & Omit<{
|
|
283
|
+
requestId: string;
|
|
284
|
+
data?: unknown;
|
|
285
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
286
|
+
endpointName: string;
|
|
287
|
+
startedTimeStamp: number;
|
|
288
|
+
fulfilledTimeStamp?: number;
|
|
289
|
+
}, "data" | "fulfilledTimeStamp"> & Required<Pick<{
|
|
290
|
+
requestId: string;
|
|
291
|
+
data?: unknown;
|
|
292
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
293
|
+
endpointName: string;
|
|
294
|
+
startedTimeStamp: number;
|
|
295
|
+
fulfilledTimeStamp?: number;
|
|
296
|
+
}, "data" | "fulfilledTimeStamp">> & {
|
|
297
|
+
error: undefined;
|
|
298
|
+
} & {
|
|
299
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.fulfilled;
|
|
300
|
+
isUninitialized: false;
|
|
301
|
+
isLoading: false;
|
|
302
|
+
isSuccess: true;
|
|
303
|
+
isError: false;
|
|
304
|
+
}) | ({
|
|
305
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
306
|
+
} & {
|
|
307
|
+
requestId: string;
|
|
308
|
+
data?: unknown;
|
|
309
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
310
|
+
endpointName: string;
|
|
311
|
+
startedTimeStamp: number;
|
|
312
|
+
fulfilledTimeStamp?: number;
|
|
313
|
+
} & {
|
|
314
|
+
data?: undefined;
|
|
315
|
+
} & {
|
|
316
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.pending;
|
|
317
|
+
isUninitialized: false;
|
|
318
|
+
isLoading: true;
|
|
319
|
+
isSuccess: false;
|
|
320
|
+
isError: false;
|
|
321
|
+
}) | ({
|
|
322
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
323
|
+
} & Omit<{
|
|
324
|
+
requestId: string;
|
|
325
|
+
data?: unknown;
|
|
326
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
327
|
+
endpointName: string;
|
|
328
|
+
startedTimeStamp: number;
|
|
329
|
+
fulfilledTimeStamp?: number;
|
|
330
|
+
}, "error"> & Required<Pick<{
|
|
331
|
+
requestId: string;
|
|
332
|
+
data?: unknown;
|
|
333
|
+
error?: import("@reduxjs/toolkit/query").FetchBaseQueryError | import("@reduxjs/toolkit").SerializedError | undefined;
|
|
334
|
+
endpointName: string;
|
|
335
|
+
startedTimeStamp: number;
|
|
336
|
+
fulfilledTimeStamp?: number;
|
|
337
|
+
}, "error">> & {
|
|
338
|
+
status: import("@reduxjs/toolkit/query").QueryStatus.rejected;
|
|
339
|
+
isUninitialized: false;
|
|
340
|
+
isLoading: false;
|
|
341
|
+
isSuccess: false;
|
|
342
|
+
isError: true;
|
|
343
|
+
})) | {
|
|
344
|
+
error: {
|
|
345
|
+
message: string;
|
|
346
|
+
type: string;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
}>;
|
|
351
|
+
//# sourceMappingURL=client.store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.store.d.ts","sourceRoot":"","sources":["../../../src/lib/client.store.ts"],"names":[],"mappings":"AAeA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,YAAY,EACb,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACZ,oBAAoB,EACrB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E;;;;;;;GAOG;AACH,wBAAsB,OAAO,CAAC,EAC5B,MAAM,EACN,iBAAiB,GAClB,EAAE;IACD,MAAM,EAAE,aAAa,CAAC;IACtB,iBAAiB,CAAC,EAAE,iBAAiB,EAAE,CAAC;CACzC;;IAyBG;;;;;;;;;;;;;;;;OAgBG;6BACsB,YAAY;IAQrC;;;;OAIG;mBACY,aAAa,KAAG,QAAQ;IAkBvC;;;;OAIG;kBACiB,cAAc;;;;;;;;;;;IAclC;;;OAGG;gCAC+B;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE;IAQ3D;;;OAGG;YACW,WAAW,SAAS,mBAAmB,kCACzC,YAAY,CAAC,WAAW,CAAC,GAAG,SAAS;IAMjD;;;;OAIG;wBACiB,qBAAqB,GAAG,oBAAoB,KAAG,OAAO;IA6D1E;;;;;OAKG;0BACmB,qBAAqB,KAAG,SAAS;IAkDvD;;;OAGG;;;;;;;;;;;;;;;;;;;gBA/MC,CAAC;iBACJ,CAAJ;;;;IAiNG;;;OAGG;;;;IAsBH;;;OAGG;;IAKH;;;OAGG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAMH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uCAgB8B,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAc1C"}
|