@qawolf/api-contracts 0.11.0 → 0.14.0
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/v1/environment/find.d.ts +46 -0
- package/dist/v1/environment/find.d.ts.map +1 -0
- package/dist/v1/environment/find.js +30 -0
- package/dist/v1/environment/find.js.map +1 -0
- package/dist/v1/environment/index.d.ts +17 -3
- package/dist/v1/environment/index.d.ts.map +1 -1
- package/dist/v1/environment/index.js +32 -48
- package/dist/v1/environment/index.js.map +1 -1
- package/dist/v1/environment/resource.d.ts +29 -0
- package/dist/v1/environment/resource.d.ts.map +1 -0
- package/dist/v1/environment/resource.js +46 -0
- package/dist/v1/environment/resource.js.map +1 -0
- package/dist/v1/flow/addTag.d.ts +19 -0
- package/dist/v1/flow/addTag.d.ts.map +1 -0
- package/dist/v1/flow/addTag.js +29 -0
- package/dist/v1/flow/addTag.js.map +1 -0
- package/dist/v1/index.d.ts +148 -4
- package/dist/v1/index.d.ts.map +1 -1
- package/dist/v1/index.js +6 -1
- package/dist/v1/index.js.map +1 -1
- package/dist/v1/issue/create.d.ts +4 -1
- package/dist/v1/issue/create.d.ts.map +1 -1
- package/dist/v1/issue/create.js +3 -0
- package/dist/v1/issue/create.js.map +1 -1
- package/dist/v1/issue/index.d.ts +3 -1
- package/dist/v1/issue/index.d.ts.map +1 -1
- package/dist/v1/issue/index.js +3 -0
- package/dist/v1/issue/index.js.map +1 -1
- package/package.json +8 -8
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeFindEnvironmentsContract: <EnvironmentId extends PublicIdSchema>(ids: {
|
|
4
|
+
environment: EnvironmentId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "List the team's environments, newest first.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
9
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
10
|
+
includeTerminated: z.ZodDefault<z.ZodBoolean>;
|
|
11
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
12
|
+
static: "static";
|
|
13
|
+
preview: "preview";
|
|
14
|
+
}>>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
readonly kind: "read";
|
|
17
|
+
readonly name: "environment.find";
|
|
18
|
+
readonly output: z.ZodObject<{
|
|
19
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
20
|
+
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
21
|
+
lastSyncedCommitHash: z.ZodString;
|
|
22
|
+
name: z.ZodString;
|
|
23
|
+
syncStatus: z.ZodLiteral<"reconciled">;
|
|
24
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
25
|
+
name: z.ZodString;
|
|
26
|
+
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
27
|
+
}, z.core.$strip>], "syncStatus">>;
|
|
28
|
+
id: EnvironmentId;
|
|
29
|
+
kind: z.ZodEnum<{
|
|
30
|
+
static: "static";
|
|
31
|
+
preview: "preview";
|
|
32
|
+
}>;
|
|
33
|
+
name: z.ZodString;
|
|
34
|
+
status: z.ZodEnum<{
|
|
35
|
+
blocked: "blocked";
|
|
36
|
+
"needs-investigation": "needs-investigation";
|
|
37
|
+
ready: "ready";
|
|
38
|
+
running: "running";
|
|
39
|
+
}>;
|
|
40
|
+
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
41
|
+
url: z.ZodURL;
|
|
42
|
+
}, z.core.$strip>>;
|
|
43
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=find.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.d.ts","sourceRoot":"","sources":["../../../src/v1/environment/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAKhD,eAAO,MAAM,4BAA4B,GACvC,aAAa,SAAS,cAAc,EACpC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;CAC5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiCA,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makePaginationInputFields, nextCursorSchema } from "../pagination.js";
|
|
3
|
+
import { makeEnvironmentResourceSchema } from "./resource.js";
|
|
4
|
+
export const makeFindEnvironmentsContract = (ids) => {
|
|
5
|
+
const input = z.object({
|
|
6
|
+
includeTerminated: z
|
|
7
|
+
.boolean()
|
|
8
|
+
.default(false)
|
|
9
|
+
.describe("Also list terminated environments. By default only environments that have not been terminated are listed."),
|
|
10
|
+
kind: z
|
|
11
|
+
.enum(["static", "preview"])
|
|
12
|
+
.optional()
|
|
13
|
+
.describe("Only list environments of this kind. Omit to list both."),
|
|
14
|
+
...makePaginationInputFields({ defaultLimit: 20, maxLimit: 100 }),
|
|
15
|
+
});
|
|
16
|
+
const output = z.object({
|
|
17
|
+
environments: z
|
|
18
|
+
.array(makeEnvironmentResourceSchema(ids))
|
|
19
|
+
.describe("The team's environments, newest first."),
|
|
20
|
+
nextCursor: nextCursorSchema,
|
|
21
|
+
});
|
|
22
|
+
return {
|
|
23
|
+
description: "List the team's environments, newest first.",
|
|
24
|
+
input,
|
|
25
|
+
kind: "read",
|
|
26
|
+
name: "environment.find",
|
|
27
|
+
output,
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=find.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"find.js","sourceRoot":"","sources":["../../../src/v1/environment/find.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAE9D,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAE1C,GAED,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,iBAAiB,EAAE,CAAC;aACjB,OAAO,EAAE;aACT,OAAO,CAAC,KAAK,CAAC;aACd,QAAQ,CACP,2GAA2G,CAC5G;QACH,IAAI,EAAE,CAAC;aACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;aAC3B,QAAQ,EAAE;aACV,QAAQ,CAAC,yDAAyD,CAAC;QACtE,GAAG,yBAAyB,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;KAClE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,YAAY,EAAE,CAAC;aACZ,KAAK,CAAC,6BAA6B,CAAC,GAAG,CAAC,CAAC;aACzC,QAAQ,CAAC,wCAAwC,CAAC;QACrD,UAAU,EAAE,gBAAgB;KAC7B,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,6CAA6C;QAC1D,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,kBAAkB;QACxB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -8,7 +8,6 @@ export declare const makeGetEnvironmentContract: <EnvironmentId extends PublicId
|
|
|
8
8
|
readonly kind: "read";
|
|
9
9
|
readonly name: "environment.get";
|
|
10
10
|
readonly output: z.ZodObject<{
|
|
11
|
-
environmentId: EnvironmentId;
|
|
12
11
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
13
12
|
lastSyncedCommitHash: z.ZodString;
|
|
14
13
|
name: z.ZodString;
|
|
@@ -17,6 +16,7 @@ export declare const makeGetEnvironmentContract: <EnvironmentId extends PublicId
|
|
|
17
16
|
name: z.ZodString;
|
|
18
17
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
19
18
|
}, z.core.$strip>], "syncStatus">>;
|
|
19
|
+
id: EnvironmentId;
|
|
20
20
|
kind: z.ZodEnum<{
|
|
21
21
|
static: "static";
|
|
22
22
|
preview: "preview";
|
|
@@ -43,15 +43,28 @@ export declare const makeListEnvironmentVariableNamesContract: <EnvironmentId ex
|
|
|
43
43
|
variableNames: z.ZodArray<z.ZodString>;
|
|
44
44
|
}, z.core.$strip>;
|
|
45
45
|
};
|
|
46
|
-
export declare const
|
|
46
|
+
export declare const makeSetEnvironmentVariableContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId>) => {
|
|
47
|
+
readonly description: "Create or replace one environment variable by name and return its stored name. The value is never returned.";
|
|
48
|
+
readonly input: z.ZodObject<{
|
|
49
|
+
environmentId: EnvironmentId;
|
|
50
|
+
name: z.ZodString;
|
|
51
|
+
value: z.ZodString;
|
|
52
|
+
}, z.core.$strip>;
|
|
53
|
+
readonly kind: "write";
|
|
54
|
+
readonly name: "environment.setVariable";
|
|
55
|
+
readonly output: z.ZodObject<{
|
|
56
|
+
name: z.ZodString;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
};
|
|
59
|
+
export declare const makeCreateEnvironmentContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, WorkspaceId extends PublicIdSchema = PublicIdSchema>(ids: PublicIdSchemasOf<EnvironmentId, FlowId, RunId, PublicIdSchema, PublicIdSchema, WorkspaceId>) => {
|
|
47
60
|
readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
|
|
48
61
|
readonly input: z.ZodObject<{
|
|
49
62
|
name: z.ZodString;
|
|
63
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
50
64
|
}, z.core.$strip>;
|
|
51
65
|
readonly kind: "write";
|
|
52
66
|
readonly name: "environment.create";
|
|
53
67
|
readonly output: z.ZodObject<{
|
|
54
|
-
environmentId: EnvironmentId;
|
|
55
68
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
56
69
|
lastSyncedCommitHash: z.ZodString;
|
|
57
70
|
name: z.ZodString;
|
|
@@ -60,6 +73,7 @@ export declare const makeCreateEnvironmentContract: <EnvironmentId extends Publi
|
|
|
60
73
|
name: z.ZodString;
|
|
61
74
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
62
75
|
}, z.core.$strip>], "syncStatus">>;
|
|
76
|
+
id: EnvironmentId;
|
|
63
77
|
kind: z.ZodEnum<{
|
|
64
78
|
static: "static";
|
|
65
79
|
preview: "preview";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAInE,eAAO,MAAM,0BAA0B,GACrC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAE5B,KAAK,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBrD,CAAC;AAEF,eAAO,MAAM,wCAAwC,GACnD,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAE5B,KAAK,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC;;;;;;;;;;CA8BrD,CAAC;AAEF,eAAO,MAAM,kCAAkC,GAC7C,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAE5B,KAAK,iBAAiB,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC;;;;;;;;;;;;CAuCrD,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,WAAW,SAAS,cAAc,GAAG,cAAc,EAEnD,KAAK,iBAAiB,CACpB,aAAa,EACb,MAAM,EACN,KAAK,EACL,cAAc,EACd,cAAc,EACd,WAAW,CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BF,CAAC"}
|
|
@@ -1,55 +1,10 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
// Both environment contracts return this one resource. The read and write
|
|
4
|
-
// shapes cannot drift apart.
|
|
5
|
-
const makeEnvironmentResource = (environmentId) => resource({
|
|
6
|
-
environmentId,
|
|
7
|
-
// Named after the branch, not "status": the object describes the
|
|
8
|
-
// environment's flow code branch. "flowCode" marks it as ours, so
|
|
9
|
-
// consumers don't read it as the status of their own git.
|
|
10
|
-
flowCodeBranch: z
|
|
11
|
-
.discriminatedUnion("syncStatus", [
|
|
12
|
-
z.object({
|
|
13
|
-
lastSyncedCommitHash: z
|
|
14
|
-
.string()
|
|
15
|
-
.describe("Hash of the latest reconciled commit."),
|
|
16
|
-
name: z
|
|
17
|
-
.string()
|
|
18
|
-
.describe("The name of the environment's flow code branch."),
|
|
19
|
-
syncStatus: z
|
|
20
|
-
.literal("reconciled")
|
|
21
|
-
.describe("The branch has reconciled at least one commit."),
|
|
22
|
-
}),
|
|
23
|
-
z.object({
|
|
24
|
-
name: z
|
|
25
|
-
.string()
|
|
26
|
-
.describe("The name of the environment's flow code branch."),
|
|
27
|
-
syncStatus: z
|
|
28
|
-
.literal("not-reconciled")
|
|
29
|
-
.describe("The branch has not reconciled any commit yet."),
|
|
30
|
-
}),
|
|
31
|
-
])
|
|
32
|
-
.optional()
|
|
33
|
-
.describe("The environment's flow code branch and its git reconciliation state, if it has one."),
|
|
34
|
-
kind: z
|
|
35
|
-
.enum(["static", "preview"])
|
|
36
|
-
.describe("Whether the environment is static or a preview."),
|
|
37
|
-
name: z.string(),
|
|
38
|
-
// Environment-scoped health, aligned with the CI greenlight vocabulary
|
|
39
|
-
// (deriveEffectiveEnvironmentStatus): "ready" is the greenlit state.
|
|
40
|
-
status: z
|
|
41
|
-
.enum(["blocked", "needs-investigation", "ready", "running"])
|
|
42
|
-
.describe("Standing health across the environment's runs: blocked (open blocking bugs), needs-investigation (failures awaiting triage), running (flows executing), ready (none of the above — the greenlit state)."),
|
|
43
|
-
terminatedAt: z.iso
|
|
44
|
-
.datetime()
|
|
45
|
-
.optional()
|
|
46
|
-
.describe("When the environment was terminated, if it has been."),
|
|
47
|
-
}, { urlFieldDescription: "Absolute URL of the environment page." });
|
|
2
|
+
import { makeEnvironmentResourceSchema } from "./resource.js";
|
|
48
3
|
export const makeGetEnvironmentContract = (ids) => {
|
|
49
4
|
const input = z.object({
|
|
50
5
|
environmentId: ids.environment,
|
|
51
6
|
});
|
|
52
|
-
const output =
|
|
7
|
+
const output = makeEnvironmentResourceSchema(ids);
|
|
53
8
|
return {
|
|
54
9
|
description: "Read a single environment's name, kind, health status, and termination state.",
|
|
55
10
|
input,
|
|
@@ -79,6 +34,32 @@ export const makeListEnvironmentVariableNamesContract = (ids) => {
|
|
|
79
34
|
output,
|
|
80
35
|
};
|
|
81
36
|
};
|
|
37
|
+
export const makeSetEnvironmentVariableContract = (ids) => {
|
|
38
|
+
const input = z.object({
|
|
39
|
+
environmentId: ids.environment,
|
|
40
|
+
name: z
|
|
41
|
+
.string()
|
|
42
|
+
.trim()
|
|
43
|
+
.min(1, "Environment variable name cannot be blank.")
|
|
44
|
+
.max(255)
|
|
45
|
+
.describe("Name of the environment variable to create or replace. Leading and trailing whitespace is removed, remaining whitespace is replaced with underscores, and letters are uppercased."),
|
|
46
|
+
value: z
|
|
47
|
+
.string()
|
|
48
|
+
.describe("Value to store. This secret value is accepted but never returned."),
|
|
49
|
+
});
|
|
50
|
+
const output = z.object({
|
|
51
|
+
name: z
|
|
52
|
+
.string()
|
|
53
|
+
.describe("The stored variable name after whitespace is replaced with underscores and letters are uppercased."),
|
|
54
|
+
});
|
|
55
|
+
return {
|
|
56
|
+
description: "Create or replace one environment variable by name and return its stored name. The value is never returned.",
|
|
57
|
+
input,
|
|
58
|
+
kind: "write",
|
|
59
|
+
name: "environment.setVariable",
|
|
60
|
+
output,
|
|
61
|
+
};
|
|
62
|
+
};
|
|
82
63
|
export const makeCreateEnvironmentContract = (ids) => {
|
|
83
64
|
const input = z.object({
|
|
84
65
|
name: z
|
|
@@ -87,8 +68,11 @@ export const makeCreateEnvironmentContract = (ids) => {
|
|
|
87
68
|
.max(255)
|
|
88
69
|
.regex(/\S/, "Environment name cannot be blank.")
|
|
89
70
|
.describe("Display name of the new environment."),
|
|
71
|
+
workspaceId: ids.workspace
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("The workspace to create the environment in. Required when authenticating with an organization API key."),
|
|
90
74
|
});
|
|
91
|
-
const output =
|
|
75
|
+
const output = makeEnvironmentResourceSchema(ids);
|
|
92
76
|
return {
|
|
93
77
|
description: "Create an environment on the caller's team and return it in the environment.get shape.",
|
|
94
78
|
input,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/environment/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v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;aACN,GAAG,CAAC,CAAC,EAAE,4CAA4C,CAAC;aACpD,GAAG,CAAC,GAAG,CAAC;aACR,QAAQ,CACP,mLAAmL,CACpL;QACH,KAAK,EAAE,CAAC;aACL,MAAM,EAAE;aACR,QAAQ,CACP,mEAAmE,CACpE;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,QAAQ,CACP,oGAAoG,CACrG;KACJ,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,6GAA6G;QAC/G,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,yBAAyB;QAC/B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAM3C,GAOC,EACD,EAAE;IACF,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,IAAI,EAAE,CAAC;aACJ,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,GAAG,CAAC;aACR,KAAK,CAAC,IAAI,EAAE,mCAAmC,CAAC;aAChD,QAAQ,CAAC,sCAAsC,CAAC;QACnD,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,wGAAwG,CACzG;KACJ,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,6BAA6B,CAAC,GAAG,CAAC,CAAC;IAElD,OAAO;QACL,WAAW,EACT,wFAAwF;QAC1F,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,oBAAoB;QAC1B,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeEnvironmentResourceSchema: <EnvironmentId extends PublicIdSchema>(ids: {
|
|
4
|
+
environment: EnvironmentId;
|
|
5
|
+
}) => z.ZodObject<{
|
|
6
|
+
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
7
|
+
lastSyncedCommitHash: z.ZodString;
|
|
8
|
+
name: z.ZodString;
|
|
9
|
+
syncStatus: z.ZodLiteral<"reconciled">;
|
|
10
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
13
|
+
}, z.core.$strip>], "syncStatus">>;
|
|
14
|
+
id: EnvironmentId;
|
|
15
|
+
kind: z.ZodEnum<{
|
|
16
|
+
static: "static";
|
|
17
|
+
preview: "preview";
|
|
18
|
+
}>;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
status: z.ZodEnum<{
|
|
21
|
+
blocked: "blocked";
|
|
22
|
+
"needs-investigation": "needs-investigation";
|
|
23
|
+
ready: "ready";
|
|
24
|
+
running: "running";
|
|
25
|
+
}>;
|
|
26
|
+
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
27
|
+
url: z.ZodURL;
|
|
28
|
+
}, z.core.$strip>;
|
|
29
|
+
//# sourceMappingURL=resource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.d.ts","sourceRoot":"","sources":["../../../src/v1/environment/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,6BAA6B,GACxC,aAAa,SAAS,cAAc,EACpC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;CAC5B;;;;;;;;;;;;;;;;;;;;;;;iBAkDE,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { resource } from "../resource.js";
|
|
3
|
+
export const makeEnvironmentResourceSchema = (ids) => resource({
|
|
4
|
+
// Named after the branch, not "status": the object describes the
|
|
5
|
+
// environment's flow code branch. "flowCode" marks it as ours, so
|
|
6
|
+
// consumers don't read it as the status of their own git.
|
|
7
|
+
flowCodeBranch: z
|
|
8
|
+
.discriminatedUnion("syncStatus", [
|
|
9
|
+
z.object({
|
|
10
|
+
lastSyncedCommitHash: z
|
|
11
|
+
.string()
|
|
12
|
+
.describe("Hash of the latest reconciled commit."),
|
|
13
|
+
name: z
|
|
14
|
+
.string()
|
|
15
|
+
.describe("The name of the environment's flow code branch."),
|
|
16
|
+
syncStatus: z
|
|
17
|
+
.literal("reconciled")
|
|
18
|
+
.describe("The branch has reconciled at least one commit."),
|
|
19
|
+
}),
|
|
20
|
+
z.object({
|
|
21
|
+
name: z
|
|
22
|
+
.string()
|
|
23
|
+
.describe("The name of the environment's flow code branch."),
|
|
24
|
+
syncStatus: z
|
|
25
|
+
.literal("not-reconciled")
|
|
26
|
+
.describe("The branch has not reconciled any commit yet."),
|
|
27
|
+
}),
|
|
28
|
+
])
|
|
29
|
+
.optional()
|
|
30
|
+
.describe("The environment's flow code branch and its git reconciliation state, if it has one."),
|
|
31
|
+
id: ids.environment,
|
|
32
|
+
kind: z
|
|
33
|
+
.enum(["static", "preview"])
|
|
34
|
+
.describe("Whether the environment is static or a preview."),
|
|
35
|
+
name: z.string(),
|
|
36
|
+
// Environment-scoped health, aligned with the CI greenlight vocabulary
|
|
37
|
+
// (deriveEffectiveEnvironmentStatus): "ready" is the greenlit state.
|
|
38
|
+
status: z
|
|
39
|
+
.enum(["blocked", "needs-investigation", "ready", "running"])
|
|
40
|
+
.describe("Standing health across the environment's runs: blocked (open blocking bugs), needs-investigation (failures awaiting triage), running (flows executing), ready (none of the above — the greenlit state)."),
|
|
41
|
+
terminatedAt: z.iso
|
|
42
|
+
.datetime()
|
|
43
|
+
.optional()
|
|
44
|
+
.describe("When the environment was terminated, if it has been."),
|
|
45
|
+
}, { urlFieldDescription: "Absolute URL of the environment page." });
|
|
46
|
+
//# sourceMappingURL=resource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.js","sourceRoot":"","sources":["../../../src/v1/environment/resource.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAE3C,GAED,EAAE,EAAE,CACH,QAAQ,CACN;IACE,iEAAiE;IACjE,kEAAkE;IAClE,0DAA0D;IAC1D,cAAc,EAAE,CAAC;SACd,kBAAkB,CAAC,YAAY,EAAE;QAChC,CAAC,CAAC,MAAM,CAAC;YACP,oBAAoB,EAAE,CAAC;iBACpB,MAAM,EAAE;iBACR,QAAQ,CAAC,uCAAuC,CAAC;YACpD,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,CAAC,iDAAiD,CAAC;YAC9D,UAAU,EAAE,CAAC;iBACV,OAAO,CAAC,YAAY,CAAC;iBACrB,QAAQ,CAAC,gDAAgD,CAAC;SAC9D,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,IAAI,EAAE,CAAC;iBACJ,MAAM,EAAE;iBACR,QAAQ,CAAC,iDAAiD,CAAC;YAC9D,UAAU,EAAE,CAAC;iBACV,OAAO,CAAC,gBAAgB,CAAC;iBACzB,QAAQ,CAAC,+CAA+C,CAAC;SAC7D,CAAC;KACH,CAAC;SACD,QAAQ,EAAE;SACV,QAAQ,CACP,qFAAqF,CACtF;IACH,EAAE,EAAE,GAAG,CAAC,WAAW;IACnB,IAAI,EAAE,CAAC;SACJ,IAAI,CAAC,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;SAC3B,QAAQ,CAAC,iDAAiD,CAAC;IAC9D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,uEAAuE;IACvE,qEAAqE;IACrE,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,SAAS,EAAE,qBAAqB,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC;SAC5D,QAAQ,CACP,yMAAyM,CAC1M;IACH,YAAY,EAAE,CAAC,CAAC,GAAG;SAChB,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CAAC,sDAAsD,CAAC;CACpE,EACD,EAAE,mBAAmB,EAAE,uCAAuC,EAAE,CACjE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
+
export declare const makeAddTagToFlowsContract: <FlowId extends PublicIdSchema>(ids: {
|
|
4
|
+
flow: FlowId;
|
|
5
|
+
}) => {
|
|
6
|
+
readonly description: "Assign an existing tag to the selected flows. Create tags with tag.create.";
|
|
7
|
+
readonly input: z.ZodObject<{
|
|
8
|
+
flowIds: z.ZodArray<FlowId>;
|
|
9
|
+
tagName: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
readonly kind: "write";
|
|
12
|
+
readonly name: "flow.addTag";
|
|
13
|
+
readonly output: z.ZodObject<{
|
|
14
|
+
color: z.ZodString;
|
|
15
|
+
name: z.ZodString;
|
|
16
|
+
url: z.ZodURL;
|
|
17
|
+
}, z.core.$strip>;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=addTag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addTag.d.ts","sourceRoot":"","sources":["../../../src/v1/flow/addTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAGhD,eAAO,MAAM,yBAAyB,GAAI,MAAM,SAAS,cAAc,EAAE,KAAK;IAC5E,IAAI,EAAE,MAAM,CAAC;CACd;;;;;;;;;;;;;CAmCA,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { makeTagResourceSchema } from "../tag/index.js";
|
|
3
|
+
export const makeAddTagToFlowsContract = (ids) => {
|
|
4
|
+
const input = z.object({
|
|
5
|
+
flowIds: z
|
|
6
|
+
.array(ids.flow)
|
|
7
|
+
.min(1)
|
|
8
|
+
// Matches the automate contract's flow selection cap.
|
|
9
|
+
.max(300)
|
|
10
|
+
.refine((flowIds) => new Set(flowIds).size === flowIds.length, "flowIds must be unique")
|
|
11
|
+
.describe("The flows that receive the tag."),
|
|
12
|
+
// A lookup, not an insert: a name that cannot exist simply misses and
|
|
13
|
+
// returns the not-found error, so no format rules apply here.
|
|
14
|
+
tagName: z
|
|
15
|
+
.string()
|
|
16
|
+
.trim()
|
|
17
|
+
.min(1)
|
|
18
|
+
.describe("The name of an existing tag on the caller's team."),
|
|
19
|
+
});
|
|
20
|
+
const output = makeTagResourceSchema();
|
|
21
|
+
return {
|
|
22
|
+
description: "Assign an existing tag to the selected flows. Create tags with tag.create.",
|
|
23
|
+
input,
|
|
24
|
+
kind: "write",
|
|
25
|
+
name: "flow.addTag",
|
|
26
|
+
output,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=addTag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addTag.js","sourceRoot":"","sources":["../../../src/v1/flow/addTag.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAgC,GAExE,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,CAAC,CAAC,MAAM,CAAC;QACrB,OAAO,EAAE,CAAC;aACP,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC;aACf,GAAG,CAAC,CAAC,CAAC;YACP,sDAAsD;aACrD,GAAG,CAAC,GAAG,CAAC;aACR,MAAM,CACL,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,IAAI,KAAK,OAAO,CAAC,MAAM,EACrD,wBAAwB,CACzB;aACA,QAAQ,CAAC,iCAAiC,CAAC;QAC9C,sEAAsE;QACtE,8DAA8D;QAC9D,OAAO,EAAE,CAAC;aACP,MAAM,EAAE;aACR,IAAI,EAAE;aACN,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,mDAAmD,CAAC;KACjE,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,qBAAqB,EAAE,CAAC;IAEvC,OAAO;QACL,WAAW,EACT,4EAA4E;QAC9E,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,aAAa;QACnB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/v1/index.d.ts
CHANGED
|
@@ -33,11 +33,11 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
33
33
|
readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
|
|
34
34
|
readonly input: z.ZodObject<{
|
|
35
35
|
name: z.ZodString;
|
|
36
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
36
37
|
}, z.core.$strip>;
|
|
37
38
|
readonly kind: "write";
|
|
38
39
|
readonly name: "environment.create";
|
|
39
40
|
readonly output: z.ZodObject<{
|
|
40
|
-
environmentId: EnvironmentId;
|
|
41
41
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
42
42
|
lastSyncedCommitHash: z.ZodString;
|
|
43
43
|
name: z.ZodString;
|
|
@@ -46,6 +46,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
46
46
|
name: z.ZodString;
|
|
47
47
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
48
48
|
}, z.core.$strip>], "syncStatus">>;
|
|
49
|
+
id: EnvironmentId;
|
|
49
50
|
kind: z.ZodEnum<{
|
|
50
51
|
static: "static";
|
|
51
52
|
preview: "preview";
|
|
@@ -61,6 +62,47 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
61
62
|
url: z.ZodURL;
|
|
62
63
|
}, z.core.$strip>;
|
|
63
64
|
};
|
|
65
|
+
find: {
|
|
66
|
+
readonly description: "List the team's environments, newest first.";
|
|
67
|
+
readonly input: z.ZodObject<{
|
|
68
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
69
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
70
|
+
includeTerminated: z.ZodDefault<z.ZodBoolean>;
|
|
71
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
72
|
+
static: "static";
|
|
73
|
+
preview: "preview";
|
|
74
|
+
}>>;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
readonly kind: "read";
|
|
77
|
+
readonly name: "environment.find";
|
|
78
|
+
readonly output: z.ZodObject<{
|
|
79
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
80
|
+
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
81
|
+
lastSyncedCommitHash: z.ZodString;
|
|
82
|
+
name: z.ZodString;
|
|
83
|
+
syncStatus: z.ZodLiteral<"reconciled">;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
name: z.ZodString;
|
|
86
|
+
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
87
|
+
}, z.core.$strip>], "syncStatus">>;
|
|
88
|
+
id: EnvironmentId;
|
|
89
|
+
kind: z.ZodEnum<{
|
|
90
|
+
static: "static";
|
|
91
|
+
preview: "preview";
|
|
92
|
+
}>;
|
|
93
|
+
name: z.ZodString;
|
|
94
|
+
status: z.ZodEnum<{
|
|
95
|
+
blocked: "blocked";
|
|
96
|
+
"needs-investigation": "needs-investigation";
|
|
97
|
+
ready: "ready";
|
|
98
|
+
running: "running";
|
|
99
|
+
}>;
|
|
100
|
+
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
101
|
+
url: z.ZodURL;
|
|
102
|
+
}, z.core.$strip>>;
|
|
103
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
104
|
+
}, z.core.$strip>;
|
|
105
|
+
};
|
|
64
106
|
get: {
|
|
65
107
|
readonly description: "Read a single environment's name, kind, health status, and termination state.";
|
|
66
108
|
readonly input: z.ZodObject<{
|
|
@@ -69,7 +111,6 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
69
111
|
readonly kind: "read";
|
|
70
112
|
readonly name: "environment.get";
|
|
71
113
|
readonly output: z.ZodObject<{
|
|
72
|
-
environmentId: EnvironmentId;
|
|
73
114
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
74
115
|
lastSyncedCommitHash: z.ZodString;
|
|
75
116
|
name: z.ZodString;
|
|
@@ -78,6 +119,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
78
119
|
name: z.ZodString;
|
|
79
120
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
80
121
|
}, z.core.$strip>], "syncStatus">>;
|
|
122
|
+
id: EnvironmentId;
|
|
81
123
|
kind: z.ZodEnum<{
|
|
82
124
|
static: "static";
|
|
83
125
|
preview: "preview";
|
|
@@ -104,8 +146,35 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
104
146
|
variableNames: z.ZodArray<z.ZodString>;
|
|
105
147
|
}, z.core.$strip>;
|
|
106
148
|
};
|
|
149
|
+
setVariable: {
|
|
150
|
+
readonly description: "Create or replace one environment variable by name and return its stored name. The value is never returned.";
|
|
151
|
+
readonly input: z.ZodObject<{
|
|
152
|
+
environmentId: EnvironmentId;
|
|
153
|
+
name: z.ZodString;
|
|
154
|
+
value: z.ZodString;
|
|
155
|
+
}, z.core.$strip>;
|
|
156
|
+
readonly kind: "write";
|
|
157
|
+
readonly name: "environment.setVariable";
|
|
158
|
+
readonly output: z.ZodObject<{
|
|
159
|
+
name: z.ZodString;
|
|
160
|
+
}, z.core.$strip>;
|
|
161
|
+
};
|
|
107
162
|
};
|
|
108
163
|
flow: {
|
|
164
|
+
addTag: {
|
|
165
|
+
readonly description: "Assign an existing tag to the selected flows. Create tags with tag.create.";
|
|
166
|
+
readonly input: z.ZodObject<{
|
|
167
|
+
flowIds: z.ZodArray<FlowId>;
|
|
168
|
+
tagName: z.ZodString;
|
|
169
|
+
}, z.core.$strip>;
|
|
170
|
+
readonly kind: "write";
|
|
171
|
+
readonly name: "flow.addTag";
|
|
172
|
+
readonly output: z.ZodObject<{
|
|
173
|
+
color: z.ZodString;
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
url: z.ZodURL;
|
|
176
|
+
}, z.core.$strip>;
|
|
177
|
+
};
|
|
109
178
|
list: {
|
|
110
179
|
readonly description: "List the flows of an environment at its latest reconciled commit.";
|
|
111
180
|
readonly input: z.ZodObject<{
|
|
@@ -140,6 +209,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
140
209
|
high: "high";
|
|
141
210
|
urgent: "urgent";
|
|
142
211
|
}>>;
|
|
212
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
143
213
|
}, z.core.$strip>, z.ZodObject<{
|
|
144
214
|
estimatedDueDate: z.ZodOptional<z.ZodISODate>;
|
|
145
215
|
type: z.ZodLiteral<"coverageRequest">;
|
|
@@ -152,6 +222,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
152
222
|
high: "high";
|
|
153
223
|
urgent: "urgent";
|
|
154
224
|
}>>;
|
|
225
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
155
226
|
}, z.core.$strip>], "type">;
|
|
156
227
|
readonly kind: "write";
|
|
157
228
|
readonly name: "issue.create";
|
|
@@ -209,6 +280,7 @@ export declare const makeContractsV1: <EnvironmentId extends PublicIdSchema, Flo
|
|
|
209
280
|
coverageRequest: "coverageRequest";
|
|
210
281
|
maintenance: "maintenance";
|
|
211
282
|
}>;
|
|
283
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
212
284
|
cursor: z.ZodOptional<z.ZodString>;
|
|
213
285
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
214
286
|
}, z.core.$strip>;
|
|
@@ -433,11 +505,11 @@ export declare const publicContractsV1: {
|
|
|
433
505
|
readonly description: "Create an environment on the caller's team and return it in the environment.get shape.";
|
|
434
506
|
readonly input: z.ZodObject<{
|
|
435
507
|
name: z.ZodString;
|
|
508
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
436
509
|
}, z.core.$strip>;
|
|
437
510
|
readonly kind: "write";
|
|
438
511
|
readonly name: "environment.create";
|
|
439
512
|
readonly output: z.ZodObject<{
|
|
440
|
-
environmentId: PublicIdSchema;
|
|
441
513
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
442
514
|
lastSyncedCommitHash: z.ZodString;
|
|
443
515
|
name: z.ZodString;
|
|
@@ -446,6 +518,7 @@ export declare const publicContractsV1: {
|
|
|
446
518
|
name: z.ZodString;
|
|
447
519
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
448
520
|
}, z.core.$strip>], "syncStatus">>;
|
|
521
|
+
id: PublicIdSchema;
|
|
449
522
|
kind: z.ZodEnum<{
|
|
450
523
|
static: "static";
|
|
451
524
|
preview: "preview";
|
|
@@ -461,6 +534,47 @@ export declare const publicContractsV1: {
|
|
|
461
534
|
url: z.ZodURL;
|
|
462
535
|
}, z.core.$strip>;
|
|
463
536
|
};
|
|
537
|
+
find: {
|
|
538
|
+
readonly description: "List the team's environments, newest first.";
|
|
539
|
+
readonly input: z.ZodObject<{
|
|
540
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
541
|
+
limit: z.ZodDefault<z.ZodNumber>;
|
|
542
|
+
includeTerminated: z.ZodDefault<z.ZodBoolean>;
|
|
543
|
+
kind: z.ZodOptional<z.ZodEnum<{
|
|
544
|
+
static: "static";
|
|
545
|
+
preview: "preview";
|
|
546
|
+
}>>;
|
|
547
|
+
}, z.core.$strip>;
|
|
548
|
+
readonly kind: "read";
|
|
549
|
+
readonly name: "environment.find";
|
|
550
|
+
readonly output: z.ZodObject<{
|
|
551
|
+
environments: z.ZodArray<z.ZodObject<{
|
|
552
|
+
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
553
|
+
lastSyncedCommitHash: z.ZodString;
|
|
554
|
+
name: z.ZodString;
|
|
555
|
+
syncStatus: z.ZodLiteral<"reconciled">;
|
|
556
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
557
|
+
name: z.ZodString;
|
|
558
|
+
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
559
|
+
}, z.core.$strip>], "syncStatus">>;
|
|
560
|
+
id: PublicIdSchema;
|
|
561
|
+
kind: z.ZodEnum<{
|
|
562
|
+
static: "static";
|
|
563
|
+
preview: "preview";
|
|
564
|
+
}>;
|
|
565
|
+
name: z.ZodString;
|
|
566
|
+
status: z.ZodEnum<{
|
|
567
|
+
blocked: "blocked";
|
|
568
|
+
"needs-investigation": "needs-investigation";
|
|
569
|
+
ready: "ready";
|
|
570
|
+
running: "running";
|
|
571
|
+
}>;
|
|
572
|
+
terminatedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
573
|
+
url: z.ZodURL;
|
|
574
|
+
}, z.core.$strip>>;
|
|
575
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
576
|
+
}, z.core.$strip>;
|
|
577
|
+
};
|
|
464
578
|
get: {
|
|
465
579
|
readonly description: "Read a single environment's name, kind, health status, and termination state.";
|
|
466
580
|
readonly input: z.ZodObject<{
|
|
@@ -469,7 +583,6 @@ export declare const publicContractsV1: {
|
|
|
469
583
|
readonly kind: "read";
|
|
470
584
|
readonly name: "environment.get";
|
|
471
585
|
readonly output: z.ZodObject<{
|
|
472
|
-
environmentId: PublicIdSchema;
|
|
473
586
|
flowCodeBranch: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
474
587
|
lastSyncedCommitHash: z.ZodString;
|
|
475
588
|
name: z.ZodString;
|
|
@@ -478,6 +591,7 @@ export declare const publicContractsV1: {
|
|
|
478
591
|
name: z.ZodString;
|
|
479
592
|
syncStatus: z.ZodLiteral<"not-reconciled">;
|
|
480
593
|
}, z.core.$strip>], "syncStatus">>;
|
|
594
|
+
id: PublicIdSchema;
|
|
481
595
|
kind: z.ZodEnum<{
|
|
482
596
|
static: "static";
|
|
483
597
|
preview: "preview";
|
|
@@ -504,8 +618,35 @@ export declare const publicContractsV1: {
|
|
|
504
618
|
variableNames: z.ZodArray<z.ZodString>;
|
|
505
619
|
}, z.core.$strip>;
|
|
506
620
|
};
|
|
621
|
+
setVariable: {
|
|
622
|
+
readonly description: "Create or replace one environment variable by name and return its stored name. The value is never returned.";
|
|
623
|
+
readonly input: z.ZodObject<{
|
|
624
|
+
environmentId: PublicIdSchema;
|
|
625
|
+
name: z.ZodString;
|
|
626
|
+
value: z.ZodString;
|
|
627
|
+
}, z.core.$strip>;
|
|
628
|
+
readonly kind: "write";
|
|
629
|
+
readonly name: "environment.setVariable";
|
|
630
|
+
readonly output: z.ZodObject<{
|
|
631
|
+
name: z.ZodString;
|
|
632
|
+
}, z.core.$strip>;
|
|
633
|
+
};
|
|
507
634
|
};
|
|
508
635
|
flow: {
|
|
636
|
+
addTag: {
|
|
637
|
+
readonly description: "Assign an existing tag to the selected flows. Create tags with tag.create.";
|
|
638
|
+
readonly input: z.ZodObject<{
|
|
639
|
+
flowIds: z.ZodArray<PublicIdSchema>;
|
|
640
|
+
tagName: z.ZodString;
|
|
641
|
+
}, z.core.$strip>;
|
|
642
|
+
readonly kind: "write";
|
|
643
|
+
readonly name: "flow.addTag";
|
|
644
|
+
readonly output: z.ZodObject<{
|
|
645
|
+
color: z.ZodString;
|
|
646
|
+
name: z.ZodString;
|
|
647
|
+
url: z.ZodURL;
|
|
648
|
+
}, z.core.$strip>;
|
|
649
|
+
};
|
|
509
650
|
list: {
|
|
510
651
|
readonly description: "List the flows of an environment at its latest reconciled commit.";
|
|
511
652
|
readonly input: z.ZodObject<{
|
|
@@ -540,6 +681,7 @@ export declare const publicContractsV1: {
|
|
|
540
681
|
high: "high";
|
|
541
682
|
urgent: "urgent";
|
|
542
683
|
}>>;
|
|
684
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
543
685
|
}, z.core.$strip>, z.ZodObject<{
|
|
544
686
|
estimatedDueDate: z.ZodOptional<z.ZodISODate>;
|
|
545
687
|
type: z.ZodLiteral<"coverageRequest">;
|
|
@@ -552,6 +694,7 @@ export declare const publicContractsV1: {
|
|
|
552
694
|
high: "high";
|
|
553
695
|
urgent: "urgent";
|
|
554
696
|
}>>;
|
|
697
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
555
698
|
}, z.core.$strip>], "type">;
|
|
556
699
|
readonly kind: "write";
|
|
557
700
|
readonly name: "issue.create";
|
|
@@ -609,6 +752,7 @@ export declare const publicContractsV1: {
|
|
|
609
752
|
coverageRequest: "coverageRequest";
|
|
610
753
|
maintenance: "maintenance";
|
|
611
754
|
}>;
|
|
755
|
+
workspaceId: z.ZodOptional<PublicIdSchema>;
|
|
612
756
|
cursor: z.ZodOptional<z.ZodString>;
|
|
613
757
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
614
758
|
}, z.core.$strip>;
|
package/dist/v1/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,YAAY,EACV,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,cAAc,EACn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Schemas, } from "./ids.js";
|
|
2
2
|
export { makeFlowSelectionSchema } from "./run/index.js";
|
|
3
3
|
import { makeAutomateContract } from "./automate/index.js";
|
|
4
|
-
import {
|
|
4
|
+
import { makeFindEnvironmentsContract } from "./environment/find.js";
|
|
5
|
+
import { makeCreateEnvironmentContract, makeGetEnvironmentContract, makeListEnvironmentVariableNamesContract, makeSetEnvironmentVariableContract, } from "./environment/index.js";
|
|
6
|
+
import { makeAddTagToFlowsContract } from "./flow/addTag.js";
|
|
5
7
|
import { makeListFlowsContract } from "./flow/index.js";
|
|
6
8
|
import { defaultIdSchemas, } from "./ids.js";
|
|
7
9
|
import { makeCreateIssueContract } from "./issue/create.js";
|
|
@@ -25,10 +27,13 @@ export const makeContractsV1 = (ids) => {
|
|
|
25
27
|
automate: makeAutomateContract(resolvedIds),
|
|
26
28
|
environment: {
|
|
27
29
|
create: makeCreateEnvironmentContract(resolvedIds),
|
|
30
|
+
find: makeFindEnvironmentsContract(resolvedIds),
|
|
28
31
|
get: makeGetEnvironmentContract(resolvedIds),
|
|
29
32
|
listVariableNames: makeListEnvironmentVariableNamesContract(resolvedIds),
|
|
33
|
+
setVariable: makeSetEnvironmentVariableContract(resolvedIds),
|
|
30
34
|
},
|
|
31
35
|
flow: {
|
|
36
|
+
addTag: makeAddTagToFlowsContract(resolvedIds),
|
|
32
37
|
list: makeListFlowsContract(resolvedIds),
|
|
33
38
|
},
|
|
34
39
|
issue: {
|
package/dist/v1/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/v1/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,gBAAgB,GACjB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAEzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAE3D,OAAO,EACL,6BAA6B,EAC7B,0BAA0B,EAC1B,wCAAwC,
|
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0BAA0B,CAAC,WAAW,CAAC;YAC5C,iBAAiB,EAAE,wCAAwC,CAAC,WAAW,CAAC;YACxE,WAAW,EAAE,kCAAkC,CAAC,WAAW,CAAC;SAC7D;QACD,IAAI,EAAE;YACJ,MAAM,EAAE,yBAAyB,CAAC,WAAW,CAAC;YAC9C,IAAI,EAAE,qBAAqB,CAAC,WAAW,CAAC;SACzC;QACD,KAAK,EAAE;YACL,MAAM,EAAE,uBAAuB,CAAC,WAAW,CAAC;YAC5C,IAAI,EAAE,sBAAsB,CAAC,WAAW,CAAC;YACzC,GAAG,EAAE,oBAAoB,CAAC,WAAW,CAAC;SACvC;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC;YAC1C,IAAI,EAAE,oBAAoB,CAAC,WAAW,CAAC;YACvC,GAAG,EAAE,kBAAkB,CAAC,WAAW,CAAC;SACrC;QACD,GAAG,EAAE;YACH,MAAM,EAAE,qBAAqB,EAAE;SAChC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { PublicIdSchema } from "../ids.js";
|
|
3
|
-
export declare const makeCreateIssueContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema>(ids: {
|
|
3
|
+
export declare const makeCreateIssueContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
|
|
4
4
|
environment: EnvironmentId;
|
|
5
5
|
flow: FlowId;
|
|
6
6
|
issue: IssueId;
|
|
7
7
|
run: RunId;
|
|
8
|
+
workspace: WorkspaceId;
|
|
8
9
|
}) => {
|
|
9
10
|
readonly description: string;
|
|
10
11
|
readonly input: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
@@ -18,6 +19,7 @@ export declare const makeCreateIssueContract: <EnvironmentId extends PublicIdSch
|
|
|
18
19
|
high: "high";
|
|
19
20
|
urgent: "urgent";
|
|
20
21
|
}>>;
|
|
22
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
21
23
|
}, z.core.$strip>, z.ZodObject<{
|
|
22
24
|
estimatedDueDate: z.ZodOptional<z.ZodISODate>;
|
|
23
25
|
type: z.ZodLiteral<"coverageRequest">;
|
|
@@ -30,6 +32,7 @@ export declare const makeCreateIssueContract: <EnvironmentId extends PublicIdSch
|
|
|
30
32
|
high: "high";
|
|
31
33
|
urgent: "urgent";
|
|
32
34
|
}>>;
|
|
35
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
33
36
|
}, z.core.$strip>], "type">;
|
|
34
37
|
readonly kind: "write";
|
|
35
38
|
readonly name: "issue.create";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/v1/issue/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,uBAAuB,GAClC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../../src/v1/issue/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,uBAAuB,GAClC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,WAAW,SAAS,cAAc,EAClC,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,KAAK,CAAC;IACX,SAAS,EAAE,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDA,CAAC"}
|
package/dist/v1/issue/create.js
CHANGED
|
@@ -11,6 +11,9 @@ export const makeCreateIssueContract = (ids) => {
|
|
|
11
11
|
priority: issuePrioritySchema
|
|
12
12
|
.optional()
|
|
13
13
|
.describe('Defaults to "unprioritized".'),
|
|
14
|
+
workspaceId: ids.workspace
|
|
15
|
+
.optional()
|
|
16
|
+
.describe("The workspace to create the issue in. Required when authenticating with an organization API key."),
|
|
14
17
|
};
|
|
15
18
|
const input = z.discriminatedUnion("type", [
|
|
16
19
|
z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/v1/issue/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../src/v1/issue/create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAMrC,GAMD,EAAE,EAAE;IACH,MAAM,YAAY,GAAG;QACnB,WAAW,EAAE,CAAC;aACX,MAAM,EAAE;aACR,QAAQ,EAAE;aACV,QAAQ,CACP,6FAA6F,CAC9F;QACH,wEAAwE;QACxE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;QACvC,QAAQ,EAAE,mBAAmB;aAC1B,QAAQ,EAAE;aACV,QAAQ,CAAC,8BAA8B,CAAC;QAC3C,WAAW,EAAE,GAAG,CAAC,SAAS;aACvB,QAAQ,EAAE;aACV,QAAQ,CACP,kGAAkG,CACnG;KACJ,CAAC;IACF,MAAM,KAAK,GAAG,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;QACzC,CAAC,CAAC,MAAM,CAAC;YACP,GAAG,YAAY;YACf,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;SACvB,CAAC;QACF,CAAC,CAAC,MAAM,CAAC;YACP,GAAG,YAAY;YACf,gBAAgB,EAAE,CAAC,CAAC,GAAG;iBACpB,IAAI,EAAE;iBACN,QAAQ,EAAE;iBACV,QAAQ,CACP,4EAA4E,CAC7E;YACH,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,CAAC;SACnC,CAAC;KACH,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EACT,gEAAgE;YAChE,8DAA8D;QAChE,KAAK;QACL,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,cAAc;QACpB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/dist/v1/issue/index.d.ts
CHANGED
|
@@ -47,11 +47,12 @@ export declare const makeIssueResourceSchema: <EnvironmentId extends PublicIdSch
|
|
|
47
47
|
}>;
|
|
48
48
|
url: z.ZodURL;
|
|
49
49
|
}, z.core.$strip>;
|
|
50
|
-
export declare const makeFindIssuesContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema>(ids: {
|
|
50
|
+
export declare const makeFindIssuesContract: <EnvironmentId extends PublicIdSchema, FlowId extends PublicIdSchema, RunId extends PublicIdSchema, IssueId extends PublicIdSchema, WorkspaceId extends PublicIdSchema>(ids: {
|
|
51
51
|
environment: EnvironmentId;
|
|
52
52
|
flow: FlowId;
|
|
53
53
|
issue: IssueId;
|
|
54
54
|
run: RunId;
|
|
55
|
+
workspace: WorkspaceId;
|
|
55
56
|
}) => {
|
|
56
57
|
readonly description: "List the team's bug reports, maintenance reports, or coverage requests, newest first.";
|
|
57
58
|
readonly input: z.ZodObject<{
|
|
@@ -68,6 +69,7 @@ export declare const makeFindIssuesContract: <EnvironmentId extends PublicIdSche
|
|
|
68
69
|
coverageRequest: "coverageRequest";
|
|
69
70
|
maintenance: "maintenance";
|
|
70
71
|
}>;
|
|
72
|
+
workspaceId: z.ZodOptional<WorkspaceId>;
|
|
71
73
|
cursor: z.ZodOptional<z.ZodString>;
|
|
72
74
|
limit: z.ZodDefault<z.ZodNumber>;
|
|
73
75
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/v1/issue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAIhD,eAAO,MAAM,mBAAmB;;;;;;EAM9B,CAAC;AAeH,eAAO,MAAM,uBAAuB,GAClC,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MA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,WAAW,CAAC;CACxB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyCA,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,aAAa,SAAS,cAAc,EACpC,MAAM,SAAS,cAAc,EAC7B,KAAK,SAAS,cAAc,EAC5B,OAAO,SAAS,cAAc,EAC9B,KAAK;IACL,WAAW,EAAE,aAAa,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC;IACf,GAAG,EAAE,KAAK,CAAC;CACZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoBA,CAAC"}
|
package/dist/v1/issue/index.js
CHANGED
|
@@ -46,6 +46,9 @@ export const makeFindIssuesContract = (ids) => {
|
|
|
46
46
|
.default([...openIssueStatuses])
|
|
47
47
|
.describe("Issue statuses to include. Defaults to pending, in-progress, and paused issues."),
|
|
48
48
|
type: publicIssueTypeSchema.describe("The issue type to include: bug report, maintenance report, or coverage request."),
|
|
49
|
+
workspaceId: ids.workspace
|
|
50
|
+
.optional()
|
|
51
|
+
.describe("The workspace whose issues to list. Required when authenticating with an organization API key."),
|
|
49
52
|
});
|
|
50
53
|
const output = z.object({
|
|
51
54
|
issues: z
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/v1/issue/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC/E,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,CAAC,IAAI,CAAC;IACxC,eAAe;IACf,KAAK;IACL,QAAQ;IACR,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,iBAAiB,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AAO,EAAE,GAAG,CAAC,KAAK;KACnB,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC;QACtB,KAAK,EAAE,uBAAuB,CAAC,GAAG,CAAC;KACpC,CAAC,CAAC;IAEH,OAAO;QACL,WAAW,EAAE,qBAAqB;QAClC,KAAK;QACL,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE,WAAW;QACjB,MAAM;KAMP,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qawolf/api-contracts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Versioned contracts for the QA Wolf public API",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "git+https://github.com/qawolf/platform.git"
|
|
9
9
|
},
|
|
10
|
-
"
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
11
13
|
"type": "module",
|
|
14
|
+
"sideEffects": false,
|
|
12
15
|
"exports": {
|
|
13
16
|
".": {
|
|
14
17
|
"types": "./dist/index.d.ts",
|
|
@@ -19,9 +22,9 @@
|
|
|
19
22
|
"import": "./dist/v1/index.js"
|
|
20
23
|
}
|
|
21
24
|
},
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
+
"publishConfig": {
|
|
26
|
+
"access": "public"
|
|
27
|
+
},
|
|
25
28
|
"scripts": {
|
|
26
29
|
"build": "rm -rf ./dist && tsc -p tsconfig.build.json",
|
|
27
30
|
"lint:ci": "npm run lint:non-fixable; NON_FIXABLE_EXIT=$?; npm run lint:fixable && exit $NON_FIXABLE_EXIT",
|
|
@@ -45,8 +48,5 @@
|
|
|
45
48
|
},
|
|
46
49
|
"engines": {
|
|
47
50
|
"node": ">=22.22.0 <25"
|
|
48
|
-
},
|
|
49
|
-
"publishConfig": {
|
|
50
|
-
"access": "public"
|
|
51
51
|
}
|
|
52
52
|
}
|