@schnick371/devsteps-shared 0.0.1 → 0.5.1

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.
Files changed (71) hide show
  1. package/README.md +66 -7
  2. package/dist/core/add.d.ts +23 -0
  3. package/dist/core/add.d.ts.map +1 -0
  4. package/dist/core/add.js +102 -0
  5. package/dist/core/add.js.map +1 -0
  6. package/dist/core/archive.d.ts +24 -0
  7. package/dist/core/archive.d.ts.map +1 -0
  8. package/dist/core/archive.js +109 -0
  9. package/dist/core/archive.js.map +1 -0
  10. package/dist/core/bulk-update.d.ts +34 -0
  11. package/dist/core/bulk-update.d.ts.map +1 -0
  12. package/dist/core/bulk-update.js +141 -0
  13. package/dist/core/bulk-update.js.map +1 -0
  14. package/dist/core/context.d.ts +54 -0
  15. package/dist/core/context.d.ts.map +1 -0
  16. package/dist/core/context.js +198 -0
  17. package/dist/core/context.js.map +1 -0
  18. package/dist/core/get.d.ts +10 -0
  19. package/dist/core/get.d.ts.map +1 -0
  20. package/dist/core/get.js +28 -0
  21. package/dist/core/get.js.map +1 -0
  22. package/dist/core/index.d.ts +9 -0
  23. package/dist/core/index.d.ts.map +1 -0
  24. package/dist/core/index.js +9 -0
  25. package/dist/core/index.js.map +1 -0
  26. package/dist/core/list.d.ts +19 -0
  27. package/dist/core/list.d.ts.map +1 -0
  28. package/dist/core/list.js +64 -0
  29. package/dist/core/list.js.map +1 -0
  30. package/dist/core/update.d.ts +23 -0
  31. package/dist/core/update.d.ts.map +1 -0
  32. package/dist/core/update.js +118 -0
  33. package/dist/core/update.js.map +1 -0
  34. package/dist/core/validation.d.ts +28 -0
  35. package/dist/core/validation.d.ts.map +1 -0
  36. package/dist/core/validation.js +205 -0
  37. package/dist/core/validation.js.map +1 -0
  38. package/dist/index.d.ts +5 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +5 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/schemas/index.d.ts +286 -0
  43. package/dist/schemas/index.d.ts.map +1 -0
  44. package/dist/schemas/index.js +200 -0
  45. package/dist/schemas/index.js.map +1 -0
  46. package/dist/schemas/project.d.ts +134 -0
  47. package/dist/schemas/project.d.ts.map +1 -0
  48. package/dist/schemas/project.js +54 -0
  49. package/dist/schemas/project.js.map +1 -0
  50. package/dist/schemas/relationships.d.ts +30 -0
  51. package/dist/schemas/relationships.d.ts.map +1 -0
  52. package/dist/schemas/relationships.js +41 -0
  53. package/dist/schemas/relationships.js.map +1 -0
  54. package/dist/types/commands.d.ts +92 -0
  55. package/dist/types/commands.d.ts.map +1 -0
  56. package/dist/types/commands.js +14 -0
  57. package/dist/types/commands.js.map +1 -0
  58. package/dist/types/index.d.ts +3 -0
  59. package/dist/types/index.d.ts.map +1 -0
  60. package/dist/types/index.js +2 -0
  61. package/dist/types/index.js.map +1 -0
  62. package/dist/utils/cache.d.ts +80 -0
  63. package/dist/utils/cache.d.ts.map +1 -0
  64. package/dist/utils/cache.js +169 -0
  65. package/dist/utils/cache.js.map +1 -0
  66. package/dist/utils/index.d.ts +72 -0
  67. package/dist/utils/index.d.ts.map +1 -0
  68. package/dist/utils/index.js +148 -0
  69. package/dist/utils/index.js.map +1 -0
  70. package/package.json +47 -15
  71. package/index.js +0 -6
