@autentikar/step 2.2.0 → 2.2.3
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/README.md +0 -0
- package/dist/context.d.ts +1 -1
- package/dist/{index-zegUAOjx.d.ts → index-DaurntVX.d.ts} +14 -9
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/README.md
ADDED
|
File without changes
|
package/dist/context.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { z } from 'zod';
|
|
|
3
3
|
|
|
4
4
|
interface Step {
|
|
5
5
|
params<TValue = unknown>(extend?: unknown): Promise<TValue | undefined>;
|
|
6
|
-
milestone(type: string, status: string, success: boolean): Promise<void>;
|
|
6
|
+
milestone(type: string, status: string, success: boolean, session?: string): Promise<void>;
|
|
7
7
|
future(type: string, id: string, ttl: number): Promise<void>;
|
|
8
8
|
/** @deprecated Use addStepData*/
|
|
9
9
|
identity(organization_id: string, instance_id: string, link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
@@ -18,6 +18,11 @@ interface Step {
|
|
|
18
18
|
transaction_id: string;
|
|
19
19
|
meta?: Record<string, unknown>;
|
|
20
20
|
}): Promise<void>;
|
|
21
|
+
/** Step definition */
|
|
22
|
+
definition(step_id: string): Promise<{
|
|
23
|
+
/** parametros de step */
|
|
24
|
+
params: Record<string, unknown>;
|
|
25
|
+
}>;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
interface AutentikarRequestInit extends RequestInit {
|
|
@@ -58,21 +63,18 @@ declare class AutentikarRequest extends Request {
|
|
|
58
63
|
} | undefined;
|
|
59
64
|
constructor(input: RequestInfo, init?: AutentikarRequestInit);
|
|
60
65
|
}
|
|
66
|
+
type AutentikarData = unknown | undefined;
|
|
61
67
|
interface AutentikarResponseInit extends ResponseInit {
|
|
62
68
|
success: boolean;
|
|
63
69
|
akStatus: string;
|
|
64
|
-
data:
|
|
65
|
-
output: unknown;
|
|
66
|
-
} & Record<string, unknown>;
|
|
70
|
+
data: AutentikarData;
|
|
67
71
|
next: string | undefined;
|
|
68
72
|
error?: string;
|
|
69
73
|
}
|
|
70
74
|
declare class AutentikarResponse extends Response {
|
|
71
75
|
readonly success: boolean | undefined;
|
|
72
76
|
readonly akStatus: string | undefined;
|
|
73
|
-
readonly data:
|
|
74
|
-
output: unknown;
|
|
75
|
-
} & Record<string, unknown>) | undefined;
|
|
77
|
+
readonly data: AutentikarData;
|
|
76
78
|
readonly next: string | undefined;
|
|
77
79
|
readonly error: string | undefined;
|
|
78
80
|
constructor(bodyInit?: BodyInit | null, init?: AutentikarResponseInit);
|
|
@@ -120,6 +122,9 @@ type StepIdentityData = {
|
|
|
120
122
|
declare class StepRequest implements Step {
|
|
121
123
|
private step;
|
|
122
124
|
constructor(params: Step);
|
|
125
|
+
definition(step_id: string): Promise<{
|
|
126
|
+
params: Record<string, unknown>;
|
|
127
|
+
}>;
|
|
123
128
|
addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
124
129
|
getStepData<T extends StepIdentityData["type"]>(type: T, link_session: string | undefined): Promise<Extract<StepIdentityData, {
|
|
125
130
|
type: T;
|
|
@@ -132,7 +137,7 @@ declare class StepRequest implements Step {
|
|
|
132
137
|
meta?: Record<string, unknown>;
|
|
133
138
|
}): Promise<void>;
|
|
134
139
|
future(type: string, id: string, ttl: number): Promise<void>;
|
|
135
|
-
milestone(type: string, status: string, success: boolean): Promise<void>;
|
|
140
|
+
milestone(type: string, status: string, success: boolean, session?: string): Promise<void>;
|
|
136
141
|
params<TValue = unknown>(extend?: unknown): Promise<TValue | undefined>;
|
|
137
142
|
identity(organization_id: string, instance_id: string, link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
138
143
|
}
|
|
@@ -247,4 +252,4 @@ declare class StepContext {
|
|
|
247
252
|
isExpired(): boolean | 0 | undefined;
|
|
248
253
|
}
|
|
249
254
|
|
|
250
|
-
export {
|
|
255
|
+
export { type AppEnv as A, FlowContext as F, type IdentityDto as I, type Method as M, type PersistentType as P, type Resource as R, StorageItem as S, type Step as a, type AppEnvVariables as b, type AppEnvironments as c, AutentikarRequest as d, AutentikarResponse as e, IdentitySchemaDto as f, type MethodContextFlow as g, type MethodContextInstance as h, type MethodContextOrganization as i, type MethodContextStep as j, type Staging as k, StepContext as l, StepDefinition as m, type StepEvent as n, type StepIdentityData as o, StepInstance as p, StepRequest 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 { A as AppEnv, b as AppEnvVariables, c as AppEnvironments, d as AutentikarRequest, e as AutentikarResponse, F as FlowContext, I as IdentityDto, f as IdentitySchemaDto, M as Method, g as MethodContextFlow, h as MethodContextInstance, i as MethodContextOrganization, j as MethodContextStep, P as PersistentType, R as Resource, k as Staging, l as StepContext, m as StepDefinition, n as StepEvent, o as StepIdentityData, p as StepInstance, q as StepRequest, S as StorageItem } from './index-DaurntVX.js';
|
package/dist/index.js
CHANGED
|
@@ -28,8 +28,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
AutentikarRequest: () => AutentikarRequest,
|
|
34
34
|
AutentikarResponse: () => AutentikarResponse,
|
|
35
35
|
FlowContext: () => FlowContext,
|
|
@@ -40,7 +40,7 @@ __export(src_exports, {
|
|
|
40
40
|
StepRequest: () => StepRequest,
|
|
41
41
|
StorageItem: () => StorageItem
|
|
42
42
|
});
|
|
43
|
-
module.exports = __toCommonJS(
|
|
43
|
+
module.exports = __toCommonJS(index_exports);
|
|
44
44
|
var import_zod = require("zod");
|
|
45
45
|
var import_file_type = __toESM(require("file-type"));
|
|
46
46
|
|
|
@@ -100,6 +100,9 @@ var StepRequest = class {
|
|
|
100
100
|
constructor(params) {
|
|
101
101
|
this.step = params;
|
|
102
102
|
}
|
|
103
|
+
async definition(step_id) {
|
|
104
|
+
return this.step.definition(step_id);
|
|
105
|
+
}
|
|
103
106
|
async addStepData(link_session, identity, data) {
|
|
104
107
|
return this.step.addStepData(link_session, identity, data);
|
|
105
108
|
}
|
|
@@ -112,8 +115,8 @@ var StepRequest = class {
|
|
|
112
115
|
future(type, id, ttl) {
|
|
113
116
|
return this.step.future(type, id, ttl);
|
|
114
117
|
}
|
|
115
|
-
milestone(type, status, success) {
|
|
116
|
-
return this.step.milestone(type, status, success);
|
|
118
|
+
milestone(type, status, success, session) {
|
|
119
|
+
return this.step.milestone(type, status, success, session);
|
|
117
120
|
}
|
|
118
121
|
params(extend) {
|
|
119
122
|
return this.step.params(extend);
|