@cat-factory/contracts 0.203.0 → 0.205.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/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +5 -0
- package/dist/errors.js.map +1 -1
- package/dist/execution.d.ts +42 -0
- package/dist/execution.d.ts.map +1 -1
- package/dist/execution.js +19 -0
- package/dist/execution.js.map +1 -1
- package/dist/foundational-services.d.ts +281 -0
- package/dist/foundational-services.d.ts.map +1 -0
- package/dist/foundational-services.js +201 -0
- package/dist/foundational-services.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/routes/agent-runs.d.ts +8 -0
- package/dist/routes/agent-runs.d.ts.map +1 -1
- package/dist/routes/bug-hunt.d.ts +8 -0
- package/dist/routes/bug-hunt.d.ts.map +1 -1
- package/dist/routes/execution.d.ts +32 -0
- package/dist/routes/execution.d.ts.map +1 -1
- package/dist/routes/foundational-services.d.ts +544 -0
- package/dist/routes/foundational-services.d.ts.map +1 -0
- package/dist/routes/foundational-services.js +98 -0
- package/dist/routes/foundational-services.js.map +1 -0
- package/dist/routes/human-review.d.ts +4 -0
- package/dist/routes/human-review.d.ts.map +1 -1
- package/dist/routes/human-test.d.ts +20 -0
- package/dist/routes/human-test.d.ts.map +1 -1
- package/dist/routes/index.d.ts +1 -0
- package/dist/routes/index.d.ts.map +1 -1
- package/dist/routes/index.js +1 -0
- package/dist/routes/index.js.map +1 -1
- package/dist/routes/visual-confirm.d.ts +12 -0
- package/dist/routes/visual-confirm.d.ts.map +1 -1
- package/dist/routes/workspace-settings.d.ts +9 -0
- package/dist/routes/workspace-settings.d.ts.map +1 -1
- package/dist/routes/workspaces.d.ts +14 -0
- package/dist/routes/workspaces.d.ts.map +1 -1
- package/dist/snapshot.d.ts +7 -0
- package/dist/snapshot.d.ts.map +1 -1
- package/dist/workspace-settings.d.ts +47 -0
- package/dist/workspace-settings.d.ts.map +1 -1
- package/dist/workspace-settings.js +54 -0
- package/dist/workspace-settings.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,544 @@
|
|
|
1
|
+
import { ContractNoBody } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
export declare const listFoundationalServicesContract: {
|
|
4
|
+
readonly method: "get";
|
|
5
|
+
readonly pathResolver: () => string;
|
|
6
|
+
readonly responsesByStatusCode: {
|
|
7
|
+
readonly '4xx': v.ObjectSchema<{
|
|
8
|
+
readonly error: v.ObjectSchema<{
|
|
9
|
+
readonly code: v.StringSchema<undefined>;
|
|
10
|
+
readonly message: v.StringSchema<undefined>;
|
|
11
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
12
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
13
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
14
|
+
readonly message: v.StringSchema<undefined>;
|
|
15
|
+
}, undefined>, undefined>, undefined>;
|
|
16
|
+
}, undefined>;
|
|
17
|
+
}, undefined>;
|
|
18
|
+
readonly '5xx': v.ObjectSchema<{
|
|
19
|
+
readonly error: v.ObjectSchema<{
|
|
20
|
+
readonly code: v.StringSchema<undefined>;
|
|
21
|
+
readonly message: v.StringSchema<undefined>;
|
|
22
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
23
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
24
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
25
|
+
readonly message: v.StringSchema<undefined>;
|
|
26
|
+
}, undefined>, undefined>, undefined>;
|
|
27
|
+
}, undefined>;
|
|
28
|
+
}, undefined>;
|
|
29
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
30
|
+
readonly id: v.StringSchema<undefined>;
|
|
31
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
32
|
+
readonly name: v.StringSchema<undefined>;
|
|
33
|
+
readonly summary: v.StringSchema<undefined>;
|
|
34
|
+
readonly description: v.StringSchema<undefined>;
|
|
35
|
+
readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
36
|
+
readonly contracts: v.ArraySchema<v.ObjectSchema<{
|
|
37
|
+
readonly contractId: v.StringSchema<undefined>;
|
|
38
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
39
|
+
readonly title: v.StringSchema<undefined>;
|
|
40
|
+
readonly size: v.NumberSchema<undefined>;
|
|
41
|
+
readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
42
|
+
readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
43
|
+
readonly omittedOperations: v.NumberSchema<undefined>;
|
|
44
|
+
}, undefined>, undefined>;
|
|
45
|
+
readonly sourceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
46
|
+
readonly sourcePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
47
|
+
readonly pinnedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
48
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
49
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
50
|
+
}, undefined>, undefined>;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
export declare const createFoundationalServiceContract: {
|
|
54
|
+
readonly method: "post";
|
|
55
|
+
readonly pathResolver: () => string;
|
|
56
|
+
readonly requestBodySchema: v.ObjectSchema<{
|
|
57
|
+
readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">]>;
|
|
58
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
59
|
+
readonly summary: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 400, undefined>]>;
|
|
60
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 20000, undefined>]>;
|
|
61
|
+
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>, undefined>;
|
|
62
|
+
readonly contracts: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
63
|
+
readonly contractId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">]>;
|
|
64
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
65
|
+
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
66
|
+
readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000000, undefined>]>;
|
|
67
|
+
}, undefined>, undefined>, undefined>;
|
|
68
|
+
}, undefined>;
|
|
69
|
+
readonly responsesByStatusCode: {
|
|
70
|
+
readonly '4xx': v.ObjectSchema<{
|
|
71
|
+
readonly error: v.ObjectSchema<{
|
|
72
|
+
readonly code: v.StringSchema<undefined>;
|
|
73
|
+
readonly message: v.StringSchema<undefined>;
|
|
74
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
75
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
76
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
77
|
+
readonly message: v.StringSchema<undefined>;
|
|
78
|
+
}, undefined>, undefined>, undefined>;
|
|
79
|
+
}, undefined>;
|
|
80
|
+
}, undefined>;
|
|
81
|
+
readonly '5xx': v.ObjectSchema<{
|
|
82
|
+
readonly error: v.ObjectSchema<{
|
|
83
|
+
readonly code: v.StringSchema<undefined>;
|
|
84
|
+
readonly message: v.StringSchema<undefined>;
|
|
85
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
86
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
87
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
88
|
+
readonly message: v.StringSchema<undefined>;
|
|
89
|
+
}, undefined>, undefined>, undefined>;
|
|
90
|
+
}, undefined>;
|
|
91
|
+
}, undefined>;
|
|
92
|
+
readonly 201: v.ObjectSchema<{
|
|
93
|
+
readonly id: v.StringSchema<undefined>;
|
|
94
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
95
|
+
readonly name: v.StringSchema<undefined>;
|
|
96
|
+
readonly summary: v.StringSchema<undefined>;
|
|
97
|
+
readonly description: v.StringSchema<undefined>;
|
|
98
|
+
readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
99
|
+
readonly contracts: v.ArraySchema<v.ObjectSchema<{
|
|
100
|
+
readonly contractId: v.StringSchema<undefined>;
|
|
101
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
102
|
+
readonly title: v.StringSchema<undefined>;
|
|
103
|
+
readonly size: v.NumberSchema<undefined>;
|
|
104
|
+
readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
105
|
+
readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
106
|
+
readonly omittedOperations: v.NumberSchema<undefined>;
|
|
107
|
+
}, undefined>, undefined>;
|
|
108
|
+
readonly sourceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
109
|
+
readonly sourcePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
110
|
+
readonly pinnedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
111
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
112
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
113
|
+
}, undefined>;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
export declare const updateFoundationalServiceContract: {
|
|
117
|
+
readonly method: "patch";
|
|
118
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
119
|
+
serviceId: v.StringSchema<undefined>;
|
|
120
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
121
|
+
readonly pathResolver: ({ serviceId }: {
|
|
122
|
+
serviceId: string;
|
|
123
|
+
}) => string;
|
|
124
|
+
readonly requestBodySchema: v.ObjectSchema<{
|
|
125
|
+
readonly name: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
126
|
+
readonly summary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
|
|
127
|
+
readonly description: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 20000, undefined>]>, undefined>;
|
|
128
|
+
readonly capabilities: v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>]>, undefined>, undefined>;
|
|
129
|
+
readonly contracts: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
130
|
+
readonly contractId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">]>;
|
|
131
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
132
|
+
readonly title: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
133
|
+
readonly body: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 1000000, undefined>]>;
|
|
134
|
+
}, undefined>, undefined>, undefined>;
|
|
135
|
+
}, undefined>;
|
|
136
|
+
readonly responsesByStatusCode: {
|
|
137
|
+
readonly '4xx': v.ObjectSchema<{
|
|
138
|
+
readonly error: v.ObjectSchema<{
|
|
139
|
+
readonly code: v.StringSchema<undefined>;
|
|
140
|
+
readonly message: v.StringSchema<undefined>;
|
|
141
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
142
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
143
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
144
|
+
readonly message: v.StringSchema<undefined>;
|
|
145
|
+
}, undefined>, undefined>, undefined>;
|
|
146
|
+
}, undefined>;
|
|
147
|
+
}, undefined>;
|
|
148
|
+
readonly '5xx': v.ObjectSchema<{
|
|
149
|
+
readonly error: v.ObjectSchema<{
|
|
150
|
+
readonly code: v.StringSchema<undefined>;
|
|
151
|
+
readonly message: v.StringSchema<undefined>;
|
|
152
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
153
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
154
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
155
|
+
readonly message: v.StringSchema<undefined>;
|
|
156
|
+
}, undefined>, undefined>, undefined>;
|
|
157
|
+
}, undefined>;
|
|
158
|
+
}, undefined>;
|
|
159
|
+
readonly 200: v.ObjectSchema<{
|
|
160
|
+
readonly id: v.StringSchema<undefined>;
|
|
161
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
162
|
+
readonly name: v.StringSchema<undefined>;
|
|
163
|
+
readonly summary: v.StringSchema<undefined>;
|
|
164
|
+
readonly description: v.StringSchema<undefined>;
|
|
165
|
+
readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
166
|
+
readonly contracts: v.ArraySchema<v.ObjectSchema<{
|
|
167
|
+
readonly contractId: v.StringSchema<undefined>;
|
|
168
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
169
|
+
readonly title: v.StringSchema<undefined>;
|
|
170
|
+
readonly size: v.NumberSchema<undefined>;
|
|
171
|
+
readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
172
|
+
readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
173
|
+
readonly omittedOperations: v.NumberSchema<undefined>;
|
|
174
|
+
}, undefined>, undefined>;
|
|
175
|
+
readonly sourceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
176
|
+
readonly sourcePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
177
|
+
readonly pinnedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
178
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
179
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
180
|
+
}, undefined>;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
export declare const deleteFoundationalServiceContract: {
|
|
184
|
+
readonly method: "delete";
|
|
185
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
186
|
+
serviceId: v.StringSchema<undefined>;
|
|
187
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
188
|
+
readonly pathResolver: ({ serviceId }: {
|
|
189
|
+
serviceId: string;
|
|
190
|
+
}) => string;
|
|
191
|
+
readonly responsesByStatusCode: {
|
|
192
|
+
readonly '4xx': v.ObjectSchema<{
|
|
193
|
+
readonly error: v.ObjectSchema<{
|
|
194
|
+
readonly code: v.StringSchema<undefined>;
|
|
195
|
+
readonly message: v.StringSchema<undefined>;
|
|
196
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
197
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
198
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
199
|
+
readonly message: v.StringSchema<undefined>;
|
|
200
|
+
}, undefined>, undefined>, undefined>;
|
|
201
|
+
}, undefined>;
|
|
202
|
+
}, undefined>;
|
|
203
|
+
readonly '5xx': v.ObjectSchema<{
|
|
204
|
+
readonly error: v.ObjectSchema<{
|
|
205
|
+
readonly code: v.StringSchema<undefined>;
|
|
206
|
+
readonly message: v.StringSchema<undefined>;
|
|
207
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
208
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
209
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
210
|
+
readonly message: v.StringSchema<undefined>;
|
|
211
|
+
}, undefined>, undefined>, undefined>;
|
|
212
|
+
}, undefined>;
|
|
213
|
+
}, undefined>;
|
|
214
|
+
readonly 204: typeof ContractNoBody;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* The LAZY contract read: the full documents for one service. Deliberately its own
|
|
219
|
+
* endpoint rather than a field on the list — the whole point of the catalog is that a
|
|
220
|
+
* design-time reader pays for identity + operation names, and only a consumer that has
|
|
221
|
+
* settled on a service pays for its documents.
|
|
222
|
+
*/
|
|
223
|
+
export declare const getFoundationalServiceContractsContract: {
|
|
224
|
+
readonly method: "get";
|
|
225
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
226
|
+
serviceId: v.StringSchema<undefined>;
|
|
227
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
228
|
+
readonly pathResolver: ({ serviceId }: {
|
|
229
|
+
serviceId: string;
|
|
230
|
+
}) => string;
|
|
231
|
+
readonly responsesByStatusCode: {
|
|
232
|
+
readonly '4xx': v.ObjectSchema<{
|
|
233
|
+
readonly error: v.ObjectSchema<{
|
|
234
|
+
readonly code: v.StringSchema<undefined>;
|
|
235
|
+
readonly message: v.StringSchema<undefined>;
|
|
236
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
237
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
238
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
239
|
+
readonly message: v.StringSchema<undefined>;
|
|
240
|
+
}, undefined>, undefined>, undefined>;
|
|
241
|
+
}, undefined>;
|
|
242
|
+
}, undefined>;
|
|
243
|
+
readonly '5xx': v.ObjectSchema<{
|
|
244
|
+
readonly error: v.ObjectSchema<{
|
|
245
|
+
readonly code: v.StringSchema<undefined>;
|
|
246
|
+
readonly message: v.StringSchema<undefined>;
|
|
247
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
248
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
249
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
250
|
+
readonly message: v.StringSchema<undefined>;
|
|
251
|
+
}, undefined>, undefined>, undefined>;
|
|
252
|
+
}, undefined>;
|
|
253
|
+
}, undefined>;
|
|
254
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
255
|
+
readonly contractId: v.StringSchema<undefined>;
|
|
256
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
257
|
+
readonly title: v.StringSchema<undefined>;
|
|
258
|
+
readonly size: v.NumberSchema<undefined>;
|
|
259
|
+
readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
260
|
+
readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
261
|
+
readonly omittedOperations: v.NumberSchema<undefined>;
|
|
262
|
+
readonly body: v.StringSchema<undefined>;
|
|
263
|
+
}, undefined>, undefined>;
|
|
264
|
+
};
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* The MERGED catalog an agent actually sees (account ⊕ workspace, workspace winning).
|
|
268
|
+
* Workspace-mount only — an account has no other tier to merge with.
|
|
269
|
+
*/
|
|
270
|
+
export declare const resolvedFoundationalServicesContract: {
|
|
271
|
+
readonly method: "get";
|
|
272
|
+
readonly pathResolver: () => string;
|
|
273
|
+
readonly responsesByStatusCode: {
|
|
274
|
+
readonly '4xx': v.ObjectSchema<{
|
|
275
|
+
readonly error: v.ObjectSchema<{
|
|
276
|
+
readonly code: v.StringSchema<undefined>;
|
|
277
|
+
readonly message: v.StringSchema<undefined>;
|
|
278
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
279
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
280
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
281
|
+
readonly message: v.StringSchema<undefined>;
|
|
282
|
+
}, undefined>, undefined>, undefined>;
|
|
283
|
+
}, undefined>;
|
|
284
|
+
}, undefined>;
|
|
285
|
+
readonly '5xx': v.ObjectSchema<{
|
|
286
|
+
readonly error: v.ObjectSchema<{
|
|
287
|
+
readonly code: v.StringSchema<undefined>;
|
|
288
|
+
readonly message: v.StringSchema<undefined>;
|
|
289
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
290
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
291
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
292
|
+
readonly message: v.StringSchema<undefined>;
|
|
293
|
+
}, undefined>, undefined>, undefined>;
|
|
294
|
+
}, undefined>;
|
|
295
|
+
}, undefined>;
|
|
296
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
297
|
+
readonly id: v.StringSchema<undefined>;
|
|
298
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
299
|
+
readonly name: v.StringSchema<undefined>;
|
|
300
|
+
readonly summary: v.StringSchema<undefined>;
|
|
301
|
+
readonly description: v.StringSchema<undefined>;
|
|
302
|
+
readonly capabilities: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
303
|
+
readonly contracts: v.ArraySchema<v.ObjectSchema<{
|
|
304
|
+
readonly contractId: v.StringSchema<undefined>;
|
|
305
|
+
readonly format: v.PicklistSchema<["openapi", "toad-contract", "lokalise-api-contract"], undefined>;
|
|
306
|
+
readonly title: v.StringSchema<undefined>;
|
|
307
|
+
readonly size: v.NumberSchema<undefined>;
|
|
308
|
+
readonly path: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
309
|
+
readonly operations: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
310
|
+
readonly omittedOperations: v.NumberSchema<undefined>;
|
|
311
|
+
}, undefined>, undefined>;
|
|
312
|
+
readonly sourceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
313
|
+
readonly sourcePath: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
314
|
+
readonly pinnedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
315
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
316
|
+
readonly updatedAt: v.NumberSchema<undefined>;
|
|
317
|
+
readonly tier: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
318
|
+
}, undefined>, undefined>;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
export declare const listFoundationalServiceSourcesContract: {
|
|
322
|
+
readonly method: "get";
|
|
323
|
+
readonly pathResolver: () => string;
|
|
324
|
+
readonly responsesByStatusCode: {
|
|
325
|
+
readonly '4xx': v.ObjectSchema<{
|
|
326
|
+
readonly error: v.ObjectSchema<{
|
|
327
|
+
readonly code: v.StringSchema<undefined>;
|
|
328
|
+
readonly message: v.StringSchema<undefined>;
|
|
329
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
330
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
331
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
332
|
+
readonly message: v.StringSchema<undefined>;
|
|
333
|
+
}, undefined>, undefined>, undefined>;
|
|
334
|
+
}, undefined>;
|
|
335
|
+
}, undefined>;
|
|
336
|
+
readonly '5xx': v.ObjectSchema<{
|
|
337
|
+
readonly error: v.ObjectSchema<{
|
|
338
|
+
readonly code: v.StringSchema<undefined>;
|
|
339
|
+
readonly message: v.StringSchema<undefined>;
|
|
340
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
341
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
342
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
343
|
+
readonly message: v.StringSchema<undefined>;
|
|
344
|
+
}, undefined>, undefined>, undefined>;
|
|
345
|
+
}, undefined>;
|
|
346
|
+
}, undefined>;
|
|
347
|
+
readonly 200: v.ArraySchema<v.ObjectSchema<{
|
|
348
|
+
readonly id: v.StringSchema<undefined>;
|
|
349
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
350
|
+
readonly ownerId: v.StringSchema<undefined>;
|
|
351
|
+
readonly repoOwner: v.StringSchema<undefined>;
|
|
352
|
+
readonly repoName: v.StringSchema<undefined>;
|
|
353
|
+
readonly gitRef: v.StringSchema<undefined>;
|
|
354
|
+
readonly mode: v.PicklistSchema<["directory", "files"], undefined>;
|
|
355
|
+
readonly dirPath: v.StringSchema<undefined>;
|
|
356
|
+
readonly filePaths: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
357
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
358
|
+
readonly serviceName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
359
|
+
readonly serviceSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
360
|
+
readonly lastSyncedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
361
|
+
readonly lastSyncedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
362
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
363
|
+
}, undefined>, undefined>;
|
|
364
|
+
};
|
|
365
|
+
};
|
|
366
|
+
export declare const linkFoundationalServiceSourceContract: {
|
|
367
|
+
readonly method: "post";
|
|
368
|
+
readonly pathResolver: () => string;
|
|
369
|
+
readonly requestBodySchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
370
|
+
readonly repoOwner: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 100, undefined>]>;
|
|
371
|
+
readonly repoName: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>;
|
|
372
|
+
readonly gitRef: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
373
|
+
readonly mode: v.PicklistSchema<["directory", "files"], undefined>;
|
|
374
|
+
readonly dirPath: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MaxLengthAction<string, 300, undefined>]>, undefined>;
|
|
375
|
+
readonly filePaths: v.OptionalSchema<v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 300, undefined>]>, undefined>, v.MaxLengthAction<string[], 50, undefined>]>, undefined>;
|
|
376
|
+
readonly serviceId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 64, undefined>, v.RegexAction<string, "must be a lower-kebab slug">]>, undefined>;
|
|
377
|
+
readonly serviceName: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 200, undefined>]>, undefined>;
|
|
378
|
+
readonly serviceSummary: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction, v.MinLengthAction<string, 1, undefined>, v.MaxLengthAction<string, 400, undefined>]>, undefined>;
|
|
379
|
+
}, undefined>, v.CheckAction<{
|
|
380
|
+
repoOwner: string;
|
|
381
|
+
repoName: string;
|
|
382
|
+
gitRef?: string | undefined;
|
|
383
|
+
mode: "directory" | "files";
|
|
384
|
+
dirPath?: string | undefined;
|
|
385
|
+
filePaths?: string[] | undefined;
|
|
386
|
+
serviceId?: string | undefined;
|
|
387
|
+
serviceName?: string | undefined;
|
|
388
|
+
serviceSummary?: string | undefined;
|
|
389
|
+
}, "a `files` source must name serviceId, serviceName and at least one file path">]>;
|
|
390
|
+
readonly responsesByStatusCode: {
|
|
391
|
+
readonly '4xx': v.ObjectSchema<{
|
|
392
|
+
readonly error: v.ObjectSchema<{
|
|
393
|
+
readonly code: v.StringSchema<undefined>;
|
|
394
|
+
readonly message: v.StringSchema<undefined>;
|
|
395
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
396
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
397
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
398
|
+
readonly message: v.StringSchema<undefined>;
|
|
399
|
+
}, undefined>, undefined>, undefined>;
|
|
400
|
+
}, undefined>;
|
|
401
|
+
}, undefined>;
|
|
402
|
+
readonly '5xx': v.ObjectSchema<{
|
|
403
|
+
readonly error: v.ObjectSchema<{
|
|
404
|
+
readonly code: v.StringSchema<undefined>;
|
|
405
|
+
readonly message: v.StringSchema<undefined>;
|
|
406
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
407
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
408
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
409
|
+
readonly message: v.StringSchema<undefined>;
|
|
410
|
+
}, undefined>, undefined>, undefined>;
|
|
411
|
+
}, undefined>;
|
|
412
|
+
}, undefined>;
|
|
413
|
+
readonly 201: v.ObjectSchema<{
|
|
414
|
+
readonly id: v.StringSchema<undefined>;
|
|
415
|
+
readonly ownerKind: v.PicklistSchema<["account", "workspace"], undefined>;
|
|
416
|
+
readonly ownerId: v.StringSchema<undefined>;
|
|
417
|
+
readonly repoOwner: v.StringSchema<undefined>;
|
|
418
|
+
readonly repoName: v.StringSchema<undefined>;
|
|
419
|
+
readonly gitRef: v.StringSchema<undefined>;
|
|
420
|
+
readonly mode: v.PicklistSchema<["directory", "files"], undefined>;
|
|
421
|
+
readonly dirPath: v.StringSchema<undefined>;
|
|
422
|
+
readonly filePaths: v.ArraySchema<v.StringSchema<undefined>, undefined>;
|
|
423
|
+
readonly serviceId: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
424
|
+
readonly serviceName: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
425
|
+
readonly serviceSummary: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
426
|
+
readonly lastSyncedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
427
|
+
readonly lastSyncedAt: v.NullableSchema<v.NumberSchema<undefined>, undefined>;
|
|
428
|
+
readonly createdAt: v.NumberSchema<undefined>;
|
|
429
|
+
}, undefined>;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
export declare const unlinkFoundationalServiceSourceContract: {
|
|
433
|
+
readonly method: "delete";
|
|
434
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
435
|
+
id: v.StringSchema<undefined>;
|
|
436
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
437
|
+
readonly pathResolver: ({ id }: {
|
|
438
|
+
id: string;
|
|
439
|
+
}) => string;
|
|
440
|
+
readonly responsesByStatusCode: {
|
|
441
|
+
readonly '4xx': v.ObjectSchema<{
|
|
442
|
+
readonly error: v.ObjectSchema<{
|
|
443
|
+
readonly code: v.StringSchema<undefined>;
|
|
444
|
+
readonly message: v.StringSchema<undefined>;
|
|
445
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
446
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
447
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
448
|
+
readonly message: v.StringSchema<undefined>;
|
|
449
|
+
}, undefined>, undefined>, undefined>;
|
|
450
|
+
}, undefined>;
|
|
451
|
+
}, undefined>;
|
|
452
|
+
readonly '5xx': v.ObjectSchema<{
|
|
453
|
+
readonly error: v.ObjectSchema<{
|
|
454
|
+
readonly code: v.StringSchema<undefined>;
|
|
455
|
+
readonly message: v.StringSchema<undefined>;
|
|
456
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
457
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
458
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
459
|
+
readonly message: v.StringSchema<undefined>;
|
|
460
|
+
}, undefined>, undefined>, undefined>;
|
|
461
|
+
}, undefined>;
|
|
462
|
+
}, undefined>;
|
|
463
|
+
readonly 204: typeof ContractNoBody;
|
|
464
|
+
};
|
|
465
|
+
};
|
|
466
|
+
export declare const foundationalServiceSourceStatusContract: {
|
|
467
|
+
readonly method: "get";
|
|
468
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
469
|
+
id: v.StringSchema<undefined>;
|
|
470
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
471
|
+
readonly pathResolver: ({ id }: {
|
|
472
|
+
id: string;
|
|
473
|
+
}) => string;
|
|
474
|
+
readonly responsesByStatusCode: {
|
|
475
|
+
readonly '4xx': v.ObjectSchema<{
|
|
476
|
+
readonly error: v.ObjectSchema<{
|
|
477
|
+
readonly code: v.StringSchema<undefined>;
|
|
478
|
+
readonly message: v.StringSchema<undefined>;
|
|
479
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
480
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
481
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
482
|
+
readonly message: v.StringSchema<undefined>;
|
|
483
|
+
}, undefined>, undefined>, undefined>;
|
|
484
|
+
}, undefined>;
|
|
485
|
+
}, undefined>;
|
|
486
|
+
readonly '5xx': v.ObjectSchema<{
|
|
487
|
+
readonly error: v.ObjectSchema<{
|
|
488
|
+
readonly code: v.StringSchema<undefined>;
|
|
489
|
+
readonly message: v.StringSchema<undefined>;
|
|
490
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
491
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
492
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
493
|
+
readonly message: v.StringSchema<undefined>;
|
|
494
|
+
}, undefined>, undefined>, undefined>;
|
|
495
|
+
}, undefined>;
|
|
496
|
+
}, undefined>;
|
|
497
|
+
readonly 200: v.ObjectSchema<{
|
|
498
|
+
readonly changed: v.BooleanSchema<undefined>;
|
|
499
|
+
readonly lastSyncedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
500
|
+
readonly remoteCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
501
|
+
}, undefined>;
|
|
502
|
+
};
|
|
503
|
+
};
|
|
504
|
+
export declare const syncFoundationalServiceSourceContract: {
|
|
505
|
+
readonly method: "post";
|
|
506
|
+
readonly requestPathParamsSchema: v.ObjectSchema<{
|
|
507
|
+
id: v.StringSchema<undefined>;
|
|
508
|
+
}, undefined> & import("@toad-contracts/core").StandardObjectKeysV1<unknown, unknown>;
|
|
509
|
+
readonly pathResolver: ({ id }: {
|
|
510
|
+
id: string;
|
|
511
|
+
}) => string;
|
|
512
|
+
readonly requestBodySchema: typeof ContractNoBody;
|
|
513
|
+
readonly responsesByStatusCode: {
|
|
514
|
+
readonly '4xx': v.ObjectSchema<{
|
|
515
|
+
readonly error: v.ObjectSchema<{
|
|
516
|
+
readonly code: v.StringSchema<undefined>;
|
|
517
|
+
readonly message: v.StringSchema<undefined>;
|
|
518
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
519
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
520
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
521
|
+
readonly message: v.StringSchema<undefined>;
|
|
522
|
+
}, undefined>, undefined>, undefined>;
|
|
523
|
+
}, undefined>;
|
|
524
|
+
}, undefined>;
|
|
525
|
+
readonly '5xx': v.ObjectSchema<{
|
|
526
|
+
readonly error: v.ObjectSchema<{
|
|
527
|
+
readonly code: v.StringSchema<undefined>;
|
|
528
|
+
readonly message: v.StringSchema<undefined>;
|
|
529
|
+
readonly details: v.OptionalSchema<v.UnknownSchema, undefined>;
|
|
530
|
+
readonly issues: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
|
|
531
|
+
readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
|
|
532
|
+
readonly message: v.StringSchema<undefined>;
|
|
533
|
+
}, undefined>, undefined>, undefined>;
|
|
534
|
+
}, undefined>;
|
|
535
|
+
}, undefined>;
|
|
536
|
+
readonly 200: v.ObjectSchema<{
|
|
537
|
+
readonly upserted: v.NumberSchema<undefined>;
|
|
538
|
+
readonly tombstoned: v.NumberSchema<undefined>;
|
|
539
|
+
readonly unchanged: v.NumberSchema<undefined>;
|
|
540
|
+
readonly lastSyncedCommit: v.NullableSchema<v.StringSchema<undefined>, undefined>;
|
|
541
|
+
}, undefined>;
|
|
542
|
+
};
|
|
543
|
+
};
|
|
544
|
+
//# sourceMappingURL=foundational-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"foundational-services.d.ts","sourceRoot":"","sources":["../../src/routes/foundational-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAqB,MAAM,yBAAyB,CAAA;AAC3E,OAAO,KAAK,CAAC,MAAM,SAAS,CAAA;AAkC5B,eAAO,MAAM,gCAAgC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI3C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK5C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAM5C,CAAA;AAEF,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK5C,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlD,CAAA;AAEF;;;GAGG;AACH,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI/C,CAAA;AAIF,eAAO,MAAM,sCAAsC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIjD,CAAA;AAEF,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKhD,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlD,CAAA;AAEF,eAAO,MAAM,uCAAuC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKlD,CAAA;AAEF,eAAO,MAAM,qCAAqC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAMhD,CAAA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { ContractNoBody, defineApiContract } from '@toad-contracts/valibot';
|
|
2
|
+
import * as v from 'valibot';
|
|
3
|
+
import { apiContractDocumentSchema, createFoundationalServiceSchema, foundationalServiceSchema, foundationalServiceSourceSchema, foundationalServiceSourceStatusSchema, foundationalServiceSyncResultSchema, linkFoundationalServiceSourceSchema, resolvedFoundationalServiceSchema, updateFoundationalServiceSchema, } from '../foundational-services.js';
|
|
4
|
+
import { errorResponses, singleStringParam } from './_shared.js';
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
// Foundational-services route contracts. See FoundationalServiceController in
|
|
7
|
+
// @cat-factory/server. Like the prompt-fragment library, the controller is mounted
|
|
8
|
+
// TWICE — under `/accounts/:accountId` and `/workspaces/:workspaceId` — from one
|
|
9
|
+
// factory, so these literals are RELATIVE to whichever prefix it is mounted under
|
|
10
|
+
// and the owner id is read by the handler, not declared as a contract param.
|
|
11
|
+
//
|
|
12
|
+
// Service ids are lower-kebab slugs (never slash-bearing), so a plain `:serviceId`
|
|
13
|
+
// (Hono's default `[^/]+`) matches them.
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
const foundationalServiceListSchema = v.array(foundationalServiceSchema);
|
|
16
|
+
const resolvedFoundationalServiceListSchema = v.array(resolvedFoundationalServiceSchema);
|
|
17
|
+
const contractDocumentListSchema = v.array(apiContractDocumentSchema);
|
|
18
|
+
const sourceListSchema = v.array(foundationalServiceSourceSchema);
|
|
19
|
+
const serviceIdParams = singleStringParam('serviceId');
|
|
20
|
+
const sourceIdParams = singleStringParam('id');
|
|
21
|
+
// ---- services (this tier, raw — not merged) -------------------------------
|
|
22
|
+
export const listFoundationalServicesContract = defineApiContract({
|
|
23
|
+
method: 'get',
|
|
24
|
+
pathResolver: () => '/foundational-services',
|
|
25
|
+
responsesByStatusCode: { 200: foundationalServiceListSchema, ...errorResponses },
|
|
26
|
+
});
|
|
27
|
+
export const createFoundationalServiceContract = defineApiContract({
|
|
28
|
+
method: 'post',
|
|
29
|
+
pathResolver: () => '/foundational-services',
|
|
30
|
+
requestBodySchema: createFoundationalServiceSchema,
|
|
31
|
+
responsesByStatusCode: { 201: foundationalServiceSchema, ...errorResponses },
|
|
32
|
+
});
|
|
33
|
+
export const updateFoundationalServiceContract = defineApiContract({
|
|
34
|
+
method: 'patch',
|
|
35
|
+
requestPathParamsSchema: serviceIdParams,
|
|
36
|
+
pathResolver: ({ serviceId }) => `/foundational-services/${serviceId}`,
|
|
37
|
+
requestBodySchema: updateFoundationalServiceSchema,
|
|
38
|
+
responsesByStatusCode: { 200: foundationalServiceSchema, ...errorResponses },
|
|
39
|
+
});
|
|
40
|
+
export const deleteFoundationalServiceContract = defineApiContract({
|
|
41
|
+
method: 'delete',
|
|
42
|
+
requestPathParamsSchema: serviceIdParams,
|
|
43
|
+
pathResolver: ({ serviceId }) => `/foundational-services/${serviceId}`,
|
|
44
|
+
responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
|
|
45
|
+
});
|
|
46
|
+
/**
|
|
47
|
+
* The LAZY contract read: the full documents for one service. Deliberately its own
|
|
48
|
+
* endpoint rather than a field on the list — the whole point of the catalog is that a
|
|
49
|
+
* design-time reader pays for identity + operation names, and only a consumer that has
|
|
50
|
+
* settled on a service pays for its documents.
|
|
51
|
+
*/
|
|
52
|
+
export const getFoundationalServiceContractsContract = defineApiContract({
|
|
53
|
+
method: 'get',
|
|
54
|
+
requestPathParamsSchema: serviceIdParams,
|
|
55
|
+
pathResolver: ({ serviceId }) => `/foundational-services/${serviceId}/contracts`,
|
|
56
|
+
responsesByStatusCode: { 200: contractDocumentListSchema, ...errorResponses },
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* The MERGED catalog an agent actually sees (account ⊕ workspace, workspace winning).
|
|
60
|
+
* Workspace-mount only — an account has no other tier to merge with.
|
|
61
|
+
*/
|
|
62
|
+
export const resolvedFoundationalServicesContract = defineApiContract({
|
|
63
|
+
method: 'get',
|
|
64
|
+
pathResolver: () => '/foundational-services/resolved',
|
|
65
|
+
responsesByStatusCode: { 200: resolvedFoundationalServiceListSchema, ...errorResponses },
|
|
66
|
+
});
|
|
67
|
+
// ---- repo sources ---------------------------------------------------------
|
|
68
|
+
export const listFoundationalServiceSourcesContract = defineApiContract({
|
|
69
|
+
method: 'get',
|
|
70
|
+
pathResolver: () => '/foundational-service-sources',
|
|
71
|
+
responsesByStatusCode: { 200: sourceListSchema, ...errorResponses },
|
|
72
|
+
});
|
|
73
|
+
export const linkFoundationalServiceSourceContract = defineApiContract({
|
|
74
|
+
method: 'post',
|
|
75
|
+
pathResolver: () => '/foundational-service-sources',
|
|
76
|
+
requestBodySchema: linkFoundationalServiceSourceSchema,
|
|
77
|
+
responsesByStatusCode: { 201: foundationalServiceSourceSchema, ...errorResponses },
|
|
78
|
+
});
|
|
79
|
+
export const unlinkFoundationalServiceSourceContract = defineApiContract({
|
|
80
|
+
method: 'delete',
|
|
81
|
+
requestPathParamsSchema: sourceIdParams,
|
|
82
|
+
pathResolver: ({ id }) => `/foundational-service-sources/${id}`,
|
|
83
|
+
responsesByStatusCode: { 204: ContractNoBody, ...errorResponses },
|
|
84
|
+
});
|
|
85
|
+
export const foundationalServiceSourceStatusContract = defineApiContract({
|
|
86
|
+
method: 'get',
|
|
87
|
+
requestPathParamsSchema: sourceIdParams,
|
|
88
|
+
pathResolver: ({ id }) => `/foundational-service-sources/${id}/status`,
|
|
89
|
+
responsesByStatusCode: { 200: foundationalServiceSourceStatusSchema, ...errorResponses },
|
|
90
|
+
});
|
|
91
|
+
export const syncFoundationalServiceSourceContract = defineApiContract({
|
|
92
|
+
method: 'post',
|
|
93
|
+
requestPathParamsSchema: sourceIdParams,
|
|
94
|
+
pathResolver: ({ id }) => `/foundational-service-sources/${id}/sync`,
|
|
95
|
+
requestBodySchema: ContractNoBody,
|
|
96
|
+
responsesByStatusCode: { 200: foundationalServiceSyncResultSchema, ...errorResponses },
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=foundational-services.js.map
|