@autentikar/step 2.1.0-alpha.9 → 2.2.0-alpha.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/dist/context.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as StorageItem, a as Step } from './index-
|
|
1
|
+
import { S as StorageItem, a as Step } from './index-cKmCZIqw.js';
|
|
2
2
|
import 'file-type/core';
|
|
3
3
|
import 'zod';
|
|
4
4
|
|
|
@@ -23,7 +23,26 @@ interface Preference {
|
|
|
23
23
|
|
|
24
24
|
interface System {
|
|
25
25
|
get<TValue = unknown>(name: string): Promise<TValue | undefined>;
|
|
26
|
+
/**
|
|
27
|
+
* Get the current stage of the step system.
|
|
28
|
+
* This method returns a string representing the current stage of the step system.
|
|
29
|
+
*/
|
|
26
30
|
stage(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the current organization environment.
|
|
33
|
+
*/
|
|
34
|
+
environment(): "PRODUCTION" | "SANDBOX" | "PREVIEW";
|
|
35
|
+
/**
|
|
36
|
+
* Dispatch a method to the step system.
|
|
37
|
+
* This method is used to trigger actions or events within the step system.
|
|
38
|
+
* It is typically used to execute a specific action or to notify the system of an event
|
|
39
|
+
*/
|
|
40
|
+
dispatchStepMethod(method: string): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Put an object in the step system. public access to the step system.
|
|
43
|
+
*/
|
|
44
|
+
putObject<TValue = unknown>(name: string, value: TValue): Promise<void>;
|
|
45
|
+
getObject<TValue = unknown>(name: string): Promise<TValue | undefined>;
|
|
27
46
|
}
|
|
28
47
|
|
|
29
48
|
declare let step: Step;
|
|
@@ -8,7 +8,9 @@ interface Step {
|
|
|
8
8
|
/** @deprecated Use addStepData*/
|
|
9
9
|
identity(organization_id: string, instance_id: string, link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
10
10
|
addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
11
|
-
getStepData
|
|
11
|
+
getStepData<T extends StepIdentityData["type"]>(type: T, link_session: string | undefined): Promise<Extract<StepIdentityData, {
|
|
12
|
+
type: T;
|
|
13
|
+
}> | undefined>;
|
|
12
14
|
addVendorStat(params: {
|
|
13
15
|
vendor: string;
|
|
14
16
|
service: string;
|
|
@@ -20,7 +22,6 @@ interface Step {
|
|
|
20
22
|
|
|
21
23
|
interface AutentikarRequestInit extends RequestInit {
|
|
22
24
|
host: string;
|
|
23
|
-
staging: Staging;
|
|
24
25
|
organization?: {
|
|
25
26
|
id: string;
|
|
26
27
|
alias: string;
|
|
@@ -38,11 +39,14 @@ interface AutentikarRequestInit extends RequestInit {
|
|
|
38
39
|
output?: Record<string, string>;
|
|
39
40
|
link_session: string | undefined;
|
|
40
41
|
params?: unknown;
|
|
42
|
+
/** @deprecated */
|
|
43
|
+
staging: Staging;
|
|
41
44
|
}
|
|
42
45
|
declare class AutentikarRequest extends Request {
|
|
43
46
|
readonly organization?: AutentikarRequestInit["organization"];
|
|
44
47
|
readonly step?: AutentikarRequestInit["step"];
|
|
45
48
|
readonly instance?: AutentikarRequestInit["instance"];
|
|
49
|
+
/** @deprecated use system.stage();. */
|
|
46
50
|
readonly staging?: Staging;
|
|
47
51
|
readonly link_session: string | undefined;
|
|
48
52
|
readonly params?: unknown;
|
|
@@ -110,12 +114,15 @@ type StepIdentityData = {
|
|
|
110
114
|
type: "CONSENT";
|
|
111
115
|
value: "OWN" | "AUTENTIKAR" | "NONE";
|
|
112
116
|
text?: string;
|
|
117
|
+
consent_id: string;
|
|
113
118
|
};
|
|
114
119
|
declare class StepRequest implements Step {
|
|
115
120
|
private step;
|
|
116
121
|
constructor(params: Step);
|
|
117
122
|
addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
118
|
-
getStepData
|
|
123
|
+
getStepData<T extends StepIdentityData["type"]>(type: T, link_session: string | undefined): Promise<Extract<StepIdentityData, {
|
|
124
|
+
type: T;
|
|
125
|
+
}> | undefined>;
|
|
119
126
|
addVendorStat(params: {
|
|
120
127
|
vendor: string;
|
|
121
128
|
service: string;
|
|
@@ -180,6 +187,7 @@ declare class StorageItem {
|
|
|
180
187
|
}
|
|
181
188
|
type Method = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
182
189
|
type Resource = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
190
|
+
type StepEvent = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
183
191
|
type AppEnvVariables = {
|
|
184
192
|
instance: {
|
|
185
193
|
id: string;
|
|
@@ -238,4 +246,4 @@ declare class StepContext {
|
|
|
238
246
|
isExpired(): boolean | 0 | undefined;
|
|
239
247
|
}
|
|
240
248
|
|
|
241
|
-
export { AutentikarRequest as A, FlowContext as F, IdentitySchemaDto as I, type MethodContextOrganization as M, type PersistentType as P, type Resource as R, StorageItem as S, type Step as a, AutentikarResponse as b, type StepIdentityData as c, StepRequest as d, type IdentityDto as e, type AppEnvironments as f, type Staging as g, type MethodContextFlow as h, type MethodContextInstance as i, type MethodContextStep as j, type Method as k, type
|
|
249
|
+
export { AutentikarRequest as A, FlowContext as F, IdentitySchemaDto as I, type MethodContextOrganization as M, type PersistentType as P, type Resource as R, StorageItem as S, type Step as a, AutentikarResponse as b, type StepIdentityData as c, StepRequest as d, type IdentityDto as e, type AppEnvironments as f, type Staging as g, type MethodContextFlow as h, type MethodContextInstance as i, type MethodContextStep as j, type Method as k, type StepEvent as l, type AppEnvVariables as m, type AppEnv as n, StepDefinition as o, StepInstance as p, StepContext as q };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import 'file-type/core';
|
|
2
2
|
import 'zod';
|
|
3
|
-
export {
|
|
3
|
+
export { n as AppEnv, m as AppEnvVariables, f as AppEnvironments, A as AutentikarRequest, b as AutentikarResponse, F as FlowContext, e as IdentityDto, I as IdentitySchemaDto, k as Method, h as MethodContextFlow, i as MethodContextInstance, M as MethodContextOrganization, j as MethodContextStep, P as PersistentType, R as Resource, g as Staging, q as StepContext, o as StepDefinition, l as StepEvent, c as StepIdentityData, p as StepInstance, d as StepRequest, S as StorageItem } from './index-cKmCZIqw.js';
|
package/dist/index.js
CHANGED