@01.software/cli 0.10.4 → 0.10.5
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.js +1 -229
- package/dist/index.js.map +1 -1
- package/dist/mcp/{chunk-F5VI4HQM.js → chunk-2EPYMNHW.js} +13 -12
- package/dist/mcp/chunk-2EPYMNHW.js.map +1 -0
- package/dist/mcp/http.js +1 -1
- package/dist/mcp/stdio.js +1 -1
- package/dist/mcp/vercel.js +12 -11
- package/package.json +2 -2
- package/dist/mcp/chunk-F5VI4HQM.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1569,9 +1569,8 @@ function registerSchemaCommands(program2, getClient2, getFormat2) {
|
|
|
1569
1569
|
});
|
|
1570
1570
|
}
|
|
1571
1571
|
|
|
1572
|
-
// ../contracts/
|
|
1572
|
+
// ../contracts/src/tenant/index.ts
|
|
1573
1573
|
import { z as z3 } from "zod";
|
|
1574
|
-
import { z as z22 } from "zod";
|
|
1575
1574
|
var tenantFieldConfigStateSchema = z3.object({
|
|
1576
1575
|
hiddenFields: z3.array(z3.string()),
|
|
1577
1576
|
isHidden: z3.boolean()
|
|
@@ -1715,233 +1714,6 @@ var collectionSchemaResponseSchema = z3.object({
|
|
|
1715
1714
|
fields: z3.array(collectionFieldSchema)
|
|
1716
1715
|
}).strict()
|
|
1717
1716
|
}).strict();
|
|
1718
|
-
var transactionStatusSchema = z22.enum([
|
|
1719
|
-
"pending",
|
|
1720
|
-
"paid",
|
|
1721
|
-
"failed",
|
|
1722
|
-
"canceled"
|
|
1723
|
-
]);
|
|
1724
|
-
var updateTransactionSchema = z22.object({
|
|
1725
|
-
pgPaymentId: z22.string().min(1, "pgPaymentId is required").describe("PG payment ID (required)"),
|
|
1726
|
-
status: transactionStatusSchema.describe(
|
|
1727
|
-
"New transaction status (required)"
|
|
1728
|
-
),
|
|
1729
|
-
paymentMethod: z22.string().optional().describe("Payment method (optional)"),
|
|
1730
|
-
receiptUrl: z22.string().optional().describe("Receipt URL (optional)"),
|
|
1731
|
-
paymentKey: z22.string().min(1).optional().describe("Provider payment key for verified paid confirmation"),
|
|
1732
|
-
amount: z22.number().int().positive().optional().describe("Provider-confirmed amount for verified paid confirmation")
|
|
1733
|
-
}).strict();
|
|
1734
|
-
var providerSlugSchema = z22.string().trim().regex(/^[a-z0-9][a-z0-9_-]{0,63}$/, "pgProvider must be lowercase slug");
|
|
1735
|
-
var confirmPaymentSchema = z22.object({
|
|
1736
|
-
orderNumber: z22.string().min(1).optional(),
|
|
1737
|
-
pgPaymentId: z22.string().min(1, "pgPaymentId is required").describe("Provider payment identifier stored on the transaction"),
|
|
1738
|
-
pgProvider: providerSlugSchema.describe(
|
|
1739
|
-
"Payment provider slug, e.g. toss, portone, stripe"
|
|
1740
|
-
),
|
|
1741
|
-
pgOrderId: z22.string().min(1).optional(),
|
|
1742
|
-
amount: z22.number().int().nonnegative("amount must be non-negative").describe("Provider-confirmed amount in minor units"),
|
|
1743
|
-
currency: z22.string().min(1).optional(),
|
|
1744
|
-
paymentMethod: z22.string().optional(),
|
|
1745
|
-
receiptUrl: z22.string().url().optional(),
|
|
1746
|
-
approvedAt: z22.string().optional(),
|
|
1747
|
-
providerStatus: z22.string().optional(),
|
|
1748
|
-
providerEventId: z22.string().min(1).optional(),
|
|
1749
|
-
confirmationSource: z22.enum([
|
|
1750
|
-
"provider_webhook",
|
|
1751
|
-
"provider_lookup",
|
|
1752
|
-
"provider_api_confirm",
|
|
1753
|
-
"manual_server"
|
|
1754
|
-
]).optional(),
|
|
1755
|
-
metadata: z22.record(z22.string(), z22.unknown()).optional()
|
|
1756
|
-
}).strict();
|
|
1757
|
-
var returnReasonSchema2 = z22.enum([
|
|
1758
|
-
"change_of_mind",
|
|
1759
|
-
"defective",
|
|
1760
|
-
"wrong_delivery",
|
|
1761
|
-
"damaged",
|
|
1762
|
-
"other"
|
|
1763
|
-
]);
|
|
1764
|
-
var restockActionSchema = z22.enum(["return_to_stock", "discard"]);
|
|
1765
|
-
var returnWithRefundItemSchema = z22.object({
|
|
1766
|
-
orderItem: z22.union([z22.string(), z22.number()]).transform(String),
|
|
1767
|
-
quantity: z22.number().int().positive("quantity must be a positive integer"),
|
|
1768
|
-
restockAction: restockActionSchema.default("return_to_stock"),
|
|
1769
|
-
restockingFee: z22.number().min(0, "restockingFee must be non-negative").optional().describe("Restocking fee charged for this line (ADR 0005 \xA7Gap 1)")
|
|
1770
|
-
}).strict();
|
|
1771
|
-
var returnWithRefundSchema = z22.object({
|
|
1772
|
-
orderNumber: z22.string().min(1, "orderNumber is required").describe("Order number (required)"),
|
|
1773
|
-
reason: returnReasonSchema2.optional().describe("Return reason (optional)"),
|
|
1774
|
-
reasonDetail: z22.string().optional().describe("Detailed reason text (optional)"),
|
|
1775
|
-
returnItems: z22.array(returnWithRefundItemSchema).min(1, "At least one return item is required").max(100, "Too many return items").describe("Array of products to return (required)"),
|
|
1776
|
-
refundAmount: z22.number().min(0, "refundAmount must be non-negative").describe("Refund amount (required, min 0)"),
|
|
1777
|
-
returnShippingFee: z22.number().min(0, "returnShippingFee must be non-negative").optional().describe("Return shipping fee charged to the customer (ADR 0005 \xA7Gap 1)"),
|
|
1778
|
-
pgPaymentId: z22.string().min(1, "pgPaymentId is required").describe("PG payment ID for refund (required)"),
|
|
1779
|
-
paymentKey: z22.string().min(1).optional().describe("Provider payment key for verified refund"),
|
|
1780
|
-
refundReceiptUrl: z22.string().optional().describe("Refund receipt URL (optional)")
|
|
1781
|
-
}).strict();
|
|
1782
|
-
var MCP_TOOL_CONTRACT = {
|
|
1783
|
-
"query-collection": {
|
|
1784
|
-
consoleRole: "tenant-viewer",
|
|
1785
|
-
oauthScope: "mcp:read",
|
|
1786
|
-
readOnly: true
|
|
1787
|
-
},
|
|
1788
|
-
"get-collection-by-id": {
|
|
1789
|
-
consoleRole: "tenant-viewer",
|
|
1790
|
-
oauthScope: "mcp:read",
|
|
1791
|
-
readOnly: true
|
|
1792
|
-
},
|
|
1793
|
-
"get-order": {
|
|
1794
|
-
consoleRole: "tenant-viewer",
|
|
1795
|
-
oauthScope: "mcp:read",
|
|
1796
|
-
readOnly: true
|
|
1797
|
-
},
|
|
1798
|
-
"stock-check": {
|
|
1799
|
-
consoleRole: "tenant-viewer",
|
|
1800
|
-
oauthScope: "mcp:read",
|
|
1801
|
-
readOnly: true
|
|
1802
|
-
},
|
|
1803
|
-
"product-detail": {
|
|
1804
|
-
consoleRole: "tenant-viewer",
|
|
1805
|
-
oauthScope: "mcp:read",
|
|
1806
|
-
readOnly: true
|
|
1807
|
-
},
|
|
1808
|
-
"product-upsert": {
|
|
1809
|
-
consoleRole: "tenant-admin",
|
|
1810
|
-
oauthScope: "mcp:write",
|
|
1811
|
-
readOnly: false
|
|
1812
|
-
},
|
|
1813
|
-
"validate-discount": {
|
|
1814
|
-
consoleRole: "tenant-viewer",
|
|
1815
|
-
oauthScope: "mcp:read",
|
|
1816
|
-
readOnly: true
|
|
1817
|
-
},
|
|
1818
|
-
"calculate-shipping": {
|
|
1819
|
-
consoleRole: "tenant-viewer",
|
|
1820
|
-
oauthScope: "mcp:read",
|
|
1821
|
-
readOnly: true
|
|
1822
|
-
},
|
|
1823
|
-
"get-collection-schema": {
|
|
1824
|
-
consoleRole: "tenant-viewer",
|
|
1825
|
-
oauthScope: "mcp:read",
|
|
1826
|
-
readOnly: true
|
|
1827
|
-
},
|
|
1828
|
-
"list-configurable-fields": {
|
|
1829
|
-
consoleRole: "tenant-viewer",
|
|
1830
|
-
oauthScope: "mcp:read",
|
|
1831
|
-
readOnly: true
|
|
1832
|
-
},
|
|
1833
|
-
"get-tenant-context": {
|
|
1834
|
-
consoleRole: "tenant-viewer",
|
|
1835
|
-
oauthScope: "mcp:read",
|
|
1836
|
-
readOnly: true
|
|
1837
|
-
},
|
|
1838
|
-
"check-feature-progress": {
|
|
1839
|
-
consoleRole: "tenant-viewer",
|
|
1840
|
-
oauthScope: "mcp:read",
|
|
1841
|
-
readOnly: true
|
|
1842
|
-
},
|
|
1843
|
-
"add-cart-item": {
|
|
1844
|
-
consoleRole: "tenant-editor",
|
|
1845
|
-
oauthScope: "mcp:write",
|
|
1846
|
-
readOnly: false
|
|
1847
|
-
},
|
|
1848
|
-
"update-cart-item": {
|
|
1849
|
-
consoleRole: "tenant-editor",
|
|
1850
|
-
oauthScope: "mcp:write",
|
|
1851
|
-
readOnly: false
|
|
1852
|
-
},
|
|
1853
|
-
"remove-cart-item": {
|
|
1854
|
-
consoleRole: "tenant-editor",
|
|
1855
|
-
oauthScope: "mcp:write",
|
|
1856
|
-
readOnly: false
|
|
1857
|
-
},
|
|
1858
|
-
"clear-cart": {
|
|
1859
|
-
consoleRole: "tenant-editor",
|
|
1860
|
-
oauthScope: "mcp:write",
|
|
1861
|
-
readOnly: false
|
|
1862
|
-
},
|
|
1863
|
-
"apply-discount": {
|
|
1864
|
-
consoleRole: "tenant-editor",
|
|
1865
|
-
oauthScope: "mcp:write",
|
|
1866
|
-
readOnly: false
|
|
1867
|
-
},
|
|
1868
|
-
"remove-discount": {
|
|
1869
|
-
consoleRole: "tenant-editor",
|
|
1870
|
-
oauthScope: "mcp:write",
|
|
1871
|
-
readOnly: false
|
|
1872
|
-
},
|
|
1873
|
-
checkout: {
|
|
1874
|
-
consoleRole: "tenant-admin",
|
|
1875
|
-
oauthScope: "mcp:write",
|
|
1876
|
-
readOnly: false
|
|
1877
|
-
},
|
|
1878
|
-
"create-order": {
|
|
1879
|
-
consoleRole: "tenant-admin",
|
|
1880
|
-
oauthScope: "mcp:write",
|
|
1881
|
-
readOnly: false
|
|
1882
|
-
},
|
|
1883
|
-
"update-order": {
|
|
1884
|
-
consoleRole: "tenant-admin",
|
|
1885
|
-
oauthScope: "mcp:write",
|
|
1886
|
-
readOnly: false
|
|
1887
|
-
},
|
|
1888
|
-
"create-fulfillment": {
|
|
1889
|
-
consoleRole: "tenant-admin",
|
|
1890
|
-
oauthScope: "mcp:write",
|
|
1891
|
-
readOnly: false
|
|
1892
|
-
},
|
|
1893
|
-
"update-fulfillment": {
|
|
1894
|
-
consoleRole: "tenant-admin",
|
|
1895
|
-
oauthScope: "mcp:write",
|
|
1896
|
-
readOnly: false
|
|
1897
|
-
},
|
|
1898
|
-
"create-return": {
|
|
1899
|
-
consoleRole: "tenant-admin",
|
|
1900
|
-
oauthScope: "mcp:write",
|
|
1901
|
-
readOnly: false
|
|
1902
|
-
},
|
|
1903
|
-
"update-return": {
|
|
1904
|
-
consoleRole: "tenant-admin",
|
|
1905
|
-
oauthScope: "mcp:write",
|
|
1906
|
-
readOnly: false
|
|
1907
|
-
},
|
|
1908
|
-
"return-with-refund": {
|
|
1909
|
-
consoleRole: "tenant-admin",
|
|
1910
|
-
oauthScope: "mcp:write",
|
|
1911
|
-
readOnly: false
|
|
1912
|
-
},
|
|
1913
|
-
"update-transaction": {
|
|
1914
|
-
consoleRole: "tenant-admin",
|
|
1915
|
-
oauthScope: "mcp:write",
|
|
1916
|
-
readOnly: false
|
|
1917
|
-
},
|
|
1918
|
-
"update-field-config": {
|
|
1919
|
-
consoleRole: "tenant-admin",
|
|
1920
|
-
oauthScope: "mcp:write",
|
|
1921
|
-
readOnly: false
|
|
1922
|
-
},
|
|
1923
|
-
"sdk-get-recipe": {
|
|
1924
|
-
consoleRole: "tenant-viewer",
|
|
1925
|
-
oauthScope: "mcp:read",
|
|
1926
|
-
readOnly: true
|
|
1927
|
-
},
|
|
1928
|
-
"sdk-search-docs": {
|
|
1929
|
-
consoleRole: "tenant-viewer",
|
|
1930
|
-
oauthScope: "mcp:read",
|
|
1931
|
-
readOnly: true
|
|
1932
|
-
},
|
|
1933
|
-
"sdk-get-auth-setup": {
|
|
1934
|
-
consoleRole: "tenant-viewer",
|
|
1935
|
-
oauthScope: "mcp:read",
|
|
1936
|
-
readOnly: true
|
|
1937
|
-
},
|
|
1938
|
-
"sdk-get-collection-pattern": {
|
|
1939
|
-
consoleRole: "tenant-viewer",
|
|
1940
|
-
oauthScope: "mcp:read",
|
|
1941
|
-
readOnly: true
|
|
1942
|
-
}
|
|
1943
|
-
};
|
|
1944
|
-
var MCP_TOOL_NAMES = Object.keys(MCP_TOOL_CONTRACT);
|
|
1945
1717
|
|
|
1946
1718
|
// src/commands/feature.ts
|
|
1947
1719
|
function getApiUrl2() {
|