@contractspec/example.team-hub 1.56.1 → 1.58.0

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 (138) hide show
  1. package/dist/announcement/announcement.operations.d.ts +50 -56
  2. package/dist/announcement/announcement.operations.d.ts.map +1 -1
  3. package/dist/announcement/announcement.operations.js +70 -51
  4. package/dist/announcement/announcement.schema.d.ts +50 -55
  5. package/dist/announcement/announcement.schema.d.ts.map +1 -1
  6. package/dist/announcement/announcement.schema.js +29 -71
  7. package/dist/announcement/index.d.ts +6 -3
  8. package/dist/announcement/index.d.ts.map +1 -0
  9. package/dist/announcement/index.js +73 -3
  10. package/dist/browser/announcement/announcement.operations.js +71 -0
  11. package/dist/browser/announcement/announcement.schema.js +30 -0
  12. package/dist/browser/announcement/index.js +73 -0
  13. package/dist/browser/docs/index.js +94 -0
  14. package/dist/browser/docs/team-hub.docblock.js +94 -0
  15. package/dist/browser/entities/index.js +231 -0
  16. package/dist/browser/events.js +134 -0
  17. package/dist/browser/example.js +42 -0
  18. package/dist/browser/handlers/index.js +5 -0
  19. package/dist/browser/index.js +642 -0
  20. package/dist/browser/presentations/index.js +131 -0
  21. package/dist/browser/presentations/team-hub.presentation.js +131 -0
  22. package/dist/browser/presentations.js +148 -0
  23. package/dist/browser/ritual/index.js +124 -0
  24. package/dist/browser/ritual/ritual.operations.js +121 -0
  25. package/dist/browser/ritual/ritual.schema.js +41 -0
  26. package/dist/browser/space/index.js +66 -0
  27. package/dist/browser/space/space.operations.js +64 -0
  28. package/dist/browser/space/space.schema.js +27 -0
  29. package/dist/browser/task/index.js +171 -0
  30. package/dist/browser/task/task.operations.js +168 -0
  31. package/dist/browser/task/task.schema.js +40 -0
  32. package/dist/browser/team-hub.capability.js +40 -0
  33. package/dist/browser/team-hub.feature.js +69 -0
  34. package/dist/docs/index.d.ts +2 -1
  35. package/dist/docs/index.d.ts.map +1 -0
  36. package/dist/docs/index.js +95 -1
  37. package/dist/docs/team-hub.docblock.d.ts +2 -1
  38. package/dist/docs/team-hub.docblock.d.ts.map +1 -0
  39. package/dist/docs/team-hub.docblock.js +45 -56
  40. package/dist/entities/index.d.ts +138 -143
  41. package/dist/entities/index.d.ts.map +1 -1
  42. package/dist/entities/index.js +221 -252
  43. package/dist/events.d.ts +217 -223
  44. package/dist/events.d.ts.map +1 -1
  45. package/dist/events.js +122 -201
  46. package/dist/example.d.ts +2 -6
  47. package/dist/example.d.ts.map +1 -1
  48. package/dist/example.js +40 -55
  49. package/dist/handlers/index.d.ts +1 -4
  50. package/dist/handlers/index.d.ts.map +1 -1
  51. package/dist/handlers/index.js +5 -8
  52. package/dist/index.d.ts +12 -15
  53. package/dist/index.d.ts.map +1 -0
  54. package/dist/index.js +642 -15
  55. package/dist/node/announcement/announcement.operations.js +71 -0
  56. package/dist/node/announcement/announcement.schema.js +30 -0
  57. package/dist/node/announcement/index.js +73 -0
  58. package/dist/node/docs/index.js +94 -0
  59. package/dist/node/docs/team-hub.docblock.js +94 -0
  60. package/dist/node/entities/index.js +231 -0
  61. package/dist/node/events.js +134 -0
  62. package/dist/node/example.js +42 -0
  63. package/dist/node/handlers/index.js +5 -0
  64. package/dist/node/index.js +642 -0
  65. package/dist/node/presentations/index.js +131 -0
  66. package/dist/node/presentations/team-hub.presentation.js +131 -0
  67. package/dist/node/presentations.js +148 -0
  68. package/dist/node/ritual/index.js +124 -0
  69. package/dist/node/ritual/ritual.operations.js +121 -0
  70. package/dist/node/ritual/ritual.schema.js +41 -0
  71. package/dist/node/space/index.js +66 -0
  72. package/dist/node/space/space.operations.js +64 -0
  73. package/dist/node/space/space.schema.js +27 -0
  74. package/dist/node/task/index.js +171 -0
  75. package/dist/node/task/task.operations.js +168 -0
  76. package/dist/node/task/task.schema.js +40 -0
  77. package/dist/node/team-hub.capability.js +40 -0
  78. package/dist/node/team-hub.feature.js +69 -0
  79. package/dist/presentations/index.d.ts +2 -2
  80. package/dist/presentations/index.d.ts.map +1 -0
  81. package/dist/presentations/index.js +132 -3
  82. package/dist/presentations/team-hub.presentation.d.ts +6 -11
  83. package/dist/presentations/team-hub.presentation.d.ts.map +1 -1
  84. package/dist/presentations/team-hub.presentation.js +126 -125
  85. package/dist/presentations.d.ts +7 -11
  86. package/dist/presentations.d.ts.map +1 -1
  87. package/dist/presentations.js +142 -147
  88. package/dist/ritual/index.d.ts +6 -3
  89. package/dist/ritual/index.d.ts.map +1 -0
  90. package/dist/ritual/index.js +124 -3
  91. package/dist/ritual/ritual.operations.d.ts +92 -98
  92. package/dist/ritual/ritual.operations.d.ts.map +1 -1
  93. package/dist/ritual/ritual.operations.js +119 -95
  94. package/dist/ritual/ritual.schema.d.ts +67 -72
  95. package/dist/ritual/ritual.schema.d.ts.map +1 -1
  96. package/dist/ritual/ritual.schema.js +39 -95
  97. package/dist/space/index.d.ts +6 -3
  98. package/dist/space/index.d.ts.map +1 -0
  99. package/dist/space/index.js +66 -3
  100. package/dist/space/space.operations.d.ts +38 -44
  101. package/dist/space/space.operations.d.ts.map +1 -1
  102. package/dist/space/space.operations.js +63 -50
  103. package/dist/space/space.schema.d.ts +38 -43
  104. package/dist/space/space.schema.d.ts.map +1 -1
  105. package/dist/space/space.schema.js +26 -59
  106. package/dist/task/index.d.ts +6 -3
  107. package/dist/task/index.d.ts.map +1 -0
  108. package/dist/task/index.js +171 -3
  109. package/dist/task/task.operations.d.ts +212 -218
  110. package/dist/task/task.operations.d.ts.map +1 -1
  111. package/dist/task/task.operations.js +163 -174
  112. package/dist/task/task.schema.d.ts +63 -68
  113. package/dist/task/task.schema.d.ts.map +1 -1
  114. package/dist/task/task.schema.js +38 -91
  115. package/dist/team-hub.capability.d.ts +3 -8
  116. package/dist/team-hub.capability.d.ts.map +1 -1
  117. package/dist/team-hub.capability.js +41 -38
  118. package/dist/team-hub.feature.d.ts +1 -6
  119. package/dist/team-hub.feature.d.ts.map +1 -1
  120. package/dist/team-hub.feature.js +68 -159
  121. package/package.json +261 -57
  122. package/dist/announcement/announcement.operations.js.map +0 -1
  123. package/dist/announcement/announcement.schema.js.map +0 -1
  124. package/dist/docs/team-hub.docblock.js.map +0 -1
  125. package/dist/entities/index.js.map +0 -1
  126. package/dist/events.js.map +0 -1
  127. package/dist/example.js.map +0 -1
  128. package/dist/handlers/index.js.map +0 -1
  129. package/dist/presentations/team-hub.presentation.js.map +0 -1
  130. package/dist/presentations.js.map +0 -1
  131. package/dist/ritual/ritual.operations.js.map +0 -1
  132. package/dist/ritual/ritual.schema.js.map +0 -1
  133. package/dist/space/space.operations.js.map +0 -1
  134. package/dist/space/space.schema.js.map +0 -1
  135. package/dist/task/task.operations.js.map +0 -1
  136. package/dist/task/task.schema.js.map +0 -1
  137. package/dist/team-hub.capability.js.map +0 -1
  138. package/dist/team-hub.feature.js.map +0 -1
