@hyperline/cli 0.1.0-build.1.ac78a09 → 0.1.0-build.1.af7811b

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.
@@ -34894,10 +34894,10 @@ var require_shared = __commonJS({
34894
34894
  ZodId: () => ZodId,
34895
34895
  ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
34896
34896
  });
34897
- var import_zod18 = require_lib();
34897
+ var import_zod19 = require_lib();
34898
34898
  var countryIds2 = ["all", ...countries.map(({ id }) => id)];
34899
- var ZodId = import_zod18.z.enum(countryIds2);
34900
- var ZodTranslationsSchemaFn = (schema) => import_zod18.z.record(import_zod18.z.string(), schema.optional());
34899
+ var ZodId = import_zod19.z.enum(countryIds2);
34900
+ var ZodTranslationsSchemaFn = (schema) => import_zod19.z.record(import_zod19.z.string(), schema.optional());
34901
34901
  var UsStates = [
34902
34902
  { id: "AA", name: "Armed Forces Americas" },
34903
34903
  { id: "AE", name: "Armed Forces Europe" },
@@ -38020,7 +38020,7 @@ Examples:
38020
38020
  queryParamKeys: ["take", "skip"]
38021
38021
  });
38022
38022
  });
38023
- resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38023
+ resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38024
38024
  Examples:
38025
38025
  hyperline coupons create --name <name> --type <type>
38026
38026
  hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38039,6 +38039,10 @@ Examples:
38039
38039
  args.expiration_date = opts.expirationDate;
38040
38040
  if (opts.productIds !== void 0)
38041
38041
  args.product_ids = opts.productIds;
38042
+ if (opts.repeat !== void 0)
38043
+ args.repeat = opts.repeat;
38044
+ if (opts.duration !== void 0)
38045
+ args.duration = opts.duration;
38042
38046
  if (opts.type !== void 0)
38043
38047
  args.type = opts.type;
38044
38048
  if (opts.currency !== void 0)
@@ -38074,7 +38078,7 @@ Examples:
38074
38078
  queryParamKeys: []
38075
38079
  });
38076
38080
  });
38077
- resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38081
+ resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38078
38082
  Examples:
38079
38083
  hyperline coupons update --id <id> --name <name> --type <type>
38080
38084
  hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38095,6 +38099,10 @@ Examples:
38095
38099
  args.expiration_date = opts.expirationDate;
38096
38100
  if (opts.productIds !== void 0)
38097
38101
  args.product_ids = opts.productIds;
38102
+ if (opts.repeat !== void 0)
38103
+ args.repeat = opts.repeat;
38104
+ if (opts.duration !== void 0)
38105
+ args.duration = opts.duration;
38098
38106
  if (opts.type !== void 0)
38099
38107
  args.type = opts.type;
38100
38108
  if (opts.currency !== void 0)
@@ -38429,16 +38437,24 @@ Examples:
38429
38437
  // build/commands/generated/customers.js
38430
38438
  function registerCustomersCommands(parent) {
38431
38439
  const resource = parent.command("customers").description("Manage customers");
38432
- resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, created_at, updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).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("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--currency.equals <value>", `currency__equals`).option("--currency.contains <value>", `currency__contains`).option("--currency.starts-with <value>", `currency__startsWith`).option("--currency.end-with <value>", `currency__endWith`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `custom_properties`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--integration-entity-id <value>", `integration_entity_id`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).option("--created-at.equals <value>", `created_at__equals`).option("--created-at.lt <value>", `created_at__lt`).option("--created-at.lte <value>", `created_at__lte`).option("--created-at.gt <value>", `created_at__gt`).option("--created-at.gte <value>", `created_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
38440
+ resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, integration_entity_id, created_at, and updated_at. Sortable by created_at or updated_at. Paginated with limit/cursor.`).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.`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).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("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--currency.equals <value>", `currency__equals`).option("--currency.contains <value>", `currency__contains`).option("--currency.starts-with <value>", `currency__startsWith`).option("--currency.end-with <value>", `currency__endWith`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `custom_properties`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--integration-entity-id <value>", `integration_entity_id`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).option("--created-at.equals <value>", `created_at__equals`).option("--created-at.lt <value>", `created_at__lt`).option("--created-at.lte <value>", `created_at__lte`).option("--created-at.gt <value>", `created_at__gt`).option("--created-at.gte <value>", `created_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
38433
38441
  Examples:
38434
38442
  hyperline customers list
38435
- hyperline customers list --take <take> --name <name>`).action(async (opts) => {
38443
+ hyperline customers list --limit <limit> --cursor <cursor>`).action(async (opts) => {
38436
38444
  const ctx = resource.parent?.opts()._ctx;
38437
38445
  if (!ctx) {
38438
38446
  process.stderr.write("Error: Not authenticated\n");
38439
38447
  process.exit(1);
38440
38448
  }
38441
38449
  const args = {};
38450
+ if (opts.cursor !== void 0)
38451
+ args.cursor = opts.cursor;
38452
+ if (opts.includeTotal !== void 0)
38453
+ args.include_total = opts.includeTotal;
38454
+ if (opts.order !== void 0)
38455
+ args.order = opts.order;
38456
+ if (opts.sort !== void 0)
38457
+ args.sort = opts.sort;
38442
38458
  if (opts.name !== void 0)
38443
38459
  args.name = opts.name;
38444
38460
  if (opts["name.not"] !== void 0)
@@ -38611,17 +38627,18 @@ Examples:
38611
38627
  args.updated_at__gt = opts["updatedAt.gt"];
38612
38628
  if (opts["updatedAt.gte"] !== void 0)
38613
38629
  args.updated_at__gte = opts["updatedAt.gte"];
38614
- if (opts.take !== void 0)
38615
- args.take = Number(opts.take);
38616
- if (opts.skip !== void 0)
38617
- args.skip = Number(opts.skip);
38630
+ if (opts.limit !== void 0)
38631
+ args.limit = Number(opts.limit);
38618
38632
  await ctx.execute({
38619
38633
  method: "GET",
38620
- path: "/v1/customers",
38634
+ path: "/v2/customers",
38621
38635
  args,
38622
38636
  queryParamKeys: [
38623
- "take",
38624
- "skip",
38637
+ "limit",
38638
+ "cursor",
38639
+ "include_total",
38640
+ "order",
38641
+ "sort",
38625
38642
  "name",
38626
38643
  "name__not",
38627
38644
  "name__isNull",
@@ -38711,13 +38728,31 @@ Examples:
38711
38728
  ]
38712
38729
  });
38713
38730
  });
