@autentikar/step 2.0.0-alpha.21 → 2.0.0-alpha.23

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-FfzUpwF2.js';
1
+ import { S as StorageItem, a as Step } from './index-Vx5lyWfx.js';
2
2
  import 'file-type/core';
3
3
  import 'zod';
4
4
 
@@ -36,6 +36,9 @@ type MethodContextFlow = {
36
36
  type MethodContextInstance = {
37
37
  id: string;
38
38
  };
39
+ type MethodContextStep = {
40
+ params: unknown;
41
+ };
39
42
  type PersistentType = "FILESYSTEM" | "MONGODB" | "S3" | "NFS" | "S3-MRAP" | "CDN";
40
43
  declare class StorageItem {
41
44
  readonly path: string;
@@ -56,6 +59,7 @@ type MethodContext = {
56
59
  org: MethodContextOrganization;
57
60
  flow: MethodContextFlow;
58
61
  instance: MethodContextInstance;
62
+ step: MethodContextStep;
59
63
  };
60
64
  type Method = (req: Request, output: Record<string, string>, context: MethodContext) => Promise<unknown>;
61
65
  type AppEnv = {
@@ -98,9 +102,8 @@ declare class StepInstance {
98
102
  }
99
103
  declare class FlowContext {
100
104
  readonly id: string;
101
- readonly params: unknown;
102
105
  readonly webhook: string | undefined;
103
- constructor(id: string, params: unknown, webhook: string | undefined);
106
+ constructor(id: string, webhook: string | undefined);
104
107
  }
105
108
  declare class StepContext {
106
109
  readonly org: string;
@@ -108,8 +111,9 @@ declare class StepContext {
108
111
  readonly step: StepDefinition;
109
112
  readonly instance: StepInstance;
110
113
  readonly expires_at: number | undefined;
111
- constructor(org: string, flow: FlowContext, step: StepDefinition, instance: StepInstance, expires_at: number | undefined);
114
+ readonly params: unknown;
115
+ constructor(org: string, flow: FlowContext, step: StepDefinition, instance: StepInstance, expires_at: number | undefined, params: unknown);
112
116
  isExpired(): boolean | 0 | undefined;
113
117
  }
114
118
 
115
- export { type AppEnvironments as A, FlowContext as F, type MethodContextOrganization as M, type PersistentType as P, StorageItem as S, type Step as a, StepRequest as b, type Staging as c, type MethodContextFlow as d, type MethodContextInstance as e, type MethodContext as f, type Method as g, type AppEnv as h, StepDefinition as i, StepInstance as j, StepContext as k };
119
+ export { type AppEnvironments as A, FlowContext as F, type MethodContextOrganization as M, type PersistentType as P, StorageItem as S, type Step as a, StepRequest as b, type Staging as c, type MethodContextFlow as d, type MethodContextInstance as e, type MethodContextStep as f, type MethodContext as g, type Method as h, type AppEnv as i, StepDefinition as j, StepInstance as k, StepContext as l };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  import 'file-type/core';
2
2
  import 'zod';
3
- export { h as AppEnv, A as AppEnvironments, F as FlowContext, g as Method, f as MethodContext, d as MethodContextFlow, e as MethodContextInstance, M as MethodContextOrganization, P as PersistentType, c as Staging, k as StepContext, i as StepDefinition, j as StepInstance, b as StepRequest, S as StorageItem } from './index-FfzUpwF2.js';
3
+ export { i as AppEnv, A as AppEnvironments, F as FlowContext, h as Method, g as MethodContext, d as MethodContextFlow, e as MethodContextInstance, M as MethodContextOrganization, f as MethodContextStep, P as PersistentType, c as Staging, l as StepContext, j as StepDefinition, k as StepInstance, b as StepRequest, S as StorageItem } from './index-Vx5lyWfx.js';
package/dist/index.js CHANGED
@@ -108,19 +108,19 @@ var StepInstance = class {
108
108
  }
109
109
  };
110
110
  var FlowContext = class {
111
- constructor(id, params, webhook) {
111
+ constructor(id, webhook) {
112
112
  this.id = id;
113
- this.params = params;
114
113
  this.webhook = webhook;
115
114
  }
116
115
  };
117
116
  var StepContext = class {
118
- constructor(org, flow, step, instance, expires_at) {
117
+ constructor(org, flow, step, instance, expires_at, params) {
119
118
  this.org = org;
120
119
  this.flow = flow;
121
120
  this.step = step;
122
121
  this.instance = instance;
123
122
  this.expires_at = expires_at;
123
+ this.params = params;
124
124
  }
125
125
  isExpired() {
126
126
  return this.expires_at && this.expires_at < Date.now();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autentikar/step",
3
- "version": "2.0.0-alpha.21",
3
+ "version": "2.0.0-alpha.23",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist"