Skip to content

Commit

Permalink
feat: auto-updated SDK (#71); add project owner to the project read r…
Browse files Browse the repository at this point in the history
…esults

Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: kislerdm <13434797+kislerdm@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and kislerdm authored Oct 9, 2024
1 parent a3647c2 commit c00413c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mockhttp.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ var endpointResponseExamples = map[string]map[string]mockResponse{
Code: 200,
},
"GET": mockResponse{
Content: `{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":10,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"shiny-wind-028834","owner":{"branches_limit":10,"email":"some@email.com","subscription_type":"scale"},"owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z","written_data_bytes":100800}}`,
Content: `{"project":{"active_time_seconds":100,"branch_logical_size_limit":0,"branch_logical_size_limit_bytes":10500,"compute_time_seconds":100,"consumption_period_end":"2023-03-01T00:00:00Z","consumption_period_start":"2023-02-01T00:00:00Z","cpu_used_sec":10,"created_at":"2022-11-23T17:42:25Z","creation_source":"console","data_storage_bytes_hour":1040,"data_transfer_bytes":1000000,"history_retention_seconds":604800,"id":"shiny-wind-028834","name":"shiny-wind-028834","owner":{"branches_limit":10,"email":"some@email.com","name":"John Smith","subscription_type":"scale"},"owner_id":"1232111","pg_version":15,"platform_id":"aws","provisioner":"k8s-pod","proxy_host":"us-east-2.aws.neon.tech","region_id":"aws-us-east-2","store_passwords":true,"updated_at":"2022-11-23T17:42:25Z","written_data_bytes":100800}}`,
Code: 200,
},
"PATCH": mockResponse{
Expand Down
8 changes: 7 additions & 1 deletion openAPIDefinition.json
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,7 @@
"cpu_used_sec": 10,
"owner_id": "1232111",
"owner": {
"name": "John Smith",
"email": "some@email.com",
"branches_limit": 10,
"subscription_type": "scale"
Expand Down Expand Up @@ -4497,6 +4498,7 @@
"created_at": "2022-12-13T01:30:55Z",
"updated_at": "2022-12-13T01:30:55Z",
"owner": {
"name": "John Smith",
"email": "some@email.com",
"branches_limit": 10,
"subscription_type": "scale"
Expand Down Expand Up @@ -5386,7 +5388,7 @@
],
"properties": {
"connection_uri": {
"description": "The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\n",
"description": "The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)\nThe connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.\nWhen creating a branch from a parent with more than one role or database, the response body does not include a connection URI.\n",
"type": "string"
},
"connection_parameters": {
Expand Down Expand Up @@ -6958,13 +6960,17 @@
"type": "object",
"required": [
"email",
"name",
"branches_limit",
"subscription_type"
],
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"branches_limit": {
"type": "integer"
},
Expand Down
2 changes: 2 additions & 0 deletions sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -1174,6 +1174,7 @@ type ConnectionDetails struct {
ConnectionParameters ConnectionParameters `json:"connection_parameters"`
// ConnectionURI The connection URI is defined as specified here: [Connection URIs](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS)
// The connection URI can be used to connect to a Postgres database with psql or defined in a DATABASE_URL environment variable.
// When creating a branch from a parent with more than one role or database, the response body does not include a connection URI.
ConnectionURI string `json:"connection_uri"`
}

Expand Down Expand Up @@ -1889,6 +1890,7 @@ type ProjectListItem struct {
type ProjectOwnerData struct {
BranchesLimit int `json:"branches_limit"`
Email string `json:"email"`
Name string `json:"name"`
SubscriptionType BillingSubscriptionType `json:"subscription_type"`
}

Expand Down

0 comments on commit c00413c

Please sign in to comment.