@jsonbored/metagraphed 0.1.0 → 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.
- package/dist/index.d.cts +138 -0
- package/dist/index.d.ts +138 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -700,6 +700,23 @@ interface paths {
|
|
|
700
700
|
patch?: never;
|
|
701
701
|
trace?: never;
|
|
702
702
|
};
|
|
703
|
+
"/api/v1/subnets/{netuid}/health/trends": {
|
|
704
|
+
parameters: {
|
|
705
|
+
query?: never;
|
|
706
|
+
header?: never;
|
|
707
|
+
path?: never;
|
|
708
|
+
cookie?: never;
|
|
709
|
+
};
|
|
710
|
+
/** Fetch 7d/30d uptime and latency trends for one subnet's operational surfaces (computed live from D1). */
|
|
711
|
+
get: operations["subnetHealthTrends"];
|
|
712
|
+
put?: never;
|
|
713
|
+
post?: never;
|
|
714
|
+
delete?: never;
|
|
715
|
+
options?: never;
|
|
716
|
+
head?: never;
|
|
717
|
+
patch?: never;
|
|
718
|
+
trace?: never;
|
|
719
|
+
};
|
|
703
720
|
"/api/v1/subnets/{netuid}/overview": {
|
|
704
721
|
parameters: {
|
|
705
722
|
query?: never;
|
|
@@ -1375,6 +1392,30 @@ interface components {
|
|
|
1375
1392
|
url: string;
|
|
1376
1393
|
verified_at?: string | null;
|
|
1377
1394
|
};
|
|
1395
|
+
HealthTrendsArtifact: {
|
|
1396
|
+
netuid: number;
|
|
1397
|
+
observed_at?: string | null;
|
|
1398
|
+
schema_version: number;
|
|
1399
|
+
source: string;
|
|
1400
|
+
windows: {
|
|
1401
|
+
[key: string]: {
|
|
1402
|
+
samples: number;
|
|
1403
|
+
surfaces: ({
|
|
1404
|
+
avg_latency_ms: number | null;
|
|
1405
|
+
samples: number;
|
|
1406
|
+
surface_id: string;
|
|
1407
|
+
uptime_ratio: number | null;
|
|
1408
|
+
} & {
|
|
1409
|
+
[key: string]: unknown;
|
|
1410
|
+
})[];
|
|
1411
|
+
uptime_ratio: number | null;
|
|
1412
|
+
} & {
|
|
1413
|
+
[key: string]: unknown;
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
} & {
|
|
1417
|
+
[key: string]: unknown;
|
|
1418
|
+
};
|
|
1378
1419
|
JsonObject: {
|
|
1379
1420
|
[key: string]: unknown;
|
|
1380
1421
|
};
|
|
@@ -1399,6 +1440,33 @@ interface components {
|
|
|
1399
1440
|
} & {
|
|
1400
1441
|
[key: string]: unknown;
|
|
1401
1442
|
};
|
|
1443
|
+
OperationalSurfacesArtifact: components["schemas"]["ArtifactBase"] & ({
|
|
1444
|
+
kinds: string[];
|
|
1445
|
+
surface_count: number;
|
|
1446
|
+
surfaces: ({
|
|
1447
|
+
auth_required?: boolean;
|
|
1448
|
+
authority?: string;
|
|
1449
|
+
kind: string;
|
|
1450
|
+
netuid: number;
|
|
1451
|
+
probe: {
|
|
1452
|
+
expect: string;
|
|
1453
|
+
method: string;
|
|
1454
|
+
timeout_ms?: number | null;
|
|
1455
|
+
} & {
|
|
1456
|
+
[key: string]: unknown;
|
|
1457
|
+
};
|
|
1458
|
+
provider?: string;
|
|
1459
|
+
public_safe?: boolean;
|
|
1460
|
+
subnet_name?: string;
|
|
1461
|
+
subnet_slug?: string;
|
|
1462
|
+
surface_id: string;
|
|
1463
|
+
url: string;
|
|
1464
|
+
} & {
|
|
1465
|
+
[key: string]: unknown;
|
|
1466
|
+
})[];
|
|
1467
|
+
} & {
|
|
1468
|
+
[key: string]: unknown;
|
|
1469
|
+
});
|
|
1402
1470
|
PaginationMeta: {
|
|
1403
1471
|
collection: string;
|
|
1404
1472
|
cursor: number;
|
|
@@ -5554,6 +5622,76 @@ interface operations {
|
|
|
5554
5622
|
};
|
|
5555
5623
|
};
|
|
5556
5624
|
};
|
|
5625
|
+
subnetHealthTrends: {
|
|
5626
|
+
parameters: {
|
|
5627
|
+
query?: never;
|
|
5628
|
+
header?: never;
|
|
5629
|
+
path: {
|
|
5630
|
+
netuid: number;
|
|
5631
|
+
};
|
|
5632
|
+
cookie?: never;
|
|
5633
|
+
};
|
|
5634
|
+
requestBody?: never;
|
|
5635
|
+
responses: {
|
|
5636
|
+
/** @description Canonical artifact wrapped in the Metagraphed API envelope. */
|
|
5637
|
+
200: {
|
|
5638
|
+
headers: {
|
|
5639
|
+
"cache-control": components["headers"]["CacheControl"];
|
|
5640
|
+
etag: components["headers"]["ETag"];
|
|
5641
|
+
"x-metagraph-contract-version": components["headers"]["ContractVersion"];
|
|
5642
|
+
[name: string]: unknown;
|
|
5643
|
+
};
|
|
5644
|
+
content: {
|
|
5645
|
+
"application/json": components["schemas"]["SuccessEnvelope"] & {
|
|
5646
|
+
data?: components["schemas"]["HealthTrendsArtifact"];
|
|
5647
|
+
};
|
|
5648
|
+
};
|
|
5649
|
+
};
|
|
5650
|
+
/** @description ETag matched and the cached response is still valid. */
|
|
5651
|
+
304: {
|
|
5652
|
+
headers: {
|
|
5653
|
+
[name: string]: unknown;
|
|
5654
|
+
};
|
|
5655
|
+
content?: never;
|
|
5656
|
+
};
|
|
5657
|
+
/** @description Query parameters were malformed or unsupported. */
|
|
5658
|
+
400: {
|
|
5659
|
+
headers: {
|
|
5660
|
+
[name: string]: unknown;
|
|
5661
|
+
};
|
|
5662
|
+
content: {
|
|
5663
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5664
|
+
};
|
|
5665
|
+
};
|
|
5666
|
+
/** @description Artifact or API route was not found. */
|
|
5667
|
+
404: {
|
|
5668
|
+
headers: {
|
|
5669
|
+
[name: string]: unknown;
|
|
5670
|
+
};
|
|
5671
|
+
content: {
|
|
5672
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5673
|
+
};
|
|
5674
|
+
};
|
|
5675
|
+
/** @description HTTP method is not supported. */
|
|
5676
|
+
405: {
|
|
5677
|
+
headers: {
|
|
5678
|
+
[name: string]: unknown;
|
|
5679
|
+
};
|
|
5680
|
+
content: {
|
|
5681
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5682
|
+
};
|
|
5683
|
+
};
|
|
5684
|
+
/** @description Unexpected backend error. */
|
|
5685
|
+
500: {
|
|
5686
|
+
headers: {
|
|
5687
|
+
[name: string]: unknown;
|
|
5688
|
+
};
|
|
5689
|
+
content: {
|
|
5690
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5691
|
+
};
|
|
5692
|
+
};
|
|
5693
|
+
};
|
|
5694
|
+
};
|
|
5557
5695
|
subnetOverview: {
|
|
5558
5696
|
parameters: {
|
|
5559
5697
|
query?: never;
|
package/dist/index.d.ts
CHANGED
|
@@ -700,6 +700,23 @@ interface paths {
|
|
|
700
700
|
patch?: never;
|
|
701
701
|
trace?: never;
|
|
702
702
|
};
|
|
703
|
+
"/api/v1/subnets/{netuid}/health/trends": {
|
|
704
|
+
parameters: {
|
|
705
|
+
query?: never;
|
|
706
|
+
header?: never;
|
|
707
|
+
path?: never;
|
|
708
|
+
cookie?: never;
|
|
709
|
+
};
|
|
710
|
+
/** Fetch 7d/30d uptime and latency trends for one subnet's operational surfaces (computed live from D1). */
|
|
711
|
+
get: operations["subnetHealthTrends"];
|
|
712
|
+
put?: never;
|
|
713
|
+
post?: never;
|
|
714
|
+
delete?: never;
|
|
715
|
+
options?: never;
|
|
716
|
+
head?: never;
|
|
717
|
+
patch?: never;
|
|
718
|
+
trace?: never;
|
|
719
|
+
};
|
|
703
720
|
"/api/v1/subnets/{netuid}/overview": {
|
|
704
721
|
parameters: {
|
|
705
722
|
query?: never;
|
|
@@ -1375,6 +1392,30 @@ interface components {
|
|
|
1375
1392
|
url: string;
|
|
1376
1393
|
verified_at?: string | null;
|
|
1377
1394
|
};
|
|
1395
|
+
HealthTrendsArtifact: {
|
|
1396
|
+
netuid: number;
|
|
1397
|
+
observed_at?: string | null;
|
|
1398
|
+
schema_version: number;
|
|
1399
|
+
source: string;
|
|
1400
|
+
windows: {
|
|
1401
|
+
[key: string]: {
|
|
1402
|
+
samples: number;
|
|
1403
|
+
surfaces: ({
|
|
1404
|
+
avg_latency_ms: number | null;
|
|
1405
|
+
samples: number;
|
|
1406
|
+
surface_id: string;
|
|
1407
|
+
uptime_ratio: number | null;
|
|
1408
|
+
} & {
|
|
1409
|
+
[key: string]: unknown;
|
|
1410
|
+
})[];
|
|
1411
|
+
uptime_ratio: number | null;
|
|
1412
|
+
} & {
|
|
1413
|
+
[key: string]: unknown;
|
|
1414
|
+
};
|
|
1415
|
+
};
|
|
1416
|
+
} & {
|
|
1417
|
+
[key: string]: unknown;
|
|
1418
|
+
};
|
|
1378
1419
|
JsonObject: {
|
|
1379
1420
|
[key: string]: unknown;
|
|
1380
1421
|
};
|
|
@@ -1399,6 +1440,33 @@ interface components {
|
|
|
1399
1440
|
} & {
|
|
1400
1441
|
[key: string]: unknown;
|
|
1401
1442
|
};
|
|
1443
|
+
OperationalSurfacesArtifact: components["schemas"]["ArtifactBase"] & ({
|
|
1444
|
+
kinds: string[];
|
|
1445
|
+
surface_count: number;
|
|
1446
|
+
surfaces: ({
|
|
1447
|
+
auth_required?: boolean;
|
|
1448
|
+
authority?: string;
|
|
1449
|
+
kind: string;
|
|
1450
|
+
netuid: number;
|
|
1451
|
+
probe: {
|
|
1452
|
+
expect: string;
|
|
1453
|
+
method: string;
|
|
1454
|
+
timeout_ms?: number | null;
|
|
1455
|
+
} & {
|
|
1456
|
+
[key: string]: unknown;
|
|
1457
|
+
};
|
|
1458
|
+
provider?: string;
|
|
1459
|
+
public_safe?: boolean;
|
|
1460
|
+
subnet_name?: string;
|
|
1461
|
+
subnet_slug?: string;
|
|
1462
|
+
surface_id: string;
|
|
1463
|
+
url: string;
|
|
1464
|
+
} & {
|
|
1465
|
+
[key: string]: unknown;
|
|
1466
|
+
})[];
|
|
1467
|
+
} & {
|
|
1468
|
+
[key: string]: unknown;
|
|
1469
|
+
});
|
|
1402
1470
|
PaginationMeta: {
|
|
1403
1471
|
collection: string;
|
|
1404
1472
|
cursor: number;
|
|
@@ -5554,6 +5622,76 @@ interface operations {
|
|
|
5554
5622
|
};
|
|
5555
5623
|
};
|
|
5556
5624
|
};
|
|
5625
|
+
subnetHealthTrends: {
|
|
5626
|
+
parameters: {
|
|
5627
|
+
query?: never;
|
|
5628
|
+
header?: never;
|
|
5629
|
+
path: {
|
|
5630
|
+
netuid: number;
|
|
5631
|
+
};
|
|
5632
|
+
cookie?: never;
|
|
5633
|
+
};
|
|
5634
|
+
requestBody?: never;
|
|
5635
|
+
responses: {
|
|
5636
|
+
/** @description Canonical artifact wrapped in the Metagraphed API envelope. */
|
|
5637
|
+
200: {
|
|
5638
|
+
headers: {
|
|
5639
|
+
"cache-control": components["headers"]["CacheControl"];
|
|
5640
|
+
etag: components["headers"]["ETag"];
|
|
5641
|
+
"x-metagraph-contract-version": components["headers"]["ContractVersion"];
|
|
5642
|
+
[name: string]: unknown;
|
|
5643
|
+
};
|
|
5644
|
+
content: {
|
|
5645
|
+
"application/json": components["schemas"]["SuccessEnvelope"] & {
|
|
5646
|
+
data?: components["schemas"]["HealthTrendsArtifact"];
|
|
5647
|
+
};
|
|
5648
|
+
};
|
|
5649
|
+
};
|
|
5650
|
+
/** @description ETag matched and the cached response is still valid. */
|
|
5651
|
+
304: {
|
|
5652
|
+
headers: {
|
|
5653
|
+
[name: string]: unknown;
|
|
5654
|
+
};
|
|
5655
|
+
content?: never;
|
|
5656
|
+
};
|
|
5657
|
+
/** @description Query parameters were malformed or unsupported. */
|
|
5658
|
+
400: {
|
|
5659
|
+
headers: {
|
|
5660
|
+
[name: string]: unknown;
|
|
5661
|
+
};
|
|
5662
|
+
content: {
|
|
5663
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5664
|
+
};
|
|
5665
|
+
};
|
|
5666
|
+
/** @description Artifact or API route was not found. */
|
|
5667
|
+
404: {
|
|
5668
|
+
headers: {
|
|
5669
|
+
[name: string]: unknown;
|
|
5670
|
+
};
|
|
5671
|
+
content: {
|
|
5672
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5673
|
+
};
|
|
5674
|
+
};
|
|
5675
|
+
/** @description HTTP method is not supported. */
|
|
5676
|
+
405: {
|
|
5677
|
+
headers: {
|
|
5678
|
+
[name: string]: unknown;
|
|
5679
|
+
};
|
|
5680
|
+
content: {
|
|
5681
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5682
|
+
};
|
|
5683
|
+
};
|
|
5684
|
+
/** @description Unexpected backend error. */
|
|
5685
|
+
500: {
|
|
5686
|
+
headers: {
|
|
5687
|
+
[name: string]: unknown;
|
|
5688
|
+
};
|
|
5689
|
+
content: {
|
|
5690
|
+
"application/json": components["schemas"]["ErrorEnvelope"];
|
|
5691
|
+
};
|
|
5692
|
+
};
|
|
5693
|
+
};
|
|
5694
|
+
};
|
|
5557
5695
|
subnetOverview: {
|
|
5558
5696
|
parameters: {
|
|
5559
5697
|
query?: never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsonbored/metagraphed",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "Typed TypeScript client for the metagraph.sh backend API — operational metadata, health, schemas, and interface discovery for Bittensor subnets.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|