@avaprotocol/sdk-js 2.17.0 → 4.0.0-dev.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.ts +1 -370
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +737 -22356
- package/dist/index.mjs +699 -22386
- package/dist/v4/auth.d.ts +54 -0
- package/dist/v4/auth.d.ts.map +1 -0
- package/dist/v4/auth.js +70 -0
- package/dist/v4/builders/nodes.d.ts +103 -0
- package/dist/v4/builders/nodes.d.ts.map +1 -0
- package/dist/v4/builders/nodes.js +132 -0
- package/dist/v4/builders/triggers.d.ts +66 -0
- package/dist/v4/builders/triggers.d.ts.map +1 -0
- package/dist/v4/builders/triggers.js +74 -0
- package/dist/v4/chains.d.ts +16 -0
- package/dist/v4/chains.d.ts.map +1 -0
- package/dist/v4/chains.js +23 -0
- package/dist/v4/client.d.ts +60 -0
- package/dist/v4/client.d.ts.map +1 -0
- package/dist/v4/client.js +53 -0
- package/dist/v4/index.d.ts +18 -0
- package/dist/v4/index.d.ts.map +1 -0
- package/dist/v4/index.js +23 -0
- package/dist/v4/internal/errors.d.ts +36 -0
- package/dist/v4/internal/errors.d.ts.map +1 -0
- package/dist/v4/internal/errors.js +32 -0
- package/dist/v4/internal/transport.d.ts +64 -0
- package/dist/v4/internal/transport.d.ts.map +1 -0
- package/dist/v4/internal/transport.js +133 -0
- package/dist/v4/resources/auth.d.ts +39 -0
- package/dist/v4/resources/auth.d.ts.map +1 -0
- package/dist/v4/resources/auth.js +53 -0
- package/dist/v4/resources/executions.d.ts +68 -0
- package/dist/v4/resources/executions.d.ts.map +1 -0
- package/dist/v4/resources/executions.js +126 -0
- package/dist/v4/resources/health.d.ts +9 -0
- package/dist/v4/resources/health.d.ts.map +1 -0
- package/dist/v4/resources/health.js +9 -0
- package/dist/v4/resources/nodes.d.ts +9 -0
- package/dist/v4/resources/nodes.d.ts.map +1 -0
- package/dist/v4/resources/nodes.js +13 -0
- package/dist/v4/resources/operators.d.ts +9 -0
- package/dist/v4/resources/operators.d.ts.map +1 -0
- package/dist/v4/resources/operators.js +9 -0
- package/dist/v4/resources/secrets.d.ts +24 -0
- package/dist/v4/resources/secrets.d.ts.map +1 -0
- package/dist/v4/resources/secrets.js +28 -0
- package/dist/v4/resources/tokens.d.ts +16 -0
- package/dist/v4/resources/tokens.d.ts.map +1 -0
- package/dist/v4/resources/tokens.js +17 -0
- package/dist/v4/resources/triggers.d.ts +9 -0
- package/dist/v4/resources/triggers.d.ts.map +1 -0
- package/dist/v4/resources/triggers.js +13 -0
- package/dist/v4/resources/wallets.d.ts +25 -0
- package/dist/v4/resources/wallets.d.ts.map +1 -0
- package/dist/v4/resources/wallets.js +45 -0
- package/dist/v4/resources/workflows.d.ts +54 -0
- package/dist/v4/resources/workflows.d.ts.map +1 -0
- package/dist/v4/resources/workflows.js +81 -0
- package/package.json +4 -12
- package/dist/auth.d.ts +0 -2
- package/dist/auth.d.ts.map +0 -1
- package/dist/auth.js +0 -10
- package/dist/config.d.ts +0 -9
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js +0 -19
- package/dist/models/edge.d.ts +0 -12
- package/dist/models/edge.d.ts.map +0 -1
- package/dist/models/edge.js +0 -19
- package/dist/models/execution.d.ts +0 -30
- package/dist/models/execution.d.ts.map +0 -1
- package/dist/models/execution.js +0 -100
- package/dist/models/node/balance.d.ts +0 -17
- package/dist/models/node/balance.d.ts.map +0 -1
- package/dist/models/node/balance.js +0 -78
- package/dist/models/node/branch.d.ts +0 -11
- package/dist/models/node/branch.d.ts.map +0 -1
- package/dist/models/node/branch.js +0 -63
- package/dist/models/node/contractRead.d.ts +0 -17
- package/dist/models/node/contractRead.d.ts.map +0 -1
- package/dist/models/node/contractRead.js +0 -91
- package/dist/models/node/contractWrite.d.ts +0 -17
- package/dist/models/node/contractWrite.d.ts.map +0 -1
- package/dist/models/node/contractWrite.js +0 -102
- package/dist/models/node/customCode.d.ts +0 -20
- package/dist/models/node/customCode.d.ts.map +0 -1
- package/dist/models/node/customCode.js +0 -74
- package/dist/models/node/ethTransfer.d.ts +0 -20
- package/dist/models/node/ethTransfer.d.ts.map +0 -1
- package/dist/models/node/ethTransfer.js +0 -58
- package/dist/models/node/factory.d.ts +0 -24
- package/dist/models/node/factory.d.ts.map +0 -1
- package/dist/models/node/factory.js +0 -108
- package/dist/models/node/filter.d.ts +0 -11
- package/dist/models/node/filter.d.ts.map +0 -1
- package/dist/models/node/filter.js +0 -57
- package/dist/models/node/graphqlQuery.d.ts +0 -21
- package/dist/models/node/graphqlQuery.d.ts.map +0 -1
- package/dist/models/node/graphqlQuery.js +0 -74
- package/dist/models/node/interface.d.ts +0 -20
- package/dist/models/node/interface.d.ts.map +0 -1
- package/dist/models/node/interface.js +0 -58
- package/dist/models/node/loop.d.ts +0 -15
- package/dist/models/node/loop.d.ts.map +0 -1
- package/dist/models/node/loop.js +0 -235
- package/dist/models/node/restApi.d.ts +0 -23
- package/dist/models/node/restApi.d.ts.map +0 -1
- package/dist/models/node/restApi.js +0 -84
- package/dist/models/secret.d.ts +0 -16
- package/dist/models/secret.d.ts.map +0 -1
- package/dist/models/secret.js +0 -28
- package/dist/models/step.d.ts +0 -33
- package/dist/models/step.d.ts.map +0 -1
- package/dist/models/step.js +0 -287
- package/dist/models/trigger/block.d.ts +0 -21
- package/dist/models/trigger/block.d.ts.map +0 -1
- package/dist/models/trigger/block.js +0 -81
- package/dist/models/trigger/cron.d.ts +0 -23
- package/dist/models/trigger/cron.d.ts.map +0 -1
- package/dist/models/trigger/cron.js +0 -77
- package/dist/models/trigger/event.d.ts +0 -22
- package/dist/models/trigger/event.d.ts.map +0 -1
- package/dist/models/trigger/event.js +0 -244
- package/dist/models/trigger/factory.d.ts +0 -27
- package/dist/models/trigger/factory.d.ts.map +0 -1
- package/dist/models/trigger/factory.js +0 -73
- package/dist/models/trigger/fixedTime.d.ts +0 -23
- package/dist/models/trigger/fixedTime.d.ts.map +0 -1
- package/dist/models/trigger/fixedTime.js +0 -69
- package/dist/models/trigger/interface.d.ts +0 -19
- package/dist/models/trigger/interface.d.ts.map +0 -1
- package/dist/models/trigger/interface.js +0 -35
- package/dist/models/trigger/manual.d.ts +0 -16
- package/dist/models/trigger/manual.d.ts.map +0 -1
- package/dist/models/trigger/manual.js +0 -117
- package/dist/models/workflow.d.ts +0 -53
- package/dist/models/workflow.d.ts.map +0 -1
- package/dist/models/workflow.js +0 -219
- package/dist/utils.d.ts +0 -82
- package/dist/utils.d.ts.map +0 -1
- package/dist/utils.js +0 -286
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { Transport } from "./internal/transport";
|
|
2
|
+
import { AuthResource } from "./resources/auth";
|
|
3
|
+
import { ExecutionsResource } from "./resources/executions";
|
|
4
|
+
import { HealthResource } from "./resources/health";
|
|
5
|
+
import { NodesResource } from "./resources/nodes";
|
|
6
|
+
import { OperatorsResource } from "./resources/operators";
|
|
7
|
+
import { SecretsResource } from "./resources/secrets";
|
|
8
|
+
import { TokensResource } from "./resources/tokens";
|
|
9
|
+
import { TriggersResource } from "./resources/triggers";
|
|
10
|
+
import { WalletsResource } from "./resources/wallets";
|
|
11
|
+
import { WorkflowsResource } from "./resources/workflows";
|
|
12
|
+
/**
|
|
13
|
+
* v4 SDK entry point. Resource-grouped sub-clients (Stripe / OpenAI
|
|
14
|
+
* convention). Construct one Client per aggregator endpoint; all
|
|
15
|
+
* requests share the same transport (and therefore the same Bearer
|
|
16
|
+
* token + timeout + fetch impl).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* import { Client } from "@avaprotocol/sdk-js";
|
|
20
|
+
* const client = new Client({ baseUrl: process.env.AVS_REST_URL! });
|
|
21
|
+
* await client.auth.exchangeWithKey(process.env.TEST_PRIVATE_KEY!);
|
|
22
|
+
* const wf = await client.workflows.create({ ... });
|
|
23
|
+
* await client.workflows.cancel(wf.id);
|
|
24
|
+
*/
|
|
25
|
+
export class Client {
|
|
26
|
+
constructor(opts) {
|
|
27
|
+
const transportOpts = {
|
|
28
|
+
baseUrl: opts.baseUrl,
|
|
29
|
+
token: opts.token,
|
|
30
|
+
defaultTimeoutMs: opts.defaultTimeoutMs,
|
|
31
|
+
fetchImpl: opts.fetchImpl,
|
|
32
|
+
};
|
|
33
|
+
this.transport = new Transport(transportOpts);
|
|
34
|
+
this.auth = new AuthResource(this.transport);
|
|
35
|
+
this.executions = new ExecutionsResource(this.transport);
|
|
36
|
+
this.health = new HealthResource(this.transport);
|
|
37
|
+
this.nodes = new NodesResource(this.transport);
|
|
38
|
+
this.operators = new OperatorsResource(this.transport);
|
|
39
|
+
this.secrets = new SecretsResource(this.transport);
|
|
40
|
+
this.tokens = new TokensResource(this.transport);
|
|
41
|
+
this.triggers = new TriggersResource(this.transport);
|
|
42
|
+
this.wallets = new WalletsResource(this.transport);
|
|
43
|
+
this.workflows = new WorkflowsResource(this.transport);
|
|
44
|
+
}
|
|
45
|
+
/** Replace the current Bearer token. */
|
|
46
|
+
setToken(token) {
|
|
47
|
+
this.transport.setToken(token);
|
|
48
|
+
}
|
|
49
|
+
/** Current Bearer token. Returns undefined when anonymous. */
|
|
50
|
+
get token() {
|
|
51
|
+
return this.transport.getToken();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export { Client, type ClientOptions } from "./client";
|
|
2
|
+
export { Chains, type ChainId } from "./chains";
|
|
3
|
+
export { Triggers } from "./builders/triggers";
|
|
4
|
+
export { Nodes } from "./builders/nodes";
|
|
5
|
+
export { buildAuthMessage, signAuthMessage, AUTH_TEMPLATE, type BuildAuthMessageInput, type BuiltAuthMessage, } from "./auth";
|
|
6
|
+
export { APIError, NetworkError, AuthRequiredError } from "./internal/errors";
|
|
7
|
+
export { AuthResource } from "./resources/auth";
|
|
8
|
+
export { ExecutionsResource } from "./resources/executions";
|
|
9
|
+
export { HealthResource } from "./resources/health";
|
|
10
|
+
export { NodesResource } from "./resources/nodes";
|
|
11
|
+
export { OperatorsResource } from "./resources/operators";
|
|
12
|
+
export { SecretsResource } from "./resources/secrets";
|
|
13
|
+
export { TokensResource } from "./resources/tokens";
|
|
14
|
+
export { TriggersResource } from "./resources/triggers";
|
|
15
|
+
export { WalletsResource } from "./resources/wallets";
|
|
16
|
+
export { WorkflowsResource } from "./resources/workflows";
|
|
17
|
+
export type { v4 } from "@avaprotocol/types";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/v4/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,KAAK,OAAO,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM,QAAQ,CAAC;AAChB,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAK9E,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI1D,YAAY,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/v4/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
// Public v4 entrypoint. Consumers should `import { Client } from
|
|
2
|
+
// "@avaprotocol/sdk-js"` once the v3 surface is retired and this
|
|
3
|
+
// becomes the root export. For now the v3 index re-exports the v4
|
|
4
|
+
// names alongside the v3 ones so partners can migrate incrementally.
|
|
5
|
+
export { Client } from "./client";
|
|
6
|
+
export { Chains } from "./chains";
|
|
7
|
+
export { Triggers } from "./builders/triggers";
|
|
8
|
+
export { Nodes } from "./builders/nodes";
|
|
9
|
+
export { buildAuthMessage, signAuthMessage, AUTH_TEMPLATE, } from "./auth";
|
|
10
|
+
export { APIError, NetworkError, AuthRequiredError } from "./internal/errors";
|
|
11
|
+
// Resource classes are exported in case advanced consumers want to
|
|
12
|
+
// hand-construct one without going through Client. Most callers
|
|
13
|
+
// won't need these.
|
|
14
|
+
export { AuthResource } from "./resources/auth";
|
|
15
|
+
export { ExecutionsResource } from "./resources/executions";
|
|
16
|
+
export { HealthResource } from "./resources/health";
|
|
17
|
+
export { NodesResource } from "./resources/nodes";
|
|
18
|
+
export { OperatorsResource } from "./resources/operators";
|
|
19
|
+
export { SecretsResource } from "./resources/secrets";
|
|
20
|
+
export { TokensResource } from "./resources/tokens";
|
|
21
|
+
export { TriggersResource } from "./resources/triggers";
|
|
22
|
+
export { WalletsResource } from "./resources/wallets";
|
|
23
|
+
export { WorkflowsResource } from "./resources/workflows";
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { v4 } from "@avaprotocol/types";
|
|
2
|
+
/**
|
|
3
|
+
* Thrown when the server returns a 4xx/5xx response. The aggregator
|
|
4
|
+
* speaks RFC 7807 problem+json (`application/problem+json`); this
|
|
5
|
+
* class surfaces every field plus the underlying HTTP status so SDK
|
|
6
|
+
* callers can pattern-match without re-parsing the body.
|
|
7
|
+
*/
|
|
8
|
+
export declare class APIError extends Error {
|
|
9
|
+
/** HTTP status code (echoed from the response). */
|
|
10
|
+
readonly status: number;
|
|
11
|
+
/** Machine-readable error code (Problem.code), e.g. `AUTH_INVALID_TOKEN`. */
|
|
12
|
+
readonly code?: string;
|
|
13
|
+
/** Short human-readable summary (Problem.title). */
|
|
14
|
+
readonly title?: string;
|
|
15
|
+
/** Per-request identifier — also surfaced via X-Request-ID header. */
|
|
16
|
+
readonly requestId?: string;
|
|
17
|
+
/** The full parsed Problem body, when the server returned one. */
|
|
18
|
+
readonly problem?: v4.Problem;
|
|
19
|
+
constructor(status: number, init: {
|
|
20
|
+
code?: string;
|
|
21
|
+
title?: string;
|
|
22
|
+
detail?: string;
|
|
23
|
+
requestId?: string;
|
|
24
|
+
problem?: v4.Problem;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/** Thrown when the SDK can't reach the server (DNS failure, fetch threw). */
|
|
28
|
+
export declare class NetworkError extends Error {
|
|
29
|
+
readonly cause?: unknown;
|
|
30
|
+
constructor(message: string, cause?: unknown);
|
|
31
|
+
}
|
|
32
|
+
/** Thrown when the auth credential is missing or expired before a call. */
|
|
33
|
+
export declare class AuthRequiredError extends Error {
|
|
34
|
+
constructor(message?: string);
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../src/v4/internal/errors.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C;;;;;GAKG;AACH,qBAAa,QAAS,SAAQ,KAAK;IACjC,mDAAmD;IACnD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IACxB,sEAAsE;IACtE,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC;gBAG5B,MAAM,EAAE,MAAM,EACd,IAAI,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAA;KAAE;CAUrG;AAED,6EAA6E;AAC7E,qBAAa,YAAa,SAAQ,KAAK;IACrC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;gBACb,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAK7C;AAED,2EAA2E;AAC3E,qBAAa,iBAAkB,SAAQ,KAAK;gBAC9B,OAAO,SAAgE;CAIpF"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Thrown when the server returns a 4xx/5xx response. The aggregator
|
|
3
|
+
* speaks RFC 7807 problem+json (`application/problem+json`); this
|
|
4
|
+
* class surfaces every field plus the underlying HTTP status so SDK
|
|
5
|
+
* callers can pattern-match without re-parsing the body.
|
|
6
|
+
*/
|
|
7
|
+
export class APIError extends Error {
|
|
8
|
+
constructor(status, init) {
|
|
9
|
+
super(init.detail || init.title || `HTTP ${status}`);
|
|
10
|
+
this.name = "APIError";
|
|
11
|
+
this.status = status;
|
|
12
|
+
this.code = init.code;
|
|
13
|
+
this.title = init.title;
|
|
14
|
+
this.requestId = init.requestId;
|
|
15
|
+
this.problem = init.problem;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** Thrown when the SDK can't reach the server (DNS failure, fetch threw). */
|
|
19
|
+
export class NetworkError extends Error {
|
|
20
|
+
constructor(message, cause) {
|
|
21
|
+
super(message);
|
|
22
|
+
this.name = "NetworkError";
|
|
23
|
+
this.cause = cause;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
/** Thrown when the auth credential is missing or expired before a call. */
|
|
27
|
+
export class AuthRequiredError extends Error {
|
|
28
|
+
constructor(message = "Authentication required — call client.auth.exchange() first") {
|
|
29
|
+
super(message);
|
|
30
|
+
this.name = "AuthRequiredError";
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal fetch wrapper used by every v4 sub-client. Owns the
|
|
3
|
+
* baseURL, the Bearer JWT, default timeouts, and the
|
|
4
|
+
* problem+json → APIError translation.
|
|
5
|
+
*
|
|
6
|
+
* Built on top of `globalThis.fetch` so it works in Node 20+ and in
|
|
7
|
+
* the browser without bundling node-fetch. Streaming endpoints
|
|
8
|
+
* (executions:stream) bypass `request()` and use `stream()` instead so
|
|
9
|
+
* the response body can be read incrementally.
|
|
10
|
+
*/
|
|
11
|
+
export interface TransportOptions {
|
|
12
|
+
/** Base URL including the `/api/v1` prefix, no trailing slash. */
|
|
13
|
+
readonly baseUrl: string;
|
|
14
|
+
/** Bearer JWT minted via POST /auth:exchange. */
|
|
15
|
+
token?: string;
|
|
16
|
+
/** Default request timeout in milliseconds (per request). */
|
|
17
|
+
defaultTimeoutMs?: number;
|
|
18
|
+
/** Optional fetch implementation override (tests / non-Node runtimes). */
|
|
19
|
+
fetchImpl?: typeof fetch;
|
|
20
|
+
}
|
|
21
|
+
export interface RequestOptions {
|
|
22
|
+
/** Path appended to baseUrl, e.g. `/workflows/01ABC`. */
|
|
23
|
+
path: string;
|
|
24
|
+
/** HTTP method — defaults to GET. */
|
|
25
|
+
method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
26
|
+
/**
|
|
27
|
+
* Query parameters; arrays repeat the key
|
|
28
|
+
* (`?status=enabled&status=disabled`). Typed as `object` so
|
|
29
|
+
* resource handlers can pass through their own param interfaces
|
|
30
|
+
* without adding index signatures.
|
|
31
|
+
*/
|
|
32
|
+
query?: object;
|
|
33
|
+
/** Body payload — JSON-serialized before send. */
|
|
34
|
+
body?: unknown;
|
|
35
|
+
/** Per-request timeout override. */
|
|
36
|
+
timeoutMs?: number;
|
|
37
|
+
/** Extra headers merged on top of the transport defaults. */
|
|
38
|
+
headers?: Record<string, string>;
|
|
39
|
+
/** Pre-resolved AbortSignal for cancellation. */
|
|
40
|
+
signal?: AbortSignal;
|
|
41
|
+
}
|
|
42
|
+
export declare class Transport {
|
|
43
|
+
private readonly baseUrl;
|
|
44
|
+
private readonly defaultTimeoutMs;
|
|
45
|
+
private readonly fetchImpl;
|
|
46
|
+
private bearerToken?;
|
|
47
|
+
constructor(opts: TransportOptions);
|
|
48
|
+
/** Replace the Bearer token. Used after `client.auth.exchange()`. */
|
|
49
|
+
setToken(token: string | undefined): void;
|
|
50
|
+
/** Read the current Bearer token (for tests / debugging). */
|
|
51
|
+
getToken(): string | undefined;
|
|
52
|
+
/** Issue a JSON request and decode the response body. */
|
|
53
|
+
request<T>(opts: RequestOptions): Promise<T>;
|
|
54
|
+
/**
|
|
55
|
+
* Issue a request and return the raw Response so the caller can
|
|
56
|
+
* read it incrementally. Used by the executions:stream SSE handler.
|
|
57
|
+
* Throws APIError on non-2xx exactly like `request()` does.
|
|
58
|
+
*/
|
|
59
|
+
stream(opts: RequestOptions): Promise<Response>;
|
|
60
|
+
private send;
|
|
61
|
+
private toAPIError;
|
|
62
|
+
private buildUrl;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=transport.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transport.d.ts","sourceRoot":"","sources":["../../../src/v4/internal/transport.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kEAAkE;IAClE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6DAA6D;IAC7D,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,SAAS,CAAC,EAAE,OAAO,KAAK,CAAC;CAC1B;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,CAAC;IACrD;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,oCAAoC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,iDAAiD;IACjD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,qBAAa,SAAS;IACpB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAe;IACzC,OAAO,CAAC,WAAW,CAAC,CAAS;gBAEjB,IAAI,EAAE,gBAAgB;IAOlC,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAIzC,6DAA6D;IAC7D,QAAQ,IAAI,MAAM,GAAG,SAAS;IAI9B,yDAAyD;IACnD,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,CAAC,CAAC;IAmBlD;;;;OAIG;IACG,MAAM,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;YAIvC,IAAI;YAgDJ,UAAU;IAyBxB,OAAO,CAAC,QAAQ;CAiBjB"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { APIError, NetworkError } from "./errors";
|
|
2
|
+
export class Transport {
|
|
3
|
+
constructor(opts) {
|
|
4
|
+
this.baseUrl = opts.baseUrl.replace(/\/$/, "");
|
|
5
|
+
this.defaultTimeoutMs = opts.defaultTimeoutMs ?? 30000;
|
|
6
|
+
this.fetchImpl = opts.fetchImpl ?? globalThis.fetch.bind(globalThis);
|
|
7
|
+
this.bearerToken = opts.token;
|
|
8
|
+
}
|
|
9
|
+
/** Replace the Bearer token. Used after `client.auth.exchange()`. */
|
|
10
|
+
setToken(token) {
|
|
11
|
+
this.bearerToken = token;
|
|
12
|
+
}
|
|
13
|
+
/** Read the current Bearer token (for tests / debugging). */
|
|
14
|
+
getToken() {
|
|
15
|
+
return this.bearerToken;
|
|
16
|
+
}
|
|
17
|
+
/** Issue a JSON request and decode the response body. */
|
|
18
|
+
async request(opts) {
|
|
19
|
+
const response = await this.send(opts);
|
|
20
|
+
if (response.status === 204) {
|
|
21
|
+
// 204 No Content — used by DELETE / PUT acks. Callers should
|
|
22
|
+
// type T as `void`.
|
|
23
|
+
return undefined;
|
|
24
|
+
}
|
|
25
|
+
const text = await response.text();
|
|
26
|
+
if (!text)
|
|
27
|
+
return undefined;
|
|
28
|
+
try {
|
|
29
|
+
return JSON.parse(text);
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
throw new NetworkError(`Failed to parse JSON response from ${opts.path}: ${err.message}`, err);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Issue a request and return the raw Response so the caller can
|
|
37
|
+
* read it incrementally. Used by the executions:stream SSE handler.
|
|
38
|
+
* Throws APIError on non-2xx exactly like `request()` does.
|
|
39
|
+
*/
|
|
40
|
+
async stream(opts) {
|
|
41
|
+
return this.send(opts);
|
|
42
|
+
}
|
|
43
|
+
async send(opts) {
|
|
44
|
+
const url = this.buildUrl(opts.path, opts.query);
|
|
45
|
+
const controller = new AbortController();
|
|
46
|
+
const timeoutMs = opts.timeoutMs ?? this.defaultTimeoutMs;
|
|
47
|
+
// timeoutMs <= 0 means "no timeout" (used by SSE streams). With
|
|
48
|
+
// a positive value we schedule an abort; otherwise the only
|
|
49
|
+
// cancellation channel is the caller-supplied signal.
|
|
50
|
+
const timeoutId = timeoutMs > 0
|
|
51
|
+
? setTimeout(() => controller.abort(), timeoutMs)
|
|
52
|
+
: undefined;
|
|
53
|
+
if (opts.signal) {
|
|
54
|
+
opts.signal.addEventListener("abort", () => controller.abort(), { once: true });
|
|
55
|
+
}
|
|
56
|
+
const headers = {
|
|
57
|
+
Accept: "application/json",
|
|
58
|
+
...opts.headers,
|
|
59
|
+
};
|
|
60
|
+
if (this.bearerToken) {
|
|
61
|
+
headers.Authorization = `Bearer ${this.bearerToken}`;
|
|
62
|
+
}
|
|
63
|
+
let body;
|
|
64
|
+
if (opts.body !== undefined && opts.body !== null) {
|
|
65
|
+
headers["Content-Type"] ?? (headers["Content-Type"] = "application/json");
|
|
66
|
+
body = JSON.stringify(opts.body);
|
|
67
|
+
}
|
|
68
|
+
let response;
|
|
69
|
+
try {
|
|
70
|
+
response = await this.fetchImpl(url, {
|
|
71
|
+
method: opts.method ?? "GET",
|
|
72
|
+
headers,
|
|
73
|
+
body,
|
|
74
|
+
signal: controller.signal,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
catch (err) {
|
|
78
|
+
throw new NetworkError(`fetch ${opts.path}: ${err.message}`, err);
|
|
79
|
+
}
|
|
80
|
+
finally {
|
|
81
|
+
clearTimeout(timeoutId);
|
|
82
|
+
}
|
|
83
|
+
if (!response.ok) {
|
|
84
|
+
throw await this.toAPIError(response);
|
|
85
|
+
}
|
|
86
|
+
return response;
|
|
87
|
+
}
|
|
88
|
+
async toAPIError(response) {
|
|
89
|
+
const requestId = response.headers.get("X-Request-ID") ?? undefined;
|
|
90
|
+
const contentType = response.headers.get("Content-Type") ?? "";
|
|
91
|
+
const isProblem = contentType.includes("problem+json") || contentType.includes("application/json");
|
|
92
|
+
let problem;
|
|
93
|
+
let code;
|
|
94
|
+
let title;
|
|
95
|
+
let detail;
|
|
96
|
+
if (isProblem) {
|
|
97
|
+
try {
|
|
98
|
+
const text = await response.text();
|
|
99
|
+
if (text) {
|
|
100
|
+
const parsed = JSON.parse(text);
|
|
101
|
+
problem = parsed;
|
|
102
|
+
code = parsed.code ?? undefined;
|
|
103
|
+
title = parsed.title;
|
|
104
|
+
detail = parsed.detail ?? undefined;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
catch {
|
|
108
|
+
// fall through — APIError still carries status + requestId.
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return new APIError(response.status, { code, title, detail, requestId, problem });
|
|
112
|
+
}
|
|
113
|
+
buildUrl(path, query) {
|
|
114
|
+
const url = new URL(this.baseUrl + (path.startsWith("/") ? path : "/" + path));
|
|
115
|
+
if (query) {
|
|
116
|
+
for (const [key, value] of Object.entries(query)) {
|
|
117
|
+
if (value === undefined || value === null || value === "")
|
|
118
|
+
continue;
|
|
119
|
+
if (Array.isArray(value)) {
|
|
120
|
+
for (const v of value) {
|
|
121
|
+
if (v === undefined || v === null || v === "")
|
|
122
|
+
continue;
|
|
123
|
+
url.searchParams.append(key, String(v));
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
url.searchParams.append(key, String(value));
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return url.toString();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { v4 } from "@avaprotocol/types";
|
|
2
|
+
import { Transport } from "../internal/transport";
|
|
3
|
+
/**
|
|
4
|
+
* `client.auth.*` — JWT exchange for the REST API.
|
|
5
|
+
*
|
|
6
|
+
* The aggregator's POST /auth:exchange takes (ownerAddress, signature,
|
|
7
|
+
* message) and returns a JWT bound to the EOA. The SDK keeps the JWT
|
|
8
|
+
* on the shared transport so subsequent requests carry it as a
|
|
9
|
+
* Bearer token automatically.
|
|
10
|
+
*/
|
|
11
|
+
export declare class AuthResource {
|
|
12
|
+
private readonly transport;
|
|
13
|
+
constructor(transport: Transport);
|
|
14
|
+
/**
|
|
15
|
+
* POST /auth:exchange — verify an EIP-191 signature and stash the
|
|
16
|
+
* returned JWT on the transport. Returns the raw response so
|
|
17
|
+
* callers can persist the token externally (browser localStorage,
|
|
18
|
+
* keychain, etc.).
|
|
19
|
+
*/
|
|
20
|
+
exchange(req: v4.AuthExchangeRequest): Promise<v4.AuthExchangeResponse>;
|
|
21
|
+
/**
|
|
22
|
+
* Convenience wrapper: sign the canonical message with a private
|
|
23
|
+
* key, exchange it, and return the JWT. The exchanged token is
|
|
24
|
+
* stashed on the transport. Designed for Node tooling — browser
|
|
25
|
+
* callers should use `buildAuthMessage` + a wallet's
|
|
26
|
+
* `personal_sign` and then call `exchange()` directly.
|
|
27
|
+
*/
|
|
28
|
+
exchangeWithKey(privateKey: string, opts?: {
|
|
29
|
+
ownerAddress?: string;
|
|
30
|
+
chainId?: number;
|
|
31
|
+
version?: string;
|
|
32
|
+
}): Promise<v4.AuthExchangeResponse>;
|
|
33
|
+
/**
|
|
34
|
+
* Forget the currently-stored JWT. Future requests fall back to
|
|
35
|
+
* anonymous and most endpoints will return 401.
|
|
36
|
+
*/
|
|
37
|
+
clear(): void;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/auth.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;GAOG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;OAKG;IACG,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,mBAAmB,GAAG,OAAO,CAAC,EAAE,CAAC,oBAAoB,CAAC;IAY7E;;;;;;OAMG;IACG,eAAe,CACnB,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE;QAAE,YAAY,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GACnE,OAAO,CAAC,EAAE,CAAC,oBAAoB,CAAC;IASnC;;;OAGG;IACH,KAAK,IAAI,IAAI;CAGd"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { signAuthMessage } from "../auth";
|
|
2
|
+
/**
|
|
3
|
+
* `client.auth.*` — JWT exchange for the REST API.
|
|
4
|
+
*
|
|
5
|
+
* The aggregator's POST /auth:exchange takes (ownerAddress, signature,
|
|
6
|
+
* message) and returns a JWT bound to the EOA. The SDK keeps the JWT
|
|
7
|
+
* on the shared transport so subsequent requests carry it as a
|
|
8
|
+
* Bearer token automatically.
|
|
9
|
+
*/
|
|
10
|
+
export class AuthResource {
|
|
11
|
+
constructor(transport) {
|
|
12
|
+
this.transport = transport;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* POST /auth:exchange — verify an EIP-191 signature and stash the
|
|
16
|
+
* returned JWT on the transport. Returns the raw response so
|
|
17
|
+
* callers can persist the token externally (browser localStorage,
|
|
18
|
+
* keychain, etc.).
|
|
19
|
+
*/
|
|
20
|
+
async exchange(req) {
|
|
21
|
+
const resp = await this.transport.request({
|
|
22
|
+
path: "/auth:exchange",
|
|
23
|
+
method: "POST",
|
|
24
|
+
body: req,
|
|
25
|
+
});
|
|
26
|
+
if (resp.token) {
|
|
27
|
+
this.transport.setToken(resp.token);
|
|
28
|
+
}
|
|
29
|
+
return resp;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Convenience wrapper: sign the canonical message with a private
|
|
33
|
+
* key, exchange it, and return the JWT. The exchanged token is
|
|
34
|
+
* stashed on the transport. Designed for Node tooling — browser
|
|
35
|
+
* callers should use `buildAuthMessage` + a wallet's
|
|
36
|
+
* `personal_sign` and then call `exchange()` directly.
|
|
37
|
+
*/
|
|
38
|
+
async exchangeWithKey(privateKey, opts) {
|
|
39
|
+
const signed = await signAuthMessage(privateKey, opts);
|
|
40
|
+
return this.exchange({
|
|
41
|
+
ownerAddress: signed.ownerAddress,
|
|
42
|
+
signature: signed.signature,
|
|
43
|
+
message: signed.message,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Forget the currently-stored JWT. Future requests fall back to
|
|
48
|
+
* anonymous and most endpoints will return 401.
|
|
49
|
+
*/
|
|
50
|
+
clear() {
|
|
51
|
+
this.transport.setToken(undefined);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import type { v4 } from "@avaprotocol/types";
|
|
2
|
+
import { Transport } from "../internal/transport";
|
|
3
|
+
export interface ListExecutionsParams {
|
|
4
|
+
/** Required for the flat list endpoint; pass one or more workflowIds. */
|
|
5
|
+
workflowId?: string[];
|
|
6
|
+
chainId?: number;
|
|
7
|
+
before?: string;
|
|
8
|
+
after?: string;
|
|
9
|
+
limit?: number;
|
|
10
|
+
}
|
|
11
|
+
export interface CountExecutionsParams {
|
|
12
|
+
workflowId?: string[];
|
|
13
|
+
chainId?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ExecutionStatsParams {
|
|
16
|
+
workflowId?: string[];
|
|
17
|
+
chainId?: number;
|
|
18
|
+
}
|
|
19
|
+
export interface RetrieveExecutionParams {
|
|
20
|
+
/**
|
|
21
|
+
* Workflow id the execution belongs to. Required because executions
|
|
22
|
+
* are stored under their parent workflow's chain-scoped prefix in
|
|
23
|
+
* BadgerDB — there is no global execution index.
|
|
24
|
+
*/
|
|
25
|
+
workflowId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface StreamExecutionParams {
|
|
28
|
+
workflowId: string;
|
|
29
|
+
/** Poll interval as a Go-style duration. Defaults to `1s`. */
|
|
30
|
+
interval?: string;
|
|
31
|
+
/** Optional AbortSignal to close the stream early. */
|
|
32
|
+
signal?: AbortSignal;
|
|
33
|
+
}
|
|
34
|
+
export declare class ExecutionsResource {
|
|
35
|
+
private readonly transport;
|
|
36
|
+
constructor(transport: Transport);
|
|
37
|
+
/** GET /executions */
|
|
38
|
+
list(params: ListExecutionsParams): Promise<v4.ExecutionList>;
|
|
39
|
+
/** GET /workflows/{id}/executions — convenience nested form. */
|
|
40
|
+
listForWorkflow(workflowId: string, params?: {
|
|
41
|
+
before?: string;
|
|
42
|
+
after?: string;
|
|
43
|
+
limit?: number;
|
|
44
|
+
}): Promise<v4.ExecutionList>;
|
|
45
|
+
/** GET /executions/{id}?workflowId=... */
|
|
46
|
+
retrieve(id: string, params: RetrieveExecutionParams): Promise<v4.Execution>;
|
|
47
|
+
/** GET /executions/{id}:getStatus?workflowId=... */
|
|
48
|
+
getStatus(id: string, params: RetrieveExecutionParams): Promise<v4.ExecutionStatusSummary>;
|
|
49
|
+
/** GET /executions:count */
|
|
50
|
+
count(params?: CountExecutionsParams): Promise<v4.ExecutionCount>;
|
|
51
|
+
/** GET /executions:stats */
|
|
52
|
+
stats(params?: ExecutionStatsParams): Promise<v4.ExecutionStats>;
|
|
53
|
+
/**
|
|
54
|
+
* GET /executions/{id}:stream — yields one `ExecutionStatusSummary`
|
|
55
|
+
* per status change. The stream closes on terminal status, when
|
|
56
|
+
* `signal` aborts, or when the connection drops. Implementation
|
|
57
|
+
* uses fetch streaming + a minimal SSE parser so it works in Node
|
|
58
|
+
* 20+ and browsers without an external EventSource polyfill.
|
|
59
|
+
*/
|
|
60
|
+
stream(id: string, params: StreamExecutionParams): AsyncGenerator<v4.ExecutionStatusSummary, void, undefined>;
|
|
61
|
+
/**
|
|
62
|
+
* Poll-and-wait helper — yields the final ExecutionStatusSummary
|
|
63
|
+
* once the execution reaches a terminal status. Use `stream()`
|
|
64
|
+
* when you want every intermediate status update.
|
|
65
|
+
*/
|
|
66
|
+
waitForTerminal(id: string, params: StreamExecutionParams): Promise<v4.ExecutionStatusSummary>;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=executions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"executions.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/executions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,MAAM,WAAW,oBAAoB;IACnC,yEAAyE;IACzE,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD,sBAAsB;IACtB,IAAI,CAAC,MAAM,EAAE,oBAAoB,GAAG,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC;IAO7D,gEAAgE;IAChE,eAAe,CACb,UAAU,EAAE,MAAM,EAClB,MAAM,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAC3D,OAAO,CAAC,EAAE,CAAC,aAAa,CAAC;IAO5B,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,EAAE,CAAC,SAAS,CAAC;IAO5E,oDAAoD;IACpD,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,uBAAuB,GAAG,OAAO,CAAC,EAAE,CAAC,sBAAsB,CAAC;IAO1F,4BAA4B;IAC5B,KAAK,CAAC,MAAM,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC;IAOjE,4BAA4B;IAC5B,KAAK,CAAC,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,EAAE,CAAC,cAAc,CAAC;IAOhE;;;;;;OAMG;IACI,MAAM,CACX,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,qBAAqB,GAC5B,cAAc,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,EAAE,SAAS,CAAC;IAwC7D;;;;OAIG;IACG,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,EAAE,CAAC,sBAAsB,CAAC;CAatC"}
|