@hyperline/cli 0.1.0-build.1.0c8eac2 → 0.1.0-build.1.0e4d371

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.
@@ -40726,7 +40726,7 @@ Examples:
40726
40726
  queryParamKeys: ["take", "skip"]
40727
40727
  });
40728
40728
  });
40729
- 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 <json>", `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 <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).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", `
40729
+ 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 <json>", `Products the coupon is scoped to, read together with \`product_scope\`: the only discounted products when \`include\`, the products never discounted when \`exclude\`, empty when \`all\`.`).option("--product-scope <value>", `Which products the coupon discounts. \`all\`: every product (\`product_ids\` must be empty). \`include\`: only the products in \`product_ids\`. \`exclude\`: every product except those in \`product_ids\` (lines without a product stay discounted). \`include\` and \`exclude\` require a non-empty \`product_ids\`. When omitted on create/update, it is inferred: \`include\` if \`product_ids\` is non-empty, \`all\` otherwise. Integrations that read \`product_ids\` without \`product_scope\` will misread an \`exclude\` list as the products the coupon applies to.`).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 <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).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", `
40730
40730
  Examples:
40731
40731
  hyperline coupons create --name <name> --type <type>
40732
40732
  hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -40743,6 +40743,8 @@ Examples:
40743
40743
  args.description = opts.description;
40744
40744
  if (opts.expirationDate !== void 0)
40745
40745
  args.expiration_date = opts.expirationDate;
40746
+ if (opts.productScope !== void 0)
40747
+ args.product_scope = opts.productScope;
40746
40748
  if (opts.repeat !== void 0)
40747
40749
  args.repeat = opts.repeat;
40748
40750
  if (opts.type !== void 0)
@@ -40786,7 +40788,7 @@ Examples:
40786
40788
  queryParamKeys: []
40787
40789
  });
40788
40790
  });
40789
- 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 <json>", `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 <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).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", `
40791
+ 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 <json>", `Products the coupon is scoped to, read together with \`product_scope\`: the only discounted products when \`include\`, the products never discounted when \`exclude\`, empty when \`all\`.`).option("--product-scope <value>", `Which products the coupon discounts. \`all\`: every product (\`product_ids\` must be empty). \`include\`: only the products in \`product_ids\`. \`exclude\`: every product except those in \`product_ids\` (lines without a product stay discounted). \`include\` and \`exclude\` require a non-empty \`product_ids\`. When omitted on create/update, it is inferred: \`include\` if \`product_ids\` is non-empty, \`all\` otherwise. Integrations that read \`product_ids\` without \`product_scope\` will misread an \`exclude\` list as the products the coupon applies to.`).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 <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).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", `
40790
40792
  Examples:
40791
40793
  hyperline coupons update --id <id> --name <name> --type <type>
40792
40794
  hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -40805,6 +40807,8 @@ Examples:
40805
40807
  args.description = opts.description;
40806
40808
  if (opts.expirationDate !== void 0)
40807
40809
  args.expiration_date = opts.expirationDate;
40810
+ if (opts.productScope !== void 0)
40811
+ args.product_scope = opts.productScope;
40808
40812
  if (opts.repeat !== void 0)
40809
40813
  args.repeat = opts.repeat;
40810
40814
  if (opts.type !== void 0)
@@ -41155,7 +41159,15 @@ Examples:
41155
41159
  // build/commands/generated/customers.js
