@hypequery/cloud-client 0.0.0-canary-20261113132821 → 0.0.0-stage

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.
@@ -1,1159 +0,0 @@
1
- // Generated by packages/cloud-client/codegen/generate.ts from specs/cloud-api/operations-v1.json.
2
- // Do not edit by hand: run `pnpm --filter @hypequery/cloud-client generate`.
3
- /** The operations spec version this client was generated from. */
4
- export const SPEC_VERSION = 1;
5
- /** Every operation path is relative to this. */
6
- export const BASE_PATH = "/v1";
7
- /** Every error category, in the order Cloud lists them. */
8
- export const CLOUD_ERROR_CATEGORIES = ["correctable_input", "unauthenticated", "forbidden", "tenant_unavailable", "budget_exceeded", "cancelled", "stale_contract", "unavailable", "internal"];
9
- /** Every error code an operation can return, with what to do about it. */
10
- export const CLOUD_ERRORS = {
11
- UNAUTHENTICATED: {
12
- status: 401,
13
- category: "unauthenticated",
14
- retryable: false,
15
- hint: "Sign in to hypequery Cloud, or send a valid bearer token.",
16
- docsUrl: "https://hypequery.com/docs/errors/unauthenticated",
17
- },
18
- FORBIDDEN: {
19
- status: 403,
20
- category: "forbidden",
21
- retryable: false,
22
- hint: "Ask an organisation Admin to do this, or to change your role.",
23
- docsUrl: "https://hypequery.com/docs/errors/forbidden",
24
- },
25
- INVALID_REQUEST_ORIGIN: {
26
- status: 403,
27
- category: "forbidden",
28
- retryable: false,
29
- hint: "Send the request from the Cloud app, or authenticate with a bearer token instead of a cookie.",
30
- docsUrl: "https://hypequery.com/docs/errors/invalid-request-origin",
31
- },
32
- OPERATION_NOT_FOUND: {
33
- status: 404,
34
- category: "correctable_input",
35
- retryable: false,
36
- hint: "Check the method and path against operations-v1.json.",
37
- docsUrl: "https://hypequery.com/docs/errors/operation-not-found",
38
- },
39
- INVALID_INPUT: {
40
- status: 400,
41
- category: "correctable_input",
42
- retryable: false,
43
- hint: "Fix the fields listed in `issues`, then retry.",
44
- docsUrl: "https://hypequery.com/docs/errors/invalid-input",
45
- },
46
- PROJECT_NOT_FOUND: {
47
- status: 404,
48
- category: "correctable_input",
49
- retryable: false,
50
- hint: "List projects (`projects.list`) and use one of their slugs.",
51
- docsUrl: "https://hypequery.com/docs/errors/project-not-found",
52
- },
53
- PROJECT_HAS_SEVERAL_TARGETS: {
54
- status: 409,
55
- category: "unavailable",
56
- retryable: false,
57
- hint: "This project still has several environments; contact hypequery support to finish moving it to projects only.",
58
- docsUrl: "https://hypequery.com/docs/errors/project-has-several-targets",
59
- },
60
- VERSION_NOT_FOUND: {
61
- status: 404,
62
- category: "correctable_input",
63
- retryable: false,
64
- hint: "List versions (`releases.list`) and use one of their labels.",
65
- docsUrl: "https://hypequery.com/docs/errors/version-not-found",
66
- },
67
- RELEASE_MOVED: {
68
- status: 409,
69
- category: "stale_contract",
70
- retryable: false,
71
- hint: "Read the current state again (`releases.status` or `drafts.list`), show the user what changed, then retry with the new values.",
72
- docsUrl: "https://hypequery.com/docs/errors/release-moved",
73
- },
74
- RELEASE_CHANGE_REFUSED: {
75
- status: 409,
76
- category: "correctable_input",
77
- retryable: false,
78
- hint: "Read the message: it names the guard that refused the change and how to clear it.",
79
- docsUrl: "https://hypequery.com/docs/errors/release-change-refused",
80
- },
81
- DRAFT_NOT_FOUND: {
82
- status: 404,
83
- category: "correctable_input",
84
- retryable: false,
85
- hint: "List drafts (`drafts.list`) and use one of their ids.",
86
- docsUrl: "https://hypequery.com/docs/errors/draft-not-found",
87
- },
88
- DRAFT_NOT_CHECKABLE: {
89
- status: 409,
90
- category: "correctable_input",
91
- retryable: false,
92
- hint: "Number checks here are for code drafts with a saved release; deploy the draft again from code first.",
93
- docsUrl: "https://hypequery.com/docs/errors/draft-not-checkable",
94
- },
95
- DRAFT_NOT_READY: {
96
- status: 422,
97
- category: "correctable_input",
98
- retryable: false,
99
- hint: "Fix what the message names in the draft (or the code, for a code draft), then publish again.",
100
- docsUrl: "https://hypequery.com/docs/errors/draft-not-ready",
101
- },
102
- CONNECTION_NOT_SAVED: {
103
- status: 404,
104
- category: "correctable_input",
105
- retryable: false,
106
- hint: "Call connections_link and give the user its link to enter the connection in the dashboard (or `connections.save` from the CLI); never ask for the password in chat.",
107
- docsUrl: "https://hypequery.com/docs/errors/connection-not-saved",
108
- },
109
- CONNECTION_AUTH_FAILED: {
110
- status: 422,
111
- category: "correctable_input",
112
- retryable: false,
113
- hint: "Call connections_link so the user can correct the ClickHouse user and password in the dashboard (or `connections.save` from the CLI), then run `connections.test`. Never ask for the password in chat.",
114
- docsUrl: "https://hypequery.com/docs/errors/connection-auth-failed",
115
- },
116
- CONNECTION_UNREACHABLE: {
117
- status: 502,
118
- category: "unavailable",
119
- retryable: true,
120
- hint: "Check the host and port, and that ClickHouse accepts connections from hypequery's egress addresses; then run `connections.test` again.",
121
- docsUrl: "https://hypequery.com/docs/errors/connection-unreachable",
122
- },
123
- CONNECTION_QUERY_FAILED: {
124
- status: 422,
125
- category: "correctable_input",
126
- retryable: false,
127
- hint: "ClickHouse refused the check query: grant the user what the message names, then run `connections.test`.",
128
- docsUrl: "https://hypequery.com/docs/errors/connection-query-failed",
129
- },
130
- CONNECTION_DATABASE_LOCKED: {
131
- status: 409,
132
- category: "correctable_input",
133
- retryable: false,
134
- hint: "Keep the default database while a release is live; add other databases to `databases` instead.",
135
- docsUrl: "https://hypequery.com/docs/errors/connection-database-locked",
136
- },
137
- STALE_REVISION: {
138
- status: 409,
139
- category: "stale_contract",
140
- retryable: false,
141
- hint: "Read it again, then retry with the new expectedRevision.",
142
- docsUrl: "https://hypequery.com/docs/errors/stale-revision",
143
- },
144
- TENANT_NOT_FOUND: {
145
- status: 404,
146
- category: "correctable_input",
147
- retryable: false,
148
- hint: "List customers (`tenants.list`) and use one of their ids.",
149
- docsUrl: "https://hypequery.com/docs/errors/tenant-not-found",
150
- },
151
- TENANT_EXISTS: {
152
- status: 409,
153
- category: "correctable_input",
154
- retryable: false,
155
- hint: "That customer is already registered; update it (`tenants.update`) instead.",
156
- docsUrl: "https://hypequery.com/docs/errors/tenant-exists",
157
- },
158
- PERMISSION_SET_NOT_FOUND: {
159
- status: 404,
160
- category: "correctable_input",
161
- retryable: false,
162
- hint: "List permission sets (`permissionSets.list`) and use one of their ids.",
163
- docsUrl: "https://hypequery.com/docs/errors/permission-set-not-found",
164
- },
165
- PERMISSION_SET_EXISTS: {
166
- status: 409,
167
- category: "correctable_input",
168
- retryable: false,
169
- hint: "Choose another name, or update the existing set (`permissionSets.update`).",
170
- docsUrl: "https://hypequery.com/docs/errors/permission-set-exists",
171
- },
172
- GRANT_NOT_FOUND: {
173
- status: 404,
174
- category: "correctable_input",
175
- retryable: false,
176
- hint: "List connections (`tenantGrants.list`) and use one of their ids.",
177
- docsUrl: "https://hypequery.com/docs/errors/grant-not-found",
178
- },
179
- ISSUER_UNREADABLE: {
180
- status: 422,
181
- category: "correctable_input",
182
- retryable: false,
183
- hint: "Check the URL is public https and serves the provider's JSON (a JWKS `keys` array, or openid-configuration), then save again.",
184
- docsUrl: "https://hypequery.com/docs/errors/issuer-unreadable",
185
- },
186
- ISSUER_REQUIRED: {
187
- status: 409,
188
- category: "correctable_input",
189
- retryable: false,
190
- hint: "Save the identity provider's JWT settings first (`jwtIssuer.save`).",
191
- docsUrl: "https://hypequery.com/docs/errors/issuer-required",
192
- },
193
- ALREADY_CONFIGURED: {
194
- status: 409,
195
- category: "correctable_input",
196
- retryable: false,
197
- hint: "Read the current settings, then save again with their expectedRevision to replace them.",
198
- docsUrl: "https://hypequery.com/docs/errors/already-configured",
199
- },
200
- NOT_CONFIGURED: {
201
- status: 404,
202
- category: "correctable_input",
203
- retryable: false,
204
- hint: "Nothing is configured yet; save it first.",
205
- docsUrl: "https://hypequery.com/docs/errors/not-configured",
206
- },
207
- PROJECT_EXISTS: {
208
- status: 409,
209
- category: "correctable_input",
210
- retryable: false,
211
- hint: "Choose another slug, or use the existing project (`projects.get`).",
212
- docsUrl: "https://hypequery.com/docs/errors/project-exists",
213
- },
214
- KEY_NOT_FOUND: {
215
- status: 404,
216
- category: "correctable_input",
217
- retryable: false,
218
- hint: "List keys (`apiKeys.list` or `deployKeys.list`) and use an active key's id.",
219
- docsUrl: "https://hypequery.com/docs/errors/key-not-found",
220
- },
221
- MEMBER_NOT_FOUND: {
222
- status: 404,
223
- category: "correctable_input",
224
- retryable: false,
225
- hint: "List members (`members.list`) and use one of their ids.",
226
- docsUrl: "https://hypequery.com/docs/errors/member-not-found",
227
- },
228
- SESSION_REQUIRED: {
229
- status: 403,
230
- category: "forbidden",
231
- retryable: false,
232
- hint: "Make this change in the dashboard or with `hypequery` signed in as yourself.",
233
- docsUrl: "https://hypequery.com/docs/errors/session-required",
234
- },
235
- DRAFT_READ_ONLY: {
236
- status: 409,
237
- category: "correctable_input",
238
- retryable: false,
239
- hint: "This project's model lives in a repository. Explain it or answer questions; for a change, write a prompt or pull-request description for the user's coding agent.",
240
- docsUrl: "https://hypequery.com/docs/errors/draft-read-only",
241
- },
242
- NOTHING_TO_CONFIRM: {
243
- status: 409,
244
- category: "correctable_input",
245
- retryable: false,
246
- hint: "Call customer_scope_list and confirm only a dataset it lists with a candidate column.",
247
- docsUrl: "https://hypequery.com/docs/errors/nothing-to-confirm",
248
- },
249
- FINDINGS_CHANGED: {
250
- status: 409,
251
- category: "stale_contract",
252
- retryable: false,
253
- hint: "Read drafts_findings again and answer with the current ids and tokens.",
254
- docsUrl: "https://hypequery.com/docs/errors/findings-changed",
255
- },
256
- RUN_CONFLICT: {
257
- status: 409,
258
- category: "stale_contract",
259
- retryable: false,
260
- hint: "Read drafts_run_status and act on the run it returns.",
261
- docsUrl: "https://hypequery.com/docs/errors/run-conflict",
262
- },
263
- DRAFT_NAME_TAKEN: {
264
- status: 409,
265
- category: "correctable_input",
266
- retryable: false,
267
- hint: "Choose another name; drafts_list shows the names in use.",
268
- docsUrl: "https://hypequery.com/docs/errors/draft-name-taken",
269
- },
270
- UPDATE_CONFLICTS: {
271
- status: 409,
272
- category: "correctable_input",
273
- retryable: false,
274
- hint: "Ask the user which side to keep for each conflict in drafts_update, preview with drafts_apply_update, then apply.",
275
- docsUrl: "https://hypequery.com/docs/errors/update-conflicts",
276
- },
277
- OWNERSHIP_CHANGE_REQUIRED: {
278
- status: 409,
279
- category: "correctable_input",
280
- retryable: false,
281
- hint: "Tell the user the live model was built in Cloud and publishing this code draft replaces it, after which the project is managed in code; once they agree, repeat the call with takeOwnership: true.",
282
- docsUrl: "https://hypequery.com/docs/errors/ownership-change-required",
283
- },
284
- CONFIRMATION_REQUIRED: {
285
- status: 409,
286
- category: "correctable_input",
287
- retryable: false,
288
- hint: "Show the user what will change; once they agree, repeat the call with `confirm: true`.",
289
- docsUrl: "https://hypequery.com/docs/errors/confirmation-required",
290
- },
291
- INTERNAL: {
292
- status: 500,
293
- category: "internal",
294
- retryable: true,
295
- hint: "Retry; if it keeps failing, report it with hypequery_feedback and this requestId.",
296
- docsUrl: "https://hypequery.com/docs/errors/internal",
297
- },
298
- };
299
- /** Route and policy for every operation, by name. */
300
- export const OPERATIONS = {
301
- "projects.list": {
302
- name: "projects.list",
303
- summary: "List the projects in your organisation.",
304
- scope: "organization",
305
- capability: "workspace:view",
306
- destructive: false,
307
- method: "GET",
308
- path: "/projects",
309
- pathParams: [],
310
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
311
- },
312
- "projects.get": {
313
- name: "projects.get",
314
- summary: "Show one project and whether a release is live.",
315
- scope: "project",
316
- capability: "workspace:view",
317
- destructive: false,
318
- method: "GET",
319
- path: "/projects/{project}",
320
- pathParams: ["project"],
321
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
322
- },
323
- "projects.connectInfo": {
324
- name: "projects.connectInfo",
325
- summary: "Where the project is served: the MCP URL, the REST base and dataset URLs, and the client contract.",
326
- scope: "project",
327
- capability: "workspace:view",
328
- destructive: false,
329
- method: "GET",
330
- path: "/projects/{project}/connect-info",
331
- pathParams: ["project"],
332
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
333
- },
334
- "projects.create": {
335
- name: "projects.create",
336
- summary: "Create a project: one ClickHouse connection, one live data model, its own URLs.",
337
- scope: "organization",
338
- capability: "environment:create",
339
- destructive: false,
340
- method: "POST",
341
- path: "/projects",
342
- pathParams: [],
343
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_EXISTS", "UNAUTHENTICATED"],
344
- },
345
- "projects.rename": {
346
- name: "projects.rename",
347
- summary: "Change a project's display name; its slug and URLs stay the same.",
348
- scope: "project",
349
- capability: "environment:create",
350
- destructive: false,
351
- method: "PATCH",
352
- path: "/projects/{project}",
353
- pathParams: ["project"],
354
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
355
- },
356
- "releases.status": {
357
- name: "releases.status",
358
- summary: "Show what is live: the current version and revision.",
359
- scope: "project",
360
- capability: "workspace:view",
361
- destructive: false,
362
- method: "GET",
363
- path: "/projects/{project}/releases/live",
364
- pathParams: ["project"],
365
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
366
- },
367
- "releases.list": {
368
- name: "releases.list",
369
- summary: "List published versions, newest first.",
370
- scope: "project",
371
- capability: "workspace:view",
372
- destructive: false,
373
- method: "GET",
374
- path: "/projects/{project}/releases",
375
- pathParams: ["project"],
376
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
377
- },
378
- "releases.get": {
379
- name: "releases.get",
380
- summary: "Show one published version and its data model.",
381
- scope: "project",
382
- capability: "workspace:view",
383
- destructive: false,
384
- method: "GET",
385
- path: "/projects/{project}/releases/{version}",
386
- pathParams: ["project", "version"],
387
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED", "VERSION_NOT_FOUND"],
388
- },
389
- "releases.rollback": {
390
- name: "releases.rollback",
391
- summary: "Make an earlier published version live again. The project's owner follows it: rolling back to a version built in Cloud makes the model editable in Cloud again, and to one deployed from code makes it managed in code.",
392
- scope: "project",
393
- capability: "deployment:publish",
394
- destructive: true,
395
- method: "POST",
396
- path: "/projects/{project}/releases/{version}/rollback",
397
- pathParams: ["project", "version"],
398
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "RELEASE_CHANGE_REFUSED", "RELEASE_MOVED", "UNAUTHENTICATED", "VERSION_NOT_FOUND"],
399
- },
400
- "drafts.list": {
401
- name: "drafts.list",
402
- summary: "List the project's drafts and whether each is ready to publish.",
403
- scope: "project",
404
- capability: "workspace:view",
405
- destructive: false,
406
- method: "GET",
407
- path: "/projects/{project}/drafts",
408
- pathParams: ["project"],
409
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
410
- },
411
- "drafts.open": {
412
- name: "drafts.open",
413
- summary: "Open your working draft (created on first use, with the ClickHouse schema discovered) or a named draft, and see what it holds.",
414
- scope: "project",
415
- capability: "deployment:publish",
416
- destructive: false,
417
- method: "POST",
418
- path: "/projects/{project}/drafts/open",
419
- pathParams: ["project"],
420
- errors: ["CONNECTION_NOT_SAVED", "DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
421
- },
422
- "drafts.save": {
423
- name: "drafts.save",
424
- summary: "Save the draft as a staging release after its publish gates pass. Nothing goes live; publishing is drafts.promote.",
425
- scope: "project",
426
- capability: "deployment:publish",
427
- destructive: false,
428
- method: "POST",
429
- path: "/projects/{project}/drafts/{draft}/save",
430
- pathParams: ["project", "draft"],
431
- errors: ["DRAFT_NOT_FOUND", "DRAFT_NOT_READY", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
432
- },
433
- "drafts.review": {
434
- name: "drafts.review",
435
- summary: "Review a saved draft before publishing: what changes against production, breaking changes, held measures and checks.",
436
- scope: "project",
437
- capability: "deployment:publish",
438
- destructive: false,
439
- method: "GET",
440
- path: "/projects/{project}/drafts/{draft}/review",
441
- pathParams: ["project", "draft"],
442
- errors: ["DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "RELEASE_MOVED", "UNAUTHENTICATED"],
443
- },
444
- "drafts.checks": {
445
- name: "drafts.checks",
446
- summary: "Run Cloud's number checks on a code draft's saved release.",
447
- scope: "project",
448
- capability: "deployment:publish",
449
- destructive: false,
450
- method: "POST",
451
- path: "/projects/{project}/drafts/{draft}/checks",
452
- pathParams: ["project", "draft"],
453
- errors: ["DRAFT_NOT_CHECKABLE", "DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
454
- },
455
- "drafts.promote": {
456
- name: "drafts.promote",
457
- summary: "Publish a draft's saved release to production.",
458
- scope: "project",
459
- capability: "deployment:publish",
460
- destructive: true,
461
- method: "POST",
462
- path: "/projects/{project}/drafts/{draft}/promote",
463
- pathParams: ["project", "draft"],
464
- errors: ["CONFIRMATION_REQUIRED", "DRAFT_NOT_FOUND", "DRAFT_NOT_READY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "OWNERSHIP_CHANGE_REQUIRED", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "RELEASE_CHANGE_REFUSED", "RELEASE_MOVED", "UNAUTHENTICATED"],
465
- },
466
- "drafts.get": {
467
- name: "drafts.get",
468
- summary: "Read a draft: its model, revision, whether Production moved since it was based, its saved release and its publish gates.",
469
- scope: "project",
470
- capability: "deployment:publish",
471
- destructive: false,
472
- method: "GET",
473
- path: "/projects/{project}/drafts/{draft}",
474
- pathParams: ["project", "draft"],
475
- errors: ["DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
476
- },
477
- "drafts.rename": {
478
- name: "drafts.rename",
479
- summary: "Rename a draft. Its id and staging URL stay the same.",
480
- scope: "project",
481
- capability: "deployment:publish",
482
- destructive: false,
483
- method: "PATCH",
484
- path: "/projects/{project}/drafts/{draft}",
485
- pathParams: ["project", "draft"],
486
- errors: ["DRAFT_NAME_TAKEN", "DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
487
- },
488
- "drafts.delete": {
489
- name: "drafts.delete",
490
- summary: "Delete a draft and its staging URL for good. Only its creator can, unless you manage the organisation.",
491
- scope: "project",
492
- capability: "deployment:publish",
493
- destructive: true,
494
- method: "DELETE",
495
- path: "/projects/{project}/drafts/{draft}",
496
- pathParams: ["project", "draft"],
497
- errors: ["CONFIRMATION_REQUIRED", "DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
498
- },
499
- "drafts.archived": {
500
- name: "drafts.archived",
501
- summary: "Read an archived draft: the release it published and whether it can be reopened against current Production.",
502
- scope: "project",
503
- capability: "deployment:publish",
504
- destructive: false,
505
- method: "GET",
506
- path: "/projects/{project}/drafts/{draft}/archive",
507
- pathParams: ["project", "draft"],
508
- errors: ["DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
509
- },
510
- "drafts.reopen": {
511
- name: "drafts.reopen",
512
- summary: "Reopen an archived draft as a working draft, from the release you read.",
513
- scope: "project",
514
- capability: "deployment:publish",
515
- destructive: false,
516
- method: "POST",
517
- path: "/projects/{project}/drafts/{draft}/reopen",
518
- pathParams: ["project", "draft"],
519
- errors: ["DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
520
- },
521
- "drafts.impact": {
522
- name: "drafts.impact",
523
- summary: "Who a saved draft affects: which apps and customers called the datasets, measures and fields it changes or removes, recently.",
524
- scope: "project",
525
- capability: "deployment:publish",
526
- destructive: false,
527
- method: "GET",
528
- path: "/projects/{project}/drafts/{draft}/impact",
529
- pathParams: ["project", "draft"],
530
- errors: ["DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "RELEASE_MOVED", "UNAUTHENTICATED"],
531
- },
532
- "drafts.update": {
533
- name: "drafts.update",
534
- summary: "When Production moved since a draft was based, show the merge onto current Production: what merges cleanly and each conflict to choose.",
535
- scope: "project",
536
- capability: "deployment:publish",
537
- destructive: false,
538
- method: "GET",
539
- path: "/projects/{project}/drafts/{draft}/update",
540
- pathParams: ["project", "draft"],
541
- errors: ["DRAFT_NOT_FOUND", "DRAFT_NOT_READY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED", "UPDATE_CONFLICTS"],
542
- },
543
- "drafts.applyUpdate": {
544
- name: "drafts.applyUpdate",
545
- summary: "Merge a draft onto current Production with the user's choice for each conflict (keep the draft's or Production's). Preview first; apply once every conflict is chosen.",
546
- scope: "project",
547
- capability: "deployment:publish",
548
- destructive: false,
549
- method: "POST",
550
- path: "/projects/{project}/drafts/{draft}/update",
551
- pathParams: ["project", "draft"],
552
- errors: ["DRAFT_NOT_FOUND", "DRAFT_NOT_READY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED", "UPDATE_CONFLICTS"],
553
- },
554
- "drafts.refreshBase": {
555
- name: "drafts.refreshBase",
556
- summary: "For a code draft whose base Production moved: acknowledge that publishing it will replace current Production as it is, dropping the changes made there since. Nothing is merged.",
557
- scope: "project",
558
- capability: "deployment:publish",
559
- destructive: true,
560
- method: "POST",
561
- path: "/projects/{project}/drafts/{draft}/refresh-base",
562
- pathParams: ["project", "draft"],
563
- errors: ["CONFIRMATION_REQUIRED", "DRAFT_NOT_FOUND", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
564
- },
565
- "drafts.setup": {
566
- name: "drafts.setup",
567
- summary: "Save what the user said about the project on a draft: what it's for, who it serves, the tables to model, priority metrics and one number they trust.",
568
- scope: "project",
569
- capability: "deployment:publish",
570
- destructive: false,
571
- method: "PATCH",
572
- path: "/projects/{project}/drafts/{draft}/setup",
573
- pathParams: ["project", "draft"],
574
- errors: ["DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
575
- },
576
- "drafts.findings": {
577
- name: "drafts.findings",
578
- summary: "List what discovery found that changes numbers (internal rows, mixed units, versioned rows, grain, customer scope…), each with the question to ask the user and the measures it affects.",
579
- scope: "project",
580
- capability: "deployment:publish",
581
- destructive: false,
582
- method: "GET",
583
- path: "/projects/{project}/drafts/{draft}/findings",
584
- pathParams: ["project", "draft"],
585
- errors: ["DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
586
- },
587
- "drafts.answer": {
588
- name: "drafts.answer",
589
- summary: "Record the user's answers to findings: approve the proposed default, reject it (remove, or their own alternative), or decide later. Each answer becomes the member's decision in the draft's evidence ledger and can release held measures, so ask the user first.",
590
- scope: "project",
591
- capability: "deployment:publish",
592
- destructive: true,
593
- method: "POST",
594
- path: "/projects/{project}/drafts/{draft}/answers",
595
- pathParams: ["project", "draft"],
596
- errors: ["CONFIRMATION_REQUIRED", "DRAFT_NOT_FOUND", "DRAFT_NOT_READY", "DRAFT_READ_ONLY", "FINDINGS_CHANGED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
597
- },
598
- "drafts.runStatus": {
599
- name: "drafts.runStatus",
600
- summary: "Read the progress of the draft's background checks (grain, column meaning, measures, joins, query history, the trusted number).",
601
- scope: "project",
602
- capability: "deployment:publish",
603
- destructive: false,
604
- method: "GET",
605
- path: "/projects/{project}/drafts/{draft}/run",
606
- pathParams: ["project", "draft"],
607
- errors: ["DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
608
- },
609
- "drafts.run": {
610
- name: "drafts.run",
611
- summary: "Start, resume or cancel the draft's background checks against ClickHouse. They run in batches; poll drafts_run_status, then read drafts_findings.",
612
- scope: "project",
613
- capability: "deployment:publish",
614
- destructive: false,
615
- method: "POST",
616
- path: "/projects/{project}/drafts/{draft}/run",
617
- pathParams: ["project", "draft"],
618
- errors: ["CONNECTION_NOT_SAVED", "DRAFT_NOT_FOUND", "DRAFT_READ_ONLY", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "RUN_CONFLICT", "STALE_REVISION", "UNAUTHENTICATED"],
619
- },
620
- "customerScope.list": {
621
- name: "customerScope.list",
622
- summary: "List each live dataset's customer scope, and the ones flagged for exposing a customer column without being scoped by it.",
623
- scope: "project",
624
- capability: "workspace:view",
625
- destructive: false,
626
- method: "GET",
627
- path: "/projects/{project}/onboarding/customer-scope",
628
- pathParams: ["project"],
629
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
630
- },
631
- "customerScope.confirmShared": {
632
- name: "customerScope.confirmShared",
633
- summary: "Record that a flagged dataset is the same for every customer, so it stays unscoped on purpose. Only the user can decide this.",
634
- scope: "project",
635
- capability: "deployment:publish",
636
- destructive: true,
637
- method: "POST",
638
- path: "/projects/{project}/onboarding/customer-scope/confirm",
639
- pathParams: ["project"],
640
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "NOTHING_TO_CONFIRM", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
641
- },
642
- "samplePolicy.get": {
643
- name: "samplePolicy.get",
644
- summary: "Read which columns' sample values the assistant may see: all, only those not detected as sensitive, or none, with per-column overrides.",
645
- scope: "project",
646
- capability: "deployment:publish",
647
- destructive: false,
648
- method: "GET",
649
- path: "/projects/{project}/sample-policy",
650
- pathParams: ["project"],
651
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
652
- },
653
- "samplePolicy.set": {
654
- name: "samplePolicy.set",
655
- summary: "Set which columns' sample values the assistant may see.",
656
- scope: "project",
657
- capability: "connection:manage",
658
- destructive: false,
659
- method: "PUT",
660
- path: "/projects/{project}/sample-policy",
661
- pathParams: ["project"],
662
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
663
- },
664
- "connections.get": {
665
- name: "connections.get",
666
- summary: "Show the project's ClickHouse connection (never the password).",
667
- scope: "project",
668
- capability: "workspace:view",
669
- destructive: false,
670
- method: "GET",
671
- path: "/projects/{project}/connection",
672
- pathParams: ["project"],
673
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
674
- },
675
- "connections.save": {
676
- name: "connections.save",
677
- summary: "Test and save the project's ClickHouse connection; once a release is live, databases can only be added.",
678
- scope: "project",
679
- capability: "connection:manage",
680
- destructive: false,
681
- method: "POST",
682
- path: "/projects/{project}/connection",
683
- pathParams: ["project"],
684
- errors: ["CONNECTION_AUTH_FAILED", "CONNECTION_DATABASE_LOCKED", "CONNECTION_QUERY_FAILED", "CONNECTION_UNREACHABLE", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
685
- },
686
- "connections.link": {
687
- name: "connections.link",
688
- summary: "Get a one-time link for the user to enter the project's ClickHouse connection in the dashboard, so the password never passes through chat. It works for the user who asked, signed in, once, for 15 minutes; then check it with connections.test.",
689
- scope: "project",
690
- capability: "connection:manage",
691
- destructive: false,
692
- method: "POST",
693
- path: "/projects/{project}/connection/link",
694
- pathParams: ["project"],
695
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
696
- },
697
- "connections.test": {
698
- name: "connections.test",
699
- summary: "Check the saved connection now: reachable, the user accepted, and what hypequery needs granted.",
700
- scope: "project",
701
- capability: "workspace:view",
702
- destructive: false,
703
- method: "POST",
704
- path: "/projects/{project}/connection/test",
705
- pathParams: ["project"],
706
- errors: ["CONNECTION_AUTH_FAILED", "CONNECTION_NOT_SAVED", "CONNECTION_QUERY_FAILED", "CONNECTION_UNREACHABLE", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
707
- },
708
- "connections.queryHistory": {
709
- name: "connections.queryHistory",
710
- summary: "Show whether onboarding may read ClickHouse query history, and which accounts are technical.",
711
- scope: "project",
712
- capability: "workspace:view",
713
- destructive: false,
714
- method: "GET",
715
- path: "/projects/{project}/connection/query-history",
716
- pathParams: ["project"],
717
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
718
- },
719
- "connections.setQueryHistory": {
720
- name: "connections.setQueryHistory",
721
- summary: "Allow or stop onboarding reading ClickHouse query history (shapes only, never literals).",
722
- scope: "project",
723
- capability: "connection:manage",
724
- destructive: false,
725
- method: "PATCH",
726
- path: "/projects/{project}/connection/query-history",
727
- pathParams: ["project"],
728
- errors: ["CONNECTION_NOT_SAVED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
729
- },
730
- "logs.query": {
731
- name: "logs.query",
732
- summary: "Search the project's request history (7 days): who queried what, how long it took, and what failed.",
733
- scope: "project",
734
- capability: "workspace:view",
735
- destructive: false,
736
- method: "GET",
737
- path: "/projects/{project}/logs",
738
- pathParams: ["project"],
739
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
740
- },
741
- "usage.get": {
742
- name: "usage.get",
743
- summary: "Show this month's queries by day and transport, per customer, and embedded chat usage.",
744
- scope: "organization",
745
- capability: "workspace:view",
746
- destructive: false,
747
- method: "GET",
748
- path: "/org/usage",
749
- pathParams: [],
750
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
751
- },
752
- "audit.list": {
753
- name: "audit.list",
754
- summary: "List the organisation's audit log: publishes, rollbacks, members, keys and connection changes.",
755
- scope: "organization",
756
- capability: "audit:read",
757
- destructive: false,
758
- method: "GET",
759
- path: "/org/audit",
760
- pathParams: [],
761
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
762
- },
763
- "tenants.list": {
764
- name: "tenants.list",
765
- summary: "List the project's customers (tenants) and whether each is enabled.",
766
- scope: "project",
767
- capability: "embed:view",
768
- destructive: false,
769
- method: "GET",
770
- path: "/projects/{project}/customers/tenants",
771
- pathParams: ["project"],
772
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
773
- },
774
- "tenants.create": {
775
- name: "tenants.create",
776
- summary: "Register a customer by the id your app uses for it, with a display name.",
777
- scope: "project",
778
- capability: "embed:manage",
779
- destructive: false,
780
- method: "POST",
781
- path: "/projects/{project}/customers/tenants",
782
- pathParams: ["project"],
783
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "TENANT_EXISTS", "UNAUTHENTICATED"],
784
- },
785
- "tenants.update": {
786
- name: "tenants.update",
787
- summary: "Rename a customer, or disable it (which ends its users' MCP sign-ins).",
788
- scope: "project",
789
- capability: "embed:manage",
790
- destructive: false,
791
- method: "PATCH",
792
- path: "/projects/{project}/customers/tenants/{tenant}",
793
- pathParams: ["project", "tenant"],
794
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "TENANT_NOT_FOUND", "UNAUTHENTICATED"],
795
- },
796
- "tenants.remove": {
797
- name: "tenants.remove",
798
- summary: "Remove a customer and end its users' MCP sign-ins.",
799
- scope: "project",
800
- capability: "embed:manage",
801
- destructive: true,
802
- method: "DELETE",
803
- path: "/projects/{project}/customers/tenants/{tenant}",
804
- pathParams: ["project", "tenant"],
805
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "TENANT_NOT_FOUND", "UNAUTHENTICATED"],
806
- },
807
- "permissionSets.list": {
808
- name: "permissionSets.list",
809
- summary: "List the permission sets that decide which datasets and fields customers' users see.",
810
- scope: "project",
811
- capability: "embed:view",
812
- destructive: false,
813
- method: "GET",
814
- path: "/projects/{project}/customers/permission-sets",
815
- pathParams: ["project"],
816
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
817
- },
818
- "permissionSets.create": {
819
- name: "permissionSets.create",
820
- summary: "Create a permission set: the datasets and fields a customer's users may query.",
821
- scope: "project",
822
- capability: "embed:manage",
823
- destructive: false,
824
- method: "POST",
825
- path: "/projects/{project}/customers/permission-sets",
826
- pathParams: ["project"],
827
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PERMISSION_SET_EXISTS", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
828
- },
829
- "permissionSets.update": {
830
- name: "permissionSets.update",
831
- summary: "Change a permission set, guarded by the revision you read; fields you leave out keep their values.",
832
- scope: "project",
833
- capability: "embed:manage",
834
- destructive: false,
835
- method: "PATCH",
836
- path: "/projects/{project}/customers/permission-sets/{permissionSet}",
837
- pathParams: ["project", "permissionSet"],
838
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PERMISSION_SET_NOT_FOUND", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
839
- },
840
- "permissionSets.remove": {
841
- name: "permissionSets.remove",
842
- summary: "Delete a permission set; tokens naming it are refused from then on.",
843
- scope: "project",
844
- capability: "embed:manage",
845
- destructive: true,
846
- method: "DELETE",
847
- path: "/projects/{project}/customers/permission-sets/{permissionSet}",
848
- pathParams: ["project", "permissionSet"],
849
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PERMISSION_SET_NOT_FOUND", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
850
- },
851
- "customerLimits.get": {
852
- name: "customerLimits.get",
853
- summary: "Show each customer's query rate, daily query limit and chat token allowance.",
854
- scope: "project",
855
- capability: "embed:view",
856
- destructive: false,
857
- method: "GET",
858
- path: "/projects/{project}/customers/limits",
859
- pathParams: ["project"],
860
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
861
- },
862
- "customerLimits.set": {
863
- name: "customerLimits.set",
864
- summary: "Set each customer's query rate, daily query limit and chat tokens; null keeps the default.",
865
- scope: "project",
866
- capability: "embed:manage",
867
- destructive: false,
868
- method: "PATCH",
869
- path: "/projects/{project}/customers/limits",
870
- pathParams: ["project"],
871
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
872
- },
873
- "tenantGrants.list": {
874
- name: "tenantGrants.list",
875
- summary: "List customers' users signed in to MCP, by customer and user.",
876
- scope: "project",
877
- capability: "embed:manage",
878
- destructive: false,
879
- method: "GET",
880
- path: "/projects/{project}/customers/mcp-grants",
881
- pathParams: ["project"],
882
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
883
- },
884
- "tenantGrants.revokeTenant": {
885
- name: "tenantGrants.revokeTenant",
886
- summary: "End every MCP connection of one customer's users.",
887
- scope: "project",
888
- capability: "embed:manage",
889
- destructive: true,
890
- method: "POST",
891
- path: "/projects/{project}/customers/mcp-grants/revoke-tenant",
892
- pathParams: ["project"],
893
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
894
- },
895
- "tenantGrants.revoke": {
896
- name: "tenantGrants.revoke",
897
- summary: "End one customer user's MCP connection; it stops on its next call.",
898
- scope: "project",
899
- capability: "embed:manage",
900
- destructive: true,
901
- method: "DELETE",
902
- path: "/projects/{project}/customers/mcp-grants/{grant}",
903
- pathParams: ["project", "grant"],
904
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "GRANT_NOT_FOUND", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
905
- },
906
- "customerAccess.get": {
907
- name: "customerAccess.get",
908
- summary: "Show how the app identifies its customers' users, the customer origin, and a dataset to prove scoping with.",
909
- scope: "project",
910
- capability: "embed:view",
911
- destructive: false,
912
- method: "GET",
913
- path: "/projects/{project}/customers/access",
914
- pathParams: ["project"],
915
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
916
- },
917
- "customerAccess.setMode": {
918
- name: "customerAccess.setMode",
919
- summary: "Choose how the app identifies its customers' users: jwt (your provider), minted (your backend mints tokens), backend (your backend names the customer) or internal.",
920
- scope: "project",
921
- capability: "credentials:manage",
922
- destructive: false,
923
- method: "PATCH",
924
- path: "/projects/{project}/customers/access",
925
- pathParams: ["project"],
926
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
927
- },
928
- "customerAccess.createKey": {
929
- name: "customerAccess.createKey",
930
- summary: "Create the server key a minted or backend mode uses, for any customer. Its token is returned once.",
931
- scope: "project",
932
- capability: "credentials:manage",
933
- destructive: false,
934
- method: "POST",
935
- path: "/projects/{project}/customers/access/key",
936
- pathParams: ["project"],
937
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
938
- },
939
- "customerAccess.prove": {
940
- name: "customerAccess.prove",
941
- summary: "Prove customer scoping: one query as a chosen customer through the customer origin, then the same query with no customer, which must be refused.",
942
- scope: "project",
943
- capability: "credentials:manage",
944
- destructive: false,
945
- method: "POST",
946
- path: "/projects/{project}/customers/access/prove",
947
- pathParams: ["project"],
948
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
949
- },
950
- "customerSettings.get": {
951
- name: "customerSettings.get",
952
- summary: "Show the allowed browser origins and how customers register.",
953
- scope: "project",
954
- capability: "embed:view",
955
- destructive: false,
956
- method: "GET",
957
- path: "/projects/{project}/customers/settings",
958
- pathParams: ["project"],
959
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
960
- },
961
- "customerSettings.set": {
962
- name: "customerSettings.set",
963
- summary: "Replace the browser origins allowed to call customer endpoints, and choose whether customers register on first use.",
964
- scope: "project",
965
- capability: "credentials:manage",
966
- destructive: false,
967
- method: "PATCH",
968
- path: "/projects/{project}/customers/settings",
969
- pathParams: ["project"],
970
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
971
- },
972
- "jwtIssuer.get": {
973
- name: "jwtIssuer.get",
974
- summary: "Show the identity provider whose JWTs your app's users present, with its health.",
975
- scope: "project",
976
- capability: "embed:view",
977
- destructive: false,
978
- method: "GET",
979
- path: "/projects/{project}/customers/jwt-issuer",
980
- pathParams: ["project"],
981
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
982
- },
983
- "jwtIssuer.save": {
984
- name: "jwtIssuer.save",
985
- summary: "Trust your identity provider's JWTs: issuer, audience, JWKS URL and which claims name the customer and access.",
986
- scope: "project",
987
- capability: "credentials:manage",
988
- destructive: false,
989
- method: "PUT",
990
- path: "/projects/{project}/customers/jwt-issuer",
991
- pathParams: ["project"],
992
- errors: ["ALREADY_CONFIGURED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "ISSUER_UNREADABLE", "NOT_CONFIGURED", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
993
- },
994
- "jwtIssuer.remove": {
995
- name: "jwtIssuer.remove",
996
- summary: "Stop trusting the identity provider's JWTs; tokens from it are refused from then on.",
997
- scope: "project",
998
- capability: "credentials:manage",
999
- destructive: true,
1000
- method: "DELETE",
1001
- path: "/projects/{project}/customers/jwt-issuer",
1002
- pathParams: ["project"],
1003
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "NOT_CONFIGURED", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1004
- },
1005
- "oidcClient.get": {
1006
- name: "oidcClient.get",
1007
- summary: "Show OIDC sign-in for customers' MCP users, with the redirect and MCP URLs to register (never the client secret).",
1008
- scope: "project",
1009
- capability: "embed:view",
1010
- destructive: false,
1011
- method: "GET",
1012
- path: "/projects/{project}/customers/oidc-client",
1013
- pathParams: ["project"],
1014
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1015
- },
1016
- "oidcClient.save": {
1017
- name: "oidcClient.save",
1018
- summary: "Let customers' users sign in to MCP with your identity provider: issuer, client id and (the first time) secret.",
1019
- scope: "project",
1020
- capability: "credentials:manage",
1021
- destructive: false,
1022
- method: "PUT",
1023
- path: "/projects/{project}/customers/oidc-client",
1024
- pathParams: ["project"],
1025
- errors: ["ALREADY_CONFIGURED", "CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "ISSUER_REQUIRED", "ISSUER_UNREADABLE", "NOT_CONFIGURED", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "STALE_REVISION", "UNAUTHENTICATED"],
1026
- },
1027
- "oidcClient.remove": {
1028
- name: "oidcClient.remove",
1029
- summary: "Remove OIDC sign-in; every customer MCP connection ends with it.",
1030
- scope: "project",
1031
- capability: "credentials:manage",
1032
- destructive: true,
1033
- method: "DELETE",
1034
- path: "/projects/{project}/customers/oidc-client",
1035
- pathParams: ["project"],
1036
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "NOT_CONFIGURED", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1037
- },
1038
- "members.list": {
1039
- name: "members.list",
1040
- summary: "List the organisation's members and pending invitations, with their roles.",
1041
- scope: "organization",
1042
- capability: "organization:manage",
1043
- destructive: false,
1044
- method: "GET",
1045
- path: "/org/members",
1046
- pathParams: [],
1047
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
1048
- },
1049
- "members.invite": {
1050
- name: "members.invite",
1051
- summary: "Invite someone by email as a Developer (member) or an Admin; they get an email to accept.",
1052
- scope: "organization",
1053
- capability: "organization:manage",
1054
- destructive: false,
1055
- method: "POST",
1056
- path: "/org/members/invitations",
1057
- pathParams: [],
1058
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "SESSION_REQUIRED", "UNAUTHENTICATED"],
1059
- },
1060
- "members.cancelInvitation": {
1061
- name: "members.cancelInvitation",
1062
- summary: "Cancel a pending invitation.",
1063
- scope: "organization",
1064
- capability: "organization:manage",
1065
- destructive: true,
1066
- method: "DELETE",
1067
- path: "/org/members/invitations/{invitation}",
1068
- pathParams: ["invitation"],
1069
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "MEMBER_NOT_FOUND", "SESSION_REQUIRED", "UNAUTHENTICATED"],
1070
- },
1071
- "org.accessPolicy": {
1072
- name: "org.accessPolicy",
1073
- summary: "Show who may be invited: any email, or only approved email domains.",
1074
- scope: "organization",
1075
- capability: "organization:manage",
1076
- destructive: false,
1077
- method: "GET",
1078
- path: "/org/access-policy",
1079
- pathParams: [],
1080
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
1081
- },
1082
- "org.setAccessPolicy": {
1083
- name: "org.setAccessPolicy",
1084
- summary: "Choose who may be invited: any email, or only approved email domains.",
1085
- scope: "organization",
1086
- capability: "organization:manage",
1087
- destructive: false,
1088
- method: "PUT",
1089
- path: "/org/access-policy",
1090
- pathParams: [],
1091
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "UNAUTHENTICATED"],
1092
- },
1093
- "deployKeys.list": {
1094
- name: "deployKeys.list",
1095
- summary: "List the project's deploy keys (for CI), with when each was last used.",
1096
- scope: "project",
1097
- capability: "credentials:manage",
1098
- destructive: false,
1099
- method: "GET",
1100
- path: "/projects/{project}/deploy-keys",
1101
- pathParams: ["project"],
1102
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1103
- },
1104
- "deployKeys.create": {
1105
- name: "deployKeys.create",
1106
- summary: "Create a deploy key for CI; its token is returned once.",
1107
- scope: "project",
1108
- capability: "credentials:manage",
1109
- destructive: false,
1110
- method: "POST",
1111
- path: "/projects/{project}/deploy-keys",
1112
- pathParams: ["project"],
1113
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1114
- },
1115
- "deployKeys.revoke": {
1116
- name: "deployKeys.revoke",
1117
- summary: "Revoke a deploy key; CI using it stops deploying.",
1118
- scope: "project",
1119
- capability: "credentials:manage",
1120
- destructive: true,
1121
- method: "DELETE",
1122
- path: "/projects/{project}/deploy-keys/{key}",
1123
- pathParams: ["project", "key"],
1124
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "KEY_NOT_FOUND", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1125
- },
1126
- "apiKeys.list": {
1127
- name: "apiKeys.list",
1128
- summary: "List the project's API keys and approved MCP connections, with their roles, scopes and customers.",
1129
- scope: "project",
1130
- capability: "credentials:manage",
1131
- destructive: false,
1132
- method: "GET",
1133
- path: "/projects/{project}/api-keys",
1134
- pathParams: ["project"],
1135
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1136
- },
1137
- "apiKeys.create": {
1138
- name: "apiKeys.create",
1139
- summary: "Create an API key with roles, scopes and which customers it may act for; its token is returned once.",
1140
- scope: "project",
1141
- capability: "credentials:manage",
1142
- destructive: false,
1143
- method: "POST",
1144
- path: "/projects/{project}/api-keys",
1145
- pathParams: ["project"],
1146
- errors: ["FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1147
- },
1148
- "apiKeys.revoke": {
1149
- name: "apiKeys.revoke",
1150
- summary: "Revoke an API key or an approved MCP connection; it stops on its next call.",
1151
- scope: "project",
1152
- capability: "credentials:manage",
1153
- destructive: true,
1154
- method: "DELETE",
1155
- path: "/projects/{project}/api-keys/{key}",
1156
- pathParams: ["project", "key"],
1157
- errors: ["CONFIRMATION_REQUIRED", "FORBIDDEN", "INTERNAL", "INVALID_INPUT", "INVALID_REQUEST_ORIGIN", "KEY_NOT_FOUND", "PROJECT_HAS_SEVERAL_TARGETS", "PROJECT_NOT_FOUND", "UNAUTHENTICATED"],
1158
- },
1159
- };