@sardis/sdk 0.2.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/CHANGELOG.md +47 -0
- package/LICENSE +21 -0
- package/README.md +439 -0
- package/dist/browser/index.js +7049 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/sardis.umd.js +7071 -0
- package/dist/browser/sardis.umd.js.map +1 -0
- package/dist/cjs/client.js +644 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/demo.js +699 -0
- package/dist/cjs/demo.js.map +1 -0
- package/dist/cjs/errors.js +630 -0
- package/dist/cjs/errors.js.map +1 -0
- package/dist/cjs/index.js +131 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/integrations/index.js +21 -0
- package/dist/cjs/integrations/index.js.map +1 -0
- package/dist/cjs/integrations/langchain.js +339 -0
- package/dist/cjs/integrations/langchain.js.map +1 -0
- package/dist/cjs/integrations/openai.js +505 -0
- package/dist/cjs/integrations/openai.js.map +1 -0
- package/dist/cjs/integrations/vercel-ai.js +198 -0
- package/dist/cjs/integrations/vercel-ai.js.map +1 -0
- package/dist/cjs/resources/a2a.js +158 -0
- package/dist/cjs/resources/a2a.js.map +1 -0
- package/dist/cjs/resources/agents.js +142 -0
- package/dist/cjs/resources/agents.js.map +1 -0
- package/dist/cjs/resources/base.js +124 -0
- package/dist/cjs/resources/base.js.map +1 -0
- package/dist/cjs/resources/cards.js +43 -0
- package/dist/cjs/resources/cards.js.map +1 -0
- package/dist/cjs/resources/holds.js +64 -0
- package/dist/cjs/resources/holds.js.map +1 -0
- package/dist/cjs/resources/index.js +31 -0
- package/dist/cjs/resources/index.js.map +1 -0
- package/dist/cjs/resources/ledger.js +43 -0
- package/dist/cjs/resources/ledger.js.map +1 -0
- package/dist/cjs/resources/marketplace.js +88 -0
- package/dist/cjs/resources/marketplace.js.map +1 -0
- package/dist/cjs/resources/payments.js +33 -0
- package/dist/cjs/resources/payments.js.map +1 -0
- package/dist/cjs/resources/policies.js +31 -0
- package/dist/cjs/resources/policies.js.map +1 -0
- package/dist/cjs/resources/transactions.js +37 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/ucp.js +133 -0
- package/dist/cjs/resources/ucp.js.map +1 -0
- package/dist/cjs/resources/wallets.js +109 -0
- package/dist/cjs/resources/wallets.js.map +1 -0
- package/dist/cjs/resources/webhooks.js +81 -0
- package/dist/cjs/resources/webhooks.js.map +1 -0
- package/dist/cjs/types.js +11 -0
- package/dist/cjs/types.js.map +1 -0
- package/dist/client.d.ts +419 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +637 -0
- package/dist/client.js.map +1 -0
- package/dist/demo.d.ts +335 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +694 -0
- package/dist/demo.js.map +1 -0
- package/dist/errors.d.ts +522 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +612 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +83 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations/index.d.ts +4 -0
- package/dist/integrations/index.d.ts.map +1 -0
- package/dist/integrations/index.js +5 -0
- package/dist/integrations/index.js.map +1 -0
- package/dist/integrations/langchain.d.ts +68 -0
- package/dist/integrations/langchain.d.ts.map +1 -0
- package/dist/integrations/langchain.js +335 -0
- package/dist/integrations/langchain.js.map +1 -0
- package/dist/integrations/openai.d.ts +97 -0
- package/dist/integrations/openai.d.ts.map +1 -0
- package/dist/integrations/openai.js +467 -0
- package/dist/integrations/openai.js.map +1 -0
- package/dist/integrations/vercel-ai.d.ts +180 -0
- package/dist/integrations/vercel-ai.d.ts.map +1 -0
- package/dist/integrations/vercel-ai.js +194 -0
- package/dist/integrations/vercel-ai.js.map +1 -0
- package/dist/resources/a2a.d.ts +254 -0
- package/dist/resources/a2a.d.ts.map +1 -0
- package/dist/resources/a2a.js +154 -0
- package/dist/resources/a2a.js.map +1 -0
- package/dist/resources/agents.d.ts +111 -0
- package/dist/resources/agents.d.ts.map +1 -0
- package/dist/resources/agents.js +138 -0
- package/dist/resources/agents.js.map +1 -0
- package/dist/resources/base.d.ts +115 -0
- package/dist/resources/base.d.ts.map +1 -0
- package/dist/resources/base.js +120 -0
- package/dist/resources/base.js.map +1 -0
- package/dist/resources/cards.d.ts +19 -0
- package/dist/resources/cards.d.ts.map +1 -0
- package/dist/resources/cards.js +39 -0
- package/dist/resources/cards.js.map +1 -0
- package/dist/resources/holds.d.ts +44 -0
- package/dist/resources/holds.d.ts.map +1 -0
- package/dist/resources/holds.js +60 -0
- package/dist/resources/holds.js.map +1 -0
- package/dist/resources/index.d.ts +16 -0
- package/dist/resources/index.d.ts.map +1 -0
- package/dist/resources/index.js +16 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/ledger.d.ts +38 -0
- package/dist/resources/ledger.d.ts.map +1 -0
- package/dist/resources/ledger.js +39 -0
- package/dist/resources/ledger.js.map +1 -0
- package/dist/resources/marketplace.d.ts +60 -0
- package/dist/resources/marketplace.d.ts.map +1 -0
- package/dist/resources/marketplace.js +84 -0
- package/dist/resources/marketplace.js.map +1 -0
- package/dist/resources/payments.d.ts +24 -0
- package/dist/resources/payments.d.ts.map +1 -0
- package/dist/resources/payments.js +29 -0
- package/dist/resources/payments.js.map +1 -0
- package/dist/resources/policies.d.ts +23 -0
- package/dist/resources/policies.d.ts.map +1 -0
- package/dist/resources/policies.js +27 -0
- package/dist/resources/policies.js.map +1 -0
- package/dist/resources/transactions.d.ts +32 -0
- package/dist/resources/transactions.d.ts.map +1 -0
- package/dist/resources/transactions.js +33 -0
- package/dist/resources/transactions.js.map +1 -0
- package/dist/resources/ucp.d.ts +218 -0
- package/dist/resources/ucp.d.ts.map +1 -0
- package/dist/resources/ucp.js +129 -0
- package/dist/resources/ucp.js.map +1 -0
- package/dist/resources/wallets.d.ts +71 -0
- package/dist/resources/wallets.d.ts.map +1 -0
- package/dist/resources/wallets.js +105 -0
- package/dist/resources/wallets.js.map +1 -0
- package/dist/resources/webhooks.d.ts +57 -0
- package/dist/resources/webhooks.d.ts.map +1 -0
- package/dist/resources/webhooks.js +77 -0
- package/dist/resources/webhooks.js.map +1 -0
- package/dist/types.d.ts +1045 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -0
- package/package.json +114 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wallets.js","sourceRoot":"","sources":["../../../src/resources/wallets.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,uCAAyC;AAWzC,MAAa,eAAgB,SAAQ,sBAAY;IACvC,UAAU,CAAC,MAAc;QAC/B,sDAAsD;QACtD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;YACd,MAAoC,CAAC,EAAE,GAAG,MAAM,CAAC,SAAS,CAAC;QAC9D,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,MAAM,CAAC,KAAwB,EAAE,OAAwB;QAC7D,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,KAAK,CAAS,iBAAiB,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;QAC3E,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,GAAG,CAAC,QAAgB,EAAE,OAAwB;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,IAAI,CAAS,mBAAmB,QAAQ,EAAE,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAC1F,OAAO,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;IACjC,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,OAAgB,EAAE,QAAgB,GAAG,EAAE,OAAwB;QACxE,MAAM,MAAM,GAA4B,EAAE,KAAK,EAA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;IACH,KAAK,CAAC,QAAQ,CACZ,QAAgB,EAChB,KAA0B,EAC1B,OAAwB;QAExB,OAAO,IAAI,CAAC,KAAK,CACf,mBAAmB,QAAQ,WAAW,EACtC,KAAK,EACL,OAAO,CACR,CAAC;IACJ,CAAC;CACF;AArID,0CAqIC"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Webhooks resource
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.WebhooksResource = void 0;
|
|
7
|
+
const base_js_1 = require("./base.js");
|
|
8
|
+
class WebhooksResource extends base_js_1.BaseResource {
|
|
9
|
+
/**
|
|
10
|
+
* List all available webhook event types
|
|
11
|
+
*/
|
|
12
|
+
async listEventTypes() {
|
|
13
|
+
const response = await this._get('/api/v2/webhooks/event-types');
|
|
14
|
+
return response.event_types || [];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Create a webhook subscription
|
|
18
|
+
*/
|
|
19
|
+
async create(input) {
|
|
20
|
+
return this._post('/api/v2/webhooks', input);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* List all webhook subscriptions
|
|
24
|
+
*/
|
|
25
|
+
async list() {
|
|
26
|
+
const response = await this._get('/api/v2/webhooks');
|
|
27
|
+
return response.webhooks || [];
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get a webhook subscription by ID
|
|
31
|
+
*
|
|
32
|
+
* @param webhookId - The webhook ID
|
|
33
|
+
* @returns The webhook object
|
|
34
|
+
*/
|
|
35
|
+
async get(webhookId) {
|
|
36
|
+
return this._get(`/api/v2/webhooks/${webhookId}`);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get a webhook subscription by ID
|
|
40
|
+
*
|
|
41
|
+
* @deprecated Use `get(webhookId)` instead. This method will be removed in v1.0.0.
|
|
42
|
+
* @param webhookId - The webhook ID
|
|
43
|
+
* @returns The webhook object
|
|
44
|
+
*/
|
|
45
|
+
async getById(webhookId) {
|
|
46
|
+
return this.get(webhookId);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update a webhook subscription
|
|
50
|
+
*/
|
|
51
|
+
async update(webhookId, input) {
|
|
52
|
+
return this._patch(`/api/v2/webhooks/${webhookId}`, input);
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Delete a webhook subscription
|
|
56
|
+
*/
|
|
57
|
+
async delete(webhookId) {
|
|
58
|
+
await this._delete(`/api/v2/webhooks/${webhookId}`);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Send a test event to a webhook
|
|
62
|
+
*/
|
|
63
|
+
async test(webhookId) {
|
|
64
|
+
return this._post(`/api/v2/webhooks/${webhookId}/test`, {});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* List delivery attempts for a webhook
|
|
68
|
+
*/
|
|
69
|
+
async listDeliveries(webhookId, limit = 50) {
|
|
70
|
+
const response = await this._get(`/api/v2/webhooks/${webhookId}/deliveries`, { limit });
|
|
71
|
+
return response.deliveries || [];
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Rotate the webhook signing secret
|
|
75
|
+
*/
|
|
76
|
+
async rotateSecret(webhookId) {
|
|
77
|
+
return this._post(`/api/v2/webhooks/${webhookId}/rotate-secret`, {});
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.WebhooksResource = WebhooksResource;
|
|
81
|
+
//# sourceMappingURL=webhooks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhooks.js","sourceRoot":"","sources":["../../../src/resources/webhooks.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,uCAAyC;AAGzC,MAAa,gBAAiB,SAAQ,sBAAY;IAChD;;OAEG;IACH,KAAK,CAAC,cAAc;QAClB,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAA4B,8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EAAE,CACV,CAAC;QACF,OAAO,QAAQ,CAAC,UAAU,IAAI,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,YAAY,CAAC,SAAiB;QAClC,OAAO,IAAI,CAAC,KAAK,CAAqB,oBAAoB,SAAS,gBAAgB,EAAE,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AAnFD,4CAmFC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Sardis SDK Type Definitions
|
|
4
|
+
*
|
|
5
|
+
* This module contains all TypeScript type definitions used throughout
|
|
6
|
+
* the Sardis SDK.
|
|
7
|
+
*
|
|
8
|
+
* @packageDocumentation
|
|
9
|
+
*/
|
|
10
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
|
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sardis TypeScript SDK Client
|
|
3
|
+
*
|
|
4
|
+
* Production-grade client for the Sardis stablecoin execution layer API.
|
|
5
|
+
* Features include:
|
|
6
|
+
* - Request cancellation via AbortController
|
|
7
|
+
* - Request/response interceptors
|
|
8
|
+
* - Automatic retry with exponential backoff
|
|
9
|
+
* - Automatic token refresh
|
|
10
|
+
* - Configurable timeouts
|
|
11
|
+
* - Comprehensive error handling
|
|
12
|
+
*
|
|
13
|
+
* @packageDocumentation
|
|
14
|
+
*/
|
|
15
|
+
import { PaymentsResource } from './resources/payments.js';
|
|
16
|
+
import { HoldsResource } from './resources/holds.js';
|
|
17
|
+
import { WebhooksResource } from './resources/webhooks.js';
|
|
18
|
+
import { MarketplaceResource } from './resources/marketplace.js';
|
|
19
|
+
import { TransactionsResource } from './resources/transactions.js';
|
|
20
|
+
import { LedgerResource } from './resources/ledger.js';
|
|
21
|
+
import { WalletsResource } from './resources/wallets.js';
|
|
22
|
+
import { AgentsResource } from './resources/agents.js';
|
|
23
|
+
import { CardsResource } from './resources/cards.js';
|
|
24
|
+
import { PoliciesResource } from './resources/policies.js';
|
|
25
|
+
import { UCPResource } from './resources/ucp.js';
|
|
26
|
+
import { A2AResource } from './resources/a2a.js';
|
|
27
|
+
import type { SardisClientOptions, RequestOptions, RequestInterceptor, ResponseInterceptor, PaginatedResponse, PaginationParams } from './types.js';
|
|
28
|
+
/**
|
|
29
|
+
* Sardis API Client
|
|
30
|
+
*
|
|
31
|
+
* The main entry point for interacting with the Sardis API. Provides access
|
|
32
|
+
* to all API resources through typed methods and handles authentication,
|
|
33
|
+
* retries, and error handling.
|
|
34
|
+
*
|
|
35
|
+
* @example Basic usage
|
|
36
|
+
* ```typescript
|
|
37
|
+
* import { SardisClient } from '@sardis/sdk';
|
|
38
|
+
*
|
|
39
|
+
* const client = new SardisClient({
|
|
40
|
+
* apiKey: 'your-api-key',
|
|
41
|
+
* });
|
|
42
|
+
*
|
|
43
|
+
* // Execute a payment
|
|
44
|
+
* const result = await client.payments.executeMandate(mandate);
|
|
45
|
+
*
|
|
46
|
+
* // Create a hold
|
|
47
|
+
* const hold = await client.holds.create({
|
|
48
|
+
* wallet_id: 'wallet_123',
|
|
49
|
+
* amount: '100.00',
|
|
50
|
+
* });
|
|
51
|
+
* ```
|
|
52
|
+
*
|
|
53
|
+
* @example With request cancellation
|
|
54
|
+
* ```typescript
|
|
55
|
+
* const controller = new AbortController();
|
|
56
|
+
*
|
|
57
|
+
* // Cancel after 5 seconds
|
|
58
|
+
* setTimeout(() => controller.abort(), 5000);
|
|
59
|
+
*
|
|
60
|
+
* try {
|
|
61
|
+
* const result = await client.payments.executeMandate(mandate, {
|
|
62
|
+
* signal: controller.signal,
|
|
63
|
+
* });
|
|
64
|
+
* } catch (error) {
|
|
65
|
+
* if (error instanceof AbortError) {
|
|
66
|
+
* console.log('Request was cancelled');
|
|
67
|
+
* }
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example With interceptors
|
|
72
|
+
* ```typescript
|
|
73
|
+
* const client = new SardisClient({ apiKey: 'your-api-key' });
|
|
74
|
+
*
|
|
75
|
+
* // Add request logging
|
|
76
|
+
* client.addRequestInterceptor({
|
|
77
|
+
* onRequest: (config) => {
|
|
78
|
+
* console.log(`Requesting ${config.method} ${config.url}`);
|
|
79
|
+
* return config;
|
|
80
|
+
* },
|
|
81
|
+
* });
|
|
82
|
+
*
|
|
83
|
+
* // Add response logging
|
|
84
|
+
* client.addResponseInterceptor({
|
|
85
|
+
* onResponse: (response) => {
|
|
86
|
+
* console.log(`Response: ${response.status}`);
|
|
87
|
+
* return response;
|
|
88
|
+
* },
|
|
89
|
+
* });
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export declare class SardisClient {
|
|
93
|
+
/** @internal HTTP client instance */
|
|
94
|
+
private http;
|
|
95
|
+
/** @internal Retry configuration */
|
|
96
|
+
private retryConfig;
|
|
97
|
+
/** @internal Token refresh configuration */
|
|
98
|
+
private tokenRefreshConfig?;
|
|
99
|
+
/** @internal Current API key */
|
|
100
|
+
private apiKey;
|
|
101
|
+
/** @internal Request interceptors */
|
|
102
|
+
private requestInterceptors;
|
|
103
|
+
/** @internal Response interceptors */
|
|
104
|
+
private responseInterceptors;
|
|
105
|
+
/** @internal Base URL for API requests */
|
|
106
|
+
private baseUrl;
|
|
107
|
+
/** @internal Connection timeout in milliseconds */
|
|
108
|
+
private connectTimeout;
|
|
109
|
+
/** @internal Request timeout in milliseconds */
|
|
110
|
+
private timeout;
|
|
111
|
+
/**
|
|
112
|
+
* Payment operations - execute mandates and AP2 payment bundles.
|
|
113
|
+
* @see {@link PaymentsResource}
|
|
114
|
+
*/
|
|
115
|
+
readonly payments: PaymentsResource;
|
|
116
|
+
/**
|
|
117
|
+
* Hold operations - create, capture, and void pre-authorization holds.
|
|
118
|
+
* @see {@link HoldsResource}
|
|
119
|
+
*/
|
|
120
|
+
readonly holds: HoldsResource;
|
|
121
|
+
/**
|
|
122
|
+
* Virtual card operations - issue cards and record/simulate purchases.
|
|
123
|
+
* @see {@link CardsResource}
|
|
124
|
+
*/
|
|
125
|
+
readonly cards: CardsResource;
|
|
126
|
+
/**
|
|
127
|
+
* Policy operations - parse/apply natural language policies.
|
|
128
|
+
* @see {@link PoliciesResource}
|
|
129
|
+
*/
|
|
130
|
+
readonly policies: PoliciesResource;
|
|
131
|
+
/**
|
|
132
|
+
* Webhook subscription operations - manage webhook endpoints.
|
|
133
|
+
* @see {@link WebhooksResource}
|
|
134
|
+
*/
|
|
135
|
+
readonly webhooks: WebhooksResource;
|
|
136
|
+
/**
|
|
137
|
+
* Marketplace operations - A2A service discovery and offers.
|
|
138
|
+
* @see {@link MarketplaceResource}
|
|
139
|
+
*/
|
|
140
|
+
readonly marketplace: MarketplaceResource;
|
|
141
|
+
/**
|
|
142
|
+
* Transaction operations - gas estimation and transaction status.
|
|
143
|
+
* @see {@link TransactionsResource}
|
|
144
|
+
*/
|
|
145
|
+
readonly transactions: TransactionsResource;
|
|
146
|
+
/**
|
|
147
|
+
* Ledger operations - query ledger entries.
|
|
148
|
+
* @see {@link LedgerResource}
|
|
149
|
+
*/
|
|
150
|
+
readonly ledger: LedgerResource;
|
|
151
|
+
/**
|
|
152
|
+
* Wallet operations - manage non-custodial wallets.
|
|
153
|
+
* @see {@link WalletsResource}
|
|
154
|
+
*/
|
|
155
|
+
readonly wallets: WalletsResource;
|
|
156
|
+
/**
|
|
157
|
+
* Agent operations - create and manage agents.
|
|
158
|
+
* @see {@link AgentsResource}
|
|
159
|
+
*/
|
|
160
|
+
readonly agents: AgentsResource;
|
|
161
|
+
/**
|
|
162
|
+
* UCP (Universal Commerce Protocol) checkout operations.
|
|
163
|
+
* @see {@link UCPResource}
|
|
164
|
+
*/
|
|
165
|
+
readonly ucp: UCPResource;
|
|
166
|
+
/**
|
|
167
|
+
* A2A (Agent-to-Agent) communication operations.
|
|
168
|
+
* @see {@link A2AResource}
|
|
169
|
+
*/
|
|
170
|
+
readonly a2a: A2AResource;
|
|
171
|
+
/**
|
|
172
|
+
* Creates a new SardisClient instance.
|
|
173
|
+
*
|
|
174
|
+
* @param options - Client configuration options
|
|
175
|
+
* @throws {Error} If API key is not provided
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```typescript
|
|
179
|
+
* const client = new SardisClient({
|
|
180
|
+
* apiKey: process.env.SARDIS_API_KEY,
|
|
181
|
+
* timeout: 60000, // 60 second timeout
|
|
182
|
+
* maxRetries: 5,
|
|
183
|
+
* retryDelay: 2000,
|
|
184
|
+
* });
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
constructor(options: SardisClientOptions);
|
|
188
|
+
/**
|
|
189
|
+
* Adds a request interceptor.
|
|
190
|
+
*
|
|
191
|
+
* Request interceptors are called before each request is sent and can
|
|
192
|
+
* modify the request configuration or throw an error to cancel the request.
|
|
193
|
+
*
|
|
194
|
+
* @param interceptor - The interceptor to add
|
|
195
|
+
* @returns A function to remove the interceptor
|
|
196
|
+
*
|
|
197
|
+
* @example
|
|
198
|
+
* ```typescript
|
|
199
|
+
* const removeInterceptor = client.addRequestInterceptor({
|
|
200
|
+
* onRequest: (config) => {
|
|
201
|
+
* config.headers['X-Custom-Header'] = 'value';
|
|
202
|
+
* return config;
|
|
203
|
+
* },
|
|
204
|
+
* onError: (error) => {
|
|
205
|
+
* console.error('Request interceptor error:', error);
|
|
206
|
+
* throw error;
|
|
207
|
+
* },
|
|
208
|
+
* });
|
|
209
|
+
*
|
|
210
|
+
* // Later, remove the interceptor
|
|
211
|
+
* removeInterceptor();
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
addRequestInterceptor(interceptor: RequestInterceptor): () => void;
|
|
215
|
+
/**
|
|
216
|
+
* Adds a response interceptor.
|
|
217
|
+
*
|
|
218
|
+
* Response interceptors are called after each response is received and can
|
|
219
|
+
* modify the response or throw an error.
|
|
220
|
+
*
|
|
221
|
+
* @param interceptor - The interceptor to add
|
|
222
|
+
* @returns A function to remove the interceptor
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```typescript
|
|
226
|
+
* const removeInterceptor = client.addResponseInterceptor({
|
|
227
|
+
* onResponse: (response) => {
|
|
228
|
+
* // Log all responses
|
|
229
|
+
* console.log(`${response.config.method} ${response.config.url}: ${response.status}`);
|
|
230
|
+
* return response;
|
|
231
|
+
* },
|
|
232
|
+
* onError: (error) => {
|
|
233
|
+
* // Transform errors
|
|
234
|
+
* if (error.response?.status === 404) {
|
|
235
|
+
* throw new NotFoundError('Resource', 'unknown');
|
|
236
|
+
* }
|
|
237
|
+
* throw error;
|
|
238
|
+
* },
|
|
239
|
+
* });
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
addResponseInterceptor(interceptor: ResponseInterceptor): () => void;
|
|
243
|
+
/**
|
|
244
|
+
* Updates the API key used for authentication.
|
|
245
|
+
*
|
|
246
|
+
* @param apiKey - The new API key
|
|
247
|
+
*
|
|
248
|
+
* @example
|
|
249
|
+
* ```typescript
|
|
250
|
+
* // Update API key after token refresh
|
|
251
|
+
* client.setApiKey(newApiKey);
|
|
252
|
+
* ```
|
|
253
|
+
*/
|
|
254
|
+
setApiKey(apiKey: string): void;
|
|
255
|
+
/**
|
|
256
|
+
* Gets the current API key.
|
|
257
|
+
*
|
|
258
|
+
* @returns The current API key
|
|
259
|
+
*/
|
|
260
|
+
getApiKey(): string;
|
|
261
|
+
/**
|
|
262
|
+
* Makes an HTTP request with retry logic, interceptors, and cancellation support.
|
|
263
|
+
*
|
|
264
|
+
* @typeParam T - The expected response type
|
|
265
|
+
* @param method - HTTP method
|
|
266
|
+
* @param path - API path
|
|
267
|
+
* @param options - Request options including params, data, and signal
|
|
268
|
+
* @returns The response data
|
|
269
|
+
*
|
|
270
|
+
* @throws {AuthenticationError} If authentication fails
|
|
271
|
+
* @throws {RateLimitError} If rate limit is exceeded
|
|
272
|
+
* @throws {TimeoutError} If request times out
|
|
273
|
+
* @throws {AbortError} If request is cancelled
|
|
274
|
+
* @throws {NetworkError} If network error occurs
|
|
275
|
+
* @throws {APIError} If API returns an error response
|
|
276
|
+
*
|
|
277
|
+
* @example
|
|
278
|
+
* ```typescript
|
|
279
|
+
* const result = await client.request<PaymentResponse>('POST', '/payments', {
|
|
280
|
+
* data: paymentData,
|
|
281
|
+
* signal: abortController.signal,
|
|
282
|
+
* });
|
|
283
|
+
* ```
|
|
284
|
+
*/
|
|
285
|
+
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
286
|
+
/**
|
|
287
|
+
* Executes a request with retry logic.
|
|
288
|
+
* @internal
|
|
289
|
+
*/
|
|
290
|
+
private executeWithRetry;
|
|
291
|
+
/**
|
|
292
|
+
* Parses the Retry-After header value.
|
|
293
|
+
* @internal
|
|
294
|
+
*/
|
|
295
|
+
private parseRetryAfter;
|
|
296
|
+
/**
|
|
297
|
+
* Calculates retry delay with exponential backoff and jitter.
|
|
298
|
+
* @internal
|
|
299
|
+
*/
|
|
300
|
+
private calculateRetryDelay;
|
|
301
|
+
/**
|
|
302
|
+
* Creates an async iterator for paginated responses.
|
|
303
|
+
*
|
|
304
|
+
* @typeParam T - The item type in the paginated response
|
|
305
|
+
* @param fetchPage - Function to fetch a page of results
|
|
306
|
+
* @param options - Pagination options
|
|
307
|
+
* @returns An async iterator that yields items from all pages
|
|
308
|
+
*
|
|
309
|
+
* @example
|
|
310
|
+
* ```typescript
|
|
311
|
+
* const iterator = client.paginate<Agent>(
|
|
312
|
+
* async (params) => {
|
|
313
|
+
* const response = await client.agents.list(params);
|
|
314
|
+
* return {
|
|
315
|
+
* data: response,
|
|
316
|
+
* hasMore: response.length === params.limit,
|
|
317
|
+
* nextCursor: response[response.length - 1]?.id,
|
|
318
|
+
* };
|
|
319
|
+
* },
|
|
320
|
+
* { limit: 100 }
|
|
321
|
+
* );
|
|
322
|
+
*
|
|
323
|
+
* for await (const agent of iterator) {
|
|
324
|
+
* console.log(agent.name);
|
|
325
|
+
* }
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
paginate<T>(fetchPage: (params: PaginationParams) => Promise<PaginatedResponse<T>>, options?: PaginationParams): AsyncIterableIterator<T>;
|
|
329
|
+
/**
|
|
330
|
+
* Creates an async iterator that collects all paginated results into an array.
|
|
331
|
+
*
|
|
332
|
+
* @typeParam T - The item type in the paginated response
|
|
333
|
+
* @param fetchPage - Function to fetch a page of results
|
|
334
|
+
* @param options - Pagination options
|
|
335
|
+
* @returns Promise that resolves to an array of all items
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```typescript
|
|
339
|
+
* const allAgents = await client.paginateAll<Agent>(
|
|
340
|
+
* async (params) => {
|
|
341
|
+
* const response = await client.agents.list(params);
|
|
342
|
+
* return {
|
|
343
|
+
* data: response,
|
|
344
|
+
* hasMore: response.length === params.limit,
|
|
345
|
+
* nextCursor: response[response.length - 1]?.id,
|
|
346
|
+
* };
|
|
347
|
+
* }
|
|
348
|
+
* );
|
|
349
|
+
* console.log(`Found ${allAgents.length} agents`);
|
|
350
|
+
* ```
|
|
351
|
+
*/
|
|
352
|
+
paginateAll<T>(fetchPage: (params: PaginationParams) => Promise<PaginatedResponse<T>>, options?: PaginationParams): Promise<T[]>;
|
|
353
|
+
/**
|
|
354
|
+
* Checks API health status.
|
|
355
|
+
*
|
|
356
|
+
* @param options - Request options
|
|
357
|
+
* @returns Health status response
|
|
358
|
+
*
|
|
359
|
+
* @example
|
|
360
|
+
* ```typescript
|
|
361
|
+
* const health = await client.health();
|
|
362
|
+
* console.log(`API status: ${health.status}, version: ${health.version}`);
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
health(options?: RequestOptions): Promise<{
|
|
366
|
+
status: string;
|
|
367
|
+
version?: string;
|
|
368
|
+
}>;
|
|
369
|
+
/**
|
|
370
|
+
* Executes multiple operations in a batch.
|
|
371
|
+
*
|
|
372
|
+
* @typeParam T - The response type for each operation
|
|
373
|
+
* @param operations - Array of operations to execute
|
|
374
|
+
* @param options - Batch options
|
|
375
|
+
* @returns Array of results (either success or error for each operation)
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```typescript
|
|
379
|
+
* const results = await client.batch([
|
|
380
|
+
* { method: 'GET', path: '/api/v2/wallets/wallet_1' },
|
|
381
|
+
* { method: 'GET', path: '/api/v2/wallets/wallet_2' },
|
|
382
|
+
* { method: 'GET', path: '/api/v2/wallets/wallet_3' },
|
|
383
|
+
* ], { concurrency: 3 });
|
|
384
|
+
*
|
|
385
|
+
* results.forEach((result, i) => {
|
|
386
|
+
* if (result.success) {
|
|
387
|
+
* console.log(`Operation ${i}: ${result.data}`);
|
|
388
|
+
* } else {
|
|
389
|
+
* console.error(`Operation ${i} failed: ${result.error}`);
|
|
390
|
+
* }
|
|
391
|
+
* });
|
|
392
|
+
* ```
|
|
393
|
+
*/
|
|
394
|
+
batch<T>(operations: Array<{
|
|
395
|
+
method: string;
|
|
396
|
+
path: string;
|
|
397
|
+
params?: Record<string, unknown>;
|
|
398
|
+
data?: unknown;
|
|
399
|
+
}>, options?: {
|
|
400
|
+
/** Maximum number of concurrent requests (default: 5) */
|
|
401
|
+
concurrency?: number;
|
|
402
|
+
/** Whether to stop on first error (default: false) */
|
|
403
|
+
stopOnError?: boolean;
|
|
404
|
+
/** AbortSignal for cancellation */
|
|
405
|
+
signal?: AbortSignal;
|
|
406
|
+
}): Promise<Array<{
|
|
407
|
+
success: true;
|
|
408
|
+
data: T;
|
|
409
|
+
} | {
|
|
410
|
+
success: false;
|
|
411
|
+
error: Error;
|
|
412
|
+
}>>;
|
|
413
|
+
/**
|
|
414
|
+
* Sleep utility for retry delays.
|
|
415
|
+
* @internal
|
|
416
|
+
*/
|
|
417
|
+
private sleep;
|
|
418
|
+
}
|
|
419
|
+
//# source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