@whisk/client 0.0.6 → 0.0.9
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/WhiskClient.d.ts +1 -3
- package/dist/WhiskClient.js +12 -17
- package/dist/WhiskClient.js.map +1 -1
- package/dist/index.d.ts +1 -6
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -5
- package/src/WhiskClient.ts +20 -23
- package/src/index.ts +1 -2
- package/dist/actions/fragments/vault.d.ts +0 -19
- package/dist/actions/fragments/vault.js +0 -16
- package/dist/actions/fragments/vault.js.map +0 -1
- package/dist/actions/getVaultSummaries.d.ts +0 -29
- package/dist/actions/getVaultSummaries.js +0 -22
- package/dist/actions/getVaultSummaries.js.map +0 -1
- package/dist/types.d.ts +0 -8
- package/dist/types.js +0 -1
- package/dist/types.js.map +0 -1
- package/src/actions/fragments/vault.ts +0 -15
- package/src/actions/getVaultSummaries.ts +0 -27
- package/src/client.test.ts +0 -16
- package/src/types.ts +0 -8
package/dist/WhiskClient.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { AnyVariables, TypedDocumentNode } from '@urql/core';
|
|
2
|
-
import { ResultAsync } from 'neverthrow';
|
|
3
|
-
import { WhiskError } from './errors.js';
|
|
4
2
|
|
|
5
3
|
interface WhiskClientConfig {
|
|
6
4
|
readonly apiKey: string;
|
|
@@ -11,7 +9,7 @@ declare class WhiskClient {
|
|
|
11
9
|
private readonly urql;
|
|
12
10
|
private readonly debug;
|
|
13
11
|
constructor({ apiKey, url, debug }: WhiskClientConfig);
|
|
14
|
-
query<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<TValue, TVariables>, variables: TVariables):
|
|
12
|
+
query<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<TValue, TVariables>, variables: TVariables): Promise<TValue>;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
export { WhiskClient, type WhiskClientConfig };
|
package/dist/WhiskClient.js
CHANGED
|
@@ -3,7 +3,6 @@ import {
|
|
|
3
3
|
fetchExchange,
|
|
4
4
|
Client as UrqlClient
|
|
5
5
|
} from "@urql/core";
|
|
6
|
-
import { errAsync, okAsync, ResultAsync } from "neverthrow";
|
|
7
6
|
import { WhiskError } from "./errors.js";
|
|
8
7
|
import { scalarsExchange } from "./scalarExchange.js";
|
|
9
8
|
const DEFAULT_WHISK_API_URL = "https://api-v2.whisk.so/graphql";
|
|
@@ -22,22 +21,18 @@ class WhiskClient {
|
|
|
22
21
|
});
|
|
23
22
|
this.debug = debug;
|
|
24
23
|
}
|
|
25
|
-
query(document, variables) {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
console.debug("[Whisk Client] GraphQL errors:", result.error?.graphQLErrors);
|
|
38
|
-
}
|
|
39
|
-
return okAsync(result.data);
|
|
40
|
-
});
|
|
24
|
+
async query(document, variables) {
|
|
25
|
+
const result = await this.urql.query(document, variables);
|
|
26
|
+
if (result.error && !result.data) {
|
|
27
|
+
throw WhiskError.from(result.error);
|
|
28
|
+
}
|
|
29
|
+
if (!result.data) {
|
|
30
|
+
throw WhiskError.from("No data returned from query");
|
|
31
|
+
}
|
|
32
|
+
if (result.error && this.debug) {
|
|
33
|
+
console.debug("[Whisk Client] GraphQL errors:", result.error);
|
|
34
|
+
}
|
|
35
|
+
return result.data;
|
|
41
36
|
}
|
|
42
37
|
}
|
|
43
38
|
export {
|
package/dist/WhiskClient.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/WhiskClient.ts"],"sourcesContent":["import {\n type AnyVariables,\n cacheExchange,\n fetchExchange,\n type TypedDocumentNode,\n Client as UrqlClient,\n} from \"@urql/core\"\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/WhiskClient.ts"],"sourcesContent":["import {\n type AnyVariables,\n cacheExchange,\n fetchExchange,\n type TypedDocumentNode,\n Client as UrqlClient,\n} from \"@urql/core\"\nimport { WhiskError } from \"./errors.js\"\nimport { scalarsExchange } from \"./scalarExchange.js\"\n\nconst DEFAULT_WHISK_API_URL = \"https://api-v2.whisk.so/graphql\"\n\nexport interface WhiskClientConfig {\n readonly apiKey: string\n readonly url?: string\n readonly debug?: boolean\n}\n\nexport class WhiskClient {\n private readonly urql: UrqlClient\n private readonly debug: boolean\n\n constructor({ apiKey, url = DEFAULT_WHISK_API_URL, debug = false }: WhiskClientConfig) {\n this.urql = new UrqlClient({\n url,\n exchanges: [scalarsExchange, cacheExchange, fetchExchange],\n fetchOptions: {\n headers: {\n Authorization: `Bearer ${apiKey}`,\n },\n },\n })\n\n this.debug = debug\n }\n\n public async query<TValue, TVariables extends AnyVariables>(\n document: TypedDocumentNode<TValue, TVariables>,\n variables: TVariables,\n ): Promise<TValue> {\n const result = await this.urql.query(document, variables)\n\n // Bubbles up any network errors\n if (result.error && !result.data) {\n throw WhiskError.from(result.error)\n }\n\n // Error if we have no data\n if (!result.data) {\n throw WhiskError.from(\"No data returned from query\")\n }\n\n // Log any graphql errors (but don't put into error, since partial is fine)\n if (result.error && this.debug) {\n console.debug(\"[Whisk Client] GraphQL errors:\", result.error)\n }\n\n return result.data\n }\n}\n"],"mappings":"AAAA;AAAA,EAEE;AAAA,EACA;AAAA,EAEA,UAAU;AAAA,OACL;AACP,SAAS,kBAAkB;AAC3B,SAAS,uBAAuB;AAEhC,MAAM,wBAAwB;AAQvB,MAAM,YAAY;AAAA,EACN;AAAA,EACA;AAAA,EAEjB,YAAY,EAAE,QAAQ,MAAM,uBAAuB,QAAQ,MAAM,GAAsB;AACrF,SAAK,OAAO,IAAI,WAAW;AAAA,MACzB;AAAA,MACA,WAAW,CAAC,iBAAiB,eAAe,aAAa;AAAA,MACzD,cAAc;AAAA,QACZ,SAAS;AAAA,UACP,eAAe,UAAU,MAAM;AAAA,QACjC;AAAA,MACF;AAAA,IACF,CAAC;AAED,SAAK,QAAQ;AAAA,EACf;AAAA,EAEA,MAAa,MACX,UACA,WACiB;AACjB,UAAM,SAAS,MAAM,KAAK,KAAK,MAAM,UAAU,SAAS;AAGxD,QAAI,OAAO,SAAS,CAAC,OAAO,MAAM;AAChC,YAAM,WAAW,KAAK,OAAO,KAAK;AAAA,IACpC;AAGA,QAAI,CAAC,OAAO,MAAM;AAChB,YAAM,WAAW,KAAK,6BAA6B;AAAA,IACrD;AAGA,QAAI,OAAO,SAAS,KAAK,OAAO;AAC9B,cAAQ,MAAM,kCAAkC,OAAO,KAAK;AAAA,IAC9D;AAEA,WAAO,OAAO;AAAA,EAChB;AACF;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { WhiskActionFn } from './types.js';
|
|
1
|
+
export { WhiskError } from './errors.js';
|
|
3
2
|
export { WhiskClient, WhiskClientConfig } from './WhiskClient.js';
|
|
4
|
-
import 'gql.tada';
|
|
5
|
-
import '@whisk/graphql';
|
|
6
|
-
import 'neverthrow';
|
|
7
|
-
import './errors.js';
|
|
8
3
|
import '@urql/core';
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from \"./errors.js\"\nexport * from \"./WhiskClient.js\"\n"],"mappings":"AAAA,cAAc;AACd,cAAc;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whisk/client",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.9",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/office-supply-ventures/whisk-sdk.git",
|
|
7
|
+
"directory": "packages/client"
|
|
8
|
+
},
|
|
4
9
|
"type": "module",
|
|
5
10
|
"main": "./dist/index.js",
|
|
6
11
|
"license": "MIT",
|
|
@@ -19,11 +24,10 @@
|
|
|
19
24
|
}
|
|
20
25
|
},
|
|
21
26
|
"dependencies": {
|
|
22
|
-
"@atmina/urql-custom-scalars-exchange": "
|
|
23
|
-
"@urql/core": "
|
|
27
|
+
"@atmina/urql-custom-scalars-exchange": "1.2.0",
|
|
28
|
+
"@urql/core": "6.0.1",
|
|
24
29
|
"gql.tada": "1.9.0",
|
|
25
|
-
"
|
|
26
|
-
"@whisk/graphql": "0.0.6"
|
|
30
|
+
"@whisk/graphql": "0.0.9"
|
|
27
31
|
},
|
|
28
32
|
"peerDependencies": {
|
|
29
33
|
"graphql": ">=16"
|
package/src/WhiskClient.ts
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
type TypedDocumentNode,
|
|
6
6
|
Client as UrqlClient,
|
|
7
7
|
} from "@urql/core"
|
|
8
|
-
import { errAsync, okAsync, ResultAsync } from "neverthrow"
|
|
9
8
|
import { WhiskError } from "./errors.js"
|
|
10
9
|
import { scalarsExchange } from "./scalarExchange.js"
|
|
11
10
|
|
|
@@ -35,29 +34,27 @@ export class WhiskClient {
|
|
|
35
34
|
this.debug = debug
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
public query<TValue, TVariables extends AnyVariables>(
|
|
37
|
+
public async query<TValue, TVariables extends AnyVariables>(
|
|
39
38
|
document: TypedDocumentNode<TValue, TVariables>,
|
|
40
39
|
variables: TVariables,
|
|
41
|
-
):
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return okAsync(result.data)
|
|
61
|
-
})
|
|
40
|
+
): Promise<TValue> {
|
|
41
|
+
const result = await this.urql.query(document, variables)
|
|
42
|
+
|
|
43
|
+
// Bubbles up any network errors
|
|
44
|
+
if (result.error && !result.data) {
|
|
45
|
+
throw WhiskError.from(result.error)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Error if we have no data
|
|
49
|
+
if (!result.data) {
|
|
50
|
+
throw WhiskError.from("No data returned from query")
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// Log any graphql errors (but don't put into error, since partial is fine)
|
|
54
|
+
if (result.error && this.debug) {
|
|
55
|
+
console.debug("[Whisk Client] GraphQL errors:", result.error)
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return result.data
|
|
62
59
|
}
|
|
63
60
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as gql_tada from 'gql.tada';
|
|
2
|
-
import { FragmentOf } from '@whisk/graphql';
|
|
3
|
-
|
|
4
|
-
declare const vaultSummaryFragment: gql_tada.TadaDocumentNode<{
|
|
5
|
-
chain: {
|
|
6
|
-
id: number;
|
|
7
|
-
};
|
|
8
|
-
vaultAddress: `0x${string}`;
|
|
9
|
-
totalSupplied: {
|
|
10
|
-
raw: bigint;
|
|
11
|
-
};
|
|
12
|
-
}, {}, {
|
|
13
|
-
fragment: "VaultSummaryFragment";
|
|
14
|
-
on: "MorphoVault";
|
|
15
|
-
masked: false;
|
|
16
|
-
}>;
|
|
17
|
-
type VaultSummary = FragmentOf<typeof vaultSummaryFragment>;
|
|
18
|
-
|
|
19
|
-
export { type VaultSummary, vaultSummaryFragment };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { graphql } from "@whisk/graphql";
|
|
2
|
-
const vaultSummaryFragment = graphql(`
|
|
3
|
-
fragment VaultSummaryFragment on MorphoVault {
|
|
4
|
-
chain {
|
|
5
|
-
id
|
|
6
|
-
}
|
|
7
|
-
vaultAddress
|
|
8
|
-
totalSupplied {
|
|
9
|
-
raw
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`);
|
|
13
|
-
export {
|
|
14
|
-
vaultSummaryFragment
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=vault.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/actions/fragments/vault.ts"],"sourcesContent":["import { type FragmentOf, graphql } from \"@whisk/graphql\"\n\nexport const vaultSummaryFragment = graphql(`\n fragment VaultSummaryFragment on MorphoVault {\n chain {\n id\n }\n vaultAddress\n totalSupplied {\n raw\n }\n }\n`)\n\nexport type VaultSummary = FragmentOf<typeof vaultSummaryFragment>\n"],"mappings":"AAAA,SAA0B,eAAe;AAElC,MAAM,uBAAuB,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAU3C;","names":[]}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as gql_tada from 'gql.tada';
|
|
2
|
-
import { VariablesOf } from 'gql.tada';
|
|
3
|
-
import { ResultOf } from '@whisk/graphql';
|
|
4
|
-
import { WhiskActionFn } from '../types.js';
|
|
5
|
-
import '../WhiskClient.js';
|
|
6
|
-
import 'neverthrow';
|
|
7
|
-
import '../errors.js';
|
|
8
|
-
import '@urql/core';
|
|
9
|
-
|
|
10
|
-
declare const vaultSummaryQuery: gql_tada.TadaDocumentNode<{
|
|
11
|
-
morphoVaults: {
|
|
12
|
-
items: ({
|
|
13
|
-
chain: {
|
|
14
|
-
id: number;
|
|
15
|
-
};
|
|
16
|
-
vaultAddress: `0x${string}`;
|
|
17
|
-
totalSupplied: {
|
|
18
|
-
raw: bigint;
|
|
19
|
-
};
|
|
20
|
-
} | null)[];
|
|
21
|
-
};
|
|
22
|
-
}, {
|
|
23
|
-
limit: number;
|
|
24
|
-
}, void>;
|
|
25
|
-
type GetVaultSummariesVariables = VariablesOf<typeof vaultSummaryQuery>;
|
|
26
|
-
type GetVaultSummariesResult = ResultOf<typeof vaultSummaryQuery>["morphoVaults"]["items"];
|
|
27
|
-
declare const getVaultSummaries: WhiskActionFn<GetVaultSummariesResult, GetVaultSummariesVariables>;
|
|
28
|
-
|
|
29
|
-
export { type GetVaultSummariesResult, type GetVaultSummariesVariables, getVaultSummaries, vaultSummaryQuery };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { graphql } from "@whisk/graphql";
|
|
2
|
-
import { vaultSummaryFragment } from "./fragments/vault.js";
|
|
3
|
-
const vaultSummaryQuery = graphql(
|
|
4
|
-
`
|
|
5
|
-
query ($limit: Int!) {
|
|
6
|
-
morphoVaults(limit: $limit) {
|
|
7
|
-
items {
|
|
8
|
-
...VaultSummaryFragment
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
`,
|
|
13
|
-
[vaultSummaryFragment]
|
|
14
|
-
);
|
|
15
|
-
const getVaultSummaries = (client, variables) => {
|
|
16
|
-
return client.query(vaultSummaryQuery, variables).map((result) => result.morphoVaults.items);
|
|
17
|
-
};
|
|
18
|
-
export {
|
|
19
|
-
getVaultSummaries,
|
|
20
|
-
vaultSummaryQuery
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=getVaultSummaries.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/actions/getVaultSummaries.ts"],"sourcesContent":["import { graphql, type ResultOf } from \"@whisk/graphql\"\nimport type { VariablesOf } from \"gql.tada\"\nimport type { WhiskActionFn } from \"../types.js\"\nimport { vaultSummaryFragment } from \"./fragments/vault.js\"\n\nexport const vaultSummaryQuery = graphql(\n `\n query ($limit: Int!) {\n morphoVaults(limit: $limit) {\n items {\n ...VaultSummaryFragment\n }\n }\n }\n `,\n [vaultSummaryFragment],\n)\n\nexport type GetVaultSummariesVariables = VariablesOf<typeof vaultSummaryQuery>\nexport type GetVaultSummariesResult = ResultOf<typeof vaultSummaryQuery>[\"morphoVaults\"][\"items\"]\n\nexport const getVaultSummaries: WhiskActionFn<\n GetVaultSummariesResult,\n GetVaultSummariesVariables\n> = (client, variables) => {\n return client.query(vaultSummaryQuery, variables).map((result) => result.morphoVaults.items)\n}\n"],"mappings":"AAAA,SAAS,eAA8B;AAGvC,SAAS,4BAA4B;AAE9B,MAAM,oBAAoB;AAAA,EAC/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASA,CAAC,oBAAoB;AACvB;AAKO,MAAM,oBAGT,CAAC,QAAQ,cAAc;AACzB,SAAO,OAAO,MAAM,mBAAmB,SAAS,EAAE,IAAI,CAAC,WAAW,OAAO,aAAa,KAAK;AAC7F;","names":[]}
|
package/dist/types.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ResultAsync } from 'neverthrow';
|
|
2
|
-
import { WhiskError } from './errors.js';
|
|
3
|
-
import { WhiskClient } from './WhiskClient.js';
|
|
4
|
-
import '@urql/core';
|
|
5
|
-
|
|
6
|
-
type WhiskActionFn<TData, TVariables = void> = (client: WhiskClient, variables: TVariables) => ResultAsync<TData, WhiskError>;
|
|
7
|
-
|
|
8
|
-
export type { WhiskActionFn };
|
package/dist/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { type FragmentOf, graphql } from "@whisk/graphql"
|
|
2
|
-
|
|
3
|
-
export const vaultSummaryFragment = graphql(`
|
|
4
|
-
fragment VaultSummaryFragment on MorphoVault {
|
|
5
|
-
chain {
|
|
6
|
-
id
|
|
7
|
-
}
|
|
8
|
-
vaultAddress
|
|
9
|
-
totalSupplied {
|
|
10
|
-
raw
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
`)
|
|
14
|
-
|
|
15
|
-
export type VaultSummary = FragmentOf<typeof vaultSummaryFragment>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { graphql, type ResultOf } from "@whisk/graphql"
|
|
2
|
-
import type { VariablesOf } from "gql.tada"
|
|
3
|
-
import type { WhiskActionFn } from "../types.js"
|
|
4
|
-
import { vaultSummaryFragment } from "./fragments/vault.js"
|
|
5
|
-
|
|
6
|
-
export const vaultSummaryQuery = graphql(
|
|
7
|
-
`
|
|
8
|
-
query ($limit: Int!) {
|
|
9
|
-
morphoVaults(limit: $limit) {
|
|
10
|
-
items {
|
|
11
|
-
...VaultSummaryFragment
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
`,
|
|
16
|
-
[vaultSummaryFragment],
|
|
17
|
-
)
|
|
18
|
-
|
|
19
|
-
export type GetVaultSummariesVariables = VariablesOf<typeof vaultSummaryQuery>
|
|
20
|
-
export type GetVaultSummariesResult = ResultOf<typeof vaultSummaryQuery>["morphoVaults"]["items"]
|
|
21
|
-
|
|
22
|
-
export const getVaultSummaries: WhiskActionFn<
|
|
23
|
-
GetVaultSummariesResult,
|
|
24
|
-
GetVaultSummariesVariables
|
|
25
|
-
> = (client, variables) => {
|
|
26
|
-
return client.query(vaultSummaryQuery, variables).map((result) => result.morphoVaults.items)
|
|
27
|
-
}
|
package/src/client.test.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { describe, test } from "vitest"
|
|
2
|
-
import { getVaultSummaries, WhiskClient } from "./index.js"
|
|
3
|
-
|
|
4
|
-
describe("dummy", () => {
|
|
5
|
-
test("default", async () => {
|
|
6
|
-
const whiskClient = new WhiskClient({
|
|
7
|
-
url: "https://staging.api-v2.whisk.so/graphql",
|
|
8
|
-
apiKey: process.env.WHISK_API_KEY as string,
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
const result = await getVaultSummaries(whiskClient, { limit: 10 })
|
|
12
|
-
if (result.isOk()) {
|
|
13
|
-
console.log(result.value.map((r) => r?.totalSupplied))
|
|
14
|
-
}
|
|
15
|
-
})
|
|
16
|
-
})
|
package/src/types.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ResultAsync } from "neverthrow"
|
|
2
|
-
import type { WhiskError } from "./errors.js"
|
|
3
|
-
import type { WhiskClient } from "./WhiskClient.js"
|
|
4
|
-
|
|
5
|
-
export type WhiskActionFn<TData, TVariables = void> = (
|
|
6
|
-
client: WhiskClient,
|
|
7
|
-
variables: TVariables,
|
|
8
|
-
) => ResultAsync<TData, WhiskError>
|