Skip to content

Commit 26be945

Browse files
committed
Add separated spec files and full mirror content
Ships the bundled spec (openapi.yaml/json), the separated public files under spec/, the typed src re-exports, README, and LICENSE. Mirrors what sync-mirrors.yml pushes from frontend/packages/openapi in the monorepo.
1 parent 41ef012 commit 26be945

185 files changed

Lines changed: 6098 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
The public OpenAPI specification for the [PgBeam](https://pgbeam.com) API, a globally distributed PostgreSQL proxy platform for safe Postgres access by AI agents.
44

5-
This repository is a read-only mirror. The specification is generated from the PgBeam source contract and synced here automatically on every change, so it never drifts from what actually drives the API server, the TypeScript and Go SDKs, the Terraform, Crossplane, and Pulumi providers, the CLI, and the docs. Do not open pull requests that edit the spec by hand; they cannot be merged back.
5+
The [`sferarc/pgbeam-openapi`](https://github.com/sferarc/pgbeam-openapi) repository is a read-only mirror. The specification is generated from the PgBeam source contract and synced there automatically on every change, so it never drifts from what actually drives the API server, the TypeScript and Go SDKs, the Terraform, Crossplane, and Pulumi providers, the CLI, and the docs. Do not open pull requests that edit the spec by hand; they cannot be merged back.
66

77
## Contents
88

9-
- `openapi.yaml`, `openapi.json` — the OpenAPI document in both formats.
9+
- `openapi.yaml`, `openapi.json` — the full bundled OpenAPI document in both formats.
10+
- `spec/` — the same public contract split into separated files (`spec/openapi.yaml` root plus `paths/` and `components/`), for consumers who prefer the modular layout. Split from the public bundle, so internal-only operations never appear.
1011
- `src/` — a typed TypeScript module that re-exports the parsed document.
1112

1213
## Install
@@ -27,7 +28,7 @@ You can also read the raw documents without installing anything:
2728
import spec from "pgbeam-openapi/openapi.json";
2829
```
2930

30-
Or point any OpenAPI tool at the files directly to generate your own clients, validate requests, or render an API reference.
31+
Or point any OpenAPI tool at the bundled file (`openapi.yaml`) or the separated root (`spec/openapi.yaml`) to generate your own clients, validate requests, or render an API reference.
3132

3233
## License
3334

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
}
1717
},
1818
"./openapi.json": "./openapi.json",
19-
"./openapi.yaml": "./openapi.yaml"
19+
"./openapi.yaml": "./openapi.yaml",
20+
"./spec/openapi.yaml": "./spec/openapi.yaml"
2021
},
2122
"main": "./dist/index.cjs",
2223
"module": "./dist/index.mjs",
@@ -27,7 +28,8 @@
2728
"files": [
2829
"dist",
2930
"openapi.json",
30-
"openapi.yaml"
31+
"openapi.yaml",
32+
"spec"
3133
],
3234
"keywords": [
3335
"pgbeam",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: agent_id
2+
in: path
3+
required: true
4+
description: Unique agent credential identifier (prefixed, e.g. agt_xxx).
5+
schema:
6+
type: string
7+
pattern: ^[a-zA-Z0-9_.-]+$
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: anomaly_id
2+
in: path
3+
required: true
4+
description: Unique anomaly alert identifier (prefixed, e.g. ano_xxx).
5+
schema:
6+
type: string
7+
pattern: ^[a-zA-Z0-9_.-]+$
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: approval_id
2+
in: path
3+
required: true
4+
description: Unique approval request identifier (prefixed, e.g. apr_xxx).
5+
schema:
6+
type: string
7+
pattern: ^[a-zA-Z0-9_.-]+$
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: credential_id
2+
in: query
3+
required: false
4+
description: Filter to a single agent credential.
5+
schema:
6+
type: string
7+
pattern: ^[a-zA-Z0-9_.-]+$
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: decision
2+
in: query
3+
required: false
4+
description: >-
5+
Coarse outcome filter that groups events. `allow` = query; `block` = blocked,
6+
budget_exhausted, auth_failed, credential_expired; `mask` = masked; `truncate`
7+
= truncated.
8+
schema:
9+
$ref: ../schemas/AuditDecision.yaml
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: end
2+
in: query
3+
required: false
4+
description: Return entries strictly older than this timestamp (cursor / upper bound).
5+
schema:
6+
type: string
7+
format: date-time
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: event
2+
in: query
3+
required: false
4+
description: Filter to a single event type (e.g. blocked, masked, query).
5+
schema:
6+
type: string
7+
pattern: ^[a-z_]+$

0 commit comments

Comments
 (0)