@astrale-domains/issues 0.7.2 → 0.7.3

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 CHANGED
@@ -16,7 +16,7 @@ Project
16
16
  Issue
17
17
  immutable reference; title (100 characters); optional Markdown description (50,000 characters)
18
18
  status: open | accepted | resolved | closed
19
- priority: 0..4; optional assignee; optional acyclic parent; Tags
19
+ priority: no priority, low, medium, high, urgent (0..4); optional assignee; optional acyclic parent; Tags
20
20
  tracked by at most one other Issue, in any Project
21
21
 
22
22
  Comment
@@ -32,7 +32,9 @@ export declare const Issue: import("@astrale-os/sdk/schema").AuthoredNodeClass<{
32
32
  description?: string;
33
33
  immutable?: import("@astrale-os/sdk/schema").PropertyImmutability;
34
34
  }>;
35
- priority: z.ZodNumber;
35
+ priority: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodNumber, {
36
+ readonly description: "How urgent the Issue is: 0 no priority, 1 low, 2 medium, 3 high, 4 urgent.";
37
+ }>;
36
38
  archived: z.ZodBoolean;
37
39
  reportRequestId: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodString>, {}>;
38
40
  report: import("@astrale-os/sdk/schema").AuthoredProperty<z.ZodOptional<z.ZodObject<{
@@ -15,7 +15,7 @@ import { untrackIssueMethod } from '../functions/untrack-issue.js';
15
15
  import { updateIssueMethod } from '../functions/update-issue.js';
16
16
  import { ContributeToIssueOrReportedIssue } from '../policies/contribute-to-issue-or-reported-issue.js';
17
17
  import { issueStatus } from '../states/index.js';
18
- import { issueDescriptionValue } from '../types/issue.js';
18
+ import { issueDescriptionValue, issuePriorityValue } from '../types/issue.js';
19
19
  import { reportContentValue } from '../types/report.js';
20
20
  export const Issue = nodeClass({
21
21
  description: 'One immutable-reference work item contained by exactly one Project.',
@@ -32,7 +32,9 @@ export const Issue = nodeClass({
32
32
  reporterId: property(nodeIdValue, {}),
33
33
  assigneeId: property(nodeIdValue.optional(), {}),
34
34
  status: stateProperty(issueStatus),
35
- priority: z.number().int().min(0).max(4),
35
+ priority: property(issuePriorityValue, {
36
+ description: 'How urgent the Issue is: 0 no priority, 1 low, 2 medium, 3 high, 4 urgent.',
37
+ }),
36
38
  archived: z.boolean(),
37
39
  reportRequestId: property(z.string().min(1).max(128).optional(), {}),
38
40
  report: property(reportContentValue.optional(), {}),
@@ -1,7 +1,7 @@
1
1
  import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
3
  import { ContributeToIssue } from '../policies/contribute-to-issue.js';
4
- import { issueDescriptionValue, issueTitleValue, issueValue } from '../types/issue.js';
4
+ import { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, } from '../types/issue.js';
5
5
  export const updateIssueMethod = method({
6
6
  description: 'Update mutable Issue fields.',
7
7
  auth: 'authorized',
@@ -9,7 +9,7 @@ export const updateIssueMethod = method({
9
9
  input: z.strictObject({
10
10
  title: issueTitleValue.optional(),
11
11
  description: issueDescriptionValue.optional(),
12
- priority: z.number().int().min(0).max(4).optional(),
12
+ priority: issuePriorityValue.optional(),
13
13
  }),
14
14
  output: issueValue,
15
15
  });
@@ -1,4 +1,4 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './types/index.js';
2
2
  export { issueStatus, type IssueEvent, type IssueStatus } from './states/index.js';
3
3
  export { issue_assigned_to, issue_reported_by, issue_subtask_of, issue_tracked_by, Issue, project_contains_issue, } from './classes/index.js';
4
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, deleteIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, trackIssueMethod, transitionIssueMethod, untrackIssueMethod, updateIssueMethod, } from './functions/index.js';
@@ -1,4 +1,4 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './types/index.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './types/index.js';
2
2
  export { issueStatus } from './states/index.js';
3
3
  export { issue_assigned_to, issue_reported_by, issue_subtask_of, issue_tracked_by, Issue, project_contains_issue, } from './classes/index.js';
4
4
  export { addIssueCommentMethod, archiveIssueMethod, assignIssueMethod, deleteIssueMethod, editIssueMethod, setIssueParentMethod, setIssueTagsMethod, trackIssueMethod, transitionIssueMethod, untrackIssueMethod, updateIssueMethod, } from './functions/index.js';
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS } from './issue.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS, } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, type ReportContent, } from './report.js';
@@ -1,2 +1,2 @@
1
- export { issueDescriptionValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS } from './issue.js';
1
+ export { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, MAX_ISSUE_TAGS, } from './issue.js';
2
2
  export { reportContentValue, reportContextValue, receiveReportInput, reportReceiptValue, } from './report.js';
@@ -3,6 +3,8 @@ import { z } from 'zod';
3
3
  export declare const issueTitleValue: z.ZodString;
4
4
  /** The Tags one Issue holds at most: `Issue.setTags` is the only call that tags an Issue. */
5
5
  export declare const MAX_ISSUE_TAGS = 128;
6
+ /** How urgent an Issue is: 0 is no priority, then 1 low, 2 medium, 3 high and 4 urgent. */
7
+ export declare const issuePriorityValue: z.ZodNumber;
6
8
  /** An Issue description, as Markdown; empty when the Issue has none. */
7
9
  export declare const issueDescriptionValue: z.ZodString;
8
10
  export declare const issueValue: z.ZodObject<{
@@ -5,6 +5,8 @@ import { issueStatus } from '../states/index.js';
5
5
  export const issueTitleValue = z.string().min(1).max(100);
6
6
  /** The Tags one Issue holds at most: `Issue.setTags` is the only call that tags an Issue. */
7
7
  export const MAX_ISSUE_TAGS = 128;
8
+ /** How urgent an Issue is: 0 is no priority, then 1 low, 2 medium, 3 high and 4 urgent. */
9
+ export const issuePriorityValue = z.number().int().min(0).max(4);
8
10
  /** An Issue description, as Markdown; empty when the Issue has none. */
9
11
  export const issueDescriptionValue = z.string().max(50_000);
10
12
  export const issueValue = z.strictObject({
@@ -13,6 +15,6 @@ export const issueValue = z.strictObject({
13
15
  title: issueTitleValue,
14
16
  description: issueDescriptionValue,
15
17
  status: issueStatus.stateSchema,
16
- priority: z.number().int().min(0).max(4),
18
+ priority: issuePriorityValue,
17
19
  archived: z.boolean(),
18
20
  });
@@ -1,6 +1,6 @@
1
1
  import { method } from '@astrale-os/sdk/schema';
2
2
  import { z } from 'zod';
3
- import { issueDescriptionValue, issueTitleValue, issueValue } from '../../issue/index.js';
3
+ import { issueDescriptionValue, issuePriorityValue, issueTitleValue, issueValue, } from '../../issue/index.js';
4
4
  import { ContributeToProject } from '../policies/contribute-to-project.js';
5
5
  export const createProjectIssueMethod = method({
6
6
  description: 'Create one atomically numbered Issue in this Project.',
@@ -9,7 +9,7 @@ export const createProjectIssueMethod = method({
9
9
  input: z.strictObject({
10
10
  title: issueTitleValue,
11
11
  description: issueDescriptionValue.optional(),
12
- priority: z.number().int().min(0).max(4).optional(),
12
+ priority: issuePriorityValue.optional(),
13
13
  }),
14
14
  output: issueValue,
15
15
  });
@@ -186,7 +186,9 @@ export declare const schema: import("@astrale-os/sdk/schema").AuthoredSchema<"is
186
186
  description?: string;
187
187
  immutable?: import("@astrale-os/sdk/schema").PropertyImmutability;
188
188
  }>;
189
- priority: import("zod").ZodNumber;
189
+ priority: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodNumber, {
190
+ readonly description: "How urgent the Issue is: 0 no priority, 1 low, 2 medium, 3 high, 4 urgent.";
191
+ }>;
190
192
  archived: import("zod").ZodBoolean;
191
193
  reportRequestId: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodString>, {}>;
192
194
  report: import("@astrale-os/sdk/schema").AuthoredProperty<import("zod").ZodOptional<import("zod").ZodObject<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/issues",
3
- "version": "0.7.2",
3
+ "version": "0.7.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",