41156
41160
  function registerCustomersCommands(parent) {
41157
41161
  const resource = parent.command("customers").description("Manage customers");
41158
- 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", `
41162
+ resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, tax_id_status, 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("--tax-id-status <value>", `
41163
+ Verification status of the customer tax ID.
41164
+
41165
+ - \`valid\`: Tax ID has been verified and is valid.
41166
+ - \`invalid\`: Tax ID has been verified and is invalid.
41167
+ - \`mismatch\`: Tax ID is valid but is for a different country than the customer's country.
41168
+ - \`unverified\`: Tax ID has not been verified yet.
41169
+ - \`unsupported\`: Tax ID verification for this type not supported yet.
41170
+ `).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", `
41159
41171
  Examples:
41160
41172
  hyperline customers list
41161
41173
  hyperline customers list --limit <limit> --cursor <cursor>`).action(async (opts) => {
@@ -41173,6 +41185,8 @@ Examples:
41173
41185
  args.order = opts.order;
41174
41186
  if (opts.sort !== void 0)
41175
41187
  args.sort = opts.sort;
41188
+ if (opts.taxIdStatus !== void 0)
41189
+ args.tax_id_status = opts.taxIdStatus;
41176
41190
  if (opts.name !== void 0)
41177
41191
  args.name = opts.name;
41178
41192
  if (opts["name.not"] !== void 0)
@@ -41357,6 +41371,7 @@ Examples:
41357
41371
  "include_total",
41358
41372
  "order",
41359
41373
  "sort",
41374
+ "tax_id_status",
41360
41375
  "name",
41361
41376
  "name__not",
41362
41377
  "name__isNull",
@@ -44294,7 +44309,7 @@ Examples:
44294
44309
  queryParamKeys: []
44295
44310
  });
44296
44311
  });
44297
- resource.command("create").description(`Create a new price configuration on an existing product. Specify the product_id, pricing type (fee, volume, bulk, packaged, bps, bundle), currency, billing interval, and price tiers. Supports metering_filter for dynamic products.`).requiredOption("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--countries <json>", `Countries this price configuration is eligible in. Omit or send \`null\` to make it eligible in every country. An empty array restricts it to customers that have no country set.`).option("--price-book-id <value>", `ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book.`).requiredOption("--billing-interval <json>", `Billing interval on which the price configuration is eligible.`).option("--commitment-interval <json>", `Commitment interval on which the price configuration is eligible.`).requiredOption("--type <value>", `type`).requiredOption("--prices <json>", `Price tiers of the price configuration. If fixed amount, only one price is available.`).requiredOption("--product-id <value>", `ID of the product to add the price configuration to.`).option("--metering-filter <json>", `Filter to scope which billable events are eligible for this price configuration.`).option("--allow-on-portal", `allow_on_portal`).addHelpText("after", `
44312
+ resource.command("create").description(`Create a new price configuration on an existing product. Specify the product_id, pricing type (fee, volume, bulk, packaged, bps, bundle), currency, billing interval, and price tiers. Supports metering_filter for dynamic products.`).requiredOption("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--countries <json>", `Countries this price configuration is eligible in. Omit or send \`null\` to make it eligible in every country. An empty array restricts it to customers that have no country set.`).option("--price-book-id <value>", `ID of the price book to which this price configuration belongs to. If null, the price configuration belongs to the default price book.`).requiredOption("--billing-interval <json>", `Billing interval on which the price configuration is eligible.`).option("--commitment-interval <json>", `Commitment interval on which the price configuration is eligible.`).requiredOption("--type <value>", `type`).requiredOption("--prices <json>", `Price tiers of the price configuration. If fixed amount, only one price is available.`).requiredOption("--product-id <value>", `ID of the product to add the price configuration to.`).option("--metering-filter <json>", `Filter to scope which billable events are eligible for this price configuration.`).option("--aggregator-filter-id <value>", `ID of an existing metering filter of the product's aggregator to attach to this price configuration, instead of creating a new one with \`metering_filter\`.`).option("--allow-on-portal", `allow_on_portal`).addHelpText("after", `
44298
44313
  Examples:
44299
44314
  hyperline price-configurations create --currency <currency> --billing-interval <billing_interval> --type <type> --prices <prices> --product-id <product_id>
44300
44315
  hyperline price-configurations create --currency <currency> --billing-interval <billing_interval> --type <type> --prices <prices> --product-id <product_id> --countries <countries> --price-book-id <price_book_id>
@@ -44313,6 +44328,8 @@ Examples:
44313
44328
  args.type = opts.type;
44314
44329
  if (opts.productId !== void 0)
44315
44330
  args.product_id = opts.productId;
44331
+ if (opts.aggregatorFilterId !== void 0)
44332
+ args.aggregator_filter_id = opts.aggregatorFilterId;
44316
44333
  if (opts.allowOnPortal !== void 0)
44317
44334
  args.allow_on_portal = true;
44318
44335
  if (opts.countries !== void 0)
@@ -44731,7 +44748,7 @@ Quote status.
44731
44748
  - \`all\`: Display all pricing tiers.
44732
44749
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
44733
44750
  - \`none\`: Hide all pricing tiers.
44734
- `).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("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).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 <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `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", `
44751
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).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("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).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 <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `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", `
44735
44752
  Examples:
44736
44753
  hyperline quotes create --customer-id <customer_id>
44737
44754
  hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
@@ -44770,6 +44787,8 @@ Examples:
44770
44787
  args.display_price_tiers = opts.displayPriceTiers;
44771
44788
  if (opts.displayPhaseValue !== void 0)
44772
44789
  args.display_phase_value = opts.displayPhaseValue;
44790
+ if (opts.displayDiscountsOnTotal !== void 0)
44791
+ args.display_discounts_on_total = opts.displayDiscountsOnTotal;
44773
44792
  if (opts.displayFirstInvoiceAmount !== void 0)
44774
44793
  args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
44775
44794
  if (opts.displayDocumentsInPreview !== void 0)
@@ -45025,7 +45044,7 @@ Examples:
45025
45044
  - \`all\`: Display all pricing tiers.
45026
45045
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
45027
45046
  - \`none\`: Hide all pricing tiers.
45028
- `).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("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `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", `
45047
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).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("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `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", `
45029
45048
  Examples:
45030
45049
  hyperline quotes update --id <id>
45031
45050
  hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
@@ -45060,6 +45079,8 @@ Examples:
45060
45079
  args.display_price_tiers = opts.displayPriceTiers;
45061
45080
  if (opts.displayPhaseValue !== void 0)
45062
45081
  args.display_phase_value = opts.displayPhaseValue;
45082
+ if (opts.displayDiscountsOnTotal !== void 0)
45083
+ args.display_discounts_on_total = opts.displayDiscountsOnTotal;
45063
45084
  if (opts.displayFirstInvoiceAmount !== void 0)
45064
45085
  args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
45065
45086
  if (opts.displayDocumentsInPreview !== void 0)
@@ -45153,6 +45174,25 @@ Examples:
45153
45174
  queryParamKeys: []
45154
45175
  });