@@ -0,0 +1,66 @@
1
+ // src/space/space.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var SpaceModel = defineSchemaModel({
4
+ name: "Space",
5
+ description: "Team space/project",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
10
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
12
+ }
13
+ });
14
+ var CreateSpaceInputModel = defineSchemaModel({
15
+ name: "CreateSpaceInput",
16
+ description: "Input for creating a space",
17
+ fields: {
18
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
19
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
22
+ }
23
+ });
24
+
25
+ // src/space/space.operations.ts
26
+ import { defineCommand } from "@contractspec/lib.contracts";
27
+ var OWNERS = ["@examples.team-hub"];
28
+ var CreateSpaceContract = defineCommand({
29
+ meta: {
30
+ key: "team.space.create",
31
+ version: "1.0.0",
32
+ stability: "stable",
33
+ owners: [...OWNERS],
34
+ tags: ["team-hub", "space", "create"],
35
+ description: "Create a new team space.",
36
+ goal: "Organize teams/projects.",
37
+ context: "Workspace creation."
38
+ },
39
+ io: {
40
+ input: CreateSpaceInputModel,
41
+ output: SpaceModel
42
+ },
43
+ policy: { auth: "user" },
44
+ acceptance: {
45
+ scenarios: [
46
+ {
47
+ key: "create-space-happy-path",
48
+ given: ["User is authenticated"],
49
+ when: ["User creates a new space"],
50
+ then: ["Space is created"]
51
+ }
52
+ ],
53
+ examples: [
54
+ {
55
+ key: "create-engineering",
56
+ input: { name: "Engineering", description: "Engineering team space" },
57
+ output: { id: "space-123", name: "Engineering" }
58
+ }
59
+ ]
60
+ }
61
+ });
62
+ export {
63
+ SpaceModel,
64
+ CreateSpaceInputModel,
65
+ CreateSpaceContract
66
+ };
@@ -0,0 +1,64 @@
1
+ // src/space/space.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var SpaceModel = defineSchemaModel({
4
+ name: "Space",
5
+ description: "Team space/project",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
10
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
12
+ }
13
+ });
14
+ var CreateSpaceInputModel = defineSchemaModel({
15
+ name: "CreateSpaceInput",
16
+ description: "Input for creating a space",
17
+ fields: {
18
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
19
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
22
+ }
23
+ });
24
+
25
+ // src/space/space.operations.ts
26
+ import { defineCommand } from "@contractspec/lib.contracts";
27
+ var OWNERS = ["@examples.team-hub"];
28
+ var CreateSpaceContract = defineCommand({
29
+ meta: {
30
+ key: "team.space.create",
31
+ version: "1.0.0",
32
+ stability: "stable",
33
+ owners: [...OWNERS],
34
+ tags: ["team-hub", "space", "create"],
35
+ description: "Create a new team space.",
36
+ goal: "Organize teams/projects.",
37
+ context: "Workspace creation."
38
+ },
39
+ io: {
40
+ input: CreateSpaceInputModel,
41
+ output: SpaceModel
42
+ },
43
+ policy: { auth: "user" },
44
+ acceptance: {
45
+ scenarios: [
46
+ {
47
+ key: "create-space-happy-path",
48
+ given: ["User is authenticated"],
49
+ when: ["User creates a new space"],
50
+ then: ["Space is created"]
51
+ }
52
+ ],
53
+ examples: [
54
+ {
55
+ key: "create-engineering",
56
+ input: { name: "Engineering", description: "Engineering team space" },
57
+ output: { id: "space-123", name: "Engineering" }
58
+ }
59
+ ]
60
+ }
61
+ });
62
+ export {
63
+ CreateSpaceContract
64
+ };
@@ -0,0 +1,27 @@
1
+ // src/space/space.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var SpaceModel = defineSchemaModel({
4
+ name: "Space",
5
+ description: "Team space/project",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
10
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
12
+ }
13
+ });
14
+ var CreateSpaceInputModel = defineSchemaModel({
15
+ name: "CreateSpaceInput",
16
+ description: "Input for creating a space",
17
+ fields: {
18
+ name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
19
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
20
+ orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
22
+ }
23
+ });
24
+ export {
25
+ SpaceModel,
26
+ CreateSpaceInputModel
27
+ };
@@ -0,0 +1,171 @@
1
+ // src/task/task.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var TaskModel = defineSchemaModel({
4
+ name: "Task",
5
+ description: "Task in a space",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
13
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
14
+ }
15
+ });
16
+ var CreateTaskInputModel = defineSchemaModel({
17
+ name: "CreateTaskInput",
18
+ description: "Input for creating a task",
19
+ fields: {
20
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
23
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
24
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
25
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
26
+ }
27
+ });
28
+ var UpdateTaskStatusInputModel = defineSchemaModel({
29
+ name: "UpdateTaskStatusInput",
30
+ description: "Update task status",
31
+ fields: {
32
+ taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
33
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
34
+ }
35
+ });
36
+
37
+ // src/task/task.operations.ts
38
+ import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
39
+ import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
40
+ var OWNERS = ["@examples.team-hub"];
41
+ var ListTasksInputModel = defineSchemaModel2({
42
+ name: "ListTasksInput",
43
+ description: "Input for listing tasks",
44
+ fields: {
45
+ spaceId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
46
+ status: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
47
+ assigneeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
48
+ limit: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
49
+ offset: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true }
50
+ }
51
+ });
52
+ var ListTasksOutputModel = defineSchemaModel2({
53
+ name: "ListTasksOutput",
54
+ description: "Output for listing tasks",
55
+ fields: {
56
+ tasks: { type: TaskModel, isOptional: false, isList: true },
57
+ total: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false }
58
+ }
59
+ });
60
+ var ListTasksOperation = defineQuery({
61
+ meta: {
62
+ key: "team.task.list",
63
+ version: "1.0.0",
64
+ stability: "stable",
65
+ owners: [...OWNERS],
66
+ tags: ["team-hub", "task", "list", "query"],
67
+ description: "List all tasks with filtering",
68
+ goal: "Retrieve list of tasks",
69
+ context: "Task management"
70
+ },
71
+ io: {
72
+ input: ListTasksInputModel,
73
+ output: ListTasksOutputModel
74
+ },
75
+ policy: { auth: "user" },
76
+ acceptance: {
77
+ scenarios: [
78
+ {
79
+ key: "list-tasks-happy-path",
80
+ given: ["Tasks exist"],
81
+ when: ["User lists tasks"],
82
+ then: ["List of tasks is returned"]
83
+ }
84
+ ],
85
+ examples: [
86
+ {
87
+ key: "list-my-tasks",
88
+ input: { assigneeId: "user-123", status: "open", limit: 10 },
89
+ output: { tasks: [], total: 3 }
90
+ }
91
+ ]
92
+ }
93
+ });
94
+ var CreateTaskContract = defineCommand({
95
+ meta: {
96
+ key: "team.task.create",
97
+ version: "1.0.0",
98
+ stability: "stable",
99
+ owners: [...OWNERS],
100
+ tags: ["team-hub", "task", "create"],
101
+ description: "Create a task.",
102
+ goal: "Track work.",
103
+ context: "Task management."
104
+ },
105
+ io: {
106
+ input: CreateTaskInputModel,
107
+ output: TaskModel
108
+ },
109
+ policy: { auth: "user" },
110
+ acceptance: {
111
+ scenarios: [
112
+ {
113
+ key: "create-task-happy-path",
114
+ given: ["Space exists"],
115
+ when: ["User creates task"],
116
+ then: ["Task is created"]
117
+ }
118
+ ],
119
+ examples: [
120
+ {
121
+ key: "create-bug",
122
+ input: { spaceId: "space-123", title: "Fix login bug", type: "bug" },
123
+ output: { id: "task-456", status: "todo" }
124
+ }
125
+ ]
126
+ }
127
+ });
128
+ var UpdateTaskStatusContract = defineCommand({
129
+ meta: {
130
+ key: "team.task.updateStatus",
131
+ version: "1.0.0",
132
+ stability: "stable",
133
+ owners: [...OWNERS],
134
+ tags: ["team-hub", "task", "status"],
135
+ description: "Update task status.",
136
+ goal: "Track progress.",
137
+ context: "Task management."
138
+ },
139
+ io: {
140
+ input: UpdateTaskStatusInputModel,
141
+ output: TaskModel
142
+ },
143
+ policy: { auth: "user" },
144
+ acceptance: {
145
+ scenarios: [
146
+ {
147
+ key: "update-status-happy-path",
148
+ given: ["Task exists"],
149
+ when: ["User updates status"],
150
+ then: ["Status is updated"]
151
+ }
152
+ ],
153
+ examples: [
154
+ {
155
+ key: "markup-done",
156
+ input: { taskId: "task-456", status: "done" },
157
+ output: { id: "task-456", status: "done" }
158
+ }
159
+ ]
160
+ }
161
+ });
162
+ export {
163
+ UpdateTaskStatusInputModel,
164
+ UpdateTaskStatusContract,
165
+ TaskModel,
166
+ ListTasksOutputModel,
167
+ ListTasksOperation,
168
+ ListTasksInputModel,
169
+ CreateTaskInputModel,
170
+ CreateTaskContract
171
+ };
@@ -0,0 +1,168 @@
1
+ // src/task/task.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var TaskModel = defineSchemaModel({
4
+ name: "Task",
5
+ description: "Task in a space",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
13
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
14
+ }
15
+ });
16
+ var CreateTaskInputModel = defineSchemaModel({
17
+ name: "CreateTaskInput",
18
+ description: "Input for creating a task",
19
+ fields: {
20
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
23
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
24
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
25
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
26
+ }
27
+ });
28
+ var UpdateTaskStatusInputModel = defineSchemaModel({
29
+ name: "UpdateTaskStatusInput",
30
+ description: "Update task status",
31
+ fields: {
32
+ taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
33
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
34
+ }
35
+ });
36
+
37
+ // src/task/task.operations.ts
38
+ import { defineCommand, defineQuery } from "@contractspec/lib.contracts";
39
+ import { defineSchemaModel as defineSchemaModel2, ScalarTypeEnum as ScalarTypeEnum2 } from "@contractspec/lib.schema";
40
+ var OWNERS = ["@examples.team-hub"];
41
+ var ListTasksInputModel = defineSchemaModel2({
42
+ name: "ListTasksInput",
43
+ description: "Input for listing tasks",
44
+ fields: {
45
+ spaceId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
46
+ status: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
47
+ assigneeId: { type: ScalarTypeEnum2.String_unsecure(), isOptional: true },
48
+ limit: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true },
49
+ offset: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: true }
50
+ }
51
+ });
52
+ var ListTasksOutputModel = defineSchemaModel2({
53
+ name: "ListTasksOutput",
54
+ description: "Output for listing tasks",
55
+ fields: {
56
+ tasks: { type: TaskModel, isOptional: false, isList: true },
57
+ total: { type: ScalarTypeEnum2.Int_unsecure(), isOptional: false }
58
+ }
59
+ });
60
+ var ListTasksOperation = defineQuery({
61
+ meta: {
62
+ key: "team.task.list",
63
+ version: "1.0.0",
64
+ stability: "stable",
65
+ owners: [...OWNERS],
66
+ tags: ["team-hub", "task", "list", "query"],
67
+ description: "List all tasks with filtering",
68
+ goal: "Retrieve list of tasks",
69
+ context: "Task management"
70
+ },
71
+ io: {
72
+ input: ListTasksInputModel,
73
+ output: ListTasksOutputModel
74
+ },
75
+ policy: { auth: "user" },
76
+ acceptance: {
77
+ scenarios: [
78
+ {
79
+ key: "list-tasks-happy-path",
80
+ given: ["Tasks exist"],
81
+ when: ["User lists tasks"],
82
+ then: ["List of tasks is returned"]
83
+ }
84
+ ],
85
+ examples: [
86
+ {
87
+ key: "list-my-tasks",
88
+ input: { assigneeId: "user-123", status: "open", limit: 10 },
89
+ output: { tasks: [], total: 3 }
90
+ }
91
+ ]
92
+ }
93
+ });
94
+ var CreateTaskContract = defineCommand({
95
+ meta: {
96
+ key: "team.task.create",
97
+ version: "1.0.0",
98
+ stability: "stable",
99
+ owners: [...OWNERS],
100
+ tags: ["team-hub", "task", "create"],
101
+ description: "Create a task.",
102
+ goal: "Track work.",
103
+ context: "Task management."
104
+ },
105
+ io: {
106
+ input: CreateTaskInputModel,
107
+ output: TaskModel
108
+ },
109
+ policy: { auth: "user" },
110
+ acceptance: {
111
+ scenarios: [
112
+ {
113
+ key: "create-task-happy-path",
114
+ given: ["Space exists"],
115
+ when: ["User creates task"],
116
+ then: ["Task is created"]
117
+ }
118
+ ],
119
+ examples: [
120
+ {
121
+ key: "create-bug",
122
+ input: { spaceId: "space-123", title: "Fix login bug", type: "bug" },
123
+ output: { id: "task-456", status: "todo" }
124
+ }
125
+ ]
126
+ }
127
+ });
128
+ var UpdateTaskStatusContract = defineCommand({
129
+ meta: {
130
+ key: "team.task.updateStatus",
131
+ version: "1.0.0",
132
+ stability: "stable",
133
+ owners: [...OWNERS],
134
+ tags: ["team-hub", "task", "status"],
135
+ description: "Update task status.",
136
+ goal: "Track progress.",
137
+ context: "Task management."
138
+ },
139
+ io: {
140
+ input: UpdateTaskStatusInputModel,
141
+ output: TaskModel
142
+ },
143
+ policy: { auth: "user" },
144
+ acceptance: {
145
+ scenarios: [
146
+ {
147
+ key: "update-status-happy-path",
148
+ given: ["Task exists"],
149
+ when: ["User updates status"],
150
+ then: ["Status is updated"]
151
+ }
152
+ ],
153
+ examples: [
154
+ {
155
+ key: "markup-done",
156
+ input: { taskId: "task-456", status: "done" },
157
+ output: { id: "task-456", status: "done" }
158
+ }
159
+ ]
160
+ }
161
+ });
162
+ export {
163
+ UpdateTaskStatusContract,
164
+ ListTasksOutputModel,
165
+ ListTasksOperation,
166
+ ListTasksInputModel,
167
+ CreateTaskContract
168
+ };
@@ -0,0 +1,40 @@
1
+ // src/task/task.schema.ts
2
+ import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
3
+ var TaskModel = defineSchemaModel({
4
+ name: "Task",
5
+ description: "Task in a space",
6
+ fields: {
7
+ id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
8
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
9
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
10
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
11
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
12
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
13
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
14
+ }
15
+ });
16
+ var CreateTaskInputModel = defineSchemaModel({
17
+ name: "CreateTaskInput",
18
+ description: "Input for creating a task",
19
+ fields: {
20
+ spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
21
+ title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
22
+ description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
23
+ priority: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
24
+ assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
25
+ dueDate: { type: ScalarTypeEnum.DateTime(), isOptional: true }
26
+ }
27
+ });
28
+ var UpdateTaskStatusInputModel = defineSchemaModel({
29
+ name: "UpdateTaskStatusInput",
30
+ description: "Update task status",
31
+ fields: {
32
+ taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
33
+ status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
34
+ }
35
+ });
36
+ export {
37
+ UpdateTaskStatusInputModel,
38
+ TaskModel,
39
+ CreateTaskInputModel
40
+ };
@@ -0,0 +1,40 @@
1
+ // src/team-hub.capability.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var TasksCapability = defineCapability({
4
+ meta: {
5
+ key: "tasks",
6
+ version: "1.0.0",
7
+ kind: "ui",
8
+ stability: StabilityEnum.Experimental,
9
+ description: "Task management for teams",
10
+ owners: ["platform.core"],
11
+ tags: ["tasks", "collaboration"]
12
+ }
13
+ });
14
+ var RitualsCapability = defineCapability({
15
+ meta: {
16
+ key: "rituals",
17
+ version: "1.0.0",
18
+ kind: "ui",
19
+ stability: StabilityEnum.Experimental,
20
+ description: "Team rituals like standups and retrospectives",
21
+ owners: ["platform.core"],
22
+ tags: ["rituals", "team", "meetings"]
23
+ }
24
+ });
25
+ var AnnouncementsCapability = defineCapability({
26
+ meta: {
27
+ key: "announcements",
28
+ version: "1.0.0",
29
+ kind: "ui",
30
+ stability: StabilityEnum.Experimental,
31
+ description: "Team announcements and communications",
32
+ owners: ["platform.messaging"],
33
+ tags: ["announcements", "messaging"]
34
+ }
35
+ });
36
+ export {
37
+ TasksCapability,
38
+ RitualsCapability,
39
+ AnnouncementsCapability
40
+ };
@@ -0,0 +1,69 @@
1
+ // src/team-hub.feature.ts
2
+ import { defineFeature } from "@contractspec/lib.contracts";
3
+ var TeamHubFeature = defineFeature({
4
+ meta: {
5
+ key: "team-hub",
6
+ title: "Team Hub",
7
+ description: "Tasks, rituals, and announcements for internal teams with ceremonies.",
8
+ domain: "collaboration",
9
+ owners: ["@team-hub"],
10
+ tags: ["tasks", "rituals", "announcements"],
11
+ stability: "experimental",
12
+ version: "1.0.0"
13
+ },
14
+ operations: [
15
+ { key: "team.space.create", version: "1.0.0" },
16
+ { key: "team.task.create", version: "1.0.0" },
17
+ { key: "team.task.updateStatus", version: "1.0.0" },
18
+ { key: "team.task.list", version: "1.0.0" },
19
+ { key: "team.ritual.schedule", version: "1.0.0" },
20
+ { key: "team.ritual.logOccurrence", version: "1.0.0" },
21
+ { key: "team.announcement.post", version: "1.0.0" }
22
+ ],
23
+ events: [
24
+ { key: "team.space.created", version: "1.0.0" },
25
+ { key: "team.task.created", version: "1.0.0" },
26
+ { key: "team.task.status_changed", version: "1.0.0" },
27
+ { key: "team.ritual.scheduled", version: "1.0.0" },
28
+ { key: "team.ritual.occurred", version: "1.0.0" },
29
+ { key: "team.announcement.posted", version: "1.0.0" }
30
+ ],
31
+ presentations: [
32
+ { key: "team-hub.dashboard", version: "1.0.0" },
33
+ { key: "team-hub.space.list", version: "1.0.0" },
34
+ { key: "team-hub.task.board", version: "1.0.0" },
35
+ { key: "team-hub.task.detail", version: "1.0.0" },
36
+ { key: "team-hub.ritual.calendar", version: "1.0.0" },
37
+ { key: "team-hub.announcement.feed", version: "1.0.0" }
38
+ ],
39
+ presentationsTargets: [
40
+ {
41
+ key: "team-hub.dashboard",
42
+ version: "1.0.0",
43
+ targets: ["react", "markdown"]
44
+ },
45
+ { key: "team-hub.task.board", version: "1.0.0", targets: ["react"] },
46
+ { key: "team-hub.ritual.calendar", version: "1.0.0", targets: ["react"] },
47
+ {
48
+ key: "team-hub.announcement.feed",
49
+ version: "1.0.0",
50
+ targets: ["react", "markdown"]
51
+ }
52
+ ],
53
+ capabilities: {
54
+ requires: [
55
+ { key: "identity", version: "1.0.0" },
56
+ { key: "audit-trail", version: "1.0.0" },
57
+ { key: "notifications", version: "1.0.0" },
58
+ { key: "feature-flags", version: "1.0.0" }
59
+ ],
60
+ provides: [
61
+ { key: "tasks", version: "1.0.0" },
62
+ { key: "rituals", version: "1.0.0" },
63
+ { key: "announcements", version: "1.0.0" }
64
+ ]
65
+ }
66
+ });
67
+ export {
68
+ TeamHubFeature
69
+ };
@@ -1 +1,2 @@
1
- export { };
1
+ import './team-hub.docblock';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/docs/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC"}