axhub-sdk 0.11.0 → 0.14.0
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/lib/axhub_sdk/operations.rb +2 -1
- data/lib/axhub_sdk/raw_db.rb +88 -0
- data/lib/axhub_sdk/version.rb +1 -1
- data/lib/axhub_sdk.rb +50 -11
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 67bbfecc3f9ceab5a20c5e35920623899eaf38d5acf54808cc846dee778a6bcc
|
|
4
|
+
data.tar.gz: '08d6f4a290545f52c5e7e4e27e62343964b5578f2aa3ebb287d58f3ce308bb9a'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c15edfcf2ba43df4ca9c25a101646dd79132263ce67b4cc194825ef16564c752ce71cc2e13f7dffa096942126265e59be5af30cf77a4e34e726ba29d3372c81
|
|
7
|
+
data.tar.gz: c04c21e280784aef401205493e2c69e844c6ddc0378f87f964fbaf6a6a2d3737cbad7af7e0c0b1f38fc97fc4e0cf84920d903b7744332a5426a2afe77552a33f
|
data/lib/axhub_sdk/operations.rb
CHANGED
|
@@ -16,7 +16,7 @@ module AxHub
|
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
class Client
|
|
19
|
-
attr_reader :identity, :tenants, :authz, :audit, :gateway, :data, :deployments
|
|
19
|
+
attr_reader :identity, :tenants, :authz, :audit, :gateway, :data, :deployments, :notifications
|
|
20
20
|
alias __axhub_original_initialize initialize unless method_defined?(:__axhub_original_initialize)
|
|
21
21
|
def initialize(*args, **kwargs)
|
|
22
22
|
__axhub_original_initialize(*args, **kwargs)
|
|
@@ -27,6 +27,7 @@ module AxHub
|
|
|
27
27
|
@gateway = OperationClient.new(self)
|
|
28
28
|
@data = OperationClient.new(self)
|
|
29
29
|
@deployments = OperationClient.new(self)
|
|
30
|
+
@notifications = OperationClient.new(self)
|
|
30
31
|
end
|
|
31
32
|
end
|
|
32
33
|
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module AxHub
|
|
4
|
+
# Typed, read-only DTOs + facade for an app's raw (physical Postgres) DB,
|
|
5
|
+
# mirroring the Go SDK's client.Apps.RawDb() and the Node SDK's sdk.apps.rawDb.
|
|
6
|
+
#
|
|
7
|
+
# Read-only: table introspection + row reads. Enabling raw DB and writing rows
|
|
8
|
+
# are separate concerns (writes go through the deployed app's DATABASE_URL,
|
|
9
|
+
# not this SDK).
|
|
10
|
+
RawDbColumn = Struct.new(:name, :data_type, :nullable)
|
|
11
|
+
RawDbTable = Struct.new(:name, :managed, :columns)
|
|
12
|
+
RawDbTableRows = Struct.new(:rows, :page, :per_page, :has_more)
|
|
13
|
+
|
|
14
|
+
# RawDbClient is the typed raw-DB read facade. Reach it via client.apps.raw_db.
|
|
15
|
+
# It wraps the generic transport (Client#request), which camelCases response
|
|
16
|
+
# keys, so the DTOs read camelCase wire keys (dataType/perPage/hasMore) and map
|
|
17
|
+
# them onto snake_case Struct fields.
|
|
18
|
+
class RawDbClient
|
|
19
|
+
def initialize(client)
|
|
20
|
+
@client = client
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Lists the raw DB tables for an app, with typed column metadata.
|
|
24
|
+
#
|
|
25
|
+
# F-3 empty semantics: a successful 2xx call that returns an empty array
|
|
26
|
+
# means the app genuinely has no raw DB tables (raw DB is not enabled, or it
|
|
27
|
+
# has zero tables). A 4xx authentication/permission failure raises
|
|
28
|
+
# AxHub::Error instead — so an empty array WITHOUT a raised error means
|
|
29
|
+
# "empty", not "auth failed" (resolving the ambiguity the raw response
|
|
30
|
+
# leaves).
|
|
31
|
+
def tables(app_id)
|
|
32
|
+
raise Error.new(category: 'validation', code: 'required', message: 'appID is required') if app_id.nil? || app_id.empty?
|
|
33
|
+
|
|
34
|
+
resp = @client.request('schemaGetApiV1AppsByAppIDDbTables', path_params: { appID: app_id })
|
|
35
|
+
(field(resp, 'tables') || []).map { |t| parse_table(t) }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
# Reads one page of rows from a raw DB table. per_page/page are forwarded as
|
|
39
|
+
# query params only when set (non-nil); nil uses the backend default page
|
|
40
|
+
# size.
|
|
41
|
+
def table_rows(app_id, table, per_page: nil, page: nil)
|
|
42
|
+
raise Error.new(category: 'validation', code: 'required', message: 'appID and table are required') if app_id.nil? || app_id.empty? || table.nil? || table.empty?
|
|
43
|
+
|
|
44
|
+
query = {}
|
|
45
|
+
query['per_page'] = per_page unless per_page.nil?
|
|
46
|
+
query['page'] = page unless page.nil?
|
|
47
|
+
resp = @client.request('schemaGetApiV1AppsByAppIDDbTablesByTableRows', path_params: { appID: app_id, table: table }, query: query)
|
|
48
|
+
RawDbTableRows.new(
|
|
49
|
+
field(resp, 'rows') || [],
|
|
50
|
+
field(resp, 'page'),
|
|
51
|
+
field(resp, 'perPage'),
|
|
52
|
+
field(resp, 'hasMore')
|
|
53
|
+
)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
private
|
|
57
|
+
|
|
58
|
+
# Read a camelCase response key, tolerating string or symbol keys and
|
|
59
|
+
# preserving false/absent values (no ||-defaulting, so `false` survives).
|
|
60
|
+
def field(hash, key)
|
|
61
|
+
return nil unless hash.is_a?(Hash)
|
|
62
|
+
return hash[key] if hash.key?(key)
|
|
63
|
+
|
|
64
|
+
sym = key.to_sym
|
|
65
|
+
hash.key?(sym) ? hash[sym] : nil
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def parse_table(raw)
|
|
69
|
+
RawDbTable.new(
|
|
70
|
+
field(raw, 'name'),
|
|
71
|
+
field(raw, 'managed'),
|
|
72
|
+
(field(raw, 'columns') || []).map { |c| parse_column(c) }
|
|
73
|
+
)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def parse_column(raw)
|
|
77
|
+
RawDbColumn.new(field(raw, 'name'), field(raw, 'dataType'), field(raw, 'nullable'))
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
class AppsClient
|
|
82
|
+
# Typed, read-only raw-DB facade (client.apps.raw_db). Mirrors Go's
|
|
83
|
+
# client.Apps.RawDb() / Node's sdk.apps.rawDb.
|
|
84
|
+
def raw_db
|
|
85
|
+
@raw_db ||= RawDbClient.new(@client)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
data/lib/axhub_sdk/version.rb
CHANGED
data/lib/axhub_sdk.rb
CHANGED
|
@@ -19,6 +19,12 @@ module AxHub
|
|
|
19
19
|
{ 'method' => "GET", 'path' => "/.well-known/jwks.json", 'tag' => "Auth", 'operationId' => "authGetWellKnownJwksJson" },
|
|
20
20
|
{ 'method' => "GET", 'path' => "/.well-known/oauth-authorization-server", 'tag' => "Auth", 'operationId' => "authGetWellKnownOauthAuthorizationServer" },
|
|
21
21
|
{ 'method' => "GET", 'path' => "/.well-known/openid-configuration", 'tag' => "Auth", 'operationId' => "authGetWellKnownOpenidConfiguration" },
|
|
22
|
+
{ 'method' => "GET", 'path' => "/api/v1/access-requests", 'tag' => "Apps", 'operationId' => "appsGetApiV1AccessRequests" },
|
|
23
|
+
{ 'method' => "POST", 'path' => "/api/v1/access-requests", 'tag' => "Apps", 'operationId' => "appsPostApiV1AccessRequests" },
|
|
24
|
+
{ 'method' => "PATCH", 'path' => "/api/v1/access-requests/{id}/approve", 'tag' => "Apps", 'operationId' => "appsPatchApiV1AccessRequestsByIdApprove" },
|
|
25
|
+
{ 'method' => "PATCH", 'path' => "/api/v1/access-requests/{id}/reject", 'tag' => "Apps", 'operationId' => "appsPatchApiV1AccessRequestsByIdReject" },
|
|
26
|
+
{ 'method' => "POST", 'path' => "/api/v1/app/mails", 'tag' => "Notifications", 'operationId' => "notificationsPostApiV1AppMails" },
|
|
27
|
+
{ 'method' => "POST", 'path' => "/api/v1/app/notifications", 'tag' => "Notifications", 'operationId' => "notificationsPostApiV1AppNotifications" },
|
|
22
28
|
{ 'method' => "DELETE", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsDeleteApiV1AppsByAppID" },
|
|
23
29
|
{ 'method' => "GET", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppID" },
|
|
24
30
|
{ 'method' => "PATCH", 'path' => "/api/v1/apps/{appID}", 'tag' => "Apps", 'operationId' => "appsPatchApiV1AppsByAppID" },
|
|
@@ -34,6 +40,7 @@ module AxHub
|
|
|
34
40
|
{ 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeployments" },
|
|
35
41
|
{ 'method' => "GET", 'path' => "/api/v1/apps/{appID}/deployments/{did}", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDDeploymentsByDid" },
|
|
36
42
|
{ 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments/{did}/cancel", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeploymentsByDidCancel" },
|
|
43
|
+
{ 'method' => "GET", 'path' => "/api/v1/apps/{appID}/deployments/{did}/diagnoses", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDDeploymentsByDidDiagnoses" },
|
|
37
44
|
{ 'method' => "POST", 'path' => "/api/v1/apps/{appID}/deployments/{did}/rollback", 'tag' => "Deploy", 'operationId' => "deployPostApiV1AppsByAppIDDeploymentsByDidRollback" },
|
|
38
45
|
{ 'method' => "GET", 'path' => "/api/v1/apps/{appID}/diagnosis", 'tag' => "Deploy", 'operationId' => "deployGetApiV1AppsByAppIDDiagnosis" },
|
|
39
46
|
{ 'method' => "GET", 'path' => "/api/v1/apps/{appID}/env-vars", 'tag' => "Apps", 'operationId' => "appsGetApiV1AppsByAppIDEnvVars" },
|
|
@@ -67,6 +74,9 @@ module AxHub
|
|
|
67
74
|
{ 'method' => "GET", 'path' => "/api/v1/me/apps/owned", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsOwned" },
|
|
68
75
|
{ 'method' => "GET", 'path' => "/api/v1/me/apps/received", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsReceived" },
|
|
69
76
|
{ 'method' => "GET", 'path' => "/api/v1/me/apps/workspace", 'tag' => "Apps", 'operationId' => "appsGetApiV1MeAppsWorkspace" },
|
|
77
|
+
{ 'method' => "GET", 'path' => "/api/v1/me/notifications", 'tag' => "Notifications", 'operationId' => "notificationsGetApiV1MeNotifications" },
|
|
78
|
+
{ 'method' => "POST", 'path' => "/api/v1/me/notifications/{notificationID}/read", 'tag' => "Notifications", 'operationId' => "notificationsPostApiV1MeNotificationsByNotificationIDRead" },
|
|
79
|
+
{ 'method' => "POST", 'path' => "/api/v1/me/notifications/read-all", 'tag' => "Notifications", 'operationId' => "notificationsPostApiV1MeNotificationsReadAll" },
|
|
70
80
|
{ 'method' => "GET", 'path' => "/api/v1/me/personal-access-tokens", 'tag' => "Schema", 'operationId' => "schemaGetApiV1MePersonalAccessTokens" },
|
|
71
81
|
{ 'method' => "POST", 'path' => "/api/v1/me/personal-access-tokens", 'tag' => "Schema", 'operationId' => "schemaPostApiV1MePersonalAccessTokens" },
|
|
72
82
|
{ 'method' => "DELETE", 'path' => "/api/v1/me/personal-access-tokens/{patID}", 'tag' => "Schema", 'operationId' => "schemaDeleteApiV1MePersonalAccessTokensByPatID" },
|
|
@@ -120,31 +130,43 @@ module AxHub
|
|
|
120
130
|
"already_suspended" => ErrorInfo.new("conflict", 409, false),
|
|
121
131
|
"already_terminal" => ErrorInfo.new("conflict", 409, false),
|
|
122
132
|
"app_archived" => ErrorInfo.new("precondition_failed", 412, false),
|
|
133
|
+
"app_suspended" => ErrorInfo.new("precondition_failed", 412, false),
|
|
123
134
|
"app_unavailable" => ErrorInfo.new("conflict", 409, false),
|
|
124
135
|
"auth_expired" => ErrorInfo.new("unavailable", 503, false),
|
|
136
|
+
"axrouter_disabled" => ErrorInfo.new("conflict", 409, false),
|
|
125
137
|
"bad_request" => ErrorInfo.new("validation", 400, false),
|
|
126
138
|
"build_env_no_override" => ErrorInfo.new("validation", 400, false),
|
|
127
139
|
"cannot_reactivate" => ErrorInfo.new("conflict", 409, false),
|
|
128
|
-
"charge_failed" => ErrorInfo.new("
|
|
140
|
+
"charge_failed" => ErrorInfo.new("payment_required", 402, false),
|
|
129
141
|
"confirm_required" => ErrorInfo.new("precondition_failed", 412, false),
|
|
130
142
|
"conflict" => ErrorInfo.new("conflict", 409, false),
|
|
131
143
|
"connector_inactive" => ErrorInfo.new("permission_denied", 403, false),
|
|
144
|
+
"consent_required" => ErrorInfo.new("precondition_failed", 412, false),
|
|
132
145
|
"cross_tenant" => ErrorInfo.new("validation", 400, false),
|
|
146
|
+
"directory_not_ready" => ErrorInfo.new("conflict", 409, true),
|
|
147
|
+
"directory_source_conflict" => ErrorInfo.new("conflict", 409, false),
|
|
133
148
|
"domain_blocked" => ErrorInfo.new("precondition_failed", 422, false),
|
|
134
149
|
"domain_taken" => ErrorInfo.new("conflict", 409, false),
|
|
135
150
|
"duplicate" => ErrorInfo.new("validation", 400, false),
|
|
151
|
+
"egress_blocked" => ErrorInfo.new("validation", 400, false),
|
|
136
152
|
"empty" => ErrorInfo.new("validation", 400, false),
|
|
137
153
|
"exceeds_max" => ErrorInfo.new("conflict", 409, false),
|
|
138
154
|
"expiry_in_past" => ErrorInfo.new("validation", 400, false),
|
|
155
|
+
"feature_disabled" => ErrorInfo.new("permission_denied", 403, false),
|
|
139
156
|
"feature_not_in_plan" => ErrorInfo.new("permission_denied", 403, false),
|
|
140
157
|
"final_visibility_too_wide" => ErrorInfo.new("validation", 400, false),
|
|
141
158
|
"forbidden" => ErrorInfo.new("permission_denied", 403, false),
|
|
142
159
|
"git_connection_required" => ErrorInfo.new("precondition_failed", 412, false),
|
|
143
160
|
"github_device_flow_disabled" => ErrorInfo.new("unavailable", 503, false),
|
|
161
|
+
"google_access_denied" => ErrorInfo.new("validation", 400, false),
|
|
162
|
+
"google_domain_taken" => ErrorInfo.new("conflict", 409, false),
|
|
163
|
+
"google_membership_required" => ErrorInfo.new("validation", 400, false),
|
|
164
|
+
"google_not_registered" => ErrorInfo.new("validation", 400, false),
|
|
144
165
|
"grant_already_terminal" => ErrorInfo.new("conflict", 409, false),
|
|
145
166
|
"grant_conflict" => ErrorInfo.new("conflict", 409, false),
|
|
146
167
|
"grant_expired" => ErrorInfo.new("permission_denied", 403, false),
|
|
147
168
|
"grant_revoked" => ErrorInfo.new("permission_denied", 403, false),
|
|
169
|
+
"group_scim_managed" => ErrorInfo.new("conflict", 409, false),
|
|
148
170
|
"internal_error" => ErrorInfo.new("internal", 500, false),
|
|
149
171
|
"invalid_drive" => ErrorInfo.new("validation", 400, false),
|
|
150
172
|
"invalid_entitlement" => ErrorInfo.new("validation", 400, false),
|
|
@@ -155,15 +177,18 @@ module AxHub
|
|
|
155
177
|
"invalid_seat_count" => ErrorInfo.new("validation", 400, false),
|
|
156
178
|
"invalid_state_transition" => ErrorInfo.new("conflict", 409, false),
|
|
157
179
|
"invalid_target" => ErrorInfo.new("conflict", 409, false),
|
|
180
|
+
"invalid_tls_mode" => ErrorInfo.new("validation", 400, false),
|
|
181
|
+
"invalid_token" => ErrorInfo.new("unauthenticated", 401, false),
|
|
158
182
|
"invalid_value" => ErrorInfo.new("validation", 400, false),
|
|
159
183
|
"invitation_expired" => ErrorInfo.new("not_found", 410, false),
|
|
160
184
|
"kind_engine_mismatch" => ErrorInfo.new("validation", 400, false),
|
|
161
185
|
"last_admin" => ErrorInfo.new("conflict", 409, false),
|
|
162
186
|
"link_invalid" => ErrorInfo.new("not_found", 404, false),
|
|
187
|
+
"member_inactive" => ErrorInfo.new("permission_denied", 403, false),
|
|
163
188
|
"no_active_grant" => ErrorInfo.new("not_found", 404, false),
|
|
164
189
|
"no_available_seat" => ErrorInfo.new("conflict", 409, false),
|
|
165
|
-
"no_billing_key" => ErrorInfo.new("
|
|
166
|
-
"no_payment_method" => ErrorInfo.new("
|
|
190
|
+
"no_billing_key" => ErrorInfo.new("payment_required", 402, false),
|
|
191
|
+
"no_payment_method" => ErrorInfo.new("payment_required", 402, false),
|
|
167
192
|
"not_admin" => ErrorInfo.new("permission_denied", 403, false),
|
|
168
193
|
"not_allowed" => ErrorInfo.new("validation", 400, false),
|
|
169
194
|
"not_deleted" => ErrorInfo.new("conflict", 409, false),
|
|
@@ -173,8 +198,8 @@ module AxHub
|
|
|
173
198
|
"not_promotable" => ErrorInfo.new("precondition_failed", 412, false),
|
|
174
199
|
"not_suspended" => ErrorInfo.new("conflict", 409, false),
|
|
175
200
|
"oauth_denied" => ErrorInfo.new("validation", 400, false),
|
|
176
|
-
"payment_failed" => ErrorInfo.new("
|
|
177
|
-
"payment_required" => ErrorInfo.new("
|
|
201
|
+
"payment_failed" => ErrorInfo.new("payment_required", 402, false),
|
|
202
|
+
"payment_required" => ErrorInfo.new("payment_required", 402, false),
|
|
178
203
|
"pending_exists" => ErrorInfo.new("conflict", 409, false),
|
|
179
204
|
"pending_review_exists" => ErrorInfo.new("precondition_failed", 412, false),
|
|
180
205
|
"permanently_deleted" => ErrorInfo.new("not_found", 410, false),
|
|
@@ -182,33 +207,45 @@ module AxHub
|
|
|
182
207
|
"precondition_failed" => ErrorInfo.new("precondition_failed", 412, false),
|
|
183
208
|
"preset_in_use" => ErrorInfo.new("conflict", 409, false),
|
|
184
209
|
"preset_mismatch" => ErrorInfo.new("validation", 400, false),
|
|
185
|
-
"preset_not_in_plan" => ErrorInfo.new("
|
|
210
|
+
"preset_not_in_plan" => ErrorInfo.new("payment_required", 402, false),
|
|
186
211
|
"prod_deploy_required" => ErrorInfo.new("precondition_failed", 412, false),
|
|
187
212
|
"promote_in_progress" => ErrorInfo.new("precondition_failed", 412, true),
|
|
188
|
-
"
|
|
213
|
+
"promote_snapshot_missing" => ErrorInfo.new("precondition_failed", 412, false),
|
|
214
|
+
"quota_exceeded" => ErrorInfo.new("payment_required", 402, false),
|
|
215
|
+
"rate_limited" => ErrorInfo.new("rate_limited", 429, true),
|
|
216
|
+
"raw_db_not_enabled" => ErrorInfo.new("conflict", 409, false),
|
|
189
217
|
"required" => ErrorInfo.new("validation", 400, false),
|
|
190
|
-
"resource_quota_exceeded" => ErrorInfo.new("
|
|
218
|
+
"resource_quota_exceeded" => ErrorInfo.new("payment_required", 402, false),
|
|
191
219
|
"schema_name_taken" => ErrorInfo.new("conflict", 409, false),
|
|
192
220
|
"seat_in_use" => ErrorInfo.new("conflict", 409, false),
|
|
193
|
-
"seat_unassigned" => ErrorInfo.new("
|
|
221
|
+
"seat_unassigned" => ErrorInfo.new("payment_required", 402, false),
|
|
194
222
|
"seats_not_supported" => ErrorInfo.new("conflict", 409, false),
|
|
195
223
|
"session_ended" => ErrorInfo.new("unauthenticated", 401, true),
|
|
196
224
|
"session_expired" => ErrorInfo.new("unauthenticated", 401, true),
|
|
225
|
+
"site_has_connectors" => ErrorInfo.new("conflict", 409, false),
|
|
226
|
+
"site_offline" => ErrorInfo.new("unavailable", 502, true),
|
|
227
|
+
"slug_brand_protected" => ErrorInfo.new("permission_denied", 403, false),
|
|
228
|
+
"slug_reserved" => ErrorInfo.new("validation", 400, false),
|
|
197
229
|
"slug_taken" => ErrorInfo.new("conflict", 409, false),
|
|
198
230
|
"staging_already_enabled" => ErrorInfo.new("conflict", 409, false),
|
|
199
231
|
"staging_mismatch" => ErrorInfo.new("precondition_failed", 412, false),
|
|
232
|
+
"staging_namespace_too_long" => ErrorInfo.new("precondition_failed", 412, false),
|
|
200
233
|
"staging_not_enabled" => ErrorInfo.new("precondition_failed", 412, false),
|
|
201
234
|
"staging_required" => ErrorInfo.new("precondition_failed", 412, false),
|
|
202
235
|
"static_release_in_use" => ErrorInfo.new("conflict", 409, false),
|
|
203
236
|
"static_release_not_ready" => ErrorInfo.new("precondition_failed", 412, false),
|
|
204
237
|
"subdomain_not_configured" => ErrorInfo.new("precondition_failed", 412, false),
|
|
238
|
+
"synology_invalid_credential" => ErrorInfo.new("validation", 400, false),
|
|
239
|
+
"synology_probe_failed" => ErrorInfo.new("unavailable", 502, true),
|
|
240
|
+
"synology_relay_unreachable" => ErrorInfo.new("validation", 502, false),
|
|
205
241
|
"temporarily_unavailable" => ErrorInfo.new("unavailable", 429, true),
|
|
206
242
|
"token_expired" => ErrorInfo.new("unauthenticated", 401, true),
|
|
207
243
|
"token_invalid" => ErrorInfo.new("unauthenticated", 401, true),
|
|
208
244
|
"token_missing" => ErrorInfo.new("unauthenticated", 401, true),
|
|
209
245
|
"too_long" => ErrorInfo.new("validation", 400, false),
|
|
246
|
+
"unknown_feature_key" => ErrorInfo.new("validation", 400, false),
|
|
210
247
|
"unknown_plan" => ErrorInfo.new("not_found", 404, false),
|
|
211
|
-
"unpaid_balance" => ErrorInfo.new("
|
|
248
|
+
"unpaid_balance" => ErrorInfo.new("payment_required", 402, false),
|
|
212
249
|
"unsupported_for_static_app" => ErrorInfo.new("conflict", 409, false),
|
|
213
250
|
"version_not_approved" => ErrorInfo.new("permission_denied", 403, false),
|
|
214
251
|
"visibility_widen_not_allowed" => ErrorInfo.new("conflict", 409, false),
|
|
@@ -305,9 +342,11 @@ module AxHub
|
|
|
305
342
|
return 'gateway' if ['Gateway', 'Config'].include?(tag)
|
|
306
343
|
return 'data' if tag == 'Schema'
|
|
307
344
|
return 'deployments' if ['Deploy', 'deploy'].include?(tag)
|
|
345
|
+
return 'notifications' if tag == 'Notifications'
|
|
308
346
|
raise ArgumentError, "unmapped route tag: #{tag}"
|
|
309
347
|
end
|
|
310
|
-
CONTEXT_ROUTES = %w[apps identity tenants authz audit gateway data deployments].map { |name| [name, ROUTES.select { |route| context_name(route) == name }] }.to_h
|
|
348
|
+
CONTEXT_ROUTES = %w[apps identity tenants authz audit gateway data deployments notifications].map { |name| [name, ROUTES.select { |route| context_name(route) == name }] }.to_h
|
|
311
349
|
end
|
|
312
350
|
|
|
313
351
|
require_relative 'axhub_sdk/operations'
|
|
352
|
+
require_relative 'axhub_sdk/raw_db'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: axhub-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.14.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jocoding AX Partners
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-07-
|
|
11
|
+
date: 2026-07-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|
|
@@ -51,6 +51,7 @@ files:
|
|
|
51
51
|
- axhub-sdk.gemspec
|
|
52
52
|
- lib/axhub_sdk.rb
|
|
53
53
|
- lib/axhub_sdk/operations.rb
|
|
54
|
+
- lib/axhub_sdk/raw_db.rb
|
|
54
55
|
- lib/axhub_sdk/version.rb
|
|
55
56
|
homepage: https://github.com/jocoding-ax-partners/axhub-sdk-ruby
|
|
56
57
|
licenses:
|