38731
+ resource.command("get").description(`Retrieve full details of a customer by ID including billing info, address, subscriptions, custom properties, integrations, payment method, and bank account.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38732
+ Examples:
38733
+ hyperline customers get --id <id>`).action(async (opts) => {
38734
+ const ctx = resource.parent?.opts()._ctx;
38735
+ if (!ctx) {
38736
+ process.stderr.write("Error: Not authenticated\n");
38737
+ process.exit(1);
38738
+ }
38739
+ const args = {};
38740
+ if (opts.id !== void 0)
38741
+ args.id = opts.id;
38742
+ await ctx.execute({
38743
+ method: "GET",
38744
+ path: "/v2/customers/{id}",
38745
+ args,
38746
+ queryParamKeys: []
38747
+ });
38748
+ });
38714
38749
  resource.command("create-customer").description(`Create a new customer with billing details, address, currency, and optional provider mappings. Returns the full customer object.`).option("--name <value>", `Customer name.`).option("--type <value>", `
38715
38750
  Customer type.
38716
38751
 
38717
38752
  - \`corporate\`: The customer is a business entity.
38718
38753
  - \`person\`: The customer is a natural person.
38719
38754
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38720
- `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).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 delay. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay for payment collection. 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>", `
38755
+ `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).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>", `
38721
38756
  How customer invoices are issued from the parent organisation.
38722
38757
 
38723
38758
  - \`none\`: Invoices will keep being issued from this customer.
@@ -38812,24 +38847,6 @@ Examples:
38812
38847
  queryParamKeys: []
38813
38848
  });
38814
38849
  });
38815
- resource.command("get").description(`Retrieve full details of a customer by ID including billing info, address, subscriptions, custom properties, and provider mappings.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38816
- Examples:
38817
- hyperline customers get --id <id>`).action(async (opts) => {
38818
- const ctx = resource.parent?.opts()._ctx;
38819
- if (!ctx) {
38820
- process.stderr.write("Error: Not authenticated\n");
38821
- process.exit(1);
38822
- }
38823
- const args = {};
38824
- if (opts.id !== void 0)
38825
- args.id = opts.id;
38826
- await ctx.execute({
38827
- method: "GET",
38828
- path: "/v1/customers/{id}",
38829
- args,
38830
- queryParamKeys: []
38831
- });
38832
- });
38833
38850
  resource.command("get-customer-portal-url").description(`Get a portal URL for a customer. The portal allows the customer to view invoices, update payment methods, and manage their account.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38834
38851
  Examples:
38835
38852
  hyperline customers get-customer-portal-url --id <id>`).action(async (opts) => {
@@ -38854,7 +38871,7 @@ Customer type.
38854
38871
  - \`corporate\`: The customer is a business entity.
38855
38872
  - \`person\`: The customer is a natural person.
38856
38873
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38857
- `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).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 delay. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay for payment collection. 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>", `
38874
+ `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).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>", `
38858
38875
  How customer invoices are issued from the parent organisation.
38859
38876
 
