volcano-sdk 0.32.5 → 0.32.7
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/volcano/client.rb +19 -17
- data/lib/volcano/database.rb +1 -1
- data/lib/volcano/durable_models.rb +0 -3
- data/lib/volcano/function_resolution.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/api/auth_configuration_api.rb +6 -6
- data/lib/volcano/generated/lib/volcano-generated/api/databases_api.rb +4 -4
- data/lib/volcano/generated/lib/volcano-generated/api/frontends_api.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/api/logs_api.rb +6 -6
- data/lib/volcano/generated/lib/volcano-generated/models/auth_config.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project.rb +3 -3
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_auth_signup.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_custom_domain.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_template.rb +2 -2
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_email_templates.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_hosted_pages.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/project_config_project.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/realtime_plan_limits.rb +1 -1
- data/lib/volcano/generated/lib/volcano-generated/models/update_auth_config_request.rb +1 -1
- data/lib/volcano/generated_transport.rb +8 -5
- data/lib/volcano/generated_transport_anonymous.rb +6 -5
- data/lib/volcano/generated_transport_auth.rb +19 -17
- data/lib/volcano/generated_transport_confirmation.rb +6 -8
- data/lib/volcano/generated_transport_email_change.rb +6 -1
- data/lib/volcano/generated_transport_functions.rb +13 -6
- data/lib/volcano/generated_transport_logs.rb +18 -21
- data/lib/volcano/generated_transport_oauth.rb +18 -8
- data/lib/volcano/generated_transport_sessions.rb +6 -3
- data/lib/volcano/generated_transport_storage.rb +1 -1
- data/lib/volcano/generated_transport_support.rb +42 -23
- data/lib/volcano/generated_transport_upload_session_api.rb +14 -11
- data/lib/volcano/lock_guard.rb +1 -1
- data/lib/volcano/models.rb +0 -6
- data/lib/volcano/realtime/connection.rb +3 -1
- data/lib/volcano/realtime/postgres_changes.rb +0 -2
- data/lib/volcano/realtime.rb +0 -2
- data/lib/volcano/session.rb +1 -3
- data/lib/volcano/storage_models.rb +0 -3
- data/lib/volcano/storage_upload_models.rb +0 -3
- data/lib/volcano/user.rb +0 -3
- data/lib/volcano/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b611d95fd4b7fb342a631e1c1ffe7c8dd42c9327556dfd01d64ad0f971e4d475
|
|
4
|
+
data.tar.gz: 549dabf87e25ee1fdea58c13573d1fb03e7b58ffd153c227c8fb7223247171a8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 304e984a96c2af8898412fd3def954476c5f9bc406832ff581139eac80776f92552357bae744266c9248e9d84a317e2dd533edb8a48612eabee5f86283921305
|
|
7
|
+
data.tar.gz: 8beff771c0a4294ce05f0c95e3e43bbf915781d34ee2d3284fae81a8a2f8eda0509e7092136a324cee91e643ce75e2768f7f9f01fc3f936668f90a9025101fe8
|
data/README.md
CHANGED
|
@@ -912,7 +912,7 @@ not a gem runtime dependency.
|
|
|
912
912
|
Run `npm ci && bin/check-openapi` to verify generated provenance. Use
|
|
913
913
|
`bundle exec rubocop -A` to apply safe formatting and lint fixes. Before
|
|
914
914
|
changing the facade, run `bundle exec rubocop --parallel`, `bundle exec rspec`,
|
|
915
|
-
and
|
|
915
|
+
and package checks. Hosting owns live acceptance for all SDKs.
|
|
916
916
|
|
|
917
917
|
## Contributing
|
|
918
918
|
|
data/lib/volcano/client.rb
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
module Volcano
|
|
4
4
|
# Entry point for Volcano API, storage, lock, and realtime operations.
|
|
5
5
|
class Client
|
|
6
|
-
SessionToken = Data.define(:value)
|
|
6
|
+
SessionToken = Data.define(:value)
|
|
7
|
+
|
|
8
|
+
# Restricts database queries to the captured access token.
|
|
9
|
+
class SessionToken
|
|
10
|
+
# @dynamic value
|
|
7
11
|
def session_token = value
|
|
8
12
|
|
|
9
13
|
def session_request
|
|
@@ -14,21 +18,27 @@ module Volcano
|
|
|
14
18
|
|
|
15
19
|
attr_reader :auth, :functions, :durable, :logs, :storage, :locks, :realtime
|
|
16
20
|
|
|
17
|
-
|
|
21
|
+
# @dynamic auth, functions, durable, logs, storage, locks, realtime
|
|
22
|
+
|
|
23
|
+
def initialize( # rubocop:disable Metrics/ParameterLists -- Preserve typed constructor keywords.
|
|
18
24
|
anon_key:,
|
|
19
25
|
api_url: 'https://api.volcano.dev',
|
|
20
26
|
service_key: nil,
|
|
21
27
|
timeout: 60,
|
|
28
|
+
_transport: nil, # rubocop:disable Lint/UnderscorePrefixedVariableName -- Existing keyword API.
|
|
29
|
+
_realtime_socket_factory: nil, # rubocop:disable Lint/UnderscorePrefixedVariableName -- Existing keyword API.
|
|
30
|
+
_realtime_reconnect_delay: nil, # rubocop:disable Lint/UnderscorePrefixedVariableName -- Existing keyword API.
|
|
22
31
|
**options
|
|
23
32
|
)
|
|
24
33
|
session = SessionCredentials.build(options.delete(:access_token), options.delete(:refresh_token))
|
|
25
|
-
|
|
34
|
+
raise ArgumentError, "unknown keyword: #{options.keys.first}" unless options.empty?
|
|
35
|
+
|
|
26
36
|
@api_url = api_url.delete_suffix('/')
|
|
27
37
|
@anon_key = anon_key
|
|
28
38
|
@service_key = service_key
|
|
29
39
|
@auth_state = AuthState.new(session: session)
|
|
30
|
-
@transport =
|
|
31
|
-
initialize_facades(
|
|
40
|
+
@transport = _transport || GeneratedTransport.new(api_url: @api_url, timeout: timeout)
|
|
41
|
+
initialize_facades(_realtime_socket_factory, _realtime_reconnect_delay)
|
|
32
42
|
end
|
|
33
43
|
|
|
34
44
|
def database(name)
|
|
@@ -57,9 +67,10 @@ module Volcano
|
|
|
57
67
|
alias session_read session_request
|
|
58
68
|
|
|
59
69
|
def service_token
|
|
60
|
-
|
|
70
|
+
service_key = @service_key
|
|
71
|
+
raise Error::AuthenticationError, 'No service key configured' unless service_key
|
|
61
72
|
|
|
62
|
-
|
|
73
|
+
service_key
|
|
63
74
|
end
|
|
64
75
|
|
|
65
76
|
def function_token
|
|
@@ -100,19 +111,10 @@ module Volcano
|
|
|
100
111
|
|
|
101
112
|
private
|
|
102
113
|
|
|
103
|
-
def database_with_token(name, token)
|
|
114
|
+
def database_with_token(name, token) # rubocop:disable Lint/UnusedPrivateMethod -- Typed cross-file private dispatch.
|
|
104
115
|
Database.new(SessionToken.new(value: token), @transport, name)
|
|
105
116
|
end
|
|
106
117
|
|
|
107
|
-
def extract_adapters(adapters)
|
|
108
|
-
transport = adapters.delete(:_transport)
|
|
109
|
-
socket_factory = adapters.delete(:_realtime_socket_factory)
|
|
110
|
-
reconnect_delay = adapters.delete(:_realtime_reconnect_delay)
|
|
111
|
-
raise ArgumentError, "unknown keyword: #{adapters.keys.first}" unless adapters.empty?
|
|
112
|
-
|
|
113
|
-
[transport, socket_factory, reconnect_delay]
|
|
114
|
-
end
|
|
115
|
-
|
|
116
118
|
def initialize_facades(socket_factory, reconnect_delay)
|
|
117
119
|
@auth = Auth.new(self, @transport, api_url: @api_url)
|
|
118
120
|
@functions = Functions.new(self, @transport, api_url: @api_url)
|
data/lib/volcano/database.rb
CHANGED
|
@@ -140,7 +140,7 @@ module Volcano
|
|
|
140
140
|
def query_body
|
|
141
141
|
# @type var body: sdk_payload
|
|
142
142
|
body = { 'table' => @table }
|
|
143
|
-
body.tap do
|
|
143
|
+
body.tap do
|
|
144
144
|
add_query_selection(body)
|
|
145
145
|
body['limit'] = @limit unless @limit.nil?
|
|
146
146
|
body['offset'] = @offset unless @offset.nil?
|
|
@@ -39,9 +39,6 @@ module Volcano
|
|
|
39
39
|
|
|
40
40
|
# Reopens the generated record for checked initialization.
|
|
41
41
|
class DurableExecution
|
|
42
|
-
# @dynamic id, function_id, name, status, region, created_at, result, result_expired
|
|
43
|
-
# @dynamic error, completed_at, members, with, to_h, deconstruct, deconstruct_keys
|
|
44
|
-
# @dynamic self.[], self.members
|
|
45
42
|
def initialize(**attributes)
|
|
46
43
|
unknown = attributes.keys - DURABLE_EXECUTION_ATTRIBUTES
|
|
47
44
|
raise ArgumentError, "unknown keywords: #{unknown.join(', ')}" unless unknown.empty?
|
|
@@ -115,7 +115,7 @@ module Volcano
|
|
|
115
115
|
|
|
116
116
|
def usable_address?(uri)
|
|
117
117
|
# URI accepts a port outside the range a connection can use.
|
|
118
|
-
!uri.host.to_s.empty? && uri.port.
|
|
118
|
+
!uri.host.to_s.empty? && (uri.port || 0).between?(1, 65_535)
|
|
119
119
|
end
|
|
120
120
|
|
|
121
121
|
def usable_scheme?(scheme, api_url)
|
|
@@ -88,7 +88,7 @@ module Volcano::Generated
|
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
# Create email template
|
|
91
|
-
# Creates a custom email template for the project. Custom email templates are a
|
|
91
|
+
# Creates a custom email template for the project. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403, and HOBBY projects always send the built-in default templates regardless of any previously saved custom rows. Every project is created with one template per type, so customizing one is usually a PUT; creating a type the project already has returns 409. Valid template types: welcome, confirmation, password_reset, password_changed
|
|
92
92
|
# @param id [String] Project ID
|
|
93
93
|
# @param create_email_template_request [CreateEmailTemplateRequest]
|
|
94
94
|
# @param [Hash] opts the optional parameters
|
|
@@ -99,7 +99,7 @@ module Volcano::Generated
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
# Create email template
|
|
102
|
-
# Creates a custom email template for the project. Custom email templates are a
|
|
102
|
+
# Creates a custom email template for the project. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403, and HOBBY projects always send the built-in default templates regardless of any previously saved custom rows. Every project is created with one template per type, so customizing one is usually a PUT; creating a type the project already has returns 409. Valid template types: welcome, confirmation, password_reset, password_changed
|
|
103
103
|
# @param id [String] Project ID
|
|
104
104
|
# @param create_email_template_request [CreateEmailTemplateRequest]
|
|
105
105
|
# @param [Hash] opts the optional parameters
|
|
@@ -290,7 +290,7 @@ module Volcano::Generated
|
|
|
290
290
|
end
|
|
291
291
|
|
|
292
292
|
# Delete email template
|
|
293
|
-
# Deletes a custom template, reverting to the default. Custom email templates are a
|
|
293
|
+
# Deletes a custom template, reverting to the default. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403.
|
|
294
294
|
# @param id [String] Project ID
|
|
295
295
|
# @param type [String]
|
|
296
296
|
# @param [Hash] opts the optional parameters
|
|
@@ -301,7 +301,7 @@ module Volcano::Generated
|
|
|
301
301
|
end
|
|
302
302
|
|
|
303
303
|
# Delete email template
|
|
304
|
-
# Deletes a custom template, reverting to the default. Custom email templates are a
|
|
304
|
+
# Deletes a custom template, reverting to the default. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403.
|
|
305
305
|
# @param id [String] Project ID
|
|
306
306
|
# @param type [String]
|
|
307
307
|
# @param [Hash] opts the optional parameters
|
|
@@ -1711,7 +1711,7 @@ module Volcano::Generated
|
|
|
1711
1711
|
end
|
|
1712
1712
|
|
|
1713
1713
|
# Update email template
|
|
1714
|
-
# Updates a custom email template. Custom email templates are a
|
|
1714
|
+
# Updates a custom email template. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403 (including after a SUPERAGENT→HOBBY downgrade), so a HOBBY project cannot modify templates and always sends the built-in defaults.
|
|
1715
1715
|
# @param id [String] Project ID
|
|
1716
1716
|
# @param type [String]
|
|
1717
1717
|
# @param update_email_template_request [UpdateEmailTemplateRequest]
|
|
@@ -1723,7 +1723,7 @@ module Volcano::Generated
|
|
|
1723
1723
|
end
|
|
1724
1724
|
|
|
1725
1725
|
# Update email template
|
|
1726
|
-
# Updates a custom email template. Custom email templates are a
|
|
1726
|
+
# Updates a custom email template. Custom email templates are a SUPERAGENT-plan feature: requests from a HOBBY-plan project owner are rejected with 403 (including after a SUPERAGENT→HOBBY downgrade), so a HOBBY project cannot modify templates and always sends the built-in defaults.
|
|
1727
1727
|
# @param id [String] Project ID
|
|
1728
1728
|
# @param type [String]
|
|
1729
1729
|
# @param update_email_template_request [UpdateEmailTemplateRequest]
|
|
@@ -20,7 +20,7 @@ module Volcano::Generated
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Create a new serverless PostgreSQL database
|
|
23
|
-
# Creates a serverless PostgreSQL database in the project. Each project can hold 1 database on
|
|
23
|
+
# Creates a serverless PostgreSQL database in the project. Each project can hold 1 database on Hobby and up to 10,000 on Superagent. Requests over the plan's cap return 403.
|
|
24
24
|
# @param id [String] Project ID
|
|
25
25
|
# @param create_database_request [CreateDatabaseRequest]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -31,7 +31,7 @@ module Volcano::Generated
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Create a new serverless PostgreSQL database
|
|
34
|
-
# Creates a serverless PostgreSQL database in the project. Each project can hold 1 database on
|
|
34
|
+
# Creates a serverless PostgreSQL database in the project. Each project can hold 1 database on Hobby and up to 10,000 on Superagent. Requests over the plan's cap return 403.
|
|
35
35
|
# @param id [String] Project ID
|
|
36
36
|
# @param create_database_request [CreateDatabaseRequest]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
@@ -339,7 +339,7 @@ module Volcano::Generated
|
|
|
339
339
|
end
|
|
340
340
|
|
|
341
341
|
# Get database queries
|
|
342
|
-
# Returns the database's current top queries from pg_stat_statements ranked by total execution time. **
|
|
342
|
+
# Returns the database's current top queries from pg_stat_statements ranked by total execution time. **SUPERAGENT plan required.** This endpoint is only available to projects owned by users on the SUPERAGENT billing plan.
|
|
343
343
|
# @param id [String] Project ID
|
|
344
344
|
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
345
345
|
# @param [Hash] opts the optional parameters
|
|
@@ -351,7 +351,7 @@ module Volcano::Generated
|
|
|
351
351
|
end
|
|
352
352
|
|
|
353
353
|
# Get database queries
|
|
354
|
-
# Returns the database's current top queries from pg_stat_statements ranked by total execution time. **
|
|
354
|
+
# Returns the database's current top queries from pg_stat_statements ranked by total execution time. **SUPERAGENT plan required.** This endpoint is only available to projects owned by users on the SUPERAGENT billing plan.
|
|
355
355
|
# @param id [String] Project ID
|
|
356
356
|
# @param database_name [String] Database name (unique within project, lowercase letters, numbers, and underscores only)
|
|
357
357
|
# @param [Hash] opts the optional parameters
|
|
@@ -124,7 +124,7 @@ module Volcano::Generated
|
|
|
124
124
|
return data, status_code, headers
|
|
125
125
|
end
|
|
126
126
|
|
|
127
|
-
# Configure frontend custom domain (
|
|
127
|
+
# Configure frontend custom domain (SUPERAGENT)
|
|
128
128
|
# Configures one custom domain for a frontend. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes.
|
|
129
129
|
# @param id [String] Project ID
|
|
130
130
|
# @param frontend_id [String] Frontend ID
|
|
@@ -136,7 +136,7 @@ module Volcano::Generated
|
|
|
136
136
|
data
|
|
137
137
|
end
|
|
138
138
|
|
|
139
|
-
# Configure frontend custom domain (
|
|
139
|
+
# Configure frontend custom domain (SUPERAGENT)
|
|
140
140
|
# Configures one custom domain for a frontend. The default Volcano-generated frontend URL remains active. Wildcard Volcano frontend TLS remains valid and isolated from custom-domain certificate changes.
|
|
141
141
|
# @param id [String] Project ID
|
|
142
142
|
# @param frontend_id [String] Frontend ID
|
|
@@ -20,7 +20,7 @@ module Volcano::Generated
|
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
22
|
# Get project log activity
|
|
23
|
-
# Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a
|
|
23
|
+
# Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; `resource.type=database` from a HOBBY-plan project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window.
|
|
24
24
|
# @param id [String] Project ID
|
|
25
25
|
# @param log_activity_request [LogActivityRequest]
|
|
26
26
|
# @param [Hash] opts the optional parameters
|
|
@@ -31,7 +31,7 @@ module Volcano::Generated
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
# Get project log activity
|
|
34
|
-
# Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a
|
|
34
|
+
# Retrieve bucketed log counts for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to count deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; `resource.type=database` from a HOBBY-plan project owner returns 403. The activity window is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older start times are clamped to that window.
|
|
35
35
|
# @param id [String] Project ID
|
|
36
36
|
# @param log_activity_request [LogActivityRequest]
|
|
37
37
|
# @param [Hash] opts the optional parameters
|
|
@@ -94,7 +94,7 @@ module Volcano::Generated
|
|
|
94
94
|
end
|
|
95
95
|
|
|
96
96
|
# Search project logs
|
|
97
|
-
# Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a
|
|
97
|
+
# Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; requests for `resource.type=database` from a HOBBY-plan project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window.
|
|
98
98
|
# @param id [String] Project ID
|
|
99
99
|
# @param log_search_request [LogSearchRequest]
|
|
100
100
|
# @param [Hash] opts the optional parameters
|
|
@@ -105,7 +105,7 @@ module Volcano::Generated
|
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
# Search project logs
|
|
108
|
-
# Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a
|
|
108
|
+
# Search or filter logs for one resource type in the project. Set `resource.type` to `function`, `frontend`, or `database`. Add `resource.ids` to filter to one or more resources, and add `resource.deployments.ids` to read deployment logs instead of runtime logs for functions and frontends. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; requests for `resource.type=database` from a HOBBY-plan project owner return 403. Log history (runtime and deployment) is limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that window.
|
|
109
109
|
# @param id [String] Project ID
|
|
110
110
|
# @param log_search_request [LogSearchRequest]
|
|
111
111
|
# @param [Hash] opts the optional parameters
|
|
@@ -168,7 +168,7 @@ module Volcano::Generated
|
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
# Stream project logs
|
|
171
|
-
# Live-tail project logs as Server-Sent Events. The request body uses the resource selector plus `q`, `start_time`, and `limit`, including runtime logs and function/frontend deployment logs selected with `resource.deployments`. Deployment logs are not supported for databases. Database logs are a
|
|
171
|
+
# Live-tail project logs as Server-Sent Events. The request body uses the resource selector plus `q`, `start_time`, and `limit`, including runtime logs and function/frontend deployment logs selected with `resource.deployments`. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; `resource.type=database` from a HOBBY-plan project owner returns 403. The `q` field uses the same syntax as search and activity requests. Do not send `cursor` or `end_time`; use `/logs/search` for range backfills. Explicit historical `start_time` values are limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days). Resume with `Last-Event-ID` or the `last_event_id` query parameter. The cursor is bound to the request body: the resource selector and every filter must match the original request when reconnecting, otherwise the request is rejected with `400`. This is a live tail, not a gap-free backfill. On connect or reconnect the server delivers at most `limit` of the most recent matching events from the cursor position and then follows new events; events older than that window are not replayed. Use `/logs/search` to backfill a time range.
|
|
172
172
|
# @param id [String] Project ID
|
|
173
173
|
# @param log_stream_request [LogStreamRequest]
|
|
174
174
|
# @param [Hash] opts the optional parameters
|
|
@@ -181,7 +181,7 @@ module Volcano::Generated
|
|
|
181
181
|
end
|
|
182
182
|
|
|
183
183
|
# Stream project logs
|
|
184
|
-
# Live-tail project logs as Server-Sent Events. The request body uses the resource selector plus `q`, `start_time`, and `limit`, including runtime logs and function/frontend deployment logs selected with `resource.deployments`. Deployment logs are not supported for databases. Database logs are a
|
|
184
|
+
# Live-tail project logs as Server-Sent Events. The request body uses the resource selector plus `q`, `start_time`, and `limit`, including runtime logs and function/frontend deployment logs selected with `resource.deployments`. Deployment logs are not supported for databases. Database logs are a SUPERAGENT-plan feature; `resource.type=database` from a HOBBY-plan project owner returns 403. The `q` field uses the same syntax as search and activity requests. Do not send `cursor` or `end_time`; use `/logs/search` for range backfills. Explicit historical `start_time` values are limited to the plan's retention window (HOBBY: 1 day, SUPERAGENT: 30 days). Resume with `Last-Event-ID` or the `last_event_id` query parameter. The cursor is bound to the request body: the resource selector and every filter must match the original request when reconnecting, otherwise the request is rejected with `400`. This is a live tail, not a gap-free backfill. On connect or reconnect the server delivers at most `limit` of the most recent matching events from the cursor position and then follows new events; events older than that window are not replayed. Use `/logs/search` to backfill a time range.
|
|
185
185
|
# @param id [String] Project ID
|
|
186
186
|
# @param log_stream_request [LogStreamRequest]
|
|
187
187
|
# @param [Hash] opts the optional parameters
|
|
@@ -64,7 +64,7 @@ module Volcano::Generated
|
|
|
64
64
|
# Allow creating users without email/password
|
|
65
65
|
attr_accessor :enable_anonymous_signins
|
|
66
66
|
|
|
67
|
-
# Email domains allowed to create users in this project. Applies to email/password signup, OAuth/SSO signup, anonymous conversion, and email changes. Empty (the default) allows every domain. Entries are stored normalized (lowercase, no `@` prefix) and match the domain part exactly: `domain1.com` does not cover `mail.domain1.com`. Signups from other domains are rejected with 403, and `allowed_email_domains_mode` decides whether sign-in is covered as well. The allowlist is a
|
|
67
|
+
# Email domains allowed to create users in this project. Applies to email/password signup, OAuth/SSO signup, anonymous conversion, and email changes. Empty (the default) allows every domain. Entries are stored normalized (lowercase, no `@` prefix) and match the domain part exactly: `domain1.com` does not cover `mail.domain1.com`. Signups from other domains are rejected with 403, and `allowed_email_domains_mode` decides whether sign-in is covered as well. The allowlist is a SUPERAGENT feature to configure and to enforce. A downgrade parks it: the domains are still returned here and stop being applied until the project is back on SUPERAGENT.
|
|
68
68
|
attr_accessor :allowed_email_domains
|
|
69
69
|
|
|
70
70
|
# How far `allowed_email_domains` reaches. `signup` only gates account creation, so accounts that predate the list keep signing in. `signup_and_signin` also refuses to issue a session to an account whose domain is not listed. `disabled` keeps the list without enforcing it.
|
|
@@ -21,7 +21,7 @@ module Volcano::Generated
|
|
|
21
21
|
|
|
22
22
|
attr_accessor :status
|
|
23
23
|
|
|
24
|
-
#
|
|
24
|
+
# Public plan name; FREE and PRO are accepted from older Hosting responses.
|
|
25
25
|
attr_accessor :plan
|
|
26
26
|
|
|
27
27
|
# Region policy for function deployment. - `true`: deploy functions to all configured platform regions - `false`: deploy only to `selected_regions`
|
|
@@ -254,7 +254,7 @@ module Volcano::Generated
|
|
|
254
254
|
return false if @status.nil?
|
|
255
255
|
status_validator = EnumAttributeValidator.new('String', ["active", "deleting", "failed"])
|
|
256
256
|
return false unless status_validator.valid?(@status)
|
|
257
|
-
plan_validator = EnumAttributeValidator.new('String', ["FREE", "PRO"])
|
|
257
|
+
plan_validator = EnumAttributeValidator.new('String', ["HOBBY", "SUPERAGENT", "FREE", "PRO"])
|
|
258
258
|
return false unless plan_validator.valid?(@plan)
|
|
259
259
|
return false if @all_regions.nil?
|
|
260
260
|
return false if @selected_regions.nil?
|
|
@@ -296,7 +296,7 @@ module Volcano::Generated
|
|
|
296
296
|
# Custom attribute writer method checking allowed values (enum).
|
|
297
297
|
# @param [Object] plan Object to be assigned
|
|
298
298
|
def plan=(plan)
|
|
299
|
-
validator = EnumAttributeValidator.new('String', ["FREE", "PRO"])
|
|
299
|
+
validator = EnumAttributeValidator.new('String', ["HOBBY", "SUPERAGENT", "FREE", "PRO"])
|
|
300
300
|
unless validator.valid?(plan)
|
|
301
301
|
fail ArgumentError, "invalid value for \"plan\", must be one of #{validator.allowable_values}."
|
|
302
302
|
end
|
|
@@ -20,7 +20,7 @@ module Volcano::Generated
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :enable_anonymous_signins
|
|
22
22
|
|
|
23
|
-
# Email domains allowed to create users. Empty allows every domain. Replaces the stored list; entries are normalized (lowercase, no `@` prefix) and must be bare domains such as `domain1.com`. Matching is exact, so subdomains need their own entry. At most 100 entries. Restricting signups is a
|
|
23
|
+
# Email domains allowed to create users. Empty allows every domain. Replaces the stored list; entries are normalized (lowercase, no `@` prefix) and must be bare domains such as `domain1.com`. Matching is exact, so subdomains need their own entry. At most 100 entries. Restricting signups is a SUPERAGENT feature to configure and to enforce: a HOBBY project can only declare the list it already has or remove the restriction, and the list it keeps is parked until it upgrades.
|
|
24
24
|
attr_accessor :allowed_email_domains
|
|
25
25
|
|
|
26
26
|
# How far `allowed_email_domains` reaches. `signup` gates account creation only. `signup_and_signin` also blocks sign-in for accounts outside the list and signs out the ones it locks out. `disabled` keeps the list without enforcing it.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
|
-
# Custom domain with BYOC TLS (
|
|
17
|
+
# Custom domain with BYOC TLS (SUPERAGENT plan). `tls` is required when the domain is first created and optional afterwards: providing new TLS material for the same domain rotates the certificate in place (zero downtime); omitting `tls` keeps the stored certificate. TLS material is write-only and omitted from config export.
|
|
18
18
|
class ProjectConfigCustomDomain < ApiModelBase
|
|
19
19
|
# Fully-qualified domain name (hostname only, no scheme/path)
|
|
20
20
|
attr_accessor :domain
|
|
@@ -17,10 +17,10 @@ module Volcano::Generated
|
|
|
17
17
|
class ProjectConfigEmailTemplate < ApiModelBase
|
|
18
18
|
attr_accessor :subject
|
|
19
19
|
|
|
20
|
-
# HTML body. Max 256 KiB.
|
|
20
|
+
# HTML body. Max 256 KiB. SUPERAGENT plan required for custom bodies.
|
|
21
21
|
attr_accessor :html_body
|
|
22
22
|
|
|
23
|
-
# Plain-text body. Max 256 KiB.
|
|
23
|
+
# Plain-text body. Max 256 KiB. SUPERAGENT plan required for custom bodies.
|
|
24
24
|
attr_accessor :text_body
|
|
25
25
|
|
|
26
26
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
|
-
# Email templates keyed by type. Fully synced when declared - template types absent from a declared map revert to server defaults (custom bodies deleted, subject overrides cleared). Custom template bodies require the
|
|
17
|
+
# Email templates keyed by type. Fully synced when declared - template types absent from a declared map revert to server defaults (custom bodies deleted, subject overrides cleared). Custom template bodies require the SUPERAGENT plan; subject-only changes are available on HOBBY.
|
|
18
18
|
class ProjectConfigEmailTemplates < ApiModelBase
|
|
19
19
|
attr_accessor :confirmation
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Volcano::Generated
|
|
17
|
-
# Hosted auth pages keyed by page type (
|
|
17
|
+
# Hosted auth pages keyed by page type (SUPERAGENT plan). Upsert-only: omitted pages are left untouched (there is no delete for hosted pages).
|
|
18
18
|
class ProjectConfigHostedPages < ApiModelBase
|
|
19
19
|
attr_accessor :login
|
|
20
20
|
|
|
@@ -18,7 +18,7 @@ module Volcano::Generated
|
|
|
18
18
|
class ProjectConfigProject < ApiModelBase
|
|
19
19
|
attr_accessor :name
|
|
20
20
|
|
|
21
|
-
# Region policy. `false` requires `selected_regions` (
|
|
21
|
+
# Region policy. `false` requires `selected_regions` (SUPERAGENT plan).
|
|
22
22
|
attr_accessor :all_regions
|
|
23
23
|
|
|
24
24
|
# Region subset (bare region names). Requires `all_regions=false`.
|
|
@@ -16,7 +16,7 @@ require 'time'
|
|
|
16
16
|
module Volcano::Generated
|
|
17
17
|
# Plan-based limits for realtime features
|
|
18
18
|
class RealtimePlanLimits < ApiModelBase
|
|
19
|
-
#
|
|
19
|
+
# Public plan name (HOBBY or SUPERAGENT).
|
|
20
20
|
attr_accessor :plan
|
|
21
21
|
|
|
22
22
|
# Maximum concurrent connections allowed
|
|
@@ -52,7 +52,7 @@ module Volcano::Generated
|
|
|
52
52
|
|
|
53
53
|
attr_accessor :enable_anonymous_signins
|
|
54
54
|
|
|
55
|
-
# Replaces the email domain allowlist. Empty array removes the restriction so any domain can sign up. Entries must be bare domains such as `domain1.com` and are stored normalized (lowercase, no `@` prefix); matching is exact, so subdomains need their own entry. At most 100 entries. Restricting signups is a
|
|
55
|
+
# Replaces the email domain allowlist. Empty array removes the restriction so any domain can sign up. Entries must be bare domains such as `domain1.com` and are stored normalized (lowercase, no `@` prefix); matching is exact, so subdomains need their own entry. At most 100 entries. Restricting signups is a SUPERAGENT feature to configure and to enforce: a HOBBY project can only remove the restriction and gets 403 for any other change, and the list it keeps is parked until it upgrades.
|
|
56
56
|
attr_accessor :allowed_email_domains
|
|
57
57
|
|
|
58
58
|
# How far `allowed_email_domains` reaches. `signup` gates account creation only. `signup_and_signin` also blocks sign-in for accounts outside the list; switching to it, or narrowing the list while in it, deletes the sessions of every account it locks out. `disabled` keeps the list without enforcing it.
|
|
@@ -5,7 +5,7 @@ require 'securerandom'
|
|
|
5
5
|
require 'tempfile'
|
|
6
6
|
require 'uri'
|
|
7
7
|
|
|
8
|
-
generated_load_path = File.expand_path('generated/lib', __dir__)
|
|
8
|
+
generated_load_path = File.expand_path('generated/lib', __dir__.to_s)
|
|
9
9
|
$LOAD_PATH.unshift(generated_load_path) unless $LOAD_PATH.include?(generated_load_path)
|
|
10
10
|
require 'volcano-generated'
|
|
11
11
|
|
|
@@ -17,8 +17,8 @@ end
|
|
|
17
17
|
# Public namespace for the Volcano Ruby SDK.
|
|
18
18
|
module Volcano
|
|
19
19
|
private_constant :Generated
|
|
20
|
-
require_relative 'generated_transport_upload_session_api'
|
|
21
20
|
require_relative 'generated_transport_support'
|
|
21
|
+
require_relative 'generated_transport_upload_session_api'
|
|
22
22
|
require_relative 'generated_transport_auth'
|
|
23
23
|
require_relative 'generated_transport_anonymous'
|
|
24
24
|
require_relative 'generated_transport_confirmation'
|
|
@@ -35,7 +35,6 @@ module Volcano
|
|
|
35
35
|
# Adapts the generated OpenAPI client to the stable SDK transport contract.
|
|
36
36
|
class GeneratedTransport
|
|
37
37
|
include ApiFactory
|
|
38
|
-
include LogTransport
|
|
39
38
|
include ValueNormalization
|
|
40
39
|
|
|
41
40
|
GeneratedApis = Data.define(
|
|
@@ -45,7 +44,7 @@ module Volcano
|
|
|
45
44
|
def initialize(api_url:, timeout: 60, api_factory: nil)
|
|
46
45
|
@api_url = api_url
|
|
47
46
|
@timeout = timeout
|
|
48
|
-
@api_factory = api_factory ||
|
|
47
|
+
@api_factory = api_factory || ->(authorization) { build_apis(authorization) }
|
|
49
48
|
end
|
|
50
49
|
|
|
51
50
|
def acquire_project_lock(authorization:, key:, ttl:, token:, request_id: SecureRandom.uuid)
|
|
@@ -112,7 +111,7 @@ module Volcano
|
|
|
112
111
|
def invoke
|
|
113
112
|
yield
|
|
114
113
|
rescue Generated::ApiError => e
|
|
115
|
-
status = e
|
|
114
|
+
status = error_status(e)
|
|
116
115
|
raise Error::TransportError.new(e.message), cause: e if status.zero?
|
|
117
116
|
|
|
118
117
|
Transport::Response.new(
|
|
@@ -123,6 +122,10 @@ module Volcano
|
|
|
123
122
|
)
|
|
124
123
|
end
|
|
125
124
|
|
|
125
|
+
def error_status(error)
|
|
126
|
+
error.code.to_i # rubocop:disable Lint/NumberConversion -- Preserve generated ApiError status coercion.
|
|
127
|
+
end
|
|
128
|
+
|
|
126
129
|
def response(data, status, headers, binary: nil)
|
|
127
130
|
Transport::Response.new(
|
|
128
131
|
status: status,
|
|
@@ -7,11 +7,10 @@ module Volcano
|
|
|
7
7
|
invoke do
|
|
8
8
|
apis = @api_factory.call(authorization)
|
|
9
9
|
request = Generated::AuthSignupAnonymousRequest.new(user_metadata: metadata)
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
auth_signup_anonymous_request: request
|
|
13
|
-
)
|
|
10
|
+
data, status, headers = apis.authentication.auth_signup_anonymous_with_http_info(
|
|
11
|
+
auth_signup_anonymous_request: request
|
|
14
12
|
)
|
|
13
|
+
response(data, status, headers)
|
|
15
14
|
end
|
|
16
15
|
end
|
|
17
16
|
|
|
@@ -19,12 +18,14 @@ module Volcano
|
|
|
19
18
|
invoke do
|
|
20
19
|
apis = @api_factory.call(authorization)
|
|
21
20
|
attributes = { email:, password:, user_metadata: metadata }
|
|
22
|
-
request = Generated::AuthSignupRequest.new(
|
|
21
|
+
request = Generated::AuthSignupRequest.new(email:, password:, user_metadata: metadata)
|
|
23
22
|
body, status, headers = apis.authentication.auth_convert_anonymous_with_http_info(
|
|
24
23
|
request,
|
|
25
24
|
debug_body: attributes,
|
|
26
25
|
debug_return_type: 'String'
|
|
27
26
|
)
|
|
27
|
+
raise TypeError unless body.is_a?(String)
|
|
28
|
+
|
|
28
29
|
response(JSON.parse(body), status, headers)
|
|
29
30
|
end
|
|
30
31
|
rescue JSON::ParserError, TypeError => e
|
|
@@ -14,7 +14,8 @@ module Volcano
|
|
|
14
14
|
password: password,
|
|
15
15
|
user_metadata: metadata
|
|
16
16
|
)
|
|
17
|
-
|
|
17
|
+
data, status, headers = apis.authentication.auth_signup_with_http_info(request)
|
|
18
|
+
response(data, status, headers)
|
|
18
19
|
end
|
|
19
20
|
end
|
|
20
21
|
|
|
@@ -32,11 +33,10 @@ module Volcano
|
|
|
32
33
|
invoke do
|
|
33
34
|
apis = @api_factory.call(authorization)
|
|
34
35
|
request = Generated::AuthForgotPasswordRequest.new(email: email)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
request, debug_return_type: 'String'
|
|
38
|
-
)
|
|
36
|
+
data, status, headers = apis.authentication.auth_forgot_password_with_http_info(
|
|
37
|
+
request, debug_return_type: 'String'
|
|
39
38
|
)
|
|
39
|
+
response(data, status, headers)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
42
|
|
|
@@ -44,11 +44,10 @@ module Volcano
|
|
|
44
44
|
invoke do
|
|
45
45
|
apis = @api_factory.call(authorization)
|
|
46
46
|
request = Generated::AuthResetPasswordRequest.new(token:, new_password:)
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
request, debug_return_type: 'String'
|
|
50
|
-
)
|
|
47
|
+
data, status, headers = apis.authentication.auth_reset_password_with_http_info(
|
|
48
|
+
request, debug_return_type: 'String'
|
|
51
49
|
)
|
|
50
|
+
response(data, status, headers)
|
|
52
51
|
end
|
|
53
52
|
end
|
|
54
53
|
|
|
@@ -58,6 +57,8 @@ module Volcano
|
|
|
58
57
|
body, status, headers = apis.authentication.auth_get_user_with_http_info(
|
|
59
58
|
debug_return_type: 'String'
|
|
60
59
|
)
|
|
60
|
+
raise TypeError unless body.is_a?(String)
|
|
61
|
+
|
|
61
62
|
response(JSON.parse(body), status, headers)
|
|
62
63
|
end
|
|
63
64
|
rescue JSON::ParserError, TypeError => e
|
|
@@ -67,9 +68,10 @@ module Volcano
|
|
|
67
68
|
def auth_update_user(authorization:, password:, metadata:)
|
|
68
69
|
invoke do
|
|
69
70
|
apis = @api_factory.call(authorization)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
)
|
|
71
|
+
options = update_user_options(password:, metadata:)
|
|
72
|
+
body, status, headers = apis.authentication.auth_update_user_with_http_info(options)
|
|
73
|
+
raise TypeError unless body.is_a?(String)
|
|
74
|
+
|
|
73
75
|
response(JSON.parse(body), status, headers)
|
|
74
76
|
end
|
|
75
77
|
rescue JSON::ParserError, TypeError => e
|
|
@@ -80,7 +82,8 @@ module Volcano
|
|
|
80
82
|
invoke do
|
|
81
83
|
apis = @api_factory.call(authorization)
|
|
82
84
|
request = Generated::AuthRefreshRequest.new(refresh_token: refresh_token)
|
|
83
|
-
|
|
85
|
+
data, status, headers = apis.authentication.auth_refresh_with_http_info(auth_refresh_request: request)
|
|
86
|
+
response(data, status, headers)
|
|
84
87
|
end
|
|
85
88
|
end
|
|
86
89
|
|
|
@@ -88,16 +91,15 @@ module Volcano
|
|
|
88
91
|
invoke do
|
|
89
92
|
apis = @api_factory.call(authorization)
|
|
90
93
|
request = Generated::AuthRefreshRequest.new(refresh_token: refresh_token)
|
|
91
|
-
|
|
94
|
+
data, status, headers = apis.authentication.auth_logout_with_http_info(auth_refresh_request: request)
|
|
95
|
+
response(data, status, headers)
|
|
92
96
|
end
|
|
93
97
|
end
|
|
94
98
|
|
|
95
99
|
private
|
|
96
100
|
|
|
97
101
|
def update_user_options(password:, metadata:)
|
|
98
|
-
attributes = {}
|
|
99
|
-
attributes[:password] = password unless password.nil?
|
|
100
|
-
attributes[:user_metadata] = metadata unless metadata.nil?
|
|
102
|
+
attributes = { password: password, user_metadata: metadata }.compact
|
|
101
103
|
{
|
|
102
104
|
auth_update_user_request: Generated::AuthUpdateUserRequest.new(attributes),
|
|
103
105
|
debug_body: attributes,
|