@autentikar/step 2.1.0-alpha.9 → 2.2.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-zegUAOjx.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;
|
|
@@ -85,6 +89,7 @@ type StepIdentityData = {
|
|
|
85
89
|
front: string;
|
|
86
90
|
back?: string;
|
|
87
91
|
};
|
|
92
|
+
expiration_date?: string;
|
|
88
93
|
} | {
|
|
89
94
|
type: "CARD";
|
|
90
95
|
doc_type: IdentityDto["doc_type"];
|
|
@@ -110,12 +115,15 @@ type StepIdentityData = {
|
|
|
110
115
|
type: "CONSENT";
|
|
111
116
|
value: "OWN" | "AUTENTIKAR" | "NONE";
|
|
112
117
|
text?: string;
|
|
118
|
+
consent_id: string;
|
|
113
119
|
};
|
|
114
120
|
declare class StepRequest implements Step {
|
|
115
121
|
private step;
|
|
116
122
|
constructor(params: Step);
|
|
117
123
|
addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
118
|
-
getStepData
|
|
124
|
+
getStepData<T extends StepIdentityData["type"]>(type: T, link_session: string | undefined): Promise<Extract<StepIdentityData, {
|
|
125
|
+
type: T;
|
|
126
|
+
}> | undefined>;
|
|
119
127
|
addVendorStat(params: {
|
|
120
128
|
vendor: string;
|
|
121
129
|
service: string;
|
|
@@ -180,6 +188,7 @@ declare class StorageItem {
|
|
|
180
188
|
}
|
|
181
189
|
type Method = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
182
190
|
type Resource = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
191
|
+
type StepEvent = (req: AutentikarRequest) => Promise<AutentikarResponse>;
|
|
183
192
|
type AppEnvVariables = {
|
|
184
193
|
instance: {
|
|
185
194
|
id: string;
|
|
@@ -238,4 +247,4 @@ declare class StepContext {
|
|
|
238
247
|
isExpired(): boolean | 0 | undefined;
|
|
239
248
|
}
|
|
240
249
|
|
|
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
|
|
250
|
+
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-zegUAOjx.js';
|
package/dist/index.js
CHANGED