38860
38877
  - \`none\`: Invoices will keep being issued from this customer.
@@ -40175,7 +40192,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
40175
40192
 
40176
40193
  - \`current\`: Use the current default payment method of the customer.
40177
40194
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
40178
- `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
40195
+ `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
40179
40196
  Examples:
40180
40197
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
40181
40198
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -40228,6 +40245,8 @@ Examples:
40228
40245
  args.settled_at = opts.settledAt;
40229
40246
  if (opts.properties !== void 0)
40230
40247
  args.properties = opts.properties;
40248
+ if (opts.customProperties !== void 0)
40249
+ args.custom_properties = opts.customProperties;
40231
40250
  if (opts.lineItems !== void 0)
40232
40251
  args.line_items = opts.lineItems;
40233
40252
  if (opts.transactions !== void 0)
@@ -40241,10 +40260,15 @@ Examples:
40241
40260
  queryParamKeys: []
40242
40261
  });
40243
40262
  });
40244
- resource.command("create-credit-note").description(`Create a credit note for an existing invoice by ID. Credit notes partially or fully reverse an invoice amount.`).requiredOption("--id <value>", `id parameter`).option("--amount-including-tax <number>", `Amount of the credit note. If not specified, the amount will be computed from the original invoice.`).option("--status <value>", `Status of the credit note.
40263
+ resource.command("create-credit-note").description(`Create a credit note for an existing invoice by ID. Credit notes partially or fully reverse an invoice amount. Optionally trigger a refund via wallet, original payment method, or external settlement.`).requiredOption("--id <value>", `id parameter`).option("--amount-including-tax <number>", `Amount of the credit note. If not specified, the amount will be computed from the original invoice.`).option("--status <value>", `Status of the credit note.
40245
40264
 
40246
40265
  - \`to_pay\`: Credit note is awaiting payment.
40247
40266
  - \`draft\`: Credit note is in draft mode (not finalized yet).
40267
+ `).option("--trigger-refund", `Whether to trigger a refund for the credit note amount. Defaults to \`false\`. When \`true\`, the refund is issued using \`refund_method\`.`).option("--refund-method <value>", `How the refund should be settled. Only used when \`trigger_refund\` is \`true\`. Defaults to \`original_payment_method\`.
40268
+
40269
+ - \`wallet\`: Credit the customer's wallet with the refunded amount.
40270
+ - \`original_payment_method\`: Refund to the payment method used on the original invoice.
40271
+ - \`external\`: Mark the refund as settled externally (no automatic transfer).
40248
40272
  `).addHelpText("after", `
40249
40273
  Examples:
40250
40274
  hyperline invoices create-credit-note --id <id>
@@ -40260,8 +40284,12 @@ Examples:
40260
40284
  args.id = opts.id;
40261
40285
  if (opts.status !== void 0)
40262
40286
  args.status = opts.status;
40287
+ if (opts.refundMethod !== void 0)
40288
+ args.refund_method = opts.refundMethod;
40263
40289
  if (opts.amountIncludingTax !== void 0)
40264
40290
  args.amount_including_tax = Number(opts.amountIncludingTax);
40291
+ if (opts.triggerRefund !== void 0)
40292
+ args.trigger_refund = true;
40265
40293
  await ctx.execute({
40266
40294
  method: "POST",
40267
40295
  path: "/v1/invoices/{id}/credit-notes",
@@ -40400,7 +40428,7 @@ Examples:
40400
40428
 
40401
40429
  - \`auto\`: Tax is automatically computed and applied.
40402
40430
  - \`not_eligible\`: Tax collection is disabled for the invoice.
40403
- `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40431
+ `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40404
40432
  Examples:
40405
40433
  hyperline invoices update --id <id>
40406
40434
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -40441,6 +40469,8 @@ Examples:
40441
40469
  args.bank_account_id = opts.bankAccountId;
40442
40470
  if (opts.properties !== void 0)
40443
40471
  args.properties = opts.properties;
40472
+ if (opts.customProperties !== void 0)
40473
+ args.custom_properties = opts.customProperties;
40444
40474
  if (opts.customer !== void 0)
40445
40475
  args.customer = opts.customer;
40446
40476
  await ctx.execute({
@@ -40633,7 +40663,7 @@ Examples:
40633
40663
  queryParamKeys: []
40634
40664
  });
40635
40665
  });
40636
- resource.command("create-invoicing-entity").description(`Create a new invoicing entity with company details, address, and tax configuration. Used as the sender on invoices.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).requiredOption("--name <value>", `The name of the invoicing entity.`).option("--trade-name <value>", `The trade name of the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).requiredOption("--country <value>", `The country in which the invoicing entity is registered.`).requiredOption("--currency <value>", `The currency code that the invoicing entity operates in.`).requiredOption("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--next-invoice-number <number>", `The next invoice number to be used.`).option("--next-credit-note-number <number>", `The next credit note number to be used.`).option("--next-document-number <number>", `The next document number to be used.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--quote-footer <value>", `The footer text to be used in quotes.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).addHelpText("after", `
40666
+ resource.command("create-invoicing-entity").description(`Create a new invoicing entity with company details, address, and tax configuration. Used as the sender on invoices.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).requiredOption("--name <value>", `The name of the invoicing entity.`).option("--trade-name <value>", `The trade name of the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).requiredOption("--country <value>", `The country in which the invoicing entity is registered.`).requiredOption("--currency <value>", `The currency code that the invoicing entity operates in.`).requiredOption("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--next-invoice-number <number>", `The next invoice number to be used.`).option("--next-credit-note-number <number>", `The next credit note number to be used.`).option("--next-document-number <number>", `The next document number to be used.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--quote-footer <value>", `The footer text to be used in quotes.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).option("--credit-note-wallet-refund-enabled", `When enabled, credit note refunds default to the customer's wallet for invoices under this invoicing entity. The default applies only when \`refund_method\` is omitted on \`POST /v1/invoices/{id}/credit-notes\`; an explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).addHelpText("after", `
40637
40667
  Examples:
40638
40668
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency>
40639
40669
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency> --is-default --trade-name <trade_name>
@@ -40712,6 +40742,8 @@ Examples:
40712
40742
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40713
40743
  if (opts.isDefault !== void 0)
40714
40744
  args.is_default = true;
40745
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40746
+ args.credit_note_wallet_refund_enabled = true;
40715
40747
  await ctx.execute({
40716
40748
  method: "POST",
40717
40749
  path: "/v1/invoicing-entities",
@@ -40719,7 +40751,7 @@ Examples:
40719
40751
  queryParamKeys: []
40720
40752
  });
40721
40753
  });
