@autentikar/step 2.0.0-alpha.16 → 2.0.0-alpha.17

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 { StorageItem } from './index.js';
1
+ import { S as StorageItem, a as Step } from './index-bYFaLTgo.js';
2
2
  import 'file-type/core';
3
3
  import 'zod';
4
4
 
@@ -21,11 +21,6 @@ interface Preference {
21
21
  get<TValue = unknown>(name: string): Promise<TValue | undefined>;
22
22
  }
23
23
 
24
- interface Step {
25
- params<TValue = unknown>(): Promise<TValue | undefined>;
26
- milestone(type: string, status: string, success: boolean): Promise<void>;
27
- }
28
-
29
24
  interface System {
30
25
  get<TValue = unknown>(name: string): Promise<TValue | undefined>;
31
26
  }
@@ -38,4 +33,4 @@ declare let system: System;
38
33
  declare let kv: KV;
39
34
  declare let asset: Storage;
40
35
 
41
- export { type KV, type Params, type Preference, type Step, type Storage, type System, asset, kv, params, preference, step, system };
36
+ export { type KV, type Params, type Preference, Step, type Storage, type System, asset, kv, params, preference, step, system };
@@ -0,0 +1,66 @@
1
+ import * as file_type_core from 'file-type/core';
2
+ import { z } from 'zod';
3
+
4
+ interface Step {
5
+ params<TValue = unknown>(): Promise<TValue | undefined>;
6
+ milestone(type: string, status: string, success: boolean): Promise<void>;
7
+ }
8
+
9
+ declare class StepRequester implements Step {
10
+ private step;
11
+ constructor(params: Step);
12
+ milestone(type: string, status: string, success: boolean): Promise<void>;
13
+ params<TValue = unknown>(): Promise<TValue | undefined>;
14
+ }
15
+ type StepRequest = StepRequester;
16
+ declare const AppEnvironmentsSchema: z.ZodObject<{
17
+ STAGING: z.ZodEnum<["LOCAL", "QA", "PROD"]>;
18
+ STEP_TYPE: z.ZodString;
19
+ }, "strip", z.ZodTypeAny, {
20
+ STAGING: "LOCAL" | "QA" | "PROD";
21
+ STEP_TYPE: string;
22
+ }, {
23
+ STAGING: "LOCAL" | "QA" | "PROD";
24
+ STEP_TYPE: string;
25
+ }>;
26
+ type AppEnvironments = z.infer<typeof AppEnvironmentsSchema>;
27
+ type Staging = AppEnvironments["STAGING"];
28
+ type MethodContextOrganization = {
29
+ id: string;
30
+ };
31
+ type MethodContextFlow = {
32
+ id: string;
33
+ };
34
+ type MethodContextInstance = {
35
+ id: string;
36
+ };
37
+ type PersistentType = "FILESYSTEM" | "MONGODB" | "S3" | "NFS" | "S3-MRAP" | "CDN";
38
+ declare class StorageItem {
39
+ readonly path: string;
40
+ readonly type: PersistentType;
41
+ readonly buffer: Buffer;
42
+ readonly fileUrl: string;
43
+ readonly contentType: string | undefined;
44
+ constructor(path: string, type: PersistentType, buffer: Buffer, fileUrl: string, contentType: string | undefined);
45
+ getBase64(): string;
46
+ getContenType(): Promise<file_type_core.MimeType | "unknown">;
47
+ }
48
+ type MethodContext = {
49
+ staging: Staging;
50
+ /**
51
+ * no incluye schema (https://)
52
+ */
53
+ host: string;
54
+ org: MethodContextOrganization;
55
+ flow: MethodContextFlow;
56
+ instance: MethodContextInstance;
57
+ };
58
+ type Method = (req: Request, output: Record<string, string>, context: MethodContext) => Promise<unknown>;
59
+ type AppEnv = {
60
+ Bindings: AppEnvironments;
61
+ Variables: {
62
+ instance: string;
63
+ };
64
+ };
65
+
66
+ export { type AppEnvironments as A, type MethodContextOrganization as M, type PersistentType as P, StorageItem as S, type Step as a, type 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 };
package/dist/index.d.ts CHANGED
@@ -1,54 +1,3 @@
1
- import * as file_type_core from 'file-type/core';
2
- import { z } from 'zod';
3
-
4
- declare const AppEnvironmentsSchema: z.ZodObject<{
5
- STAGING: z.ZodEnum<["LOCAL", "QA", "PROD"]>;
6
- STEP_TYPE: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- STAGING: "LOCAL" | "QA" | "PROD";
9
- STEP_TYPE: string;
10
- }, {
11
- STAGING: "LOCAL" | "QA" | "PROD";
12
- STEP_TYPE: string;
13
- }>;
14
- type AppEnvironments = z.infer<typeof AppEnvironmentsSchema>;
15
- type Staging = AppEnvironments["STAGING"];
16
- type MethodContextOrganization = {
17
- id: string;
18
- };
19
- type MethodContextFlow = {
20
- id: string;
21
- };
22
- type MethodContextInstance = {
23
- id: string;
24
- };
25
- type PersistentType = "FILESYSTEM" | "MONGODB" | "S3" | "NFS" | "S3-MRAP" | "CDN";
26
- declare class StorageItem {
27
- readonly path: string;
28
- readonly type: PersistentType;
29
- readonly buffer: Buffer;
30
- readonly fileUrl: string;
31
- readonly contentType: string | undefined;
32
- constructor(path: string, type: PersistentType, buffer: Buffer, fileUrl: string, contentType: string | undefined);
33
- getBase64(): string;
34
- getContenType(): Promise<file_type_core.MimeType | "unknown">;
35
- }
36
- type MethodContext = {
37
- staging: Staging;
38
- /**
39
- * no incluye schema (https://)
40
- */
41
- host: string;
42
- org: MethodContextOrganization;
43
- flow: MethodContextFlow;
44
- instance: MethodContextInstance;
45
- };
46
- type Method = (req: Request, output: Record<string, string>, context: MethodContext) => Promise<unknown>;
47
- type AppEnv = {
48
- Bindings: AppEnvironments;
49
- Variables: {
50
- instance: string;
51
- };
52
- };
53
-
54
- export { type AppEnv, type AppEnvironments, type Method, type MethodContext, type MethodContextFlow, type MethodContextInstance, type MethodContextOrganization, type PersistentType, type Staging, StorageItem };
1
+ import 'file-type/core';
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-bYFaLTgo.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@autentikar/step",
3
- "version": "2.0.0-alpha.16",
3
+ "version": "2.0.0-alpha.17",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist"