pgbeam 0.4.15 → 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{operations-map.gen-e0d1rskl.d.ts → operations-map.gen-cib1n45s.d.ts} +691 -4
- package/dist/{operations-map.gen-cr323vpc.js → operations-map.gen-gmrf5uyf.js} +45 -0
- package/dist/{operations-map.gen-mwk22v4l.cjs → operations-map.gen-j3jalb8e.cjs} +45 -0
- package/dist/operations.cjs +164 -1
- package/dist/operations.d.cts +1 -1
- package/dist/operations.d.mts +1 -1
- package/dist/operations.mjs +164 -1
- package/package.json +4 -4
|
@@ -132,6 +132,26 @@
|
|
|
132
132
|
updateAnomalyAlert: {
|
|
133
133
|
method: "PATCH",
|
|
134
134
|
path: "/v1/projects/{project_id}/anomalies/{anomaly_id}"
|
|
135
|
+
},
|
|
136
|
+
listAnomalyRules: {
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: "/v1/projects/{project_id}/anomaly-rules"
|
|
139
|
+
},
|
|
140
|
+
createAnomalyRule: {
|
|
141
|
+
method: "POST",
|
|
142
|
+
path: "/v1/projects/{project_id}/anomaly-rules"
|
|
143
|
+
},
|
|
144
|
+
getAnomalyRule: {
|
|
145
|
+
method: "GET",
|
|
146
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
147
|
+
},
|
|
148
|
+
updateAnomalyRule: {
|
|
149
|
+
method: "PUT",
|
|
150
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
151
|
+
},
|
|
152
|
+
deleteAnomalyRule: {
|
|
153
|
+
method: "DELETE",
|
|
154
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
135
155
|
}
|
|
136
156
|
},
|
|
137
157
|
approvals: {
|
|
@@ -496,6 +516,31 @@ const operationsByPath = {
|
|
|
496
516
|
path: "/v1/projects/{project_id}/anomalies/{anomaly_id}",
|
|
497
517
|
operationId: "updateAnomalyAlert"
|
|
498
518
|
},
|
|
519
|
+
"GET /v1/projects/{project_id}/anomaly-rules": {
|
|
520
|
+
method: "GET",
|
|
521
|
+
path: "/v1/projects/{project_id}/anomaly-rules",
|
|
522
|
+
operationId: "listAnomalyRules"
|
|
523
|
+
},
|
|
524
|
+
"POST /v1/projects/{project_id}/anomaly-rules": {
|
|
525
|
+
method: "POST",
|
|
526
|
+
path: "/v1/projects/{project_id}/anomaly-rules",
|
|
527
|
+
operationId: "createAnomalyRule"
|
|
528
|
+
},
|
|
529
|
+
"GET /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
530
|
+
method: "GET",
|
|
531
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
532
|
+
operationId: "getAnomalyRule"
|
|
533
|
+
},
|
|
534
|
+
"PUT /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
535
|
+
method: "PUT",
|
|
536
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
537
|
+
operationId: "updateAnomalyRule"
|
|
538
|
+
},
|
|
539
|
+
"DELETE /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
540
|
+
method: "DELETE",
|
|
541
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
542
|
+
operationId: "deleteAnomalyRule"
|
|
543
|
+
},
|
|
499
544
|
"GET /v1/projects/{project_id}/approvals": {
|
|
500
545
|
method: "GET",
|
|
501
546
|
path: "/v1/projects/{project_id}/approvals",
|
|
@@ -132,6 +132,26 @@
|
|
|
132
132
|
updateAnomalyAlert: {
|
|
133
133
|
method: "PATCH",
|
|
134
134
|
path: "/v1/projects/{project_id}/anomalies/{anomaly_id}"
|
|
135
|
+
},
|
|
136
|
+
listAnomalyRules: {
|
|
137
|
+
method: "GET",
|
|
138
|
+
path: "/v1/projects/{project_id}/anomaly-rules"
|
|
139
|
+
},
|
|
140
|
+
createAnomalyRule: {
|
|
141
|
+
method: "POST",
|
|
142
|
+
path: "/v1/projects/{project_id}/anomaly-rules"
|
|
143
|
+
},
|
|
144
|
+
getAnomalyRule: {
|
|
145
|
+
method: "GET",
|
|
146
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
147
|
+
},
|
|
148
|
+
updateAnomalyRule: {
|
|
149
|
+
method: "PUT",
|
|
150
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
151
|
+
},
|
|
152
|
+
deleteAnomalyRule: {
|
|
153
|
+
method: "DELETE",
|
|
154
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}"
|
|
135
155
|
}
|
|
136
156
|
},
|
|
137
157
|
approvals: {
|
|
@@ -496,6 +516,31 @@ const operationsByPath = {
|
|
|
496
516
|
path: "/v1/projects/{project_id}/anomalies/{anomaly_id}",
|
|
497
517
|
operationId: "updateAnomalyAlert"
|
|
498
518
|
},
|
|
519
|
+
"GET /v1/projects/{project_id}/anomaly-rules": {
|
|
520
|
+
method: "GET",
|
|
521
|
+
path: "/v1/projects/{project_id}/anomaly-rules",
|
|
522
|
+
operationId: "listAnomalyRules"
|
|
523
|
+
},
|
|
524
|
+
"POST /v1/projects/{project_id}/anomaly-rules": {
|
|
525
|
+
method: "POST",
|
|
526
|
+
path: "/v1/projects/{project_id}/anomaly-rules",
|
|
527
|
+
operationId: "createAnomalyRule"
|
|
528
|
+
},
|
|
529
|
+
"GET /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
530
|
+
method: "GET",
|
|
531
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
532
|
+
operationId: "getAnomalyRule"
|
|
533
|
+
},
|
|
534
|
+
"PUT /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
535
|
+
method: "PUT",
|
|
536
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
537
|
+
operationId: "updateAnomalyRule"
|
|
538
|
+
},
|
|
539
|
+
"DELETE /v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}": {
|
|
540
|
+
method: "DELETE",
|
|
541
|
+
path: "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
542
|
+
operationId: "deleteAnomalyRule"
|
|
543
|
+
},
|
|
499
544
|
"GET /v1/projects/{project_id}/approvals": {
|
|
500
545
|
method: "GET",
|
|
501
546
|
path: "/v1/projects/{project_id}/approvals",
|
package/dist/operations.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
2
|
|
|
3
|
-
var operationsMap_gen = require('./operations-map.gen-
|
|
3
|
+
var operationsMap_gen = require('./operations-map.gen-j3jalb8e.cjs');
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
|
@@ -329,6 +329,169 @@ var operationsMap_gen = require('./operations-map.gen-mwk22v4l.cjs');
|
|
|
329
329
|
"responseType": "{ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string }",
|
|
330
330
|
"responseStatus": "200"
|
|
331
331
|
},
|
|
332
|
+
"listAnomalyRules": {
|
|
333
|
+
"operationId": "listAnomalyRules",
|
|
334
|
+
"method": "GET",
|
|
335
|
+
"path": "/v1/projects/{project_id}/anomaly-rules",
|
|
336
|
+
"summary": "List anomaly rules",
|
|
337
|
+
"description": "Lists the project's anomaly rules, including silenced ones.",
|
|
338
|
+
"parameters": [
|
|
339
|
+
{
|
|
340
|
+
"name": "project_id",
|
|
341
|
+
"in": "path",
|
|
342
|
+
"required": true,
|
|
343
|
+
"type": "string",
|
|
344
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"name": "page_size",
|
|
348
|
+
"in": "query",
|
|
349
|
+
"required": false,
|
|
350
|
+
"type": "number",
|
|
351
|
+
"description": "Maximum number of items to return (1-100, default 20)."
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
"name": "page_token",
|
|
355
|
+
"in": "query",
|
|
356
|
+
"required": false,
|
|
357
|
+
"type": "string",
|
|
358
|
+
"description": "Opaque token for cursor-based pagination."
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
"name": "If-None-Match",
|
|
362
|
+
"in": "header",
|
|
363
|
+
"required": false,
|
|
364
|
+
"type": "string",
|
|
365
|
+
"description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
"requestBodyType": "",
|
|
369
|
+
"requestBodyRequired": false,
|
|
370
|
+
"responseType": "{ anomaly_rules: ({ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string })[]; next_page_token?: string }",
|
|
371
|
+
"responseStatus": "200"
|
|
372
|
+
},
|
|
373
|
+
"createAnomalyRule": {
|
|
374
|
+
"operationId": "createAnomalyRule",
|
|
375
|
+
"method": "POST",
|
|
376
|
+
"path": "/v1/projects/{project_id}/anomaly-rules",
|
|
377
|
+
"summary": "Create an anomaly rule",
|
|
378
|
+
"description": "Retunes one detection metric for this project, or for one agent credential\nin it. Without a rule every metric resolves to the deployment default.\n\nA rule adds no detection algorithm and no alert kind: it changes how\nsensitive one of the five existing metrics is. enabled=false silences that\nmetric for that scope; the baseline keeps advancing, so re-enabling\nresumes from the existing history rather than a cold warm-up.\n",
|
|
379
|
+
"parameters": [
|
|
380
|
+
{
|
|
381
|
+
"name": "project_id",
|
|
382
|
+
"in": "path",
|
|
383
|
+
"required": true,
|
|
384
|
+
"type": "string",
|
|
385
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "Idempotency-Key",
|
|
389
|
+
"in": "header",
|
|
390
|
+
"required": false,
|
|
391
|
+
"type": "string",
|
|
392
|
+
"description": "Client-generated key that makes a retry of this request safe. The first request carrying a given key executes normally and its response (status, content type and body) is stored for 24 hours; a later request with the same key returns that stored response without running the operation again, so a retry after a lost or timed-out response cannot create a second resource.\n\nReusing a key with a different request body returns `409 Conflict`: a key is a promise about one specific request, so a changed body is a client bug rather than a retry. Keys are scoped to the calling organization (or to the user, for account-scoped tokens), so one tenant can never read another's stored response.\n\nA `5xx`, `408` or `429` is never stored, because those describe a request that produced no settled answer and the next attempt with the same key must run for real. A `4xx` is stored: it is the server's settled answer about this exact request.\n\nUse a fresh UUID per logical operation. The PgBeam SDKs generate one per call and reuse it across their own automatic retries."
|
|
393
|
+
}
|
|
394
|
+
],
|
|
395
|
+
"requestBodyType": "{ credential_id?: string; enabled?: boolean; floor?: number; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; sigma_threshold?: number }",
|
|
396
|
+
"requestBodyRequired": true,
|
|
397
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
398
|
+
"responseStatus": "201"
|
|
399
|
+
},
|
|
400
|
+
"getAnomalyRule": {
|
|
401
|
+
"operationId": "getAnomalyRule",
|
|
402
|
+
"method": "GET",
|
|
403
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
404
|
+
"summary": "Get an anomaly rule",
|
|
405
|
+
"description": "Returns a single anomaly rule by ID.",
|
|
406
|
+
"parameters": [
|
|
407
|
+
{
|
|
408
|
+
"name": "project_id",
|
|
409
|
+
"in": "path",
|
|
410
|
+
"required": true,
|
|
411
|
+
"type": "string",
|
|
412
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
413
|
+
},
|
|
414
|
+
{
|
|
415
|
+
"name": "anomaly_rule_id",
|
|
416
|
+
"in": "path",
|
|
417
|
+
"required": true,
|
|
418
|
+
"type": "string",
|
|
419
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "If-None-Match",
|
|
423
|
+
"in": "header",
|
|
424
|
+
"required": false,
|
|
425
|
+
"type": "string",
|
|
426
|
+
"description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
|
|
427
|
+
}
|
|
428
|
+
],
|
|
429
|
+
"requestBodyType": "",
|
|
430
|
+
"requestBodyRequired": false,
|
|
431
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
432
|
+
"responseStatus": "200"
|
|
433
|
+
},
|
|
434
|
+
"updateAnomalyRule": {
|
|
435
|
+
"operationId": "updateAnomalyRule",
|
|
436
|
+
"method": "PUT",
|
|
437
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
438
|
+
"summary": "Update an anomaly rule",
|
|
439
|
+
"description": "Replaces the rule's scope, metric and sensitivity. A rule whose enabled\nflag is turned off silences its metric for its scope rather than being\ndeactivated.\n",
|
|
440
|
+
"parameters": [
|
|
441
|
+
{
|
|
442
|
+
"name": "project_id",
|
|
443
|
+
"in": "path",
|
|
444
|
+
"required": true,
|
|
445
|
+
"type": "string",
|
|
446
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"name": "anomaly_rule_id",
|
|
450
|
+
"in": "path",
|
|
451
|
+
"required": true,
|
|
452
|
+
"type": "string",
|
|
453
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"name": "If-Match",
|
|
457
|
+
"in": "header",
|
|
458
|
+
"required": false,
|
|
459
|
+
"type": "string",
|
|
460
|
+
"description": "Entity tag the write is based on, taken from the `ETag` of the read that produced the values being sent. The write proceeds only if it still matches the current representation; otherwise it is refused with `412 Precondition Failed` and nothing is changed.\n\nThis is what makes a read-modify-write safe. Without it the last writer wins and a concurrent edit is silently discarded, which is the failure an agent is most likely to cause and least likely to notice. The `412` response carries the current `ETag`, so a caller can re-read, re-apply its change and retry.\n\nOmitting the header keeps the old unconditional behaviour. `*` matches any current representation, which asserts only that the resource exists."
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"requestBodyType": "{ credential_id?: string; enabled?: boolean; floor?: number; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; sigma_threshold?: number }",
|
|
464
|
+
"requestBodyRequired": true,
|
|
465
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
466
|
+
"responseStatus": "200"
|
|
467
|
+
},
|
|
468
|
+
"deleteAnomalyRule": {
|
|
469
|
+
"operationId": "deleteAnomalyRule",
|
|
470
|
+
"method": "DELETE",
|
|
471
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
472
|
+
"summary": "Delete an anomaly rule",
|
|
473
|
+
"description": "Removes the rule, so its metric returns to the deployment default for that\nscope. Deleting a rule that was silencing a metric turns that metric's\nalerts back on.\n",
|
|
474
|
+
"parameters": [
|
|
475
|
+
{
|
|
476
|
+
"name": "project_id",
|
|
477
|
+
"in": "path",
|
|
478
|
+
"required": true,
|
|
479
|
+
"type": "string",
|
|
480
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "anomaly_rule_id",
|
|
484
|
+
"in": "path",
|
|
485
|
+
"required": true,
|
|
486
|
+
"type": "string",
|
|
487
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
488
|
+
}
|
|
489
|
+
],
|
|
490
|
+
"requestBodyType": "",
|
|
491
|
+
"requestBodyRequired": false,
|
|
492
|
+
"responseType": "",
|
|
493
|
+
"responseStatus": "204"
|
|
494
|
+
},
|
|
332
495
|
"listApprovalRequests": {
|
|
333
496
|
"operationId": "listApprovalRequests",
|
|
334
497
|
"method": "GET",
|
package/dist/operations.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { z0 as ApiOperations, z1 as ApiTag, z2 as RequestMap, z3 as Route, z4 as operationsByPath, z5 as operationsByTag } from './operations-map.gen-cib1n45s.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { z0 as ApiOperations, z1 as ApiTag, z2 as RequestMap, z3 as Route, z4 as operationsByPath, z5 as operationsByTag } from './operations-map.gen-cib1n45s.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
package/dist/operations.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-
|
|
1
|
+
export { o as operationsByPath, a as operationsByTag } from './operations-map.gen-gmrf5uyf.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Generated by generate-sdk-ts-maps.ts from backend/openapi/bundles/public.yaml — do not edit manually.
|
|
@@ -327,6 +327,169 @@ export { o as operationsByPath, a as operationsByTag } from './operations-map.ge
|
|
|
327
327
|
"responseType": "{ acknowledged_at?: string; acknowledged_by?: string; created_at: string; credential_id?: string; details?: Record<string, unknown>; id: string; kind: string; project_id: string; severity: \"info\" | \"warning\" | \"critical\"; status: \"open\" | \"acknowledged\" | \"resolved\"; title: string; window_end?: string; window_start?: string }",
|
|
328
328
|
"responseStatus": "200"
|
|
329
329
|
},
|
|
330
|
+
"listAnomalyRules": {
|
|
331
|
+
"operationId": "listAnomalyRules",
|
|
332
|
+
"method": "GET",
|
|
333
|
+
"path": "/v1/projects/{project_id}/anomaly-rules",
|
|
334
|
+
"summary": "List anomaly rules",
|
|
335
|
+
"description": "Lists the project's anomaly rules, including silenced ones.",
|
|
336
|
+
"parameters": [
|
|
337
|
+
{
|
|
338
|
+
"name": "project_id",
|
|
339
|
+
"in": "path",
|
|
340
|
+
"required": true,
|
|
341
|
+
"type": "string",
|
|
342
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
"name": "page_size",
|
|
346
|
+
"in": "query",
|
|
347
|
+
"required": false,
|
|
348
|
+
"type": "number",
|
|
349
|
+
"description": "Maximum number of items to return (1-100, default 20)."
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "page_token",
|
|
353
|
+
"in": "query",
|
|
354
|
+
"required": false,
|
|
355
|
+
"type": "string",
|
|
356
|
+
"description": "Opaque token for cursor-based pagination."
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
"name": "If-None-Match",
|
|
360
|
+
"in": "header",
|
|
361
|
+
"required": false,
|
|
362
|
+
"type": "string",
|
|
363
|
+
"description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
|
|
364
|
+
}
|
|
365
|
+
],
|
|
366
|
+
"requestBodyType": "",
|
|
367
|
+
"requestBodyRequired": false,
|
|
368
|
+
"responseType": "{ anomaly_rules: ({ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string })[]; next_page_token?: string }",
|
|
369
|
+
"responseStatus": "200"
|
|
370
|
+
},
|
|
371
|
+
"createAnomalyRule": {
|
|
372
|
+
"operationId": "createAnomalyRule",
|
|
373
|
+
"method": "POST",
|
|
374
|
+
"path": "/v1/projects/{project_id}/anomaly-rules",
|
|
375
|
+
"summary": "Create an anomaly rule",
|
|
376
|
+
"description": "Retunes one detection metric for this project, or for one agent credential\nin it. Without a rule every metric resolves to the deployment default.\n\nA rule adds no detection algorithm and no alert kind: it changes how\nsensitive one of the five existing metrics is. enabled=false silences that\nmetric for that scope; the baseline keeps advancing, so re-enabling\nresumes from the existing history rather than a cold warm-up.\n",
|
|
377
|
+
"parameters": [
|
|
378
|
+
{
|
|
379
|
+
"name": "project_id",
|
|
380
|
+
"in": "path",
|
|
381
|
+
"required": true,
|
|
382
|
+
"type": "string",
|
|
383
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
384
|
+
},
|
|
385
|
+
{
|
|
386
|
+
"name": "Idempotency-Key",
|
|
387
|
+
"in": "header",
|
|
388
|
+
"required": false,
|
|
389
|
+
"type": "string",
|
|
390
|
+
"description": "Client-generated key that makes a retry of this request safe. The first request carrying a given key executes normally and its response (status, content type and body) is stored for 24 hours; a later request with the same key returns that stored response without running the operation again, so a retry after a lost or timed-out response cannot create a second resource.\n\nReusing a key with a different request body returns `409 Conflict`: a key is a promise about one specific request, so a changed body is a client bug rather than a retry. Keys are scoped to the calling organization (or to the user, for account-scoped tokens), so one tenant can never read another's stored response.\n\nA `5xx`, `408` or `429` is never stored, because those describe a request that produced no settled answer and the next attempt with the same key must run for real. A `4xx` is stored: it is the server's settled answer about this exact request.\n\nUse a fresh UUID per logical operation. The PgBeam SDKs generate one per call and reuse it across their own automatic retries."
|
|
391
|
+
}
|
|
392
|
+
],
|
|
393
|
+
"requestBodyType": "{ credential_id?: string; enabled?: boolean; floor?: number; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; sigma_threshold?: number }",
|
|
394
|
+
"requestBodyRequired": true,
|
|
395
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
396
|
+
"responseStatus": "201"
|
|
397
|
+
},
|
|
398
|
+
"getAnomalyRule": {
|
|
399
|
+
"operationId": "getAnomalyRule",
|
|
400
|
+
"method": "GET",
|
|
401
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
402
|
+
"summary": "Get an anomaly rule",
|
|
403
|
+
"description": "Returns a single anomaly rule by ID.",
|
|
404
|
+
"parameters": [
|
|
405
|
+
{
|
|
406
|
+
"name": "project_id",
|
|
407
|
+
"in": "path",
|
|
408
|
+
"required": true,
|
|
409
|
+
"type": "string",
|
|
410
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"name": "anomaly_rule_id",
|
|
414
|
+
"in": "path",
|
|
415
|
+
"required": true,
|
|
416
|
+
"type": "string",
|
|
417
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"name": "If-None-Match",
|
|
421
|
+
"in": "header",
|
|
422
|
+
"required": false,
|
|
423
|
+
"type": "string",
|
|
424
|
+
"description": "Entity tag the client already holds, taken from the `ETag` of an earlier response. When it still matches the current representation the server answers `304 Not Modified` with no body, so a poll that finds nothing changed costs a round trip rather than a transfer.\n\nA comma-separated list is accepted, and `*` matches any current representation."
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"requestBodyType": "",
|
|
428
|
+
"requestBodyRequired": false,
|
|
429
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
430
|
+
"responseStatus": "200"
|
|
431
|
+
},
|
|
432
|
+
"updateAnomalyRule": {
|
|
433
|
+
"operationId": "updateAnomalyRule",
|
|
434
|
+
"method": "PUT",
|
|
435
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
436
|
+
"summary": "Update an anomaly rule",
|
|
437
|
+
"description": "Replaces the rule's scope, metric and sensitivity. A rule whose enabled\nflag is turned off silences its metric for its scope rather than being\ndeactivated.\n",
|
|
438
|
+
"parameters": [
|
|
439
|
+
{
|
|
440
|
+
"name": "project_id",
|
|
441
|
+
"in": "path",
|
|
442
|
+
"required": true,
|
|
443
|
+
"type": "string",
|
|
444
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "anomaly_rule_id",
|
|
448
|
+
"in": "path",
|
|
449
|
+
"required": true,
|
|
450
|
+
"type": "string",
|
|
451
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
452
|
+
},
|
|
453
|
+
{
|
|
454
|
+
"name": "If-Match",
|
|
455
|
+
"in": "header",
|
|
456
|
+
"required": false,
|
|
457
|
+
"type": "string",
|
|
458
|
+
"description": "Entity tag the write is based on, taken from the `ETag` of the read that produced the values being sent. The write proceeds only if it still matches the current representation; otherwise it is refused with `412 Precondition Failed` and nothing is changed.\n\nThis is what makes a read-modify-write safe. Without it the last writer wins and a concurrent edit is silently discarded, which is the failure an agent is most likely to cause and least likely to notice. The `412` response carries the current `ETag`, so a caller can re-read, re-apply its change and retry.\n\nOmitting the header keeps the old unconditional behaviour. `*` matches any current representation, which asserts only that the resource exists."
|
|
459
|
+
}
|
|
460
|
+
],
|
|
461
|
+
"requestBodyType": "{ credential_id?: string; enabled?: boolean; floor?: number; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; sigma_threshold?: number }",
|
|
462
|
+
"requestBodyRequired": true,
|
|
463
|
+
"responseType": "{ created_at: string; credential_id?: string; enabled: boolean; floor?: number; id: string; metric: \"queries_per_hour\" | \"bytes_per_hour\" | \"distinct_shapes\" | \"errors_per_hour\" | \"active_hours\"; project_id: string; sigma_threshold?: number; updated_at: string }",
|
|
464
|
+
"responseStatus": "200"
|
|
465
|
+
},
|
|
466
|
+
"deleteAnomalyRule": {
|
|
467
|
+
"operationId": "deleteAnomalyRule",
|
|
468
|
+
"method": "DELETE",
|
|
469
|
+
"path": "/v1/projects/{project_id}/anomaly-rules/{anomaly_rule_id}",
|
|
470
|
+
"summary": "Delete an anomaly rule",
|
|
471
|
+
"description": "Removes the rule, so its metric returns to the deployment default for that\nscope. Deleting a rule that was silencing a metric turns that metric's\nalerts back on.\n",
|
|
472
|
+
"parameters": [
|
|
473
|
+
{
|
|
474
|
+
"name": "project_id",
|
|
475
|
+
"in": "path",
|
|
476
|
+
"required": true,
|
|
477
|
+
"type": "string",
|
|
478
|
+
"description": "Unique project identifier (prefixed, e.g. prj_xxx)."
|
|
479
|
+
},
|
|
480
|
+
{
|
|
481
|
+
"name": "anomaly_rule_id",
|
|
482
|
+
"in": "path",
|
|
483
|
+
"required": true,
|
|
484
|
+
"type": "string",
|
|
485
|
+
"description": "Unique anomaly rule identifier (prefixed, e.g. anr_xxx)."
|
|
486
|
+
}
|
|
487
|
+
],
|
|
488
|
+
"requestBodyType": "",
|
|
489
|
+
"requestBodyRequired": false,
|
|
490
|
+
"responseType": "",
|
|
491
|
+
"responseStatus": "204"
|
|
492
|
+
},
|
|
330
493
|
"listApprovalRequests": {
|
|
331
494
|
"operationId": "listApprovalRequests",
|
|
332
495
|
"method": "GET",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pgbeam",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.17",
|
|
4
4
|
"description": "TypeScript SDK for the PgBeam API, a Postgres proxy for safe AI agent access with policy enforcement in the wire protocol",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
],
|
|
48
48
|
"homepage": "https://pgbeam.com",
|
|
49
49
|
"devDependencies": {
|
|
50
|
-
"@kubb/adapter-oas": "5.
|
|
50
|
+
"@kubb/adapter-oas": "5.3.10",
|
|
51
51
|
"@kubb/middleware-barrel": "5.0.0-beta.35",
|
|
52
|
-
"@kubb/plugin-ts": "5.0.
|
|
52
|
+
"@kubb/plugin-ts": "5.0.2",
|
|
53
53
|
"@pgbeam/config": "0.0.1",
|
|
54
54
|
"@typescript/typescript6": "6.0.2",
|
|
55
55
|
"bunchee": "7.0.1",
|
|
56
|
-
"kubb": "5.
|
|
56
|
+
"kubb": "5.3.10",
|
|
57
57
|
"typescript": "7.0.2"
|
|
58
58
|
},
|
|
59
59
|
"scripts": {
|