@autentikar/step 2.0.0-alpha.18 → 2.0.0-alpha.20
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
|
@@ -7,14 +7,13 @@ interface Step {
|
|
|
7
7
|
future(type: string, id: string, ttl: number): Promise<void>;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
declare class
|
|
10
|
+
declare class StepRequest implements Step {
|
|
11
11
|
private step;
|
|
12
12
|
constructor(params: Step);
|
|
13
13
|
future(type: string, id: string, ttl: number): Promise<void>;
|
|
14
14
|
milestone(type: string, status: string, success: boolean): Promise<void>;
|
|
15
15
|
params<TValue = unknown>(): Promise<TValue | undefined>;
|
|
16
16
|
}
|
|
17
|
-
type StepRequest = StepRequester;
|
|
18
17
|
declare const AppEnvironmentsSchema: z.ZodObject<{
|
|
19
18
|
STAGING: z.ZodEnum<["LOCAL", "QA", "PROD"]>;
|
|
20
19
|
STEP_TYPE: z.ZodString;
|
|
@@ -32,6 +31,7 @@ type MethodContextOrganization = {
|
|
|
32
31
|
};
|
|
33
32
|
type MethodContextFlow = {
|
|
34
33
|
id: string;
|
|
34
|
+
params: unknown;
|
|
35
35
|
};
|
|
36
36
|
type MethodContextInstance = {
|
|
37
37
|
id: string;
|
|
@@ -64,5 +64,31 @@ type AppEnv = {
|
|
|
64
64
|
instance: string;
|
|
65
65
|
};
|
|
66
66
|
};
|
|
67
|
+
declare class StepDefinition {
|
|
68
|
+
readonly id: string;
|
|
69
|
+
readonly flow: string;
|
|
70
|
+
readonly type: string;
|
|
71
|
+
readonly user_interaction: boolean;
|
|
72
|
+
readonly return_result: boolean;
|
|
73
|
+
end_after_processing: undefined | {
|
|
74
|
+
dispatch: "NO";
|
|
75
|
+
} | {
|
|
76
|
+
dispatch: "AUTO";
|
|
77
|
+
};
|
|
78
|
+
readonly params: Record<string, string> | undefined;
|
|
79
|
+
readonly output: Record<string, string> | undefined;
|
|
80
|
+
readonly milestone: undefined | {
|
|
81
|
+
cloud_hidden?: boolean;
|
|
82
|
+
call_webhook?: boolean;
|
|
83
|
+
};
|
|
84
|
+
constructor(id: string, flow: string, type: string, user_interaction: boolean, return_result: boolean, end_after_processing: undefined | {
|
|
85
|
+
dispatch: "NO";
|
|
86
|
+
} | {
|
|
87
|
+
dispatch: "AUTO";
|
|
88
|
+
}, params: Record<string, string> | undefined, output: Record<string, string> | undefined, milestone: undefined | {
|
|
89
|
+
cloud_hidden?: boolean;
|
|
90
|
+
call_webhook?: boolean;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
67
93
|
|
|
68
|
-
export { type AppEnvironments as A, type MethodContextOrganization as M, type PersistentType as P, StorageItem as S, type Step as a,
|
|
94
|
+
export { type AppEnvironments as A, 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 };
|
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, g as Method, f as MethodContext, d as MethodContextFlow, e as MethodContextInstance, M as MethodContextOrganization, P as PersistentType, c as Staging, b as StepRequest, S as StorageItem } from './index-
|
|
3
|
+
export { h as AppEnv, A as AppEnvironments, g as Method, f as MethodContext, d as MethodContextFlow, e as MethodContextInstance, M as MethodContextOrganization, P as PersistentType, c as Staging, i as StepDefinition, b as StepRequest, S as StorageItem } from './index-9E524NfU.js';
|
package/dist/index.js
CHANGED
|
@@ -30,11 +30,28 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var src_exports = {};
|
|
32
32
|
__export(src_exports, {
|
|
33
|
+
StepDefinition: () => StepDefinition,
|
|
34
|
+
StepRequest: () => StepRequest,
|
|
33
35
|
StorageItem: () => StorageItem
|
|
34
36
|
});
|
|
35
37
|
module.exports = __toCommonJS(src_exports);
|
|
36
38
|
var import_zod = require("zod");
|
|
37
39
|
var import_file_type = __toESM(require("file-type"));
|
|
40
|
+
var StepRequest = class {
|
|
41
|
+
step;
|
|
42
|
+
constructor(params) {
|
|
43
|
+
this.step = params;
|
|
44
|
+
}
|
|
45
|
+
future(type, id, ttl) {
|
|
46
|
+
return this.step.future(type, id, ttl);
|
|
47
|
+
}
|
|
48
|
+
milestone(type, status, success) {
|
|
49
|
+
return this.step.milestone(type, status, success);
|
|
50
|
+
}
|
|
51
|
+
params() {
|
|
52
|
+
return this.step.params();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
38
55
|
var AppEnvironmentsSchema = import_zod.z.object({
|
|
39
56
|
STAGING: import_zod.z.enum(["LOCAL", "QA", "PROD"]),
|
|
40
57
|
STEP_TYPE: import_zod.z.string()
|
|
@@ -62,7 +79,22 @@ var StorageItem = class {
|
|
|
62
79
|
return getContentTypeFromBuffer(this.buffer);
|
|
63
80
|
}
|
|
64
81
|
};
|
|
82
|
+
var StepDefinition = class {
|
|
83
|
+
constructor(id, flow, type, user_interaction, return_result, end_after_processing, params, output, milestone) {
|
|
84
|
+
this.id = id;
|
|
85
|
+
this.flow = flow;
|
|
86
|
+
this.type = type;
|
|
87
|
+
this.user_interaction = user_interaction;
|
|
88
|
+
this.return_result = return_result;
|
|
89
|
+
this.end_after_processing = end_after_processing;
|
|
90
|
+
this.params = params;
|
|
91
|
+
this.output = output;
|
|
92
|
+
this.milestone = milestone;
|
|
93
|
+
}
|
|
94
|
+
};
|
|
65
95
|
// Annotate the CommonJS export names for ESM import in node:
|
|
66
96
|
0 && (module.exports = {
|
|
97
|
+
StepDefinition,
|
|
98
|
+
StepRequest,
|
|
67
99
|
StorageItem
|
|
68
100
|
});
|