@hyperline/cli 0.1.0-build.1.31c302c → 0.1.0-build.1.321f2d8
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 +138 -6
- package/package.json +1 -1
|
@@ -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.
|
|
@@ -41939,6 +41939,128 @@ Examples:
|
|
|
41939
41939
|
});
|
|
41940
41940
|
}
|
|
41941
41941
|
|
|
41942
|
+
// build/commands/generated/quotes-templates.js
|
|
41943
|
+
function registerQuotes_TemplatesCommands(parent) {
|
|
41944
|
+
const resource = parent.command("quotes-templates").description("Manage quotes > templates");
|
|
41945
|
+
resource.command("list-quote-templates").description(`List quote templates with pagination and optional filters for id, name, subscription_template_id, and search. Use template IDs to create quotes from reusable quote defaults.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.is-null <value>", `id__isNull`).option("--id.is-not-null <value>", `id__isNotNull`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--subscription-template-id <value>", `subscription_template_id`).option("--subscription-template-id.not <value>", `subscription_template_id__not`).option("--subscription-template-id.is-null <value>", `subscription_template_id__isNull`).option("--subscription-template-id.is-not-null <value>", `subscription_template_id__isNotNull`).option("--subscription-template-id.equals <value>", `subscription_template_id__equals`).option("--subscription-template-id.contains <value>", `subscription_template_id__contains`).option("--subscription-template-id.starts-with <value>", `subscription_template_id__startsWith`).option("--subscription-template-id.end-with <value>", `subscription_template_id__endWith`).option("--search <value>", `search`).addHelpText("after", `
|
|
41946
|
+
Examples:
|
|
41947
|
+
hyperline quotes-templates list-quote-templates
|
|
41948
|
+
hyperline quotes-templates list-quote-templates --take <take> --id <id>`).action(async (opts) => {
|
|
41949
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41950
|
+
if (!ctx) {
|
|
41951
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41952
|
+
process.exit(1);
|
|
41953
|
+
}
|
|
41954
|
+
const args = {};
|
|
41955
|
+
if (opts.id !== void 0)
|
|
41956
|
+
args.id = opts.id;
|
|
41957
|
+
if (opts["id.not"] !== void 0)
|
|
41958
|
+
args.id__not = opts["id.not"];
|
|
41959
|
+
if (opts["id.isNull"] !== void 0)
|
|
41960
|
+
args.id__isNull = opts["id.isNull"];
|
|
41961
|
+
if (opts["id.isNotNull"] !== void 0)
|
|
41962
|
+
args.id__isNotNull = opts["id.isNotNull"];
|
|
41963
|
+
if (opts["id.equals"] !== void 0)
|
|
41964
|
+
args.id__equals = opts["id.equals"];
|
|
41965
|
+
if (opts["id.contains"] !== void 0)
|
|
41966
|
+
args.id__contains = opts["id.contains"];
|
|
41967
|
+
if (opts["id.startsWith"] !== void 0)
|
|
41968
|
+
args.id__startsWith = opts["id.startsWith"];
|
|
41969
|
+
if (opts["id.endWith"] !== void 0)
|
|
41970
|
+
args.id__endWith = opts["id.endWith"];
|
|
41971
|
+
if (opts.name !== void 0)
|
|
41972
|
+
args.name = opts.name;
|
|
41973
|
+
if (opts["name.not"] !== void 0)
|
|
41974
|
+
args.name__not = opts["name.not"];
|
|
41975
|
+
if (opts["name.isNull"] !== void 0)
|
|
41976
|
+
args.name__isNull = opts["name.isNull"];
|
|
41977
|
+
if (opts["name.isNotNull"] !== void 0)
|
|
41978
|
+
args.name__isNotNull = opts["name.isNotNull"];
|
|
41979
|
+
if (opts["name.equals"] !== void 0)
|
|
41980
|
+
args.name__equals = opts["name.equals"];
|
|
41981
|
+
if (opts["name.contains"] !== void 0)
|
|
41982
|
+
args.name__contains = opts["name.contains"];
|
|
41983
|
+
if (opts["name.startsWith"] !== void 0)
|
|
41984
|
+
args.name__startsWith = opts["name.startsWith"];
|
|
41985
|
+
if (opts["name.endWith"] !== void 0)
|
|
41986
|
+
args.name__endWith = opts["name.endWith"];
|
|
41987
|
+
if (opts.subscriptionTemplateId !== void 0)
|
|
41988
|
+
args.subscription_template_id = opts.subscriptionTemplateId;
|
|
41989
|
+
if (opts["subscriptionTemplateId.not"] !== void 0)
|
|
41990
|
+
args.subscription_template_id__not = opts["subscriptionTemplateId.not"];
|
|
41991
|
+
if (opts["subscriptionTemplateId.isNull"] !== void 0)
|
|
41992
|
+
args.subscription_template_id__isNull = opts["subscriptionTemplateId.isNull"];
|
|
41993
|
+
if (opts["subscriptionTemplateId.isNotNull"] !== void 0)
|
|
41994
|
+
args.subscription_template_id__isNotNull = opts["subscriptionTemplateId.isNotNull"];
|
|
41995
|
+
if (opts["subscriptionTemplateId.equals"] !== void 0)
|
|
41996
|
+
args.subscription_template_id__equals = opts["subscriptionTemplateId.equals"];
|
|
41997
|
+
if (opts["subscriptionTemplateId.contains"] !== void 0)
|
|
41998
|
+
args.subscription_template_id__contains = opts["subscriptionTemplateId.contains"];
|
|
41999
|
+
if (opts["subscriptionTemplateId.startsWith"] !== void 0)
|
|
42000
|
+
args.subscription_template_id__startsWith = opts["subscriptionTemplateId.startsWith"];
|
|
42001
|
+
if (opts["subscriptionTemplateId.endWith"] !== void 0)
|
|
42002
|
+
args.subscription_template_id__endWith = opts["subscriptionTemplateId.endWith"];
|
|
42003
|
+
if (opts.search !== void 0)
|
|
42004
|
+
args.search = opts.search;
|
|
42005
|
+
if (opts.take !== void 0)
|
|
42006
|
+
args.take = Number(opts.take);
|
|
42007
|
+
if (opts.skip !== void 0)
|
|
42008
|
+
args.skip = Number(opts.skip);
|
|
42009
|
+
await ctx.execute({
|
|
42010
|
+
method: "GET",
|
|
42011
|
+
path: "/v1/quotes/templates",
|
|
42012
|
+
args,
|
|
42013
|
+
queryParamKeys: [
|
|
42014
|
+
"take",
|
|
42015
|
+
"skip",
|
|
42016
|
+
"id",
|
|
42017
|
+
"id__not",
|
|
42018
|
+
"id__isNull",
|
|
42019
|
+
"id__isNotNull",
|
|
42020
|
+
"id__equals",
|
|
42021
|
+
"id__contains",
|
|
42022
|
+
"id__startsWith",
|
|
42023
|
+
"id__endWith",
|
|
42024
|
+
"name",
|
|
42025
|
+
"name__not",
|
|
42026
|
+
"name__isNull",
|
|
42027
|
+
"name__isNotNull",
|
|
42028
|
+
"name__equals",
|
|
42029
|
+
"name__contains",
|
|
42030
|
+
"name__startsWith",
|
|
42031
|
+
"name__endWith",
|
|
42032
|
+
"subscription_template_id",
|
|
42033
|
+
"subscription_template_id__not",
|
|
42034
|
+
"subscription_template_id__isNull",
|
|
42035
|
+
"subscription_template_id__isNotNull",
|
|
42036
|
+
"subscription_template_id__equals",
|
|
42037
|
+
"subscription_template_id__contains",
|
|
42038
|
+
"subscription_template_id__startsWith",
|
|
42039
|
+
"subscription_template_id__endWith",
|
|
42040
|
+
"search"
|
|
42041
|
+
]
|
|
42042
|
+
});
|
|
42043
|
+
});
|
|
42044
|
+
resource.command("get-quote-template").description(`Retrieve a quote template by ID with quote defaults, display options, attachments, and linked contract template/clause IDs.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
42045
|
+
Examples:
|
|
42046
|
+
hyperline quotes-templates get-quote-template --id <id>`).action(async (opts) => {
|
|
42047
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42048
|
+
if (!ctx) {
|
|
42049
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42050
|
+
process.exit(1);
|
|
42051
|
+
}
|
|
42052
|
+
const args = {};
|
|
42053
|
+
if (opts.id !== void 0)
|
|
42054
|
+
args.id = opts.id;
|
|
42055
|
+
await ctx.execute({
|
|
42056
|
+
method: "GET",
|
|
42057
|
+
path: "/v1/quotes/templates/{id}",
|
|
42058
|
+
args,
|
|
42059
|
+
queryParamKeys: []
|
|
42060
|
+
});
|
|
42061
|
+
});
|
|
42062
|
+
}
|
|
42063
|
+
|
|
41942
42064
|
// build/commands/generated/subscriptions.js
|
|
41943
42065
|
function registerSubscriptionsCommands(parent) {
|
|
41944
42066
|
const resource = parent.command("subscriptions").description("Manage subscriptions");
|
|
@@ -43540,6 +43662,7 @@ function registerAllCommands(program2) {
|
|
|
43540
43662
|
registerProductsCommands(program2);
|
|
43541
43663
|
registerPrice_ConfigurationsCommands(program2);
|
|
43542
43664
|
registerQuotesCommands(program2);
|
|
43665
|
+
registerQuotes_TemplatesCommands(program2);
|
|
43543
43666
|
registerSubscriptions_TemplatesCommands(program2);
|
|
43544
43667
|
registerSubscriptionsCommands(program2);
|
|
43545
43668
|
registerSubscriptions_TransitionsCommands(program2);
|
|
@@ -61801,13 +61924,16 @@ function logHttpRequest(logger2, request, extra) {
|
|
|
61801
61924
|
});
|
|
61802
61925
|
}
|
|
61803
61926
|
function logHttpResponse(logger2, response, responseTime, extra) {
|
|
61804
|
-
const { request, statusCode, responseBody } = response;
|
|
61927
|
+
const { request, statusCode, responseBody, responseHeaders } = response;
|
|
61805
61928
|
const { message, metadata } = transform2(request);
|
|
61806
61929
|
const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
|
|
61807
61930
|
const responseMetadata = {
|
|
61808
61931
|
statusCode,
|
|
61809
61932
|
responseTime,
|
|
61810
|
-
responseBody
|
|
61933
|
+
responseBody,
|
|
61934
|
+
// Redacted so secrets (authorization/cookie/token/…) never reach the logs
|
|
61935
|
+
// while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
|
|
61936
|
+
responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
|
|
61811
61937
|
};
|
|
61812
61938
|
logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
|
|
61813
61939
|
...metadata,
|
|
@@ -62592,10 +62718,16 @@ function buildHttpClient(dependencies) {
|
|
|
62592
62718
|
return response;
|
|
62593
62719
|
}, (error48) => {
|
|
62594
62720
|
if (error48.response) {
|
|
62595
|
-
const { config: responseConfig, status } = error48.response;
|
|
62721
|
+
const { config: responseConfig, status, headers } = error48.response;
|
|
62596
62722
|
const timeStart = responseConfig.metadata.timeStart;
|
|
62597
62723
|
const responseTime = timeStart ? Date.now() - timeStart : void 0;
|
|
62598
|
-
logHttpResponse(logger2, {
|
|
62724
|
+
logHttpResponse(logger2, {
|
|
62725
|
+
request: toLogRequest(responseConfig),
|
|
62726
|
+
statusCode: status,
|
|
62727
|
+
// Surfaces upstream response headers on error responses (e.g. the
|
|
62728
|
+
// rate-limit headers on a 429); redacted in logHttpResponse.
|
|
62729
|
+
responseHeaders: headers
|
|
62730
|
+
}, responseTime, { metadata: { error: error48.message } });
|
|
62599
62731
|
}
|
|
62600
62732
|
return Promise.reject(error48);
|
|
62601
62733
|
});
|