Skip to content

Commit 39bd88a

Browse files
committed
feat: upgrade skeapeasy and use streaming file system for logs imports (#766)
* feat: upgrade skeapeasy and use streaming file system for logs imports * feat: use speakeasy workflow to regenerate the sdk * fix: add staticcheck for speakeasy
1 parent f668845 commit 39bd88a

File tree

83 files changed

+4619
-1950
lines changed

Some content is hidden

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

83 files changed

+4619
-1950
lines changed

Earthfile

+7-2
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,14 @@ release:
181181

182182
generate-client:
183183
FROM node:20-alpine
184-
RUN apk update && apk add yq jq
184+
RUN apk update && apk add yq jq curl
185185
WORKDIR /src
186-
COPY (core+sources-speakeasy/speakeasy) /bin/speakeasy
186+
ARG TARGETARCH
187+
ARG SPEAKEASY_VERSION=v1.517.3
188+
RUN curl -fsSL https://github.com/speakeasy-api/speakeasy/releases/download/${SPEAKEASY_VERSION}/speakeasy_linux_$TARGETARCH.zip -o /tmp/speakeasy_linux_$TARGETARCH.zip
189+
RUN unzip /tmp/speakeasy_linux_$TARGETARCH.zip speakeasy
190+
RUN chmod +x speakeasy
191+
RUN mv speakeasy /bin/speakeasy
187192
COPY (+openapi/openapi.yaml) openapi.yaml
188193
RUN cat ./openapi.yaml | yq e -o json > openapi.json
189194
COPY (core+sources/out --LOCATION=openapi-overlay.json) openapi-overlay.json

docs/api/README.md

+33-13
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ Accept: application/json
259259

260260
|Name|In|Type|Required|Description|
261261
|---|---|---|---|---|
262-
|body|body|[V2CreateLedgerRequest](#schemav2createledgerrequest)|false|none|
262+
|body|body|[V2CreateLedgerRequest](#schemav2createledgerrequest)|true|none|
263263
|ledger|path|string|true|Name of the ledger.|
264264

265265
> Example responses
@@ -314,7 +314,7 @@ Accept: application/json
314314

315315
|Name|In|Type|Required|Description|
316316
|---|---|---|---|---|
317-
|body|body|[V2Metadata](#schemav2metadata)|false|none|
317+
|body|body|[V2Metadata](#schemav2metadata)|true|none|
318318
|ledger|path|string|true|Name of the ledger.|
319319

320320
> Example responses
@@ -499,7 +499,7 @@ Accept: application/json
499499
|continueOnFailure|query|boolean|false|Continue on failure|
500500
|atomic|query|boolean|false|Make bulk atomic|
501501
|parallel|query|boolean|false|Process bulk elements in parallel|
502-
|body|body|[V2Bulk](#schemav2bulk)|false|none|
502+
|body|body|[V2Bulk](#schemav2bulk)|true|none|
503503

504504
> Example responses
505505
@@ -643,7 +643,7 @@ Accept: application/json
643643
|---|---|---|---|---|
644644
|ledger|path|string|true|Name of the ledger.|
645645
|pit|query|string(date-time)|false|none|
646-
|body|body|object|false|none|
646+
|body|body|object|true|none|
647647

648648
> Example responses
649649
@@ -708,7 +708,7 @@ List accounts from a ledger, sorted by address in descending order.
708708
|cursor|query|string|false|Parameter used in pagination requests. Maximum page size is set to 15.|
709709
|expand|query|string|false|none|
710710
|pit|query|string(date-time)|false|none|
711-
|body|body|object|false|none|
711+
|body|body|object|true|none|
712712

713713
#### Detailed descriptions
714714

@@ -1055,7 +1055,7 @@ Accept: application/json
10551055
|---|---|---|---|---|
10561056
|ledger|path|string|true|Name of the ledger.|
10571057
|pit|query|string(date-time)|false|none|
1058-
|body|body|object|false|none|
1058+
|body|body|object|true|none|
10591059

10601060
> Example responses
10611061
@@ -1122,7 +1122,7 @@ List transactions from a ledger, sorted by id in descending order.
11221122
|pit|query|string(date-time)|false|none|
11231123
|order|query|string|false|none|
11241124
|reverse|query|boolean|false|none|
1125-
|body|body|object|false|none|
1125+
|body|body|object|true|none|
11261126

11271127
#### Detailed descriptions
11281128

@@ -1575,7 +1575,7 @@ Idempotency-Key: string
15751575
|id|path|integer(bigint)|true|Transaction ID.|
15761576
|dryRun|query|boolean|false|Set the dryRun mode. Dry run mode doesn't add the logs to the database or publish a message to the message broker.|
15771577
|Idempotency-Key|header|string|false|Use an idempotency key|
1578-
|body|body|[V2Metadata](#schemav2metadata)|false|metadata|
1578+
|body|body|[V2Metadata](#schemav2metadata)|true|metadata|
15791579

15801580
> Example responses
15811581
@@ -1761,7 +1761,7 @@ Accept: application/json
17611761
|ledger|path|string|true|Name of the ledger.|
17621762
|pit|query|string(date-time)|false|none|
17631763
|useInsertionDate|query|boolean|false|Use insertion date instead of effective date|
1764-
|body|body|object|false|none|
1764+
|body|body|object|true|none|
17651765

17661766
> Example responses
17671767
@@ -1821,7 +1821,7 @@ Accept: application/json
18211821
|startTime|query|string(date-time)|false|none|
18221822
|insertionDate|query|boolean|false|Use insertion date instead of effective date|
18231823
|groupBy|query|integer(int64)|false|Group volumes and balance by the level of the segment of the address|
1824-
|body|body|object|false|none|
1824+
|body|body|object|true|none|
18251825

18261826
#### Detailed descriptions
18271827

@@ -1900,7 +1900,7 @@ List the logs from a ledger, sorted by ID in descending order.
19001900
|pageSize|query|integer(int64)|false|The maximum number of results to return per page.|
19011901
|cursor|query|string|false|Parameter used in pagination requests. Maximum page size is set to 15.|
19021902
|pit|query|string(date-time)|false|none|
1903-
|body|body|object|false|none|
1903+
|body|body|object|true|none|
19041904

19051905
#### Detailed descriptions
19061906

@@ -1966,7 +1966,7 @@ Accept: application/json
19661966
> Body parameter
19671967
19681968
```yaml
1969-
string
1969+
file: string
19701970

19711971
```
19721972
@@ -1975,7 +1975,7 @@ string
19751975
|Name|In|Type|Required|Description|
19761976
|---|---|---|---|---|
19771977
|ledger|path|string|true|Name of the ledger.|
1978-
|body|body|string|false|none|
1978+
|body|body|[V2ImportLogsRequest](#schemav2importlogsrequest)|true|none|
19791979
19801980
> Example responses
19811981
@@ -4406,3 +4406,23 @@ and
44064406
|---|---|---|---|---|
44074407
|data|[V2Ledger](#schemav2ledger)|true|none|none|
44084408

4409+
<h2 id="tocS_V2ImportLogsRequest">V2ImportLogsRequest</h2>
4410+
<!-- backwards compatibility -->
4411+
<a id="schemav2importlogsrequest"></a>
4412+
<a id="schema_V2ImportLogsRequest"></a>
4413+
<a id="tocSv2importlogsrequest"></a>
4414+
<a id="tocsv2importlogsrequest"></a>
4415+
4416+
```json
4417+
{
4418+
"file": "string"
4419+
}
4420+
4421+
```
4422+
4423+
### Properties
4424+
4425+
|Name|Type|Required|Restrictions|Description|
4426+
|---|---|---|---|---|
4427+
|file|string(binary)|true|none|none|
4428+

openapi.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,7 @@ paths:
837837
minimum: 0
838838
example: 1234
839839
requestBody:
840+
required: true
840841
description: metadata
841842
content:
842843
application/json:
@@ -1307,6 +1308,7 @@ paths:
13071308
tags:
13081309
- ledger.v2
13091310
requestBody:
1311+
required: true
13101312
content:
13111313
application/json:
13121314
schema:
@@ -1339,6 +1341,7 @@ paths:
13391341
tags:
13401342
- ledger.v2
13411343
requestBody:
1344+
required: true
13421345
content:
13431346
application/json:
13441347
schema:
@@ -1460,6 +1463,7 @@ paths:
14601463
type: boolean
14611464
example: true
14621465
requestBody:
1466+
required: true
14631467
content:
14641468
application/json:
14651469
schema:
@@ -1508,6 +1512,7 @@ paths:
15081512
type: string
15091513
format: date-time
15101514
requestBody:
1515+
required: true
15111516
content:
15121517
application/json:
15131518
schema:
@@ -1579,6 +1584,7 @@ paths:
15791584
type: string
15801585
format: date-time
15811586
requestBody:
1587+
required: true
15821588
content:
15831589
application/json:
15841590
schema:
@@ -1808,6 +1814,7 @@ paths:
18081814
type: string
18091815
format: date-time
18101816
requestBody:
1817+
required: true
18111818
content:
18121819
application/json:
18131820
schema:
@@ -1891,6 +1898,7 @@ paths:
18911898
schema:
18921899
type: boolean
18931900
requestBody:
1901+
required: true
18941902
content:
18951903
application/json:
18961904
schema:
@@ -2057,6 +2065,7 @@ paths:
20572065
schema:
20582066
type: string
20592067
requestBody:
2068+
required: true
20602069
description: metadata
20612070
content:
20622071
application/json:
@@ -2206,6 +2215,7 @@ paths:
22062215
schema:
22072216
type: boolean
22082217
requestBody:
2218+
required: true
22092219
content:
22102220
application/json:
22112221
schema:
@@ -2290,6 +2300,7 @@ paths:
22902300
minimum: 0
22912301
maximum: 1000
22922302
requestBody:
2303+
required: true
22932304
content:
22942305
application/json:
22952306
schema:
@@ -2354,6 +2365,7 @@ paths:
23542365
type: string
23552366
format: date-time
23562367
requestBody:
2368+
required: true
23572369
content:
23582370
application/json:
23592371
schema:
@@ -2390,10 +2402,11 @@ paths:
23902402
type: string
23912403
example: ledger001
23922404
requestBody:
2405+
required: true
23932406
content:
23942407
application/octet-stream:
23952408
schema:
2396-
type: string
2409+
$ref: '#/components/schemas/V2ImportLogsRequest'
23972410
responses:
23982411
"204":
23992412
description: Import OK
@@ -3773,6 +3786,14 @@ components:
37733786
properties:
37743787
data:
37753788
$ref: '#/components/schemas/V2Ledger'
3789+
V2ImportLogsRequest:
3790+
type: object
3791+
required:
3792+
- file
3793+
properties:
3794+
file:
3795+
type: string
3796+
format: binary
37763797
securitySchemes:
37773798
Authorization:
37783799
type: oauth2

openapi/v1.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ paths:
921921
minimum: 0
922922
example: 1234
923923
requestBody:
924+
required: true
924925
description: metadata
925926
content:
926927
application/json:

0 commit comments

Comments
 (0)