@stripe/link-cli 0.17.0 → 0.17.2
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/README.md +27 -1
- package/dist/cli.js +100 -11
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -111,6 +111,32 @@ link-cli auth login
|
|
|
111
111
|
|
|
112
112
|
You receive a verification URL and a short phrase. Visit the URL, log in to your Link account, and enter the phrase to approve the connection.
|
|
113
113
|
|
|
114
|
+
### Retrieve user info
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
link-cli user-info retrieve --format json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
In addition to identity fields, the response can include Agent Wallet spend limits and a verification requirement:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"email": "jane@example.com",
|
|
125
|
+
"name": "Jane Doe",
|
|
126
|
+
"agent_wallet_spend_limits": {
|
|
127
|
+
"per_transaction": { "limit": 50000 },
|
|
128
|
+
"daily": { "limit": 500000, "used": 120000, "remaining": 380000 },
|
|
129
|
+
"thirty_day": { "limit": null, "used": 600000, "remaining": null }
|
|
130
|
+
},
|
|
131
|
+
"agent_wallet_verification_requirement": {
|
|
132
|
+
"status": "identity_verification",
|
|
133
|
+
"action_url": "https://app.link.com/finish_setup?verify=identity_verification&intended_email=jane%40example.com&fromEmail=jane%40example.com"
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Finite spend-limit values are cents because this response does not include a currency. A `null` limit or remaining amount means unlimited. The verification requirement's `action_url` is null when no action is available. Either Agent Wallet object can be absent when backend enrichment is unavailable; absence does not imply a limit or verification status.
|
|
139
|
+
|
|
114
140
|
### List payment methods
|
|
115
141
|
|
|
116
142
|
```bash
|
|
@@ -496,4 +522,4 @@ pnpm turbo run build
|
|
|
496
522
|
pnpm --filter @stripe/link-cli --filter @stripe/link-sdk publish --dry-run --no-git-checks
|
|
497
523
|
```
|
|
498
524
|
|
|
499
|
-
CI runs the same publish dry-run for every pull request.
|
|
525
|
+
CI runs the same publish dry-run for every pull request.
|
package/dist/cli.js
CHANGED
|
@@ -934,19 +934,55 @@ var TransactionsResource = class extends BaseResource {
|
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
936
|
};
|
|
937
|
+
var rollingSpendLimitSchema = z8.object({
|
|
938
|
+
limit: z8.number().int().nullable(),
|
|
939
|
+
used: z8.number().int(),
|
|
940
|
+
remaining: z8.number().int().nullable()
|
|
941
|
+
});
|
|
942
|
+
var agentWalletSpendLimitsSchema = z8.object({
|
|
943
|
+
per_transaction: z8.object({
|
|
944
|
+
limit: z8.number().int().nullable()
|
|
945
|
+
}),
|
|
946
|
+
daily: rollingSpendLimitSchema,
|
|
947
|
+
thirty_day: rollingSpendLimitSchema
|
|
948
|
+
});
|
|
949
|
+
var agentWalletVerificationRequirementSchema = z8.object({
|
|
950
|
+
status: z8.enum([
|
|
951
|
+
"not_required",
|
|
952
|
+
"ssn_verification",
|
|
953
|
+
"identity_verification",
|
|
954
|
+
"contact_support",
|
|
955
|
+
"complete"
|
|
956
|
+
]),
|
|
957
|
+
action_url: z8.string().nullable()
|
|
958
|
+
});
|
|
937
959
|
var userInfoSchema = z8.looseObject({
|
|
938
960
|
email: z8.string().nullable().optional(),
|
|
939
961
|
name: z8.string().nullable().optional(),
|
|
940
962
|
first_name: z8.string().nullable().optional(),
|
|
941
963
|
last_name: z8.string().nullable().optional(),
|
|
942
|
-
phone: z8.string().nullable().optional()
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
964
|
+
phone: z8.string().nullable().optional(),
|
|
965
|
+
agent_wallet_spend_limits: agentWalletSpendLimitsSchema.optional(),
|
|
966
|
+
agent_wallet_step_up: agentWalletVerificationRequirementSchema.optional()
|
|
967
|
+
}).transform(
|
|
968
|
+
({
|
|
969
|
+
email,
|
|
970
|
+
name,
|
|
971
|
+
first_name,
|
|
972
|
+
last_name,
|
|
973
|
+
phone,
|
|
974
|
+
agent_wallet_spend_limits,
|
|
975
|
+
agent_wallet_step_up
|
|
976
|
+
}) => ({
|
|
977
|
+
email: email ?? null,
|
|
978
|
+
name: name ?? null,
|
|
979
|
+
first_name: first_name ?? null,
|
|
980
|
+
last_name: last_name ?? null,
|
|
981
|
+
phone: phone ?? null,
|
|
982
|
+
...agent_wallet_spend_limits === void 0 ? {} : { agent_wallet_spend_limits },
|
|
983
|
+
...agent_wallet_step_up === void 0 ? {} : { agent_wallet_verification_requirement: agent_wallet_step_up }
|
|
984
|
+
})
|
|
985
|
+
);
|
|
950
986
|
var UserInfoResource = class extends BaseResource {
|
|
951
987
|
constructor(options) {
|
|
952
988
|
super(options, "/userinfo");
|
|
@@ -2803,7 +2839,7 @@ function buildHeaders(data, headers) {
|
|
|
2803
2839
|
if (key) result[key] = value;
|
|
2804
2840
|
}
|
|
2805
2841
|
if (!Object.keys(result).some((key) => key.toLowerCase() === "user-agent")) {
|
|
2806
|
-
result["User-Agent"] = `link-cli/${"0.17.
|
|
2842
|
+
result["User-Agent"] = `link-cli/${"0.17.2"}`;
|
|
2807
2843
|
}
|
|
2808
2844
|
return result;
|
|
2809
2845
|
}
|
|
@@ -7016,6 +7052,9 @@ import { Box as Box24, Text as Text26 } from "ink";
|
|
|
7016
7052
|
import Spinner16 from "ink-spinner";
|
|
7017
7053
|
import { useCallback as useCallback13 } from "react";
|
|
7018
7054
|
import { jsx as jsx35, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
7055
|
+
function formatLimit(value) {
|
|
7056
|
+
return value === null ? "Unlimited" : `${value} cents`;
|
|
7057
|
+
}
|
|
7019
7058
|
var UserInfoRetrieve = ({
|
|
7020
7059
|
resource,
|
|
7021
7060
|
onComplete
|
|
@@ -7048,6 +7087,56 @@ var UserInfoRetrieve = ({
|
|
|
7048
7087
|
/* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7049
7088
|
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Phone: " }),
|
|
7050
7089
|
userInfo?.phone ?? /* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Not set" })
|
|
7090
|
+
] }),
|
|
7091
|
+
userInfo?.agent_wallet_spend_limits && /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", marginTop: 1, children: [
|
|
7092
|
+
/* @__PURE__ */ jsx35(Text26, { bold: true, children: "Agent Wallet Spend Limits" }),
|
|
7093
|
+
/* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", paddingLeft: 2, children: [
|
|
7094
|
+
/* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7095
|
+
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Per-transaction: " }),
|
|
7096
|
+
formatLimit(
|
|
7097
|
+
userInfo.agent_wallet_spend_limits.per_transaction.limit
|
|
7098
|
+
)
|
|
7099
|
+
] }),
|
|
7100
|
+
/* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7101
|
+
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Daily: " }),
|
|
7102
|
+
"limit",
|
|
7103
|
+
" ",
|
|
7104
|
+
formatLimit(userInfo.agent_wallet_spend_limits.daily.limit),
|
|
7105
|
+
", used ",
|
|
7106
|
+
userInfo.agent_wallet_spend_limits.daily.used,
|
|
7107
|
+
" cents, remaining",
|
|
7108
|
+
" ",
|
|
7109
|
+
formatLimit(
|
|
7110
|
+
userInfo.agent_wallet_spend_limits.daily.remaining
|
|
7111
|
+
)
|
|
7112
|
+
] }),
|
|
7113
|
+
/* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7114
|
+
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "30-day: " }),
|
|
7115
|
+
"limit",
|
|
7116
|
+
" ",
|
|
7117
|
+
formatLimit(
|
|
7118
|
+
userInfo.agent_wallet_spend_limits.thirty_day.limit
|
|
7119
|
+
),
|
|
7120
|
+
", used ",
|
|
7121
|
+
userInfo.agent_wallet_spend_limits.thirty_day.used,
|
|
7122
|
+
" ",
|
|
7123
|
+
"cents, remaining",
|
|
7124
|
+
" ",
|
|
7125
|
+
formatLimit(
|
|
7126
|
+
userInfo.agent_wallet_spend_limits.thirty_day.remaining
|
|
7127
|
+
)
|
|
7128
|
+
] })
|
|
7129
|
+
] })
|
|
7130
|
+
] }),
|
|
7131
|
+
userInfo?.agent_wallet_verification_requirement && /* @__PURE__ */ jsxs24(Box24, { flexDirection: "column", marginTop: 1, children: [
|
|
7132
|
+
/* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7133
|
+
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Agent Wallet verification requirement: " }),
|
|
7134
|
+
userInfo.agent_wallet_verification_requirement.status
|
|
7135
|
+
] }),
|
|
7136
|
+
userInfo.agent_wallet_verification_requirement.action_url && /* @__PURE__ */ jsxs24(Text26, { children: [
|
|
7137
|
+
/* @__PURE__ */ jsx35(Text26, { dimColor: true, children: "Action URL: " }),
|
|
7138
|
+
userInfo.agent_wallet_verification_requirement.action_url
|
|
7139
|
+
] })
|
|
7051
7140
|
] })
|
|
7052
7141
|
] })
|
|
7053
7142
|
] });
|
|
@@ -7060,7 +7149,7 @@ function createUserInfoCli(createResource, authStorage2, envAccessToken2) {
|
|
|
7060
7149
|
description: "User information commands"
|
|
7061
7150
|
});
|
|
7062
7151
|
cli2.command("retrieve", {
|
|
7063
|
-
description: "Retrieve user info
|
|
7152
|
+
description: "Retrieve user info, including optional Agent Wallet spend limits and verification requirements",
|
|
7064
7153
|
outputPolicy: "agent-only",
|
|
7065
7154
|
middleware: [requireAuth(authStorage2, envAccessToken2)],
|
|
7066
7155
|
async run(c) {
|
|
@@ -7677,7 +7766,7 @@ function cacheUpdateInfo(value, ttlMs = UPDATE_CACHE_TTL_MS) {
|
|
|
7677
7766
|
}
|
|
7678
7767
|
|
|
7679
7768
|
// src/cli.tsx
|
|
7680
|
-
var cliVersion = "0.17.
|
|
7769
|
+
var cliVersion = "0.17.2";
|
|
7681
7770
|
var cliName = "@stripe/link-cli";
|
|
7682
7771
|
var defaultHeaders = {
|
|
7683
7772
|
"User-Agent": `link-cli/${cliVersion}`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stripe/link-cli",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"link-cli": "./dist/cli.js"
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"tsx": "^4.23.5",
|
|
46
46
|
"typescript": "^5.9.3",
|
|
47
47
|
"vitest": "^4.1.10",
|
|
48
|
-
"@stripe/link-sdk": "0.3.
|
|
48
|
+
"@stripe/link-sdk": "0.3.2",
|
|
49
49
|
"@stripe/link-typescript-config": "0.0.0"
|
|
50
50
|
},
|
|
51
51
|
"scripts": {
|