@hyperline/cli 0.1.0-build.1.f23ef47 → 0.1.0-build.1.f67c5aa

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.
@@ -41412,7 +41412,7 @@ Examples:
41412
41412
  // build/commands/generated/quotes.js
41413
41413
  function registerQuotesCommands(parent) {
41414
41414
  const resource = parent.command("quotes").description("Manage quotes");
41415
- resource.command("create").description(`Create a new quote for a customer. Use \`subscription\` (or \`template_id\`) for subscription quotes; use \`invoice\` for one-off quotes backed by a draft invoice with line items. Quotes can be sent for signature and converted to subscriptions or one-off invoices.`).option("--status <value>", `
41415
+ resource.command("create").description(`Create a new quote for a customer. Use \`subscription\` (or \`template_id\`) for subscription quotes; use \`invoice\` for one-off quotes backed by a draft invoice with line items. Quotes can be sent for signature and converted to subscriptions or one-off invoices. When creating from a quote template, do not combine \`template_id\` with subscription overrides for dates, contract terms, products, phases, coupons, discounts, prices, or seats in this call: first create the quote from \`template_id\` so template terms and contract documents are copied, then call \`update_quote\` with the subscription payload.`).option("--status <value>", `
41416
41416
  Quote status.
41417
41417
 
41418
41418
  - \`draft\`: The quote is a draft.
@@ -41708,7 +41708,7 @@ Examples:
41708
41708
  queryParamKeys: []
41709
41709
  });
41710
41710
  });
41711
- resource.command("update").description(`Update quote-level fields before a quote is finalized. On draft quotes, pass \`subscription\` to create or replace the draft subscription configuration, or pass \`invoice\` on a one-off quote to replace the linked draft invoice.`).requiredOption("--id <value>", `id parameter`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. Set to \`null\` to clear the manually set value.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41711
+ resource.command("update").description(`Update quote-level fields before a quote is finalized. On draft quotes, pass \`subscription\` to create or replace the draft subscription configuration, or pass \`invoice\` on a one-off quote to replace the linked draft invoice. For quotes created from \`template_id\`, use this tool for subscription overrides such as dates, contract terms, products, phases, coupons, discounts, prices, seats, and subscription custom properties. Omit \`terms\`, \`comments\`, and \`contract_clause_ids\` unless deliberately overriding template content.`).requiredOption("--id <value>", `id parameter`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. Set to \`null\` to clear the manually set value.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41712
41712
 
41713
41713
  - \`all\`: Display all pricing tiers.
41714
41714
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
@@ -42064,7 +42064,7 @@ Examples:
42064
42064
  // build/commands/generated/subscriptions.js
42065
42065
  function registerSubscriptionsCommands(parent) {
42066
42066
  const resource = parent.command("subscriptions").description("Manage subscriptions");
42067
- resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
42067
+ resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
42068
42068
  Examples:
42069
42069
  hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
42070
42070
  hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at> --charge-at <charge_at>
@@ -42087,6 +42087,8 @@ Examples:
42087
42087
  args.charge_at = opts.chargeAt;
42088
42088
  if (opts.calculationMethod !== void 0)
42089
42089
  args.calculation_method = opts.calculationMethod;
42090
+ if (opts.precision !== void 0)
42091
+ args.precision = opts.precision;
42090
42092
  if (opts.refundMethod !== void 0)
42091
42093
  args.refund_method = opts.refundMethod;
42092
42094
  if (opts.type !== void 0)
@@ -42100,7 +42102,7 @@ Examples:
42100
42102
  queryParamKeys: []
42101
42103
  });
42102
42104
  });
42103
- resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42105
+ resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42104
42106
  Examples:
42105
42107
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
42106
42108
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -42123,6 +42125,8 @@ Examples:
42123
42125
  args.charge_at = opts.chargeAt;
42124
42126
  if (opts.calculationMethod !== void 0)
42125
42127
  args.calculation_method = opts.calculationMethod;
42128
+ if (opts.precision !== void 0)
42129
+ args.precision = opts.precision;
42126
42130
  if (opts.refundMethod !== void 0)
42127
42131
  args.refund_method = opts.refundMethod;
42128
42132
  if (opts.updates !== void 0)
@@ -42262,7 +42266,7 @@ Examples:
42262
42266
  queryParamKeys: []
42263
42267
  });
42264
42268
  });
42265
- resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42269
+ resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42266
42270
  Examples:
42267
42271
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
42268
42272
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -42285,6 +42289,8 @@ Examples:
42285
42289
  args.charge_at = opts.chargeAt;
42286
42290
  if (opts.calculationMethod !== void 0)
42287
42291
  args.calculation_method = opts.calculationMethod;
42292
+ if (opts.precision !== void 0)
42293
+ args.precision = opts.precision;
42288
42294
  if (opts.refundMethod !== void 0)
42289
42295
  args.refund_method = opts.refundMethod;
42290
42296
  if (opts.updates !== void 0)
@@ -61924,13 +61930,16 @@ function logHttpRequest(logger2, request, extra) {
61924
61930
  });
61925
61931
  }
61926
61932
  function logHttpResponse(logger2, response, responseTime, extra) {
61927
- const { request, statusCode, responseBody } = response;
61933
+ const { request, statusCode, responseBody, responseHeaders } = response;
61928
61934
  const { message, metadata } = transform2(request);
61929
61935
  const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
61930
61936
  const responseMetadata = {
61931
61937
  statusCode,
61932
61938
  responseTime,
61933
- responseBody
61939
+ responseBody,
61940
+ // Redacted so secrets (authorization/cookie/token/…) never reach the logs
61941
+ // while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
61942
+ responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
61934
61943
  };
61935
61944
  logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
61936
61945
  ...metadata,
@@ -62715,10 +62724,16 @@ function buildHttpClient(dependencies) {
62715
62724
  return response;
62716
62725
  }, (error48) => {
62717
62726
  if (error48.response) {
62718
- const { config: responseConfig, status } = error48.response;
62727
+ const { config: responseConfig, status, headers } = error48.response;
62719
62728
  const timeStart = responseConfig.metadata.timeStart;
62720
62729
  const responseTime = timeStart ? Date.now() - timeStart : void 0;
62721
- logHttpResponse(logger2, { request: toLogRequest(responseConfig), statusCode: status }, responseTime, { metadata: { error: error48.message } });
62730
+ logHttpResponse(logger2, {
62731
+ request: toLogRequest(responseConfig),
62732
+ statusCode: status,
62733
+ // Surfaces upstream response headers on error responses (e.g. the
62734
+ // rate-limit headers on a 429); redacted in logHttpResponse.
62735
+ responseHeaders: headers
62736
+ }, responseTime, { metadata: { error: error48.message } });
62722
62737
  }
62723
62738
  return Promise.reject(error48);
62724
62739
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.f23ef47",
3
+ "version": "0.1.0-build.1.f67c5aa",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",