@stripe/link-cli 0.7.3 → 0.7.4

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.
Files changed (2) hide show
  1. package/dist/cli.js +15 -4
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -11424,11 +11424,13 @@ var SpendRequestResource = class {
11424
11424
  return this.createSpendRequest(params);
11425
11425
  }
11426
11426
  async createSpendRequest(params) {
11427
+ const { approve, ...body } = params;
11428
+ const url = approve ? `${this.spendRequestsEndpoint}/create_delegated` : this.spendRequestsEndpoint;
11427
11429
  const { status, data, rawBody } = await this.apiFetch({
11428
11430
  method: "POST",
11429
- url: this.spendRequestsEndpoint,
11431
+ url,
11430
11432
  headers: { "Content-Type": "application/json" },
11431
- body: JSON.stringify(params)
11433
+ body: JSON.stringify(body)
11432
11434
  });
11433
11435
  if (status < 200 || status >= 300) {
11434
11436
  throw new LinkApiError(
@@ -15304,6 +15306,13 @@ var RetrieveSpendRequest = ({
15304
15306
  " ",
15305
15307
  /* @__PURE__ */ jsx26(Text20, { bold: true, children: request?.line_items.map((li) => li.name).join(", ") })
15306
15308
  ] }),
15309
+ request?.link_pay_token && /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", marginTop: 1, children: [
15310
+ /* @__PURE__ */ jsx26(Text20, { bold: true, children: "Link Pay Token:" }),
15311
+ /* @__PURE__ */ jsxs19(Text20, { children: [
15312
+ " ",
15313
+ /* @__PURE__ */ jsx26(Text20, { bold: true, children: request.link_pay_token })
15314
+ ] })
15315
+ ] }),
15307
15316
  request?.payment_status_details && /* @__PURE__ */ jsxs19(Box19, { flexDirection: "column", marginTop: 1, children: [
15308
15317
  /* @__PURE__ */ jsx26(Text20, { bold: true, children: "Last Payment Attempt:" }),
15309
15318
  /* @__PURE__ */ jsxs19(Text20, { children: [
@@ -15450,6 +15459,7 @@ var createOptions = z7.object({
15450
15459
  test: z7.boolean().default(false).describe(
15451
15460
  "Use test mode (creates testmode credentials from test card data)"
15452
15461
  ),
15462
+ approve: z7.boolean().default(false).describe(""),
15453
15463
  outputFile: z7.string().optional().describe(
15454
15464
  "Write full card credentials to this file path; stdout shows redacted card data only"
15455
15465
  ),
@@ -15647,7 +15657,8 @@ function createSpendRequestCli(repository, authStorage2, envAccessToken2) {
15647
15657
  line_items: lineItems,
15648
15658
  totals,
15649
15659
  request_approval: requestApproval || void 0,
15650
- test: opts.test ? true : void 0
15660
+ test: opts.test ? true : void 0,
15661
+ approve: opts.approve ? true : void 0
15651
15662
  };
15652
15663
  const outputFile = opts.outputFile;
15653
15664
  const forceOverwrite = opts.force;
@@ -16463,7 +16474,7 @@ function cacheUpdateInfo(value, ttlMs = UPDATE_CACHE_TTL_MS) {
16463
16474
  }
16464
16475
 
16465
16476
  // src/cli.tsx
16466
- var cliVersion = "0.7.3";
16477
+ var cliVersion = "0.7.4";
16467
16478
  var cliName = "@stripe/link-cli";
16468
16479
  var defaultHeaders = {
16469
16480
  "User-Agent": `link-cli/${cliVersion}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stripe/link-cli",
3
- "version": "0.7.3",
3
+ "version": "0.7.4",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "link-cli": "./dist/cli.js"