@hyperline/cli 0.1.0-build.1.470e24b → 0.1.0-build.1.47634ec
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/bin/hyperline-main.js +53 -12
- package/package.json +1 -1
|
@@ -37934,7 +37934,7 @@ Examples:
|
|
|
37934
37934
|
queryParamKeys: ["take", "skip"]
|
|
37935
37935
|
});
|
|
37936
37936
|
});
|
|
37937
|
-
resource.command("get").description(`Retrieve a specific bank account by its ID. Returns bank account details
|
|
37937
|
+
resource.command("get").description(`Retrieve a specific bank account by its ID. Returns masked bank account details, account type, balance, and currency.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
37938
37938
|
Examples:
|
|
37939
37939
|
hyperline bank-accounts get --id <id>`).action(async (opts) => {
|
|
37940
37940
|
const ctx = resource.parent?.opts()._ctx;
|
|
@@ -37952,6 +37952,31 @@ Examples:
|
|
|
37952
37952
|
queryParamKeys: []
|
|
37953
37953
|
});
|
|
37954
37954
|
});
|
|
37955
|
+
resource.command("list-bank-account-transactions").description(`List open banking transactions for a specific bank account. Paginated with limit/cursor.`).requiredOption("--id <value>", `id parameter`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).addHelpText("after", `
|
|
37956
|
+
Examples:
|
|
37957
|
+
hyperline bank-accounts list-bank-account-transactions --id <id>
|
|
37958
|
+
hyperline bank-accounts list-bank-account-transactions --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
|
|
37959
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
37960
|
+
if (!ctx) {
|
|
37961
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
37962
|
+
process.exit(1);
|
|
37963
|
+
}
|
|
37964
|
+
const args = {};
|
|
37965
|
+
if (opts.id !== void 0)
|
|
37966
|
+
args.id = opts.id;
|
|
37967
|
+
if (opts.cursor !== void 0)
|
|
37968
|
+
args.cursor = opts.cursor;
|
|
37969
|
+
if (opts.includeTotal !== void 0)
|
|
37970
|
+
args.include_total = opts.includeTotal;
|
|
37971
|
+
if (opts.limit !== void 0)
|
|
37972
|
+
args.limit = Number(opts.limit);
|
|
37973
|
+
await ctx.execute({
|
|
37974
|
+
method: "GET",
|
|
37975
|
+
path: "/v1/bank-accounts/{id}/transactions",
|
|
37976
|
+
args,
|
|
37977
|
+
queryParamKeys: ["limit", "cursor", "include_total"]
|
|
37978
|
+
});
|
|
37979
|
+
});
|
|
37955
37980
|
}
|
|
37956
37981
|
|
|
37957
37982
|
// build/commands/generated/companies.js
|
|
@@ -39620,6 +39645,7 @@ Export name.
|
|
|
39620
39645
|
- \`draft_invoices\`: Export all draft invoices, with customer and product information.
|
|
39621
39646
|
- \`open_invoices\`: Export all open invoices, with customer and product information.
|
|
39622
39647
|
- \`live_subscriptions\`: List of all active subscriptions line by line.
|
|
39648
|
+
- \`credit_balances\`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).
|
|
39623
39649
|
`).requiredOption("--file-type <value>", `
|
|
39624
39650
|
Export file type.
|
|
39625
39651
|
|
|
@@ -40197,7 +40223,7 @@ Examples:
|
|
|
40197
40223
|
- \`archived\`: A previous version of an invoice.
|
|
40198
40224
|
- \`charged_on_parent\`: Invoice is charged on the parent customer.
|
|
40199
40225
|
- \`pending_parent_concat\`: Invoice is pending invoices concatenation on the parent customer to be grouped.
|
|
40200
|
-
- \`uncollectible\`: Invoice is uncollectible (bad debt).
|
|
40226
|
+
- \`uncollectible\`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.
|
|
40201
40227
|
`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the invoice.`).option("--number <value>", `Invoice number. If specified, the invoice will be considered as imported from an external source and the number will not be generated by Hyperline. You are responsible for avoiding duplicates and ensuring it does not impact the numbering sequence in Hyperline.`).option("--type <value>", `Type of the invoice.
|
|
40202
40228
|
|
|
40203
40229
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
@@ -40439,7 +40465,7 @@ Examples:
|
|
|
40439
40465
|
queryParamKeys: []
|
|
40440
40466
|
});
|
|
40441
40467
|
});
|
|
40442
|
-
resource.command("update").description(`Update
|
|
40468
|
+
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; uncollectible: properties/custom_note/custom_properties).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
|
|
40443
40469
|
|
|
40444
40470
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
40445
40471
|
- \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
|
|
@@ -41412,7 +41438,7 @@ Examples:
|
|
|
41412
41438
|
// build/commands/generated/quotes.js
|
|
41413
41439
|
function registerQuotesCommands(parent) {
|
|
41414
41440
|
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>", `
|
|
41441
|
+
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
41442
|
Quote status.
|
|
41417
41443
|
|
|
41418
41444
|
- \`draft\`: The quote is a draft.
|
|
@@ -41708,7 +41734,7 @@ Examples:
|
|
|
41708
41734
|
queryParamKeys: []
|
|
41709
41735
|
});
|
|
41710
41736
|
});
|
|
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.
|
|
41737
|
+
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
41738
|
|
|
41713
41739
|
- \`all\`: Display all pricing tiers.
|
|
41714
41740
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
@@ -42064,7 +42090,7 @@ Examples:
|
|
|
42064
42090
|
// build/commands/generated/subscriptions.js
|
|
42065
42091
|
function registerSubscriptionsCommands(parent) {
|
|
42066
42092
|
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", `
|
|
42093
|
+
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
42094
|
Examples:
|
|
42069
42095
|
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
|
|
42070
42096
|
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 +42113,8 @@ Examples:
|
|
|
42087
42113
|
args.charge_at = opts.chargeAt;
|
|
42088
42114
|
if (opts.calculationMethod !== void 0)
|
|
42089
42115
|
args.calculation_method = opts.calculationMethod;
|
|
42116
|
+
if (opts.precision !== void 0)
|
|
42117
|
+
args.precision = opts.precision;
|
|
42090
42118
|
if (opts.refundMethod !== void 0)
|
|
42091
42119
|
args.refund_method = opts.refundMethod;
|
|
42092
42120
|
if (opts.type !== void 0)
|
|
@@ -42100,7 +42128,7 @@ Examples:
|
|
|
42100
42128
|
queryParamKeys: []
|
|
42101
42129
|
});
|
|
42102
42130
|
});
|
|
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", `
|
|
42131
|
+
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
42132
|
Examples:
|
|
42105
42133
|
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
42106
42134
|
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 +42151,8 @@ Examples:
|
|
|
42123
42151
|
args.charge_at = opts.chargeAt;
|
|
42124
42152
|
if (opts.calculationMethod !== void 0)
|
|
42125
42153
|
args.calculation_method = opts.calculationMethod;
|
|
42154
|
+
if (opts.precision !== void 0)
|
|
42155
|
+
args.precision = opts.precision;
|
|
42126
42156
|
if (opts.refundMethod !== void 0)
|
|
42127
42157
|
args.refund_method = opts.refundMethod;
|
|
42128
42158
|
if (opts.updates !== void 0)
|
|
@@ -42262,7 +42292,7 @@ Examples:
|
|
|
42262
42292
|
queryParamKeys: []
|
|
42263
42293
|
});
|
|
42264
42294
|
});
|
|
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", `
|
|
42295
|
+
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
42296
|
Examples:
|
|
42267
42297
|
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
42268
42298
|
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 +42315,8 @@ Examples:
|
|
|
42285
42315
|
args.charge_at = opts.chargeAt;
|
|
42286
42316
|
if (opts.calculationMethod !== void 0)
|
|
42287
42317
|
args.calculation_method = opts.calculationMethod;
|
|
42318
|
+
if (opts.precision !== void 0)
|
|
42319
|
+
args.precision = opts.precision;
|
|
42288
42320
|
if (opts.refundMethod !== void 0)
|
|
42289
42321
|
args.refund_method = opts.refundMethod;
|
|
42290
42322
|
if (opts.updates !== void 0)
|
|
@@ -61924,13 +61956,16 @@ function logHttpRequest(logger2, request, extra) {
|
|
|
61924
61956
|
});
|
|
61925
61957
|
}
|
|
61926
61958
|
function logHttpResponse(logger2, response, responseTime, extra) {
|
|
61927
|
-
const { request, statusCode, responseBody } = response;
|
|
61959
|
+
const { request, statusCode, responseBody, responseHeaders } = response;
|
|
61928
61960
|
const { message, metadata } = transform2(request);
|
|
61929
61961
|
const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
|
|
61930
61962
|
const responseMetadata = {
|
|
61931
61963
|
statusCode,
|
|
61932
61964
|
responseTime,
|
|
61933
|
-
responseBody
|
|
61965
|
+
responseBody,
|
|
61966
|
+
// Redacted so secrets (authorization/cookie/token/…) never reach the logs
|
|
61967
|
+
// while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
|
|
61968
|
+
responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
|
|
61934
61969
|
};
|
|
61935
61970
|
logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
|
|
61936
61971
|
...metadata,
|
|
@@ -62715,10 +62750,16 @@ function buildHttpClient(dependencies) {
|
|
|
62715
62750
|
return response;
|
|
62716
62751
|
}, (error48) => {
|
|
62717
62752
|
if (error48.response) {
|
|
62718
|
-
const { config: responseConfig, status } = error48.response;
|
|
62753
|
+
const { config: responseConfig, status, headers } = error48.response;
|
|
62719
62754
|
const timeStart = responseConfig.metadata.timeStart;
|
|
62720
62755
|
const responseTime = timeStart ? Date.now() - timeStart : void 0;
|
|
62721
|
-
logHttpResponse(logger2, {
|
|
62756
|
+
logHttpResponse(logger2, {
|
|
62757
|
+
request: toLogRequest(responseConfig),
|
|
62758
|
+
statusCode: status,
|
|
62759
|
+
// Surfaces upstream response headers on error responses (e.g. the
|
|
62760
|
+
// rate-limit headers on a 429); redacted in logHttpResponse.
|
|
62761
|
+
responseHeaders: headers
|
|
62762
|
+
}, responseTime, { metadata: { error: error48.message } });
|
|
62722
62763
|
}
|
|
62723
62764
|
return Promise.reject(error48);
|
|
62724
62765
|
});
|