@hyperline/cli 0.1.0-build.1.91ef4cc → 0.1.0-build.1.935043e

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.
@@ -39755,10 +39755,9 @@ Examples:
39755
39755
  queryParamKeys: []
39756
39756
  });
39757
39757
  });
39758
- resource.command("download").description(`Download the file for a completed export. Supports CSV, JSON, and XLSX formats depending on the export type.`).requiredOption("--export-id <value>", `exportId parameter`).option("--as-redirect <value>", `as_redirect`).addHelpText("after", `
39758
+ resource.command("download").description(`Download the file for a completed export as a downloadable file. The HTTP client must follow redirects. Supports CSV, JSON, XLSX and ZIP formats depending on the export type.`).requiredOption("--export-id <value>", `exportId parameter`).addHelpText("after", `
39759
39759
  Examples:
39760
- hyperline exports download --export-id <exportId>
39761
- hyperline exports download --export-id <exportId> --as-redirect <as_redirect>`).action(async (opts) => {
39760
+ hyperline exports download --export-id <exportId>`).action(async (opts) => {
39762
39761
  const ctx = resource.parent?.opts()._ctx;
39763
39762
  if (!ctx) {
39764
39763
  process.stderr.write("Error: Not authenticated\n");
@@ -39767,13 +39766,11 @@ Examples:
39767
39766
  const args = {};
39768
39767
  if (opts.exportId !== void 0)
39769
39768
  args.exportId = opts.exportId;
39770
- if (opts.asRedirect !== void 0)
39771
- args.as_redirect = opts.asRedirect;
39772
39769
  await ctx.execute({
39773
39770
  method: "GET",
39774
- path: "/v1/exports/{exportId}/download",
39771
+ path: "/v2/exports/{exportId}/download",
39775
39772
  args,
39776
- queryParamKeys: ["as_redirect"]
39773
+ queryParamKeys: []
39777
39774
  });
39778
39775
  });
39779
39776
  }
@@ -40511,7 +40508,7 @@ Examples:
40511
40508
  queryParamKeys: []
40512
40509
  });
40513
40510
  });
40514
- resource.command("update").description(`Update an invoice. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices are restricted to metadata (paid: custom_note/purchase_order; uncollectible: properties/custom_note/custom_properties).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
40511
+ resource.command("update").description(`Update an invoice. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices are restricted to metadata (paid: custom_note/purchase_order/custom_properties/additional_display_fields/subscription_id; uncollectible: properties/custom_note/custom_properties/additional_display_fields/subscription_id).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
40515
40512
 
40516
40513
  - \`invoice\`: Legal invoice to be paid by your customer.
40517
40514
  - \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
@@ -40520,7 +40517,7 @@ Examples:
40520
40517
 
40521
40518
  - \`auto\`: Tax is automatically computed and applied.
40522
40519
  - \`not_eligible\`: Tax collection is disabled for the invoice.
40523
- `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <value>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40520
+ `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <value>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40524
40521
  Examples:
40525
40522
  hyperline invoices update --id <id>
40526
40523
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -40559,6 +40556,8 @@ Examples:
40559
40556
  args.payment_method_id = opts.paymentMethodId;
40560
40557
  if (opts.bankAccountId !== void 0)
40561
40558
  args.bank_account_id = opts.bankAccountId;
40559
+ if (opts.subscriptionId !== void 0)
40560
+ args.subscription_id = opts.subscriptionId;
40562
40561
  if (opts.properties !== void 0)
40563
40562
  args.properties = opts.properties;
40564
40563
  if (opts.customProperties !== void 0)
@@ -40619,7 +40618,7 @@ Examples:
40619
40618
  queryParamKeys: []
40620
40619
  });
40621
40620
  });
40622
- resource.command("download").description(`Download the PDF of an invoice. For draft/open invoices, generates the PDF on the fly. Supports lang/locale params for localization.`).requiredOption("--id <value>", `id parameter`).option("--lang <value>", `lang`).option("--locale <value>", `locale`).option("--as-redirect <value>", `as_redirect`).addHelpText("after", `
40621
+ resource.command("download").description(`Download the PDF of an invoice as a downloadable file. The HTTP client must follow redirects. Supports lang/locale params for localization.`).requiredOption("--id <value>", `id parameter`).option("--lang <value>", `lang`).option("--locale <value>", `locale`).addHelpText("after", `
40623
40622
  Examples:
40624
40623
  hyperline invoices download --id <id>
40625
40624
  hyperline invoices download --id <id> --lang <lang> --locale <locale>`).action(async (opts) => {
@@ -40635,13 +40634,11 @@ Examples:
40635
40634
  args.lang = opts.lang;
40636
40635
  if (opts.locale !== void 0)
40637
40636
  args.locale = opts.locale;
40638
- if (opts.asRedirect !== void 0)
40639
- args.as_redirect = opts.asRedirect;
40640
40637
  await ctx.execute({
40641
40638
  method: "GET",
40642
- path: "/v1/invoices/{id}/download",
40639
+ path: "/v2/invoices/{id}/download",
40643
40640
  args,
40644
- queryParamKeys: ["lang", "locale", "as_redirect"]
40641
+ queryParamKeys: ["lang", "locale"]
40645
40642
  });
40646
40643
  });
40647
40644
  }
@@ -43397,6 +43394,45 @@ Examples:
43397
43394
  // build/commands/generated/transactions.js
43398
43395
  function registerTransactionsCommands(parent) {
43399
43396
  const resource = parent.command("transactions").description("Manage transactions");
43397
+ resource.command("list").description(`List transactions across all invoices, including transactions without an invoice allocation. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
43398
+ Examples:
43399
+ hyperline transactions list
43400
+ hyperline transactions list --take <take>`).action(async (opts) => {
43401
+ const ctx = resource.parent?.opts()._ctx;
43402
+ if (!ctx) {
43403
+ process.stderr.write("Error: Not authenticated\n");
43404
+ process.exit(1);
43405
+ }
43406
+ const args = {};
43407
+ if (opts.take !== void 0)
43408
+ args.take = Number(opts.take);
43409
+ if (opts.skip !== void 0)
43410
+ args.skip = Number(opts.skip);
43411
+ await ctx.execute({
43412
+ method: "GET",
43413
+ path: "/v1/transactions",
43414
+ args,
43415
+ queryParamKeys: ["take", "skip"]
43416
+ });
43417
+ });
43418
+ resource.command("get").description(`Retrieve a transaction by ID, including its current invoice allocations.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
43419
+ Examples:
43420
+ hyperline transactions get --id <id>`).action(async (opts) => {
43421
+ const ctx = resource.parent?.opts()._ctx;
43422
+ if (!ctx) {
43423
+ process.stderr.write("Error: Not authenticated\n");
43424
+ process.exit(1);
43425
+ }
43426
+ const args = {};
43427
+ if (opts.id !== void 0)
43428
+ args.id = opts.id;
43429
+ await ctx.execute({
43430
+ method: "GET",
43431
+ path: "/v1/transactions/{id}",
43432
+ args,
43433
+ queryParamKeys: []
43434
+ });
43435
+ });
43400
43436
  resource.command("refund").description(`Refund a settled banking transaction for its full amount. The related invoice will switch back to to pay status. Use the create credit note endpoint if you want to cancel (and optionally refund) the initial invoice.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
43401
43437
  Examples:
43402
43438
  hyperline transactions refund --id <id>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.91ef4cc",
3
+ "version": "0.1.0-build.1.935043e",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",