@contractspec/lib.contracts-library 1.57.0 → 1.59.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/index.js ADDED
@@ -0,0 +1,161 @@
1
+ // @bun
2
+ // src/templates/recipes.ts
3
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
4
+ var OWNERS = ["platform.contractspec-studio"];
5
+ var RecipeCapability = defineCapability({
6
+ meta: {
7
+ key: "template.recipes.browse",
8
+ version: "1.0.0",
9
+ kind: "api",
10
+ title: "Template Recipe Browser",
11
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
12
+ domain: "templates",
13
+ owners: [...OWNERS],
14
+ tags: ["templates", "recipes", "i18n", "content"],
15
+ stability: StabilityEnum.Stable
16
+ },
17
+ provides: [
18
+ {
19
+ surface: "operation",
20
+ key: "template.recipe.list",
21
+ version: "1.0.0",
22
+ description: "List recipes with category, difficulty, and locale filters."
23
+ },
24
+ {
25
+ surface: "operation",
26
+ key: "template.recipe.get",
27
+ version: "1.0.0",
28
+ description: "Fetch a recipe detail view including localized content."
29
+ },
30
+ {
31
+ surface: "operation",
32
+ key: "template.recipe.search",
33
+ version: "1.0.0",
34
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
35
+ },
36
+ {
37
+ surface: "operation",
38
+ key: "template.recipe.favorite",
39
+ version: "1.0.0",
40
+ description: "Toggle recipe favorites for showcasing personalization patterns."
41
+ }
42
+ ],
43
+ requires: [{ key: "studio.project", version: "1.0.0" }]
44
+ });
45
+
46
+ // src/templates/todos.ts
47
+ import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
48
+ var OWNERS2 = ["platform.contractspec-studio"];
49
+ var TaskCrudCapability = defineCapability2({
50
+ meta: {
51
+ key: "template.todos.crud",
52
+ version: "1.0.0",
53
+ kind: "api",
54
+ title: "Template Tasks CRUD",
55
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
56
+ domain: "templates",
57
+ owners: [...OWNERS2],
58
+ tags: ["templates", "todos", "productivity"],
59
+ stability: StabilityEnum2.Stable
60
+ },
61
+ provides: [
62
+ {
63
+ surface: "operation",
64
+ key: "template.task.create",
65
+ version: "1.0.0",
66
+ description: "Create a new task for a Studio project template."
67
+ },
68
+ {
69
+ surface: "operation",
70
+ key: "template.task.update",
71
+ version: "1.0.0",
72
+ description: "Update task metadata such as title, due date, or category."
73
+ },
74
+ {
75
+ surface: "operation",
76
+ key: "template.task.delete",
77
+ version: "1.0.0",
78
+ description: "Delete or archive a task from a template project."
79
+ },
80
+ {
81
+ surface: "operation",
82
+ key: "template.task.toggle",
83
+ version: "1.0.0",
84
+ description: "Mark a task as completed or active."
85
+ },
86
+ {
87
+ surface: "operation",
88
+ key: "template.task.list",
89
+ version: "1.0.0",
90
+ description: "List tasks with filtering, search, and sorting."
91
+ },
92
+ {
93
+ surface: "operation",
94
+ key: "template.task.category",
95
+ version: "1.0.0",
96
+ description: "Manage categories and tags for tasks."
97
+ }
98
+ ],
99
+ requires: [{ key: "studio.project", version: "1.0.0" }]
100
+ });
101
+
102
+ // src/templates/messaging.ts
103
+ import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
104
+ var OWNERS3 = ["platform.contractspec-studio"];
105
+ var MessagingCapability = defineCapability3({
106
+ meta: {
107
+ key: "template.messaging.core",
108
+ version: "1.0.0",
109
+ kind: "api",
110
+ title: "Template Messaging Core",
111
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
112
+ domain: "templates",
113
+ owners: [...OWNERS3],
114
+ tags: ["templates", "messaging", "realtime"],
115
+ stability: StabilityEnum3.Experimental
116
+ },
117
+ provides: [
118
+ {
119
+ surface: "operation",
120
+ key: "template.messaging.conversation.create",
121
+ version: "1.0.0",
122
+ description: "Create a direct or group conversation scoped to a Studio project."
123
+ },
124
+ {
125
+ surface: "operation",
126
+ key: "template.messaging.conversation.list",
127
+ version: "1.0.0",
128
+ description: "List conversations with pagination, unread counts, and filters."
129
+ },
130
+ {
131
+ surface: "operation",
132
+ key: "template.messaging.message.send",
133
+ version: "1.0.0",
134
+ description: "Send a message with attachments and optimistic delivery state."
135
+ },
136
+ {
137
+ surface: "operation",
138
+ key: "template.messaging.message.read",
139
+ version: "1.0.0",
140
+ description: "Mark messages as read and update participant cursors."
141
+ },
142
+ {
143
+ surface: "event",
144
+ key: "template.messaging.message.received",
145
+ version: "1.0.0",
146
+ description: "Emitted when a participant receives a new message."
147
+ },
148
+ {
149
+ surface: "event",
150
+ key: "template.messaging.typing",
151
+ version: "1.0.0",
152
+ description: "Emitted when a participant is typing in a conversation."
153
+ }
154
+ ],
155
+ requires: [{ key: "studio.project", version: "1.0.0" }]
156
+ });
157
+ export {
158
+ TaskCrudCapability,
159
+ RecipeCapability,
160
+ MessagingCapability
161
+ };
@@ -0,0 +1,160 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+
45
+ // src/templates/todos.ts
46
+ import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
47
+ var OWNERS2 = ["platform.contractspec-studio"];
48
+ var TaskCrudCapability = defineCapability2({
49
+ meta: {
50
+ key: "template.todos.crud",
51
+ version: "1.0.0",
52
+ kind: "api",
53
+ title: "Template Tasks CRUD",
54
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
55
+ domain: "templates",
56
+ owners: [...OWNERS2],
57
+ tags: ["templates", "todos", "productivity"],
58
+ stability: StabilityEnum2.Stable
59
+ },
60
+ provides: [
61
+ {
62
+ surface: "operation",
63
+ key: "template.task.create",
64
+ version: "1.0.0",
65
+ description: "Create a new task for a Studio project template."
66
+ },
67
+ {
68
+ surface: "operation",
69
+ key: "template.task.update",
70
+ version: "1.0.0",
71
+ description: "Update task metadata such as title, due date, or category."
72
+ },
73
+ {
74
+ surface: "operation",
75
+ key: "template.task.delete",
76
+ version: "1.0.0",
77
+ description: "Delete or archive a task from a template project."
78
+ },
79
+ {
80
+ surface: "operation",
81
+ key: "template.task.toggle",
82
+ version: "1.0.0",
83
+ description: "Mark a task as completed or active."
84
+ },
85
+ {
86
+ surface: "operation",
87
+ key: "template.task.list",
88
+ version: "1.0.0",
89
+ description: "List tasks with filtering, search, and sorting."
90
+ },
91
+ {
92
+ surface: "operation",
93
+ key: "template.task.category",
94
+ version: "1.0.0",
95
+ description: "Manage categories and tags for tasks."
96
+ }
97
+ ],
98
+ requires: [{ key: "studio.project", version: "1.0.0" }]
99
+ });
100
+
101
+ // src/templates/messaging.ts
102
+ import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
103
+ var OWNERS3 = ["platform.contractspec-studio"];
104
+ var MessagingCapability = defineCapability3({
105
+ meta: {
106
+ key: "template.messaging.core",
107
+ version: "1.0.0",
108
+ kind: "api",
109
+ title: "Template Messaging Core",
110
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
111
+ domain: "templates",
112
+ owners: [...OWNERS3],
113
+ tags: ["templates", "messaging", "realtime"],
114
+ stability: StabilityEnum3.Experimental
115
+ },
116
+ provides: [
117
+ {
118
+ surface: "operation",
119
+ key: "template.messaging.conversation.create",
120
+ version: "1.0.0",
121
+ description: "Create a direct or group conversation scoped to a Studio project."
122
+ },
123
+ {
124
+ surface: "operation",
125
+ key: "template.messaging.conversation.list",
126
+ version: "1.0.0",
127
+ description: "List conversations with pagination, unread counts, and filters."
128
+ },
129
+ {
130
+ surface: "operation",
131
+ key: "template.messaging.message.send",
132
+ version: "1.0.0",
133
+ description: "Send a message with attachments and optimistic delivery state."
134
+ },
135
+ {
136
+ surface: "operation",
137
+ key: "template.messaging.message.read",
138
+ version: "1.0.0",
139
+ description: "Mark messages as read and update participant cursors."
140
+ },
141
+ {
142
+ surface: "event",
143
+ key: "template.messaging.message.received",
144
+ version: "1.0.0",
145
+ description: "Emitted when a participant receives a new message."
146
+ },
147
+ {
148
+ surface: "event",
149
+ key: "template.messaging.typing",
150
+ version: "1.0.0",
151
+ description: "Emitted when a participant is typing in a conversation."
152
+ }
153
+ ],
154
+ requires: [{ key: "studio.project", version: "1.0.0" }]
155
+ });
156
+ export {
157
+ TaskCrudCapability,
158
+ RecipeCapability,
159
+ MessagingCapability
160
+ };
@@ -0,0 +1,160 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+
45
+ // src/templates/todos.ts
46
+ import { defineCapability as defineCapability2, StabilityEnum as StabilityEnum2 } from "@contractspec/lib.contracts";
47
+ var OWNERS2 = ["platform.contractspec-studio"];
48
+ var TaskCrudCapability = defineCapability2({
49
+ meta: {
50
+ key: "template.todos.crud",
51
+ version: "1.0.0",
52
+ kind: "api",
53
+ title: "Template Tasks CRUD",
54
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
55
+ domain: "templates",
56
+ owners: [...OWNERS2],
57
+ tags: ["templates", "todos", "productivity"],
58
+ stability: StabilityEnum2.Stable
59
+ },
60
+ provides: [
61
+ {
62
+ surface: "operation",
63
+ key: "template.task.create",
64
+ version: "1.0.0",
65
+ description: "Create a new task for a Studio project template."
66
+ },
67
+ {
68
+ surface: "operation",
69
+ key: "template.task.update",
70
+ version: "1.0.0",
71
+ description: "Update task metadata such as title, due date, or category."
72
+ },
73
+ {
74
+ surface: "operation",
75
+ key: "template.task.delete",
76
+ version: "1.0.0",
77
+ description: "Delete or archive a task from a template project."
78
+ },
79
+ {
80
+ surface: "operation",
81
+ key: "template.task.toggle",
82
+ version: "1.0.0",
83
+ description: "Mark a task as completed or active."
84
+ },
85
+ {
86
+ surface: "operation",
87
+ key: "template.task.list",
88
+ version: "1.0.0",
89
+ description: "List tasks with filtering, search, and sorting."
90
+ },
91
+ {
92
+ surface: "operation",
93
+ key: "template.task.category",
94
+ version: "1.0.0",
95
+ description: "Manage categories and tags for tasks."
96
+ }
97
+ ],
98
+ requires: [{ key: "studio.project", version: "1.0.0" }]
99
+ });
100
+
101
+ // src/templates/messaging.ts
102
+ import { defineCapability as defineCapability3, StabilityEnum as StabilityEnum3 } from "@contractspec/lib.contracts";
103
+ var OWNERS3 = ["platform.contractspec-studio"];
104
+ var MessagingCapability = defineCapability3({
105
+ meta: {
106
+ key: "template.messaging.core",
107
+ version: "1.0.0",
108
+ kind: "api",
109
+ title: "Template Messaging Core",
110
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
111
+ domain: "templates",
112
+ owners: [...OWNERS3],
113
+ tags: ["templates", "messaging", "realtime"],
114
+ stability: StabilityEnum3.Experimental
115
+ },
116
+ provides: [
117
+ {
118
+ surface: "operation",
119
+ key: "template.messaging.conversation.create",
120
+ version: "1.0.0",
121
+ description: "Create a direct or group conversation scoped to a Studio project."
122
+ },
123
+ {
124
+ surface: "operation",
125
+ key: "template.messaging.conversation.list",
126
+ version: "1.0.0",
127
+ description: "List conversations with pagination, unread counts, and filters."
128
+ },
129
+ {
130
+ surface: "operation",
131
+ key: "template.messaging.message.send",
132
+ version: "1.0.0",
133
+ description: "Send a message with attachments and optimistic delivery state."
134
+ },
135
+ {
136
+ surface: "operation",
137
+ key: "template.messaging.message.read",
138
+ version: "1.0.0",
139
+ description: "Mark messages as read and update participant cursors."
140
+ },
141
+ {
142
+ surface: "event",
143
+ key: "template.messaging.message.received",
144
+ version: "1.0.0",
145
+ description: "Emitted when a participant receives a new message."
146
+ },
147
+ {
148
+ surface: "event",
149
+ key: "template.messaging.typing",
150
+ version: "1.0.0",
151
+ description: "Emitted when a participant is typing in a conversation."
152
+ }
153
+ ],
154
+ requires: [{ key: "studio.project", version: "1.0.0" }]
155
+ });
156
+ export {
157
+ TaskCrudCapability,
158
+ RecipeCapability,
159
+ MessagingCapability
160
+ };
@@ -0,0 +1,58 @@
1
+ // src/templates/messaging.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var MessagingCapability = defineCapability({
5
+ meta: {
6
+ key: "template.messaging.core",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Messaging Core",
10
+ description: "Real-time messaging primitives for template applications, including conversations, participants, and delivery events.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "messaging", "realtime"],
14
+ stability: StabilityEnum.Experimental
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.messaging.conversation.create",
20
+ version: "1.0.0",
21
+ description: "Create a direct or group conversation scoped to a Studio project."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.messaging.conversation.list",
26
+ version: "1.0.0",
27
+ description: "List conversations with pagination, unread counts, and filters."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.messaging.message.send",
32
+ version: "1.0.0",
33
+ description: "Send a message with attachments and optimistic delivery state."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.messaging.message.read",
38
+ version: "1.0.0",
39
+ description: "Mark messages as read and update participant cursors."
40
+ },
41
+ {
42
+ surface: "event",
43
+ key: "template.messaging.message.received",
44
+ version: "1.0.0",
45
+ description: "Emitted when a participant receives a new message."
46
+ },
47
+ {
48
+ surface: "event",
49
+ key: "template.messaging.typing",
50
+ version: "1.0.0",
51
+ description: "Emitted when a participant is typing in a conversation."
52
+ }
53
+ ],
54
+ requires: [{ key: "studio.project", version: "1.0.0" }]
55
+ });
56
+ export {
57
+ MessagingCapability
58
+ };
@@ -0,0 +1,46 @@
1
+ // src/templates/recipes.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var RecipeCapability = defineCapability({
5
+ meta: {
6
+ key: "template.recipes.browse",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Recipe Browser",
10
+ description: "Internationalized recipe browsing, search, and detail operations for template applications.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "recipes", "i18n", "content"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.recipe.list",
20
+ version: "1.0.0",
21
+ description: "List recipes with category, difficulty, and locale filters."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.recipe.get",
26
+ version: "1.0.0",
27
+ description: "Fetch a recipe detail view including localized content."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.recipe.search",
32
+ version: "1.0.0",
33
+ description: "Search recipes by ingredient, tag, or free text with i18n support."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.recipe.favorite",
38
+ version: "1.0.0",
39
+ description: "Toggle recipe favorites for showcasing personalization patterns."
40
+ }
41
+ ],
42
+ requires: [{ key: "studio.project", version: "1.0.0" }]
43
+ });
44
+ export {
45
+ RecipeCapability
46
+ };
@@ -0,0 +1,58 @@
1
+ // src/templates/todos.ts
2
+ import { defineCapability, StabilityEnum } from "@contractspec/lib.contracts";
3
+ var OWNERS = ["platform.contractspec-studio"];
4
+ var TaskCrudCapability = defineCapability({
5
+ meta: {
6
+ key: "template.todos.crud",
7
+ version: "1.0.0",
8
+ kind: "api",
9
+ title: "Template Tasks CRUD",
10
+ description: "Create, read, update, delete, and toggle template tasks with categories and priorities.",
11
+ domain: "templates",
12
+ owners: [...OWNERS],
13
+ tags: ["templates", "todos", "productivity"],
14
+ stability: StabilityEnum.Stable
15
+ },
16
+ provides: [
17
+ {
18
+ surface: "operation",
19
+ key: "template.task.create",
20
+ version: "1.0.0",
21
+ description: "Create a new task for a Studio project template."
22
+ },
23
+ {
24
+ surface: "operation",
25
+ key: "template.task.update",
26
+ version: "1.0.0",
27
+ description: "Update task metadata such as title, due date, or category."
28
+ },
29
+ {
30
+ surface: "operation",
31
+ key: "template.task.delete",
32
+ version: "1.0.0",
33
+ description: "Delete or archive a task from a template project."
34
+ },
35
+ {
36
+ surface: "operation",
37
+ key: "template.task.toggle",
38
+ version: "1.0.0",
39
+ description: "Mark a task as completed or active."
40
+ },
41
+ {
42
+ surface: "operation",
43
+ key: "template.task.list",
44
+ version: "1.0.0",
45
+ description: "List tasks with filtering, search, and sorting."
46
+ },
47
+ {
48
+ surface: "operation",
49
+ key: "template.task.category",
50
+ version: "1.0.0",
51
+ description: "Manage categories and tags for tasks."
52
+ }
53
+ ],
54
+ requires: [{ key: "studio.project", version: "1.0.0" }]
55
+ });
56
+ export {
57
+ TaskCrudCapability
58
+ };
@@ -0,0 +1,4 @@
1
+ export * from './recipes';
2
+ export * from './todos';
3
+ export * from './messaging';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/templates/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC"}