@terrantula/sdk 0.8.1 → 0.9.1
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/{chunk-NVHWMOWP.mjs → chunk-OXOF623W.mjs} +128 -114
- package/dist/index.d.mts +430 -246
- package/dist/index.d.ts +430 -246
- package/dist/index.js +128 -114
- package/dist/index.mjs +1 -1
- package/dist/local.d.mts +301 -209
- package/dist/local.d.ts +301 -209
- package/dist/local.js +128 -114
- package/dist/local.mjs +1 -1
- package/dist/{projects-BxDuMQLR.d.mts → projects-CT3fGCOp.d.mts} +2 -2
- package/dist/{projects-BxDuMQLR.d.ts → projects-CT3fGCOp.d.ts} +2 -2
- package/package.json +7 -7
package/dist/local.js
CHANGED
|
@@ -99,19 +99,19 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
99
99
|
),
|
|
100
100
|
get: withSchema(
|
|
101
101
|
import_zod.z.object({
|
|
102
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
102
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
103
103
|
}),
|
|
104
104
|
(params) => call(cloud.orgs[":id"].$get({ param: params }))
|
|
105
105
|
),
|
|
106
106
|
listUsers: withSchema(
|
|
107
107
|
import_zod.z.object({
|
|
108
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
108
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
109
109
|
}),
|
|
110
110
|
(params) => call(cloud.orgs[":id"].users.$get({ param: params }))
|
|
111
111
|
),
|
|
112
112
|
inviteUser: withSchema(
|
|
113
113
|
import_zod.z.object({
|
|
114
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
114
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
115
115
|
email: import_zod.z.string().describe("User email"),
|
|
116
116
|
name: import_zod.z.string().describe("User full name"),
|
|
117
117
|
role: import_zod.z.enum(["owner", "admin", "member"]).optional().describe("Role (owner|admin|member)")
|
|
@@ -123,7 +123,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
123
123
|
),
|
|
124
124
|
updateUserRole: withSchema(
|
|
125
125
|
import_zod.z.object({
|
|
126
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
126
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
127
127
|
userId: import_zod.z.string().describe("User ID"),
|
|
128
128
|
role: import_zod.z.enum(["owner", "admin", "member"]).describe("New role")
|
|
129
129
|
}),
|
|
@@ -136,26 +136,26 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
136
136
|
),
|
|
137
137
|
removeUser: withSchema(
|
|
138
138
|
import_zod.z.object({
|
|
139
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
139
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
140
140
|
userId: import_zod.z.string().describe("User ID")
|
|
141
141
|
}),
|
|
142
142
|
(params) => call(cloud.orgs[":id"].users[":userId"].$delete({ param: params }))
|
|
143
143
|
),
|
|
144
144
|
leave: withSchema(
|
|
145
145
|
import_zod.z.object({
|
|
146
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
146
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
147
147
|
}),
|
|
148
148
|
(params) => call(cloud.orgs[":id"].leave.$post({ param: params }))
|
|
149
149
|
),
|
|
150
150
|
delete: withSchema(
|
|
151
151
|
import_zod.z.object({
|
|
152
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
152
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
153
153
|
}),
|
|
154
154
|
(params) => call(cloud.orgs[":id"].$delete({ param: params }))
|
|
155
155
|
),
|
|
156
156
|
listPersonalTokens: withSchema(
|
|
157
157
|
import_zod.z.object({
|
|
158
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
158
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
159
159
|
}),
|
|
160
160
|
async (params) => callPersonalTokens(
|
|
161
161
|
await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/personal-tokens`)
|
|
@@ -163,7 +163,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
163
163
|
),
|
|
164
164
|
createPersonalToken: withSchema(
|
|
165
165
|
import_zod.z.object({
|
|
166
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
166
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
167
167
|
name: import_zod.z.string().describe("Token label"),
|
|
168
168
|
expiresAt: import_zod.z.string().datetime().optional().describe("Optional ISO expiry")
|
|
169
169
|
}),
|
|
@@ -180,7 +180,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
180
180
|
),
|
|
181
181
|
revokePersonalToken: withSchema(
|
|
182
182
|
import_zod.z.object({
|
|
183
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
183
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
184
184
|
tokenId: import_zod.z.string().describe("Personal token ID")
|
|
185
185
|
}),
|
|
186
186
|
async (params) => callPersonalTokens(
|
|
@@ -194,7 +194,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
194
194
|
),
|
|
195
195
|
listSsoExtras: withSchema(
|
|
196
196
|
import_zod.z.object({
|
|
197
|
-
id: import_zod.z.string().describe("Organization ID")
|
|
197
|
+
id: import_zod.z.string().describe("Organization ID or slug")
|
|
198
198
|
}),
|
|
199
199
|
async (params) => callPersonalTokens(
|
|
200
200
|
await personalTokensRequest(baseUrl, hcOpts, `/orgs/${params.id}/sso-extras`)
|
|
@@ -202,7 +202,7 @@ function createOrgsClient(cloud, baseUrl, hcOpts) {
|
|
|
202
202
|
),
|
|
203
203
|
setSsoForce: withSchema(
|
|
204
204
|
import_zod.z.object({
|
|
205
|
-
id: import_zod.z.string().describe("Organization ID"),
|
|
205
|
+
id: import_zod.z.string().describe("Organization ID or slug"),
|
|
206
206
|
providerId: import_zod.z.string().describe("SSO provider ID"),
|
|
207
207
|
forceSso: import_zod.z.boolean().describe("Force-SSO toggle for this provider")
|
|
208
208
|
}),
|
|
@@ -229,13 +229,13 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
229
229
|
return {
|
|
230
230
|
list: withSchema(
|
|
231
231
|
import_zod2.z.object({
|
|
232
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
232
|
+
orgId: import_zod2.z.string().describe("Organization slug")
|
|
233
233
|
}),
|
|
234
234
|
(params) => call(cloud.orgs[":orgId"].projects.$get({ param: params }))
|
|
235
235
|
),
|
|
236
236
|
create: withSchema(
|
|
237
237
|
import_zod2.z.object({
|
|
238
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
238
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
239
239
|
name: import_zod2.z.string().describe("Project name"),
|
|
240
240
|
slug: import_zod2.z.string().describe("URL slug (lowercase, hyphens only)")
|
|
241
241
|
}),
|
|
@@ -246,22 +246,22 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
246
246
|
),
|
|
247
247
|
get: withSchema(
|
|
248
248
|
import_zod2.z.object({
|
|
249
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
250
|
-
projectId: import_zod2.z.string().describe("Project
|
|
249
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
250
|
+
projectId: import_zod2.z.string().describe("Project name")
|
|
251
251
|
}),
|
|
252
252
|
(params) => call(cloud.orgs[":orgId"].projects[":projectId"].$get({ param: params }))
|
|
253
253
|
),
|
|
254
254
|
delete: withSchema(
|
|
255
255
|
import_zod2.z.object({
|
|
256
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
257
|
-
projectId: import_zod2.z.string().describe("Project
|
|
256
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
257
|
+
projectId: import_zod2.z.string().describe("Project name")
|
|
258
258
|
}),
|
|
259
259
|
(params) => call(cloud.orgs[":orgId"].projects[":projectId"].$delete({ param: params }))
|
|
260
260
|
),
|
|
261
261
|
update: withSchema(
|
|
262
262
|
import_zod2.z.object({
|
|
263
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
264
|
-
projectId: import_zod2.z.string().describe("Project
|
|
263
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
264
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
265
265
|
name: import_zod2.z.string().optional().describe("New project name"),
|
|
266
266
|
metadata: import_zod2.z.record(import_zod2.z.unknown()).optional().describe("Per-project UI settings")
|
|
267
267
|
}),
|
|
@@ -277,15 +277,15 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
277
277
|
),
|
|
278
278
|
listMembers: withSchema(
|
|
279
279
|
import_zod2.z.object({
|
|
280
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
281
|
-
projectId: import_zod2.z.string().describe("Project
|
|
280
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
281
|
+
projectId: import_zod2.z.string().describe("Project name")
|
|
282
282
|
}),
|
|
283
283
|
(params) => call(cloud.orgs[":orgId"].projects[":projectId"].members.$get({ param: params }))
|
|
284
284
|
),
|
|
285
285
|
addMember: withSchema(
|
|
286
286
|
import_zod2.z.object({
|
|
287
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
288
|
-
projectId: import_zod2.z.string().describe("Project
|
|
287
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
288
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
289
289
|
userId: import_zod2.z.string().describe("User ID"),
|
|
290
290
|
role: import_zod2.z.enum(["owner", "admin", "member", "viewer"]).optional().describe("Role (owner|admin|member|viewer)"),
|
|
291
291
|
envName: import_zod2.z.string().optional().describe("Optional env scope; omit for project-wide access")
|
|
@@ -302,8 +302,8 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
302
302
|
),
|
|
303
303
|
removeMember: withSchema(
|
|
304
304
|
import_zod2.z.object({
|
|
305
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
306
|
-
projectId: import_zod2.z.string().describe("Project
|
|
305
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
306
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
307
307
|
userId: import_zod2.z.string().describe("User ID")
|
|
308
308
|
}),
|
|
309
309
|
(params) => call(
|
|
@@ -314,8 +314,8 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
314
314
|
),
|
|
315
315
|
updateCellScopes: withSchema(
|
|
316
316
|
import_zod2.z.object({
|
|
317
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
318
|
-
projectId: import_zod2.z.string().describe("Project
|
|
317
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
318
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
319
319
|
userId: import_zod2.z.string().describe("User ID"),
|
|
320
320
|
cellScopes: import_zod2.z.union([import_zod2.z.array(import_zod2.z.string()), import_zod2.z.null()]).describe("null = all cells; array = restrict to listed cell-label values")
|
|
321
321
|
}),
|
|
@@ -331,8 +331,8 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
331
331
|
),
|
|
332
332
|
listTokens: withSchema(
|
|
333
333
|
import_zod2.z.object({
|
|
334
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
335
|
-
projectId: import_zod2.z.string().describe("Project
|
|
334
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
335
|
+
projectId: import_zod2.z.string().describe("Project name")
|
|
336
336
|
}),
|
|
337
337
|
(params) => call(
|
|
338
338
|
(0, import_client.hc)(
|
|
@@ -343,8 +343,8 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
343
343
|
),
|
|
344
344
|
createToken: withSchema(
|
|
345
345
|
import_zod2.z.object({
|
|
346
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
347
|
-
projectId: import_zod2.z.string().describe("Project
|
|
346
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
347
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
348
348
|
name: import_zod2.z.string().describe("Token name"),
|
|
349
349
|
role: import_zod2.z.enum(["owner", "admin", "member", "viewer"]).optional().describe("Role (owner|admin|member|viewer)"),
|
|
350
350
|
expiresAt: import_zod2.z.string().optional().describe("Expiry timestamp (ISO 8601)"),
|
|
@@ -365,8 +365,8 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
365
365
|
),
|
|
366
366
|
revokeToken: withSchema(
|
|
367
367
|
import_zod2.z.object({
|
|
368
|
-
orgId: import_zod2.z.string().describe("Organization
|
|
369
|
-
projectId: import_zod2.z.string().describe("Project
|
|
368
|
+
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
369
|
+
projectId: import_zod2.z.string().describe("Project name"),
|
|
370
370
|
tokenId: import_zod2.z.string().describe("Token ID")
|
|
371
371
|
}),
|
|
372
372
|
(params) => call(
|
|
@@ -385,7 +385,7 @@ function createProjectsClient(cloud, baseUrl, hcOpts) {
|
|
|
385
385
|
nuke: withSchema(
|
|
386
386
|
import_zod2.z.object({
|
|
387
387
|
orgId: import_zod2.z.string().describe("Organization slug"),
|
|
388
|
-
projectId: import_zod2.z.string().describe("Project
|
|
388
|
+
projectId: import_zod2.z.string().describe("Project name to nuke")
|
|
389
389
|
}),
|
|
390
390
|
async (params) => {
|
|
391
391
|
const url = `${baseUrl}/${encodeURIComponent(params.orgId)}/${encodeURIComponent(params.projectId)}/nuke`;
|
|
@@ -419,14 +419,14 @@ function createEntityTypesClient(proj) {
|
|
|
419
419
|
list: withSchema(
|
|
420
420
|
import_zod3.z.object({
|
|
421
421
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
422
|
-
projectId: import_zod3.z.string().describe("Project
|
|
422
|
+
projectId: import_zod3.z.string().describe("Project name")
|
|
423
423
|
}),
|
|
424
424
|
(params) => call(proj(params.orgId, params.projectId)["entity-types"].$get())
|
|
425
425
|
),
|
|
426
426
|
get: withSchema(
|
|
427
427
|
import_zod3.z.object({
|
|
428
428
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
429
|
-
projectId: import_zod3.z.string().describe("Project
|
|
429
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
430
430
|
name: import_zod3.z.string().describe("Entity type name")
|
|
431
431
|
}),
|
|
432
432
|
(params) => call(proj(params.orgId, params.projectId)["entity-types"][":name"].$get({ param: { name: params.name } }))
|
|
@@ -434,7 +434,7 @@ function createEntityTypesClient(proj) {
|
|
|
434
434
|
create: withSchema(
|
|
435
435
|
import_types.EntityTypeSchema.extend({
|
|
436
436
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
437
|
-
projectId: import_zod3.z.string().describe("Project
|
|
437
|
+
projectId: import_zod3.z.string().describe("Project name")
|
|
438
438
|
}),
|
|
439
439
|
(params) => {
|
|
440
440
|
const { orgId, projectId, ...body } = params;
|
|
@@ -444,7 +444,7 @@ function createEntityTypesClient(proj) {
|
|
|
444
444
|
update: withSchema(
|
|
445
445
|
import_types.EntityTypeSchema.extend({
|
|
446
446
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
447
|
-
projectId: import_zod3.z.string().describe("Project
|
|
447
|
+
projectId: import_zod3.z.string().describe("Project name")
|
|
448
448
|
}),
|
|
449
449
|
(params) => {
|
|
450
450
|
const { orgId, projectId, ...body } = params;
|
|
@@ -456,7 +456,7 @@ function createEntityTypesClient(proj) {
|
|
|
456
456
|
delete: withSchema(
|
|
457
457
|
import_zod3.z.object({
|
|
458
458
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
459
|
-
projectId: import_zod3.z.string().describe("Project
|
|
459
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
460
460
|
name: import_zod3.z.string().describe("Entity type name")
|
|
461
461
|
}),
|
|
462
462
|
(params) => call(
|
|
@@ -470,11 +470,10 @@ function createEntitiesClient(projEnv) {
|
|
|
470
470
|
list: withSchema(
|
|
471
471
|
import_zod3.z.object({
|
|
472
472
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
473
|
-
projectId: import_zod3.z.string().describe("Project
|
|
473
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
474
474
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
475
475
|
entityType: import_zod3.z.string().optional().describe("Filter by entity type"),
|
|
476
476
|
state: import_zod3.z.string().optional().describe("Filter by state"),
|
|
477
|
-
pool: import_zod3.z.string().optional().describe("Filter by pool membership"),
|
|
478
477
|
limit: import_zod3.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)"),
|
|
479
478
|
cursor: import_zod3.z.string().optional().describe("Pagination cursor")
|
|
480
479
|
}),
|
|
@@ -488,16 +487,16 @@ function createEntitiesClient(projEnv) {
|
|
|
488
487
|
get: withSchema(
|
|
489
488
|
import_zod3.z.object({
|
|
490
489
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
491
|
-
projectId: import_zod3.z.string().describe("Project
|
|
490
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
492
491
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
493
|
-
|
|
492
|
+
name: import_zod3.z.string().describe("Entity name")
|
|
494
493
|
}),
|
|
495
|
-
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["entities"][":
|
|
494
|
+
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["entities"][":name"].$get({ param: { name: params.name } }))
|
|
496
495
|
),
|
|
497
496
|
create: withSchema(
|
|
498
497
|
import_types.EntitySchema.extend({
|
|
499
498
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
500
|
-
projectId: import_zod3.z.string().describe("Project
|
|
499
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
501
500
|
envName: import_zod3.z.string().describe("Environment name")
|
|
502
501
|
}),
|
|
503
502
|
(params) => {
|
|
@@ -508,28 +507,28 @@ function createEntitiesClient(projEnv) {
|
|
|
508
507
|
delete: withSchema(
|
|
509
508
|
import_zod3.z.object({
|
|
510
509
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
511
|
-
projectId: import_zod3.z.string().describe("Project
|
|
510
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
512
511
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
513
|
-
|
|
512
|
+
name: import_zod3.z.string().describe("Entity name")
|
|
514
513
|
}),
|
|
515
514
|
(params) => call(
|
|
516
|
-
projEnv(params.orgId, params.projectId, params.envName)["entities"][":
|
|
515
|
+
projEnv(params.orgId, params.projectId, params.envName)["entities"][":name"].$delete({ param: { name: params.name } })
|
|
517
516
|
)
|
|
518
517
|
),
|
|
519
518
|
setMetric: withSchema(
|
|
520
519
|
import_zod3.z.object({
|
|
521
520
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
522
|
-
projectId: import_zod3.z.string().describe("Project
|
|
521
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
523
522
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
524
|
-
|
|
523
|
+
name: import_zod3.z.string().describe("Entity name"),
|
|
525
524
|
metricName: import_zod3.z.string().describe("Metric name"),
|
|
526
525
|
value: import_zod3.z.number().describe("Metric value")
|
|
527
526
|
}),
|
|
528
527
|
(params) => {
|
|
529
|
-
const { orgId, projectId, envName,
|
|
528
|
+
const { orgId, projectId, envName, name, metricName, value } = params;
|
|
530
529
|
return call(
|
|
531
|
-
projEnv(orgId, projectId, envName)["entities"][":
|
|
532
|
-
param: {
|
|
530
|
+
projEnv(orgId, projectId, envName)["entities"][":name"]["metrics"][":metricName"].$put({
|
|
531
|
+
param: { name, metricName },
|
|
533
532
|
json: { value }
|
|
534
533
|
})
|
|
535
534
|
);
|
|
@@ -538,18 +537,18 @@ function createEntitiesClient(projEnv) {
|
|
|
538
537
|
trigger: withSchema(
|
|
539
538
|
import_zod3.z.object({
|
|
540
539
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
541
|
-
projectId: import_zod3.z.string().describe("Project
|
|
540
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
542
541
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
543
|
-
|
|
542
|
+
name: import_zod3.z.string().describe("Entity name"),
|
|
544
543
|
actionName: import_zod3.z.string().describe("Action name"),
|
|
545
544
|
parameters: import_zod3.z.record(import_zod3.z.unknown()).optional().describe("Action parameters as JSON"),
|
|
546
545
|
recommendations: import_zod3.z.record(import_zod3.z.string()).optional().describe("Recommendation selections as JSON")
|
|
547
546
|
}).describe("Trigger an instance-scope action on a single entity"),
|
|
548
547
|
(params) => {
|
|
549
|
-
const { orgId, projectId, envName,
|
|
548
|
+
const { orgId, projectId, envName, name, actionName, parameters, recommendations } = params;
|
|
550
549
|
return call(
|
|
551
|
-
projEnv(orgId, projectId, envName)["entities"][":
|
|
552
|
-
param: {
|
|
550
|
+
projEnv(orgId, projectId, envName)["entities"][":name"]["actions"][":actionName"].$post({
|
|
551
|
+
param: { name, actionName },
|
|
553
552
|
json: { parameters, recommendations }
|
|
554
553
|
})
|
|
555
554
|
);
|
|
@@ -558,24 +557,24 @@ function createEntitiesClient(projEnv) {
|
|
|
558
557
|
getMetrics: withSchema(
|
|
559
558
|
import_zod3.z.object({
|
|
560
559
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
561
|
-
projectId: import_zod3.z.string().describe("Project
|
|
560
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
562
561
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
563
|
-
|
|
562
|
+
name: import_zod3.z.string().describe("Entity name")
|
|
564
563
|
}),
|
|
565
|
-
(params) => call(projEnv(params.orgId, params.projectId, params.envName).entities[":
|
|
564
|
+
(params) => call(projEnv(params.orgId, params.projectId, params.envName).entities[":name"].metrics.$get({ param: { name: params.name } }))
|
|
566
565
|
),
|
|
567
566
|
getMetricsBatch: withSchema(
|
|
568
567
|
import_zod3.z.object({
|
|
569
568
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
570
|
-
projectId: import_zod3.z.string().describe("Project
|
|
569
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
571
570
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
572
|
-
|
|
571
|
+
names: import_zod3.z.array(import_zod3.z.string()).min(1).max(500).describe("Entity names to fetch metrics for (max 500)")
|
|
573
572
|
}),
|
|
574
573
|
(params) => {
|
|
575
|
-
const { orgId, projectId, envName,
|
|
574
|
+
const { orgId, projectId, envName, names } = params;
|
|
576
575
|
return call(
|
|
577
576
|
projEnv(orgId, projectId, envName).entities.metrics.$get({
|
|
578
|
-
query: {
|
|
577
|
+
query: { names: names.join(",") }
|
|
579
578
|
})
|
|
580
579
|
);
|
|
581
580
|
}
|
|
@@ -583,26 +582,26 @@ function createEntitiesClient(projEnv) {
|
|
|
583
582
|
getRelationships: withSchema(
|
|
584
583
|
import_zod3.z.object({
|
|
585
584
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
586
|
-
projectId: import_zod3.z.string().describe("Project
|
|
585
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
587
586
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
588
|
-
|
|
587
|
+
name: import_zod3.z.string().describe("Entity name")
|
|
589
588
|
}),
|
|
590
|
-
(params) => call(projEnv(params.orgId, params.projectId, params.envName).entities[":
|
|
589
|
+
(params) => call(projEnv(params.orgId, params.projectId, params.envName).entities[":name"].relationships.$get({ param: { name: params.name } }))
|
|
591
590
|
),
|
|
592
591
|
syncStamp: withSchema(
|
|
593
592
|
import_zod3.z.object({
|
|
594
593
|
orgId: import_zod3.z.string().describe("Organization slug"),
|
|
595
|
-
projectId: import_zod3.z.string().describe("Project
|
|
594
|
+
projectId: import_zod3.z.string().describe("Project name"),
|
|
596
595
|
envName: import_zod3.z.string().describe("Environment name"),
|
|
597
|
-
|
|
596
|
+
name: import_zod3.z.string().describe("Entity name"),
|
|
598
597
|
source: import_zod3.z.string().min(1).describe("Source-of-truth name (e.g. argo, k8s, aws)"),
|
|
599
598
|
observedAt: import_zod3.z.string().datetime().optional().describe("ISO-8601 observation timestamp; defaults to server time")
|
|
600
599
|
}),
|
|
601
600
|
(params) => {
|
|
602
|
-
const { orgId, projectId, envName,
|
|
601
|
+
const { orgId, projectId, envName, name, source, observedAt } = params;
|
|
603
602
|
return call(
|
|
604
|
-
projEnv(orgId, projectId, envName)["entities"][":
|
|
605
|
-
param: {
|
|
603
|
+
projEnv(orgId, projectId, envName)["entities"][":name"]["sync-stamp"].$post({
|
|
604
|
+
param: { name },
|
|
606
605
|
json: { source, observedAt }
|
|
607
606
|
})
|
|
608
607
|
);
|
|
@@ -780,14 +779,14 @@ function createRelationshipTypesClient(proj) {
|
|
|
780
779
|
list: withSchema(
|
|
781
780
|
import_zod6.z.object({
|
|
782
781
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
783
|
-
projectId: import_zod6.z.string().describe("Project
|
|
782
|
+
projectId: import_zod6.z.string().describe("Project name")
|
|
784
783
|
}),
|
|
785
784
|
(params) => call(proj(params.orgId, params.projectId)["relationship-types"].$get())
|
|
786
785
|
),
|
|
787
786
|
get: withSchema(
|
|
788
787
|
import_zod6.z.object({
|
|
789
788
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
790
|
-
projectId: import_zod6.z.string().describe("Project
|
|
789
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
791
790
|
name: import_zod6.z.string().describe("Relationship type name")
|
|
792
791
|
}),
|
|
793
792
|
(params) => call(
|
|
@@ -799,7 +798,7 @@ function createRelationshipTypesClient(proj) {
|
|
|
799
798
|
create: withSchema(
|
|
800
799
|
import_types4.RelationshipTypeSchema.extend({
|
|
801
800
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
802
|
-
projectId: import_zod6.z.string().describe("Project
|
|
801
|
+
projectId: import_zod6.z.string().describe("Project name")
|
|
803
802
|
}),
|
|
804
803
|
(params) => {
|
|
805
804
|
const { orgId, projectId, ...body } = params;
|
|
@@ -809,7 +808,7 @@ function createRelationshipTypesClient(proj) {
|
|
|
809
808
|
update: withSchema(
|
|
810
809
|
import_types4.RelationshipTypeSchema.extend({
|
|
811
810
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
812
|
-
projectId: import_zod6.z.string().describe("Project
|
|
811
|
+
projectId: import_zod6.z.string().describe("Project name")
|
|
813
812
|
}),
|
|
814
813
|
(params) => {
|
|
815
814
|
const { orgId, projectId, ...body } = params;
|
|
@@ -824,7 +823,7 @@ function createRelationshipTypesClient(proj) {
|
|
|
824
823
|
delete: withSchema(
|
|
825
824
|
import_zod6.z.object({
|
|
826
825
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
827
|
-
projectId: import_zod6.z.string().describe("Project
|
|
826
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
828
827
|
name: import_zod6.z.string().describe("Relationship type name")
|
|
829
828
|
}),
|
|
830
829
|
(params) => call(
|
|
@@ -840,14 +839,14 @@ function createRelationshipsClient(projEnv) {
|
|
|
840
839
|
list: withSchema(
|
|
841
840
|
import_zod6.z.object({
|
|
842
841
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
843
|
-
projectId: import_zod6.z.string().describe("Project
|
|
842
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
844
843
|
envName: import_zod6.z.string().describe("Environment name"),
|
|
845
844
|
relationshipType: import_zod6.z.string().optional().describe("Filter by relationship type"),
|
|
846
845
|
state: import_zod6.z.string().optional().describe("Filter by state"),
|
|
847
846
|
fromEntity: import_zod6.z.string().uuid().optional().describe("Filter by from-entity ID"),
|
|
848
847
|
toEntity: import_zod6.z.string().uuid().optional().describe("Filter by to-entity ID"),
|
|
849
|
-
|
|
850
|
-
|
|
848
|
+
fromEntityCell: import_zod6.z.string().optional().describe("Filter by from-entity cell membership"),
|
|
849
|
+
toEntityCell: import_zod6.z.string().optional().describe("Filter by to-entity cell membership"),
|
|
851
850
|
limit: import_zod6.z.coerce.number().int().min(1).max(100).optional().describe("Max results (1-100)")
|
|
852
851
|
}),
|
|
853
852
|
(params) => {
|
|
@@ -860,7 +859,7 @@ function createRelationshipsClient(projEnv) {
|
|
|
860
859
|
get: withSchema(
|
|
861
860
|
import_zod6.z.object({
|
|
862
861
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
863
|
-
projectId: import_zod6.z.string().describe("Project
|
|
862
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
864
863
|
envName: import_zod6.z.string().describe("Environment name"),
|
|
865
864
|
id: import_zod6.z.string().uuid().describe("Relationship ID")
|
|
866
865
|
}),
|
|
@@ -871,7 +870,7 @@ function createRelationshipsClient(projEnv) {
|
|
|
871
870
|
create: withSchema(
|
|
872
871
|
import_types4.RelationshipSchema.extend({
|
|
873
872
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
874
|
-
projectId: import_zod6.z.string().describe("Project
|
|
873
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
875
874
|
envName: import_zod6.z.string().describe("Environment name")
|
|
876
875
|
}),
|
|
877
876
|
(params) => {
|
|
@@ -882,7 +881,7 @@ function createRelationshipsClient(projEnv) {
|
|
|
882
881
|
delete: withSchema(
|
|
883
882
|
import_zod6.z.object({
|
|
884
883
|
orgId: import_zod6.z.string().describe("Organization slug"),
|
|
885
|
-
projectId: import_zod6.z.string().describe("Project
|
|
884
|
+
projectId: import_zod6.z.string().describe("Project name"),
|
|
886
885
|
envName: import_zod6.z.string().describe("Environment name"),
|
|
887
886
|
id: import_zod6.z.string().uuid().describe("Relationship ID")
|
|
888
887
|
}),
|
|
@@ -1100,14 +1099,18 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1100
1099
|
return {
|
|
1101
1100
|
connect: withSchema(
|
|
1102
1101
|
import_zod9.z.object({
|
|
1103
|
-
projectId: import_zod9.z.string().describe("Project
|
|
1102
|
+
projectId: import_zod9.z.string().describe("Project name")
|
|
1104
1103
|
}),
|
|
1104
|
+
// why: the install-url route has a "GitHub App not configured" branch
|
|
1105
|
+
// that returns a bare `new Response(...)` (see notConfiguredResponse in
|
|
1106
|
+
// @terrantula/github), which defeats Hono RPC JSON-body inference and
|
|
1107
|
+
// collapses the success type to `unknown`. The 200 body is { url }.
|
|
1105
1108
|
(params) => call(cloud.github["install-url"].$post({ json: params }))
|
|
1106
1109
|
),
|
|
1107
1110
|
installations: {
|
|
1108
1111
|
list: withSchema(
|
|
1109
1112
|
import_zod9.z.object({
|
|
1110
|
-
orgId: import_zod9.z.string().describe("Organization
|
|
1113
|
+
orgId: import_zod9.z.string().describe("Organization slug")
|
|
1111
1114
|
}),
|
|
1112
1115
|
(params) => call(cloud.github.installations.$get({ query: params }))
|
|
1113
1116
|
),
|
|
@@ -1133,17 +1136,20 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1133
1136
|
),
|
|
1134
1137
|
recover: withSchema(
|
|
1135
1138
|
import_zod9.z.object({
|
|
1136
|
-
orgId: import_zod9.z.string().describe("Organization
|
|
1139
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1137
1140
|
installationId: import_zod9.z.number().int().positive().describe("GitHub installation ID (from the GitHub install URL)")
|
|
1138
1141
|
}),
|
|
1142
|
+
// why: same bare-Response inference break as `connect` (the route's
|
|
1143
|
+
// not-configured branch returns `new Response(...)`), so the 200 body
|
|
1144
|
+
// type collapses to `unknown`. The success body is the claimed row.
|
|
1139
1145
|
(params) => call(cloud.github.installations.recover.$post({ json: params }))
|
|
1140
1146
|
)
|
|
1141
1147
|
},
|
|
1142
1148
|
projects: {
|
|
1143
1149
|
list: withSchema(
|
|
1144
1150
|
import_zod9.z.object({
|
|
1145
|
-
orgId: import_zod9.z.string().describe("Organization
|
|
1146
|
-
projectId: import_zod9.z.string().describe("Project
|
|
1151
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1152
|
+
projectId: import_zod9.z.string().describe("Project name")
|
|
1147
1153
|
}),
|
|
1148
1154
|
(params) => call(
|
|
1149
1155
|
cloud.orgs[":orgId"].projects[":projectId"]["github-repos"].$get({
|
|
@@ -1153,8 +1159,8 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1153
1159
|
),
|
|
1154
1160
|
linkRepo: withSchema(
|
|
1155
1161
|
import_zod9.z.object({
|
|
1156
|
-
orgId: import_zod9.z.string().describe("Organization
|
|
1157
|
-
projectId: import_zod9.z.string().describe("Project
|
|
1162
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1163
|
+
projectId: import_zod9.z.string().describe("Project name"),
|
|
1158
1164
|
installationId: import_zod9.z.string().describe("github_installations.id (UUID)"),
|
|
1159
1165
|
repoFullName: import_zod9.z.string().describe('GitHub repo "owner/name"')
|
|
1160
1166
|
}),
|
|
@@ -1170,8 +1176,8 @@ function createGithubClient(cloud, _baseUrl, _hcOpts) {
|
|
|
1170
1176
|
),
|
|
1171
1177
|
unlinkRepo: withSchema(
|
|
1172
1178
|
import_zod9.z.object({
|
|
1173
|
-
orgId: import_zod9.z.string().describe("Organization
|
|
1174
|
-
projectId: import_zod9.z.string().describe("Project
|
|
1179
|
+
orgId: import_zod9.z.string().describe("Organization slug"),
|
|
1180
|
+
projectId: import_zod9.z.string().describe("Project name"),
|
|
1175
1181
|
id: import_zod9.z.string().describe("project_github_repos.id (UUID) \u2014 returned by linkRepo")
|
|
1176
1182
|
}),
|
|
1177
1183
|
(params) => call(
|
|
@@ -1337,7 +1343,7 @@ function createAuditEventsClient(proj) {
|
|
|
1337
1343
|
list: withSchema(
|
|
1338
1344
|
import_zod13.z.object({
|
|
1339
1345
|
orgId: import_zod13.z.string().describe("Organization slug"),
|
|
1340
|
-
projectId: import_zod13.z.string().describe("Project
|
|
1346
|
+
projectId: import_zod13.z.string().describe("Project name"),
|
|
1341
1347
|
envName: import_zod13.z.string().optional().describe("Filter to a single env"),
|
|
1342
1348
|
actorType: import_zod13.z.enum(["user", "token"]).optional().describe("Filter by actor type"),
|
|
1343
1349
|
actorId: import_zod13.z.string().optional().describe("Filter by actor (user.id or apikey.id)"),
|
|
@@ -1361,14 +1367,14 @@ function createEnvironmentsClient(proj) {
|
|
|
1361
1367
|
list: withSchema(
|
|
1362
1368
|
import_zod14.z.object({
|
|
1363
1369
|
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1364
|
-
projectId: import_zod14.z.string().describe("Project
|
|
1370
|
+
projectId: import_zod14.z.string().describe("Project name")
|
|
1365
1371
|
}),
|
|
1366
1372
|
(params) => call(proj(params.orgId, params.projectId)["environments"].$get())
|
|
1367
1373
|
),
|
|
1368
1374
|
create: withSchema(
|
|
1369
1375
|
import_zod14.z.object({
|
|
1370
1376
|
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1371
|
-
projectId: import_zod14.z.string().describe("Project
|
|
1377
|
+
projectId: import_zod14.z.string().describe("Project name"),
|
|
1372
1378
|
name: import_zod14.z.string().min(1).max(31).regex(/^[a-z0-9][a-z0-9-]{0,30}$/).describe("Environment name (lowercase letters, digits, hyphens; max 31 chars)")
|
|
1373
1379
|
}),
|
|
1374
1380
|
(params) => {
|
|
@@ -1379,7 +1385,7 @@ function createEnvironmentsClient(proj) {
|
|
|
1379
1385
|
delete: withSchema(
|
|
1380
1386
|
import_zod14.z.object({
|
|
1381
1387
|
orgId: import_zod14.z.string().describe("Organization slug"),
|
|
1382
|
-
projectId: import_zod14.z.string().describe("Project
|
|
1388
|
+
projectId: import_zod14.z.string().describe("Project name"),
|
|
1383
1389
|
name: import_zod14.z.string().describe("Environment name")
|
|
1384
1390
|
}),
|
|
1385
1391
|
(params) => call(
|
|
@@ -1398,11 +1404,11 @@ function createDriftEventsClient(projEnv) {
|
|
|
1398
1404
|
list: withSchema(
|
|
1399
1405
|
import_zod15.z.object({
|
|
1400
1406
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1401
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1407
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1402
1408
|
envName: import_zod15.z.string().describe("Environment name"),
|
|
1403
1409
|
status: import_zod15.z.enum(["open", "accepted", "reapplied", "snoozed"]).optional(),
|
|
1404
1410
|
kind: import_zod15.z.string().optional().describe("Filter by entity type name"),
|
|
1405
|
-
|
|
1411
|
+
entityName: import_zod15.z.string().optional().describe("Filter by entity name"),
|
|
1406
1412
|
since: import_zod15.z.string().optional().describe("ISO timestamp lower bound on detectedAt"),
|
|
1407
1413
|
limit: import_zod15.z.coerce.number().int().min(1).max(500).optional()
|
|
1408
1414
|
}),
|
|
@@ -1416,7 +1422,7 @@ function createDriftEventsClient(projEnv) {
|
|
|
1416
1422
|
count: withSchema(
|
|
1417
1423
|
import_zod15.z.object({
|
|
1418
1424
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1419
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1425
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1420
1426
|
envName: import_zod15.z.string().describe("Environment name")
|
|
1421
1427
|
}),
|
|
1422
1428
|
(params) => call(projEnv(params.orgId, params.projectId, params.envName)["drift-events"].count.$get())
|
|
@@ -1424,7 +1430,7 @@ function createDriftEventsClient(projEnv) {
|
|
|
1424
1430
|
get: withSchema(
|
|
1425
1431
|
import_zod15.z.object({
|
|
1426
1432
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1427
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1433
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1428
1434
|
envName: import_zod15.z.string().describe("Environment name"),
|
|
1429
1435
|
id: import_zod15.z.string().uuid()
|
|
1430
1436
|
}),
|
|
@@ -1437,7 +1443,7 @@ function createDriftEventsClient(projEnv) {
|
|
|
1437
1443
|
accept: withSchema(
|
|
1438
1444
|
import_zod15.z.object({
|
|
1439
1445
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1440
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1446
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1441
1447
|
envName: import_zod15.z.string().describe("Environment name"),
|
|
1442
1448
|
id: import_zod15.z.string().uuid()
|
|
1443
1449
|
}),
|
|
@@ -1450,7 +1456,7 @@ function createDriftEventsClient(projEnv) {
|
|
|
1450
1456
|
reapply: withSchema(
|
|
1451
1457
|
import_zod15.z.object({
|
|
1452
1458
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1453
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1459
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1454
1460
|
envName: import_zod15.z.string().describe("Environment name"),
|
|
1455
1461
|
id: import_zod15.z.string().uuid()
|
|
1456
1462
|
}),
|
|
@@ -1463,7 +1469,7 @@ function createDriftEventsClient(projEnv) {
|
|
|
1463
1469
|
snooze: withSchema(
|
|
1464
1470
|
import_zod15.z.object({
|
|
1465
1471
|
orgId: import_zod15.z.string().describe("Organization slug"),
|
|
1466
|
-
projectId: import_zod15.z.string().describe("Project
|
|
1472
|
+
projectId: import_zod15.z.string().describe("Project name"),
|
|
1467
1473
|
envName: import_zod15.z.string().describe("Environment name"),
|
|
1468
1474
|
id: import_zod15.z.string().uuid(),
|
|
1469
1475
|
untilSeconds: import_zod15.z.number().int().positive().optional()
|
|
@@ -1487,7 +1493,7 @@ function createStatsClient(proj) {
|
|
|
1487
1493
|
entitiesByState: withSchema(
|
|
1488
1494
|
import_zod16.z.object({
|
|
1489
1495
|
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1490
|
-
projectId: import_zod16.z.string().describe("Project
|
|
1496
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1491
1497
|
window: WindowSchema,
|
|
1492
1498
|
bucket: BucketSchema
|
|
1493
1499
|
}),
|
|
@@ -1499,7 +1505,7 @@ function createStatsClient(proj) {
|
|
|
1499
1505
|
runsByType: withSchema(
|
|
1500
1506
|
import_zod16.z.object({
|
|
1501
1507
|
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1502
|
-
projectId: import_zod16.z.string().describe("Project
|
|
1508
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1503
1509
|
window: WindowSchema
|
|
1504
1510
|
}),
|
|
1505
1511
|
(params) => {
|
|
@@ -1510,7 +1516,7 @@ function createStatsClient(proj) {
|
|
|
1510
1516
|
failingKinds: withSchema(
|
|
1511
1517
|
import_zod16.z.object({
|
|
1512
1518
|
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1513
|
-
projectId: import_zod16.z.string().describe("Project
|
|
1519
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1514
1520
|
window: WindowSchema
|
|
1515
1521
|
}),
|
|
1516
1522
|
(params) => {
|
|
@@ -1521,7 +1527,7 @@ function createStatsClient(proj) {
|
|
|
1521
1527
|
driftDensity: withSchema(
|
|
1522
1528
|
import_zod16.z.object({
|
|
1523
1529
|
orgId: import_zod16.z.string().describe("Organization slug"),
|
|
1524
|
-
projectId: import_zod16.z.string().describe("Project
|
|
1530
|
+
projectId: import_zod16.z.string().describe("Project name"),
|
|
1525
1531
|
dim: import_zod16.z.string().optional().describe('Dimensions to bucket \u2014 e.g. "kind,cell"')
|
|
1526
1532
|
}),
|
|
1527
1533
|
(params) => {
|
|
@@ -1738,11 +1744,19 @@ function createUserPreferencesClient(baseUrl, hcOpts) {
|
|
|
1738
1744
|
);
|
|
1739
1745
|
return {
|
|
1740
1746
|
get: (key) => call(c[":key"].$get({ param: { key } })),
|
|
1741
|
-
set: (key, value) =>
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1747
|
+
set: (key, value) => (
|
|
1748
|
+
// why: PUT /:key reads the body via c.req.text() (it enforces a 64KB cap
|
|
1749
|
+
// before parsing JSON), so it has no zValidator('json') and the Hono RPC
|
|
1750
|
+
// type doesn't surface a `json` arg. The route does accept a JSON body —
|
|
1751
|
+
// the cast restores the real wire shape the server expects. Switching the
|
|
1752
|
+
// route to zValidator would parse before the size check and break the
|
|
1753
|
+
// 64KB-limit guard, so the fix belongs here.
|
|
1754
|
+
call(
|
|
1755
|
+
c[":key"].$put({
|
|
1756
|
+
param: { key },
|
|
1757
|
+
json: { value }
|
|
1758
|
+
})
|
|
1759
|
+
)
|
|
1746
1760
|
),
|
|
1747
1761
|
delete: (key) => call(c[":key"].$delete({ param: { key } }))
|
|
1748
1762
|
};
|