@mnemopay/sdk 0.8.0 → 0.9.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/cli/dashboard.d.ts +9 -0
- package/dist/cli/dashboard.d.ts.map +1 -0
- package/dist/cli/dashboard.js +78 -0
- package/dist/cli/dashboard.js.map +1 -0
- package/dist/client.d.ts +182 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +177 -0
- package/dist/client.js.map +1 -0
- package/dist/commerce.d.ts +225 -0
- package/dist/commerce.d.ts.map +1 -0
- package/dist/commerce.js +420 -0
- package/dist/commerce.js.map +1 -0
- package/dist/identity.d.ts.map +1 -1
- package/dist/identity.js +13 -21
- package/dist/identity.js.map +1 -1
- package/dist/index.d.ts +15 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +116 -37
- package/dist/index.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +298 -6
- package/dist/mcp/server.js.map +1 -1
- package/dist/rails/index.d.ts.map +1 -1
- package/dist/rails/index.js +14 -3
- package/dist/rails/index.js.map +1 -1
- package/dist/rails/paystack.js +2 -2
- package/dist/rails/paystack.js.map +1 -1
- package/package.json +22 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.d.ts","sourceRoot":"","sources":["../../src/cli/dashboard.ts"],"names":[],"mappings":";AACA;;;;;GAKG"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
/**
|
|
4
|
+
* npx @mnemopay/sdk dashboard
|
|
5
|
+
*
|
|
6
|
+
* Opens the MnemoPay dashboard in your default browser.
|
|
7
|
+
* Manage agents, view transactions, update billing, and monitor fraud.
|
|
8
|
+
*/
|
|
9
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
+
};
|
|
12
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
+
const child_process_1 = require("child_process");
|
|
14
|
+
const os_1 = __importDefault(require("os"));
|
|
15
|
+
const DASHBOARD_URL = "https://getbizsuite.com/mnemopay/dashboard.html";
|
|
16
|
+
const PRICING_URL = "https://getbizsuite.com/mnemopay/#pricing";
|
|
17
|
+
const PRO_URL = "https://buy.stripe.com/00w9AMe27c9pgT6gxtbo409";
|
|
18
|
+
const ENTERPRISE_URL = "https://buy.stripe.com/9B63co8HNehxcCQ5SPbo40a";
|
|
19
|
+
function openBrowser(url) {
|
|
20
|
+
const platform = os_1.default.platform();
|
|
21
|
+
let cmd;
|
|
22
|
+
if (platform === "win32")
|
|
23
|
+
cmd = `start "" "${url}"`;
|
|
24
|
+
else if (platform === "darwin")
|
|
25
|
+
cmd = `open "${url}"`;
|
|
26
|
+
else
|
|
27
|
+
cmd = `xdg-open "${url}"`;
|
|
28
|
+
(0, child_process_1.exec)(cmd, (err) => {
|
|
29
|
+
if (err) {
|
|
30
|
+
console.log(`\n Open this URL in your browser:\n ${url}\n`);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
function main() {
|
|
35
|
+
const arg = process.argv[2];
|
|
36
|
+
console.log("\n MnemoPay v0.8.0\n");
|
|
37
|
+
if (arg === "subscribe" || arg === "pro") {
|
|
38
|
+
console.log(" Opening Stripe Checkout for MnemoPay Pro ($49/mo)...\n");
|
|
39
|
+
openBrowser(PRO_URL);
|
|
40
|
+
console.log(" Pro includes:");
|
|
41
|
+
console.log(" - File + SQLite persistence");
|
|
42
|
+
console.log(" - Transaction analytics dashboard");
|
|
43
|
+
console.log(" - Webhook notifications");
|
|
44
|
+
console.log(" - Geo trust profiles");
|
|
45
|
+
console.log(" - Priority email support");
|
|
46
|
+
console.log(" - 1.5% platform fee (vs 1.9% on free)\n");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (arg === "enterprise") {
|
|
50
|
+
console.log(" Opening Stripe Checkout for MnemoPay Enterprise ($299/mo)...\n");
|
|
51
|
+
openBrowser(ENTERPRISE_URL);
|
|
52
|
+
console.log(" Enterprise includes:");
|
|
53
|
+
console.log(" - ML fraud detection (Isolation Forest)");
|
|
54
|
+
console.log(" - Custom payment rail integration");
|
|
55
|
+
console.log(" - SLA guarantee");
|
|
56
|
+
console.log(" - Dedicated support + SSO");
|
|
57
|
+
console.log(" - 1.0% platform fee\n");
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (arg === "pricing") {
|
|
61
|
+
console.log(" Opening pricing page...\n");
|
|
62
|
+
openBrowser(PRICING_URL);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// Default: open dashboard
|
|
66
|
+
console.log(" Opening dashboard...\n");
|
|
67
|
+
openBrowser(DASHBOARD_URL);
|
|
68
|
+
console.log(" Commands:");
|
|
69
|
+
console.log(" npx @mnemopay/sdk dashboard Open dashboard");
|
|
70
|
+
console.log(" npx @mnemopay/sdk dashboard subscribe Subscribe to Pro ($49/mo)");
|
|
71
|
+
console.log(" npx @mnemopay/sdk dashboard enterprise Subscribe to Enterprise ($299/mo)");
|
|
72
|
+
console.log(" npx @mnemopay/sdk dashboard pricing View pricing\n");
|
|
73
|
+
console.log(" Current Plan: Starter (Free)");
|
|
74
|
+
console.log(" Platform Fee: 1.9% per settled transaction");
|
|
75
|
+
console.log(" Upgrade to Pro for 1.5% fee + persistence + analytics\n");
|
|
76
|
+
}
|
|
77
|
+
main();
|
|
78
|
+
//# sourceMappingURL=dashboard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.js","sourceRoot":"","sources":["../../src/cli/dashboard.ts"],"names":[],"mappings":";;AACA;;;;;GAKG;;;;;AAEH,iDAAqC;AACrC,4CAAoB;AAEpB,MAAM,aAAa,GAAG,iDAAiD,CAAC;AACxE,MAAM,WAAW,GAAG,2CAA2C,CAAC;AAChE,MAAM,OAAO,GAAG,gDA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Universal Client
|
|
3
|
+
*
|
|
4
|
+
* Thin client that works everywhere: browser, React Native, Node.js, Deno.
|
|
5
|
+
* Zero dependencies. Talks to a MnemoPay server via REST API.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* import { MnemoPayClient } from "@mnemopay/sdk/client";
|
|
9
|
+
*
|
|
10
|
+
* const client = new MnemoPayClient("http://localhost:3200", "your-token");
|
|
11
|
+
* await client.remember("User prefers monthly billing");
|
|
12
|
+
* const memories = await client.recall("billing preferences");
|
|
13
|
+
* const tx = await client.charge(25, "Monthly access");
|
|
14
|
+
* await client.settle(tx.txId);
|
|
15
|
+
*
|
|
16
|
+
* Works from:
|
|
17
|
+
* - Browser (any modern browser with fetch)
|
|
18
|
+
* - React Native
|
|
19
|
+
* - Node.js 18+
|
|
20
|
+
* - Deno
|
|
21
|
+
* - Any HTTP client
|
|
22
|
+
*/
|
|
23
|
+
export interface ClientConfig {
|
|
24
|
+
/** MnemoPay server URL (e.g. "http://localhost:3200") */
|
|
25
|
+
baseUrl: string;
|
|
26
|
+
/** Bearer token for authentication (MNEMOPAY_MCP_TOKEN) */
|
|
27
|
+
token?: string;
|
|
28
|
+
/** Request timeout in ms (default: 30000) */
|
|
29
|
+
timeoutMs?: number;
|
|
30
|
+
/** Custom fetch implementation (for React Native polyfills, etc.) */
|
|
31
|
+
fetch?: typeof globalThis.fetch;
|
|
32
|
+
}
|
|
33
|
+
export interface ApiResponse<T = any> {
|
|
34
|
+
ok: boolean;
|
|
35
|
+
tool?: string;
|
|
36
|
+
result?: T;
|
|
37
|
+
error?: string;
|
|
38
|
+
}
|
|
39
|
+
export interface MemoryResult {
|
|
40
|
+
id: string;
|
|
41
|
+
status: string;
|
|
42
|
+
}
|
|
43
|
+
export interface TransactionResult {
|
|
44
|
+
txId: string;
|
|
45
|
+
amount: number;
|
|
46
|
+
status: string;
|
|
47
|
+
reason?: string;
|
|
48
|
+
rail?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface BalanceResult {
|
|
51
|
+
wallet: number;
|
|
52
|
+
reputation: number;
|
|
53
|
+
}
|
|
54
|
+
export interface ProductResult {
|
|
55
|
+
productId: string;
|
|
56
|
+
title: string;
|
|
57
|
+
price: number;
|
|
58
|
+
url: string;
|
|
59
|
+
merchant: string;
|
|
60
|
+
category?: string;
|
|
61
|
+
rating?: number;
|
|
62
|
+
freeShipping?: boolean;
|
|
63
|
+
}
|
|
64
|
+
export interface PurchaseOrder {
|
|
65
|
+
id: string;
|
|
66
|
+
agentId: string;
|
|
67
|
+
product: ProductResult;
|
|
68
|
+
txId: string;
|
|
69
|
+
status: string;
|
|
70
|
+
trackingUrl?: string;
|
|
71
|
+
approved: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface ShoppingMandate {
|
|
74
|
+
budget: number;
|
|
75
|
+
maxPerItem?: number;
|
|
76
|
+
categories?: string[];
|
|
77
|
+
blockedCategories?: string[];
|
|
78
|
+
allowedMerchants?: string[];
|
|
79
|
+
blockedMerchants?: string[];
|
|
80
|
+
approvalThreshold?: number;
|
|
81
|
+
expiresAt?: string;
|
|
82
|
+
issuedBy: string;
|
|
83
|
+
}
|
|
84
|
+
export interface SpendingSummary {
|
|
85
|
+
totalSpent: number;
|
|
86
|
+
remainingBudget: number;
|
|
87
|
+
orderCount: number;
|
|
88
|
+
deliveredCount: number;
|
|
89
|
+
pendingCount: number;
|
|
90
|
+
}
|
|
91
|
+
export declare class MnemoPayClient {
|
|
92
|
+
private baseUrl;
|
|
93
|
+
private token?;
|
|
94
|
+
private timeoutMs;
|
|
95
|
+
private _fetch;
|
|
96
|
+
constructor(baseUrl: string, token?: string, config?: Partial<ClientConfig>);
|
|
97
|
+
private request;
|
|
98
|
+
private post;
|
|
99
|
+
private get;
|
|
100
|
+
/** Store a memory */
|
|
101
|
+
remember(content: string, options?: {
|
|
102
|
+
importance?: number;
|
|
103
|
+
tags?: string[];
|
|
104
|
+
}): Promise<MemoryResult>;
|
|
105
|
+
/** Recall memories, optionally filtered by semantic query */
|
|
106
|
+
recall(queryOrLimit?: string | number, limit?: number): Promise<string>;
|
|
107
|
+
/** Delete a memory by ID */
|
|
108
|
+
forget(id: string): Promise<string>;
|
|
109
|
+
/** Boost a memory's importance */
|
|
110
|
+
reinforce(id: string, boost?: number): Promise<string>;
|
|
111
|
+
/** Prune stale memories */
|
|
112
|
+
consolidate(): Promise<string>;
|
|
113
|
+
/** Create an escrow charge */
|
|
114
|
+
charge(amount: number, reason: string): Promise<TransactionResult>;
|
|
115
|
+
/** Settle a pending escrow */
|
|
116
|
+
settle(txId: string, counterpartyId?: string): Promise<TransactionResult>;
|
|
117
|
+
/** Refund a transaction */
|
|
118
|
+
refund(txId: string): Promise<TransactionResult>;
|
|
119
|
+
/** Check wallet balance and reputation */
|
|
120
|
+
balance(): Promise<string>;
|
|
121
|
+
/** Full agent profile */
|
|
122
|
+
profile(): Promise<any>;
|
|
123
|
+
/** Transaction history */
|
|
124
|
+
history(limit?: number): Promise<string>;
|
|
125
|
+
/** Audit logs */
|
|
126
|
+
logs(limit?: number): Promise<string>;
|
|
127
|
+
/** Reputation report */
|
|
128
|
+
reputation(): Promise<any>;
|
|
129
|
+
/** File a dispute */
|
|
130
|
+
dispute(txId: string, reason: string): Promise<any>;
|
|
131
|
+
/** Fraud detection stats */
|
|
132
|
+
fraudStats(): Promise<any>;
|
|
133
|
+
/** Set a shopping mandate (budget, categories, merchant restrictions) */
|
|
134
|
+
setMandate(mandate: ShoppingMandate): Promise<{
|
|
135
|
+
mandate: ShoppingMandate;
|
|
136
|
+
remainingBudget: number;
|
|
137
|
+
}>;
|
|
138
|
+
/** Search for products within mandate constraints */
|
|
139
|
+
search(query: string, options?: {
|
|
140
|
+
limit?: number;
|
|
141
|
+
minPrice?: number;
|
|
142
|
+
maxPrice?: number;
|
|
143
|
+
category?: string;
|
|
144
|
+
sortBy?: "price_asc" | "price_desc" | "rating" | "relevance";
|
|
145
|
+
freeShippingOnly?: boolean;
|
|
146
|
+
}): Promise<{
|
|
147
|
+
results: ProductResult[];
|
|
148
|
+
remainingBudget: number;
|
|
149
|
+
}>;
|
|
150
|
+
/** Purchase a product (creates escrow, executes purchase) */
|
|
151
|
+
purchase(product: ProductResult, deliveryInstructions?: string): Promise<{
|
|
152
|
+
order: PurchaseOrder;
|
|
153
|
+
}>;
|
|
154
|
+
/** Confirm delivery (settles escrow) */
|
|
155
|
+
confirmDelivery(orderId: string): Promise<{
|
|
156
|
+
order: PurchaseOrder;
|
|
157
|
+
}>;
|
|
158
|
+
/** Cancel an order (refunds escrow) */
|
|
159
|
+
cancelOrder(orderId: string, reason?: string): Promise<{
|
|
160
|
+
order: PurchaseOrder;
|
|
161
|
+
}>;
|
|
162
|
+
/** List orders, optionally filtered by status */
|
|
163
|
+
orders(status?: string): Promise<{
|
|
164
|
+
orders: PurchaseOrder[];
|
|
165
|
+
summary: SpendingSummary;
|
|
166
|
+
}>;
|
|
167
|
+
/** Check server health */
|
|
168
|
+
health(): Promise<{
|
|
169
|
+
status: string;
|
|
170
|
+
mode: string;
|
|
171
|
+
}>;
|
|
172
|
+
/** List available tools */
|
|
173
|
+
tools(): Promise<{
|
|
174
|
+
tools: Array<{
|
|
175
|
+
name: string;
|
|
176
|
+
description: string;
|
|
177
|
+
}>;
|
|
178
|
+
version: string;
|
|
179
|
+
}>;
|
|
180
|
+
}
|
|
181
|
+
export default MnemoPayClient;
|
|
182
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAIH,MAAM,WAAW,YAAY;IAC3B,yDAAyD;IACzD,OAAO,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,KAAK,CAAC,EAAE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
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MnemoPay Universal Client
|
|
4
|
+
*
|
|
5
|
+
* Thin client that works everywhere: browser, React Native, Node.js, Deno.
|
|
6
|
+
* Zero dependencies. Talks to a MnemoPay server via REST API.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* import { MnemoPayClient } from "@mnemopay/sdk/client";
|
|
10
|
+
*
|
|
11
|
+
* const client = new MnemoPayClient("http://localhost:3200", "your-token");
|
|
12
|
+
* await client.remember("User prefers monthly billing");
|
|
13
|
+
* const memories = await client.recall("billing preferences");
|
|
14
|
+
* const tx = await client.charge(25, "Monthly access");
|
|
15
|
+
* await client.settle(tx.txId);
|
|
16
|
+
*
|
|
17
|
+
* Works from:
|
|
18
|
+
* - Browser (any modern browser with fetch)
|
|
19
|
+
* - React Native
|
|
20
|
+
* - Node.js 18+
|
|
21
|
+
* - Deno
|
|
22
|
+
* - Any HTTP client
|
|
23
|
+
*/
|
|
24
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
+
exports.MnemoPayClient = void 0;
|
|
26
|
+
// ─── Client ─────────────────────────────────────────────────────────────────
|
|
27
|
+
class MnemoPayClient {
|
|
28
|
+
baseUrl;
|
|
29
|
+
token;
|
|
30
|
+
timeoutMs;
|
|
31
|
+
_fetch;
|
|
32
|
+
constructor(baseUrl, token, config) {
|
|
33
|
+
this.baseUrl = baseUrl.replace(/\/$/, "");
|
|
34
|
+
this.token = token;
|
|
35
|
+
this.timeoutMs = config?.timeoutMs ?? 30_000;
|
|
36
|
+
this._fetch = config?.fetch ?? globalThis.fetch.bind(globalThis);
|
|
37
|
+
}
|
|
38
|
+
// ── Core HTTP ───────────────────────────────────────────────────────────
|
|
39
|
+
async request(method, path, body) {
|
|
40
|
+
const controller = new AbortController();
|
|
41
|
+
const timeout = setTimeout(() => controller.abort(), this.timeoutMs);
|
|
42
|
+
const headers = { "Content-Type": "application/json" };
|
|
43
|
+
if (this.token)
|
|
44
|
+
headers["Authorization"] = `Bearer ${this.token}`;
|
|
45
|
+
try {
|
|
46
|
+
const res = await this._fetch(`${this.baseUrl}${path}`, {
|
|
47
|
+
method,
|
|
48
|
+
headers,
|
|
49
|
+
body: body !== undefined ? JSON.stringify(body) : undefined,
|
|
50
|
+
signal: controller.signal,
|
|
51
|
+
});
|
|
52
|
+
const json = await res.json();
|
|
53
|
+
if (!res.ok || json.ok === false) {
|
|
54
|
+
throw new Error(json.error ?? `Request failed (${res.status})`);
|
|
55
|
+
}
|
|
56
|
+
return json.result !== undefined ? json.result : json;
|
|
57
|
+
}
|
|
58
|
+
catch (err) {
|
|
59
|
+
if (err.name === "AbortError") {
|
|
60
|
+
throw new Error(`Request timed out after ${this.timeoutMs}ms`);
|
|
61
|
+
}
|
|
62
|
+
throw err;
|
|
63
|
+
}
|
|
64
|
+
finally {
|
|
65
|
+
clearTimeout(timeout);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
post(path, body) {
|
|
69
|
+
return this.request("POST", path, body);
|
|
70
|
+
}
|
|
71
|
+
get(path) {
|
|
72
|
+
return this.request("GET", path);
|
|
73
|
+
}
|
|
74
|
+
// ── Memory ──────────────────────────────────────────────────────────────
|
|
75
|
+
/** Store a memory */
|
|
76
|
+
async remember(content, options) {
|
|
77
|
+
return this.post("/api/remember", { content, ...options });
|
|
78
|
+
}
|
|
79
|
+
/** Recall memories, optionally filtered by semantic query */
|
|
80
|
+
async recall(queryOrLimit, limit) {
|
|
81
|
+
if (typeof queryOrLimit === "number") {
|
|
82
|
+
return this.post("/api/recall", { limit: queryOrLimit });
|
|
83
|
+
}
|
|
84
|
+
return this.post("/api/recall", { query: queryOrLimit, limit });
|
|
85
|
+
}
|
|
86
|
+
/** Delete a memory by ID */
|
|
87
|
+
async forget(id) {
|
|
88
|
+
return this.post("/api/forget", { id });
|
|
89
|
+
}
|
|
90
|
+
/** Boost a memory's importance */
|
|
91
|
+
async reinforce(id, boost) {
|
|
92
|
+
return this.post("/api/reinforce", { id, boost });
|
|
93
|
+
}
|
|
94
|
+
/** Prune stale memories */
|
|
95
|
+
async consolidate() {
|
|
96
|
+
return this.post("/api/consolidate", {});
|
|
97
|
+
}
|
|
98
|
+
// ── Payments ────────────────────────────────────────────────────────────
|
|
99
|
+
/** Create an escrow charge */
|
|
100
|
+
async charge(amount, reason) {
|
|
101
|
+
return this.post("/api/charge", { amount, reason });
|
|
102
|
+
}
|
|
103
|
+
/** Settle a pending escrow */
|
|
104
|
+
async settle(txId, counterpartyId) {
|
|
105
|
+
return this.post("/api/settle", { txId, counterpartyId });
|
|
106
|
+
}
|
|
107
|
+
/** Refund a transaction */
|
|
108
|
+
async refund(txId) {
|
|
109
|
+
return this.post("/api/refund", { txId });
|
|
110
|
+
}
|
|
111
|
+
/** Check wallet balance and reputation */
|
|
112
|
+
async balance() {
|
|
113
|
+
return this.post("/api/balance", {});
|
|
114
|
+
}
|
|
115
|
+
/** Full agent profile */
|
|
116
|
+
async profile() {
|
|
117
|
+
return this.post("/api/profile", {});
|
|
118
|
+
}
|
|
119
|
+
/** Transaction history */
|
|
120
|
+
async history(limit) {
|
|
121
|
+
return this.post("/api/history", { limit });
|
|
122
|
+
}
|
|
123
|
+
/** Audit logs */
|
|
124
|
+
async logs(limit) {
|
|
125
|
+
return this.post("/api/logs", { limit });
|
|
126
|
+
}
|
|
127
|
+
/** Reputation report */
|
|
128
|
+
async reputation() {
|
|
129
|
+
return this.post("/api/reputation", {});
|
|
130
|
+
}
|
|
131
|
+
/** File a dispute */
|
|
132
|
+
async dispute(txId, reason) {
|
|
133
|
+
return this.post("/api/dispute", { txId, reason });
|
|
134
|
+
}
|
|
135
|
+
/** Fraud detection stats */
|
|
136
|
+
async fraudStats() {
|
|
137
|
+
return this.post("/api/fraud_stats", {});
|
|
138
|
+
}
|
|
139
|
+
// ── Commerce ────────────────────────────────────────────────────────────
|
|
140
|
+
/** Set a shopping mandate (budget, categories, merchant restrictions) */
|
|
141
|
+
async setMandate(mandate) {
|
|
142
|
+
return this.request("POST", "/api/commerce/mandate", mandate);
|
|
143
|
+
}
|
|
144
|
+
/** Search for products within mandate constraints */
|
|
145
|
+
async search(query, options) {
|
|
146
|
+
return this.request("POST", "/api/commerce/search", { query, options });
|
|
147
|
+
}
|
|
148
|
+
/** Purchase a product (creates escrow, executes purchase) */
|
|
149
|
+
async purchase(product, deliveryInstructions) {
|
|
150
|
+
return this.request("POST", "/api/commerce/purchase", { product, deliveryInstructions });
|
|
151
|
+
}
|
|
152
|
+
/** Confirm delivery (settles escrow) */
|
|
153
|
+
async confirmDelivery(orderId) {
|
|
154
|
+
return this.request("POST", "/api/commerce/confirm", { orderId });
|
|
155
|
+
}
|
|
156
|
+
/** Cancel an order (refunds escrow) */
|
|
157
|
+
async cancelOrder(orderId, reason) {
|
|
158
|
+
return this.request("POST", "/api/commerce/cancel", { orderId, reason });
|
|
159
|
+
}
|
|
160
|
+
/** List orders, optionally filtered by status */
|
|
161
|
+
async orders(status) {
|
|
162
|
+
const qs = status ? `?status=${encodeURIComponent(status)}` : "";
|
|
163
|
+
return this.request("GET", `/api/commerce/orders${qs}`);
|
|
164
|
+
}
|
|
165
|
+
// ── Utility ─────────────────────────────────────────────────────────────
|
|
166
|
+
/** Check server health */
|
|
167
|
+
async health() {
|
|
168
|
+
return this.get("/health");
|
|
169
|
+
}
|
|
170
|
+
/** List available tools */
|
|
171
|
+
async tools() {
|
|
172
|
+
return this.get("/api/tools");
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
exports.MnemoPayClient = MnemoPayClient;
|
|
176
|
+
exports.default = MnemoPayClient;
|
|
177
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;;;AAiFH,+EAA+E;AAE/E,MAAa,cAAc;IACjB,OAAO,CAAS;IAChB,KAAK,CAAU;IACf,SAAS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