Skip to content

Commit 0426049

Browse files
committed
Merge branch 'main' of github.com:ava-labs/avacloud-sdk-typescript
2 parents 6e0f82e + 478dcd2 commit 0426049

File tree

777 files changed

+22600
-13628
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

777 files changed

+22600
-13628
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
/examples/node_modules
2+
.env
3+
.env.local
4+
.env.*.local
5+
.DS_Store
6+
**/.speakeasy/temp/
7+
**/.speakeasy/logs/
8+
.DS_Store
19
/mcp-server
210
/bin
311
/.eslintcache

.speakeasy/gen.lock

Lines changed: 3724 additions & 1303 deletions
Large diffs are not rendered by default.

.speakeasy/gen.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ generation:
77
maintainOpenAPIOrder: true
88
usageSnippets:
99
optionalPropertyRendering: withExample
10+
sdkInitStyle: constructor
1011
useClassNamesForArrayFields: true
1112
fixes:
1213
nameResolutionDec2023: true
1314
nameResolutionFeb2025: false
1415
parameterOrderingFeb2024: true
1516
requestResponseComponentNamesFeb2024: true
1617
securityFeb2025: false
18+
sharedErrorComponentsApr2025: false
1719
auth:
1820
oAuth2ClientCredentialsEnabled: false
1921
oAuth2PasswordEnabled: false
22+
tests:
23+
generateTests: true
24+
generateNewTests: false
25+
skipResponseBodyAssertions: false
2026
typescript:
21-
version: 0.11.0
27+
version: 0.13.2
2228
additionalDependencies:
2329
dependencies:
2430
json-canonicalize: ^1.0.6
@@ -29,14 +35,17 @@ typescript:
2935
homepage: https://developer.avacloud.io/avacloud-sdk/getting-started
3036
license: SEE LICENSE
3137
author: AvaCloud
38+
baseErrorName: AvaCloudSDKError
3239
clientServerStatusCodesAsErrors: true
40+
constFieldsAlwaysOptional: true
3341
defaultErrorName: SDKError
3442
enableCustomCodeRegions: false
3543
enableMCPServer: true
3644
enableReactQuery: false
3745
enumFormat: union
3846
flattenGlobalSecurity: true
3947
flatteningOrder: body-first
48+
generateExamples: true
4049
imports:
4150
option: openapi
4251
paths:

.speakeasy/workflow.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
speakeasyVersion: 1.510.0
1+
speakeasyVersion: 1.586.0
22
sources:
33
AvaCloudSDK-OAS:
44
sourceNamespace: avacloud-sdk-oas
5-
sourceRevisionDigest: sha256:2a3c293145d6bfa24d4ba4e8b2399fd6e3ba3b70c7d2f6736bf988b95655ccfc
6-
sourceBlobDigest: sha256:77127799f3b29a3f646e4aff116d50cc8d6f3e0cef105d0b2a9adb0a659f1c21
5+
sourceRevisionDigest: sha256:f281b99b406093d56c5dd93d09697e1df92bf8ddeba3912b603fba831753f855
6+
sourceBlobDigest: sha256:d3ff65df0b00fd2976e27dda7a2bde6442002ef6526d39b4661ea1e9229e3f11
77
tags:
88
- latest
9-
- speakeasy-sdk-regen-1740702183
10-
- Beta
9+
- speakeasy-sdk-regen-1753229595
10+
- 1.0.0
1111
AvalancheSDK-OAS:
1212
sourceNamespace: avalanche-sdk-oas
1313
sourceRevisionDigest: sha256:5a1e07e4561e10de09495e4808d129b671b42547b2864d1828b477aadfcb21ae
@@ -19,10 +19,10 @@ targets:
1919
avacloud-sdk:
2020
source: AvaCloudSDK-OAS
2121
sourceNamespace: avacloud-sdk-oas
22-
sourceRevisionDigest: sha256:2a3c293145d6bfa24d4ba4e8b2399fd6e3ba3b70c7d2f6736bf988b95655ccfc
23-
sourceBlobDigest: sha256:77127799f3b29a3f646e4aff116d50cc8d6f3e0cef105d0b2a9adb0a659f1c21
22+
sourceRevisionDigest: sha256:f281b99b406093d56c5dd93d09697e1df92bf8ddeba3912b603fba831753f855
23+
sourceBlobDigest: sha256:d3ff65df0b00fd2976e27dda7a2bde6442002ef6526d39b4661ea1e9229e3f11
2424
codeSamplesNamespace: avacloud-sdk-ts-code-samples
25-
codeSamplesRevisionDigest: sha256:ed4729226eec57d8a06ade432165f88246cbb6ae6b4647bcea35f1fe519da2c7
25+
codeSamplesRevisionDigest: sha256:a5d50bd832aafe6607a1df5146904f98d2983e447da64b808fa7da519a01517b
2626
avalanche-sdk:
2727
source: AvalancheSDK-OAS
2828
sourceNamespace: avalanche-sdk-oas

FUNCTIONS.md

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,22 @@ specific category of applications.
2020

2121
```typescript
2222
import { AvaCloudSDKCore } from "@avalabs/avacloud-sdk/core.js";
23-
import { metricsHealthCheckMetricsHealthCheck } from "@avalabs/avacloud-sdk/funcs/metricsHealthCheckMetricsHealthCheck.js";
24-
import { SDKValidationError } from "@avalabs/avacloud-sdk/models/errors/sdkvalidationerror.js";
23+
import { metricsHealthCheck } from "@avalabs/avacloud-sdk/funcs/metricsHealthCheck.js";
2524

2625
// Use `AvaCloudSDKCore` for best tree-shaking performance.
2726
// You can create one instance of it to use across an application.
2827
const avaCloudSDK = new AvaCloudSDKCore({
2928
serverURL: "https://api.example.com",
30-
chainId: "43114",
31-
network: "mainnet",
3229
});
3330

3431
async function run() {
35-
const res = await metricsHealthCheckMetricsHealthCheck(avaCloudSDK);
36-
37-
switch (true) {
38-
case res.ok:
39-
// The success case will be handled outside of the switch block
40-
break;
41-
case res.error instanceof SDKValidationError:
42-
// Pretty-print validation errors.
43-
return console.log(res.error.pretty());
44-
case res.error instanceof Error:
45-
return console.log(res.error);
46-
default:
47-
// TypeScript's type checking will fail on the following line if the above
48-
// cases were not exhaustive.
49-
res.error satisfies never;
50-
throw new Error("Assertion failed: expected error checks to be exhaustive: " + res.error);
32+
const res = await metricsHealthCheck(avaCloudSDK);
33+
if (res.ok) {
34+
const { value: result } = res;
35+
console.log(result);
36+
} else {
37+
console.log("metricsHealthCheck failed:", res.error);
5138
}
52-
53-
54-
const { value: result } = res;
55-
56-
// Handle the result
57-
console.log(result);
5839
}
5940

6041
run();

0 commit comments

Comments
 (0)