@astrale-domains/issues 0.1.3 → 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 +9 -0
- package/README.md +13 -19
- package/dist/schema/.runtime/states/issue/index.d.ts +4 -7
- package/dist/schema/.runtime/states/issue/index.js +2 -2
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +4 -4
- package/dist/schema/{comment/relationships.d.ts → modules/comment/classes/comment-authored-by.d.ts} +0 -16
- 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} +1 -1
- package/dist/schema/{comment/class.js → modules/comment/classes/comment.js} +5 -4
- 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/{comment/contribute-to-comment-policy.js → modules/comment/policies/contribute-to-comment.js} +3 -3
- package/dist/schema/{comment/edit-own-comment-policy.js → modules/comment/policies/edit-own-comment.js} +1 -1
- package/dist/schema/modules/comment/policies/index.d.ts +4 -0
- package/dist/schema/modules/comment/policies/index.js +4 -0
- package/dist/schema/{comment/traverse-comment-relationship-policy.d.ts → modules/comment/policies/traverse-comment-relationship.d.ts} +0 -1
- package/dist/schema/{comment/traverse-comment-relationship-policy.js → modules/comment/policies/traverse-comment-relationship.js} +4 -4
- 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/{issue/class.d.ts → modules/issue/classes/issue.d.ts} +28 -3
- 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/{issue/contribute-to-issue-policy.js → modules/issue/policies/contribute-to-issue.js} +2 -2
- 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/{project/relationships.d.ts → modules/project/classes/project-has-member.d.ts} +0 -16
- package/dist/schema/modules/project/classes/project-has-member.js +9 -0
- package/dist/schema/modules/project/classes/project-owned-by.d.ts +16 -0
- package/dist/schema/modules/project/classes/project-owned-by.js +9 -0
- package/dist/schema/{project/class.d.ts → modules/project/classes/project.d.ts} +60 -11
- 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/{project/contribute-to-project-policy.js → modules/project/policies/contribute-to-project.js} +2 -1
- package/dist/schema/modules/project/policies/index.d.ts +4 -0
- package/dist/schema/modules/project/policies/index.js +4 -0
- package/dist/schema/{project/manage-project-policy.js → modules/project/policies/manage-project.js} +1 -1
- 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/{tag/relationships.d.ts → modules/tag/classes/project-contains-tag.d.ts} +0 -16
- 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} +1 -1
- package/dist/schema/{tag/class.js → modules/tag/classes/tag.js} +3 -2
- 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/{tag/contribute-to-tag-policy.js → modules/tag/policies/contribute-to-tag.js} +2 -2
- package/dist/schema/modules/tag/policies/index.d.ts +4 -0
- package/dist/schema/modules/tag/policies/index.js +4 -0
- package/dist/schema/{tag/manage-tag-policy.js → modules/tag/policies/manage-tag.js} +2 -2
- 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 +732 -650
- package/dist/schema/schema.js +47 -42
- package/dist/schema/types/index.js +1 -0
- package/dist/schema/types/node-id.js +2 -0
- package/package.json +24 -26
- package/dist/schema/comment/index.d.ts +0 -5
- package/dist/schema/comment/index.js +0 -5
- package/dist/schema/comment/methods.js +0 -18
- package/dist/schema/comment/relationships.js +0 -16
- package/dist/schema/issue/class.js +0 -29
- package/dist/schema/issue/index.d.ts +0 -4
- package/dist/schema/issue/index.js +0 -4
- package/dist/schema/issue/methods.js +0 -66
- package/dist/schema/issue/relationships.d.ts +0 -67
- package/dist/schema/issue/relationships.js +0 -29
- package/dist/schema/issue/traverse-issue-relationship-policy.d.ts +0 -5
- package/dist/schema/issue/traverse-issue-relationship-policy.js +0 -55
- package/dist/schema/project/class.js +0 -27
- package/dist/schema/project/index.d.ts +0 -5
- package/dist/schema/project/index.js +0 -5
- package/dist/schema/project/methods.js +0 -68
- package/dist/schema/project/relationships.js +0 -15
- package/dist/schema/project/traverse-project-relationship-policy.d.ts +0 -4
- package/dist/schema/project/traverse-project-relationship-policy.js +0 -20
- package/dist/schema/tag/index.d.ts +0 -4
- package/dist/schema/tag/index.js +0 -4
- package/dist/schema/tag/methods.js +0 -21
- package/dist/schema/tag/relationships.js +0 -16
- package/dist/schema/value/index.js +0 -34
- /package/dist/schema/{comment/contribute-to-comment-policy.d.ts → modules/comment/policies/contribute-to-comment.d.ts} +0 -0
- /package/dist/schema/{comment/edit-own-comment-policy.d.ts → modules/comment/policies/edit-own-comment.d.ts} +0 -0
- /package/dist/schema/{issue/contribute-to-issue-policy.d.ts → modules/issue/policies/contribute-to-issue.d.ts} +0 -0
- /package/dist/schema/{project/contribute-to-project-policy.d.ts → modules/project/policies/contribute-to-project.d.ts} +0 -0
- /package/dist/schema/{project/manage-project-policy.d.ts → modules/project/policies/manage-project.d.ts} +0 -0
- /package/dist/schema/{tag/contribute-to-tag-policy.d.ts → modules/tag/policies/contribute-to-tag.d.ts} +0 -0
- /package/dist/schema/{tag/manage-tag-policy.d.ts → modules/tag/policies/manage-tag.d.ts} +0 -0
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { policy } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { project_contains_issue } from '../issue/index.js';
|
|
3
|
-
import { project_contains_tag } from '../tag/index.js';
|
|
4
|
-
import { project_has_member, project_owned_by } from './relationships.js';
|
|
5
|
-
export const TraverseProjectOwner = policy({
|
|
6
|
-
description: 'Project ownership is visible only to that Project owner and members.',
|
|
7
|
-
match: ({ allOf, anyOf, edge, source, subject, target }) => anyOf(allOf(edge({ source, class: () => project_owned_by, target }), edge({ source: subject, class: () => project_owned_by, target })), allOf(edge({ source, class: () => project_owned_by, target }), edge({ source: subject, class: () => project_has_member, target }))),
|
|
8
|
-
});
|
|
9
|
-
export const TraverseProjectMember = policy({
|
|
10
|
-
description: 'Project membership is visible only to that Project owner and members.',
|
|
11
|
-
match: ({ allOf, anyOf, edge, source, subject, target }) => anyOf(allOf(edge({ source, class: () => project_has_member, target }), edge({ source: subject, class: () => project_owned_by, target })), allOf(edge({ source, class: () => project_has_member, target }), edge({ source: subject, class: () => project_has_member, target }))),
|
|
12
|
-
});
|
|
13
|
-
export const TraverseProjectIssue = policy({
|
|
14
|
-
description: 'Project Issue containment is visible only to that Project owner and members.',
|
|
15
|
-
match: ({ allOf, anyOf, edge, source, subject, target }) => anyOf(allOf(edge({ source, class: () => project_contains_issue, target }), edge({ source: subject, class: () => project_owned_by, target: source })), allOf(edge({ source, class: () => project_contains_issue, target }), edge({ source: subject, class: () => project_has_member, target: source }))),
|
|
16
|
-
});
|
|
17
|
-
export const TraverseProjectTag = policy({
|
|
18
|
-
description: 'Project Tag containment is visible only to that Project owner and members.',
|
|
19
|
-
match: ({ allOf, anyOf, edge, source, subject, target }) => anyOf(allOf(edge({ source, class: () => project_contains_tag, target }), edge({ source: subject, class: () => project_owned_by, target: source })), allOf(edge({ source, class: () => project_contains_tag, target }), edge({ source: subject, class: () => project_has_member, target: source }))),
|
|
20
|
-
});
|
package/dist/schema/tag/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { method } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { z } from 'zod';
|
|
3
|
-
import { nodeIdValue, tagValue } from '../value/index.js';
|
|
4
|
-
import { ManageTag } from './manage-tag-policy.js';
|
|
5
|
-
export const editTagMethod = method({
|
|
6
|
-
description: 'Edit this Project-local Tag.',
|
|
7
|
-
auth: 'authorized',
|
|
8
|
-
policy: ({ check, self }) => check(ManageTag, self),
|
|
9
|
-
input: z.strictObject({
|
|
10
|
-
name: z.string().min(1).max(64).optional(),
|
|
11
|
-
color: z.string().nullable().optional(),
|
|
12
|
-
}),
|
|
13
|
-
output: tagValue,
|
|
14
|
-
});
|
|
15
|
-
export const deleteTagMethod = method({
|
|
16
|
-
description: 'Detach and delete this Project-local Tag when it labels at most 2,046 Issues; unlink larger sets first.',
|
|
17
|
-
auth: 'authorized',
|
|
18
|
-
policy: ({ check, self }) => check(ManageTag, self),
|
|
19
|
-
input: z.strictObject({}),
|
|
20
|
-
output: z.strictObject({ tagId: nodeIdValue, deleted: z.literal(true) }),
|
|
21
|
-
});
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { edgeClass } from '@astrale-os/sdk/schema';
|
|
2
|
-
import { Issue, TraverseIssueTag } from '../issue/index.js';
|
|
3
|
-
import { Project, TraverseProjectTag } from '../project/index.js';
|
|
4
|
-
import { Tag } from './class.js';
|
|
5
|
-
export const project_contains_tag = edgeClass.directed({
|
|
6
|
-
description: 'One Project owns one local Tag vocabulary entry.',
|
|
7
|
-
source: { as: 'project', accepts: [() => Project], outgoing: '0..*' },
|
|
8
|
-
target: { as: 'tag', accepts: [() => Tag], incoming: '1' },
|
|
9
|
-
policies: { traverse: () => TraverseProjectTag },
|
|
10
|
-
});
|
|
11
|
-
export const issue_tagged_with = edgeClass.directed({
|
|
12
|
-
description: 'One Issue is classified by one Tag from the same Project.',
|
|
13
|
-
source: { as: 'issue', accepts: [() => Issue], outgoing: '0..*' },
|
|
14
|
-
target: { as: 'tag', accepts: [() => Tag], incoming: '0..*' },
|
|
15
|
-
policies: { traverse: () => TraverseIssueTag },
|
|
16
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { issueLifecycle } from '../.runtime/states/issue/index.js';
|
|
3
|
-
export const nodeIdValue = z.string().min(1);
|
|
4
|
-
export const projectValue = z.strictObject({
|
|
5
|
-
id: nodeIdValue,
|
|
6
|
-
key: z.string().min(2).max(10),
|
|
7
|
-
name: z.string().min(1).max(120),
|
|
8
|
-
description: z.string().max(5_000),
|
|
9
|
-
archived: z.boolean(),
|
|
10
|
-
});
|
|
11
|
-
export const membershipChangeValue = z.strictObject({
|
|
12
|
-
projectId: nodeIdValue,
|
|
13
|
-
memberId: nodeIdValue,
|
|
14
|
-
changed: z.boolean(),
|
|
15
|
-
});
|
|
16
|
-
export const issueValue = z.strictObject({
|
|
17
|
-
id: nodeIdValue,
|
|
18
|
-
reference: z.string().min(1).max(32),
|
|
19
|
-
title: z.string().min(1).max(200),
|
|
20
|
-
description: z.string().max(50_000),
|
|
21
|
-
status: issueLifecycle.stateSchema,
|
|
22
|
-
priority: z.number().int().min(0).max(4),
|
|
23
|
-
archived: z.boolean(),
|
|
24
|
-
});
|
|
25
|
-
export const commentValue = z.strictObject({
|
|
26
|
-
id: nodeIdValue,
|
|
27
|
-
body: z.string().min(1).max(50_000),
|
|
28
|
-
});
|
|
29
|
-
export const tagValue = z.strictObject({
|
|
30
|
-
id: nodeIdValue,
|
|
31
|
-
name: z.string().min(1).max(64),
|
|
32
|
-
slug: z.string().min(1).max(80),
|
|
33
|
-
color: z.string().min(7).max(7).optional(),
|
|
34
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|