@autentikar/step 2.2.2 → 2.2.4
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-fnFkQ5pV.d.ts → index-CmOrkCZE.d.ts} +11 -3
- 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
|
+
} | undefined>;
|
|
21
26
|
}
|
|
22
27
|
|
|
23
28
|
interface AutentikarRequestInit extends RequestInit {
|
|
@@ -117,6 +122,9 @@ type StepIdentityData = {
|
|
|
117
122
|
declare class StepRequest implements Step {
|
|
118
123
|
private step;
|
|
119
124
|
constructor(params: Step);
|
|
125
|
+
definition(step_id: string): Promise<{
|
|
126
|
+
params: Record<string, unknown>;
|
|
127
|
+
} | undefined>;
|
|
120
128
|
addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
121
129
|
getStepData<T extends StepIdentityData["type"]>(type: T, link_session: string | undefined): Promise<Extract<StepIdentityData, {
|
|
122
130
|
type: T;
|
|
@@ -129,7 +137,7 @@ declare class StepRequest implements Step {
|
|
|
129
137
|
meta?: Record<string, unknown>;
|
|
130
138
|
}): Promise<void>;
|
|
131
139
|
future(type: string, id: string, ttl: number): Promise<void>;
|
|
132
|
-
milestone(type: string, status: string, success: boolean): Promise<void>;
|
|
140
|
+
milestone(type: string, status: string, success: boolean, session?: string): Promise<void>;
|
|
133
141
|
params<TValue = unknown>(extend?: unknown): Promise<TValue | undefined>;
|
|
134
142
|
identity(organization_id: string, instance_id: string, link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
|
|
135
143
|
}
|
|
@@ -244,4 +252,4 @@ declare class StepContext {
|
|
|
244
252
|
isExpired(): boolean | 0 | undefined;
|
|
245
253
|
}
|
|
246
254
|
|
|
247
|
-
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-CmOrkCZE.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);
|