40722
- resource.command("update-invoicing-entity").description(`Update an existing invoicing entity's details (address, tax ID, branding, etc.).`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `The name of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).option("--country <value>", `The country in which the invoicing entity is registered.`).option("--currency <value>", `The currency code that the invoicing entity operates in.`).option("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).addHelpText("after", `
40754
+ resource.command("update-invoicing-entity").description(`Update an existing invoicing entity's details (address, tax ID, branding, etc.).`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `The name of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).option("--country <value>", `The country in which the invoicing entity is registered.`).option("--currency <value>", `The currency code that the invoicing entity operates in.`).option("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).option("--credit-note-wallet-refund-enabled", `When enabled, credit note refunds default to the customer's wallet for invoices under this invoicing entity. The default applies only when \`refund_method\` is omitted on \`POST /v1/invoices/{id}/credit-notes\`; an explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).addHelpText("after", `
40723
40755
  Examples:
40724
40756
  hyperline invoicing-entities update-invoicing-entity --id <id>
40725
40757
  hyperline invoicing-entities update-invoicing-entity --id <id> --name <name> --registration-number <registration_number>
@@ -40790,6 +40822,8 @@ Examples:
40790
40822
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40791
40823
  if (opts.isDefault !== void 0)
40792
40824
  args.is_default = true;
40825
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40826
+ args.credit_note_wallet_refund_enabled = true;
40793
40827
  await ctx.execute({
40794
40828
  method: "PUT",
40795
40829
  path: "/v1/invoicing-entities/{id}",
@@ -41358,18 +41392,18 @@ Examples:
41358
41392
  // build/commands/generated/quotes.js
41359
41393
  function registerQuotesCommands(parent) {
41360
41394
  const resource = parent.command("quotes").description("Manage quotes");
41361
- resource.command("create").description(`Create a new quote for a customer with line items, products, and optional file attachments. Quotes can be sent for signature and converted to subscriptions.`).option("--status <value>", `
41395
+ 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>", `
41362
41396
  Quote status.
41363
41397
 
41364
41398
  - \`draft\`: The quote is a draft.
41365
41399
  - \`approved\`: The quote is approved and ready to be sent to the customer.
41366
41400
  - \`pending_signature\`: The quote is awaiting the customer's signature.
41367
- `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. If not specified, automatically computed from the subscription configuration.`).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("--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.
41401
+ `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored \u2014 the amount is always derived from the linked invoice's \`amount_excluding_tax\`.`).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("--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.
41368
41402
 
41369
41403
  - \`all\`: Display all pricing tiers.
41370
41404
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
41371
41405
  - \`none\`: Hide all pricing tiers.
41372
- `).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("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <value>", `Subscription configuration constituting the quote.`).addHelpText("after", `
41406
+ `).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("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <value>", `Subscription configuration constituting the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
41373
41407
  Examples:
41374
41408
  hyperline quotes create --customer-id <customer_id>
41375
41409
  hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
@@ -41414,12 +41448,16 @@ Examples:
41414
41448
  args.display_documents_in_preview = opts.displayDocumentsInPreview;
41415
41449
  if (opts.displaySubscriptionOnUpdate !== void 0)
41416
41450
  args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
41451
+ if (opts.generateDraftInvoices !== void 0)
41452
+ args.generate_draft_invoices = opts.generateDraftInvoices;
41417
41453
  if (opts.templateId !== void 0)
41418
41454
  args.template_id = opts.templateId;
41419
41455
  if (opts.expiresAt !== void 0)
41420
41456
  args.expires_at = opts.expiresAt;
41421
41457
  if (opts.subscription !== void 0)
41422
41458
  args.subscription = opts.subscription;
41459
+ if (opts.invoice !== void 0)
41460
+ args.invoice = opts.invoice;
41423
41461
  if (opts.amount !== void 0)
41424
41462
  args.amount = Number(opts.amount);
41425
41463
  await ctx.execute({
@@ -41648,6 +41686,69 @@ Examples:
41648
41686
  queryParamKeys: []
41649
41687
  });
41650
41688
  });
41689
+ 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("--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.
41690
+
41691
+ - \`all\`: Display all pricing tiers.
41692
+ - \`matching\`: Only display the tiers used to compute the price based on quantity.
41693
+ - \`none\`: Hide all pricing tiers.
41694
+ `).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", `
41695
+ Examples:
41696
+ hyperline quotes update --id <id>
41697
+ hyperline quotes update --id <id> --owner-email <owner_email> --comments <comments>
41698
+ hyperline quotes update --id <id> --output json`).action(async (opts) => {
41699
+ const ctx = resource.parent?.opts()._ctx;
41700
+ if (!ctx) {
41701
+ process.stderr.write("Error: Not authenticated\n");
41702
+ process.exit(1);
41703
+ }
41704
+ const args = {};
41705
+ if (opts.id !== void 0)
41706
+ args.id = opts.id;
41707
+ if (opts.ownerEmail !== void 0)
41708
+ args.owner_email = opts.ownerEmail;
41709
+ if (opts.comments !== void 0)
41710
+ args.comments = opts.comments;
41711
+ if (opts.terms !== void 0)
41712
+ args.terms = opts.terms;
41713
+ if (opts.collectPaymentDetails !== void 0)
41714
+ args.collect_payment_details = opts.collectPaymentDetails;
41715
+ if (opts.collectCustomPropertyIds !== void 0)
41716
+ args.collect_custom_property_ids = opts.collectCustomPropertyIds;
41717
+ if (opts.requireTaxId !== void 0)
41718
+ args.require_tax_id = opts.requireTaxId;
41719
+ if (opts.displayQuoteValue !== void 0)
41720
+ args.display_quote_value = opts.displayQuoteValue;
41721
+ if (opts.displayQuoteValueWithTax !== void 0)
41722
+ args.display_quote_value_with_tax = opts.displayQuoteValueWithTax;
41723
+ if (opts.displayTaxes !== void 0)
41724
+ args.display_taxes = opts.displayTaxes;
41725
+ if (opts.displayPriceTiers !== void 0)
41726
+ args.display_price_tiers = opts.displayPriceTiers;
41727
+ if (opts.displayPhaseValue !== void 0)
41728
+ args.display_phase_value = opts.displayPhaseValue;
41729
+ if (opts.displayFirstInvoiceAmount !== void 0)
41730
+ args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
41731
+ if (opts.displayDocumentsInPreview !== void 0)
41732
+ args.display_documents_in_preview = opts.displayDocumentsInPreview;
41733
+ if (opts.displaySubscriptionOnUpdate !== void 0)
41734
+ args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
41735
+ if (opts.generateDraftInvoices !== void 0)
41736
+ args.generate_draft_invoices = opts.generateDraftInvoices;
41737
+ if (opts.expiresAt !== void 0)
41738
+ args.expires_at = opts.expiresAt;
41739
+ if (opts.subscription !== void 0)
41740
+ args.subscription = opts.subscription;
41741
+ if (opts.invoice !== void 0)
41742
+ args.invoice = opts.invoice;
41743
+ if (opts.amount !== void 0)
41744
+ args.amount = Number(opts.amount);
41745
+ await ctx.execute({
41746
+ method: "PATCH",
41747
+ path: "/v1/quotes/{id}",
41748
+ args,
41749
+ queryParamKeys: []
41750
+ });
41751
+ });
41651
41752
  resource.command("download").description(`Download the PDF of a quote. Supports locale parameter for localization.`).requiredOption("--id <value>", `id parameter`).option("--locale <value>", `locale`).addHelpText("after", `
41652
41753
  Examples:
41653
41754
  hyperline quotes download --id <id>
@@ -41798,7 +41899,7 @@ Examples:
41798
41899
  // build/commands/generated/subscriptions.js
41799
41900
  function registerSubscriptionsCommands(parent) {
41800
41901
  const resource = parent.command("subscriptions").description("Manage subscriptions");
41801
- 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`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
41902
+ 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", `
41802
41903
  Examples:
41803
41904
  hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
41804
41905
  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>
@@ -41821,6 +41922,8 @@ Examples:
41821
41922
  args.charge_at = opts.chargeAt;
41822
41923
  if (opts.calculationMethod !== void 0)
41823
41924
  args.calculation_method = opts.calculationMethod;
41925
+ if (opts.refundMethod !== void 0)
41926
+ args.refund_method = opts.refundMethod;
41824
41927
  if (opts.type !== void 0)
41825
41928
  args.type = opts.type;
41826
41929
  if (opts.payload !== void 0)
@@ -41832,7 +41935,7 @@ Examples:
41832
41935
  queryParamKeys: []
41833
41936
  });
41834
41937
  });
41835
- 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`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
41938
+ 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", `
41836
41939
  Examples:
41837
41940
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
41838
41941
  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>
@@ -41855,6 +41958,8 @@ Examples:
41855
41958
  args.charge_at = opts.chargeAt;
41856
41959
  if (opts.calculationMethod !== void 0)
41857
41960
  args.calculation_method = opts.calculationMethod;
41961
+ if (opts.refundMethod !== void 0)
41962
+ args.refund_method = opts.refundMethod;
41858
41963
  if (opts.updates !== void 0)
41859
41964
  args.updates = opts.updates;
41860
41965
  await ctx.execute({
@@ -41864,7 +41969,7 @@ Examples:
41864
41969
  queryParamKeys: []
41865
41970
  });
41866
41971
  });
