@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
|
@@ -1,98 +1,122 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
},
|
|
28
|
-
policy: { auth: "user" },
|
|
29
|
-
acceptance: {
|
|
30
|
-
scenarios: [{
|
|
31
|
-
key: "schedule-ritual-happy-path",
|
|
32
|
-
given: ["Space exists"],
|
|
33
|
-
when: ["User schedules ritual"],
|
|
34
|
-
then: ["Ritual is scheduled"]
|
|
35
|
-
}],
|
|
36
|
-
examples: [{
|
|
37
|
-
key: "schedule-standup",
|
|
38
|
-
input: {
|
|
39
|
-
spaceId: "space-123",
|
|
40
|
-
name: "Daily Standup",
|
|
41
|
-
interval: "daily",
|
|
42
|
-
time: "10:00"
|
|
43
|
-
},
|
|
44
|
-
output: {
|
|
45
|
-
id: "rit-123",
|
|
46
|
-
status: "active"
|
|
47
|
-
}
|
|
48
|
-
}]
|
|
49
|
-
}
|
|
1
|
+
// @bun
|
|
2
|
+
// src/ritual/ritual.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var RitualModel = defineSchemaModel({
|
|
5
|
+
name: "Ritual",
|
|
6
|
+
description: "Recurring ritual",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
cadence: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
dayOfWeek: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
13
|
+
time: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
var ScheduleRitualInputModel = defineSchemaModel({
|
|
17
|
+
name: "ScheduleRitualInput",
|
|
18
|
+
description: "Create a ritual",
|
|
19
|
+
fields: {
|
|
20
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
cadence: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
dayOfWeek: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
24
|
+
time: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
facilitatorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
26
|
+
}
|
|
50
27
|
});
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
tags: [
|
|
61
|
-
"team-hub",
|
|
62
|
-
"ritual",
|
|
63
|
-
"log"
|
|
64
|
-
],
|
|
65
|
-
description: "Log a ritual occurrence.",
|
|
66
|
-
goal: "Record ritual history.",
|
|
67
|
-
context: "Ritual management."
|
|
68
|
-
},
|
|
69
|
-
io: {
|
|
70
|
-
input: LogRitualOccurrenceInputModel,
|
|
71
|
-
output: RitualModel
|
|
72
|
-
},
|
|
73
|
-
policy: { auth: "user" },
|
|
74
|
-
acceptance: {
|
|
75
|
-
scenarios: [{
|
|
76
|
-
key: "log-occurrence-happy-path",
|
|
77
|
-
given: ["Ritual is scheduled"],
|
|
78
|
-
when: ["User logs occurrence"],
|
|
79
|
-
then: ["Occurrence is recorded"]
|
|
80
|
-
}],
|
|
81
|
-
examples: [{
|
|
82
|
-
key: "log-standup",
|
|
83
|
-
input: {
|
|
84
|
-
ritualId: "rit-123",
|
|
85
|
-
date: "2025-01-20",
|
|
86
|
-
attendees: ["user-1", "user-2"]
|
|
87
|
-
},
|
|
88
|
-
output: {
|
|
89
|
-
id: "rit-123",
|
|
90
|
-
lastOccurrence: "2025-01-20"
|
|
91
|
-
}
|
|
92
|
-
}]
|
|
93
|
-
}
|
|
28
|
+
var LogRitualOccurrenceInputModel = defineSchemaModel({
|
|
29
|
+
name: "LogRitualOccurrenceInput",
|
|
30
|
+
description: "Record ritual occurrence results",
|
|
31
|
+
fields: {
|
|
32
|
+
ritualId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
33
|
+
scheduledFor: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
34
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
35
|
+
summary: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
36
|
+
}
|
|
94
37
|
});
|
|
95
38
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
39
|
+
// src/ritual/ritual.operations.ts
|
|
40
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
41
|
+
var OWNERS = ["@examples.team-hub"];
|
|
42
|
+
var ScheduleRitualContract = defineCommand({
|
|
43
|
+
meta: {
|
|
44
|
+
key: "team.ritual.schedule",
|
|
45
|
+
version: "1.0.0",
|
|
46
|
+
stability: "stable",
|
|
47
|
+
owners: [...OWNERS],
|
|
48
|
+
tags: ["team-hub", "ritual", "schedule"],
|
|
49
|
+
description: "Schedule a recurring ritual.",
|
|
50
|
+
goal: "Team ceremonies.",
|
|
51
|
+
context: "Ritual management."
|
|
52
|
+
},
|
|
53
|
+
io: {
|
|
54
|
+
input: ScheduleRitualInputModel,
|
|
55
|
+
output: RitualModel
|
|
56
|
+
},
|
|
57
|
+
policy: { auth: "user" },
|
|
58
|
+
acceptance: {
|
|
59
|
+
scenarios: [
|
|
60
|
+
{
|
|
61
|
+
key: "schedule-ritual-happy-path",
|
|
62
|
+
given: ["Space exists"],
|
|
63
|
+
when: ["User schedules ritual"],
|
|
64
|
+
then: ["Ritual is scheduled"]
|
|
65
|
+
}
|
|
66
|
+
],
|
|
67
|
+
examples: [
|
|
68
|
+
{
|
|
69
|
+
key: "schedule-standup",
|
|
70
|
+
input: {
|
|
71
|
+
spaceId: "space-123",
|
|
72
|
+
name: "Daily Standup",
|
|
73
|
+
interval: "daily",
|
|
74
|
+
time: "10:00"
|
|
75
|
+
},
|
|
76
|
+
output: { id: "rit-123", status: "active" }
|
|
77
|
+
}
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
var LogRitualOccurrenceContract = defineCommand({
|
|
82
|
+
meta: {
|
|
83
|
+
key: "team.ritual.logOccurrence",
|
|
84
|
+
version: "1.0.0",
|
|
85
|
+
stability: "stable",
|
|
86
|
+
owners: [...OWNERS],
|
|
87
|
+
tags: ["team-hub", "ritual", "log"],
|
|
88
|
+
description: "Log a ritual occurrence.",
|
|
89
|
+
goal: "Record ritual history.",
|
|
90
|
+
context: "Ritual management."
|
|
91
|
+
},
|
|
92
|
+
io: {
|
|
93
|
+
input: LogRitualOccurrenceInputModel,
|
|
94
|
+
output: RitualModel
|
|
95
|
+
},
|
|
96
|
+
policy: { auth: "user" },
|
|
97
|
+
acceptance: {
|
|
98
|
+
scenarios: [
|
|
99
|
+
{
|
|
100
|
+
key: "log-occurrence-happy-path",
|
|
101
|
+
given: ["Ritual is scheduled"],
|
|
102
|
+
when: ["User logs occurrence"],
|
|
103
|
+
then: ["Occurrence is recorded"]
|
|
104
|
+
}
|
|
105
|
+
],
|
|
106
|
+
examples: [
|
|
107
|
+
{
|
|
108
|
+
key: "log-standup",
|
|
109
|
+
input: {
|
|
110
|
+
ritualId: "rit-123",
|
|
111
|
+
date: "2025-01-20",
|
|
112
|
+
attendees: ["user-1", "user-2"]
|
|
113
|
+
},
|
|
114
|
+
output: { id: "rit-123", lastOccurrence: "2025-01-20" }
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
export {
|
|
120
|
+
ScheduleRitualContract,
|
|
121
|
+
LogRitualOccurrenceContract
|
|
122
|
+
};
|
|
@@ -1,85 +1,80 @@
|
|
|
1
|
-
import * as _contractspec_lib_schema0 from "@contractspec/lib.schema";
|
|
2
|
-
|
|
3
|
-
//#region src/ritual/ritual.schema.d.ts
|
|
4
1
|
/**
|
|
5
2
|
* Recurring ritual.
|
|
6
3
|
*/
|
|
7
|
-
declare const RitualModel:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
4
|
+
export declare const RitualModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
5
|
+
id: {
|
|
6
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
7
|
+
isOptional: false;
|
|
8
|
+
};
|
|
9
|
+
spaceId: {
|
|
10
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
11
|
+
isOptional: false;
|
|
12
|
+
};
|
|
13
|
+
title: {
|
|
14
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
15
|
+
isOptional: false;
|
|
16
|
+
};
|
|
17
|
+
cadence: {
|
|
18
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
19
|
+
isOptional: false;
|
|
20
|
+
};
|
|
21
|
+
dayOfWeek: {
|
|
22
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
23
|
+
isOptional: true;
|
|
24
|
+
};
|
|
25
|
+
time: {
|
|
26
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
27
|
+
isOptional: true;
|
|
28
|
+
};
|
|
32
29
|
}>;
|
|
33
30
|
/**
|
|
34
31
|
* Input for scheduling a ritual.
|
|
35
32
|
*/
|
|
36
|
-
declare const ScheduleRitualInputModel:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
33
|
+
export declare const ScheduleRitualInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
34
|
+
spaceId: {
|
|
35
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
36
|
+
isOptional: false;
|
|
37
|
+
};
|
|
38
|
+
title: {
|
|
39
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
40
|
+
isOptional: false;
|
|
41
|
+
};
|
|
42
|
+
cadence: {
|
|
43
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
44
|
+
isOptional: false;
|
|
45
|
+
};
|
|
46
|
+
dayOfWeek: {
|
|
47
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
48
|
+
isOptional: true;
|
|
49
|
+
};
|
|
50
|
+
time: {
|
|
51
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
52
|
+
isOptional: true;
|
|
53
|
+
};
|
|
54
|
+
facilitatorId: {
|
|
55
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
56
|
+
isOptional: true;
|
|
57
|
+
};
|
|
61
58
|
}>;
|
|
62
59
|
/**
|
|
63
60
|
* Input for logging ritual occurrence.
|
|
64
61
|
*/
|
|
65
|
-
declare const LogRitualOccurrenceInputModel:
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
62
|
+
export declare const LogRitualOccurrenceInputModel: import("@contractspec/lib.schema").SchemaModel<{
|
|
63
|
+
ritualId: {
|
|
64
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
65
|
+
isOptional: false;
|
|
66
|
+
};
|
|
67
|
+
scheduledFor: {
|
|
68
|
+
type: import("@contractspec/lib.schema").FieldType<Date, string>;
|
|
69
|
+
isOptional: false;
|
|
70
|
+
};
|
|
71
|
+
status: {
|
|
72
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
73
|
+
isOptional: false;
|
|
74
|
+
};
|
|
75
|
+
summary: {
|
|
76
|
+
type: import("@contractspec/lib.schema").FieldType<string, string>;
|
|
77
|
+
isOptional: true;
|
|
78
|
+
};
|
|
82
79
|
}>;
|
|
83
|
-
//#endregion
|
|
84
|
-
export { LogRitualOccurrenceInputModel, RitualModel, ScheduleRitualInputModel };
|
|
85
80
|
//# sourceMappingURL=ritual.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ritual.schema.d.ts","
|
|
1
|
+
{"version":3,"file":"ritual.schema.d.ts","sourceRoot":"","sources":["../../src/ritual/ritual.schema.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;EAWtB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;EAWnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;EASxC,CAAC"}
|
|
@@ -1,98 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
spaceId: {
|
|
16
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
17
|
-
isOptional: false
|
|
18
|
-
},
|
|
19
|
-
title: {
|
|
20
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
21
|
-
isOptional: false
|
|
22
|
-
},
|
|
23
|
-
cadence: {
|
|
24
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
25
|
-
isOptional: false
|
|
26
|
-
},
|
|
27
|
-
dayOfWeek: {
|
|
28
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
29
|
-
isOptional: true
|
|
30
|
-
},
|
|
31
|
-
time: {
|
|
32
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
33
|
-
isOptional: true
|
|
34
|
-
}
|
|
35
|
-
}
|
|
1
|
+
// @bun
|
|
2
|
+
// src/ritual/ritual.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var RitualModel = defineSchemaModel({
|
|
5
|
+
name: "Ritual",
|
|
6
|
+
description: "Recurring ritual",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
11
|
+
cadence: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
dayOfWeek: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
13
|
+
time: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
14
|
+
}
|
|
36
15
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
title: {
|
|
49
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
50
|
-
isOptional: false
|
|
51
|
-
},
|
|
52
|
-
cadence: {
|
|
53
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
54
|
-
isOptional: false
|
|
55
|
-
},
|
|
56
|
-
dayOfWeek: {
|
|
57
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
58
|
-
isOptional: true
|
|
59
|
-
},
|
|
60
|
-
time: {
|
|
61
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
62
|
-
isOptional: true
|
|
63
|
-
},
|
|
64
|
-
facilitatorId: {
|
|
65
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
66
|
-
isOptional: true
|
|
67
|
-
}
|
|
68
|
-
}
|
|
16
|
+
var ScheduleRitualInputModel = defineSchemaModel({
|
|
17
|
+
name: "ScheduleRitualInput",
|
|
18
|
+
description: "Create a ritual",
|
|
19
|
+
fields: {
|
|
20
|
+
spaceId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
21
|
+
title: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
cadence: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
23
|
+
dayOfWeek: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
24
|
+
time: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
25
|
+
facilitatorId: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
26
|
+
}
|
|
69
27
|
});
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
isOptional: false
|
|
80
|
-
},
|
|
81
|
-
scheduledFor: {
|
|
82
|
-
type: ScalarTypeEnum.DateTime(),
|
|
83
|
-
isOptional: false
|
|
84
|
-
},
|
|
85
|
-
status: {
|
|
86
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
87
|
-
isOptional: false
|
|
88
|
-
},
|
|
89
|
-
summary: {
|
|
90
|
-
type: ScalarTypeEnum.String_unsecure(),
|
|
91
|
-
isOptional: true
|
|
92
|
-
}
|
|
93
|
-
}
|
|
28
|
+
var LogRitualOccurrenceInputModel = defineSchemaModel({
|
|
29
|
+
name: "LogRitualOccurrenceInput",
|
|
30
|
+
description: "Record ritual occurrence results",
|
|
31
|
+
fields: {
|
|
32
|
+
ritualId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
33
|
+
scheduledFor: { type: ScalarTypeEnum.DateTime(), isOptional: false },
|
|
34
|
+
status: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
35
|
+
summary: { type: ScalarTypeEnum.String_unsecure(), isOptional: true }
|
|
36
|
+
}
|
|
94
37
|
});
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
38
|
+
export {
|
|
39
|
+
ScheduleRitualInputModel,
|
|
40
|
+
RitualModel,
|
|
41
|
+
LogRitualOccurrenceInputModel
|
|
42
|
+
};
|
package/dist/space/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Space domain - Team space management.
|
|
3
|
+
*/
|
|
4
|
+
export { SpaceModel, CreateSpaceInputModel } from './space.schema';
|
|
5
|
+
export { CreateSpaceContract } from './space.operations';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/space/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/space/index.js
CHANGED
|
@@ -1,4 +1,67 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
// @bun
|
|
2
|
+
// src/space/space.schema.ts
|
|
3
|
+
import { defineSchemaModel, ScalarTypeEnum } from "@contractspec/lib.schema";
|
|
4
|
+
var SpaceModel = defineSchemaModel({
|
|
5
|
+
name: "Space",
|
|
6
|
+
description: "Team space/project",
|
|
7
|
+
fields: {
|
|
8
|
+
id: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
9
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
10
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
11
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
12
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
var CreateSpaceInputModel = defineSchemaModel({
|
|
16
|
+
name: "CreateSpaceInput",
|
|
17
|
+
description: "Input for creating a space",
|
|
18
|
+
fields: {
|
|
19
|
+
name: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
20
|
+
description: { type: ScalarTypeEnum.String_unsecure(), isOptional: true },
|
|
21
|
+
orgId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false },
|
|
22
|
+
ownerId: { type: ScalarTypeEnum.String_unsecure(), isOptional: false }
|
|
23
|
+
}
|
|
24
|
+
});
|
|
3
25
|
|
|
4
|
-
|
|
26
|
+
// src/space/space.operations.ts
|
|
27
|
+
import { defineCommand } from "@contractspec/lib.contracts";
|
|
28
|
+
var OWNERS = ["@examples.team-hub"];
|
|
29
|
+
var CreateSpaceContract = defineCommand({
|
|
30
|
+
meta: {
|
|
31
|
+
key: "team.space.create",
|
|
32
|
+
version: "1.0.0",
|
|
33
|
+
stability: "stable",
|
|
34
|
+
owners: [...OWNERS],
|
|
35
|
+
tags: ["team-hub", "space", "create"],
|
|
36
|
+
description: "Create a new team space.",
|
|
37
|
+
goal: "Organize teams/projects.",
|
|
38
|
+
context: "Workspace creation."
|
|
39
|
+
},
|
|
40
|
+
io: {
|
|
41
|
+
input: CreateSpaceInputModel,
|
|
42
|
+
output: SpaceModel
|
|
43
|
+
},
|
|
44
|
+
policy: { auth: "user" },
|
|
45
|
+
acceptance: {
|
|
46
|
+
scenarios: [
|
|
47
|
+
{
|
|
48
|
+
key: "create-space-happy-path",
|
|
49
|
+
given: ["User is authenticated"],
|
|
50
|
+
when: ["User creates a new space"],
|
|
51
|
+
then: ["Space is created"]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
examples: [
|
|
55
|
+
{
|
|
56
|
+
key: "create-engineering",
|
|
57
|
+
input: { name: "Engineering", description: "Engineering team space" },
|
|
58
|
+
output: { id: "space-123", name: "Engineering" }
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
export {
|
|
64
|
+
SpaceModel,
|
|
65
|
+
CreateSpaceInputModel,
|
|
66
|
+
CreateSpaceContract
|
|
67
|
+
};
|