@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,9 @@
|
|
|
1
|
+
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { TraverseIssueAssignee } from '../policies/traverse-issue-assignee.js';
|
|
3
|
+
import { Issue } from './issue.js';
|
|
4
|
+
export const issue_assigned_to = edgeClass.directed({
|
|
5
|
+
description: 'The optional current assignee of one Issue.',
|
|
6
|
+
source: { as: 'assignee', accepts: [K.classes.Identity], outgoing: '0..*' },
|
|
7
|
+
target: { as: 'issue', accepts: [() => Issue], incoming: '0..1' },
|
|
8
|
+
policies: { traverse: () => TraverseIssueAssignee },
|
|
9
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const issue_reported_by: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
2
|
+
readonly depth: 0;
|
|
3
|
+
readonly abstract: false;
|
|
4
|
+
readonly extends: readonly [];
|
|
5
|
+
readonly properties: never;
|
|
6
|
+
readonly source: {
|
|
7
|
+
readonly as: "reporter";
|
|
8
|
+
readonly outgoing: "0..*";
|
|
9
|
+
};
|
|
10
|
+
readonly target: {
|
|
11
|
+
readonly as: "issue";
|
|
12
|
+
readonly incoming: "1";
|
|
13
|
+
};
|
|
14
|
+
readonly constraints: Record<never, never>;
|
|
15
|
+
readonly effectiveProperties: never;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { K, edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { TraverseIssueReporter } from '../policies/traverse-issue-reporter.js';
|
|
3
|
+
import { Issue } from './issue.js';
|
|
4
|
+
export const issue_reported_by = edgeClass.directed({
|
|
5
|
+
description: 'The immutable reporter of one Issue.',
|
|
6
|
+
source: { as: 'reporter', accepts: [K.classes.Identity], outgoing: '0..*' },
|
|
7
|
+
target: { as: 'issue', accepts: [() => Issue], incoming: '1' },
|
|
8
|
+
policies: { traverse: () => TraverseIssueReporter },
|
|
9
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare const issue_subtask_of: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
2
|
+
readonly depth: 0;
|
|
3
|
+
readonly abstract: false;
|
|
4
|
+
readonly extends: readonly [];
|
|
5
|
+
readonly properties: never;
|
|
6
|
+
readonly source: {
|
|
7
|
+
readonly as: "child";
|
|
8
|
+
readonly outgoing: "0..1";
|
|
9
|
+
};
|
|
10
|
+
readonly target: {
|
|
11
|
+
readonly as: "parent";
|
|
12
|
+
readonly incoming: "0..*";
|
|
13
|
+
};
|
|
14
|
+
readonly constraints: {
|
|
15
|
+
readonly noSelf: true;
|
|
16
|
+
readonly acyclic: true;
|
|
17
|
+
};
|
|
18
|
+
readonly effectiveProperties: never;
|
|
19
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { TraverseIssueParent } from '../policies/traverse-issue-parent.js';
|
|
3
|
+
import { Issue } from './issue.js';
|
|
4
|
+
export const issue_subtask_of = edgeClass.directed({
|
|
5
|
+
description: 'One Issue is an acyclic subtask of at most one Issue in the same Project.',
|
|
6
|
+
source: { as: 'child', accepts: [() => Issue], outgoing: '0..1' },
|
|
7
|
+
target: { as: 'parent', accepts: [() => Issue], incoming: '0..*' },
|
|
8
|
+
constraints: { noSelf: true, acyclic: true },
|
|
9
|
+
policies: { traverse: () => TraverseIssueParent },
|
|
10
|
+
});
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
export declare const Issue: import("@astrale-os/sdk/schema").NodeClass<{
|
|
2
|
+
readonly depth: 1;
|
|
3
|
+
readonly abstract: false;
|
|
4
|
+
readonly extends: readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
5
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
|
|
6
|
+
readonly origin: "kernel.astrale.ai";
|
|
7
|
+
};
|
|
8
|
+
readonly kind: 'node';
|
|
9
|
+
readonly abstract: true;
|
|
10
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Named"> & {
|
|
11
|
+
readonly origin: "kernel.astrale.ai";
|
|
12
|
+
}, "kernel.astrale.ai:class.Named", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
13
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
14
|
+
readonly origin: "kernel.astrale.ai";
|
|
15
|
+
};
|
|
16
|
+
readonly kind: 'node';
|
|
17
|
+
readonly abstract: true;
|
|
18
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
19
|
+
readonly origin: "kernel.astrale.ai";
|
|
20
|
+
}, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "name", "kernel.astrale.ai:class.Named.property.name">, never, never, import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "name", "kernel.astrale.ai:class.Named.property.name">, never, never>, import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
21
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
|
|
22
|
+
readonly origin: "kernel.astrale.ai";
|
|
23
|
+
};
|
|
24
|
+
readonly kind: 'node';
|
|
25
|
+
readonly abstract: true;
|
|
26
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Descriptable"> & {
|
|
27
|
+
readonly origin: "kernel.astrale.ai";
|
|
28
|
+
}, "kernel.astrale.ai:class.Descriptable", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
29
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
30
|
+
readonly origin: "kernel.astrale.ai";
|
|
31
|
+
};
|
|
32
|
+
readonly kind: 'node';
|
|
33
|
+
readonly abstract: true;
|
|
34
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
35
|
+
readonly origin: "kernel.astrale.ai";
|
|
36
|
+
}, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "description", "kernel.astrale.ai:class.Descriptable.property.description">, never, never, import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, false, "description", "kernel.astrale.ai:class.Descriptable.property.description">, never, never>, import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
37
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Timestamped"> & {
|
|
38
|
+
readonly origin: "kernel.astrale.ai";
|
|
39
|
+
};
|
|
40
|
+
readonly kind: 'node';
|
|
41
|
+
readonly abstract: true;
|
|
42
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Timestamped"> & {
|
|
43
|
+
readonly origin: "kernel.astrale.ai";
|
|
44
|
+
}, "kernel.astrale.ai:class.Timestamped", readonly [import("@astrale-os/sdk/schema").ClassProjection<"node", import("@astrale-os/sdk/schema").NodeClassDefinition & {
|
|
45
|
+
readonly ref: import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
46
|
+
readonly origin: "kernel.astrale.ai";
|
|
47
|
+
};
|
|
48
|
+
readonly kind: 'node';
|
|
49
|
+
readonly abstract: true;
|
|
50
|
+
}, import("@astrale-os/sdk/schema").ClassRef & import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
51
|
+
readonly origin: "kernel.astrale.ai";
|
|
52
|
+
}, "kernel.astrale.ai:class.Node", readonly import("@astrale-os/sdk/schema").AnyResolvedClass[], never, never, never, never, never, never>, ...never[]], import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "createdAt", "kernel.astrale.ai:class.Timestamped.property.createdAt"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "updatedAt", "kernel.astrale.ai:class.Timestamped.property.updatedAt">, never, never, import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "createdAt", "kernel.astrale.ai:class.Timestamped.property.createdAt"> | import("@astrale-os/sdk/schema").PropertyProjection<string | number | boolean | import("@astrale-os/sdk/schema").Array | import("@astrale-os/sdk/schema").Object | null, true, "updatedAt", "kernel.astrale.ai:class.Timestamped.property.updatedAt">, never, never>];
|
|
53
|
+
readonly properties: {
|
|
54
|
+
readonly reference: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reference", "self">;
|
|
55
|
+
readonly reporterId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reporterId", "self">;
|
|
56
|
+
readonly assigneeId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string | undefined, string | undefined, false, "assigneeId", "self">;
|
|
57
|
+
readonly status: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", true, "status", "self">;
|
|
58
|
+
readonly priority: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "priority", "self">;
|
|
59
|
+
readonly archived: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<boolean, boolean, true, "archived", "self">;
|
|
60
|
+
};
|
|
61
|
+
readonly methods: {
|
|
62
|
+
readonly update: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
63
|
+
title?: string | undefined;
|
|
64
|
+
description?: string | undefined;
|
|
65
|
+
priority?: number | undefined;
|
|
66
|
+
}, {
|
|
67
|
+
readonly mode: 'value';
|
|
68
|
+
readonly value: {
|
|
69
|
+
id: string;
|
|
70
|
+
reference: string;
|
|
71
|
+
title: string;
|
|
72
|
+
description: string;
|
|
73
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
74
|
+
priority: number;
|
|
75
|
+
archived: boolean;
|
|
76
|
+
};
|
|
77
|
+
}, "authorized", false, "default">>;
|
|
78
|
+
readonly transition: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
79
|
+
event: unknown;
|
|
80
|
+
}, {
|
|
81
|
+
readonly mode: 'value';
|
|
82
|
+
readonly value: {
|
|
83
|
+
kind: "transitioned";
|
|
84
|
+
issue: {
|
|
85
|
+
id: string;
|
|
86
|
+
reference: string;
|
|
87
|
+
title: string;
|
|
88
|
+
description: string;
|
|
89
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
90
|
+
priority: number;
|
|
91
|
+
archived: boolean;
|
|
92
|
+
};
|
|
93
|
+
} | {
|
|
94
|
+
kind: "rejected";
|
|
95
|
+
code: "STATE_TRANSITION_ILLEGAL";
|
|
96
|
+
from: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
97
|
+
event: "accept" | "close" | "defer" | "reopen" | "resolve";
|
|
98
|
+
};
|
|
99
|
+
}, "authorized", false, "default">>;
|
|
100
|
+
readonly assign: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
101
|
+
assigneeId: string | null;
|
|
102
|
+
}, {
|
|
103
|
+
readonly mode: 'value';
|
|
104
|
+
readonly value: {
|
|
105
|
+
issueId: string;
|
|
106
|
+
assigneeId?: string | undefined;
|
|
107
|
+
};
|
|
108
|
+
}, "authorized", false, "default">>;
|
|
109
|
+
readonly setTags: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
110
|
+
tagIds: string[];
|
|
111
|
+
}, {
|
|
112
|
+
readonly mode: 'value';
|
|
113
|
+
readonly value: {
|
|
114
|
+
issueId: string;
|
|
115
|
+
tagIds: string[];
|
|
116
|
+
};
|
|
117
|
+
}, "authorized", false, "default">>;
|
|
118
|
+
readonly setParent: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
119
|
+
parentId: string | null;
|
|
120
|
+
}, {
|
|
121
|
+
readonly mode: 'value';
|
|
122
|
+
readonly value: {
|
|
123
|
+
issueId: string;
|
|
124
|
+
parentId?: string | undefined;
|
|
125
|
+
};
|
|
126
|
+
}, "authorized", false, "default">>;
|
|
127
|
+
readonly addComment: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
128
|
+
body: string;
|
|
129
|
+
}, {
|
|
130
|
+
readonly mode: 'value';
|
|
131
|
+
readonly value: {
|
|
132
|
+
id: string;
|
|
133
|
+
body: string;
|
|
134
|
+
};
|
|
135
|
+
}, "authorized", false, "default">>;
|
|
136
|
+
readonly archive: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
137
|
+
readonly mode: 'value';
|
|
138
|
+
readonly value: {
|
|
139
|
+
issueId: string;
|
|
140
|
+
archived: true;
|
|
141
|
+
};
|
|
142
|
+
}, "authorized", false, "default">>;
|
|
143
|
+
};
|
|
144
|
+
readonly effectiveProperties: (import("@astrale-os/sdk/schema").AuthoredPropertyProjection<boolean, boolean, true, "archived", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string | undefined, string | undefined, false, "assigneeId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "priority", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reference", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "reporterId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<unknown, "accepted" | "closed" | "deferred" | "open" | "resolved", true, "status", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
|
|
145
|
+
readonly name: "description";
|
|
146
|
+
readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
|
|
147
|
+
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
148
|
+
readonly name: "createdAt";
|
|
149
|
+
readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
|
|
150
|
+
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
151
|
+
readonly name: "name";
|
|
152
|
+
readonly key: "kernel.astrale.ai:class.Named.property.name";
|
|
153
|
+
}) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
|
|
154
|
+
readonly name: "updatedAt";
|
|
155
|
+
readonly key: "kernel.astrale.ai:class.Timestamped.property.updatedAt";
|
|
156
|
+
});
|
|
157
|
+
readonly effectiveInstanceMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
158
|
+
readonly mode: 'value';
|
|
159
|
+
readonly value: {
|
|
160
|
+
issueId: string;
|
|
161
|
+
archived: true;
|
|
162
|
+
};
|
|
163
|
+
}, "authorized", false, "default">>, "archive", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
164
|
+
title?: string | undefined;
|
|
165
|
+
description?: string | undefined;
|
|
166
|
+
priority?: number | undefined;
|
|
167
|
+
}, {
|
|
168
|
+
readonly mode: 'value';
|
|
169
|
+
readonly value: {
|
|
170
|
+
id: string;
|
|
171
|
+
reference: string;
|
|
172
|
+
title: string;
|
|
173
|
+
description: string;
|
|
174
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
175
|
+
priority: number;
|
|
176
|
+
archived: boolean;
|
|
177
|
+
};
|
|
178
|
+
}, "authorized", false, "default">>, "update", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
179
|
+
event: unknown;
|
|
180
|
+
}, {
|
|
181
|
+
readonly mode: 'value';
|
|
182
|
+
readonly value: {
|
|
183
|
+
kind: "transitioned";
|
|
184
|
+
issue: {
|
|
185
|
+
id: string;
|
|
186
|
+
reference: string;
|
|
187
|
+
title: string;
|
|
188
|
+
description: string;
|
|
189
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
190
|
+
priority: number;
|
|
191
|
+
archived: boolean;
|
|
192
|
+
};
|
|
193
|
+
} | {
|
|
194
|
+
kind: "rejected";
|
|
195
|
+
code: "STATE_TRANSITION_ILLEGAL";
|
|
196
|
+
from: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
197
|
+
event: "accept" | "close" | "defer" | "reopen" | "resolve";
|
|
198
|
+
};
|
|
199
|
+
}, "authorized", false, "default">>, "transition", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
200
|
+
assigneeId: string | null;
|
|
201
|
+
}, {
|
|
202
|
+
readonly mode: 'value';
|
|
203
|
+
readonly value: {
|
|
204
|
+
issueId: string;
|
|
205
|
+
assigneeId?: string | undefined;
|
|
206
|
+
};
|
|
207
|
+
}, "authorized", false, "default">>, "assign", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
208
|
+
tagIds: string[];
|
|
209
|
+
}, {
|
|
210
|
+
readonly mode: 'value';
|
|
211
|
+
readonly value: {
|
|
212
|
+
issueId: string;
|
|
213
|
+
tagIds: string[];
|
|
214
|
+
};
|
|
215
|
+
}, "authorized", false, "default">>, "setTags", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
216
|
+
parentId: string | null;
|
|
217
|
+
}, {
|
|
218
|
+
readonly mode: 'value';
|
|
219
|
+
readonly value: {
|
|
220
|
+
issueId: string;
|
|
221
|
+
parentId?: string | undefined;
|
|
222
|
+
};
|
|
223
|
+
}, "authorized", false, "default">>, "setParent", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
224
|
+
body: string;
|
|
225
|
+
}, {
|
|
226
|
+
readonly mode: 'value';
|
|
227
|
+
readonly value: {
|
|
228
|
+
id: string;
|
|
229
|
+
body: string;
|
|
230
|
+
};
|
|
231
|
+
}, "authorized", false, "default">>, "addComment", "self">;
|
|
232
|
+
readonly effectiveStaticMethods: never;
|
|
233
|
+
}> & import("@astrale-os/sdk/schema").StateClass<Readonly<Omit<Readonly<Record<never, never>>, "status"> & {
|
|
234
|
+
readonly status: import("@astrale-os/sdk/state").StateMachine<{
|
|
235
|
+
readonly open: {
|
|
236
|
+
readonly accept: "accepted";
|
|
237
|
+
readonly defer: "deferred";
|
|
238
|
+
readonly close: "closed";
|
|
239
|
+
};
|
|
240
|
+
readonly accepted: {
|
|
241
|
+
readonly resolve: "resolved";
|
|
242
|
+
readonly defer: "deferred";
|
|
243
|
+
readonly close: "closed";
|
|
244
|
+
};
|
|
245
|
+
readonly deferred: {
|
|
246
|
+
readonly reopen: "open";
|
|
247
|
+
readonly accept: "accepted";
|
|
248
|
+
readonly close: "closed";
|
|
249
|
+
};
|
|
250
|
+
readonly resolved: {
|
|
251
|
+
readonly reopen: "open";
|
|
252
|
+
readonly close: "closed";
|
|
253
|
+
};
|
|
254
|
+
readonly closed: {
|
|
255
|
+
readonly reopen: "open";
|
|
256
|
+
};
|
|
257
|
+
}, "open">;
|
|
258
|
+
}>>;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { K, nodeClass, property, stateProperty } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
+
import { issueStatus } from '../../../.runtime/states/issue/index.js';
|
|
5
|
+
import { addIssueCommentMethod } from '../functions/add-issue-comment.js';
|
|
6
|
+
import { archiveIssueMethod } from '../functions/archive-issue.js';
|
|
7
|
+
import { assignIssueMethod } from '../functions/assign-issue.js';
|
|
8
|
+
import { setIssueParentMethod } from '../functions/set-issue-parent.js';
|
|
9
|
+
import { setIssueTagsMethod } from '../functions/set-issue-tags.js';
|
|
10
|
+
import { transitionIssueMethod } from '../functions/transition-issue.js';
|
|
11
|
+
import { updateIssueMethod } from '../functions/update-issue.js';
|
|
12
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
13
|
+
export const Issue = nodeClass({
|
|
14
|
+
description: 'One immutable-reference work item contained by exactly one Project.',
|
|
15
|
+
icon: 'circle-dot',
|
|
16
|
+
extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
|
|
17
|
+
properties: {
|
|
18
|
+
reference: z.string().min(1).max(32),
|
|
19
|
+
reporterId: property(nodeIdValue, {}),
|
|
20
|
+
assigneeId: property(nodeIdValue.optional(), {}),
|
|
21
|
+
status: stateProperty(issueStatus),
|
|
22
|
+
priority: z.number().int().min(0).max(4),
|
|
23
|
+
archived: z.boolean(),
|
|
24
|
+
},
|
|
25
|
+
methods: {
|
|
26
|
+
update: updateIssueMethod,
|
|
27
|
+
transition: transitionIssueMethod,
|
|
28
|
+
assign: assignIssueMethod,
|
|
29
|
+
setTags: setIssueTagsMethod,
|
|
30
|
+
setParent: setIssueParentMethod,
|
|
31
|
+
addComment: addIssueCommentMethod,
|
|
32
|
+
archive: archiveIssueMethod,
|
|
33
|
+
},
|
|
34
|
+
policies: { read: () => ContributeToIssue },
|
|
35
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const project_contains_issue: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
2
|
+
readonly depth: 0;
|
|
3
|
+
readonly abstract: false;
|
|
4
|
+
readonly extends: readonly [];
|
|
5
|
+
readonly properties: never;
|
|
6
|
+
readonly source: {
|
|
7
|
+
readonly as: "project";
|
|
8
|
+
readonly outgoing: "0..*";
|
|
9
|
+
};
|
|
10
|
+
readonly target: {
|
|
11
|
+
readonly as: "issue";
|
|
12
|
+
readonly incoming: "1";
|
|
13
|
+
};
|
|
14
|
+
readonly constraints: Record<never, never>;
|
|
15
|
+
readonly effectiveProperties: never;
|
|
16
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { Project } from '../../project/index.js';
|
|
3
|
+
import { TraverseProjectIssue } from '../policies/traverse-project-issue.js';
|
|
4
|
+
import { Issue } from './issue.js';
|
|
5
|
+
export const project_contains_issue = edgeClass.directed({
|
|
6
|
+
description: 'One Project contains and numbers one Issue.',
|
|
7
|
+
source: { as: 'project', accepts: [() => Project], outgoing: '0..*' },
|
|
8
|
+
target: { as: 'issue', accepts: [() => Issue], incoming: '1' },
|
|
9
|
+
policies: { traverse: () => TraverseProjectIssue },
|
|
10
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const addIssueCommentMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
body: string;
|
|
3
|
+
}, {
|
|
4
|
+
readonly mode: 'value';
|
|
5
|
+
readonly value: {
|
|
6
|
+
id: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
9
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { commentValue } from '../../comment/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
export const addIssueCommentMethod = method({
|
|
6
|
+
description: 'Add one authored Comment to this Issue.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({ body: z.string().min(1).max(50_000) }),
|
|
10
|
+
output: commentValue,
|
|
11
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const archiveIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
|
|
2
|
+
readonly mode: 'value';
|
|
3
|
+
readonly value: {
|
|
4
|
+
issueId: string;
|
|
5
|
+
archived: true;
|
|
6
|
+
};
|
|
7
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
export const archiveIssueMethod = method({
|
|
6
|
+
description: 'Archive this Issue without deleting its discussion or relationships.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({}),
|
|
10
|
+
output: z.strictObject({ issueId: nodeIdValue, archived: z.literal(true) }),
|
|
11
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const assignIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
assigneeId: string | null;
|
|
3
|
+
}, {
|
|
4
|
+
readonly mode: 'value';
|
|
5
|
+
readonly value: {
|
|
6
|
+
issueId: string;
|
|
7
|
+
assigneeId?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
export const assignIssueMethod = method({
|
|
6
|
+
description: 'Assign this Issue to a Project participant or clear its assignee.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({ assigneeId: nodeIdValue.nullable() }),
|
|
10
|
+
output: z.strictObject({ issueId: nodeIdValue, assigneeId: nodeIdValue.optional() }),
|
|
11
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { addIssueCommentMethod } from './add-issue-comment.js';
|
|
2
|
+
export { archiveIssueMethod } from './archive-issue.js';
|
|
3
|
+
export { assignIssueMethod } from './assign-issue.js';
|
|
4
|
+
export { setIssueParentMethod } from './set-issue-parent.js';
|
|
5
|
+
export { setIssueTagsMethod } from './set-issue-tags.js';
|
|
6
|
+
export { transitionIssueMethod } from './transition-issue.js';
|
|
7
|
+
export { updateIssueMethod } from './update-issue.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { addIssueCommentMethod } from './add-issue-comment.js';
|
|
2
|
+
export { archiveIssueMethod } from './archive-issue.js';
|
|
3
|
+
export { assignIssueMethod } from './assign-issue.js';
|
|
4
|
+
export { setIssueParentMethod } from './set-issue-parent.js';
|
|
5
|
+
export { setIssueTagsMethod } from './set-issue-tags.js';
|
|
6
|
+
export { transitionIssueMethod } from './transition-issue.js';
|
|
7
|
+
export { updateIssueMethod } from './update-issue.js';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const setIssueParentMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
parentId: string | null;
|
|
3
|
+
}, {
|
|
4
|
+
readonly mode: 'value';
|
|
5
|
+
readonly value: {
|
|
6
|
+
issueId: string;
|
|
7
|
+
parentId?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
export const setIssueParentMethod = method({
|
|
6
|
+
description: 'Set or clear this Issue parent inside the same Project.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({ parentId: nodeIdValue.nullable() }),
|
|
10
|
+
output: z.strictObject({ issueId: nodeIdValue, parentId: nodeIdValue.optional() }),
|
|
11
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const setIssueTagsMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
tagIds: string[];
|
|
3
|
+
}, {
|
|
4
|
+
readonly mode: 'value';
|
|
5
|
+
readonly value: {
|
|
6
|
+
issueId: string;
|
|
7
|
+
tagIds: string[];
|
|
8
|
+
};
|
|
9
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
export const setIssueTagsMethod = method({
|
|
6
|
+
description: 'Replace this Issue Tag set with an exact Project-local set.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({ tagIds: z.array(nodeIdValue).max(128) }),
|
|
10
|
+
output: z.strictObject({ issueId: nodeIdValue, tagIds: z.array(nodeIdValue) }),
|
|
11
|
+
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export declare const transitionIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
event: unknown;
|
|
3
|
+
}, {
|
|
4
|
+
readonly mode: 'value';
|
|
5
|
+
readonly value: {
|
|
6
|
+
kind: "transitioned";
|
|
7
|
+
issue: {
|
|
8
|
+
id: string;
|
|
9
|
+
reference: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
13
|
+
priority: number;
|
|
14
|
+
archived: boolean;
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
17
|
+
kind: "rejected";
|
|
18
|
+
code: "STATE_TRANSITION_ILLEGAL";
|
|
19
|
+
from: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
20
|
+
event: "accept" | "close" | "defer" | "reopen" | "resolve";
|
|
21
|
+
};
|
|
22
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { issueStatus } from '../../../.runtime/states/issue/index.js';
|
|
4
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
5
|
+
import { issueValue } from '../types/issue.js';
|
|
6
|
+
export const transitionIssueMethod = method({
|
|
7
|
+
description: 'Apply one legal Issue status event.',
|
|
8
|
+
auth: 'authorized',
|
|
9
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
10
|
+
input: z.strictObject({ event: issueStatus.eventSchema }),
|
|
11
|
+
output: z.discriminatedUnion('kind', [
|
|
12
|
+
z.strictObject({ kind: z.literal('transitioned'), issue: issueValue }),
|
|
13
|
+
z.strictObject({
|
|
14
|
+
kind: z.literal('rejected'),
|
|
15
|
+
code: z.literal('STATE_TRANSITION_ILLEGAL'),
|
|
16
|
+
from: issueStatus.stateSchema,
|
|
17
|
+
event: issueStatus.eventSchema,
|
|
18
|
+
}),
|
|
19
|
+
]),
|
|
20
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const updateIssueMethod: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
2
|
+
title?: string | undefined;
|
|
3
|
+
description?: string | undefined;
|
|
4
|
+
priority?: number | undefined;
|
|
5
|
+
}, {
|
|
6
|
+
readonly mode: 'value';
|
|
7
|
+
readonly value: {
|
|
8
|
+
id: string;
|
|
9
|
+
reference: string;
|
|
10
|
+
title: string;
|
|
11
|
+
description: string;
|
|
12
|
+
status: "accepted" | "closed" | "deferred" | "open" | "resolved";
|
|
13
|
+
priority: number;
|
|
14
|
+
archived: boolean;
|
|
15
|
+
};
|
|
16
|
+
}, "authorized", false, "default">>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { z } from 'zod';
|
|
3
|
+
import { ContributeToIssue } from '../policies/contribute-to-issue.js';
|
|
4
|
+
import { issueValue } from '../types/issue.js';
|
|
5
|
+
export const updateIssueMethod = method({
|
|
6
|
+
description: 'Update mutable Issue fields.',
|
|
7
|
+
auth: 'authorized',
|
|
8
|
+
policy: ({ check, self }) => check(ContributeToIssue, self),
|
|
9
|
+
input: z.strictObject({
|
|
10
|
+
title: z.string().min(1).max(200).optional(),
|
|
11
|
+
description: z.string().max(50_000).optional(),
|
|
12
|
+
priority: z.number().int().min(0).max(4).optional(),
|
|
13
|
+
}),
|
|
14
|
+
output: issueValue,
|
|
15
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { issueValue } from './types/index.js';
|
|
2
|
+
export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
|
|
3
|
+
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
4
|
+
export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { issueValue } from './types/index.js';
|
|
2
|
+
export { issue_assigned_to, issue_reported_by, issue_subtask_of, Issue, project_contains_issue, } from './classes/index.js';
|
|
3
|
+
export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, setIssueParentMethod, setIssueTagsMethod, transitionIssueMethod, updateIssueMethod, } from './functions/index.js';
|
|
4
|
+
export { ContributeToIssue, TraverseIssueAssignee, TraverseIssueParent, TraverseIssueReporter, TraverseProjectIssue, } from './policies/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ContributeToIssue: import("@astrale-os/sdk/schema").Policy;
|