@1claw/sdk 0.29.1 → 0.31.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/README.md +4 -1
- package/dist/core/client.d.ts +9 -0
- package/dist/core/client.d.ts.map +1 -1
- package/dist/core/client.js +6 -0
- package/dist/core/client.js.map +1 -1
- package/dist/generated/api-types.d.ts +519 -0
- package/dist/generated/api-types.d.ts.map +1 -1
- package/dist/resources/deposit-destinations.d.ts +53 -0
- package/dist/resources/deposit-destinations.d.ts.map +1 -0
- package/dist/resources/deposit-destinations.js +24 -0
- package/dist/resources/deposit-destinations.js.map +1 -0
- package/dist/resources/fiat.d.ts +37 -0
- package/dist/resources/fiat.d.ts.map +1 -0
- package/dist/resources/fiat.js +12 -0
- package/dist/resources/fiat.js.map +1 -0
- package/dist/resources/internal-accounts.d.ts +67 -0
- package/dist/resources/internal-accounts.d.ts.map +1 -0
- package/dist/resources/internal-accounts.js +21 -0
- package/dist/resources/internal-accounts.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { HttpClient } from "../core/http";
|
|
2
|
+
import type { OneclawResponse } from "../types";
|
|
3
|
+
export interface CreateDepositDestinationRequest {
|
|
4
|
+
chain: string;
|
|
5
|
+
label?: string;
|
|
6
|
+
metadata?: Record<string, unknown>;
|
|
7
|
+
treasury_wallet_id?: string;
|
|
8
|
+
auto_credit_account_id?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface DepositDestinationResponse {
|
|
11
|
+
id: string;
|
|
12
|
+
org_id: string;
|
|
13
|
+
user_id: string;
|
|
14
|
+
treasury_wallet_id?: string;
|
|
15
|
+
chain: string;
|
|
16
|
+
address: string;
|
|
17
|
+
label?: string;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
status: string;
|
|
20
|
+
auto_credit_account_id?: string;
|
|
21
|
+
created_at: string;
|
|
22
|
+
}
|
|
23
|
+
export interface DepositEventResponse {
|
|
24
|
+
id: string;
|
|
25
|
+
destination_id: string;
|
|
26
|
+
tx_hash: string;
|
|
27
|
+
from_address: string;
|
|
28
|
+
amount: string;
|
|
29
|
+
token_address?: string;
|
|
30
|
+
token_symbol?: string;
|
|
31
|
+
chain: string;
|
|
32
|
+
block_number?: number;
|
|
33
|
+
confirmations: number;
|
|
34
|
+
status: string;
|
|
35
|
+
confirmed_at?: string;
|
|
36
|
+
credited_at?: string;
|
|
37
|
+
created_at: string;
|
|
38
|
+
}
|
|
39
|
+
export interface DepositDestinationDetailResponse {
|
|
40
|
+
destination: DepositDestinationResponse;
|
|
41
|
+
events: DepositEventResponse[];
|
|
42
|
+
}
|
|
43
|
+
export declare class DepositDestinationsResource {
|
|
44
|
+
private readonly http;
|
|
45
|
+
constructor(http: HttpClient);
|
|
46
|
+
create(body: CreateDepositDestinationRequest): Promise<OneclawResponse<DepositDestinationResponse>>;
|
|
47
|
+
list(chain?: string, status?: string): Promise<OneclawResponse<{
|
|
48
|
+
destinations: DepositDestinationResponse[];
|
|
49
|
+
}>>;
|
|
50
|
+
get(id: string): Promise<OneclawResponse<DepositDestinationDetailResponse>>;
|
|
51
|
+
update(id: string, status: string): Promise<OneclawResponse<DepositDestinationResponse>>;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=deposit-destinations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit-destinations.d.ts","sourceRoot":"","sources":["../../src/resources/deposit-destinations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,+BAA+B;IAC5C,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,kBAAkB,CAAC,EAAE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AQjD,IAAI,CACN,KAAK,CAAC,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,MAAM,GAChB,OAAO,CAAC,eAAe,CAAC;QAAE,YAAY,EAAE,0BAA0B,EAAE,CAAA;KAAE,CAAC,CAAC;IAWrE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,gCAAgC,CAAC,CAAC;IAO3E,MAAM,CACR,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,MAAM,GACf,OAAO,CAAC,eAAe,CAAC,0BAA0B,CAAC,CAAC;CAO1D"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export class DepositDestinationsResource {
|
|
2
|
+
constructor(http) {
|
|
3
|
+
this.http = http;
|
|
4
|
+
}
|
|
5
|
+
async create(body) {
|
|
6
|
+
return this.http.request("POST", "/v1/deposit-destinations", { body });
|
|
7
|
+
}
|
|
8
|
+
async list(chain, status) {
|
|
9
|
+
const params = new URLSearchParams();
|
|
10
|
+
if (chain)
|
|
11
|
+
params.set("chain", chain);
|
|
12
|
+
if (status)
|
|
13
|
+
params.set("status", status);
|
|
14
|
+
const qs = params.toString();
|
|
15
|
+
return this.http.request("GET", `/v1/deposit-destinations${qs ? `?${qs}` : ""}`);
|
|
16
|
+
}
|
|
17
|
+
async get(id) {
|
|
18
|
+
return this.http.request("GET", `/v1/deposit-destinations/${id}`);
|
|
19
|
+
}
|
|
20
|
+
async update(id, status) {
|
|
21
|
+
return this.http.request("PATCH", `/v1/deposit-destinations/${id}`, { body: { status } });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=deposit-destinations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deposit-destinations.js","sourceRoot":"","sources":["../../src/resources/deposit-destinations.ts"],"names":[],"mappings":"AA+CA,MAAM,OAAO,2BAA2B;IACpC,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,KAAK,CAAC,MAAM,CACR,IAAqC;QAErC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,MAAM,EACN,0BAA0B,EAC1B,EAAE,IAAI,EAAE,CACX,CAAC;IACN,CAAC;IAED,KAAK,CAAC,IAAI,CACN,KAAc,EACd,MAAe;QAEf,MAAM,MAAM,GAAG,IAAI,eAAe,EAAE,CAAC;QACrC,IAAI,KAAK;YAAE,MAAM,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACtC,IAAI,MAAM;YAAE,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACzC,MAAM,EAAE,GAAG,MAAM,CAAC,QAAQ,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,KAAK,EACL,2BAA2B,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAClD,CAAC;IACN,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,KAAK,EACL,4BAA4B,EAAE,EAAE,CACnC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,MAAM,CACR,EAAU,EACV,MAAc;QAEd,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,OAAO,EACP,4BAA4B,EAAE,EAAE,EAChC,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,EAAE,CACvB,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { HttpClient } from "../core/http";
|
|
2
|
+
import type { OneclawResponse } from "../types";
|
|
3
|
+
export interface FiatOnrampSessionRequest {
|
|
4
|
+
chain: string;
|
|
5
|
+
asset?: string;
|
|
6
|
+
amount_usd?: string;
|
|
7
|
+
destination_address?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface FiatOnrampSessionResponse {
|
|
10
|
+
session_url: string;
|
|
11
|
+
provider: string;
|
|
12
|
+
destination_address: string;
|
|
13
|
+
chain: string;
|
|
14
|
+
asset: string;
|
|
15
|
+
}
|
|
16
|
+
export interface FiatOfframpInitiateRequest {
|
|
17
|
+
chain: string;
|
|
18
|
+
asset: string;
|
|
19
|
+
amount: string;
|
|
20
|
+
source_address?: string;
|
|
21
|
+
}
|
|
22
|
+
export interface FiatOfframpResponse {
|
|
23
|
+
id: string;
|
|
24
|
+
provider: string;
|
|
25
|
+
widget_url: string;
|
|
26
|
+
status: string;
|
|
27
|
+
chain: string;
|
|
28
|
+
asset: string;
|
|
29
|
+
amount: string;
|
|
30
|
+
}
|
|
31
|
+
export declare class FiatResource {
|
|
32
|
+
private readonly http;
|
|
33
|
+
constructor(http: HttpClient);
|
|
34
|
+
createOnrampSession(body: FiatOnrampSessionRequest): Promise<OneclawResponse<FiatOnrampSessionResponse>>;
|
|
35
|
+
initiateOfframp(body: FiatOfframpInitiateRequest): Promise<OneclawResponse<FiatOfframpResponse>>;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=fiat.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiat.d.ts","sourceRoot":"","sources":["../../src/resources/fiat.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAChC;AAED,MAAM,WAAW,yBAAyB;IACtC,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,0BAA0B;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,mBAAmB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,qBAAa,YAAY;IACT,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,UAAU;IAEvC,mBAAmB,CACrB,IAAI,EAAE,wBAAwB,GAC/B,OAAO,CAAC,eAAe,CAAC,yBAAyB,CAAC,CAAC;IAQhD,eAAe,CACjB,IAAI,EAAE,0BAA0B,GACjC,OAAO,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC;CAOnD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export class FiatResource {
|
|
2
|
+
constructor(http) {
|
|
3
|
+
this.http = http;
|
|
4
|
+
}
|
|
5
|
+
async createOnrampSession(body) {
|
|
6
|
+
return this.http.request("POST", "/v1/fiat/onramp/session", { body });
|
|
7
|
+
}
|
|
8
|
+
async initiateOfframp(body) {
|
|
9
|
+
return this.http.request("POST", "/v1/fiat/offramp/initiate", { body });
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=fiat.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fiat.js","sourceRoot":"","sources":["../../src/resources/fiat.ts"],"names":[],"mappings":"AAmCA,MAAM,OAAO,YAAY;IACrB,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,KAAK,CAAC,mBAAmB,CACrB,IAA8B;QAE9B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,MAAM,EACN,yBAAyB,EACzB,EAAE,IAAI,EAAE,CACX,CAAC;IACN,CAAC;IAED,KAAK,CAAC,eAAe,CACjB,IAAgC;QAEhC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,MAAM,EACN,2BAA2B,EAC3B,EAAE,IAAI,EAAE,CACX,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { HttpClient } from "../core/http";
|
|
2
|
+
import type { OneclawResponse } from "../types";
|
|
3
|
+
export interface CreateInternalAccountRequest {
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
treasury_wallet_id?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface InternalAccountResponse {
|
|
9
|
+
id: string;
|
|
10
|
+
org_id: string;
|
|
11
|
+
user_id: string;
|
|
12
|
+
treasury_wallet_id?: string;
|
|
13
|
+
name: string;
|
|
14
|
+
description?: string;
|
|
15
|
+
status: string;
|
|
16
|
+
balances: {
|
|
17
|
+
asset: string;
|
|
18
|
+
balance: string;
|
|
19
|
+
}[];
|
|
20
|
+
created_at: string;
|
|
21
|
+
}
|
|
22
|
+
export interface CreateTransferRequest {
|
|
23
|
+
from_account_id: string;
|
|
24
|
+
to_account_id: string;
|
|
25
|
+
asset: string;
|
|
26
|
+
amount: string;
|
|
27
|
+
memo?: string;
|
|
28
|
+
}
|
|
29
|
+
export interface InternalTransferResponse {
|
|
30
|
+
id: string;
|
|
31
|
+
org_id: string;
|
|
32
|
+
from_account_id: string;
|
|
33
|
+
to_account_id: string;
|
|
34
|
+
asset: string;
|
|
35
|
+
amount: string;
|
|
36
|
+
memo?: string;
|
|
37
|
+
initiated_by: string;
|
|
38
|
+
status: string;
|
|
39
|
+
created_at: string;
|
|
40
|
+
}
|
|
41
|
+
export interface LedgerEntryResponse {
|
|
42
|
+
id: string;
|
|
43
|
+
account_id: string;
|
|
44
|
+
counterpart_account_id: string;
|
|
45
|
+
asset: string;
|
|
46
|
+
amount: string;
|
|
47
|
+
direction: "credit" | "debit";
|
|
48
|
+
reference_type: string;
|
|
49
|
+
reference_id: string;
|
|
50
|
+
memo?: string;
|
|
51
|
+
created_at: string;
|
|
52
|
+
}
|
|
53
|
+
export declare class InternalAccountsResource {
|
|
54
|
+
private readonly http;
|
|
55
|
+
constructor(http: HttpClient);
|
|
56
|
+
create(body: CreateInternalAccountRequest): Promise<OneclawResponse<InternalAccountResponse>>;
|
|
57
|
+
list(): Promise<OneclawResponse<{
|
|
58
|
+
accounts: InternalAccountResponse[];
|
|
59
|
+
}>>;
|
|
60
|
+
get(id: string): Promise<OneclawResponse<InternalAccountResponse>>;
|
|
61
|
+
transfer(body: CreateTransferRequest): Promise<OneclawResponse<InternalTransferResponse>>;
|
|
62
|
+
getLedger(id: string, limit?: number, offset?: number): Promise<OneclawResponse<{
|
|
63
|
+
entries: LedgerEntryResponse[];
|
|
64
|
+
total: number;
|
|
65
|
+
}>>;
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=internal-accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-accounts.d.ts","sourceRoot":"","sources":["../../src/resources/internal-accounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,uBAAuB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,MAAM,CAAC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,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IAQ9C,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC;QAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAA;KAAE,CAAC,CAAC;IAOzE,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,uBAAuB,CAAC,CAAC;IAOlE,QAAQ,CACV,IAAI,EAAE,qBAAqB,GAC5B,OAAO,CAAC,eAAe,CAAC,wBAAwB,CAAC,CAAC;IAQ/C,SAAS,CACX,EAAE,EAAE,MAAM,EACV,KAAK,SAAK,EACV,MAAM,SAAI,GACX,OAAO,CAAC,eAAe,CAAC;QAAE,OAAO,EAAE,mBAAmB,EAAE,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAMjF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export class InternalAccountsResource {
|
|
2
|
+
constructor(http) {
|
|
3
|
+
this.http = http;
|
|
4
|
+
}
|
|
5
|
+
async create(body) {
|
|
6
|
+
return this.http.request("POST", "/v1/internal-accounts", { body });
|
|
7
|
+
}
|
|
8
|
+
async list() {
|
|
9
|
+
return this.http.request("GET", "/v1/internal-accounts");
|
|
10
|
+
}
|
|
11
|
+
async get(id) {
|
|
12
|
+
return this.http.request("GET", `/v1/internal-accounts/${id}`);
|
|
13
|
+
}
|
|
14
|
+
async transfer(body) {
|
|
15
|
+
return this.http.request("POST", "/v1/internal-transfers", { body });
|
|
16
|
+
}
|
|
17
|
+
async getLedger(id, limit = 50, offset = 0) {
|
|
18
|
+
return this.http.request("GET", `/v1/internal-accounts/${id}/ledger?limit=${limit}&offset=${offset}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=internal-accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-accounts.js","sourceRoot":"","sources":["../../src/resources/internal-accounts.ts"],"names":[],"mappings":"AAuDA,MAAM,OAAO,wBAAwB;IACjC,YAA6B,IAAgB;QAAhB,SAAI,GAAJ,IAAI,CAAY;IAAG,CAAC;IAEjD,KAAK,CAAC,MAAM,CACR,IAAkC;QAElC,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,MAAM,EACN,uBAAuB,EACvB,EAAE,IAAI,EAAE,CACX,CAAC;IACN,CAAC;IAED,KAAK,CAAC,IAAI;QACN,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,KAAK,EACL,uBAAuB,CAC1B,CAAC;IACN,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,EAAU;QAChB,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,KAAK,EACL,yBAAyB,EAAE,EAAE,CAChC,CAAC;IACN,CAAC;IAED,KAAK,CAAC,QAAQ,CACV,IAA2B;QAE3B,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,MAAM,EACN,wBAAwB,EACxB,EAAE,IAAI,EAAE,CACX,CAAC;IACN,CAAC;IAED,KAAK,CAAC,SAAS,CACX,EAAU,EACV,KAAK,GAAG,EAAE,EACV,MAAM,GAAG,CAAC;QAEV,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CACpB,KAAK,EACL,yBAAyB,EAAE,iBAAiB,KAAK,WAAW,MAAM,EAAE,CACvE,CAAC;IACN,CAAC;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1claw/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "TypeScript SDK for 1Claw Vault — secret management for AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"openapi-typescript": "^7.13.0",
|
|
54
54
|
"typescript": "^5.0.0",
|
|
55
|
-
"vitest": "^
|
|
55
|
+
"vitest": "^4.1.0"
|
|
56
56
|
}
|
|
57
57
|
}
|