45155
45176
  });
45177
+ resource.command("redraft").description(`Switch a quote back to draft so its subscription or invoice configuration can be updated. Works on quotes pending approval, with changes requested, approved, or awaiting signature. Cancels pending approval requests and the signature request; the quote must then be finalized again.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
45178
+ Examples:
45179
+ hyperline quotes redraft --id <id>
45180
+ hyperline quotes redraft --id <id> --output json`).action(async (opts) => {
45181
+ const ctx = resource.parent?.opts()._ctx;
45182
+ if (!ctx) {
45183
+ process.stderr.write("Error: Not authenticated\n");
45184
+ process.exit(1);
45185
+ }
45186
+ const args = {};
45187
+ if (opts.id !== void 0)
45188
+ args.id = opts.id;
45189
+ await ctx.execute({
45190
+ method: "POST",
45191
+ path: "/v1/quotes/{id}/redraft",
45192
+ args,
45193
+ queryParamKeys: []
45194
+ });
45195
+ });
45156
45196
  resource.command("send").description(`Send a quote by email for customer signature. Requires the quote to be approved first.`).requiredOption("--id <value>", `id parameter`).option("--email <value>", `Email address to which the quote will be sent for signature. Required unless the quote has signers, in which case the email goes to the signers of the current step and this field is ignored.`).option("--message <value>", `Custom message used in the email content.`).addHelpText("after", `
45157
45197
  Examples:
45158
45198
  hyperline quotes send --id <id>
@@ -63891,6 +63931,223 @@ import * as winston from "winston";
63891
63931
 
63892
63932
  // ../hyperline-monitoring/build/logger/formatting/format.js
63893
63933
  import prune from "json-prune";
63934
+
63935
+ // ../hyperline-monitoring/build/logger/formatting/logRedaction.js
63936
+ var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
63937
+ "accesstoken",
63938
+ "apitoken",
63939
+ "assertion",
63940
+ "authorization",
63941
+ "authtoken",
63942
+ "cardnumber",
63943
+ "clientassertion",
63944
+ "codeverifier",
63945
+ "connectionurl",
63946
+ "consumerkey",
63947
+ "cookie",
63948
+ "credential",
63949
+ "credentials",
63950
+ "iban",
63951
+ "idtoken",
63952
+ "privatekey",
63953
+ "publictoken",
63954
+ "refreshtoken",
63955
+ "sessiontoken",
63956
+ "token",
63957
+ "tokenid",
63958
+ "verificationcode"
63959
+ ]);
63960
+ var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password|passphrase|apikey)$/;
63961
+ var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|pass|assertion|verifier|credential|authorization|cookie|iban|cardnumber|code|connectionurl/i;
63962
+ var URL_ONLY_REDACTED_KEYS = /* @__PURE__ */ new Set(["key"]);
63963
+ var OAUTH_CODE_KEY = "code";
63964
+ var OAUTH_CODE_CONTEXT_KEYS = ["state", "grant_type"];
63965
+ var REDACTED_VALUE = "<redacted>";
63966
+ var TRUNCATED_VALUE = "[TRUNCATED: not redacted]";
63967
+ var TRUNCATED_KEY = "[TRUNCATED]";
63968
+ var MAX_REDACTION_DEPTH = 6;
63969
+ var MAX_ARRAY_ENTRIES = 50;
63970
+ var MAX_PARSED_STRING_LENGTH = 16384;
63971
+ var MAX_VISITED_NODES = 5e3;
63972
+ var MAX_CONTAINER_ENTRIES = 1e3;
63973
+ var MAX_STRING_CHARACTERS = 256e3;
63974
+ function redactLogBody({ body }) {
63975
+ return redactValue({
63976
+ value: body,
63977
+ depth: MAX_REDACTION_DEPTH,
63978
+ budget: {
63979
+ remainingNodes: MAX_VISITED_NODES,
63980
+ remainingChars: MAX_STRING_CHARACTERS
63981
+ }
63982
+ });
63983
+ }
63984
+ function redactLogUrl({ url: url2 }) {
63985
+ const queryIndex = url2.indexOf("?");
63986
+ if (queryIndex === -1) {
63987
+ return url2;
63988
+ }
63989
+ if (url2.length > MAX_PARSED_STRING_LENGTH) {
63990
+ return `${url2.slice(0, queryIndex)}?${TRUNCATED_VALUE}`;
63991
+ }
63992
+ const redactedQuery = redactFormEncoded({
63993
+ text: url2.slice(queryIndex + 1),
63994
+ extraRedactedKeys: URL_ONLY_REDACTED_KEYS
63995
+ });
63996
+ return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
63997
+ }
63998
+ function redactValue({ value, depth, budget }) {
63999
+ if (isOpaqueObject({ value })) {
64000
+ return replaceOpaqueObject({ value });
64001
+ }
64002
+ if (typeof value === "string") {
64003
+ if (value.length > budget.remainingChars) {
64004
+ return TRUNCATED_VALUE;
64005
+ }
64006
+ budget.remainingChars -= value.length;
64007
+ }
64008
+ if (depth <= 0 || budget.remainingNodes <= 0) {
64009
+ return isInspectable({ value }) ? TRUNCATED_VALUE : value;
64010
+ }
64011
+ budget.remainingNodes -= 1;
64012
+ if (typeof value === "string") {
64013
+ return redactString({ text: value, budget });
64014
+ }
64015
+ if (value instanceof URLSearchParams) {
64016
+ return redactValue({ value: value.toString(), depth, budget });
64017
+ }
64018
+ if (Array.isArray(value)) {
64019
+ return redactArray({ items: value, depth, budget });
64020
+ }
64021
+ if (isPlainObject2(value)) {
64022
+ return redactObject({ record: value, depth, budget });
64023
+ }
64024
+ return value;
64025
+ }
64026
+ function isOpaqueObject({ value }) {
64027
+ return typeof value === "object" && value !== null && !Array.isArray(value) && !isPlainObject2(value) && !(value instanceof URLSearchParams);
64028
+ }
64029
+ function replaceOpaqueObject({ value }) {
64030
+ if (typeof value !== "object" || value === null || value instanceof Date) {
64031
+ return value;
64032
+ }
64033
+ if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
64034
+ return `[BINARY ${value.byteLength} bytes]`;
64035
+ }
64036
+ if (value instanceof Blob) {
64037
+ return `[BINARY ${value.size} bytes]`;
64038
+ }
64039
+ if (value instanceof FormData || typeof Reflect.get(value, "pipe") === "function") {
64040
+ return "[BINARY stream]";
64041
+ }
64042
+ return TRUNCATED_VALUE;
64043
+ }
64044
+ function redactArray({ items, depth, budget }) {
64045
+ const isTruncated = items.length > MAX_ARRAY_ENTRIES;
64046
+ const keptItems = isTruncated ? items.slice(0, MAX_ARRAY_ENTRIES) : items;
64047
+ let redactedItems;
64048
+ for (const [index, item] of keptItems.entries()) {
64049
+ const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
64050
+ if (redactedItem !== item) {
64051
+ redactedItems ??= [...keptItems];
64052
+ redactedItems[index] = redactedItem;
64053
+ }
64054
+ }
64055
+ const result = redactedItems ?? keptItems;
64056
+ return isTruncated ? [...result, TRUNCATED_VALUE] : result;
64057
+ }
64058
+ function redactObject({ record: record2, depth, budget }) {
64059
+ const redactedEntries = /* @__PURE__ */ new Map();
64060
+ const carriesOAuthCode = OAUTH_CODE_CONTEXT_KEYS.some((contextKey) => Object.hasOwn(record2, contextKey));
64061
+ const keptKeys = [];
64062
+ let isTruncated = false;
64063
+ for (const key in record2) {
64064
+ if (!Object.hasOwn(record2, key)) {
64065
+ continue;
64066
+ }
64067
+ if (keptKeys.length >= MAX_CONTAINER_ENTRIES || key.length > budget.remainingChars) {
64068
+ isTruncated = true;
64069
+ break;
64070
+ }
64071
+ budget.remainingChars -= key.length;
64072
+ keptKeys.push(key);
64073
+ const nestedValue = record2[key];
64074
+ const isSensitiveKey = isRedactedKey({ key }) || carriesOAuthCode && key === OAUTH_CODE_KEY;
64075
+ const shouldRedact = isSensitiveKey && nestedValue != null && typeof nestedValue !== "boolean";
64076
+ if (shouldRedact) {
64077
+ budget.remainingNodes -= 1;
64078
+ }
64079
+ const redactedNestedValue = shouldRedact ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
64080
+ if (redactedNestedValue !== nestedValue) {
64081
+ redactedEntries.set(key, redactedNestedValue);
64082
+ }
64083
+ }
64084
+ if (isTruncated) {
64085
+ const keptRecord = {};
64086
+ for (const key of keptKeys) {
64087
+ keptRecord[key] = redactedEntries.has(key) ? redactedEntries.get(key) : record2[key];
64088
+ }
64089
+ keptRecord[TRUNCATED_KEY] = TRUNCATED_VALUE;
64090
+ return keptRecord;
64091
+ }
64092
+ return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
64093
+ }
64094
+ function redactString({ text, budget }) {
64095
+ if (text.length > MAX_PARSED_STRING_LENGTH) {
64096
+ return TRUNCATED_VALUE;
64097
+ }
64098
+ if (!isInspectable({ value: text })) {
64099
+ return text;
64100
+ }
64101
+ const trimmedText = text.trim();
64102
+ if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
64103
+ try {
64104
+ const parsedValue = JSON.parse(trimmedText);
64105
+ const redactedValue = redactValue({
64106
+ value: parsedValue,
64107
+ depth: MAX_REDACTION_DEPTH,
64108
+ budget
64109
+ });
64110
+ return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
64111
+ } catch {
64112
+ return REDACTED_KEY_CANDIDATE_PATTERN.test(text) ? TRUNCATED_VALUE : redactFormEncoded({ text }) ?? text;
64113
+ }
64114
+ }
64115
+ return redactFormEncoded({ text }) ?? text;
64116
+ }
64117
+ function redactFormEncoded({ text, extraRedactedKeys }) {
64118
+ if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
64119
+ return void 0;
64120
+ }
64121
+ const params = new URLSearchParams(text);
64122
+ const carriesOAuthCode = OAUTH_CODE_CONTEXT_KEYS.some((contextKey) => params.has(contextKey));
64123
+ let hasRedactedParam = false;
64124
+ for (const key of new Set(params.keys())) {
64125
+ if (isRedactedKey({ key }) || extraRedactedKeys?.has(key.toLowerCase()) || carriesOAuthCode && key === OAUTH_CODE_KEY) {
64126
+ params.set(key, REDACTED_VALUE);
64127
+ hasRedactedParam = true;
64128
+ }
64129
+ }
64130
+ return hasRedactedParam ? params.toString() : void 0;
64131
+ }
64132
+ function isRedactedKey({ key }) {
64133
+ const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
64134
+ return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
64135
+ }
64136
+ function isInspectable({ value }) {
64137
+ if (typeof value === "string") {
64138
+ return value.length > MAX_PARSED_STRING_LENGTH || /^\s*[{[]/.test(value) || value.includes("=") && REDACTED_KEY_CANDIDATE_PATTERN.test(value);
64139
+ }
64140
+ return value instanceof URLSearchParams || Array.isArray(value) || isPlainObject2(value);
64141
+ }
64142
+ function isPlainObject2(value) {
64143
+ if (typeof value !== "object" || value === null) {
64144
+ return false;
64145
+ }
64146
+ const prototype = Object.getPrototypeOf(value);
64147
+ return prototype === Object.prototype || prototype === null;
64148
+ }
64149
+
64150
+ // ../hyperline-monitoring/build/logger/formatting/format.js
63894
64151
  var REDACTED_HEADER_KEY_PATTERN = /authorization|authenticate|cookie|secret|token|credential|signature|jwt|api[_-]?key|access[_-]?token|refresh[_-]?token|private[_-]?key/i;
63895
64152
  function jsonFormat(info) {
63896
64153
  const prunedInfo = JSON.parse(prune(info));
@@ -63951,14 +64208,106 @@ function transformPrune(info) {
63951
64208
  });
63952
64209
  return info;
63953
64210
  }
64211
+ var MAX_AXIOS_ERROR_DEPTH = 5;
64212
+ var MAX_AXIOS_ERROR_CONTAINER_ENTRIES = 1e3;
64213
+ var MAX_AXIOS_ERROR_VISITED_NODES = 5e3;
64214
+ var REDACTED_BODY_KEYS = /* @__PURE__ */ new Set(["requestBody", "responseBody"]);
63954
64215
  function transformAxiosError(info) {
63955
- Object.entries(info).forEach(([key, value]) => {
63956
- if (typeof value === "object" && value?.name === "AxiosError") {
63957
- info[key] = formatAxiosError(value);
64216
+ let walk;
64217
+ for (const [key, value] of Object.entries(info)) {
64218
+ if (typeof value !== "object" || value === null || REDACTED_BODY_KEYS.has(key)) {
64219
+ continue;
63958
64220
  }
63959
- });
64221
+ walk ??= {
64222
+ formatted: /* @__PURE__ */ new Map(),
64223
+ remainingNodes: MAX_AXIOS_ERROR_VISITED_NODES
64224
+ };
64225
+ const formattedValue = formatNestedAxiosErrors({
64226
+ value,
64227
+ depth: MAX_AXIOS_ERROR_DEPTH,
64228
+ walk
64229
+ });
64230
+ if (formattedValue !== value) {
64231
+ info[key] = formattedValue;
64232
+ }
64233
+ }
63960
64234
  return info;
63961
64235
  }
64236
+ function formatNestedAxiosErrors({ value, depth, walk }) {
64237
+ if (typeof value !== "object" || value === null) {
64238
+ return value;
64239
+ }
64240
+ if (walk.formatted.has(value)) {
64241
+ return walk.formatted.get(value);
64242
+ }
64243
+ if (Reflect.get(value, "name") === "AxiosError") {
64244
+ const formattedError = walk.remainingNodes > 0 ? formatAxiosError(value) : summarizeAxiosError({ error: value });
64245
+ walk.remainingNodes -= 1;
64246
+ walk.formatted.set(value, formattedError);
64247
+ return formattedError;
64248
+ }
64249
+ const isWalkable = Array.isArray(value) || value instanceof Error || isPlainRecord(value);
64250
+ if (!isWalkable || depth <= 0 || walk.remainingNodes <= 0) {
64251
+ return value;
64252
+ }
64253
+ walk.formatted.set(value, "[Circular]");
64254
+ walk.remainingNodes -= 1;
64255
+ const formattedValue = formatWalkableValue({ value, depth, walk });
64256
+ walk.formatted.set(value, formattedValue);
64257
+ return formattedValue;
64258
+ }
64259
+ function summarizeAxiosError({ error: error48 }) {
64260
+ return {
64261
+ name: Reflect.get(error48, "name"),
64262
+ message: Reflect.get(error48, "message"),
64263
+ code: Reflect.get(error48, "code")
64264
+ };
64265
+ }
64266
+ function formatWalkableValue({ value, depth, walk }) {
64267
+ if (Array.isArray(value)) {
64268
+ if (value.length > MAX_AXIOS_ERROR_CONTAINER_ENTRIES) {
64269
+ return value;
64270
+ }
64271
+ let formattedItems;
64272
+ for (const [index, item] of value.entries()) {
64273
+ const formattedItem = formatNestedAxiosErrors({
64274
+ value: item,
64275
+ depth: depth - 1,
64276
+ walk
64277
+ });
64278
+ if (formattedItem !== item) {
64279
+ formattedItems ??= [...value];
64280
+ formattedItems[index] = formattedItem;
64281
+ }
64282
+ }
64283
+ return formattedItems ?? value;
64284
+ }
64285
+ const keys = Object.keys(value);
64286
+ if (keys.length > MAX_AXIOS_ERROR_CONTAINER_ENTRIES) {
64287
+ return value;
64288
+ }
64289
+ const formattedEntries = /* @__PURE__ */ new Map();
64290
+ for (const key of keys) {
64291
+ const nestedValue = Reflect.get(value, key);
64292
+ const formattedNestedValue = formatNestedAxiosErrors({
64293
+ value: nestedValue,
64294
+ depth: depth - 1,
64295
+ walk
64296
+ });
64297
+ if (formattedNestedValue !== nestedValue) {
64298
+ formattedEntries.set(key, formattedNestedValue);
64299
+ }
64300
+ }
64301
+ if (formattedEntries.size === 0) {
64302
+ return value;
64303
+ }
64304
+ return {
64305
+ ...value,
64306
+ // Error properties are not enumerable, so the spread would drop them.
64307
+ ...value instanceof Error ? { name: value.name, message: value.message, stack: value.stack } : {},
64308
+ ...Object.fromEntries(formattedEntries)
64309
+ };
64310
+ }
63962
64311
  function formatAxiosError(error48) {
63963
64312
  if (!isRecord(error48) || error48.name !== "AxiosError") {
63964
64313
  return error48;
@@ -63971,9 +64320,9 @@ function formatAxiosError(error48) {
63971
64320
  code: error48.code,
63972
64321
  request: {
63973
64322
  method: request?.method,
63974
- url: request?.url,
64323
+ url: typeof request?.url === "string" ? redactLogUrl({ url: request.url }) : request?.url,
63975
64324
  baseURL: request?.baseURL,
63976
- params: request?.params,
64325
+ params: redactLogBody({ body: request?.params }),
63977
64326
  headers: redactHeaders({ headers: request?.headers }),
63978
64327
  "axios-retry": request?.["axios-retry"]
63979
64328
  },
@@ -63981,7 +64330,7 @@ function formatAxiosError(error48) {
63981
64330
  status: response?.status,
63982
64331
  statusText: response?.statusText,
63983
64332
  headers: redactHeaders({ headers: response?.headers }),
63984
- data: response?.data
64333
+ data: redactLogBody({ body: response?.data })
63985
64334
  }
63986
64335
  };
63987
64336
  }
@@ -63994,6 +64343,10 @@ function redactHeaders({ headers }) {
63994
64343
  REDACTED_HEADER_KEY_PATTERN.test(headerKey) ? "<redacted>" : headerValue
63995
64344
  ]));
63996
64345
  }
64346
+ function isPlainRecord(value) {
64347
+ const prototype = Object.getPrototypeOf(value);
64348
+ return prototype === Object.prototype || prototype === null;
64349
+ }
63997
64350
  function isRecord(value) {
63998
64351
  return typeof value === "object" && value !== null && !Array.isArray(value);
63999
64352
  }
@@ -64023,7 +64376,7 @@ function logHttpResponse(logger2, response, responseTime, extra) {
64023
64376
  const responseMetadata = {
64024
64377
  statusCode,
64025
64378
  responseTime,
64026
- responseBody,
64379
+ responseBody: redactLogBody({ body: responseBody }),
64027
64380
  // Redacted so secrets (authorization/cookie/token/…) never reach the logs
64028
64381
  // while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
64029
64382
  responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
@@ -64036,14 +64389,15 @@ function logHttpResponse(logger2, response, responseTime, extra) {
64036
64389
  }
64037
64390
  function transform2(request) {
64038
64391
  const method = request.method.toUpperCase();
64039
- const message = `${method} ${request.originalUrl}`;
64392
+ const originalUrl = redactLogUrl({ url: request.originalUrl });
64393
+ const message = `${method} ${originalUrl}`;
64040
64394
  const metadata = {};
64041
64395
  metadata.method = method;
64042
- metadata.url = request.url;
64043
- metadata.path = request.path;
64396
+ metadata.url = redactLogUrl({ url: request.url });
64397
+ metadata.path = redactLogUrl({ url: request.path });
64044
64398
  metadata.hostname = request.hostname;
64045
- metadata.originalUrl = request.originalUrl;
64046
- metadata.requestBody = request.body && typeof request.body === "object" && "apiKey" in request.body ? { ...request.body, apiKey: "<redacted>" } : request.body;
64399
+ metadata.originalUrl = originalUrl;
64400
+ metadata.requestBody = redactLogBody({ body: request.body });
64047
64401
  metadata.routePath = transformUrlIntoRoutePath(request);
64048
64402
  metadata.apiKeyEnd = request.headers["authorization"]?.slice(-6);
64049
64403
  return { message, metadata };
@@ -64090,7 +64444,16 @@ function buildLoggerFactory({ config: config4, context }) {
64090
64444
  const internalLogger = winston.createLogger({
64091
64445
  transports: transports2,
64092
64446
  defaultMeta,
64093
- format: winston.format.combine(winston.format.splat(), winston.format(addMetadata({ getCorrelationId, getExecutionContext }))(), winston.format(transformErrorEnrich)({ depth: 5 }), winston.format(transformPrune)(), winston.format(transformAxiosError)(), winston.format.timestamp()),
64447
+ format: winston.format.combine(
64448
+ winston.format.splat(),
64449
+ winston.format(addMetadata({ getCorrelationId, getExecutionContext }))(),
64450
+ // Before pruning: json-prune would otherwise serialize a binary
64451
+ // `response.data` byte by byte before it is summarised (#6006).
64452
+ winston.format(transformAxiosError)(),
64453
+ winston.format(transformErrorEnrich)({ depth: 5 }),
64454
+ winston.format(transformPrune)(),
64455
+ winston.format.timestamp()
64456
+ ),
64094
64457
  exitOnError: false
64095
64458
  });
64096
64459
  function createLogger3({ serviceName }) {
@@ -66440,7 +66803,12 @@ var import_shared4 = __toESM(require_shared(), 1);
66440
66803
  var MILLISECONDS_PER_HOUR = 60 * 60 * 1e3;
66441
66804
  var MILLISECONDS_PER_DAY = 24 * MILLISECONDS_PER_HOUR;
66442
66805
  var LAST_MILLISECOND_OF_DAY = MILLISECONDS_PER_DAY - 1;
66443
- var dateRealignmentModeSchema = external_exports.enum(["utc_midnight_import", "dst_hour_drift", "month_start_drift"]).default("utc_midnight_import");
66806
+ var dateRealignmentModeSchema = external_exports.enum([
66807
+ "utc_midnight_import",
66808
+ "dst_hour_drift",
66809
+ "month_start_drift",
66810
+ "manual_phase_end_midnight"
66811
+ ]).default("utc_midnight_import");
66444
66812
  var DST_HOUR_SHIFT_BY_LOCAL_MILLISECOND_OF_DAY = /* @__PURE__ */ new Map([
66445
66813
  [23 * MILLISECONDS_PER_HOUR, MILLISECONDS_PER_HOUR],
66446
66814
  [LAST_MILLISECOND_OF_DAY - MILLISECONDS_PER_HOUR, MILLISECONDS_PER_HOUR],
@@ -66515,150 +66883,6 @@ var isAxiosError = axios.isAxiosError;
66515
66883
  // ../hyperline-lib/build/httpClient/httpClient.js
66516
66884
  import axios2 from "axios";
66517
66885
  import axiosRetry, { isNetworkOrIdempotentRequestError, retryAfter } from "axios-retry";
66518
-
66519
- // ../hyperline-lib/build/httpClient/logRedaction.js
66520
- var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
66521
- "accesstoken",
66522
- "apikey",
66523
- "apitoken",
66524
- "assertion",
66525
- "authtoken",
66526
- "clientassertion",
66527
- "codeverifier",
66528
- "credentials",
66529
- "idtoken",
66530
- "privatekey",
66531
- "refreshtoken",
66532
- "sessiontoken",
66533
- "token"
66534
- ]);
66535
- var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password)$/;
66536
- var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|password|assertion|verifier|credentials/i;
66537
- var REDACTED_VALUE = "<redacted>";
66538
- var MAX_REDACTION_DEPTH = 10;
66539
- var MAX_PARSED_STRING_LENGTH = 16384;
66540
- var MAX_VISITED_NODES = 1e3;
66541
- var MAX_CONTAINER_ENTRIES = MAX_VISITED_NODES;
66542
- function redactLogBody({ body }) {
66543
- return redactValue({
66544
- value: body,
66545
- depth: MAX_REDACTION_DEPTH,
66546
- budget: { remainingNodes: MAX_VISITED_NODES }
66547
- });
66548
- }
66549
- function redactLogUrl({ url: url2 }) {
66550
- const queryIndex = url2.indexOf("?");
66551
- if (queryIndex === -1 || url2.length > MAX_PARSED_STRING_LENGTH) {
66552
- return url2;
66553
- }
66554
- const redactedQuery = redactFormEncoded({ text: url2.slice(queryIndex + 1) });
66555
- return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
66556
- }
66557
- function redactValue({ value, depth, budget }) {
66558
- if (depth <= 0 || budget.remainingNodes <= 0) {
66559
- return value;
66560
- }
66561
- budget.remainingNodes -= 1;
66562
- if (typeof value === "string") {
66563
- return redactString({ text: value, budget });
66564
- }
66565
- if (value instanceof URLSearchParams) {
66566
- return redactFormEncoded({ text: value.toString() }) ?? value;
66567
- }
66568
- if (Array.isArray(value)) {
66569
- return redactArray({ items: value, depth, budget });
66570
- }
66571
- if (isPlainObject2(value)) {
66572
- return redactObject({ record: value, depth, budget });
66573
- }
66574
- return value;
66575
- }
66576
- function redactArray({ items, depth, budget }) {
66577
- if (items.length > MAX_CONTAINER_ENTRIES) {
66578
- return items;
66579
- }
66580
- let redactedItems;
66581
- for (const [index, item] of items.entries()) {
66582
- if (budget.remainingNodes <= 0) {
66583
- break;
66584
- }
66585
- const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
66586
- if (redactedItem !== item) {
66587
- redactedItems ??= [...items];
66588
- redactedItems[index] = redactedItem;
66589
- }
66590
- }
66591
- return redactedItems ?? items;
66592
- }
66593
- function redactObject({ record: record2, depth, budget }) {
66594
- const redactedEntries = /* @__PURE__ */ new Map();
66595
- let entryCount = 0;
66596
- for (const key in record2) {
66597
- if (!Object.hasOwn(record2, key)) {
66598
- continue;
66599
- }
66600
- entryCount += 1;
66601
- if (entryCount > MAX_CONTAINER_ENTRIES) {
66602
- return record2;
66603
- }
66604
- if (budget.remainingNodes <= 0) {
66605
- break;
66606
- }
66607
- const nestedValue = record2[key];
66608
- const redactedNestedValue = isRedactedKey({ key }) && nestedValue != null ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
66609
- if (redactedNestedValue !== nestedValue) {
66610
- redactedEntries.set(key, redactedNestedValue);
66611
- }
66612
- }
66613
- return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
66614
- }
66615
- function redactString({ text, budget }) {
66616
- if (text.length > MAX_PARSED_STRING_LENGTH) {
66617
- return text;
66618
- }
66619
- const trimmedText = text.trim();
66620
- if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
66621
- try {
66622
- const parsedValue = JSON.parse(trimmedText);
66623
- const redactedValue = redactValue({
66624
- value: parsedValue,
66625
- depth: MAX_REDACTION_DEPTH,
66626
- budget
66627
- });
66628
- return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
66629
- } catch {
66630
- return text;
66631
- }
66632
- }
66633
- return redactFormEncoded({ text }) ?? text;
66634
- }
66635
- function redactFormEncoded({ text }) {
66636
- if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
66637
- return void 0;
66638
- }
66639
- const params = new URLSearchParams(text);
66640
- let hasRedactedParam = false;
66641
- for (const key of new Set(params.keys())) {
66642
- if (isRedactedKey({ key })) {
66643
- params.set(key, REDACTED_VALUE);
66644
- hasRedactedParam = true;
66645
- }
66646
- }
66647
- return hasRedactedParam ? params.toString() : void 0;
66648
- }
66649
- function isRedactedKey({ key }) {
66650
- const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
66651
- return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
66652
- }
66653
- function isPlainObject2(value) {
66654
- if (typeof value !== "object" || value === null) {
66655
- return false;
66656
- }
66657
- const prototype = Object.getPrototypeOf(value);
66658
- return prototype === Object.prototype || prototype === null;
66659
- }
66660
-
66661
- // ../hyperline-lib/build/httpClient/httpClient.js
66662
66886
  import { AxiosError } from "axios";
66663
66887
  var recommendedRetryConfig = {
66664
66888
  retries: 3,
@@ -66726,14 +66950,14 @@ function isTooManyRequestsError(error48) {
66726
66950
  return error48.response?.status === 429;
66727
66951
  }
66728
66952
  var toLogRequest = (config4) => {
66729
- const url2 = redactLogUrl({ url: config4.url ?? "" });
66953
+ const url2 = config4.url ?? "";
66730
66954
  return {
66731
66955
  method: config4.method ?? "",
66732
66956
  url: url2,
66733
66957
  path: url2,
66734
66958
  hostname: config4.baseURL ?? "",
66735
66959
  originalUrl: `${config4.baseURL ?? ""}${url2}`,
66736
- body: redactLogBody({ body: config4.data }),
66960
+ body: config4.data,
66737
66961
  headers: {}
66738
66962
  };
66739
66963
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.0c8eac2",
3
+ "version": "0.1.0-build.1.0e4d371",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",