@devries-cameron20 / t3code Mirror · read-only / commits / 86863beede
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 08:30 UTC

feat(issues): add Linear as a standalone issue tracker (#19274)

Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>

Julius Marminge committed Nov 16, 2026 at 22:00 UTC 86863beedeffb7d932208fb65c27b6dc857f616b
69 files changed +62803 -67
.gitattributes
+2 -1
@@ -3,7 +3,8 @@
3 # Batch files need CRLF for cmd.exe to parse them reliably.
4 *.cmd text eol=crlf
5 *.bat text eol=crlf
6 -# GitHub's and Expo's GraphQL schemas and the operations graphqlgen writes from them.
6 +# GitHub's, Linear's and Expo's GraphQL schemas and the operations graphqlgen writes from them.
7 packages/source-control-github/schema/** linguist-generated
8 +packages/issue-tracker-linear/schema/** linguist-generated
9 apps/server/schema/** linguist-generated
10 **/*.graphql.ts linguist-generated
.github/workflows/ci.yml
+3
@@ -110,6 +110,9 @@ jobs:
110 - name: Check generated Expo GraphQL operations
111 run: vp run --filter t3 generate --check
112
113 + - name: Check generated Linear GraphQL operations
114 + run: vp run --filter @t3tools/issue-tracker-linear generate --check
115 +
116 - name: Check
117 run: vp check
118
apps/mobile/src/Stack.tsx
+1 -1
@@ -186,7 +186,7 @@ const SETTINGS_SCREENS = {
186 SettingsEnvironmentSourceControl: createNativeStackScreen({
187 screen: SettingsEnvironmentSourceControlRouteScreen,
188 linking: "settings/source-control",
189 - options: settingsPage("Source control"),
189 + options: settingsPage("Source control & issues"),
190 }),
191 SettingsEnvironmentAgentBehavior: createNativeStackScreen({
192 screen: SettingsThreadsRouteScreen,
apps/mobile/src/features/settings/SettingsRouteScreen.tsx
+1 -1
@@ -298,7 +298,7 @@ function useSettingsIndexSections(): SettingsListSection[] {
298 serverPage(
299 "SettingsEnvironmentSourceControl",
300 "arrow.triangle.branch",
301 - gt("Source control"),
301 + gt("Source control & issues"),
302 ),
303 serverPage("SettingsWorktrees", "square.on.square", gt("Worktrees")),
304 ],
apps/mobile/src/features/settings/settings-search.test.ts
+3 -3
@@ -23,7 +23,7 @@ const SECTIONS = [
23 title: "Server settings",
24 rows: [
25 { id: "SettingsProviderAccounts", label: "Provider accounts" },
26 - { id: "SettingsEnvironmentSourceControl", label: "Source control" },
26 + { id: "SettingsEnvironmentSourceControl", label: "Source control & issues" },
27 ],
28 },
29 ];
@@ -49,10 +49,10 @@ describe("filterSettingsSections", () => {
49 { query: "KEYBOARD", expected: [["Interface", ["Keyboard"]]] },
50 { query: "dark mode", expected: [["Interface", ["Appearance"]]] },
51 { query: "microphone", expected: [["Interface", ["Voice"]]] },
52 - { query: "agent credits", expected: [["Server settings", ["Source control"]]] },
52 + { query: "agent credits", expected: [["Server settings", ["Source control & issues"]]] },
53 {
54 query: "server settings",
55 - expected: [["Server settings", ["Provider accounts", "Source control"]]],
55 + expected: [["Server settings", ["Provider accounts", "Source control & issues"]]],
56 },
57 {
58 query: "accounts",
apps/server/package.json
+1
@@ -43,6 +43,7 @@
43 "@ff-labs/fff-node": "0.11.0",
44 "@muse-code/sdk": "1.4.6",
45 "@napi-rs/keyring": "^1.3.0",
46 + "@t3tools/issue-tracker-linear": "workspace:*",
47 "@t3tools/provider-acp": "workspace:*",
48 "@t3tools/provider-acp-registry": "workspace:*",
49 "@t3tools/provider-core": "workspace:*",
apps/server/src/auth/RpcAuthorization.ts
+3
@@ -137,6 +137,9 @@ export const RPC_REQUIRED_SCOPES = {
137 [WS_METHODS.issuesComments]: AuthOrchestrationReadScope,
138 [WS_METHODS.issuesTemplates]: AuthOrchestrationReadScope,
139 [WS_METHODS.issuesCandidates]: AuthOrchestrationReadScope,
140 + [WS_METHODS.issueTrackersList]: AuthOrchestrationReadScope,
141 + [WS_METHODS.issueTrackersConnect]: AuthSettingsWriteScope,
142 + [WS_METHODS.issueTrackersBindProject]: AuthSettingsWriteScope,
143 [WS_METHODS.pullRequestsPreview]: AuthOrchestrationReadScope,
144 [WS_METHODS.pullRequestsChecks]: AuthOrchestrationReadScope,
145 [WS_METHODS.pullRequestsActivity]: AuthOrchestrationReadScope,
apps/server/src/issue/IssueService.test.ts
+112
@@ -5,6 +5,7 @@ import * as Option from "effect/Option";
5 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
6 import {
7 IssueTrackerKind,
8 + type IssueTrackerProjectBinding,
9 SourceControlProviderKind,
10 type OrchestrationProjectShell,
11 type ProjectId,
@@ -12,9 +13,11 @@ import {
13 import {
14 IssueTrackerError,
15 type IssueTrackerApi,
16 + type StandaloneIssueTrackerApi,
17 type TrackerIssueDetail,
18 } from "@t3tools/source-control-core/server/IssueTracker";
19
20 +import * as IssueTrackerBindings from "../persistence/IssueTrackerBindings.ts";
21 import { normalizeGitRemoteUrl } from "@t3tools/shared/git";
22
23 import * as ProjectService from "../project/ProjectService.ts";
@@ -23,6 +26,30 @@ import * as IssueService from "./IssueService.ts";
26 import * as IssueTrackerRegistry from "./IssueTrackerRegistry.ts";
27
28 const GITHUB = IssueTrackerKind.make("github");
29 +const LINEAR = IssueTrackerKind.make("linear");
30 +
31 +/** A standalone tracker shaped like Linear: its own host, team keys for scopes, `ENG-1` keys. */
32 +function fakeStandaloneTracker(
33 + overrides: Partial<IssueTrackerApi> = {},
34 +): StandaloneIssueTrackerApi {
35 + return {
36 + ...fakeTracker({
37 + getViewer: () => Effect.succeed("usr_julius"),
38 + getIssue: (input) =>
39 + Effect.succeed({ ...issue(input.key), displayKey: input.key, viewer: "usr_julius" }),
40 + ...overrides,
41 + }),
42 + kind: LINEAR,
43 + standalone: {
44 + tracker: LINEAR,
45 + displayName: "Linear",
46 + host: "linear.app",
47 + scopeNoun: "team",
48 + credential: { label: "Personal API key", helpUrl: null },
49 + },
50 + probeCredential: () => Effect.succeed({ account: "julius", scopes: [] }),
51 + };
52 +}
53
54 function project(input: {
55 readonly id: string;
@@ -114,12 +141,23 @@ function fakeTracker(overrides: Partial<IssueTrackerApi> = {}): IssueTrackerApi
141 function makeService(input: {
142 readonly projects: ReadonlyArray<OrchestrationProjectShell>;
143 readonly trackers: ReadonlyArray<IssueTrackerApi>;
144 + readonly bindings?: Record<string, IssueTrackerProjectBinding>;
145 }) {
146 return IssueService.IssueService.pipe(
147 Effect.provide(
148 IssueService.layer.pipe(
149 Layer.provide(
150 Layer.mergeAll(
151 + Layer.mock(IssueTrackerBindings.IssueTrackerBindingsRepository)({
152 + list: Effect.succeed(
153 + new Map(
154 + Object.entries(input.bindings ?? {}).map(([id, binding]) => [
155 + id as ProjectId,
156 + binding,
157 + ]),
158 + ),
159 + ),
160 + }),
161 Layer.succeed(
162 IssueTrackerRegistry.IssueTrackerRegistry,
163 IssueTrackerRegistry.fromTrackers(input.trackers),
@@ -367,3 +405,77 @@ describe("IssueService", () => {
405 }),
406 );
407 });
408 +
409 +describe("IssueService with a standalone tracker", () => {
410 + it.effect("lists a bound project's standalone scope beside its git host and serves both", () =>
411 + Effect.gen(function* () {
412 + const listed: string[] = [];
413 + const record = (tracker: IssueTrackerKind): Partial<IssueTrackerApi> => ({
414 + listIssues: (input) =>
415 + Effect.sync(() => {
416 + listed.push(`${tracker} ${input.host} ${input.scope}`);
417 + return { items: [issue(tracker === LINEAR ? "ENG-1" : "1")], nextCursor: null };
418 + }),
419 + });
420 + const projects = [project({ id: "web", repository: "acme/web" }), project({ id: "notes" })];
421 + const trackers = [fakeTracker(record(GITHUB)), fakeStandaloneTracker(record(LINEAR))];
422 + const bound = yield* makeService({
423 + projects,
424 + trackers,
425 + bindings: { ["web" as ProjectId]: { tracker: LINEAR, scope: "ENG" } },
426 + });
427 +
428 + const result = yield* bound.list({ state: "open" });
429 + expect(listed.sort()).toEqual(["github github.com acme/web", "linear linear.app ENG"]);
430 + expect(result.entries.map((entry) => [entry.tracker, entry.scope, entry.key]).sort()).toEqual(
431 + [
432 + ["github", "acme/web", "1"],
433 + ["linear", "ENG", "ENG-1"],
434 + ],
435 + );
436 + expect(result.trackers.map((tracker) => [tracker.tracker, tracker.host]).sort()).toEqual([
437 + ["github", "github.com"],
438 + ["linear", "linear.app"],
439 + ]);
440 + // A reference picks the project's tracker by kind; both are the project's own, so writable.
441 + const linearRef = {
442 + projectId: "web" as ProjectId,
443 + tracker: LINEAR,
444 + scope: "ENG",
445 + key: "ENG-1",
446 + };
447 + expect(yield* bound.detail(linearRef)).toMatchObject({ host: "linear.app", writable: true });
448 + expect(
449 + yield* bound.detail({
450 + projectId: "web" as ProjectId,
451 + tracker: GITHUB,
452 + scope: "acme/web",
453 + key: "1",
454 + }),
455 + ).toMatchObject({ host: "github.com", writable: true });
456 +
457 + // Unbound, the standalone scope is gone and its references are unsupported.
458 + listed.length = 0;
459 + const unbound = yield* makeService({ projects, trackers });
460 + const after = yield* unbound.list({ state: "open" });
461 + expect(listed).toEqual(["github github.com acme/web"]);
462 + expect(after.trackers.map((tracker) => tracker.tracker)).toEqual(["github"]);
463 + const refused = yield* Effect.flip(unbound.detail(linearRef));
464 + expect(refused).toMatchObject({
465 + _tag: "IssueUnavailableError",
466 + reason: "tracker-unsupported",
467 + });
468 +
469 + // A project with no remote at all can still be bound, and then has only the standalone one.
470 + const standaloneOnly = yield* makeService({
471 + projects,
472 + trackers,
473 + bindings: { ["notes" as ProjectId]: { tracker: LINEAR, scope: "OPS" } },
474 + });
475 + const notes = yield* standaloneOnly.list({ state: "open", projectId: "notes" as ProjectId });
476 + expect(notes.entries.map((entry) => [entry.projectId, entry.scope])).toEqual([
477 + ["notes", "OPS"],
478 + ]);
479 + }),
480 + );
481 +});
apps/server/src/issue/IssueService.ts
+43 -11
@@ -1,3 +1,4 @@
1 +// A project bound to a standalone tracker (Linear) in settings lists it beside its git host's.
2 // References outside the project's canonical repository may be read on the same host,
3 // but every write must pass through requireWritable.
4 import * as Context from "effect/Context";
@@ -33,9 +34,11 @@ import {
34 import * as SourceControlRateLimit from "@t3tools/source-control-core/server/SourceControlRateLimit";
35 import {
36 IssueTrackerError,
37 + isStandaloneIssueTracker,
38 type IssueTrackerApi,
39 } from "@t3tools/source-control-core/server/IssueTracker";
40
41 +import * as IssueTrackerBindings from "../persistence/IssueTrackerBindings.ts";
42 import * as ProjectService from "../project/ProjectService.ts";
43 import * as RepositoryIdentityResolver from "../project/RepositoryIdentityResolver.ts";
44 import { sourceControlDefinitions } from "../sourceControl/sourceControlDefinitions.ts";
@@ -55,7 +58,7 @@ const traced =
58 call(input).pipe(Effect.withSpan(`IssueService.${operation}`));
59
60 /** A tracker may fail with no detail; the wire errors carry a non-empty one. */
58 -function trackerDetail(error: IssueTrackerError): string {
61 +export function trackerDetail(error: IssueTrackerError): string {
62 return error.detail.trim() || "The issue tracker request failed.";
63 }
64
@@ -164,17 +167,45 @@ const make = Effect.gen(function* () {
167 const registry = yield* IssueTrackerRegistry.IssueTrackerRegistry;
168 const projects = yield* ProjectService.ProjectService;
169 const repositoryIdentities = yield* RepositoryIdentityResolver.RepositoryIdentityResolver;
170 + const bindings = yield* IssueTrackerBindings.IssueTrackerBindingsRepository;
171
168 - const resolveProjectTracker = (
172 + // Read per resolution so a binding saved in Settings applies without a restart.
173 + const resolveStandaloneBinding = (
174 project: OrchestrationProjectShell,
175 ): Effect.Effect<ProjectTrackerBinding | null> =>
171 - (project.repositoryIdentity != null
172 - ? Effect.succeed(project.repositoryIdentity)
173 - : repositoryIdentities.resolve(project.workspaceRoot)
174 - ).pipe(
175 - Effect.map((repositoryIdentity) => resolveGitHostBinding({ ...project, repositoryIdentity })),
176 + bindings.list.pipe(
177 + Effect.map((bound) => {
178 + const binding = bound.get(project.id);
179 + const api = binding === undefined ? null : registry.get(binding.tracker);
180 + if (binding === undefined || api === null || !isStandaloneIssueTracker(api)) return null;
181 + return {
182 + tracker: binding.tracker,
183 + host: api.standalone.host,
184 + scope: binding.scope,
185 + };
186 + }),
187 + Effect.orElseSucceed(() => null),
188 );
189
190 + /**
191 + * Where a project's issues live: its bound standalone tracker, its git host's, or both. The
192 + * tracker bound in Settings leads, as the one the user chose for the project.
193 + */
194 + const resolveProjectTracker = (
195 + project: OrchestrationProjectShell,
196 + ): Effect.Effect<ReadonlyArray<ProjectTrackerBinding>> =>
197 + Effect.all([
198 + resolveStandaloneBinding(project),
199 + (project.repositoryIdentity != null
200 + ? Effect.succeed(project.repositoryIdentity)
201 + : repositoryIdentities.resolve(project.workspaceRoot)
202 + ).pipe(
203 + Effect.map((repositoryIdentity) =>
204 + resolveGitHostBinding({ ...project, repositoryIdentity }),
205 + ),
206 + ),
207 + ]).pipe(Effect.map((resolved) => resolved.filter((binding) => binding !== null)));
208 +
209 const listProjects = (filter: {
210 readonly projectId?: IssueListInput["projectId"];
211 readonly host?: string | undefined;
@@ -196,7 +227,7 @@ const make = Effect.gen(function* () {
227 shells,
228 (project) =>
229 resolveProjectTracker(project).pipe(
199 - Effect.map((binding) => (binding === null ? [] : [{ project, ...binding }])),
230 + Effect.map((bindings) => bindings.map((binding) => ({ project, ...binding }))),
231 ),
232 { concurrency: SCOPE_CONCURRENCY },
233 ),
@@ -227,15 +258,16 @@ const make = Effect.gen(function* () {
258 /**
259 * The project whose checkout and credentials serve a reference, and whether the reference is
260 * the project's own scope. A reference naming another scope on the same tracker and host is
230 - * served by the project but marked read-only.
261 + * served by the project but marked read-only. A project with two trackers serves the one the
262 + * reference names.
263 */
264 const requireProject = (
265 ref: IssueScopeRef,
266 ): Effect.Effect<SupportedProject & { readonly writable: boolean }, IssueError> =>
267 listProjects({ projectId: ref.projectId }).pipe(
268 Effect.flatMap(({ supported }) => {
237 - const own = supported[0];
238 - if (own === undefined || own.tracker !== ref.tracker) {
269 + const own = supported.find((candidate) => candidate.tracker === ref.tracker);
270 + if (own === undefined) {
271 return Effect.fail(new IssueUnavailableError({ reason: "tracker-unsupported" }));
272 }
273 const host = ref.host?.trim().toLowerCase() ?? own.host;
apps/server/src/issue/IssueTrackerConnections.ts new
+178
@@ -0,0 +1,178 @@
1 +/**
2 + * Standalone issue trackers as Settings manages them: one credential per tracker kind in the
3 + * secret store, and the per-project binding that puts a tracker's scope beside the project's
4 + * git-host issues. Disconnecting clears the bindings that pointed at the tracker.
5 + */
6 +import * as Context from "effect/Context";
7 +import * as Effect from "effect/Effect";
8 +import * as Layer from "effect/Layer";
9 +import * as Option from "effect/Option";
10 +import * as DateTime from "effect/DateTime";
11 +import {
12 + IssueTrackerConnectionError,
13 + IssueTrackerKind,
14 + type IssueTrackerBindProjectInput,
15 + type IssueTrackerConnectInput,
16 + type IssueTrackerConnection,
17 + type IssueTrackerConnectionList,
18 +} from "@t3tools/contracts";
19 +import type { StandaloneIssueTrackerApi } from "@t3tools/source-control-core/server/IssueTracker";
20 +
21 +import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
22 +import * as IssueTrackerBindings from "../persistence/IssueTrackerBindings.ts";
23 +import * as IssueService from "./IssueService.ts";
24 +import { issueTrackerSecretName } from "./IssueTrackerHostLive.ts";
25 +import * as IssueTrackerRegistry from "./IssueTrackerRegistry.ts";
26 +
27 +const encoder = new TextEncoder();
28 +
29 +export class IssueTrackerConnections extends Context.Service<
30 + IssueTrackerConnections,
31 + {
32 + /** Every standalone tracker, each probed against its stored credential, and the bindings. */
33 + readonly list: Effect.Effect<IssueTrackerConnectionList, IssueTrackerConnectionError>;
34 + /**
35 + * Vets the credential with the tracker and stores it only when the tracker accepts it. A null
36 + * token removes the stored one and unbinds every project that pointed at the tracker.
37 + */
38 + readonly connect: (
39 + input: IssueTrackerConnectInput,
40 + ) => Effect.Effect<IssueTrackerConnection, IssueTrackerConnectionError>;
41 + /** Binds a project to one of a tracker's scopes, or unbinds it with a null binding. */
42 + readonly bindProject: (
43 + input: IssueTrackerBindProjectInput,
44 + ) => Effect.Effect<void, IssueTrackerConnectionError>;
45 + }
46 +>()("t3/issue/IssueTrackerConnections") {}
47 +
48 +const make = Effect.gen(function* () {
49 + const registry = yield* IssueTrackerRegistry.IssueTrackerRegistry;
50 + const secrets = yield* ServerSecretStore.ServerSecretStore;
51 + const bindings = yield* IssueTrackerBindings.IssueTrackerBindingsRepository;
52 +
53 + const requireTracker = (
54 + tracker: IssueTrackerKind,
55 + ): Effect.Effect<StandaloneIssueTrackerApi, IssueTrackerConnectionError> => {
56 + const found = registry.standalone.find((api) => api.kind === tracker);
57 + return found === undefined
58 + ? Effect.fail(
59 + new IssueTrackerConnectionError({
60 + tracker,
61 + reason: "unknown-tracker",
62 + detail: "This server has no such issue tracker.",
63 + }),
64 + )
65 + : Effect.succeed(found);
66 + };
67 +
68 + /** The kind an error about no tracker in particular is filed under. */
69 + const anyTracker = registry.standalone[0]?.kind ?? IssueTrackerKind.make("none");
70 +
71 + const secretFailure = (tracker: IssueTrackerKind, detail: string) => (cause: unknown) =>
72 + new IssueTrackerConnectionError({ tracker, reason: "failed", detail, cause });
73 +
74 + const disconnected = (api: StandaloneIssueTrackerApi): IssueTrackerConnection => ({
75 + ...api.standalone,
76 + connected: false,
77 + account: null,
78 + detail: null,
79 + scopes: [],
80 + });
81 +
82 + /** The tracker's view of a stored credential; a refusal is status, not a failure. */
83 + const status = (api: StandaloneIssueTrackerApi, token: string) =>
84 + api.probeCredential(token).pipe(
85 + Effect.map((probe): IssueTrackerConnection => ({
86 + ...api.standalone,
87 + connected: true,
88 + account: probe.account,
89 + detail: null,
90 + scopes: probe.scopes,
91 + })),
92 + Effect.catch((error) =>
93 + Effect.succeed<IssueTrackerConnection>({
94 + ...api.standalone,
95 + connected: true,
96 + account: null,
97 + detail: IssueService.trackerDetail(error),
98 + scopes: [],
99 + }),
100 + ),
101 + );
102 +
103 + const current = (api: StandaloneIssueTrackerApi) =>
104 + secrets.get(issueTrackerSecretName(api.kind)).pipe(
105 + Effect.mapError(secretFailure(api.kind, "The stored credential could not be read.")),
106 + Effect.flatMap((stored) =>
107 + Option.isNone(stored)
108 + ? Effect.succeed(disconnected(api))
109 + : status(api, new TextDecoder().decode(stored.value)),
110 + ),
111 + );
112 +
113 + const list: IssueTrackerConnections["Service"]["list"] = Effect.all({
114 + trackers: Effect.forEach(registry.standalone, current, { concurrency: 4 }),
115 + bindings: bindings.list.pipe(
116 + Effect.map((bound) => Object.fromEntries(bound)),
117 + // No single tracker is at fault; the first registered one carries the report.
118 + Effect.mapError(secretFailure(anyTracker, "The project bindings could not be read.")),
119 + ),
120 + });
121 +
122 + const disconnect = Effect.fn("IssueTrackerConnections.disconnect")(function* (
123 + api: StandaloneIssueTrackerApi,
124 + ) {
125 + yield* secrets
126 + .remove(issueTrackerSecretName(api.kind))
127 + .pipe(Effect.mapError(secretFailure(api.kind, "The credential could not be removed.")));
128 + // Bindings to a tracker nobody is signed into would only produce errors in every listing.
129 + yield* bindings
130 + .removeTracker(api.kind)
131 + .pipe(Effect.mapError(secretFailure(api.kind, "The project bindings could not be cleared.")));
132 + return disconnected(api);
133 + });
134 +
135 + const connect: IssueTrackerConnections["Service"]["connect"] = Effect.fn(
136 + "IssueTrackerConnections.connect",
137 + )(function* (input) {
138 + const api = yield* requireTracker(input.tracker);
139 + if (input.token === null) return yield* disconnect(api);
140 + const probe = yield* api.probeCredential(input.token).pipe(
141 + Effect.mapError(
142 + (error) =>
143 + new IssueTrackerConnectionError({
144 + tracker: input.tracker,
145 + reason: error.reason === "unauthenticated" ? "rejected" : "failed",
146 + detail: IssueService.trackerDetail(error),
147 + cause: error,
148 + }),
149 + ),
150 + );
151 + yield* secrets
152 + .set(issueTrackerSecretName(api.kind), encoder.encode(input.token))
153 + .pipe(Effect.mapError(secretFailure(api.kind, "The credential could not be stored.")));
154 + return {
155 + ...api.standalone,
156 + connected: true,
157 + account: probe.account,
158 + detail: null,
159 + scopes: probe.scopes,
160 + };
161 + });
162 +
163 + const bindProject: IssueTrackerConnections["Service"]["bindProject"] = Effect.fn(
164 + "IssueTrackerConnections.bindProject",
165 + )(function* (input) {
166 + // Unbinding names no tracker; the first registered one carries any report.
167 + const tracker =
168 + input.binding === null ? anyTracker : (yield* requireTracker(input.binding.tracker)).kind;
169 + const updatedAt = DateTime.formatIso(yield* DateTime.now);
170 + yield* bindings
171 + .set({ projectId: input.projectId, binding: input.binding, updatedAt })
172 + .pipe(Effect.mapError(secretFailure(tracker, "The project binding could not be saved.")));
173 + });
174 +
175 + return IssueTrackerConnections.of({ list, connect, bindProject });
176 +});
177 +
178 +export const layer = Layer.effect(IssueTrackerConnections, make);
apps/server/src/issue/IssueTrackerHostLive.ts new
+44
@@ -0,0 +1,44 @@
1 +/**
2 + * The server's `IssueTrackerHost`: standalone tracker credentials out of the secret store, one
3 + * per tracker kind. The name is stable across releases so a saved key survives upgrades.
4 + *
5 + * @module issue/IssueTrackerHostLive
6 + */
7 +import * as Effect from "effect/Effect";
8 +import * as Layer from "effect/Layer";
9 +import * as Option from "effect/Option";
10 +import type { IssueTrackerKind } from "@t3tools/contracts";
11 +import { IssueTrackerError } from "@t3tools/source-control-core/server/IssueTracker";
12 +import * as IssueTrackerHost from "@t3tools/source-control-core/server/IssueTrackerHost";
13 +
14 +import * as ServerSecretStore from "../auth/ServerSecretStore.ts";
15 +
16 +export function issueTrackerSecretName(tracker: IssueTrackerKind): string {
17 + return `issue-tracker-${Buffer.from(tracker, "utf8").toString("base64url")}-token`;
18 +}
19 +
20 +const decoder = new TextDecoder();
21 +
22 +const make = Effect.gen(function* () {
23 + const secrets = yield* ServerSecretStore.ServerSecretStore;
24 + return IssueTrackerHost.IssueTrackerHost.of({
25 + credentials: {
26 + get: (tracker) =>
27 + secrets.get(issueTrackerSecretName(tracker)).pipe(
28 + Effect.map(Option.map((bytes) => decoder.decode(bytes))),
29 + Effect.mapError(
30 + (cause) =>
31 + new IssueTrackerError({
32 + tracker,
33 + operation: "readCredential",
34 + reason: "failed",
35 + detail: "The stored credential could not be read.",
36 + cause,
37 + }),
38 + ),
39 + ),
40 + },
41 + });
42 +});
43 +
44 +export const layer = Layer.effect(IssueTrackerHost.IssueTrackerHost, make);
apps/server/src/issue/IssueTrackerRegistry.ts
+16 -3
@@ -2,9 +2,15 @@ import * as Context from "effect/Context";
2 import * as Effect from "effect/Effect";
3 import * as Layer from "effect/Layer";
4 import type { IssueTrackerKind } from "@t3tools/contracts";
5 -import type { IssueTrackerApi } from "@t3tools/source-control-core/server/IssueTracker";
5 +import * as LinearDriver from "@t3tools/issue-tracker-linear/server/driver";
6 +import {
7 + isStandaloneIssueTracker,
8 + type IssueTrackerApi,
9 + type StandaloneIssueTrackerApi,
10 +} from "@t3tools/source-control-core/server/IssueTracker";
11
12 import * as BuiltInDrivers from "../sourceControl/builtInDrivers.ts";
13 +import * as IssueTrackerHostLive from "./IssueTrackerHostLive.ts";
14
15 export class IssueTrackerRegistry extends Context.Service<
16 IssueTrackerRegistry,
@@ -12,6 +18,8 @@ export class IssueTrackerRegistry extends Context.Service<
18 /** Null for a kind with no implementation, which the service reports as unsupported. */
19 readonly get: (kind: IssueTrackerKind) => IssueTrackerApi | null;
20 readonly kinds: ReadonlyArray<IssueTrackerKind>;
21 + /** The trackers a user connects with a credential of their own, in registration order. */
22 + readonly standalone: ReadonlyArray<StandaloneIssueTrackerApi>;
23 }
24 >()("t3/issue/IssueTrackerRegistry") {}
25
@@ -23,14 +31,19 @@ export function fromTrackers(
31 return {
32 get: (kind) => byKind.get(kind) ?? null,
33 kinds: trackers.map((tracker) => tracker.kind),
34 + standalone: trackers.filter(isStandaloneIssueTracker),
35 };
36 }
37
38 +/** Trackers that are not a git host's own. Each signs requests with a credential from Settings. */
39 +const STANDALONE_TRACKERS = [LinearDriver.make];
40 +
41 const make = Effect.gen(function* () {
42 const drivers = yield* BuiltInDrivers.SourceControlDrivers;
31 - return fromTrackers(drivers.flatMap(({ instance }) => instance.issues ?? []));
43 + const standalone = yield* Effect.all(STANDALONE_TRACKERS);
44 + return fromTrackers([...drivers.flatMap(({ instance }) => instance.issues ?? []), ...standalone]);
45 });
46
47 export const layer = Layer.effect(IssueTrackerRegistry, make).pipe(
35 - Layer.provide(BuiltInDrivers.layer),
48 + Layer.provide(Layer.merge(BuiltInDrivers.layer, IssueTrackerHostLive.layer)),
49 );
apps/server/src/observability/RpcInstrumentation.ts
+3
@@ -154,6 +154,9 @@ const RPC_AGGREGATES = {
154 [WS_METHODS.issuesUpdate]: "issues",
155 [WS_METHODS.issuesSetState]: "issues",
156 [WS_METHODS.issuesReact]: "issues",
157 + [WS_METHODS.issueTrackersList]: "issues",
158 + [WS_METHODS.issueTrackersConnect]: "issues",
159 + [WS_METHODS.issueTrackersBindProject]: "issues",
160 [WS_METHODS.sourceControlLookupRepository]: "source-control",
161 [WS_METHODS.sourceControlCloneRepository]: "source-control",
162 [WS_METHODS.sourceControlPublishRepository]: "source-control",
apps/server/src/persistence/Errors.ts
+1
@@ -115,6 +115,7 @@ export type ProviderSessionRuntimeRepositoryError = PersistenceSqlError | Persis
115 export type AuthPairingLinkRepositoryError = PersistenceSqlError | PersistenceDecodeError;
116 export type AuthSessionRepositoryError = PersistenceSqlError | PersistenceDecodeError;
117 export type PullRequestFilesViewedRepositoryError = PersistenceSqlError | PersistenceDecodeError;
118 +export type IssueTrackerBindingsRepositoryError = PersistenceSqlError | PersistenceDecodeError;
119 export type PullRequestReviewGuideRepositoryError = PersistenceSqlError | PersistenceDecodeError;
120
121 export type ProjectionRepositoryError = PersistenceSqlError | PersistenceDecodeError;
apps/server/src/persistence/IssueTrackerBindings.ts new
+102
@@ -0,0 +1,102 @@
1 +import * as Context from "effect/Context";
2 +import * as Effect from "effect/Effect";
3 +import * as Layer from "effect/Layer";
4 +import * as Schema from "effect/Schema";
5 +import * as SqlClient from "effect/sql/SqlClient";
6 +import * as SqlSchema from "effect/sql/SqlSchema";
7 +import { IssueTrackerKind, IssueTrackerProjectBinding, ProjectId } from "@t3tools/contracts";
8 +
9 +import {
10 + PersistenceDecodeError,
11 + PersistenceSqlError,
12 + type IssueTrackerBindingsRepositoryError,
13 +} from "./Errors.ts";
14 +
15 +const BindingRow = Schema.Struct({
16 + projectId: ProjectId,
17 + tracker: IssueTrackerKind,
18 + scope: Schema.String,
19 +});
20 +
21 +/**
22 + * Which standalone issue tracker scope each project reads beside its git host's own issues. A
23 + * project is bound to one scope at most, and only while it has a row.
24 + */
25 +export class IssueTrackerBindingsRepository extends Context.Service<
26 + IssueTrackerBindingsRepository,
27 + {
28 + readonly list: Effect.Effect<
29 + ReadonlyMap<ProjectId, IssueTrackerProjectBinding>,
30 + IssueTrackerBindingsRepositoryError
31 + >;
32 + /** Null unbinds. */
33 + readonly set: (input: {
34 + readonly projectId: ProjectId;
35 + readonly binding: IssueTrackerProjectBinding | null;
36 + /** When the binding was saved, as an ISO instant. */
37 + readonly updatedAt: string;
38 + }) => Effect.Effect<void, IssueTrackerBindingsRepositoryError>;
39 + /** Unbinds every project that pointed at the tracker, when its credential is removed. */
40 + readonly removeTracker: (
41 + tracker: IssueTrackerKind,
42 + ) => Effect.Effect<void, IssueTrackerBindingsRepositoryError>;
43 + }
44 +>()("t3/persistence/IssueTrackerBindings/IssueTrackerBindingsRepository") {}
45 +
46 +function toSqlOrDecodeError(sqlOperation: string, decodeOperation: string) {
47 + return (cause: unknown): IssueTrackerBindingsRepositoryError =>
48 + Schema.isSchemaError(cause)
49 + ? PersistenceDecodeError.fromSchemaError(decodeOperation, cause)
50 + : new PersistenceSqlError({ operation: sqlOperation, cause });
51 +}
52 +
53 +const make = Effect.gen(function* () {
54 + const sql = yield* SqlClient.SqlClient;
55 +
56 + const listRows = SqlSchema.findAll({
57 + Request: Schema.Void,
58 + Result: BindingRow,
59 + execute: () =>
60 + sql`
61 + SELECT project_id AS "projectId", tracker AS "tracker", scope AS "scope"
62 + FROM issue_tracker_bindings
63 + `,
64 + });
65 +
66 + return IssueTrackerBindingsRepository.of({
67 + list: listRows(undefined).pipe(
68 + Effect.map(
69 + (rows) =>
70 + new Map(
71 + rows.map((row) => [row.projectId, { tracker: row.tracker, scope: row.scope }] as const),
72 + ),
73 + ),
74 + Effect.mapError(toSqlOrDecodeError("listIssueTrackerBindings", "IssueTrackerBinding")),
75 + ),
76 + set: Effect.fn("IssueTrackerBindingsRepository.set")(
77 + function* (input) {
78 + yield* input.binding === null
79 + ? sql`DELETE FROM issue_tracker_bindings WHERE project_id = ${input.projectId}`
80 + : sql`
81 + INSERT INTO issue_tracker_bindings (project_id, tracker, scope, updated_at)
82 + VALUES (${input.projectId}, ${input.binding.tracker}, ${input.binding.scope}, ${input.updatedAt})
83 + ON CONFLICT (project_id)
84 + DO UPDATE SET tracker = excluded.tracker, scope = excluded.scope, updated_at = excluded.updated_at
85 + `;
86 + },
87 + Effect.mapError(
88 + (cause) => new PersistenceSqlError({ operation: "setIssueTrackerBinding", cause }),
89 + ),
90 + ),
91 + removeTracker: Effect.fn("IssueTrackerBindingsRepository.removeTracker")(
92 + function* (tracker) {
93 + yield* sql`DELETE FROM issue_tracker_bindings WHERE tracker = ${tracker}`;
94 + },
95 + Effect.mapError(
96 + (cause) => new PersistenceSqlError({ operation: "removeIssueTrackerBindings", cause }),
97 + ),
98 + ),
99 + });
100 +});
101 +
102 +export const layer = Layer.effect(IssueTrackerBindingsRepository, make);
apps/server/src/persistence/Migrations.ts
+2
@@ -104,6 +104,7 @@ import Migration0093 from "./Migrations/093_ProviderTurnAttemptIndex.ts";
104 import Migration0094 from "./Migrations/094_TurnItemMessageOrdinalIndex.ts";
105 import Migration0095 from "./Migrations/095_TurnItemInlineWorkOutput.ts";
106 import Migration0096 from "./Migrations/096_RepairStaleTitleRegeneration.ts";
107 +import Migration0097 from "./Migrations/097_IssueTrackerBindings.ts";
108
109 const migrationEntries = [
110 [1, "OrchestrationEvents", Migration0001],
@@ -203,6 +204,7 @@ const migrationEntries = [
204 [94, "TurnItemMessageOrdinalIndex", Migration0094],
205 [95, "TurnItemInlineWorkOutput", Migration0095],
206 [96, "RepairStaleTitleRegeneration", Migration0096],
207 + [97, "IssueTrackerBindings", Migration0097],
208 ] as const;
209
210 export const migrationManifest = migrationEntries.map(([id, name]) => [id, name] as const);
apps/server/src/persistence/Migrations/097_IssueTrackerBindings.ts new
+18
@@ -0,0 +1,18 @@
1 +import * as Effect from "effect/Effect";
2 +import * as SqlClient from "effect/sql/SqlClient";
3 +
4 +export default Effect.gen(function* () {
5 + const sql = yield* SqlClient.SqlClient;
6 +
7 + // One row per project bound to a standalone issue tracker (Linear, Jira): which tracker and
8 + // which of its scopes (a team or project key). Unbinding deletes the row; a project with no row
9 + // reads only its git host's issues. The credential itself lives in the secret store.
10 + yield* sql`
11 + CREATE TABLE IF NOT EXISTS issue_tracker_bindings (
12 + project_id TEXT PRIMARY KEY,
13 + tracker TEXT NOT NULL,
14 + scope TEXT NOT NULL,
15 + updated_at TEXT NOT NULL
16 + ) WITHOUT ROWID
17 + `;
18 +});
apps/server/src/persistence/reconcileV2PreviewMigration.test.ts
+2
@@ -76,6 +76,7 @@ describe("V2 preview upgrade", () => {
76 [94, "TurnItemMessageOrdinalIndex"],
77 [95, "TurnItemInlineWorkOutput"],
78 [96, "RepairStaleTitleRegeneration"],
79 + [97, "IssueTrackerBindings"],
80 ]);
81 assert.deepStrictEqual(yield* runMigrations(), []);
82 assert.deepStrictEqual(yield* sql`SELECT * FROM orchestration_v2_legacy_imports`, imports);
@@ -195,6 +196,7 @@ describe("V2 preview upgrade", () => {
196 [94, "TurnItemMessageOrdinalIndex"],
197 [95, "TurnItemInlineWorkOutput"],
198 [96, "RepairStaleTitleRegeneration"],
199 + [97, "IssueTrackerBindings"],
200 ]);
201 }).pipe(Effect.provide(NodeSqliteClient.layer({ filename: ":memory:" }))),
202 );
apps/server/src/pullRequest/PullRequestReviewGuideService.ts
+1 -1
@@ -451,7 +451,7 @@ const make = Effect.gen(function* () {
451 if (!settings.reviewGuidesEnabled) {
452 return yield* new PullRequestOperationError({
453 operation: "generateReviewGuide",
454 - detail: "Review guides are off. Turn them on in Settings → Source Control.",
454 + detail: "Review guides are off. Turn them on in Settings → Source control & issues.",
455 });
456 }
457 const { key, workspaceRoot, identity } = yield* keyFor(input);
apps/server/src/server.ts
+7 -1
@@ -55,6 +55,8 @@ import { speechStreamRouteLayer } from "./speech/stream.ts";
55 import * as PullRequestProviderRegistry from "./pullRequest/PullRequestProviderRegistry.ts";
56 import * as PullRequestService from "./pullRequest/PullRequestService.ts";
57 import * as IssueService from "./issue/IssueService.ts";
58 +import * as IssueTrackerConnections from "./issue/IssueTrackerConnections.ts";
59 +import * as IssueTrackerBindings from "./persistence/IssueTrackerBindings.ts";
60 import * as IssueTrackerRegistry from "./issue/IssueTrackerRegistry.ts";
61 import * as SqlitePersistence from "./persistence/Sqlite.ts";
62 import * as PullRequestFilesViewed from "./persistence/PullRequestFilesViewed.ts";
@@ -441,7 +443,11 @@ const layerPullRequestService = PullRequestService.layer.pipe(
443 Layer.provide(SourceControlRateLimit.layer),
444 );
445
444 -const layerIssueService = IssueService.layer.pipe(Layer.provide(IssueTrackerRegistry.layer));
446 +// Both read the one registry, so a standalone tracker connected in Settings is the same
447 +// instance the listing reads through.
448 +const layerIssueService = Layer.merge(IssueService.layer, IssueTrackerConnections.layer).pipe(
449 + Layer.provide(Layer.merge(IssueTrackerRegistry.layer, IssueTrackerBindings.layer)),
450 +);
451
452 // One instance serves MCP link calls and refreshes snapshots on thread events.
453 const layerThreadIssueService = ThreadIssueService.layer;
apps/server/src/textGeneration/TextGeneration.ts
+1 -1
@@ -149,7 +149,7 @@ export const make = Effect.gen(function* () {
149 return yield* new TextGenerationError({
150 operation,
151 detail:
152 - "Review guides need a coding agent that can read the checkout. None is ready. Pick Codex or Claude as the review guide model in Settings → Source control.",
152 + "Review guides need a coding agent that can read the checkout. None is ready. Pick Codex or Claude as the review guide model in Settings → Source control & issues.",
153 });
154 }
155 return yield* installationGate.execute(
apps/server/src/ws.test.ts
+2
@@ -115,6 +115,7 @@ import * as ProviderRegistry from "./provider/ProviderRegistry.ts";
115 import * as ProviderSessionManager from "./orchestration-v2/ProviderSessionManager.ts";
116 import * as PullRequestReviewGuideService from "./pullRequest/PullRequestReviewGuideService.ts";
117 import * as IssueService from "./issue/IssueService.ts";
118 +import * as IssueTrackerConnections from "./issue/IssueTrackerConnections.ts";
119 import * as PullRequestService from "./pullRequest/PullRequestService.ts";
120 import * as PullRequestSyncReactor from "./orchestration-v2/PullRequestSyncReactor.ts";
121 import * as RelayClient from "@t3tools/shared/relayClient";
@@ -860,6 +861,7 @@ const layerUnusedConfigRpcServices = Layer.mergeAll(
861 Layer.mock(PullRequestReviewGuideService.PullRequestReviewGuideService)({}),
862 Layer.mock(PullRequestService.PullRequestService)({}),
863 Layer.mock(IssueService.IssueService)({}),
864 + Layer.mock(IssueTrackerConnections.IssueTrackerConnections)({}),
865 Layer.mock(PullRequestSyncReactor.PullRequestSyncReactor)({}),
866 Layer.mock(RelayClient.RelayClient)({}),
867 Layer.mock(RepositoryIdentityResolver.RepositoryIdentityResolver)({}),
apps/server/src/ws.ts
+10
@@ -250,6 +250,7 @@ import * as TraceDiagnostics from "./diagnostics/TraceDiagnostics.ts";
250 import * as TriageService from "./triage/TriageService.ts";
251 import * as PullRequestService from "./pullRequest/PullRequestService.ts";
252 import * as IssueService from "./issue/IssueService.ts";
253 +import * as IssueTrackerConnections from "./issue/IssueTrackerConnections.ts";
254 import * as PullRequestReviewGuideService from "./pullRequest/PullRequestReviewGuideService.ts";
255 import { listLinkedPullRequestThreads } from "./pullRequest/linkedThreads.ts";
256 import { pullRequestSyncKey } from "./pullRequest/pullRequestSyncKey.ts";
@@ -721,6 +722,7 @@ const SPLIT_WS_RPC_PREFIXES = [
722 "server",
723 "pullRequests",
724 "issues",
725 + "issueTrackers",
726 "provider",
727 "orchestration",
728 ] as const;
@@ -1482,6 +1484,7 @@ export const layerWsRpc = (
1484 const guestShares = yield* GuestShareService.GuestShareService;
1485 const pullRequests = yield* PullRequestService.PullRequestService;
1486 const issues = yield* IssueService.IssueService;
1487 + const issueTrackers = yield* IssueTrackerConnections.IssueTrackerConnections;
1488 const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService;
1489 const pullRequestSync = yield* PullRequestSyncReactor.PullRequestSyncReactor;
1490 const deviceService = yield* DeviceService.DeviceService;
@@ -1980,6 +1983,9 @@ export const layerWsRpc = (
1983 [WS_METHODS.issuesUpdate]: (input) => issues.update(input),
1984 [WS_METHODS.issuesSetState]: (input) => issues.setState(input),
1985 [WS_METHODS.issuesReact]: (input) => issues.react(input),
1986 + [WS_METHODS.issueTrackersList]: () => issueTrackers.list,
1987 + [WS_METHODS.issueTrackersConnect]: (input) => issueTrackers.connect(input),
1988 + [WS_METHODS.issueTrackersBindProject]: (input) => issueTrackers.bindProject(input),
1989 [ORCHESTRATION_V2_WS_METHODS.dispatchCommand]: (command) =>
1990 Effect.annotateCurrentSpan({
1991 "orchestration_v2.command_id": command.commandId,
@@ -3595,6 +3601,7 @@ export const layer = Layer.unwrap(
3601 const npmRelease = yield* NpmRelease.NpmRelease;
3602 const pullRequests = yield* PullRequestService.PullRequestService;
3603 const issues = yield* IssueService.IssueService;
3604 + const issueTrackers = yield* IssueTrackerConnections.IssueTrackerConnections;
3605 const reviewGuides = yield* PullRequestReviewGuideService.PullRequestReviewGuideService;
3606 const peerLinks = yield* PeerLinks.PeerLinks;
3607 const peerLinkRequests = yield* PeerLinkRequests.PeerLinkRequests;
@@ -3685,6 +3692,9 @@ export const layer = Layer.unwrap(
3692 // Share server-lifetime PR caches so WS mutations invalidate every client's HTTP diffs.
3693 Layer.provide(Layer.succeed(PullRequestService.PullRequestService, pullRequests)),
3694 Layer.provide(Layer.succeed(IssueService.IssueService, issues)),
3695 + Layer.provide(
3696 + Layer.succeed(IssueTrackerConnections.IssueTrackerConnections, issueTrackers),
3697 + ),
3698 Layer.provide(OtlpEndpointCheck.layer),
3699 Layer.provide(
3700 Layer.succeed(
apps/web/src/components/CommandPalette.logic.ts
+1 -1
@@ -870,7 +870,7 @@ export function buildPaletteRemoteSourceReadiness(
870 ...entry,
871 hint: entry.hint.replace(
872 "Open source control settings",
873 - "Open Settings -> Source control",
873 + "Open Settings -> Source control & issues",
874 ),
875 };
876 };
apps/web/src/components/CommandPalette.tsx
+2 -1
@@ -1122,7 +1122,8 @@ function OpenCommandPaletteDialog(props: {
1122 }
1123 />
1124 <TooltipPopup align="end" side="left">
1125 - {disabledHint ?? "Open Settings -> Source control to configure this provider."}
1125 + {disabledHint ??
1126 + "Open Settings -> Source control & issues to configure this provider."}
1127 </TooltipPopup>
1128 </Tooltip>
1129 </span>
apps/web/src/components/GitActionsControl.tsx
+3 -3
@@ -212,7 +212,7 @@ function getPublishProviderReadiness(input: {
212 if (!discovered) {
213 return {
214 ready: false,
215 - hint: "Provider status unavailable. Open Settings -> Source control and rescan.",
215 + hint: "Provider status unavailable. Open Settings -> Source control & issues and rescan.",
216 };
217 }
218 if (discovered.status !== "available") {
@@ -223,7 +223,7 @@ function getPublishProviderReadiness(input: {
223 ready: false,
224 hint:
225 Option.getOrNull(discovered.auth.detail) ??
226 - `${discovered.label} is not authenticated. Open Settings -> Source control for setup guidance.`,
226 + `${discovered.label} is not authenticated. Open Settings -> Source control & issues for setup guidance.`,
227 };
228 }
229 return { ready: true, hint: null };
@@ -627,7 +627,7 @@ export function PublishRepositoryDialog(props: PublishRepositoryDialogProps) {
627 />
628 <TooltipPopup side="top" align="end">
629 {readiness.hint ??
630 - "Open Settings -> Source control to configure this provider."}
630 + "Open Settings -> Source control & issues to configure this provider."}
631 </TooltipPopup>
632 </Tooltip>
633 </div>
apps/web/src/components/Icons.tsx
+9
@@ -122,6 +122,15 @@ export const JujutsuIcon: Icon = (props) => {
122 );
123 };
124
125 +export const LinearIcon: Icon = (props) => (
126 + <svg {...props} viewBox="0 0 100 100" fill="none">
127 + <path
128 + fill="currentColor"
129 + d="M1.225 61.523c-.222-.949.908-1.546 1.597-.857l36.512 36.512c.69.69.092 1.82-.857 1.597C20.15 94.612 5.388 79.85 1.225 61.523ZM.002 46.889a.99.99 0 0 0 .29.76l52.062 52.061a.99.99 0 0 0 .76.29c2.765-.169 5.47-.559 8.1-1.152.75-.169 1.014-1.084.47-1.63L2.784 38.32c-.545-.545-1.46-.28-1.63.47A50.229 50.229 0 0 0 .002 46.89ZM4.472 29.34a.99.99 0 0 0 .208 1.104l64.878 64.877a.99.99 0 0 0 1.104.208 50.293 50.293 0 0 0 5.807-3.132.99.99 0 0 0 .154-1.53L9.135 23.38a.99.99 0 0 0-1.53.154 50.29 50.29 0 0 0-3.132 5.807ZM12.293 18.229c-.309-.309-.334-.803-.045-1.13C21.376 6.626 34.637 0 49.45 0 76.869 0 99.1 22.231 99.1 49.65c0 14.813-6.626 28.074-17.099 37.202-.327.29-.821.264-1.13-.045L12.293 18.23Z"
130 + />
131 + </svg>
132 +);
133 +
134 export const CursorIcon: Icon = ({ className, ...props }) => (
135 <svg
136 {...props}
apps/web/src/components/issue/issuePresentation.tsx
+7 -1
@@ -3,6 +3,7 @@ import { sourceControlClients } from "@t3tools/client-runtime/source-control-cli
3 import { CircleCheckIcon, CircleDotIcon, CircleSlashIcon, TicketIcon } from "lucide-react";
4
5 import { cn } from "~/lib/utils";
6 +import { LinearIcon, type Icon } from "~/components/Icons";
7 import { getSourceControlPresentationForKind } from "~/sourceControlPresentation";
8
9 import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
@@ -10,12 +11,17 @@ import { PULL_REQUEST_STATE_PRESENTATION } from "../pullRequest/pullRequestIcons
11
12 export const IssueGlyph = { issue: CircleDotIcon } as const;
13
14 +/** Name and mark per standalone tracker kind; one missing here falls back to its kind and a ticket. */
15 +const STANDALONE_TRACKERS: Partial<Record<string, { providerName: string; Icon: Icon }>> = {
16 + linear: { providerName: "Linear", Icon: LinearIcon },
17 +};
18 +
19 /** A git host's tracker wears the host's own icon and name; a standalone tracker wears its kind. */
20 export function issueTrackerPresentation(tracker: IssueTrackerKind | string) {
21 if (sourceControlClients.find(tracker) !== undefined) {
22 return getSourceControlPresentationForKind(tracker);
23 }
18 - return { providerName: tracker, Icon: TicketIcon };
24 + return STANDALONE_TRACKERS[tracker] ?? { providerName: tracker, Icon: TicketIcon };
25 }
26
27 /**
apps/web/src/components/pullRequest/PullRequestGuideTab.tsx
+1 -1
@@ -174,7 +174,7 @@ export function PullRequestGuideTab({
174 );
175 }
176
177 -const FAILURE_HINT = "Check the review guide model in Settings → Source control.";
177 +const FAILURE_HINT = "Check the review guide model in Settings → Source control & issues.";
178
179 function FailureDetails({ detail }: { detail: string }) {
180 return (
apps/web/src/components/pullRequest/guide/useReviewGuideWriter.ts
+1 -1
@@ -54,7 +54,7 @@ export function useReviewGuideWriter({
54 title: "Could not start a review guide",
55 description: readableFailure(
56 squashAtomCommandFailure(result),
57 - "Check the review guide model in Settings → Source control.",
57 + "Check the review guide model in Settings → Source control & issues.",
58 ),
59 });
60 }
apps/web/src/components/settings/IssueTrackerSettings.tsx new
+295
@@ -0,0 +1,295 @@
1 +import { useAtomValue } from "@effect/atom-react";
2 +import { issueTrackerSummary } from "@t3tools/client-runtime/state/issue-trackers";
3 +import { squashAtomCommandFailure } from "@t3tools/client-runtime/state/runtime";
4 +import { ChevronDownIcon, ExternalLinkIcon, XIcon } from "lucide-react";
5 +import { useState, type ElementType } from "react";
6 +import type {
7 + EnvironmentId,
8 + IssueTrackerConnection,
9 + IssueTrackerConnectionList,
10 + ProjectId,
11 +} from "@t3tools/contracts";
12 +
13 +import { useEnvironmentQuery } from "../../state/query";
14 +import { issueTrackerEnvironment } from "../../state/issueTrackers";
15 +import { useProjects } from "../../state/entities";
16 +import { useAtomCommand } from "../../state/use-atom-command";
17 +import { LinearIcon } from "../Icons";
18 +import { cn } from "~/lib/utils";
19 +
20 +import { Badge } from "../ui/badge";
21 +import { Button, InlineButton } from "../ui/button";
22 +import { Collapsible, CollapsibleContent } from "../ui/collapsible";
23 +import { Select, SelectItem, SelectPopup, SelectTrigger, SelectValue } from "../ui/select";
24 +import { Skeleton } from "../ui/skeleton";
25 +import { SecretInput } from "./SecretInput";
26 +import { SettingsRow, SettingsSection } from "./settingsLayout";
27 +import { searchableSetting } from "./settingsSearch";
28 +
29 +type TrackerIcon = ElementType<{ className?: string }>;
30 +
31 +/** Web art per tracker kind; the server supplies everything else about a tracker. */
32 +const TRACKER_ICONS: Partial<Record<string, TrackerIcon>> = {
33 + linear: LinearIcon,
34 +};
35 +
36 +const UNBOUND = "";
37 +
38 +/**
39 + * Standalone issue trackers for one environment: connect each with a credential, and bind the
40 + * environment's projects to one of the tracker's scopes so their issues list beside the git
41 + * host's. Generic over the trackers the server reports; nothing here names Linear but its icon.
42 + */
43 +export function IssueTrackerSettings({ environmentId }: { readonly environmentId: EnvironmentId }) {
44 + const query = useEnvironmentQuery(
45 + issueTrackerEnvironment.connections({ environmentId, input: {} }),
46 + );
47 + const trackers = query.data?.trackers ?? [];
48 + if (query.data === null && query.isPending) {
49 + return (
50 + <SettingsSection id={searchableSetting("issue-trackers").id} title="Issue trackers">
51 + <div className="grid gap-3 px-4 py-3">
52 + <Skeleton className="h-4 w-40" />
53 + <Skeleton className="h-8 w-full" />
54 + </div>
55 + </SettingsSection>
56 + );
57 + }
58 + if (trackers.length === 0) return null;
59 + return (
60 + <SettingsSection id={searchableSetting("issue-trackers").id} title="Issue trackers">
61 + {trackers.map((tracker) => (
62 + <TrackerRow
63 + // Drafts belong to one environment; switching must not carry them over.
64 + key={`${tracker.tracker}-${environmentId}`}
65 + environmentId={environmentId}
66 + tracker={tracker}
67 + bindings={query.data?.bindings ?? {}}
68 + />
69 + ))}
70 + </SettingsSection>
71 + );
72 +}
73 +
74 +function TrackerRow({
75 + environmentId,
76 + tracker,
77 + bindings,
78 +}: {
79 + readonly environmentId: EnvironmentId;
80 + readonly tracker: IssueTrackerConnection;
81 + readonly bindings: IssueTrackerConnectionList["bindings"];
82 +}) {
83 + const Icon = TRACKER_ICONS[tracker.tracker];
84 + const canEdit = useAtomValue(issueTrackerEnvironment.connect.permissionAtom(environmentId));
85 + const connect = useAtomCommand(issueTrackerEnvironment.connect, {
86 + label: `connect ${tracker.displayName}`,
87 + });
88 + const [busy, setBusy] = useState(false);
89 + const [failure, setFailure] = useState<string | null>(null);
90 + const [isExpanded, setIsExpanded] = useState(false);
91 +
92 + const submit = async (token: string | null) => {
93 + setBusy(true);
94 + setFailure(null);
95 + const result = await connect({
96 + environmentId,
97 + input: { tracker: tracker.tracker, token },
98 + });
99 + setBusy(false);
100 + if (result._tag === "Success") return;
101 + const error = squashAtomCommandFailure(result);
102 + setFailure(error instanceof Error ? error.message : "The request failed.");
103 + };
104 +
105 + const inputId = `issue-tracker-${tracker.tracker}-${environmentId}`;
106 + const usable = tracker.connected && tracker.account !== null;
107 + const summary = issueTrackerSummary(tracker, bindings);
108 +
109 + return (
110 + <div className="first:rounded-t-xl last:rounded-b-xl transition-colors hover:bg-muted/20">
111 + <div className="flex items-center justify-between gap-3 px-3 py-3 sm:px-4">
112 + <div className="min-w-0 flex-1 space-y-1">
113 + <div className="flex min-w-0 flex-wrap items-center gap-2">
114 + <span className="relative inline-flex size-5 shrink-0 items-center justify-center">
115 + {Icon ? <Icon className="size-4.5 text-foreground/80" /> : null}
116 + <span
117 + aria-hidden
118 + className={cn(
119 + "pointer-events-none absolute -left-0.5 -top-0.5 size-2 rounded-full ring-2 ring-background",
120 + usable ? "bg-success" : "bg-muted-foreground/35",
121 + )}
122 + />
123 + </span>
124 + <span className="truncate text-sm font-medium text-foreground">
125 + {tracker.displayName}
126 + </span>
127 + {tracker.connected && tracker.account === null ? (
128 + <Badge variant="destructive" size="sm">
129 + Credential rejected
130 + </Badge>
131 + ) : null}
132 + </div>
133 + <p className="text-xs leading-normal text-muted-foreground/80">{summary}</p>
134 + </div>
135 + <Button
136 + size="icon-xs"
137 + variant="ghost-muted"
138 + onClick={() => setIsExpanded((open) => !open)}
139 + aria-expanded={isExpanded}
140 + aria-label={`Toggle ${tracker.displayName} details`}
141 + >
142 + <ChevronDownIcon
143 + className={cn("size-3.5 transition-transform", isExpanded && "rotate-180")}
144 + />
145 + </Button>
146 + </div>
147 + <Collapsible open={isExpanded} onOpenChange={setIsExpanded}>
148 + <CollapsibleContent>
149 + {/* Locked while saving, so an edit made mid-request is not overwritten by the saved value. */}
150 + <fieldset disabled={!canEdit || busy} className="contents">
151 + <div className="px-3 pb-4 pt-1 sm:px-4">
152 + <SettingsRow
153 + title={<label htmlFor={inputId}>{tracker.credential.label}</label>}
154 + description={
155 + <>
156 + Stored on the server.
157 + {tracker.credential.helpUrl ? (
158 + <>
159 + {" "}
160 + <InlineButton
161 + render={
162 + <a
163 + href={tracker.credential.helpUrl}
164 + target="_blank"
165 + rel="noreferrer noopener"
166 + />
167 + }
168 + >
169 + Create one
170 + <ExternalLinkIcon aria-hidden className="size-3" />
171 + </InlineButton>
172 + </>
173 + ) : null}
174 + {failure ? <span className="block text-destructive">{failure}</span> : null}
175 + </>
176 + }
177 + control={
178 + <div className="flex w-full min-w-0 items-center gap-2 @min-[32rem]/settings-row:w-56">
179 + <SecretInput
180 + id={inputId}
181 + size="sm"
182 + className="min-w-0 flex-1"
183 + configured={tracker.connected}
184 + value=""
185 + onCommit={(next) => {
186 + if (next.trim()) void submit(next.trim());
187 + }}
188 + />
189 + {tracker.connected ? (
190 + <Button
191 + type="button"
192 + size="icon-sm"
193 + variant="ghost-destructive"
194 + onClick={() => void submit(null)}
195 + aria-label={`Disconnect ${tracker.displayName}`}
196 + >
197 + <XIcon className="size-3.5" />
198 + </Button>
199 + ) : null}
200 + </div>
201 + }
202 + />
203 + {usable ? (
204 + <ProjectBindings
205 + environmentId={environmentId}
206 + tracker={tracker}
207 + bindings={bindings}
208 + />
209 + ) : null}
210 + </div>
211 + </fieldset>
212 + </CollapsibleContent>
213 + </Collapsible>
214 + </div>
215 + );
216 +}
217 +
218 +/** One picker per project of this environment: which of the tracker's scopes it reads, if any. */
219 +function ProjectBindings({
220 + environmentId,
221 + tracker,
222 + bindings,
223 +}: {
224 + readonly environmentId: EnvironmentId;
225 + readonly tracker: IssueTrackerConnection;
226 + readonly bindings: IssueTrackerConnectionList["bindings"];
227 +}) {
228 + const projects = useProjects().filter((project) => project.environmentId === environmentId);
229 + const bind = useAtomCommand(issueTrackerEnvironment.bindProject, {
230 + label: `bind project to ${tracker.displayName}`,
231 + });
232 + const [pending, setPending] = useState<ProjectId | null>(null);
233 + if (projects.length === 0 || tracker.scopes.length === 0) return null;
234 +
235 + const change = async (projectId: ProjectId, scope: string) => {
236 + setPending(projectId);
237 + await bind({
238 + environmentId,
239 + input: {
240 + projectId,
241 + binding: scope === UNBOUND ? null : { tracker: tracker.tracker, scope },
242 + },
243 + });
244 + setPending(null);
245 + };
246 +
247 + return (
248 + <>
249 + <SettingsRow
250 + title="Projects"
251 + description={`Pick the ${tracker.displayName} ${tracker.scopeNoun} whose issues each project lists beside its repository's own.`}
252 + />
253 + {projects.map((project) => {
254 + const bound = bindings[project.id];
255 + // A project bound to another tracker keeps that binding; this picker shows it unbound.
256 + const value = bound?.tracker === tracker.tracker ? bound.scope : UNBOUND;
257 + return (
258 + <SettingsRow
259 + key={project.id}
260 + title={project.title}
261 + control={
262 + <Select
263 + value={value}
264 + disabled={pending === project.id}
265 + onValueChange={(next) => {
266 + if (next !== null) void change(project.id, next);
267 + }}
268 + >
269 + <SelectTrigger
270 + aria-label={`${tracker.displayName} ${tracker.scopeNoun} for ${project.title}`}
271 + className="w-full @min-[32rem]/settings-row:w-56"
272 + size="sm"
273 + >
274 + <SelectValue>
275 + {value === UNBOUND
276 + ? "Not bound"
277 + : (tracker.scopes.find((scope) => scope.key === value)?.name ?? value)}
278 + </SelectValue>
279 + </SelectTrigger>
280 + <SelectPopup>
281 + <SelectItem value={UNBOUND}>Not bound</SelectItem>
282 + {tracker.scopes.map((scope) => (
283 + <SelectItem key={scope.key} value={scope.key}>
284 + {scope.name} ({scope.key})
285 + </SelectItem>
286 + ))}
287 + </SelectPopup>
288 + </Select>
289 + }
290 + />
291 + );
292 + })}
293 + </>
294 + );
295 +}
apps/web/src/components/settings/SourceControlSettings.tsx
+4
@@ -34,6 +34,7 @@ import { Switch } from "../ui/switch";
34 import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
35
36 import { GitIcon, JujutsuIcon, type Icon } from "../Icons";
37 +import { IssueTrackerSettings } from "./IssueTrackerSettings";
38 import { SourceControlHostSettings } from "./SourceControlHostSettings";
39 import { SourceControlAccountSettings } from "./SourceControlAccountSettings";
40 import { SourceControlAppSignInSettings } from "./SourceControlAppSignInSettings";
@@ -580,6 +581,9 @@ export function SourceControlSettingsPanel() {
581 onScan={handleScan}
582 />
583 )}
584 + {environmentId === null ? null : (
585 + <IssueTrackerSettings key={environmentId} environmentId={environmentId} />
586 + )}
587
588 <SourceControlWritingSettingsSection />
589 </SettingsPageContainer>
apps/web/src/components/settings/settingsSearch.ts
+8 -1
@@ -106,7 +106,7 @@ export const SETTINGS_SECTION_LABELS: Readonly<Record<SettingsPath, string>> = {
106 "/settings/browser": msg("Browser"),
107 "/settings/devices": msg("Devices"),
108 "/settings/scheduled-tasks": msg("Scheduled tasks"),
109 - "/settings/source-control": msg("Source control"),
109 + "/settings/source-control": msg("Source control & issues"),
110 "/settings/worktrees": msg("Worktrees"),
111 "/settings/connections": msg("Environments"),
112 "/settings/access": msg("Sharing & access"),
@@ -1148,6 +1148,13 @@ export const SETTINGS_SEARCH_ITEMS = [
1148 scope: "project-defaults",
1149 searchTerms: ["pull request merge squash rebase last selected"],
1150 },
1151 + {
1152 + id: "issue-trackers",
1153 + title: "Issue trackers",
1154 + to: "/settings/source-control",
1155 + scope: "environment-defaults",
1156 + searchTerms: ["linear jira issues tracker team api key connect bind project"],
1157 + },
1158 {
1159 id: "source-control",
1160 title: "Source control",
apps/web/src/state/issueTrackers.ts new
+5
@@ -0,0 +1,5 @@
1 +import { createIssueTrackerEnvironmentAtoms } from "@t3tools/client-runtime/state/issue-trackers";
2 +
3 +import { connectionAtomRuntime } from "../connection/runtime";
4 +
5 +export const issueTrackerEnvironment = createIssueTrackerEnvironmentAtoms(connectionAtomRuntime);
docs/user/project-settings.md
+4 -4
@@ -39,7 +39,7 @@ machine's setting. Every other provider setting stays per machine.
39
40 On mobile, open **Settings** and use the filter in its header to choose connected environments
41 and a project. The filter stays available in server-setting pages. With **All projects** selected,
42 -the server-setting pages, such as Threads, Source control and Worktrees, edit the selected
42 +the server-setting pages, such as Threads, Source control & issues and Worktrees, edit the selected
43 environments' defaults. Choosing a project edits its overrides on the selected
44 environments. Use **Use defaults** in a page to remove that page's project overrides.
45 Open **Settings → Projects** to rename the project across its selected
@@ -175,7 +175,7 @@ than** on the task.
175 ## Defaults and inheritance
176
177 Threads contains the model and workspace for new threads. Browser controls agent browser
178 -access. Source control contains automatic pull, the default pull request merge method and text
178 +access. Source control & issues contains automatic pull, the default pull request merge method and text
179 generation. The same rows edit environment defaults or project overrides depending on the
180 project crumb.
181
@@ -287,9 +287,9 @@ from the icon palette, derived from the saved project name. For example, `Nebula
287
288 ## Keep the default branch current
289
290 -In Source control, enable **Automatically pull** to keep the default-branch checkout up to date
290 +In Source control & issues, enable **Automatically pull** to keep the default-branch checkout up to date
291 with its configured upstream. Choose an environment to set the default or a project to override it.
292 -On mobile, use **Settings → Source control** to change selected environment defaults or project overrides.
292 +On mobile, use **Settings → Source control & issues** to change selected environment defaults or project overrides.
293
294 T3 Code only pulls when it can fast-forward and the checkout has no changed files, untracked files,
295 or local commits. It skips checkouts on another branch or without an upstream. If a checkout has
docs/user/source-control.md
+15 -12
@@ -23,7 +23,7 @@ setting in **Settings → Diffs**.
23 ## Connect an account
24
25 Install Git and configure authentication on the machine running your T3 Code server. For a remote
26 -environment, do this on the remote machine. After signing in, open **Settings → Source control**
26 +environment, do this on the remote machine. After signing in, open **Settings → Source control & issues**
27 and choose **Rescan**.
28
29 ### GitHub
@@ -31,7 +31,7 @@ and choose **Rescan**.
31 T3 Code talks to GitHub's API directly and only needs a token. Any of these works, in this
32 order of precedence:
33
34 -1. A token saved in **Settings → Source control → GitHub**. It is kept in the server's secret
34 +1. A token saved in **Settings → Source control & issues → GitHub**. It is kept in the server's secret
35 store, and works without the GitHub CLI.
36 2. `GH_TOKEN` (`GH_ENTERPRISE_TOKEN` with `GH_HOST` for GitHub Enterprise Server) in the
37 server's environment.
@@ -74,7 +74,7 @@ glab auth login
74
75 ### Bitbucket
76
77 -Open **Settings → Source control**, expand **Bitbucket**, and enter one of:
77 +Open **Settings → Source control & issues**, expand **Bitbucket**, and enter one of:
78
79 - **Access token**: a token created for one repository, project, or workspace. It can only reach
80 what it was created for.
@@ -120,7 +120,7 @@ bun install -g @gitcafe/cli
120 cafe auth login --host https://git.cafe/api
121 ```
122
123 -Alternatively, open **Settings → Source control**, expand **GitCafe**, and enter a token. It is
123 +Alternatively, open **Settings → Source control & issues**, expand **GitCafe**, and enter a token. It is
124 kept in the server's secret store, applies right away, and is used before `CAFE_TOKEN` and the
125 `cafe` login. Or set `CAFE_TOKEN` in the server's environment and restart it. Both tokens are only
126 sent to `git.cafe`; `CAFE_TOKEN` follows `CAFE_HOST` if you set it. Repositories on
@@ -157,7 +157,7 @@ first commit.
157 Use **Add Project** in the command palette (`Cmd/Ctrl+K`) to clone a repository. Choose a hosting
158 provider or paste a Git URL, then choose where to save it. Only GitHub is listed at first. To list
159 another provider here and in **Publish Repository**, turn on its switch under
160 -**Settings → Source control**. A branch or file page copied from GitHub,
160 +**Settings → Source control & issues**. A branch or file page copied from GitHub,
161 GitLab, GitCafe, Codeberg or Bitbucket also works: T3 Code clones that repository's default branch.
162 On other hosts, paste the repository's clone URL. The project opens right away while the
163 clone runs in the background: you can write your first prompt, and sending waits until the files
@@ -186,7 +186,7 @@ If its badge is missing because several remotes hold that branch, set the branch
186 the intended remote with `git branch --set-upstream-to=<remote>/<branch>`.
187
188 Choose how commit messages and pull request titles and descriptions are written in
189 -**Settings → Source control → Commits & pull requests**. **Repository conventions** uses the
189 +**Settings → Source control & issues → Commits & pull requests**. **Repository conventions** uses the
190 project's instructions and recent commit subjects. **Custom instructions** applies your own
191 instructions to commits and pull requests.
192
@@ -211,7 +211,7 @@ Previously loaded lists, review details, guides, and diff pages remain readable
211 without a connection, including after restarting the app. Saved content refreshes when the
212 environment reconnects; submitting changes requires a connection.
213
214 -Enable **Remove agent credits when merging** in Settings → Source control to remove recognized
214 +Enable **Remove agent credits when merging** in Settings → Source control & issues to remove recognized
215 agent co-author and generated-by lines from GitHub merge and squash commit messages. Human
216 co-authors stay credited. The setting is off by default and projects can override it. It also
217 applies to auto-merge, but not merge queues or native stack merges. Original commits keep their
@@ -246,7 +246,7 @@ declined pull request.
246
247 ### Review guides
248
249 -Review guides are in beta. Turn on **Review guides** in Settings → Source control to add the
249 +Review guides are in beta. Turn on **Review guides** in Settings → Source control & issues to add the
250 **Guide** tab to pull requests on that server. On mobile, move between stops with **Next**
251 and the back button; a stale guide offers a rewrite and hides excerpts that no longer match
252 the current change.
@@ -258,7 +258,7 @@ snapshots are grouped at the end, and every changed file appears somewhere on th
258 Conversations already resolved in review are left out. For a pull request in a stack, the guide
259 covers that layer only, and may point out what a lower layer introduced or what a higher one uses.
260
261 -Choose **Write guide** to have the review guide model from Settings → Source control read the
261 +Choose **Write guide** to have the review guide model from Settings → Source control & issues read the
262 change in a temporary checkout; without one set, the source control writer model is used. Nothing
263 in the checkout is changed, and a large pull request takes a few minutes; you can go elsewhere in
264 the app. On web, you are told when the guide is ready; on mobile, return to the guide to check
@@ -274,7 +274,7 @@ are on. **Finish review** on the last stop opens the review with everything you
274 Agents can write guides too: ask one to prepare guides for a set of pull requests, and it starts
275 them for you. Each is read through the project whose checkout has that repository.
276
277 -To shape guides to your taste, write **Review guide instructions** in Settings → Source control,
277 +To shape guides to your taste, write **Review guide instructions** in Settings → Source control & issues,
278 such as what to show first or what to skip; projects can override them. They change emphasis and
279 ordering, not the guide's layout or which files it covers.
280
@@ -295,9 +295,9 @@ and their marks follow the same rules as on web and desktop.
295 ## Troubleshooting
296
297 - **Not authenticated:** run the provider's login command on the server, then rescan. For Bitbucket,
298 - check the credentials saved in Settings → Source control, or confirm the running server received
298 + check the credentials saved in Settings → Source control & issues, or confirm the running server received
299 the environment variables.
300 -- **GitHub sign-in cannot be verified:** update GitHub CLI to at least 2.81.0, or save a token in Settings → Source control.
300 +- **GitHub sign-in cannot be verified:** update GitHub CLI to at least 2.81.0, or save a token in Settings → Source control & issues.
301 - **Push fails despite a connected account:** check the Git remote's credentials. SSH and HTTPS
302 remotes can require separate setup from the hosting provider's API access.
303 - **A review cannot load:** open it on the host website while resolving connectivity, permissions,
@@ -358,6 +358,9 @@ DevOps or Forgejo, grouped per tracker account. Open it from the sidebar's utili
358 (assigned, opened by you, mentioning you), and by tracker; the search box asks the tracker
359 itself where it can search. Press **Load more** at the end of a group to read further back.
360
361 +To list a Linear team's issues beside a project's, connect Linear with an API key under
362 +Settings → Source control & issues, then choose the team for that project there.
363 +
364 Select an issue to open it beside the list: description, comments, state changes, linked pull
365 requests, labels, assignees, and reactions. Linked pull requests open in the same panel. You can
366 comment, edit the title and description, change labels and assignees, react, and close or
docs/user/text-generation.md
+2 -2
@@ -2,7 +2,7 @@
2
3 T3 Code writes some text for you: thread titles, commit messages, pull request titles and
4 descriptions, branch names, and voice transcript cleanup. Pick the model for this in
5 -**Settings → Threads → Text generation model**. **Settings → Source control** and
5 +**Settings → Threads → Text generation model**. **Settings → Source control & issues** and
6 **Settings → Voice** can each pick a different one.
7
8 By default, a coding agent such as Codex or Claude writes this text, starting a session for each
@@ -37,6 +37,6 @@ model.
37
38 Review guides read the checkout over many steps, so they always use a coding agent. If your source
39 control writer model is a text generator, review guides use Codex or Claude instead, and fail if
40 -neither is set up. To choose which, pick one in **Settings → Source control → Review guide model**.
40 +neither is set up. To choose which, pick one in **Settings → Source control & issues → Review guide model**.
41
42 A [managed policy](./managed-policy.md) that limits providers also turns off text generators.
knip.jsonc
+5
@@ -168,6 +168,11 @@
168 "entry": ["test/fixtures/*.ts"],
169 "ignoreIssues": { "src/_generated/**": ["exports", "types"] },
170 },
171 + "packages/issue-tracker-linear": {
172 + // graphqlgen reads its config; the generated operations export every selection's class.
173 + "entry": ["graphql.config.ts"],
174 + "ignoreIssues": { "**/*.graphql.ts": ["exports", "types", "namespaceMembers"] },
175 + },
176 "packages/source-control-github": {
177 // graphqlgen reads its config; the generated operations export every selection's class.
178 "entry": ["graphql.config.ts", "scripts/measure-pr-preview.ts"],
packages/client-runtime/package.json
+4
@@ -335,6 +335,10 @@
335 "types": "./src/state/shell.ts",
336 "default": "./src/state/shell.ts"
337 },
338 + "./state/issue-trackers": {
339 + "types": "./src/state/issueTrackers.ts",
340 + "default": "./src/state/issueTrackers.ts"
341 + },
342 "./state/source-control": {
343 "types": "./src/state/sourceControl.ts",
344 "default": "./src/state/sourceControl.ts"
packages/client-runtime/src/state/commandPermissions.test.ts
+25
@@ -196,6 +196,31 @@ describe("command permissions", () => {
196 }),
197 );
198
199 + it.effect("requires the destination settings grant to connect or bind an issue tracker", () =>
200 + Effect.scoped(
201 + Effect.gen(function* () {
202 + const registry = yield* setup;
203 + const connect = createCommandPermissions(runtime, WS_METHODS.issueTrackersConnect);
204 + const bind = createCommandPermissions(runtime, WS_METHODS.issueTrackersBindProject);
205 + registry.set(sessions(env), AsyncResult.success(grant(true)));
206 + expect(registry.get(connect.permissionAtom(env))).toBe(false);
207 + expect(registry.get(bind.permissionAtom(env))).toBe(false);
208 + registry.set(
209 + sessions(env),
210 + AsyncResult.success({
211 + ...grant(false),
212 + scopes: [AuthSettingsWriteScope],
213 + permissions: [AuthSettingsWriteScope],
214 + }),
215 + );
216 + expect(registry.get(connect.permissionAtom(env))).toBe(true);
217 + expect(registry.get(bind.permissionAtom(env))).toBe(true);
218 + yield* connect.authorize(registry, env);
219 + yield* bind.authorize(registry, env);
220 + }),
221 + ),
222 + );
223 +
224 it.effect.each([WS_METHODS.scheduledTasksDelete, ORCHESTRATION_V2_WS_METHODS.stopWorkflow])(
225 "uses the target grant for both availability and execution of %s",
226 (method) =>
packages/client-runtime/src/state/issueTrackers.ts new
+79
@@ -0,0 +1,79 @@
1 +import {
2 + WS_METHODS,
3 + type IssueTrackerConnection,
4 + type IssueTrackerConnectionList,
5 +} from "@t3tools/contracts";
6 +import * as Effect from "effect/Effect";
7 +import { Atom } from "effect/reactivity";
8 +
9 +import {
10 + createAtomCommandScheduler,
11 + createEnvironmentRpcCommand,
12 + createEnvironmentRpcQueryAtomFamily,
13 +} from "./runtime.ts";
14 +import type { EnvironmentRegistry } from "../connection/registry.ts";
15 +import * as Persistence from "../platform/persistence.ts";
16 +
17 +/**
18 + * Standalone issue trackers (Linear, Jira) per environment: which are connected, as whom, which
19 + * scopes they reach, and which project is bound to which scope. One query carries all of it, and
20 + * every mutation refreshes that query, so the settings page never shows a stale status.
21 + */
22 +export function createIssueTrackerEnvironmentAtoms<R, E>(
23 + runtime: Atom.AtomRuntime<EnvironmentRegistry | Persistence.EnvironmentCacheStore | R, E>,
24 +) {
25 + const commandScheduler = createAtomCommandScheduler();
26 + const connections = createEnvironmentRpcQueryAtomFamily(runtime, {
27 + label: "environment-data:issue-trackers:connections",
28 + tag: WS_METHODS.issueTrackersList,
29 + });
30 + const refresh = (environmentId: Parameters<typeof connections>[0]["environmentId"]) =>
31 + connections({ environmentId, input: {} });
32 + // Connect, disconnect and bind all edit one environment's tracker state; serialized so a
33 + // disconnect cannot race the bind of a project to the tracker being removed.
34 + const serialPerEnvironment = {
35 + mode: "serial" as const,
36 + key: ({ environmentId }: { readonly environmentId: string }) => environmentId,
37 + };
38 + return {
39 + connections,
40 + /** Saves a credential the tracker accepted, or removes the stored one with a null token. */
41 + connect: createEnvironmentRpcCommand(runtime, {
42 + label: "environment-data:issue-trackers:connect",
43 + tag: WS_METHODS.issueTrackersConnect,
44 + scheduler: commandScheduler,
45 + concurrency: serialPerEnvironment,
46 + onSettled: (target, registry) =>
47 + Effect.sync(() => registry.refresh(refresh(target.environmentId))),
48 + }),
49 + bindProject: createEnvironmentRpcCommand(runtime, {
50 + label: "environment-data:issue-trackers:bind-project",
51 + tag: WS_METHODS.issueTrackersBindProject,
52 + scheduler: commandScheduler,
53 + concurrency: serialPerEnvironment,
54 + onSettled: (target, registry) =>
55 + Effect.sync(() => registry.refresh(refresh(target.environmentId))),
56 + }),
57 + };
58 +}
59 +
60 +/**
61 + * The line under a tracker's name. A connected tracker lists nothing until a project is linked
62 + * to one of its scopes, so the line says how many are, and what to do when none is.
63 + */
64 +export function issueTrackerSummary(
65 + tracker: IssueTrackerConnection,
66 + bindings: IssueTrackerConnectionList["bindings"],
67 +): string {
68 + if (!tracker.connected)
69 + return `Not connected. Add a ${tracker.credential.label.toLowerCase()} to list its issues.`;
70 + if (tracker.account === null) return tracker.detail ?? "The saved credential was rejected.";
71 + const linked = Object.values(bindings).filter(
72 + (binding) => binding.tracker === tracker.tracker,
73 + ).length;
74 + const projects =
75 + linked === 0
76 + ? `no projects linked yet. Pick a ${tracker.scopeNoun} for a project to list its issues.`
77 + : `${linked} ${linked === 1 ? "project" : "projects"} linked`;
78 + return `Connected as ${tracker.account} · ${projects}`;
79 +}
packages/contracts/src/clientRpcPermissions.ts
+3
@@ -45,6 +45,9 @@ export const CLIENT_GUARDED_RPC_SCOPES = {
45 [WS_METHODS.issuesUpdate]: AuthSourceControlWriteScope,
46 [WS_METHODS.issuesSetState]: AuthSourceControlWriteScope,
47 [WS_METHODS.issuesReact]: AuthSourceControlWriteScope,
48 + // A tracker credential and a project's binding are settings, saved under the same grant.
49 + [WS_METHODS.issueTrackersConnect]: AuthSettingsWriteScope,
50 + [WS_METHODS.issueTrackersBindProject]: AuthSettingsWriteScope,
51 // Writing a guide runs a model on this environment's providers, which reading one does not.
52 [WS_METHODS.pullRequestsGenerateReviewGuide]: AuthOrchestrationOperateScope,
53 [WS_METHODS.projectsCreateFromThread]: AuthOrchestrationOperateScope,
packages/contracts/src/issue.ts
+106
@@ -377,8 +377,19 @@ export const IssueTemplate = Schema.Struct({
377 });
378 export type IssueTemplate = typeof IssueTemplate.Type;
379
380 +/** A starting point only the tracker's own site can render: Linear's form and rich templates. */
381 +export const IssueExternalTemplate = Schema.Struct({
382 + name: TrimmedNonEmptyString,
383 + about: Schema.String,
384 + /** Opens the exact template on the tracker, ready to fill in. */
385 + url: TrimmedNonEmptyString,
386 +});
387 +export type IssueExternalTemplate = typeof IssueExternalTemplate.Type;
388 +
389 export const IssueTemplateList = Schema.Struct({
390 templates: Schema.Array(IssueTemplate),
391 + /** Absent from a tracker whose every template is body-shaped. */
392 + externalTemplates: Schema.optional(Schema.Array(IssueExternalTemplate)),
393 /** False where the scope's config forbids an issue filed from nothing. */
394 blankIssuesEnabled: Schema.Boolean,
395 });
@@ -501,3 +512,98 @@ export function threadIssueKeyOf(key: ThreadIssueKey): string {
512 export function threadIssueKeysEqual(left: ThreadIssueKey, right: ThreadIssueKey): boolean {
513 return threadIssueKeyOf(left) === threadIssueKeyOf(right);
514 }
515 +
516 +/**
517 + * A tracker that is not a git host: it is reached with its own credential rather than a
518 + * checkout's, and a project opts into it by binding one of the tracker's scopes. Everything a
519 + * client needs to draw the connect flow for any such tracker without knowing which one it is.
520 + */
521 +export const StandaloneIssueTrackerDescriptor = Schema.Struct({
522 + tracker: IssueTrackerKind,
523 + displayName: TrimmedNonEmptyString,
524 + /** Where the tracker is served from; what `IssueRef.host` carries for its issues. */
525 + host: TrimmedNonEmptyString,
526 + /** What the tracker calls its container, in the singular: "team" on Linear, "project" on Jira. */
527 + scopeNoun: TrimmedNonEmptyString,
528 + credential: Schema.Struct({
529 + /** What the tracker calls the credential: "Personal API key", "API token". */
530 + label: TrimmedNonEmptyString,
531 + /** Where to mint one, or null when the tracker has no stable page for it. */
532 + helpUrl: Schema.NullOr(TrimmedNonEmptyString),
533 + }),
534 +});
535 +export type StandaloneIssueTrackerDescriptor = typeof StandaloneIssueTrackerDescriptor.Type;
536 +
537 +/** Which standalone tracker scope a project's issues come from, beside its git host's own. */
538 +export const IssueTrackerProjectBinding = Schema.Struct({
539 + tracker: IssueTrackerKind,
540 + scope: TrimmedNonEmptyString,
541 +});
542 +export type IssueTrackerProjectBinding = typeof IssueTrackerProjectBinding.Type;
543 +
544 +/** One container the connected account can read, offered when a project is bound. */
545 +export const IssueTrackerScope = Schema.Struct({
546 + key: TrimmedNonEmptyString,
547 + name: TrimmedNonEmptyString,
548 +});
549 +export type IssueTrackerScope = typeof IssueTrackerScope.Type;
550 +
551 +/**
552 + * A standalone tracker as the settings page sees it: the descriptor, whether a credential is
553 + * stored and still works, and the scopes it can reach. `scopes` is empty until connected.
554 + */
555 +export const IssueTrackerConnection = Schema.Struct({
556 + ...StandaloneIssueTrackerDescriptor.fields,
557 + /** A credential is stored. It may still be rejected, which `account` being null reports. */
558 + connected: Schema.Boolean,
559 + /** Who the credential signs in as, or null when there is none or it was refused. */
560 + account: Schema.NullOr(TrimmedNonEmptyString),
561 + /** Why a stored credential did not work, when it did not. */
562 + detail: Schema.NullOr(TrimmedNonEmptyString),
563 + scopes: Schema.Array(IssueTrackerScope),
564 +});
565 +export type IssueTrackerConnection = typeof IssueTrackerConnection.Type;
566 +
567 +export const IssueTrackerConnectionList = Schema.Struct({
568 + trackers: Schema.Array(IssueTrackerConnection),
569 + /** Which standalone tracker scope each bound project reads; a project absent here reads none. */
570 + bindings: Schema.Record(ProjectId, IssueTrackerProjectBinding),
571 +});
572 +export type IssueTrackerConnectionList = typeof IssueTrackerConnectionList.Type;
573 +
574 +/** A credential for one standalone tracker; `null` disconnects it and unbinds its projects. */
575 +export const IssueTrackerConnectInput = Schema.Struct({
576 + tracker: IssueTrackerKind,
577 + token: Schema.NullOr(TrimmedNonEmptyString.check(Schema.isMaxLength(4_096))),
578 +});
579 +export type IssueTrackerConnectInput = typeof IssueTrackerConnectInput.Type;
580 +
581 +export const IssueTrackerBindProjectInput = Schema.Struct({
582 + projectId: ProjectId,
583 + /** Null unbinds. */
584 + binding: Schema.NullOr(IssueTrackerProjectBinding),
585 +});
586 +export type IssueTrackerBindProjectInput = typeof IssueTrackerBindProjectInput.Type;
587 +
588 +/**
589 + * A standalone tracker the connect flow could not reach or that refused the credential, or a
590 + * binding that could not be saved.
591 + */
592 +export class IssueTrackerConnectionError extends Schema.TaggedError<IssueTrackerConnectionError>()(
593 + "IssueTrackerConnectionError",
594 + {
595 + tracker: IssueTrackerKind,
596 + reason: Schema.Literals(["unknown-tracker", "rejected", "failed"]),
597 + detail: TrimmedNonEmptyString,
598 + cause: Schema.optional(Schema.Defect()),
599 + },
600 + { httpApiStatus: 502 },
601 +) {
602 + [HttpServerRespondable.symbol]() {
603 + return HttpServerResponse.schemaJson(IssueTrackerConnectionError)(this, { status: 502 });
604 + }
605 +
606 + override get message(): string {
607 + return `${this.tracker} connection failed: ${this.detail}`;
608 + }
609 +}
packages/contracts/src/rpc.ts
+39
@@ -185,6 +185,11 @@ import {
185 IssueScopeRef,
186 IssueSetStateInput,
187 IssueTemplateList,
188 + IssueTrackerBindProjectInput,
189 + IssueTrackerConnectInput,
190 + IssueTrackerConnection,
191 + IssueTrackerConnectionError,
192 + IssueTrackerConnectionList,
193 IssueUnavailableError,
194 IssueUpdateInput,
195 } from "./issue.ts";
@@ -632,6 +637,9 @@ export const WS_METHODS = {
637 issuesUpdate: "issues.update",
638 issuesSetState: "issues.setState",
639 issuesReact: "issues.react",
640 + issueTrackersList: "issueTrackers.list",
641 + issueTrackersConnect: "issueTrackers.connect",
642 + issueTrackersBindProject: "issueTrackers.bindProject",
643
644 sourceControlLookupRepository: "sourceControl.lookupRepository",
645 sourceControlCloneRepository: "sourceControl.cloneRepository",
@@ -1382,6 +1390,34 @@ const WsIssuesReactRpc = Rpc.make(WS_METHODS.issuesReact, {
1390 error: IssueRpcError,
1391 });
1392
1393 +const IssueTrackerRpcError = Schema.Union([
1394 + IssueTrackerConnectionError,
1395 + EnvironmentAuthorizationError,
1396 +]);
1397 +
1398 +/** Every standalone tracker this server ships, each with its connection probed afresh. */
1399 +const WsIssueTrackersListRpc = Rpc.make(WS_METHODS.issueTrackersList, {
1400 + payload: Schema.Struct({}),
1401 + success: IssueTrackerConnectionList,
1402 + error: IssueTrackerRpcError,
1403 +});
1404 +
1405 +/**
1406 + * Verifies the credential against the tracker before storing it; the result is the new status.
1407 + * A null token disconnects, which also unbinds every project that pointed at the tracker.
1408 + */
1409 +const WsIssueTrackersConnectRpc = Rpc.make(WS_METHODS.issueTrackersConnect, {
1410 + payload: IssueTrackerConnectInput,
1411 + success: IssueTrackerConnection,
1412 + error: IssueTrackerRpcError,
1413 +});
1414 +
1415 +const WsIssueTrackersBindProjectRpc = Rpc.make(WS_METHODS.issueTrackersBindProject, {
1416 + payload: IssueTrackerBindProjectInput,
1417 + success: Schema.Void,
1418 + error: IssueTrackerRpcError,
1419 +});
1420 +
1421 const WsSourceControlLookupRepositoryRpc = Rpc.make(WS_METHODS.sourceControlLookupRepository, {
1422 payload: SourceControlRepositoryLookupInput,
1423 success: SourceControlRepositoryInfo,
@@ -2220,6 +2256,9 @@ export const WsRpcGroup = RpcGroup.make(
2256 WsIssuesUpdateRpc,
2257 WsIssuesSetStateRpc,
2258 WsIssuesReactRpc,
2259 + WsIssueTrackersListRpc,
2260 + WsIssueTrackersConnectRpc,
2261 + WsIssueTrackersBindProjectRpc,
2262 WsGuestShareCreateRpc,
2263 WsServerProbeRpc,
2264 WsServerGetConfigRpc,
packages/issue-tracker-linear/graphql.config.ts new
+21
@@ -0,0 +1,21 @@
1 +import { defineConfig } from "@effect/graphql-generator/Config";
2 +
3 +// `schema/linear.graphql` is the public schema Linear publishes with its SDK
4 +// (https://github.com/linear/linear/blob/master/packages/sdk/src/schema.graphql).
5 +export default defineConfig({
6 + schema: "./schema/linear.graphql",
7 + documents: ["src/**/*.graphql"],
8 + scalars: {
9 + // Kept as Linear sends it: the tracker passes these on as ISO strings.
10 + DateTime: "effect/Schema#String",
11 + // An attachment's metadata arrives as an object; its shape depends on the integration.
12 + JSONObject: "effect/Schema#Json",
13 + // Documented as stringified JSON, but a template's data has also arrived as an object.
14 + JSON: "effect/Schema#Json",
15 + // Filters compare dates with these; the tracker sends none of them.
16 + DateTimeOrDuration: "effect/Schema#String",
17 + Duration: "effect/Schema#String",
18 + TimelessDate: "effect/Schema#String",
19 + TimelessDateOrDuration: "effect/Schema#String",
20 + },
21 +});
packages/issue-tracker-linear/package.json new
+27
@@ -0,0 +1,27 @@
1 +{
2 + "name": "@t3tools/issue-tracker-linear",
3 + "private": true,
4 + "type": "module",
5 + "exports": {
6 + "./server/driver": {
7 + "types": "./src/server/driver.ts",
8 + "import": "./src/server/driver.ts"
9 + }
10 + },
11 + "scripts": {
12 + "typecheck": "effect-tsgo tsrs --noEmit",
13 + "test": "vp test run --config ../../vite.config.ts --dir .",
14 + "generate": "graphqlgen"
15 + },
16 + "dependencies": {
17 + "@t3tools/contracts": "workspace:*",
18 + "@t3tools/source-control-core": "workspace:*",
19 + "effect": "catalog:"
20 + },
21 + "devDependencies": {
22 + "@effect/graphql-generator": "catalog:",
23 + "@effect/vitest": "catalog:",
24 + "@types/node": "catalog:",
25 + "vite-plus": "catalog:"
26 + }
27 +}
packages/issue-tracker-linear/schema/linear.graphql new
+53680
@@ -0,0 +1,53680 @@
1 +schema {
2 + query: Query
3 + mutation: Mutation
4 + subscription: Subscription
5 +}
6 +
7 +"Indicates exactly one field must be supplied and this field must not be `null`."
8 +directive @oneOf on INPUT_OBJECT
9 +
10 +"""
11 +A release returned using a release pipeline access key.
12 +"""
13 +type AccessKeyRelease {
14 + """
15 + The time at which the release was archived. Null if the release has not been archived.
16 + """
17 + archivedAt: DateTime
18 + """
19 + The Git commit SHA associated with the release.
20 + """
21 + commitSha: String
22 + """
23 + The time at which the release was completed. Null if the release has not been completed.
24 + """
25 + completedAt: DateTime
26 + """
27 + The time at which the release was created.
28 + """
29 + createdAt: DateTime!
30 + """
31 + The unique identifier of the release.
32 + """
33 + id: ID!
34 + """
35 + The name of the release.
36 + """
37 + name: String!
38 + """
39 + The current stage of the release.
40 + """
41 + stage: AccessKeyReleaseStage!
42 + """
43 + The URL to the release page in the Linear app.
44 + """
45 + url: String!
46 + """
47 + The version identifier for this release. Null if no version has been assigned.
48 + """
49 + version: String
50 +}
51 +
52 +"""
53 +The result of a release mutation using a release pipeline access key.
54 +"""
55 +type AccessKeyReleasePayload {
56 + """
57 + The identifier of the last sync operation.
58 + """
59 + lastSyncId: Float!
60 + """
61 + The release that was created or updated.
62 + """
63 + release: AccessKeyRelease!
64 + """
65 + Whether the operation was successful.
66 + """
67 + success: Boolean!
68 +}
69 +
70 +"""
71 +A release pipeline returned using a release pipeline access key.
72 +"""
73 +type AccessKeyReleasePipeline {
74 + """
75 + The unique identifier of the release pipeline.
76 + """
77 + id: ID!
78 + """
79 + Glob patterns used to filter commits by changed file path. An empty array means all commits are included.
80 + """
81 + includePathPatterns: [String!]!
82 +}
83 +
84 +"""
85 +A release stage returned using a release pipeline access key.
86 +"""
87 +type AccessKeyReleaseStage {
88 + """
89 + The name of the release stage.
90 + """
91 + name: String!
92 + """
93 + The type of the release stage.
94 + """
95 + type: ReleaseStageType!
96 +}
97 +
98 +"""
99 +Activity collection filtering options.
100 +"""
101 +input ActivityCollectionFilter {
102 + """
103 + Compound filters, all of which need to be matched by the activity.
104 + """
105 + and: [ActivityCollectionFilter!]
106 + """
107 + Comparator for the created at date.
108 + """
109 + createdAt: DateComparator
110 + """
111 + Filters that needs to be matched by all activities.
112 + """
113 + every: ActivityFilter
114 + """
115 + Comparator for the identifier.
116 + """
117 + id: IDComparator
118 + """
119 + Comparator for the collection length.
120 + """
121 + length: NumberComparator
122 + """
123 + Compound filters, one of which need to be matched by the activity.
124 + """
125 + or: [ActivityCollectionFilter!]
126 + """
127 + Filters that needs to be matched by some activities.
128 + """
129 + some: ActivityFilter
130 + """
131 + Comparator for the updated at date.
132 + """
133 + updatedAt: DateComparator
134 + """
135 + Filters that the activity's user must satisfy.
136 + """
137 + user: UserFilter
138 +}
139 +
140 +"""
141 +Activity filtering options.
142 +"""
143 +input ActivityFilter {
144 + """
145 + Compound filters, all of which need to be matched by the activity.
146 + """
147 + and: [ActivityFilter!]
148 + """
149 + Comparator for the created at date.
150 + """
151 + createdAt: DateComparator
152 + """
153 + Comparator for the identifier.
154 + """
155 + id: IDComparator
156 + """
157 + Compound filters, one of which need to be matched by the activity.
158 + """
159 + or: [ActivityFilter!]
160 + """
161 + Comparator for the updated at date.
162 + """
163 + updatedAt: DateComparator
164 + """
165 + Filters that the activity's user must satisfy.
166 + """
167 + user: UserFilter
168 +}
169 +
170 +"""
171 +A bot actor representing a non-human entity that performed an action, such as an integration (GitHub, Slack, Zendesk), an AI assistant, or an automated workflow. Bot actors are displayed in activity feeds and history to indicate when changes were made by applications rather than users.
172 +"""
173 +type ActorBot {
174 + """
175 + A URL pointing to the avatar image representing this bot, typically the integration's logo or icon.
176 + """
177 + avatarUrl: String
178 + """
179 + A unique identifier for the bot actor.
180 + """
181 + id: ID
182 + """
183 + The display name of the bot.
184 + """
185 + name: String
186 + """
187 + A more specific classification within the bot type, providing additional context about the integration or application variant.
188 + """
189 + subType: String
190 + """
191 + The source type of the bot, identifying the application or integration (e.g., 'github', 'slack', 'workflow', 'ai').
192 + """
193 + type: String!
194 + """
195 + The display name of the external user on behalf of whom the bot acted. Shown when an integration action was triggered by a specific person in the external system.
196 + """
197 + userDisplayName: String
198 +}
199 +
200 +"""
201 +An activity performed by or directed at an AI coding agent during a session. Activities represent the observable steps of an agent's work, including thoughts, actions (tool calls), responses, prompts from users, errors, and elicitation requests. Each activity belongs to an agent session and is associated with the user who initiated it.
202 +"""
203 +type AgentActivity implements Node {
204 + """
205 + The agent session this activity belongs to.
206 + """
207 + agentSession: AgentSession!
208 + """
209 + The time at which the entity was archived. Null if the entity has not been archived.
210 + """
211 + archivedAt: DateTime
212 + """
213 + The content of the activity, which varies by type (thought, action, response, prompt, error, or elicitation).
214 + """
215 + content: AgentActivityContent!
216 + """
217 + [Internal] Metadata about user-provided contextual information for this agent activity.
218 + """
219 + contextualMetadata: JSON
220 + """
221 + The time at which the entity was created.
222 + """
223 + createdAt: DateTime!
224 + """
225 + Whether the activity is ephemeral, and should disappear after the next agent activity.
226 + """
227 + ephemeral: Boolean!
228 + """
229 + [Internal] The reason this activity was persisted without being sent to the agent runtime.
230 + """
231 + executionSkippedReason: AgentActivityExecutionSkippedReason
232 + """
233 + The unique identifier of the entity.
234 + """
235 + id: ID!
236 + """
237 + [Internal] What the turn pushed to its branch, captured in the sandbox at push time. Only set on the activity for a successful push.
238 + """
239 + pushSummary: AgentActivityPushSummary
240 + """
241 + [Internal] Whether this activity is queued for later processing. Queued activities are not sent to the agent until the session reaches a terminal state.
242 + """
243 + queued: Boolean!
244 + """
245 + [Internal] The time at which the prompt actually entered the conversation. Only set when the prompt did not enter the conversation immediately (i.e., it was queued and later dequeued). Null for prompts that were sent directly and for non-prompt activities.
246 + """
247 + sentAt: DateTime
248 + """
249 + An optional modifier that provides additional instructions on how the activity should be interpreted.
250 + """
251 + signal: AgentActivitySignal
252 + """
253 + Metadata about this agent activity's signal.
254 + """
255 + signalMetadata: JSON
256 + """
257 + The source comment this activity is linked to. Null if the activity was not triggered by a comment.
258 + """
259 + sourceComment: Comment
260 + """
261 + Metadata about the external source that created this agent activity.
262 + """
263 + sourceMetadata: JSON
264 + """
265 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
266 + been updated after creation.
267 + """
268 + updatedAt: DateTime!
269 + """
270 + The user who created this agent activity.
271 + """
272 + user: User!
273 +}
274 +
275 +"""
276 +Content for an action activity (tool call or action).
277 +"""
278 +type AgentActivityActionContent {
279 + """
280 + The action being performed.
281 + """
282 + action: String!
283 + """
284 + The parameters for the action, e.g. a file path, a keyword, etc.
285 + """
286 + parameter: String!
287 + """
288 + The result of the action in Markdown format.
289 + """
290 + result: String
291 + """
292 + [Internal] The result content as ProseMirror document.
293 + """
294 + resultData: JSONObject
295 + """
296 + The type of activity.
297 + """
298 + type: AgentActivityType!
299 +}
300 +
301 +type AgentActivityConnection {
302 + edges: [AgentActivityEdge!]!
303 + nodes: [AgentActivity!]!
304 + pageInfo: PageInfo!
305 +}
306 +
307 +"""
308 +Content for different types of agent activities.
309 +"""
310 +union AgentActivityContent =
311 + | AgentActivityActionContent
312 + | AgentActivityElicitationContent
313 + | AgentActivityErrorContent
314 + | AgentActivityPromptContent
315 + | AgentActivityResponseContent
316 + | AgentActivityThoughtContent
317 +
318 +"""
319 +Input for creating an agent activity.
320 +"""
321 +input AgentActivityCreateInput {
322 + """
323 + The agent session this activity belongs to.
324 + """
325 + agentSessionId: String!
326 + """
327 + The content payload of the agent activity. This object is not strictly typed.
328 + See https://linear.app/developers/agent-interaction#activity-content-payload for typing details.
329 + """
330 + content: JSONObject!
331 + """
332 + [Internal] Metadata about user-provided contextual information for this agent activity.
333 + """
334 + contextualMetadata: JSONObject
335 + """
336 + Whether the activity is ephemeral, and should disappear after the next activity. Defaults to false.
337 + """
338 + ephemeral: Boolean
339 + """
340 + The identifier in UUID v4 format. If none is provided, the backend will generate one.
341 + """
342 + id: String
343 + """
344 + An optional modifier that provides additional instructions on how the activity should be interpreted.
345 + """
346 + signal: AgentActivitySignal
347 + """
348 + Metadata about this agent activity's signal.
349 + """
350 + signalMetadata: JSONObject
351 +}
352 +
353 +"""
354 +[Internal] Input for creating prompt-type agent activities (created by users).
355 +"""
356 +input AgentActivityCreatePromptInput {
357 + """
358 + The agent session this activity belongs to.
359 + """
360 + agentSessionId: String!
361 + """
362 + The content payload of the prompt agent activity.
363 + """
364 + content: AgentActivityPromptCreateInputContent!
365 + """
366 + [Internal] Metadata about user-provided contextual information for this agent activity.
367 + """
368 + contextualMetadata: JSONObject
369 + """
370 + The identifier in UUID v4 format. If none is provided, the backend will generate one.
371 + """
372 + id: String
373 + """
374 + [Internal] If true, the activity is queued and will be sent to the agent when it finishes its current task.
375 + """
376 + queued: Boolean
377 + """
378 + An optional modifier that provides additional instructions on how the activity should be interpreted.
379 + """
380 + signal: AgentActivitySignal
381 + """
382 + Metadata about this agent activity's signal.
383 + """
384 + signalMetadata: JSONObject
385 + """
386 + The comment that contains the content of this activity.
387 + """
388 + sourceCommentId: String
389 +}
390 +
391 +type AgentActivityEdge {
392 + """
393 + Used in `before` and `after` args
394 + """
395 + cursor: String!
396 + node: AgentActivity!
397 +}
398 +
399 +"""
400 +Content for an elicitation activity.
401 +"""
402 +type AgentActivityElicitationContent {
403 + """
404 + The elicitation message in Markdown format.
405 + """
406 + body: String!
407 + """
408 + [Internal] The elicitation content as ProseMirror document.
409 + """
410 + bodyData: JSONObject!
411 + """
412 + The type of activity.
413 + """
414 + type: AgentActivityType!
415 +}
416 +
417 +"""
418 +Content for an error activity.
419 +"""
420 +type AgentActivityErrorContent {
421 + """
422 + The error message in Markdown format.
423 + """
424 + body: String!
425 + """
426 + [Internal] The error content as ProseMirror document.
427 + """
428 + bodyData: JSONObject!
429 + """
430 + A stable reason code for specialized error handling.
431 + """
432 + reasonCode: String
433 + """
434 + The type of activity.
435 + """
436 + type: AgentActivityType!
437 +}
438 +
439 +"""
440 +The reason an agent activity was persisted without being sent to the agent runtime.
441 +"""
442 +enum AgentActivityExecutionSkippedReason {
443 + permissionDenied
444 + quotaExceeded
445 +}
446 +
447 +"""
448 +Agent activity filtering options.
449 +"""
450 +input AgentActivityFilter {
451 + """
452 + Comparator for the agent session ID.
453 + """
454 + agentSessionId: StringComparator
455 + """
456 + Compound filters, all of which need to be matched by the agent activity.
457 + """
458 + and: [AgentActivityFilter!]
459 + """
460 + Comparator for the created at date.
461 + """
462 + createdAt: DateComparator
463 + """
464 + Comparator for the identifier.
465 + """
466 + id: IDComparator
467 + """
468 + Compound filters, one of which need to be matched by the agent activity.
469 + """
470 + or: [AgentActivityFilter!]
471 + """
472 + Filters that the source comment must satisfy.
473 + """
474 + sourceComment: NullableCommentFilter
475 + """
476 + Comparator for the agent activity's content type.
477 + """
478 + type: StringComparator
479 + """
480 + Comparator for the updated at date.
481 + """
482 + updatedAt: DateComparator
483 +}
484 +
485 +"""
486 +The result of an agent activity mutation.
487 +"""
488 +type AgentActivityPayload {
489 + """
490 + The agent activity that was created or updated.
491 + """
492 + agentActivity: AgentActivity!
493 + """
494 + The identifier of the last sync operation.
495 + """
496 + lastSyncId: Float!
497 + """
498 + Whether the operation was successful.
499 + """
500 + success: Boolean!
501 +}
502 +
503 +"""
504 +Content for a prompt activity.
505 +"""
506 +type AgentActivityPromptContent {
507 + """
508 + A message requesting additional information or action from user.
509 + """
510 + body: String!
511 + """
512 + [Internal] The prompt content as ProseMirror document.
513 + """
514 + bodyData: JSONObject!
515 + """
516 + A short title capturing the intent of the prompt.
517 + """
518 + title: String
519 + """
520 + The type of activity.
521 + """
522 + type: AgentActivityType!
523 +}
524 +
525 +"""
526 +[Internal] Input for creating prompt-type agent activities (created by users).
527 +"""
528 +input AgentActivityPromptCreateInputContent {
529 + """
530 + A message requesting additional information or action from user in markdown format.
531 + """
532 + body: String
533 + """
534 + [Internal] The prompt content as a ProseMirror document.
535 + """
536 + bodyData: JSON
537 + """
538 + The type of activity.
539 + """
540 + type: AgentActivityType! = prompt
541 +}
542 +
543 +"""
544 +[Internal] Diff stats for a single commit a coding agent turn pushed, measured in the sandbox at push time.
545 +"""
546 +type AgentActivityPushCommit {
547 + """
548 + The number of lines the commit added across the files it touched.
549 + """
550 + additions: Int!
551 + """
552 + The number of files the commit changed.
553 + """
554 + changedFiles: Int!
555 + """
556 + The number of lines the commit removed across the files it touched.
557 + """
558 + deletions: Int!
559 + """
560 + The commit sha.
561 + """
562 + sha: String!
563 +}
564 +
565 +"""
566 +[Internal] What a coding agent turn pushed to its branch, measured in the sandbox at push time. The range is cumulative within a turn, so a turn that pushes several times reports every commit each time — consumers use the last summary in a turn rather than combining across pushes.
567 +"""
568 +type AgentActivityPushSummary {
569 + """
570 + Shas of the turn's commits beyond the detailed cap, newest first. Stats aren't captured for these.
571 + """
572 + additionalCommitShas: [String!]!
573 + """
574 + The commit the turn started from — the sandbox HEAD when the prompt began.
575 + """
576 + baseSha: String!
577 + """
578 + The number of non-merge commits the turn added. Equals the length of commits plus additionalCommitShas.
579 + """
580 + commitCount: Int!
581 + """
582 + The turn's non-merge commits with stats, newest first. Capped, so it may hold fewer commits than commitCount reports.
583 + """
584 + commits: [AgentActivityPushCommit!]!
585 + """
586 + The commit that was pushed.
587 + """
588 + headSha: String!
589 +}
590 +
591 +"""
592 +Content for a response activity.
593 +"""
594 +type AgentActivityResponseContent {
595 + """
596 + The response content in Markdown format.
597 + """
598 + body: String!
599 + """
600 + [Internal] The response content as ProseMirror document.
601 + """
602 + bodyData: JSONObject!
603 + """
604 + The type of activity.
605 + """
606 + type: AgentActivityType!
607 +}
608 +
609 +"""
610 +A modifier that provides additional instructions on how the activity should be interpreted.
611 +"""
612 +enum AgentActivitySignal {
613 + auth
614 + continue
615 + select
616 + stop
617 +}
618 +
619 +"""
620 +Content for a thought activity.
621 +"""
622 +type AgentActivityThoughtContent {
623 + """
624 + The thought content in Markdown format.
625 + """
626 + body: String!
627 + """
628 + [Internal] The thought content as ProseMirror document.
629 + """
630 + bodyData: JSONObject!
631 + """
632 + The type of activity.
633 + """
634 + type: AgentActivityType!
635 +}
636 +
637 +"""
638 +The type of an agent activity.
639 +"""
640 +enum AgentActivityType {
641 + action
642 + elicitation
643 + error
644 + prompt
645 + response
646 + thought
647 +}
648 +
649 +"""
650 +Payload for an agent activity webhook.
651 +"""
652 +type AgentActivityWebhookPayload {
653 + """
654 + The ID of the agent session that this activity belongs to.
655 + """
656 + agentSessionId: String!
657 + """
658 + The time at which the entity was archived.
659 + """
660 + archivedAt: String
661 + """
662 + The content of the agent activity.
663 + """
664 + content: JSONObject!
665 + """
666 + The time at which the entity was created.
667 + """
668 + createdAt: String!
669 + """
670 + The ID of the entity.
671 + """
672 + id: String!
673 + """
674 + An optional modifier that provides additional instructions on how the activity should be interpreted.
675 + """
676 + signal: String
677 + """
678 + Metadata about this agent activity's signal.
679 + """
680 + signalMetadata: JSONObject
681 + """
682 + The ID of the comment this activity is linked to.
683 + """
684 + sourceCommentId: String
685 + """
686 + The time at which the entity was updated.
687 + """
688 + updatedAt: String!
689 + """
690 + The user who created this agent activity.
691 + """
692 + user: UserChildWebhookPayload!
693 + """
694 + The ID of the user who created this agent activity.
695 + """
696 + userId: String!
697 +}
698 +
699 +"""
700 +The outcome of retrying a loop run blocked by its trusted-source policy.
701 +"""
702 +type AgentAutomationRetryResolution {
703 + """
704 + Identifier of the replacement AI conversation. Null when no replacement run was scheduled.
705 + """
706 + aiConversationId: String
707 + """
708 + Whether a replacement run was scheduled or the loop could no longer be retried.
709 + """
710 + status: AgentAutomationRetryResolutionStatus!
711 +}
712 +
713 +"""
714 +The outcome of reconsidering a loop run blocked by its trusted-source policy.
715 +"""
716 +enum AgentAutomationRetryResolutionStatus {
717 + notScheduled
718 + scheduled
719 +}
720 +
721 +"""
722 +The scope of the usage limit that blocked a loop run: the loop's own limit or the workspace-wide limit.
723 +"""
724 +enum AgentAutomationUsageLimitScope {
725 + loop
726 + workspace
727 +}
728 +
729 +"""
730 +A session representing an AI coding agent's work on an issue or conversation. Agent sessions track the lifecycle of an agent's engagement, from creation through active work to completion or dismissal. Each session is associated with an agent user (the bot), optionally a human creator, an issue, and a comment thread where the agent posts updates. Sessions contain activities that record the agent's observable steps and can be linked to pull requests created during the work.
731 +"""
732 +type AgentSession implements Node {
733 + """
734 + Activities associated with this agent session.
735 + """
736 + activities(
737 + """
738 + A cursor to be used with first for forward pagination
739 + """
740 + after: String
741 + """
742 + A cursor to be used with last for backward pagination.
743 + """
744 + before: String
745 + """
746 + Filter returned agent activities.
747 + """
748 + filter: AgentActivityFilter
749 + """
750 + The number of items to forward paginate (used with after). Defaults to 50.
751 + """
752 + first: Int
753 + """
754 + Should archived resources be included (default: false)
755 + """
756 + includeArchived: Boolean
757 + """
758 + The number of items to backward paginate (used with before). Defaults to 50.
759 + """
760 + last: Int
761 + """
762 + By which field should the pagination order by. Available options are createdAt (default) and updatedAt.
763 + """
764 + orderBy: PaginationOrderBy
765 + ): AgentActivityConnection!
766 + """
767 + The agent user that is associated with this agent session.
768 + """
769 + appUser: User!
770 + """
771 + The time at which the entity was archived. Null if the entity has not been archived.
772 + """
773 + archivedAt: DateTime
774 + """
775 + [Internal] Coding harness metadata for this cloud or local session.
776 + """
777 + codingHarness: AgentSessionCodingHarness
778 + """
779 + [Internal] Compact display label for the coding harness model used by this cloud or local session.
780 + """
781 + codingHarnessModelLabel: String
782 + """
783 + The comment this agent session is associated with.
784 + """
785 + comment: Comment
786 + """
787 + The entity contexts this session is related to, such as issues or projects referenced in direct chat sessions. Used to provide contextual awareness to the agent.
788 + """
789 + context: JSON!
790 + """
791 + The time at which the entity was created.
792 + """
793 + createdAt: DateTime!
794 + """
795 + The human user responsible for the agent session. Null if the session was initiated via automation or by an agent user, with no responsible human user.
796 + """
797 + creator: User
798 + """
799 + The time a user dismissed this agent session. When dismissed, the agent is removed as delegate from the associated issue. Null if the session has not been dismissed.
800 + """
801 + dismissedAt: DateTime
802 + """
803 + The user who dismissed the agent session. Automatically set when dismissedAt is updated. Null if the session has not been dismissed.
804 + """
805 + dismissedBy: User
806 + """
807 + The time the agent session completed. Null if the session is still in progress or was dismissed before completion.
808 + """
809 + endedAt: DateTime
810 + """
811 + The URL of an external agent-hosted page associated with this session.
812 + """
813 + externalLink: String @deprecated(reason: "Use externalUrls instead.")
814 + """
815 + External links associated with this session.
816 + """
817 + externalLinks: [AgentSessionExternalLink!]!
818 + """
819 + URLs of external resources associated with this session.
820 + """
821 + externalUrls: JSON! @deprecated(reason: "Use externalLinks instead.")
822 + """
823 + The unique identifier of the entity.
824 + """
825 + id: ID!
826 + """
827 + The issue this agent session is associated with.
828 + """
829 + issue: Issue
830 + """
831 + [Internal] How Adaptive selected the model route used by this coding session.
832 + """
833 + modelSelection: JSON
834 + """
835 + A dynamically updated plan describing the agent's execution strategy, including steps to be taken and their current status. Updated as the agent progresses through its work. Null if no plan has been set.
836 + """
837 + plan: JSON
838 + """
839 + The pull request this agent session is anchored to, when started from a pull request.
840 + """
841 + pullRequest: PullRequest
842 + """
843 + [Internal] Pull requests associated with this agent session.
844 + """
845 + pullRequests(
846 + """
847 + A cursor to be used with first for forward pagination
848 + """
849 + after: String
850 + """
851 + A cursor to be used with last for backward pagination.
852 + """
853 + before: String
854 + """
855 + The number of items to forward paginate (used with after). Defaults to 50.
856 + """
857 + first: Int
858 + """
859 + Should archived resources be included (default: false)
860 + """
861 + includeArchived: Boolean
862 + """
863 + The number of items to backward paginate (used with before). Defaults to 50.
864 + """
865 + last: Int
866 + """
867 + By which field should the pagination order by. Available options are createdAt (default) and updatedAt.
868 + """
869 + orderBy: PaginationOrderBy
870 + ): AgentSessionToPullRequestConnection!
871 + """
872 + The agent session's unique URL slug.
873 + """
874 + slugId: String!
875 + """
876 + The comment that this agent session was spawned from, if from a different thread.
877 + """
878 + sourceComment: Comment
879 + """
880 + Metadata about the external source that created this agent session.
881 + """
882 + sourceMetadata: JSON
883 + """
884 + The time the agent session transitioned to active status and began work. Null if the session has not yet started.
885 + """
886 + startedAt: DateTime
887 + """
888 + The current status of the agent session, such as pending, active, stopping, awaiting input, complete, error, or stale.
889 + """
890 + status: AgentSessionStatus!
891 + """
892 + The session title, generated automatically or set by the owning OAuth application. Null if no title is set.
893 + """
894 + summary: String
895 + """
896 + [DEPRECATED] The type of the agent session.
897 + """
898 + type: AgentSessionType @deprecated(reason: "This field is slated for removal.")
899 + """
900 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
901 + been updated after creation.
902 + """
903 + updatedAt: DateTime!
904 + """
905 + The URL to the agent session page in the Linear app. Null when no issue is associated.
906 + """
907 + url: String
908 + """
909 + [Internal] Legacy live working-tree diff metadata. Null when the sandbox is in sync.
910 + """
911 + workspaceDiff: JSON @deprecated(reason: "Use the session's Diff model instead.")
912 + """
913 + [Internal] Legacy per-file metadata for the agent session's live working-tree diff.
914 + """
915 + workspaceDiffFiles(
916 + """
917 + The diff content hash from workspaceDiff.
918 + """
919 + contentHash: String!
920 + ): [AgentSessionWorkspaceDiffFile!] @deprecated(reason: "Use Diff.files instead.")
921 +}
922 +
923 +"""
924 +[Internal] Coding harness metadata for a cloud or local coding session.
925 +"""
926 +type AgentSessionCodingHarness {
927 + """
928 + The coding harness or local target used by the session.
929 + """
930 + harness: String!
931 + """
932 + Compact display label for the model used by the session.
933 + """
934 + modelLabel: String!
935 +}
936 +
937 +type AgentSessionConnection {
938 + edges: [AgentSessionEdge!]!
939 + nodes: [AgentSession!]!
940 + pageInfo: PageInfo!
941 +}
942 +
943 +"""
944 +[Internal] Input for creating an agent session on behalf of the current user.
945 +"""
946 +input AgentSessionCreateInput {
947 + """
948 + The app user (agent) to create a session for.
949 + """
950 + appUserId: String!
951 + """
952 + [Internal] No longer supported.
953 + """
954 + context: JSONObject
955 + """
956 + The identifier in UUID v4 format. If none is provided, the backend will generate one.
957 + """
958 + id: String
959 + """
960 + The issue that this session will be associated with. Can be a UUID or issue identifier (e.g., 'LIN-123').
961 + """
962 + issueId: String
963 +}
964 +
965 +"""
966 +Input for creating an agent session on a root comment.
967 +"""
968 +input AgentSessionCreateOnComment {
969 + """
970 + The root comment that this session will be associated with.
971 + """
972 + commentId: String!
973 + """
974 + The URL of an external agent-hosted page associated with this session.
975 + """
976 + externalLink: String
977 + """
978 + URLs of external resources associated with this session.
979 + """
980 + externalUrls: [AgentSessionExternalUrlInput!]
981 +}
982 +
983 +"""
984 +Input for creating an agent session on an issue.
985 +"""
986 +input AgentSessionCreateOnIssue {
987 + """
988 + The URL of an external agent-hosted page associated with this session.
989 + """
990 + externalLink: String
991 + """
992 + URLs of external resources associated with this session.
993 + """
994 + externalUrls: [AgentSessionExternalUrlInput!]
995 + """
996 + The issue that this session will be associated with. Can be a UUID or issue identifier (e.g., 'LIN-123').
997 + """
998 + issueId: String!
999 +}
1000 +
1001 +type AgentSessionEdge {
1002 + """
1003 + Used in `before` and `after` args
1004 + """
1005 + cursor: String!
1006 + node: AgentSession!
1007 +}
1008 +
1009 +"""
1010 +Payload for agent session webhook events.
1011 +"""
1012 +type AgentSessionEventWebhookPayload {
1013 + """
1014 + The type of action that triggered the webhook.
1015 + """
1016 + action: String!
1017 + """
1018 + The agent activity that was created.
1019 + """
1020 + agentActivity: AgentActivityWebhookPayload
1021 + """
1022 + The agent session that the event belongs to.
1023 + """
1024 + agentSession: AgentSessionWebhookPayload!
1025 + """
1026 + ID of the app user the agent session belongs to.
1027 + """
1028 + appUserId: String!
1029 + """
1030 + The time the payload was created.
1031 + """
1032 + createdAt: DateTime!
1033 + """
1034 + Guidance to inform the agent's behavior, which comes from configuration at the level of the workspace, parent teams, and/or current team for this session. The nearest team-specific guidance should take highest precendence.
1035 + """
1036 + guidance: [GuidanceRuleWebhookPayload!]
1037 + """
1038 + ID of the OAuth client the app user is tied to.
1039 + """
1040 + oauthClientId: String!
1041 + """
1042 + ID of the organization for which the webhook belongs to.
1043 + """
1044 + organizationId: String!
1045 + """
1046 + The previous comments in the thread before this agent was mentioned and the session was initiated, if any. Present only for `created` events where the session was initiated by mentioning the agent in a child comment of a thread.
1047 + """
1048 + previousComments: [CommentChildWebhookPayload!]
1049 + """
1050 + A formatted prompt string containing the relevant context for the agent session, including issue details, comments, and guidance. Present only for `created` events.
1051 + """
1052 + promptContext: String
1053 + """
1054 + The type of resource.
1055 + """
1056 + type: String!
1057 + """
1058 + The ID of the webhook that sent this event.
1059 + """
1060 + webhookId: String!
1061 + """
1062 + Unix timestamp in milliseconds when the webhook was sent.
1063 + """
1064 + webhookTimestamp: Float!
1065 +}
1066 +
1067 +"""
1068 +An external link associated with an agent session.
1069 +"""
1070 +type AgentSessionExternalLink {
1071 + """
1072 + Label for the link.
1073 + """
1074 + label: String!
1075 + """
1076 + The URL of the external resource.
1077 + """
1078 + url: String!
1079 +}
1080 +
1081 +"""
1082 +Input for an external URL associated with an agent session.
1083 +"""
1084 +input AgentSessionExternalUrlInput {
1085 + """
1086 + Label for the URL.
1087 + """
1088 + label: String!
1089 + """
1090 + The URL of the external resource.
1091 + """
1092 + url: String!
1093 +}
1094 +
1095 +type AgentSessionPayload {
1096 + """
1097 + The agent session that was created or updated.
1098 + """
1099 + agentSession: AgentSession!
1100 + """
1101 + The identifier of the last sync operation.
1102 + """
1103 + lastSyncId: Float!
1104 + """
1105 + Whether the operation was successful.
1106 + """
1107 + success: Boolean!
1108 +}
1109 +
1110 +"""
1111 +The status of an agent session.
1112 +"""
1113 +enum AgentSessionStatus {
1114 + active
1115 + awaitingInput
1116 + complete
1117 + error
1118 + pending
1119 + stale
1120 + stopping
1121 +}
1122 +
1123 +"""
1124 +A link between an agent session and a pull request created or associated during that session. This join entity tracks which pull requests were produced by or connected to a coding agent's work session, and handles backfilling links when pull requests are synced after the agent has already recorded the URL.
1125 +"""
1126 +type AgentSessionToPullRequest implements Node {
1127 + """
1128 + The agent session that the pull request is associated with.
1129 + """
1130 + agentSession: AgentSession!
1131 + """
1132 + The time at which the entity was archived. Null if the entity has not been archived.
1133 + """
1134 + archivedAt: DateTime
1135 + """
1136 + The time at which the entity was created.
1137 + """
1138 + createdAt: DateTime!
1139 + """
1140 + The unique identifier of the entity.
1141 + """
1142 + id: ID!
1143 + """
1144 + The pull request that the agent session is associated with.
1145 + """
1146 + pullRequest: PullRequest!
1147 + """
1148 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
1149 + been updated after creation.
1150 + """
1151 + updatedAt: DateTime!
1152 +}
1153 +
1154 +type AgentSessionToPullRequestConnection {
1155 + edges: [AgentSessionToPullRequestEdge!]!
1156 + nodes: [AgentSessionToPullRequest!]!
1157 + pageInfo: PageInfo!
1158 +}
1159 +
1160 +type AgentSessionToPullRequestEdge {
1161 + """
1162 + Used in `before` and `after` args
1163 + """
1164 + cursor: String!
1165 + node: AgentSessionToPullRequest!
1166 +}
1167 +
1168 +"""
1169 +[DEPRECATED] The type of an agent session.
1170 +"""
1171 +enum AgentSessionType {
1172 + commentThread
1173 +}
1174 +
1175 +"""
1176 +Input for updating the external URLs of an agent session.
1177 +"""
1178 +input AgentSessionUpdateExternalUrlInput {
1179 + """
1180 + URLs of external resources to be added to this session.
1181 + """
1182 + addedExternalUrls: [AgentSessionExternalUrlInput!]
1183 + """
1184 + The URL of an external agent-hosted page associated with this session.
1185 + """
1186 + externalLink: String
1187 + """
1188 + URLs of external resources associated with this session. Replaces existing URLs.
1189 + """
1190 + externalUrls: [AgentSessionExternalUrlInput!]
1191 + """
1192 + URLs to be removed from this session.
1193 + """
1194 + removedExternalUrls: [String!]
1195 +}
1196 +
1197 +"""
1198 +Input for updating an agent session.
1199 +"""
1200 +input AgentSessionUpdateInput {
1201 + """
1202 + URLs of external resources to be added to this session. Only updatable by the OAuth application that owns the session.
1203 + """
1204 + addedExternalUrls: [AgentSessionExternalUrlInput!]
1205 + """
1206 + [Internal] The time at which the agent session was dismissed. Set to null to un-dismiss. Only updatable by internal clients.
1207 + """
1208 + dismissedAt: DateTime
1209 + """
1210 + The URL of an external agent-hosted page associated with this session. Only updatable by the OAuth application that owns the session.
1211 + """
1212 + externalLink: String
1213 + """
1214 + URLs of external resources associated with this session. Replaces existing URLs. Only updatable by the OAuth application that owns the session. If supplied, addedExternalUrls and removedExternalUrls are ignored.
1215 + """
1216 + externalUrls: [AgentSessionExternalUrlInput!]
1217 + """
1218 + A dynamically updated list of the agent's execution strategy. Only updatable by the OAuth application that owns the session.
1219 + """
1220 + plan: JSONObject
1221 + """
1222 + URLs to be removed from this session. Only updatable by the OAuth application that owns the session.
1223 + """
1224 + removedExternalUrls: [String!]
1225 + """
1226 + The session title, displayed as its summary. Must contain 1 to 255 characters, including a non-whitespace character, with no line breaks or NUL bytes. Set to null to clear it and allow automatic title generation. Updating only this field does not acknowledge the session. Only updatable by the OAuth application that owns the session.
1227 + """
1228 + summary: String
1229 + """
1230 + [Internal] User-specific state for the agent session. Only updatable by internal clients.
1231 + """
1232 + userState: [AgentSessionUserStateInput!]
1233 +}
1234 +
1235 +input AgentSessionUserStateInput {
1236 + """
1237 + The time at which the user most recently viewed the session.
1238 + """
1239 + lastReadAt: DateTime
1240 + """
1241 + The ID of the user this state belongs to.
1242 + """
1243 + userId: String!
1244 +}
1245 +
1246 +"""
1247 +Payload for an agent session webhook.
1248 +"""
1249 +type AgentSessionWebhookPayload {
1250 + """
1251 + The ID of the agent that the agent session belongs to.
1252 + """
1253 + appUserId: String!
1254 + """
1255 + The time at which the entity was archived.
1256 + """
1257 + archivedAt: String
1258 + """
1259 + The root comment of the thread this agent session is attached to.
1260 + """
1261 + comment: CommentChildWebhookPayload
1262 + """
1263 + The ID of the root comment of the thread this agent session is attached to.
1264 + """
1265 + commentId: String
1266 + """
1267 + The time at which the entity was created.
1268 + """
1269 + createdAt: String!
1270 + """
1271 + The human user responsible for the agent session. Unset if the session was initiated via automation or by an agent user, with no responsible human user.
1272 + """
1273 + creator: UserChildWebhookPayload
1274 + """
1275 + The ID of the human user responsible for the agent session. Unset if the session was initiated via automation or by an agent user, with no responsible human user.
1276 + """
1277 + creatorId: String
1278 + """
1279 + The time the agent session ended.
1280 + """
1281 + endedAt: String
1282 + """
1283 + The ID of the entity.
1284 + """
1285 + id: String!
1286 + """
1287 + The issue this agent session is associated with.
1288 + """
1289 + issue: IssueWithDescriptionChildWebhookPayload
1290 + """
1291 + The ID of the issue this agent session is associated with.
1292 + """
1293 + issueId: String
1294 + """
1295 + The ID of the organization that the agent session belongs to.
1296 + """
1297 + organizationId: String!
1298 + """
1299 + The ID of the comment that this agent session was spawned from, if from a different thread.
1300 + """
1301 + sourceCommentId: String
1302 + """
1303 + Metadata about the external source that created this agent session.
1304 + """
1305 + sourceMetadata: JSONObject
1306 + """
1307 + The time the agent session started working.
1308 + """
1309 + startedAt: String
1310 + """
1311 + The current status of the agent session.
1312 + """
1313 + status: String!
1314 + """
1315 + A summary of the activities in this session.
1316 + """
1317 + summary: String
1318 + """
1319 + The type of the agent session.
1320 + """
1321 + type: String!
1322 + """
1323 + The time at which the entity was updated.
1324 + """
1325 + updatedAt: String!
1326 + """
1327 + The URL of the agent session.
1328 + """
1329 + url: String
1330 +}
1331 +
1332 +"""
1333 +[Internal] One changed file in a coding agent's live working-tree diff.
1334 +"""
1335 +type AgentSessionWorkspaceDiffFile {
1336 + """
1337 + Lines added in this file.
1338 + """
1339 + additions: Int!
1340 + """
1341 + Lines removed in this file.
1342 + """
1343 + deletions: Int!
1344 + """
1345 + Previous path, when the file was renamed or copied.
1346 + """
1347 + oldPath: String
1348 + """
1349 + Path of the changed file (the new path, for renames).
1350 + """
1351 + path: String!
1352 + """
1353 + Kind of change: added, modified, deleted, renamed, copied, type_changed, unmerged, unknown.
1354 + """
1355 + state: String!
1356 +}
1357 +
1358 +"""
1359 +A user-defined skill that can be saved and reused in conversations with the Linear Agent. Skills can be private to a user or shared with a team.
1360 +"""
1361 +type AgentSkill implements Node {
1362 + """
1363 + The time at which the entity was archived. Null if the entity has not been archived.
1364 + """
1365 + archivedAt: DateTime
1366 + """
1367 + The skill instructions in markdown format.
1368 + """
1369 + body: String!
1370 + """
1371 + The skill's color. Null if no color is set.
1372 + """
1373 + color: String
1374 + """
1375 + The time at which the entity was created.
1376 + """
1377 + createdAt: DateTime!
1378 + """
1379 + The user who created the skill.
1380 + """
1381 + creator: User!
1382 + """
1383 + The skill's description. Null if no description has been generated.
1384 + """
1385 + description: String
1386 + """
1387 + The icon of the skill. Null if no icon is set.
1388 + """
1389 + icon: String
1390 + """
1391 + The unique identifier of the entity.
1392 + """
1393 + id: ID!
1394 + """
1395 + The parent-team skill this skill was inherited from. Null if the skill is not inherited.
1396 + """
1397 + inheritedFrom: AgentSkill
1398 + """
1399 + The user who last updated the skill. Null if unknown.
1400 + """
1401 + lastUpdatedBy: User
1402 + """
1403 + The time the skill was last used by anyone in the workspace. Null if it has never been used.
1404 + """
1405 + lastUsedAt: DateTime
1406 + """
1407 + The user who owns the skill.
1408 + """
1409 + owner: User!
1410 + """
1411 + The number of times the skill was used by anyone in the workspace in the last 30 days.
1412 + """
1413 + recentUsageCount: Float!
1414 + """
1415 + Whether the skill is shared with everyone in the workspace. When false, only the owner can use the skill.
1416 + """
1417 + shared: Boolean!
1418 + """
1419 + The skill's unique URL slug.
1420 + """
1421 + slugId: String!
1422 + """
1423 + The identifier of the team this skill is shared with.
1424 + """
1425 + teamId: String
1426 + """
1427 + The skill's title.
1428 + """
1429 + title: String!
1430 + """
1431 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
1432 + been updated after creation.
1433 + """
1434 + updatedAt: DateTime!
1435 +}
1436 +
1437 +type AgentSkillConnection {
1438 + edges: [AgentSkillEdge!]!
1439 + nodes: [AgentSkill!]!
1440 + pageInfo: PageInfo!
1441 +}
1442 +
1443 +"""
1444 +Input for creating an agent skill.
1445 +"""
1446 +input AgentSkillCreateInput {
1447 + """
1448 + The skill instructions in markdown format.
1449 + """
1450 + body: String!
1451 + """
1452 + The color of the skill icon.
1453 + """
1454 + color: String
1455 + """
1456 + The icon of the skill.
1457 + """
1458 + icon: String
1459 + """
1460 + The identifier in UUID v4 format. If none is provided, the backend will generate one.
1461 + """
1462 + id: String
1463 + """
1464 + The team to associate the skill with.
1465 + """
1466 + teamId: String
1467 + """
1468 + The title of the skill.
1469 + """
1470 + title: String
1471 +}
1472 +
1473 +type AgentSkillEdge {
1474 + """
1475 + Used in `before` and `after` args
1476 + """
1477 + cursor: String!
1478 + node: AgentSkill!
1479 +}
1480 +
1481 +"""
1482 +Agent skill filtering options.
1483 +"""
1484 +input AgentSkillFilter {
1485 + """
1486 + Compound filters, all of which need to be matched by the agent skill.
1487 + """
1488 + and: [AgentSkillFilter!]
1489 + """
1490 + Comparator for the created at date.
1491 + """
1492 + createdAt: DateComparator
1493 + """
1494 + Comparator for the identifier.
1495 + """
1496 + id: IDComparator
1497 + """
1498 + Compound filters, one of which need to be matched by the agent skill.
1499 + """
1500 + or: [AgentSkillFilter!]
1501 + """
1502 + Comparator for the skill owner's user ID.
1503 + """
1504 + ownerId: IDComparator
1505 + """
1506 + Comparator for whether the skill is shared with the workspace.
1507 + """
1508 + shared: BooleanComparator
1509 + """
1510 + Filters that the skill's team must satisfy.
1511 + """
1512 + team: NullableTeamFilter
1513 + """
1514 + Comparator for the updated at date.
1515 + """
1516 + updatedAt: DateComparator
1517 +}
1518 +
1519 +"""
1520 +The result of an agent skill mutation.
1521 +"""
1522 +type AgentSkillPayload {
1523 + """
1524 + The agent skill that was created or updated.
1525 + """
1526 + agentSkill: AgentSkill!
1527 + """
1528 + The identifier of the last sync operation.
1529 + """
1530 + lastSyncId: Float!
1531 + """
1532 + Whether the operation was successful.
1533 + """
1534 + success: Boolean!
1535 +}
1536 +
1537 +"""
1538 +Input for updating an agent skill.
1539 +"""
1540 +input AgentSkillUpdateInput {
1541 + """
1542 + The skill instructions in markdown format.
1543 + """
1544 + body: String
1545 + """
1546 + The color of the skill icon.
1547 + """
1548 + color: String
1549 + """
1550 + The icon of the skill.
1551 + """
1552 + icon: String
1553 + """
1554 + The team to associate the skill with.
1555 + """
1556 + teamId: String
1557 + """
1558 + The title of the skill.
1559 + """
1560 + title: String
1561 +}
1562 +
1563 +"""
1564 +[Internal] A conversation between a user and the Linear AI assistant. Each conversation tracks the full thread state, context references (issues, projects, documents, etc.), and conversation parts (prompts, text responses, tool calls, widgets). Conversations can originate from direct chat, issue comments, Slack threads, Microsoft Teams, or automated workflows.
1565 +"""
1566 +type AiConversation implements Node {
1567 + """
1568 + The time at which the entity was archived. Null if the entity has not been archived.
1569 + """
1570 + archivedAt: DateTime
1571 + """
1572 + The client platform from which this conversation was initiated, such as web, desktop, or mobile.
1573 + """
1574 + clientPlatform: AiConversationClientPlatform
1575 + """
1576 + The entity contexts this conversation is related to, such as issues, projects, or documents that provide context for the AI assistant.
1577 + """
1578 + context: JSONObject!
1579 + """
1580 + The time at which the entity was created.
1581 + """
1582 + createdAt: DateTime!
1583 + """
1584 + [Internal] The live diff that owns this conversation. Ownership moves to the review on promotion.
1585 + """
1586 + diff: Diff
1587 + """
1588 + [Internal] The document this shared conversation is attached to. Null if the conversation is private.
1589 + """
1590 + document: Document
1591 + """
1592 + [Internal] The log ID of the AI response.
1593 + """
1594 + evalLogId: String
1595 + """
1596 + The unique identifier of the entity.
1597 + """
1598 + id: ID!
1599 + """
1600 + The source from which this conversation was initiated, such as direct chat, an issue comment, a Slack thread, Microsoft Teams, or a workflow automation.
1601 + """
1602 + initialSource: AiConversationInitialSource!
1603 + """
1604 + [Internal] The initiative this shared conversation is attached to. Null if the conversation is private.
1605 + """
1606 + initiative: Initiative
1607 + """
1608 + [Internal] The issue this shared conversation is attached to. Null if the conversation is private.
1609 + """
1610 + issue: Issue
1611 + """
1612 + The iteration ID when this conversation is part of an agentic workflow. Used to track multi-step workflow executions. Null for non-workflow conversations.
1613 + """
1614 + iterationId: String
1615 + """
1616 + [Internal] The Loop execution that created this conversation.
1617 + """
1618 + loopExecution: LoopExecution
1619 + """
1620 + The ordered sequence of conversation parts (prompts, text responses, reasoning steps, tool calls, errors, and widgets) that make up this conversation's visible history.
1621 + """
1622 + parts: [AiConversationPart!]
1623 + """
1624 + [Internal] The project this shared conversation is attached to. Null if the conversation is private.
1625 + """
1626 + project: Project
1627 + """
1628 + [Internal] The pull request this shared conversation is attached to. Null if the conversation is private.
1629 + """
1630 + pullRequest: PullRequest
1631 + """
1632 + The time when the current user marked the conversation as read. Null if the user hasn't read the conversation.
1633 + """
1634 + readAt: DateTime
1635 + """
1636 + [Internal] The published loop edited by this private setup conversation.
1637 + """
1638 + setupWorkflowDefinition: WorkflowDefinition
1639 + """
1640 + The conversation's unique URL slug.
1641 + """
1642 + slugId: String!
1643 + """
1644 + The materialized conversation-level processing summary used by list and gating surfaces. Assistant response lifecycle is recorded on its turn.
1645 + """
1646 + status: AiConversationStatus!
1647 + """
1648 + [Internal] Users subscribed to this run.
1649 + """
1650 + subscriberIds: [String!]
1651 + """
1652 + A summary of the conversation.
1653 + """
1654 + summary: String
1655 + """
1656 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
1657 + been updated after creation.
1658 + """
1659 + updatedAt: DateTime!
1660 + """
1661 + The user who the conversation belongs to.
1662 + """
1663 + user: User
1664 + """
1665 + [Internal] User-specific state for the AI conversation, including per-user read state.
1666 + """
1667 + userState: [AiConversationUserState!]!
1668 + """
1669 + [Internal] The cron workflow definition that created this conversation.
1670 + """
1671 + workflowCronJobDefinition: WorkflowCronJobDefinition
1672 + """
1673 + [Internal] The workflow definition that created this conversation.
1674 + """
1675 + workflowDefinition: WorkflowDefinition
1676 +}
1677 +
1678 +"""
1679 +The kind of acknowledgement the agent expresses when it has nothing meaningful to reply.
1680 +"""
1681 +enum AiConversationAckKind {
1682 + done
1683 + ignored
1684 + skipped
1685 + waiting
1686 +}
1687 +
1688 +"""
1689 +A silent acknowledgement emitted by the agent in place of a generated reply.
1690 +"""
1691 +type AiConversationAckPart implements AiConversationBasePart {
1692 + """
1693 + The ID of the part.
1694 + """
1695 + id: String!
1696 + """
1697 + The kind of acknowledgement the agent expressed.
1698 + """
1699 + kind: AiConversationAckKind!
1700 + """
1701 + The metadata of the part.
1702 + """
1703 + metadata: AiConversationPartMetadata!
1704 + """
1705 + [Internal] A one-line, third-person summary of the action the agent completed. Null when the agent acknowledged without describing an action.
1706 + """
1707 + summary: String
1708 + """
1709 + The type of the part.
1710 + """
1711 + type: AiConversationPartType!
1712 +}
1713 +
1714 +"""
1715 +A base part in an AI conversation.
1716 +"""
1717 +interface AiConversationBasePart {
1718 + """
1719 + The ID of the part.
1720 + """
1721 + id: String!
1722 + """
1723 + The metadata of the part.
1724 + """
1725 + metadata: AiConversationPartMetadata!
1726 + """
1727 + The type of the part.
1728 + """
1729 + type: AiConversationPartType!
1730 +}
1731 +
1732 +interface AiConversationBaseToolCall {
1733 + displayInfo: AiConversationToolDisplayInfo!
1734 + """
1735 + The name of the tool that was called.
1736 + """
1737 + name: AiConversationTool!
1738 + """
1739 + The arguments of the tool call.
1740 + """
1741 + rawArgs: JSON
1742 + """
1743 + The result of the tool call.
1744 + """
1745 + rawResult: JSON
1746 +}
1747 +
1748 +interface AiConversationBaseWidget {
1749 + """
1750 + Display information for the widget, including ProseMirror and Markdown representations.
1751 + """
1752 + displayInfo: AiConversationWidgetDisplayInfo
1753 + """
1754 + The name of the widget.
1755 + """
1756 + name: AiConversationWidgetName!
1757 + """
1758 + The arguments of the widget.
1759 + """
1760 + rawArgs: JSON
1761 +}
1762 +
1763 +type AiConversationBashToolCall implements AiConversationBaseToolCall {
1764 + """
1765 + The arguments to the tool call.
1766 + """
1767 + args: AiConversationBashToolCallArgs
1768 + displayInfo: AiConversationToolDisplayInfo!
1769 + """
1770 + The name of the tool that was called.
1771 + """
1772 + name: AiConversationTool!
1773 + """
1774 + The arguments of the tool call.
1775 + """
1776 + rawArgs: JSON
1777 + """
1778 + The result of the tool call.
1779 + """
1780 + rawResult: JSON
1781 +}
1782 +
1783 +type AiConversationBashToolCallArgs {
1784 + command: String!
1785 +}
1786 +
1787 +"""
1788 +The client platform from which an AI conversation was initiated.
1789 +"""
1790 +enum AiConversationClientPlatform {
1791 + desktop
1792 + mobile
1793 + web
1794 +}
1795 +
1796 +type AiConversationCodeIntelligenceToolCall implements AiConversationBaseToolCall {
1797 + """
1798 + The arguments to the tool call.
1799 + """
1800 + args: AiConversationCodeIntelligenceToolCallArgs
1801 + displayInfo: AiConversationToolDisplayInfo!
1802 + """
1803 + The name of the tool that was called.
1804 + """
1805 + name: AiConversationTool!
1806 + """
1807 + The arguments of the tool call.
1808 + """
1809 + rawArgs: JSON
1810 + """
1811 + The result of the tool call.
1812 + """
1813 + rawResult: JSON
1814 +}
1815 +
1816 +type AiConversationCodeIntelligenceToolCallArgs {
1817 + question: String!
1818 +}
1819 +
1820 +type AiConversationCodeModeToolCall implements AiConversationBaseToolCall {
1821 + """
1822 + The arguments to the tool call.
1823 + """
1824 + args: AiConversationCodeModeToolCallArgs
1825 + displayInfo: AiConversationToolDisplayInfo!
1826 + """
1827 + The name of the tool that was called.
1828 + """
1829 + name: AiConversationTool!
1830 + """
1831 + The arguments of the tool call.
1832 + """
1833 + rawArgs: JSON
1834 + """
1835 + The result of the tool call.
1836 + """
1837 + rawResult: JSON
1838 +}
1839 +
1840 +type AiConversationCodeModeToolCallArgs {
1841 + description: String!
1842 +}
1843 +
1844 +"""
1845 +The response recorded for a confirmation elicitation.
1846 +"""
1847 +type AiConversationConfirmationElicitationResponseData {
1848 + """
1849 + True when the user confirmed the action.
1850 + """
1851 + confirmed: Boolean!
1852 + """
1853 + The kind of elicitation that was answered.
1854 + """
1855 + kind: AiConversationElicitationKind!
1856 +}
1857 +
1858 +type AiConversationContactSupportToolCall implements AiConversationBaseToolCall {
1859 + displayInfo: AiConversationToolDisplayInfo!
1860 + """
1861 + The name of the tool that was called.
1862 + """
1863 + name: AiConversationTool!
1864 + """
1865 + The arguments of the tool call.
1866 + """
1867 + rawArgs: JSON
1868 + """
1869 + The result of the tool call.
1870 + """
1871 + rawResult: JSON
1872 +}
1873 +
1874 +type AiConversationCreateAgentChatToolCall implements AiConversationBaseToolCall {
1875 + """
1876 + The arguments to the tool call.
1877 + """
1878 + args: JSONObject
1879 + displayInfo: AiConversationToolDisplayInfo!
1880 + """
1881 + The name of the tool that was called.
1882 + """
1883 + name: AiConversationTool!
1884 + """
1885 + The arguments of the tool call.
1886 + """
1887 + rawArgs: JSON
1888 + """
1889 + The result of the tool call.
1890 + """
1891 + rawResult: JSON
1892 + """
1893 + The result of the tool call.
1894 + """
1895 + result: AiConversationCreateAgentChatToolCallResult
1896 +}
1897 +
1898 +type AiConversationCreateAgentChatToolCallResult {
1899 + conversationId: String!
1900 +}
1901 +
1902 +type AiConversationCreateEntityToolCall implements AiConversationBaseToolCall {
1903 + """
1904 + The arguments to the tool call.
1905 + """
1906 + args: AiConversationCreateEntityToolCallArgs
1907 + displayInfo: AiConversationToolDisplayInfo!
1908 + """
1909 + The name of the tool that was called.
1910 + """
1911 + name: AiConversationTool!
1912 + """
1913 + The arguments of the tool call.
1914 + """
1915 + rawArgs: JSON
1916 + """
1917 + The result of the tool call.
1918 + """
1919 + rawResult: JSON
1920 + """
1921 + The result of the tool call.
1922 + """
1923 + result: AiConversationCreateEntityToolCallResult
1924 +}
1925 +
1926 +type AiConversationCreateEntityToolCallArgs {
1927 + count: Float
1928 + type: String!
1929 +}
1930 +
1931 +type AiConversationCreateEntityToolCallResult {
1932 + createdEntities: [AiConversationCreateEntityToolCallResultCreatedEntities!]
1933 + startedAgentSessions: [AiConversationSearchEntitiesToolCallResultEntities!]
1934 +}
1935 +
1936 +type AiConversationCreateEntityToolCallResultCreatedEntities {
1937 + id: String!
1938 + label: String
1939 + parent: AiConversationSearchEntitiesToolCallResultEntities
1940 + type: String!
1941 +}
1942 +
1943 +type AiConversationCreateSandboxToolCall implements AiConversationBaseToolCall {
1944 + """
1945 + The arguments to the tool call.
1946 + """
1947 + args: AiConversationCreateSandboxToolCallArgs
1948 + displayInfo: AiConversationToolDisplayInfo!
1949 + """
1950 + The name of the tool that was called.
1951 + """
1952 + name: AiConversationTool!
1953 + """
1954 + The arguments of the tool call.
1955 + """
1956 + rawArgs: JSON
1957 + """
1958 + The result of the tool call.
1959 + """
1960 + rawResult: JSON
1961 +}
1962 +
1963 +type AiConversationCreateSandboxToolCallArgs {
1964 + repository: String
1965 +}
1966 +
1967 +type AiConversationDeleteEntityToolCall implements AiConversationBaseToolCall {
1968 + """
1969 + The arguments to the tool call.
1970 + """
1971 + args: AiConversationDeleteEntityToolCallArgs
1972 + displayInfo: AiConversationToolDisplayInfo!
1973 + """
1974 + The name of the tool that was called.
1975 + """
1976 + name: AiConversationTool!
1977 + """
1978 + The arguments of the tool call.
1979 + """
1980 + rawArgs: JSON
1981 + """
1982 + The result of the tool call.
1983 + """
1984 + rawResult: JSON
1985 + """
1986 + The result of the tool call.
1987 + """
1988 + result: AiConversationDeleteEntityToolCallResult
1989 +}
1990 +
1991 +type AiConversationDeleteEntityToolCallArgs {
1992 + entity: AiConversationSearchEntitiesToolCallResultEntities!
1993 +}
1994 +
1995 +type AiConversationDeleteEntityToolCallResult {
1996 + deletedEntities: [AiConversationCreateEntityToolCallResultCreatedEntities!]
1997 +}
1998 +
1999 +"""
2000 +The kind of input an AI conversation elicitation asks for.
2001 +"""
2002 +enum AiConversationElicitationKind {
2003 + confirmation
2004 + entitySelection
2005 + integrationConnection
2006 + mcpServerConnection
2007 + multipleChoice
2008 +}
2009 +
2010 +"""
2011 +A selectable option shown in an AI conversation elicitation.
2012 +"""
2013 +type AiConversationElicitationOption {
2014 + """
2015 + The short label shown for the option.
2016 + """
2017 + label: String!
2018 + """
2019 + The user prompt rendered to the agent when this option is selected. Null when selecting the option only dismisses the elicitation without replying.
2020 + """
2021 + prompt: String
2022 +}
2023 +
2024 +"""
2025 +A structured request for user input shown with an AI conversation.
2026 +"""
2027 +type AiConversationElicitationPart implements AiConversationBasePart {
2028 + """
2029 + Entity type for entity selection.
2030 + """
2031 + entityType: String
2032 + """
2033 + The ID of the part.
2034 + """
2035 + id: String!
2036 + """
2037 + The existing MCP integration to reconnect. Null when creating a new connection.
2038 + """
2039 + integrationId: String
2040 + """
2041 + The service of the integration to connect. Null for other elicitation kinds.
2042 + """
2043 + integrationService: IntegrationService
2044 + """
2045 + The kind of input this elicitation asks for.
2046 + """
2047 + kind: AiConversationElicitationKind!
2048 + """
2049 + The metadata of the part.
2050 + """
2051 + metadata: AiConversationPartMetadata!
2052 + """
2053 + The selectable actions for multiple-choice and confirmation elicitations.
2054 + """
2055 + options: [AiConversationElicitationOption!]!
2056 + """
2057 + The requested owner of the MCP server connection. Null for other elicitation kinds.
2058 + """
2059 + scope: AiConversationMcpServerConnectionScope
2060 + """
2061 + Whether to select one or multiple entities.
2062 + """
2063 + selection: String
2064 + """
2065 + The MCP server URL for a new connection. Null for reconnects and other elicitation kinds.
2066 + """
2067 + serverUrl: String
2068 + """
2069 + Suggested entity identifiers.
2070 + """
2071 + suggestedEntityIds: [String!]
2072 + """
2073 + The optional title shown above the elicitation choices.
2074 + """
2075 + title: String
2076 + """
2077 + The type of the part.
2078 + """
2079 + type: AiConversationPartType!
2080 +}
2081 +
2082 +"""
2083 +The kind-specific data recorded when a user answers an AI conversation elicitation.
2084 +"""
2085 +union AiConversationElicitationResponseData =
2086 + | AiConversationConfirmationElicitationResponseData
2087 + | AiConversationEntitySelectionElicitationResponseData
2088 + | AiConversationIntegrationConnectionElicitationResponseData
2089 + | AiConversationMcpServerConnectionElicitationResponseData
2090 + | AiConversationMultipleChoiceElicitationResponseData
2091 +
2092 +"""
2093 +A structured user response to an elicitation in an AI conversation.
2094 +"""
2095 +type AiConversationElicitationResponsePart implements AiConversationBasePart {
2096 + """
2097 + Additional user-authored commentary submitted with the response. For a response batch, only the first response contains it. Null when none was provided.
2098 + """
2099 + bodyData: JSONObject
2100 + """
2101 + The kind-specific response data.
2102 + """
2103 + data: AiConversationElicitationResponseData!
2104 + """
2105 + The identifier of the elicitation that was answered.
2106 + """
2107 + elicitationId: String!
2108 + """
2109 + The ID of the part.
2110 + """
2111 + id: String!
2112 + """
2113 + The metadata of the part.
2114 + """
2115 + metadata: AiConversationPartMetadata!
2116 + """
2117 + The type of the part.
2118 + """
2119 + type: AiConversationPartType!
2120 + """
2121 + The user who answered the elicitation.
2122 + """
2123 + user: User
2124 +}
2125 +
2126 +type AiConversationEntityCardWidget implements AiConversationBaseWidget {
2127 + """
2128 + The arguments to the widget.
2129 + """
2130 + args: AiConversationEntityCardWidgetArgs
2131 + """
2132 + Display information for the widget, including ProseMirror and Markdown representations.
2133 + """
2134 + displayInfo: AiConversationWidgetDisplayInfo
2135 + """
2136 + The name of the widget.
2137 + """
2138 + name: AiConversationWidgetName!
2139 + """
2140 + The arguments of the widget.
2141 + """
2142 + rawArgs: JSON
2143 +}
2144 +
2145 +type AiConversationEntityCardWidgetArgs {
2146 + """
2147 + The action performed on the entity (leave empty if just found)
2148 + """
2149 + action: AiConversationEntityCardWidgetArgsAction
2150 + """
2151 + A concise summary shown on specialized entity cards. Leave empty unless specifically instructed.
2152 + """
2153 + actionSummary: String
2154 + """
2155 + The UUID of the entity to display
2156 + """
2157 + id: String!
2158 + """
2159 + @deprecated Optional note to display about the entity
2160 + """
2161 + note: String @deprecated(reason: "Optional note to display about the entity")
2162 + """
2163 + [Internal] Snapshot data for the widget.
2164 + """
2165 + snapshot: JSONObject
2166 + """
2167 + [Internal] The entity type
2168 + """
2169 + type: AiConversationEntityCardWidgetArgsType!
2170 +}
2171 +
2172 +"""
2173 +The action performed on the entity (leave empty if just found)
2174 +"""
2175 +enum AiConversationEntityCardWidgetArgsAction {
2176 + created
2177 + updated
2178 +}
2179 +
2180 +"""
2181 +[Internal] The entity type
2182 +"""
2183 +enum AiConversationEntityCardWidgetArgsType {
2184 + AgentSession
2185 + AiConversation
2186 + AiPrompt
2187 + AiPromptRules
2188 + CustomView
2189 + Customer
2190 + CustomerNeed
2191 + Dashboard
2192 + Document
2193 + Draft
2194 + Initiative
2195 + InitiativeUpdate
2196 + Issue
2197 + IssueDraft
2198 + Meeting
2199 + Project
2200 + ProjectDraft
2201 + ProjectMilestone
2202 + ProjectUpdate
2203 + PullRequest
2204 + Release
2205 + ReleaseNote
2206 + ReleasePipeline
2207 + Team
2208 + Template
2209 + WorkflowDefinition
2210 +}
2211 +
2212 +type AiConversationEntityListWidget implements AiConversationBaseWidget {
2213 + """
2214 + The arguments to the widget.
2215 + """
2216 + args: AiConversationEntityListWidgetArgs
2217 + """
2218 + Display information for the widget, including ProseMirror and Markdown representations.
2219 + """
2220 + displayInfo: AiConversationWidgetDisplayInfo
2221 + """
2222 + The name of the widget.
2223 + """
2224 + name: AiConversationWidgetName!
2225 + """
2226 + The arguments of the widget.
2227 + """
2228 + rawArgs: JSON
2229 +}
2230 +
2231 +type AiConversationEntityListWidgetArgs {
2232 + """
2233 + The action performed on the entities (leave empty if just found)
2234 + """
2235 + action: AiConversationEntityListWidgetArgsAction
2236 + """
2237 + Total number of entities in the list
2238 + """
2239 + count: Float
2240 + entities: [AiConversationEntityListWidgetArgsEntities!]!
2241 +}
2242 +
2243 +"""
2244 +The action performed on the entities (leave empty if just found)
2245 +"""
2246 +enum AiConversationEntityListWidgetArgsAction {
2247 + created
2248 + updated
2249 +}
2250 +
2251 +type AiConversationEntityListWidgetArgsEntities {
2252 + """
2253 + Entity UUID
2254 + """
2255 + id: String!
2256 + """
2257 + @deprecated Optional note to display about the entity
2258 + """
2259 + note: String @deprecated(reason: "Optional note to display about the entity")
2260 + """
2261 + [Internal] Snapshot data for the widget.
2262 + """
2263 + snapshot: JSONObject
2264 + """
2265 + [Internal] The entity type
2266 + """
2267 + type: AiConversationEntityListWidgetArgsEntitiesType!
2268 +}
2269 +
2270 +"""
2271 +[Internal] The entity type
2272 +"""
2273 +enum AiConversationEntityListWidgetArgsEntitiesType {
2274 + AgentSession
2275 + AiPrompt
2276 + AiPromptRules
2277 + CustomView
2278 + Customer
2279 + CustomerNeed
2280 + Dashboard
2281 + Document
2282 + Initiative
2283 + InitiativeUpdate
2284 + Issue
2285 + IssueDraft
2286 + Project
2287 + ProjectDraft
2288 + ProjectMilestone
2289 + ProjectUpdate
2290 + PullRequest
2291 + Release
2292 + ReleaseNote
2293 + ReleasePipeline
2294 + Team
2295 + Template
2296 + WorkflowDefinition
2297 +}
2298 +
2299 +"""
2300 +Selected entities in an entity selection elicitation.
2301 +"""
2302 +type AiConversationEntitySelectionElicitationResponseData {
2303 + kind: AiConversationElicitationKind!
2304 + selectedEntityIds: [String!]!
2305 +}
2306 +
2307 +"""
2308 +An error part in an AI conversation.
2309 +"""
2310 +type AiConversationErrorPart implements AiConversationBasePart {
2311 + """
2312 + The category of the error. Absent for errors without a specific category, which default to unknown.
2313 + """
2314 + errorType: AiConversationErrorType
2315 + """
2316 + The ID of the part.
2317 + """
2318 + id: String!
2319 + """
2320 + The user-facing error message for the failed AI response.
2321 + """
2322 + message: String!
2323 + """
2324 + The metadata of the part.
2325 + """
2326 + metadata: AiConversationPartMetadata!
2327 + """
2328 + The outcome of retrying this error's loop run. Null when the run has not been reconsidered.
2329 + """
2330 + retryResolution: AgentAutomationRetryResolution
2331 + """
2332 + The type of the part.
2333 + """
2334 + type: AiConversationPartType!
2335 + """
2336 + The time when the breached usage limit resets, as an ISO 8601 string. Null when unknown or for other error categories.
2337 + """
2338 + usageLimitResetsAt: String
2339 + """
2340 + The scope of the breached limit for usage-limit errors. Null for other error categories.
2341 + """
2342 + usageLimitScope: AgentAutomationUsageLimitScope
2343 +}
2344 +
2345 +"""
2346 +The category of an error part in an AI conversation.
2347 +"""
2348 +enum AiConversationErrorType {
2349 + billing
2350 + unknown
2351 + untrustedSources
2352 + usageLimit
2353 +}
2354 +
2355 +"""
2356 +An event part in an AI conversation.
2357 +"""
2358 +type AiConversationEventPart implements AiConversationBasePart {
2359 + """
2360 + The Markdown body of the event part.
2361 + """
2362 + body: String!
2363 + """
2364 + The data of the event part.
2365 + """
2366 + bodyData: JSONObject!
2367 + """
2368 + The ID of the part.
2369 + """
2370 + id: String!
2371 + """
2372 + The metadata of the part.
2373 + """
2374 + metadata: AiConversationPartMetadata!
2375 + """
2376 + The ID of the subscription to resolve when this event is delivered.
2377 + """
2378 + subscriptionId: String
2379 + """
2380 + The type of the part.
2381 + """
2382 + type: AiConversationPartType!
2383 +}
2384 +
2385 +type AiConversationGetMicrosoftTeamsConversationHistoryToolCall implements AiConversationBaseToolCall {
2386 + displayInfo: AiConversationToolDisplayInfo!
2387 + """
2388 + The name of the tool that was called.
2389 + """
2390 + name: AiConversationTool!
2391 + """
2392 + The arguments of the tool call.
2393 + """
2394 + rawArgs: JSON
2395 + """
2396 + The result of the tool call.
2397 + """
2398 + rawResult: JSON
2399 +}
2400 +
2401 +type AiConversationGetPullRequestCheckLogsToolCall implements AiConversationBaseToolCall {
2402 + """
2403 + The arguments to the tool call.
2404 + """
2405 + args: AiConversationGetPullRequestCheckLogsToolCallArgs
2406 + displayInfo: AiConversationToolDisplayInfo!
2407 + """
2408 + The name of the tool that was called.
2409 + """
2410 + name: AiConversationTool!
2411 + """
2412 + The arguments of the tool call.
2413 + """
2414 + rawArgs: JSON
2415 + """
2416 + The result of the tool call.
2417 + """
2418 + rawResult: JSON
2419 +}
2420 +
2421 +type AiConversationGetPullRequestCheckLogsToolCallArgs {
2422 + checkName: String!
2423 + entity: AiConversationSearchEntitiesToolCallResultEntities!
2424 + workflowName: String
2425 +}
2426 +
2427 +type AiConversationGetPullRequestDiffToolCall implements AiConversationBaseToolCall {
2428 + """
2429 + The arguments to the tool call.
2430 + """
2431 + args: AiConversationGetPullRequestDiffToolCallArgs
2432 + displayInfo: AiConversationToolDisplayInfo!
2433 + """
2434 + The name of the tool that was called.
2435 + """
2436 + name: AiConversationTool!
2437 + """
2438 + The arguments of the tool call.
2439 + """
2440 + rawArgs: JSON
2441 + """
2442 + The result of the tool call.
2443 + """
2444 + rawResult: JSON
2445 +}
2446 +
2447 +type AiConversationGetPullRequestDiffToolCallArgs {
2448 + entity: AiConversationSearchEntitiesToolCallResultEntities!
2449 +}
2450 +
2451 +type AiConversationGetPullRequestFileToolCall implements AiConversationBaseToolCall {
2452 + """
2453 + The arguments to the tool call.
2454 + """
2455 + args: AiConversationGetPullRequestFileToolCallArgs
2456 + displayInfo: AiConversationToolDisplayInfo!
2457 + """
2458 + The name of the tool that was called.
2459 + """
2460 + name: AiConversationTool!
2461 + """
2462 + The arguments of the tool call.
2463 + """
2464 + rawArgs: JSON
2465 + """
2466 + The result of the tool call.
2467 + """
2468 + rawResult: JSON
2469 +}
2470 +
2471 +type AiConversationGetPullRequestFileToolCallArgs {
2472 + entity: AiConversationSearchEntitiesToolCallResultEntities!
2473 + path: String!
2474 +}
2475 +
2476 +type AiConversationGetSlackConversationHistoryToolCall implements AiConversationBaseToolCall {
2477 + """
2478 + The arguments to the tool call.
2479 + """
2480 + args: AiConversationGetSlackConversationHistoryToolCallArgs
2481 + displayInfo: AiConversationToolDisplayInfo!
2482 + """
2483 + The name of the tool that was called.
2484 + """
2485 + name: AiConversationTool!
2486 + """
2487 + The arguments of the tool call.
2488 + """
2489 + rawArgs: JSON
2490 + """
2491 + The result of the tool call.
2492 + """
2493 + rawResult: JSON
2494 + """
2495 + The result of the tool call.
2496 + """
2497 + result: AiConversationGetSlackConversationHistoryToolCallResult
2498 +}
2499 +
2500 +type AiConversationGetSlackConversationHistoryToolCallArgs {
2501 + channel: String
2502 + targetType: AiConversationGetSlackConversationHistoryToolCallArgsTargetType
2503 +}
2504 +
2505 +enum AiConversationGetSlackConversationHistoryToolCallArgsTargetType {
2506 + channel
2507 + thread
2508 +}
2509 +
2510 +type AiConversationGetSlackConversationHistoryToolCallResult {
2511 + conversationUrl: String
2512 + error: String
2513 + hasMore: Boolean
2514 + messageCount: Float
2515 +}
2516 +
2517 +type AiConversationHandoffToCodingSessionToolCall implements AiConversationBaseToolCall {
2518 + """
2519 + The arguments to the tool call.
2520 + """
2521 + args: AiConversationHandoffToCodingSessionToolCallArgs
2522 + displayInfo: AiConversationToolDisplayInfo!
2523 + """
2524 + The name of the tool that was called.
2525 + """
2526 + name: AiConversationTool!
2527 + """
2528 + The arguments of the tool call.
2529 + """
2530 + rawArgs: JSON
2531 + """
2532 + The result of the tool call.
2533 + """
2534 + rawResult: JSON
2535 +}
2536 +
2537 +type AiConversationHandoffToCodingSessionToolCallArgs {
2538 + entity: AiConversationSearchEntitiesToolCallResultEntities!
2539 + instructions: String
2540 +}
2541 +
2542 +"""
2543 +The initial source of an AI conversation.
2544 +"""
2545 +enum AiConversationInitialSource {
2546 + comment
2547 + directChat
2548 + entityChat
2549 + mcp
2550 + microsoftTeams
2551 + onboarding
2552 + pullRequestComment
2553 + slack
2554 + subAgent
2555 + workflow
2556 +}
2557 +
2558 +"""
2559 +The integration connected to a Loop and its current run by a conversation.
2560 +"""
2561 +type AiConversationIntegrationConnectionElicitationResponseData {
2562 + """
2563 + The identifier of the integration that was connected.
2564 + """
2565 + integrationId: String!
2566 + """
2567 + The kind of elicitation that was answered.
2568 + """
2569 + kind: AiConversationElicitationKind!
2570 +}
2571 +
2572 +type AiConversationInvokeMcpToolToolCall implements AiConversationBaseToolCall {
2573 + """
2574 + The arguments to the tool call.
2575 + """
2576 + args: AiConversationInvokeMcpToolToolCallArgs
2577 + displayInfo: AiConversationToolDisplayInfo!
2578 + """
2579 + The name of the tool that was called.
2580 + """
2581 + name: AiConversationTool!
2582 + """
2583 + The arguments of the tool call.
2584 + """
2585 + rawArgs: JSON
2586 + """
2587 + The result of the tool call.
2588 + """
2589 + rawResult: JSON
2590 +}
2591 +
2592 +type AiConversationInvokeMcpToolToolCallArgs {
2593 + server: AiConversationInvokeMcpToolToolCallArgsServer!
2594 + tool: AiConversationInvokeMcpToolToolCallArgsTool!
2595 +}
2596 +
2597 +type AiConversationInvokeMcpToolToolCallArgsServer {
2598 + integrationId: String!
2599 + name: String!
2600 + title: String
2601 +}
2602 +
2603 +type AiConversationInvokeMcpToolToolCallArgsTool {
2604 + name: String!
2605 + title: String
2606 +}
2607 +
2608 +type AiConversationListCodingSessionsToolCall implements AiConversationBaseToolCall {
2609 + """
2610 + The arguments to the tool call.
2611 + """
2612 + args: AiConversationListCodingSessionsToolCallArgs
2613 + displayInfo: AiConversationToolDisplayInfo!
2614 + """
2615 + The name of the tool that was called.
2616 + """
2617 + name: AiConversationTool!
2618 + """
2619 + The arguments of the tool call.
2620 + """
2621 + rawArgs: JSON
2622 + """
2623 + The result of the tool call.
2624 + """
2625 + rawResult: JSON
2626 + """
2627 + The result of the tool call.
2628 + """
2629 + result: AiConversationListCodingSessionsToolCallResult
2630 +}
2631 +
2632 +type AiConversationListCodingSessionsToolCallArgs {
2633 + includeDismissed: Boolean
2634 +}
2635 +
2636 +type AiConversationListCodingSessionsToolCallResult {
2637 + agentSessions: [AiConversationListCodingSessionsToolCallResultAgentSessions!]!
2638 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]
2639 +}
2640 +
2641 +type AiConversationListCodingSessionsToolCallResultAgentSessions {
2642 + id: String!
2643 + pullRequests: [AiConversationSearchEntitiesToolCallResultEntities!]
2644 + type: String!
2645 +}
2646 +
2647 +"""
2648 +The integration connected by an MCP server connection elicitation.
2649 +"""
2650 +type AiConversationMcpServerConnectionElicitationResponseData {
2651 + """
2652 + The identifier of the MCP server integration that was connected.
2653 + """
2654 + integrationId: String!
2655 + """
2656 + The kind of elicitation that was answered.
2657 + """
2658 + kind: AiConversationElicitationKind!
2659 +}
2660 +
2661 +"""
2662 +The owner scope for an MCP server connection requested in an AI conversation.
2663 +"""
2664 +type AiConversationMcpServerConnectionScope {
2665 + """
2666 + The identifier of the team that will own the connection. Null for other scope types.
2667 + """
2668 + teamId: String
2669 + """
2670 + The type of owner that will receive the MCP server connection.
2671 + """
2672 + type: AiConversationMcpServerConnectionScopeType!
2673 + """
2674 + The identifier of the Loop draft that will own the connection. Null for other scope types.
2675 + """
2676 + workflowDefinitionDraftId: String
2677 + """
2678 + The identifier of the Loop that will own the connection. Null for other scope types.
2679 + """
2680 + workflowDefinitionId: String
2681 +}
2682 +
2683 +"""
2684 +The owner scope for an MCP server connection requested in an AI conversation.
2685 +"""
2686 +enum AiConversationMcpServerConnectionScopeType {
2687 + team
2688 + user
2689 + workflowDefinition
2690 + workflowDefinitionDraft
2691 +}
2692 +
2693 +type AiConversationMemoryToolCall implements AiConversationBaseToolCall {
2694 + """
2695 + The arguments to the tool call.
2696 + """
2697 + args: AiConversationMemoryToolCallArgs
2698 + displayInfo: AiConversationToolDisplayInfo!
2699 + """
2700 + The name of the tool that was called.
2701 + """
2702 + name: AiConversationTool!
2703 + """
2704 + The arguments of the tool call.
2705 + """
2706 + rawArgs: JSON
2707 + """
2708 + The result of the tool call.
2709 + """
2710 + rawResult: JSON
2711 +}
2712 +
2713 +type AiConversationMemoryToolCallArgs {
2714 + action: AiConversationMemoryToolCallArgsAction!
2715 + name: String
2716 +}
2717 +
2718 +enum AiConversationMemoryToolCallArgsAction {
2719 + delete
2720 + list
2721 + read
2722 + save
2723 +}
2724 +
2725 +type AiConversationMessageSubagentToolCall implements AiConversationBaseToolCall {
2726 + """
2727 + The arguments to the tool call.
2728 + """
2729 + args: AiConversationMessageSubagentToolCallArgs
2730 + displayInfo: AiConversationToolDisplayInfo!
2731 + """
2732 + The name of the tool that was called.
2733 + """
2734 + name: AiConversationTool!
2735 + """
2736 + The arguments of the tool call.
2737 + """
2738 + rawArgs: JSON
2739 + """
2740 + The result of the tool call.
2741 + """
2742 + rawResult: JSON
2743 + """
2744 + The result of the tool call.
2745 + """
2746 + result: AiConversationMessageSubagentToolCallResult
2747 +}
2748 +
2749 +type AiConversationMessageSubagentToolCallArgs {
2750 + conversationId: String!
2751 + prompt: String!
2752 + wait: Boolean
2753 +}
2754 +
2755 +type AiConversationMessageSubagentToolCallResult {
2756 + turnId: String!
2757 +}
2758 +
2759 +"""
2760 +The selected option in a multiple-choice AI conversation elicitation.
2761 +"""
2762 +type AiConversationMultipleChoiceElicitationResponseData {
2763 + """
2764 + The kind of elicitation that was answered.
2765 + """
2766 + kind: AiConversationElicitationKind!
2767 + """
2768 + The zero-based index of the selected option.
2769 + """
2770 + selectedOptionIndex: Int!
2771 +}
2772 +
2773 +type AiConversationNavigateToPageToolCall implements AiConversationBaseToolCall {
2774 + """
2775 + The arguments to the tool call.
2776 + """
2777 + args: AiConversationNavigateToPageToolCallArgs
2778 + displayInfo: AiConversationToolDisplayInfo!
2779 + """
2780 + The name of the tool that was called.
2781 + """
2782 + name: AiConversationTool!
2783 + """
2784 + The arguments of the tool call.
2785 + """
2786 + rawArgs: JSON
2787 + """
2788 + The result of the tool call.
2789 + """
2790 + rawResult: JSON
2791 + """
2792 + The result of the tool call.
2793 + """
2794 + result: AiConversationNavigateToPageToolCallResult
2795 +}
2796 +
2797 +type AiConversationNavigateToPageToolCallArgs {
2798 + entities: [AiConversationNavigateToPageToolCallArgsEntities!]!
2799 +}
2800 +
2801 +type AiConversationNavigateToPageToolCallArgsEntities {
2802 + entityType: String!
2803 + uuid: String!
2804 +}
2805 +
2806 +type AiConversationNavigateToPageToolCallResult {
2807 + urls: [String!]!
2808 +}
2809 +
2810 +type AiConversationNotifyUsersToolCall implements AiConversationBaseToolCall {
2811 + """
2812 + The arguments to the tool call.
2813 + """
2814 + args: AiConversationNotifyUsersToolCallArgs
2815 + displayInfo: AiConversationToolDisplayInfo!
2816 + """
2817 + The name of the tool that was called.
2818 + """
2819 + name: AiConversationTool!
2820 + """
2821 + The arguments of the tool call.
2822 + """
2823 + rawArgs: JSON
2824 + """
2825 + The result of the tool call.
2826 + """
2827 + rawResult: JSON
2828 + """
2829 + The result of the tool call.
2830 + """
2831 + result: AiConversationNotifyUsersToolCallResult
2832 +}
2833 +
2834 +type AiConversationNotifyUsersToolCallArgs {
2835 + message: String
2836 + summary: String
2837 + userIds: [String!]!
2838 +}
2839 +
2840 +type AiConversationNotifyUsersToolCallResult {
2841 + notifiedUserIds: [String!]
2842 + skippedUserIds: [String!]
2843 +}
2844 +
2845 +"""
2846 +A part in an AI conversation.
2847 +"""
2848 +union AiConversationPart =
2849 + | AiConversationAckPart
2850 + | AiConversationElicitationPart
2851 + | AiConversationElicitationResponsePart
2852 + | AiConversationErrorPart
2853 + | AiConversationEventPart
2854 + | AiConversationPromptPart
2855 + | AiConversationReasoningPart
2856 + | AiConversationTextPart
2857 + | AiConversationToolCallPart
2858 + | AiConversationWidgetPart
2859 +
2860 +"""
2861 +Metadata about a part in an AI conversation.
2862 +"""
2863 +type AiConversationPartMetadata {
2864 + """
2865 + The time when the part ended, as an ISO 8601 string.
2866 + """
2867 + endedAt: String
2868 + """
2869 + The eval log ID of the part.
2870 + """
2871 + evalLogId: String
2872 + """
2873 + AI feedback state for this part.
2874 + """
2875 + feedback: JSONObject
2876 + """
2877 + The phase during which the part was generated.
2878 + """
2879 + phase: AiConversationPartPhase
2880 + """
2881 + The time when the part started, as an ISO 8601 string.
2882 + """
2883 + startedAt: String
2884 + """
2885 + The turn ID of the part.
2886 + """
2887 + turnId: String!
2888 +}
2889 +
2890 +"""
2891 +The phase during which a conversation part was generated.
2892 +"""
2893 +enum AiConversationPartPhase {
2894 + answer
2895 + commentary
2896 +}
2897 +
2898 +"""
2899 +The type of a part in an AI conversation.
2900 +"""
2901 +enum AiConversationPartType {
2902 + ack
2903 + elicitation
2904 + elicitationResponse
2905 + error
2906 + event
2907 + prompt
2908 + reasoning
2909 + text
2910 + toolCall
2911 + widget
2912 + widgetPlaceholder
2913 +}
2914 +
2915 +type AiConversationPatchSettingsToolCall implements AiConversationBaseToolCall {
2916 + """
2917 + The arguments to the tool call.
2918 + """
2919 + args: AiConversationPatchSettingsToolCallArgs
2920 + displayInfo: AiConversationToolDisplayInfo!
2921 + """
2922 + The name of the tool that was called.
2923 + """
2924 + name: AiConversationTool!
2925 + """
2926 + The arguments of the tool call.
2927 + """
2928 + rawArgs: JSON
2929 + """
2930 + The result of the tool call.
2931 + """
2932 + rawResult: JSON
2933 +}
2934 +
2935 +type AiConversationPatchSettingsToolCallArgs {
2936 + ids: [String!]!
2937 +}
2938 +
2939 +type AiConversationPostChatMessageToolCall implements AiConversationBaseToolCall {
2940 + """
2941 + The arguments to the tool call.
2942 + """
2943 + args: AiConversationPostChatMessageToolCallArgs
2944 + displayInfo: AiConversationToolDisplayInfo!
2945 + """
2946 + The name of the tool that was called.
2947 + """
2948 + name: AiConversationTool!
2949 + """
2950 + The arguments of the tool call.
2951 + """
2952 + rawArgs: JSON
2953 + """
2954 + The result of the tool call.
2955 + """
2956 + rawResult: JSON
2957 + """
2958 + The result of the tool call.
2959 + """
2960 + result: AiConversationPostChatMessageToolCallResult
2961 +}
2962 +
2963 +type AiConversationPostChatMessageToolCallArgs {
2964 + channel: String
2965 + isReply: Boolean
2966 + platform: AiConversationPostChatMessageToolCallArgsPlatform!
2967 + recipient: String
2968 + recipientId: String
2969 +}
2970 +
2971 +enum AiConversationPostChatMessageToolCallArgsPlatform {
2972 + microsoftTeams
2973 + slack
2974 +}
2975 +
2976 +type AiConversationPostChatMessageToolCallResult {
2977 + conversationUrl: String
2978 + destination: AiConversationPostChatMessageToolCallResultDestination
2979 + error: String
2980 + message: String
2981 + posted: Boolean!
2982 +}
2983 +
2984 +type AiConversationPostChatMessageToolCallResultDestination {
2985 + channelId: String!
2986 + integrationId: String!
2987 + messageId: String!
2988 + threadId: String!
2989 +}
2990 +
2991 +type AiConversationPromptCodingSessionToolCall implements AiConversationBaseToolCall {
2992 + """
2993 + The arguments to the tool call.
2994 + """
2995 + args: AiConversationPromptCodingSessionToolCallArgs
2996 + displayInfo: AiConversationToolDisplayInfo!
2997 + """
2998 + The name of the tool that was called.
2999 + """
3000 + name: AiConversationTool!
3001 + """
3002 + The arguments of the tool call.
3003 + """
3004 + rawArgs: JSON
3005 + """
3006 + The result of the tool call.
3007 + """
3008 + rawResult: JSON
3009 + """
3010 + The result of the tool call.
3011 + """
3012 + result: AiConversationPromptCodingSessionToolCallResult
3013 +}
3014 +
3015 +type AiConversationPromptCodingSessionToolCallArgs {
3016 + prompt: String!
3017 + queued: Boolean
3018 +}
3019 +
3020 +type AiConversationPromptCodingSessionToolCallResult {
3021 + agentSession: AiConversationSearchEntitiesToolCallResultEntities!
3022 + created: Boolean
3023 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]
3024 + pullRequests: [AiConversationSearchEntitiesToolCallResultEntities!]
3025 + quotaBlocked: Boolean
3026 +}
3027 +
3028 +"""
3029 +A prompt part in an AI conversation.
3030 +"""
3031 +type AiConversationPromptPart implements AiConversationBasePart {
3032 + """
3033 + The Markdown body of the prompt part.
3034 + """
3035 + body: String!
3036 + """
3037 + The data of the prompt part.
3038 + """
3039 + bodyData: JSONObject!
3040 + """
3041 + The ID of the part.
3042 + """
3043 + id: String!
3044 + """
3045 + The metadata of the part.
3046 + """
3047 + metadata: AiConversationPartMetadata!
3048 + """
3049 + The type of the part.
3050 + """
3051 + type: AiConversationPartType!
3052 + """
3053 + The user who created the prompt part.
3054 + """
3055 + user: User
3056 +}
3057 +
3058 +type AiConversationQueryActivityToolCall implements AiConversationBaseToolCall {
3059 + """
3060 + The arguments to the tool call.
3061 + """
3062 + args: AiConversationQueryActivityToolCallArgs
3063 + displayInfo: AiConversationToolDisplayInfo!
3064 + """
3065 + The name of the tool that was called.
3066 + """
3067 + name: AiConversationTool!
3068 + """
3069 + The arguments of the tool call.
3070 + """
3071 + rawArgs: JSON
3072 + """
3073 + The result of the tool call.
3074 + """
3075 + rawResult: JSON
3076 +}
3077 +
3078 +type AiConversationQueryActivityToolCallArgs {
3079 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]
3080 +}
3081 +
3082 +type AiConversationQueryUpdatesToolCall implements AiConversationBaseToolCall {
3083 + """
3084 + The arguments to the tool call.
3085 + """
3086 + args: AiConversationQueryUpdatesToolCallArgs
3087 + displayInfo: AiConversationToolDisplayInfo!
3088 + """
3089 + The name of the tool that was called.
3090 + """
3091 + name: AiConversationTool!
3092 + """
3093 + The arguments of the tool call.
3094 + """
3095 + rawArgs: JSON
3096 + """
3097 + The result of the tool call.
3098 + """
3099 + rawResult: JSON
3100 +}
3101 +
3102 +type AiConversationQueryUpdatesToolCallArgs {
3103 + entity: AiConversationSearchEntitiesToolCallResultEntities
3104 + updateType: AiConversationQueryUpdatesToolCallArgsUpdateType!
3105 +}
3106 +
3107 +enum AiConversationQueryUpdatesToolCallArgsUpdateType {
3108 + InitiativeUpdate
3109 + ProjectUpdate
3110 +}
3111 +
3112 +type AiConversationQueryViewToolCall implements AiConversationBaseToolCall {
3113 + """
3114 + The arguments to the tool call.
3115 + """
3116 + args: AiConversationQueryViewToolCallArgs
3117 + displayInfo: AiConversationToolDisplayInfo!
3118 + """
3119 + The name of the tool that was called.
3120 + """
3121 + name: AiConversationTool!
3122 + """
3123 + The arguments of the tool call.
3124 + """
3125 + rawArgs: JSON
3126 + """
3127 + The result of the tool call.
3128 + """
3129 + rawResult: JSON
3130 +}
3131 +
3132 +type AiConversationQueryViewToolCallArgs {
3133 + filter: String
3134 + mode: AiConversationQueryViewToolCallArgsMode!
3135 + view: AiConversationQueryViewToolCallArgsView!
3136 +}
3137 +
3138 +enum AiConversationQueryViewToolCallArgsMode {
3139 + insight
3140 + list
3141 +}
3142 +
3143 +type AiConversationQueryViewToolCallArgsView {
3144 + group: AiConversationSearchEntitiesToolCallResultEntities
3145 + predefinedView: String
3146 + type: String!
3147 +}
3148 +
3149 +type AiConversationReadFileToolCall implements AiConversationBaseToolCall {
3150 + """
3151 + The arguments to the tool call.
3152 + """
3153 + args: AiConversationReadFileToolCallArgs
3154 + displayInfo: AiConversationToolDisplayInfo!
3155 + """
3156 + The name of the tool that was called.
3157 + """
3158 + name: AiConversationTool!
3159 + """
3160 + The arguments of the tool call.
3161 + """
3162 + rawArgs: JSON
3163 + """
3164 + The result of the tool call.
3165 + """
3166 + rawResult: JSON
3167 +}
3168 +
3169 +type AiConversationReadFileToolCallArgs {
3170 + assetUrl: String
3171 + mode: AiConversationReadFileToolCallArgsMode
3172 + name: String
3173 + query: String
3174 +}
3175 +
3176 +enum AiConversationReadFileToolCallArgsMode {
3177 + read
3178 + search
3179 +}
3180 +
3181 +type AiConversationReadSandboxFileToolCall implements AiConversationBaseToolCall {
3182 + """
3183 + The arguments to the tool call.
3184 + """
3185 + args: AiConversationReadSandboxFileToolCallArgs
3186 + displayInfo: AiConversationToolDisplayInfo!
3187 + """
3188 + The name of the tool that was called.
3189 + """
3190 + name: AiConversationTool!
3191 + """
3192 + The arguments of the tool call.
3193 + """
3194 + rawArgs: JSON
3195 + """
3196 + The result of the tool call.
3197 + """
3198 + rawResult: JSON
3199 +}
3200 +
3201 +type AiConversationReadSandboxFileToolCallArgs {
3202 + path: String!
3203 +}
3204 +
3205 +type AiConversationReadSettingToolCall implements AiConversationBaseToolCall {
3206 + """
3207 + The arguments to the tool call.
3208 + """
3209 + args: AiConversationReadSettingToolCallArgs
3210 + displayInfo: AiConversationToolDisplayInfo!
3211 + """
3212 + The name of the tool that was called.
3213 + """
3214 + name: AiConversationTool!
3215 + """
3216 + The arguments of the tool call.
3217 + """
3218 + rawArgs: JSON
3219 + """
3220 + The result of the tool call.
3221 + """
3222 + rawResult: JSON
3223 +}
3224 +
3225 +type AiConversationReadSettingToolCallArgs {
3226 + id: String!
3227 +}
3228 +
3229 +"""
3230 +A reasoning part in an AI conversation.
3231 +"""
3232 +type AiConversationReasoningPart implements AiConversationBasePart {
3233 + """
3234 + The Markdown body of the reasoning part.
3235 + """
3236 + body: String!
3237 + """
3238 + The data of the reasoning part.
3239 + """
3240 + bodyData: JSONObject!
3241 + """
3242 + The ID of the part.
3243 + """
3244 + id: String!
3245 + """
3246 + The metadata of the part.
3247 + """
3248 + metadata: AiConversationPartMetadata!
3249 + """
3250 + The title of the reasoning part.
3251 + """
3252 + title: String
3253 + """
3254 + The type of the part.
3255 + """
3256 + type: AiConversationPartType!
3257 +}
3258 +
3259 +type AiConversationRemoveSpendLimitToolCall implements AiConversationBaseToolCall {
3260 + """
3261 + The arguments to the tool call.
3262 + """
3263 + args: AiConversationRemoveSpendLimitToolCallArgs
3264 + displayInfo: AiConversationToolDisplayInfo!
3265 + """
3266 + The name of the tool that was called.
3267 + """
3268 + name: AiConversationTool!
3269 + """
3270 + The arguments of the tool call.
3271 + """
3272 + rawArgs: JSON
3273 + """
3274 + The result of the tool call.
3275 + """
3276 + rawResult: JSON
3277 +}
3278 +
3279 +type AiConversationRemoveSpendLimitToolCallArgs {
3280 + summary: String
3281 +}
3282 +
3283 +type AiConversationRenameAgentChatToolCall implements AiConversationBaseToolCall {
3284 + """
3285 + The arguments to the tool call.
3286 + """
3287 + args: AiConversationRenameAgentChatToolCallArgs
3288 + displayInfo: AiConversationToolDisplayInfo!
3289 + """
3290 + The name of the tool that was called.
3291 + """
3292 + name: AiConversationTool!
3293 + """
3294 + The arguments of the tool call.
3295 + """
3296 + rawArgs: JSON
3297 + """
3298 + The result of the tool call.
3299 + """
3300 + rawResult: JSON
3301 +}
3302 +
3303 +type AiConversationRenameAgentChatToolCallArgs {
3304 + name: String!
3305 +}
3306 +
3307 +type AiConversationRerunPullRequestReviewToolCall implements AiConversationBaseToolCall {
3308 + """
3309 + The arguments to the tool call.
3310 + """
3311 + args: AiConversationRerunPullRequestReviewToolCallArgs
3312 + displayInfo: AiConversationToolDisplayInfo!
3313 + """
3314 + The name of the tool that was called.
3315 + """
3316 + name: AiConversationTool!
3317 + """
3318 + The arguments of the tool call.
3319 + """
3320 + rawArgs: JSON
3321 + """
3322 + The result of the tool call.
3323 + """
3324 + rawResult: JSON
3325 +}
3326 +
3327 +type AiConversationRerunPullRequestReviewToolCallArgs {
3328 + entity: AiConversationSearchEntitiesToolCallResultEntities!
3329 +}
3330 +
3331 +type AiConversationResearchToolCall implements AiConversationBaseToolCall {
3332 + """
3333 + The arguments to the tool call.
3334 + """
3335 + args: AiConversationResearchToolCallArgs
3336 + displayInfo: AiConversationToolDisplayInfo!
3337 + """
3338 + The name of the tool that was called.
3339 + """
3340 + name: AiConversationTool!
3341 + """
3342 + The arguments of the tool call.
3343 + """
3344 + rawArgs: JSON
3345 + """
3346 + The result of the tool call.
3347 + """
3348 + rawResult: JSON
3349 + """
3350 + The result of the tool call.
3351 + """
3352 + result: AiConversationResearchToolCallResult
3353 +}
3354 +
3355 +type AiConversationResearchToolCallArgs {
3356 + context: String!
3357 + query: String!
3358 + subjects: [AiConversationSearchEntitiesToolCallResultEntities!]
3359 +}
3360 +
3361 +type AiConversationResearchToolCallResult {
3362 + progressId: String
3363 +}
3364 +
3365 +type AiConversationRestoreEntityToolCall implements AiConversationBaseToolCall {
3366 + """
3367 + The arguments to the tool call.
3368 + """
3369 + args: AiConversationRestoreEntityToolCallArgs
3370 + displayInfo: AiConversationToolDisplayInfo!
3371 + """
3372 + The name of the tool that was called.
3373 + """
3374 + name: AiConversationTool!
3375 + """
3376 + The arguments of the tool call.
3377 + """
3378 + rawArgs: JSON
3379 + """
3380 + The result of the tool call.
3381 + """
3382 + rawResult: JSON
3383 + """
3384 + The result of the tool call.
3385 + """
3386 + result: AiConversationRestoreEntityToolCallResult
3387 +}
3388 +
3389 +type AiConversationRestoreEntityToolCallArgs {
3390 + entity: AiConversationSearchEntitiesToolCallResultEntities!
3391 +}
3392 +
3393 +type AiConversationRestoreEntityToolCallResult {
3394 + restoredEntities: [AiConversationCreateEntityToolCallResultCreatedEntities!]
3395 +}
3396 +
3397 +type AiConversationRetrieveEntitiesToolCall implements AiConversationBaseToolCall {
3398 + """
3399 + The arguments to the tool call.
3400 + """
3401 + args: AiConversationRetrieveEntitiesToolCallArgs
3402 + displayInfo: AiConversationToolDisplayInfo!
3403 + """
3404 + The name of the tool that was called.
3405 + """
3406 + name: AiConversationTool!
3407 + """
3408 + The arguments of the tool call.
3409 + """
3410 + rawArgs: JSON
3411 + """
3412 + The result of the tool call.
3413 + """
3414 + rawResult: JSON
3415 +}
3416 +
3417 +type AiConversationRetrieveEntitiesToolCallArgs {
3418 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]!
3419 +}
3420 +
3421 +type AiConversationRetryPullRequestCheckToolCall implements AiConversationBaseToolCall {
3422 + """
3423 + The arguments to the tool call.
3424 + """
3425 + args: AiConversationRetryPullRequestCheckToolCallArgs
3426 + displayInfo: AiConversationToolDisplayInfo!
3427 + """
3428 + The name of the tool that was called.
3429 + """
3430 + name: AiConversationTool!
3431 + """
3432 + The arguments of the tool call.
3433 + """
3434 + rawArgs: JSON
3435 + """
3436 + The result of the tool call.
3437 + """
3438 + rawResult: JSON
3439 +}
3440 +
3441 +type AiConversationRetryPullRequestCheckToolCallArgs {
3442 + checkName: String!
3443 + entity: AiConversationSearchEntitiesToolCallResultEntities!
3444 + workflowName: String
3445 +}
3446 +
3447 +type AiConversationRunLoopToolCall implements AiConversationBaseToolCall {
3448 + """
3449 + The arguments to the tool call.
3450 + """
3451 + args: AiConversationRunLoopToolCallArgs
3452 + displayInfo: AiConversationToolDisplayInfo!
3453 + """
3454 + The name of the tool that was called.
3455 + """
3456 + name: AiConversationTool!
3457 + """
3458 + The arguments of the tool call.
3459 + """
3460 + rawArgs: JSON
3461 + """
3462 + The result of the tool call.
3463 + """
3464 + rawResult: JSON
3465 + """
3466 + The result of the tool call.
3467 + """
3468 + result: AiConversationRunLoopToolCallResult
3469 +}
3470 +
3471 +type AiConversationRunLoopToolCallArgs {
3472 + workflowDefinitionId: String!
3473 +}
3474 +
3475 +type AiConversationRunLoopToolCallResult {
3476 + conversationId: String!
3477 + createdEntities: [AiConversationCreateEntityToolCallResultCreatedEntities!]
3478 + url: String!
3479 +}
3480 +
3481 +type AiConversationSandboxGitHistoryToolCall implements AiConversationBaseToolCall {
3482 + """
3483 + The arguments to the tool call.
3484 + """
3485 + args: AiConversationSandboxGitHistoryToolCallArgs
3486 + displayInfo: AiConversationToolDisplayInfo!
3487 + """
3488 + The name of the tool that was called.
3489 + """
3490 + name: AiConversationTool!
3491 + """
3492 + The arguments of the tool call.
3493 + """
3494 + rawArgs: JSON
3495 + """
3496 + The result of the tool call.
3497 + """
3498 + rawResult: JSON
3499 +}
3500 +
3501 +type AiConversationSandboxGitHistoryToolCallArgs {
3502 + operation: AiConversationSandboxGitHistoryToolCallArgsOperation!
3503 + paths: [String!]
3504 +}
3505 +
3506 +enum AiConversationSandboxGitHistoryToolCallArgsOperation {
3507 + blame
3508 + log
3509 + search
3510 + show
3511 +}
3512 +
3513 +type AiConversationSearchChatChannelsToolCall implements AiConversationBaseToolCall {
3514 + """
3515 + The arguments to the tool call.
3516 + """
3517 + args: AiConversationSearchChatChannelsToolCallArgs
3518 + displayInfo: AiConversationToolDisplayInfo!
3519 + """
3520 + The name of the tool that was called.
3521 + """
3522 + name: AiConversationTool!
3523 + """
3524 + The arguments of the tool call.
3525 + """
3526 + rawArgs: JSON
3527 + """
3528 + The result of the tool call.
3529 + """
3530 + rawResult: JSON
3531 + """
3532 + The result of the tool call.
3533 + """
3534 + result: AiConversationSearchChatChannelsToolCallResult
3535 +}
3536 +
3537 +type AiConversationSearchChatChannelsToolCallArgs {
3538 + filter: String!
3539 + platform: AiConversationPostChatMessageToolCallArgsPlatform!
3540 +}
3541 +
3542 +type AiConversationSearchChatChannelsToolCallResult {
3543 + totalCount: Float!
3544 +}
3545 +
3546 +type AiConversationSearchDocumentationToolCall implements AiConversationBaseToolCall {
3547 + displayInfo: AiConversationToolDisplayInfo!
3548 + """
3549 + The name of the tool that was called.
3550 + """
3551 + name: AiConversationTool!
3552 + """
3553 + The arguments of the tool call.
3554 + """
3555 + rawArgs: JSON
3556 + """
3557 + The result of the tool call.
3558 + """
3559 + rawResult: JSON
3560 +}
3561 +
3562 +type AiConversationSearchEntitiesToolCall implements AiConversationBaseToolCall {
3563 + """
3564 + The arguments to the tool call.
3565 + """
3566 + args: AiConversationSearchEntitiesToolCallArgs
3567 + displayInfo: AiConversationToolDisplayInfo!
3568 + """
3569 + The name of the tool that was called.
3570 + """
3571 + name: AiConversationTool!
3572 + """
3573 + The arguments of the tool call.
3574 + """
3575 + rawArgs: JSON
3576 + """
3577 + The result of the tool call.
3578 + """
3579 + rawResult: JSON
3580 + """
3581 + The result of the tool call.
3582 + """
3583 + result: AiConversationSearchEntitiesToolCallResult
3584 +}
3585 +
3586 +type AiConversationSearchEntitiesToolCallArgs {
3587 + queries: [String!]!
3588 + type: String
3589 +}
3590 +
3591 +type AiConversationSearchEntitiesToolCallResult {
3592 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]!
3593 +}
3594 +
3595 +type AiConversationSearchEntitiesToolCallResultEntities {
3596 + id: String!
3597 + type: String!
3598 +}
3599 +
3600 +type AiConversationSearchSettingsToolCall implements AiConversationBaseToolCall {
3601 + """
3602 + The arguments to the tool call.
3603 + """
3604 + args: AiConversationSearchSettingsToolCallArgs
3605 + displayInfo: AiConversationToolDisplayInfo!
3606 + """
3607 + The name of the tool that was called.
3608 + """
3609 + name: AiConversationTool!
3610 + """
3611 + The arguments of the tool call.
3612 + """
3613 + rawArgs: JSON
3614 + """
3615 + The result of the tool call.
3616 + """
3617 + rawResult: JSON
3618 +}
3619 +
3620 +type AiConversationSearchSettingsToolCallArgs {
3621 + parentId: String
3622 + query: String
3623 +}
3624 +
3625 +type AiConversationSetSpendLimitToolCall implements AiConversationBaseToolCall {
3626 + """
3627 + The arguments to the tool call.
3628 + """
3629 + args: AiConversationSetSpendLimitToolCallArgs
3630 + displayInfo: AiConversationToolDisplayInfo!
3631 + """
3632 + The name of the tool that was called.
3633 + """
3634 + name: AiConversationTool!
3635 + """
3636 + The arguments of the tool call.
3637 + """
3638 + rawArgs: JSON
3639 + """
3640 + The result of the tool call.
3641 + """
3642 + rawResult: JSON
3643 +}
3644 +
3645 +type AiConversationSetSpendLimitToolCallArgs {
3646 + summary: String
3647 +}
3648 +
3649 +type AiConversationSettingWidget implements AiConversationBaseWidget {
3650 + """
3651 + The arguments to the widget.
3652 + """
3653 + args: AiConversationSettingWidgetArgs
3654 + """
3655 + Display information for the widget, including ProseMirror and Markdown representations.
3656 + """
3657 + displayInfo: AiConversationWidgetDisplayInfo
3658 + """
3659 + The name of the widget.
3660 + """
3661 + name: AiConversationWidgetName!
3662 + """
3663 + The arguments of the widget.
3664 + """
3665 + rawArgs: JSON
3666 +}
3667 +
3668 +type AiConversationSettingWidgetArgs {
3669 + """
3670 + The stable semantic setting ID returned by SearchSettings
3671 + """
3672 + id: String!
3673 + """
3674 + The settings target when the setting scope does not imply it
3675 + """
3676 + target: AiConversationSettingWidgetArgsTarget
3677 +}
3678 +
3679 +type AiConversationSettingWidgetArgsTarget {
3680 + """
3681 + The settings target UUID, when the scope does not imply it
3682 + """
3683 + id: String
3684 + """
3685 + The settings target entity type
3686 + """
3687 + type: String!
3688 +}
3689 +
3690 +type AiConversationSpawnSubagentToolCall implements AiConversationBaseToolCall {
3691 + """
3692 + The arguments to the tool call.
3693 + """
3694 + args: AiConversationSpawnSubagentToolCallArgs
3695 + displayInfo: AiConversationToolDisplayInfo!
3696 + """
3697 + The name of the tool that was called.
3698 + """
3699 + name: AiConversationTool!
3700 + """
3701 + The arguments of the tool call.
3702 + """
3703 + rawArgs: JSON
3704 + """
3705 + The result of the tool call.
3706 + """
3707 + rawResult: JSON
3708 + """
3709 + The result of the tool call.
3710 + """
3711 + result: AiConversationSpawnSubagentToolCallResult
3712 +}
3713 +
3714 +type AiConversationSpawnSubagentToolCallArgs {
3715 + description: String!
3716 +}
3717 +
3718 +type AiConversationSpawnSubagentToolCallResult {
3719 + conversationId: String!
3720 +}
3721 +
3722 +type AiConversationStartCodingSessionToolCall implements AiConversationBaseToolCall {
3723 + """
3724 + The arguments to the tool call.
3725 + """
3726 + args: AiConversationStartCodingSessionToolCallArgs
3727 + displayInfo: AiConversationToolDisplayInfo!
3728 + """
3729 + The name of the tool that was called.
3730 + """
3731 + name: AiConversationTool!
3732 + """
3733 + The arguments of the tool call.
3734 + """
3735 + rawArgs: JSON
3736 + """
3737 + The result of the tool call.
3738 + """
3739 + rawResult: JSON
3740 + """
3741 + The result of the tool call.
3742 + """
3743 + result: AiConversationStartCodingSessionToolCallResult
3744 +}
3745 +
3746 +type AiConversationStartCodingSessionToolCallArgs {
3747 + prompt: String!
3748 +}
3749 +
3750 +type AiConversationStartCodingSessionToolCallResult {
3751 + agentSession: AiConversationSearchEntitiesToolCallResultEntities!
3752 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]
3753 + pullRequests: [AiConversationSearchEntitiesToolCallResultEntities!]
3754 +}
3755 +
3756 +"""
3757 +The status of an AI conversation.
3758 +"""
3759 +enum AiConversationStatus {
3760 + active
3761 + awaitingInput
3762 + complete
3763 + error
3764 + pending
3765 + waiting
3766 +}
3767 +
3768 +type AiConversationSubscribeToEventToolCall implements AiConversationBaseToolCall {
3769 + """
3770 + The arguments to the tool call.
3771 + """
3772 + args: AiConversationSubscribeToEventToolCallArgs
3773 + displayInfo: AiConversationToolDisplayInfo!
3774 + """
3775 + The name of the tool that was called.
3776 + """
3777 + name: AiConversationTool!
3778 + """
3779 + The arguments of the tool call.
3780 + """
3781 + rawArgs: JSON
3782 + """
3783 + The result of the tool call.
3784 + """
3785 + rawResult: JSON
3786 +}
3787 +
3788 +type AiConversationSubscribeToEventToolCallArgs {
3789 + endsAt: String
3790 + kind: AiConversationSubscribeToEventToolCallArgsKind
3791 + message: String
3792 + subscriptionId: String
3793 + type: AiConversationSubscribeToEventToolCallArgsType!
3794 +}
3795 +
3796 +enum AiConversationSubscribeToEventToolCallArgsKind {
3797 + timer
3798 + trigger
3799 +}
3800 +
3801 +enum AiConversationSubscribeToEventToolCallArgsType {
3802 + once
3803 + recurring
3804 +}
3805 +
3806 +type AiConversationSuggestRepositoryToolCall implements AiConversationBaseToolCall {
3807 + displayInfo: AiConversationToolDisplayInfo!
3808 + """
3809 + The name of the tool that was called.
3810 + """
3811 + name: AiConversationTool!
3812 + """
3813 + The arguments of the tool call.
3814 + """
3815 + rawArgs: JSON
3816 + """
3817 + The result of the tool call.
3818 + """
3819 + rawResult: JSON
3820 +}
3821 +
3822 +type AiConversationSuggestValuesToolCall implements AiConversationBaseToolCall {
3823 + """
3824 + The arguments to the tool call.
3825 + """
3826 + args: AiConversationSuggestValuesToolCallArgs
3827 + displayInfo: AiConversationToolDisplayInfo!
3828 + """
3829 + The name of the tool that was called.
3830 + """
3831 + name: AiConversationTool!
3832 + """
3833 + The arguments of the tool call.
3834 + """
3835 + rawArgs: JSON
3836 + """
3837 + The result of the tool call.
3838 + """
3839 + rawResult: JSON
3840 +}
3841 +
3842 +type AiConversationSuggestValuesToolCallArgs {
3843 + field: String!
3844 + query: String
3845 +}
3846 +
3847 +"""
3848 +A text part in an AI conversation.
3849 +"""
3850 +type AiConversationTextPart implements AiConversationBasePart {
3851 + """
3852 + The Markdown body of the text part.
3853 + """
3854 + body: String!
3855 + """
3856 + The data of the text part.
3857 + """
3858 + bodyData: JSONObject!
3859 + """
3860 + The ID of the part.
3861 + """
3862 + id: String!
3863 + """
3864 + The metadata of the part.
3865 + """
3866 + metadata: AiConversationPartMetadata!
3867 + """
3868 + The type of the part.
3869 + """
3870 + type: AiConversationPartType!
3871 +}
3872 +
3873 +"""
3874 +The name of a tool that was called in an AI conversation.
3875 +"""
3876 +enum AiConversationTool {
3877 + Bash
3878 + CodeIntelligence
3879 + CodeMode
3880 + ContactSupport
3881 + CreateAgentChat
3882 + CreateEntity
3883 + CreateSandbox
3884 + DeleteEntity
3885 + GetMicrosoftTeamsConversationHistory
3886 + GetPullRequestCheckLogs
3887 + GetPullRequestDiff
3888 + GetPullRequestFile
3889 + GetSlackConversationHistory
3890 + HandoffToCodingSession
3891 + InvokeMcpTool
3892 + ListCodingSessions
3893 + Memory
3894 + MessageSubagent
3895 + NavigateToPage
3896 + NotifyUsers
3897 + PatchSettings
3898 + PostChatMessage
3899 + PromptCodingSession
3900 + QueryActivity
3901 + QueryUpdates
3902 + QueryView
3903 + ReadFile
3904 + ReadSandboxFile
3905 + ReadSetting
3906 + RemoveSpendLimit
3907 + RenameAgentChat
3908 + RerunPullRequestReview
3909 + Research
3910 + RestoreEntity
3911 + RetrieveEntities
3912 + RetryPullRequestCheck
3913 + RunLoop
3914 + SandboxGitHistory
3915 + SearchChatChannels
3916 + SearchDocumentation
3917 + SearchEntities
3918 + SearchSettings
3919 + SetSpendLimit
3920 + SpawnSubagent
3921 + StartCodingSession
3922 + SubscribeToEvent
3923 + SuggestRepository
3924 + SuggestValues
3925 + TranscribeMedia
3926 + TranscribeVideo
3927 + UnsubscribeFromEvent
3928 + UpdateEntity
3929 + UpdatePullRequestReviewFinding
3930 + WebSearch
3931 +}
3932 +
3933 +"""
3934 +The tool call.
3935 +"""
3936 +union AiConversationToolCall =
3937 + | AiConversationBashToolCall
3938 + | AiConversationCodeIntelligenceToolCall
3939 + | AiConversationCodeModeToolCall
3940 + | AiConversationContactSupportToolCall
3941 + | AiConversationCreateAgentChatToolCall
3942 + | AiConversationCreateEntityToolCall
3943 + | AiConversationCreateSandboxToolCall
3944 + | AiConversationDeleteEntityToolCall
3945 + | AiConversationGetMicrosoftTeamsConversationHistoryToolCall
3946 + | AiConversationGetPullRequestCheckLogsToolCall
3947 + | AiConversationGetPullRequestDiffToolCall
3948 + | AiConversationGetPullRequestFileToolCall
3949 + | AiConversationGetSlackConversationHistoryToolCall
3950 + | AiConversationHandoffToCodingSessionToolCall
3951 + | AiConversationInvokeMcpToolToolCall
3952 + | AiConversationListCodingSessionsToolCall
3953 + | AiConversationMemoryToolCall
3954 + | AiConversationMessageSubagentToolCall
3955 + | AiConversationNavigateToPageToolCall
3956 + | AiConversationNotifyUsersToolCall
3957 + | AiConversationPatchSettingsToolCall
3958 + | AiConversationPostChatMessageToolCall
3959 + | AiConversationPromptCodingSessionToolCall
3960 + | AiConversationQueryActivityToolCall
3961 + | AiConversationQueryUpdatesToolCall
3962 + | AiConversationQueryViewToolCall
3963 + | AiConversationReadFileToolCall
3964 + | AiConversationReadSandboxFileToolCall
3965 + | AiConversationReadSettingToolCall
3966 + | AiConversationRemoveSpendLimitToolCall
3967 + | AiConversationRenameAgentChatToolCall
3968 + | AiConversationRerunPullRequestReviewToolCall
3969 + | AiConversationResearchToolCall
3970 + | AiConversationRestoreEntityToolCall
3971 + | AiConversationRetrieveEntitiesToolCall
3972 + | AiConversationRetryPullRequestCheckToolCall
3973 + | AiConversationRunLoopToolCall
3974 + | AiConversationSandboxGitHistoryToolCall
3975 + | AiConversationSearchChatChannelsToolCall
3976 + | AiConversationSearchDocumentationToolCall
3977 + | AiConversationSearchEntitiesToolCall
3978 + | AiConversationSearchSettingsToolCall
3979 + | AiConversationSetSpendLimitToolCall
3980 + | AiConversationSpawnSubagentToolCall
3981 + | AiConversationStartCodingSessionToolCall
3982 + | AiConversationSubscribeToEventToolCall
3983 + | AiConversationSuggestRepositoryToolCall
3984 + | AiConversationSuggestValuesToolCall
3985 + | AiConversationTranscribeMediaToolCall
3986 + | AiConversationTranscribeVideoToolCall
3987 + | AiConversationUnsubscribeFromEventToolCall
3988 + | AiConversationUpdateEntityToolCall
3989 + | AiConversationUpdatePullRequestReviewFindingToolCall
3990 + | AiConversationWebSearchToolCall
3991 +
3992 +"""
3993 +A tool call part in an AI conversation.
3994 +"""
3995 +type AiConversationToolCallPart implements AiConversationBasePart {
3996 + """
3997 + The ID of the part.
3998 + """
3999 + id: String!
4000 + """
4001 + The metadata of the part.
4002 + """
4003 + metadata: AiConversationPartMetadata!
4004 + """
4005 + The tool call part.
4006 + """
4007 + toolCall: AiConversationToolCall!
4008 + """
4009 + The type of the part.
4010 + """
4011 + type: AiConversationPartType!
4012 +}
4013 +
4014 +type AiConversationToolDisplayInfo {
4015 + activeLabel: String!
4016 + detail: String
4017 + icon: String!
4018 + inactiveLabel: String!
4019 + result: String
4020 +}
4021 +
4022 +type AiConversationTranscribeMediaToolCall implements AiConversationBaseToolCall {
4023 + displayInfo: AiConversationToolDisplayInfo!
4024 + """
4025 + The name of the tool that was called.
4026 + """
4027 + name: AiConversationTool!
4028 + """
4029 + The arguments of the tool call.
4030 + """
4031 + rawArgs: JSON
4032 + """
4033 + The result of the tool call.
4034 + """
4035 + rawResult: JSON
4036 +}
4037 +
4038 +type AiConversationTranscribeVideoToolCall implements AiConversationBaseToolCall {
4039 + displayInfo: AiConversationToolDisplayInfo!
4040 + """
4041 + The name of the tool that was called.
4042 + """
4043 + name: AiConversationTool!
4044 + """
4045 + The arguments of the tool call.
4046 + """
4047 + rawArgs: JSON
4048 + """
4049 + The result of the tool call.
4050 + """
4051 + rawResult: JSON
4052 +}
4053 +
4054 +type AiConversationUnsubscribeFromEventToolCall implements AiConversationBaseToolCall {
4055 + """
4056 + The arguments to the tool call.
4057 + """
4058 + args: AiConversationUnsubscribeFromEventToolCallArgs
4059 + displayInfo: AiConversationToolDisplayInfo!
4060 + """
4061 + The name of the tool that was called.
4062 + """
4063 + name: AiConversationTool!
4064 + """
4065 + The arguments of the tool call.
4066 + """
4067 + rawArgs: JSON
4068 + """
4069 + The result of the tool call.
4070 + """
4071 + rawResult: JSON
4072 +}
4073 +
4074 +type AiConversationUnsubscribeFromEventToolCallArgs {
4075 + message: String
4076 + subscriptionId: String!
4077 +}
4078 +
4079 +type AiConversationUpdateEntityToolCall implements AiConversationBaseToolCall {
4080 + """
4081 + The arguments to the tool call.
4082 + """
4083 + args: AiConversationUpdateEntityToolCallArgs
4084 + displayInfo: AiConversationToolDisplayInfo!
4085 + """
4086 + The name of the tool that was called.
4087 + """
4088 + name: AiConversationTool!
4089 + """
4090 + The arguments of the tool call.
4091 + """
4092 + rawArgs: JSON
4093 + """
4094 + The result of the tool call.
4095 + """
4096 + rawResult: JSON
4097 + """
4098 + The result of the tool call.
4099 + """
4100 + result: AiConversationUpdateEntityToolCallResult
4101 +}
4102 +
4103 +type AiConversationUpdateEntityToolCallArgs {
4104 + entities: [AiConversationSearchEntitiesToolCallResultEntities!]
4105 + entity: AiConversationSearchEntitiesToolCallResultEntities
4106 +}
4107 +
4108 +type AiConversationUpdateEntityToolCallResult {
4109 + startedAgentSessions: [AiConversationSearchEntitiesToolCallResultEntities!]
4110 + updatedEntities: [AiConversationCreateEntityToolCallResultCreatedEntities!]
4111 +}
4112 +
4113 +type AiConversationUpdatePullRequestReviewFindingToolCall implements AiConversationBaseToolCall {
4114 + """
4115 + The arguments to the tool call.
4116 + """
4117 + args: AiConversationUpdatePullRequestReviewFindingToolCallArgs
4118 + displayInfo: AiConversationToolDisplayInfo!
4119 + """
4120 + The name of the tool that was called.
4121 + """
4122 + name: AiConversationTool!
4123 + """
4124 + The arguments of the tool call.
4125 + """
4126 + rawArgs: JSON
4127 + """
4128 + The result of the tool call.
4129 + """
4130 + rawResult: JSON
4131 +}
4132 +
4133 +type AiConversationUpdatePullRequestReviewFindingToolCallArgs {
4134 + entity: AiConversationSearchEntitiesToolCallResultEntities!
4135 + findingId: String!
4136 + rejected: Boolean!
4137 +}
4138 +
4139 +"""
4140 +[Internal] Per-user state for an AI conversation, tracking read status and other user-specific data.
4141 +"""
4142 +type AiConversationUserState {
4143 + """
4144 + The ID of the elicitation part the user dismissed.
4145 + """
4146 + dismissedElicitationId: String
4147 + """
4148 + The time at which the user most recently viewed the conversation.
4149 + """
4150 + lastReadAt: DateTime
4151 + """
4152 + The ID of the user this state belongs to.
4153 + """
4154 + userId: String!
4155 +}
4156 +
4157 +type AiConversationWebSearchToolCall implements AiConversationBaseToolCall {
4158 + """
4159 + The arguments to the tool call.
4160 + """
4161 + args: AiConversationWebSearchToolCallArgs
4162 + displayInfo: AiConversationToolDisplayInfo!
4163 + """
4164 + The name of the tool that was called.
4165 + """
4166 + name: AiConversationTool!
4167 + """
4168 + The arguments of the tool call.
4169 + """
4170 + rawArgs: JSON
4171 + """
4172 + The result of the tool call.
4173 + """
4174 + rawResult: JSON
4175 +}
4176 +
4177 +type AiConversationWebSearchToolCallArgs {
4178 + query: String
4179 + url: String
4180 +}
4181 +
4182 +"""
4183 +The widget.
4184 +"""
4185 +union AiConversationWidget =
4186 + | AiConversationEntityCardWidget
4187 + | AiConversationEntityListWidget
4188 + | AiConversationSettingWidget
4189 +
4190 +type AiConversationWidgetDisplayInfo {
4191 + """
4192 + The Markdown representation of the widget content.
4193 + """
4194 + body: String!
4195 + """
4196 + The ProseMirror data representation of the widget content.
4197 + """
4198 + bodyData: JSONObject!
4199 +}
4200 +
4201 +"""
4202 +The name of a widget in an AI conversation.
4203 +"""
4204 +enum AiConversationWidgetName {
4205 + EntityCard
4206 + EntityList
4207 + Setting
4208 +}
4209 +
4210 +"""
4211 +A widget part in an AI conversation.
4212 +"""
4213 +type AiConversationWidgetPart implements AiConversationBasePart {
4214 + """
4215 + The ID of the part.
4216 + """
4217 + id: String!
4218 + """
4219 + The metadata of the part.
4220 + """
4221 + metadata: AiConversationPartMetadata!
4222 + """
4223 + The type of the part.
4224 + """
4225 + type: AiConversationPartType!
4226 + """
4227 + The widget.
4228 + """
4229 + widget: AiConversationWidget!
4230 +}
4231 +
4232 +"""
4233 +[Internal] Tracks the progress and state of an AI prompt workflow execution. Each progress record is associated with an issue or comment and contains the workflow type, current status, metadata about the execution, and optionally the conversation messages exchanged during the workflow. Progress records can form a hierarchy via parent-child relationships for multi-step workflows.
4234 +"""
4235 +type AiPromptProgress implements Node {
4236 + """
4237 + The time at which the entity was archived. Null if the entity has not been archived.
4238 + """
4239 + archivedAt: DateTime
4240 + """
4241 + The time at which the entity was created.
4242 + """
4243 + createdAt: DateTime!
4244 + """
4245 + The unique identifier of the entity.
4246 + """
4247 + id: ID!
4248 + """
4249 + [Internal] The log ID for the prompt workflow, if available.
4250 + """
4251 + logId: String
4252 + """
4253 + [Internal] The metadata for the prompt workflow.
4254 + """
4255 + metadata: JSONObject!
4256 + """
4257 + [Internal] The status of the prompt workflow.
4258 + """
4259 + status: AiPromptProgressStatus!
4260 + """
4261 + [Internal] The type of AI prompt workflow.
4262 + """
4263 + type: AiPromptType!
4264 + """
4265 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
4266 + been updated after creation.
4267 + """
4268 + updatedAt: DateTime!
4269 +}
4270 +
4271 +type AiPromptProgressConnection {
4272 + edges: [AiPromptProgressEdge!]!
4273 + nodes: [AiPromptProgress!]!
4274 + pageInfo: PageInfo!
4275 +}
4276 +
4277 +type AiPromptProgressEdge {
4278 + """
4279 + Used in `before` and `after` args
4280 + """
4281 + cursor: String!
4282 + node: AiPromptProgress!
4283 +}
4284 +
4285 +"""
4286 +[Internal] AI prompt progress filtering options.
4287 +"""
4288 +input AiPromptProgressFilter {
4289 + """
4290 + [Internal] Compound filters, all of which need to be matched by the AI prompt progress.
4291 + """
4292 + and: [AiPromptProgressFilter!]
4293 + """
4294 + Comparator for the created at date.
4295 + """
4296 + createdAt: DateComparator
4297 + """
4298 + Comparator for the identifier.
4299 + """
4300 + id: IDComparator
4301 + """
4302 + [Internal] Compound filters, one of which need to be matched by the AI prompt progress.
4303 + """
4304 + or: [AiPromptProgressFilter!]
4305 + """
4306 + [Internal] Comparator for the AI prompt workflow status.
4307 + """
4308 + status: AiPromptProgressStatusComparator
4309 + """
4310 + [Internal] Comparator for the AI prompt workflow type.
4311 + """
4312 + type: AiPromptTypeComparator
4313 + """
4314 + Comparator for the updated at date.
4315 + """
4316 + updatedAt: DateComparator
4317 +}
4318 +
4319 +"""
4320 +[Internal] The status of a prompt workflow.
4321 +"""
4322 +enum AiPromptProgressStatus {
4323 + canceled
4324 + created
4325 + failed
4326 + finished
4327 + inProgress
4328 +}
4329 +
4330 +"""
4331 +[Internal] Comparator for the AI prompt workflow status.
4332 +"""
4333 +input AiPromptProgressStatusComparator {
4334 + """
4335 + Equals constraint.
4336 + """
4337 + eq: AiPromptProgressStatus
4338 + """
4339 + In-array constraint.
4340 + """
4341 + in: [AiPromptProgressStatus!]
4342 + """
4343 + Not-equals constraint.
4344 + """
4345 + neq: AiPromptProgressStatus
4346 + """
4347 + Not-in-array constraint.
4348 + """
4349 + nin: [AiPromptProgressStatus!]
4350 + """
4351 + Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values.
4352 + """
4353 + null: Boolean
4354 +}
4355 +
4356 +"""
4357 +[Internal] Filter for AI prompt progress subscription events.
4358 +"""
4359 +input AiPromptProgressSubscriptionFilter {
4360 + """
4361 + [Internal] Filter by comment ID.
4362 + """
4363 + commentId: IDComparator
4364 + """
4365 + [Internal] Filter by issue ID.
4366 + """
4367 + issueId: IDComparator
4368 + """
4369 + [Internal] Filter by pull request comment ID.
4370 + """
4371 + pullRequestCommentId: IDComparator
4372 + """
4373 + [Internal] Filter by prompt workflow status.
4374 + """
4375 + status: AiPromptProgressStatusComparator
4376 + """
4377 + [Internal] Filter by prompt workflow type.
4378 + """
4379 + type: AiPromptTypeComparator
4380 +}
4381 +
4382 +"""
4383 +Custom rules that guide AI behavior for a specific scope. Rules can be defined at the workspace level, team level, integration level, or user level, and are applied hierarchically (workspace rules first, then parent team rules, then team rules). Rules contain structured content that instructs the AI assistant on how to handle specific types of prompts, such as coding agent guidance or triage intelligence configuration.
4384 +"""
4385 +type AiPromptRules implements Node {
4386 + """
4387 + The time at which the entity was archived. Null if the entity has not been archived.
4388 + """
4389 + archivedAt: DateTime
4390 + """
4391 + The time at which the entity was created.
4392 + """
4393 + createdAt: DateTime!
4394 + """
4395 + The unique identifier of the entity.
4396 + """
4397 + id: ID!
4398 + """
4399 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
4400 + been updated after creation.
4401 + """
4402 + updatedAt: DateTime!
4403 + """
4404 + The user who last updated the AI prompt rules.
4405 + """
4406 + updatedBy: User
4407 +}
4408 +
4409 +"""
4410 +The type of AI prompt workflow.
4411 +"""
4412 +enum AiPromptType {
4413 + agentGuidance
4414 + aiConversation
4415 + codeIntelligence
4416 + gongIssueIntake
4417 + initiativeUpdates
4418 + intercomIssueIntake
4419 + internalResearch
4420 + microsoftTeamsIssueIntake
4421 + productIntelligence
4422 + projectUpdates
4423 + slackIssueIntake
4424 + zendeskIssueIntake
4425 +}
4426 +
4427 +"""
4428 +[Internal] Comparator for the AI prompt workflow type.
4429 +"""
4430 +input AiPromptTypeComparator {
4431 + """
4432 + Equals constraint.
4433 + """
4434 + eq: AiPromptType
4435 + """
4436 + In-array constraint.
4437 + """
4438 + in: [AiPromptType!]
4439 + """
4440 + Not-equals constraint.
4441 + """
4442 + neq: AiPromptType
4443 + """
4444 + Not-in-array constraint.
4445 + """
4446 + nin: [AiPromptType!]
4447 + """
4448 + Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values.
4449 + """
4450 + null: Boolean
4451 +}
4452 +
4453 +input AirbyteConfigurationInput {
4454 + """
4455 + Linear export API key.
4456 + """
4457 + apiKey: String!
4458 +}
4459 +
4460 +"""
4461 +Payload for app user notification webhook events.
4462 +"""
4463 +type AppUserNotificationWebhookPayload {
4464 + """
4465 + The type of action that triggered the webhook.
4466 + """
4467 + action: String!
4468 + """
4469 + ID of the app user the notification is for.
4470 + """
4471 + appUserId: String!
4472 + """
4473 + The time the payload was created.
4474 + """
4475 + createdAt: DateTime!
4476 + """
4477 + Details of the notification.
4478 + """
4479 + notification: NotificationWebhookPayload!
4480 + """
4481 + ID of the OAuth client the app user is tied to.
4482 + """
4483 + oauthClientId: String!
4484 + """
4485 + ID of the organization for which the webhook belongs to.
4486 + """
4487 + organizationId: String!
4488 + """
4489 + The type of resource.
4490 + """
4491 + type: String!
4492 + """
4493 + The ID of the webhook that sent this event.
4494 + """
4495 + webhookId: String!
4496 + """
4497 + Unix timestamp in milliseconds when the webhook was sent.
4498 + """
4499 + webhookTimestamp: Float!
4500 +}
4501 +
4502 +"""
4503 +Payload for app user team access change webhook events.
4504 +"""
4505 +type AppUserTeamAccessChangedWebhookPayload {
4506 + """
4507 + The type of action that triggered the webhook.
4508 + """
4509 + action: String!
4510 + """
4511 + IDs of the teams the app user was added to.
4512 + """
4513 + addedTeamIds: [String!]!
4514 + """
4515 + ID of the app user the notification is for.
4516 + """
4517 + appUserId: String!
4518 + """
4519 + Whether the app user can access all public teams.
4520 + """
4521 + canAccessAllPublicTeams: Boolean!
4522 + """
4523 + The time the payload was created.
4524 + """
4525 + createdAt: DateTime!
4526 + """
4527 + ID of the OAuth client the app user is tied to.
4528 + """
4529 + oauthClientId: String!
4530 + """
4531 + ID of the organization for which the webhook belongs to.
4532 + """
4533 + organizationId: String!
4534 + """
4535 + IDs of the teams the app user was removed from.
4536 + """
4537 + removedTeamIds: [String!]!
4538 + """
4539 + The type of resource.
4540 + """
4541 + type: String!
4542 + """
4543 + The ID of the webhook that sent this event.
4544 + """
4545 + webhookId: String!
4546 + """
4547 + Unix timestamp in milliseconds when the webhook was sent.
4548 + """
4549 + webhookTimestamp: Float!
4550 +}
4551 +
4552 +"""
4553 +Public-facing information about an OAuth application. Contains only the fields that are safe to display to users during the authorization flow, excluding sensitive data like client secrets and internal configuration.
4554 +"""
4555 +type Application {
4556 + """
4557 + OAuth application's client ID.
4558 + """
4559 + clientId: String!
4560 + """
4561 + Information about the application.
4562 + """
4563 + description: String
4564 + """
4565 + Name of the developer.
4566 + """
4567 + developer: String!
4568 + """
4569 + URL of the developer's website, homepage, or documentation.
4570 + """
4571 + developerUrl: String!
4572 + """
4573 + OAuth application's ID.
4574 + """
4575 + id: String!
4576 + """
4577 + Image of the application.
4578 + """
4579 + imageUrl: String
4580 + """
4581 + Application name.
4582 + """
4583 + name: String!
4584 +}
4585 +
4586 +"""
4587 +Customer approximate need count sorting options.
4588 +"""
4589 +input ApproximateNeedCountSort {
4590 + """
4591 + Whether nulls should be sorted first or last
4592 + """
4593 + nulls: PaginationNulls = last
4594 + """
4595 + The order for the individual sort
4596 + """
4597 + order: PaginationSortOrder
4598 +}
4599 +
4600 +"""
4601 +A generic payload return from entity archive or deletion mutations.
4602 +"""
4603 +interface ArchivePayload {
4604 + """
4605 + The identifier of the last sync operation.
4606 + """
4607 + lastSyncId: Float!
4608 + """
4609 + Whether the operation was successful.
4610 + """
4611 + success: Boolean!
4612 +}
4613 +
4614 +"""
4615 +Contains requested archived model objects.
4616 +"""
4617 +type ArchiveResponse {
4618 + """
4619 + A JSON serialized collection of model objects loaded from the archive
4620 + """
4621 + archive: String!
4622 + """
4623 + The version of the remote database. Incremented by 1 for each migration run on the database.
4624 + """
4625 + databaseVersion: Float!
4626 + """
4627 + Whether the dependencies for the model objects are included in the archive.
4628 + """
4629 + includesDependencies: [String!]!
4630 + """
4631 + The total number of entities in the archive.
4632 + """
4633 + totalCount: Float!
4634 +}
4635 +
4636 +"""
4637 +A recently archived integration.
4638 +"""
4639 +type ArchivedIntegrationPayload {
4640 + """
4641 + The time at which the integration was archived.
4642 + """
4643 + archivedAt: DateTime!
4644 + """
4645 + Whether the integration had full code access.
4646 + """
4647 + codeAccess: Boolean
4648 + """
4649 + The enterprise URL if this is a GitHub Enterprise Cloud integration.
4650 + """
4651 + enterpriseUrl: String
4652 + """
4653 + The external identifier of the connected GitHub organization.
4654 + """
4655 + externalOrgId: String
4656 + """
4657 + The unique identifier of the integration.
4658 + """
4659 + id: String!
4660 + """
4661 + The avatar URL of the connected GitHub organization.
4662 + """
4663 + orgAvatarUrl: String
4664 + """
4665 + The login name of the connected GitHub organization.
4666 + """
4667 + orgLogin: String
4668 + """
4669 + The integration service type.
4670 + """
4671 + service: String!
4672 +}
4673 +
4674 +type AsksChannelConnectPayload {
4675 + """
4676 + Whether the bot needs to be manually added to the channel.
4677 + """
4678 + addBot: Boolean!
4679 + """
4680 + GitHub-specific details for the operation. Populated by GitHub-related mutations only.
4681 + """
4682 + gitHub: GitHubIntegrationConnectDetails
4683 + """
4684 + The integration that was created or updated.
4685 + """
4686 + integration: Integration
4687 + """
4688 + The identifier of the last sync operation.
4689 + """
4690 + lastSyncId: Float!
4691 + """
4692 + The new Asks Slack channel mapping for the connected channel.
4693 + """
4694 + mapping: SlackChannelNameMapping!
4695 + """
4696 + Whether the operation was successful.
4697 + """
4698 + success: Boolean!
4699 +}
4700 +
4701 +"""
4702 +Issue assignee sorting options.
4703 +"""
4704 +input AssigneeSort {
4705 + """
4706 + Whether nulls should be sorted first or last
4707 + """
4708 + nulls: PaginationNulls = last
4709 + """
4710 + The order for the individual sort
4711 + """
4712 + order: PaginationSortOrder
4713 +}
4714 +
4715 +"""
4716 +An attachment linking external content to an issue. Attachments represent connections to external resources such as GitHub pull requests, Slack messages, Zendesk tickets, Figma files, Sentry issues, Intercom conversations, and plain URLs. Each attachment has a title and subtitle displayed in the Linear UI, a URL serving as both the link destination and unique identifier per issue, and optional metadata specific to the source integration.
4717 +"""
4718 +type Attachment implements Node {
4719 + """
4720 + The time at which the entity was archived. Null if the entity has not been archived.
4721 + """
4722 + archivedAt: DateTime
4723 + """
4724 + The body data of the attachment, if any.
4725 + """
4726 + bodyData: String
4727 + """
4728 + The time at which the entity was created.
4729 + """
4730 + createdAt: DateTime!
4731 + """
4732 + The creator of the attachment.
4733 + """
4734 + creator: User
4735 + """
4736 + The non-Linear user who created the attachment.
4737 + """
4738 + externalUserCreator: ExternalUser
4739 + """
4740 + Whether attachments from the same source application should be visually grouped together in the Linear issue detail view.
4741 + """
4742 + groupBySource: Boolean!
4743 + """
4744 + The unique identifier of the entity.
4745 + """
4746 + id: ID!
4747 + """
4748 + The issue this attachment belongs to.
4749 + """
4750 + issue: Issue!
4751 + """
4752 + Integration-specific metadata for this attachment. The schema varies by source type and may include fields such as pull request status, review counts, commit information, ticket status, or other data from the external system.
4753 + """
4754 + metadata: JSONObject!
4755 + """
4756 + The issue this attachment was originally created on. Null if the attachment hasn't been moved.
4757 + """
4758 + originalIssue: Issue
4759 + """
4760 + Information about the source which created the attachment.
4761 + """
4762 + source: JSONObject
4763 + """
4764 + The source type of the attachment, derived from the source metadata. Returns the integration type (e.g., 'github', 'slack', 'zendesk') or 'unknown' if no source is set.
4765 + """
4766 + sourceType: String
4767 + """
4768 + Content for the subtitle line in the Linear attachment widget.
4769 + """
4770 + subtitle: String
4771 + """
4772 + Content for the title line in the Linear attachment widget.
4773 + """
4774 + title: String!
4775 + """
4776 + The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
4777 + been updated after creation.
4778 + """
4779 + updatedAt: DateTime!
4780 + """
4781 + The URL of the external resource this attachment links to. Also serves as a unique identifier for the attachment within an issue; no two attachments on the same issue can share the same URL.
4782 + """
4783 + url: String!
4784 +}
4785 +
4786 +"""
4787 +Attachment collection filtering options.
4788 +"""
4789 +input AttachmentCollectionFilter {
4790 + """
4791 + Compound filters, all of which need to be matched by the attachment.
4792 + """
4793 + and: [AttachmentCollectionFilter!]
4794 + """
4795 + Comparator for the created at date.
4796 + """
4797 + createdAt: DateComparator
4798 + """
4799 + Filters that the attachments creator must satisfy.
4800 + """
4801 + creator: NullableUserFilter
4802 + """
4803 + Filters that needs to be matched by all attachments.
4804 + """
4805 + every: AttachmentFilter
4806 + """
4807 + Comparator for the identifier.
4808 + """
4809 + id: IDComparator
4810 + """
4811 + Comparator for the collection length.
4812 + """
4813 + length: NumberComparator
4814 + """
4815 + Compound filters, one of which need to be matched by the attachment.
4816 + """
4817 + or: [AttachmentCollectionFilter!]
4818 + """
4819 + Filters that needs to be matched by some attachments.
4820 + """
4821 + some: AttachmentFilter
4822 + """
4823 + Comparator for the source type.
4824 + """
4825 + sourceType: SourceTypeComparator
4826 + """
4827 + Comparator for the subtitle.
4828 + """
4829 + subtitle: NullableStringComparator
4830 + """
4831 + Comparator for the title.
4832 + """
4833 + title: StringComparator
4834 + """
4835 + Comparator for the updated at date.
4836 + """
4837 + updatedAt: DateComparator
4838 + """
4839 + Comparator for the url.
4840 + """
4841 + url: StringComparator
4842 +}
4843 +
4844 +type AttachmentConnection {
4845 + edges: [AttachmentEdge!]!
4846 + nodes: [Attachment!]!
4847 + pageInfo: PageInfo!
4848 +}
4849 +
4850 +"""
4851 +Input for creating a new issue attachment.
4852 +"""
4853 +input AttachmentCreateInput {
4854 + """
4855 + Create a linked comment with markdown body.
4856 + """
4857 + commentBody: String
4858 + """
4859 + [Internal] Create a linked comment with Prosemirror body. Please use `commentBody` instead.
4860 + """
4861 + commentBodyData: JSONObject
4862 + """
4863 + Create attachment as a user with the provided name. This option is only available to OAuth applications creating attachments in `actor=application` mode.
4864 + """
4865 + createAsUser: String
4866 + """
4867 + Provide an external user avatar URL. Can only be used in conjunction with the `createAsUser` options. This option is only available to OAuth applications creating attachments in `actor=app` mode.
4868 + """
4869 + displayIconUrl: String
4870 + """
4871 + Indicates if attachments for the same source application should be grouped in the Linear UI.
4872 + """
4873 + groupBySource: Boolean
4874 + """
4875 + An icon url to display with the attachment. Should be of jpg or png format. Maximum of 1MB in size. Dimensions should be 20x20px for optimal display quality.
4876 + """
4877 + iconUrl: String
4878 + """
4879 + The identifier in UUID v4 format. If none is provided, the backend will generate one.
4880 + """
4881 + id: String
4882 + """
4883 + The issue to associate the attachment with. Can be a UUID or issue identifier (e.g., 'LIN-123').
4884 + """
4885 + issueId: String!
4886 + """
4887 + Attachment metadata object with string and number values.
4888 + """
4889 + metadata: JSONObject
4890 + """
4891 + The attachment subtitle.
4892 + """
4893 + subtitle: String
4894 + """
4895 + The attachment title.
4896 + """
4897 + title: String!
4898 + """
4899 + Attachment location which is also used as an unique identifier for the attachment. If another attachment is created with the same `url` value, existing record is updated instead.
4900 + """
4901 + url: String!
4902 +}
4903 +
4904 +type AttachmentEdge {
4905 + """
4906 + Used in `before` and `after` args
4907 + """
4908 + cursor: String!
4909 + node: Attachment!
4910 +}
4911 +
4912 +"""
4913 +Attachment filtering options.
4914 +"""
4915 +input AttachmentFilter {
4916 + """
4917 + Compound filters, all of which need to be matched by the attachment.
4918 + """
4919 + and: [AttachmentFilter!]
4920 + """
4921 + Comparator for the created at date.
4922 + """
4923 + createdAt: DateComparator
4924 + """
4925 + Filters that the attachments creator must satisfy.
4926 + """
4927 + creator: NullableUserFilter
4928 + """
4929 + Comparator for the identifier.
4930 + """
4931 + id: IDComparator
4932 + """
4933 + Compound filters, one of which need to be matched by the attachment.
4934 + """
4935 + or: [AttachmentFilter!]
4936 + """
4937 + Comparator for the source type.
4938 + """
4939 + sourceType: SourceTypeComparator
4940 + """
4941 + Comparator for the subtitle.
4942 + """
4943 + subtitle: NullableStringComparator
4944 + """
4945 + Comparator for the title.
4946 + """
4947 + title: StringComparator
4948 + """
4949 + Comparator for the updated at date.
4950 + """
4951 + updatedAt: DateComparator
4952 + """
4953 + Comparator for the url.
4954 + """
4955 + url: StringComparator
4956 +}
4957 +
4958 +"""
4959 +The result of an attachment mutation.
4960 +"""
4961 +type AttachmentPayload {
4962 + """
4963 + The issue attachment that was created.
4964 + """
4965 + attachment: Attachment!
4966 + """
4967 + The identifier of the last sync operation.
4968 + """
4969 + lastSyncId: Float!
4970 + """
4971 + Whether the operation was successful.
4972 + """
4973 + success: Boolean!
4974 +}
4975 +
4976 +"""
4977 +The result of an attachment sources query.
4978 +"""
4979 +type AttachmentSourcesPayload {
4980 + """
4981 + A unique list of all source types used in this workspace.
4982 + """
4983 + sources: JSONObject!
4984 +}
4985 +
4986 +"""
4987 +Input for updating an existing issue attachment.
4988 +"""
4989 +input AttachmentUpdateInput {
4990 + """
4991 + An icon url to display with the attachment. Should be of jpg or png format. Maximum of 1MB in size. Dimensions should be 20x20px for optimal display quality.
4992 + """
4993 + iconUrl: String
4994 + """
4995 + Attachment metadata object with string and number values.
4996 + """
4997 + metadata: JSONObject
4998 + """
4999 + The attachment subtitle.

This file is too large to show in full.

packages/issue-tracker-linear/schema/linear.graphql.ts new
+5424
@@ -0,0 +1,5424 @@
1 +// Generated by @effect/graphql-generator. Do not edit.
2 +import * as Schema from "effect/Schema"
3 +
4 +export const Int = Schema.Number.check(Schema.isInt32())
5 +
6 +export const Float = Schema.Finite
7 +
8 +export const ID = Schema.String
9 +
10 +/** Represents a date and time in ISO 8601 format. Accepts shortcuts like `2021` to represent midnight Fri Jan 01 2021. Also accepts ISO 8601 durations strings which are added to the current date to create the represented date (e.g '-P2W1D' represents the date that was two weeks and 1 day ago) */
11 +export const DateTime = Schema.String
12 +
13 +/** Represents a date and time in ISO 8601 format. Accepts shortcuts like `2021` to represent midnight Fri Jan 01 2021. Also accepts ISO 8601 durations strings which are added to the current date to create the represented date (e.g '-P2W1D' represents the date that was two weeks and 1 day ago) */
14 +export const DateTimeOrDuration = Schema.String
15 +
16 +/** Represents a duration in ISO 8601 format. Accepts ISO 8601 duration strings or integers in milliseconds. */
17 +export const Duration = Schema.String
18 +
19 +/** The `JSON` scalar type represents arbitrary values as *stringified* JSON */
20 +export const JSON = Schema.Json
21 +
22 +/** The `JSONObject` scalar type represents arbitrary values as *embedded* JSON */
23 +export const JSONObject = Schema.Json
24 +
25 +/** Represents a date in ISO 8601 format. Accepts shortcuts like `2021` to represent midnight Fri Jan 01 2021. Also accepts ISO 8601 durations strings which are added to the current date to create the represented date (e.g '-P2W1D' represents the date that was two weeks and 1 day ago) */
26 +export const TimelessDate = Schema.String
27 +
28 +/** Represents a date in ISO 8601 format or a duration. Accepts shortcuts like `2021` to represent midnight Fri Jan 01 2021. Also accepts ISO 8601 durations strings (e.g '-P2W1D'), which are not converted to dates. */
29 +export const TimelessDateOrDuration = Schema.String
30 +
31 +/**
32 + * - `after`
33 + * - `before`
34 + * - `during`
35 + */
36 +export const CyclePeriod = Schema.Literals(["after", "before", "during"])
37 +export type CyclePeriod = typeof CyclePeriod.Type
38 +
39 +/**
40 + * The type of a release pipeline, which determines how releases are created and managed. Continuous pipelines create a new completed release for each sync. Scheduled pipelines accumulate issues into a started release that is explicitly completed.
41 + *
42 + * - `continuous`
43 + * - `scheduled`
44 + */
45 +export const ReleasePipelineType = Schema.Literals(["continuous", "scheduled"])
46 +export type ReleasePipelineType = typeof ReleasePipelineType.Type
47 +
48 +/**
49 + * The type of a release stage, which determines the release's lifecycle state. Types include planned, started, completed, and canceled. Each pipeline must have at least one stage of each type, though only started stages may have multiple instances.
50 + *
51 + * - `canceled`
52 + * - `completed`
53 + * - `planned`
54 + * - `started`
55 + */
56 +export const ReleaseStageType = Schema.Literals(["canceled", "completed", "planned", "started"])
57 +export type ReleaseStageType = typeof ReleaseStageType.Type
58 +
59 +/**
60 + * Which day count to use for SLA calculations.
61 + *
62 + * - `all`
63 + * - `onlyBusinessDays`
64 + */
65 +export const SLADayCountType = Schema.Literals(["all", "onlyBusinessDays"])
66 +export type SLADayCountType = typeof SLADayCountType.Type
67 +
68 +/**
69 + * - `Breached`
70 + * - `Completed`
71 + * - `Failed`
72 + * - `HighRisk`
73 + * - `LowRisk`
74 + * - `MediumRisk`
75 + */
76 +export const SlaStatus = Schema.Literals(["Breached", "Completed", "Failed", "HighRisk", "LowRisk", "MediumRisk"])
77 +export type SlaStatus = typeof SlaStatus.Type
78 +
79 +/**
80 + * The visibility of a team. A team can be public, private, or restricted within an enclosing private-team boundary.
81 + *
82 + * - `private`
83 + * - `public`
84 + * - `restricted`
85 + */
86 +export const TeamVisibility = Schema.Literals(["private", "public", "restricted"])
87 +export type TeamVisibility = typeof TeamVisibility.Type
88 +
89 +/** Input for creating a new comment. */
90 +export const CommentCreateInput = Schema.Struct({
91 + /** The comment content in markdown format. */
92 + body: Schema.optional(Schema.NullOr(Schema.String)),
93 + /** [Internal] The comment content as a Prosemirror document. */
94 + bodyData: Schema.optional(Schema.NullOr(JSON)),
95 + /** Create comment as a user with the provided name. This option is only available to OAuth applications creating comments in `actor=app` mode. */
96 + createAsUser: Schema.optional(Schema.NullOr(Schema.String)),
97 + /** Flag to indicate this comment should be created on the issue's synced Slack comment thread. If no synced Slack comment thread exists, the mutation will fail. If there are multiple synced Slack threads on the issue, the oldest one will be targeted. */
98 + createOnSyncedSlackThread: Schema.optional(Schema.NullOr(Schema.Boolean)),
99 + /** The time at which the comment was created (e.g. if importing from another system). Must be a time in the past. If none is provided, the backend will generate the time as now. */
100 + createdAt: Schema.optional(Schema.NullOr(DateTime)),
101 + /** Provide an external user avatar URL. Can only be used in conjunction with the `createAsUser` options. This option is only available to OAuth applications creating comments in `actor=app` mode. */
102 + displayIconUrl: Schema.optional(Schema.NullOr(Schema.String)),
103 + /** Flag to prevent auto subscription to the issue the comment is created on. */
104 + doNotSubscribeToIssue: Schema.optional(Schema.NullOr(Schema.Boolean)),
105 + /** The document content to associate the comment with. */
106 + documentContentId: Schema.optional(Schema.NullOr(Schema.String)),
107 + /** The identifier in UUID v4 format. If none is provided, the backend will generate one. */
108 + id: Schema.optional(Schema.NullOr(Schema.String)),
109 + /** The initiative to associate the comment with. Can be a UUID or initiative identifier (e.g., 'I-12'). */
110 + initiativeId: Schema.optional(Schema.NullOr(Schema.String)),
111 + /** The initiative update to associate the comment with. */
112 + initiativeUpdateId: Schema.optional(Schema.NullOr(Schema.String)),
113 + /** [Internal] Where the commented text starts, as a base64-encoded Y.js relative position created on the commenter's copy of the document content. Requires `inlineAnchorTo` and `documentContentId`. */
114 + inlineAnchorFrom: Schema.optional(Schema.NullOr(Schema.String)),
115 + /** [Internal] Where the commented text ends, as a base64-encoded Y.js relative position created on the commenter's copy of the document content. Requires `inlineAnchorFrom` and `documentContentId`. */
116 + inlineAnchorTo: Schema.optional(Schema.NullOr(Schema.String)),
117 + /** The issue to associate the comment with. Can be a UUID or issue identifier (e.g., 'LIN-123'). */
118 + issueId: Schema.optional(Schema.NullOr(Schema.String)),
119 + /** The parent comment under which to nest a current comment. */
120 + parentId: Schema.optional(Schema.NullOr(Schema.String)),
121 + /** The post to associate the comment with. */
122 + postId: Schema.optional(Schema.NullOr(Schema.String)),
123 + /** The project to associate the comment with. Can be a UUID or project identifier (e.g., 'P-LIN-123'). */
124 + projectId: Schema.optional(Schema.NullOr(Schema.String)),
125 + /** The project update to associate the comment with. */
126 + projectUpdateId: Schema.optional(Schema.NullOr(Schema.String)),
127 + /** The text that this comment references. Only defined for inline comments. */
128 + quotedText: Schema.optional(Schema.NullOr(Schema.String)),
129 + /** [INTERNAL] The identifiers of the users subscribing to this comment thread. */
130 + subscriberIds: Schema.optional(Schema.NullOr(Schema.Array(Schema.String)))
131 +})
132 +export interface CommentCreateInput extends Schema.Struct.Type<typeof CommentCreateInput.fields> {}
133 +
134 +/** Input for creating a new issue. At minimum, a team must be specified. A title is required unless a template is provided. All other fields are optional and will use defaults from the team or template if not specified. */
135 +export const IssueCreateInput = Schema.Struct({
136 + /** The identifier of the user to assign the issue to. */
137 + assigneeId: Schema.optional(Schema.NullOr(Schema.String)),
138 + /** The time at which the issue was completed (e.g. if importing from another system). Must be a time in the past and after createdAt. Cannot be provided with an incompatible workflow state. */
139 + completedAt: Schema.optional(Schema.NullOr(DateTime)),
140 + /** Create issue as a user with the provided name. This option is only available to OAuth applications creating issues in `actor=app` mode. */
141 + createAsUser: Schema.optional(Schema.NullOr(Schema.String)),
142 + /** The time at which the issue was created (e.g. if importing from another system). Must be a time in the past. If none is provided, the backend will generate the time as now. */
143 + createdAt: Schema.optional(Schema.NullOr(DateTime)),
144 + /** The cycle associated with the issue. */
145 + cycleId: Schema.optional(Schema.NullOr(Schema.String)),
146 + /** The identifier of the agent user to delegate the issue to. */
147 + delegateId: Schema.optional(Schema.NullOr(Schema.String)),
148 + /** The issue description in markdown format. */
149 + description: Schema.optional(Schema.NullOr(Schema.String)),
150 + /** [Internal] The issue description as a Prosemirror document. */
151 + descriptionData: Schema.optional(Schema.NullOr(JSON)),
152 + /** Provide an external user avatar URL. Can only be used in conjunction with the `createAsUser` options. This option is only available to OAuth applications creating comments in `actor=app` mode. */
153 + displayIconUrl: Schema.optional(Schema.NullOr(Schema.String)),
154 + /** The date at which the issue is due. */
155 + dueDate: Schema.optional(Schema.NullOr(TimelessDate)),
156 + /** The estimated complexity of the issue. */
157 + estimate: Schema.optional(Schema.NullOr(Int)),
158 + /** The identifier in UUID v4 format. If none is provided, the backend will generate one. */
159 + id: Schema.optional(Schema.NullOr(Schema.String)),
160 + /** [Internal] Whether this issue should inherit shared access from its parent issue. Set to false to opt out of automatic shared access inheritance when creating a sub-issue. */
161 + inheritsSharedAccess: Schema.optional(Schema.NullOr(Schema.Boolean)),
162 + /** The identifiers of the issue labels associated with this ticket. */
163 + labelIds: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
164 + /** The ID of the last template applied to the issue. */
165 + lastAppliedTemplateId: Schema.optional(Schema.NullOr(Schema.String)),
166 + /** The identifier of the parent issue. Can be a UUID or issue identifier (e.g., 'LIN-123'). */
167 + parentId: Schema.optional(Schema.NullOr(Schema.String)),
168 + /** Whether the passed sort order should be preserved. */
169 + preserveSortOrderOnCreate: Schema.optional(Schema.NullOr(Schema.Boolean)),
170 + /** The priority of the issue. 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low. */
171 + priority: Schema.optional(Schema.NullOr(Int)),
172 + /** The position of the issue related to other issues, when ordered by priority. */
173 + prioritySortOrder: Schema.optional(Schema.NullOr(Float)),
174 + /** The project associated with the issue. Can be a UUID or project identifier (e.g., 'P-LIN-123'). */
175 + projectId: Schema.optional(Schema.NullOr(Schema.String)),
176 + /** The project milestone associated with the issue. */
177 + projectMilestoneId: Schema.optional(Schema.NullOr(Schema.String)),
178 + /** The comment the issue is referencing. */
179 + referenceCommentId: Schema.optional(Schema.NullOr(Schema.String)),
180 + /** The identifiers of the releases to associate with this issue. */
181 + releaseIds: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
182 + /** [Internal] The time at which an issue will be considered in breach of SLA. */
183 + slaBreachesAt: Schema.optional(Schema.NullOr(DateTime)),
184 + /** [Internal] The time at which the issue's SLA was started. */
185 + slaStartedAt: Schema.optional(Schema.NullOr(DateTime)),
186 + /** The SLA day count type for the issue. Whether SLA should be business days only or calendar days (default). */
187 + slaType: Schema.optional(Schema.NullOr(SLADayCountType)),
188 + /** The position of the issue related to other issues. */
189 + sortOrder: Schema.optional(Schema.NullOr(Float)),
190 + /** The comment the issue is created from. */
191 + sourceCommentId: Schema.optional(Schema.NullOr(Schema.String)),
192 + /** [Internal] The pull request comment the issue is created from. */
193 + sourcePullRequestCommentId: Schema.optional(Schema.NullOr(Schema.String)),
194 + /** The team state of the issue. */
195 + stateId: Schema.optional(Schema.NullOr(Schema.String)),
196 + /** The position of the issue in parent's sub-issue list. */
197 + subIssueSortOrder: Schema.optional(Schema.NullOr(Float)),
198 + /** The identifiers of the users subscribing to this ticket. */
199 + subscriberIds: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
200 + /** The identifier of the team associated with the issue. */
201 + teamId: Schema.String,
202 + /** The identifier of a template the issue should be created from. If other values are provided in the input, they will override template values. */
203 + templateId: Schema.optional(Schema.NullOr(Schema.String)),
204 + /** The title of the issue. */
205 + title: Schema.optional(Schema.NullOr(Schema.String)),
206 + /** Whether to use the default template for the team. When set to true, the default template of this team based on user's membership will be applied. */
207 + useDefaultTemplate: Schema.optional(Schema.NullOr(Schema.Boolean))
208 +})
209 +export interface IssueCreateInput extends Schema.Struct.Type<typeof IssueCreateInput.fields> {}
210 +
211 +/** Comparator for optional dates. */
212 +export const NullableDateComparator = Schema.Struct({
213 + /** Equals constraint. */
214 + eq: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
215 + /** Greater-than constraint. Matches any values that are greater than the given value. */
216 + gt: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
217 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
218 + gte: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
219 + /** In-array constraint. */
220 + in: Schema.optional(Schema.NullOr(Schema.Array(DateTimeOrDuration))),
221 + /** Less-than constraint. Matches any values that are less than the given value. */
222 + lt: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
223 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
224 + lte: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
225 + /** Not-equals constraint. */
226 + neq: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
227 + /** Not-in-array constraint. */
228 + nin: Schema.optional(Schema.NullOr(Schema.Array(DateTimeOrDuration))),
229 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
230 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
231 +})
232 +export interface NullableDateComparator extends Schema.Struct.Type<typeof NullableDateComparator.fields> {}
233 +
234 +/** Comparator for dates. */
235 +export const DateComparator = Schema.Struct({
236 + /** Equals constraint. */
237 + eq: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
238 + /** Greater-than constraint. Matches any values that are greater than the given value. */
239 + gt: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
240 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
241 + gte: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
242 + /** In-array constraint. */
243 + in: Schema.optional(Schema.NullOr(Schema.Array(DateTimeOrDuration))),
244 + /** Less-than constraint. Matches any values that are less than the given value. */
245 + lt: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
246 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
247 + lte: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
248 + /** Not-equals constraint. */
249 + neq: Schema.optional(Schema.NullOr(DateTimeOrDuration)),
250 + /** Not-in-array constraint. */
251 + nin: Schema.optional(Schema.NullOr(Schema.Array(DateTimeOrDuration)))
252 +})
253 +export interface DateComparator extends Schema.Struct.Type<typeof DateComparator.fields> {}
254 +
255 +/** Comparator for identifiers. */
256 +export const IDComparator = Schema.Struct({
257 + /** Equals constraint. */
258 + eq: Schema.optional(Schema.NullOr(ID)),
259 + /** In-array constraint. */
260 + in: Schema.optional(Schema.NullOr(Schema.Array(ID))),
261 + /** Not-equals constraint. */
262 + neq: Schema.optional(Schema.NullOr(ID)),
263 + /** Not-in-array constraint. */
264 + nin: Schema.optional(Schema.NullOr(Schema.Array(ID)))
265 +})
266 +export interface IDComparator extends Schema.Struct.Type<typeof IDComparator.fields> {}
267 +
268 +/** Comparator for booleans. */
269 +export const BooleanComparator = Schema.Struct({
270 + /** Equals constraint. */
271 + eq: Schema.optional(Schema.NullOr(Schema.Boolean)),
272 + /** Not equals constraint. */
273 + neq: Schema.optional(Schema.NullOr(Schema.Boolean))
274 +})
275 +export interface BooleanComparator extends Schema.Struct.Type<typeof BooleanComparator.fields> {}
276 +
277 +/** Comparator for period when issue was added to a cycle. */
278 +export const CyclePeriodComparator = Schema.Struct({
279 + /** Equals constraint. */
280 + eq: Schema.optional(Schema.NullOr(CyclePeriod)),
281 + /** In-array constraint. */
282 + in: Schema.optional(Schema.NullOr(Schema.Array(CyclePeriod))),
283 + /** Not-equals constraint. */
284 + neq: Schema.optional(Schema.NullOr(CyclePeriod)),
285 + /** Not-in-array constraint. */
286 + nin: Schema.optional(Schema.NullOr(Schema.Array(CyclePeriod))),
287 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
288 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
289 +})
290 +export interface CyclePeriodComparator extends Schema.Struct.Type<typeof CyclePeriodComparator.fields> {}
291 +
292 +/** Nullable comparator for optional durations. */
293 +export const NullableDurationComparator = Schema.Struct({
294 + /** Equals constraint. */
295 + eq: Schema.optional(Schema.NullOr(Duration)),
296 + /** Greater-than constraint. Matches any values that are greater than the given value. */
297 + gt: Schema.optional(Schema.NullOr(Duration)),
298 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
299 + gte: Schema.optional(Schema.NullOr(Duration)),
300 + /** In-array constraint. */
301 + in: Schema.optional(Schema.NullOr(Schema.Array(Duration))),
302 + /** Less-than constraint. Matches any values that are less than the given value. */
303 + lt: Schema.optional(Schema.NullOr(Duration)),
304 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
305 + lte: Schema.optional(Schema.NullOr(Duration)),
306 + /** Not-equals constraint. */
307 + neq: Schema.optional(Schema.NullOr(Duration)),
308 + /** Not-in-array constraint. */
309 + nin: Schema.optional(Schema.NullOr(Schema.Array(Duration))),
310 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
311 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
312 +})
313 +export interface NullableDurationComparator extends Schema.Struct.Type<typeof NullableDurationComparator.fields> {}
314 +
315 +/** Comparator for strings. */
316 +export const StringComparator = Schema.Struct({
317 + /** Contains constraint. Matches any values that contain the given string. */
318 + contains: Schema.optional(Schema.NullOr(Schema.String)),
319 + /** Contains case insensitive constraint. Matches any values that contain the given string case insensitive. */
320 + containsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
321 + /** Contains case and accent insensitive constraint. Matches any values that contain the given string case and accent insensitive. */
322 + containsIgnoreCaseAndAccent: Schema.optional(Schema.NullOr(Schema.String)),
323 + /** Ends with constraint. Matches any values that end with the given string. */
324 + endsWith: Schema.optional(Schema.NullOr(Schema.String)),
325 + /** Equals constraint. */
326 + eq: Schema.optional(Schema.NullOr(Schema.String)),
327 + /** Equals case insensitive. Matches any values that matches the given string case insensitive. */
328 + eqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
329 + /** In-array constraint. */
330 + in: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
331 + /** Not-equals constraint. */
332 + neq: Schema.optional(Schema.NullOr(Schema.String)),
333 + /** Not-equals case insensitive. Matches any values that don't match the given string case insensitive. */
334 + neqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
335 + /** Not-in-array constraint. */
336 + nin: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
337 + /** Doesn't contain constraint. Matches any values that don't contain the given string. */
338 + notContains: Schema.optional(Schema.NullOr(Schema.String)),
339 + /** Doesn't contain case insensitive constraint. Matches any values that don't contain the given string case insensitive. */
340 + notContainsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
341 + /** Doesn't end with constraint. Matches any values that don't end with the given string. */
342 + notEndsWith: Schema.optional(Schema.NullOr(Schema.String)),
343 + /** Doesn't start with constraint. Matches any values that don't start with the given string. */
344 + notStartsWith: Schema.optional(Schema.NullOr(Schema.String)),
345 + /** Starts with constraint. Matches any values that start with the given string. */
346 + startsWith: Schema.optional(Schema.NullOr(Schema.String)),
347 + /** Starts with case insensitive constraint. Matches any values that start with the given string. */
348 + startsWithIgnoreCase: Schema.optional(Schema.NullOr(Schema.String))
349 +})
350 +export interface StringComparator extends Schema.Struct.Type<typeof StringComparator.fields> {}
351 +
352 +/** Comparator for `sourceType` field. */
353 +export const SourceTypeComparator = Schema.Struct({
354 + /** Contains constraint. Matches any values that contain the given string. */
355 + contains: Schema.optional(Schema.NullOr(Schema.String)),
356 + /** Contains case insensitive constraint. Matches any values that contain the given string case insensitive. */
357 + containsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
358 + /** Contains case and accent insensitive constraint. Matches any values that contain the given string case and accent insensitive. */
359 + containsIgnoreCaseAndAccent: Schema.optional(Schema.NullOr(Schema.String)),
360 + /** Ends with constraint. Matches any values that end with the given string. */
361 + endsWith: Schema.optional(Schema.NullOr(Schema.String)),
362 + /** Equals constraint. */
363 + eq: Schema.optional(Schema.NullOr(Schema.String)),
364 + /** Equals case insensitive. Matches any values that matches the given string case insensitive. */
365 + eqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
366 + /** In-array constraint. */
367 + in: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
368 + /** Not-equals constraint. */
369 + neq: Schema.optional(Schema.NullOr(Schema.String)),
370 + /** Not-equals case insensitive. Matches any values that don't match the given string case insensitive. */
371 + neqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
372 + /** Not-in-array constraint. */
373 + nin: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
374 + /** Doesn't contain constraint. Matches any values that don't contain the given string. */
375 + notContains: Schema.optional(Schema.NullOr(Schema.String)),
376 + /** Doesn't contain case insensitive constraint. Matches any values that don't contain the given string case insensitive. */
377 + notContainsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
378 + /** Doesn't end with constraint. Matches any values that don't end with the given string. */
379 + notEndsWith: Schema.optional(Schema.NullOr(Schema.String)),
380 + /** Doesn't start with constraint. Matches any values that don't start with the given string. */
381 + notStartsWith: Schema.optional(Schema.NullOr(Schema.String)),
382 + /** Starts with constraint. Matches any values that start with the given string. */
383 + startsWith: Schema.optional(Schema.NullOr(Schema.String)),
384 + /** Starts with case insensitive constraint. Matches any values that start with the given string. */
385 + startsWithIgnoreCase: Schema.optional(Schema.NullOr(Schema.String))
386 +})
387 +export interface SourceTypeComparator extends Schema.Struct.Type<typeof SourceTypeComparator.fields> {}
388 +
389 +/** Comparator for optional strings. */
390 +export const NullableStringComparator = Schema.Struct({
391 + /** Contains constraint. Matches any values that contain the given string. */
392 + contains: Schema.optional(Schema.NullOr(Schema.String)),
393 + /** Contains case insensitive constraint. Matches any values that contain the given string case insensitive. */
394 + containsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
395 + /** Contains case and accent insensitive constraint. Matches any values that contain the given string case and accent insensitive. */
396 + containsIgnoreCaseAndAccent: Schema.optional(Schema.NullOr(Schema.String)),
397 + /** Ends with constraint. Matches any values that end with the given string. */
398 + endsWith: Schema.optional(Schema.NullOr(Schema.String)),
399 + /** Equals constraint. */
400 + eq: Schema.optional(Schema.NullOr(Schema.String)),
401 + /** Equals case insensitive. Matches any values that matches the given string case insensitive. */
402 + eqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
403 + /** In-array constraint. */
404 + in: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
405 + /** Not-equals constraint. */
406 + neq: Schema.optional(Schema.NullOr(Schema.String)),
407 + /** Not-equals case insensitive. Matches any values that don't match the given string case insensitive. */
408 + neqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
409 + /** Not-in-array constraint. */
410 + nin: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
411 + /** Doesn't contain constraint. Matches any values that don't contain the given string. */
412 + notContains: Schema.optional(Schema.NullOr(Schema.String)),
413 + /** Doesn't contain case insensitive constraint. Matches any values that don't contain the given string case insensitive. */
414 + notContainsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
415 + /** Doesn't end with constraint. Matches any values that don't end with the given string. */
416 + notEndsWith: Schema.optional(Schema.NullOr(Schema.String)),
417 + /** Doesn't start with constraint. Matches any values that don't start with the given string. */
418 + notStartsWith: Schema.optional(Schema.NullOr(Schema.String)),
419 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
420 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
421 + /** Starts with constraint. Matches any values that start with the given string. */
422 + startsWith: Schema.optional(Schema.NullOr(Schema.String)),
423 + /** Starts with case insensitive constraint. Matches any values that start with the given string. */
424 + startsWithIgnoreCase: Schema.optional(Schema.NullOr(Schema.String))
425 +})
426 +export interface NullableStringComparator extends Schema.Struct.Type<typeof NullableStringComparator.fields> {}
427 +
428 +/** Comparator for numbers. */
429 +export const NumberComparator = Schema.Struct({
430 + /** Equals constraint. */
431 + eq: Schema.optional(Schema.NullOr(Float)),
432 + /** Greater-than constraint. Matches any values that are greater than the given value. */
433 + gt: Schema.optional(Schema.NullOr(Float)),
434 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
435 + gte: Schema.optional(Schema.NullOr(Float)),
436 + /** In-array constraint. */
437 + in: Schema.optional(Schema.NullOr(Schema.Array(Float))),
438 + /** Less-than constraint. Matches any values that are less than the given value. */
439 + lt: Schema.optional(Schema.NullOr(Float)),
440 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
441 + lte: Schema.optional(Schema.NullOr(Float)),
442 + /** Not-equals constraint. */
443 + neq: Schema.optional(Schema.NullOr(Float)),
444 + /** Not-in-array constraint. */
445 + nin: Schema.optional(Schema.NullOr(Schema.Array(Float)))
446 +})
447 +export interface NumberComparator extends Schema.Struct.Type<typeof NumberComparator.fields> {}
448 +
449 +/** Comparator for release pipeline type. */
450 +export const ReleasePipelineTypeComparator = Schema.Struct({
451 + /** Equals constraint. */
452 + eq: Schema.optional(Schema.NullOr(ReleasePipelineType)),
453 + /** In-array constraint. */
454 + in: Schema.optional(Schema.NullOr(Schema.Array(ReleasePipelineType))),
455 + /** Not-equals constraint. */
456 + neq: Schema.optional(Schema.NullOr(ReleasePipelineType)),
457 + /** Not-in-array constraint. */
458 + nin: Schema.optional(Schema.NullOr(Schema.Array(ReleasePipelineType))),
459 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
460 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
461 +})
462 +export interface ReleasePipelineTypeComparator extends Schema.Struct.Type<typeof ReleasePipelineTypeComparator.fields> {}
463 +
464 +/** Comparator for team visibility. */
465 +export const TeamVisibilityComparator = Schema.Struct({
466 + /** Equals constraint. */
467 + eq: Schema.optional(Schema.NullOr(TeamVisibility)),
468 + /** In-array constraint. */
469 + in: Schema.optional(Schema.NullOr(Schema.Array(TeamVisibility))),
470 + /** Not-equals constraint. */
471 + neq: Schema.optional(Schema.NullOr(TeamVisibility)),
472 + /** Not-in-array constraint. */
473 + nin: Schema.optional(Schema.NullOr(Schema.Array(TeamVisibility)))
474 +})
475 +export interface TeamVisibilityComparator extends Schema.Struct.Type<typeof TeamVisibilityComparator.fields> {}
476 +
477 +/** Comparator for project and initiative identifiers. Accepts UUIDs and human-readable identifiers (e.g. "PROJ-123"). */
478 +export const EntityIdentifierIDComparator = Schema.Struct({
479 + /** Equals constraint. */
480 + eq: Schema.optional(Schema.NullOr(ID)),
481 + /** In-array constraint. */
482 + in: Schema.optional(Schema.NullOr(Schema.Array(ID))),
483 + /** Not-equals constraint. */
484 + neq: Schema.optional(Schema.NullOr(ID)),
485 + /** Not-in-array constraint. */
486 + nin: Schema.optional(Schema.NullOr(Schema.Array(ID)))
487 +})
488 +export interface EntityIdentifierIDComparator extends Schema.Struct.Type<typeof EntityIdentifierIDComparator.fields> {}
489 +
490 +/** Options for filtering initiatives by initiative updates. */
491 +export const InitiativeUpdatesFilter: Schema.Codec<InitiativeUpdatesFilter, InitiativeUpdatesFilterEncoded> = Schema.Struct({
492 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeUpdatesFilter)))),
493 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
494 + id: Schema.optional(Schema.NullOr(IDComparator)),
495 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeUpdatesFilter)))),
496 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
497 +})
498 +export interface InitiativeUpdatesFilter {
499 + /** Compound filters, all of which need to be matched by the initiative updates. */
500 + readonly and?: readonly InitiativeUpdatesFilter[] | null | undefined
501 + /** Comparator for the created at date. */
502 + readonly createdAt?: DateComparator | null | undefined
503 + /** Comparator for the identifier. */
504 + readonly id?: IDComparator | null | undefined
505 + /** Compound filters, one of which need to be matched by the initiative updates. */
506 + readonly or?: readonly InitiativeUpdatesFilter[] | null | undefined
507 + /** Comparator for the updated at date. */
508 + readonly updatedAt?: DateComparator | null | undefined
509 +}
510 +export interface InitiativeUpdatesFilterEncoded {
511 + readonly and?: readonly InitiativeUpdatesFilterEncoded[] | null | undefined
512 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
513 + readonly id?: typeof IDComparator.Encoded | null | undefined
514 + readonly or?: readonly InitiativeUpdatesFilterEncoded[] | null | undefined
515 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
516 +}
517 +
518 +/** Collection filtering options for filtering initiatives by initiative updates. */
519 +export const InitiativeUpdatesCollectionFilter: Schema.Codec<InitiativeUpdatesCollectionFilter, InitiativeUpdatesCollectionFilterEncoded> = Schema.Struct({
520 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeUpdatesCollectionFilter)))),
521 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
522 + every: Schema.optional(Schema.NullOr(InitiativeUpdatesFilter)),
523 + id: Schema.optional(Schema.NullOr(IDComparator)),
524 + length: Schema.optional(Schema.NullOr(NumberComparator)),
525 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeUpdatesCollectionFilter)))),
526 + some: Schema.optional(Schema.NullOr(InitiativeUpdatesFilter)),
527 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
528 +})
529 +export interface InitiativeUpdatesCollectionFilter {
530 + /** Compound filters, all of which need to be matched by the initiative update. */
531 + readonly and?: readonly InitiativeUpdatesCollectionFilter[] | null | undefined
532 + /** Comparator for the created at date. */
533 + readonly createdAt?: DateComparator | null | undefined
534 + /** Filters that needs to be matched by all initiative updates. */
535 + readonly every?: InitiativeUpdatesFilter | null | undefined
536 + /** Comparator for the identifier. */
537 + readonly id?: IDComparator | null | undefined
538 + /** Comparator for the collection length. */
539 + readonly length?: NumberComparator | null | undefined
540 + /** Compound filters, one of which need to be matched by the update. */
541 + readonly or?: readonly InitiativeUpdatesCollectionFilter[] | null | undefined
542 + /** Filters that needs to be matched by some initiative updates. */
543 + readonly some?: InitiativeUpdatesFilter | null | undefined
544 + /** Comparator for the updated at date. */
545 + readonly updatedAt?: DateComparator | null | undefined
546 +}
547 +export interface InitiativeUpdatesCollectionFilterEncoded {
548 + readonly and?: readonly InitiativeUpdatesCollectionFilterEncoded[] | null | undefined
549 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
550 + readonly every?: InitiativeUpdatesFilterEncoded | null | undefined
551 + readonly id?: typeof IDComparator.Encoded | null | undefined
552 + readonly length?: typeof NumberComparator.Encoded | null | undefined
553 + readonly or?: readonly InitiativeUpdatesCollectionFilterEncoded[] | null | undefined
554 + readonly some?: InitiativeUpdatesFilterEncoded | null | undefined
555 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
556 +}
557 +
558 +/** Comparator for optional numbers. */
559 +export const NullableNumberComparator = Schema.Struct({
560 + /** Equals constraint. */
561 + eq: Schema.optional(Schema.NullOr(Float)),
562 + /** Greater-than constraint. Matches any values that are greater than the given value. */
563 + gt: Schema.optional(Schema.NullOr(Float)),
564 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
565 + gte: Schema.optional(Schema.NullOr(Float)),
566 + /** In-array constraint. */
567 + in: Schema.optional(Schema.NullOr(Schema.Array(Float))),
568 + /** Less-than constraint. Matches any values that are less than the given value. */
569 + lt: Schema.optional(Schema.NullOr(Float)),
570 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
571 + lte: Schema.optional(Schema.NullOr(Float)),
572 + /** Not-equals constraint. */
573 + neq: Schema.optional(Schema.NullOr(Float)),
574 + /** Not-in-array constraint. */
575 + nin: Schema.optional(Schema.NullOr(Schema.Array(Float))),
576 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
577 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
578 +})
579 +export interface NullableNumberComparator extends Schema.Struct.Type<typeof NullableNumberComparator.fields> {}
580 +
581 +/** Comparator for relation existence. */
582 +export const RelationExistsComparator = Schema.Struct({
583 + /** Equals constraint. */
584 + eq: Schema.optional(Schema.NullOr(Schema.Boolean)),
585 + /** Not equals constraint. */
586 + neq: Schema.optional(Schema.NullOr(Schema.Boolean))
587 +})
588 +export interface RelationExistsComparator extends Schema.Struct.Type<typeof RelationExistsComparator.fields> {}
589 +
590 +/** Reaction filtering options. */
591 +export const ReactionFilter: Schema.Codec<ReactionFilter, ReactionFilterEncoded> = Schema.Struct({
592 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReactionFilter)))),
593 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
594 + customEmojiId: Schema.optional(Schema.NullOr(IDComparator)),
595 + emoji: Schema.optional(Schema.NullOr(StringComparator)),
596 + id: Schema.optional(Schema.NullOr(IDComparator)),
597 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReactionFilter)))),
598 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
599 +})
600 +export interface ReactionFilter {
601 + /** Compound filters, all of which need to be matched by the reaction. */
602 + readonly and?: readonly ReactionFilter[] | null | undefined
603 + /** Comparator for the created at date. */
604 + readonly createdAt?: DateComparator | null | undefined
605 + /** Comparator for the reactions custom emoji. */
606 + readonly customEmojiId?: IDComparator | null | undefined
607 + /** Comparator for the reactions emoji. */
608 + readonly emoji?: StringComparator | null | undefined
609 + /** Comparator for the identifier. */
610 + readonly id?: IDComparator | null | undefined
611 + /** Compound filters, one of which need to be matched by the reaction. */
612 + readonly or?: readonly ReactionFilter[] | null | undefined
613 + /** Comparator for the updated at date. */
614 + readonly updatedAt?: DateComparator | null | undefined
615 +}
616 +export interface ReactionFilterEncoded {
617 + readonly and?: readonly ReactionFilterEncoded[] | null | undefined
618 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
619 + readonly customEmojiId?: typeof IDComparator.Encoded | null | undefined
620 + readonly emoji?: typeof StringComparator.Encoded | null | undefined
621 + readonly id?: typeof IDComparator.Encoded | null | undefined
622 + readonly or?: readonly ReactionFilterEncoded[] | null | undefined
623 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
624 +}
625 +
626 +/** Reaction filtering options. */
627 +export const ReactionCollectionFilter: Schema.Codec<ReactionCollectionFilter, ReactionCollectionFilterEncoded> = Schema.Struct({
628 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReactionCollectionFilter)))),
629 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
630 + customEmojiId: Schema.optional(Schema.NullOr(IDComparator)),
631 + emoji: Schema.optional(Schema.NullOr(StringComparator)),
632 + every: Schema.optional(Schema.NullOr(ReactionFilter)),
633 + id: Schema.optional(Schema.NullOr(IDComparator)),
634 + length: Schema.optional(Schema.NullOr(NumberComparator)),
635 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReactionCollectionFilter)))),
636 + some: Schema.optional(Schema.NullOr(ReactionFilter)),
637 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
638 +})
639 +export interface ReactionCollectionFilter {
640 + /** Compound filters, all of which need to be matched by the reaction. */
641 + readonly and?: readonly ReactionCollectionFilter[] | null | undefined
642 + /** Comparator for the created at date. */
643 + readonly createdAt?: DateComparator | null | undefined
644 + /** Comparator for the reactions custom emoji. */
645 + readonly customEmojiId?: IDComparator | null | undefined
646 + /** Comparator for the reactions emoji. */
647 + readonly emoji?: StringComparator | null | undefined
648 + /** Filters that needs to be matched by all reactions. */
649 + readonly every?: ReactionFilter | null | undefined
650 + /** Comparator for the identifier. */
651 + readonly id?: IDComparator | null | undefined
652 + /** Comparator for the collection length. */
653 + readonly length?: NumberComparator | null | undefined
654 + /** Compound filters, one of which need to be matched by the reaction. */
655 + readonly or?: readonly ReactionCollectionFilter[] | null | undefined
656 + /** Filters that needs to be matched by some reactions. */
657 + readonly some?: ReactionFilter | null | undefined
658 + /** Comparator for the updated at date. */
659 + readonly updatedAt?: DateComparator | null | undefined
660 +}
661 +export interface ReactionCollectionFilterEncoded {
662 + readonly and?: readonly ReactionCollectionFilterEncoded[] | null | undefined
663 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
664 + readonly customEmojiId?: typeof IDComparator.Encoded | null | undefined
665 + readonly emoji?: typeof StringComparator.Encoded | null | undefined
666 + readonly every?: ReactionFilterEncoded | null | undefined
667 + readonly id?: typeof IDComparator.Encoded | null | undefined
668 + readonly length?: typeof NumberComparator.Encoded | null | undefined
669 + readonly or?: readonly ReactionCollectionFilterEncoded[] | null | undefined
670 + readonly some?: ReactionFilterEncoded | null | undefined
671 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
672 +}
673 +
674 +/** Comparator for optional timeless dates. */
675 +export const NullableTimelessDateComparator = Schema.Struct({
676 + /** Equals constraint. */
677 + eq: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
678 + /** Greater-than constraint. Matches any values that are greater than the given value. */
679 + gt: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
680 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
681 + gte: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
682 + /** In-array constraint. */
683 + in: Schema.optional(Schema.NullOr(Schema.Array(TimelessDateOrDuration))),
684 + /** Less-than constraint. Matches any values that are less than the given value. */
685 + lt: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
686 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
687 + lte: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
688 + /** Not-equals constraint. */
689 + neq: Schema.optional(Schema.NullOr(TimelessDateOrDuration)),
690 + /** Not-in-array constraint. */
691 + nin: Schema.optional(Schema.NullOr(Schema.Array(TimelessDateOrDuration))),
692 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
693 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
694 +})
695 +export interface NullableTimelessDateComparator extends Schema.Struct.Type<typeof NullableTimelessDateComparator.fields> {}
696 +
697 +/** Comparator for estimates. */
698 +export const EstimateComparator = Schema.Struct({
699 + /** Compound filters, one of which need to be matched by the estimate. */
700 + and: Schema.optional(Schema.NullOr(Schema.Array(NullableNumberComparator))),
701 + /** Equals constraint. */
702 + eq: Schema.optional(Schema.NullOr(Float)),
703 + /** Greater-than constraint. Matches any values that are greater than the given value. */
704 + gt: Schema.optional(Schema.NullOr(Float)),
705 + /** Greater-than-or-equal constraint. Matches any values that are greater than or equal to the given value. */
706 + gte: Schema.optional(Schema.NullOr(Float)),
707 + /** In-array constraint. */
708 + in: Schema.optional(Schema.NullOr(Schema.Array(Float))),
709 + /** Less-than constraint. Matches any values that are less than the given value. */
710 + lt: Schema.optional(Schema.NullOr(Float)),
711 + /** Less-than-or-equal constraint. Matches any values that are less than or equal to the given value. */
712 + lte: Schema.optional(Schema.NullOr(Float)),
713 + /** Not-equals constraint. */
714 + neq: Schema.optional(Schema.NullOr(Float)),
715 + /** Not-in-array constraint. */
716 + nin: Schema.optional(Schema.NullOr(Schema.Array(Float))),
717 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
718 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
719 + /** Compound filters, all of which need to be matched by the estimate. */
720 + or: Schema.optional(Schema.NullOr(Schema.Array(NullableNumberComparator)))
721 +})
722 +export interface EstimateComparator extends Schema.Struct.Type<typeof EstimateComparator.fields> {}
723 +
724 +/** Comparator for issue identifiers. */
725 +export const IssueIDComparator = Schema.Struct({
726 + /** Equals constraint. */
727 + eq: Schema.optional(Schema.NullOr(ID)),
728 + /** In-array constraint. */
729 + in: Schema.optional(Schema.NullOr(Schema.Array(ID))),
730 + /** Not-equals constraint. */
731 + neq: Schema.optional(Schema.NullOr(ID)),
732 + /** Not-in-array constraint. */
733 + nin: Schema.optional(Schema.NullOr(Schema.Array(ID)))
734 +})
735 +export interface IssueIDComparator extends Schema.Struct.Type<typeof IssueIDComparator.fields> {}
736 +
737 +/** Comparator for release stage type. */
738 +export const ReleaseStageTypeComparator = Schema.Struct({
739 + /** Equals constraint. */
740 + eq: Schema.optional(Schema.NullOr(ReleaseStageType)),
741 + /** In-array constraint. */
742 + in: Schema.optional(Schema.NullOr(Schema.Array(ReleaseStageType))),
743 + /** Not-equals constraint. */
744 + neq: Schema.optional(Schema.NullOr(ReleaseStageType)),
745 + /** Not-in-array constraint. */
746 + nin: Schema.optional(Schema.NullOr(Schema.Array(ReleaseStageType))),
747 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
748 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
749 +})
750 +export interface ReleaseStageTypeComparator extends Schema.Struct.Type<typeof ReleaseStageTypeComparator.fields> {}
751 +
752 +/** Release stage filtering options. */
753 +export const ReleaseStageFilter: Schema.Codec<ReleaseStageFilter, ReleaseStageFilterEncoded> = Schema.Struct({
754 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseStageFilter)))),
755 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
756 + id: Schema.optional(Schema.NullOr(IDComparator)),
757 + name: Schema.optional(Schema.NullOr(StringComparator)),
758 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseStageFilter)))),
759 + type: Schema.optional(Schema.NullOr(ReleaseStageTypeComparator)),
760 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
761 +})
762 +export interface ReleaseStageFilter {
763 + /** Compound filters, all of which need to be matched by the stage. */
764 + readonly and?: readonly ReleaseStageFilter[] | null | undefined
765 + /** Comparator for the created at date. */
766 + readonly createdAt?: DateComparator | null | undefined
767 + /** Comparator for the identifier. */
768 + readonly id?: IDComparator | null | undefined
769 + /** Comparator for the stage name. */
770 + readonly name?: StringComparator | null | undefined
771 + /** Compound filters, one of which need to be matched by the stage. */
772 + readonly or?: readonly ReleaseStageFilter[] | null | undefined
773 + /** Comparator for the stage type. */
774 + readonly type?: ReleaseStageTypeComparator | null | undefined
775 + /** Comparator for the updated at date. */
776 + readonly updatedAt?: DateComparator | null | undefined
777 +}
778 +export interface ReleaseStageFilterEncoded {
779 + readonly and?: readonly ReleaseStageFilterEncoded[] | null | undefined
780 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
781 + readonly id?: typeof IDComparator.Encoded | null | undefined
782 + readonly name?: typeof StringComparator.Encoded | null | undefined
783 + readonly or?: readonly ReleaseStageFilterEncoded[] | null | undefined
784 + readonly type?: typeof ReleaseStageTypeComparator.Encoded | null | undefined
785 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
786 +}
787 +
788 +/** [Internal] Comparator for content. */
789 +export const ContentComparator = Schema.Struct({
790 + /** [Internal] Contains constraint. */
791 + contains: Schema.optional(Schema.NullOr(Schema.String)),
792 + /** [Internal] Not-contains constraint. */
793 + notContains: Schema.optional(Schema.NullOr(Schema.String))
794 +})
795 +export interface ContentComparator extends Schema.Struct.Type<typeof ContentComparator.fields> {}
796 +
797 +/** Comparator for sla status. */
798 +export const SlaStatusComparator = Schema.Struct({
799 + /** Equals constraint. */
800 + eq: Schema.optional(Schema.NullOr(SlaStatus)),
801 + /** In-array constraint. */
802 + in: Schema.optional(Schema.NullOr(Schema.Array(SlaStatus))),
803 + /** Not-equals constraint. */
804 + neq: Schema.optional(Schema.NullOr(SlaStatus)),
805 + /** Not-in-array constraint. */
806 + nin: Schema.optional(Schema.NullOr(Schema.Array(SlaStatus))),
807 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
808 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
809 +})
810 +export interface SlaStatusComparator extends Schema.Struct.Type<typeof SlaStatusComparator.fields> {}
811 +
812 +/** [INTERNAL] Comparator for Salesforce metadata. */
813 +export const SalesforceMetadataIntegrationComparator = Schema.Struct({
814 + /** Salesforce Case metadata filter */
815 + caseMetadata: Schema.optional(Schema.NullOr(JSONObject))
816 +})
817 +export interface SalesforceMetadataIntegrationComparator extends Schema.Struct.Type<typeof SalesforceMetadataIntegrationComparator.fields> {}
818 +
819 +/** Comparator for source type. */
820 +export const SubTypeComparator = Schema.Struct({
821 + /** Equals constraint. */
822 + eq: Schema.optional(Schema.NullOr(Schema.String)),
823 + /** In-array constraint. */
824 + in: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
825 + /** Not-equals constraint. */
826 + neq: Schema.optional(Schema.NullOr(Schema.String)),
827 + /** Not-in-array constraint. */
828 + nin: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
829 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
830 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
831 +})
832 +export interface SubTypeComparator extends Schema.Struct.Type<typeof SubTypeComparator.fields> {}
833 +
834 +/** Comparator for the workflow definition that created an issue. */
835 +export const WorkflowDefinitionIdComparator = Schema.Struct({
836 + /** Equals constraint. */
837 + eq: Schema.optional(Schema.NullOr(ID)),
838 + /** In-array constraint. */
839 + in: Schema.optional(Schema.NullOr(Schema.Array(ID))),
840 + /** Not-equals constraint. */
841 + neq: Schema.optional(Schema.NullOr(ID)),
842 + /** Not-in-array constraint. */
843 + nin: Schema.optional(Schema.NullOr(Schema.Array(ID))),
844 + /** Null constraint. Matches any non-null values if the given value is false, otherwise it matches null values. */
845 + null: Schema.optional(Schema.NullOr(Schema.Boolean))
846 +})
847 +export interface WorkflowDefinitionIdComparator extends Schema.Struct.Type<typeof WorkflowDefinitionIdComparator.fields> {}
848 +
849 +/** Comparator for issue source type. */
850 +export const SourceMetadataComparator = Schema.Struct({
851 + /** Null constraint. When true, matches issues without an external source: issues with no source metadata and issues created through the API, an OAuth application, or a loop. When false, matches issues created by an integration or an intake source such as email. */
852 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
853 + /** [INTERNAL] Comparator for the salesforce metadata. */
854 + salesforceMetadata: Schema.optional(Schema.NullOr(SalesforceMetadataIntegrationComparator)),
855 + /** Comparator for the sub type. */
856 + subType: Schema.optional(Schema.NullOr(SubTypeComparator)),
857 + /** Comparator for the workflow definition that created the issue. */
858 + workflowDefinitionId: Schema.optional(Schema.NullOr(WorkflowDefinitionIdComparator))
859 +})
860 +export interface SourceMetadataComparator extends Schema.Struct.Type<typeof SourceMetadataComparator.fields> {}
861 +
862 +/** Options for filtering projects by project updates. */
863 +export const ProjectUpdatesFilter: Schema.Codec<ProjectUpdatesFilter, ProjectUpdatesFilterEncoded> = Schema.Struct({
864 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectUpdatesFilter)))),
865 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
866 + health: Schema.optional(Schema.NullOr(StringComparator)),
867 + id: Schema.optional(Schema.NullOr(IDComparator)),
868 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectUpdatesFilter)))),
869 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
870 +})
871 +export interface ProjectUpdatesFilter {
872 + /** Compound filters, all of which need to be matched by the project updates. */
873 + readonly and?: readonly ProjectUpdatesFilter[] | null | undefined
874 + /** Comparator for the created at date. */
875 + readonly createdAt?: DateComparator | null | undefined
876 + /** Comparator for the project update health. */
877 + readonly health?: StringComparator | null | undefined
878 + /** Comparator for the identifier. */
879 + readonly id?: IDComparator | null | undefined
880 + /** Compound filters, one of which need to be matched by the project updates. */
881 + readonly or?: readonly ProjectUpdatesFilter[] | null | undefined
882 + /** Comparator for the updated at date. */
883 + readonly updatedAt?: DateComparator | null | undefined
884 +}
885 +export interface ProjectUpdatesFilterEncoded {
886 + readonly and?: readonly ProjectUpdatesFilterEncoded[] | null | undefined
887 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
888 + readonly health?: typeof StringComparator.Encoded | null | undefined
889 + readonly id?: typeof IDComparator.Encoded | null | undefined
890 + readonly or?: readonly ProjectUpdatesFilterEncoded[] | null | undefined
891 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
892 +}
893 +
894 +/** Collection filtering options for filtering projects by project updates. */
895 +export const ProjectUpdatesCollectionFilter: Schema.Codec<ProjectUpdatesCollectionFilter, ProjectUpdatesCollectionFilterEncoded> = Schema.Struct({
896 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectUpdatesCollectionFilter)))),
897 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
898 + every: Schema.optional(Schema.NullOr(ProjectUpdatesFilter)),
899 + health: Schema.optional(Schema.NullOr(StringComparator)),
900 + id: Schema.optional(Schema.NullOr(IDComparator)),
901 + length: Schema.optional(Schema.NullOr(NumberComparator)),
902 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectUpdatesCollectionFilter)))),
903 + some: Schema.optional(Schema.NullOr(ProjectUpdatesFilter)),
904 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
905 +})
906 +export interface ProjectUpdatesCollectionFilter {
907 + /** Compound filters, all of which need to be matched by the project update. */
908 + readonly and?: readonly ProjectUpdatesCollectionFilter[] | null | undefined
909 + /** Comparator for the created at date. */
910 + readonly createdAt?: DateComparator | null | undefined
911 + /** Filters that needs to be matched by all updates. */
912 + readonly every?: ProjectUpdatesFilter | null | undefined
913 + /** Comparator for the project update health. */
914 + readonly health?: StringComparator | null | undefined
915 + /** Comparator for the identifier. */
916 + readonly id?: IDComparator | null | undefined
917 + /** Comparator for the collection length. */
918 + readonly length?: NumberComparator | null | undefined
919 + /** Compound filters, one of which need to be matched by the update. */
920 + readonly or?: readonly ProjectUpdatesCollectionFilter[] | null | undefined
921 + /** Filters that needs to be matched by some updates. */
922 + readonly some?: ProjectUpdatesFilter | null | undefined
923 + /** Comparator for the updated at date. */
924 + readonly updatedAt?: DateComparator | null | undefined
925 +}
926 +export interface ProjectUpdatesCollectionFilterEncoded {
927 + readonly and?: readonly ProjectUpdatesCollectionFilterEncoded[] | null | undefined
928 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
929 + readonly every?: ProjectUpdatesFilterEncoded | null | undefined
930 + readonly health?: typeof StringComparator.Encoded | null | undefined
931 + readonly id?: typeof IDComparator.Encoded | null | undefined
932 + readonly length?: typeof NumberComparator.Encoded | null | undefined
933 + readonly or?: readonly ProjectUpdatesCollectionFilterEncoded[] | null | undefined
934 + readonly some?: ProjectUpdatesFilterEncoded | null | undefined
935 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
936 +}
937 +
938 +/** Comparator for strings in arrays. */
939 +export const StringItemComparator = Schema.Struct({
940 + /** Contains constraint. Matches any values that contain the given string. */
941 + contains: Schema.optional(Schema.NullOr(Schema.String)),
942 + /** Contains case insensitive constraint. Matches any values that contain the given string case insensitive. */
943 + containsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
944 + /** Contains case and accent insensitive constraint. Matches any values that contain the given string case and accent insensitive. */
945 + containsIgnoreCaseAndAccent: Schema.optional(Schema.NullOr(Schema.String)),
946 + /** Ends with constraint. Matches any values that end with the given string. */
947 + endsWith: Schema.optional(Schema.NullOr(Schema.String)),
948 + /** Equals constraint. */
949 + eq: Schema.optional(Schema.NullOr(Schema.String)),
950 + /** Equals case insensitive. Matches any values that matches the given string case insensitive. */
951 + eqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
952 + /** In-array constraint. */
953 + in: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
954 + /** Not-equals constraint. */
955 + neq: Schema.optional(Schema.NullOr(Schema.String)),
956 + /** Not-equals case insensitive. Matches any values that don't match the given string case insensitive. */
957 + neqIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
958 + /** Not-in-array constraint. */
959 + nin: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
960 + /** Doesn't contain constraint. Matches any values that don't contain the given string. */
961 + notContains: Schema.optional(Schema.NullOr(Schema.String)),
962 + /** Doesn't contain case insensitive constraint. Matches any values that don't contain the given string case insensitive. */
963 + notContainsIgnoreCase: Schema.optional(Schema.NullOr(Schema.String)),
964 + /** Doesn't end with constraint. Matches any values that don't end with the given string. */
965 + notEndsWith: Schema.optional(Schema.NullOr(Schema.String)),
966 + /** Doesn't start with constraint. Matches any values that don't start with the given string. */
967 + notStartsWith: Schema.optional(Schema.NullOr(Schema.String)),
968 + /** Starts with constraint. Matches any values that start with the given string. */
969 + startsWith: Schema.optional(Schema.NullOr(Schema.String)),
970 + /** Starts with case insensitive constraint. Matches any values that start with the given string. */
971 + startsWithIgnoreCase: Schema.optional(Schema.NullOr(Schema.String))
972 +})
973 +export interface StringItemComparator extends Schema.Struct.Type<typeof StringItemComparator.fields> {}
974 +
975 +/** Comparator for strings. */
976 +export const StringArrayComparator = Schema.Struct({
977 + /** Compound filters, all of which need to be matched. */
978 + every: Schema.optional(Schema.NullOr(StringItemComparator)),
979 + /** Length of the array. Matches any values that have the given length. */
980 + length: Schema.optional(Schema.NullOr(NumberComparator)),
981 + /** Compound filters, one of which needs to be matched. */
982 + some: Schema.optional(Schema.NullOr(StringItemComparator))
983 +})
984 +export interface StringArrayComparator extends Schema.Struct.Type<typeof StringArrayComparator.fields> {}
985 +
986 +/** Customer status filtering options. */
987 +export const CustomerStatusFilter: Schema.Codec<CustomerStatusFilter, CustomerStatusFilterEncoded> = Schema.Struct({
988 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerStatusFilter)))),
989 + color: Schema.optional(Schema.NullOr(StringComparator)),
990 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
991 + description: Schema.optional(Schema.NullOr(StringComparator)),
992 + id: Schema.optional(Schema.NullOr(IDComparator)),
993 + name: Schema.optional(Schema.NullOr(StringComparator)),
994 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerStatusFilter)))),
995 + position: Schema.optional(Schema.NullOr(NumberComparator)),
996 + type: Schema.optional(Schema.NullOr(StringComparator)),
997 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
998 +})
999 +export interface CustomerStatusFilter {
1000 + /** Compound filters, all of which need to be matched by the customer status. */
1001 + readonly and?: readonly CustomerStatusFilter[] | null | undefined
1002 + /** Comparator for the customer status color. */
1003 + readonly color?: StringComparator | null | undefined
1004 + /** Comparator for the created at date. */
1005 + readonly createdAt?: DateComparator | null | undefined
1006 + /** Comparator for the customer status description. */
1007 + readonly description?: StringComparator | null | undefined
1008 + /** Comparator for the identifier. */
1009 + readonly id?: IDComparator | null | undefined
1010 + /** Comparator for the customer status name. */
1011 + readonly name?: StringComparator | null | undefined
1012 + /** Compound filters, one of which needs to be matched by the customer status. */
1013 + readonly or?: readonly CustomerStatusFilter[] | null | undefined
1014 + /** Comparator for the customer status position. */
1015 + readonly position?: NumberComparator | null | undefined
1016 + /** Comparator for the customer status type. */
1017 + readonly type?: StringComparator | null | undefined
1018 + /** Comparator for the updated at date. */
1019 + readonly updatedAt?: DateComparator | null | undefined
1020 +}
1021 +export interface CustomerStatusFilterEncoded {
1022 + readonly and?: readonly CustomerStatusFilterEncoded[] | null | undefined
1023 + readonly color?: typeof StringComparator.Encoded | null | undefined
1024 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1025 + readonly description?: typeof StringComparator.Encoded | null | undefined
1026 + readonly id?: typeof IDComparator.Encoded | null | undefined
1027 + readonly name?: typeof StringComparator.Encoded | null | undefined
1028 + readonly or?: readonly CustomerStatusFilterEncoded[] | null | undefined
1029 + readonly position?: typeof NumberComparator.Encoded | null | undefined
1030 + readonly type?: typeof StringComparator.Encoded | null | undefined
1031 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1032 +}
1033 +
1034 +/** Customer tier filtering options. */
1035 +export const CustomerTierFilter: Schema.Codec<CustomerTierFilter, CustomerTierFilterEncoded> = Schema.Struct({
1036 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerTierFilter)))),
1037 + color: Schema.optional(Schema.NullOr(StringComparator)),
1038 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1039 + description: Schema.optional(Schema.NullOr(StringComparator)),
1040 + displayName: Schema.optional(Schema.NullOr(StringComparator)),
1041 + id: Schema.optional(Schema.NullOr(IDComparator)),
1042 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerTierFilter)))),
1043 + position: Schema.optional(Schema.NullOr(NumberComparator)),
1044 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
1045 +})
1046 +export interface CustomerTierFilter {
1047 + /** Compound filters, all of which need to be matched by the customer tier. */
1048 + readonly and?: readonly CustomerTierFilter[] | null | undefined
1049 + /** Comparator for the customer tier color. */
1050 + readonly color?: StringComparator | null | undefined
1051 + /** Comparator for the created at date. */
1052 + readonly createdAt?: DateComparator | null | undefined
1053 + /** Comparator for the customer tier description. */
1054 + readonly description?: StringComparator | null | undefined
1055 + /** Comparator for the customer tier display name. */
1056 + readonly displayName?: StringComparator | null | undefined
1057 + /** Comparator for the identifier. */
1058 + readonly id?: IDComparator | null | undefined
1059 + /** Compound filters, one of which needs to be matched by the customer tier. */
1060 + readonly or?: readonly CustomerTierFilter[] | null | undefined
1061 + /** Comparator for the customer tier position. */
1062 + readonly position?: NumberComparator | null | undefined
1063 + /** Comparator for the updated at date. */
1064 + readonly updatedAt?: DateComparator | null | undefined
1065 +}
1066 +export interface CustomerTierFilterEncoded {
1067 + readonly and?: readonly CustomerTierFilterEncoded[] | null | undefined
1068 + readonly color?: typeof StringComparator.Encoded | null | undefined
1069 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1070 + readonly description?: typeof StringComparator.Encoded | null | undefined
1071 + readonly displayName?: typeof StringComparator.Encoded | null | undefined
1072 + readonly id?: typeof IDComparator.Encoded | null | undefined
1073 + readonly or?: readonly CustomerTierFilterEncoded[] | null | undefined
1074 + readonly position?: typeof NumberComparator.Encoded | null | undefined
1075 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1076 +}
1077 +
1078 +/** Issue filtering options. */
1079 +export const IssueFilter: Schema.Codec<IssueFilter, IssueFilterEncoded> = Schema.Struct({
1080 + accumulatedStateUpdatedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1081 + activity: Schema.optional(Schema.NullOr(Schema.suspend(() => ActivityCollectionFilter))),
1082 + addedToCycleAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1083 + addedToCyclePeriod: Schema.optional(Schema.NullOr(CyclePeriodComparator)),
1084 + ageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1085 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueFilter)))),
1086 + archivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1087 + assignee: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1088 + attachments: Schema.optional(Schema.NullOr(Schema.suspend(() => AttachmentCollectionFilter))),
1089 + autoArchivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1090 + autoClosedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1091 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1092 + children: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
1093 + comments: Schema.optional(Schema.NullOr(Schema.suspend(() => CommentCollectionFilter))),
1094 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1095 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1096 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1097 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
1098 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
1099 + cycle: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCycleFilter))),
1100 + cycleTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1101 + delegate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1102 + description: Schema.optional(Schema.NullOr(NullableStringComparator)),
1103 + dueDate: Schema.optional(Schema.NullOr(NullableTimelessDateComparator)),
1104 + estimate: Schema.optional(Schema.NullOr(EstimateComparator)),
1105 + hasActiveAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1106 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1107 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1108 + hasDismissedAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1109 + hasDuplicateRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1110 + hasErroredAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1111 + hasMergedAgentPullRequests: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1112 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1113 + hasSharedUsers: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1114 + hasSuggestedAssignees: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1115 + hasSuggestedLabels: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1116 + hasSuggestedProjects: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1117 + hasSuggestedRelatedIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1118 + hasSuggestedSimilarIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1119 + hasSuggestedTeams: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1120 + id: Schema.optional(Schema.NullOr(IssueIDComparator)),
1121 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelCollectionFilter))),
1122 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
1123 + leadTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1124 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
1125 + number: Schema.optional(Schema.NullOr(NumberComparator)),
1126 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueFilter)))),
1127 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
1128 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
1129 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
1130 + projectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectMilestoneFilter))),
1131 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
1132 + recurringIssueTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
1133 + releases: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseCollectionFilter))),
1134 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
1135 + sharedWith: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
1136 + slaBreachesAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1137 + slaStatus: Schema.optional(Schema.NullOr(SlaStatusComparator)),
1138 + snoozedBy: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1139 + snoozedUntilAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1140 + sourceMetadata: Schema.optional(Schema.NullOr(SourceMetadataComparator)),
1141 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1142 + state: Schema.optional(Schema.NullOr(Schema.suspend(() => WorkflowStateFilter))),
1143 + subscribers: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
1144 + suggestions: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueSuggestionCollectionFilter))),
1145 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
1146 + title: Schema.optional(Schema.NullOr(StringComparator)),
1147 + triageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1148 + triagedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1149 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
1150 +})
1151 +export interface IssueFilter {
1152 + /** [Internal] Comparator for the issue's accumulatedStateUpdatedAt date. */
1153 + readonly accumulatedStateUpdatedAt?: NullableDateComparator | null | undefined
1154 + /** Filters that the issue's activities must satisfy. */
1155 + readonly activity?: ActivityCollectionFilter | null | undefined
1156 + /** Comparator for the issues added to cycle at date. */
1157 + readonly addedToCycleAt?: NullableDateComparator | null | undefined
1158 + /** Comparator for the period when issue was added to a cycle. */
1159 + readonly addedToCyclePeriod?: CyclePeriodComparator | null | undefined
1160 + /** [Internal] Age (created -> now) comparator, defined if the issue is still open. */
1161 + readonly ageTime?: NullableDurationComparator | null | undefined
1162 + /** Compound filters, all of which need to be matched by the issue. */
1163 + readonly and?: readonly IssueFilter[] | null | undefined
1164 + /** Comparator for the issues archived at date. */
1165 + readonly archivedAt?: NullableDateComparator | null | undefined
1166 + /** Filters that the issues assignee must satisfy. */
1167 + readonly assignee?: NullableUserFilter | null | undefined
1168 + /** Filters that the issues attachments must satisfy. */
1169 + readonly attachments?: AttachmentCollectionFilter | null | undefined
1170 + /** Comparator for the issues auto archived at date. */
1171 + readonly autoArchivedAt?: NullableDateComparator | null | undefined
1172 + /** Comparator for the issues auto closed at date. */
1173 + readonly autoClosedAt?: NullableDateComparator | null | undefined
1174 + /** Comparator for the issues canceled at date. */
1175 + readonly canceledAt?: NullableDateComparator | null | undefined
1176 + /** Filters that the child issues must satisfy. */
1177 + readonly children?: IssueCollectionFilter | null | undefined
1178 + /** Filters that the issues comments must satisfy. */
1179 + readonly comments?: CommentCollectionFilter | null | undefined
1180 + /** Comparator for the issues completed at date. */
1181 + readonly completedAt?: NullableDateComparator | null | undefined
1182 + /** Comparator for the created at date. */
1183 + readonly createdAt?: DateComparator | null | undefined
1184 + /** Filters that the issues creator must satisfy. */
1185 + readonly creator?: NullableUserFilter | null | undefined
1186 + /** Count of customers */
1187 + readonly customerCount?: NumberComparator | null | undefined
1188 + /** Count of important customers */
1189 + readonly customerImportantCount?: NumberComparator | null | undefined
1190 + /** Filters that the issues cycle must satisfy. */
1191 + readonly cycle?: NullableCycleFilter | null | undefined
1192 + /** [Internal] Cycle time (started -> completed) comparator. */
1193 + readonly cycleTime?: NullableDurationComparator | null | undefined
1194 + /** Filters that the issue's delegated agent must satisfy. */
1195 + readonly delegate?: NullableUserFilter | null | undefined
1196 + /** Comparator for the issues description. */
1197 + readonly description?: NullableStringComparator | null | undefined
1198 + /** Comparator for the issues due date. */
1199 + readonly dueDate?: NullableTimelessDateComparator | null | undefined
1200 + /** Comparator for the issues estimate. */
1201 + readonly estimate?: EstimateComparator | null | undefined
1202 + /** [Internal] Comparator for filtering issues bucketed as having active agent sessions, no closed agent pull requests, and no merged agent pull requests. */
1203 + readonly hasActiveAgentSessions?: RelationExistsComparator | null | undefined
1204 + /** Comparator for filtering issues which are blocked. */
1205 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
1206 + /** Comparator for filtering issues which are blocking. */
1207 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
1208 + /** [Internal] Comparator for filtering issues bucketed as having all agent sessions dismissed or closed, and no merged agent pull requests. */
1209 + readonly hasDismissedAgentSessions?: RelationExistsComparator | null | undefined
1210 + /** Comparator for filtering issues which are duplicates. */
1211 + readonly hasDuplicateRelations?: RelationExistsComparator | null | undefined
1212 + /** [Internal] Comparator for filtering issues bucketed as having an errored agent session, no active sessions, and no merged agent pull requests. */
1213 + readonly hasErroredAgentSessions?: RelationExistsComparator | null | undefined
1214 + /** [Internal] Comparator for filtering issues which have agent-session-linked pull requests that were merged. */
1215 + readonly hasMergedAgentPullRequests?: RelationExistsComparator | null | undefined
1216 + /** Comparator for filtering issues with relations. */
1217 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
1218 + /** Comparator for filtering issues which have been shared with users outside of the team. */
1219 + readonly hasSharedUsers?: RelationExistsComparator | null | undefined
1220 + /** [Internal] Comparator for filtering issues which have suggested assignees. */
1221 + readonly hasSuggestedAssignees?: RelationExistsComparator | null | undefined
1222 + /** [Internal] Comparator for filtering issues which have suggested labels. */
1223 + readonly hasSuggestedLabels?: RelationExistsComparator | null | undefined
1224 + /** [Internal] Comparator for filtering issues which have suggested projects. */
1225 + readonly hasSuggestedProjects?: RelationExistsComparator | null | undefined
1226 + /** [Internal] Comparator for filtering issues which have suggested related issues. */
1227 + readonly hasSuggestedRelatedIssues?: RelationExistsComparator | null | undefined
1228 + /** [Internal] Comparator for filtering issues which have suggested similar issues. */
1229 + readonly hasSuggestedSimilarIssues?: RelationExistsComparator | null | undefined
1230 + /** [Internal] Comparator for filtering issues which have suggested teams. */
1231 + readonly hasSuggestedTeams?: RelationExistsComparator | null | undefined
1232 + /** Comparator for the identifier. */
1233 + readonly id?: IssueIDComparator | null | undefined
1234 + /** Filters that issue labels must satisfy. */
1235 + readonly labels?: IssueLabelCollectionFilter | null | undefined
1236 + /** Filters that the last applied template must satisfy. */
1237 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
1238 + /** [Internal] Lead time (created -> completed) comparator. */
1239 + readonly leadTime?: NullableDurationComparator | null | undefined
1240 + /** Filters that the issue's customer needs must satisfy. */
1241 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
1242 + /** Comparator for the issues number. */
1243 + readonly number?: NumberComparator | null | undefined
1244 + /** Compound filters, one of which need to be matched by the issue. */
1245 + readonly or?: readonly IssueFilter[] | null | undefined
1246 + /** Filters that the issue parent must satisfy. */
1247 + readonly parent?: NullableIssueFilter | null | undefined
1248 + /** Comparator for the issues priority. 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low. */
1249 + readonly priority?: NullableNumberComparator | null | undefined
1250 + /** Filters that the issues project must satisfy. */
1251 + readonly project?: NullableProjectFilter | null | undefined
1252 + /** Filters that the issues project milestone must satisfy. */
1253 + readonly projectMilestone?: NullableProjectMilestoneFilter | null | undefined
1254 + /** Filters that the issues reactions must satisfy. */
1255 + readonly reactions?: ReactionCollectionFilter | null | undefined
1256 + /** [ALPHA] Filters that the recurring issue template must satisfy. */
1257 + readonly recurringIssueTemplate?: NullableTemplateFilter | null | undefined
1258 + /** Filters that the issue's releases must satisfy. */
1259 + readonly releases?: ReleaseCollectionFilter | null | undefined
1260 + /** [Internal] Comparator for the issues content. */
1261 + readonly searchableContent?: ContentComparator | null | undefined
1262 + /** Filters that users the issue has been shared with must satisfy. */
1263 + readonly sharedWith?: UserCollectionFilter | null | undefined
1264 + /** Comparator for the issue's SLA breach date. */
1265 + readonly slaBreachesAt?: NullableDateComparator | null | undefined
1266 + /** Comparator for the issues sla status. */
1267 + readonly slaStatus?: SlaStatusComparator | null | undefined
1268 + /** Filters that the issues snoozer must satisfy. */
1269 + readonly snoozedBy?: NullableUserFilter | null | undefined
1270 + /** Comparator for the issues snoozed until date. */
1271 + readonly snoozedUntilAt?: NullableDateComparator | null | undefined
1272 + /** Filters that the source must satisfy. */
1273 + readonly sourceMetadata?: SourceMetadataComparator | null | undefined
1274 + /** Comparator for the issues started at date. */
1275 + readonly startedAt?: NullableDateComparator | null | undefined
1276 + /** Filters that the issues state must satisfy. */
1277 + readonly state?: WorkflowStateFilter | null | undefined
1278 + /** Filters that issue subscribers must satisfy. */
1279 + readonly subscribers?: UserCollectionFilter | null | undefined
1280 + /** [Internal] Filters that the issue's suggestions must satisfy. */
1281 + readonly suggestions?: IssueSuggestionCollectionFilter | null | undefined
1282 + /** Filters that the issues team must satisfy. */
1283 + readonly team?: TeamFilter | null | undefined
1284 + /** Comparator for the issues title. */
1285 + readonly title?: StringComparator | null | undefined
1286 + /** [Internal] Triage time (entered triaged -> triaged) comparator. */
1287 + readonly triageTime?: NullableDurationComparator | null | undefined
1288 + /** Comparator for the issues triaged at date. */
1289 + readonly triagedAt?: NullableDateComparator | null | undefined
1290 + /** Comparator for the updated at date. */
1291 + readonly updatedAt?: DateComparator | null | undefined
1292 +}
1293 +export interface IssueFilterEncoded {
1294 + readonly accumulatedStateUpdatedAt?: typeof NullableDateComparator.Encoded | null | undefined
1295 + readonly activity?: ActivityCollectionFilterEncoded | null | undefined
1296 + readonly addedToCycleAt?: typeof NullableDateComparator.Encoded | null | undefined
1297 + readonly addedToCyclePeriod?: typeof CyclePeriodComparator.Encoded | null | undefined
1298 + readonly ageTime?: typeof NullableDurationComparator.Encoded | null | undefined
1299 + readonly and?: readonly IssueFilterEncoded[] | null | undefined
1300 + readonly archivedAt?: typeof NullableDateComparator.Encoded | null | undefined
1301 + readonly assignee?: NullableUserFilterEncoded | null | undefined
1302 + readonly attachments?: AttachmentCollectionFilterEncoded | null | undefined
1303 + readonly autoArchivedAt?: typeof NullableDateComparator.Encoded | null | undefined
1304 + readonly autoClosedAt?: typeof NullableDateComparator.Encoded | null | undefined
1305 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
1306 + readonly children?: IssueCollectionFilterEncoded | null | undefined
1307 + readonly comments?: CommentCollectionFilterEncoded | null | undefined
1308 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
1309 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1310 + readonly creator?: NullableUserFilterEncoded | null | undefined
1311 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
1312 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
1313 + readonly cycle?: NullableCycleFilterEncoded | null | undefined
1314 + readonly cycleTime?: typeof NullableDurationComparator.Encoded | null | undefined
1315 + readonly delegate?: NullableUserFilterEncoded | null | undefined
1316 + readonly description?: typeof NullableStringComparator.Encoded | null | undefined
1317 + readonly dueDate?: typeof NullableTimelessDateComparator.Encoded | null | undefined
1318 + readonly estimate?: typeof EstimateComparator.Encoded | null | undefined
1319 + readonly hasActiveAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1320 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1321 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1322 + readonly hasDismissedAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1323 + readonly hasDuplicateRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1324 + readonly hasErroredAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1325 + readonly hasMergedAgentPullRequests?: typeof RelationExistsComparator.Encoded | null | undefined
1326 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1327 + readonly hasSharedUsers?: typeof RelationExistsComparator.Encoded | null | undefined
1328 + readonly hasSuggestedAssignees?: typeof RelationExistsComparator.Encoded | null | undefined
1329 + readonly hasSuggestedLabels?: typeof RelationExistsComparator.Encoded | null | undefined
1330 + readonly hasSuggestedProjects?: typeof RelationExistsComparator.Encoded | null | undefined
1331 + readonly hasSuggestedRelatedIssues?: typeof RelationExistsComparator.Encoded | null | undefined
1332 + readonly hasSuggestedSimilarIssues?: typeof RelationExistsComparator.Encoded | null | undefined
1333 + readonly hasSuggestedTeams?: typeof RelationExistsComparator.Encoded | null | undefined
1334 + readonly id?: typeof IssueIDComparator.Encoded | null | undefined
1335 + readonly labels?: IssueLabelCollectionFilterEncoded | null | undefined
1336 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
1337 + readonly leadTime?: typeof NullableDurationComparator.Encoded | null | undefined
1338 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
1339 + readonly number?: typeof NumberComparator.Encoded | null | undefined
1340 + readonly or?: readonly IssueFilterEncoded[] | null | undefined
1341 + readonly parent?: NullableIssueFilterEncoded | null | undefined
1342 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
1343 + readonly project?: NullableProjectFilterEncoded | null | undefined
1344 + readonly projectMilestone?: NullableProjectMilestoneFilterEncoded | null | undefined
1345 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
1346 + readonly recurringIssueTemplate?: NullableTemplateFilterEncoded | null | undefined
1347 + readonly releases?: ReleaseCollectionFilterEncoded | null | undefined
1348 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
1349 + readonly sharedWith?: UserCollectionFilterEncoded | null | undefined
1350 + readonly slaBreachesAt?: typeof NullableDateComparator.Encoded | null | undefined
1351 + readonly slaStatus?: typeof SlaStatusComparator.Encoded | null | undefined
1352 + readonly snoozedBy?: NullableUserFilterEncoded | null | undefined
1353 + readonly snoozedUntilAt?: typeof NullableDateComparator.Encoded | null | undefined
1354 + readonly sourceMetadata?: typeof SourceMetadataComparator.Encoded | null | undefined
1355 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
1356 + readonly state?: WorkflowStateFilterEncoded | null | undefined
1357 + readonly subscribers?: UserCollectionFilterEncoded | null | undefined
1358 + readonly suggestions?: IssueSuggestionCollectionFilterEncoded | null | undefined
1359 + readonly team?: TeamFilterEncoded | null | undefined
1360 + readonly title?: typeof StringComparator.Encoded | null | undefined
1361 + readonly triageTime?: typeof NullableDurationComparator.Encoded | null | undefined
1362 + readonly triagedAt?: typeof NullableDateComparator.Encoded | null | undefined
1363 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1364 +}
1365 +
1366 +/** Activity collection filtering options. */
1367 +export const ActivityCollectionFilter: Schema.Codec<ActivityCollectionFilter, ActivityCollectionFilterEncoded> = Schema.Struct({
1368 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ActivityCollectionFilter)))),
1369 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1370 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ActivityFilter))),
1371 + id: Schema.optional(Schema.NullOr(IDComparator)),
1372 + length: Schema.optional(Schema.NullOr(NumberComparator)),
1373 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ActivityCollectionFilter)))),
1374 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ActivityFilter))),
1375 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
1376 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
1377 +})
1378 +export interface ActivityCollectionFilter {
1379 + /** Compound filters, all of which need to be matched by the activity. */
1380 + readonly and?: readonly ActivityCollectionFilter[] | null | undefined
1381 + /** Comparator for the created at date. */
1382 + readonly createdAt?: DateComparator | null | undefined
1383 + /** Filters that needs to be matched by all activities. */
1384 + readonly every?: ActivityFilter | null | undefined
1385 + /** Comparator for the identifier. */
1386 + readonly id?: IDComparator | null | undefined
1387 + /** Comparator for the collection length. */
1388 + readonly length?: NumberComparator | null | undefined
1389 + /** Compound filters, one of which need to be matched by the activity. */
1390 + readonly or?: readonly ActivityCollectionFilter[] | null | undefined
1391 + /** Filters that needs to be matched by some activities. */
1392 + readonly some?: ActivityFilter | null | undefined
1393 + /** Comparator for the updated at date. */
1394 + readonly updatedAt?: DateComparator | null | undefined
1395 + /** Filters that the activity's user must satisfy. */
1396 + readonly user?: UserFilter | null | undefined
1397 +}
1398 +export interface ActivityCollectionFilterEncoded {
1399 + readonly and?: readonly ActivityCollectionFilterEncoded[] | null | undefined
1400 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1401 + readonly every?: ActivityFilterEncoded | null | undefined
1402 + readonly id?: typeof IDComparator.Encoded | null | undefined
1403 + readonly length?: typeof NumberComparator.Encoded | null | undefined
1404 + readonly or?: readonly ActivityCollectionFilterEncoded[] | null | undefined
1405 + readonly some?: ActivityFilterEncoded | null | undefined
1406 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1407 + readonly user?: UserFilterEncoded | null | undefined
1408 +}
1409 +
1410 +/** Activity filtering options. */
1411 +export const ActivityFilter: Schema.Codec<ActivityFilter, ActivityFilterEncoded> = Schema.Struct({
1412 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ActivityFilter)))),
1413 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1414 + id: Schema.optional(Schema.NullOr(IDComparator)),
1415 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ActivityFilter)))),
1416 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
1417 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
1418 +})
1419 +export interface ActivityFilter {
1420 + /** Compound filters, all of which need to be matched by the activity. */
1421 + readonly and?: readonly ActivityFilter[] | null | undefined
1422 + /** Comparator for the created at date. */
1423 + readonly createdAt?: DateComparator | null | undefined
1424 + /** Comparator for the identifier. */
1425 + readonly id?: IDComparator | null | undefined
1426 + /** Compound filters, one of which need to be matched by the activity. */
1427 + readonly or?: readonly ActivityFilter[] | null | undefined
1428 + /** Comparator for the updated at date. */
1429 + readonly updatedAt?: DateComparator | null | undefined
1430 + /** Filters that the activity's user must satisfy. */
1431 + readonly user?: UserFilter | null | undefined
1432 +}
1433 +export interface ActivityFilterEncoded {
1434 + readonly and?: readonly ActivityFilterEncoded[] | null | undefined
1435 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1436 + readonly id?: typeof IDComparator.Encoded | null | undefined
1437 + readonly or?: readonly ActivityFilterEncoded[] | null | undefined
1438 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1439 + readonly user?: UserFilterEncoded | null | undefined
1440 +}
1441 +
1442 +/** User filtering options. */
1443 +export const UserFilter: Schema.Codec<UserFilter, UserFilterEncoded> = Schema.Struct({
1444 + active: Schema.optional(Schema.NullOr(BooleanComparator)),
1445 + admin: Schema.optional(Schema.NullOr(BooleanComparator)),
1446 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => UserFilter)))),
1447 + app: Schema.optional(Schema.NullOr(BooleanComparator)),
1448 + assignedIssues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
1449 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1450 + displayName: Schema.optional(Schema.NullOr(StringComparator)),
1451 + email: Schema.optional(Schema.NullOr(StringComparator)),
1452 + id: Schema.optional(Schema.NullOr(IDComparator)),
1453 + invited: Schema.optional(Schema.NullOr(BooleanComparator)),
1454 + isInvited: Schema.optional(Schema.NullOr(BooleanComparator)),
1455 + isMe: Schema.optional(Schema.NullOr(BooleanComparator)),
1456 + name: Schema.optional(Schema.NullOr(StringComparator)),
1457 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => UserFilter)))),
1458 + owner: Schema.optional(Schema.NullOr(BooleanComparator)),
1459 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
1460 +})
1461 +export interface UserFilter {
1462 + /** Comparator for the user's activity status. */
1463 + readonly active?: BooleanComparator | null | undefined
1464 + /** Comparator for the user's admin status. */
1465 + readonly admin?: BooleanComparator | null | undefined
1466 + /** Compound filters, all of which need to be matched by the user. */
1467 + readonly and?: readonly UserFilter[] | null | undefined
1468 + /** Comparator for the user's app status. */
1469 + readonly app?: BooleanComparator | null | undefined
1470 + /** Filters that the users assigned issues must satisfy. */
1471 + readonly assignedIssues?: IssueCollectionFilter | null | undefined
1472 + /** Comparator for the created at date. */
1473 + readonly createdAt?: DateComparator | null | undefined
1474 + /** Comparator for the user's display name. */
1475 + readonly displayName?: StringComparator | null | undefined
1476 + /** Comparator for the user's email. */
1477 + readonly email?: StringComparator | null | undefined
1478 + /** Comparator for the identifier. */
1479 + readonly id?: IDComparator | null | undefined
1480 + /** Comparator for the user's invited status. */
1481 + readonly invited?: BooleanComparator | null | undefined
1482 + /** Comparator for the user's invited status. */
1483 + readonly isInvited?: BooleanComparator | null | undefined
1484 + /** Filter based on the currently authenticated user. Set to true to filter for the authenticated user, false for any other user. */
1485 + readonly isMe?: BooleanComparator | null | undefined
1486 + /** Comparator for the user's name. */
1487 + readonly name?: StringComparator | null | undefined
1488 + /** Compound filters, one of which need to be matched by the user. */
1489 + readonly or?: readonly UserFilter[] | null | undefined
1490 + /** Comparator for the user's owner status. */
1491 + readonly owner?: BooleanComparator | null | undefined
1492 + /** Comparator for the updated at date. */
1493 + readonly updatedAt?: DateComparator | null | undefined
1494 +}
1495 +export interface UserFilterEncoded {
1496 + readonly active?: typeof BooleanComparator.Encoded | null | undefined
1497 + readonly admin?: typeof BooleanComparator.Encoded | null | undefined
1498 + readonly and?: readonly UserFilterEncoded[] | null | undefined
1499 + readonly app?: typeof BooleanComparator.Encoded | null | undefined
1500 + readonly assignedIssues?: IssueCollectionFilterEncoded | null | undefined
1501 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1502 + readonly displayName?: typeof StringComparator.Encoded | null | undefined
1503 + readonly email?: typeof StringComparator.Encoded | null | undefined
1504 + readonly id?: typeof IDComparator.Encoded | null | undefined
1505 + readonly invited?: typeof BooleanComparator.Encoded | null | undefined
1506 + readonly isInvited?: typeof BooleanComparator.Encoded | null | undefined
1507 + readonly isMe?: typeof BooleanComparator.Encoded | null | undefined
1508 + readonly name?: typeof StringComparator.Encoded | null | undefined
1509 + readonly or?: readonly UserFilterEncoded[] | null | undefined
1510 + readonly owner?: typeof BooleanComparator.Encoded | null | undefined
1511 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1512 +}
1513 +
1514 +/** Issue filtering options. */
1515 +export const IssueCollectionFilter: Schema.Codec<IssueCollectionFilter, IssueCollectionFilterEncoded> = Schema.Struct({
1516 + accumulatedStateUpdatedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1517 + activity: Schema.optional(Schema.NullOr(Schema.suspend(() => ActivityCollectionFilter))),
1518 + addedToCycleAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1519 + addedToCyclePeriod: Schema.optional(Schema.NullOr(CyclePeriodComparator)),
1520 + ageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1521 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueCollectionFilter)))),
1522 + archivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1523 + assignee: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1524 + attachments: Schema.optional(Schema.NullOr(Schema.suspend(() => AttachmentCollectionFilter))),
1525 + autoArchivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1526 + autoClosedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1527 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1528 + children: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
1529 + comments: Schema.optional(Schema.NullOr(Schema.suspend(() => CommentCollectionFilter))),
1530 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1531 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1532 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1533 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
1534 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
1535 + cycle: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCycleFilter))),
1536 + cycleTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1537 + delegate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1538 + description: Schema.optional(Schema.NullOr(NullableStringComparator)),
1539 + dueDate: Schema.optional(Schema.NullOr(NullableTimelessDateComparator)),
1540 + estimate: Schema.optional(Schema.NullOr(EstimateComparator)),
1541 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueFilter))),
1542 + hasActiveAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1543 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1544 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1545 + hasDismissedAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1546 + hasDuplicateRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1547 + hasErroredAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1548 + hasMergedAgentPullRequests: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1549 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1550 + hasSharedUsers: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1551 + hasSuggestedAssignees: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1552 + hasSuggestedLabels: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1553 + hasSuggestedProjects: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1554 + hasSuggestedRelatedIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1555 + hasSuggestedSimilarIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1556 + hasSuggestedTeams: Schema.optional(Schema.NullOr(RelationExistsComparator)),
1557 + id: Schema.optional(Schema.NullOr(IssueIDComparator)),
1558 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelCollectionFilter))),
1559 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
1560 + leadTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1561 + length: Schema.optional(Schema.NullOr(NumberComparator)),
1562 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
1563 + number: Schema.optional(Schema.NullOr(NumberComparator)),
1564 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueCollectionFilter)))),
1565 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
1566 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
1567 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
1568 + projectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectMilestoneFilter))),
1569 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
1570 + recurringIssueTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
1571 + releases: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseCollectionFilter))),
1572 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
1573 + sharedWith: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
1574 + slaBreachesAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1575 + slaStatus: Schema.optional(Schema.NullOr(SlaStatusComparator)),
1576 + snoozedBy: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1577 + snoozedUntilAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1578 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueFilter))),
1579 + sourceMetadata: Schema.optional(Schema.NullOr(SourceMetadataComparator)),
1580 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1581 + state: Schema.optional(Schema.NullOr(Schema.suspend(() => WorkflowStateFilter))),
1582 + subscribers: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
1583 + suggestions: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueSuggestionCollectionFilter))),
1584 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
1585 + title: Schema.optional(Schema.NullOr(StringComparator)),
1586 + triageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
1587 + triagedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
1588 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
1589 +})
1590 +export interface IssueCollectionFilter {
1591 + /** [Internal] Comparator for the issue's accumulatedStateUpdatedAt date. */
1592 + readonly accumulatedStateUpdatedAt?: NullableDateComparator | null | undefined
1593 + /** Filters that the issue's activities must satisfy. */
1594 + readonly activity?: ActivityCollectionFilter | null | undefined
1595 + /** Comparator for the issues added to cycle at date. */
1596 + readonly addedToCycleAt?: NullableDateComparator | null | undefined
1597 + /** Comparator for the period when issue was added to a cycle. */
1598 + readonly addedToCyclePeriod?: CyclePeriodComparator | null | undefined
1599 + /** [Internal] Age (created -> now) comparator, defined if the issue is still open. */
1600 + readonly ageTime?: NullableDurationComparator | null | undefined
1601 + /** Compound filters, all of which need to be matched by the issue. */
1602 + readonly and?: readonly IssueCollectionFilter[] | null | undefined
1603 + /** Comparator for the issues archived at date. */
1604 + readonly archivedAt?: NullableDateComparator | null | undefined
1605 + /** Filters that the issues assignee must satisfy. */
1606 + readonly assignee?: NullableUserFilter | null | undefined
1607 + /** Filters that the issues attachments must satisfy. */
1608 + readonly attachments?: AttachmentCollectionFilter | null | undefined
1609 + /** Comparator for the issues auto archived at date. */
1610 + readonly autoArchivedAt?: NullableDateComparator | null | undefined
1611 + /** Comparator for the issues auto closed at date. */
1612 + readonly autoClosedAt?: NullableDateComparator | null | undefined
1613 + /** Comparator for the issues canceled at date. */
1614 + readonly canceledAt?: NullableDateComparator | null | undefined
1615 + /** Filters that the child issues must satisfy. */
1616 + readonly children?: IssueCollectionFilter | null | undefined
1617 + /** Filters that the issues comments must satisfy. */
1618 + readonly comments?: CommentCollectionFilter | null | undefined
1619 + /** Comparator for the issues completed at date. */
1620 + readonly completedAt?: NullableDateComparator | null | undefined
1621 + /** Comparator for the created at date. */
1622 + readonly createdAt?: DateComparator | null | undefined
1623 + /** Filters that the issues creator must satisfy. */
1624 + readonly creator?: NullableUserFilter | null | undefined
1625 + /** Count of customers */
1626 + readonly customerCount?: NumberComparator | null | undefined
1627 + /** Count of important customers */
1628 + readonly customerImportantCount?: NumberComparator | null | undefined
1629 + /** Filters that the issues cycle must satisfy. */
1630 + readonly cycle?: NullableCycleFilter | null | undefined
1631 + /** [Internal] Cycle time (started -> completed) comparator. */
1632 + readonly cycleTime?: NullableDurationComparator | null | undefined
1633 + /** Filters that the issue's delegated agent must satisfy. */
1634 + readonly delegate?: NullableUserFilter | null | undefined
1635 + /** Comparator for the issues description. */
1636 + readonly description?: NullableStringComparator | null | undefined
1637 + /** Comparator for the issues due date. */
1638 + readonly dueDate?: NullableTimelessDateComparator | null | undefined
1639 + /** Comparator for the issues estimate. */
1640 + readonly estimate?: EstimateComparator | null | undefined
1641 + /** Filters that needs to be matched by all issues. */
1642 + readonly every?: IssueFilter | null | undefined
1643 + /** [Internal] Comparator for filtering issues bucketed as having active agent sessions, no closed agent pull requests, and no merged agent pull requests. */
1644 + readonly hasActiveAgentSessions?: RelationExistsComparator | null | undefined
1645 + /** Comparator for filtering issues which are blocked. */
1646 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
1647 + /** Comparator for filtering issues which are blocking. */
1648 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
1649 + /** [Internal] Comparator for filtering issues bucketed as having all agent sessions dismissed or closed, and no merged agent pull requests. */
1650 + readonly hasDismissedAgentSessions?: RelationExistsComparator | null | undefined
1651 + /** Comparator for filtering issues which are duplicates. */
1652 + readonly hasDuplicateRelations?: RelationExistsComparator | null | undefined
1653 + /** [Internal] Comparator for filtering issues bucketed as having an errored agent session, no active sessions, and no merged agent pull requests. */
1654 + readonly hasErroredAgentSessions?: RelationExistsComparator | null | undefined
1655 + /** [Internal] Comparator for filtering issues which have agent-session-linked pull requests that were merged. */
1656 + readonly hasMergedAgentPullRequests?: RelationExistsComparator | null | undefined
1657 + /** Comparator for filtering issues with relations. */
1658 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
1659 + /** Comparator for filtering issues which have been shared with users outside of the team. */
1660 + readonly hasSharedUsers?: RelationExistsComparator | null | undefined
1661 + /** [Internal] Comparator for filtering issues which have suggested assignees. */
1662 + readonly hasSuggestedAssignees?: RelationExistsComparator | null | undefined
1663 + /** [Internal] Comparator for filtering issues which have suggested labels. */
1664 + readonly hasSuggestedLabels?: RelationExistsComparator | null | undefined
1665 + /** [Internal] Comparator for filtering issues which have suggested projects. */
1666 + readonly hasSuggestedProjects?: RelationExistsComparator | null | undefined
1667 + /** [Internal] Comparator for filtering issues which have suggested related issues. */
1668 + readonly hasSuggestedRelatedIssues?: RelationExistsComparator | null | undefined
1669 + /** [Internal] Comparator for filtering issues which have suggested similar issues. */
1670 + readonly hasSuggestedSimilarIssues?: RelationExistsComparator | null | undefined
1671 + /** [Internal] Comparator for filtering issues which have suggested teams. */
1672 + readonly hasSuggestedTeams?: RelationExistsComparator | null | undefined
1673 + /** Comparator for the identifier. */
1674 + readonly id?: IssueIDComparator | null | undefined
1675 + /** Filters that issue labels must satisfy. */
1676 + readonly labels?: IssueLabelCollectionFilter | null | undefined
1677 + /** Filters that the last applied template must satisfy. */
1678 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
1679 + /** [Internal] Lead time (created -> completed) comparator. */
1680 + readonly leadTime?: NullableDurationComparator | null | undefined
1681 + /** Comparator for the collection length. */
1682 + readonly length?: NumberComparator | null | undefined
1683 + /** Filters that the issue's customer needs must satisfy. */
1684 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
1685 + /** Comparator for the issues number. */
1686 + readonly number?: NumberComparator | null | undefined
1687 + /** Compound filters, one of which need to be matched by the issue. */
1688 + readonly or?: readonly IssueCollectionFilter[] | null | undefined
1689 + /** Filters that the issue parent must satisfy. */
1690 + readonly parent?: NullableIssueFilter | null | undefined
1691 + /** Comparator for the issues priority. 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low. */
1692 + readonly priority?: NullableNumberComparator | null | undefined
1693 + /** Filters that the issues project must satisfy. */
1694 + readonly project?: NullableProjectFilter | null | undefined
1695 + /** Filters that the issues project milestone must satisfy. */
1696 + readonly projectMilestone?: NullableProjectMilestoneFilter | null | undefined
1697 + /** Filters that the issues reactions must satisfy. */
1698 + readonly reactions?: ReactionCollectionFilter | null | undefined
1699 + /** [ALPHA] Filters that the recurring issue template must satisfy. */
1700 + readonly recurringIssueTemplate?: NullableTemplateFilter | null | undefined
1701 + /** Filters that the issue's releases must satisfy. */
1702 + readonly releases?: ReleaseCollectionFilter | null | undefined
1703 + /** [Internal] Comparator for the issues content. */
1704 + readonly searchableContent?: ContentComparator | null | undefined
1705 + /** Filters that users the issue has been shared with must satisfy. */
1706 + readonly sharedWith?: UserCollectionFilter | null | undefined
1707 + /** Comparator for the issue's SLA breach date. */
1708 + readonly slaBreachesAt?: NullableDateComparator | null | undefined
1709 + /** Comparator for the issues sla status. */
1710 + readonly slaStatus?: SlaStatusComparator | null | undefined
1711 + /** Filters that the issues snoozer must satisfy. */
1712 + readonly snoozedBy?: NullableUserFilter | null | undefined
1713 + /** Comparator for the issues snoozed until date. */
1714 + readonly snoozedUntilAt?: NullableDateComparator | null | undefined
1715 + /** Filters that needs to be matched by some issues. */
1716 + readonly some?: IssueFilter | null | undefined
1717 + /** Filters that the source must satisfy. */
1718 + readonly sourceMetadata?: SourceMetadataComparator | null | undefined
1719 + /** Comparator for the issues started at date. */
1720 + readonly startedAt?: NullableDateComparator | null | undefined
1721 + /** Filters that the issues state must satisfy. */
1722 + readonly state?: WorkflowStateFilter | null | undefined
1723 + /** Filters that issue subscribers must satisfy. */
1724 + readonly subscribers?: UserCollectionFilter | null | undefined
1725 + /** [Internal] Filters that the issue's suggestions must satisfy. */
1726 + readonly suggestions?: IssueSuggestionCollectionFilter | null | undefined
1727 + /** Filters that the issues team must satisfy. */
1728 + readonly team?: TeamFilter | null | undefined
1729 + /** Comparator for the issues title. */
1730 + readonly title?: StringComparator | null | undefined
1731 + /** [Internal] Triage time (entered triaged -> triaged) comparator. */
1732 + readonly triageTime?: NullableDurationComparator | null | undefined
1733 + /** Comparator for the issues triaged at date. */
1734 + readonly triagedAt?: NullableDateComparator | null | undefined
1735 + /** Comparator for the updated at date. */
1736 + readonly updatedAt?: DateComparator | null | undefined
1737 +}
1738 +export interface IssueCollectionFilterEncoded {
1739 + readonly accumulatedStateUpdatedAt?: typeof NullableDateComparator.Encoded | null | undefined
1740 + readonly activity?: ActivityCollectionFilterEncoded | null | undefined
1741 + readonly addedToCycleAt?: typeof NullableDateComparator.Encoded | null | undefined
1742 + readonly addedToCyclePeriod?: typeof CyclePeriodComparator.Encoded | null | undefined
1743 + readonly ageTime?: typeof NullableDurationComparator.Encoded | null | undefined
1744 + readonly and?: readonly IssueCollectionFilterEncoded[] | null | undefined
1745 + readonly archivedAt?: typeof NullableDateComparator.Encoded | null | undefined
1746 + readonly assignee?: NullableUserFilterEncoded | null | undefined
1747 + readonly attachments?: AttachmentCollectionFilterEncoded | null | undefined
1748 + readonly autoArchivedAt?: typeof NullableDateComparator.Encoded | null | undefined
1749 + readonly autoClosedAt?: typeof NullableDateComparator.Encoded | null | undefined
1750 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
1751 + readonly children?: IssueCollectionFilterEncoded | null | undefined
1752 + readonly comments?: CommentCollectionFilterEncoded | null | undefined
1753 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
1754 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1755 + readonly creator?: NullableUserFilterEncoded | null | undefined
1756 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
1757 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
1758 + readonly cycle?: NullableCycleFilterEncoded | null | undefined
1759 + readonly cycleTime?: typeof NullableDurationComparator.Encoded | null | undefined
1760 + readonly delegate?: NullableUserFilterEncoded | null | undefined
1761 + readonly description?: typeof NullableStringComparator.Encoded | null | undefined
1762 + readonly dueDate?: typeof NullableTimelessDateComparator.Encoded | null | undefined
1763 + readonly estimate?: typeof EstimateComparator.Encoded | null | undefined
1764 + readonly every?: IssueFilterEncoded | null | undefined
1765 + readonly hasActiveAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1766 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1767 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1768 + readonly hasDismissedAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1769 + readonly hasDuplicateRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1770 + readonly hasErroredAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
1771 + readonly hasMergedAgentPullRequests?: typeof RelationExistsComparator.Encoded | null | undefined
1772 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
1773 + readonly hasSharedUsers?: typeof RelationExistsComparator.Encoded | null | undefined
1774 + readonly hasSuggestedAssignees?: typeof RelationExistsComparator.Encoded | null | undefined
1775 + readonly hasSuggestedLabels?: typeof RelationExistsComparator.Encoded | null | undefined
1776 + readonly hasSuggestedProjects?: typeof RelationExistsComparator.Encoded | null | undefined
1777 + readonly hasSuggestedRelatedIssues?: typeof RelationExistsComparator.Encoded | null | undefined
1778 + readonly hasSuggestedSimilarIssues?: typeof RelationExistsComparator.Encoded | null | undefined
1779 + readonly hasSuggestedTeams?: typeof RelationExistsComparator.Encoded | null | undefined
1780 + readonly id?: typeof IssueIDComparator.Encoded | null | undefined
1781 + readonly labels?: IssueLabelCollectionFilterEncoded | null | undefined
1782 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
1783 + readonly leadTime?: typeof NullableDurationComparator.Encoded | null | undefined
1784 + readonly length?: typeof NumberComparator.Encoded | null | undefined
1785 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
1786 + readonly number?: typeof NumberComparator.Encoded | null | undefined
1787 + readonly or?: readonly IssueCollectionFilterEncoded[] | null | undefined
1788 + readonly parent?: NullableIssueFilterEncoded | null | undefined
1789 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
1790 + readonly project?: NullableProjectFilterEncoded | null | undefined
1791 + readonly projectMilestone?: NullableProjectMilestoneFilterEncoded | null | undefined
1792 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
1793 + readonly recurringIssueTemplate?: NullableTemplateFilterEncoded | null | undefined
1794 + readonly releases?: ReleaseCollectionFilterEncoded | null | undefined
1795 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
1796 + readonly sharedWith?: UserCollectionFilterEncoded | null | undefined
1797 + readonly slaBreachesAt?: typeof NullableDateComparator.Encoded | null | undefined
1798 + readonly slaStatus?: typeof SlaStatusComparator.Encoded | null | undefined
1799 + readonly snoozedBy?: NullableUserFilterEncoded | null | undefined
1800 + readonly snoozedUntilAt?: typeof NullableDateComparator.Encoded | null | undefined
1801 + readonly some?: IssueFilterEncoded | null | undefined
1802 + readonly sourceMetadata?: typeof SourceMetadataComparator.Encoded | null | undefined
1803 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
1804 + readonly state?: WorkflowStateFilterEncoded | null | undefined
1805 + readonly subscribers?: UserCollectionFilterEncoded | null | undefined
1806 + readonly suggestions?: IssueSuggestionCollectionFilterEncoded | null | undefined
1807 + readonly team?: TeamFilterEncoded | null | undefined
1808 + readonly title?: typeof StringComparator.Encoded | null | undefined
1809 + readonly triageTime?: typeof NullableDurationComparator.Encoded | null | undefined
1810 + readonly triagedAt?: typeof NullableDateComparator.Encoded | null | undefined
1811 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1812 +}
1813 +
1814 +/** User filtering options. */
1815 +export const NullableUserFilter: Schema.Codec<NullableUserFilter, NullableUserFilterEncoded> = Schema.Struct({
1816 + active: Schema.optional(Schema.NullOr(BooleanComparator)),
1817 + admin: Schema.optional(Schema.NullOr(BooleanComparator)),
1818 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableUserFilter)))),
1819 + app: Schema.optional(Schema.NullOr(BooleanComparator)),
1820 + assignedIssues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
1821 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1822 + displayName: Schema.optional(Schema.NullOr(StringComparator)),
1823 + email: Schema.optional(Schema.NullOr(StringComparator)),
1824 + id: Schema.optional(Schema.NullOr(IDComparator)),
1825 + invited: Schema.optional(Schema.NullOr(BooleanComparator)),
1826 + isInvited: Schema.optional(Schema.NullOr(BooleanComparator)),
1827 + isMe: Schema.optional(Schema.NullOr(BooleanComparator)),
1828 + name: Schema.optional(Schema.NullOr(StringComparator)),
1829 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
1830 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableUserFilter)))),
1831 + owner: Schema.optional(Schema.NullOr(BooleanComparator)),
1832 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
1833 +})
1834 +export interface NullableUserFilter {
1835 + /** Comparator for the user's activity status. */
1836 + readonly active?: BooleanComparator | null | undefined
1837 + /** Comparator for the user's admin status. */
1838 + readonly admin?: BooleanComparator | null | undefined
1839 + /** Compound filters, all of which need to be matched by the user. */
1840 + readonly and?: readonly NullableUserFilter[] | null | undefined
1841 + /** Comparator for the user's app status. */
1842 + readonly app?: BooleanComparator | null | undefined
1843 + /** Filters that the users assigned issues must satisfy. */
1844 + readonly assignedIssues?: IssueCollectionFilter | null | undefined
1845 + /** Comparator for the created at date. */
1846 + readonly createdAt?: DateComparator | null | undefined
1847 + /** Comparator for the user's display name. */
1848 + readonly displayName?: StringComparator | null | undefined
1849 + /** Comparator for the user's email. */
1850 + readonly email?: StringComparator | null | undefined
1851 + /** Comparator for the identifier. */
1852 + readonly id?: IDComparator | null | undefined
1853 + /** Comparator for the user's invited status. */
1854 + readonly invited?: BooleanComparator | null | undefined
1855 + /** Comparator for the user's invited status. */
1856 + readonly isInvited?: BooleanComparator | null | undefined
1857 + /** Filter based on the currently authenticated user. Set to true to filter for the authenticated user, false for any other user. */
1858 + readonly isMe?: BooleanComparator | null | undefined
1859 + /** Comparator for the user's name. */
1860 + readonly name?: StringComparator | null | undefined
1861 + /** Filter based on the existence of the relation. */
1862 + readonly null?: boolean | null | undefined
1863 + /** Compound filters, one of which need to be matched by the user. */
1864 + readonly or?: readonly NullableUserFilter[] | null | undefined
1865 + /** Comparator for the user's owner status. */
1866 + readonly owner?: BooleanComparator | null | undefined
1867 + /** Comparator for the updated at date. */
1868 + readonly updatedAt?: DateComparator | null | undefined
1869 +}
1870 +export interface NullableUserFilterEncoded {
1871 + readonly active?: typeof BooleanComparator.Encoded | null | undefined
1872 + readonly admin?: typeof BooleanComparator.Encoded | null | undefined
1873 + readonly and?: readonly NullableUserFilterEncoded[] | null | undefined
1874 + readonly app?: typeof BooleanComparator.Encoded | null | undefined
1875 + readonly assignedIssues?: IssueCollectionFilterEncoded | null | undefined
1876 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1877 + readonly displayName?: typeof StringComparator.Encoded | null | undefined
1878 + readonly email?: typeof StringComparator.Encoded | null | undefined
1879 + readonly id?: typeof IDComparator.Encoded | null | undefined
1880 + readonly invited?: typeof BooleanComparator.Encoded | null | undefined
1881 + readonly isInvited?: typeof BooleanComparator.Encoded | null | undefined
1882 + readonly isMe?: typeof BooleanComparator.Encoded | null | undefined
1883 + readonly name?: typeof StringComparator.Encoded | null | undefined
1884 + readonly null?: boolean | null | undefined
1885 + readonly or?: readonly NullableUserFilterEncoded[] | null | undefined
1886 + readonly owner?: typeof BooleanComparator.Encoded | null | undefined
1887 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1888 +}
1889 +
1890 +/** Attachment collection filtering options. */
1891 +export const AttachmentCollectionFilter: Schema.Codec<AttachmentCollectionFilter, AttachmentCollectionFilterEncoded> = Schema.Struct({
1892 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => AttachmentCollectionFilter)))),
1893 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1894 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1895 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => AttachmentFilter))),
1896 + id: Schema.optional(Schema.NullOr(IDComparator)),
1897 + length: Schema.optional(Schema.NullOr(NumberComparator)),
1898 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => AttachmentCollectionFilter)))),
1899 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => AttachmentFilter))),
1900 + sourceType: Schema.optional(Schema.NullOr(SourceTypeComparator)),
1901 + subtitle: Schema.optional(Schema.NullOr(NullableStringComparator)),
1902 + title: Schema.optional(Schema.NullOr(StringComparator)),
1903 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
1904 + url: Schema.optional(Schema.NullOr(StringComparator))
1905 +})
1906 +export interface AttachmentCollectionFilter {
1907 + /** Compound filters, all of which need to be matched by the attachment. */
1908 + readonly and?: readonly AttachmentCollectionFilter[] | null | undefined
1909 + /** Comparator for the created at date. */
1910 + readonly createdAt?: DateComparator | null | undefined
1911 + /** Filters that the attachments creator must satisfy. */
1912 + readonly creator?: NullableUserFilter | null | undefined
1913 + /** Filters that needs to be matched by all attachments. */
1914 + readonly every?: AttachmentFilter | null | undefined
1915 + /** Comparator for the identifier. */
1916 + readonly id?: IDComparator | null | undefined
1917 + /** Comparator for the collection length. */
1918 + readonly length?: NumberComparator | null | undefined
1919 + /** Compound filters, one of which need to be matched by the attachment. */
1920 + readonly or?: readonly AttachmentCollectionFilter[] | null | undefined
1921 + /** Filters that needs to be matched by some attachments. */
1922 + readonly some?: AttachmentFilter | null | undefined
1923 + /** Comparator for the source type. */
1924 + readonly sourceType?: SourceTypeComparator | null | undefined
1925 + /** Comparator for the subtitle. */
1926 + readonly subtitle?: NullableStringComparator | null | undefined
1927 + /** Comparator for the title. */
1928 + readonly title?: StringComparator | null | undefined
1929 + /** Comparator for the updated at date. */
1930 + readonly updatedAt?: DateComparator | null | undefined
1931 + /** Comparator for the url. */
1932 + readonly url?: StringComparator | null | undefined
1933 +}
1934 +export interface AttachmentCollectionFilterEncoded {
1935 + readonly and?: readonly AttachmentCollectionFilterEncoded[] | null | undefined
1936 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1937 + readonly creator?: NullableUserFilterEncoded | null | undefined
1938 + readonly every?: AttachmentFilterEncoded | null | undefined
1939 + readonly id?: typeof IDComparator.Encoded | null | undefined
1940 + readonly length?: typeof NumberComparator.Encoded | null | undefined
1941 + readonly or?: readonly AttachmentCollectionFilterEncoded[] | null | undefined
1942 + readonly some?: AttachmentFilterEncoded | null | undefined
1943 + readonly sourceType?: typeof SourceTypeComparator.Encoded | null | undefined
1944 + readonly subtitle?: typeof NullableStringComparator.Encoded | null | undefined
1945 + readonly title?: typeof StringComparator.Encoded | null | undefined
1946 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1947 + readonly url?: typeof StringComparator.Encoded | null | undefined
1948 +}
1949 +
1950 +/** Attachment filtering options. */
1951 +export const AttachmentFilter: Schema.Codec<AttachmentFilter, AttachmentFilterEncoded> = Schema.Struct({
1952 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => AttachmentFilter)))),
1953 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
1954 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
1955 + id: Schema.optional(Schema.NullOr(IDComparator)),
1956 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => AttachmentFilter)))),
1957 + sourceType: Schema.optional(Schema.NullOr(SourceTypeComparator)),
1958 + subtitle: Schema.optional(Schema.NullOr(NullableStringComparator)),
1959 + title: Schema.optional(Schema.NullOr(StringComparator)),
1960 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
1961 + url: Schema.optional(Schema.NullOr(StringComparator))
1962 +})
1963 +export interface AttachmentFilter {
1964 + /** Compound filters, all of which need to be matched by the attachment. */
1965 + readonly and?: readonly AttachmentFilter[] | null | undefined
1966 + /** Comparator for the created at date. */
1967 + readonly createdAt?: DateComparator | null | undefined
1968 + /** Filters that the attachments creator must satisfy. */
1969 + readonly creator?: NullableUserFilter | null | undefined
1970 + /** Comparator for the identifier. */
1971 + readonly id?: IDComparator | null | undefined
1972 + /** Compound filters, one of which need to be matched by the attachment. */
1973 + readonly or?: readonly AttachmentFilter[] | null | undefined
1974 + /** Comparator for the source type. */
1975 + readonly sourceType?: SourceTypeComparator | null | undefined
1976 + /** Comparator for the subtitle. */
1977 + readonly subtitle?: NullableStringComparator | null | undefined
1978 + /** Comparator for the title. */
1979 + readonly title?: StringComparator | null | undefined
1980 + /** Comparator for the updated at date. */
1981 + readonly updatedAt?: DateComparator | null | undefined
1982 + /** Comparator for the url. */
1983 + readonly url?: StringComparator | null | undefined
1984 +}
1985 +export interface AttachmentFilterEncoded {
1986 + readonly and?: readonly AttachmentFilterEncoded[] | null | undefined
1987 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
1988 + readonly creator?: NullableUserFilterEncoded | null | undefined
1989 + readonly id?: typeof IDComparator.Encoded | null | undefined
1990 + readonly or?: readonly AttachmentFilterEncoded[] | null | undefined
1991 + readonly sourceType?: typeof SourceTypeComparator.Encoded | null | undefined
1992 + readonly subtitle?: typeof NullableStringComparator.Encoded | null | undefined
1993 + readonly title?: typeof StringComparator.Encoded | null | undefined
1994 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
1995 + readonly url?: typeof StringComparator.Encoded | null | undefined
1996 +}
1997 +
1998 +/** Comment filtering options. */
1999 +export const CommentCollectionFilter: Schema.Codec<CommentCollectionFilter, CommentCollectionFilterEncoded> = Schema.Struct({
2000 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CommentCollectionFilter)))),
2001 + body: Schema.optional(Schema.NullOr(StringComparator)),
2002 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2003 + documentContent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableDocumentContentFilter))),
2004 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => CommentFilter))),
2005 + id: Schema.optional(Schema.NullOr(IDComparator)),
2006 + initiative: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableInitiativeFilter))),
2007 + initiativeUpdate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableInitiativeUpdateFilter))),
2008 + issue: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
2009 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2010 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
2011 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CommentCollectionFilter)))),
2012 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCommentFilter))),
2013 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
2014 + projectUpdate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectUpdateFilter))),
2015 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
2016 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => CommentFilter))),
2017 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
2018 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
2019 +})
2020 +export interface CommentCollectionFilter {
2021 + /** Compound filters, all of which need to be matched by the comment. */
2022 + readonly and?: readonly CommentCollectionFilter[] | null | undefined
2023 + /** Comparator for the comment's body. */
2024 + readonly body?: StringComparator | null | undefined
2025 + /** Comparator for the created at date. */
2026 + readonly createdAt?: DateComparator | null | undefined
2027 + /** Filters that the comment's document content must satisfy. */
2028 + readonly documentContent?: NullableDocumentContentFilter | null | undefined
2029 + /** Filters that needs to be matched by all comments. */
2030 + readonly every?: CommentFilter | null | undefined
2031 + /** Comparator for the identifier. */
2032 + readonly id?: IDComparator | null | undefined
2033 + /** [Internal] Filters that the comment's initiative must satisfy. */
2034 + readonly initiative?: NullableInitiativeFilter | null | undefined
2035 + /** Filters that the comment's initiative update must satisfy. */
2036 + readonly initiativeUpdate?: NullableInitiativeUpdateFilter | null | undefined
2037 + /** Filters that the comment's issue must satisfy. */
2038 + readonly issue?: NullableIssueFilter | null | undefined
2039 + /** Comparator for the collection length. */
2040 + readonly length?: NumberComparator | null | undefined
2041 + /** Filters that the comment's customer needs must satisfy. */
2042 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
2043 + /** Compound filters, one of which need to be matched by the comment. */
2044 + readonly or?: readonly CommentCollectionFilter[] | null | undefined
2045 + /** Filters that the comment parent must satisfy. */
2046 + readonly parent?: NullableCommentFilter | null | undefined
2047 + /** [Internal] Filters that the comment's project must satisfy. */
2048 + readonly project?: NullableProjectFilter | null | undefined
2049 + /** Filters that the comment's project update must satisfy. */
2050 + readonly projectUpdate?: NullableProjectUpdateFilter | null | undefined
2051 + /** Filters that the comment's reactions must satisfy. */
2052 + readonly reactions?: ReactionCollectionFilter | null | undefined
2053 + /** Filters that needs to be matched by some comments. */
2054 + readonly some?: CommentFilter | null | undefined
2055 + /** Comparator for the updated at date. */
2056 + readonly updatedAt?: DateComparator | null | undefined
2057 + /** Filters that the comment's creator must satisfy. */
2058 + readonly user?: UserFilter | null | undefined
2059 +}
2060 +export interface CommentCollectionFilterEncoded {
2061 + readonly and?: readonly CommentCollectionFilterEncoded[] | null | undefined
2062 + readonly body?: typeof StringComparator.Encoded | null | undefined
2063 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2064 + readonly documentContent?: NullableDocumentContentFilterEncoded | null | undefined
2065 + readonly every?: CommentFilterEncoded | null | undefined
2066 + readonly id?: typeof IDComparator.Encoded | null | undefined
2067 + readonly initiative?: NullableInitiativeFilterEncoded | null | undefined
2068 + readonly initiativeUpdate?: NullableInitiativeUpdateFilterEncoded | null | undefined
2069 + readonly issue?: NullableIssueFilterEncoded | null | undefined
2070 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2071 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
2072 + readonly or?: readonly CommentCollectionFilterEncoded[] | null | undefined
2073 + readonly parent?: NullableCommentFilterEncoded | null | undefined
2074 + readonly project?: NullableProjectFilterEncoded | null | undefined
2075 + readonly projectUpdate?: NullableProjectUpdateFilterEncoded | null | undefined
2076 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
2077 + readonly some?: CommentFilterEncoded | null | undefined
2078 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2079 + readonly user?: UserFilterEncoded | null | undefined
2080 +}
2081 +
2082 +/** Document content filtering options. */
2083 +export const NullableDocumentContentFilter: Schema.Codec<NullableDocumentContentFilter, NullableDocumentContentFilterEncoded> = Schema.Struct({
2084 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableDocumentContentFilter)))),
2085 + content: Schema.optional(Schema.NullOr(NullableStringComparator)),
2086 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2087 + document: Schema.optional(Schema.NullOr(Schema.suspend(() => DocumentFilter))),
2088 + id: Schema.optional(Schema.NullOr(IDComparator)),
2089 + initiative: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeFilter))),
2090 + issue: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueFilter))),
2091 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
2092 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableDocumentContentFilter)))),
2093 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectFilter))),
2094 + projectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
2095 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2096 +})
2097 +export interface NullableDocumentContentFilter {
2098 + /** Compound filters, all of which need to be matched by the user. */
2099 + readonly and?: readonly NullableDocumentContentFilter[] | null | undefined
2100 + /** Comparator for the document content. */
2101 + readonly content?: NullableStringComparator | null | undefined
2102 + /** Comparator for the created at date. */
2103 + readonly createdAt?: DateComparator | null | undefined
2104 + /** Filters that the document content document must satisfy. */
2105 + readonly document?: DocumentFilter | null | undefined
2106 + /** Comparator for the identifier. */
2107 + readonly id?: IDComparator | null | undefined
2108 + /** Filters that the document content initiative must satisfy. */
2109 + readonly initiative?: InitiativeFilter | null | undefined
2110 + /** Filters that the document content issue must satisfy. */
2111 + readonly issue?: IssueFilter | null | undefined
2112 + /** Filter based on the existence of the relation. */
2113 + readonly null?: boolean | null | undefined
2114 + /** Compound filters, one of which need to be matched by the user. */
2115 + readonly or?: readonly NullableDocumentContentFilter[] | null | undefined
2116 + /** Filters that the document content project must satisfy. */
2117 + readonly project?: ProjectFilter | null | undefined
2118 + /** Filters that the document content project milestone must satisfy. */
2119 + readonly projectMilestone?: ProjectMilestoneFilter | null | undefined
2120 + /** Comparator for the updated at date. */
2121 + readonly updatedAt?: DateComparator | null | undefined
2122 +}
2123 +export interface NullableDocumentContentFilterEncoded {
2124 + readonly and?: readonly NullableDocumentContentFilterEncoded[] | null | undefined
2125 + readonly content?: typeof NullableStringComparator.Encoded | null | undefined
2126 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2127 + readonly document?: DocumentFilterEncoded | null | undefined
2128 + readonly id?: typeof IDComparator.Encoded | null | undefined
2129 + readonly initiative?: InitiativeFilterEncoded | null | undefined
2130 + readonly issue?: IssueFilterEncoded | null | undefined
2131 + readonly null?: boolean | null | undefined
2132 + readonly or?: readonly NullableDocumentContentFilterEncoded[] | null | undefined
2133 + readonly project?: ProjectFilterEncoded | null | undefined
2134 + readonly projectMilestone?: ProjectMilestoneFilterEncoded | null | undefined
2135 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2136 +}
2137 +
2138 +/** Document filtering options. */
2139 +export const DocumentFilter: Schema.Codec<DocumentFilter, DocumentFilterEncoded> = Schema.Struct({
2140 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => DocumentFilter)))),
2141 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2142 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
2143 + cycle: Schema.optional(Schema.NullOr(Schema.suspend(() => CycleFilter))),
2144 + id: Schema.optional(Schema.NullOr(IDComparator)),
2145 + initiative: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeFilter))),
2146 + issue: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueFilter))),
2147 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => DocumentFilter)))),
2148 + owner: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2149 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectFilter))),
2150 + release: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseFilter))),
2151 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
2152 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
2153 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2154 + title: Schema.optional(Schema.NullOr(StringComparator)),
2155 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2156 +})
2157 +export interface DocumentFilter {
2158 + /** Compound filters, all of which need to be matched by the document. */
2159 + readonly and?: readonly DocumentFilter[] | null | undefined
2160 + /** Comparator for the created at date. */
2161 + readonly createdAt?: DateComparator | null | undefined
2162 + /** Filters that the document's creator must satisfy. */
2163 + readonly creator?: UserFilter | null | undefined
2164 + /** Filters that the document's cycle must satisfy. */
2165 + readonly cycle?: CycleFilter | null | undefined
2166 + /** Comparator for the identifier. */
2167 + readonly id?: IDComparator | null | undefined
2168 + /** Filters that the document's initiative must satisfy. */
2169 + readonly initiative?: InitiativeFilter | null | undefined
2170 + /** Filters that the document's issue must satisfy. */
2171 + readonly issue?: IssueFilter | null | undefined
2172 + /** Compound filters, one of which need to be matched by the document. */
2173 + readonly or?: readonly DocumentFilter[] | null | undefined
2174 + /** Filters that the document's owner must satisfy. */
2175 + readonly owner?: NullableUserFilter | null | undefined
2176 + /** Filters that the document's project must satisfy. */
2177 + readonly project?: ProjectFilter | null | undefined
2178 + /** Filters that the document's release must satisfy. */
2179 + readonly release?: ReleaseFilter | null | undefined
2180 + /** [Internal] Comparator for the document's searchable content. */
2181 + readonly searchableContent?: ContentComparator | null | undefined
2182 + /** Comparator for the document slug ID. */
2183 + readonly slugId?: StringComparator | null | undefined
2184 + /** Filters that the document's team must satisfy. */
2185 + readonly team?: NullableTeamFilter | null | undefined
2186 + /** Comparator for the document title. */
2187 + readonly title?: StringComparator | null | undefined
2188 + /** Comparator for the updated at date. */
2189 + readonly updatedAt?: DateComparator | null | undefined
2190 +}
2191 +export interface DocumentFilterEncoded {
2192 + readonly and?: readonly DocumentFilterEncoded[] | null | undefined
2193 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2194 + readonly creator?: UserFilterEncoded | null | undefined
2195 + readonly cycle?: CycleFilterEncoded | null | undefined
2196 + readonly id?: typeof IDComparator.Encoded | null | undefined
2197 + readonly initiative?: InitiativeFilterEncoded | null | undefined
2198 + readonly issue?: IssueFilterEncoded | null | undefined
2199 + readonly or?: readonly DocumentFilterEncoded[] | null | undefined
2200 + readonly owner?: NullableUserFilterEncoded | null | undefined
2201 + readonly project?: ProjectFilterEncoded | null | undefined
2202 + readonly release?: ReleaseFilterEncoded | null | undefined
2203 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
2204 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
2205 + readonly team?: NullableTeamFilterEncoded | null | undefined
2206 + readonly title?: typeof StringComparator.Encoded | null | undefined
2207 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2208 +}
2209 +
2210 +/** Cycle filtering options. */
2211 +export const CycleFilter: Schema.Codec<CycleFilter, CycleFilterEncoded> = Schema.Struct({
2212 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CycleFilter)))),
2213 + completedAt: Schema.optional(Schema.NullOr(DateComparator)),
2214 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2215 + endsAt: Schema.optional(Schema.NullOr(DateComparator)),
2216 + id: Schema.optional(Schema.NullOr(IDComparator)),
2217 + inheritedFromId: Schema.optional(Schema.NullOr(IDComparator)),
2218 + isActive: Schema.optional(Schema.NullOr(BooleanComparator)),
2219 + isFuture: Schema.optional(Schema.NullOr(BooleanComparator)),
2220 + isInCooldown: Schema.optional(Schema.NullOr(BooleanComparator)),
2221 + isNext: Schema.optional(Schema.NullOr(BooleanComparator)),
2222 + isPast: Schema.optional(Schema.NullOr(BooleanComparator)),
2223 + isPrevious: Schema.optional(Schema.NullOr(BooleanComparator)),
2224 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
2225 + name: Schema.optional(Schema.NullOr(StringComparator)),
2226 + number: Schema.optional(Schema.NullOr(NumberComparator)),
2227 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CycleFilter)))),
2228 + startsAt: Schema.optional(Schema.NullOr(DateComparator)),
2229 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
2230 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2231 +})
2232 +export interface CycleFilter {
2233 + /** Compound filters, all of which need to be matched by the cycle. */
2234 + readonly and?: readonly CycleFilter[] | null | undefined
2235 + /** Comparator for the cycle completed at date. */
2236 + readonly completedAt?: DateComparator | null | undefined
2237 + /** Comparator for the created at date. */
2238 + readonly createdAt?: DateComparator | null | undefined
2239 + /** Comparator for the cycle ends at date. */
2240 + readonly endsAt?: DateComparator | null | undefined
2241 + /** Comparator for the identifier. */
2242 + readonly id?: IDComparator | null | undefined
2243 + /** Comparator for the inherited cycle ID. */
2244 + readonly inheritedFromId?: IDComparator | null | undefined
2245 + /** Comparator for the filtering active cycle. */
2246 + readonly isActive?: BooleanComparator | null | undefined
2247 + /** Comparator for the filtering future cycles. */
2248 + readonly isFuture?: BooleanComparator | null | undefined
2249 + /** Comparator for filtering for whether the cycle is currently in cooldown. */
2250 + readonly isInCooldown?: BooleanComparator | null | undefined
2251 + /** Comparator for the filtering next cycle. */
2252 + readonly isNext?: BooleanComparator | null | undefined
2253 + /** Comparator for the filtering past cycles. */
2254 + readonly isPast?: BooleanComparator | null | undefined
2255 + /** Comparator for the filtering previous cycle. */
2256 + readonly isPrevious?: BooleanComparator | null | undefined
2257 + /** Filters that the cycles issues must satisfy. */
2258 + readonly issues?: IssueCollectionFilter | null | undefined
2259 + /** Comparator for the cycle name. */
2260 + readonly name?: StringComparator | null | undefined
2261 + /** Comparator for the cycle number. */
2262 + readonly number?: NumberComparator | null | undefined
2263 + /** Compound filters, one of which need to be matched by the cycle. */
2264 + readonly or?: readonly CycleFilter[] | null | undefined
2265 + /** Comparator for the cycle start date. */
2266 + readonly startsAt?: DateComparator | null | undefined
2267 + /** Filters that the cycles team must satisfy. */
2268 + readonly team?: TeamFilter | null | undefined
2269 + /** Comparator for the updated at date. */
2270 + readonly updatedAt?: DateComparator | null | undefined
2271 +}
2272 +export interface CycleFilterEncoded {
2273 + readonly and?: readonly CycleFilterEncoded[] | null | undefined
2274 + readonly completedAt?: typeof DateComparator.Encoded | null | undefined
2275 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2276 + readonly endsAt?: typeof DateComparator.Encoded | null | undefined
2277 + readonly id?: typeof IDComparator.Encoded | null | undefined
2278 + readonly inheritedFromId?: typeof IDComparator.Encoded | null | undefined
2279 + readonly isActive?: typeof BooleanComparator.Encoded | null | undefined
2280 + readonly isFuture?: typeof BooleanComparator.Encoded | null | undefined
2281 + readonly isInCooldown?: typeof BooleanComparator.Encoded | null | undefined
2282 + readonly isNext?: typeof BooleanComparator.Encoded | null | undefined
2283 + readonly isPast?: typeof BooleanComparator.Encoded | null | undefined
2284 + readonly isPrevious?: typeof BooleanComparator.Encoded | null | undefined
2285 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
2286 + readonly name?: typeof StringComparator.Encoded | null | undefined
2287 + readonly number?: typeof NumberComparator.Encoded | null | undefined
2288 + readonly or?: readonly CycleFilterEncoded[] | null | undefined
2289 + readonly startsAt?: typeof DateComparator.Encoded | null | undefined
2290 + readonly team?: TeamFilterEncoded | null | undefined
2291 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2292 +}
2293 +
2294 +/** Team filtering options. */
2295 +export const TeamFilter: Schema.Codec<TeamFilter, TeamFilterEncoded> = Schema.Struct({
2296 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2297 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => TeamFilter)))),
2298 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2299 + description: Schema.optional(Schema.NullOr(NullableStringComparator)),
2300 + id: Schema.optional(Schema.NullOr(IDComparator)),
2301 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
2302 + key: Schema.optional(Schema.NullOr(StringComparator)),
2303 + members: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2304 + name: Schema.optional(Schema.NullOr(StringComparator)),
2305 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => TeamFilter)))),
2306 + owners: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2307 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2308 + private: Schema.optional(Schema.NullOr(BooleanComparator)),
2309 + releasePipelines: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineCollectionFilter))),
2310 + restrictedBy: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2311 + retiredAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2312 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
2313 + users: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2314 + visibility: Schema.optional(Schema.NullOr(TeamVisibilityComparator))
2315 +})
2316 +export interface TeamFilter {
2317 + /** Filters that the team's ancestors must satisfy. */
2318 + readonly ancestors?: TeamCollectionFilter | null | undefined
2319 + /** Compound filters, all of which need to be matched by the team. */
2320 + readonly and?: readonly TeamFilter[] | null | undefined
2321 + /** Comparator for the created at date. */
2322 + readonly createdAt?: DateComparator | null | undefined
2323 + /** Comparator for the team description. */
2324 + readonly description?: NullableStringComparator | null | undefined
2325 + /** Comparator for the identifier. */
2326 + readonly id?: IDComparator | null | undefined
2327 + /** Filters that the team's issues must satisfy. */
2328 + readonly issues?: IssueCollectionFilter | null | undefined
2329 + /** Comparator for the team key. */
2330 + readonly key?: StringComparator | null | undefined
2331 + /** Filters that the team's members must satisfy. */
2332 + readonly members?: UserCollectionFilter | null | undefined
2333 + /** Comparator for the team name. */
2334 + readonly name?: StringComparator | null | undefined
2335 + /** Compound filters, one of which need to be matched by the team. */
2336 + readonly or?: readonly TeamFilter[] | null | undefined
2337 + /** Filters that the team's owners must satisfy. */
2338 + readonly owners?: UserCollectionFilter | null | undefined
2339 + /** Filters that the team's parent must satisfy. */
2340 + readonly parent?: NullableTeamFilter | null | undefined
2341 + /** [DEPRECATED] Comparator for the team privacy. */
2342 + readonly private?: BooleanComparator | null | undefined
2343 + /** Filters that the team's release pipelines must satisfy. */
2344 + readonly releasePipelines?: ReleasePipelineCollectionFilter | null | undefined
2345 + /** [Internal] Filters that the private team forming this team's visibility boundary must satisfy. Only relevant for non-public teams. */
2346 + readonly restrictedBy?: NullableTeamFilter | null | undefined
2347 + /** Comparator for the time at which the team was retired. */
2348 + readonly retiredAt?: NullableDateComparator | null | undefined
2349 + /** Comparator for the updated at date. */
2350 + readonly updatedAt?: DateComparator | null | undefined
2351 + /** [Internal] Filters that the team's members must satisfy. Alias of `members` matching the filter shape produced by the app; prefer `members`. */
2352 + readonly users?: UserCollectionFilter | null | undefined
2353 + /** Comparator for the team visibility. */
2354 + readonly visibility?: TeamVisibilityComparator | null | undefined
2355 +}
2356 +export interface TeamFilterEncoded {
2357 + readonly ancestors?: TeamCollectionFilterEncoded | null | undefined
2358 + readonly and?: readonly TeamFilterEncoded[] | null | undefined
2359 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2360 + readonly description?: typeof NullableStringComparator.Encoded | null | undefined
2361 + readonly id?: typeof IDComparator.Encoded | null | undefined
2362 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
2363 + readonly key?: typeof StringComparator.Encoded | null | undefined
2364 + readonly members?: UserCollectionFilterEncoded | null | undefined
2365 + readonly name?: typeof StringComparator.Encoded | null | undefined
2366 + readonly or?: readonly TeamFilterEncoded[] | null | undefined
2367 + readonly owners?: UserCollectionFilterEncoded | null | undefined
2368 + readonly parent?: NullableTeamFilterEncoded | null | undefined
2369 + readonly private?: typeof BooleanComparator.Encoded | null | undefined
2370 + readonly releasePipelines?: ReleasePipelineCollectionFilterEncoded | null | undefined
2371 + readonly restrictedBy?: NullableTeamFilterEncoded | null | undefined
2372 + readonly retiredAt?: typeof NullableDateComparator.Encoded | null | undefined
2373 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2374 + readonly users?: UserCollectionFilterEncoded | null | undefined
2375 + readonly visibility?: typeof TeamVisibilityComparator.Encoded | null | undefined
2376 +}
2377 +
2378 +/** Team collection filtering options. */
2379 +export const TeamCollectionFilter: Schema.Codec<TeamCollectionFilter, TeamCollectionFilterEncoded> = Schema.Struct({
2380 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2381 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => TeamCollectionFilter)))),
2382 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2383 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
2384 + id: Schema.optional(Schema.NullOr(IDComparator)),
2385 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2386 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => TeamCollectionFilter)))),
2387 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2388 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
2389 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2390 +})
2391 +export interface TeamCollectionFilter {
2392 + /** Filters that the team's ancestors must satisfy. */
2393 + readonly ancestors?: TeamCollectionFilter | null | undefined
2394 + /** Compound filters, all of which need to be matched by the team. */
2395 + readonly and?: readonly TeamCollectionFilter[] | null | undefined
2396 + /** Comparator for the created at date. */
2397 + readonly createdAt?: DateComparator | null | undefined
2398 + /** Filters that needs to be matched by all teams. */
2399 + readonly every?: TeamFilter | null | undefined
2400 + /** Comparator for the identifier. */
2401 + readonly id?: IDComparator | null | undefined
2402 + /** Comparator for the collection length. */
2403 + readonly length?: NumberComparator | null | undefined
2404 + /** Compound filters, one of which need to be matched by the team. */
2405 + readonly or?: readonly TeamCollectionFilter[] | null | undefined
2406 + /** Filters that the teams parent must satisfy. */
2407 + readonly parent?: NullableTeamFilter | null | undefined
2408 + /** Filters that needs to be matched by some teams. */
2409 + readonly some?: TeamFilter | null | undefined
2410 + /** Comparator for the updated at date. */
2411 + readonly updatedAt?: DateComparator | null | undefined
2412 +}
2413 +export interface TeamCollectionFilterEncoded {
2414 + readonly ancestors?: TeamCollectionFilterEncoded | null | undefined
2415 + readonly and?: readonly TeamCollectionFilterEncoded[] | null | undefined
2416 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2417 + readonly every?: TeamFilterEncoded | null | undefined
2418 + readonly id?: typeof IDComparator.Encoded | null | undefined
2419 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2420 + readonly or?: readonly TeamCollectionFilterEncoded[] | null | undefined
2421 + readonly parent?: NullableTeamFilterEncoded | null | undefined
2422 + readonly some?: TeamFilterEncoded | null | undefined
2423 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2424 +}
2425 +
2426 +/** Team filtering options. */
2427 +export const NullableTeamFilter: Schema.Codec<NullableTeamFilter, NullableTeamFilterEncoded> = Schema.Struct({
2428 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2429 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableTeamFilter)))),
2430 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2431 + description: Schema.optional(Schema.NullOr(NullableStringComparator)),
2432 + id: Schema.optional(Schema.NullOr(IDComparator)),
2433 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
2434 + key: Schema.optional(Schema.NullOr(StringComparator)),
2435 + members: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2436 + name: Schema.optional(Schema.NullOr(StringComparator)),
2437 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
2438 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableTeamFilter)))),
2439 + owners: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2440 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2441 + private: Schema.optional(Schema.NullOr(BooleanComparator)),
2442 + releasePipelines: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineCollectionFilter))),
2443 + restrictedBy: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2444 + retiredAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2445 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
2446 + users: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
2447 + visibility: Schema.optional(Schema.NullOr(TeamVisibilityComparator))
2448 +})
2449 +export interface NullableTeamFilter {
2450 + /** Filters that the team's ancestors must satisfy. */
2451 + readonly ancestors?: TeamCollectionFilter | null | undefined
2452 + /** Compound filters, all of which need to be matched by the team. */
2453 + readonly and?: readonly NullableTeamFilter[] | null | undefined
2454 + /** Comparator for the created at date. */
2455 + readonly createdAt?: DateComparator | null | undefined
2456 + /** Comparator for the team description. */
2457 + readonly description?: NullableStringComparator | null | undefined
2458 + /** Comparator for the identifier. */
2459 + readonly id?: IDComparator | null | undefined
2460 + /** Filters that the team's issues must satisfy. */
2461 + readonly issues?: IssueCollectionFilter | null | undefined
2462 + /** Comparator for the team key. */
2463 + readonly key?: StringComparator | null | undefined
2464 + /** Filters that the team's members must satisfy. */
2465 + readonly members?: UserCollectionFilter | null | undefined
2466 + /** Comparator for the team name. */
2467 + readonly name?: StringComparator | null | undefined
2468 + /** Filter based on the existence of the relation. */
2469 + readonly null?: boolean | null | undefined
2470 + /** Compound filters, one of which need to be matched by the team. */
2471 + readonly or?: readonly NullableTeamFilter[] | null | undefined
2472 + /** Filters that the team's owners must satisfy. */
2473 + readonly owners?: UserCollectionFilter | null | undefined
2474 + /** Filters that the team's parent must satisfy. */
2475 + readonly parent?: NullableTeamFilter | null | undefined
2476 + /** [DEPRECATED] Comparator for the team privacy. */
2477 + readonly private?: BooleanComparator | null | undefined
2478 + /** Filters that the team's release pipelines must satisfy. */
2479 + readonly releasePipelines?: ReleasePipelineCollectionFilter | null | undefined
2480 + /** [Internal] Filters that the private team forming this team's visibility boundary must satisfy. Only relevant for non-public teams. */
2481 + readonly restrictedBy?: NullableTeamFilter | null | undefined
2482 + /** Comparator for the time at which the team was retired. */
2483 + readonly retiredAt?: NullableDateComparator | null | undefined
2484 + /** Comparator for the updated at date. */
2485 + readonly updatedAt?: DateComparator | null | undefined
2486 + /** [Internal] Filters that the team's members must satisfy. Alias of `members` matching the filter shape produced by the app; prefer `members`. */
2487 + readonly users?: UserCollectionFilter | null | undefined
2488 + /** Comparator for the team visibility. */
2489 + readonly visibility?: TeamVisibilityComparator | null | undefined
2490 +}
2491 +export interface NullableTeamFilterEncoded {
2492 + readonly ancestors?: TeamCollectionFilterEncoded | null | undefined
2493 + readonly and?: readonly NullableTeamFilterEncoded[] | null | undefined
2494 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2495 + readonly description?: typeof NullableStringComparator.Encoded | null | undefined
2496 + readonly id?: typeof IDComparator.Encoded | null | undefined
2497 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
2498 + readonly key?: typeof StringComparator.Encoded | null | undefined
2499 + readonly members?: UserCollectionFilterEncoded | null | undefined
2500 + readonly name?: typeof StringComparator.Encoded | null | undefined
2501 + readonly null?: boolean | null | undefined
2502 + readonly or?: readonly NullableTeamFilterEncoded[] | null | undefined
2503 + readonly owners?: UserCollectionFilterEncoded | null | undefined
2504 + readonly parent?: NullableTeamFilterEncoded | null | undefined
2505 + readonly private?: typeof BooleanComparator.Encoded | null | undefined
2506 + readonly releasePipelines?: ReleasePipelineCollectionFilterEncoded | null | undefined
2507 + readonly restrictedBy?: NullableTeamFilterEncoded | null | undefined
2508 + readonly retiredAt?: typeof NullableDateComparator.Encoded | null | undefined
2509 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2510 + readonly users?: UserCollectionFilterEncoded | null | undefined
2511 + readonly visibility?: typeof TeamVisibilityComparator.Encoded | null | undefined
2512 +}
2513 +
2514 +/** User filtering options. */
2515 +export const UserCollectionFilter: Schema.Codec<UserCollectionFilter, UserCollectionFilterEncoded> = Schema.Struct({
2516 + active: Schema.optional(Schema.NullOr(BooleanComparator)),
2517 + admin: Schema.optional(Schema.NullOr(BooleanComparator)),
2518 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => UserCollectionFilter)))),
2519 + app: Schema.optional(Schema.NullOr(BooleanComparator)),
2520 + assignedIssues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
2521 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2522 + displayName: Schema.optional(Schema.NullOr(StringComparator)),
2523 + email: Schema.optional(Schema.NullOr(StringComparator)),
2524 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
2525 + id: Schema.optional(Schema.NullOr(IDComparator)),
2526 + invited: Schema.optional(Schema.NullOr(BooleanComparator)),
2527 + isInvited: Schema.optional(Schema.NullOr(BooleanComparator)),
2528 + isMe: Schema.optional(Schema.NullOr(BooleanComparator)),
2529 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2530 + name: Schema.optional(Schema.NullOr(StringComparator)),
2531 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => UserCollectionFilter)))),
2532 + owner: Schema.optional(Schema.NullOr(BooleanComparator)),
2533 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
2534 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2535 +})
2536 +export interface UserCollectionFilter {
2537 + /** Comparator for the user's activity status. */
2538 + readonly active?: BooleanComparator | null | undefined
2539 + /** Comparator for the user's admin status. */
2540 + readonly admin?: BooleanComparator | null | undefined
2541 + /** Compound filters, all of which need to be matched by the user. */
2542 + readonly and?: readonly UserCollectionFilter[] | null | undefined
2543 + /** Comparator for the user's app status. */
2544 + readonly app?: BooleanComparator | null | undefined
2545 + /** Filters that the users assigned issues must satisfy. */
2546 + readonly assignedIssues?: IssueCollectionFilter | null | undefined
2547 + /** Comparator for the created at date. */
2548 + readonly createdAt?: DateComparator | null | undefined
2549 + /** Comparator for the user's display name. */
2550 + readonly displayName?: StringComparator | null | undefined
2551 + /** Comparator for the user's email. */
2552 + readonly email?: StringComparator | null | undefined
2553 + /** Filters that needs to be matched by all users. */
2554 + readonly every?: UserFilter | null | undefined
2555 + /** Comparator for the identifier. */
2556 + readonly id?: IDComparator | null | undefined
2557 + /** Comparator for the user's invited status. */
2558 + readonly invited?: BooleanComparator | null | undefined
2559 + /** Comparator for the user's invited status. */
2560 + readonly isInvited?: BooleanComparator | null | undefined
2561 + /** Filter based on the currently authenticated user. Set to true to filter for the authenticated user, false for any other user. */
2562 + readonly isMe?: BooleanComparator | null | undefined
2563 + /** Comparator for the collection length. */
2564 + readonly length?: NumberComparator | null | undefined
2565 + /** Comparator for the user's name. */
2566 + readonly name?: StringComparator | null | undefined
2567 + /** Compound filters, one of which need to be matched by the user. */
2568 + readonly or?: readonly UserCollectionFilter[] | null | undefined
2569 + /** Comparator for the user's owner status. */
2570 + readonly owner?: BooleanComparator | null | undefined
2571 + /** Filters that needs to be matched by some users. */
2572 + readonly some?: UserFilter | null | undefined
2573 + /** Comparator for the updated at date. */
2574 + readonly updatedAt?: DateComparator | null | undefined
2575 +}
2576 +export interface UserCollectionFilterEncoded {
2577 + readonly active?: typeof BooleanComparator.Encoded | null | undefined
2578 + readonly admin?: typeof BooleanComparator.Encoded | null | undefined
2579 + readonly and?: readonly UserCollectionFilterEncoded[] | null | undefined
2580 + readonly app?: typeof BooleanComparator.Encoded | null | undefined
2581 + readonly assignedIssues?: IssueCollectionFilterEncoded | null | undefined
2582 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2583 + readonly displayName?: typeof StringComparator.Encoded | null | undefined
2584 + readonly email?: typeof StringComparator.Encoded | null | undefined
2585 + readonly every?: UserFilterEncoded | null | undefined
2586 + readonly id?: typeof IDComparator.Encoded | null | undefined
2587 + readonly invited?: typeof BooleanComparator.Encoded | null | undefined
2588 + readonly isInvited?: typeof BooleanComparator.Encoded | null | undefined
2589 + readonly isMe?: typeof BooleanComparator.Encoded | null | undefined
2590 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2591 + readonly name?: typeof StringComparator.Encoded | null | undefined
2592 + readonly or?: readonly UserCollectionFilterEncoded[] | null | undefined
2593 + readonly owner?: typeof BooleanComparator.Encoded | null | undefined
2594 + readonly some?: UserFilterEncoded | null | undefined
2595 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2596 +}
2597 +
2598 +/** Release pipeline collection filtering options. */
2599 +export const ReleasePipelineCollectionFilter: Schema.Codec<ReleasePipelineCollectionFilter, ReleasePipelineCollectionFilterEncoded> = Schema.Struct({
2600 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleasePipelineCollectionFilter)))),
2601 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2602 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineFilter))),
2603 + id: Schema.optional(Schema.NullOr(IDComparator)),
2604 + isProduction: Schema.optional(Schema.NullOr(BooleanComparator)),
2605 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2606 + name: Schema.optional(Schema.NullOr(StringComparator)),
2607 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleasePipelineCollectionFilter)))),
2608 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineFilter))),
2609 + teams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2610 + type: Schema.optional(Schema.NullOr(ReleasePipelineTypeComparator)),
2611 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2612 +})
2613 +export interface ReleasePipelineCollectionFilter {
2614 + /** Compound filters, all of which need to be matched by the release pipeline. */
2615 + readonly and?: readonly ReleasePipelineCollectionFilter[] | null | undefined
2616 + /** Comparator for the created at date. */
2617 + readonly createdAt?: DateComparator | null | undefined
2618 + /** Filters that needs to be matched by all release pipelines. */
2619 + readonly every?: ReleasePipelineFilter | null | undefined
2620 + /** Comparator for the identifier. */
2621 + readonly id?: IDComparator | null | undefined
2622 + /** Comparator for the pipeline production flag. */
2623 + readonly isProduction?: BooleanComparator | null | undefined
2624 + /** Comparator for the collection length. */
2625 + readonly length?: NumberComparator | null | undefined
2626 + /** Comparator for the pipeline name. */
2627 + readonly name?: StringComparator | null | undefined
2628 + /** Compound filters, one of which need to be matched by the release pipeline. */
2629 + readonly or?: readonly ReleasePipelineCollectionFilter[] | null | undefined
2630 + /** Filters that needs to be matched by some release pipelines. */
2631 + readonly some?: ReleasePipelineFilter | null | undefined
2632 + /** Filters that the release pipeline's teams must satisfy. */
2633 + readonly teams?: TeamCollectionFilter | null | undefined
2634 + /** Comparator for the pipeline type. */
2635 + readonly type?: ReleasePipelineTypeComparator | null | undefined
2636 + /** Comparator for the updated at date. */
2637 + readonly updatedAt?: DateComparator | null | undefined
2638 +}
2639 +export interface ReleasePipelineCollectionFilterEncoded {
2640 + readonly and?: readonly ReleasePipelineCollectionFilterEncoded[] | null | undefined
2641 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2642 + readonly every?: ReleasePipelineFilterEncoded | null | undefined
2643 + readonly id?: typeof IDComparator.Encoded | null | undefined
2644 + readonly isProduction?: typeof BooleanComparator.Encoded | null | undefined
2645 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2646 + readonly name?: typeof StringComparator.Encoded | null | undefined
2647 + readonly or?: readonly ReleasePipelineCollectionFilterEncoded[] | null | undefined
2648 + readonly some?: ReleasePipelineFilterEncoded | null | undefined
2649 + readonly teams?: TeamCollectionFilterEncoded | null | undefined
2650 + readonly type?: typeof ReleasePipelineTypeComparator.Encoded | null | undefined
2651 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2652 +}
2653 +
2654 +/** Release pipeline filtering options. */
2655 +export const ReleasePipelineFilter: Schema.Codec<ReleasePipelineFilter, ReleasePipelineFilterEncoded> = Schema.Struct({
2656 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleasePipelineFilter)))),
2657 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2658 + id: Schema.optional(Schema.NullOr(IDComparator)),
2659 + isProduction: Schema.optional(Schema.NullOr(BooleanComparator)),
2660 + name: Schema.optional(Schema.NullOr(StringComparator)),
2661 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleasePipelineFilter)))),
2662 + teams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2663 + type: Schema.optional(Schema.NullOr(ReleasePipelineTypeComparator)),
2664 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2665 +})
2666 +export interface ReleasePipelineFilter {
2667 + /** Compound filters, all of which need to be matched by the pipeline. */
2668 + readonly and?: readonly ReleasePipelineFilter[] | null | undefined
2669 + /** Comparator for the created at date. */
2670 + readonly createdAt?: DateComparator | null | undefined
2671 + /** Comparator for the identifier. */
2672 + readonly id?: IDComparator | null | undefined
2673 + /** Comparator for the pipeline production flag. */
2674 + readonly isProduction?: BooleanComparator | null | undefined
2675 + /** Comparator for the pipeline name. */
2676 + readonly name?: StringComparator | null | undefined
2677 + /** Compound filters, one of which need to be matched by the pipeline. */
2678 + readonly or?: readonly ReleasePipelineFilter[] | null | undefined
2679 + /** Filters that the release pipeline's teams must satisfy. */
2680 + readonly teams?: TeamCollectionFilter | null | undefined
2681 + /** Comparator for the pipeline type. */
2682 + readonly type?: ReleasePipelineTypeComparator | null | undefined
2683 + /** Comparator for the updated at date. */
2684 + readonly updatedAt?: DateComparator | null | undefined
2685 +}
2686 +export interface ReleasePipelineFilterEncoded {
2687 + readonly and?: readonly ReleasePipelineFilterEncoded[] | null | undefined
2688 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2689 + readonly id?: typeof IDComparator.Encoded | null | undefined
2690 + readonly isProduction?: typeof BooleanComparator.Encoded | null | undefined
2691 + readonly name?: typeof StringComparator.Encoded | null | undefined
2692 + readonly or?: readonly ReleasePipelineFilterEncoded[] | null | undefined
2693 + readonly teams?: TeamCollectionFilterEncoded | null | undefined
2694 + readonly type?: typeof ReleasePipelineTypeComparator.Encoded | null | undefined
2695 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2696 +}
2697 +
2698 +/** Initiative filtering options. */
2699 +export const InitiativeFilter: Schema.Codec<InitiativeFilter, InitiativeFilterEncoded> = Schema.Struct({
2700 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
2701 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
2702 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeFilter)))),
2703 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2704 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2705 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2706 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2707 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
2708 + health: Schema.optional(Schema.NullOr(StringComparator)),
2709 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
2710 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
2711 + initiativeUpdates: Schema.optional(Schema.NullOr(InitiativeUpdatesCollectionFilter)),
2712 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelCollectionFilter))),
2713 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2714 + name: Schema.optional(Schema.NullOr(StringComparator)),
2715 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeFilter)))),
2716 + owner: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2717 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
2718 + projects: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectCollectionFilter))),
2719 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
2720 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2721 + status: Schema.optional(Schema.NullOr(StringComparator)),
2722 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
2723 + teams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2724 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2725 +})
2726 +export interface InitiativeFilter {
2727 + /** Comparator for the initiative activity type. */
2728 + readonly activityType?: StringComparator | null | undefined
2729 + /** Filters that the initiative must be an ancestor of. */
2730 + readonly ancestors?: InitiativeCollectionFilter | null | undefined
2731 + /** Compound filters, all of which need to be matched by the initiative. */
2732 + readonly and?: readonly InitiativeFilter[] | null | undefined
2733 + /** [Internal] Comparator for the initiative canceled at date. */
2734 + readonly canceledAt?: NullableDateComparator | null | undefined
2735 + /** Comparator for the initiative completed at date. */
2736 + readonly completedAt?: NullableDateComparator | null | undefined
2737 + /** Comparator for the created at date. */
2738 + readonly createdAt?: DateComparator | null | undefined
2739 + /** Filters that the initiative creator must satisfy. */
2740 + readonly creator?: NullableUserFilter | null | undefined
2741 + /** [Internal] Comparator for the initiative's custom identifier. */
2742 + readonly customIdentifier?: NullableStringComparator | null | undefined
2743 + /** Comparator for the initiative health: onTrack, atRisk, offTrack */
2744 + readonly health?: StringComparator | null | undefined
2745 + /** Comparator for the initiative health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
2746 + readonly healthWithAge?: StringComparator | null | undefined
2747 + /** Comparator for the identifier. */
2748 + readonly id?: EntityIdentifierIDComparator | null | undefined
2749 + /** Filters that the initiative updates must satisfy. */
2750 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilter | null | undefined
2751 + /** Filters that the initiative labels must satisfy. */
2752 + readonly labels?: InitiativeLabelCollectionFilter | null | undefined
2753 + /** Filters that the initiative lead team must satisfy. */
2754 + readonly leadTeam?: NullableTeamFilter | null | undefined
2755 + /** Comparator for the initiative name. */
2756 + readonly name?: StringComparator | null | undefined
2757 + /** Compound filters, one of which need to be matched by the initiative. */
2758 + readonly or?: readonly InitiativeFilter[] | null | undefined
2759 + /** Filters that the initiative owner must satisfy. */
2760 + readonly owner?: NullableUserFilter | null | undefined
2761 + /** Comparator for the initiative priority. */
2762 + readonly priority?: NullableNumberComparator | null | undefined
2763 + /** Filters that the initiative projects must satisfy. */
2764 + readonly projects?: ProjectCollectionFilter | null | undefined
2765 + /** Comparator for the initiative slug ID. */
2766 + readonly slugId?: StringComparator | null | undefined
2767 + /** Comparator for the initiative started at date. */
2768 + readonly startedAt?: NullableDateComparator | null | undefined
2769 + /** Comparator for the initiative status: Proposed, Planned, Active, Completed, Canceled */
2770 + readonly status?: StringComparator | null | undefined
2771 + /** Comparator for the initiative target date. */
2772 + readonly targetDate?: NullableDateComparator | null | undefined
2773 + /** Filters that the initiative teams must satisfy. */
2774 + readonly teams?: TeamCollectionFilter | null | undefined
2775 + /** Comparator for the updated at date. */
2776 + readonly updatedAt?: DateComparator | null | undefined
2777 +}
2778 +export interface InitiativeFilterEncoded {
2779 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
2780 + readonly ancestors?: InitiativeCollectionFilterEncoded | null | undefined
2781 + readonly and?: readonly InitiativeFilterEncoded[] | null | undefined
2782 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
2783 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
2784 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2785 + readonly creator?: NullableUserFilterEncoded | null | undefined
2786 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
2787 + readonly health?: typeof StringComparator.Encoded | null | undefined
2788 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
2789 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
2790 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilterEncoded | null | undefined
2791 + readonly labels?: InitiativeLabelCollectionFilterEncoded | null | undefined
2792 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
2793 + readonly name?: typeof StringComparator.Encoded | null | undefined
2794 + readonly or?: readonly InitiativeFilterEncoded[] | null | undefined
2795 + readonly owner?: NullableUserFilterEncoded | null | undefined
2796 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
2797 + readonly projects?: ProjectCollectionFilterEncoded | null | undefined
2798 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
2799 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
2800 + readonly status?: typeof StringComparator.Encoded | null | undefined
2801 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
2802 + readonly teams?: TeamCollectionFilterEncoded | null | undefined
2803 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2804 +}
2805 +
2806 +/** Initiative collection filtering options. */
2807 +export const InitiativeCollectionFilter: Schema.Codec<InitiativeCollectionFilter, InitiativeCollectionFilterEncoded> = Schema.Struct({
2808 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
2809 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
2810 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeCollectionFilter)))),
2811 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2812 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2813 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2814 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2815 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
2816 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeFilter))),
2817 + health: Schema.optional(Schema.NullOr(StringComparator)),
2818 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
2819 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
2820 + initiativeUpdates: Schema.optional(Schema.NullOr(InitiativeUpdatesCollectionFilter)),
2821 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelCollectionFilter))),
2822 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
2823 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2824 + name: Schema.optional(Schema.NullOr(StringComparator)),
2825 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeCollectionFilter)))),
2826 + owner: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2827 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
2828 + projects: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectCollectionFilter))),
2829 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
2830 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeFilter))),
2831 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
2832 + status: Schema.optional(Schema.NullOr(StringComparator)),
2833 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
2834 + teams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
2835 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2836 +})
2837 +export interface InitiativeCollectionFilter {
2838 + /** Comparator for the initiative activity type. */
2839 + readonly activityType?: StringComparator | null | undefined
2840 + /** Filters that the initiative must be an ancestor of. */
2841 + readonly ancestors?: InitiativeCollectionFilter | null | undefined
2842 + /** Compound filters, all of which need to be matched by the initiative. */
2843 + readonly and?: readonly InitiativeCollectionFilter[] | null | undefined
2844 + /** [Internal] Comparator for the initiative canceled at date. */
2845 + readonly canceledAt?: NullableDateComparator | null | undefined
2846 + /** Comparator for the initiative completed at date. */
2847 + readonly completedAt?: NullableDateComparator | null | undefined
2848 + /** Comparator for the created at date. */
2849 + readonly createdAt?: DateComparator | null | undefined
2850 + /** Filters that the initiative creator must satisfy. */
2851 + readonly creator?: NullableUserFilter | null | undefined
2852 + /** [Internal] Comparator for the initiative's custom identifier. */
2853 + readonly customIdentifier?: NullableStringComparator | null | undefined
2854 + /** Filters that needs to be matched by all initiatives. */
2855 + readonly every?: InitiativeFilter | null | undefined
2856 + /** Comparator for the initiative health: onTrack, atRisk, offTrack */
2857 + readonly health?: StringComparator | null | undefined
2858 + /** Comparator for the initiative health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
2859 + readonly healthWithAge?: StringComparator | null | undefined
2860 + /** Comparator for the identifier. */
2861 + readonly id?: EntityIdentifierIDComparator | null | undefined
2862 + /** Filters that the initiative updates must satisfy. */
2863 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilter | null | undefined
2864 + /** Filters that the initiative labels must satisfy. */
2865 + readonly labels?: InitiativeLabelCollectionFilter | null | undefined
2866 + /** Filters that the initiative lead team must satisfy. */
2867 + readonly leadTeam?: NullableTeamFilter | null | undefined
2868 + /** Comparator for the collection length. */
2869 + readonly length?: NumberComparator | null | undefined
2870 + /** Comparator for the initiative name. */
2871 + readonly name?: StringComparator | null | undefined
2872 + /** Compound filters, one of which need to be matched by the initiative. */
2873 + readonly or?: readonly InitiativeCollectionFilter[] | null | undefined
2874 + /** Filters that the initiative owner must satisfy. */
2875 + readonly owner?: NullableUserFilter | null | undefined
2876 + /** Comparator for the initiative priority. */
2877 + readonly priority?: NullableNumberComparator | null | undefined
2878 + /** Filters that the initiative projects must satisfy. */
2879 + readonly projects?: ProjectCollectionFilter | null | undefined
2880 + /** Comparator for the initiative slug ID. */
2881 + readonly slugId?: StringComparator | null | undefined
2882 + /** Filters that needs to be matched by some initiatives. */
2883 + readonly some?: InitiativeFilter | null | undefined
2884 + /** Comparator for the initiative started at date. */
2885 + readonly startedAt?: NullableDateComparator | null | undefined
2886 + /** Comparator for the initiative status: Proposed, Planned, Active, Completed, Canceled */
2887 + readonly status?: StringComparator | null | undefined
2888 + /** Comparator for the initiative target date. */
2889 + readonly targetDate?: NullableDateComparator | null | undefined
2890 + /** Filters that the initiative teams must satisfy. */
2891 + readonly teams?: TeamCollectionFilter | null | undefined
2892 + /** Comparator for the updated at date. */
2893 + readonly updatedAt?: DateComparator | null | undefined
2894 +}
2895 +export interface InitiativeCollectionFilterEncoded {
2896 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
2897 + readonly ancestors?: InitiativeCollectionFilterEncoded | null | undefined
2898 + readonly and?: readonly InitiativeCollectionFilterEncoded[] | null | undefined
2899 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
2900 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
2901 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2902 + readonly creator?: NullableUserFilterEncoded | null | undefined
2903 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
2904 + readonly every?: InitiativeFilterEncoded | null | undefined
2905 + readonly health?: typeof StringComparator.Encoded | null | undefined
2906 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
2907 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
2908 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilterEncoded | null | undefined
2909 + readonly labels?: InitiativeLabelCollectionFilterEncoded | null | undefined
2910 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
2911 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2912 + readonly name?: typeof StringComparator.Encoded | null | undefined
2913 + readonly or?: readonly InitiativeCollectionFilterEncoded[] | null | undefined
2914 + readonly owner?: NullableUserFilterEncoded | null | undefined
2915 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
2916 + readonly projects?: ProjectCollectionFilterEncoded | null | undefined
2917 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
2918 + readonly some?: InitiativeFilterEncoded | null | undefined
2919 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
2920 + readonly status?: typeof StringComparator.Encoded | null | undefined
2921 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
2922 + readonly teams?: TeamCollectionFilterEncoded | null | undefined
2923 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2924 +}
2925 +
2926 +/** Initiative label filtering options. */
2927 +export const InitiativeLabelCollectionFilter: Schema.Codec<InitiativeLabelCollectionFilter, InitiativeLabelCollectionFilterEncoded> = Schema.Struct({
2928 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeLabelCollectionFilter)))),
2929 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2930 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2931 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelFilter))),
2932 + id: Schema.optional(Schema.NullOr(IDComparator)),
2933 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
2934 + length: Schema.optional(Schema.NullOr(NumberComparator)),
2935 + name: Schema.optional(Schema.NullOr(StringComparator)),
2936 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
2937 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeLabelCollectionFilter)))),
2938 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelFilter))),
2939 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelCollectionFilter))),
2940 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2941 +})
2942 +export interface InitiativeLabelCollectionFilter {
2943 + /** Compound filters, all of which need to be matched by the label. */
2944 + readonly and?: readonly InitiativeLabelCollectionFilter[] | null | undefined
2945 + /** Comparator for the created at date. */
2946 + readonly createdAt?: DateComparator | null | undefined
2947 + /** Filters that the initiative labels creator must satisfy. */
2948 + readonly creator?: NullableUserFilter | null | undefined
2949 + /** Filters that needs to be matched by all initiative labels. */
2950 + readonly every?: InitiativeLabelFilter | null | undefined
2951 + /** Comparator for the identifier. */
2952 + readonly id?: IDComparator | null | undefined
2953 + /** Comparator for whether the label is a group label. */
2954 + readonly isGroup?: BooleanComparator | null | undefined
2955 + /** Comparator for the collection length. */
2956 + readonly length?: NumberComparator | null | undefined
2957 + /** Comparator for the name. */
2958 + readonly name?: StringComparator | null | undefined
2959 + /** Filter based on the existence of the relation. */
2960 + readonly null?: boolean | null | undefined
2961 + /** Compound filters, one of which need to be matched by the label. */
2962 + readonly or?: readonly InitiativeLabelCollectionFilter[] | null | undefined
2963 + /** Filters that the initiative label's parent label must satisfy. */
2964 + readonly parent?: InitiativeLabelFilter | null | undefined
2965 + /** Filters that needs to be matched by some initiative labels. */
2966 + readonly some?: InitiativeLabelCollectionFilter | null | undefined
2967 + /** Comparator for the updated at date. */
2968 + readonly updatedAt?: DateComparator | null | undefined
2969 +}
2970 +export interface InitiativeLabelCollectionFilterEncoded {
2971 + readonly and?: readonly InitiativeLabelCollectionFilterEncoded[] | null | undefined
2972 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
2973 + readonly creator?: NullableUserFilterEncoded | null | undefined
2974 + readonly every?: InitiativeLabelFilterEncoded | null | undefined
2975 + readonly id?: typeof IDComparator.Encoded | null | undefined
2976 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
2977 + readonly length?: typeof NumberComparator.Encoded | null | undefined
2978 + readonly name?: typeof StringComparator.Encoded | null | undefined
2979 + readonly null?: boolean | null | undefined
2980 + readonly or?: readonly InitiativeLabelCollectionFilterEncoded[] | null | undefined
2981 + readonly parent?: InitiativeLabelFilterEncoded | null | undefined
2982 + readonly some?: InitiativeLabelCollectionFilterEncoded | null | undefined
2983 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
2984 +}
2985 +
2986 +/** Initiative label filtering options. */
2987 +export const InitiativeLabelFilter: Schema.Codec<InitiativeLabelFilter, InitiativeLabelFilterEncoded> = Schema.Struct({
2988 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeLabelFilter)))),
2989 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
2990 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
2991 + id: Schema.optional(Schema.NullOr(IDComparator)),
2992 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
2993 + name: Schema.optional(Schema.NullOr(StringComparator)),
2994 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => InitiativeLabelFilter)))),
2995 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelFilter))),
2996 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
2997 +})
2998 +export interface InitiativeLabelFilter {
2999 + /** Compound filters, all of which need to be matched by the label. */
3000 + readonly and?: readonly InitiativeLabelFilter[] | null | undefined
3001 + /** Comparator for the created at date. */
3002 + readonly createdAt?: DateComparator | null | undefined
3003 + /** Filters that the initiative labels creator must satisfy. */
3004 + readonly creator?: NullableUserFilter | null | undefined
3005 + /** Comparator for the identifier. */
3006 + readonly id?: IDComparator | null | undefined
3007 + /** Comparator for whether the label is a group label. */
3008 + readonly isGroup?: BooleanComparator | null | undefined
3009 + /** Comparator for the name. */
3010 + readonly name?: StringComparator | null | undefined
3011 + /** Compound filters, one of which need to be matched by the label. */
3012 + readonly or?: readonly InitiativeLabelFilter[] | null | undefined
3013 + /** Filters that the initiative label's parent label must satisfy. */
3014 + readonly parent?: InitiativeLabelFilter | null | undefined
3015 + /** Comparator for the updated at date. */
3016 + readonly updatedAt?: DateComparator | null | undefined
3017 +}
3018 +export interface InitiativeLabelFilterEncoded {
3019 + readonly and?: readonly InitiativeLabelFilterEncoded[] | null | undefined
3020 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3021 + readonly creator?: NullableUserFilterEncoded | null | undefined
3022 + readonly id?: typeof IDComparator.Encoded | null | undefined
3023 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
3024 + readonly name?: typeof StringComparator.Encoded | null | undefined
3025 + readonly or?: readonly InitiativeLabelFilterEncoded[] | null | undefined
3026 + readonly parent?: InitiativeLabelFilterEncoded | null | undefined
3027 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3028 +}
3029 +
3030 +/** Project filtering options. */
3031 +export const ProjectCollectionFilter: Schema.Codec<ProjectCollectionFilter, ProjectCollectionFilterEncoded> = Schema.Struct({
3032 + accessibleTeams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
3033 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
3034 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectCollectionFilter)))),
3035 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3036 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3037 + completedProjectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
3038 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3039 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
3040 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
3041 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
3042 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
3043 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectFilter))),
3044 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3045 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3046 + hasDependedOnByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3047 + hasDependsOnRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3048 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3049 + hasViolatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3050 + health: Schema.optional(Schema.NullOr(StringComparator)),
3051 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
3052 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
3053 + initiatives: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
3054 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
3055 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelCollectionFilter))),
3056 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
3057 + lead: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3058 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3059 + length: Schema.optional(Schema.NullOr(NumberComparator)),
3060 + members: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
3061 + name: Schema.optional(Schema.NullOr(StringComparator)),
3062 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
3063 + nextProjectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
3064 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectCollectionFilter)))),
3065 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
3066 + projectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
3067 + projectUpdates: Schema.optional(Schema.NullOr(ProjectUpdatesCollectionFilter)),
3068 + roadmaps: Schema.optional(Schema.NullOr(Schema.suspend(() => RoadmapCollectionFilter))),
3069 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
3070 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
3071 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectFilter))),
3072 + startDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3073 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3074 + state: Schema.optional(Schema.NullOr(StringComparator)),
3075 + status: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectStatusFilter))),
3076 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3077 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3078 +})
3079 +export interface ProjectCollectionFilter {
3080 + /** Filters that the project's team must satisfy. */
3081 + readonly accessibleTeams?: TeamCollectionFilter | null | undefined
3082 + /** [ALPHA] Comparator for the project activity type: buzzin, active, some, none */
3083 + readonly activityType?: StringComparator | null | undefined
3084 + /** Compound filters, all of which need to be matched by the project. */
3085 + readonly and?: readonly ProjectCollectionFilter[] | null | undefined
3086 + /** Comparator for the project cancelation date. */
3087 + readonly canceledAt?: NullableDateComparator | null | undefined
3088 + /** Comparator for the project completion date. */
3089 + readonly completedAt?: NullableDateComparator | null | undefined
3090 + /** Filters that the project's completed milestones must satisfy. */
3091 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
3092 + /** Comparator for the created at date. */
3093 + readonly createdAt?: DateComparator | null | undefined
3094 + /** Filters that the projects creator must satisfy. */
3095 + readonly creator?: UserFilter | null | undefined
3096 + /** [Internal] Comparator for the project's custom identifier. */
3097 + readonly customIdentifier?: NullableStringComparator | null | undefined
3098 + /** Count of customers */
3099 + readonly customerCount?: NumberComparator | null | undefined
3100 + /** Count of important customers */
3101 + readonly customerImportantCount?: NumberComparator | null | undefined
3102 + /** Filters that needs to be matched by all projects. */
3103 + readonly every?: ProjectFilter | null | undefined
3104 + /** Comparator for filtering projects which are blocked. */
3105 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
3106 + /** Comparator for filtering projects which are blocking. */
3107 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
3108 + /** [Deprecated] Comparator for filtering projects which this is depended on by. */
3109 + readonly hasDependedOnByRelations?: RelationExistsComparator | null | undefined
3110 + /** [Deprecated]Comparator for filtering projects which this depends on. */
3111 + readonly hasDependsOnRelations?: RelationExistsComparator | null | undefined
3112 + /** Comparator for filtering projects with relations. */
3113 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
3114 + /** Comparator for filtering projects with violated dependencies. */
3115 + readonly hasViolatedRelations?: RelationExistsComparator | null | undefined
3116 + /** Comparator for the project health: onTrack, atRisk, offTrack */
3117 + readonly health?: StringComparator | null | undefined
3118 + /** Comparator for the project health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
3119 + readonly healthWithAge?: StringComparator | null | undefined
3120 + /** Comparator for the identifier. */
3121 + readonly id?: EntityIdentifierIDComparator | null | undefined
3122 + /** Filters that the projects initiatives must satisfy. */
3123 + readonly initiatives?: InitiativeCollectionFilter | null | undefined
3124 + /** Filters that the projects issues must satisfy. */
3125 + readonly issues?: IssueCollectionFilter | null | undefined
3126 + /** Filters that project labels must satisfy. */
3127 + readonly labels?: ProjectLabelCollectionFilter | null | undefined
3128 + /** Filters that the last applied template must satisfy. */
3129 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
3130 + /** Filters that the projects lead must satisfy. */
3131 + readonly lead?: NullableUserFilter | null | undefined
3132 + /** [ALPHA] Filters that the project's lead team must satisfy. */
3133 + readonly leadTeam?: NullableTeamFilter | null | undefined
3134 + /** Comparator for the collection length. */
3135 + readonly length?: NumberComparator | null | undefined
3136 + /** Filters that the projects members must satisfy. */
3137 + readonly members?: UserCollectionFilter | null | undefined
3138 + /** Comparator for the project name. */
3139 + readonly name?: StringComparator | null | undefined
3140 + /** Filters that the project's customer needs must satisfy. */
3141 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
3142 + /** Filters that the project's next milestone must satisfy. */
3143 + readonly nextProjectMilestone?: ProjectMilestoneFilter | null | undefined
3144 + /** Compound filters, one of which need to be matched by the project. */
3145 + readonly or?: readonly ProjectCollectionFilter[] | null | undefined
3146 + /** Comparator for the project priority. */
3147 + readonly priority?: NullableNumberComparator | null | undefined
3148 + /** Filters that the project's milestones must satisfy. */
3149 + readonly projectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
3150 + /** Comparator for the project updates. */
3151 + readonly projectUpdates?: ProjectUpdatesCollectionFilter | null | undefined
3152 + /** Filters that the projects roadmaps must satisfy. */
3153 + readonly roadmaps?: RoadmapCollectionFilter | null | undefined
3154 + /** [Internal] Comparator for the project's content. */
3155 + readonly searchableContent?: ContentComparator | null | undefined
3156 + /** Comparator for the project slug ID. */
3157 + readonly slugId?: StringComparator | null | undefined
3158 + /** Filters that needs to be matched by some projects. */
3159 + readonly some?: ProjectFilter | null | undefined
3160 + /** Comparator for the project start date. */
3161 + readonly startDate?: NullableDateComparator | null | undefined
3162 + /** Comparator for the project started date (when it was moved to an "In Progress" status). */
3163 + readonly startedAt?: NullableDateComparator | null | undefined
3164 + /** [DEPRECATED] Comparator for the project state. */
3165 + readonly state?: StringComparator | null | undefined
3166 + /** Filters that the project status must satisfy. */
3167 + readonly status?: ProjectStatusFilter | null | undefined
3168 + /** Comparator for the project target date. */
3169 + readonly targetDate?: NullableDateComparator | null | undefined
3170 + /** Comparator for the updated at date. */
3171 + readonly updatedAt?: DateComparator | null | undefined
3172 +}
3173 +export interface ProjectCollectionFilterEncoded {
3174 + readonly accessibleTeams?: TeamCollectionFilterEncoded | null | undefined
3175 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
3176 + readonly and?: readonly ProjectCollectionFilterEncoded[] | null | undefined
3177 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
3178 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
3179 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
3180 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3181 + readonly creator?: UserFilterEncoded | null | undefined
3182 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
3183 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
3184 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
3185 + readonly every?: ProjectFilterEncoded | null | undefined
3186 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3187 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3188 + readonly hasDependedOnByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3189 + readonly hasDependsOnRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3190 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3191 + readonly hasViolatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3192 + readonly health?: typeof StringComparator.Encoded | null | undefined
3193 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
3194 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
3195 + readonly initiatives?: InitiativeCollectionFilterEncoded | null | undefined
3196 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
3197 + readonly labels?: ProjectLabelCollectionFilterEncoded | null | undefined
3198 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
3199 + readonly lead?: NullableUserFilterEncoded | null | undefined
3200 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
3201 + readonly length?: typeof NumberComparator.Encoded | null | undefined
3202 + readonly members?: UserCollectionFilterEncoded | null | undefined
3203 + readonly name?: typeof StringComparator.Encoded | null | undefined
3204 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
3205 + readonly nextProjectMilestone?: ProjectMilestoneFilterEncoded | null | undefined
3206 + readonly or?: readonly ProjectCollectionFilterEncoded[] | null | undefined
3207 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
3208 + readonly projectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
3209 + readonly projectUpdates?: ProjectUpdatesCollectionFilterEncoded | null | undefined
3210 + readonly roadmaps?: RoadmapCollectionFilterEncoded | null | undefined
3211 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
3212 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
3213 + readonly some?: ProjectFilterEncoded | null | undefined
3214 + readonly startDate?: typeof NullableDateComparator.Encoded | null | undefined
3215 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
3216 + readonly state?: typeof StringComparator.Encoded | null | undefined
3217 + readonly status?: ProjectStatusFilterEncoded | null | undefined
3218 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
3219 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3220 +}
3221 +
3222 +/** Milestone collection filtering options. */
3223 +export const ProjectMilestoneCollectionFilter: Schema.Codec<ProjectMilestoneCollectionFilter, ProjectMilestoneCollectionFilterEncoded> = Schema.Struct({
3224 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectMilestoneCollectionFilter)))),
3225 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3226 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
3227 + id: Schema.optional(Schema.NullOr(IDComparator)),
3228 + length: Schema.optional(Schema.NullOr(NumberComparator)),
3229 + name: Schema.optional(Schema.NullOr(NullableStringComparator)),
3230 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectMilestoneCollectionFilter)))),
3231 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
3232 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
3233 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3234 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3235 +})
3236 +export interface ProjectMilestoneCollectionFilter {
3237 + /** Compound filters, all of which need to be matched by the milestone. */
3238 + readonly and?: readonly ProjectMilestoneCollectionFilter[] | null | undefined
3239 + /** Comparator for the created at date. */
3240 + readonly createdAt?: DateComparator | null | undefined
3241 + /** Filters that needs to be matched by all milestones. */
3242 + readonly every?: ProjectMilestoneFilter | null | undefined
3243 + /** Comparator for the identifier. */
3244 + readonly id?: IDComparator | null | undefined
3245 + /** Comparator for the collection length. */
3246 + readonly length?: NumberComparator | null | undefined
3247 + /** Comparator for the project milestone name. */
3248 + readonly name?: NullableStringComparator | null | undefined
3249 + /** Compound filters, one of which need to be matched by the milestone. */
3250 + readonly or?: readonly ProjectMilestoneCollectionFilter[] | null | undefined
3251 + /** Filters that the project milestone's project must satisfy. */
3252 + readonly project?: NullableProjectFilter | null | undefined
3253 + /** Filters that needs to be matched by some milestones. */
3254 + readonly some?: ProjectMilestoneFilter | null | undefined
3255 + /** Comparator for the project milestone target date. */
3256 + readonly targetDate?: NullableDateComparator | null | undefined
3257 + /** Comparator for the updated at date. */
3258 + readonly updatedAt?: DateComparator | null | undefined
3259 +}
3260 +export interface ProjectMilestoneCollectionFilterEncoded {
3261 + readonly and?: readonly ProjectMilestoneCollectionFilterEncoded[] | null | undefined
3262 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3263 + readonly every?: ProjectMilestoneFilterEncoded | null | undefined
3264 + readonly id?: typeof IDComparator.Encoded | null | undefined
3265 + readonly length?: typeof NumberComparator.Encoded | null | undefined
3266 + readonly name?: typeof NullableStringComparator.Encoded | null | undefined
3267 + readonly or?: readonly ProjectMilestoneCollectionFilterEncoded[] | null | undefined
3268 + readonly project?: NullableProjectFilterEncoded | null | undefined
3269 + readonly some?: ProjectMilestoneFilterEncoded | null | undefined
3270 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
3271 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3272 +}
3273 +
3274 +/** Project milestone filtering options. */
3275 +export const ProjectMilestoneFilter: Schema.Codec<ProjectMilestoneFilter, ProjectMilestoneFilterEncoded> = Schema.Struct({
3276 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectMilestoneFilter)))),
3277 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3278 + id: Schema.optional(Schema.NullOr(IDComparator)),
3279 + name: Schema.optional(Schema.NullOr(NullableStringComparator)),
3280 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectMilestoneFilter)))),
3281 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
3282 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3283 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3284 +})
3285 +export interface ProjectMilestoneFilter {
3286 + /** Compound filters, all of which need to be matched by the project milestone. */
3287 + readonly and?: readonly ProjectMilestoneFilter[] | null | undefined
3288 + /** Comparator for the created at date. */
3289 + readonly createdAt?: DateComparator | null | undefined
3290 + /** Comparator for the identifier. */
3291 + readonly id?: IDComparator | null | undefined
3292 + /** Comparator for the project milestone name. */
3293 + readonly name?: NullableStringComparator | null | undefined
3294 + /** Compound filters, one of which need to be matched by the project milestone. */
3295 + readonly or?: readonly ProjectMilestoneFilter[] | null | undefined
3296 + /** Filters that the project milestone's project must satisfy. */
3297 + readonly project?: NullableProjectFilter | null | undefined
3298 + /** Comparator for the project milestone target date. */
3299 + readonly targetDate?: NullableDateComparator | null | undefined
3300 + /** Comparator for the updated at date. */
3301 + readonly updatedAt?: DateComparator | null | undefined
3302 +}
3303 +export interface ProjectMilestoneFilterEncoded {
3304 + readonly and?: readonly ProjectMilestoneFilterEncoded[] | null | undefined
3305 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3306 + readonly id?: typeof IDComparator.Encoded | null | undefined
3307 + readonly name?: typeof NullableStringComparator.Encoded | null | undefined
3308 + readonly or?: readonly ProjectMilestoneFilterEncoded[] | null | undefined
3309 + readonly project?: NullableProjectFilterEncoded | null | undefined
3310 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
3311 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3312 +}
3313 +
3314 +/** Project filtering options. */
3315 +export const NullableProjectFilter: Schema.Codec<NullableProjectFilter, NullableProjectFilterEncoded> = Schema.Struct({
3316 + accessibleTeams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
3317 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
3318 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectFilter)))),
3319 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3320 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3321 + completedProjectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
3322 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3323 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
3324 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
3325 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
3326 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
3327 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3328 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3329 + hasDependedOnByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3330 + hasDependsOnRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3331 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3332 + hasViolatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3333 + health: Schema.optional(Schema.NullOr(StringComparator)),
3334 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
3335 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
3336 + initiatives: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
3337 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
3338 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelCollectionFilter))),
3339 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
3340 + lead: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3341 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3342 + members: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
3343 + name: Schema.optional(Schema.NullOr(StringComparator)),
3344 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
3345 + nextProjectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
3346 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3347 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectFilter)))),
3348 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
3349 + projectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
3350 + projectUpdates: Schema.optional(Schema.NullOr(ProjectUpdatesCollectionFilter)),
3351 + roadmaps: Schema.optional(Schema.NullOr(Schema.suspend(() => RoadmapCollectionFilter))),
3352 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
3353 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
3354 + startDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3355 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3356 + state: Schema.optional(Schema.NullOr(StringComparator)),
3357 + status: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectStatusFilter))),
3358 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3359 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3360 +})
3361 +export interface NullableProjectFilter {
3362 + /** Filters that the project's team must satisfy. */
3363 + readonly accessibleTeams?: TeamCollectionFilter | null | undefined
3364 + /** [ALPHA] Comparator for the project activity type: buzzin, active, some, none */
3365 + readonly activityType?: StringComparator | null | undefined
3366 + /** Compound filters, all of which need to be matched by the project. */
3367 + readonly and?: readonly NullableProjectFilter[] | null | undefined
3368 + /** Comparator for the project cancelation date. */
3369 + readonly canceledAt?: NullableDateComparator | null | undefined
3370 + /** Comparator for the project completion date. */
3371 + readonly completedAt?: NullableDateComparator | null | undefined
3372 + /** Filters that the project's completed milestones must satisfy. */
3373 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
3374 + /** Comparator for the created at date. */
3375 + readonly createdAt?: DateComparator | null | undefined
3376 + /** Filters that the projects creator must satisfy. */
3377 + readonly creator?: UserFilter | null | undefined
3378 + /** [Internal] Comparator for the project's custom identifier. */
3379 + readonly customIdentifier?: NullableStringComparator | null | undefined
3380 + /** Count of customers */
3381 + readonly customerCount?: NumberComparator | null | undefined
3382 + /** Count of important customers */
3383 + readonly customerImportantCount?: NumberComparator | null | undefined
3384 + /** Comparator for filtering projects which are blocked. */
3385 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
3386 + /** Comparator for filtering projects which are blocking. */
3387 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
3388 + /** [Deprecated] Comparator for filtering projects which this is depended on by. */
3389 + readonly hasDependedOnByRelations?: RelationExistsComparator | null | undefined
3390 + /** [Deprecated]Comparator for filtering projects which this depends on. */
3391 + readonly hasDependsOnRelations?: RelationExistsComparator | null | undefined
3392 + /** Comparator for filtering projects with relations. */
3393 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
3394 + /** Comparator for filtering projects with violated dependencies. */
3395 + readonly hasViolatedRelations?: RelationExistsComparator | null | undefined
3396 + /** Comparator for the project health: onTrack, atRisk, offTrack */
3397 + readonly health?: StringComparator | null | undefined
3398 + /** Comparator for the project health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
3399 + readonly healthWithAge?: StringComparator | null | undefined
3400 + /** Comparator for the identifier. */
3401 + readonly id?: EntityIdentifierIDComparator | null | undefined
3402 + /** Filters that the projects initiatives must satisfy. */
3403 + readonly initiatives?: InitiativeCollectionFilter | null | undefined
3404 + /** Filters that the projects issues must satisfy. */
3405 + readonly issues?: IssueCollectionFilter | null | undefined
3406 + /** Filters that project labels must satisfy. */
3407 + readonly labels?: ProjectLabelCollectionFilter | null | undefined
3408 + /** Filters that the last applied template must satisfy. */
3409 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
3410 + /** Filters that the projects lead must satisfy. */
3411 + readonly lead?: NullableUserFilter | null | undefined
3412 + /** [ALPHA] Filters that the project's lead team must satisfy. */
3413 + readonly leadTeam?: NullableTeamFilter | null | undefined
3414 + /** Filters that the projects members must satisfy. */
3415 + readonly members?: UserCollectionFilter | null | undefined
3416 + /** Comparator for the project name. */
3417 + readonly name?: StringComparator | null | undefined
3418 + /** Filters that the project's customer needs must satisfy. */
3419 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
3420 + /** Filters that the project's next milestone must satisfy. */
3421 + readonly nextProjectMilestone?: ProjectMilestoneFilter | null | undefined
3422 + /** Filter based on the existence of the relation. */
3423 + readonly null?: boolean | null | undefined
3424 + /** Compound filters, one of which need to be matched by the project. */
3425 + readonly or?: readonly NullableProjectFilter[] | null | undefined
3426 + /** Comparator for the project priority. */
3427 + readonly priority?: NullableNumberComparator | null | undefined
3428 + /** Filters that the project's milestones must satisfy. */
3429 + readonly projectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
3430 + /** Comparator for the project updates. */
3431 + readonly projectUpdates?: ProjectUpdatesCollectionFilter | null | undefined
3432 + /** Filters that the projects roadmaps must satisfy. */
3433 + readonly roadmaps?: RoadmapCollectionFilter | null | undefined
3434 + /** [Internal] Comparator for the project's content. */
3435 + readonly searchableContent?: ContentComparator | null | undefined
3436 + /** Comparator for the project slug ID. */
3437 + readonly slugId?: StringComparator | null | undefined
3438 + /** Comparator for the project start date. */
3439 + readonly startDate?: NullableDateComparator | null | undefined
3440 + /** Comparator for the project started date (when it was moved to an "In Progress" status). */
3441 + readonly startedAt?: NullableDateComparator | null | undefined
3442 + /** [DEPRECATED] Comparator for the project state. */
3443 + readonly state?: StringComparator | null | undefined
3444 + /** Filters that the project status must satisfy. */
3445 + readonly status?: ProjectStatusFilter | null | undefined
3446 + /** Comparator for the project target date. */
3447 + readonly targetDate?: NullableDateComparator | null | undefined
3448 + /** Comparator for the updated at date. */
3449 + readonly updatedAt?: DateComparator | null | undefined
3450 +}
3451 +export interface NullableProjectFilterEncoded {
3452 + readonly accessibleTeams?: TeamCollectionFilterEncoded | null | undefined
3453 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
3454 + readonly and?: readonly NullableProjectFilterEncoded[] | null | undefined
3455 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
3456 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
3457 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
3458 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3459 + readonly creator?: UserFilterEncoded | null | undefined
3460 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
3461 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
3462 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
3463 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3464 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3465 + readonly hasDependedOnByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3466 + readonly hasDependsOnRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3467 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3468 + readonly hasViolatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
3469 + readonly health?: typeof StringComparator.Encoded | null | undefined
3470 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
3471 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
3472 + readonly initiatives?: InitiativeCollectionFilterEncoded | null | undefined
3473 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
3474 + readonly labels?: ProjectLabelCollectionFilterEncoded | null | undefined
3475 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
3476 + readonly lead?: NullableUserFilterEncoded | null | undefined
3477 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
3478 + readonly members?: UserCollectionFilterEncoded | null | undefined
3479 + readonly name?: typeof StringComparator.Encoded | null | undefined
3480 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
3481 + readonly nextProjectMilestone?: ProjectMilestoneFilterEncoded | null | undefined
3482 + readonly null?: boolean | null | undefined
3483 + readonly or?: readonly NullableProjectFilterEncoded[] | null | undefined
3484 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
3485 + readonly projectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
3486 + readonly projectUpdates?: ProjectUpdatesCollectionFilterEncoded | null | undefined
3487 + readonly roadmaps?: RoadmapCollectionFilterEncoded | null | undefined
3488 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
3489 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
3490 + readonly startDate?: typeof NullableDateComparator.Encoded | null | undefined
3491 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
3492 + readonly state?: typeof StringComparator.Encoded | null | undefined
3493 + readonly status?: ProjectStatusFilterEncoded | null | undefined
3494 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
3495 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3496 +}
3497 +
3498 +/** Project label filtering options. */
3499 +export const ProjectLabelCollectionFilter: Schema.Codec<ProjectLabelCollectionFilter, ProjectLabelCollectionFilterEncoded> = Schema.Struct({
3500 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectLabelCollectionFilter)))),
3501 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3502 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3503 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelFilter))),
3504 + id: Schema.optional(Schema.NullOr(IDComparator)),
3505 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
3506 + length: Schema.optional(Schema.NullOr(NumberComparator)),
3507 + name: Schema.optional(Schema.NullOr(StringComparator)),
3508 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3509 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectLabelCollectionFilter)))),
3510 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelFilter))),
3511 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelCollectionFilter))),
3512 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3513 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3514 +})
3515 +export interface ProjectLabelCollectionFilter {
3516 + /** Compound filters, all of which need to be matched by the label. */
3517 + readonly and?: readonly ProjectLabelCollectionFilter[] | null | undefined
3518 + /** Comparator for the created at date. */
3519 + readonly createdAt?: DateComparator | null | undefined
3520 + /** Filters that the project labels creator must satisfy. */
3521 + readonly creator?: NullableUserFilter | null | undefined
3522 + /** Filters that needs to be matched by all project labels. */
3523 + readonly every?: ProjectLabelFilter | null | undefined
3524 + /** Comparator for the identifier. */
3525 + readonly id?: IDComparator | null | undefined
3526 + /** Comparator for whether the label is a group label. */
3527 + readonly isGroup?: BooleanComparator | null | undefined
3528 + /** Comparator for the collection length. */
3529 + readonly length?: NumberComparator | null | undefined
3530 + /** Comparator for the name. */
3531 + readonly name?: StringComparator | null | undefined
3532 + /** Filter based on the existence of the relation. */
3533 + readonly null?: boolean | null | undefined
3534 + /** Compound filters, one of which need to be matched by the label. */
3535 + readonly or?: readonly ProjectLabelCollectionFilter[] | null | undefined
3536 + /** Filters that the project label's parent label must satisfy. */
3537 + readonly parent?: ProjectLabelFilter | null | undefined
3538 + /** Filters that needs to be matched by some project labels. */
3539 + readonly some?: ProjectLabelCollectionFilter | null | undefined
3540 + /** Filters that the project label's team must satisfy. Use `{ null: true }` to filter workspace-level labels. */
3541 + readonly team?: NullableTeamFilter | null | undefined
3542 + /** Comparator for the updated at date. */
3543 + readonly updatedAt?: DateComparator | null | undefined
3544 +}
3545 +export interface ProjectLabelCollectionFilterEncoded {
3546 + readonly and?: readonly ProjectLabelCollectionFilterEncoded[] | null | undefined
3547 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3548 + readonly creator?: NullableUserFilterEncoded | null | undefined
3549 + readonly every?: ProjectLabelFilterEncoded | null | undefined
3550 + readonly id?: typeof IDComparator.Encoded | null | undefined
3551 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
3552 + readonly length?: typeof NumberComparator.Encoded | null | undefined
3553 + readonly name?: typeof StringComparator.Encoded | null | undefined
3554 + readonly null?: boolean | null | undefined
3555 + readonly or?: readonly ProjectLabelCollectionFilterEncoded[] | null | undefined
3556 + readonly parent?: ProjectLabelFilterEncoded | null | undefined
3557 + readonly some?: ProjectLabelCollectionFilterEncoded | null | undefined
3558 + readonly team?: NullableTeamFilterEncoded | null | undefined
3559 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3560 +}
3561 +
3562 +/** Project label filtering options. */
3563 +export const ProjectLabelFilter: Schema.Codec<ProjectLabelFilter, ProjectLabelFilterEncoded> = Schema.Struct({
3564 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectLabelFilter)))),
3565 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3566 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3567 + id: Schema.optional(Schema.NullOr(IDComparator)),
3568 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
3569 + name: Schema.optional(Schema.NullOr(StringComparator)),
3570 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectLabelFilter)))),
3571 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelFilter))),
3572 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3573 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3574 +})
3575 +export interface ProjectLabelFilter {
3576 + /** Compound filters, all of which need to be matched by the label. */
3577 + readonly and?: readonly ProjectLabelFilter[] | null | undefined
3578 + /** Comparator for the created at date. */
3579 + readonly createdAt?: DateComparator | null | undefined
3580 + /** Filters that the project labels creator must satisfy. */
3581 + readonly creator?: NullableUserFilter | null | undefined
3582 + /** Comparator for the identifier. */
3583 + readonly id?: IDComparator | null | undefined
3584 + /** Comparator for whether the label is a group label. */
3585 + readonly isGroup?: BooleanComparator | null | undefined
3586 + /** Comparator for the name. */
3587 + readonly name?: StringComparator | null | undefined
3588 + /** Compound filters, one of which need to be matched by the label. */
3589 + readonly or?: readonly ProjectLabelFilter[] | null | undefined
3590 + /** Filters that the project label's parent label must satisfy. */
3591 + readonly parent?: ProjectLabelFilter | null | undefined
3592 + /** Filters that the project label's team must satisfy. Use `{ null: true }` to filter workspace-level labels. */
3593 + readonly team?: NullableTeamFilter | null | undefined
3594 + /** Comparator for the updated at date. */
3595 + readonly updatedAt?: DateComparator | null | undefined
3596 +}
3597 +export interface ProjectLabelFilterEncoded {
3598 + readonly and?: readonly ProjectLabelFilterEncoded[] | null | undefined
3599 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3600 + readonly creator?: NullableUserFilterEncoded | null | undefined
3601 + readonly id?: typeof IDComparator.Encoded | null | undefined
3602 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
3603 + readonly name?: typeof StringComparator.Encoded | null | undefined
3604 + readonly or?: readonly ProjectLabelFilterEncoded[] | null | undefined
3605 + readonly parent?: ProjectLabelFilterEncoded | null | undefined
3606 + readonly team?: NullableTeamFilterEncoded | null | undefined
3607 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3608 +}
3609 +
3610 +/** Template filtering options. */
3611 +export const NullableTemplateFilter: Schema.Codec<NullableTemplateFilter, NullableTemplateFilterEncoded> = Schema.Struct({
3612 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableTemplateFilter)))),
3613 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3614 + id: Schema.optional(Schema.NullOr(IDComparator)),
3615 + inheritedFromId: Schema.optional(Schema.NullOr(IDComparator)),
3616 + name: Schema.optional(Schema.NullOr(StringComparator)),
3617 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3618 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableTemplateFilter)))),
3619 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3620 + type: Schema.optional(Schema.NullOr(StringComparator)),
3621 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3622 +})
3623 +export interface NullableTemplateFilter {
3624 + /** Compound filters, all of which need to be matched by the template. */
3625 + readonly and?: readonly NullableTemplateFilter[] | null | undefined
3626 + /** Comparator for the created at date. */
3627 + readonly createdAt?: DateComparator | null | undefined
3628 + /** Comparator for the identifier. */
3629 + readonly id?: IDComparator | null | undefined
3630 + /** Comparator for the inherited template's ID. */
3631 + readonly inheritedFromId?: IDComparator | null | undefined
3632 + /** Comparator for the template's name. */
3633 + readonly name?: StringComparator | null | undefined
3634 + /** Filter based on the existence of the relation. */
3635 + readonly null?: boolean | null | undefined
3636 + /** Compound filters, one of which need to be matched by the template. */
3637 + readonly or?: readonly NullableTemplateFilter[] | null | undefined
3638 + /** Filters that the template's team must satisfy. */
3639 + readonly team?: NullableTeamFilter | null | undefined
3640 + /** Comparator for the template's type. */
3641 + readonly type?: StringComparator | null | undefined
3642 + /** Comparator for the updated at date. */
3643 + readonly updatedAt?: DateComparator | null | undefined
3644 +}
3645 +export interface NullableTemplateFilterEncoded {
3646 + readonly and?: readonly NullableTemplateFilterEncoded[] | null | undefined
3647 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3648 + readonly id?: typeof IDComparator.Encoded | null | undefined
3649 + readonly inheritedFromId?: typeof IDComparator.Encoded | null | undefined
3650 + readonly name?: typeof StringComparator.Encoded | null | undefined
3651 + readonly null?: boolean | null | undefined
3652 + readonly or?: readonly NullableTemplateFilterEncoded[] | null | undefined
3653 + readonly team?: NullableTeamFilterEncoded | null | undefined
3654 + readonly type?: typeof StringComparator.Encoded | null | undefined
3655 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3656 +}
3657 +
3658 +/** Customer needs filtering options. */
3659 +export const CustomerNeedCollectionFilter: Schema.Codec<CustomerNeedCollectionFilter, CustomerNeedCollectionFilterEncoded> = Schema.Struct({
3660 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerNeedCollectionFilter)))),
3661 + comment: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCommentFilter))),
3662 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3663 + customer: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCustomerFilter))),
3664 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedFilter))),
3665 + id: Schema.optional(Schema.NullOr(IDComparator)),
3666 + issue: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
3667 + length: Schema.optional(Schema.NullOr(NumberComparator)),
3668 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => CustomerNeedCollectionFilter)))),
3669 + priority: Schema.optional(Schema.NullOr(NumberComparator)),
3670 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
3671 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedFilter))),
3672 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3673 +})
3674 +export interface CustomerNeedCollectionFilter {
3675 + /** Compound filters, all of which need to be matched by the customer needs. */
3676 + readonly and?: readonly CustomerNeedCollectionFilter[] | null | undefined
3677 + /** Filters that the need's comment must satisfy. */
3678 + readonly comment?: NullableCommentFilter | null | undefined
3679 + /** Comparator for the created at date. */
3680 + readonly createdAt?: DateComparator | null | undefined
3681 + /** Filters that the need's customer must satisfy. */
3682 + readonly customer?: NullableCustomerFilter | null | undefined
3683 + /** Filters that needs to be matched by all customer needs. */
3684 + readonly every?: CustomerNeedFilter | null | undefined
3685 + /** Comparator for the identifier. */
3686 + readonly id?: IDComparator | null | undefined
3687 + /** Filters that the need's issue must satisfy. */
3688 + readonly issue?: NullableIssueFilter | null | undefined
3689 + /** Comparator for the collection length. */
3690 + readonly length?: NumberComparator | null | undefined
3691 + /** Compound filters, one of which need to be matched by the customer needs. */
3692 + readonly or?: readonly CustomerNeedCollectionFilter[] | null | undefined
3693 + /** Comparator for the customer need priority. */
3694 + readonly priority?: NumberComparator | null | undefined
3695 + /** Filters that the need's project must satisfy. */
3696 + readonly project?: NullableProjectFilter | null | undefined
3697 + /** Filters that needs to be matched by some customer needs. */
3698 + readonly some?: CustomerNeedFilter | null | undefined
3699 + /** Comparator for the updated at date. */
3700 + readonly updatedAt?: DateComparator | null | undefined
3701 +}
3702 +export interface CustomerNeedCollectionFilterEncoded {
3703 + readonly and?: readonly CustomerNeedCollectionFilterEncoded[] | null | undefined
3704 + readonly comment?: NullableCommentFilterEncoded | null | undefined
3705 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3706 + readonly customer?: NullableCustomerFilterEncoded | null | undefined
3707 + readonly every?: CustomerNeedFilterEncoded | null | undefined
3708 + readonly id?: typeof IDComparator.Encoded | null | undefined
3709 + readonly issue?: NullableIssueFilterEncoded | null | undefined
3710 + readonly length?: typeof NumberComparator.Encoded | null | undefined
3711 + readonly or?: readonly CustomerNeedCollectionFilterEncoded[] | null | undefined
3712 + readonly priority?: typeof NumberComparator.Encoded | null | undefined
3713 + readonly project?: NullableProjectFilterEncoded | null | undefined
3714 + readonly some?: CustomerNeedFilterEncoded | null | undefined
3715 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3716 +}
3717 +
3718 +/** Comment filtering options. */
3719 +export const NullableCommentFilter: Schema.Codec<NullableCommentFilter, NullableCommentFilterEncoded> = Schema.Struct({
3720 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableCommentFilter)))),
3721 + body: Schema.optional(Schema.NullOr(StringComparator)),
3722 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3723 + documentContent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableDocumentContentFilter))),
3724 + id: Schema.optional(Schema.NullOr(IDComparator)),
3725 + initiative: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableInitiativeFilter))),
3726 + initiativeUpdate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableInitiativeUpdateFilter))),
3727 + issue: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
3728 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
3729 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3730 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableCommentFilter)))),
3731 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCommentFilter))),
3732 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
3733 + projectUpdate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectUpdateFilter))),
3734 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
3735 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
3736 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
3737 +})
3738 +export interface NullableCommentFilter {
3739 + /** Compound filters, all of which need to be matched by the comment. */
3740 + readonly and?: readonly NullableCommentFilter[] | null | undefined
3741 + /** Comparator for the comment's body. */
3742 + readonly body?: StringComparator | null | undefined
3743 + /** Comparator for the created at date. */
3744 + readonly createdAt?: DateComparator | null | undefined
3745 + /** Filters that the comment's document content must satisfy. */
3746 + readonly documentContent?: NullableDocumentContentFilter | null | undefined
3747 + /** Comparator for the identifier. */
3748 + readonly id?: IDComparator | null | undefined
3749 + /** [Internal] Filters that the comment's initiative must satisfy. */
3750 + readonly initiative?: NullableInitiativeFilter | null | undefined
3751 + /** Filters that the comment's initiative update must satisfy. */
3752 + readonly initiativeUpdate?: NullableInitiativeUpdateFilter | null | undefined
3753 + /** Filters that the comment's issue must satisfy. */
3754 + readonly issue?: NullableIssueFilter | null | undefined
3755 + /** Filters that the comment's customer needs must satisfy. */
3756 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
3757 + /** Filter based on the existence of the relation. */
3758 + readonly null?: boolean | null | undefined
3759 + /** Compound filters, one of which need to be matched by the comment. */
3760 + readonly or?: readonly NullableCommentFilter[] | null | undefined
3761 + /** Filters that the comment parent must satisfy. */
3762 + readonly parent?: NullableCommentFilter | null | undefined
3763 + /** [Internal] Filters that the comment's project must satisfy. */
3764 + readonly project?: NullableProjectFilter | null | undefined
3765 + /** Filters that the comment's project update must satisfy. */
3766 + readonly projectUpdate?: NullableProjectUpdateFilter | null | undefined
3767 + /** Filters that the comment's reactions must satisfy. */
3768 + readonly reactions?: ReactionCollectionFilter | null | undefined
3769 + /** Comparator for the updated at date. */
3770 + readonly updatedAt?: DateComparator | null | undefined
3771 + /** Filters that the comment's creator must satisfy. */
3772 + readonly user?: UserFilter | null | undefined
3773 +}
3774 +export interface NullableCommentFilterEncoded {
3775 + readonly and?: readonly NullableCommentFilterEncoded[] | null | undefined
3776 + readonly body?: typeof StringComparator.Encoded | null | undefined
3777 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3778 + readonly documentContent?: NullableDocumentContentFilterEncoded | null | undefined
3779 + readonly id?: typeof IDComparator.Encoded | null | undefined
3780 + readonly initiative?: NullableInitiativeFilterEncoded | null | undefined
3781 + readonly initiativeUpdate?: NullableInitiativeUpdateFilterEncoded | null | undefined
3782 + readonly issue?: NullableIssueFilterEncoded | null | undefined
3783 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
3784 + readonly null?: boolean | null | undefined
3785 + readonly or?: readonly NullableCommentFilterEncoded[] | null | undefined
3786 + readonly parent?: NullableCommentFilterEncoded | null | undefined
3787 + readonly project?: NullableProjectFilterEncoded | null | undefined
3788 + readonly projectUpdate?: NullableProjectUpdateFilterEncoded | null | undefined
3789 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
3790 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3791 + readonly user?: UserFilterEncoded | null | undefined
3792 +}
3793 +
3794 +/** Initiative filtering options. */
3795 +export const NullableInitiativeFilter: Schema.Codec<NullableInitiativeFilter, NullableInitiativeFilterEncoded> = Schema.Struct({
3796 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
3797 + ancestors: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
3798 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableInitiativeFilter)))),
3799 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3800 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3801 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3802 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3803 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
3804 + health: Schema.optional(Schema.NullOr(StringComparator)),
3805 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
3806 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
3807 + initiativeUpdates: Schema.optional(Schema.NullOr(InitiativeUpdatesCollectionFilter)),
3808 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeLabelCollectionFilter))),
3809 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
3810 + name: Schema.optional(Schema.NullOr(StringComparator)),
3811 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3812 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableInitiativeFilter)))),
3813 + owner: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3814 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
3815 + projects: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectCollectionFilter))),
3816 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
3817 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3818 + status: Schema.optional(Schema.NullOr(StringComparator)),
3819 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
3820 + teams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
3821 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
3822 +})
3823 +export interface NullableInitiativeFilter {
3824 + /** Comparator for the initiative activity type. */
3825 + readonly activityType?: StringComparator | null | undefined
3826 + /** Filters that the initiative must be an ancestor of. */
3827 + readonly ancestors?: InitiativeCollectionFilter | null | undefined
3828 + /** Compound filters, all of which need to be matched by the initiative. */
3829 + readonly and?: readonly NullableInitiativeFilter[] | null | undefined
3830 + /** [Internal] Comparator for the initiative canceled at date. */
3831 + readonly canceledAt?: NullableDateComparator | null | undefined
3832 + /** Comparator for the initiative completed at date. */
3833 + readonly completedAt?: NullableDateComparator | null | undefined
3834 + /** Comparator for the created at date. */
3835 + readonly createdAt?: DateComparator | null | undefined
3836 + /** Filters that the initiative creator must satisfy. */
3837 + readonly creator?: NullableUserFilter | null | undefined
3838 + /** [Internal] Comparator for the initiative's custom identifier. */
3839 + readonly customIdentifier?: NullableStringComparator | null | undefined
3840 + /** Comparator for the initiative health: onTrack, atRisk, offTrack */
3841 + readonly health?: StringComparator | null | undefined
3842 + /** Comparator for the initiative health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
3843 + readonly healthWithAge?: StringComparator | null | undefined
3844 + /** Comparator for the identifier. */
3845 + readonly id?: EntityIdentifierIDComparator | null | undefined
3846 + /** Filters that the initiative updates must satisfy. */
3847 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilter | null | undefined
3848 + /** Filters that the initiative labels must satisfy. */
3849 + readonly labels?: InitiativeLabelCollectionFilter | null | undefined
3850 + /** Filters that the initiative lead team must satisfy. */
3851 + readonly leadTeam?: NullableTeamFilter | null | undefined
3852 + /** Comparator for the initiative name. */
3853 + readonly name?: StringComparator | null | undefined
3854 + /** Filter based on the existence of the relation. */
3855 + readonly null?: boolean | null | undefined
3856 + /** Compound filters, one of which need to be matched by the initiative. */
3857 + readonly or?: readonly NullableInitiativeFilter[] | null | undefined
3858 + /** Filters that the initiative owner must satisfy. */
3859 + readonly owner?: NullableUserFilter | null | undefined
3860 + /** Comparator for the initiative priority. */
3861 + readonly priority?: NullableNumberComparator | null | undefined
3862 + /** Filters that the initiative projects must satisfy. */
3863 + readonly projects?: ProjectCollectionFilter | null | undefined
3864 + /** Comparator for the initiative slug ID. */
3865 + readonly slugId?: StringComparator | null | undefined
3866 + /** Comparator for the initiative started at date. */
3867 + readonly startedAt?: NullableDateComparator | null | undefined
3868 + /** Comparator for the initiative status: Proposed, Planned, Active, Completed, Canceled */
3869 + readonly status?: StringComparator | null | undefined
3870 + /** Comparator for the initiative target date. */
3871 + readonly targetDate?: NullableDateComparator | null | undefined
3872 + /** Filters that the initiative teams must satisfy. */
3873 + readonly teams?: TeamCollectionFilter | null | undefined
3874 + /** Comparator for the updated at date. */
3875 + readonly updatedAt?: DateComparator | null | undefined
3876 +}
3877 +export interface NullableInitiativeFilterEncoded {
3878 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
3879 + readonly ancestors?: InitiativeCollectionFilterEncoded | null | undefined
3880 + readonly and?: readonly NullableInitiativeFilterEncoded[] | null | undefined
3881 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
3882 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
3883 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3884 + readonly creator?: NullableUserFilterEncoded | null | undefined
3885 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
3886 + readonly health?: typeof StringComparator.Encoded | null | undefined
3887 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
3888 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
3889 + readonly initiativeUpdates?: InitiativeUpdatesCollectionFilterEncoded | null | undefined
3890 + readonly labels?: InitiativeLabelCollectionFilterEncoded | null | undefined
3891 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
3892 + readonly name?: typeof StringComparator.Encoded | null | undefined
3893 + readonly null?: boolean | null | undefined
3894 + readonly or?: readonly NullableInitiativeFilterEncoded[] | null | undefined
3895 + readonly owner?: NullableUserFilterEncoded | null | undefined
3896 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
3897 + readonly projects?: ProjectCollectionFilterEncoded | null | undefined
3898 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
3899 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
3900 + readonly status?: typeof StringComparator.Encoded | null | undefined
3901 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
3902 + readonly teams?: TeamCollectionFilterEncoded | null | undefined
3903 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3904 +}
3905 +
3906 +/** Nullable initiative update filtering options. */
3907 +export const NullableInitiativeUpdateFilter: Schema.Codec<NullableInitiativeUpdateFilter, NullableInitiativeUpdateFilterEncoded> = Schema.Struct({
3908 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableInitiativeUpdateFilter)))),
3909 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3910 + id: Schema.optional(Schema.NullOr(IDComparator)),
3911 + initiative: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeFilter))),
3912 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3913 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableInitiativeUpdateFilter)))),
3914 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
3915 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
3916 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
3917 +})
3918 +export interface NullableInitiativeUpdateFilter {
3919 + /** Compound filters, all of which need to be matched by the initiative update. */
3920 + readonly and?: readonly NullableInitiativeUpdateFilter[] | null | undefined
3921 + /** Comparator for the created at date. */
3922 + readonly createdAt?: DateComparator | null | undefined
3923 + /** Comparator for the identifier. */
3924 + readonly id?: IDComparator | null | undefined
3925 + /** Filters that the initiative update initiative must satisfy. */
3926 + readonly initiative?: InitiativeFilter | null | undefined
3927 + /** Filter based on the existence of the relation. */
3928 + readonly null?: boolean | null | undefined
3929 + /** Compound filters, one of which need to be matched by the initiative update. */
3930 + readonly or?: readonly NullableInitiativeUpdateFilter[] | null | undefined
3931 + /** Filters that the initiative updates reactions must satisfy. */
3932 + readonly reactions?: ReactionCollectionFilter | null | undefined
3933 + /** Comparator for the updated at date. */
3934 + readonly updatedAt?: DateComparator | null | undefined
3935 + /** Filters that the initiative update creator must satisfy. */
3936 + readonly user?: UserFilter | null | undefined
3937 +}
3938 +export interface NullableInitiativeUpdateFilterEncoded {
3939 + readonly and?: readonly NullableInitiativeUpdateFilterEncoded[] | null | undefined
3940 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
3941 + readonly id?: typeof IDComparator.Encoded | null | undefined
3942 + readonly initiative?: InitiativeFilterEncoded | null | undefined
3943 + readonly null?: boolean | null | undefined
3944 + readonly or?: readonly NullableInitiativeUpdateFilterEncoded[] | null | undefined
3945 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
3946 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
3947 + readonly user?: UserFilterEncoded | null | undefined
3948 +}
3949 +
3950 +/** Issue filtering options. */
3951 +export const NullableIssueFilter: Schema.Codec<NullableIssueFilter, NullableIssueFilterEncoded> = Schema.Struct({
3952 + accumulatedStateUpdatedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3953 + activity: Schema.optional(Schema.NullOr(Schema.suspend(() => ActivityCollectionFilter))),
3954 + addedToCycleAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3955 + addedToCyclePeriod: Schema.optional(Schema.NullOr(CyclePeriodComparator)),
3956 + ageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
3957 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableIssueFilter)))),
3958 + archivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3959 + assignee: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3960 + attachments: Schema.optional(Schema.NullOr(Schema.suspend(() => AttachmentCollectionFilter))),
3961 + autoArchivedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3962 + autoClosedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3963 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3964 + children: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
3965 + comments: Schema.optional(Schema.NullOr(Schema.suspend(() => CommentCollectionFilter))),
3966 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
3967 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
3968 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3969 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
3970 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
3971 + cycle: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableCycleFilter))),
3972 + cycleTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
3973 + delegate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
3974 + description: Schema.optional(Schema.NullOr(NullableStringComparator)),
3975 + dueDate: Schema.optional(Schema.NullOr(NullableTimelessDateComparator)),
3976 + estimate: Schema.optional(Schema.NullOr(EstimateComparator)),
3977 + hasActiveAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3978 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3979 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3980 + hasDismissedAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3981 + hasDuplicateRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3982 + hasErroredAgentSessions: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3983 + hasMergedAgentPullRequests: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3984 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3985 + hasSharedUsers: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3986 + hasSuggestedAssignees: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3987 + hasSuggestedLabels: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3988 + hasSuggestedProjects: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3989 + hasSuggestedRelatedIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3990 + hasSuggestedSimilarIssues: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3991 + hasSuggestedTeams: Schema.optional(Schema.NullOr(RelationExistsComparator)),
3992 + id: Schema.optional(Schema.NullOr(IssueIDComparator)),
3993 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelCollectionFilter))),
3994 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
3995 + leadTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
3996 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
3997 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
3998 + number: Schema.optional(Schema.NullOr(NumberComparator)),
3999 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableIssueFilter)))),
4000 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableIssueFilter))),
4001 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
4002 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
4003 + projectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectMilestoneFilter))),
4004 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
4005 + recurringIssueTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
4006 + releases: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseCollectionFilter))),
4007 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
4008 + sharedWith: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
4009 + slaBreachesAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4010 + slaStatus: Schema.optional(Schema.NullOr(SlaStatusComparator)),
4011 + snoozedBy: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4012 + snoozedUntilAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4013 + sourceMetadata: Schema.optional(Schema.NullOr(SourceMetadataComparator)),
4014 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4015 + state: Schema.optional(Schema.NullOr(Schema.suspend(() => WorkflowStateFilter))),
4016 + subscribers: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
4017 + suggestions: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueSuggestionCollectionFilter))),
4018 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
4019 + title: Schema.optional(Schema.NullOr(StringComparator)),
4020 + triageTime: Schema.optional(Schema.NullOr(NullableDurationComparator)),
4021 + triagedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4022 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4023 +})
4024 +export interface NullableIssueFilter {
4025 + /** [Internal] Comparator for the issue's accumulatedStateUpdatedAt date. */
4026 + readonly accumulatedStateUpdatedAt?: NullableDateComparator | null | undefined
4027 + /** Filters that the issue's activities must satisfy. */
4028 + readonly activity?: ActivityCollectionFilter | null | undefined
4029 + /** Comparator for the issues added to cycle at date. */
4030 + readonly addedToCycleAt?: NullableDateComparator | null | undefined
4031 + /** Comparator for the period when issue was added to a cycle. */
4032 + readonly addedToCyclePeriod?: CyclePeriodComparator | null | undefined
4033 + /** [Internal] Age (created -> now) comparator, defined if the issue is still open. */
4034 + readonly ageTime?: NullableDurationComparator | null | undefined
4035 + /** Compound filters, all of which need to be matched by the issue. */
4036 + readonly and?: readonly NullableIssueFilter[] | null | undefined
4037 + /** Comparator for the issues archived at date. */
4038 + readonly archivedAt?: NullableDateComparator | null | undefined
4039 + /** Filters that the issues assignee must satisfy. */
4040 + readonly assignee?: NullableUserFilter | null | undefined
4041 + /** Filters that the issues attachments must satisfy. */
4042 + readonly attachments?: AttachmentCollectionFilter | null | undefined
4043 + /** Comparator for the issues auto archived at date. */
4044 + readonly autoArchivedAt?: NullableDateComparator | null | undefined
4045 + /** Comparator for the issues auto closed at date. */
4046 + readonly autoClosedAt?: NullableDateComparator | null | undefined
4047 + /** Comparator for the issues canceled at date. */
4048 + readonly canceledAt?: NullableDateComparator | null | undefined
4049 + /** Filters that the child issues must satisfy. */
4050 + readonly children?: IssueCollectionFilter | null | undefined
4051 + /** Filters that the issues comments must satisfy. */
4052 + readonly comments?: CommentCollectionFilter | null | undefined
4053 + /** Comparator for the issues completed at date. */
4054 + readonly completedAt?: NullableDateComparator | null | undefined
4055 + /** Comparator for the created at date. */
4056 + readonly createdAt?: DateComparator | null | undefined
4057 + /** Filters that the issues creator must satisfy. */
4058 + readonly creator?: NullableUserFilter | null | undefined
4059 + /** Count of customers */
4060 + readonly customerCount?: NumberComparator | null | undefined
4061 + /** Count of important customers */
4062 + readonly customerImportantCount?: NumberComparator | null | undefined
4063 + /** Filters that the issues cycle must satisfy. */
4064 + readonly cycle?: NullableCycleFilter | null | undefined
4065 + /** [Internal] Cycle time (started -> completed) comparator. */
4066 + readonly cycleTime?: NullableDurationComparator | null | undefined
4067 + /** Filters that the issue's delegated agent must satisfy. */
4068 + readonly delegate?: NullableUserFilter | null | undefined
4069 + /** Comparator for the issues description. */
4070 + readonly description?: NullableStringComparator | null | undefined
4071 + /** Comparator for the issues due date. */
4072 + readonly dueDate?: NullableTimelessDateComparator | null | undefined
4073 + /** Comparator for the issues estimate. */
4074 + readonly estimate?: EstimateComparator | null | undefined
4075 + /** [Internal] Comparator for filtering issues bucketed as having active agent sessions, no closed agent pull requests, and no merged agent pull requests. */
4076 + readonly hasActiveAgentSessions?: RelationExistsComparator | null | undefined
4077 + /** Comparator for filtering issues which are blocked. */
4078 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
4079 + /** Comparator for filtering issues which are blocking. */
4080 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
4081 + /** [Internal] Comparator for filtering issues bucketed as having all agent sessions dismissed or closed, and no merged agent pull requests. */
4082 + readonly hasDismissedAgentSessions?: RelationExistsComparator | null | undefined
4083 + /** Comparator for filtering issues which are duplicates. */
4084 + readonly hasDuplicateRelations?: RelationExistsComparator | null | undefined
4085 + /** [Internal] Comparator for filtering issues bucketed as having an errored agent session, no active sessions, and no merged agent pull requests. */
4086 + readonly hasErroredAgentSessions?: RelationExistsComparator | null | undefined
4087 + /** [Internal] Comparator for filtering issues which have agent-session-linked pull requests that were merged. */
4088 + readonly hasMergedAgentPullRequests?: RelationExistsComparator | null | undefined
4089 + /** Comparator for filtering issues with relations. */
4090 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
4091 + /** Comparator for filtering issues which have been shared with users outside of the team. */
4092 + readonly hasSharedUsers?: RelationExistsComparator | null | undefined
4093 + /** [Internal] Comparator for filtering issues which have suggested assignees. */
4094 + readonly hasSuggestedAssignees?: RelationExistsComparator | null | undefined
4095 + /** [Internal] Comparator for filtering issues which have suggested labels. */
4096 + readonly hasSuggestedLabels?: RelationExistsComparator | null | undefined
4097 + /** [Internal] Comparator for filtering issues which have suggested projects. */
4098 + readonly hasSuggestedProjects?: RelationExistsComparator | null | undefined
4099 + /** [Internal] Comparator for filtering issues which have suggested related issues. */
4100 + readonly hasSuggestedRelatedIssues?: RelationExistsComparator | null | undefined
4101 + /** [Internal] Comparator for filtering issues which have suggested similar issues. */
4102 + readonly hasSuggestedSimilarIssues?: RelationExistsComparator | null | undefined
4103 + /** [Internal] Comparator for filtering issues which have suggested teams. */
4104 + readonly hasSuggestedTeams?: RelationExistsComparator | null | undefined
4105 + /** Comparator for the identifier. */
4106 + readonly id?: IssueIDComparator | null | undefined
4107 + /** Filters that issue labels must satisfy. */
4108 + readonly labels?: IssueLabelCollectionFilter | null | undefined
4109 + /** Filters that the last applied template must satisfy. */
4110 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
4111 + /** [Internal] Lead time (created -> completed) comparator. */
4112 + readonly leadTime?: NullableDurationComparator | null | undefined
4113 + /** Filters that the issue's customer needs must satisfy. */
4114 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
4115 + /** Filter based on the existence of the relation. */
4116 + readonly null?: boolean | null | undefined
4117 + /** Comparator for the issues number. */
4118 + readonly number?: NumberComparator | null | undefined
4119 + /** Compound filters, one of which need to be matched by the issue. */
4120 + readonly or?: readonly NullableIssueFilter[] | null | undefined
4121 + /** Filters that the issue parent must satisfy. */
4122 + readonly parent?: NullableIssueFilter | null | undefined
4123 + /** Comparator for the issues priority. 0 = No priority, 1 = Urgent, 2 = High, 3 = Medium, 4 = Low. */
4124 + readonly priority?: NullableNumberComparator | null | undefined
4125 + /** Filters that the issues project must satisfy. */
4126 + readonly project?: NullableProjectFilter | null | undefined
4127 + /** Filters that the issues project milestone must satisfy. */
4128 + readonly projectMilestone?: NullableProjectMilestoneFilter | null | undefined
4129 + /** Filters that the issues reactions must satisfy. */
4130 + readonly reactions?: ReactionCollectionFilter | null | undefined
4131 + /** [ALPHA] Filters that the recurring issue template must satisfy. */
4132 + readonly recurringIssueTemplate?: NullableTemplateFilter | null | undefined
4133 + /** Filters that the issue's releases must satisfy. */
4134 + readonly releases?: ReleaseCollectionFilter | null | undefined
4135 + /** [Internal] Comparator for the issues content. */
4136 + readonly searchableContent?: ContentComparator | null | undefined
4137 + /** Filters that users the issue has been shared with must satisfy. */
4138 + readonly sharedWith?: UserCollectionFilter | null | undefined
4139 + /** Comparator for the issue's SLA breach date. */
4140 + readonly slaBreachesAt?: NullableDateComparator | null | undefined
4141 + /** Comparator for the issues sla status. */
4142 + readonly slaStatus?: SlaStatusComparator | null | undefined
4143 + /** Filters that the issues snoozer must satisfy. */
4144 + readonly snoozedBy?: NullableUserFilter | null | undefined
4145 + /** Comparator for the issues snoozed until date. */
4146 + readonly snoozedUntilAt?: NullableDateComparator | null | undefined
4147 + /** Filters that the source must satisfy. */
4148 + readonly sourceMetadata?: SourceMetadataComparator | null | undefined
4149 + /** Comparator for the issues started at date. */
4150 + readonly startedAt?: NullableDateComparator | null | undefined
4151 + /** Filters that the issues state must satisfy. */
4152 + readonly state?: WorkflowStateFilter | null | undefined
4153 + /** Filters that issue subscribers must satisfy. */
4154 + readonly subscribers?: UserCollectionFilter | null | undefined
4155 + /** [Internal] Filters that the issue's suggestions must satisfy. */
4156 + readonly suggestions?: IssueSuggestionCollectionFilter | null | undefined
4157 + /** Filters that the issues team must satisfy. */
4158 + readonly team?: TeamFilter | null | undefined
4159 + /** Comparator for the issues title. */
4160 + readonly title?: StringComparator | null | undefined
4161 + /** [Internal] Triage time (entered triaged -> triaged) comparator. */
4162 + readonly triageTime?: NullableDurationComparator | null | undefined
4163 + /** Comparator for the issues triaged at date. */
4164 + readonly triagedAt?: NullableDateComparator | null | undefined
4165 + /** Comparator for the updated at date. */
4166 + readonly updatedAt?: DateComparator | null | undefined
4167 +}
4168 +export interface NullableIssueFilterEncoded {
4169 + readonly accumulatedStateUpdatedAt?: typeof NullableDateComparator.Encoded | null | undefined
4170 + readonly activity?: ActivityCollectionFilterEncoded | null | undefined
4171 + readonly addedToCycleAt?: typeof NullableDateComparator.Encoded | null | undefined
4172 + readonly addedToCyclePeriod?: typeof CyclePeriodComparator.Encoded | null | undefined
4173 + readonly ageTime?: typeof NullableDurationComparator.Encoded | null | undefined
4174 + readonly and?: readonly NullableIssueFilterEncoded[] | null | undefined
4175 + readonly archivedAt?: typeof NullableDateComparator.Encoded | null | undefined
4176 + readonly assignee?: NullableUserFilterEncoded | null | undefined
4177 + readonly attachments?: AttachmentCollectionFilterEncoded | null | undefined
4178 + readonly autoArchivedAt?: typeof NullableDateComparator.Encoded | null | undefined
4179 + readonly autoClosedAt?: typeof NullableDateComparator.Encoded | null | undefined
4180 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
4181 + readonly children?: IssueCollectionFilterEncoded | null | undefined
4182 + readonly comments?: CommentCollectionFilterEncoded | null | undefined
4183 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
4184 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4185 + readonly creator?: NullableUserFilterEncoded | null | undefined
4186 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
4187 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
4188 + readonly cycle?: NullableCycleFilterEncoded | null | undefined
4189 + readonly cycleTime?: typeof NullableDurationComparator.Encoded | null | undefined
4190 + readonly delegate?: NullableUserFilterEncoded | null | undefined
4191 + readonly description?: typeof NullableStringComparator.Encoded | null | undefined
4192 + readonly dueDate?: typeof NullableTimelessDateComparator.Encoded | null | undefined
4193 + readonly estimate?: typeof EstimateComparator.Encoded | null | undefined
4194 + readonly hasActiveAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
4195 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4196 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4197 + readonly hasDismissedAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
4198 + readonly hasDuplicateRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4199 + readonly hasErroredAgentSessions?: typeof RelationExistsComparator.Encoded | null | undefined
4200 + readonly hasMergedAgentPullRequests?: typeof RelationExistsComparator.Encoded | null | undefined
4201 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4202 + readonly hasSharedUsers?: typeof RelationExistsComparator.Encoded | null | undefined
4203 + readonly hasSuggestedAssignees?: typeof RelationExistsComparator.Encoded | null | undefined
4204 + readonly hasSuggestedLabels?: typeof RelationExistsComparator.Encoded | null | undefined
4205 + readonly hasSuggestedProjects?: typeof RelationExistsComparator.Encoded | null | undefined
4206 + readonly hasSuggestedRelatedIssues?: typeof RelationExistsComparator.Encoded | null | undefined
4207 + readonly hasSuggestedSimilarIssues?: typeof RelationExistsComparator.Encoded | null | undefined
4208 + readonly hasSuggestedTeams?: typeof RelationExistsComparator.Encoded | null | undefined
4209 + readonly id?: typeof IssueIDComparator.Encoded | null | undefined
4210 + readonly labels?: IssueLabelCollectionFilterEncoded | null | undefined
4211 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
4212 + readonly leadTime?: typeof NullableDurationComparator.Encoded | null | undefined
4213 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
4214 + readonly null?: boolean | null | undefined
4215 + readonly number?: typeof NumberComparator.Encoded | null | undefined
4216 + readonly or?: readonly NullableIssueFilterEncoded[] | null | undefined
4217 + readonly parent?: NullableIssueFilterEncoded | null | undefined
4218 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
4219 + readonly project?: NullableProjectFilterEncoded | null | undefined
4220 + readonly projectMilestone?: NullableProjectMilestoneFilterEncoded | null | undefined
4221 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
4222 + readonly recurringIssueTemplate?: NullableTemplateFilterEncoded | null | undefined
4223 + readonly releases?: ReleaseCollectionFilterEncoded | null | undefined
4224 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
4225 + readonly sharedWith?: UserCollectionFilterEncoded | null | undefined
4226 + readonly slaBreachesAt?: typeof NullableDateComparator.Encoded | null | undefined
4227 + readonly slaStatus?: typeof SlaStatusComparator.Encoded | null | undefined
4228 + readonly snoozedBy?: NullableUserFilterEncoded | null | undefined
4229 + readonly snoozedUntilAt?: typeof NullableDateComparator.Encoded | null | undefined
4230 + readonly sourceMetadata?: typeof SourceMetadataComparator.Encoded | null | undefined
4231 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
4232 + readonly state?: WorkflowStateFilterEncoded | null | undefined
4233 + readonly subscribers?: UserCollectionFilterEncoded | null | undefined
4234 + readonly suggestions?: IssueSuggestionCollectionFilterEncoded | null | undefined
4235 + readonly team?: TeamFilterEncoded | null | undefined
4236 + readonly title?: typeof StringComparator.Encoded | null | undefined
4237 + readonly triageTime?: typeof NullableDurationComparator.Encoded | null | undefined
4238 + readonly triagedAt?: typeof NullableDateComparator.Encoded | null | undefined
4239 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4240 +}
4241 +
4242 +/** Cycle filtering options. */
4243 +export const NullableCycleFilter: Schema.Codec<NullableCycleFilter, NullableCycleFilterEncoded> = Schema.Struct({
4244 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableCycleFilter)))),
4245 + completedAt: Schema.optional(Schema.NullOr(DateComparator)),
4246 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4247 + endsAt: Schema.optional(Schema.NullOr(DateComparator)),
4248 + id: Schema.optional(Schema.NullOr(IDComparator)),
4249 + inheritedFromId: Schema.optional(Schema.NullOr(IDComparator)),
4250 + isActive: Schema.optional(Schema.NullOr(BooleanComparator)),
4251 + isFuture: Schema.optional(Schema.NullOr(BooleanComparator)),
4252 + isInCooldown: Schema.optional(Schema.NullOr(BooleanComparator)),
4253 + isNext: Schema.optional(Schema.NullOr(BooleanComparator)),
4254 + isPast: Schema.optional(Schema.NullOr(BooleanComparator)),
4255 + isPrevious: Schema.optional(Schema.NullOr(BooleanComparator)),
4256 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
4257 + name: Schema.optional(Schema.NullOr(StringComparator)),
4258 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
4259 + number: Schema.optional(Schema.NullOr(NumberComparator)),
4260 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableCycleFilter)))),
4261 + startsAt: Schema.optional(Schema.NullOr(DateComparator)),
4262 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
4263 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4264 +})
4265 +export interface NullableCycleFilter {
4266 + /** Compound filters, all of which need to be matched by the cycle. */
4267 + readonly and?: readonly NullableCycleFilter[] | null | undefined
4268 + /** Comparator for the cycle completed at date. */
4269 + readonly completedAt?: DateComparator | null | undefined
4270 + /** Comparator for the created at date. */
4271 + readonly createdAt?: DateComparator | null | undefined
4272 + /** Comparator for the cycle ends at date. */
4273 + readonly endsAt?: DateComparator | null | undefined
4274 + /** Comparator for the identifier. */
4275 + readonly id?: IDComparator | null | undefined
4276 + /** Comparator for the inherited cycle ID. */
4277 + readonly inheritedFromId?: IDComparator | null | undefined
4278 + /** Comparator for the filtering active cycle. */
4279 + readonly isActive?: BooleanComparator | null | undefined
4280 + /** Comparator for the filtering future cycles. */
4281 + readonly isFuture?: BooleanComparator | null | undefined
4282 + /** Comparator for filtering for whether the cycle is currently in cooldown. */
4283 + readonly isInCooldown?: BooleanComparator | null | undefined
4284 + /** Comparator for the filtering next cycle. */
4285 + readonly isNext?: BooleanComparator | null | undefined
4286 + /** Comparator for the filtering past cycles. */
4287 + readonly isPast?: BooleanComparator | null | undefined
4288 + /** Comparator for the filtering previous cycle. */
4289 + readonly isPrevious?: BooleanComparator | null | undefined
4290 + /** Filters that the cycles issues must satisfy. */
4291 + readonly issues?: IssueCollectionFilter | null | undefined
4292 + /** Comparator for the cycle name. */
4293 + readonly name?: StringComparator | null | undefined
4294 + /** Filter based on the existence of the relation. */
4295 + readonly null?: boolean | null | undefined
4296 + /** Comparator for the cycle number. */
4297 + readonly number?: NumberComparator | null | undefined
4298 + /** Compound filters, one of which need to be matched by the cycle. */
4299 + readonly or?: readonly NullableCycleFilter[] | null | undefined
4300 + /** Comparator for the cycle start date. */
4301 + readonly startsAt?: DateComparator | null | undefined
4302 + /** Filters that the cycles team must satisfy. */
4303 + readonly team?: TeamFilter | null | undefined
4304 + /** Comparator for the updated at date. */
4305 + readonly updatedAt?: DateComparator | null | undefined
4306 +}
4307 +export interface NullableCycleFilterEncoded {
4308 + readonly and?: readonly NullableCycleFilterEncoded[] | null | undefined
4309 + readonly completedAt?: typeof DateComparator.Encoded | null | undefined
4310 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4311 + readonly endsAt?: typeof DateComparator.Encoded | null | undefined
4312 + readonly id?: typeof IDComparator.Encoded | null | undefined
4313 + readonly inheritedFromId?: typeof IDComparator.Encoded | null | undefined
4314 + readonly isActive?: typeof BooleanComparator.Encoded | null | undefined
4315 + readonly isFuture?: typeof BooleanComparator.Encoded | null | undefined
4316 + readonly isInCooldown?: typeof BooleanComparator.Encoded | null | undefined
4317 + readonly isNext?: typeof BooleanComparator.Encoded | null | undefined
4318 + readonly isPast?: typeof BooleanComparator.Encoded | null | undefined
4319 + readonly isPrevious?: typeof BooleanComparator.Encoded | null | undefined
4320 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
4321 + readonly name?: typeof StringComparator.Encoded | null | undefined
4322 + readonly null?: boolean | null | undefined
4323 + readonly number?: typeof NumberComparator.Encoded | null | undefined
4324 + readonly or?: readonly NullableCycleFilterEncoded[] | null | undefined
4325 + readonly startsAt?: typeof DateComparator.Encoded | null | undefined
4326 + readonly team?: TeamFilterEncoded | null | undefined
4327 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4328 +}
4329 +
4330 +/** Issue label filtering options. */
4331 +export const IssueLabelCollectionFilter: Schema.Codec<IssueLabelCollectionFilter, IssueLabelCollectionFilterEncoded> = Schema.Struct({
4332 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueLabelCollectionFilter)))),
4333 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4334 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4335 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4336 + id: Schema.optional(Schema.NullOr(IDComparator)),
4337 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
4338 + length: Schema.optional(Schema.NullOr(NumberComparator)),
4339 + name: Schema.optional(Schema.NullOr(StringComparator)),
4340 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
4341 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueLabelCollectionFilter)))),
4342 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4343 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4344 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
4345 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4346 +})
4347 +export interface IssueLabelCollectionFilter {
4348 + /** Compound filters, all of which need to be matched by the label. */
4349 + readonly and?: readonly IssueLabelCollectionFilter[] | null | undefined
4350 + /** Comparator for the created at date. */
4351 + readonly createdAt?: DateComparator | null | undefined
4352 + /** Filters that the issue labels creator must satisfy. */
4353 + readonly creator?: NullableUserFilter | null | undefined
4354 + /** Filters that needs to be matched by all issue labels. */
4355 + readonly every?: IssueLabelFilter | null | undefined
4356 + /** Comparator for the identifier. */
4357 + readonly id?: IDComparator | null | undefined
4358 + /** Comparator for whether the label is a group label. */
4359 + readonly isGroup?: BooleanComparator | null | undefined
4360 + /** Comparator for the collection length. */
4361 + readonly length?: NumberComparator | null | undefined
4362 + /** Comparator for the name. */
4363 + readonly name?: StringComparator | null | undefined
4364 + /** Filter based on the existence of the relation. */
4365 + readonly null?: boolean | null | undefined
4366 + /** Compound filters, one of which need to be matched by the label. */
4367 + readonly or?: readonly IssueLabelCollectionFilter[] | null | undefined
4368 + /** Filters that the issue label's parent label must satisfy. */
4369 + readonly parent?: IssueLabelFilter | null | undefined
4370 + /** Filters that needs to be matched by some issue labels. */
4371 + readonly some?: IssueLabelFilter | null | undefined
4372 + /** Filters that the issue labels team must satisfy. */
4373 + readonly team?: NullableTeamFilter | null | undefined
4374 + /** Comparator for the updated at date. */
4375 + readonly updatedAt?: DateComparator | null | undefined
4376 +}
4377 +export interface IssueLabelCollectionFilterEncoded {
4378 + readonly and?: readonly IssueLabelCollectionFilterEncoded[] | null | undefined
4379 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4380 + readonly creator?: NullableUserFilterEncoded | null | undefined
4381 + readonly every?: IssueLabelFilterEncoded | null | undefined
4382 + readonly id?: typeof IDComparator.Encoded | null | undefined
4383 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
4384 + readonly length?: typeof NumberComparator.Encoded | null | undefined
4385 + readonly name?: typeof StringComparator.Encoded | null | undefined
4386 + readonly null?: boolean | null | undefined
4387 + readonly or?: readonly IssueLabelCollectionFilterEncoded[] | null | undefined
4388 + readonly parent?: IssueLabelFilterEncoded | null | undefined
4389 + readonly some?: IssueLabelFilterEncoded | null | undefined
4390 + readonly team?: NullableTeamFilterEncoded | null | undefined
4391 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4392 +}
4393 +
4394 +/** Issue label filtering options. */
4395 +export const IssueLabelFilter: Schema.Codec<IssueLabelFilter, IssueLabelFilterEncoded> = Schema.Struct({
4396 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueLabelFilter)))),
4397 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4398 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4399 + id: Schema.optional(Schema.NullOr(IDComparator)),
4400 + isGroup: Schema.optional(Schema.NullOr(BooleanComparator)),
4401 + name: Schema.optional(Schema.NullOr(StringComparator)),
4402 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueLabelFilter)))),
4403 + parent: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4404 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
4405 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4406 +})
4407 +export interface IssueLabelFilter {
4408 + /** Compound filters, all of which need to be matched by the label. */
4409 + readonly and?: readonly IssueLabelFilter[] | null | undefined
4410 + /** Comparator for the created at date. */
4411 + readonly createdAt?: DateComparator | null | undefined
4412 + /** Filters that the issue labels creator must satisfy. */
4413 + readonly creator?: NullableUserFilter | null | undefined
4414 + /** Comparator for the identifier. */
4415 + readonly id?: IDComparator | null | undefined
4416 + /** Comparator for whether the label is a group label. */
4417 + readonly isGroup?: BooleanComparator | null | undefined
4418 + /** Comparator for the name. */
4419 + readonly name?: StringComparator | null | undefined
4420 + /** Compound filters, one of which need to be matched by the label. */
4421 + readonly or?: readonly IssueLabelFilter[] | null | undefined
4422 + /** Filters that the issue label's parent label must satisfy. */
4423 + readonly parent?: IssueLabelFilter | null | undefined
4424 + /** Filters that the issue labels team must satisfy. */
4425 + readonly team?: NullableTeamFilter | null | undefined
4426 + /** Comparator for the updated at date. */
4427 + readonly updatedAt?: DateComparator | null | undefined
4428 +}
4429 +export interface IssueLabelFilterEncoded {
4430 + readonly and?: readonly IssueLabelFilterEncoded[] | null | undefined
4431 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4432 + readonly creator?: NullableUserFilterEncoded | null | undefined
4433 + readonly id?: typeof IDComparator.Encoded | null | undefined
4434 + readonly isGroup?: typeof BooleanComparator.Encoded | null | undefined
4435 + readonly name?: typeof StringComparator.Encoded | null | undefined
4436 + readonly or?: readonly IssueLabelFilterEncoded[] | null | undefined
4437 + readonly parent?: IssueLabelFilterEncoded | null | undefined
4438 + readonly team?: NullableTeamFilterEncoded | null | undefined
4439 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4440 +}
4441 +
4442 +/** Project milestone filtering options. */
4443 +export const NullableProjectMilestoneFilter: Schema.Codec<NullableProjectMilestoneFilter, NullableProjectMilestoneFilterEncoded> = Schema.Struct({
4444 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectMilestoneFilter)))),
4445 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4446 + id: Schema.optional(Schema.NullOr(IDComparator)),
4447 + name: Schema.optional(Schema.NullOr(NullableStringComparator)),
4448 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
4449 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectMilestoneFilter)))),
4450 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
4451 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
4452 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4453 +})
4454 +export interface NullableProjectMilestoneFilter {
4455 + /** Compound filters, all of which need to be matched by the project milestone. */
4456 + readonly and?: readonly NullableProjectMilestoneFilter[] | null | undefined
4457 + /** Comparator for the created at date. */
4458 + readonly createdAt?: DateComparator | null | undefined
4459 + /** Comparator for the identifier. */
4460 + readonly id?: IDComparator | null | undefined
4461 + /** Comparator for the project milestone name. */
4462 + readonly name?: NullableStringComparator | null | undefined
4463 + /** Filter based on the existence of the relation. */
4464 + readonly null?: boolean | null | undefined
4465 + /** Compound filters, one of which need to be matched by the project milestone. */
4466 + readonly or?: readonly NullableProjectMilestoneFilter[] | null | undefined
4467 + /** Filters that the project milestone's project must satisfy. */
4468 + readonly project?: NullableProjectFilter | null | undefined
4469 + /** Comparator for the project milestone target date. */
4470 + readonly targetDate?: NullableDateComparator | null | undefined
4471 + /** Comparator for the updated at date. */
4472 + readonly updatedAt?: DateComparator | null | undefined
4473 +}
4474 +export interface NullableProjectMilestoneFilterEncoded {
4475 + readonly and?: readonly NullableProjectMilestoneFilterEncoded[] | null | undefined
4476 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4477 + readonly id?: typeof IDComparator.Encoded | null | undefined
4478 + readonly name?: typeof NullableStringComparator.Encoded | null | undefined
4479 + readonly null?: boolean | null | undefined
4480 + readonly or?: readonly NullableProjectMilestoneFilterEncoded[] | null | undefined
4481 + readonly project?: NullableProjectFilterEncoded | null | undefined
4482 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
4483 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4484 +}
4485 +
4486 +/** Release collection filtering options. */
4487 +export const ReleaseCollectionFilter: Schema.Codec<ReleaseCollectionFilter, ReleaseCollectionFilterEncoded> = Schema.Struct({
4488 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseCollectionFilter)))),
4489 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4490 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4491 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseFilter))),
4492 + hasReleaseNotes: Schema.optional(Schema.NullOr(BooleanComparator)),
4493 + id: Schema.optional(Schema.NullOr(IDComparator)),
4494 + length: Schema.optional(Schema.NullOr(NumberComparator)),
4495 + name: Schema.optional(Schema.NullOr(StringComparator)),
4496 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseCollectionFilter)))),
4497 + pipeline: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineFilter))),
4498 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleaseFilter))),
4499 + stage: Schema.optional(Schema.NullOr(ReleaseStageFilter)),
4500 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
4501 + version: Schema.optional(Schema.NullOr(StringComparator))
4502 +})
4503 +export interface ReleaseCollectionFilter {
4504 + /** Compound filters, all of which need to be matched by the release. */
4505 + readonly and?: readonly ReleaseCollectionFilter[] | null | undefined
4506 + /** Comparator for the release completion date. */
4507 + readonly completedAt?: NullableDateComparator | null | undefined
4508 + /** Comparator for the created at date. */
4509 + readonly createdAt?: DateComparator | null | undefined
4510 + /** Filters that needs to be matched by all releases. */
4511 + readonly every?: ReleaseFilter | null | undefined
4512 + /** Comparator for whether the release is covered by any (non-archived) release note. Filter with `{ eq: false }` to retrieve releases that do not yet have release notes attached. */
4513 + readonly hasReleaseNotes?: BooleanComparator | null | undefined
4514 + /** Comparator for the identifier. */
4515 + readonly id?: IDComparator | null | undefined
4516 + /** Comparator for the collection length. */
4517 + readonly length?: NumberComparator | null | undefined
4518 + /** Comparator for the release name. */
4519 + readonly name?: StringComparator | null | undefined
4520 + /** Compound filters, one of which need to be matched by the release. */
4521 + readonly or?: readonly ReleaseCollectionFilter[] | null | undefined
4522 + /** Filters that the release's pipeline must satisfy. */
4523 + readonly pipeline?: ReleasePipelineFilter | null | undefined
4524 + /** Filters that needs to be matched by some releases. */
4525 + readonly some?: ReleaseFilter | null | undefined
4526 + /** Filters that the release's stage must satisfy. */
4527 + readonly stage?: ReleaseStageFilter | null | undefined
4528 + /** Comparator for the updated at date. */
4529 + readonly updatedAt?: DateComparator | null | undefined
4530 + /** Comparator for the release version. */
4531 + readonly version?: StringComparator | null | undefined
4532 +}
4533 +export interface ReleaseCollectionFilterEncoded {
4534 + readonly and?: readonly ReleaseCollectionFilterEncoded[] | null | undefined
4535 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
4536 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4537 + readonly every?: ReleaseFilterEncoded | null | undefined
4538 + readonly hasReleaseNotes?: typeof BooleanComparator.Encoded | null | undefined
4539 + readonly id?: typeof IDComparator.Encoded | null | undefined
4540 + readonly length?: typeof NumberComparator.Encoded | null | undefined
4541 + readonly name?: typeof StringComparator.Encoded | null | undefined
4542 + readonly or?: readonly ReleaseCollectionFilterEncoded[] | null | undefined
4543 + readonly pipeline?: ReleasePipelineFilterEncoded | null | undefined
4544 + readonly some?: ReleaseFilterEncoded | null | undefined
4545 + readonly stage?: ReleaseStageFilterEncoded | null | undefined
4546 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4547 + readonly version?: typeof StringComparator.Encoded | null | undefined
4548 +}
4549 +
4550 +/** Release filtering options. */
4551 +export const ReleaseFilter: Schema.Codec<ReleaseFilter, ReleaseFilterEncoded> = Schema.Struct({
4552 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseFilter)))),
4553 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4554 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4555 + hasReleaseNotes: Schema.optional(Schema.NullOr(BooleanComparator)),
4556 + id: Schema.optional(Schema.NullOr(IDComparator)),
4557 + name: Schema.optional(Schema.NullOr(StringComparator)),
4558 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ReleaseFilter)))),
4559 + pipeline: Schema.optional(Schema.NullOr(Schema.suspend(() => ReleasePipelineFilter))),
4560 + stage: Schema.optional(Schema.NullOr(ReleaseStageFilter)),
4561 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
4562 + version: Schema.optional(Schema.NullOr(StringComparator))
4563 +})
4564 +export interface ReleaseFilter {
4565 + /** Compound filters, all of which need to be matched by the release. */
4566 + readonly and?: readonly ReleaseFilter[] | null | undefined
4567 + /** Comparator for the release completion date. */
4568 + readonly completedAt?: NullableDateComparator | null | undefined
4569 + /** Comparator for the created at date. */
4570 + readonly createdAt?: DateComparator | null | undefined
4571 + /** Comparator for whether the release is covered by any (non-archived) release note. Filter with `{ eq: false }` to retrieve releases that do not yet have release notes attached. */
4572 + readonly hasReleaseNotes?: BooleanComparator | null | undefined
4573 + /** Comparator for the identifier. */
4574 + readonly id?: IDComparator | null | undefined
4575 + /** Comparator for the release name. */
4576 + readonly name?: StringComparator | null | undefined
4577 + /** Compound filters, one of which need to be matched by the release. */
4578 + readonly or?: readonly ReleaseFilter[] | null | undefined
4579 + /** Filters that the release's pipeline must satisfy. */
4580 + readonly pipeline?: ReleasePipelineFilter | null | undefined
4581 + /** Filters that the release's stage must satisfy. */
4582 + readonly stage?: ReleaseStageFilter | null | undefined
4583 + /** Comparator for the updated at date. */
4584 + readonly updatedAt?: DateComparator | null | undefined
4585 + /** Comparator for the release version. */
4586 + readonly version?: StringComparator | null | undefined
4587 +}
4588 +export interface ReleaseFilterEncoded {
4589 + readonly and?: readonly ReleaseFilterEncoded[] | null | undefined
4590 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
4591 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4592 + readonly hasReleaseNotes?: typeof BooleanComparator.Encoded | null | undefined
4593 + readonly id?: typeof IDComparator.Encoded | null | undefined
4594 + readonly name?: typeof StringComparator.Encoded | null | undefined
4595 + readonly or?: readonly ReleaseFilterEncoded[] | null | undefined
4596 + readonly pipeline?: ReleasePipelineFilterEncoded | null | undefined
4597 + readonly stage?: ReleaseStageFilterEncoded | null | undefined
4598 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4599 + readonly version?: typeof StringComparator.Encoded | null | undefined
4600 +}
4601 +
4602 +/** Workflow state filtering options. */
4603 +export const WorkflowStateFilter: Schema.Codec<WorkflowStateFilter, WorkflowStateFilterEncoded> = Schema.Struct({
4604 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => WorkflowStateFilter)))),
4605 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4606 + description: Schema.optional(Schema.NullOr(StringComparator)),
4607 + id: Schema.optional(Schema.NullOr(IDComparator)),
4608 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
4609 + name: Schema.optional(Schema.NullOr(StringComparator)),
4610 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => WorkflowStateFilter)))),
4611 + position: Schema.optional(Schema.NullOr(NumberComparator)),
4612 + team: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamFilter))),
4613 + type: Schema.optional(Schema.NullOr(StringComparator)),
4614 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4615 +})
4616 +export interface WorkflowStateFilter {
4617 + /** Compound filters, all of which need to be matched by the workflow state. */
4618 + readonly and?: readonly WorkflowStateFilter[] | null | undefined
4619 + /** Comparator for the created at date. */
4620 + readonly createdAt?: DateComparator | null | undefined
4621 + /** Comparator for the workflow state description. */
4622 + readonly description?: StringComparator | null | undefined
4623 + /** Comparator for the identifier. */
4624 + readonly id?: IDComparator | null | undefined
4625 + /** Filters that the workflow states issues must satisfy. */
4626 + readonly issues?: IssueCollectionFilter | null | undefined
4627 + /** Comparator for the workflow state name. */
4628 + readonly name?: StringComparator | null | undefined
4629 + /** Compound filters, one of which need to be matched by the workflow state. */
4630 + readonly or?: readonly WorkflowStateFilter[] | null | undefined
4631 + /** Comparator for the workflow state position. */
4632 + readonly position?: NumberComparator | null | undefined
4633 + /** Filters that the workflow states team must satisfy. */
4634 + readonly team?: TeamFilter | null | undefined
4635 + /** Comparator for the workflow state type. Possible values are "triage", "backlog", "unstarted", "started", "completed", "canceled", "duplicate". */
4636 + readonly type?: StringComparator | null | undefined
4637 + /** Comparator for the updated at date. */
4638 + readonly updatedAt?: DateComparator | null | undefined
4639 +}
4640 +export interface WorkflowStateFilterEncoded {
4641 + readonly and?: readonly WorkflowStateFilterEncoded[] | null | undefined
4642 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4643 + readonly description?: typeof StringComparator.Encoded | null | undefined
4644 + readonly id?: typeof IDComparator.Encoded | null | undefined
4645 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
4646 + readonly name?: typeof StringComparator.Encoded | null | undefined
4647 + readonly or?: readonly WorkflowStateFilterEncoded[] | null | undefined
4648 + readonly position?: typeof NumberComparator.Encoded | null | undefined
4649 + readonly team?: TeamFilterEncoded | null | undefined
4650 + readonly type?: typeof StringComparator.Encoded | null | undefined
4651 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4652 +}
4653 +
4654 +/** IssueSuggestion collection filtering options. */
4655 +export const IssueSuggestionCollectionFilter: Schema.Codec<IssueSuggestionCollectionFilter, IssueSuggestionCollectionFilterEncoded> = Schema.Struct({
4656 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueSuggestionCollectionFilter)))),
4657 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4658 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueSuggestionFilter))),
4659 + id: Schema.optional(Schema.NullOr(IDComparator)),
4660 + length: Schema.optional(Schema.NullOr(NumberComparator)),
4661 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueSuggestionCollectionFilter)))),
4662 + some: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueSuggestionFilter))),
4663 + state: Schema.optional(Schema.NullOr(StringComparator)),
4664 + suggestedLabel: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4665 + suggestedProject: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
4666 + suggestedTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
4667 + suggestedUser: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4668 + type: Schema.optional(Schema.NullOr(StringComparator)),
4669 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4670 +})
4671 +export interface IssueSuggestionCollectionFilter {
4672 + /** Compound filters, all of which need to be matched by the suggestion. */
4673 + readonly and?: readonly IssueSuggestionCollectionFilter[] | null | undefined
4674 + /** Comparator for the created at date. */
4675 + readonly createdAt?: DateComparator | null | undefined
4676 + /** Filters that needs to be matched by all suggestions. */
4677 + readonly every?: IssueSuggestionFilter | null | undefined
4678 + /** Comparator for the identifier. */
4679 + readonly id?: IDComparator | null | undefined
4680 + /** Comparator for the collection length. */
4681 + readonly length?: NumberComparator | null | undefined
4682 + /** Compound filters, one of which need to be matched by the suggestion. */
4683 + readonly or?: readonly IssueSuggestionCollectionFilter[] | null | undefined
4684 + /** Filters that needs to be matched by some suggestions. */
4685 + readonly some?: IssueSuggestionFilter | null | undefined
4686 + /** Comparator for the suggestion state. */
4687 + readonly state?: StringComparator | null | undefined
4688 + /** Filters that the suggested label must satisfy. */
4689 + readonly suggestedLabel?: IssueLabelFilter | null | undefined
4690 + /** Filters that the suggested project must satisfy. */
4691 + readonly suggestedProject?: NullableProjectFilter | null | undefined
4692 + /** Filters that the suggested team must satisfy. */
4693 + readonly suggestedTeam?: NullableTeamFilter | null | undefined
4694 + /** Filters that the suggested user must satisfy. */
4695 + readonly suggestedUser?: NullableUserFilter | null | undefined
4696 + /** Comparator for the suggestion type. */
4697 + readonly type?: StringComparator | null | undefined
4698 + /** Comparator for the updated at date. */
4699 + readonly updatedAt?: DateComparator | null | undefined
4700 +}
4701 +export interface IssueSuggestionCollectionFilterEncoded {
4702 + readonly and?: readonly IssueSuggestionCollectionFilterEncoded[] | null | undefined
4703 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4704 + readonly every?: IssueSuggestionFilterEncoded | null | undefined
4705 + readonly id?: typeof IDComparator.Encoded | null | undefined
4706 + readonly length?: typeof NumberComparator.Encoded | null | undefined
4707 + readonly or?: readonly IssueSuggestionCollectionFilterEncoded[] | null | undefined
4708 + readonly some?: IssueSuggestionFilterEncoded | null | undefined
4709 + readonly state?: typeof StringComparator.Encoded | null | undefined
4710 + readonly suggestedLabel?: IssueLabelFilterEncoded | null | undefined
4711 + readonly suggestedProject?: NullableProjectFilterEncoded | null | undefined
4712 + readonly suggestedTeam?: NullableTeamFilterEncoded | null | undefined
4713 + readonly suggestedUser?: NullableUserFilterEncoded | null | undefined
4714 + readonly type?: typeof StringComparator.Encoded | null | undefined
4715 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4716 +}
4717 +
4718 +/** IssueSuggestion filtering options. */
4719 +export const IssueSuggestionFilter: Schema.Codec<IssueSuggestionFilter, IssueSuggestionFilterEncoded> = Schema.Struct({
4720 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueSuggestionFilter)))),
4721 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4722 + id: Schema.optional(Schema.NullOr(IDComparator)),
4723 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => IssueSuggestionFilter)))),
4724 + state: Schema.optional(Schema.NullOr(StringComparator)),
4725 + suggestedLabel: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueLabelFilter))),
4726 + suggestedProject: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableProjectFilter))),
4727 + suggestedTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
4728 + suggestedUser: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4729 + type: Schema.optional(Schema.NullOr(StringComparator)),
4730 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4731 +})
4732 +export interface IssueSuggestionFilter {
4733 + /** Compound filters, all of which need to be matched by the suggestion. */
4734 + readonly and?: readonly IssueSuggestionFilter[] | null | undefined
4735 + /** Comparator for the created at date. */
4736 + readonly createdAt?: DateComparator | null | undefined
4737 + /** Comparator for the identifier. */
4738 + readonly id?: IDComparator | null | undefined
4739 + /** Compound filters, one of which need to be matched by the suggestion. */
4740 + readonly or?: readonly IssueSuggestionFilter[] | null | undefined
4741 + /** Comparator for the suggestion state. */
4742 + readonly state?: StringComparator | null | undefined
4743 + /** Filters that the suggested label must satisfy. */
4744 + readonly suggestedLabel?: IssueLabelFilter | null | undefined
4745 + /** Filters that the suggested project must satisfy. */
4746 + readonly suggestedProject?: NullableProjectFilter | null | undefined
4747 + /** Filters that the suggested team must satisfy. */
4748 + readonly suggestedTeam?: NullableTeamFilter | null | undefined
4749 + /** Filters that the suggested user must satisfy. */
4750 + readonly suggestedUser?: NullableUserFilter | null | undefined
4751 + /** Comparator for the suggestion type. */
4752 + readonly type?: StringComparator | null | undefined
4753 + /** Comparator for the updated at date. */
4754 + readonly updatedAt?: DateComparator | null | undefined
4755 +}
4756 +export interface IssueSuggestionFilterEncoded {
4757 + readonly and?: readonly IssueSuggestionFilterEncoded[] | null | undefined
4758 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4759 + readonly id?: typeof IDComparator.Encoded | null | undefined
4760 + readonly or?: readonly IssueSuggestionFilterEncoded[] | null | undefined
4761 + readonly state?: typeof StringComparator.Encoded | null | undefined
4762 + readonly suggestedLabel?: IssueLabelFilterEncoded | null | undefined
4763 + readonly suggestedProject?: NullableProjectFilterEncoded | null | undefined
4764 + readonly suggestedTeam?: NullableTeamFilterEncoded | null | undefined
4765 + readonly suggestedUser?: NullableUserFilterEncoded | null | undefined
4766 + readonly type?: typeof StringComparator.Encoded | null | undefined
4767 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4768 +}
4769 +
4770 +/** Nullable project update filtering options. */
4771 +export const NullableProjectUpdateFilter: Schema.Codec<NullableProjectUpdateFilter, NullableProjectUpdateFilterEncoded> = Schema.Struct({
4772 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectUpdateFilter)))),
4773 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4774 + id: Schema.optional(Schema.NullOr(IDComparator)),
4775 + null: Schema.optional(Schema.NullOr(Schema.Boolean)),
4776 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => NullableProjectUpdateFilter)))),
4777 + project: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectFilter))),
4778 + reactions: Schema.optional(Schema.NullOr(ReactionCollectionFilter)),
4779 + updatedAt: Schema.optional(Schema.NullOr(DateComparator)),
4780 + user: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter)))
4781 +})
4782 +export interface NullableProjectUpdateFilter {
4783 + /** Compound filters, all of which need to be matched by the project update. */
4784 + readonly and?: readonly NullableProjectUpdateFilter[] | null | undefined
4785 + /** Comparator for the created at date. */
4786 + readonly createdAt?: DateComparator | null | undefined
4787 + /** Comparator for the identifier. */
4788 + readonly id?: IDComparator | null | undefined
4789 + /** Filter based on the existence of the relation. */
4790 + readonly null?: boolean | null | undefined
4791 + /** Compound filters, one of which need to be matched by the project update. */
4792 + readonly or?: readonly NullableProjectUpdateFilter[] | null | undefined
4793 + /** Filters that the project update project must satisfy. */
4794 + readonly project?: ProjectFilter | null | undefined
4795 + /** Filters that the project updates reactions must satisfy. */
4796 + readonly reactions?: ReactionCollectionFilter | null | undefined
4797 + /** Comparator for the updated at date. */
4798 + readonly updatedAt?: DateComparator | null | undefined
4799 + /** Filters that the project update creator must satisfy. */
4800 + readonly user?: UserFilter | null | undefined
4801 +}
4802 +export interface NullableProjectUpdateFilterEncoded {
4803 + readonly and?: readonly NullableProjectUpdateFilterEncoded[] | null | undefined
4804 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4805 + readonly id?: typeof IDComparator.Encoded | null | undefined
4806 + readonly null?: boolean | null | undefined
4807 + readonly or?: readonly NullableProjectUpdateFilterEncoded[] | null | undefined
4808 + readonly project?: ProjectFilterEncoded | null | undefined
4809 + readonly reactions?: ReactionCollectionFilterEncoded | null | undefined
4810 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4811 + readonly user?: UserFilterEncoded | null | undefined
4812 +}
4813 +
4814 +/** Project filtering options. */
4815 +export const ProjectFilter: Schema.Codec<ProjectFilter, ProjectFilterEncoded> = Schema.Struct({
4816 + accessibleTeams: Schema.optional(Schema.NullOr(Schema.suspend(() => TeamCollectionFilter))),
4817 + activityType: Schema.optional(Schema.NullOr(StringComparator)),
4818 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectFilter)))),
4819 + canceledAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4820 + completedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4821 + completedProjectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
4822 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4823 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
4824 + customIdentifier: Schema.optional(Schema.NullOr(NullableStringComparator)),
4825 + customerCount: Schema.optional(Schema.NullOr(NumberComparator)),
4826 + customerImportantCount: Schema.optional(Schema.NullOr(NumberComparator)),
4827 + hasBlockedByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4828 + hasBlockingRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4829 + hasDependedOnByRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4830 + hasDependsOnRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4831 + hasRelatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4832 + hasViolatedRelations: Schema.optional(Schema.NullOr(RelationExistsComparator)),
4833 + health: Schema.optional(Schema.NullOr(StringComparator)),
4834 + healthWithAge: Schema.optional(Schema.NullOr(StringComparator)),
4835 + id: Schema.optional(Schema.NullOr(EntityIdentifierIDComparator)),
4836 + initiatives: Schema.optional(Schema.NullOr(Schema.suspend(() => InitiativeCollectionFilter))),
4837 + issues: Schema.optional(Schema.NullOr(Schema.suspend(() => IssueCollectionFilter))),
4838 + labels: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectLabelCollectionFilter))),
4839 + lastAppliedTemplate: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTemplateFilter))),
4840 + lead: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableUserFilter))),
4841 + leadTeam: Schema.optional(Schema.NullOr(Schema.suspend(() => NullableTeamFilter))),
4842 + members: Schema.optional(Schema.NullOr(Schema.suspend(() => UserCollectionFilter))),
4843 + name: Schema.optional(Schema.NullOr(StringComparator)),
4844 + needs: Schema.optional(Schema.NullOr(Schema.suspend(() => CustomerNeedCollectionFilter))),
4845 + nextProjectMilestone: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneFilter))),
4846 + or: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => ProjectFilter)))),
4847 + priority: Schema.optional(Schema.NullOr(NullableNumberComparator)),
4848 + projectMilestones: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectMilestoneCollectionFilter))),
4849 + projectUpdates: Schema.optional(Schema.NullOr(ProjectUpdatesCollectionFilter)),
4850 + roadmaps: Schema.optional(Schema.NullOr(Schema.suspend(() => RoadmapCollectionFilter))),
4851 + searchableContent: Schema.optional(Schema.NullOr(ContentComparator)),
4852 + slugId: Schema.optional(Schema.NullOr(StringComparator)),
4853 + startDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
4854 + startedAt: Schema.optional(Schema.NullOr(NullableDateComparator)),
4855 + state: Schema.optional(Schema.NullOr(StringComparator)),
4856 + status: Schema.optional(Schema.NullOr(Schema.suspend(() => ProjectStatusFilter))),
4857 + targetDate: Schema.optional(Schema.NullOr(NullableDateComparator)),
4858 + updatedAt: Schema.optional(Schema.NullOr(DateComparator))
4859 +})
4860 +export interface ProjectFilter {
4861 + /** Filters that the project's team must satisfy. */
4862 + readonly accessibleTeams?: TeamCollectionFilter | null | undefined
4863 + /** [ALPHA] Comparator for the project activity type: buzzin, active, some, none */
4864 + readonly activityType?: StringComparator | null | undefined
4865 + /** Compound filters, all of which need to be matched by the project. */
4866 + readonly and?: readonly ProjectFilter[] | null | undefined
4867 + /** Comparator for the project cancelation date. */
4868 + readonly canceledAt?: NullableDateComparator | null | undefined
4869 + /** Comparator for the project completion date. */
4870 + readonly completedAt?: NullableDateComparator | null | undefined
4871 + /** Filters that the project's completed milestones must satisfy. */
4872 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
4873 + /** Comparator for the created at date. */
4874 + readonly createdAt?: DateComparator | null | undefined
4875 + /** Filters that the projects creator must satisfy. */
4876 + readonly creator?: UserFilter | null | undefined
4877 + /** [Internal] Comparator for the project's custom identifier. */
4878 + readonly customIdentifier?: NullableStringComparator | null | undefined
4879 + /** Count of customers */
4880 + readonly customerCount?: NumberComparator | null | undefined
4881 + /** Count of important customers */
4882 + readonly customerImportantCount?: NumberComparator | null | undefined
4883 + /** Comparator for filtering projects which are blocked. */
4884 + readonly hasBlockedByRelations?: RelationExistsComparator | null | undefined
4885 + /** Comparator for filtering projects which are blocking. */
4886 + readonly hasBlockingRelations?: RelationExistsComparator | null | undefined
4887 + /** [Deprecated] Comparator for filtering projects which this is depended on by. */
4888 + readonly hasDependedOnByRelations?: RelationExistsComparator | null | undefined
4889 + /** [Deprecated]Comparator for filtering projects which this depends on. */
4890 + readonly hasDependsOnRelations?: RelationExistsComparator | null | undefined
4891 + /** Comparator for filtering projects with relations. */
4892 + readonly hasRelatedRelations?: RelationExistsComparator | null | undefined
4893 + /** Comparator for filtering projects with violated dependencies. */
4894 + readonly hasViolatedRelations?: RelationExistsComparator | null | undefined
4895 + /** Comparator for the project health: onTrack, atRisk, offTrack */
4896 + readonly health?: StringComparator | null | undefined
4897 + /** Comparator for the project health (with age): onTrack, atRisk, offTrack, outdated, noUpdate */
4898 + readonly healthWithAge?: StringComparator | null | undefined
4899 + /** Comparator for the identifier. */
4900 + readonly id?: EntityIdentifierIDComparator | null | undefined
4901 + /** Filters that the projects initiatives must satisfy. */
4902 + readonly initiatives?: InitiativeCollectionFilter | null | undefined
4903 + /** Filters that the projects issues must satisfy. */
4904 + readonly issues?: IssueCollectionFilter | null | undefined
4905 + /** Filters that project labels must satisfy. */
4906 + readonly labels?: ProjectLabelCollectionFilter | null | undefined
4907 + /** Filters that the last applied template must satisfy. */
4908 + readonly lastAppliedTemplate?: NullableTemplateFilter | null | undefined
4909 + /** Filters that the projects lead must satisfy. */
4910 + readonly lead?: NullableUserFilter | null | undefined
4911 + /** [ALPHA] Filters that the project's lead team must satisfy. */
4912 + readonly leadTeam?: NullableTeamFilter | null | undefined
4913 + /** Filters that the projects members must satisfy. */
4914 + readonly members?: UserCollectionFilter | null | undefined
4915 + /** Comparator for the project name. */
4916 + readonly name?: StringComparator | null | undefined
4917 + /** Filters that the project's customer needs must satisfy. */
4918 + readonly needs?: CustomerNeedCollectionFilter | null | undefined
4919 + /** Filters that the project's next milestone must satisfy. */
4920 + readonly nextProjectMilestone?: ProjectMilestoneFilter | null | undefined
4921 + /** Compound filters, one of which need to be matched by the project. */
4922 + readonly or?: readonly ProjectFilter[] | null | undefined
4923 + /** Comparator for the project priority. */
4924 + readonly priority?: NullableNumberComparator | null | undefined
4925 + /** Filters that the project's milestones must satisfy. */
4926 + readonly projectMilestones?: ProjectMilestoneCollectionFilter | null | undefined
4927 + /** Comparator for the project updates. */
4928 + readonly projectUpdates?: ProjectUpdatesCollectionFilter | null | undefined
4929 + /** Filters that the projects roadmaps must satisfy. */
4930 + readonly roadmaps?: RoadmapCollectionFilter | null | undefined
4931 + /** [Internal] Comparator for the project's content. */
4932 + readonly searchableContent?: ContentComparator | null | undefined
4933 + /** Comparator for the project slug ID. */
4934 + readonly slugId?: StringComparator | null | undefined
4935 + /** Comparator for the project start date. */
4936 + readonly startDate?: NullableDateComparator | null | undefined
4937 + /** Comparator for the project started date (when it was moved to an "In Progress" status). */
4938 + readonly startedAt?: NullableDateComparator | null | undefined
4939 + /** [DEPRECATED] Comparator for the project state. */
4940 + readonly state?: StringComparator | null | undefined
4941 + /** Filters that the project status must satisfy. */
4942 + readonly status?: ProjectStatusFilter | null | undefined
4943 + /** Comparator for the project target date. */
4944 + readonly targetDate?: NullableDateComparator | null | undefined
4945 + /** Comparator for the updated at date. */
4946 + readonly updatedAt?: DateComparator | null | undefined
4947 +}
4948 +export interface ProjectFilterEncoded {
4949 + readonly accessibleTeams?: TeamCollectionFilterEncoded | null | undefined
4950 + readonly activityType?: typeof StringComparator.Encoded | null | undefined
4951 + readonly and?: readonly ProjectFilterEncoded[] | null | undefined
4952 + readonly canceledAt?: typeof NullableDateComparator.Encoded | null | undefined
4953 + readonly completedAt?: typeof NullableDateComparator.Encoded | null | undefined
4954 + readonly completedProjectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
4955 + readonly createdAt?: typeof DateComparator.Encoded | null | undefined
4956 + readonly creator?: UserFilterEncoded | null | undefined
4957 + readonly customIdentifier?: typeof NullableStringComparator.Encoded | null | undefined
4958 + readonly customerCount?: typeof NumberComparator.Encoded | null | undefined
4959 + readonly customerImportantCount?: typeof NumberComparator.Encoded | null | undefined
4960 + readonly hasBlockedByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4961 + readonly hasBlockingRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4962 + readonly hasDependedOnByRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4963 + readonly hasDependsOnRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4964 + readonly hasRelatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4965 + readonly hasViolatedRelations?: typeof RelationExistsComparator.Encoded | null | undefined
4966 + readonly health?: typeof StringComparator.Encoded | null | undefined
4967 + readonly healthWithAge?: typeof StringComparator.Encoded | null | undefined
4968 + readonly id?: typeof EntityIdentifierIDComparator.Encoded | null | undefined
4969 + readonly initiatives?: InitiativeCollectionFilterEncoded | null | undefined
4970 + readonly issues?: IssueCollectionFilterEncoded | null | undefined
4971 + readonly labels?: ProjectLabelCollectionFilterEncoded | null | undefined
4972 + readonly lastAppliedTemplate?: NullableTemplateFilterEncoded | null | undefined
4973 + readonly lead?: NullableUserFilterEncoded | null | undefined
4974 + readonly leadTeam?: NullableTeamFilterEncoded | null | undefined
4975 + readonly members?: UserCollectionFilterEncoded | null | undefined
4976 + readonly name?: typeof StringComparator.Encoded | null | undefined
4977 + readonly needs?: CustomerNeedCollectionFilterEncoded | null | undefined
4978 + readonly nextProjectMilestone?: ProjectMilestoneFilterEncoded | null | undefined
4979 + readonly or?: readonly ProjectFilterEncoded[] | null | undefined
4980 + readonly priority?: typeof NullableNumberComparator.Encoded | null | undefined
4981 + readonly projectMilestones?: ProjectMilestoneCollectionFilterEncoded | null | undefined
4982 + readonly projectUpdates?: ProjectUpdatesCollectionFilterEncoded | null | undefined
4983 + readonly roadmaps?: RoadmapCollectionFilterEncoded | null | undefined
4984 + readonly searchableContent?: typeof ContentComparator.Encoded | null | undefined
4985 + readonly slugId?: typeof StringComparator.Encoded | null | undefined
4986 + readonly startDate?: typeof NullableDateComparator.Encoded | null | undefined
4987 + readonly startedAt?: typeof NullableDateComparator.Encoded | null | undefined
4988 + readonly state?: typeof StringComparator.Encoded | null | undefined
4989 + readonly status?: ProjectStatusFilterEncoded | null | undefined
4990 + readonly targetDate?: typeof NullableDateComparator.Encoded | null | undefined
4991 + readonly updatedAt?: typeof DateComparator.Encoded | null | undefined
4992 +}
4993 +
4994 +/** Roadmap collection filtering options. */
4995 +export const RoadmapCollectionFilter: Schema.Codec<RoadmapCollectionFilter, RoadmapCollectionFilterEncoded> = Schema.Struct({
4996 + and: Schema.optional(Schema.NullOr(Schema.Array(Schema.suspend(() => RoadmapCollectionFilter)))),
4997 + createdAt: Schema.optional(Schema.NullOr(DateComparator)),
4998 + creator: Schema.optional(Schema.NullOr(Schema.suspend(() => UserFilter))),
4999 + every: Schema.optional(Schema.NullOr(Schema.suspend(() => RoadmapFilter))),

This file is too large to show in full.

packages/issue-tracker-linear/src/server/LinearApi.graphql new
+275
@@ -0,0 +1,275 @@
1 +fragment LinearUser on User {
2 + id
3 + name
4 + displayName
5 + email
6 + avatarUrl
7 +}
8 +
9 +fragment LinearWorkflowState on WorkflowState {
10 + id
11 + name
12 + type
13 + position
14 +}
15 +
16 +fragment LinearLabel on IssueLabel {
17 + id
18 + name
19 + color
20 +}
21 +
22 +fragment LinearTeamLabel on IssueLabel {
23 + ...LinearLabel
24 + description
25 +}
26 +
27 +fragment LinearReaction on Reaction {
28 + id
29 + emoji
30 + user {
31 + ...LinearUser
32 + }
33 +}
34 +
35 +fragment LinearComment on Comment {
36 + id
37 + body
38 + createdAt
39 + url
40 + user {
41 + ...LinearUser
42 + }
43 + reactions {
44 + ...LinearReaction
45 + }
46 +}
47 +
48 +fragment LinearIssue on Issue {
49 + id
50 + identifier
51 + number
52 + title
53 + url
54 + description
55 + createdAt
56 + updatedAt
57 + completedAt
58 + canceledAt
59 + state {
60 + ...LinearWorkflowState
61 + }
62 + team {
63 + key
64 + }
65 + creator {
66 + ...LinearUser
67 + }
68 + assignee {
69 + ...LinearUser
70 + }
71 + labels {
72 + nodes {
73 + ...LinearLabel
74 + }
75 + }
76 +}
77 +
78 +fragment LinearPageInfo on PageInfo {
79 + hasNextPage
80 + endCursor
81 +}
82 +
83 +query T3Viewer {
84 + viewer {
85 + ...LinearUser
86 + }
87 + teams(first: 250) {
88 + nodes {
89 + id
90 + key
91 + name
92 + }
93 + }
94 +}
95 +
96 +query T3Issues($first: Int!, $after: String, $filter: IssueFilter!) {
97 + issues(first: $first, after: $after, filter: $filter, orderBy: updatedAt) {
98 + nodes {
99 + ...LinearIssue
100 + }
101 + pageInfo {
102 + ...LinearPageInfo
103 + }
104 + }
105 +}
106 +
107 +query T3Issue($id: String!, $comments: Int!) {
108 + issue(id: $id) {
109 + ...LinearIssue
110 + comments(first: $comments, orderBy: createdAt) {
111 + nodes {
112 + ...LinearComment
113 + }
114 + pageInfo {
115 + ...LinearPageInfo
116 + }
117 + }
118 + reactions {
119 + ...LinearReaction
120 + }
121 + attachments(first: 50) {
122 + nodes {
123 + url
124 + title
125 + sourceType
126 + metadata
127 + }
128 + }
129 + history(first: 100, orderBy: createdAt) {
130 + nodes {
131 + id
132 + createdAt
133 + actor {
134 + ...LinearUser
135 + }
136 + fromState {
137 + ...LinearWorkflowState
138 + }
139 + toState {
140 + ...LinearWorkflowState
141 + }
142 + fromAssignee {
143 + ...LinearUser
144 + }
145 + toAssignee {
146 + ...LinearUser
147 + }
148 + addedLabels {
149 + ...LinearLabel
150 + }
151 + removedLabels {
152 + ...LinearLabel
153 + }
154 + fromTitle
155 + toTitle
156 + }
157 + }
158 + }
159 +}
160 +
161 +query T3Comments($id: String!, $first: Int!, $after: String) {
162 + issue(id: $id) {
163 + comments(first: $first, after: $after, orderBy: createdAt) {
164 + nodes {
165 + ...LinearComment
166 + }
167 + pageInfo {
168 + ...LinearPageInfo
169 + }
170 + }
171 + }
172 +}
173 +
174 +query T3Team($key: String!) {
175 + teams(first: 1, filter: { key: { eq: $key } }) {
176 + nodes {
177 + id
178 + key
179 + name
180 + states(first: 100) {
181 + nodes {
182 + ...LinearWorkflowState
183 + }
184 + pageInfo {
185 + ...LinearPageInfo
186 + }
187 + }
188 + labels(first: 250) {
189 + nodes {
190 + ...LinearTeamLabel
191 + }
192 + pageInfo {
193 + ...LinearPageInfo
194 + }
195 + }
196 + members(first: 250) {
197 + nodes {
198 + ...LinearUser
199 + }
200 + pageInfo {
201 + ...LinearPageInfo
202 + }
203 + }
204 + templates {
205 + nodes {
206 + id
207 + name
208 + description
209 + content
210 + type
211 + hasFormFields
212 + templateData
213 + }
214 + }
215 + }
216 + }
217 + issueLabels(first: 250, filter: { team: { null: true } }) {
218 + nodes {
219 + ...LinearTeamLabel
220 + }
221 + pageInfo {
222 + ...LinearPageInfo
223 + }
224 + }
225 +}
226 +
227 +mutation T3IssueCreate($input: IssueCreateInput!) {
228 + issueCreate(input: $input) {
229 + success
230 + issue {
231 + identifier
232 + url
233 + }
234 + }
235 +}
236 +
237 +mutation T3IssueUpdate($id: String!, $input: IssueUpdateInput!) {
238 + issueUpdate(id: $id, input: $input) {
239 + success
240 + }
241 +}
242 +
243 +mutation T3CommentCreate($input: CommentCreateInput!) {
244 + commentCreate(input: $input) {
245 + success
246 + }
247 +}
248 +
249 +mutation T3ReactionCreate($input: ReactionCreateInput!) {
250 + reactionCreate(input: $input) {
251 + success
252 + }
253 +}
254 +
255 +mutation T3ReactionDelete($id: String!) {
256 + reactionDelete(id: $id) {
257 + success
258 + }
259 +}
260 +
261 +query T3IssueReactions($id: String!) {
262 + issue(id: $id) {
263 + reactions {
264 + ...LinearReaction
265 + }
266 + }
267 +}
268 +
269 +query T3CommentReactions($id: String!) {
270 + comment(id: $id) {
271 + reactions {
272 + ...LinearReaction
273 + }
274 + }
275 +}
packages/issue-tracker-linear/src/server/LinearApi.graphql.ts new
+728
@@ -0,0 +1,728 @@
1 +// Generated by @effect/graphql-generator from LinearApi.graphql. Do not edit.
2 +import { GraphQL, GraphQLGroup } from "effect/graphql"
3 +import * as Schema from "effect/Schema"
4 +import * as Shared from "../../schema/linear.graphql.ts"
5 +
6 +/**
7 + * `fragment LinearUser on User`
8 + *
9 + * A user that belongs to a workspace. Users can have different roles (admin, member, guest, or app) that determine their level of access. Users can be members of multiple teams, and can be active or deactivated. Guest users have limited access scoped to specific teams they are invited to.
10 + */
11 +export const LinearUser = Schema.Struct({
12 + /** The unique identifier of the entity. */
13 + id: Shared.ID,
14 + /** The user's full name. */
15 + name: Schema.String,
16 + /** The user's display (nick) name. Must be unique within the workspace. */
17 + displayName: Schema.String,
18 + /** The user's email address. */
19 + email: Schema.String,
20 + /** An URL to the user's avatar image. */
21 + avatarUrl: Schema.NullOr(Schema.String)
22 +})
23 +export interface LinearUser extends Schema.Struct.Type<typeof LinearUser.fields> {}
24 +
25 +/**
26 + * `fragment LinearWorkflowState on WorkflowState`
27 + *
28 + * A state in a team's workflow, representing an issue status such as Triage, Backlog, Todo, In Progress, In Review, Done, or Canceled. Each team has its own set of workflow states that define the progression of issues through the team's process. Workflow states have a type that categorizes them (triage, backlog, unstarted, started, completed, canceled), a position that determines their display order, and a color for visual identification. States can be inherited from parent teams to sub-teams.
29 + */
30 +export const LinearWorkflowState = Schema.Struct({
31 + /** The unique identifier of the entity. */
32 + id: Shared.ID,
33 + /** The state's human-readable name (e.g., 'In Progress', 'Done', 'Backlog'). */
34 + name: Schema.String,
35 + /** The type of the state. One of "triage", "backlog", "unstarted", "started", "completed", "canceled", "duplicate". */
36 + type: Schema.String,
37 + /** The position of the state in the team's workflow. States are displayed in ascending order of position within their type group. */
38 + position: Shared.Float
39 +})
40 +export interface LinearWorkflowState extends Schema.Struct.Type<typeof LinearWorkflowState.fields> {}
41 +
42 +/**
43 + * `fragment LinearLabel on IssueLabel`
44 + *
45 + * Labels that can be associated with issues. Labels help categorize and filter issues across a workspace. They can be workspace-level (shared across all teams) or team-scoped. Labels have a color for visual identification and can be organized hierarchically into groups, where a parent label acts as a group containing child labels. Labels may also be inherited from parent teams to sub-teams.
46 + */
47 +export const LinearLabel = Schema.Struct({
48 + /** The unique identifier of the entity. */
49 + id: Shared.ID,
50 + /** The label's name. */
51 + name: Schema.String,
52 + /** The label's color as a HEX string (e.g., '#EB5757'). Used for visual identification of the label in the UI. */
53 + color: Schema.String
54 +})
55 +export interface LinearLabel extends Schema.Struct.Type<typeof LinearLabel.fields> {}
56 +
57 +/**
58 + * `fragment LinearTeamLabel on IssueLabel`
59 + *
60 + * Labels that can be associated with issues. Labels help categorize and filter issues across a workspace. They can be workspace-level (shared across all teams) or team-scoped. Labels have a color for visual identification and can be organized hierarchically into groups, where a parent label acts as a group containing child labels. Labels may also be inherited from parent teams to sub-teams.
61 + */
62 +export const LinearTeamLabel = Schema.Struct({
63 + ...LinearLabel.fields,
64 + /** The label's description. */
65 + description: Schema.NullOr(Schema.String)
66 +})
67 +export interface LinearTeamLabel extends Schema.Struct.Type<typeof LinearTeamLabel.fields> {}
68 +
69 +/**
70 + * `fragment LinearReaction on Reaction`
71 + *
72 + * An emoji reaction on a comment, issue, project update, initiative update, post, pull request, or pull request comment. Each reaction is associated with exactly one parent entity and is created by either a workspace user or an external user. Reactions are persisted individually but surfaced on their parent entities as aggregated reactionData.
73 + */
74 +export const LinearReaction = Schema.Struct({
75 + /** The unique identifier of the entity. */
76 + id: Shared.ID,
77 + /** The name of the emoji used for this reaction. For custom workspace emojis, this is the custom emoji name; for standard emojis, this is the normalized emoji name. */
78 + emoji: Schema.String,
79 + /** The workspace user that created the reaction. Null if the reaction was created by an external user through an integration. */
80 + user: Schema.NullOr(LinearUser)
81 +})
82 +export interface LinearReaction extends Schema.Struct.Type<typeof LinearReaction.fields> {}
83 +
84 +/**
85 + * `fragment LinearComment on Comment`
86 + *
87 + * A comment associated with an issue, project update, initiative update, document content, post, project, or initiative. Comments support rich text (ProseMirror), emoji reactions, and threaded replies via parentId. Comments can be created by workspace users or by external users through integrations (e.g., Slack, Intercom). Each comment belongs to exactly one parent entity.
88 + */
89 +export const LinearComment = Schema.Struct({
90 + /** The unique identifier of the entity. */
91 + id: Shared.ID,
92 + /** The comment content in markdown format. This is a derived representation of the canonical bodyData ProseMirror content. */
93 + body: Schema.String,
94 + /** The time at which the entity was created. */
95 + createdAt: Shared.DateTime,
96 + /** Comment's URL. */
97 + url: Schema.String,
98 + /** The user who wrote the comment. Null for comments created by integrations or bots without a user association. */
99 + user: Schema.NullOr(LinearUser),
100 + /** Reactions associated with the comment. */
101 + reactions: Schema.Array(LinearReaction)
102 +})
103 +export interface LinearComment extends Schema.Struct.Type<typeof LinearComment.fields> {}
104 +
105 +/** A team is the primary organizational unit in Linear. Issues belong to teams, and each team has its own workflow states, cycles, labels, and settings. Teams can be public (visible to all workspace members), private (visible only to team members), or restricted (visible only within an enclosing private-team boundary). Teams can also have sub-teams that inherit settings from their parent. */
106 +export const TeamTeam = Schema.Struct({
107 + /** The team's unique key, used as a prefix in issue identifiers (e.g., 'ENG' in 'ENG-123') and in URLs. */
108 + key: Schema.String
109 +})
110 +export interface TeamTeam extends Schema.Struct.Type<typeof TeamTeam.fields> {}
111 +
112 +export const LinearIssueLabelsIssueLabelConnection = Schema.Struct({
113 + nodes: Schema.Array(LinearLabel)
114 +})
115 +export interface LinearIssueLabelsIssueLabelConnection extends Schema.Struct.Type<typeof LinearIssueLabelsIssueLabelConnection.fields> {}
116 +
117 +/**
118 + * `fragment LinearIssue on Issue`
119 + *
120 + * An issue is the core work item in Linear. Issues belong to a team, have a workflow status, can be assigned to users, carry a priority level, and can be organized into projects and cycles. Issues support sub-issues (parent-child hierarchy up to 10 levels deep), labels, due dates, estimates, and SLA tracking. They can also be linked to other issues via relations, attached to releases, and tracked through their full history of changes.
121 + */
122 +export const LinearIssue = Schema.Struct({
123 + /** The unique identifier of the entity. */
124 + id: Shared.ID,
125 + /** Issue's human readable identifier (e.g. ENG-123). */
126 + identifier: Schema.String,
127 + /** The issue's unique number, scoped to the issue's team. Together with the team key, this forms the issue's human-readable identifier (e.g., ENG-123). */
128 + number: Shared.Float,
129 + /** The issue's title. This is the primary human-readable summary of the work item. */
130 + title: Schema.String,
131 + /** Issue URL. */
132 + url: Schema.String,
133 + /** The issue's description in markdown format. */
134 + description: Schema.NullOr(Schema.String),
135 + /** The time at which the entity was created. */
136 + createdAt: Shared.DateTime,
137 + /**
138 + * The last time at which the entity was meaningfully updated. This is the same as the creation time if the entity hasn't
139 + * been updated after creation.
140 + */
141 + updatedAt: Shared.DateTime,
142 + /** The time at which the issue was moved into completed state. */
143 + completedAt: Schema.NullOr(Shared.DateTime),
144 + /** The time at which the issue was moved into canceled state. */
145 + canceledAt: Schema.NullOr(Shared.DateTime),
146 + /** The workflow state (issue status) that the issue is currently in. Workflow states represent the issue's progress through the team's workflow, such as Triage, Todo, In Progress, Done, or Canceled. */
147 + state: LinearWorkflowState,
148 + /** The team that the issue belongs to. Every issue must belong to exactly one team, which determines the available workflow states, labels, and other team-specific configuration. */
149 + team: TeamTeam,
150 + /** The user who created the issue. Null if the creator's account has been deleted or if the issue was created by an integration or system process. */
151 + creator: Schema.NullOr(LinearUser),
152 + /** The user to whom the issue is assigned. Null if the issue is unassigned. */
153 + assignee: Schema.NullOr(LinearUser),
154 + /** Labels associated with this issue. */
155 + labels: LinearIssueLabelsIssueLabelConnection
156 +})
157 +export interface LinearIssue extends Schema.Struct.Type<typeof LinearIssue.fields> {}
158 +
159 +/** `fragment LinearPageInfo on PageInfo` */
160 +export const LinearPageInfo = Schema.Struct({
161 + /** Indicates if there are more results when paginating forward. */
162 + hasNextPage: Schema.Boolean,
163 + /** Cursor representing the last result in the paginated results. */
164 + endCursor: Schema.NullOr(Schema.String)
165 +})
166 +export interface LinearPageInfo extends Schema.Struct.Type<typeof LinearPageInfo.fields> {}
167 +
168 +/** A team is the primary organizational unit in Linear. Issues belong to teams, and each team has its own workflow states, cycles, labels, and settings. Teams can be public (visible to all workspace members), private (visible only to team members), or restricted (visible only within an enclosing private-team boundary). Teams can also have sub-teams that inherit settings from their parent. */
169 +export const T3ViewerTeamsNodesTeam = Schema.Struct({
170 + /** The unique identifier of the entity. */
171 + id: Shared.ID,
172 + /** The team's unique key, used as a prefix in issue identifiers (e.g., 'ENG' in 'ENG-123') and in URLs. */
173 + key: Schema.String,
174 + /** The team's name. */
175 + name: Schema.String
176 +})
177 +export interface T3ViewerTeamsNodesTeam extends Schema.Struct.Type<typeof T3ViewerTeamsNodesTeam.fields> {}
178 +
179 +export const T3ViewerTeamsTeamConnection = Schema.Struct({
180 + nodes: Schema.Array(T3ViewerTeamsNodesTeam)
181 +})
182 +export interface T3ViewerTeamsTeamConnection extends Schema.Struct.Type<typeof T3ViewerTeamsTeamConnection.fields> {}
183 +
184 +/** `query T3Viewer` */
185 +export const T3Viewer = GraphQL.query("T3Viewer", {
186 + document: {
187 + variables: [],
188 + selections: [
189 + { name: "viewer", body: ["{...LinearUser}"] },
190 + { name: "teams", body: ["(first:250){nodes{id key name}}"] }
191 + ],
192 + fragments: [
193 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] }
194 + ]
195 + },
196 + result: Schema.Struct({
197 + /** The currently authenticated user making the API request. */
198 + viewer: LinearUser,
199 + /** All teams whose issues the user can access. This includes public teams and private teams the user is a member of. This may differ from `administrableTeams`, which returns teams whose settings the user can change but whose issues they don't necessarily have access to. */
200 + teams: T3ViewerTeamsTeamConnection
201 + })
202 +})
203 +export declare namespace T3Viewer {
204 + export type Variables = typeof T3Viewer.variables.Type
205 + export type Result = typeof T3Viewer.result.Type
206 +}
207 +
208 +export const IssueConnection = Schema.Struct({
209 + nodes: Schema.Array(LinearIssue),
210 + pageInfo: LinearPageInfo
211 +})
212 +export interface IssueConnection extends Schema.Struct.Type<typeof IssueConnection.fields> {}
213 +
214 +/** `query T3Issues` */
215 +export const T3Issues = GraphQL.query("T3Issues", {
216 + document: {
217 + variables: [
218 + { name: "first", body: "Int!" },
219 + { name: "after", body: "String" },
220 + { name: "filter", body: "IssueFilter!" }
221 + ],
222 + selections: [
223 + { name: "issues", body: ["(first:$", "first", " after:$", "after", " filter:$", "filter", " orderBy:updatedAt){nodes{...LinearIssue}pageInfo{...LinearPageInfo}}"] }
224 + ],
225 + fragments: [
226 + { name: "LinearIssue", body: ["on Issue{id identifier number title url description createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
227 + { name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
228 + { name: "LinearWorkflowState", body: ["on WorkflowState{id name type position}"] },
229 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] },
230 + { name: "LinearLabel", body: ["on IssueLabel{id name color}"] }
231 + ]
232 + },
233 + variables: {
234 + first: Shared.Int,
235 + after: Schema.optional(Schema.NullOr(Schema.String)),
236 + filter: Shared.IssueFilter
237 + },
238 + result: Schema.Struct({
239 + /** All issues. Returns a paginated list of issues visible to the authenticated user. Can be filtered by various criteria including team, assignee, state, labels, project, and cycle. */
240 + issues: IssueConnection
241 + })
242 +})
243 +export declare namespace T3Issues {
244 + export type Variables = typeof T3Issues.variables.Type
245 + export type Result = typeof T3Issues.result.Type
246 +}
247 +
248 +export const CommentConnection = Schema.Struct({
249 + nodes: Schema.Array(LinearComment),
250 + pageInfo: LinearPageInfo
251 +})
252 +export interface CommentConnection extends Schema.Struct.Type<typeof CommentConnection.fields> {}
253 +
254 +/** An attachment linking external content to an issue. Attachments represent connections to external resources such as GitHub pull requests, Slack messages, Zendesk tickets, Figma files, Sentry issues, Intercom conversations, and plain URLs. Each attachment has a title and subtitle displayed in the Linear UI, a URL serving as both the link destination and unique identifier per issue, and optional metadata specific to the source integration. */
255 +export const Attachment = Schema.Struct({
256 + /** The URL of the external resource this attachment links to. Also serves as a unique identifier for the attachment within an issue; no two attachments on the same issue can share the same URL. */
257 + url: Schema.String,
258 + /** Content for the title line in the Linear attachment widget. */
259 + title: Schema.String,
260 + /** The source type of the attachment, derived from the source metadata. Returns the integration type (e.g., 'github', 'slack', 'zendesk') or 'unknown' if no source is set. */
261 + sourceType: Schema.NullOr(Schema.String),
262 + /** Integration-specific metadata for this attachment. The schema varies by source type and may include fields such as pull request status, review counts, commit information, ticket status, or other data from the external system. */
263 + metadata: Shared.JSONObject
264 +})
265 +export interface Attachment extends Schema.Struct.Type<typeof Attachment.fields> {}
266 +
267 +export const AttachmentConnection = Schema.Struct({
268 + nodes: Schema.Array(Attachment)
269 +})
270 +export interface AttachmentConnection extends Schema.Struct.Type<typeof AttachmentConnection.fields> {}
271 +
272 +/** A record of changes to an issue. Each history entry captures one or more property changes made to an issue within a short grouping window by the same actor. History entries track changes to fields such as title, assignee, status, priority, project, cycle, labels, due date, estimate, parent issue, and more. They also record metadata about what triggered the change (e.g., a user action, workflow automation, triage rule, or integration). */
273 +export const IssueHistory = Schema.Struct({
274 + /** The unique identifier of the entity. */
275 + id: Shared.ID,
276 + /** The time at which the entity was created. */
277 + createdAt: Shared.DateTime,
278 + /** The actor that performed the actions. This field may be empty in the case of integrations or automations. */
279 + actor: Schema.NullOr(LinearUser),
280 + /** The state that the issue was moved from. */
281 + fromState: Schema.NullOr(LinearWorkflowState),
282 + /** The state that the issue was moved to. */
283 + toState: Schema.NullOr(LinearWorkflowState),
284 + /** The user that was unassigned from the issue. */
285 + fromAssignee: Schema.NullOr(LinearUser),
286 + /** The user that was assigned to the issue. */
287 + toAssignee: Schema.NullOr(LinearUser),
288 + /** The labels that were added to the issue. */
289 + addedLabels: Schema.NullOr(Schema.Array(LinearLabel)),
290 + /** The labels that were removed from the issue. */
291 + removedLabels: Schema.NullOr(Schema.Array(LinearLabel)),
292 + /** What the title was changed from. */
293 + fromTitle: Schema.NullOr(Schema.String),
294 + /** What the title was changed to. */
295 + toTitle: Schema.NullOr(Schema.String)
296 +})
297 +export interface IssueHistory extends Schema.Struct.Type<typeof IssueHistory.fields> {}
298 +
299 +export const IssueHistoryConnection = Schema.Struct({
300 + nodes: Schema.Array(IssueHistory)
301 +})
302 +export interface IssueHistoryConnection extends Schema.Struct.Type<typeof IssueHistoryConnection.fields> {}
303 +
304 +/** An issue is the core work item in Linear. Issues belong to a team, have a workflow status, can be assigned to users, carry a priority level, and can be organized into projects and cycles. Issues support sub-issues (parent-child hierarchy up to 10 levels deep), labels, due dates, estimates, and SLA tracking. They can also be linked to other issues via relations, attached to releases, and tracked through their full history of changes. */
305 +export const T3IssueIssueIssue = Schema.Struct({
306 + ...LinearIssue.fields,
307 + /** Comments associated with the issue, including inline comments on the issue's description. */
308 + comments: CommentConnection,
309 + /** Reactions associated with the issue. */
310 + reactions: Schema.Array(LinearReaction),
311 + /** Attachments associated with the issue. */
312 + attachments: AttachmentConnection,
313 + /** History entries associated with the issue. */
314 + history: IssueHistoryConnection
315 +})
316 +export interface T3IssueIssueIssue extends Schema.Struct.Type<typeof T3IssueIssueIssue.fields> {}
317 +
318 +/** `query T3Issue` */
319 +export const T3Issue = GraphQL.query("T3Issue", {
320 + document: {
321 + variables: [
322 + { name: "id", body: "String!" },
323 + { name: "comments", body: "Int!" }
324 + ],
325 + selections: [
326 + { name: "issue", body: ["(id:$", "id", "){...LinearIssue comments(first:$", "comments", " orderBy:createdAt){nodes{...LinearComment}pageInfo{...LinearPageInfo}}reactions{...LinearReaction}attachments(first:50){nodes{url title sourceType metadata}}history(first:100 orderBy:createdAt){nodes{id createdAt actor{...LinearUser}fromState{...LinearWorkflowState}toState{...LinearWorkflowState}fromAssignee{...LinearUser}toAssignee{...LinearUser}addedLabels{...LinearLabel}removedLabels{...LinearLabel}fromTitle toTitle}}}"] }
327 + ],
328 + fragments: [
329 + { name: "LinearIssue", body: ["on Issue{id identifier number title url description createdAt updatedAt completedAt canceledAt state{...LinearWorkflowState}team{key}creator{...LinearUser}assignee{...LinearUser}labels{nodes{...LinearLabel}}}"] },
330 + { name: "LinearComment", body: ["on Comment{id body createdAt url user{...LinearUser}reactions{...LinearReaction}}"] },
331 + { name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
332 + { name: "LinearReaction", body: ["on Reaction{id emoji user{...LinearUser}}"] },
333 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] },
334 + { name: "LinearWorkflowState", body: ["on WorkflowState{id name type position}"] },
335 + { name: "LinearLabel", body: ["on IssueLabel{id name color}"] }
336 + ]
337 + },
338 + variables: {
339 + id: Schema.String,
340 + comments: Shared.Int
341 + },
342 + result: Schema.Struct({
343 + /** One specific issue, looked up by its unique identifier. */
344 + issue: T3IssueIssueIssue
345 + })
346 +})
347 +export declare namespace T3Issue {
348 + export type Variables = typeof T3Issue.variables.Type
349 + export type Result = typeof T3Issue.result.Type
350 +}
351 +
352 +/** An issue is the core work item in Linear. Issues belong to a team, have a workflow status, can be assigned to users, carry a priority level, and can be organized into projects and cycles. Issues support sub-issues (parent-child hierarchy up to 10 levels deep), labels, due dates, estimates, and SLA tracking. They can also be linked to other issues via relations, attached to releases, and tracked through their full history of changes. */
353 +export const T3CommentsIssueIssue = Schema.Struct({
354 + /** Comments associated with the issue, including inline comments on the issue's description. */
355 + comments: CommentConnection
356 +})
357 +export interface T3CommentsIssueIssue extends Schema.Struct.Type<typeof T3CommentsIssueIssue.fields> {}
358 +
359 +/** `query T3Comments` */
360 +export const T3Comments = GraphQL.query("T3Comments", {
361 + document: {
362 + variables: [
363 + { name: "id", body: "String!" },
364 + { name: "first", body: "Int!" },
365 + { name: "after", body: "String" }
366 + ],
367 + selections: [
368 + { name: "issue", body: ["(id:$", "id", "){comments(first:$", "first", " after:$", "after", " orderBy:createdAt){nodes{...LinearComment}pageInfo{...LinearPageInfo}}}"] }
369 + ],
370 + fragments: [
371 + { name: "LinearComment", body: ["on Comment{id body createdAt url user{...LinearUser}reactions{...LinearReaction}}"] },
372 + { name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
373 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] },
374 + { name: "LinearReaction", body: ["on Reaction{id emoji user{...LinearUser}}"] }
375 + ]
376 + },
377 + variables: {
378 + id: Schema.String,
379 + first: Shared.Int,
380 + after: Schema.optional(Schema.NullOr(Schema.String))
381 + },
382 + result: Schema.Struct({
383 + /** One specific issue, looked up by its unique identifier. */
384 + issue: T3CommentsIssueIssue
385 + })
386 +})
387 +export declare namespace T3Comments {
388 + export type Variables = typeof T3Comments.variables.Type
389 + export type Result = typeof T3Comments.result.Type
390 +}
391 +
392 +export const WorkflowStateConnection = Schema.Struct({
393 + nodes: Schema.Array(LinearWorkflowState),
394 + pageInfo: LinearPageInfo
395 +})
396 +export interface WorkflowStateConnection extends Schema.Struct.Type<typeof WorkflowStateConnection.fields> {}
397 +
398 +export const NodesLabelsIssueLabelConnection = Schema.Struct({
399 + nodes: Schema.Array(LinearTeamLabel),
400 + pageInfo: LinearPageInfo
401 +})
402 +export interface NodesLabelsIssueLabelConnection extends Schema.Struct.Type<typeof NodesLabelsIssueLabelConnection.fields> {}
403 +
404 +export const UserConnection = Schema.Struct({
405 + nodes: Schema.Array(LinearUser),
406 + pageInfo: LinearPageInfo
407 +})
408 +export interface UserConnection extends Schema.Struct.Type<typeof UserConnection.fields> {}
409 +
410 +/** A reusable template for creating issues, projects, or documents. Templates store pre-filled field values and content as JSON data. They can be scoped to a specific team or shared across the entire workspace. Team-scoped templates may be inherited from parent teams. */
411 +export const Template = Schema.Struct({
412 + /** The unique identifier of the entity. */
413 + id: Shared.ID,
414 + /** The name of the template. */
415 + name: Schema.String,
416 + /** A description of what the template is used for. */
417 + description: Schema.NullOr(Schema.String),
418 + /** The template's content in markdown format: the body it pre-fills on the entity it creates. Distinct from `description`, which says what the template is for. Form templates serialize their form fields as markdown placeholders instead. Null when the template has no content. */
419 + content: Schema.NullOr(Schema.String),
420 + /** The entity type this template is for, such as 'issue', 'project', or 'document'. */
421 + type: Schema.String,
422 + /** [Internal] Whether the template has form fields */
423 + hasFormFields: Schema.Boolean,
424 + /** The template data as a JSON-encoded string containing the pre-filled attributes for the entity type (e.g., issue fields, project configuration, or document content). */
425 + templateData: Shared.JSON
426 +})
427 +export interface Template extends Schema.Struct.Type<typeof Template.fields> {}
428 +
429 +export const TemplateConnection = Schema.Struct({
430 + nodes: Schema.Array(Template)
431 +})
432 +export interface TemplateConnection extends Schema.Struct.Type<typeof TemplateConnection.fields> {}
433 +
434 +/** A team is the primary organizational unit in Linear. Issues belong to teams, and each team has its own workflow states, cycles, labels, and settings. Teams can be public (visible to all workspace members), private (visible only to team members), or restricted (visible only within an enclosing private-team boundary). Teams can also have sub-teams that inherit settings from their parent. */
435 +export const T3TeamTeamsNodesTeam = Schema.Struct({
436 + /** The unique identifier of the entity. */
437 + id: Shared.ID,
438 + /** The team's unique key, used as a prefix in issue identifiers (e.g., 'ENG' in 'ENG-123') and in URLs. */
439 + key: Schema.String,
440 + /** The team's name. */
441 + name: Schema.String,
442 + /** The states that define the workflow associated with the team. */
443 + states: WorkflowStateConnection,
444 + /** Labels associated with the team. */
445 + labels: NodesLabelsIssueLabelConnection,
446 + /** Users who are members of this team. Supports filtering and pagination. */
447 + members: UserConnection,
448 + /** Templates associated with the team. */
449 + templates: TemplateConnection
450 +})
451 +export interface T3TeamTeamsNodesTeam extends Schema.Struct.Type<typeof T3TeamTeamsNodesTeam.fields> {}
452 +
453 +export const T3TeamTeamsTeamConnection = Schema.Struct({
454 + nodes: Schema.Array(T3TeamTeamsNodesTeam)
455 +})
456 +export interface T3TeamTeamsTeamConnection extends Schema.Struct.Type<typeof T3TeamTeamsTeamConnection.fields> {}
457 +
458 +/** `query T3Team` */
459 +export const T3Team = GraphQL.query("T3Team", {
460 + document: {
461 + variables: [
462 + { name: "key", body: "String!" }
463 + ],
464 + selections: [
465 + { name: "teams", body: ["(first:1 filter:{key:{eq:$", "key", "}}){nodes{id key name states(first:100){nodes{...LinearWorkflowState}pageInfo{...LinearPageInfo}}labels(first:250){nodes{...LinearTeamLabel}pageInfo{...LinearPageInfo}}members(first:250){nodes{...LinearUser}pageInfo{...LinearPageInfo}}templates{nodes{id name description content type hasFormFields templateData}}}}"] },
466 + { name: "issueLabels", body: ["(first:250 filter:{team:{null:true}}){nodes{...LinearTeamLabel}pageInfo{...LinearPageInfo}}"] }
467 + ],
468 + fragments: [
469 + { name: "LinearWorkflowState", body: ["on WorkflowState{id name type position}"] },
470 + { name: "LinearPageInfo", body: ["on PageInfo{hasNextPage endCursor}"] },
471 + { name: "LinearTeamLabel", body: ["on IssueLabel{...LinearLabel description}"] },
472 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] },
473 + { name: "LinearLabel", body: ["on IssueLabel{id name color}"] }
474 + ]
475 + },
476 + variables: {
477 + key: Schema.String
478 + },
479 + result: Schema.Struct({
480 + /** All teams whose issues the user can access. This includes public teams and private teams the user is a member of. This may differ from `administrableTeams`, which returns teams whose settings the user can change but whose issues they don't necessarily have access to. */
481 + teams: T3TeamTeamsTeamConnection,
482 + /** All issue labels. Returns a paginated list of labels visible to the authenticated user, including both workspace-level and team-scoped labels. */
483 + issueLabels: NodesLabelsIssueLabelConnection
484 + })
485 +})
486 +export declare namespace T3Team {
487 + export type Variables = typeof T3Team.variables.Type
488 + export type Result = typeof T3Team.result.Type
489 +}
490 +
491 +/** An issue is the core work item in Linear. Issues belong to a team, have a workflow status, can be assigned to users, carry a priority level, and can be organized into projects and cycles. Issues support sub-issues (parent-child hierarchy up to 10 levels deep), labels, due dates, estimates, and SLA tracking. They can also be linked to other issues via relations, attached to releases, and tracked through their full history of changes. */
492 +export const IssueCreateIssueIssue = Schema.Struct({
493 + /** Issue's human readable identifier (e.g. ENG-123). */
494 + identifier: Schema.String,
495 + /** Issue URL. */
496 + url: Schema.String
497 +})
498 +export interface IssueCreateIssueIssue extends Schema.Struct.Type<typeof IssueCreateIssueIssue.fields> {}
499 +
500 +/** The result of an issue mutation, containing the created or updated issue and a success indicator. */
501 +export const IssueCreateIssuePayload = Schema.Struct({
502 + /** Whether the operation was successful. */
503 + success: Schema.Boolean,
504 + /** The issue that was created or updated. */
505 + issue: Schema.NullOr(IssueCreateIssueIssue)
506 +})
507 +export interface IssueCreateIssuePayload extends Schema.Struct.Type<typeof IssueCreateIssuePayload.fields> {}
508 +
509 +/** `mutation T3IssueCreate` */
510 +export const T3IssueCreate = GraphQL.mutation("T3IssueCreate", {
511 + document: {
512 + variables: [
513 + { name: "input", body: "IssueCreateInput!" }
514 + ],
515 + selections: [
516 + { name: "issueCreate", body: ["(input:$", "input", "){success issue{identifier url}}"] }
517 + ],
518 + fragments: []
519 + },
520 + variables: {
521 + input: Shared.IssueCreateInput
522 + },
523 + result: Schema.Struct({
524 + /** Creates a new issue. */
525 + issueCreate: IssueCreateIssuePayload
526 + })
527 +})
528 +export declare namespace T3IssueCreate {
529 + export type Variables = typeof T3IssueCreate.variables.Type
530 + export type Result = typeof T3IssueCreate.result.Type
531 +}
532 +
533 +/** The result of an issue mutation, containing the created or updated issue and a success indicator. */
534 +export const IssueUpdateIssuePayload = Schema.Struct({
535 + /** Whether the operation was successful. */
536 + success: Schema.Boolean
537 +})
538 +export interface IssueUpdateIssuePayload extends Schema.Struct.Type<typeof IssueUpdateIssuePayload.fields> {}
539 +
540 +/** `mutation T3IssueUpdate` */
541 +export const T3IssueUpdate = GraphQL.mutation("T3IssueUpdate", {
542 + document: {
543 + variables: [
544 + { name: "id", body: "String!" },
545 + { name: "input", body: "IssueUpdateInput!" }
546 + ],
547 + selections: [
548 + { name: "issueUpdate", body: ["(id:$", "id", " input:$", "input", "){success}"] }
549 + ],
550 + fragments: []
551 + },
552 + variables: {
553 + id: Schema.String,
554 + input: Shared.IssueUpdateInput
555 + },
556 + result: Schema.Struct({
557 + /** Updates an issue. */
558 + issueUpdate: IssueUpdateIssuePayload
559 + })
560 +})
561 +export declare namespace T3IssueUpdate {
562 + export type Variables = typeof T3IssueUpdate.variables.Type
563 + export type Result = typeof T3IssueUpdate.result.Type
564 +}
565 +
566 +/** The result of a comment mutation. */
567 +export const CommentPayload = Schema.Struct({
568 + /** Whether the operation was successful. */
569 + success: Schema.Boolean
570 +})
571 +export interface CommentPayload extends Schema.Struct.Type<typeof CommentPayload.fields> {}
572 +
573 +/** `mutation T3CommentCreate` */
574 +export const T3CommentCreate = GraphQL.mutation("T3CommentCreate", {
575 + document: {
576 + variables: [
577 + { name: "input", body: "CommentCreateInput!" }
578 + ],
579 + selections: [
580 + { name: "commentCreate", body: ["(input:$", "input", "){success}"] }
581 + ],
582 + fragments: []
583 + },
584 + variables: {
585 + input: Shared.CommentCreateInput
586 + },
587 + result: Schema.Struct({
588 + /** Creates a new comment. */
589 + commentCreate: CommentPayload
590 + })
591 +})
592 +export declare namespace T3CommentCreate {
593 + export type Variables = typeof T3CommentCreate.variables.Type
594 + export type Result = typeof T3CommentCreate.result.Type
595 +}
596 +
597 +/** The result of a reaction mutation. */
598 +export const ReactionPayload = Schema.Struct({
599 + /** Whether the operation was successful. */
600 + success: Schema.Boolean
601 +})
602 +export interface ReactionPayload extends Schema.Struct.Type<typeof ReactionPayload.fields> {}
603 +
604 +/** `mutation T3ReactionCreate` */
605 +export const T3ReactionCreate = GraphQL.mutation("T3ReactionCreate", {
606 + document: {
607 + variables: [
608 + { name: "input", body: "ReactionCreateInput!" }
609 + ],
610 + selections: [
611 + { name: "reactionCreate", body: ["(input:$", "input", "){success}"] }
612 + ],
613 + fragments: []
614 + },
615 + variables: {
616 + input: Shared.ReactionCreateInput
617 + },
618 + result: Schema.Struct({
619 + /** Creates a new reaction. */
620 + reactionCreate: ReactionPayload
621 + })
622 +})
623 +export declare namespace T3ReactionCreate {
624 + export type Variables = typeof T3ReactionCreate.variables.Type
625 + export type Result = typeof T3ReactionCreate.result.Type
626 +}
627 +
628 +/** A generic payload return from entity deletion mutations. */
629 +export const DeletePayload = Schema.Struct({
630 + /** Whether the operation was successful. */
631 + success: Schema.Boolean
632 +})
633 +export interface DeletePayload extends Schema.Struct.Type<typeof DeletePayload.fields> {}
634 +
635 +/** `mutation T3ReactionDelete` */
636 +export const T3ReactionDelete = GraphQL.mutation("T3ReactionDelete", {
637 + document: {
638 + variables: [
639 + { name: "id", body: "String!" }
640 + ],
641 + selections: [
642 + { name: "reactionDelete", body: ["(id:$", "id", "){success}"] }
643 + ],
644 + fragments: []
645 + },
646 + variables: {
647 + id: Schema.String
648 + },
649 + result: Schema.Struct({
650 + /** Deletes a reaction. */
651 + reactionDelete: DeletePayload
652 + })
653 +})
654 +export declare namespace T3ReactionDelete {
655 + export type Variables = typeof T3ReactionDelete.variables.Type
656 + export type Result = typeof T3ReactionDelete.result.Type
657 +}
658 +
659 +/** An issue is the core work item in Linear. Issues belong to a team, have a workflow status, can be assigned to users, carry a priority level, and can be organized into projects and cycles. Issues support sub-issues (parent-child hierarchy up to 10 levels deep), labels, due dates, estimates, and SLA tracking. They can also be linked to other issues via relations, attached to releases, and tracked through their full history of changes. */
660 +export const T3IssueReactionsIssueIssue = Schema.Struct({
661 + /** Reactions associated with the issue. */
662 + reactions: Schema.Array(LinearReaction)
663 +})
664 +export interface T3IssueReactionsIssueIssue extends Schema.Struct.Type<typeof T3IssueReactionsIssueIssue.fields> {}
665 +
666 +/** `query T3IssueReactions` */
667 +export const T3IssueReactions = GraphQL.query("T3IssueReactions", {
668 + document: {
669 + variables: [
670 + { name: "id", body: "String!" }
671 + ],
672 + selections: [
673 + { name: "issue", body: ["(id:$", "id", "){reactions{...LinearReaction}}"] }
674 + ],
675 + fragments: [
676 + { name: "LinearReaction", body: ["on Reaction{id emoji user{...LinearUser}}"] },
677 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] }
678 + ]
679 + },
680 + variables: {
681 + id: Schema.String
682 + },
683 + result: Schema.Struct({
684 + /** One specific issue, looked up by its unique identifier. */
685 + issue: T3IssueReactionsIssueIssue
686 + })
687 +})
688 +export declare namespace T3IssueReactions {
689 + export type Variables = typeof T3IssueReactions.variables.Type
690 + export type Result = typeof T3IssueReactions.result.Type
691 +}
692 +
693 +/** A comment associated with an issue, project update, initiative update, document content, post, project, or initiative. Comments support rich text (ProseMirror), emoji reactions, and threaded replies via parentId. Comments can be created by workspace users or by external users through integrations (e.g., Slack, Intercom). Each comment belongs to exactly one parent entity. */
694 +export const Comment = Schema.Struct({
695 + /** Reactions associated with the comment. */
696 + reactions: Schema.Array(LinearReaction)
697 +})
698 +export interface Comment extends Schema.Struct.Type<typeof Comment.fields> {}
699 +
700 +/** `query T3CommentReactions` */
701 +export const T3CommentReactions = GraphQL.query("T3CommentReactions", {
702 + document: {
703 + variables: [
704 + { name: "id", body: "String!" }
705 + ],
706 + selections: [
707 + { name: "comment", body: ["(id:$", "id", "){reactions{...LinearReaction}}"] }
708 + ],
709 + fragments: [
710 + { name: "LinearReaction", body: ["on Reaction{id emoji user{...LinearUser}}"] },
711 + { name: "LinearUser", body: ["on User{id name displayName email avatarUrl}"] }
712 + ]
713 + },
714 + variables: {
715 + id: Schema.String
716 + },
717 + result: Schema.Struct({
718 + /** A specific comment. */
719 + comment: Comment
720 + })
721 +})
722 +export declare namespace T3CommentReactions {
723 + export type Variables = typeof T3CommentReactions.variables.Type
724 + export type Result = typeof T3CommentReactions.result.Type
725 +}
726 +
727 +/** Every operation in LinearApi.graphql. */
728 +export const LinearApiGraphQLGroup = GraphQLGroup.make(T3Viewer, T3Issues, T3Issue, T3Comments, T3Team, T3IssueCreate, T3IssueUpdate, T3CommentCreate, T3ReactionCreate, T3ReactionDelete, T3IssueReactions, T3CommentReactions)
packages/issue-tracker-linear/src/server/LinearApi.ts new
+408
@@ -0,0 +1,408 @@
1 +/**
2 + * Linear's GraphQL API, signed with the API key saved in Settings. The operations live in
3 + * `LinearApi.graphql` and their client is generated (`vp run generate`). A rate-limit refusal
4 + * arrives as HTTP 429 or as a `RATELIMITED` GraphQL error on a 400; both map to `rate-limited`.
5 + */
6 +import * as Clock from "effect/Clock";
7 +import * as Config from "effect/Config";
8 +import * as Context from "effect/Context";
9 +import * as Effect from "effect/Effect";
10 +import * as Layer from "effect/Layer";
11 +import * as Option from "effect/Option";
12 +import * as Schema from "effect/Schema";
13 +import {
14 + GraphQLClient,
15 + GraphQLClientError,
16 + GraphQLMiddleware,
17 + GraphQLProtocol,
18 +} from "effect/graphql";
19 +import { HttpClient } from "effect/http";
20 +import * as Headers from "effect/http/Headers";
21 +import { IssueTrackerKind } from "@t3tools/contracts";
22 +import { IssueTrackerError } from "@t3tools/source-control-core/server/IssueTracker";
23 +import * as IssueTrackerHost from "@t3tools/source-control-core/server/IssueTrackerHost";
24 +import { retryAtFromHeader } from "@t3tools/source-control-core/server/SourceControlRateLimit";
25 +
26 +import type {
27 + CommentCreateInput,
28 + IssueCreateInput,
29 + IssueFilter,
30 + IssueUpdateInput,
31 +} from "../../schema/linear.graphql.ts";
32 +import {
33 + LinearApiGraphQLGroup,
34 + type Attachment,
35 + type IssueHistory,
36 + type LinearComment,
37 + type LinearIssue,
38 + type LinearReaction,
39 + type LinearTeamLabel,
40 + type LinearUser,
41 + type T3Issue,
42 + type T3Team,
43 + type Template,
44 +} from "./LinearApi.graphql.ts";
45 +
46 +export type { IssueFilter } from "../../schema/linear.graphql.ts";
47 +export type {
48 + LinearComment,
49 + LinearIssue,
50 + LinearReaction,
51 + LinearUser,
52 +} from "./LinearApi.graphql.ts";
53 +export type { LinearWorkflowState } from "./LinearApi.graphql.ts";
54 +export type LinearAttachment = Attachment;
55 +export type LinearHistoryEntry = IssueHistory;
56 +
57 +export const KIND = IssueTrackerKind.make("linear");
58 +const DEFAULT_API_URL = "https://api.linear.app/graphql";
59 +
60 +const LinearApiConfig = Config.all({
61 + apiUrl: Config.String("T3CODE_LINEAR_API_URL").pipe(Config.withDefault(DEFAULT_API_URL)),
62 +});
63 +
64 +const LinearTemplateData = Schema.Struct({
65 + title: Schema.optional(Schema.NullOr(Schema.String)),
66 + description: Schema.optional(Schema.Unknown),
67 + descriptionData: Schema.optional(Schema.Unknown),
68 + labelIds: Schema.optional(Schema.NullOr(Schema.Array(Schema.String))),
69 + assigneeId: Schema.optional(Schema.NullOr(Schema.String)),
70 +});
71 +type LinearTemplateData = typeof LinearTemplateData.Type;
72 +const decodeTemplateData = Schema.decodeUnknownOption(
73 + Schema.Union([Schema.fromJsonString(LinearTemplateData), LinearTemplateData]),
74 +);
75 +
76 +/** A template with its data read: Linear sends it as a JSON string, and has sent an object. */
77 +export interface LinearTemplate extends Omit<Template, "templateData"> {
78 + readonly templateData: LinearTemplateData;
79 +}
80 +
81 +type LinearTeamDetail = T3Team.Result["teams"]["nodes"][number];
82 +type LinearIssueDetail = NonNullable<T3Issue.Result["issue"]>;
83 +
84 +/** The team with the workspace-wide labels that any of its issues may also carry. */
85 +export interface LinearTeamScope {
86 + readonly team: Omit<LinearTeamDetail, "templates"> & {
87 + readonly templates: { readonly nodes: ReadonlyArray<LinearTemplate> };
88 + };
89 + readonly workspaceLabels: ReadonlyArray<LinearTeamLabel>;
90 + /** Linear had more than one page of something; a missing label or member may still exist. */
91 + readonly truncated: boolean;
92 +}
93 +
94 +export class LinearApi extends Context.Service<
95 + LinearApi,
96 + {
97 + /** Who a credential is, and the teams it reaches. Takes the token so it can vet a new one. */
98 + readonly viewer: (token?: string) => Effect.Effect<
99 + {
100 + readonly viewer: LinearUser;
101 + readonly teams: ReadonlyArray<{
102 + readonly id: string;
103 + readonly key: string;
104 + readonly name: string;
105 + }>;
106 + },
107 + IssueTrackerError
108 + >;
109 + readonly listIssues: (input: {
110 + readonly filter: IssueFilter;
111 + readonly first: number;
112 + readonly after?: string | undefined;
113 + }) => Effect.Effect<
114 + { readonly nodes: ReadonlyArray<LinearIssue>; readonly nextCursor: string | null },
115 + IssueTrackerError
116 + >;
117 + /** Null when Linear has no issue by that identifier, or the credential cannot see it. */
118 + readonly getIssue: (
119 + identifier: string,
120 + comments: number,
121 + ) => Effect.Effect<LinearIssueDetail | null, IssueTrackerError>;
122 + readonly getComments: (input: {
123 + readonly identifier: string;
124 + readonly first: number;
125 + readonly after: string;
126 + }) => Effect.Effect<
127 + { readonly nodes: ReadonlyArray<LinearComment>; readonly nextCursor: string | null },
128 + IssueTrackerError
129 + >;
130 + readonly getTeam: (key: string) => Effect.Effect<LinearTeamScope | null, IssueTrackerError>;
131 + readonly createIssue: (
132 + input: IssueCreateInput,
133 + ) => Effect.Effect<{ readonly identifier: string; readonly url: string }, IssueTrackerError>;
134 + readonly updateIssue: (
135 + identifier: string,
136 + input: IssueUpdateInput,
137 + ) => Effect.Effect<void, IssueTrackerError>;
138 + readonly createComment: (input: CommentCreateInput) => Effect.Effect<void, IssueTrackerError>;
139 + readonly createReaction: (input: {
140 + readonly issueId?: string | undefined;
141 + readonly commentId?: string | undefined;
142 + readonly emoji: string;
143 + }) => Effect.Effect<void, IssueTrackerError>;
144 + readonly deleteReaction: (id: string) => Effect.Effect<void, IssueTrackerError>;
145 + /** Reactions on an issue (by identifier) or a comment (by id), to find the viewer's own. */
146 + readonly listReactions: (input: {
147 + readonly issueId?: string | undefined;
148 + readonly commentId?: string | undefined;
149 + }) => Effect.Effect<ReadonlyArray<LinearReaction>, IssueTrackerError>;
150 + }
151 +>()("@t3tools/issue-tracker-linear/server/LinearApi") {}
152 +
153 +/** The API key a call is sent with: the stored one, or a new one being vetted. */
154 +class LinearToken extends Context.Service<LinearToken, string>()(
155 + "@t3tools/issue-tracker-linear/server/LinearApi/LinearToken",
156 +) {}
157 +
158 +class LinearAuth extends GraphQLMiddleware.Service<LinearAuth, { requires: LinearToken }>()(
159 + "@t3tools/issue-tracker-linear/server/LinearApi/LinearAuth",
160 +) {}
161 +
162 +const LinearGroup = LinearApiGraphQLGroup.middleware(LinearAuth);
163 +
164 +const fail = (
165 + operation: string,
166 + reason: IssueTrackerError["reason"],
167 + detail: string,
168 + extra: { readonly retryAt?: number; readonly cause?: unknown } = {},
169 +) =>
170 + new IssueTrackerError({
171 + tracker: KIND,
172 + operation,
173 + reason,
174 + detail,
175 + ...(extra.retryAt === undefined ? {} : { retryAt: extra.retryAt }),
176 + ...(extra.cause === undefined ? {} : { cause: extra.cause }),
177 + });
178 +
179 +const hasCode = (errors: ReadonlyArray<GraphQLClientError.GraphQLError>, code: string) =>
180 + errors.some((error) => error.extensions?.["code"] === code);
181 +
182 +/** Linear's answer as the tracker's error. Linear writes its messages for people. */
183 +const toTrackerError = (
184 + operation: string,
185 + error: GraphQLClientError.GraphQLClientError,
186 + now: number,
187 +): IssueTrackerError => {
188 + const reason = error.reason;
189 + if (reason._tag !== "ResponseError" && reason._tag !== "TransportError") {
190 + return fail(operation, "failed", "Linear returned an unexpected body.", { cause: error });
191 + }
192 + const errors = reason._tag === "ResponseError" ? reason.errors : [];
193 + const headers = reason.headers ?? Headers.empty;
194 + if (reason.status === 429 || hasCode(errors, "RATELIMITED")) {
195 + const retryAt = retryAtFromHeader(
196 + headers["x-ratelimit-requests-reset"] ?? headers["x-ratelimit-complexity-reset"],
197 + now,
198 + );
199 + return fail(
200 + operation,
201 + "rate-limited",
202 + "Linear's rate limit was reached.",
203 + retryAt === undefined ? {} : { retryAt },
204 + );
205 + }
206 + if (reason.status === 401 || reason.status === 403 || hasCode(errors, "AUTHENTICATION_ERROR")) {
207 + return fail(operation, "unauthenticated", "Linear rejected the API key.");
208 + }
209 + if (reason._tag === "ResponseError") {
210 + return fail(operation, "failed", errors[0]?.message.trim() || "Linear refused the request.");
211 + }
212 + return reason.status === undefined
213 + ? fail(operation, "failed", "Linear could not be reached.", { cause: error })
214 + : fail(operation, "failed", `Linear returned HTTP ${reason.status} with an unexpected body.`);
215 +};
216 +
217 +const nextCursor = (pageInfo: {
218 + readonly hasNextPage: boolean;
219 + readonly endCursor: string | null;
220 +}) => (pageInfo.hasNextPage ? pageInfo.endCursor : null);
221 +
222 +export const make = Effect.gen(function* () {
223 + // Only a default-carrying string: nothing in the environment can make it fail.
224 + const config = yield* LinearApiConfig.pipe(Effect.orDie);
225 + const httpClient = yield* HttpClient.HttpClient;
226 + const host = yield* IssueTrackerHost.IssueTrackerHost;
227 +
228 + const client = yield* GraphQLClient.make(LinearGroup).pipe(
229 + Effect.provide(
230 + Layer.mergeAll(
231 + Layer.succeed(
232 + LinearAuth,
233 + GraphQLMiddleware.mapRequest((request) =>
234 + Effect.gen(function* () {
235 + const token = yield* LinearToken;
236 + // A personal API key goes in as-is; `Bearer` is for OAuth tokens, which this is not.
237 + return { ...request, headers: Headers.set(request.headers, "authorization", token) };
238 + }),
239 + ),
240 + ),
241 + GraphQLProtocol.layerHttp({ url: config.apiUrl }).pipe(
242 + Layer.provide(Layer.succeed(HttpClient.HttpClient, httpClient)),
243 + ),
244 + ),
245 + ),
246 + );
247 +
248 + const storedToken = (operation: string) =>
249 + host.credentials
250 + .get(KIND)
251 + .pipe(
252 + Effect.flatMap(
253 + Effect.fromOption(() =>
254 + fail(operation, "unauthenticated", "Linear is not connected on this server."),
255 + ),
256 + ),
257 + );
258 +
259 + const call = Effect.fn("LinearApi.call")(function* <A>(
260 + operation: string,
261 + run: (
262 + linear: typeof client,
263 + ) => Effect.Effect<A, GraphQLClientError.GraphQLClientError, LinearToken>,
264 + token?: string,
265 + ): Effect.fn.Return<A, IssueTrackerError> {
266 + yield* Effect.annotateCurrentSpan({ "linear.operation": operation });
267 + const key = token ?? (yield* storedToken(operation));
268 + return yield* run(client).pipe(
269 + Effect.catch((error) =>
270 + Effect.flatMap(Clock.currentTimeMillis, (now) =>
271 + Effect.fail(toTrackerError(operation, error, now)),
272 + ),
273 + ),
274 + Effect.provideService(LinearToken, key),
275 + );
276 + });
277 +
278 + const applied = (operation: string, result: { readonly success: boolean }) =>
279 + result.success
280 + ? Effect.void
281 + : Effect.fail(fail(operation, "failed", "Linear did not apply the change."));
282 +
283 + const viewer: LinearApi["Service"]["viewer"] = (token) =>
284 + call("viewer", (linear) => linear.T3Viewer(), token).pipe(
285 + Effect.map((data) => ({ viewer: data.viewer, teams: data.teams.nodes })),
286 + );
287 +
288 + const listIssues: LinearApi["Service"]["listIssues"] = (input) =>
289 + call("listIssues", (linear) =>
290 + linear.T3Issues({ first: input.first, after: input.after ?? null, filter: input.filter }),
291 + ).pipe(
292 + Effect.map((data) => ({
293 + nodes: data.issues.nodes,
294 + nextCursor: nextCursor(data.issues.pageInfo),
295 + })),
296 + );
297 +
298 + const getIssue: LinearApi["Service"]["getIssue"] = (identifier, comments) =>
299 + call("getIssue", (linear) => linear.T3Issue({ id: identifier, comments })).pipe(
300 + Effect.map((data) => data.issue),
301 + // Linear answers an unknown identifier with an error and no data, not with null.
302 + Effect.catchIf(
303 + (error) => error.reason === "failed" && /not found/i.test(error.detail),
304 + () => Effect.succeed(null),
305 + ),
306 + );
307 +
308 + const getComments: LinearApi["Service"]["getComments"] = (input) =>
309 + call("getComments", (linear) =>
310 + linear.T3Comments({ id: input.identifier, first: input.first, after: input.after }),
311 + ).pipe(
312 + Effect.flatMap((data) =>
313 + data.issue === null
314 + ? Effect.fail(fail("getComments", "not-found", "This issue no longer exists."))
315 + : Effect.succeed({
316 + nodes: data.issue.comments.nodes,
317 + nextCursor: nextCursor(data.issue.comments.pageInfo),
318 + }),
319 + ),
320 + );
321 +
322 + const getTeam: LinearApi["Service"]["getTeam"] = (key) =>
323 + call("getTeam", (linear) => linear.T3Team({ key })).pipe(
324 + Effect.map((data) => {
325 + const team = data.teams.nodes[0];
326 + if (team === undefined) return null;
327 + return {
328 + team: {
329 + ...team,
330 + templates: {
331 + nodes: team.templates.nodes.map((template) => ({
332 + ...template,
333 + templateData: Option.getOrElse(
334 + decodeTemplateData(template.templateData),
335 + (): LinearTemplateData => ({}),
336 + ),
337 + })),
338 + },
339 + },
340 + workspaceLabels: data.issueLabels.nodes,
341 + truncated:
342 + team.states.pageInfo.hasNextPage ||
343 + team.labels.pageInfo.hasNextPage ||
344 + team.members.pageInfo.hasNextPage ||
345 + data.issueLabels.pageInfo.hasNextPage,
346 + };
347 + }),
348 + );
349 +
350 + const createIssue: LinearApi["Service"]["createIssue"] = (input) =>
351 + call("createIssue", (linear) => linear.T3IssueCreate({ input })).pipe(
352 + Effect.flatMap(({ issueCreate }) =>
353 + issueCreate.success && issueCreate.issue !== null
354 + ? Effect.succeed(issueCreate.issue)
355 + : Effect.fail(fail("createIssue", "failed", "Linear did not create the issue.")),
356 + ),
357 + );
358 +
359 + const updateIssue: LinearApi["Service"]["updateIssue"] = (identifier, input) =>
360 + call("updateIssue", (linear) => linear.T3IssueUpdate({ id: identifier, input })).pipe(
361 + Effect.flatMap(({ issueUpdate }) => applied("updateIssue", issueUpdate)),
362 + );
363 +
364 + const createComment: LinearApi["Service"]["createComment"] = (input) =>
365 + call("createComment", (linear) => linear.T3CommentCreate({ input })).pipe(
366 + Effect.flatMap(({ commentCreate }) => applied("createComment", commentCreate)),
367 + );
368 +
369 + const createReaction: LinearApi["Service"]["createReaction"] = (input) =>
370 + call("createReaction", (linear) =>
371 + linear.T3ReactionCreate({
372 + input:
373 + input.commentId === undefined
374 + ? { issueId: input.issueId ?? null, emoji: input.emoji }
375 + : { commentId: input.commentId, emoji: input.emoji },
376 + }),
377 + ).pipe(Effect.flatMap(({ reactionCreate }) => applied("createReaction", reactionCreate)));
378 +
379 + const deleteReaction: LinearApi["Service"]["deleteReaction"] = (id) =>
380 + call("deleteReaction", (linear) => linear.T3ReactionDelete({ id })).pipe(
381 + Effect.flatMap(({ reactionDelete }) => applied("deleteReaction", reactionDelete)),
382 + );
383 +
384 + const listReactions: LinearApi["Service"]["listReactions"] = (input) =>
385 + input.commentId === undefined
386 + ? call("listReactions", (linear) =>
387 + linear.T3IssueReactions({ id: input.issueId ?? "" }),
388 + ).pipe(Effect.map((data) => data.issue.reactions))
389 + : call("listReactions", (linear) =>
390 + linear.T3CommentReactions({ id: input.commentId ?? "" }),
391 + ).pipe(Effect.map((data) => data.comment.reactions));
392 +
393 + return LinearApi.of({
394 + viewer,
395 + listIssues,
396 + getIssue,
397 + getComments,
398 + getTeam,
399 + createIssue,
400 + updateIssue,
401 + createComment,
402 + createReaction,
403 + deleteReaction,
404 + listReactions,
405 + });
406 +});
407 +
408 +export const layer = Layer.effect(LinearApi, make);
packages/issue-tracker-linear/src/server/LinearIssueTracker.test.ts new
+377
@@ -0,0 +1,377 @@
1 +import { describe, expect, it } from "@effect/vitest";
2 +import * as Effect from "effect/Effect";
3 +import * as Layer from "effect/Layer";
4 +import * as Option from "effect/Option";
5 +import { HttpClient, HttpClientResponse } from "effect/http";
6 +import { IssueTrackerKind } from "@t3tools/contracts";
7 +import type { StandaloneIssueTrackerApi } from "@t3tools/source-control-core/server/IssueTracker";
8 +import * as IssueTrackerHost from "@t3tools/source-control-core/server/IssueTrackerHost";
9 +
10 +import * as LinearApi from "./LinearApi.ts";
11 +import * as LinearIssueTracker from "./LinearIssueTracker.ts";
12 +
13 +const user = (id: string, displayName: string) => ({
14 + id,
15 + name: displayName,
16 + displayName,
17 + email: `${displayName}@acme.test`,
18 + avatarUrl: null,
19 +});
20 +const JULIUS = user("usr_julius", "julius");
21 +const THEO = user("usr_theo", "theo");
22 +
23 +const state = (name: string, type: string, position = 0) => ({
24 + id: `st_${name.toLowerCase().replaceAll(" ", "-")}`,
25 + name,
26 + type,
27 + position,
28 +});
29 +
30 +const issue = (
31 + identifier: string,
32 + overrides: Partial<Record<string, unknown>> = {},
33 +): Record<string, unknown> => ({
34 + id: `iss_${identifier}`,
35 + identifier,
36 + number: Number(identifier.split("-")[1]),
37 + title: `Issue ${identifier}`,
38 + url: `https://linear.app/acme/issue/${identifier}`,
39 + description: "body",
40 + createdAt: "2026-07-01T00:00:00.000Z",
41 + updatedAt: "2026-07-02T00:00:00.000Z",
42 + completedAt: null,
43 + canceledAt: null,
44 + state: state("In Progress", "started"),
45 + team: { key: identifier.split("-")[0] },
46 + creator: JULIUS,
47 + assignee: THEO,
48 + labels: { nodes: [{ id: "lbl_bug", name: "Bug", color: "#f00" }] },
49 + ...overrides,
50 +});
51 +
52 +/** An issue as the detail query answers it, with nothing hanging off it. */
53 +const bareDetail = (identifier: string) =>
54 + issue(identifier, {
55 + comments: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
56 + reactions: [],
57 + attachments: { nodes: [] },
58 + history: { nodes: [] },
59 + });
60 +
61 +/** Answers each GraphQL document by its operation name, the way Linear would. */
62 +function fakeLinear(
63 + answers: Record<string, (variables: Record<string, unknown>) => unknown>,
64 + stored: string | null = "lin_api_stored",
65 +) {
66 + const requests: Array<{
67 + readonly authorization: string | undefined;
68 + readonly operation: string;
69 + }> = [];
70 + const http = Layer.succeed(
71 + HttpClient.HttpClient,
72 + HttpClient.make((request) =>
73 + Effect.sync(() => {
74 + const body = request.body;
75 + const text =
76 + body._tag === "Uint8Array" ? new TextDecoder().decode(body.body) : String(body._tag);
77 + const parsed = JSON.parse(text) as { query: string; variables: Record<string, unknown> };
78 + const operation = /^(?:query|mutation) (\w+)/.exec(parsed.query)?.[1] ?? "?";
79 + requests.push({ authorization: request.headers.authorization, operation });
80 + const answer = answers[operation];
81 + const response =
82 + answer === undefined
83 + ? new Response(
84 + JSON.stringify({ errors: [{ message: `No answer for ${operation}` }] }),
85 + {
86 + status: 400,
87 + headers: { "content-type": "application/json" },
88 + },
89 + )
90 + : new Response(JSON.stringify({ data: answer(parsed.variables) }), {
91 + status: 200,
92 + headers: { "content-type": "application/json" },
93 + });
94 + return HttpClientResponse.fromWeb(request, response);
95 + }),
96 + ),
97 + );
98 + const host = Layer.succeed(
99 + IssueTrackerHost.IssueTrackerHost,
100 + IssueTrackerHost.IssueTrackerHost.of({
101 + credentials: { get: () => Effect.succeed(Option.fromNullishOr(stored)) },
102 + }),
103 + );
104 + // Every optional write is implemented here; the type says so for the calls below.
105 + const tracker = LinearIssueTracker.make.pipe(
106 + Effect.map((api) => api as Required<StandaloneIssueTrackerApi>),
107 + Effect.provide(LinearApi.layer.pipe(Layer.provide(Layer.merge(http, host)))),
108 + );
109 + return { tracker, requests };
110 +}
111 +
112 +const target = { cwd: "/w/web", host: "linear.app", scope: "ENG" };
113 +
114 +describe("LinearIssueTracker", () => {
115 + it.effect("lists a team's issues as summaries keyed by identifier", () =>
116 + Effect.gen(function* () {
117 + const { tracker, requests } = fakeLinear({
118 + T3Viewer: () => ({ viewer: JULIUS, teams: { nodes: [] } }),
119 + T3Issues: (variables) => {
120 + expect(variables.filter).toMatchObject({
121 + team: { key: { eq: "ENG" } },
122 + state: { type: { nin: ["completed", "canceled"] } },
123 + assignee: { id: { eq: "usr_julius" } },
124 + });
125 + return {
126 + issues: {
127 + nodes: [
128 + issue("ENG-2", {
129 + state: state("Done", "completed"),
130 + completedAt: "2026-07-03T00:00:00.000Z",
131 + }),
132 + issue("ENG-1"),
133 + ],
134 + pageInfo: { hasNextPage: true, endCursor: "cur_2" },
135 + },
136 + };
137 + },
138 + });
139 + const api = yield* tracker;
140 + expect(api.kind).toBe(IssueTrackerKind.make("linear"));
141 + expect(api.standalone).toMatchObject({ host: "linear.app", scopeNoun: "team" });
142 +
143 + const page = yield* api.listIssues({
144 + ...target,
145 + state: "open",
146 + involvement: "assigned",
147 + viewer: "usr_julius",
148 + limit: 50,
149 + });
150 + expect(page.nextCursor).toBe("cur_2");
151 + expect(page.items.map((item) => [item.key, item.displayKey, item.state])).toEqual([
152 + ["ENG-2", "ENG-2", { category: "closed", name: "Done", closeReason: "completed" }],
153 + ["ENG-1", "ENG-1", { category: "open", name: "In Progress" }],
154 + ]);
155 + expect(page.items[0]).toMatchObject({
156 + closedAt: "2026-07-03T00:00:00.000Z",
157 + author: { login: "usr_julius", name: "julius" },
158 + assignees: [{ login: "usr_theo", name: "theo" }],
159 + labels: [{ name: "Bug", color: "#f00" }],
160 + });
161 + // The stored key goes in as-is, not as a bearer token.
162 + expect(requests.map((request) => request.authorization)).toEqual(["lin_api_stored"]);
163 + }),
164 + );
165 +
166 + it.effect("reads an issue with its comments, reactions, history and linked pull requests", () =>
167 + Effect.gen(function* () {
168 + const { tracker } = fakeLinear({
169 + T3Viewer: () => ({ viewer: JULIUS, teams: { nodes: [] } }),
170 + T3Issue: () => ({
171 + issue: issue("ENG-7", {
172 + comments: {
173 + nodes: [
174 + {
175 + id: "cmt_1",
176 + body: "hi",
177 + createdAt: "2026-07-02T01:00:00.000Z",
178 + url: "https://linear.app/acme/issue/ENG-7#comment-cmt_1",
179 + user: THEO,
180 + reactions: [{ id: "r1", emoji: "👍", user: JULIUS }],
181 + },
182 + ],
183 + pageInfo: { hasNextPage: true, endCursor: "cmt_cur" },
184 + },
185 + reactions: [
186 + { id: "r2", emoji: "🚀", user: THEO },
187 + { id: "r3", emoji: "🚀", user: JULIUS },
188 + { id: "r4", emoji: "🤷", user: THEO },
189 + ],
190 + attachments: {
191 + nodes: [
192 + {
193 + url: "https://github.com/acme/web/pull/12",
194 + title: "Fix it",
195 + sourceType: "github",
196 + metadata: { status: "merged" },
197 + },
198 + { url: "https://example.test/doc", title: "Doc", sourceType: null, metadata: {} },
199 + ],
200 + },
201 + history: {
202 + nodes: [
203 + {
204 + id: "h1",
205 + createdAt: "2026-07-01T01:00:00.000Z",
206 + actor: THEO,
207 + fromState: state("Todo", "unstarted"),
208 + toState: state("Done", "completed"),
209 + fromAssignee: null,
210 + toAssignee: JULIUS,
211 + addedLabels: [{ id: "lbl_bug", name: "Bug", color: "#f00" }],
212 + removedLabels: null,
213 + fromTitle: null,
214 + toTitle: null,
215 + },
216 + ],
217 + },
218 + }),
219 + }),
220 + });
221 + const api = yield* tracker;
222 + const detail = yield* api.getIssue({ ...target, key: "eng-7" });
223 + expect(detail.viewer).toBe("usr_julius");
224 + expect(detail.commentsCursor).toBe("cmt_cur");
225 + expect(detail.comments[0]?.reactions).toEqual([
226 + { content: "thumbs-up", count: 1, actors: [], viewerHasReacted: true },
227 + ]);
228 + // Grouped per emoji, the viewer left out of the names; an emoji outside the vocabulary is dropped.
229 + expect(detail.reactions).toEqual([
230 + { content: "rocket", count: 2, actors: ["theo"], viewerHasReacted: true },
231 + ]);
232 + expect(detail.events.map((event) => [event.kind, event.detail])).toEqual([
233 + ["closed", "Done"],
234 + ["labeled", "Bug"],
235 + ["assigned", "julius"],
236 + ]);
237 + expect(detail.linkedPullRequests).toEqual([
238 + expect.objectContaining({ repository: "acme/web", number: 12, state: "merged" }),
239 + ]);
240 +
241 + const missing = yield* Effect.flip(api.getIssue({ ...target, key: "123" }));
242 + expect(missing.reason).toBe("not-found");
243 + }),
244 + );
245 +
246 + it.effect("closes through the team's completed state, without a key or outside the team", () =>
247 + Effect.gen(function* () {
248 + const updates: Array<Record<string, unknown>> = [];
249 + const { tracker } = fakeLinear(
250 + {
251 + T3Team: () => ({
252 + teams: {
253 + nodes: [
254 + {
255 + id: "team_eng",
256 + key: "ENG",
257 + name: "Engineering",
258 + states: {
259 + nodes: [
260 + state("Canceled", "canceled", 3),
261 + state("Done", "completed", 2),
262 + state("Todo", "unstarted", 1),
263 + ],
264 + pageInfo: { hasNextPage: false, endCursor: null },
265 + },
266 + labels: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
267 + members: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
268 + templates: { nodes: [] },
269 + },
270 + ],
271 + },
272 + issueLabels: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
273 + }),
274 + T3IssueUpdate: (variables) => {
275 + updates.push(variables);
276 + return { issueUpdate: { success: true } };
277 + },
278 + },
279 + null,
280 + );
281 + const api = yield* tracker;
282 + const unauthenticated = yield* Effect.flip(
283 + api.setState({ ...target, key: "ENG-1", state: "closed" }),
284 + );
285 + expect(unauthenticated.reason).toBe("unauthenticated");
286 +
287 + const connected = fakeLinear({
288 + T3Team: () => ({
289 + teams: {
290 + nodes: [
291 + {
292 + id: "team_eng",
293 + key: "ENG",
294 + name: "Engineering",
295 + states: {
296 + nodes: [
297 + state("Canceled", "canceled", 3),
298 + state("Done", "completed", 2),
299 + state("Todo", "unstarted", 1),
300 + ],
301 + pageInfo: { hasNextPage: false, endCursor: null },
302 + },
303 + labels: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
304 + members: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
305 + templates: { nodes: [] },
306 + },
307 + ],
308 + },
309 + issueLabels: { nodes: [], pageInfo: { hasNextPage: false, endCursor: null } },
310 + }),
311 + T3Issue: (variables) => ({ issue: bareDetail(String(variables.id)) }),
312 + T3IssueUpdate: (variables) => {
313 + updates.push(variables);
314 + return { issueUpdate: { success: true } };
315 + },
316 + });
317 + const live = yield* connected.tracker;
318 + // An identifier from another team resolves in Linear, so the team is checked before writing.
319 + const foreign = yield* Effect.flip(
320 + live.setState({ ...target, key: "OPS-3", state: "closed" }),
321 + );
322 + expect(foreign.detail).toContain("OPS");
323 + yield* live.setState({ ...target, key: "ENG-1", state: "closed", closeReason: "canceled" });
324 + yield* live.setState({ ...target, key: "ENG-1", state: "closed" });
325 + yield* live.setState({ ...target, key: "ENG-1", state: "open" });
326 + expect(updates.map((update) => update.input)).toEqual([
327 + { stateId: "st_canceled" },
328 + { stateId: "st_done" },
329 + { stateId: "st_todo" },
330 + ]);
331 + }),
332 + );
333 +
334 + it("offers plain templates as drafts and form or rich ones as links into Linear", () => {
335 + const labels = new Map([["lbl_bug", "Bug"]]);
336 + const plain = LinearIssueTracker.toTemplate(
337 + {
338 + id: "tpl_1",
339 + name: "Bug report",
340 + description: "For bugs",
341 + content: "## Steps",
342 + type: "issue",
343 + hasFormFields: false,
344 + templateData: { title: "Bug: ", labelIds: ["lbl_bug", "lbl_unknown"], assigneeId: null },
345 + },
346 + "ENG",
347 + labels,
348 + );
349 + expect(plain).toEqual({
350 + template: {
351 + key: "tpl_1",
352 + name: "Bug report",
353 + about: "For bugs",
354 + title: "Bug: ",
355 + body: "## Steps",
356 + labels: ["Bug"],
357 + assignees: [],
358 + },
359 + });
360 + const form = LinearIssueTracker.toTemplate(
361 + {
362 + id: "tpl_2",
363 + name: "Intake",
364 + description: null,
365 + content: null,
366 + type: "issue",
367 + hasFormFields: true,
368 + templateData: {},
369 + },
370 + "ENG",
371 + labels,
372 + );
373 + expect(form).toEqual({
374 + link: { name: "Intake", about: "", url: "https://linear.app/team/ENG/new?template=tpl_2" },
375 + });
376 + });
377 +});
packages/issue-tracker-linear/src/server/LinearIssueTracker.ts new
+566
@@ -0,0 +1,566 @@
1 +/**
2 + * Linear as an issue tracker. A scope is a team key (`ENG`) and an issue key its identifier
3 + * (`ENG-123`). A workflow state is closed when its type is `completed` or `canceled`, so closing
4 + * picks the team's first state of that type, as Linear's own "Done" and "Canceled" do.
5 + */
6 +import * as Effect from "effect/Effect";
7 +import * as Schema from "effect/Schema";
8 +import {
9 + type IssueActor,
10 + type IssueCapabilities,
11 + type IssueComment,
12 + type IssueEvent,
13 + type IssueExternalTemplate,
14 + type IssueInvolvement,
15 + type IssueLinkedPullRequest,
16 + type IssueReaction,
17 + type IssueReactionContent,
18 + type IssueState,
19 + type IssueTemplate,
20 + type IssueViewerPermissions,
21 + type StandaloneIssueTrackerDescriptor,
22 +} from "@t3tools/contracts";
23 +import {
24 + IssueTrackerError,
25 + type StandaloneIssueTrackerApi,
26 + type TrackerIssueSummary,
27 +} from "@t3tools/source-control-core/server/IssueTracker";
28 +
29 +import * as LinearApi from "./LinearApi.ts";
30 +
31 +const DESCRIPTOR: StandaloneIssueTrackerDescriptor = {
32 + tracker: LinearApi.KIND,
33 + displayName: "Linear",
34 + host: "linear.app",
35 + scopeNoun: "team",
36 + credential: {
37 + label: "Personal API key",
38 + helpUrl: "https://linear.app/settings/account/security",
39 + },
40 +};
41 +
42 +/**
43 + * Only the two categories here: Linear's actual columns differ per team and are offered to the
44 + * detail page through `getIssue`'s state, while the service's `setState` guard needs a fixed list.
45 + * The driver maps `open` to the team's default state and `closed` to its first completed state,
46 + * with `canceled` as the close reason for its first canceled state.
47 + */
48 +const CAPABILITIES: IssueCapabilities = {
49 + create: true,
50 + edit: true,
51 + comment: true,
52 + labels: true,
53 + assignees: true,
54 + reactions: true,
55 + templates: true,
56 + linkedPullRequests: true,
57 + events: true,
58 + search: true,
59 + states: [
60 + { category: "open", name: "open" },
61 + { category: "closed", name: "closed" },
62 + ],
63 + closeReasons: ["completed", "canceled"],
64 +};
65 +
66 +/** Everything granted: Linear's API reports no per-issue permissions and refuses with a message. */
67 +const VIEWER_PERMISSIONS: IssueViewerPermissions = {
68 + setState: true,
69 + comment: true,
70 + edit: true,
71 + labels: true,
72 + assignees: true,
73 +};
74 +
75 +const COMMENTS_PAGE = 50;
76 +const CLOSED_STATE_TYPES = ["completed", "canceled"];
77 +
78 +/** Linear reacts with the emoji itself; GitHub's names are the contract's vocabulary. */
79 +const EMOJI_BY_CONTENT: Record<IssueReactionContent, string> = {
80 + "thumbs-up": "👍",
81 + "thumbs-down": "👎",
82 + laugh: "😄",
83 + hooray: "🎉",
84 + confused: "😕",
85 + heart: "❤️",
86 + rocket: "🚀",
87 + eyes: "👀",
88 +};
89 +const CONTENT_BY_EMOJI = new Map(
90 + Object.entries(EMOJI_BY_CONTENT).map(([content, emoji]) => [
91 + emoji,
92 + content as IssueReactionContent,
93 + ]),
94 +);
95 +
96 +/** `ENG-123`, or null for anything that is not a Linear identifier. */
97 +function parseIdentifier(key: string): string | null {
98 + return /^[A-Za-z][A-Za-z0-9]*-[1-9]\d*$/.test(key.trim()) ? key.trim().toUpperCase() : null;
99 +}
100 +
101 +function toState(state: LinearApi.LinearWorkflowState): IssueState {
102 + return CLOSED_STATE_TYPES.includes(state.type)
103 + ? { category: "closed", name: state.name, closeReason: state.type }
104 + : { category: "open", name: state.name };
105 +}
106 +
107 +/** Linear identifies people by id, so that is the login; the display name is what people see. */
108 +function toActor(user: LinearApi.LinearUser): IssueActor {
109 + return {
110 + login: user.id,
111 + name: user.displayName ?? user.name,
112 + avatarUrl: user.avatarUrl ?? null,
113 + };
114 +}
115 +
116 +/** How a user shows in a picker and an event: display name first, falling back to the id. */
117 +function userName(user: LinearApi.LinearUser): string {
118 + return user.displayName ?? user.name ?? user.email ?? user.id;
119 +}
120 +
121 +/** Linear's connections report no totals, so a listing shows no comment count. */
122 +function toSummary(issue: LinearApi.LinearIssue, commentCount = 0): TrackerIssueSummary {
123 + return {
124 + key: issue.identifier,
125 + displayKey: issue.identifier,
126 + title: issue.title,
127 + url: issue.url,
128 + author: issue.creator === null ? null : toActor(issue.creator),
129 + state: toState(issue.state),
130 + createdAt: issue.createdAt,
131 + updatedAt: issue.updatedAt,
132 + closedAt: issue.completedAt ?? issue.canceledAt ?? null,
133 + assignees: issue.assignee === null ? [] : [toActor(issue.assignee)],
134 + labels: issue.labels.nodes.map((label) => ({ name: label.name, color: label.color })),
135 + commentCount,
136 + };
137 +}
138 +
139 +function toReactions(
140 + reactions: ReadonlyArray<LinearApi.LinearReaction>,
141 + viewerId: string | null,
142 +): IssueReaction[] {
143 + const grouped = new Map<IssueReactionContent, IssueReaction>();
144 + for (const reaction of reactions) {
145 + const content = CONTENT_BY_EMOJI.get(reaction.emoji);
146 + if (content === undefined) continue;
147 + const mine = reaction.user !== null && reaction.user.id === viewerId;
148 + const existing = grouped.get(content);
149 + const actor = reaction.user === null || mine ? [] : [userName(reaction.user)];
150 + grouped.set(
151 + content,
152 + existing === undefined
153 + ? { content, count: 1, actors: actor, viewerHasReacted: mine }
154 + : {
155 + ...existing,
156 + count: existing.count + 1,
157 + actors: [...existing.actors, ...actor],
158 + viewerHasReacted: existing.viewerHasReacted || mine,
159 + },
160 + );
161 + }
162 + return [...grouped.values()];
163 +}
164 +
165 +function toComment(comment: LinearApi.LinearComment, viewerId: string | null): IssueComment {
166 + return {
167 + id: comment.id,
168 + author: comment.user === null ? null : toActor(comment.user),
169 + body: comment.body,
170 + createdAt: comment.createdAt,
171 + url: comment.url,
172 + reactions: toReactions(comment.reactions, viewerId),
173 + };
174 +}
175 +
176 +function toEvents(history: ReadonlyArray<LinearApi.LinearHistoryEntry>): IssueEvent[] {
177 + const events: IssueEvent[] = [];
178 + for (const entry of history) {
179 + const actor = entry.actor === null ? null : toActor(entry.actor);
180 + const add = (kind: IssueEvent["kind"], detail: string | null, suffix: string) =>
181 + events.push({ id: `${entry.id}:${suffix}`, kind, actor, createdAt: entry.createdAt, detail });
182 + if (entry.toState !== null && entry.toState.id !== entry.fromState?.id) {
183 + const wasClosed =
184 + entry.fromState !== null && CLOSED_STATE_TYPES.includes(entry.fromState.type);
185 + const isClosed = CLOSED_STATE_TYPES.includes(entry.toState.type);
186 + add(
187 + isClosed && !wasClosed ? "closed" : wasClosed && !isClosed ? "reopened" : "state-changed",
188 + entry.toState.name,
189 + "state",
190 + );
191 + }
192 + for (const label of entry.addedLabels ?? []) add("labeled", label.name, `label+${label.id}`);
193 + for (const label of entry.removedLabels ?? [])
194 + add("unlabeled", label.name, `label-${label.id}`);
195 + if (entry.fromAssignee !== null && entry.fromAssignee.id !== entry.toAssignee?.id)
196 + add("unassigned", userName(entry.fromAssignee), "unassigned");
197 + if (entry.toAssignee !== null && entry.toAssignee.id !== entry.fromAssignee?.id)
198 + add("assigned", userName(entry.toAssignee), "assigned");
199 + if (entry.toTitle !== null && entry.toTitle !== entry.fromTitle)
200 + add("renamed", entry.toTitle, "title");
201 + }
202 + return events;
203 +}
204 +
205 +const PULL_REQUEST_URL =
206 + /^https:\/\/(?:github\.com\/([^/]+\/[^/]+)\/pull|gitlab\.com\/(.+?)\/-\/merge_requests)\/(\d+)\/?(?:[?#]|$)/u;
207 +
208 +const isJsonObject = Schema.is(Schema.Record(Schema.String, Schema.Json));
209 +
210 +/** Linear's GitHub and GitLab integrations record change requests as attachments. */
211 +function toLinkedPullRequests(
212 + attachments: ReadonlyArray<LinearApi.LinearAttachment>,
213 +): IssueLinkedPullRequest[] {
214 + const seen = new Set<string>();
215 + return attachments.flatMap((attachment) => {
216 + const match = PULL_REQUEST_URL.exec(attachment.url);
217 + if (match === null || seen.has(attachment.url)) return [];
218 + seen.add(attachment.url);
219 + const fields = isJsonObject(attachment.metadata) ? attachment.metadata : {};
220 + const status = fields["status"];
221 + return [
222 + {
223 + repository: match[1] ?? match[2]!,
224 + number: Number(match[3]),
225 + title: attachment.title.trim() || attachment.url,
226 + url: attachment.url,
227 + state: status === "merged" ? "merged" : status === "closed" ? "closed" : "open",
228 + isDraft: status === "draft" || fields["draft"] === true,
229 + closesIssue: false,
230 + } as const,
231 + ];
232 + });
233 +}
234 +
235 +/**
236 + * A template the composer can hold: markdown content, no form fields. Anything else is offered
237 + * as a link into Linear, where the exact template renders.
238 + */
239 +export function toTemplate(
240 + template: LinearApi.LinearTemplate,
241 + teamKey: string,
242 + labelNames: ReadonlyMap<string, string>,
243 +): { readonly template: IssueTemplate } | { readonly link: IssueExternalTemplate } {
244 + const data = template.templateData;
245 + const body = template.content ?? (typeof data.description === "string" ? data.description : null);
246 + if (template.hasFormFields || (body === null && data.descriptionData != null)) {
247 + const url = new URL(`https://linear.app/team/${encodeURIComponent(teamKey)}/new`);
248 + url.searchParams.set("template", template.id);
249 + return { link: { name: template.name, about: template.description ?? "", url: url.href } };
250 + }
251 + return {
252 + template: {
253 + key: template.id,
254 + name: template.name,
255 + about: template.description ?? "",
256 + title: data.title ?? "",
257 + body: body ?? "",
258 + labels: (data.labelIds ?? []).flatMap((id) => {
259 + const name = labelNames.get(id);
260 + return name === undefined ? [] : [name];
261 + }),
262 + assignees: data.assigneeId ? [data.assigneeId] : [],
263 + },
264 + };
265 +}
266 +
267 +function involvementFilter(input: {
268 + readonly involvement: IssueInvolvement;
269 + readonly viewer: string;
270 +}): LinearApi.IssueFilter {
271 + switch (input.involvement) {
272 + case "assigned":
273 + return { assignee: { id: { eq: input.viewer } } };
274 + case "authored":
275 + return { creator: { id: { eq: input.viewer } } };
276 + case "mentioned":
277 + return { subscribers: { some: { id: { eq: input.viewer } } } };
278 + case "all":
279 + return {};
280 + }
281 +}
282 +
283 +const notFound = (operation: string) =>
284 + new IssueTrackerError({
285 + tracker: LinearApi.KIND,
286 + operation,
287 + reason: "not-found",
288 + detail: "Linear has no issue by that identifier, or this account cannot see it.",
289 + });
290 +
291 +const failed = (operation: string, detail: string) =>
292 + new IssueTrackerError({ tracker: LinearApi.KIND, operation, reason: "failed", detail });
293 +
294 +export const make: Effect.Effect<StandaloneIssueTrackerApi, never, LinearApi.LinearApi> =
295 + Effect.gen(function* () {
296 + const linear = yield* LinearApi.LinearApi;
297 +
298 + const requireIdentifier = (operation: string, key: string) => {
299 + const identifier = parseIdentifier(key);
300 + return identifier === null ? Effect.fail(notFound(operation)) : Effect.succeed(identifier);
301 + };
302 +
303 + /**
304 + * The issue a write names, refused unless it sits in the bound team: an identifier from
305 + * another team, or one that moved away, still resolves in Linear.
306 + */
307 + const requireTeamIssue = Effect.fn("LinearIssueTracker.requireTeamIssue")(function* (
308 + operation: string,
309 + input: { readonly scope: string; readonly key: string },
310 + ) {
311 + const identifier = yield* requireIdentifier(operation, input.key);
312 + const issue = yield* linear.getIssue(identifier, 0);
313 + if (issue === null) return yield* notFound(operation);
314 + const team = input.scope.trim().toUpperCase();
315 + if (issue.team.key !== team) {
316 + return yield* failed(
317 + operation,
318 + `${issue.identifier} belongs to Linear team ${issue.team.key}, not ${team}.`,
319 + );
320 + }
321 + return issue;
322 + });
323 +
324 + const requireTeam = (operation: string, scope: string) =>
325 + linear.getTeam(scope.trim().toUpperCase()).pipe(
326 + Effect.filterOrFail(
327 + (team): team is LinearApi.LinearTeamScope => team !== null,
328 + () => failed(operation, `No Linear team has the key "${scope}".`),
329 + ),
330 + );
331 +
332 + /** Names to label ids, within the team's and the workspace's labels. */
333 + const labelIds = (
334 + operation: string,
335 + scope: LinearApi.LinearTeamScope,
336 + names: ReadonlyArray<string>,
337 + ) =>
338 + Effect.forEach(names, (name) => {
339 + const match = [...scope.team.labels.nodes, ...scope.workspaceLabels].find(
340 + (label) => label.name.toLowerCase() === name.trim().toLowerCase(),
341 + );
342 + return match === undefined
343 + ? Effect.fail(failed(operation, `Linear has no label named "${name}" for this team.`))
344 + : Effect.succeed(match.id);
345 + });
346 +
347 + /** One assignee at most: Linear issues have a single assignee. */
348 + const assigneeId = (
349 + operation: string,
350 + scope: LinearApi.LinearTeamScope,
351 + assignees: ReadonlyArray<string>,
352 + ): Effect.Effect<string | null, IssueTrackerError> => {
353 + const [first, ...rest] = assignees;
354 + if (first === undefined) return Effect.succeed(null);
355 + if (rest.length > 0)
356 + return Effect.fail(failed(operation, "A Linear issue has one assignee at most."));
357 + const member = scope.team.members.nodes.find(
358 + (user) =>
359 + user.id === first ||
360 + user.email?.toLowerCase() === first.toLowerCase() ||
361 + user.displayName?.toLowerCase() === first.toLowerCase(),
362 + );
363 + return member === undefined
364 + ? Effect.fail(failed(operation, `"${first}" is not a member of this Linear team.`))
365 + : Effect.succeed(member.id);
366 + };
367 +
368 + const viewerId: Effect.Effect<string | null> = linear.viewer().pipe(
369 + Effect.map((data) => data.viewer.id),
370 + Effect.orElseSucceed(() => null),
371 + );
372 +
373 + const api: StandaloneIssueTrackerApi = {
374 + kind: LinearApi.KIND,
375 + capabilities: CAPABILITIES,
376 + standalone: DESCRIPTOR,
377 +
378 + probeCredential: (token) =>
379 + linear.viewer(token).pipe(
380 + Effect.map((data) => ({
381 + account: userName(data.viewer),
382 + scopes: data.teams.map((team) => ({ key: team.key, name: team.name })),
383 + })),
384 + ),
385 +
386 + // The id, not the display name: it is what the involvement filters compare against.
387 + getViewer: () => linear.viewer().pipe(Effect.map((data) => data.viewer.id)),
388 +
389 + listIssues: (input) => {
390 + // `ENG-12`, `#12` or `12` asks for one issue of this team by number.
391 + const reference =
392 + input.query === undefined
393 + ? null
394 + : /^(?:[A-Za-z][A-Za-z0-9]*-|#)?(\d+)$/.exec(input.query.trim());
395 + const filter: LinearApi.IssueFilter = {
396 + team: { key: { eq: input.scope.trim().toUpperCase() } },
397 + ...involvementFilter(input),
398 + ...(input.state === "all"
399 + ? {}
400 + : {
401 + state: {
402 + type:
403 + input.state === "closed"
404 + ? { in: CLOSED_STATE_TYPES }
405 + : { nin: CLOSED_STATE_TYPES },
406 + },
407 + }),
408 + ...(input.query === undefined
409 + ? {}
410 + : {
411 + or: [
412 + { title: { containsIgnoreCase: input.query } },
413 + { description: { containsIgnoreCase: input.query } },
414 + ...(reference === null ? [] : [{ number: { eq: Number(reference[1]) } }]),
415 + ],
416 + }),
417 + };
418 + return linear.listIssues({ filter, first: input.limit, after: input.cursor }).pipe(
419 + Effect.map((page) => ({
420 + items: page.nodes.map(toSummary),
421 + nextCursor: page.nextCursor,
422 + })),
423 + );
424 + },
425 +
426 + getIssue: Effect.fn("LinearIssueTracker.getIssue")(function* (input) {
427 + const identifier = yield* requireIdentifier("getIssue", input.key);
428 + const [issue, viewer] = yield* Effect.all([
429 + linear.getIssue(identifier, COMMENTS_PAGE),
430 + viewerId,
431 + ]);
432 + if (issue === null) return yield* notFound("getIssue");
433 + return {
434 + ...toSummary(issue, issue.comments.nodes.length),
435 + body: issue.description ?? "",
436 + viewer,
437 + viewerPermissions: VIEWER_PERMISSIONS,
438 + reactions: toReactions(issue.reactions, viewer),
439 + comments: issue.comments.nodes.map((comment) => toComment(comment, viewer)),
440 + commentsCursor: issue.comments.pageInfo.hasNextPage
441 + ? issue.comments.pageInfo.endCursor
442 + : null,
443 + events: toEvents(issue.history.nodes),
444 + linkedPullRequests: toLinkedPullRequests(issue.attachments.nodes),
445 + };
446 + }),
447 +
448 + getComments: Effect.fn("LinearIssueTracker.getComments")(function* (input) {
449 + const identifier = yield* requireIdentifier("getComments", input.key);
450 + const [page, viewer] = yield* Effect.all([
451 + linear.getComments({ identifier, first: COMMENTS_PAGE, after: input.cursor }),
452 + viewerId,
453 + ]);
454 + return {
455 + comments: page.nodes.map((comment) => toComment(comment, viewer)),
456 + nextCursor: page.nextCursor,
457 + };
458 + }),
459 +
460 + create: Effect.fn("LinearIssueTracker.create")(function* (input) {
461 + const scope = yield* requireTeam("create", input.scope);
462 + const labels = yield* labelIds("create", scope, input.labels);
463 + const assignee = yield* assigneeId("create", scope, input.assignees);
464 + const created = yield* linear.createIssue({
465 + teamId: scope.team.id,
466 + title: input.title,
467 + description: input.body,
468 + labelIds: labels,
469 + ...(assignee === null ? {} : { assigneeId: assignee }),
470 + });
471 + return { key: created.identifier, displayKey: created.identifier, url: created.url };
472 + }),
473 +
474 + comment: Effect.fn("LinearIssueTracker.comment")(function* (input) {
475 + const issue = yield* requireTeamIssue("comment", input);
476 + yield* linear.createComment({ issueId: issue.id, body: input.body });
477 + }),
478 +
479 + update: Effect.fn("LinearIssueTracker.update")(function* (input) {
480 + const { identifier } = yield* requireTeamIssue("update", input);
481 + const scope =
482 + input.labels !== undefined || input.assignees !== undefined
483 + ? yield* requireTeam("update", input.scope)
484 + : null;
485 + yield* linear.updateIssue(identifier, {
486 + ...(input.title === undefined ? {} : { title: input.title }),
487 + ...(input.body === undefined ? {} : { description: input.body }),
488 + ...(scope === null || input.labels === undefined
489 + ? {}
490 + : { labelIds: yield* labelIds("update", scope, input.labels) }),
491 + ...(scope === null || input.assignees === undefined
492 + ? {}
493 + : { assigneeId: yield* assigneeId("update", scope, input.assignees) }),
494 + });
495 + }),
496 +
497 + setState: Effect.fn("LinearIssueTracker.setState")(function* (input) {
498 + const { identifier } = yield* requireTeamIssue("setState", input);
499 + const scope = yield* requireTeam("setState", input.scope);
500 + const states = scope.team.states.nodes.toSorted(
501 + (a, b) => (a.position ?? 0) - (b.position ?? 0),
502 + );
503 + const wanted =
504 + input.state === "closed"
505 + ? states.find((state) => state.type === (input.closeReason ?? "completed"))
506 + : (states.find((state) => state.type === "unstarted") ??
507 + states.find((state) => state.type === "backlog") ??
508 + states.find((state) => state.type === "triage"));
509 + if (wanted === undefined)
510 + return yield* failed("setState", "This team has no workflow state for that change.");
511 + yield* linear.updateIssue(identifier, { stateId: wanted.id });
512 + }),
513 +
514 + setReaction: Effect.fn("LinearIssueTracker.setReaction")(function* (input) {
515 + const issue = yield* requireTeamIssue("setReaction", input);
516 + const emoji = EMOJI_BY_CONTENT[input.content];
517 + const target =
518 + input.subjectId === undefined ? { issueId: issue.id } : { commentId: input.subjectId };
519 + if (input.reacted) {
520 + yield* linear.createReaction({ ...target, emoji });
521 + return;
522 + }
523 + const viewer = yield* viewerId;
524 + const reactions = yield* linear.listReactions(target);
525 + const own = reactions.find(
526 + (reaction) => reaction.emoji === emoji && reaction.user?.id === viewer,
527 + );
528 + if (own !== undefined) yield* linear.deleteReaction(own.id);
529 + }),
530 +
531 + listTemplates: (input) =>
532 + requireTeam("listTemplates", input.scope).pipe(
533 + Effect.map((scope) => {
534 + const labelNames = new Map(
535 + [...scope.team.labels.nodes, ...scope.workspaceLabels].map((label) => [
536 + label.id,
537 + label.name,
538 + ]),
539 + );
540 + const templates: IssueTemplate[] = [];
541 + const externalTemplates: IssueExternalTemplate[] = [];
542 + for (const template of scope.team.templates.nodes) {
543 + if (template.type !== "issue") continue;
544 + const mapped = toTemplate(template, scope.team.key, labelNames);
545 + if ("template" in mapped) templates.push(mapped.template);
546 + else externalTemplates.push(mapped.link);
547 + }
548 + return { templates, externalTemplates, blankIssuesEnabled: true };
549 + }),
550 + ),
551 +
552 + listCandidates: (input) =>
553 + requireTeam("listCandidates", input.scope).pipe(
554 + Effect.map((scope) => ({
555 + labels: [...scope.team.labels.nodes, ...scope.workspaceLabels].map((label) => ({
556 + name: label.name,
557 + color: label.color,
558 + description: label.description ?? null,
559 + })),
560 + assignees: scope.team.members.nodes.map((user) => ({ ...toActor(user), id: user.id })),
561 + truncated: scope.truncated,
562 + })),
563 + ),
564 + };
565 + return api;
566 + });
packages/issue-tracker-linear/src/server/driver.ts new
+12
@@ -0,0 +1,12 @@
1 +import * as Effect from "effect/Effect";
2 +
3 +import * as LinearApi from "./LinearApi.ts";
4 +import * as LinearIssueTracker from "./LinearIssueTracker.ts";
5 +
6 +/**
7 + * The Linear tracker over its own API client. Needs the platform HttpClient, and the server's
8 + * `IssueTrackerHost` for the API key saved in Settings.
9 + */
10 +export const make = LinearIssueTracker.make.pipe(
11 + Effect.provideServiceEffect(LinearApi.LinearApi, LinearApi.make),
12 +);
packages/issue-tracker-linear/tsconfig.json new
+7
@@ -0,0 +1,7 @@
1 +{
2 + "extends": "../../tsconfig.base.json",
3 + "compilerOptions": {
4 + "types": ["node"]
5 + },
6 + "include": ["src"]
7 +}
packages/source-control-bitbucket/src/server/BitbucketApi.ts
+1 -1
@@ -609,7 +609,7 @@ function authFromCredential(credential: BitbucketCredential | null): SourceContr
609 account: Option.none(),
610 host: Option.some("bitbucket.org"),
611 detail: Option.some(
612 - "Add a Bitbucket token in Settings → Source Control, or set the T3CODE_BITBUCKET_* environment variables on the server.",
612 + "Add a Bitbucket token in Settings → Source control & issues, or set the T3CODE_BITBUCKET_* environment variables on the server.",
613 ),
614 };
615 }
packages/source-control-bitbucket/src/server/BitbucketPullRequestProvider.ts
+3 -2
@@ -38,9 +38,10 @@ const CAPABILITIES: PullRequestCapabilities = {
38 };
39
40 const UNAVAILABLE_REQUIREMENT = {
41 - missing: "Bitbucket needs API credentials on the server. Add them in Settings → Source Control.",
41 + missing:
42 + "Bitbucket needs API credentials on the server. Add them in Settings → Source control & issues.",
43 unauthenticated:
43 - "Bitbucket rejected the configured credentials. Check them in Settings → Source Control.",
44 + "Bitbucket rejected the configured credentials. Check them in Settings → Source control & issues.",
45 };
46
47 /**
packages/source-control-bitbucket/src/server/BitbucketSourceControlProvider.ts
+1 -1
@@ -220,7 +220,7 @@ export const makeDiscovery = Effect.gen(function* () {
220 type: "api",
221 kind: SourceControlProviderKind.make("bitbucket"),
222 label: "Bitbucket",
223 - installHint: "Add a Bitbucket token in Settings → Source Control.",
223 + installHint: "Add a Bitbucket token in Settings → Source control & issues.",
224 probeAuth: bitbucket.probeAuth,
225 } satisfies SourceControlApiDiscoverySpec;
226 });
packages/source-control-core/package.json
+4
@@ -39,6 +39,10 @@
39 "types": "./src/server/IssueTracker.ts",
40 "import": "./src/server/IssueTracker.ts"
41 },
42 + "./server/IssueTrackerHost": {
43 + "types": "./src/server/IssueTrackerHost.ts",
44 + "import": "./src/server/IssueTrackerHost.ts"
45 + },
46 "./server/PullRequestProvider": {
47 "types": "./src/server/PullRequestProvider.ts",
48 "import": "./src/server/PullRequestProvider.ts"
packages/source-control-core/src/server/IssueTracker.ts
+26
@@ -19,7 +19,9 @@ import type {
19 IssueSummary,
20 IssueTemplateList,
21 IssueTrackerKind,
22 + IssueTrackerScope,
23 IssueViewerPermissions,
24 + StandaloneIssueTrackerDescriptor,
25 } from "@t3tools/contracts";
26 import { IssueTrackerKind as IssueTrackerKindSchema } from "@t3tools/contracts";
27
@@ -176,3 +178,27 @@ export interface IssueTrackerApi {
178 input: IssueScopeTarget,
179 ) => Effect.Effect<IssueCandidates, IssueTrackerError>;
180 }
181 +
182 +/**
183 + * A tracker reached with its own credential rather than a checkout's: Linear, Jira. The server
184 + * stores one credential per kind and offers the connect flow from `standalone`; a project reads
185 + * the tracker by binding one of the scopes `probeCredential` lists. The `cwd` on every target is
186 + * then only the project's root, which such a tracker ignores.
187 + */
188 +export interface StandaloneIssueTrackerApi extends IssueTrackerApi {
189 + readonly standalone: StandaloneIssueTrackerDescriptor;
190 + /**
191 + * Who a credential signs in as and which scopes it reaches, asked of the tracker itself. Run on
192 + * a credential before it is stored, and on the stored one to report connection status.
193 + */
194 + readonly probeCredential: (
195 + token: string,
196 + ) => Effect.Effect<
197 + { readonly account: string; readonly scopes: ReadonlyArray<IssueTrackerScope> },
198 + IssueTrackerError
199 + >;
200 +}
201 +
202 +export function isStandaloneIssueTracker(api: IssueTrackerApi): api is StandaloneIssueTrackerApi {
203 + return "standalone" in api;
204 +}
packages/source-control-core/src/server/IssueTrackerHost.ts new
+22
@@ -0,0 +1,22 @@
1 +/**
2 + * What a standalone tracker package may ask of the server it runs in: the credential the user
3 + * saved in Settings. Git-host trackers never need it; their CLIs carry their own credentials.
4 + */
5 +import type { IssueTrackerKind } from "@t3tools/contracts";
6 +import * as Context from "effect/Context";
7 +import type * as Effect from "effect/Effect";
8 +import type * as Option from "effect/Option";
9 +
10 +import type { IssueTrackerError } from "./IssueTracker.ts";
11 +
12 +export class IssueTrackerHost extends Context.Service<
13 + IssueTrackerHost,
14 + {
15 + readonly credentials: {
16 + /** Read fresh on each call, so a credential saved in Settings applies without a restart. */
17 + readonly get: (
18 + tracker: IssueTrackerKind,
19 + ) => Effect.Effect<Option.Option<string>, IssueTrackerError>;
20 + };
21 + }
22 +>()("@t3tools/source-control-core/server/IssueTrackerHost") {}
packages/source-control-github/src/server/GitHubAppSignIn.ts
+1 -1
@@ -73,7 +73,7 @@ export class GitHubAppSessionError extends Schema.TaggedError<GitHubAppSessionEr
73 { host: Schema.String, cause: Schema.Defect() },
74 ) {
75 override get message(): string {
76 - return `Could not refresh the ${GitHubClient.APP_SIGN_IN.appName} sign-in for ${this.host}. Check the server's connection to GitHub, or sign in again in Settings → Source Control.`;
76 + return `Could not refresh the ${GitHubClient.APP_SIGN_IN.appName} sign-in for ${this.host}. Check the server's connection to GitHub, or sign in again in Settings → Source control & issues.`;
77 }
78 }
79
packages/source-control-github/src/server/GitHubCredentials.ts
+2 -2
@@ -59,7 +59,7 @@ export class GitHubNotSignedInError extends Schema.TaggedError<GitHubNotSignedIn
59 override get message(): string {
60 return this.account === undefined
61 ? `No GitHub credential for ${this.host}: run \`gh auth login --hostname ${this.host}\`.`
62 - : `No GitHub credential for ${this.account} on ${this.host}: run \`gh auth login --hostname ${this.host}\` for that account or pick another in Settings → Source Control.`;
62 + : `No GitHub credential for ${this.account} on ${this.host}: run \`gh auth login --hostname ${this.host}\` for that account or pick another in Settings → Source control & issues.`;
63 }
64 }
65
@@ -68,7 +68,7 @@ export class GitHubHostDisabledError extends Schema.TaggedError<GitHubHostDisabl
68 { host: Schema.String },
69 ) {
70 override get message(): string {
71 - return `GitHub host ${this.host} is turned off in Settings → Source Control.`;
71 + return `GitHub host ${this.host} is turned off in Settings → Source control & issues.`;
72 }
73 }
74
packages/source-control-github/src/server/GitHubPullRequestProvider.ts
+3 -3
@@ -66,7 +66,7 @@ const UNAVAILABLE_REQUIREMENT = {
66 missing:
67 "No GitHub credential on the server. Set GH_TOKEN, or install the GitHub CLI (https://cli.github.com/) and run `gh auth login`.",
68 unauthenticated:
69 - "GitHub has no working credential for this host. Run `gh auth login`, or check the account and hosts in Settings → Source Control.",
69 + "GitHub has no working credential for this host. Run `gh auth login`, or check the account and hosts in Settings → Source control & issues.",
70 };
71
72 /**
@@ -144,9 +144,9 @@ function gitHubProviderFailure(
144
145 const REPOSITORY_ACCESS_HINTS: Record<Exclude<GitHubCredentialSource, "app">, string> = {
146 settings:
147 - "Your saved GitHub token can't see it. Give it access, or change it in Settings → Source Control.",
147 + "Your saved GitHub token can't see it. Give it access, or change it in Settings → Source control & issues.",
148 env: "The server's environment token can't see it. Give it access, or unset it.",
149 - gh: "Your gh login can't see it. Give it access, or save a token in Settings → Source Control.",
149 + gh: "Your gh login can't see it. Give it access, or save a token in Settings → Source control & issues.",
150 };
151
152 function withAvatar(
packages/source-control-github/src/server/GitHubSourceControlProvider.test.ts
+3 -1
@@ -1058,7 +1058,9 @@ it("reports unauthenticated when Settings turn off every signed-in host", () =>
1058 assert.strictEqual(auth.status, "unauthenticated");
1059 assert.deepStrictEqual(
1060 auth.detail,
1061 - Option.some("Every GitHub host gh is signed in to is turned off in Settings → Source Control."),
1061 + Option.some(
1062 + "Every GitHub host gh is signed in to is turned off in Settings → Source control & issues.",
1063 + ),
1064 );
1065 });
1066
packages/source-control-github/src/server/GitHubSourceControlProvider.ts
+4 -3
@@ -144,7 +144,8 @@ export function parseGitHubAuth(
144 ...providerAuth({
145 status: "unauthenticated",
146 host: fallback.host,
147 - detail: "Every GitHub host gh is signed in to is turned off in Settings → Source Control.",
147 + detail:
148 + "Every GitHub host gh is signed in to is turned off in Settings → Source control & issues.",
149 }),
150 ...accounts,
151 };
@@ -295,9 +296,9 @@ export const makeDiscovery = Effect.gen(function* () {
296 status: "unauthenticated",
297 host: "github.com",
298 detail: savedToken
298 - ? "GitHub refused the token saved in Settings. Replace or remove it in Settings → Source Control."
299 + ? "GitHub refused the token saved in Settings. Replace or remove it in Settings → Source control & issues."
300 : signedIn
300 - ? `GitHub refused the ${appName} sign-in. Sign in again in Settings → Source Control.`
301 + ? `GitHub refused the ${appName} sign-in. Sign in again in Settings → Source control & issues.`
302 : `GitHub refused the token in ${tokenSource}. Replace it, or unset it to use \`gh auth login\`.`,
303 })),
304 ...accounts,
pnpm-lock.yaml
+28
@@ -869,6 +869,9 @@ importers:
869 '@napi-rs/keyring':
870 specifier: ^1.3.0
871 version: 1.3.0
872 + '@t3tools/issue-tracker-linear':
873 + specifier: workspace:*
874 + version: link:../../packages/issue-tracker-linear
875 '@t3tools/provider-acp':
876 specifier: workspace:*
877 version: link:../../packages/provider-acp
@@ -1645,6 +1648,31 @@ importers:
1648 specifier: 1.4.0
1649 version: 1.4.0(@astrojs/compiler-rs@0.5.1)(@types/node@24.12.4)(@vitest/browser-playwright@5.0.5)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@6.0.3))(bufferutil@4.1.0)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(playwright@1.64.1)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1650
1651 + packages/issue-tracker-linear:
1652 + dependencies:
1653 + '@t3tools/contracts':
1654 + specifier: workspace:*
1655 + version: link:../contracts
1656 + '@t3tools/source-control-core':
1657 + specifier: workspace:*
1658 + version: link:../source-control-core
1659 + effect:
1660 + specifier: 4.1.3
1661 + version: 4.1.3
1662 + devDependencies:
1663 + '@effect/graphql-generator':
1664 + specifier: 'catalog:'
1665 + version: 4.1.2(@effect/platform-node@4.1.2(bufferutil@4.1.0)(effect@4.1.3)(redis@6.2.1)(utf-8-validate@6.0.6))(effect@4.1.3)
1666 + '@effect/vitest':
1667 + specifier: 4.1.2
1668 + version: 4.1.2(patch_hash=299510b71c36537a832a67e9d160a5f112a5f326a29e95c41cb45fc8234e47c7)(@astrojs/compiler-rs@0.5.1)(@types/node@24.12.4)(@vitest/browser-playwright@5.0.5)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@6.0.3))(bufferutil@4.1.0)(effect@4.1.3)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(playwright@1.64.1)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1669 + '@types/node':
1670 + specifier: 24.12.4
1671 + version: 24.12.4
1672 + vite-plus:
1673 + specifier: 1.4.0
1674 + version: 1.4.0(@astrojs/compiler-rs@0.5.1)(@types/node@24.12.4)(@vitest/browser-playwright@5.0.5)(@vitest/ui@5.0.5)(@volar/typescript@2.4.28(typescript@6.0.3))(bufferutil@4.1.0)(esbuild@0.28.2)(jiti@2.7.0)(jsdom@30.1.0(@noble/hashes@1.8.0))(playwright@1.64.1)(terser@5.48.0)(typescript@6.0.3)(unrun@0.2.39)(utf-8-validate@6.0.6)(yaml@2.9.0)
1675 +
1676 packages/provider-acp:
1677 dependencies:
1678 '@t3tools/contracts':
scripts/check-changed.ts
+5 -3
@@ -496,9 +496,11 @@ const checkChanged = Effect.fn("checkChanged")(function* (input: {
496 ).pipe(Effect.catch((error) => Effect.succeed({ ok: false, output: error.message })));
497
498 // CI's Lint job checks that generated GraphQL operations match their sources.
499 - const graphql = ["apps/server", "packages/source-control-github"].filter((dir) =>
500 - files.some((file) => file.startsWith(`${dir}/`)),
501 - );
499 + const graphql = [
500 + "apps/server",
501 + "packages/issue-tracker-linear",
502 + "packages/source-control-github",
503 + ].filter((dir) => files.some((file) => file.startsWith(`${dir}/`)));
504 const filters = (names: ReadonlyArray<string>) => names.flatMap((name) => ["--filter", name]);
505 const typecheckWorkers = Math.min(concurrency, affected.length);
506 const command = (name: string, args: ReadonlyArray<string>) => ({ name, run: vp(args) });
scripts/release-smoke.ts
+1
@@ -40,6 +40,7 @@ const workspaceFiles = [
40 "packages/provider-kiro/package.json",
41 "packages/provider-muse/package.json",
42 "packages/provider-opencode/package.json",
43 + "packages/issue-tracker-linear/package.json",
44 "packages/secret-provider-core/package.json",
45 "packages/secret-provider-definitions/package.json",
46 "packages/secret-provider-onepassword/package.json",