@valiron/sdk 0.1.1 → 0.3.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 +177 -316
- package/dist/clients.d.ts +30 -74
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +75 -122
- package/dist/clients.js.map +1 -1
- package/dist/index.d.ts +68 -83
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +74 -85
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +120 -73
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -2
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,145 +14,134 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.ValironSDK = void 0;
|
|
17
|
+
exports.ValironClient = exports.ValironSDK = void 0;
|
|
18
18
|
const clients_1 = require("./clients");
|
|
19
19
|
/**
|
|
20
|
-
* Valiron SDK
|
|
20
|
+
* Valiron SDK – Official TypeScript SDK for the Trust Layer for Agentic Economy
|
|
21
21
|
*
|
|
22
22
|
* @example
|
|
23
23
|
* ```typescript
|
|
24
24
|
* import { ValironSDK } from '@valiron/sdk';
|
|
25
25
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* });
|
|
26
|
+
* // Default chain (ethereum)
|
|
27
|
+
* const valiron = new ValironSDK();
|
|
29
28
|
*
|
|
30
|
-
* //
|
|
31
|
-
* const
|
|
32
|
-
*
|
|
29
|
+
* // Or set a default chain at construction
|
|
30
|
+
* const monadValiron = new ValironSDK({ chain: 'monad' });
|
|
31
|
+
*
|
|
32
|
+
* // Get full trust profile (identity + reputation + routing)
|
|
33
|
+
* const profile = await valiron.getAgentProfile('25459');
|
|
34
|
+
*
|
|
35
|
+
* // Override chain per-call
|
|
36
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
37
|
+
*
|
|
38
|
+
* if (profile.routing.finalRoute === 'prod') {
|
|
33
39
|
* // Allow full production access
|
|
34
40
|
* }
|
|
35
41
|
* ```
|
|
36
42
|
*/
|
|
37
43
|
class ValironSDK {
|
|
38
|
-
constructor(config) {
|
|
39
|
-
this.
|
|
40
|
-
this.reputationClient = new clients_1.ReputationClient(config);
|
|
44
|
+
constructor(config = {}) {
|
|
45
|
+
this.client = new clients_1.ValironClient(config);
|
|
41
46
|
}
|
|
42
47
|
/**
|
|
43
|
-
*
|
|
48
|
+
* Get the complete trust profile for an ERC-8004 agent.
|
|
44
49
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
50
|
+
* Returns on-chain identity, on-chain reputation (feedback count,
|
|
51
|
+
* average score, individual entries), local behavioral reputation
|
|
52
|
+
* (Valiron sandbox metrics), and a hybrid routing decision.
|
|
47
53
|
*
|
|
48
54
|
* @param agentId - The ERC-8004 agent ID
|
|
49
|
-
* @
|
|
55
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
56
|
+
* @returns Full agent trust profile
|
|
50
57
|
*
|
|
51
58
|
* @example
|
|
52
59
|
* ```typescript
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
* switch (result.route) {
|
|
56
|
-
* case 'prod':
|
|
57
|
-
* return handleProductionRequest();
|
|
58
|
-
* case 'prod_throttled':
|
|
59
|
-
* return handleThrottledRequest();
|
|
60
|
-
* case 'sandbox':
|
|
61
|
-
* case 'sandbox_only':
|
|
62
|
-
* return rejectRequest();
|
|
63
|
-
* }
|
|
64
|
-
* ```
|
|
65
|
-
*/
|
|
66
|
-
async checkAgent(agentId) {
|
|
67
|
-
return this.trustClient.checkAgent(agentId);
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Check wallet routing decision
|
|
60
|
+
* // Uses default chain
|
|
61
|
+
* const profile = await valiron.getAgentProfile('25459');
|
|
71
62
|
*
|
|
72
|
-
*
|
|
63
|
+
* // Explicit Monad chain
|
|
64
|
+
* const monadProfile = await valiron.getAgentProfile('8348', { chain: 'monad' });
|
|
73
65
|
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
66
|
+
* console.log(profile.routing.finalRoute); // 'prod'
|
|
67
|
+
* console.log(profile.routing.decision); // human-readable explanation
|
|
68
|
+
* console.log(profile.localReputation?.tier); // 'AAA'
|
|
69
|
+
* console.log(profile.onchainReputation.averageScore); // 92.5
|
|
70
|
+
* ```
|
|
76
71
|
*/
|
|
77
|
-
async
|
|
78
|
-
return this.
|
|
72
|
+
async getAgentProfile(agentId, options) {
|
|
73
|
+
return this.client.getAgentProfile(agentId, options);
|
|
79
74
|
}
|
|
80
75
|
/**
|
|
81
|
-
*
|
|
76
|
+
* Convenience helper – get just the routing decision for an agent.
|
|
82
77
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
78
|
+
* This calls `getAgentProfile` under the hood and extracts the
|
|
79
|
+
* `routing.finalRoute` field.
|
|
85
80
|
*
|
|
86
81
|
* @param agentId - The ERC-8004 agent ID
|
|
87
|
-
* @
|
|
82
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
83
|
+
* @returns The route decision string
|
|
88
84
|
*
|
|
89
85
|
* @example
|
|
90
86
|
* ```typescript
|
|
91
|
-
* const
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
87
|
+
* const route = await valiron.checkAgent('25459');
|
|
88
|
+
* const monadRoute = await valiron.checkAgent('8348', { chain: 'monad' });
|
|
89
|
+
* if (route === 'prod' || route === 'prod_throttled') {
|
|
90
|
+
* return handleRequest();
|
|
91
|
+
* }
|
|
95
92
|
* ```
|
|
96
93
|
*/
|
|
97
|
-
async
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Get wallet profile
|
|
102
|
-
*
|
|
103
|
-
* @param wallet - The wallet address
|
|
104
|
-
* @returns Wallet profile with routing info
|
|
105
|
-
*/
|
|
106
|
-
async getWalletProfile(wallet) {
|
|
107
|
-
return this.trustClient.getWalletProfile(wallet);
|
|
94
|
+
async checkAgent(agentId, options) {
|
|
95
|
+
const profile = await this.client.getAgentProfile(agentId, options);
|
|
96
|
+
return profile.routing.finalRoute;
|
|
108
97
|
}
|
|
109
98
|
/**
|
|
110
|
-
*
|
|
99
|
+
* Get a trust profile by wallet address (reverse lookup).
|
|
111
100
|
*
|
|
112
|
-
*
|
|
113
|
-
*
|
|
101
|
+
* If the wallet has an associated agent ID in local state, the full
|
|
102
|
+
* profile (identity + on-chain reputation) is included. Otherwise
|
|
103
|
+
* only local behavioral data is returned.
|
|
114
104
|
*
|
|
115
|
-
* @param
|
|
116
|
-
* @
|
|
105
|
+
* @param wallet - Ethereum wallet address
|
|
106
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
107
|
+
* @returns Wallet trust profile
|
|
117
108
|
*
|
|
118
109
|
* @example
|
|
119
110
|
* ```typescript
|
|
120
|
-
* await valiron.
|
|
121
|
-
*
|
|
122
|
-
* score: 95,
|
|
123
|
-
* outcome: 'success',
|
|
124
|
-
* metadata: {
|
|
125
|
-
* taskType: 'data_processing',
|
|
126
|
-
* duration: 1234
|
|
127
|
-
* }
|
|
128
|
-
* });
|
|
111
|
+
* const profile = await valiron.getWalletProfile('0x52ce…');
|
|
112
|
+
* console.log(profile.routing.finalRoute);
|
|
129
113
|
* ```
|
|
130
114
|
*/
|
|
131
|
-
async
|
|
132
|
-
return this.
|
|
115
|
+
async getWalletProfile(wallet, options) {
|
|
116
|
+
return this.client.getWalletProfile(wallet, options);
|
|
133
117
|
}
|
|
134
118
|
/**
|
|
135
|
-
*
|
|
119
|
+
* Trigger real sandbox testing for an agent.
|
|
136
120
|
*
|
|
137
|
-
*
|
|
121
|
+
* Sends a series of test requests against the agent's HTTP endpoint
|
|
122
|
+
* (if registered on-chain) or through the sandbox relay, then computes
|
|
123
|
+
* a Valiron behavioral score and stores the result.
|
|
138
124
|
*
|
|
139
|
-
* @param
|
|
140
|
-
* @
|
|
125
|
+
* @param agentId - The ERC-8004 agent ID
|
|
126
|
+
* @param options - Optional overrides (e.g. `{ chain: 'monad' }`)
|
|
127
|
+
* @returns Sandbox test results including score, tier, and metrics
|
|
141
128
|
*
|
|
142
129
|
* @example
|
|
143
130
|
* ```typescript
|
|
144
|
-
* await valiron.triggerSandboxTest(
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
131
|
+
* const result = await valiron.triggerSandboxTest('25459');
|
|
132
|
+
* console.log(result.valironScore); // 95
|
|
133
|
+
* console.log(result.tier); // 'AAA'
|
|
134
|
+
* console.log(result.riskLevel); // 'GREEN'
|
|
135
|
+
* console.log(result.testSummary); // { totalRequests, successCount, … }
|
|
148
136
|
* ```
|
|
149
137
|
*/
|
|
150
|
-
async triggerSandboxTest(
|
|
151
|
-
return this.
|
|
138
|
+
async triggerSandboxTest(agentId, options) {
|
|
139
|
+
return this.client.triggerSandboxTest(agentId, options);
|
|
152
140
|
}
|
|
153
141
|
}
|
|
154
142
|
exports.ValironSDK = ValironSDK;
|
|
155
|
-
//
|
|
143
|
+
// Re-export everything
|
|
156
144
|
__exportStar(require("./types"), exports);
|
|
157
|
-
|
|
145
|
+
var clients_2 = require("./clients");
|
|
146
|
+
Object.defineProperty(exports, "ValironClient", { enumerable: true, get: function () { return clients_2.ValironClient; } });
|
|
158
147
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,uCAA0C;AAU1C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAa,UAAU;IAGrB,YAAY,SAAwB,EAAE;QACpC,IAAI,CAAC,MAAM,GAAG,IAAI,uBAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,KAAK,CAAC,eAAe,CAAC,OAAe,EAAE,OAAqB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,UAAU,CAAC,OAAe,EAAE,OAAqB;QACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC;IACpC,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,gBAAgB,CAAC,MAAc,EAAE,OAAqB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;;;;;;;;;;;;;;OAmBG;IACH,KAAK,CAAC,kBAAkB,CAAC,OAAe,EAAE,OAAqB;QAC7D,OAAO,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC;CACF;AAxGD,gCAwGC;AAED,uBAAuB;AACvB,0CAAwB;AACxB,qCAA0C;AAAjC,wGAAA,aAAa,OAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,25 +1,46 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Valiron SDK Types
|
|
3
3
|
*
|
|
4
|
-
* Type definitions for the Valiron
|
|
4
|
+
* Type definitions for the Valiron Operator API
|
|
5
|
+
* Matches the actual edge-proxy /operator/* endpoints
|
|
5
6
|
*/
|
|
6
|
-
|
|
7
|
-
export type
|
|
8
|
-
export type
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
agentId
|
|
13
|
-
wallet
|
|
7
|
+
/** Blockchain networks supported by the Valiron Operator API. */
|
|
8
|
+
export type SupportedChain = "ethereum" | "monad";
|
|
9
|
+
export type RouteDecision = "prod" | "prod_throttled" | "sandbox" | "sandbox_only";
|
|
10
|
+
export type RiskLevel = "GREEN" | "YELLOW" | "RED";
|
|
11
|
+
export type MoodysRating = "AAA" | "AA" | "A" | "BAA" | "BA" | "B" | "CAA" | "CA" | "C";
|
|
12
|
+
export interface AgentIdentity {
|
|
13
|
+
agentId: string;
|
|
14
|
+
wallet: string;
|
|
15
|
+
tokenUri: string;
|
|
16
|
+
name: string;
|
|
17
|
+
image: string;
|
|
18
|
+
description: string;
|
|
19
|
+
/** ERC-8004 endpoints, e.g. { agentWallet: "eip155:1:0x…", api: "https://…" } */
|
|
20
|
+
endpoints: Record<string, string>;
|
|
21
|
+
trustModels: string[];
|
|
22
|
+
/** Any additional metadata from the Agent Registration File */
|
|
23
|
+
[key: string]: unknown;
|
|
14
24
|
}
|
|
15
|
-
export interface
|
|
25
|
+
export interface FeedbackEntry {
|
|
26
|
+
from: string;
|
|
16
27
|
score: number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
tag1: string;
|
|
29
|
+
tag2: string;
|
|
30
|
+
uri: string;
|
|
31
|
+
hash: string;
|
|
32
|
+
blockNumber: string;
|
|
33
|
+
transactionHash: string;
|
|
34
|
+
feedbackIndex?: string;
|
|
35
|
+
indexedTag1?: string;
|
|
36
|
+
endpoint?: string;
|
|
37
|
+
}
|
|
38
|
+
export interface OnchainReputation {
|
|
39
|
+
count: string;
|
|
40
|
+
averageScore: number;
|
|
41
|
+
feedbackEntries: FeedbackEntry[];
|
|
42
|
+
totalFeedback: number;
|
|
43
|
+
error?: string;
|
|
23
44
|
}
|
|
24
45
|
export interface BehavioralMetrics {
|
|
25
46
|
loops?: number;
|
|
@@ -28,63 +49,94 @@ export interface BehavioralMetrics {
|
|
|
28
49
|
errorRate?: number;
|
|
29
50
|
averageLatency?: number;
|
|
30
51
|
burstiness?: number;
|
|
52
|
+
onChainFeedbackCount?: number;
|
|
53
|
+
onChainAverageScore?: number;
|
|
31
54
|
}
|
|
32
|
-
export interface
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
55
|
+
export interface LocalReputation {
|
|
56
|
+
exists: boolean;
|
|
57
|
+
score?: number;
|
|
58
|
+
tier?: MoodysRating | string;
|
|
59
|
+
riskLevel?: RiskLevel | string;
|
|
60
|
+
graduated?: boolean;
|
|
61
|
+
metrics?: BehavioralMetrics;
|
|
62
|
+
ipfsCid?: string | null;
|
|
63
|
+
agentId?: string | null;
|
|
64
|
+
lastUpdated?: string | null;
|
|
65
|
+
message?: string;
|
|
66
|
+
error?: string;
|
|
38
67
|
}
|
|
39
|
-
export interface
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
68
|
+
export interface RoutingSignals {
|
|
69
|
+
onchain: {
|
|
70
|
+
feedbackCount: number;
|
|
71
|
+
averageScore: number;
|
|
72
|
+
threshold: string;
|
|
73
|
+
};
|
|
74
|
+
local: {
|
|
75
|
+
exists: boolean;
|
|
76
|
+
graduated: boolean;
|
|
77
|
+
tier: string;
|
|
78
|
+
riskLevel: string;
|
|
79
|
+
score: number;
|
|
80
|
+
};
|
|
47
81
|
}
|
|
48
|
-
export interface
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
tag2?: string;
|
|
54
|
-
endpoint?: string;
|
|
55
|
-
feedbackURI?: string;
|
|
56
|
-
feedbackHash?: string;
|
|
57
|
-
revoked?: boolean;
|
|
58
|
-
response?: string;
|
|
82
|
+
export interface RoutingExplanation {
|
|
83
|
+
finalRoute: RouteDecision;
|
|
84
|
+
decision: string;
|
|
85
|
+
reasons: string[];
|
|
86
|
+
signals: RoutingSignals;
|
|
59
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Response from `GET /operator/agent/:agentId`
|
|
90
|
+
*/
|
|
60
91
|
export interface AgentProfile {
|
|
61
92
|
agentId: string;
|
|
62
93
|
identity: AgentIdentity;
|
|
63
|
-
onchainReputation:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
localReputation?: LocalReputation;
|
|
69
|
-
routing: {
|
|
70
|
-
finalRoute: RouteDecision;
|
|
71
|
-
decision: string;
|
|
72
|
-
reasons: string[];
|
|
73
|
-
signals: {
|
|
74
|
-
onChainQualifies: boolean;
|
|
75
|
-
hasLocalReputation: boolean;
|
|
76
|
-
localRiskLevel?: RiskLevel;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
94
|
+
onchainReputation: OnchainReputation;
|
|
95
|
+
localReputation: LocalReputation | null;
|
|
96
|
+
routing: RoutingExplanation;
|
|
97
|
+
timestamp: string;
|
|
79
98
|
}
|
|
99
|
+
/**
|
|
100
|
+
* Response from `GET /operator/wallet/:wallet`
|
|
101
|
+
*/
|
|
80
102
|
export interface WalletProfile {
|
|
81
103
|
wallet: string;
|
|
82
|
-
agentId
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
104
|
+
agentId: string | null;
|
|
105
|
+
identity: AgentIdentity | null;
|
|
106
|
+
onchainReputation: OnchainReputation | null;
|
|
107
|
+
localReputation: LocalReputation | null;
|
|
108
|
+
routing: RoutingExplanation;
|
|
109
|
+
timestamp: string;
|
|
110
|
+
}
|
|
111
|
+
export interface SandboxTestSummary {
|
|
112
|
+
totalRequests: number;
|
|
113
|
+
successCount: number;
|
|
114
|
+
rateLimitCount: number;
|
|
115
|
+
errorCount: number;
|
|
116
|
+
avgLatencyMs: number;
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Response from `POST /operator/trigger-sandbox/:agentId`
|
|
120
|
+
*/
|
|
121
|
+
export interface SandboxResult {
|
|
122
|
+
ok: boolean;
|
|
123
|
+
agentId: string;
|
|
124
|
+
wallet: string;
|
|
125
|
+
mode: "endpoint-probe" | "sandbox-relay";
|
|
126
|
+
metrics: BehavioralMetrics;
|
|
127
|
+
valironScore: number;
|
|
128
|
+
tier: MoodysRating;
|
|
129
|
+
riskLevel: RiskLevel;
|
|
130
|
+
testSummary: SandboxTestSummary;
|
|
131
|
+
message: string;
|
|
132
|
+
}
|
|
133
|
+
/** Options that can be passed to individual SDK method calls. */
|
|
134
|
+
export interface CallOptions {
|
|
135
|
+
/**
|
|
136
|
+
* Override the blockchain network for this call.
|
|
137
|
+
* Takes precedence over the default chain set in the constructor.
|
|
138
|
+
*/
|
|
139
|
+
chain?: SupportedChain;
|
|
88
140
|
}
|
|
89
141
|
export interface ValironConfig {
|
|
90
142
|
/**
|
|
@@ -99,6 +151,11 @@ export interface ValironConfig {
|
|
|
99
151
|
* Valiron API endpoint (defaults to production)
|
|
100
152
|
*/
|
|
101
153
|
endpoint?: string;
|
|
154
|
+
/**
|
|
155
|
+
* Default blockchain network (defaults to "ethereum").
|
|
156
|
+
* Can be overridden per-call via the `options` parameter.
|
|
157
|
+
*/
|
|
158
|
+
chain?: SupportedChain;
|
|
102
159
|
/**
|
|
103
160
|
* Request timeout in milliseconds (default: 5000)
|
|
104
161
|
*/
|
|
@@ -108,16 +165,6 @@ export interface ValironConfig {
|
|
|
108
165
|
*/
|
|
109
166
|
debug?: boolean;
|
|
110
167
|
}
|
|
111
|
-
export interface SubmitFeedbackParams {
|
|
112
|
-
agentId: string;
|
|
113
|
-
score: number;
|
|
114
|
-
outcome: 'success' | 'failure';
|
|
115
|
-
metadata?: Record<string, any>;
|
|
116
|
-
}
|
|
117
|
-
export interface SandboxTestParams {
|
|
118
|
-
agentId: string;
|
|
119
|
-
behaviorType?: 'good' | 'moderate' | 'bad';
|
|
120
|
-
}
|
|
121
168
|
export declare class ValironError extends Error {
|
|
122
169
|
code: string;
|
|
123
170
|
statusCode?: number | undefined;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,iEAAiE;AACjE,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,gBAAgB,GAChB,SAAS,GACT,cAAc,CAAC;AAEnB,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC;AAEnD,MAAM,MAAM,YAAY,GACpB,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,GACH,KAAK,GACL,IAAI,GACJ,GAAG,CAAC;AAIR,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAClC,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,+DAA+D;IAC/D,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE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AAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,gBAAgB,GAAG,eAAe,CAAC;IACzC,OAAO,EAAE,iBAAiB,CAAC;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,SAAS,EAAE,SAAS,CAAC;IACrB,WAAW,EAAE,kBAAkB,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;CACxB;AAID,MAAM,WAAW,aAAa;IAC5B;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAID,qBAAa,YAAa,SAAQ,KAAK;IAG5B,IAAI,EAAE,MAAM;IACZ,UAAU,CAAC,EAAE,MAAM;gBAF1B,OAAO,EAAE,MAAM,EACR,IAAI,EAAE,MAAM,EACZ,UAAU,CAAC,EAAE,MAAM,YAAA;CAK7B"}
|
package/dist/types.js
CHANGED
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Valiron SDK Types
|
|
4
4
|
*
|
|
5
|
-
* Type definitions for the Valiron
|
|
5
|
+
* Type definitions for the Valiron Operator API
|
|
6
|
+
* Matches the actual edge-proxy /operator/* endpoints
|
|
6
7
|
*/
|
|
7
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
9
|
exports.ValironError = void 0;
|
|
10
|
+
// ─── Errors ─────────────────────────────────────────────────────────────────
|
|
9
11
|
class ValironError extends Error {
|
|
10
12
|
constructor(message, code, statusCode) {
|
|
11
13
|
super(message);
|
|
12
14
|
this.code = code;
|
|
13
15
|
this.statusCode = statusCode;
|
|
14
|
-
this.name =
|
|
16
|
+
this.name = "ValironError";
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
exports.ValironError = ValironError;
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuNH,+EAA+E;AAE/E,MAAa,YAAa,SAAQ,KAAK;IACrC,YACE,OAAe,EACR,IAAY,EACZ,UAAmB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHR,SAAI,GAAJ,IAAI,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAS;QAG1B,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;IAC7B,CAAC;CACF;AATD,oCASC"}
|