@@ -0,0 +1,205 @@
1
+ import { isFlexibleRelation, isHierarchyRelation } from '../schemas/relationships.js';
2
+ /**
3
+ * Validate relationship between two items based on methodology
4
+ * Only validates "implements" relationships - all other relations are flexible
5
+ *
6
+ * @param source - Item creating the relationship (child in hierarchy)
7
+ * @param target - Item being referenced (parent in hierarchy)
8
+ * @param relationType - Type of relationship
9
+ * @param methodology - Project methodology (scrum, waterfall, hybrid)
10
+ * @returns ValidationResult with valid flag and optional error/suggestion
11
+ */
12
+ export function validateRelationship(source, target, relationType, methodology) {
13
+ // Flexible relationships always allowed
14
+ if (isFlexibleRelation(relationType)) {
15
+ return { valid: true };
16
+ }
17
+ // Only validate hierarchy relationships
18
+ if (!isHierarchyRelation(relationType)) {
19
+ return { valid: false, error: `Unknown relationship type: ${relationType}` };
20
+ }
21
+ // Only validate "implements" direction (implemented-by is automatic reverse)
22
+ if (relationType === 'implemented-by') {
23
+ return { valid: true }; // Reverse relationships auto-created, no validation needed
24
+ }
25
+ // Validate based on methodology
26
+ if (methodology === 'scrum') {
27
+ return validateScrumHierarchy(source, target);
28
+ }
29
+ if (methodology === 'waterfall') {
30
+ return validateWaterfallHierarchy(source, target);
31
+ }
32
+ if (methodology === 'hybrid') {
33
+ // Try Scrum rules first
34
+ const scrumResult = validateScrumHierarchy(source, target);
35
+ if (scrumResult.valid) {
36
+ return scrumResult;
37
+ }
38
+ // Try Waterfall rules
39
+ const waterfallResult = validateWaterfallHierarchy(source, target);
40
+ if (waterfallResult.valid) {
41
+ return waterfallResult;
42
+ }
43
+ // Neither worked - return Scrum error (more common)
44
+ return scrumResult;
45
+ }
46
+ return {
47
+ valid: false,
48
+ error: `Unknown methodology: ${methodology}`,
49
+ };
50
+ }
51
+ /**
52
+ * Validate Scrum hierarchy rules
53
+ * Epic → Story|Spike → Task
54
+ * Bug/Test can implement Epic or Story
55
+ */
56
+ function validateScrumHierarchy(source, target) {
57
+ const { type: sourceType } = source;
58
+ const { type: targetType } = target;
59
+ // Task → Story or Spike
60
+ if (sourceType === 'task') {
61
+ if (targetType === 'story' || targetType === 'spike') {
62
+ return { valid: true };
63
+ }
64
+ return {
65
+ valid: false,
66
+ error: 'Tasks can only implement Stories or Spikes in Scrum',
67
+ suggestion: `Change ${target.id} to a Story or create a Story first, then link Task → Story`,
68
+ };
69
+ }
70
+ // Story → Epic
71
+ if (sourceType === 'story') {
72
+ if (targetType === 'epic') {
73
+ return { valid: true };
74
+ }
75
+ return {
76
+ valid: false,
77
+ error: 'Stories can only implement Epics in Scrum',
78
+ suggestion: `Change ${target.id} to an Epic or create an Epic first, then link Story → Epic`,
79
+ };
80
+ }
81
+ // Spike → Epic
82
+ if (sourceType === 'spike') {
83
+ if (targetType === 'epic') {
84
+ return { valid: true };
85
+ }
86
+ return {
87
+ valid: false,
88
+ error: 'Spikes can only implement Epics in Scrum',
89
+ suggestion: `Change ${target.id} to an Epic or create an Epic first, then link Spike → Epic`,
90
+ };
91
+ }
92
+ // Bug → Epic or Story (flexible)
93
+ if (sourceType === 'bug') {
94
+ if (targetType === 'epic' || targetType === 'story') {
95
+ return { valid: true };
96
+ }
97
+ return {
98
+ valid: false,
99
+ error: 'Bugs can only implement Epics or Stories in Scrum',
100
+ suggestion: `Use "relates-to" for Bug → ${targetType} relationships, or create Epic/Story first`,
101
+ };
102
+ }
103
+ // Test → Epic or Story (flexible)
104
+ if (sourceType === 'test') {
105
+ if (targetType === 'epic' || targetType === 'story') {
106
+ return { valid: true };
107
+ }
108
+ return {
109
+ valid: false,
110
+ error: 'Tests can only implement Epics or Stories in Scrum',
111
+ suggestion: `Use "tested-by" relationship or create Epic/Story first`,
112
+ };
113
+ }
114
+ // Epic cannot implement anything (top-level)
115
+ if (sourceType === 'epic') {
116
+ return {
117
+ valid: false,
118
+ error: 'Epics are top-level items and cannot implement other items',
119
+ suggestion: 'Consider using "relates-to" to link Epics together',
120
+ };
121
+ }
122
+ return {
123
+ valid: false,
124
+ error: `Invalid Scrum relationship: ${sourceType} → ${targetType}`,
125
+ suggestion: 'Check Scrum hierarchy: Epic → Story|Spike → Task',
126
+ };
127
+ }
128
+ /**
129
+ * Validate Waterfall hierarchy rules
130
+ * Requirement → Feature|Spike → Task
131
+ * Bug/Test can implement Requirement or Feature
132
+ */
133
+ function validateWaterfallHierarchy(source, target) {
134
+ const { type: sourceType } = source;
135
+ const { type: targetType } = target;
136
+ // Task → Feature or Spike
137
+ if (sourceType === 'task') {
138
+ if (targetType === 'feature' || targetType === 'spike') {
139
+ return { valid: true };
140
+ }
141
+ return {
142
+ valid: false,
143
+ error: 'Tasks can only implement Features or Spikes in Waterfall',
144
+ suggestion: `Change ${target.id} to a Feature or create a Feature first, then link Task → Feature`,
145
+ };
146
+ }
147
+ // Feature → Requirement
148
+ if (sourceType === 'feature') {
149
+ if (targetType === 'requirement') {
150
+ return { valid: true };
151
+ }
152
+ return {
153
+ valid: false,
154
+ error: 'Features can only implement Requirements in Waterfall',
155
+ suggestion: `Change ${target.id} to a Requirement or create a Requirement first, then link Feature → Requirement`,
156
+ };
157
+ }
158
+ // Spike → Requirement
159
+ if (sourceType === 'spike') {
160
+ if (targetType === 'requirement') {
161
+ return { valid: true };
162
+ }
163
+ return {
164
+ valid: false,
165
+ error: 'Spikes can only implement Requirements in Waterfall',
166
+ suggestion: `Change ${target.id} to a Requirement or create a Requirement first, then link Spike → Requirement`,
167
+ };
168
+ }
169
+ // Bug → Requirement or Feature (flexible)
170
+ if (sourceType === 'bug') {
171
+ if (targetType === 'requirement' || targetType === 'feature') {
172
+ return { valid: true };
173
+ }
174
+ return {
175
+ valid: false,
176
+ error: 'Bugs can only implement Requirements or Features in Waterfall',
177
+ suggestion: `Use "relates-to" for Bug → ${targetType} relationships, or create Requirement/Feature first`,
178
+ };
179
+ }
180
+ // Test → Requirement or Feature (flexible)
181
+ if (sourceType === 'test') {
182
+ if (targetType === 'requirement' || targetType === 'feature') {
183
+ return { valid: true };
184
+ }
185
+ return {
186
+ valid: false,
187
+ error: 'Tests can only implement Requirements or Features in Waterfall',
188
+ suggestion: `Use "tested-by" relationship or create Requirement/Feature first`,
189
+ };
190
+ }
191
+ // Requirement cannot implement anything (top-level)
192
+ if (sourceType === 'requirement') {
193
+ return {
194
+ valid: false,
195
+ error: 'Requirements are top-level items and cannot implement other items',
196
+ suggestion: 'Consider using "relates-to" to link Requirements together',
197
+ };
198
+ }
199
+ return {
200
+ valid: false,
201
+ error: `Invalid Waterfall relationship: ${sourceType} → ${targetType}`,
202
+ suggestion: 'Check Waterfall hierarchy: Requirement → Feature|Spike → Task',
203
+ };
204
+ }
205
+ //# sourceMappingURL=validation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/core/validation.ts"],"names":[],"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AAC;QACD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,gEAAgE;YACvE,UAAU,EAAE,kEAAkE;SAC/E,CAAC;IACJ,CAAC;IAED,oDAAoD;IACpD,IAAI,UAAU,KAAK,aAAa,EAAE,CAAC;QACjC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,mEAAmE;YAC1E,UAAU,EAAE,2DAA2D;SACxE,CAAC;IACJ,CAAC;IAED,OAAO;QACL,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,mCAAmC,UAAU,MAAM,UAAU,EAAE;QACtE,UAAU,EAAE,+DAA+D;KAC5E,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './types/index.js';
2
+ export * from './schemas/index.js';
3
+ export * from './utils/index.js';
4
+ export * from './core/index.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export * from './types/index.js';
2
+ export * from './schemas/index.js';
3
+ export * from './utils/index.js';
4
+ export * from './core/index.js';
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,286 @@
1
+ import { z } from 'zod';
2
+ export * from './project.js';
3
+ export * from './relationships.js';
4
+ /**
5
+ * Methodology types
6
+ */
7
+ export declare const Methodology: z.ZodEnum<{
8
+ scrum: "scrum";
9
+ waterfall: "waterfall";
10
+ hybrid: "hybrid";
11
+ }>;
12
+ export type Methodology = z.infer<typeof Methodology>;
13
+ /**
14
+ * Item types in devstepssystem
15
+ * Scrum: epic, story, task, bug, spike, test
16
+ * Waterfall: requirement, feature, task, bug, test
17
+ * Hybrid: all of the above
18
+ */
19
+ export declare const ItemType: z.ZodEnum<{
20
+ epic: "epic";
21
+ story: "story";
22
+ task: "task";
23
+ requirement: "requirement";
24
+ feature: "feature";
25
+ bug: "bug";
26
+ spike: "spike";
27
+ test: "test";
28
+ }>;
29
+ export type ItemType = z.infer<typeof ItemType>;
30
+ /**
31
+ * Item status lifecycle
32
+ */
33
+ export declare const ItemStatus: z.ZodEnum<{
34
+ draft: "draft";
35
+ planned: "planned";
36
+ "in-progress": "in-progress";
37
+ review: "review";
38
+ done: "done";
39
+ obsolete: "obsolete";
40
+ blocked: "blocked";
41
+ cancelled: "cancelled";
42
+ }>;
43
+ export type ItemStatus = z.infer<typeof ItemStatus>;
44
+ /**
45
+ * Priority levels
46
+ */
47
+ export declare const Priority: z.ZodEnum<{
48
+ critical: "critical";
49
+ high: "high";
50
+ medium: "medium";
51
+ low: "low";
52
+ }>;
53
+ export type Priority = z.infer<typeof Priority>;
54
+ /**
55
+ * Eisenhower Matrix quadrants for prioritization
56
+ * Q1: Urgent + Important = Do First
57
+ * Q2: Not Urgent + Important = Schedule/Plan
58
+ * Q3: Urgent + Not Important = Delegate
59
+ * Q4: Not Urgent + Not Important = Eliminate/Later
60
+ */
61
+ export declare const EisenhowerQuadrant: z.ZodEnum<{
62
+ "urgent-important": "urgent-important";
63
+ "not-urgent-important": "not-urgent-important";
64
+ "urgent-not-important": "urgent-not-important";
65
+ "not-urgent-not-important": "not-urgent-not-important";
66
+ }>;
67
+ export type EisenhowerQuadrant = z.infer<typeof EisenhowerQuadrant>;
68
+ /**
69
+ * Relationship types between items
70
+ */
71
+ export declare const RelationType: z.ZodEnum<{
72
+ implements: "implements";
73
+ "implemented-by": "implemented-by";
74
+ "relates-to": "relates-to";
75
+ blocks: "blocks";
76
+ "blocked-by": "blocked-by";
77
+ "depends-on": "depends-on";
78
+ "required-by": "required-by";
79
+ "tested-by": "tested-by";
80
+ tests: "tests";
81
+ supersedes: "supersedes";
82
+ "superseded-by": "superseded-by";
83
+ }>;
84
+ export type RelationType = z.infer<typeof RelationType>;
85
+ /**
86
+ * Linked items structure
87
+ */
88
+ export declare const LinkedItems: z.ZodDefault<z.ZodObject<{
89
+ implements: z.ZodArray<z.ZodString>;
90
+ 'implemented-by': z.ZodArray<z.ZodString>;
91
+ 'tested-by': z.ZodArray<z.ZodString>;
92
+ tests: z.ZodArray<z.ZodString>;
93
+ blocks: z.ZodArray<z.ZodString>;
94
+ 'blocked-by': z.ZodArray<z.ZodString>;
95
+ 'relates-to': z.ZodArray<z.ZodString>;
96
+ 'depends-on': z.ZodArray<z.ZodString>;
97
+ 'required-by': z.ZodArray<z.ZodString>;
98
+ supersedes: z.ZodArray<z.ZodString>;
99
+ 'superseded-by': z.ZodArray<z.ZodString>;
100
+ }, z.core.$strip>>;
101
+ export type LinkedItems = z.infer<typeof LinkedItems>;
102
+ /**
103
+ * Git commit reference
104
+ */
105
+ export declare const GitCommit: z.ZodObject<{
106
+ hash: z.ZodString;
107
+ message: z.ZodString;
108
+ author: z.ZodString;
109
+ timestamp: z.ZodString;
110
+ branch: z.ZodOptional<z.ZodString>;
111
+ }, z.core.$strip>;
112
+ export type GitCommit = z.infer<typeof GitCommit>;
113
+ /**
114
+ * Core item schema - metadata stored as JSON
115
+ */
116
+ export declare const ItemMetadata: z.ZodObject<{
117
+ id: z.ZodString;
118
+ type: z.ZodEnum<{
119
+ epic: "epic";
120
+ story: "story";
121
+ task: "task";
122
+ requirement: "requirement";
123
+ feature: "feature";
124
+ bug: "bug";
125
+ spike: "spike";
126
+ test: "test";
127
+ }>;
128
+ category: z.ZodDefault<z.ZodString>;
129
+ title: z.ZodString;
130
+ status: z.ZodDefault<z.ZodEnum<{
131
+ draft: "draft";
132
+ planned: "planned";
133
+ "in-progress": "in-progress";
134
+ review: "review";
135
+ done: "done";
136
+ obsolete: "obsolete";
137
+ blocked: "blocked";
138
+ cancelled: "cancelled";
139
+ }>>;
140
+ priority: z.ZodDefault<z.ZodEnum<{
141
+ critical: "critical";
142
+ high: "high";
143
+ medium: "medium";
144
+ low: "low";
145
+ }>>;
146
+ eisenhower: z.ZodOptional<z.ZodEnum<{
147
+ "urgent-important": "urgent-important";
148
+ "not-urgent-important": "not-urgent-important";
149
+ "urgent-not-important": "urgent-not-important";
150
+ "not-urgent-not-important": "not-urgent-not-important";
151
+ }>>;
152
+ superseded_by: z.ZodOptional<z.ZodString>;
153
+ created: z.ZodString;
154
+ updated: z.ZodString;
155
+ author: z.ZodOptional<z.ZodString>;
156
+ assignee: z.ZodOptional<z.ZodString>;
157
+ affected_paths: z.ZodDefault<z.ZodArray<z.ZodString>>;
158
+ linked_items: z.ZodDefault<z.ZodObject<{
159
+ implements: z.ZodArray<z.ZodString>;
160
+ 'implemented-by': z.ZodArray<z.ZodString>;
161
+ 'tested-by': z.ZodArray<z.ZodString>;
162
+ tests: z.ZodArray<z.ZodString>;
163
+ blocks: z.ZodArray<z.ZodString>;
164
+ 'blocked-by': z.ZodArray<z.ZodString>;
165
+ 'relates-to': z.ZodArray<z.ZodString>;
166
+ 'depends-on': z.ZodArray<z.ZodString>;
167
+ 'required-by': z.ZodArray<z.ZodString>;
168
+ supersedes: z.ZodArray<z.ZodString>;
169
+ 'superseded-by': z.ZodArray<z.ZodString>;
170
+ }, z.core.$strip>>;
171
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
172
+ estimated_effort: z.ZodOptional<z.ZodString>;
173
+ actual_effort: z.ZodOptional<z.ZodString>;
174
+ commits: z.ZodDefault<z.ZodArray<z.ZodObject<{
175
+ hash: z.ZodString;
176
+ message: z.ZodString;
177
+ author: z.ZodString;
178
+ timestamp: z.ZodString;
179
+ branch: z.ZodOptional<z.ZodString>;
180
+ }, z.core.$strip>>>;
181
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
182
+ }, z.core.$strip>;
183
+ export type ItemMetadata = z.infer<typeof ItemMetadata>;
184
+ /**
185
+ * Configuration schema for .devsteps/config.json
186
+ */
187
+ export declare const DevStepsConfig: z.ZodObject<{
188
+ version: z.ZodDefault<z.ZodString>;
189
+ project_name: z.ZodString;
190
+ project_id: z.ZodString;
191
+ created: z.ZodString;
192
+ updated: z.ZodString;
193
+ settings: z.ZodDefault<z.ZodObject<{
194
+ methodology: z.ZodDefault<z.ZodEnum<{
195
+ scrum: "scrum";
196
+ waterfall: "waterfall";
197
+ hybrid: "hybrid";
198
+ }>>;
199
+ auto_increment: z.ZodBoolean;
200
+ git_integration: z.ZodBoolean;
201
+ default_author: z.ZodOptional<z.ZodString>;
202
+ item_types: z.ZodArray<z.ZodEnum<{
203
+ epic: "epic";
204
+ story: "story";
205
+ task: "task";
206
+ requirement: "requirement";
207
+ feature: "feature";
208
+ bug: "bug";
209
+ spike: "spike";
210
+ test: "test";
211
+ }>>;
212
+ item_prefixes: z.ZodRecord<z.ZodString, z.ZodString>;
213
+ }, z.core.$strip>>;
214
+ }, z.core.$strip>;
215
+ export type DevStepsConfig = z.infer<typeof DevStepsConfig>;
216
+ /**
217
+ * Index schema for .devsteps/index.json
218
+ */
219
+ export declare const DevStepsIndex: z.ZodObject<{
220
+ items: z.ZodArray<z.ZodObject<{
221
+ id: z.ZodString;
222
+ type: z.ZodEnum<{
223
+ epic: "epic";
224
+ story: "story";
225
+ task: "task";
226
+ requirement: "requirement";
227
+ feature: "feature";
228
+ bug: "bug";
229
+ spike: "spike";
230
+ test: "test";
231
+ }>;
232
+ title: z.ZodString;
233
+ status: z.ZodEnum<{
234
+ draft: "draft";
235
+ planned: "planned";
236
+ "in-progress": "in-progress";
237
+ review: "review";
238
+ done: "done";
239
+ obsolete: "obsolete";
240
+ blocked: "blocked";
241
+ cancelled: "cancelled";
242
+ }>;
243
+ priority: z.ZodEnum<{
244
+ critical: "critical";
245
+ high: "high";
246
+ medium: "medium";
247
+ low: "low";
248
+ }>;
249
+ updated: z.ZodString;
250
+ }, z.core.$strip>>;
251
+ last_updated: z.ZodString;
252
+ counters: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
253
+ archived_items: z.ZodDefault<z.ZodArray<z.ZodObject<{
254
+ id: z.ZodString;
255
+ type: z.ZodEnum<{
256
+ epic: "epic";
257
+ story: "story";
258
+ task: "task";
259
+ requirement: "requirement";
260
+ feature: "feature";
261
+ bug: "bug";
262
+ spike: "spike";
263
+ test: "test";
264
+ }>;
265
+ title: z.ZodString;
266
+ archived_at: z.ZodString;
267
+ original_status: z.ZodEnum<{
268
+ draft: "draft";
269
+ planned: "planned";
270
+ "in-progress": "in-progress";
271
+ review: "review";
272
+ done: "done";
273
+ obsolete: "obsolete";
274
+ blocked: "blocked";
275
+ cancelled: "cancelled";
276
+ }>;
277
+ }, z.core.$strip>>>;
278
+ stats: z.ZodOptional<z.ZodObject<{
279
+ total: z.ZodNumber;
280
+ by_type: z.ZodRecord<z.ZodString, z.ZodNumber>;
281
+ by_status: z.ZodRecord<z.ZodString, z.ZodNumber>;
282
+ archived: z.ZodOptional<z.ZodNumber>;
283
+ }, z.core.$strip>>;
284
+ }, z.core.$strip>;
285
+ export type DevStepsIndex = z.infer<typeof DevStepsIndex>;
286
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,WAAW;;;;EAA2C,CAAC;AACpE,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,QAAQ;;;;;;;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