agentmall 0.1.13 → 0.1.15
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.js +2 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -320,6 +320,7 @@ var STATUS_COLORS = {
|
|
|
320
320
|
shipped: c.cyan,
|
|
321
321
|
delivered: c.green,
|
|
322
322
|
completed: c.green,
|
|
323
|
+
ordered: c.green,
|
|
323
324
|
failed: c.red,
|
|
324
325
|
cancelled: c.red,
|
|
325
326
|
approved: c.yellow,
|
|
@@ -405,7 +406,7 @@ function formatCents(cents) {
|
|
|
405
406
|
return `$${(cents / 100).toFixed(2)}`;
|
|
406
407
|
}
|
|
407
408
|
function getBudgetBasePrice(product) {
|
|
408
|
-
return product.
|
|
409
|
+
return product.price;
|
|
409
410
|
}
|
|
410
411
|
function calculateSuggestedBudget(product, quantity = 1, variantUnitPriceCents) {
|
|
411
412
|
const quantityClamped = Math.max(1, quantity);
|
package/dist/index.d.cts
CHANGED
|
@@ -31,7 +31,7 @@ type ProductLookup = {
|
|
|
31
31
|
availability: string;
|
|
32
32
|
imageUrl?: string;
|
|
33
33
|
retailer: string;
|
|
34
|
-
/** Suggested max_budget in cents (
|
|
34
|
+
/** Suggested max_budget in cents (current price + 15% buffer + $8 shipping buffer). */
|
|
35
35
|
suggestedMaxBudget: number;
|
|
36
36
|
variants?: ProductVariant[];
|
|
37
37
|
/** True if served from cache. Price may not reflect current listing. */
|
|
@@ -65,7 +65,7 @@ type CreatePurchaseRequest = {
|
|
|
65
65
|
idempotency_key?: string;
|
|
66
66
|
metadata?: unknown;
|
|
67
67
|
};
|
|
68
|
-
type PurchaseLifecycleStatus = "payment_received" | "submitted" | "pending" | "
|
|
68
|
+
type PurchaseLifecycleStatus = "payment_received" | "submitted" | "pending" | "ordered" | "failed";
|
|
69
69
|
type CreatePurchaseResponse = {
|
|
70
70
|
id: string;
|
|
71
71
|
status: PurchaseLifecycleStatus;
|
package/dist/index.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ type ProductLookup = {
|
|
|
31
31
|
availability: string;
|
|
32
32
|
imageUrl?: string;
|
|
33
33
|
retailer: string;
|
|
34
|
-
/** Suggested max_budget in cents (
|
|
34
|
+
/** Suggested max_budget in cents (current price + 15% buffer + $8 shipping buffer). */
|
|
35
35
|
suggestedMaxBudget: number;
|
|
36
36
|
variants?: ProductVariant[];
|
|
37
37
|
/** True if served from cache. Price may not reflect current listing. */
|
|
@@ -65,7 +65,7 @@ type CreatePurchaseRequest = {
|
|
|
65
65
|
idempotency_key?: string;
|
|
66
66
|
metadata?: unknown;
|
|
67
67
|
};
|
|
68
|
-
type PurchaseLifecycleStatus = "payment_received" | "submitted" | "pending" | "
|
|
68
|
+
type PurchaseLifecycleStatus = "payment_received" | "submitted" | "pending" | "ordered" | "failed";
|
|
69
69
|
type CreatePurchaseResponse = {
|
|
70
70
|
id: string;
|
|
71
71
|
status: PurchaseLifecycleStatus;
|