@astrale-domains/issues 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +78 -0
- package/README.md +65 -15
- package/dist/schema/.runtime/states/issue/index.d.ts +27 -0
- package/dist/schema/.runtime/states/issue/index.js +11 -0
- package/dist/schema/index.d.ts +6 -7
- package/dist/schema/index.js +5 -6
- package/dist/schema/{comment/relationships.d.ts → modules/comment/classes/comment-authored-by.d.ts} +2 -18
- package/dist/schema/modules/comment/classes/comment-authored-by.js +9 -0
- package/dist/schema/{comment/class.d.ts → modules/comment/classes/comment.d.ts} +36 -4
- package/dist/schema/modules/comment/classes/comment.js +17 -0
- package/dist/schema/modules/comment/classes/index.d.ts +3 -0
- package/dist/schema/modules/comment/classes/index.js +3 -0
- package/dist/schema/modules/comment/classes/issue-has-comment.d.ts +16 -0
- package/dist/schema/modules/comment/classes/issue-has-comment.js +10 -0
- package/dist/schema/modules/comment/functions/delete-comment.d.ts +7 -0
- package/dist/schema/modules/comment/functions/delete-comment.js +11 -0
- package/dist/schema/modules/comment/functions/edit-comment.d.ts +9 -0
- package/dist/schema/modules/comment/functions/edit-comment.js +11 -0
- package/dist/schema/modules/comment/functions/index.d.ts +2 -0
- package/dist/schema/modules/comment/functions/index.js +2 -0
- package/dist/schema/modules/comment/index.d.ts +4 -0
- package/dist/schema/modules/comment/index.js +4 -0
- package/dist/schema/modules/comment/policies/contribute-to-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/contribute-to-comment.js +12 -0
- package/dist/schema/modules/comment/policies/edit-own-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/edit-own-comment.js +6 -0
- package/dist/schema/modules/comment/policies/index.d.ts +4 -0
- package/dist/schema/modules/comment/policies/index.js +4 -0
- package/dist/schema/modules/comment/policies/traverse-comment-relationship.d.ts +1 -0
- package/dist/schema/modules/comment/policies/traverse-comment-relationship.js +17 -0
- package/dist/schema/modules/comment/policies/traverse-issue-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/traverse-issue-comment.js +14 -0
- package/dist/schema/modules/comment/types/comment.d.ts +5 -0
- package/dist/schema/modules/comment/types/comment.js +6 -0
- package/dist/schema/modules/comment/types/index.d.ts +1 -0
- package/dist/schema/modules/comment/types/index.js +1 -0
- package/dist/schema/modules/issue/classes/index.d.ts +5 -0
- package/dist/schema/modules/issue/classes/index.js +5 -0
- package/dist/schema/modules/issue/classes/issue-assigned-to.d.ts +16 -0
- package/dist/schema/modules/issue/classes/issue-assigned-to.js +9 -0
- package/dist/schema/modules/issue/classes/issue-reported-by.d.ts +16 -0
- package/dist/schema/modules/issue/classes/issue-reported-by.js +9 -0
- package/dist/schema/modules/issue/classes/issue-subtask-of.d.ts +19 -0
- package/dist/schema/modules/issue/classes/issue-subtask-of.js +10 -0
- package/dist/schema/modules/issue/classes/issue.d.ts +258 -0
- package/dist/schema/modules/issue/classes/issue.js +35 -0
- package/dist/schema/modules/issue/classes/project-contains-issue.d.ts +16 -0
- package/dist/schema/modules/issue/classes/project-contains-issue.js +10 -0
- package/dist/schema/modules/issue/functions/add-issue-comment.d.ts +9 -0
- package/dist/schema/modules/issue/functions/add-issue-comment.js +11 -0
- package/dist/schema/modules/issue/functions/archive-issue.d.ts +7 -0
- package/dist/schema/modules/issue/functions/archive-issue.js +11 -0
- package/dist/schema/modules/issue/functions/assign-issue.d.ts +9 -0
- package/dist/schema/modules/issue/functions/assign-issue.js +11 -0
- package/dist/schema/modules/issue/functions/index.d.ts +7 -0
- package/dist/schema/modules/issue/functions/index.js +7 -0
- package/dist/schema/modules/issue/functions/set-issue-parent.d.ts +9 -0
- package/dist/schema/modules/issue/functions/set-issue-parent.js +11 -0
- package/dist/schema/modules/issue/functions/set-issue-tags.d.ts +9 -0
- package/dist/schema/modules/issue/functions/set-issue-tags.js +11 -0
- package/dist/schema/modules/issue/functions/transition-issue.d.ts +22 -0
- package/dist/schema/modules/issue/functions/transition-issue.js +20 -0
- package/dist/schema/modules/issue/functions/update-issue.d.ts +16 -0
- package/dist/schema/modules/issue/functions/update-issue.js +15 -0
- package/dist/schema/modules/issue/index.d.ts +4 -0
- package/dist/schema/modules/issue/index.js +4 -0
- package/dist/schema/modules/issue/policies/contribute-to-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/contribute-to-issue.js +10 -0
- package/dist/schema/modules/issue/policies/index.d.ts +5 -0
- package/dist/schema/modules/issue/policies/index.js +5 -0
- package/dist/schema/modules/issue/policies/traverse-issue-assignee.d.ts +1 -0
- package/dist/schema/modules/issue/policies/traverse-issue-assignee.js +14 -0
- package/dist/schema/modules/issue/policies/traverse-issue-parent.d.ts +1 -0
- package/dist/schema/modules/issue/policies/traverse-issue-parent.js +14 -0
- package/dist/schema/modules/issue/policies/traverse-issue-reporter.d.ts +1 -0
- package/dist/schema/modules/issue/policies/traverse-issue-reporter.js +14 -0
- package/dist/schema/modules/issue/policies/traverse-project-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/traverse-project-issue.js +7 -0
- package/dist/schema/modules/issue/types/index.d.ts +1 -0
- package/dist/schema/modules/issue/types/index.js +1 -0
- package/dist/schema/modules/issue/types/issue.d.ts +10 -0
- package/dist/schema/modules/issue/types/issue.js +12 -0
- package/dist/schema/modules/project/classes/index.d.ts +3 -0
- package/dist/schema/modules/project/classes/index.js +3 -0
- package/dist/schema/modules/project/classes/project-has-member.d.ts +16 -0
- package/dist/schema/modules/project/classes/project-has-member.js +9 -0
- package/dist/schema/{tracker/relationships.d.ts → modules/project/classes/project-owned-by.d.ts} +5 -5
- package/dist/schema/modules/project/classes/project-owned-by.js +9 -0
- package/dist/schema/modules/project/classes/project.d.ts +283 -0
- package/dist/schema/modules/project/classes/project.js +35 -0
- package/dist/schema/modules/project/functions/add-project-member.d.ts +10 -0
- package/dist/schema/modules/project/functions/add-project-member.js +12 -0
- package/dist/schema/modules/project/functions/archive-project.d.ts +7 -0
- package/dist/schema/modules/project/functions/archive-project.js +11 -0
- package/dist/schema/modules/project/functions/create-project-issue.d.ts +16 -0
- package/dist/schema/modules/project/functions/create-project-issue.js +15 -0
- package/dist/schema/modules/project/functions/create-project-tag.d.ts +12 -0
- package/dist/schema/modules/project/functions/create-project-tag.js +14 -0
- package/dist/schema/modules/project/functions/create-project.d.ts +14 -0
- package/dist/schema/modules/project/functions/create-project.js +14 -0
- package/dist/schema/modules/project/functions/index.d.ts +8 -0
- package/dist/schema/modules/project/functions/index.js +8 -0
- package/dist/schema/modules/project/functions/list-projects.d.ts +25 -0
- package/dist/schema/modules/project/functions/list-projects.js +16 -0
- package/dist/schema/modules/project/functions/remove-project-member.d.ts +10 -0
- package/dist/schema/modules/project/functions/remove-project-member.js +12 -0
- package/dist/schema/modules/project/functions/update-project.d.ts +13 -0
- package/dist/schema/modules/project/functions/update-project.js +14 -0
- package/dist/schema/modules/project/index.d.ts +4 -0
- package/dist/schema/modules/project/index.js +4 -0
- package/dist/schema/modules/project/policies/contribute-to-project.d.ts +1 -0
- package/dist/schema/modules/project/policies/contribute-to-project.js +7 -0
- package/dist/schema/modules/project/policies/index.d.ts +4 -0
- package/dist/schema/modules/project/policies/index.js +4 -0
- package/dist/schema/modules/project/policies/manage-project.d.ts +1 -0
- package/dist/schema/modules/project/policies/manage-project.js +6 -0
- package/dist/schema/modules/project/policies/traverse-project-member.d.ts +1 -0
- package/dist/schema/modules/project/policies/traverse-project-member.js +7 -0
- package/dist/schema/modules/project/policies/traverse-project-owner.d.ts +1 -0
- package/dist/schema/modules/project/policies/traverse-project-owner.js +7 -0
- package/dist/schema/modules/project/types/index.d.ts +2 -0
- package/dist/schema/modules/project/types/index.js +2 -0
- package/dist/schema/modules/project/types/membership-change.d.ts +6 -0
- package/dist/schema/modules/project/types/membership-change.js +7 -0
- package/dist/schema/modules/project/types/project.d.ts +8 -0
- package/dist/schema/modules/project/types/project.js +9 -0
- package/dist/schema/modules/tag/classes/index.d.ts +3 -0
- package/dist/schema/modules/tag/classes/index.js +3 -0
- package/dist/schema/modules/tag/classes/issue-tagged-with.d.ts +16 -0
- package/dist/schema/modules/tag/classes/issue-tagged-with.js +10 -0
- package/dist/schema/modules/tag/classes/project-contains-tag.d.ts +16 -0
- package/dist/schema/modules/tag/classes/project-contains-tag.js +10 -0
- package/dist/schema/{tag/class.d.ts → modules/tag/classes/tag.d.ts} +40 -3
- package/dist/schema/modules/tag/classes/tag.js +16 -0
- package/dist/schema/modules/tag/functions/delete-tag.d.ts +7 -0
- package/dist/schema/modules/tag/functions/delete-tag.js +11 -0
- package/dist/schema/modules/tag/functions/edit-tag.d.ts +12 -0
- package/dist/schema/modules/tag/functions/edit-tag.js +14 -0
- package/dist/schema/modules/tag/functions/index.d.ts +2 -0
- package/dist/schema/modules/tag/functions/index.js +2 -0
- package/dist/schema/modules/tag/index.d.ts +4 -0
- package/dist/schema/modules/tag/index.js +4 -0
- package/dist/schema/modules/tag/policies/contribute-to-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/contribute-to-tag.js +10 -0
- package/dist/schema/modules/tag/policies/index.d.ts +4 -0
- package/dist/schema/modules/tag/policies/index.js +4 -0
- package/dist/schema/modules/tag/policies/manage-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/manage-tag.js +10 -0
- package/dist/schema/modules/tag/policies/traverse-issue-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/traverse-issue-tag.js +14 -0
- package/dist/schema/modules/tag/policies/traverse-project-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/traverse-project-tag.js +7 -0
- package/dist/schema/modules/tag/types/index.d.ts +1 -0
- package/dist/schema/modules/tag/types/index.js +1 -0
- package/dist/schema/modules/tag/types/tag.d.ts +7 -0
- package/dist/schema/modules/tag/types/tag.js +8 -0
- package/dist/schema/schema.d.ts +902 -0
- package/dist/schema/schema.js +49 -0
- package/dist/schema/types/index.js +1 -0
- package/dist/schema/types/node-id.js +2 -0
- package/package.json +28 -20
- package/dist/schema/application/functions.js +0 -156
- package/dist/schema/application/index.d.ts +0 -701
- package/dist/schema/application/index.js +0 -49
- package/dist/schema/command/class.d.ts +0 -38
- package/dist/schema/command/class.js +0 -13
- package/dist/schema/command/index.d.ts +0 -2
- package/dist/schema/command/index.js +0 -2
- package/dist/schema/command/relationships.d.ts +0 -32
- package/dist/schema/command/relationships.js +0 -14
- package/dist/schema/comment/class.js +0 -7
- package/dist/schema/comment/index.d.ts +0 -2
- package/dist/schema/comment/index.js +0 -2
- package/dist/schema/comment/relationships.js +0 -11
- package/dist/schema/issue/class.d.ts +0 -74
- package/dist/schema/issue/class.js +0 -17
- package/dist/schema/issue/index.d.ts +0 -2
- package/dist/schema/issue/index.js +0 -2
- package/dist/schema/issue/relationships.d.ts +0 -112
- package/dist/schema/issue/relationships.js +0 -23
- package/dist/schema/tag/class.js +0 -10
- package/dist/schema/tag/index.d.ts +0 -2
- package/dist/schema/tag/index.js +0 -2
- package/dist/schema/tag/relationships.d.ts +0 -32
- package/dist/schema/tag/relationships.js +0 -12
- package/dist/schema/tracker/class.d.ts +0 -73
- package/dist/schema/tracker/class.js +0 -10
- package/dist/schema/tracker/index.d.ts +0 -2
- package/dist/schema/tracker/index.js +0 -2
- package/dist/schema/tracker/relationships.js +0 -7
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { ShellSchema } from '@astrale-domains/shell';
|
|
2
|
+
import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
|
|
3
|
+
import { Comment, comment_authored_by, issue_has_comment, ContributeToComment, EditOwnComment, TraverseCommentRelationship, TraverseIssueComment, } from './modules/comment/index.js';
|
|
4
|
+
import { Issue, ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, issue_assigned_to, issue_reported_by, issue_subtask_of, project_contains_issue, } from './modules/issue/index.js';
|
|
5
|
+
import { Project, ContributeToProject, ManageProject, TraverseProjectMember, TraverseProjectOwner, project_has_member, project_owned_by, } from './modules/project/index.js';
|
|
6
|
+
import { Tag, ContributeToTag, ManageTag, TraverseIssueTag, TraverseProjectTag, issue_tagged_with, project_contains_tag, } from './modules/tag/index.js';
|
|
7
|
+
const origin = 'issues.astrale.ai';
|
|
8
|
+
const classes = {
|
|
9
|
+
Project,
|
|
10
|
+
Issue,
|
|
11
|
+
Comment,
|
|
12
|
+
Tag,
|
|
13
|
+
project_owned_by,
|
|
14
|
+
project_has_member,
|
|
15
|
+
project_contains_issue,
|
|
16
|
+
issue_reported_by,
|
|
17
|
+
issue_assigned_to,
|
|
18
|
+
issue_subtask_of,
|
|
19
|
+
issue_has_comment,
|
|
20
|
+
comment_authored_by,
|
|
21
|
+
project_contains_tag,
|
|
22
|
+
issue_tagged_with,
|
|
23
|
+
};
|
|
24
|
+
const policies = {
|
|
25
|
+
ManageProject,
|
|
26
|
+
ContributeToProject,
|
|
27
|
+
ContributeToIssue,
|
|
28
|
+
ContributeToTag,
|
|
29
|
+
ManageTag,
|
|
30
|
+
ContributeToComment,
|
|
31
|
+
EditOwnComment,
|
|
32
|
+
TraverseProjectOwner,
|
|
33
|
+
TraverseProjectMember,
|
|
34
|
+
TraverseProjectIssue,
|
|
35
|
+
TraverseProjectTag,
|
|
36
|
+
TraverseIssueReporter,
|
|
37
|
+
TraverseIssueAssignee,
|
|
38
|
+
TraverseIssueParent,
|
|
39
|
+
TraverseIssueComment,
|
|
40
|
+
TraverseIssueTag,
|
|
41
|
+
TraverseCommentRelationship,
|
|
42
|
+
};
|
|
43
|
+
const views = { application: view({}) };
|
|
44
|
+
export const schema = defineSchema(origin, {
|
|
45
|
+
dependencies: { kernel: KernelSchema, shell: ShellSchema },
|
|
46
|
+
classes,
|
|
47
|
+
policies,
|
|
48
|
+
views,
|
|
49
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { nodeIdValue } from './node-id.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astrale-domains/issues",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/astrale-os/domains.git",
|
|
@@ -28,29 +28,37 @@
|
|
|
28
28
|
"registry": "https://registry.npmjs.org/"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@astrale-
|
|
31
|
+
"@astrale-domains/shell": "0.1.0-beta.14",
|
|
32
|
+
"@astrale-os/sdk": "0.5.0-beta.75",
|
|
32
33
|
"zod": "^4.4.3"
|
|
33
34
|
},
|
|
34
35
|
"devDependencies": {
|
|
35
|
-
"@astrale-os/adapter-
|
|
36
|
-
"@astrale-os/
|
|
37
|
-
"@astrale-os/
|
|
38
|
-
"@astrale-os/shell": "0.
|
|
39
|
-
"@astrale-os/
|
|
40
|
-
"@tailwindcss/vite": "^4.
|
|
41
|
-
"@tanstack/react-router": "1.170.
|
|
42
|
-
"@tanstack/router-plugin": "1.168.
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@types/
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"react": "^
|
|
49
|
-
"
|
|
50
|
-
"
|
|
36
|
+
"@astrale-os/adapter-cloudflare": "0.5.0-beta.78",
|
|
37
|
+
"@astrale-os/ox": ">=0.1.4 <1.0.0",
|
|
38
|
+
"@astrale-os/shell": "0.4.2-beta.8",
|
|
39
|
+
"@astrale-os/shell-react": "0.3.2-beta.5",
|
|
40
|
+
"@astrale-os/ui": "0.3.0-beta.13",
|
|
41
|
+
"@tailwindcss/vite": "^4.3.3",
|
|
42
|
+
"@tanstack/react-router": "1.170.18",
|
|
43
|
+
"@tanstack/router-plugin": "1.168.23",
|
|
44
|
+
"@testing-library/react": "16.3.2",
|
|
45
|
+
"@testing-library/user-event": "14.6.5",
|
|
46
|
+
"@types/node": "^26.2.0",
|
|
47
|
+
"@types/react": "^19.2.18",
|
|
48
|
+
"@types/react-dom": "^19.2.4",
|
|
49
|
+
"@vitejs/plugin-react": "^6.1.0",
|
|
50
|
+
"jsdom": "30.0.1",
|
|
51
|
+
"mermaid": "^11.17.0",
|
|
52
|
+
"oxlint": ">=1.79.0 <2.0.0",
|
|
53
|
+
"react": "^19.2.8",
|
|
54
|
+
"react-dom": "^19.2.8",
|
|
55
|
+
"react-markdown": "^10.1.0",
|
|
56
|
+
"remark-gfm": "^4.0.1",
|
|
57
|
+
"tailwindcss": "^4.3.3",
|
|
58
|
+
"type-fest": "^5.8.0",
|
|
51
59
|
"typescript": "7.0.2",
|
|
52
|
-
"vite": "^8.2.
|
|
53
|
-
"vitest": "^4.1.
|
|
60
|
+
"vite": "^8.2.2",
|
|
61
|
+
"vitest": "^4.1.11"
|
|
54
62
|
},
|
|
55
63
|
"engines": {
|
|
56
64
|
"node": ">=22.13"
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
import { func } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
const id = z.string().min(1);
|
|
4
|
-
const idempotencyKey = z.string().min(1).max(200);
|
|
5
|
-
const status = z.enum(['open', 'in_progress', 'resolved', 'canceled']);
|
|
6
|
-
const priority = z.number().int().min(0).max(4);
|
|
7
|
-
const tracker = z.strictObject({
|
|
8
|
-
id,
|
|
9
|
-
key: z.string().min(2).max(10),
|
|
10
|
-
name: z.string().min(1),
|
|
11
|
-
description: z.string(),
|
|
12
|
-
});
|
|
13
|
-
const issue = z.strictObject({
|
|
14
|
-
id,
|
|
15
|
-
reference: z.string().min(1),
|
|
16
|
-
title: z.string().min(1),
|
|
17
|
-
description: z.string(),
|
|
18
|
-
status,
|
|
19
|
-
priority,
|
|
20
|
-
});
|
|
21
|
-
const comment = z.strictObject({ id, body: z.string().min(1) });
|
|
22
|
-
const tag = z.strictObject({
|
|
23
|
-
id,
|
|
24
|
-
name: z.string().min(1),
|
|
25
|
-
slug: z.string().min(1),
|
|
26
|
-
color: z.string().optional(),
|
|
27
|
-
});
|
|
28
|
-
export const listTrackers = func({
|
|
29
|
-
description: 'List Trackers owned by the authenticated caller.',
|
|
30
|
-
auth: 'authenticated',
|
|
31
|
-
input: z.strictObject({}),
|
|
32
|
-
output: z.array(tracker),
|
|
33
|
-
});
|
|
34
|
-
export const createTracker = func({
|
|
35
|
-
description: 'Create one caller-owned Tracker.',
|
|
36
|
-
auth: 'authenticated',
|
|
37
|
-
input: z.strictObject({
|
|
38
|
-
key: z.string().min(1),
|
|
39
|
-
name: z.string().min(1).max(120),
|
|
40
|
-
description: z.string().max(5_000).optional(),
|
|
41
|
-
idempotencyKey,
|
|
42
|
-
}),
|
|
43
|
-
output: tracker,
|
|
44
|
-
});
|
|
45
|
-
export const listIssues = func({
|
|
46
|
-
description: 'List Issues in one caller-owned Tracker.',
|
|
47
|
-
auth: 'authenticated',
|
|
48
|
-
input: z.strictObject({ trackerId: id }),
|
|
49
|
-
output: z.array(issue),
|
|
50
|
-
});
|
|
51
|
-
export const createIssue = func({
|
|
52
|
-
description: 'Create one numbered Issue in a caller-owned Tracker.',
|
|
53
|
-
auth: 'authenticated',
|
|
54
|
-
input: z.strictObject({
|
|
55
|
-
trackerId: id,
|
|
56
|
-
title: z.string().min(1).max(200),
|
|
57
|
-
description: z.string().max(50_000).optional(),
|
|
58
|
-
priority: priority.optional(),
|
|
59
|
-
idempotencyKey,
|
|
60
|
-
}),
|
|
61
|
-
output: issue,
|
|
62
|
-
});
|
|
63
|
-
export const updateIssue = func({
|
|
64
|
-
description: 'Update one caller-owned Issue.',
|
|
65
|
-
auth: 'authenticated',
|
|
66
|
-
input: z.strictObject({
|
|
67
|
-
issueId: id,
|
|
68
|
-
title: z.string().min(1).max(200).optional(),
|
|
69
|
-
description: z.string().max(50_000).optional(),
|
|
70
|
-
status: status.optional(),
|
|
71
|
-
priority: priority.optional(),
|
|
72
|
-
idempotencyKey,
|
|
73
|
-
}),
|
|
74
|
-
output: issue,
|
|
75
|
-
});
|
|
76
|
-
export const deleteIssue = func({
|
|
77
|
-
description: 'Delete one caller-owned Issue.',
|
|
78
|
-
auth: 'authenticated',
|
|
79
|
-
input: z.strictObject({ issueId: id, idempotencyKey }),
|
|
80
|
-
output: z.strictObject({ deleted: z.literal(true) }),
|
|
81
|
-
});
|
|
82
|
-
export const addComment = func({
|
|
83
|
-
description: 'Add one Comment to a caller-owned Issue.',
|
|
84
|
-
auth: 'authenticated',
|
|
85
|
-
input: z.strictObject({ issueId: id, body: z.string().min(1).max(50_000), idempotencyKey }),
|
|
86
|
-
output: comment,
|
|
87
|
-
});
|
|
88
|
-
export const editComment = func({
|
|
89
|
-
description: 'Edit one Comment in a caller-owned Tracker.',
|
|
90
|
-
auth: 'authenticated',
|
|
91
|
-
input: z.strictObject({ commentId: id, body: z.string().min(1).max(50_000), idempotencyKey }),
|
|
92
|
-
output: comment,
|
|
93
|
-
});
|
|
94
|
-
export const deleteComment = func({
|
|
95
|
-
description: 'Delete one Comment in a caller-owned Tracker.',
|
|
96
|
-
auth: 'authenticated',
|
|
97
|
-
input: z.strictObject({ commentId: id, idempotencyKey }),
|
|
98
|
-
output: z.strictObject({ deleted: z.literal(true) }),
|
|
99
|
-
});
|
|
100
|
-
export const createTag = func({
|
|
101
|
-
description: 'Create one Tag in a caller-owned Tracker.',
|
|
102
|
-
auth: 'authenticated',
|
|
103
|
-
input: z.strictObject({
|
|
104
|
-
trackerId: id,
|
|
105
|
-
name: z.string().min(1).max(64),
|
|
106
|
-
color: z.string().optional(),
|
|
107
|
-
idempotencyKey,
|
|
108
|
-
}),
|
|
109
|
-
output: tag,
|
|
110
|
-
});
|
|
111
|
-
export const editTag = func({
|
|
112
|
-
description: 'Edit one Tag in a caller-owned Tracker.',
|
|
113
|
-
auth: 'authenticated',
|
|
114
|
-
input: z.strictObject({
|
|
115
|
-
tagId: id,
|
|
116
|
-
name: z.string().min(1).max(64).optional(),
|
|
117
|
-
color: z.string().optional(),
|
|
118
|
-
idempotencyKey,
|
|
119
|
-
}),
|
|
120
|
-
output: tag,
|
|
121
|
-
});
|
|
122
|
-
export const deleteTag = func({
|
|
123
|
-
description: 'Delete one Tag in a caller-owned Tracker.',
|
|
124
|
-
auth: 'authenticated',
|
|
125
|
-
input: z.strictObject({ tagId: id, idempotencyKey }),
|
|
126
|
-
output: z.strictObject({ deleted: z.literal(true) }),
|
|
127
|
-
});
|
|
128
|
-
export const changeIssueTag = func({
|
|
129
|
-
description: 'Add or remove a Tracker-local Tag on an Issue.',
|
|
130
|
-
auth: 'authenticated',
|
|
131
|
-
input: z.strictObject({
|
|
132
|
-
issueId: id,
|
|
133
|
-
tagId: id,
|
|
134
|
-
change: z.enum(['add', 'remove']),
|
|
135
|
-
idempotencyKey,
|
|
136
|
-
}),
|
|
137
|
-
output: z.strictObject({ issueId: id, changed: z.boolean() }),
|
|
138
|
-
});
|
|
139
|
-
export const relateIssue = func({
|
|
140
|
-
description: 'Add or remove one relation between caller-owned Issues.',
|
|
141
|
-
auth: 'authenticated',
|
|
142
|
-
input: z.strictObject({
|
|
143
|
-
issueId: id,
|
|
144
|
-
targetId: id,
|
|
145
|
-
relation: z.enum(['blocks', 'duplicates', 'relates_to', 'subtask_of']),
|
|
146
|
-
change: z.enum(['add', 'remove']),
|
|
147
|
-
idempotencyKey,
|
|
148
|
-
}),
|
|
149
|
-
output: z.strictObject({ issueId: id, changed: z.boolean() }),
|
|
150
|
-
});
|
|
151
|
-
export const exportTracker = func({
|
|
152
|
-
description: 'Export the current visible Issue snapshot for one Tracker.',
|
|
153
|
-
auth: 'authenticated',
|
|
154
|
-
input: z.strictObject({ trackerId: id }),
|
|
155
|
-
output: z.strictObject({ issues: z.array(issue) }),
|
|
156
|
-
});
|