@contractspec/example.team-hub 1.57.0 → 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.
- package/dist/announcement/announcement.operations.d.ts +50 -56
- package/dist/announcement/announcement.operations.d.ts.map +1 -1
- package/dist/announcement/announcement.operations.js +70 -51
- package/dist/announcement/announcement.schema.d.ts +50 -55
- package/dist/announcement/announcement.schema.d.ts.map +1 -1
- package/dist/announcement/announcement.schema.js +29 -71
- package/dist/announcement/index.d.ts +6 -3
- package/dist/announcement/index.d.ts.map +1 -0
- package/dist/announcement/index.js +73 -3
- package/dist/browser/announcement/announcement.operations.js +71 -0
- package/dist/browser/announcement/announcement.schema.js +30 -0
- package/dist/browser/announcement/index.js +73 -0
- package/dist/browser/docs/index.js +94 -0
- package/dist/browser/docs/team-hub.docblock.js +94 -0
- package/dist/browser/entities/index.js +231 -0
- package/dist/browser/events.js +134 -0
- package/dist/browser/example.js +42 -0
- package/dist/browser/handlers/index.js +5 -0
- package/dist/browser/index.js +642 -0
- package/dist/browser/presentations/index.js +131 -0
- package/dist/browser/presentations/team-hub.presentation.js +131 -0
- package/dist/browser/presentations.js +148 -0
- package/dist/browser/ritual/index.js +124 -0
- package/dist/browser/ritual/ritual.operations.js +121 -0
- package/dist/browser/ritual/ritual.schema.js +41 -0
- package/dist/browser/space/index.js +66 -0
- package/dist/browser/space/space.operations.js +64 -0
- package/dist/browser/space/space.schema.js +27 -0
- package/dist/browser/task/index.js +171 -0
- package/dist/browser/task/task.operations.js +168 -0
- package/dist/browser/task/task.schema.js +40 -0
- package/dist/browser/team-hub.capability.js +40 -0
- package/dist/browser/team-hub.feature.js +69 -0
- package/dist/docs/index.d.ts +2 -1
- package/dist/docs/index.d.ts.map +1 -0
- package/dist/docs/index.js +95 -1
- package/dist/docs/team-hub.docblock.d.ts +2 -1
- package/dist/docs/team-hub.docblock.d.ts.map +1 -0
- package/dist/docs/team-hub.docblock.js +45 -56
- package/dist/entities/index.d.ts +138 -143
- package/dist/entities/index.d.ts.map +1 -1
- package/dist/entities/index.js +221 -252
- package/dist/events.d.ts +217 -223
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +122 -201
- package/dist/example.d.ts +2 -6
- package/dist/example.d.ts.map +1 -1
- package/dist/example.js +41 -55
- package/dist/handlers/index.d.ts +1 -4
- package/dist/handlers/index.d.ts.map +1 -1
- package/dist/handlers/index.js +5 -8
- package/dist/index.d.ts +12 -15
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +642 -15
- package/dist/node/announcement/announcement.operations.js +71 -0
- package/dist/node/announcement/announcement.schema.js +30 -0
- package/dist/node/announcement/index.js +73 -0
- package/dist/node/docs/index.js +94 -0
- package/dist/node/docs/team-hub.docblock.js +94 -0
- package/dist/node/entities/index.js +231 -0
- package/dist/node/events.js +134 -0
- package/dist/node/example.js +42 -0
- package/dist/node/handlers/index.js +5 -0
- package/dist/node/index.js +642 -0
- package/dist/node/presentations/index.js +131 -0
- package/dist/node/presentations/team-hub.presentation.js +131 -0
- package/dist/node/presentations.js +148 -0
- package/dist/node/ritual/index.js +124 -0
- package/dist/node/ritual/ritual.operations.js +121 -0
- package/dist/node/ritual/ritual.schema.js +41 -0
- package/dist/node/space/index.js +66 -0
- package/dist/node/space/space.operations.js +64 -0
- package/dist/node/space/space.schema.js +27 -0
- package/dist/node/task/index.js +171 -0
- package/dist/node/task/task.operations.js +168 -0
- package/dist/node/task/task.schema.js +40 -0
- package/dist/node/team-hub.capability.js +40 -0
- package/dist/node/team-hub.feature.js +69 -0
- package/dist/presentations/index.d.ts +2 -2
- package/dist/presentations/index.d.ts.map +1 -0
- package/dist/presentations/index.js +132 -3
- package/dist/presentations/team-hub.presentation.d.ts +6 -11
- package/dist/presentations/team-hub.presentation.d.ts.map +1 -1
- package/dist/presentations/team-hub.presentation.js +126 -125
- package/dist/presentations.d.ts +7 -11
- package/dist/presentations.d.ts.map +1 -1
- package/dist/presentations.js +142 -147
- package/dist/ritual/index.d.ts +6 -3
- package/dist/ritual/index.d.ts.map +1 -0
- package/dist/ritual/index.js +124 -3
- package/dist/ritual/ritual.operations.d.ts +92 -98
- package/dist/ritual/ritual.operations.d.ts.map +1 -1
- package/dist/ritual/ritual.operations.js +119 -95
- package/dist/ritual/ritual.schema.d.ts +67 -72
- package/dist/ritual/ritual.schema.d.ts.map +1 -1
- package/dist/ritual/ritual.schema.js +39 -95
- package/dist/space/index.d.ts +6 -3
- package/dist/space/index.d.ts.map +1 -0
- package/dist/space/index.js +66 -3
- package/dist/space/space.operations.d.ts +38 -44
- package/dist/space/space.operations.d.ts.map +1 -1
- package/dist/space/space.operations.js +63 -50
- package/dist/space/space.schema.d.ts +38 -43
- package/dist/space/space.schema.d.ts.map +1 -1
- package/dist/space/space.schema.js +26 -59
- package/dist/task/index.d.ts +6 -3
- package/dist/task/index.d.ts.map +1 -0
- package/dist/task/index.js +171 -3
- package/dist/task/task.operations.d.ts +212 -218
- package/dist/task/task.operations.d.ts.map +1 -1
- package/dist/task/task.operations.js +163 -174
- package/dist/task/task.schema.d.ts +63 -68
- package/dist/task/task.schema.d.ts.map +1 -1
- package/dist/task/task.schema.js +38 -91
- package/dist/team-hub.capability.d.ts +3 -8
- package/dist/team-hub.capability.d.ts.map +1 -1
- package/dist/team-hub.capability.js +41 -38
- package/dist/team-hub.feature.d.ts +1 -6
- package/dist/team-hub.feature.d.ts.map +1 -1
- package/dist/team-hub.feature.js +68 -159
- package/package.json +261 -57
- package/dist/announcement/announcement.operations.js.map +0 -1
- package/dist/announcement/announcement.schema.js.map +0 -1
- package/dist/docs/team-hub.docblock.js.map +0 -1
- package/dist/entities/index.js.map +0 -1
- package/dist/events.js.map +0 -1
- package/dist/example.js.map +0 -1
- package/dist/handlers/index.js.map +0 -1
- package/dist/presentations/team-hub.presentation.js.map +0 -1
- package/dist/presentations.js.map +0 -1
- package/dist/ritual/ritual.operations.js.map +0 -1
- package/dist/ritual/ritual.schema.js.map +0 -1
- package/dist/space/space.operations.js.map +0 -1
- package/dist/space/space.schema.js.map +0 -1
- package/dist/task/task.operations.js.map +0 -1
- package/dist/task/task.schema.js.map +0 -1
- package/dist/team-hub.capability.js.map +0 -1
- package/dist/team-hub.feature.js.map +0 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
// src/events.ts
|
|
2
|
+
import { ScalarTypeEnum, defineSchemaModel } from "@contractspec/lib.schema";
|
|
3
|
+
import { defineEvent } from "@contractspec/lib.contracts";
|
|
4
|
+
var SpaceEventPayload = defineSchemaModel({
|
|
5
|
+
name: "SpaceEventPayload",
|
|
6
|
+
description: "Payload for space events",
|
|
7
|
+
fields: {
|
|
8
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
var TaskEventPayload = defineSchemaModel({
|
|
15
|
+
name: "TaskEventPayload",
|
|
16
|
+
description: "Payload for task events",
|
|
17
|
+
fields: {
|
|
18
|
+
taskId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
19
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
20
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
assigneeId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
22
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
timestamp: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
var RitualEventPayload = defineSchemaModel({
|
|
27
|
+
name: "RitualEventPayload",
|
|
28
|
+
description: "Payload for ritual events",
|
|
29
|
+
fields: {
|
|
30
|
+
ritualId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
31
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
32
|
+
scheduledFor: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
33
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
34
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
var AnnouncementPayload = defineSchemaModel({
|
|
38
|
+
name: "AnnouncementPayload",
|
|
39
|
+
description: "Payload for announcements",
|
|
40
|
+
fields: {
|
|
41
|
+
announcementId: {
|
|
42
|
+
type: ScalarTypeEnum.String_unsecure(),
|
|
43
|
+
isOptional: false
|
|
44
|
+
},
|
|
45
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
46
|
+
audience: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
47
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
48
|
+
createdBy: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
49
|
+
createdAt: { type: ScalarTypeEnum.DateTime(), isOptional: false }
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
var SpaceCreatedEvent = defineEvent({
|
|
53
|
+
meta: {
|
|
54
|
+
key: "team.space.created",
|
|
55
|
+
version: "1.0.0",
|
|
56
|
+
description: "A space was created.",
|
|
57
|
+
stability: "stable",
|
|
58
|
+
owners: ["@team-hub"],
|
|
59
|
+
tags: ["team", "space", "created"]
|
|
60
|
+
},
|
|
61
|
+
payload: SpaceEventPayload
|
|
62
|
+
});
|
|
63
|
+
var TaskCreatedEvent = defineEvent({
|
|
64
|
+
meta: {
|
|
65
|
+
key: "team.task.created",
|
|
66
|
+
version: "1.0.0",
|
|
67
|
+
description: "A task was created.",
|
|
68
|
+
stability: "stable",
|
|
69
|
+
owners: ["@team-hub"],
|
|
70
|
+
tags: ["team", "task", "created"]
|
|
71
|
+
},
|
|
72
|
+
payload: TaskEventPayload
|
|
73
|
+
});
|
|
74
|
+
var TaskStatusChangedEvent = defineEvent({
|
|
75
|
+
meta: {
|
|
76
|
+
key: "team.task.status_changed",
|
|
77
|
+
version: "1.0.0",
|
|
78
|
+
description: "A task status changed.",
|
|
79
|
+
stability: "stable",
|
|
80
|
+
owners: ["@team-hub"],
|
|
81
|
+
tags: ["team", "task", "status_changed"]
|
|
82
|
+
},
|
|
83
|
+
payload: TaskEventPayload
|
|
84
|
+
});
|
|
85
|
+
var RitualScheduledEvent = defineEvent({
|
|
86
|
+
meta: {
|
|
87
|
+
key: "team.ritual.scheduled",
|
|
88
|
+
version: "1.0.0",
|
|
89
|
+
description: "A ritual was scheduled.",
|
|
90
|
+
stability: "stable",
|
|
91
|
+
owners: ["@team-hub"],
|
|
92
|
+
tags: ["team", "ritual", "scheduled"]
|
|
93
|
+
},
|
|
94
|
+
payload: RitualEventPayload
|
|
95
|
+
});
|
|
96
|
+
var RitualOccurredEvent = defineEvent({
|
|
97
|
+
meta: {
|
|
98
|
+
key: "team.ritual.occurred",
|
|
99
|
+
version: "1.0.0",
|
|
100
|
+
description: "A ritual occurrence was logged.",
|
|
101
|
+
stability: "stable",
|
|
102
|
+
owners: ["@team-hub"],
|
|
103
|
+
tags: ["team", "ritual", "occurred"]
|
|
104
|
+
},
|
|
105
|
+
payload: RitualEventPayload
|
|
106
|
+
});
|
|
107
|
+
var AnnouncementPostedEvent = defineEvent({
|
|
108
|
+
meta: {
|
|
109
|
+
key: "team.announcement.posted",
|
|
110
|
+
version: "1.0.0",
|
|
111
|
+
description: "An announcement was posted.",
|
|
112
|
+
stability: "stable",
|
|
113
|
+
owners: ["@team-hub"],
|
|
114
|
+
tags: ["team", "announcement", "posted"]
|
|
115
|
+
},
|
|
116
|
+
payload: AnnouncementPayload
|
|
117
|
+
});
|
|
118
|
+
var TeamHubEvents = {
|
|
119
|
+
SpaceCreatedEvent,
|
|
120
|
+
TaskCreatedEvent,
|
|
121
|
+
TaskStatusChangedEvent,
|
|
122
|
+
RitualScheduledEvent,
|
|
123
|
+
RitualOccurredEvent,
|
|
124
|
+
AnnouncementPostedEvent
|
|
125
|
+
};
|
|
126
|
+
export {
|
|
127
|
+
TeamHubEvents,
|
|
128
|
+
TaskStatusChangedEvent,
|
|
129
|
+
TaskCreatedEvent,
|
|
130
|
+
SpaceCreatedEvent,
|
|
131
|
+
RitualScheduledEvent,
|
|
132
|
+
RitualOccurredEvent,
|
|
133
|
+
AnnouncementPostedEvent
|
|
134
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/example.ts
|
|
2
|
+
import { defineExample } from "@contractspec/lib.contracts";
|
|
3
|
+
var example = defineExample({
|
|
4
|
+
meta: {
|
|
5
|
+
key: "team-hub",
|
|
6
|
+
version: "1.0.0",
|
|
7
|
+
title: "Team Hub",
|
|
8
|
+
description: "Internal collaboration hub with spaces, tasks, rituals, and announcements.",
|
|
9
|
+
kind: "template",
|
|
10
|
+
visibility: "public",
|
|
11
|
+
stability: "experimental",
|
|
12
|
+
owners: ["@platform.core"],
|
|
13
|
+
tags: ["tasks", "rituals", "announcements", "collaboration"]
|
|
14
|
+
},
|
|
15
|
+
docs: {
|
|
16
|
+
rootDocId: "docs.examples.team-hub",
|
|
17
|
+
goalDocId: "docs.examples.team-hub.goal",
|
|
18
|
+
usageDocId: "docs.examples.team-hub.usage",
|
|
19
|
+
constraintsDocId: "docs.examples.team-hub.constraints"
|
|
20
|
+
},
|
|
21
|
+
entrypoints: {
|
|
22
|
+
packageName: "@contractspec/example.team-hub",
|
|
23
|
+
feature: "./feature",
|
|
24
|
+
contracts: "./contracts",
|
|
25
|
+
presentations: "./presentations",
|
|
26
|
+
handlers: "./handlers",
|
|
27
|
+
docs: "./docs"
|
|
28
|
+
},
|
|
29
|
+
surfaces: {
|
|
30
|
+
templates: true,
|
|
31
|
+
sandbox: {
|
|
32
|
+
enabled: true,
|
|
33
|
+
modes: ["playground", "specs", "builder", "markdown", "evolution"]
|
|
34
|
+
},
|
|
35
|
+
studio: { enabled: true, installable: true },
|
|
36
|
+
mcp: { enabled: true }
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
var example_default = example;
|
|
40
|
+
export {
|
|
41
|
+
example_default as default
|
|
42
|
+
};
|