41867
- resource.command("cancel").description(`Cancel a subscription. Supports immediate or end-of-period cancellation. Optionally specify a cancellation reason.`).requiredOption("--id <value>", `id parameter`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--reason <value>", `Reason for the cancellation.`).option("--pro-rata", `Indicates if the cancel should refund the customer using a pro rata strategy.`).addHelpText("after", `
41972
+ resource.command("cancel").description(`Cancel a subscription. Supports immediate or end-of-period cancellation. Optionally specify a cancellation reason.`).requiredOption("--id <value>", `id parameter`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--reason <value>", `Reason for the cancellation.`).option("--pro-rata", `Indicates if the cancel should refund the customer using a pro rata strategy.`).option("--refund-method <value>", `Override the refund destination for the resulting credit note. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).addHelpText("after", `
41868
41973
  Examples:
41869
41974
  hyperline subscriptions cancel --id <id>
41870
41975
  hyperline subscriptions cancel --id <id> --cancel-at <cancel_at> --reason <reason>
@@ -41881,6 +41986,8 @@ Examples:
41881
41986
  args.cancel_at = opts.cancelAt;
41882
41987
  if (opts.reason !== void 0)
41883
41988
  args.reason = opts.reason;
41989
+ if (opts.refundMethod !== void 0)
41990
+ args.refund_method = opts.refundMethod;
41884
41991
  if (opts.proRata !== void 0)
41885
41992
  args.pro_rata = true;
41886
41993
  await ctx.execute({
@@ -41990,7 +42097,7 @@ Examples:
41990
42097
  queryParamKeys: []
41991
42098
  });
41992
42099
  });
