@astrale-domains/issues 0.7.3 → 0.7.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/README.md +16 -8
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +1 -1
- package/dist/schema/modules/comment/classes/comment-authored-by.js +3 -3
- package/dist/schema/modules/comment/classes/comment.js +3 -3
- package/dist/schema/modules/comment/classes/issue-has-comment.d.ts +1 -1
- package/dist/schema/modules/comment/classes/issue-has-comment.js +5 -2
- package/dist/schema/modules/comment/functions/delete-comment.js +2 -2
- package/dist/schema/modules/comment/functions/edit-comment.js +2 -2
- package/dist/schema/modules/comment/index.d.ts +1 -1
- package/dist/schema/modules/comment/index.js +1 -1
- package/dist/schema/modules/comment/policies/authored-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/{edit-own-comment.js → authored-comment.js} +1 -1
- package/dist/schema/modules/comment/policies/index.d.ts +4 -4
- package/dist/schema/modules/comment/policies/index.js +4 -4
- package/dist/schema/modules/comment/policies/owns-or-belongs-to-project-of-issue-of-authored-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/{traverse-comment-relationship.js → owns-or-belongs-to-project-of-issue-of-authored-comment.js} +2 -2
- package/dist/schema/modules/comment/policies/owns-or-belongs-to-project-of-issue-of-comment-or-reported-issue-of-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/{contribute-to-comment-or-reported-issue-of-comment.js → owns-or-belongs-to-project-of-issue-of-comment-or-reported-issue-of-comment.js} +1 -1
- package/dist/schema/modules/comment/policies/owns-or-belongs-to-project-of-issue-with-comment-or-reported-issue-with-comment.d.ts +1 -0
- package/dist/schema/modules/comment/policies/{traverse-issue-comment.js → owns-or-belongs-to-project-of-issue-with-comment-or-reported-issue-with-comment.js} +1 -1
- package/dist/schema/modules/issue/classes/index.d.ts +1 -0
- package/dist/schema/modules/issue/classes/index.js +1 -0
- package/dist/schema/modules/issue/classes/issue-assigned-to.d.ts +1 -1
- package/dist/schema/modules/issue/classes/issue-assigned-to.js +5 -2
- package/dist/schema/modules/issue/classes/issue-is-about.d.ts +30 -0
- package/dist/schema/modules/issue/classes/issue-is-about.js +16 -0
- package/dist/schema/modules/issue/classes/issue-reported-by.d.ts +1 -1
- package/dist/schema/modules/issue/classes/issue-reported-by.js +5 -2
- package/dist/schema/modules/issue/classes/issue-subtask-of.d.ts +2 -2
- package/dist/schema/modules/issue/classes/issue-subtask-of.js +5 -2
- package/dist/schema/modules/issue/classes/issue-tracked-by.d.ts +2 -2
- package/dist/schema/modules/issue/classes/issue-tracked-by.js +5 -2
- package/dist/schema/modules/issue/classes/issue.d.ts +9 -0
- package/dist/schema/modules/issue/classes/issue.js +5 -3
- package/dist/schema/modules/issue/classes/project-contains-issue.d.ts +1 -1
- package/dist/schema/modules/issue/classes/project-contains-issue.js +5 -3
- package/dist/schema/modules/issue/functions/add-issue-comment.js +2 -2
- package/dist/schema/modules/issue/functions/archive-issue.js +2 -2
- package/dist/schema/modules/issue/functions/assign-issue.js +2 -2
- package/dist/schema/modules/issue/functions/delete-issue.js +2 -2
- package/dist/schema/modules/issue/functions/edit-issue.js +2 -2
- package/dist/schema/modules/issue/functions/index.d.ts +1 -0
- package/dist/schema/modules/issue/functions/index.js +1 -0
- package/dist/schema/modules/issue/functions/set-issue-parent.js +2 -2
- package/dist/schema/modules/issue/functions/set-issue-tags.js +2 -2
- package/dist/schema/modules/issue/functions/set-issue-topics.d.ts +9 -0
- package/dist/schema/modules/issue/functions/set-issue-topics.js +12 -0
- package/dist/schema/modules/issue/functions/track-issue.js +2 -2
- package/dist/schema/modules/issue/functions/transition-issue.js +2 -2
- package/dist/schema/modules/issue/functions/untrack-issue.js +2 -2
- package/dist/schema/modules/issue/functions/update-issue.js +2 -2
- package/dist/schema/modules/issue/index.d.ts +3 -3
- package/dist/schema/modules/issue/index.js +3 -3
- package/dist/schema/modules/issue/policies/index.d.ts +9 -9
- package/dist/schema/modules/issue/policies/index.js +9 -9
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-assigned-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{traverse-issue-assignee.js → owns-or-belongs-to-project-of-assigned-issue.js} +1 -1
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-child-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{traverse-issue-parent.js → owns-or-belongs-to-project-of-child-issue.js} +1 -1
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-issue-or-reported-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{contribute-to-issue-or-reported-issue.js → owns-or-belongs-to-project-of-issue-or-reported-issue.js} +2 -2
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-issue-with-topic.d.ts +1 -0
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-issue-with-topic.js +13 -0
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{contribute-to-issue.js → owns-or-belongs-to-project-of-issue.js} +1 -1
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-reported-issue-or-reported-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{traverse-issue-reporter.js → owns-or-belongs-to-project-of-reported-issue-or-reported-issue.js} +1 -1
- package/dist/schema/modules/issue/policies/owns-or-belongs-to-project-of-tracked-or-tracking-issue.d.ts +2 -0
- package/dist/schema/modules/issue/policies/{traverse-issue-tracking.js → owns-or-belongs-to-project-of-tracked-or-tracking-issue.js} +2 -2
- package/dist/schema/modules/issue/policies/owns-project-of-issue.d.ts +1 -0
- package/dist/schema/modules/issue/policies/{manage-issue.js → owns-project-of-issue.js} +1 -1
- package/dist/schema/modules/issue/policies/reported-issue.d.ts +1 -1
- package/dist/schema/modules/issue/policies/reported-issue.js +1 -1
- package/dist/schema/modules/issue/types/index.d.ts +1 -1
- package/dist/schema/modules/issue/types/index.js +1 -1
- package/dist/schema/modules/issue/types/issue.d.ts +2 -0
- package/dist/schema/modules/issue/types/issue.js +2 -0
- package/dist/schema/modules/project/classes/project-has-member.js +5 -2
- package/dist/schema/modules/project/classes/project-owned-by.js +5 -2
- package/dist/schema/modules/project/classes/project.js +2 -2
- package/dist/schema/modules/project/functions/add-project-member.js +2 -2
- package/dist/schema/modules/project/functions/archive-project.js +2 -2
- package/dist/schema/modules/project/functions/create-project-issue.js +2 -2
- package/dist/schema/modules/project/functions/create-project-tag.js +2 -2
- package/dist/schema/modules/project/functions/delete-project.js +2 -2
- package/dist/schema/modules/project/functions/receive-project-report.js +2 -2
- package/dist/schema/modules/project/functions/remove-project-member.js +2 -2
- package/dist/schema/modules/project/functions/update-project.js +2 -2
- package/dist/schema/modules/project/index.d.ts +1 -1
- package/dist/schema/modules/project/index.js +1 -1
- package/dist/schema/modules/project/policies/index.d.ts +5 -4
- package/dist/schema/modules/project/policies/index.js +5 -4
- package/dist/schema/modules/project/policies/owns-or-belongs-to-containing-project.d.ts +1 -0
- package/dist/schema/modules/project/policies/owns-or-belongs-to-containing-project.js +7 -0
- package/dist/schema/modules/project/policies/owns-or-belongs-to-project-of-membership.d.ts +1 -0
- package/dist/schema/modules/project/policies/{traverse-project-member.js → owns-or-belongs-to-project-of-membership.js} +1 -1
- package/dist/schema/modules/project/policies/owns-or-belongs-to-project-of-ownership.d.ts +1 -0
- package/dist/schema/modules/project/policies/{traverse-project-owner.js → owns-or-belongs-to-project-of-ownership.js} +1 -1
- package/dist/schema/modules/project/policies/owns-or-belongs-to-project.d.ts +1 -0
- package/dist/schema/modules/project/policies/{contribute-to-project.js → owns-or-belongs-to-project.js} +1 -1
- package/dist/schema/modules/project/policies/owns-project.d.ts +1 -0
- package/dist/schema/modules/project/policies/{manage-project.js → owns-project.js} +1 -1
- package/dist/schema/modules/project/types/project-edges.d.ts +1 -1
- package/dist/schema/modules/tag/classes/issue-tagged-with.d.ts +1 -1
- package/dist/schema/modules/tag/classes/issue-tagged-with.js +5 -2
- package/dist/schema/modules/tag/classes/project-contains-tag.js +5 -3
- package/dist/schema/modules/tag/classes/tag.js +5 -2
- package/dist/schema/modules/tag/functions/delete-tag.js +2 -2
- package/dist/schema/modules/tag/functions/edit-tag.js +2 -2
- package/dist/schema/modules/tag/index.d.ts +1 -1
- package/dist/schema/modules/tag/index.js +1 -1
- package/dist/schema/modules/tag/policies/index.d.ts +3 -4
- package/dist/schema/modules/tag/policies/index.js +3 -4
- package/dist/schema/modules/tag/policies/owns-or-belongs-to-project-of-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/{contribute-to-tag.js → owns-or-belongs-to-project-of-tag.js} +1 -1
- package/dist/schema/modules/tag/policies/owns-or-belongs-to-project-of-tagged-issue.d.ts +1 -0
- package/dist/schema/modules/tag/policies/{traverse-issue-tag.js → owns-or-belongs-to-project-of-tagged-issue.js} +1 -1
- package/dist/schema/modules/tag/policies/owns-project-of-tag.d.ts +1 -0
- package/dist/schema/modules/tag/policies/{manage-tag.js → owns-project-of-tag.js} +1 -1
- package/dist/schema/schema.d.ts +65 -30
- package/dist/schema/schema.js +26 -25
- package/package.json +1 -1
- package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.d.ts +0 -1
- package/dist/schema/modules/comment/policies/edit-own-comment.d.ts +0 -1
- package/dist/schema/modules/comment/policies/traverse-comment-relationship.d.ts +0 -1
- package/dist/schema/modules/comment/policies/traverse-issue-comment.d.ts +0 -1
- package/dist/schema/modules/issue/policies/contribute-to-issue-or-reported-issue.d.ts +0 -1
- package/dist/schema/modules/issue/policies/contribute-to-issue.d.ts +0 -1
- package/dist/schema/modules/issue/policies/manage-issue.d.ts +0 -1
- package/dist/schema/modules/issue/policies/traverse-issue-assignee.d.ts +0 -1
- package/dist/schema/modules/issue/policies/traverse-issue-parent.d.ts +0 -1
- package/dist/schema/modules/issue/policies/traverse-issue-reporter.d.ts +0 -1
- package/dist/schema/modules/issue/policies/traverse-issue-tracking.d.ts +0 -2
- package/dist/schema/modules/issue/policies/traverse-project-issue.d.ts +0 -1
- package/dist/schema/modules/issue/policies/traverse-project-issue.js +0 -6
- package/dist/schema/modules/project/policies/contribute-to-project.d.ts +0 -1
- package/dist/schema/modules/project/policies/manage-project.d.ts +0 -1
- package/dist/schema/modules/project/policies/traverse-project-member.d.ts +0 -1
- package/dist/schema/modules/project/policies/traverse-project-owner.d.ts +0 -1
- package/dist/schema/modules/tag/policies/contribute-to-tag.d.ts +0 -1
- package/dist/schema/modules/tag/policies/manage-tag.d.ts +0 -1
- package/dist/schema/modules/tag/policies/traverse-issue-tag.d.ts +0 -1
- package/dist/schema/modules/tag/policies/traverse-project-tag.d.ts +0 -1
- package/dist/schema/modules/tag/policies/traverse-project-tag.js +0 -6
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { ownsOrBelongsToProject } from './owns-or-belongs-to-project.js';
|
|
2
|
+
export { ownsProject } from './owns-project.js';
|
|
3
|
+
export { ownsOrBelongsToProjectOfMembership } from './owns-or-belongs-to-project-of-membership.js';
|
|
4
|
+
export { ownsOrBelongsToProjectOfOwnership } from './owns-or-belongs-to-project-of-ownership.js';
|
|
5
|
+
export { ownsOrBelongsToContainingProject } from './owns-or-belongs-to-containing-project.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
1
|
+
export { ownsOrBelongsToProject } from './owns-or-belongs-to-project.js';
|
|
2
|
+
export { ownsProject } from './owns-project.js';
|
|
3
|
+
export { ownsOrBelongsToProjectOfMembership } from './owns-or-belongs-to-project-of-membership.js';
|
|
4
|
+
export { ownsOrBelongsToProjectOfOwnership } from './owns-or-belongs-to-project-of-ownership.js';
|
|
5
|
+
export { ownsOrBelongsToContainingProject } from './owns-or-belongs-to-containing-project.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToContainingProject: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
+
import { project_has_member } from '../classes/project-has-member.js';
|
|
3
|
+
import { project_owned_by } from '../classes/project-owned-by.js';
|
|
4
|
+
export const ownsOrBelongsToContainingProject = policy({
|
|
5
|
+
description: 'The caller owns or belongs to the Project containing the Issue or Tag.',
|
|
6
|
+
match: ({ anyOf, edge, source, subject }) => anyOf(edge({ source: subject, class: () => project_owned_by, target: source }), edge({ source: subject, class: () => project_has_member, target: source })),
|
|
7
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToProjectOfMembership: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { project_has_member } from '../classes/project-has-member.js';
|
|
3
3
|
import { project_owned_by } from '../classes/project-owned-by.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsOrBelongsToProjectOfMembership = policy({
|
|
5
5
|
description: 'Project membership is visible only to that Project owner and members.',
|
|
6
6
|
match: ({ anyOf, edge, subject, target }) => anyOf(edge({ source: subject, class: () => project_owned_by, target }), edge({ source: subject, class: () => project_has_member, target })),
|
|
7
7
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToProjectOfOwnership: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { project_has_member } from '../classes/project-has-member.js';
|
|
3
3
|
import { project_owned_by } from '../classes/project-owned-by.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsOrBelongsToProjectOfOwnership = policy({
|
|
5
5
|
description: 'Project ownership is visible only to that Project owner and members.',
|
|
6
6
|
match: ({ anyOf, edge, subject, target }) => anyOf(edge({ source: subject, class: () => project_owned_by, target }), edge({ source: subject, class: () => project_has_member, target })),
|
|
7
7
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToProject: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { project_has_member } from '../classes/project-has-member.js';
|
|
3
3
|
import { project_owned_by } from '../classes/project-owned-by.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsOrBelongsToProject = policy({
|
|
5
5
|
description: 'The caller owns or is a member of this Project.',
|
|
6
6
|
match: ({ anyOf, edge, object, subject }) => anyOf(edge({ source: subject, class: () => project_owned_by, target: object }), edge({ source: subject, class: () => project_has_member, target: object })),
|
|
7
7
|
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsProject: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { project_owned_by } from '../classes/project-owned-by.js';
|
|
3
|
-
export const
|
|
3
|
+
export const ownsProject = policy({
|
|
4
4
|
description: 'The caller is the exact owner of this Project.',
|
|
5
5
|
match: ({ edge, object, subject }) => edge({ source: subject, class: () => project_owned_by, target: object }),
|
|
6
6
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NodeId } from '@astrale-os/sdk/graph/node';
|
|
2
2
|
/** The Edge Classes that hold a Project, one of its Issues, Tags or Comments. */
|
|
3
|
-
export type ProjectEdgeClass = 'project_owned_by' | 'project_has_member' | 'project_contains_tag' | 'project_contains_issue' | 'issue_reported_by' | 'issue_assigned_to' | 'issue_subtask_of' | 'issue_tracked_by' | 'issue_tagged_with' | 'issue_has_comment' | 'comment_authored_by';
|
|
3
|
+
export type ProjectEdgeClass = 'project_owned_by' | 'project_has_member' | 'project_contains_tag' | 'project_contains_issue' | 'issue_reported_by' | 'issue_assigned_to' | 'issue_subtask_of' | 'issue_tracked_by' | 'issue_tagged_with' | 'issue_is_about' | 'issue_has_comment' | 'comment_authored_by';
|
|
4
4
|
/** One Edge, by the Nodes at its ends. */
|
|
5
5
|
export interface EdgeEnds {
|
|
6
6
|
readonly source: NodeId;
|
|
@@ -10,7 +10,7 @@ export declare const issue_tagged_with: import("@astrale-os/sdk/schema").Directe
|
|
|
10
10
|
readonly abstract: false;
|
|
11
11
|
readonly depth: 1;
|
|
12
12
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
13
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
13
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
14
14
|
})[];
|
|
15
15
|
readonly outgoing: "0..*";
|
|
16
16
|
};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { Issue } from '../../issue/index.js';
|
|
3
|
-
import {
|
|
3
|
+
import { ownsOrBelongsToProjectOfTaggedIssue } from '../policies/owns-or-belongs-to-project-of-tagged-issue.js';
|
|
4
4
|
import { Tag } from './tag.js';
|
|
5
5
|
export const issue_tagged_with = edgeClass.directed({
|
|
6
6
|
description: 'One Issue is classified by one Tag from the same Project.',
|
|
7
7
|
source: { as: 'issue', accepts: [() => Issue], outgoing: '0..*' },
|
|
8
8
|
target: { as: 'tag', accepts: [() => Tag], incoming: '0..*' },
|
|
9
|
-
policies: {
|
|
9
|
+
policies: {
|
|
10
|
+
read: () => ownsOrBelongsToProjectOfTaggedIssue,
|
|
11
|
+
traverse: () => ownsOrBelongsToProjectOfTaggedIssue,
|
|
12
|
+
},
|
|
10
13
|
});
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { Project } from '../../project/index.js';
|
|
3
|
-
import { TraverseProjectTag } from '../policies/traverse-project-tag.js';
|
|
2
|
+
import { Project, ownsOrBelongsToContainingProject } from '../../project/index.js';
|
|
4
3
|
import { Tag } from './tag.js';
|
|
5
4
|
export const project_contains_tag = edgeClass.directed({
|
|
6
5
|
description: 'One Project owns one local Tag vocabulary entry.',
|
|
7
6
|
source: { as: 'project', accepts: [() => Project], outgoing: '0..*' },
|
|
8
7
|
target: { as: 'tag', accepts: [() => Tag], incoming: '1' },
|
|
9
|
-
policies: {
|
|
8
|
+
policies: {
|
|
9
|
+
read: () => ownsOrBelongsToContainingProject,
|
|
10
|
+
traverse: () => ownsOrBelongsToContainingProject,
|
|
11
|
+
},
|
|
10
12
|
});
|
|
@@ -3,7 +3,7 @@ import { Tags } from '@astrale-os/sdk/schema/icons';
|
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { deleteTagMethod } from '../functions/delete-tag.js';
|
|
5
5
|
import { editTagMethod } from '../functions/edit-tag.js';
|
|
6
|
-
import {
|
|
6
|
+
import { ownsOrBelongsToProjectOfTag } from '../policies/owns-or-belongs-to-project-of-tag.js';
|
|
7
7
|
export const Tag = nodeClass({
|
|
8
8
|
description: 'One Project-local label with a canonical slug.',
|
|
9
9
|
icon: classIcon.lucide(Tags),
|
|
@@ -13,5 +13,8 @@ export const Tag = nodeClass({
|
|
|
13
13
|
color: property(z.string().min(7).max(7), { required: false }),
|
|
14
14
|
},
|
|
15
15
|
methods: { edit: editTagMethod, delete: deleteTagMethod },
|
|
16
|
-
policies: {
|
|
16
|
+
policies: {
|
|
17
|
+
read: () => ownsOrBelongsToProjectOfTag,
|
|
18
|
+
traverse: () => ownsOrBelongsToProjectOfTag,
|
|
19
|
+
},
|
|
17
20
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { method } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { nodeIdValue } from '../../../types/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { ownsProjectOfTag } from '../policies/owns-project-of-tag.js';
|
|
5
5
|
export const deleteTagMethod = method({
|
|
6
6
|
description: 'Detach and delete this Project-local Tag when it labels at most 2,046 Issues; unlink larger sets first.',
|
|
7
7
|
auth: 'authorized',
|
|
8
|
-
policy: ({ check, self }) => check(
|
|
8
|
+
policy: ({ check, self }) => check(ownsProjectOfTag, self),
|
|
9
9
|
input: z.strictObject({}),
|
|
10
10
|
output: z.strictObject({ tagId: nodeIdValue, deleted: z.literal(true) }),
|
|
11
11
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { method } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import {
|
|
3
|
+
import { ownsProjectOfTag } from '../policies/owns-project-of-tag.js';
|
|
4
4
|
import { tagValue } from '../types/tag.js';
|
|
5
5
|
export const editTagMethod = method({
|
|
6
6
|
description: 'Edit this Project-local Tag.',
|
|
7
7
|
auth: 'authorized',
|
|
8
|
-
policy: ({ check, self }) => check(
|
|
8
|
+
policy: ({ check, self }) => check(ownsProjectOfTag, self),
|
|
9
9
|
input: z.strictObject({
|
|
10
10
|
name: z.string().min(1).max(64).optional(),
|
|
11
11
|
color: z.string().nullable().optional(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { tagValue } from './types/index.js';
|
|
2
2
|
export { issue_tagged_with, project_contains_tag, Tag } from './classes/index.js';
|
|
3
3
|
export { deleteTagMethod, editTagMethod } from './functions/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { ownsOrBelongsToProjectOfTag, ownsProjectOfTag, ownsOrBelongsToProjectOfTaggedIssue, } from './policies/index.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { tagValue } from './types/index.js';
|
|
2
2
|
export { issue_tagged_with, project_contains_tag, Tag } from './classes/index.js';
|
|
3
3
|
export { deleteTagMethod, editTagMethod } from './functions/index.js';
|
|
4
|
-
export {
|
|
4
|
+
export { ownsOrBelongsToProjectOfTag, ownsProjectOfTag, ownsOrBelongsToProjectOfTaggedIssue, } from './policies/index.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { TraverseProjectTag } from './traverse-project-tag.js';
|
|
1
|
+
export { ownsOrBelongsToProjectOfTag } from './owns-or-belongs-to-project-of-tag.js';
|
|
2
|
+
export { ownsProjectOfTag } from './owns-project-of-tag.js';
|
|
3
|
+
export { ownsOrBelongsToProjectOfTaggedIssue } from './owns-or-belongs-to-project-of-tagged-issue.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export { TraverseProjectTag } from './traverse-project-tag.js';
|
|
1
|
+
export { ownsOrBelongsToProjectOfTag } from './owns-or-belongs-to-project-of-tag.js';
|
|
2
|
+
export { ownsProjectOfTag } from './owns-project-of-tag.js';
|
|
3
|
+
export { ownsOrBelongsToProjectOfTaggedIssue } from './owns-or-belongs-to-project-of-tagged-issue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToProjectOfTag: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { Project, project_has_member, project_owned_by } from '../../project/index.js';
|
|
3
3
|
import { project_contains_tag } from '../classes/project-contains-tag.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsOrBelongsToProjectOfTag = policy({
|
|
5
5
|
description: 'The caller owns or belongs to the Project containing this Tag.',
|
|
6
6
|
match: ({ allOf, anyOf, edge, exists, object, subject }) => exists(({ node }) => {
|
|
7
7
|
const project = node(() => Project);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsOrBelongsToProjectOfTaggedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { project_contains_issue } from '../../issue/index.js';
|
|
3
3
|
import { Project, project_has_member, project_owned_by } from '../../project/index.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsOrBelongsToProjectOfTaggedIssue = policy({
|
|
5
5
|
description: 'Issue Tag relationships are visible only inside the containing Project.',
|
|
6
6
|
match: ({ allOf, anyOf, edge, exists, source, subject }) => anyOf(exists(({ node }) => {
|
|
7
7
|
const project = node(() => Project);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const ownsProjectOfTag: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { policy } from '@astrale-os/sdk/schema';
|
|
2
2
|
import { Project, project_owned_by } from '../../project/index.js';
|
|
3
3
|
import { project_contains_tag } from '../classes/project-contains-tag.js';
|
|
4
|
-
export const
|
|
4
|
+
export const ownsProjectOfTag = policy({
|
|
5
5
|
description: 'The caller owns the Project containing this Tag.',
|
|
6
6
|
match: ({ allOf, edge, exists, object, subject }) => exists(({ node }) => {
|
|
7
7
|
const project = node(() => Project);
|
package/dist/schema/schema.d.ts
CHANGED
|
@@ -301,6 +301,15 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
301
301
|
tagIds: string[];
|
|
302
302
|
};
|
|
303
303
|
}, "authorized", false, false, undefined, undefined>>;
|
|
304
|
+
setTopics: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
305
|
+
topicIds: string[];
|
|
306
|
+
}, {
|
|
307
|
+
readonly mode: 'value';
|
|
308
|
+
readonly value: {
|
|
309
|
+
issueId: string;
|
|
310
|
+
topicIds: string[];
|
|
311
|
+
};
|
|
312
|
+
}, "authorized", false, false, undefined, undefined>>;
|
|
304
313
|
setParent: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
|
|
305
314
|
parentId: string | null;
|
|
306
315
|
}, {
|
|
@@ -500,7 +509,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
500
509
|
readonly abstract: false;
|
|
501
510
|
readonly depth: 1;
|
|
502
511
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
503
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
512
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
504
513
|
})[];
|
|
505
514
|
readonly incoming: "1";
|
|
506
515
|
};
|
|
@@ -526,7 +535,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
526
535
|
readonly abstract: false;
|
|
527
536
|
readonly depth: 1;
|
|
528
537
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
529
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
538
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
530
539
|
})[];
|
|
531
540
|
readonly incoming: "0..1";
|
|
532
541
|
};
|
|
@@ -552,7 +561,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
552
561
|
readonly abstract: false;
|
|
553
562
|
readonly depth: 1;
|
|
554
563
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
555
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
564
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
556
565
|
})[];
|
|
557
566
|
readonly incoming: "0..1";
|
|
558
567
|
};
|
|
@@ -571,7 +580,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
571
580
|
readonly abstract: false;
|
|
572
581
|
readonly depth: 1;
|
|
573
582
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
574
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
583
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
575
584
|
})[];
|
|
576
585
|
readonly outgoing: "0..1";
|
|
577
586
|
};
|
|
@@ -582,7 +591,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
582
591
|
readonly abstract: false;
|
|
583
592
|
readonly depth: 1;
|
|
584
593
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
585
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
594
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
586
595
|
})[];
|
|
587
596
|
readonly incoming: "0..*";
|
|
588
597
|
};
|
|
@@ -604,7 +613,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
604
613
|
readonly abstract: false;
|
|
605
614
|
readonly depth: 1;
|
|
606
615
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
607
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
616
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
608
617
|
})[];
|
|
609
618
|
readonly outgoing: "0..1";
|
|
610
619
|
};
|
|
@@ -615,7 +624,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
615
624
|
readonly abstract: false;
|
|
616
625
|
readonly depth: 1;
|
|
617
626
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
618
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
627
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
619
628
|
})[];
|
|
620
629
|
readonly incoming: "0..*";
|
|
621
630
|
};
|
|
@@ -637,7 +646,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
637
646
|
readonly abstract: false;
|
|
638
647
|
readonly depth: 1;
|
|
639
648
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
640
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
649
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
641
650
|
})[];
|
|
642
651
|
readonly outgoing: "0..*";
|
|
643
652
|
};
|
|
@@ -723,7 +732,7 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
723
732
|
readonly abstract: false;
|
|
724
733
|
readonly depth: 1;
|
|
725
734
|
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
726
|
-
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "track" | "transition" | "untrack" | "update";
|
|
735
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
727
736
|
})[];
|
|
728
737
|
readonly outgoing: "0..*";
|
|
729
738
|
};
|
|
@@ -741,29 +750,55 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
|
|
|
741
750
|
readonly constraints: Record<never, never>;
|
|
742
751
|
readonly effectiveProperties: never;
|
|
743
752
|
}>;
|
|
753
|
+
readonly issue_is_about: import("@astrale-os/sdk/schema").DirectedEdgeClass<{
|
|
754
|
+
readonly depth: 0;
|
|
755
|
+
readonly abstract: false;
|
|
756
|
+
readonly extends: readonly [];
|
|
757
|
+
readonly properties: never;
|
|
758
|
+
readonly source: {
|
|
759
|
+
readonly as: "issue";
|
|
760
|
+
readonly accepts: readonly (() => {
|
|
761
|
+
readonly kind: 'node';
|
|
762
|
+
readonly abstract: false;
|
|
763
|
+
readonly depth: 1;
|
|
764
|
+
readonly properties: "archived" | "assigneeId" | "body" | "createdAt" | "description" | "name" | "priority" | "reference" | "report" | "reportRequestId" | "reporterId" | "status" | "updatedAt";
|
|
765
|
+
readonly methods: "addComment" | "archive" | "assign" | "delete" | "edit" | "setParent" | "setTags" | "setTopics" | "track" | "transition" | "untrack" | "update";
|
|
766
|
+
})[];
|
|
767
|
+
readonly outgoing: "0..*";
|
|
768
|
+
};
|
|
769
|
+
readonly target: {
|
|
770
|
+
readonly as: "topic";
|
|
771
|
+
readonly accepts: readonly (import("@astrale-os/sdk/schema").ClassRef<"Node"> & {
|
|
772
|
+
readonly origin: "kernel.astrale.ai";
|
|
773
|
+
})[];
|
|
774
|
+
readonly incoming: "0..*";
|
|
775
|
+
};
|
|
776
|
+
readonly constraints: Record<never, never>;
|
|
777
|
+
readonly effectiveProperties: never;
|
|
778
|
+
}>;
|
|
744
779
|
};
|
|
745
780
|
readonly policies: {
|
|
746
|
-
readonly
|
|
747
|
-
readonly
|
|
748
|
-
readonly
|
|
749
|
-
readonly
|
|
750
|
-
readonly
|
|
751
|
-
readonly
|
|
752
|
-
readonly
|
|
753
|
-
readonly
|
|
754
|
-
readonly
|
|
755
|
-
readonly
|
|
756
|
-
readonly
|
|
757
|
-
readonly
|
|
758
|
-
readonly
|
|
759
|
-
readonly
|
|
760
|
-
readonly
|
|
761
|
-
readonly
|
|
762
|
-
readonly
|
|
763
|
-
readonly
|
|
764
|
-
readonly
|
|
765
|
-
readonly
|
|
766
|
-
readonly
|
|
781
|
+
readonly ownsProject: import("@astrale-os/sdk/schema").Policy;
|
|
782
|
+
readonly ownsOrBelongsToProject: import("@astrale-os/sdk/schema").Policy;
|
|
783
|
+
readonly ownsOrBelongsToProjectOfIssue: import("@astrale-os/sdk/schema").Policy;
|
|
784
|
+
readonly reportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
785
|
+
readonly ownsOrBelongsToProjectOfIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
786
|
+
readonly ownsProjectOfIssue: import("@astrale-os/sdk/schema").Policy;
|
|
787
|
+
readonly ownsOrBelongsToProjectOfTag: import("@astrale-os/sdk/schema").Policy;
|
|
788
|
+
readonly ownsProjectOfTag: import("@astrale-os/sdk/schema").Policy;
|
|
789
|
+
readonly ownsOrBelongsToProjectOfIssueOfCommentOrReportedIssueOfComment: import("@astrale-os/sdk/schema").Policy;
|
|
790
|
+
readonly authoredComment: import("@astrale-os/sdk/schema").Policy;
|
|
791
|
+
readonly ownsOrBelongsToProjectOfOwnership: import("@astrale-os/sdk/schema").Policy;
|
|
792
|
+
readonly ownsOrBelongsToProjectOfMembership: import("@astrale-os/sdk/schema").Policy;
|
|
793
|
+
readonly ownsOrBelongsToContainingProject: import("@astrale-os/sdk/schema").Policy;
|
|
794
|
+
readonly ownsOrBelongsToProjectOfReportedIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
795
|
+
readonly ownsOrBelongsToProjectOfAssignedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
796
|
+
readonly ownsOrBelongsToProjectOfChildIssue: import("@astrale-os/sdk/schema").Policy;
|
|
797
|
+
readonly ownsOrBelongsToProjectOfTrackedOrTrackingIssue: import("@astrale-os/sdk/schema").Policy;
|
|
798
|
+
readonly ownsOrBelongsToProjectOfIssueWithCommentOrReportedIssueWithComment: import("@astrale-os/sdk/schema").Policy;
|
|
799
|
+
readonly ownsOrBelongsToProjectOfTaggedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
800
|
+
readonly ownsOrBelongsToProjectOfIssueWithTopic: import("@astrale-os/sdk/schema").Policy;
|
|
801
|
+
readonly ownsOrBelongsToProjectOfIssueOfAuthoredComment: import("@astrale-os/sdk/schema").Policy;
|
|
767
802
|
};
|
|
768
803
|
readonly views: {
|
|
769
804
|
readonly application: import("@astrale-os/sdk/schema").View;
|
package/dist/schema/schema.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { KernelSchema, defineSchema, domainIcon, view } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { Comment, comment_authored_by, issue_has_comment,
|
|
3
|
-
import { Issue,
|
|
4
|
-
import { Project,
|
|
5
|
-
import { Tag,
|
|
2
|
+
import { Comment, comment_authored_by, issue_has_comment, ownsOrBelongsToProjectOfIssueOfCommentOrReportedIssueOfComment, authoredComment, ownsOrBelongsToProjectOfIssueOfAuthoredComment, ownsOrBelongsToProjectOfIssueWithCommentOrReportedIssueWithComment, } from './modules/comment/index.js';
|
|
3
|
+
import { Issue, ownsOrBelongsToProjectOfIssue, ownsOrBelongsToProjectOfIssueOrReportedIssue, ownsProjectOfIssue, reportedIssue, ownsOrBelongsToProjectOfAssignedIssue, ownsOrBelongsToProjectOfChildIssue, ownsOrBelongsToProjectOfReportedIssueOrReportedIssue, ownsOrBelongsToProjectOfIssueWithTopic, ownsOrBelongsToProjectOfTrackedOrTrackingIssue, issue_assigned_to, issue_is_about, issue_reported_by, issue_subtask_of, issue_tracked_by, project_contains_issue, } from './modules/issue/index.js';
|
|
4
|
+
import { Project, ownsOrBelongsToProject, ownsOrBelongsToContainingProject, ownsProject, ownsOrBelongsToProjectOfMembership, ownsOrBelongsToProjectOfOwnership, project_has_member, project_owned_by, } from './modules/project/index.js';
|
|
5
|
+
import { Tag, ownsOrBelongsToProjectOfTag, ownsProjectOfTag, ownsOrBelongsToProjectOfTaggedIssue, issue_tagged_with, project_contains_tag, } from './modules/tag/index.js';
|
|
6
6
|
const origin = 'issues.astrale.ai';
|
|
7
7
|
const classes = {
|
|
8
8
|
Project,
|
|
@@ -20,29 +20,30 @@ const classes = {
|
|
|
20
20
|
comment_authored_by,
|
|
21
21
|
project_contains_tag,
|
|
22
22
|
issue_tagged_with,
|
|
23
|
+
issue_is_about,
|
|
23
24
|
};
|
|
24
25
|
const policies = {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
26
|
+
ownsProject,
|
|
27
|
+
ownsOrBelongsToProject,
|
|
28
|
+
ownsOrBelongsToProjectOfIssue,
|
|
29
|
+
reportedIssue,
|
|
30
|
+
ownsOrBelongsToProjectOfIssueOrReportedIssue,
|
|
31
|
+
ownsProjectOfIssue,
|
|
32
|
+
ownsOrBelongsToProjectOfTag,
|
|
33
|
+
ownsProjectOfTag,
|
|
34
|
+
ownsOrBelongsToProjectOfIssueOfCommentOrReportedIssueOfComment,
|
|
35
|
+
authoredComment,
|
|
36
|
+
ownsOrBelongsToProjectOfOwnership,
|
|
37
|
+
ownsOrBelongsToProjectOfMembership,
|
|
38
|
+
ownsOrBelongsToContainingProject,
|
|
39
|
+
ownsOrBelongsToProjectOfReportedIssueOrReportedIssue,
|
|
40
|
+
ownsOrBelongsToProjectOfAssignedIssue,
|
|
41
|
+
ownsOrBelongsToProjectOfChildIssue,
|
|
42
|
+
ownsOrBelongsToProjectOfTrackedOrTrackingIssue,
|
|
43
|
+
ownsOrBelongsToProjectOfIssueWithCommentOrReportedIssueWithComment,
|
|
44
|
+
ownsOrBelongsToProjectOfTaggedIssue,
|
|
45
|
+
ownsOrBelongsToProjectOfIssueWithTopic,
|
|
46
|
+
ownsOrBelongsToProjectOfIssueOfAuthoredComment,
|
|
46
47
|
};
|
|
47
48
|
const views = { application: view({}) };
|
|
48
49
|
export const schema = defineSchema(origin, {
|
package/package.json
CHANGED
package/dist/schema/modules/comment/policies/contribute-to-comment-or-reported-issue-of-comment.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToCommentOrReportedIssueOfComment: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const EditOwnComment: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseCommentRelationship: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseIssueComment: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToIssueOrReportedIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ManageIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseIssueAssignee: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseIssueParent: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseIssueReporter: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseProjectIssue: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { project_has_member, project_owned_by } from '../../project/index.js';
|
|
3
|
-
export const TraverseProjectIssue = policy({
|
|
4
|
-
description: 'Project Issue containment is visible only to that Project owner and members.',
|
|
5
|
-
match: ({ anyOf, edge, source, subject }) => anyOf(edge({ source: subject, class: () => project_owned_by, target: source }), edge({ source: subject, class: () => project_has_member, target: source })),
|
|
6
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToProject: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ManageProject: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseProjectMember: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const TraverseProjectOwner: import("@astrale-os/sdk/schema").Policy;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ContributeToTag: import("@astrale-os/sdk/schema").Policy;
|