@autentikar/step 2.0.0-alpha.10 → 2.0.0-alpha.12

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/index.d.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { z } from 'zod';
2
+
1
3
  type MethodContextOrganization = {
2
4
  id: string;
3
5
  };
@@ -18,5 +20,23 @@ type MethodContext = {
18
20
  instance: MethodContextInstance;
19
21
  };
20
22
  type Method = (req: Request, output: Record<string, string>, context: MethodContext) => Promise<unknown>;
23
+ declare const AppEnvironmentsSchema: z.ZodObject<{
24
+ STAGING: z.ZodEnum<["LOCAL", "QA", "PROD"]>;
25
+ STEP_TYPE: z.ZodString;
26
+ }, "strip", z.ZodTypeAny, {
27
+ STAGING: "LOCAL" | "QA" | "PROD";
28
+ STEP_TYPE: string;
29
+ }, {
30
+ STAGING: "LOCAL" | "QA" | "PROD";
31
+ STEP_TYPE: string;
32
+ }>;
33
+ type AppEnvironments = z.infer<typeof AppEnvironmentsSchema>;
34
+ type Staging = AppEnvironments["STAGING"];
35
+ type AppEnv = {
36
+ Bindings: AppEnvironments;
37
+ Variables: {
38
+ instance: string;
39
+ };
40
+ };
21
41
 
22
- export type { Method, MethodContext, MethodContextFlow, MethodContextInstance, MethodContextOrganization };
42
+ export type { AppEnv, AppEnvironments, Method, MethodContext, MethodContextFlow, MethodContextInstance, MethodContextOrganization, Staging };
package/dist/index.js CHANGED
@@ -16,3 +16,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
16
16
  // src/index.ts
17
17
  var src_exports = {};
18
18
  module.exports = __toCommonJS(src_exports);
19
+ var import_zod = require("zod");
20
+ var AppEnvironmentsSchema = import_zod.z.object({
21
+ STAGING: import_zod.z.enum(["LOCAL", "QA", "PROD"]),
22
+ STEP_TYPE: import_zod.z.string()
23
+ });
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@autentikar/step",
3
- "version": "2.0.0-alpha.10",
3
+ "version": "2.0.0-alpha.12",
4
4
  "description": "",
5
5
  "files": [
6
6
  "dist"
7
7
  ],
8
8
  "exports": {
9
+ ".": "./dist/index.d.ts",
9
10
  "./context": "./dist/context.js",
10
11
  "./package.json": "./package.json"
11
12
  },
@@ -31,5 +32,8 @@
31
32
  "@types/node": "^20.11.5",
32
33
  "tsup": "^8.0.1",
33
34
  "typescript": "^5.2.2"
35
+ },
36
+ "dependencies": {
37
+ "zod": "^3.22.4"
34
38
  }
35
39
  }