@carrierllc/mcp 0.13.27 → 0.13.29
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/{chunk-HLST3I4L.js → chunk-LJPYVILK.js} +2 -2
- package/dist/{chunk-HLST3I4L.js.map → chunk-LJPYVILK.js.map} +1 -1
- package/dist/cli.js +36 -1
- package/dist/cli.js.map +1 -1
- package/dist/index.js +70 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/storefront/package-lock.json +10 -6
package/dist/cli.js
CHANGED
|
@@ -40,7 +40,7 @@ import {
|
|
|
40
40
|
verifyStorefront,
|
|
41
41
|
walletScreen,
|
|
42
42
|
which
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-LJPYVILK.js";
|
|
44
44
|
import {
|
|
45
45
|
copyTree,
|
|
46
46
|
exists,
|
|
@@ -1106,6 +1106,13 @@ function bodyText(raw) {
|
|
|
1106
1106
|
return trimmed;
|
|
1107
1107
|
}
|
|
1108
1108
|
}
|
|
1109
|
+
function orgNotConnected(raw) {
|
|
1110
|
+
try {
|
|
1111
|
+
return JSON.parse(raw).error_code === "org_not_connected";
|
|
1112
|
+
} catch {
|
|
1113
|
+
return false;
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1109
1116
|
async function callRestEndpoint(method, path, args, opts = {}) {
|
|
1110
1117
|
const token = resolveApiKey() ?? await getAccessToken();
|
|
1111
1118
|
if (!token) {
|
|
@@ -1187,6 +1194,15 @@ async function callRestEndpoint(method, path, args, opts = {}) {
|
|
|
1187
1194
|
)
|
|
1188
1195
|
};
|
|
1189
1196
|
}
|
|
1197
|
+
if (res.status === 409 && orgNotConnected(raw)) {
|
|
1198
|
+
return {
|
|
1199
|
+
ok: false,
|
|
1200
|
+
text: withNextStep(redact(bodyText(raw).slice(0, 500)), [
|
|
1201
|
+
"Switch back: sign in again with `carrier login` and pick your connected organization",
|
|
1202
|
+
"Or use an org API key (ak_\u2026) from that organization: export CARRIER_API_KEY=\u2026"
|
|
1203
|
+
])
|
|
1204
|
+
};
|
|
1205
|
+
}
|
|
1190
1206
|
if (!res.ok) {
|
|
1191
1207
|
return {
|
|
1192
1208
|
ok: false,
|
|
@@ -3996,6 +4012,25 @@ var CLI_DOMAINS = [
|
|
|
3996
4012
|
}
|
|
3997
4013
|
]
|
|
3998
4014
|
},
|
|
4015
|
+
{
|
|
4016
|
+
name: "charges",
|
|
4017
|
+
tool: "stripe_connect_charges_list",
|
|
4018
|
+
summary: "List recent payments (charges) on the operator's connected Stripe account, e.g. storefront purchases.",
|
|
4019
|
+
options: [
|
|
4020
|
+
{
|
|
4021
|
+
flags: "--limit <n>",
|
|
4022
|
+
description: "Number of charges to return. Default 20.",
|
|
4023
|
+
arg: "limit",
|
|
4024
|
+
type: "number"
|
|
4025
|
+
},
|
|
4026
|
+
{
|
|
4027
|
+
flags: "--starting-after <after>",
|
|
4028
|
+
description: "Charge id to page after.",
|
|
4029
|
+
arg: "starting_after",
|
|
4030
|
+
type: "string"
|
|
4031
|
+
}
|
|
4032
|
+
]
|
|
4033
|
+
},
|
|
3999
4034
|
{
|
|
4000
4035
|
name: "disputes",
|
|
4001
4036
|
tool: "stripe_connect_dispute_list",
|