@autentikar/step 2.1.0-alpha.7 → 2.1.0-alpha.9

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-Mf6wbjK6.js';
1
+ import { S as StorageItem, a as Step } from './index-TuXvg1vy.js';
2
2
  import 'file-type/core';
3
3
  import 'zod';
4
4
 
@@ -5,7 +5,10 @@ interface Step {
5
5
  params<TValue = unknown>(extend?: unknown): Promise<TValue | undefined>;
6
6
  milestone(type: string, status: string, success: boolean): Promise<void>;
7
7
  future(type: string, id: string, ttl: number): Promise<void>;
8
+ /** @deprecated Use addStepData*/
8
9
  identity(organization_id: string, instance_id: string, link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
10
+ addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
11
+ getStepData(type: StepIdentityData["type"], link_session: string | undefined): Promise<StepIdentityData | undefined>;
9
12
  addVendorStat(params: {
10
13
  vendor: string;
11
14
  service: string;
@@ -73,6 +76,16 @@ declare class AutentikarResponse extends Response {
73
76
  }
74
77
 
75
78
  type StepIdentityData = {
79
+ type: "SOURCE_FACE_2D";
80
+ face: string;
81
+ } | {
82
+ type: "DOCUMENT";
83
+ doc_type: IdentityDto["doc_type"];
84
+ images: {
85
+ front: string;
86
+ back?: string;
87
+ };
88
+ } | {
76
89
  type: "CARD";
77
90
  doc_type: IdentityDto["doc_type"];
78
91
  images: {
@@ -82,10 +95,10 @@ type StepIdentityData = {
82
95
  };
83
96
  } | {
84
97
  type: "FACE";
85
- provider: "FACETEC" | "IDENTY";
86
- audit_low: string;
98
+ provider: "FACETEC" | "IDENTY" | "2D" | ({} & string);
99
+ audit_low?: string;
87
100
  audit: string;
88
- map: string;
101
+ map?: string;
89
102
  } | {
90
103
  type: "EMAIL";
91
104
  email: string;
@@ -96,10 +109,13 @@ type StepIdentityData = {
96
109
  } | {
97
110
  type: "CONSENT";
98
111
  value: "OWN" | "AUTENTIKAR" | "NONE";
112
+ text?: string;
99
113
  };
100
114
  declare class StepRequest implements Step {
101
115
  private step;
102
116
  constructor(params: Step);
117
+ addStepData(link_session: string | undefined, identity: IdentityDto, data: StepIdentityData): Promise<any>;
118
+ getStepData(type: StepIdentityData["type"], link_session: string | undefined): Promise<StepIdentityData | undefined>;
103
119
  addVendorStat(params: {
104
120
  vendor: string;
105
121
  service: string;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import 'file-type/core';
2
2
  import 'zod';
3
- export { m as AppEnv, l 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, p as StepContext, n as StepDefinition, c as StepIdentityData, o as StepInstance, d as StepRequest, S as StorageItem } from './index-Mf6wbjK6.js';
3
+ export { m as AppEnv, l 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, p as StepContext, n as StepDefinition, c as StepIdentityData, o as StepInstance, d as StepRequest, S as StorageItem } from './index-TuXvg1vy.js';
package/dist/index.js CHANGED
@@ -99,6 +99,12 @@ var StepRequest = class {
99
99
  constructor(params) {
100
100
  this.step = params;
101
101
  }
102
+ async addStepData(link_session, identity, data) {
103
+ return this.step.addStepData(link_session, identity, data);
104
+ }
105
+ async getStepData(type, link_session) {
106
+ return this.step.getStepData(type, link_session);
107
+ }
102
108
  addVendorStat(params) {
103
109
  return this.step.addVendorStat(params);
104
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autentikar/step",
3
- "version": "2.1.0-alpha.7",
3
+ "version": "2.1.0-alpha.9",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist"