@hyperline/cli 0.1.0-build.1.d585d4b → 0.1.0-build.1.d791b2b
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 +301 -20
- package/package.json +2 -2
|
@@ -34894,10 +34894,10 @@ var require_shared = __commonJS({
|
|
|
34894
34894
|
ZodId: () => ZodId,
|
|
34895
34895
|
ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
|
|
34896
34896
|
});
|
|
34897
|
-
var
|
|
34897
|
+
var import_zod20 = require_lib();
|
|
34898
34898
|
var countryIds2 = ["all", ...countries.map(({ id }) => id)];
|
|
34899
|
-
var ZodId =
|
|
34900
|
-
var ZodTranslationsSchemaFn = (schema) =>
|
|
34899
|
+
var ZodId = import_zod20.z.enum(countryIds2);
|
|
34900
|
+
var ZodTranslationsSchemaFn = (schema) => import_zod20.z.record(import_zod20.z.string(), schema.optional());
|
|
34901
34901
|
var UsStates = [
|
|
34902
34902
|
{ id: "AA", name: "Armed Forces Americas" },
|
|
34903
34903
|
{ id: "AE", name: "Armed Forces Europe" },
|
|
@@ -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
|
|
@@ -38756,7 +38781,7 @@ Customer type.
|
|
|
38756
38781
|
|
|
38757
38782
|
- \`taxable\`: Taxes are automatically determined for the customer.
|
|
38758
38783
|
- \`exempt\`: The customer is exempt from tax.
|
|
38759
|
-
`).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
38784
|
+
`).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
38760
38785
|
How customer invoices are issued from the parent organisation.
|
|
38761
38786
|
|
|
38762
38787
|
- \`none\`: Invoices will keep being issued from this customer.
|
|
@@ -38787,6 +38812,8 @@ Examples:
|
|
|
38787
38812
|
args.registration_number = opts.registrationNumber;
|
|
38788
38813
|
if (opts.externalId !== void 0)
|
|
38789
38814
|
args.external_id = opts.externalId;
|
|
38815
|
+
if (opts.domain !== void 0)
|
|
38816
|
+
args.domain = opts.domain;
|
|
38790
38817
|
if (opts.invoicingEntityId !== void 0)
|
|
38791
38818
|
args.invoicing_entity_id = opts.invoicingEntityId;
|
|
38792
38819
|
if (opts.billingAddress !== void 0)
|
|
@@ -38885,7 +38912,7 @@ Customer type.
|
|
|
38885
38912
|
|
|
38886
38913
|
- \`taxable\`: Taxes are automatically determined for the customer.
|
|
38887
38914
|
- \`exempt\`: The customer is exempt from tax.
|
|
38888
|
-
`).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
38915
|
+
`).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
38889
38916
|
How customer invoices are issued from the parent organisation.
|
|
38890
38917
|
|
|
38891
38918
|
- \`none\`: Invoices will keep being issued from this customer.
|
|
@@ -38918,6 +38945,8 @@ Examples:
|
|
|
38918
38945
|
args.registration_number = opts.registrationNumber;
|
|
38919
38946
|
if (opts.externalId !== void 0)
|
|
38920
38947
|
args.external_id = opts.externalId;
|
|
38948
|
+
if (opts.domain !== void 0)
|
|
38949
|
+
args.domain = opts.domain;
|
|
38921
38950
|
if (opts.invoicingEntityId !== void 0)
|
|
38922
38951
|
args.invoicing_entity_id = opts.invoicingEntityId;
|
|
38923
38952
|
if (opts.billingAddress !== void 0)
|
|
@@ -39087,6 +39116,38 @@ Examples:
|
|
|
39087
39116
|
queryParamKeys: []
|
|
39088
39117
|
});
|
|
39089
39118
|
});
|
|
39119
|
+
resource.command("get-customer-arr-history").description(`List every subscription-level ARR evolution for a customer, including previous and current fixed, variable, and total annual values in each subscription currency. Results are latest-first and 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("--occurred-at.gte <value>", `Return evolutions that occurred at or after this UTC date and time.`).option("--occurred-at.lte <value>", `Return evolutions that occurred at or before this UTC date and time.`).addHelpText("after", `
|
|
39120
|
+
Examples:
|
|
39121
|
+
hyperline customers get-customer-arr-history --id <id>
|
|
39122
|
+
hyperline customers get-customer-arr-history --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
|
|
39123
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39124
|
+
if (!ctx) {
|
|
39125
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39126
|
+
process.exit(1);
|
|
39127
|
+
}
|
|
39128
|
+
const args = {};
|
|
39129
|
+
if (opts.id !== void 0)
|
|
39130
|
+
args.id = opts.id;
|
|
39131
|
+
if (opts.cursor !== void 0)
|
|
39132
|
+
args.cursor = opts.cursor;
|
|
39133
|
+
if (opts["occurredAt.gte"] !== void 0)
|
|
39134
|
+
args.occurred_at__gte = opts["occurredAt.gte"];
|
|
39135
|
+
if (opts["occurredAt.lte"] !== void 0)
|
|
39136
|
+
args.occurred_at__lte = opts["occurredAt.lte"];
|
|
39137
|
+
if (opts.limit !== void 0)
|
|
39138
|
+
args.limit = Number(opts.limit);
|
|
39139
|
+
await ctx.execute({
|
|
39140
|
+
method: "GET",
|
|
39141
|
+
path: "/v1/customers/{id}/arr-history",
|
|
39142
|
+
args,
|
|
39143
|
+
queryParamKeys: [
|
|
39144
|
+
"limit",
|
|
39145
|
+
"cursor",
|
|
39146
|
+
"occurred_at__gte",
|
|
39147
|
+
"occurred_at__lte"
|
|
39148
|
+
]
|
|
39149
|
+
});
|
|
39150
|
+
});
|
|
39090
39151
|
resource.command("get-customer-valuation").description(`Compute aggregated valuation metrics for a customer across all active subscriptions, grouped by currency. Returns contract value, recurring contract value, and ARR for each subscription and aggregated totals. Optionally pass granularity (year/quarter/month) for period breakdown.`).requiredOption("--id <value>", `id parameter`).option("--granularity <value>", `Period granularity for the breakdown. When provided, contract value and recurring contract value include a \`by_period\` array.`).addHelpText("after", `
|
|
39091
39152
|
Examples:
|
|
39092
39153
|
hyperline customers get-customer-valuation --id <id>
|
|
@@ -39620,6 +39681,7 @@ Export name.
|
|
|
39620
39681
|
- \`draft_invoices\`: Export all draft invoices, with customer and product information.
|
|
39621
39682
|
- \`open_invoices\`: Export all open invoices, with customer and product information.
|
|
39622
39683
|
- \`live_subscriptions\`: List of all active subscriptions line by line.
|
|
39684
|
+
- \`credit_balances\`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).
|
|
39623
39685
|
`).requiredOption("--file-type <value>", `
|
|
39624
39686
|
Export file type.
|
|
39625
39687
|
|
|
@@ -40197,7 +40259,7 @@ Examples:
|
|
|
40197
40259
|
- \`archived\`: A previous version of an invoice.
|
|
40198
40260
|
- \`charged_on_parent\`: Invoice is charged on the parent customer.
|
|
40199
40261
|
- \`pending_parent_concat\`: Invoice is pending invoices concatenation on the parent customer to be grouped.
|
|
40200
|
-
- \`uncollectible\`: Invoice is uncollectible (bad debt).
|
|
40262
|
+
- \`uncollectible\`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.
|
|
40201
40263
|
`).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
40264
|
|
|
40203
40265
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
@@ -40439,7 +40501,7 @@ Examples:
|
|
|
40439
40501
|
queryParamKeys: []
|
|
40440
40502
|
});
|
|
40441
40503
|
});
|
|
40442
|
-
resource.command("update").description(`Update
|
|
40504
|
+
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.
|
|
40443
40505
|
|
|
40444
40506
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
40445
40507
|
- \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
|
|
@@ -41252,7 +41314,12 @@ Examples:
|
|
|
41252
41314
|
]
|
|
41253
41315
|
});
|
|
41254
41316
|
});
|
|
41255
|
-
resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--
|
|
41317
|
+
resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--credits-grant-mode <value>", `
|
|
41318
|
+
How the periodic credit allowance is granted for partial billing periods.
|
|
41319
|
+
|
|
41320
|
+
- \`prorated\` (default): the granted credits are prorated to the elapsed period.
|
|
41321
|
+
- \`full_allowance\`: the full allowance is always granted (the invoice remains prorated).
|
|
41322
|
+
`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <value>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
|
|
41256
41323
|
Examples:
|
|
41257
41324
|
hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
|
|
41258
41325
|
hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
|
|
@@ -41287,6 +41354,8 @@ Examples:
|
|
|
41287
41354
|
args.unit_name = opts.unitName;
|
|
41288
41355
|
if (opts.creditAggregators !== void 0)
|
|
41289
41356
|
args.credit_aggregators = opts.creditAggregators;
|
|
41357
|
+
if (opts.creditsGrantMode !== void 0)
|
|
41358
|
+
args.credits_grant_mode = opts.creditsGrantMode;
|
|
41290
41359
|
if (opts.displayMode !== void 0)
|
|
41291
41360
|
args.display_mode = opts.displayMode;
|
|
41292
41361
|
if (opts.bundleItems !== void 0)
|
|
@@ -41388,6 +41457,32 @@ Examples:
|
|
|
41388
41457
|
queryParamKeys: []
|
|
41389
41458
|
});
|
|
41390
41459
|
});
|
|
41460
|
+
resource.command("delete").description(`Permanently delete an archived product by ID. Products attached to subscriptions, plans, or templates cannot be deleted.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
41461
|
+
Examples:
|
|
41462
|
+
hyperline products delete --id <id>
|
|
41463
|
+
hyperline products delete --id <id> --output json`).action(async (opts) => {
|
|
41464
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41465
|
+
if (!ctx) {
|
|
41466
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41467
|
+
process.exit(1);
|
|
41468
|
+
}
|
|
41469
|
+
const args = {};
|
|
41470
|
+
if (opts.id !== void 0)
|
|
41471
|
+
args.id = opts.id;
|
|
41472
|
+
if (!opts.yes) {
|
|
41473
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
41474
|
+
if (!confirmed) {
|
|
41475
|
+
process.stdout.write("Aborted.\n");
|
|
41476
|
+
return;
|
|
41477
|
+
}
|
|
41478
|
+
}
|
|
41479
|
+
await ctx.execute({
|
|
41480
|
+
method: "DELETE",
|
|
41481
|
+
path: "/v1/products/{id}",
|
|
41482
|
+
args,
|
|
41483
|
+
queryParamKeys: []
|
|
41484
|
+
});
|
|
41485
|
+
});
|
|
41391
41486
|
resource.command("unarchive").description(`Restore a previously archived product, making it available for new subscriptions again.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
41392
41487
|
Examples:
|
|
41393
41488
|
hyperline products unarchive --id <id>
|
|
@@ -41412,7 +41507,7 @@ Examples:
|
|
|
41412
41507
|
// build/commands/generated/quotes.js
|
|
41413
41508
|
function registerQuotesCommands(parent) {
|
|
41414
41509
|
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>", `
|
|
41510
|
+
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
41511
|
Quote status.
|
|
41417
41512
|
|
|
41418
41513
|
- \`draft\`: The quote is a draft.
|
|
@@ -41708,12 +41803,12 @@ Examples:
|
|
|
41708
41803
|
queryParamKeys: []
|
|
41709
41804
|
});
|
|
41710
41805
|
});
|
|
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.
|
|
41806
|
+
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
41807
|
|
|
41713
41808
|
- \`all\`: Display all pricing tiers.
|
|
41714
41809
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
41715
41810
|
- \`none\`: Hide all pricing tiers.
|
|
41716
|
-
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <value>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
|
|
41811
|
+
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <value>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
|
|
41717
41812
|
Examples:
|
|
41718
41813
|
hyperline quotes update --id <id>
|
|
41719
41814
|
hyperline quotes update --id <id> --owner-email <owner_email> --comments <comments>
|
|
@@ -41758,6 +41853,8 @@ Examples:
|
|
|
41758
41853
|
args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
|
|
41759
41854
|
if (opts.generateDraftInvoices !== void 0)
|
|
41760
41855
|
args.generate_draft_invoices = opts.generateDraftInvoices;
|
|
41856
|
+
if (opts.crmOpportunityId !== void 0)
|
|
41857
|
+
args.crm_opportunity_id = opts.crmOpportunityId;
|
|
41761
41858
|
if (opts.expiresAt !== void 0)
|
|
41762
41859
|
args.expires_at = opts.expiresAt;
|
|
41763
41860
|
if (opts.subscription !== void 0)
|
|
@@ -41939,10 +42036,132 @@ Examples:
|
|
|
41939
42036
|
});
|
|
41940
42037
|
}
|
|
41941
42038
|
|
|
42039
|
+
// build/commands/generated/quotes-templates.js
|
|
42040
|
+
function registerQuotes_TemplatesCommands(parent) {
|
|
42041
|
+
const resource = parent.command("quotes-templates").description("Manage quotes > templates");
|
|
42042
|
+
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", `
|
|
42043
|
+
Examples:
|
|
42044
|
+
hyperline quotes-templates list-quote-templates
|
|
42045
|
+
hyperline quotes-templates list-quote-templates --take <take> --id <id>`).action(async (opts) => {
|
|
42046
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42047
|
+
if (!ctx) {
|
|
42048
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42049
|
+
process.exit(1);
|
|
42050
|
+
}
|
|
42051
|
+
const args = {};
|
|
42052
|
+
if (opts.id !== void 0)
|
|
42053
|
+
args.id = opts.id;
|
|
42054
|
+
if (opts["id.not"] !== void 0)
|
|
42055
|
+
args.id__not = opts["id.not"];
|
|
42056
|
+
if (opts["id.isNull"] !== void 0)
|
|
42057
|
+
args.id__isNull = opts["id.isNull"];
|
|
42058
|
+
if (opts["id.isNotNull"] !== void 0)
|
|
42059
|
+
args.id__isNotNull = opts["id.isNotNull"];
|
|
42060
|
+
if (opts["id.equals"] !== void 0)
|
|
42061
|
+
args.id__equals = opts["id.equals"];
|
|
42062
|
+
if (opts["id.contains"] !== void 0)
|
|
42063
|
+
args.id__contains = opts["id.contains"];
|
|
42064
|
+
if (opts["id.startsWith"] !== void 0)
|
|
42065
|
+
args.id__startsWith = opts["id.startsWith"];
|
|
42066
|
+
if (opts["id.endWith"] !== void 0)
|
|
42067
|
+
args.id__endWith = opts["id.endWith"];
|
|
42068
|
+
if (opts.name !== void 0)
|
|
42069
|
+
args.name = opts.name;
|
|
42070
|
+
if (opts["name.not"] !== void 0)
|
|
42071
|
+
args.name__not = opts["name.not"];
|
|
42072
|
+
if (opts["name.isNull"] !== void 0)
|
|
42073
|
+
args.name__isNull = opts["name.isNull"];
|
|
42074
|
+
if (opts["name.isNotNull"] !== void 0)
|
|
42075
|
+
args.name__isNotNull = opts["name.isNotNull"];
|
|
42076
|
+
if (opts["name.equals"] !== void 0)
|
|
42077
|
+
args.name__equals = opts["name.equals"];
|
|
42078
|
+
if (opts["name.contains"] !== void 0)
|
|
42079
|
+
args.name__contains = opts["name.contains"];
|
|
42080
|
+
if (opts["name.startsWith"] !== void 0)
|
|
42081
|
+
args.name__startsWith = opts["name.startsWith"];
|
|
42082
|
+
if (opts["name.endWith"] !== void 0)
|
|
42083
|
+
args.name__endWith = opts["name.endWith"];
|
|
42084
|
+
if (opts.subscriptionTemplateId !== void 0)
|
|
42085
|
+
args.subscription_template_id = opts.subscriptionTemplateId;
|
|
42086
|
+
if (opts["subscriptionTemplateId.not"] !== void 0)
|
|
42087
|
+
args.subscription_template_id__not = opts["subscriptionTemplateId.not"];
|
|
42088
|
+
if (opts["subscriptionTemplateId.isNull"] !== void 0)
|
|
42089
|
+
args.subscription_template_id__isNull = opts["subscriptionTemplateId.isNull"];
|
|
42090
|
+
if (opts["subscriptionTemplateId.isNotNull"] !== void 0)
|
|
42091
|
+
args.subscription_template_id__isNotNull = opts["subscriptionTemplateId.isNotNull"];
|
|
42092
|
+
if (opts["subscriptionTemplateId.equals"] !== void 0)
|
|
42093
|
+
args.subscription_template_id__equals = opts["subscriptionTemplateId.equals"];
|
|
42094
|
+
if (opts["subscriptionTemplateId.contains"] !== void 0)
|
|
42095
|
+
args.subscription_template_id__contains = opts["subscriptionTemplateId.contains"];
|
|
42096
|
+
if (opts["subscriptionTemplateId.startsWith"] !== void 0)
|
|
42097
|
+
args.subscription_template_id__startsWith = opts["subscriptionTemplateId.startsWith"];
|
|
42098
|
+
if (opts["subscriptionTemplateId.endWith"] !== void 0)
|
|
42099
|
+
args.subscription_template_id__endWith = opts["subscriptionTemplateId.endWith"];
|
|
42100
|
+
if (opts.search !== void 0)
|
|
42101
|
+
args.search = opts.search;
|
|
42102
|
+
if (opts.take !== void 0)
|
|
42103
|
+
args.take = Number(opts.take);
|
|
42104
|
+
if (opts.skip !== void 0)
|
|
42105
|
+
args.skip = Number(opts.skip);
|
|
42106
|
+
await ctx.execute({
|
|
42107
|
+
method: "GET",
|
|
42108
|
+
path: "/v1/quotes/templates",
|
|
42109
|
+
args,
|
|
42110
|
+
queryParamKeys: [
|
|
42111
|
+
"take",
|
|
42112
|
+
"skip",
|
|
42113
|
+
"id",
|
|
42114
|
+
"id__not",
|
|
42115
|
+
"id__isNull",
|
|
42116
|
+
"id__isNotNull",
|
|
42117
|
+
"id__equals",
|
|
42118
|
+
"id__contains",
|
|
42119
|
+
"id__startsWith",
|
|
42120
|
+
"id__endWith",
|
|
42121
|
+
"name",
|
|
42122
|
+
"name__not",
|
|
42123
|
+
"name__isNull",
|
|
42124
|
+
"name__isNotNull",
|
|
42125
|
+
"name__equals",
|
|
42126
|
+
"name__contains",
|
|
42127
|
+
"name__startsWith",
|
|
42128
|
+
"name__endWith",
|
|
42129
|
+
"subscription_template_id",
|
|
42130
|
+
"subscription_template_id__not",
|
|
42131
|
+
"subscription_template_id__isNull",
|
|
42132
|
+
"subscription_template_id__isNotNull",
|
|
42133
|
+
"subscription_template_id__equals",
|
|
42134
|
+
"subscription_template_id__contains",
|
|
42135
|
+
"subscription_template_id__startsWith",
|
|
42136
|
+
"subscription_template_id__endWith",
|
|
42137
|
+
"search"
|
|
42138
|
+
]
|
|
42139
|
+
});
|
|
42140
|
+
});
|
|
42141
|
+
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", `
|
|
42142
|
+
Examples:
|
|
42143
|
+
hyperline quotes-templates get-quote-template --id <id>`).action(async (opts) => {
|
|
42144
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42145
|
+
if (!ctx) {
|
|
42146
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42147
|
+
process.exit(1);
|
|
42148
|
+
}
|
|
42149
|
+
const args = {};
|
|
42150
|
+
if (opts.id !== void 0)
|
|
42151
|
+
args.id = opts.id;
|
|
42152
|
+
await ctx.execute({
|
|
42153
|
+
method: "GET",
|
|
42154
|
+
path: "/v1/quotes/templates/{id}",
|
|
42155
|
+
args,
|
|
42156
|
+
queryParamKeys: []
|
|
42157
|
+
});
|
|
42158
|
+
});
|
|
42159
|
+
}
|
|
42160
|
+
|
|
41942
42161
|
// build/commands/generated/subscriptions.js
|
|
41943
42162
|
function registerSubscriptionsCommands(parent) {
|
|
41944
42163
|
const resource = parent.command("subscriptions").description("Manage subscriptions");
|
|
41945
|
-
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", `
|
|
42164
|
+
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", `
|
|
41946
42165
|
Examples:
|
|
41947
42166
|
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
|
|
41948
42167
|
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>
|
|
@@ -41965,6 +42184,8 @@ Examples:
|
|
|
41965
42184
|
args.charge_at = opts.chargeAt;
|
|
41966
42185
|
if (opts.calculationMethod !== void 0)
|
|
41967
42186
|
args.calculation_method = opts.calculationMethod;
|
|
42187
|
+
if (opts.precision !== void 0)
|
|
42188
|
+
args.precision = opts.precision;
|
|
41968
42189
|
if (opts.refundMethod !== void 0)
|
|
41969
42190
|
args.refund_method = opts.refundMethod;
|
|
41970
42191
|
if (opts.type !== void 0)
|
|
@@ -41978,7 +42199,7 @@ Examples:
|
|
|
41978
42199
|
queryParamKeys: []
|
|
41979
42200
|
});
|
|
41980
42201
|
});
|
|
41981
|
-
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", `
|
|
42202
|
+
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", `
|
|
41982
42203
|
Examples:
|
|
41983
42204
|
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
41984
42205
|
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>
|
|
@@ -42001,6 +42222,8 @@ Examples:
|
|
|
42001
42222
|
args.charge_at = opts.chargeAt;
|
|
42002
42223
|
if (opts.calculationMethod !== void 0)
|
|
42003
42224
|
args.calculation_method = opts.calculationMethod;
|
|
42225
|
+
if (opts.precision !== void 0)
|
|
42226
|
+
args.precision = opts.precision;
|
|
42004
42227
|
if (opts.refundMethod !== void 0)
|
|
42005
42228
|
args.refund_method = opts.refundMethod;
|
|
42006
42229
|
if (opts.updates !== void 0)
|
|
@@ -42059,7 +42282,7 @@ Examples:
|
|
|
42059
42282
|
queryParamKeys: []
|
|
42060
42283
|
});
|
|
42061
42284
|
});
|
|
42062
|
-
resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date when the subscription will be automatically reactivated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
|
|
42285
|
+
resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption. If the subscription is already paused, updates (or clears) its reactivation date.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date when the subscription will be automatically reactivated. Must be a future date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
|
|
42063
42286
|
Examples:
|
|
42064
42287
|
hyperline subscriptions pause --id <id>
|
|
42065
42288
|
hyperline subscriptions pause --id <id> --reactivate-at <reactivate_at>
|
|
@@ -42140,7 +42363,7 @@ Examples:
|
|
|
42140
42363
|
queryParamKeys: []
|
|
42141
42364
|
});
|
|
42142
42365
|
});
|
|
42143
|
-
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", `
|
|
42366
|
+
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", `
|
|
42144
42367
|
Examples:
|
|
42145
42368
|
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
42146
42369
|
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>
|
|
@@ -42163,6 +42386,8 @@ Examples:
|
|
|
42163
42386
|
args.charge_at = opts.chargeAt;
|
|
42164
42387
|
if (opts.calculationMethod !== void 0)
|
|
42165
42388
|
args.calculation_method = opts.calculationMethod;
|
|
42389
|
+
if (opts.precision !== void 0)
|
|
42390
|
+
args.precision = opts.precision;
|
|
42166
42391
|
if (opts.refundMethod !== void 0)
|
|
42167
42392
|
args.refund_method = opts.refundMethod;
|
|
42168
42393
|
if (opts.updates !== void 0)
|
|
@@ -42598,6 +42823,38 @@ Examples:
|
|
|
42598
42823
|
queryParamKeys: []
|
|
42599
42824
|
});
|
|
42600
42825
|
});
|
|
42826
|
+
resource.command("get-subscription-arr-history").description(`List every ARR evolution for a subscription, including previous and current fixed, variable, and total annual values in the subscription currency. Results are latest-first and 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("--occurred-at.gte <value>", `Return evolutions that occurred at or after this UTC date and time.`).option("--occurred-at.lte <value>", `Return evolutions that occurred at or before this UTC date and time.`).addHelpText("after", `
|
|
42827
|
+
Examples:
|
|
42828
|
+
hyperline subscriptions get-subscription-arr-history --id <id>
|
|
42829
|
+
hyperline subscriptions get-subscription-arr-history --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
|
|
42830
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42831
|
+
if (!ctx) {
|
|
42832
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42833
|
+
process.exit(1);
|
|
42834
|
+
}
|
|
42835
|
+
const args = {};
|
|
42836
|
+
if (opts.id !== void 0)
|
|
42837
|
+
args.id = opts.id;
|
|
42838
|
+
if (opts.cursor !== void 0)
|
|
42839
|
+
args.cursor = opts.cursor;
|
|
42840
|
+
if (opts["occurredAt.gte"] !== void 0)
|
|
42841
|
+
args.occurred_at__gte = opts["occurredAt.gte"];
|
|
42842
|
+
if (opts["occurredAt.lte"] !== void 0)
|
|
42843
|
+
args.occurred_at__lte = opts["occurredAt.lte"];
|
|
42844
|
+
if (opts.limit !== void 0)
|
|
42845
|
+
args.limit = Number(opts.limit);
|
|
42846
|
+
await ctx.execute({
|
|
42847
|
+
method: "GET",
|
|
42848
|
+
path: "/v1/subscriptions/{id}/arr-history",
|
|
42849
|
+
args,
|
|
42850
|
+
queryParamKeys: [
|
|
42851
|
+
"limit",
|
|
42852
|
+
"cursor",
|
|
42853
|
+
"occurred_at__gte",
|
|
42854
|
+
"occurred_at__lte"
|
|
42855
|
+
]
|
|
42856
|
+
});
|
|
42857
|
+
});
|
|
42601
42858
|
resource.command("get-subscription-valuation").description(`Compute valuation metrics for a subscription: contract value (total/invoiced/remaining), recurring contract value, and ARR (fixed + variable). Optionally pass granularity (year/quarter/month) for period breakdown.`).requiredOption("--id <value>", `id parameter`).option("--granularity <value>", `Period granularity for the breakdown. When provided, contract value and recurring contract value include a \`by_period\` array.`).addHelpText("after", `
|
|
42602
42859
|
Examples:
|
|
42603
42860
|
hyperline subscriptions get-subscription-valuation --id <id>
|
|
@@ -43540,6 +43797,7 @@ function registerAllCommands(program2) {
|
|
|
43540
43797
|
registerProductsCommands(program2);
|
|
43541
43798
|
registerPrice_ConfigurationsCommands(program2);
|
|
43542
43799
|
registerQuotesCommands(program2);
|
|
43800
|
+
registerQuotes_TemplatesCommands(program2);
|
|
43543
43801
|
registerSubscriptions_TemplatesCommands(program2);
|
|
43544
43802
|
registerSubscriptionsCommands(program2);
|
|
43545
43803
|
registerSubscriptions_TransitionsCommands(program2);
|
|
@@ -61801,13 +62059,16 @@ function logHttpRequest(logger2, request, extra) {
|
|
|
61801
62059
|
});
|
|
61802
62060
|
}
|
|
61803
62061
|
function logHttpResponse(logger2, response, responseTime, extra) {
|
|
61804
|
-
const { request, statusCode, responseBody } = response;
|
|
62062
|
+
const { request, statusCode, responseBody, responseHeaders } = response;
|
|
61805
62063
|
const { message, metadata } = transform2(request);
|
|
61806
62064
|
const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
|
|
61807
62065
|
const responseMetadata = {
|
|
61808
62066
|
statusCode,
|
|
61809
62067
|
responseTime,
|
|
61810
|
-
responseBody
|
|
62068
|
+
responseBody,
|
|
62069
|
+
// Redacted so secrets (authorization/cookie/token/…) never reach the logs
|
|
62070
|
+
// while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
|
|
62071
|
+
responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
|
|
61811
62072
|
};
|
|
61812
62073
|
logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
|
|
61813
62074
|
...metadata,
|
|
@@ -62088,6 +62349,12 @@ var DateTimeSchema = external_exports.iso.datetime({
|
|
|
62088
62349
|
example: "2024-12-20T16:04:11Z"
|
|
62089
62350
|
});
|
|
62090
62351
|
|
|
62352
|
+
// ../hyperline-lib/build/http/dto/domain.js
|
|
62353
|
+
var DomainSchema = external_exports.string().trim().toLowerCase().regex(/^(?!:\/\/)(?=.{1,253}$)(?!-)([a-z0-9-]{1,63}\.)+[a-z]{2,63}$/, "Invalid domain").openapi({
|
|
62354
|
+
description: "Domain name.",
|
|
62355
|
+
example: "acme.com"
|
|
62356
|
+
});
|
|
62357
|
+
|
|
62091
62358
|
// ../hyperline-lib/build/http/dto/error.js
|
|
62092
62359
|
var ErrorSchema = external_exports.object({
|
|
62093
62360
|
message: external_exports.string()
|
|
@@ -62144,6 +62411,7 @@ var de = {
|
|
|
62144
62411
|
"accounting.transactionSettled.entryDescription": "Zahlungsabwicklung f\xFCr Rechnung {{invoiceId}}",
|
|
62145
62412
|
"accounting.transactionRefunded.entryDescription": "R\xFCckerstattung f\xFCr Rechnung {{invoiceId}}",
|
|
62146
62413
|
"accounting.creditNotePosted.entryDescription": "Gutschrift {{creditNoteId}} f\xFCr Rechnung {{invoiceId}}",
|
|
62414
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Gutschrift {{creditNoteId}}",
|
|
62147
62415
|
"accounting.revrec.creditLineDescription": "Umsatz realisieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
|
|
62148
62416
|
"accounting.revrec.debitLineDescription": "Abgrenzungsposten reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
|
|
62149
62417
|
"accounting.revrec.discountCreditLineDescription": "Erl\xF6sminderung (Rabatt) erfassen \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
|
|
@@ -62215,6 +62483,7 @@ var en = {
|
|
|
62215
62483
|
"accounting.transactionSettled.entryDescription": "Payment settlement for Invoice {{invoiceId}}",
|
|
62216
62484
|
"accounting.transactionRefunded.entryDescription": "Refund for Invoice {{invoiceId}}",
|
|
62217
62485
|
"accounting.creditNotePosted.entryDescription": "Credit note {{creditNoteId}} for Invoice {{invoiceId}}",
|
|
62486
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Credit note {{creditNoteId}}",
|
|
62218
62487
|
"accounting.revrec.entryDescription": "Revenue recognition for schedule {{scheduleId}}, period {{periodStart}} - {{periodEnd}}",
|
|
62219
62488
|
"accounting.revrec.debitLineDescription": "Decrease deferred revenue \u2013 schedule {{scheduleId}}, period {{periodDate}}",
|
|
62220
62489
|
"accounting.revrec.creditLineDescription": "Recognize revenue \u2013 schedule {{scheduleId}}, period {{periodDate}}",
|
|
@@ -62232,6 +62501,7 @@ var es = {
|
|
|
62232
62501
|
"accounting.transactionSettled.entryDescription": "Liquidaci\xF3n de pago para la factura {{invoiceId}}",
|
|
62233
62502
|
"accounting.transactionRefunded.entryDescription": "Reembolso de la factura {{invoiceId}}",
|
|
62234
62503
|
"accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para la factura {{invoiceId}}",
|
|
62504
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
|
|
62235
62505
|
"accounting.revrec.creditLineDescription": "Reconocer ingresos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
62236
62506
|
"accounting.revrec.debitLineDescription": "Disminuci\xF3n de ingresos diferidos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
62237
62507
|
"accounting.revrec.discountCreditLineDescription": "Reconocer contra-ingresos (descuento) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
@@ -62281,6 +62551,7 @@ var fr = {
|
|
|
62281
62551
|
"accounting.transactionSettled.entryDescription": "R\xE8glement de la facture {{invoiceId}}",
|
|
62282
62552
|
"accounting.transactionRefunded.entryDescription": "Remboursement de la facture {{invoiceId}}",
|
|
62283
62553
|
"accounting.creditNotePosted.entryDescription": "Avoir {{creditNoteId}} pour la facture {{invoiceId}}",
|
|
62554
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Avoir {{creditNoteId}}",
|
|
62284
62555
|
"accounting.revrec.entryDescription": "Reconnaissance du chiffre d'affaires pour l'\xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodStart}} - {{periodEnd}}",
|
|
62285
62556
|
"creditNotes.refundChargeName": "Remboursement pour facture",
|
|
62286
62557
|
"credits.bundleOf": "{{productName}} - Pack de {{creditCount}} cr\xE9dits",
|
|
@@ -62320,6 +62591,7 @@ var it = {
|
|
|
62320
62591
|
"accounting.transactionSettled.entryDescription": "Regolamento pagamento per la fattura {{invoiceId}}",
|
|
62321
62592
|
"accounting.transactionRefunded.entryDescription": "Rimborso per la fattura {{invoiceId}}",
|
|
62322
62593
|
"accounting.creditNotePosted.entryDescription": "Nota di credito {{creditNoteId}} per la fattura {{invoiceId}}",
|
|
62594
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Nota di credito {{creditNoteId}}",
|
|
62323
62595
|
"accounting.revrec.creditLineDescription": "Riconoscere i ricavi \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
|
|
62324
62596
|
"accounting.revrec.debitLineDescription": "Diminuzione dei ricavi differiti \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
|
|
62325
62597
|
"accounting.revrec.discountCreditLineDescription": "Riconoscere il contra-ricavo (sconto) \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
|
|
@@ -62364,6 +62636,7 @@ var nl = {
|
|
|
62364
62636
|
"accounting.transactionSettled.entryDescription": "Betalingsafwikkeling voor factuur {{invoiceId}}",
|
|
62365
62637
|
"accounting.transactionRefunded.entryDescription": "Terugbetaling voor factuur {{invoiceId}}",
|
|
62366
62638
|
"accounting.creditNotePosted.entryDescription": "Creditnota {{creditNoteId}} voor factuur {{invoiceId}}",
|
|
62639
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Creditnota {{creditNoteId}}",
|
|
62367
62640
|
"accounting.revrec.creditLineDescription": "Omzet erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
|
|
62368
62641
|
"accounting.revrec.debitLineDescription": "Uitgestelde omzet verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
|
|
62369
62642
|
"accounting.revrec.discountCreditLineDescription": "Omzetvermindering (korting) erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
|
|
@@ -62408,6 +62681,7 @@ var pl = {
|
|
|
62408
62681
|
"accounting.transactionSettled.entryDescription": "Rozliczenie p\u0142atno\u015Bci dla faktury {{invoiceId}}",
|
|
62409
62682
|
"accounting.transactionRefunded.entryDescription": "Zwrot za faktur\u0119 {{invoiceId}}",
|
|
62410
62683
|
"accounting.creditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}} dla faktury {{invoiceId}}",
|
|
62684
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}}",
|
|
62411
62685
|
"accounting.revrec.creditLineDescription": "Rozpoznanie przychodu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
|
|
62412
62686
|
"accounting.revrec.debitLineDescription": "Zmniejszenie przychod\xF3w przysz\u0142ych okres\xF3w \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
|
|
62413
62687
|
"accounting.revrec.discountCreditLineDescription": "Rozpoznanie kontra-przychodu (rabat) \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
|
|
@@ -62452,6 +62726,7 @@ var pt = {
|
|
|
62452
62726
|
"accounting.transactionSettled.entryDescription": "Liquida\xE7\xE3o de pagamento para a fatura {{invoiceId}}",
|
|
62453
62727
|
"accounting.transactionRefunded.entryDescription": "Reembolso da fatura {{invoiceId}}",
|
|
62454
62728
|
"accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para a fatura {{invoiceId}}",
|
|
62729
|
+
"accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
|
|
62455
62730
|
"accounting.revrec.creditLineDescription": "Reconhecer receita \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
62456
62731
|
"accounting.revrec.debitLineDescription": "Diminui\xE7\xE3o da receita diferida \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
62457
62732
|
"accounting.revrec.discountCreditLineDescription": "Reconhecer contra-receita (desconto) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
|
|
@@ -62592,10 +62867,16 @@ function buildHttpClient(dependencies) {
|
|
|
62592
62867
|
return response;
|
|
62593
62868
|
}, (error48) => {
|
|
62594
62869
|
if (error48.response) {
|
|
62595
|
-
const { config: responseConfig, status } = error48.response;
|
|
62870
|
+
const { config: responseConfig, status, headers } = error48.response;
|
|
62596
62871
|
const timeStart = responseConfig.metadata.timeStart;
|
|
62597
62872
|
const responseTime = timeStart ? Date.now() - timeStart : void 0;
|
|
62598
|
-
logHttpResponse(logger2, {
|
|
62873
|
+
logHttpResponse(logger2, {
|
|
62874
|
+
request: toLogRequest(responseConfig),
|
|
62875
|
+
statusCode: status,
|
|
62876
|
+
// Surfaces upstream response headers on error responses (e.g. the
|
|
62877
|
+
// rate-limit headers on a 429); redacted in logHttpResponse.
|
|
62878
|
+
responseHeaders: headers
|
|
62879
|
+
}, responseTime, { metadata: { error: error48.message } });
|
|
62599
62880
|
}
|
|
62600
62881
|
return Promise.reject(error48);
|
|
62601
62882
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperline/cli",
|
|
3
|
-
"version": "0.1.0-build.1.
|
|
3
|
+
"version": "0.1.0-build.1.d791b2b",
|
|
4
4
|
"description": "Agent-first CLI for Hyperline API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@hyperline/vitest-config": "workspace:*",
|
|
49
49
|
"@types/node": "24.10.1",
|
|
50
50
|
"esbuild": "0.28.0",
|
|
51
|
-
"typescript": "
|
|
51
|
+
"typescript": "7.0.2",
|
|
52
52
|
"vitest": "4.1.5"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|