41993
- 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`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42100
+ 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", `
41994
42101
  Examples:
41995
42102
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
41996
42103
  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>
@@ -42013,6 +42120,8 @@ Examples:
42013
42120
  args.charge_at = opts.chargeAt;
42014
42121
  if (opts.calculationMethod !== void 0)
42015
42122
  args.calculation_method = opts.calculationMethod;
42123
+ if (opts.refundMethod !== void 0)
42124
+ args.refund_method = opts.refundMethod;
42016
42125
  if (opts.updates !== void 0)
42017
42126
  args.updates = opts.updates;
42018
42127
  await ctx.execute({
@@ -42038,7 +42147,7 @@ Strategy used to cancel the subscription. If not specified \`do_nothing\` is use
42038
42147
  - \`refund_custom\`: Will refund to the customer a custom amount.
42039
42148
  - \`end_of_period\`: Will cancel the subscription at the end date of the current billing period.
42040
42149
  - \`do_nothing\`: Will only cease the subscription without any additional actions.
42041
- `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).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("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42150
+ `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--cancellation-refund-method <value>", `Override the refund destination for credit notes generated by \`refund_prorata\` / \`refund_custom\` cancellation strategies. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).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("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42042
42151
  Defines when invoices are generated relative to the billing period.
42043
42152
 
42044
42153
  - \`period_start\`: Invoices are generated at the start of the billing period.
@@ -42093,6 +42202,8 @@ Examples:
42093
42202
  args.cancel_at = opts.cancelAt;
42094
42203
  if (opts.cancellationStrategy !== void 0)
42095
42204
  args.cancellation_strategy = opts.cancellationStrategy;
42205
+ if (opts.cancellationRefundMethod !== void 0)
42206
+ args.cancellation_refund_method = opts.cancellationRefundMethod;
42096
42207
  if (opts.properties !== void 0)
42097
42208
  args.properties = opts.properties;
42098
42209
  if (opts.customProperties !== void 0)
@@ -42375,7 +42486,7 @@ Examples:
42375
42486
  queryParamKeys: []
42376
42487
  });
42377
42488
  });
42378
- resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Payload mirrors GET response structure.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42489
+ resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Draft quote subscription configuration must be updated through PATCH /v1/quotes/{id}.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42379
42490
  Defines when invoices are generated relative to the billing period.
42380
42491
 
42381
42492
  - \`period_start\`: Invoices are generated at the start of the billing period.
@@ -42949,6 +43060,30 @@ Examples:
42949
43060
  });
42950
43061
  }
42951
43062
 
43063
+ // build/commands/generated/transactions.js
43064
+ function registerTransactionsCommands(parent) {
43065
+ const resource = parent.command("transactions").description("Manage transactions");
43066
+ resource.command("refund").description(`Refund a settled banking transaction for its full amount. The related invoice will switch back to to pay status. Use the create credit note endpoint if you want to cancel (and optionally refund) the initial invoice.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
43067
+ Examples:
43068
+ hyperline transactions refund --id <id>
43069
+ hyperline transactions refund --id <id> --output json`).action(async (opts) => {
43070
+ const ctx = resource.parent?.opts()._ctx;
43071
+ if (!ctx) {
43072
+ process.stderr.write("Error: Not authenticated\n");
43073
+ process.exit(1);
43074
+ }
43075
+ const args = {};
43076
+ if (opts.id !== void 0)
43077
+ args.id = opts.id;
43078
+ await ctx.execute({
43079
+ method: "POST",
43080
+ path: "/v1/transactions/{id}/refund",
43081
+ args,
43082
+ queryParamKeys: []
43083
+ });
43084
+ });
43085
+ }
43086
+
42952
43087
  // build/commands/generated/wallets.js
42953
43088
  function registerWalletsCommands(parent) {
42954
43089
  const resource = parent.command("wallets").description("Manage wallets");
@@ -43361,6 +43496,7 @@ function registerAllCommands(program2) {
43361
43496
  registerSubscriptions_TransitionsCommands(program2);
43362
43497
  registerSubscriptions_PhasesCommands(program2);
43363
43498
  registerTaxesCommands(program2);
43499
+ registerTransactionsCommands(program2);
43364
43500
  registerWalletsCommands(program2);
43365
43501
  registerWebhooksCommands(program2);
43366
43502
  }
@@ -57151,6 +57287,7 @@ var BooleanSchema = external_exports.boolean().or(external_exports.enum(["true",
57151
57287
  });
57152
57288
  var StringSchemaForMultipartForm = external_exports.string().transform((value) => value === "" ? null : value);
57153
57289
  var StringArraySchemaForMultipartForm = external_exports.string().array().or(external_exports.string().length(0)).transform((value) => typeof value === "string" ? [] : value);
57290
+ var CommaSeparatedArraySchema = external_exports.string().optional().transform((raw) => raw ? raw.split(",").filter(Boolean) : void 0);
57154
57291
  var urlRegex = /^(?:(?:https?):\/\/)?(?:www\.)?(?:[\w-]+\.)+[a-z]{2,7}(?:\/\S*)?$/i;
57155
57292
  var ZodFlexibleUrl = external_exports.string({ message: "Invalid URL" }).regex(urlRegex).transform((url2) => {
57156
57293
  if (!url2)
@@ -61463,6 +61600,7 @@ function getConfig(schema, testValues) {
61463
61600
  var config3 = getConfig({
61464
61601
  // config
61465
61602
  APP_VERSION: types.string().optional(),
61603
+ DD_SERVICE: types.string().optional(),
61466
61604
  LOGGER_CONSOLE_ENABLED: types.boolean().optional(),
61467
61605
  LOGGER_STDOUT_ENABLED: types.boolean().optional(),
61468
61606
  NODE_ENV: types.enum(["local", "test", "staging", "sandbox", "production"]),
@@ -61472,6 +61610,7 @@ var config3 = getConfig({
61472
61610
  // secrets
61473
61611
  }, {
61474
61612
  APP_VERSION: void 0,
61613
+ DD_SERVICE: void 0,
61475
61614
  LOGGER_CONSOLE_ENABLED: false,
61476
61615
  LOGGER_STDOUT_ENABLED: false,
61477
61616
  EVENT_LOOP_MONITORING_ENABLED: false,
@@ -61750,13 +61889,16 @@ var loggerFactory = buildLoggerFactory({
61750
61889
  },
61751
61890
  context: {
61752
61891
  env: config3.NODE_ENV,
61753
- service: "api",
61892
+ service: config3.DD_SERVICE ?? "api",
61754
61893
  version: config3.APP_VERSION
61755
61894
  }
61756
61895
  });
61757
61896
  var createLogger2 = loggerFactory.createLogger;
61758
61897
  var logger = loggerFactory.createLogger({ serviceName: "default" });
61759
61898
 
61899
+ // ../hyperline-monitoring/build/tracing/tracing.js
61900
+ import tracer from "dd-trace";
61901
+
61760
61902
  // ../hyperline-lib/build/utils/config/usStates.js
61761
61903
  var usStates = [
61762
61904
  "AA",
@@ -61941,6 +62083,7 @@ var languages = [
61941
62083
  var de = {
61942
62084
  "accounting.invoicePosted.entryDescription": "Buchungseintrag f\xFCr Rechnung {{invoiceId}}",
61943
62085
  "accounting.transactionSettled.entryDescription": "Zahlungsabwicklung f\xFCr Rechnung {{invoiceId}}",
62086
+ "accounting.transactionRefunded.entryDescription": "R\xFCckerstattung f\xFCr Rechnung {{invoiceId}}",
61944
62087
  "accounting.creditNotePosted.entryDescription": "Gutschrift {{creditNoteId}} f\xFCr Rechnung {{invoiceId}}",
61945
62088
  "accounting.revrec.creditLineDescription": "Umsatz realisieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
61946
62089
  "accounting.revrec.debitLineDescription": "Abgrenzungsposten reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
@@ -62006,6 +62149,7 @@ var en = {
62006
62149
  "subscriptions.updates.updateCount.description.full.not_committed.not_invoiced": "Amount of {{amount}} not invoiced for the full period",
62007
62150
  "accounting.invoicePosted.entryDescription": "Posting entry for Invoice {{invoiceId}} issued",
62008
62151
  "accounting.transactionSettled.entryDescription": "Payment settlement for Invoice {{invoiceId}}",
62152
+ "accounting.transactionRefunded.entryDescription": "Refund for Invoice {{invoiceId}}",
62009
62153
  "accounting.creditNotePosted.entryDescription": "Credit note {{creditNoteId}} for Invoice {{invoiceId}}",
62010
62154
  "accounting.revrec.entryDescription": "Revenue recognition for schedule {{scheduleId}}, period {{periodStart}} - {{periodEnd}}",
62011
62155
  "accounting.revrec.debitLineDescription": "Decrease deferred revenue \u2013 schedule {{scheduleId}}, period {{periodDate}}",
@@ -62021,6 +62165,7 @@ var en = {
62021
62165
  var es = {
62022
62166
  "accounting.invoicePosted.entryDescription": "Asiento contable para la factura {{invoiceId}}",
62023
62167
  "accounting.transactionSettled.entryDescription": "Liquidaci\xF3n de pago para la factura {{invoiceId}}",
62168
+ "accounting.transactionRefunded.entryDescription": "Reembolso de la factura {{invoiceId}}",
62024
62169
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para la factura {{invoiceId}}",
62025
62170
  "accounting.revrec.creditLineDescription": "Reconocer ingresos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62026
62171
  "accounting.revrec.debitLineDescription": "Disminuci\xF3n de ingresos diferidos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
@@ -62065,6 +62210,7 @@ var fr = {
62065
62210
  "accounting.revrec.discountDebitLineDescription": "Diminution des remises diff\xE9r\xE9es \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62066
62211
  "accounting.invoicePosted.entryDescription": "\xC9criture de comptabilisation pour la facture {{invoiceId}}",
62067
62212
  "accounting.transactionSettled.entryDescription": "R\xE8glement de la facture {{invoiceId}}",
62213
+ "accounting.transactionRefunded.entryDescription": "Remboursement de la facture {{invoiceId}}",
62068
62214
  "accounting.creditNotePosted.entryDescription": "Avoir {{creditNoteId}} pour la facture {{invoiceId}}",
62069
62215
  "accounting.revrec.entryDescription": "Reconnaissance du chiffre d'affaires pour l'\xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodStart}} - {{periodEnd}}",
62070
62216
  "creditNotes.refundChargeName": "Remboursement pour facture",
@@ -62101,6 +62247,7 @@ var fr = {
62101
62247
  var it = {
62102
62248
  "accounting.invoicePosted.entryDescription": "Registrazione contabile per la fattura {{invoiceId}}",
62103
62249
  "accounting.transactionSettled.entryDescription": "Regolamento pagamento per la fattura {{invoiceId}}",
62250
+ "accounting.transactionRefunded.entryDescription": "Rimborso per la fattura {{invoiceId}}",
62104
62251
  "accounting.creditNotePosted.entryDescription": "Nota di credito {{creditNoteId}} per la fattura {{invoiceId}}",
62105
62252
  "accounting.revrec.creditLineDescription": "Riconoscere i ricavi \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62106
62253
  "accounting.revrec.debitLineDescription": "Diminuzione dei ricavi differiti \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
@@ -62141,6 +62288,7 @@ var it = {
62141
62288
  var nl = {
62142
62289
  "accounting.invoicePosted.entryDescription": "Boekingsregel voor factuur {{invoiceId}}",
62143
62290
  "accounting.transactionSettled.entryDescription": "Betalingsafwikkeling voor factuur {{invoiceId}}",
62291
+ "accounting.transactionRefunded.entryDescription": "Terugbetaling voor factuur {{invoiceId}}",
62144
62292
  "accounting.creditNotePosted.entryDescription": "Creditnota {{creditNoteId}} voor factuur {{invoiceId}}",
62145
62293
  "accounting.revrec.creditLineDescription": "Omzet erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
62146
62294
  "accounting.revrec.debitLineDescription": "Uitgestelde omzet verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
@@ -62181,6 +62329,7 @@ var nl = {
62181
62329
  var pl = {
62182
62330
  "accounting.invoicePosted.entryDescription": "Zapis ksi\u0119gowy dla faktury {{invoiceId}}",
62183
62331
  "accounting.transactionSettled.entryDescription": "Rozliczenie p\u0142atno\u015Bci dla faktury {{invoiceId}}",
62332
+ "accounting.transactionRefunded.entryDescription": "Zwrot za faktur\u0119 {{invoiceId}}",
62184
62333
  "accounting.creditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}} dla faktury {{invoiceId}}",
62185
62334
  "accounting.revrec.creditLineDescription": "Rozpoznanie przychodu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
62186
62335
  "accounting.revrec.debitLineDescription": "Zmniejszenie przychod\xF3w przysz\u0142ych okres\xF3w \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
@@ -62221,6 +62370,7 @@ var pl = {
62221
62370
  var pt = {
62222
62371
  "accounting.invoicePosted.entryDescription": "Lan\xE7amento cont\xE1bil para a fatura {{invoiceId}}",
62223
62372
  "accounting.transactionSettled.entryDescription": "Liquida\xE7\xE3o de pagamento para a fatura {{invoiceId}}",
62373
+ "accounting.transactionRefunded.entryDescription": "Reembolso da fatura {{invoiceId}}",
62224
62374
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para a fatura {{invoiceId}}",
62225
62375
  "accounting.revrec.creditLineDescription": "Reconhecer receita \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62226
62376
  "accounting.revrec.debitLineDescription": "Diminui\xE7\xE3o da receita diferida \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
@@ -62455,6 +62605,9 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
62455
62605
 
62456
62606
  // ../hyperline-mcp/build/server/server.js
62457
62607
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
62608
+ var defaultToolOutputSchema = {
62609
+ result: external_exports.unknown()
62610
+ };
62458
62611
 
62459
62612
  // ../hyperline-mcp/build/session/sessionKey.js
62460
62613
  import { createHmac } from "node:crypto";
@@ -4,6 +4,7 @@
4
4
  "axios": "1.13.2",
5
5
  "axios-retry": "4.5.0",
6
6
  "commander": "13.1.0",
7
+ "dd-trace": "5.45.0",
7
8
  "dotenv": "16.3.1",
8
9
  "express": "5.2.1",
9
10
  "express-idempotency": "2.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.ac78a09",
3
+ "version": "0.1.0-build.1.af7811b",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,6 +27,7 @@
27
27
  "axios": "1.13.2",
28
28
  "axios-retry": "4.5.0",
29
29
  "commander": "13.1.0",
30
+ "dd-trace": "5.45.0",
30
31
  "dotenv": "16.3.1",
31
32
  "express": "5.2.1",
32
33
  "express-idempotency": "2.0.0",