edgebase_admin 0.1.5 → 0.2.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/edgebase_admin/generated/admin_api_core.rb +25 -5
- data/lib/edgebase_admin/push_client.rb +11 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae6474c48014a24221ede05706ddf6776ea5115dd6667cb4851e64bfa7003460
|
|
4
|
+
data.tar.gz: bc20037da2984bfdfc36df4d0b1477e16a7ee2c61858952ef7371715da5aa4f7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ad7449c97a7b49114fb95959b8b9e31d0aa549ec5605857502c02266ff4bf346d03c2c9c771540247a5432e20c8d4d7663e1d0ed48e2a41f457198aa4a979876
|
|
7
|
+
data.tar.gz: 58369855c050d32eb73c5bc225387e169ad9ef987bc049aaa9e64858d3a4a521aa6f98bb4caad94a44d0465c419a9fd012ec864f4c7793b0034bb318d2549032
|
|
@@ -265,6 +265,11 @@ module EdgebaseAdmin
|
|
|
265
265
|
@http.get("/admin/api/data/schema")
|
|
266
266
|
end
|
|
267
267
|
|
|
268
|
+
# List instance suggestions for a dynamic namespace — GET /admin/api/data/namespaces/{namespace}/instances
|
|
269
|
+
def admin_list_namespace_instances(namespace, query: nil)
|
|
270
|
+
@http.get("/admin/api/data/namespaces/#{CGI.escape(namespace).gsub('+', '%20')}/instances", params: query)
|
|
271
|
+
end
|
|
272
|
+
|
|
268
273
|
# Export table data as JSON — GET /admin/api/data/tables/{name}/export
|
|
269
274
|
def admin_export_table(name)
|
|
270
275
|
@http.get("/admin/api/data/tables/#{CGI.escape(name).gsub('+', '%20')}/export")
|
|
@@ -275,14 +280,14 @@ module EdgebaseAdmin
|
|
|
275
280
|
@http.get("/admin/api/data/logs")
|
|
276
281
|
end
|
|
277
282
|
|
|
278
|
-
# Get
|
|
283
|
+
# Get live monitoring stats — GET /admin/api/data/monitoring
|
|
279
284
|
def admin_get_monitoring()
|
|
280
285
|
@http.get("/admin/api/data/monitoring")
|
|
281
286
|
end
|
|
282
287
|
|
|
283
288
|
# Get analytics dashboard data — GET /admin/api/data/analytics
|
|
284
|
-
def admin_get_analytics()
|
|
285
|
-
@http.get("/admin/api/data/analytics")
|
|
289
|
+
def admin_get_analytics(query: nil)
|
|
290
|
+
@http.get("/admin/api/data/analytics", params: query)
|
|
286
291
|
end
|
|
287
292
|
|
|
288
293
|
# Query analytics events for admin dashboard — GET /admin/api/data/analytics/events
|
|
@@ -291,8 +296,8 @@ module EdgebaseAdmin
|
|
|
291
296
|
end
|
|
292
297
|
|
|
293
298
|
# Get project overview for dashboard home — GET /admin/api/data/overview
|
|
294
|
-
def admin_get_overview()
|
|
295
|
-
@http.get("/admin/api/data/overview")
|
|
299
|
+
def admin_get_overview(query: nil)
|
|
300
|
+
@http.get("/admin/api/data/overview", params: query)
|
|
296
301
|
end
|
|
297
302
|
|
|
298
303
|
# Get dev mode status and sidecar port — GET /admin/api/data/dev-info
|
|
@@ -395,6 +400,16 @@ module EdgebaseAdmin
|
|
|
395
400
|
@http.post("/admin/api/data/backup/restore-d1", body)
|
|
396
401
|
end
|
|
397
402
|
|
|
403
|
+
# Dump data namespace tables for admin-side migrations — POST /admin/api/data/backup/dump-data
|
|
404
|
+
def admin_backup_dump_data(body = nil)
|
|
405
|
+
@http.post("/admin/api/data/backup/dump-data", body)
|
|
406
|
+
end
|
|
407
|
+
|
|
408
|
+
# Restore data namespace tables for admin-side migrations — POST /admin/api/data/backup/restore-data
|
|
409
|
+
def admin_backup_restore_data(body = nil)
|
|
410
|
+
@http.post("/admin/api/data/backup/restore-data", body)
|
|
411
|
+
end
|
|
412
|
+
|
|
398
413
|
# Get backup config — GET /admin/api/data/backup/config
|
|
399
414
|
def admin_backup_get_config()
|
|
400
415
|
@http.get("/admin/api/data/backup/config")
|
|
@@ -420,6 +435,11 @@ module EdgebaseAdmin
|
|
|
420
435
|
@http.put("/admin/api/data/admins/#{CGI.escape(id).gsub('+', '%20')}/password", body)
|
|
421
436
|
end
|
|
422
437
|
|
|
438
|
+
# Delete all Cloudflare resources and the Worker itself (self-destruct) — POST /admin/api/data/destroy-app
|
|
439
|
+
def admin_destroy_app(body = nil)
|
|
440
|
+
@http.post("/admin/api/data/destroy-app", body)
|
|
441
|
+
end
|
|
442
|
+
|
|
423
443
|
# List all DO instances — POST /admin/api/backup/list-dos
|
|
424
444
|
def backup_list_dos(body = nil)
|
|
425
445
|
@http.post("/admin/api/backup/list-dos", body)
|
|
@@ -25,8 +25,17 @@ module EdgebaseAdmin
|
|
|
25
25
|
end
|
|
26
26
|
|
|
27
27
|
# Send a push notification directly to a specific FCM token.
|
|
28
|
-
def send_to_token(token, payload, platform: nil)
|
|
29
|
-
|
|
28
|
+
def send_to_token(token, payload = nil, platform: nil, **payload_keywords)
|
|
29
|
+
normalized_payload =
|
|
30
|
+
if payload.is_a?(Hash)
|
|
31
|
+
payload.merge(payload_keywords.transform_keys(&:to_s))
|
|
32
|
+
elsif payload.nil? && !payload_keywords.empty?
|
|
33
|
+
payload_keywords.transform_keys(&:to_s)
|
|
34
|
+
else
|
|
35
|
+
payload || {}
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
body = { "token" => token, "payload" => normalized_payload }
|
|
30
39
|
body["platform"] = platform if platform
|
|
31
40
|
@admin_core.push_send_to_token(body)
|
|
32
41
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edgebase_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- EdgeBase
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-03-
|
|
11
|
+
date: 2026-03-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: edgebase_core
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 0.
|
|
19
|
+
version: 0.2.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 0.
|
|
26
|
+
version: 0.2.0
|
|
27
27
|
description: Admin module for EdgeBase Ruby SDK. Provides AdminClient, AdminAuthClient,
|
|
28
28
|
KvClient, D1Client, VectorizeClient, PushClient via Service Key auth.
|
|
29
29
|
email:
|