@hyperline/cli 0.1.0-build.1.443c711 → 0.1.0-build.1.444c331
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/hyperline-main.js +415 -193
- package/package.json +1 -1
|
@@ -40508,7 +40508,7 @@ Examples:
|
|
|
40508
40508
|
// build/commands/generated/ai-monitoring.js
|
|
40509
40509
|
function registerAi_MonitoringCommands(parent) {
|
|
40510
40510
|
const resource = parent.command("ai-monitoring").description("Manage ai > monitoring");
|
|
40511
|
-
resource.command("list-monitoring-analyses").description(`List customer health analyses from the monitoring agent, newest first: health score (0-100), tier, summary, per-dimension scores, risk factors and positive signals. Filter by customer (Hyperline or external ID) with limit=1 to get a customer's current health score. Only completed analyses unless status is set.`).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("--customer-id <value>", `Return only analyses of this customer. Accepts the Hyperline ID or your own external ID.`).option("--status <value>", `Return only analyses with this status. Defaults to \`completed\`, the analyses that carry a score.`).option("--created-at.gte <value>", `Return only analyses created at or after this date.`).option("--created-at.lte <value>", `Return only analyses created at or before this date.`).addHelpText("after", `
|
|
40511
|
+
resource.command("list-monitoring-analyses").description(`List customer health analyses from the monitoring agent, newest first: health score (0-100), tier, summary, per-dimension scores, risk factors and positive signals. Filter by customer (Hyperline or external ID) with limit=1 to get a customer's current health score, or by customer_id__in (up to 100 Hyperline IDs) for several customers; the first analysis per customer is its latest. Only completed analyses unless status is set.`).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("--customer-id <value>", `Return only analyses of this customer. Accepts the Hyperline ID or your own external ID.`).option("--customer-id.in <value>", `Comma-separated list of up to 100 Hyperline customer IDs. Return only analyses of these customers. Cannot be combined with \`customer_id\`.`).option("--status <value>", `Return only analyses with this status. Defaults to \`completed\`, the analyses that carry a score.`).option("--created-at.gte <value>", `Return only analyses created at or after this date.`).option("--created-at.lte <value>", `Return only analyses created at or before this date.`).addHelpText("after", `
|
|
40512
40512
|
Examples:
|
|
40513
40513
|
hyperline ai-monitoring list-monitoring-analyses
|
|
40514
40514
|
hyperline ai-monitoring list-monitoring-analyses --limit <limit> --cursor <cursor>`).action(async (opts) => {
|
|
@@ -40524,6 +40524,8 @@ Examples:
|
|
|
40524
40524
|
args.include_total = opts.includeTotal;
|
|
40525
40525
|
if (opts.customerId !== void 0)
|
|
40526
40526
|
args.customer_id = opts.customerId;
|
|
40527
|
+
if (opts["customerId.in"] !== void 0)
|
|
40528
|
+
args.customer_id__in = opts["customerId.in"];
|
|
40527
40529
|
if (opts.status !== void 0)
|
|
40528
40530
|
args.status = opts.status;
|
|
40529
40531
|
if (opts["createdAt.gte"] !== void 0)
|
|
@@ -40541,6 +40543,7 @@ Examples:
|
|
|
40541
40543
|
"cursor",
|
|
40542
40544
|
"include_total",
|
|
40543
40545
|
"customer_id",
|
|
40546
|
+
"customer_id__in",
|
|
40544
40547
|
"status",
|
|
40545
40548
|
"created_at__gte",
|
|
40546
40549
|
"created_at__lte"
|
|
@@ -40726,7 +40729,7 @@ Examples:
|
|
|
40726
40729
|
queryParamKeys: ["take", "skip"]
|
|
40727
40730
|
});
|
|
40728
40731
|
});
|
|
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>", `
|
|
40732
|
+
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
40733
|
Examples:
|
|
40731
40734
|
hyperline coupons create --name <name> --type <type>
|
|
40732
40735
|
hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
|
|
@@ -40743,6 +40746,8 @@ Examples:
|
|
|
40743
40746
|
args.description = opts.description;
|
|
40744
40747
|
if (opts.expirationDate !== void 0)
|
|
40745
40748
|
args.expiration_date = opts.expirationDate;
|
|
40749
|
+
if (opts.productScope !== void 0)
|
|
40750
|
+
args.product_scope = opts.productScope;
|
|
40746
40751
|
if (opts.repeat !== void 0)
|
|
40747
40752
|
args.repeat = opts.repeat;
|
|
40748
40753
|
if (opts.type !== void 0)
|
|
@@ -40786,7 +40791,7 @@ Examples:
|
|
|
40786
40791
|
queryParamKeys: []
|
|
40787
40792
|
});
|
|
40788
40793
|
});
|
|
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>", `
|
|
40794
|
+
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
40795
|
Examples:
|
|
40791
40796
|
hyperline coupons update --id <id> --name <name> --type <type>
|
|
40792
40797
|
hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
|
|
@@ -40805,6 +40810,8 @@ Examples:
|
|
|
40805
40810
|
args.description = opts.description;
|
|
40806
40811
|
if (opts.expirationDate !== void 0)
|
|
40807
40812
|
args.expiration_date = opts.expirationDate;
|
|
40813
|
+
if (opts.productScope !== void 0)
|
|
40814
|
+
args.product_scope = opts.productScope;
|
|
40808
40815
|
if (opts.repeat !== void 0)
|
|
40809
40816
|
args.repeat = opts.repeat;
|
|
40810
40817
|
if (opts.type !== void 0)
|
|
@@ -44305,7 +44312,7 @@ Examples:
|
|
|
44305
44312
|
queryParamKeys: []
|
|
44306
44313
|
});
|
|
44307
44314
|
});
|
|
44308
|
-
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", `
|
|
44315
|
+
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", `
|
|
44309
44316
|
Examples:
|
|
44310
44317
|
hyperline price-configurations create --currency <currency> --billing-interval <billing_interval> --type <type> --prices <prices> --product-id <product_id>
|
|
44311
44318
|
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>
|
|
@@ -44324,6 +44331,8 @@ Examples:
|
|
|
44324
44331
|
args.type = opts.type;
|
|
44325
44332
|
if (opts.productId !== void 0)
|
|
44326
44333
|
args.product_id = opts.productId;
|
|
44334
|
+
if (opts.aggregatorFilterId !== void 0)
|
|
44335
|
+
args.aggregator_filter_id = opts.aggregatorFilterId;
|
|
44327
44336
|
if (opts.allowOnPortal !== void 0)
|
|
44328
44337
|
args.allow_on_portal = true;
|
|
44329
44338
|
if (opts.countries !== void 0)
|
|
@@ -44742,7 +44751,7 @@ Quote status.
|
|
|
44742
44751
|
- \`all\`: Display all pricing tiers.
|
|
44743
44752
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
44744
44753
|
- \`none\`: Hide all pricing tiers.
|
|
44745
|
-
`).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", `
|
|
44754
|
+
`).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", `
|
|
44746
44755
|
Examples:
|
|
44747
44756
|
hyperline quotes create --customer-id <customer_id>
|
|
44748
44757
|
hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
|
|
@@ -44781,6 +44790,8 @@ Examples:
|
|
|
44781
44790
|
args.display_price_tiers = opts.displayPriceTiers;
|
|
44782
44791
|
if (opts.displayPhaseValue !== void 0)
|
|
44783
44792
|
args.display_phase_value = opts.displayPhaseValue;
|
|
44793
|
+
if (opts.displayDiscountsOnTotal !== void 0)
|
|
44794
|
+
args.display_discounts_on_total = opts.displayDiscountsOnTotal;
|
|
44784
44795
|
if (opts.displayFirstInvoiceAmount !== void 0)
|
|
44785
44796
|
args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
|
|
44786
44797
|
if (opts.displayDocumentsInPreview !== void 0)
|
|
@@ -44812,7 +44823,7 @@ Examples:
|
|
|
44812
44823
|
queryParamKeys: []
|
|
44813
44824
|
});
|
|
44814
44825
|
});
|
|
44815
|
-
resource.command("list").description(`List quotes with optional filters for id, number, status, customer_id, template_id, crm_opportunity_id, type, and updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.is-null <value>", `id__isNull`).option("--id.is-not-null <value>", `id__isNotNull`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--number <value>", `number`).option("--number.not <value>", `number__not`).option("--number.is-null <value>", `number__isNull`).option("--number.is-not-null <value>", `number__isNotNull`).option("--number.equals <value>", `number__equals`).option("--number.contains <value>", `number__contains`).option("--number.starts-with <value>", `number__startsWith`).option("--number.end-with <value>", `number__endWith`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--template-id <value>", `template_id`).option("--template-id.not <value>", `template_id__not`).option("--template-id.is-null <value>", `template_id__isNull`).option("--template-id.is-not-null <value>", `template_id__isNotNull`).option("--template-id.equals <value>", `template_id__equals`).option("--template-id.contains <value>", `template_id__contains`).option("--template-id.starts-with <value>", `template_id__startsWith`).option("--template-id.end-with <value>", `template_id__endWith`).option("--crm-opportunity-id <value>", `crm_opportunity_id`).option("--crm-opportunity-id.not <value>", `crm_opportunity_id__not`).option("--crm-opportunity-id.is-null <value>", `crm_opportunity_id__isNull`).option("--crm-opportunity-id.is-not-null <value>", `crm_opportunity_id__isNotNull`).option("--crm-opportunity-id.equals <value>", `crm_opportunity_id__equals`).option("--crm-opportunity-id.contains <value>", `crm_opportunity_id__contains`).option("--crm-opportunity-id.starts-with <value>", `crm_opportunity_id__startsWith`).option("--crm-opportunity-id.end-with <value>", `crm_opportunity_id__endWith`).option("--type <value>", `type`).option("--
|
|
44826
|
+
resource.command("list").description(`List quotes with optional filters for id, number, status, customer_id, template_id, crm_opportunity_id, type, and updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.is-null <value>", `id__isNull`).option("--id.is-not-null <value>", `id__isNotNull`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--number <value>", `number`).option("--number.not <value>", `number__not`).option("--number.is-null <value>", `number__isNull`).option("--number.is-not-null <value>", `number__isNotNull`).option("--number.equals <value>", `number__equals`).option("--number.contains <value>", `number__contains`).option("--number.starts-with <value>", `number__startsWith`).option("--number.end-with <value>", `number__endWith`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--template-id <value>", `template_id`).option("--template-id.not <value>", `template_id__not`).option("--template-id.is-null <value>", `template_id__isNull`).option("--template-id.is-not-null <value>", `template_id__isNotNull`).option("--template-id.equals <value>", `template_id__equals`).option("--template-id.contains <value>", `template_id__contains`).option("--template-id.starts-with <value>", `template_id__startsWith`).option("--template-id.end-with <value>", `template_id__endWith`).option("--crm-opportunity-id <value>", `crm_opportunity_id`).option("--crm-opportunity-id.not <value>", `crm_opportunity_id__not`).option("--crm-opportunity-id.is-null <value>", `crm_opportunity_id__isNull`).option("--crm-opportunity-id.is-not-null <value>", `crm_opportunity_id__isNotNull`).option("--crm-opportunity-id.equals <value>", `crm_opportunity_id__equals`).option("--crm-opportunity-id.contains <value>", `crm_opportunity_id__contains`).option("--crm-opportunity-id.starts-with <value>", `crm_opportunity_id__startsWith`).option("--crm-opportunity-id.end-with <value>", `crm_opportunity_id__endWith`).option("--type <value>", `type`).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", `
|
|
44816
44827
|
Examples:
|
|
44817
44828
|
hyperline quotes list
|
|
44818
44829
|
hyperline quotes list --take <take> --id <id>`).action(async (opts) => {
|
|
@@ -44908,20 +44919,6 @@ Examples:
|
|
|
44908
44919
|
args.crm_opportunity_id__endWith = opts["crmOpportunityId.endWith"];
|
|
44909
44920
|
if (opts.type !== void 0)
|
|
44910
44921
|
args.type = opts.type;
|
|
44911
|
-
if (opts["type.not"] !== void 0)
|
|
44912
|
-
args.type__not = opts["type.not"];
|
|
44913
|
-
if (opts["type.isNull"] !== void 0)
|
|
44914
|
-
args.type__isNull = opts["type.isNull"];
|
|
44915
|
-
if (opts["type.isNotNull"] !== void 0)
|
|
44916
|
-
args.type__isNotNull = opts["type.isNotNull"];
|
|
44917
|
-
if (opts["type.equals"] !== void 0)
|
|
44918
|
-
args.type__equals = opts["type.equals"];
|
|
44919
|
-
if (opts["type.contains"] !== void 0)
|
|
44920
|
-
args.type__contains = opts["type.contains"];
|
|
44921
|
-
if (opts["type.startsWith"] !== void 0)
|
|
44922
|
-
args.type__startsWith = opts["type.startsWith"];
|
|
44923
|
-
if (opts["type.endWith"] !== void 0)
|
|
44924
|
-
args.type__endWith = opts["type.endWith"];
|
|
44925
44922
|
if (opts.updatedAt !== void 0)
|
|
44926
44923
|
args.updated_at = opts.updatedAt;
|
|
44927
44924
|
if (opts["updatedAt.not"] !== void 0)
|
|
@@ -44994,13 +44991,6 @@ Examples:
|
|
|
44994
44991
|
"crm_opportunity_id__startsWith",
|
|
44995
44992
|
"crm_opportunity_id__endWith",
|
|
44996
44993
|
"type",
|
|
44997
|
-
"type__not",
|
|
44998
|
-
"type__isNull",
|
|
44999
|
-
"type__isNotNull",
|
|
45000
|
-
"type__equals",
|
|
45001
|
-
"type__contains",
|
|
45002
|
-
"type__startsWith",
|
|
45003
|
-
"type__endWith",
|
|
45004
44994
|
"updated_at",
|
|
45005
44995
|
"updated_at__not",
|
|
45006
44996
|
"updated_at__isNull",
|
|
@@ -45036,7 +45026,7 @@ Examples:
|
|
|
45036
45026
|
- \`all\`: Display all pricing tiers.
|
|
45037
45027
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
45038
45028
|
- \`none\`: Hide all pricing tiers.
|
|
45039
|
-
`).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", `
|
|
45029
|
+
`).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", `
|
|
45040
45030
|
Examples:
|
|
45041
45031
|
hyperline quotes update --id <id>
|
|
45042
45032
|
hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
|
|
@@ -45071,6 +45061,8 @@ Examples:
|
|
|
45071
45061
|
args.display_price_tiers = opts.displayPriceTiers;
|
|
45072
45062
|
if (opts.displayPhaseValue !== void 0)
|
|
45073
45063
|
args.display_phase_value = opts.displayPhaseValue;
|
|
45064
|
+
if (opts.displayDiscountsOnTotal !== void 0)
|
|
45065
|
+
args.display_discounts_on_total = opts.displayDiscountsOnTotal;
|
|
45074
45066
|
if (opts.displayFirstInvoiceAmount !== void 0)
|
|
45075
45067
|
args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
|
|
45076
45068
|
if (opts.displayDocumentsInPreview !== void 0)
|
|
@@ -45876,7 +45868,7 @@ Examples:
|
|
|
45876
45868
|
queryParamKeys: []
|
|
45877
45869
|
});
|
|
45878
45870
|
});
|
|
45879
|
-
resource.command("list").description(`List subscriptions with filters for activation_strategy, status, currency, plan_id, original_quote_id, integration_entity_id, customer_id, invoicing_entity_id, purchase_order, updated_at, custom_properties. Draft, voided, cancelled and archived excluded by default (status=all applies the same exclusion); status=any returns every status. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--activation-strategy <value>", `activation_strategy`).option("--activation-strategy.in <value>", `activation_strategy__in`).option("--status <value>", `
|
|
45871
|
+
resource.command("list").description(`List subscriptions with filters for activation_strategy, status, currency, plan_id, original_quote_id, integration_entity_id, customer_id, invoicing_entity_id, purchase_order, updated_at, cancel_at, custom_properties, and the active contract: contract_start__gte/__lte, contract_end__gte/__lte, renew_automatically. For upcoming renewals, combine contract_end__gte/__lte with renew_automatically, plus cancel_at for scheduled cancellations. Draft, voided, cancelled and archived excluded by default (status=all applies the same exclusion); status=any returns every status. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--activation-strategy <value>", `activation_strategy`).option("--activation-strategy.in <value>", `activation_strategy__in`).option("--status <value>", `
|
|
45880
45872
|
Subscription status filter.
|
|
45881
45873
|
|
|
45882
45874
|
- \`active\`, \`pending\`, \`paused\`, \`errored\`, \`cancelled\`, \`draft\`, \`voided\`, \`archived\`: match that status.
|
|
@@ -45885,7 +45877,7 @@ Subscription status filter.
|
|
|
45885
45877
|
- \`any\`: every status, no exclusion.
|
|
45886
45878
|
|
|
45887
45879
|
Use \`status__in\` with comma-separated values to combine statuses. When the filter is omitted, \`draft\`, \`voided\`, \`cancelled\` and \`archived\` subscriptions are excluded.
|
|
45888
|
-
`).option("--status.in <value>", `Comma-separated list of subscription statuses to include. Same values as \`status\`.`).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("--plan-id <value>", `plan_id`).option("--plan-id.not <value>", `plan_id__not`).option("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--plan-id.equals <value>", `plan_id__equals`).option("--plan-id.contains <value>", `plan_id__contains`).option("--plan-id.starts-with <value>", `plan_id__startsWith`).option("--plan-id.end-with <value>", `plan_id__endWith`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--original-quote-id.equals <value>", `original_quote_id__equals`).option("--original-quote-id.contains <value>", `original_quote_id__contains`).option("--original-quote-id.starts-with <value>", `original_quote_id__startsWith`).option("--original-quote-id.end-with <value>", `original_quote_id__endWith`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--purchase-order.equals <value>", `purchase_order__equals`).option("--purchase-order.contains <value>", `purchase_order__contains`).option("--purchase-order.starts-with <value>", `purchase_order__startsWith`).option("--purchase-order.end-with <value>", `purchase_order__endWith`).option("--custom-properties <value>", `custom_properties`).option("--invoice-drafts <value>", `invoice_drafts`).option("--integration-entity-id <value>", `integration_entity_id`).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", `
|
|
45880
|
+
`).option("--status.in <value>", `Comma-separated list of subscription statuses to include. Same values as \`status\`.`).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("--plan-id <value>", `plan_id`).option("--plan-id.not <value>", `plan_id__not`).option("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--plan-id.equals <value>", `plan_id__equals`).option("--plan-id.contains <value>", `plan_id__contains`).option("--plan-id.starts-with <value>", `plan_id__startsWith`).option("--plan-id.end-with <value>", `plan_id__endWith`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--original-quote-id.equals <value>", `original_quote_id__equals`).option("--original-quote-id.contains <value>", `original_quote_id__contains`).option("--original-quote-id.starts-with <value>", `original_quote_id__startsWith`).option("--original-quote-id.end-with <value>", `original_quote_id__endWith`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--purchase-order.equals <value>", `purchase_order__equals`).option("--purchase-order.contains <value>", `purchase_order__contains`).option("--purchase-order.starts-with <value>", `purchase_order__startsWith`).option("--purchase-order.end-with <value>", `purchase_order__endWith`).option("--custom-properties <value>", `custom_properties`).option("--invoice-drafts <value>", `invoice_drafts`).option("--integration-entity-id <value>", `integration_entity_id`).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`).option("--cancel-at <value>", `cancel_at`).option("--cancel-at.not <value>", `cancel_at__not`).option("--cancel-at.is-null <value>", `cancel_at__isNull`).option("--cancel-at.is-not-null <value>", `cancel_at__isNotNull`).option("--cancel-at.equals <value>", `cancel_at__equals`).option("--cancel-at.lt <value>", `cancel_at__lt`).option("--cancel-at.lte <value>", `cancel_at__lte`).option("--cancel-at.gt <value>", `cancel_at__gt`).option("--cancel-at.gte <value>", `cancel_at__gte`).option("--contract-start.gte <value>", `Return only subscriptions whose active contract starts on or after this date.`).option("--contract-start.lte <value>", `Return only subscriptions whose active contract starts on or before this date.`).option("--contract-end.gte <value>", `Return only subscriptions whose active contract ends on or after this date.`).option("--contract-end.lte <value>", `Return only subscriptions whose active contract ends on or before this date.`).option("--renew-automatically <value>", `Return only subscriptions whose active contract renews automatically (\`true\`) or not (\`false\`).`).addHelpText("after", `
|
|
45889
45881
|
Examples:
|
|
45890
45882
|
hyperline subscriptions list
|
|
45891
45883
|
hyperline subscriptions list --take <take> --activation-strategy <activation_strategy>`).action(async (opts) => {
|
|
@@ -46009,6 +46001,34 @@ Examples:
|
|
|
46009
46001
|
args.updated_at__gt = opts["updatedAt.gt"];
|
|
46010
46002
|
if (opts["updatedAt.gte"] !== void 0)
|
|
46011
46003
|
args.updated_at__gte = opts["updatedAt.gte"];
|
|
46004
|
+
if (opts.cancelAt !== void 0)
|
|
46005
|
+
args.cancel_at = opts.cancelAt;
|
|
46006
|
+
if (opts["cancelAt.not"] !== void 0)
|
|
46007
|
+
args.cancel_at__not = opts["cancelAt.not"];
|
|
46008
|
+
if (opts["cancelAt.isNull"] !== void 0)
|
|
46009
|
+
args.cancel_at__isNull = opts["cancelAt.isNull"];
|
|
46010
|
+
if (opts["cancelAt.isNotNull"] !== void 0)
|
|
46011
|
+
args.cancel_at__isNotNull = opts["cancelAt.isNotNull"];
|
|
46012
|
+
if (opts["cancelAt.equals"] !== void 0)
|
|
46013
|
+
args.cancel_at__equals = opts["cancelAt.equals"];
|
|
46014
|
+
if (opts["cancelAt.lt"] !== void 0)
|
|
46015
|
+
args.cancel_at__lt = opts["cancelAt.lt"];
|
|
46016
|
+
if (opts["cancelAt.lte"] !== void 0)
|
|
46017
|
+
args.cancel_at__lte = opts["cancelAt.lte"];
|
|
46018
|
+
if (opts["cancelAt.gt"] !== void 0)
|
|
46019
|
+
args.cancel_at__gt = opts["cancelAt.gt"];
|
|
46020
|
+
if (opts["cancelAt.gte"] !== void 0)
|
|
46021
|
+
args.cancel_at__gte = opts["cancelAt.gte"];
|
|
46022
|
+
if (opts["contractStart.gte"] !== void 0)
|
|
46023
|
+
args.contract_start__gte = opts["contractStart.gte"];
|
|
46024
|
+
if (opts["contractStart.lte"] !== void 0)
|
|
46025
|
+
args.contract_start__lte = opts["contractStart.lte"];
|
|
46026
|
+
if (opts["contractEnd.gte"] !== void 0)
|
|
46027
|
+
args.contract_end__gte = opts["contractEnd.gte"];
|
|
46028
|
+
if (opts["contractEnd.lte"] !== void 0)
|
|
46029
|
+
args.contract_end__lte = opts["contractEnd.lte"];
|
|
46030
|
+
if (opts.renewAutomatically !== void 0)
|
|
46031
|
+
args.renew_automatically = opts.renewAutomatically;
|
|
46012
46032
|
if (opts.take !== void 0)
|
|
46013
46033
|
args.take = Number(opts.take);
|
|
46014
46034
|
if (opts.skip !== void 0)
|
|
@@ -46076,7 +46096,21 @@ Examples:
|
|
|
46076
46096
|
"updated_at__lt",
|
|
46077
46097
|
"updated_at__lte",
|
|
46078
46098
|
"updated_at__gt",
|
|
46079
|
-
"updated_at__gte"
|
|
46099
|
+
"updated_at__gte",
|
|
46100
|
+
"cancel_at",
|
|
46101
|
+
"cancel_at__not",
|
|
46102
|
+
"cancel_at__isNull",
|
|
46103
|
+
"cancel_at__isNotNull",
|
|
46104
|
+
"cancel_at__equals",
|
|
46105
|
+
"cancel_at__lt",
|
|
46106
|
+
"cancel_at__lte",
|
|
46107
|
+
"cancel_at__gt",
|
|
46108
|
+
"cancel_at__gte",
|
|
46109
|
+
"contract_start__gte",
|
|
46110
|
+
"contract_start__lte",
|
|
46111
|
+
"contract_end__gte",
|
|
46112
|
+
"contract_end__lte",
|
|
46113
|
+
"renew_automatically"
|
|
46080
46114
|
]
|
|
46081
46115
|
});
|
|
46082
46116
|
});
|
|
@@ -63921,6 +63955,223 @@ import * as winston from "winston";
|
|
|
63921
63955
|
|
|
63922
63956
|
// ../hyperline-monitoring/build/logger/formatting/format.js
|
|
63923
63957
|
import prune from "json-prune";
|
|
63958
|
+
|
|
63959
|
+
// ../hyperline-monitoring/build/logger/formatting/logRedaction.js
|
|
63960
|
+
var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
|
|
63961
|
+
"accesstoken",
|
|
63962
|
+
"apitoken",
|
|
63963
|
+
"assertion",
|
|
63964
|
+
"authorization",
|
|
63965
|
+
"authtoken",
|
|
63966
|
+
"cardnumber",
|
|
63967
|
+
"clientassertion",
|
|
63968
|
+
"codeverifier",
|
|
63969
|
+
"connectionurl",
|
|
63970
|
+
"consumerkey",
|
|
63971
|
+
"cookie",
|
|
63972
|
+
"credential",
|
|
63973
|
+
"credentials",
|
|
63974
|
+
"iban",
|
|
63975
|
+
"idtoken",
|
|
63976
|
+
"privatekey",
|
|
63977
|
+
"publictoken",
|
|
63978
|
+
"refreshtoken",
|
|
63979
|
+
"sessiontoken",
|
|
63980
|
+
"token",
|
|
63981
|
+
"tokenid",
|
|
63982
|
+
"verificationcode"
|
|
63983
|
+
]);
|
|
63984
|
+
var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password|passphrase|apikey)$/;
|
|
63985
|
+
var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|pass|assertion|verifier|credential|authorization|cookie|iban|cardnumber|code|connectionurl/i;
|
|
63986
|
+
var URL_ONLY_REDACTED_KEYS = /* @__PURE__ */ new Set(["key"]);
|
|
63987
|
+
var OAUTH_CODE_KEY = "code";
|
|
63988
|
+
var OAUTH_CODE_CONTEXT_KEYS = ["state", "grant_type"];
|
|
63989
|
+
var REDACTED_VALUE = "<redacted>";
|
|
63990
|
+
var TRUNCATED_VALUE = "[TRUNCATED: not redacted]";
|
|
63991
|
+
var TRUNCATED_KEY = "[TRUNCATED]";
|
|
63992
|
+
var MAX_REDACTION_DEPTH = 6;
|
|
63993
|
+
var MAX_ARRAY_ENTRIES = 50;
|
|
63994
|
+
var MAX_PARSED_STRING_LENGTH = 16384;
|
|
63995
|
+
var MAX_VISITED_NODES = 5e3;
|
|
63996
|
+
var MAX_CONTAINER_ENTRIES = 1e3;
|
|
63997
|
+
var MAX_STRING_CHARACTERS = 256e3;
|
|
63998
|
+
function redactLogBody({ body }) {
|
|
63999
|
+
return redactValue({
|
|
64000
|
+
value: body,
|
|
64001
|
+
depth: MAX_REDACTION_DEPTH,
|
|
64002
|
+
budget: {
|
|
64003
|
+
remainingNodes: MAX_VISITED_NODES,
|
|
64004
|
+
remainingChars: MAX_STRING_CHARACTERS
|
|
64005
|
+
}
|
|
64006
|
+
});
|
|
64007
|
+
}
|
|
64008
|
+
function redactLogUrl({ url: url2 }) {
|
|
64009
|
+
const queryIndex = url2.indexOf("?");
|
|
64010
|
+
if (queryIndex === -1) {
|
|
64011
|
+
return url2;
|
|
64012
|
+
}
|
|
64013
|
+
if (url2.length > MAX_PARSED_STRING_LENGTH) {
|
|
64014
|
+
return `${url2.slice(0, queryIndex)}?${TRUNCATED_VALUE}`;
|
|
64015
|
+
}
|
|
64016
|
+
const redactedQuery = redactFormEncoded({
|
|
64017
|
+
text: url2.slice(queryIndex + 1),
|
|
64018
|
+
extraRedactedKeys: URL_ONLY_REDACTED_KEYS
|
|
64019
|
+
});
|
|
64020
|
+
return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
|
|
64021
|
+
}
|
|
64022
|
+
function redactValue({ value, depth, budget }) {
|
|
64023
|
+
if (isOpaqueObject({ value })) {
|
|
64024
|
+
return replaceOpaqueObject({ value });
|
|
64025
|
+
}
|
|
64026
|
+
if (typeof value === "string") {
|
|
64027
|
+
if (value.length > budget.remainingChars) {
|
|
64028
|
+
return TRUNCATED_VALUE;
|
|
64029
|
+
}
|
|
64030
|
+
budget.remainingChars -= value.length;
|
|
64031
|
+
}
|
|
64032
|
+
if (depth <= 0 || budget.remainingNodes <= 0) {
|
|
64033
|
+
return isInspectable({ value }) ? TRUNCATED_VALUE : value;
|
|
64034
|
+
}
|
|
64035
|
+
budget.remainingNodes -= 1;
|
|
64036
|
+
if (typeof value === "string") {
|
|
64037
|
+
return redactString({ text: value, budget });
|
|
64038
|
+
}
|
|
64039
|
+
if (value instanceof URLSearchParams) {
|
|
64040
|
+
return redactValue({ value: value.toString(), depth, budget });
|
|
64041
|
+
}
|
|
64042
|
+
if (Array.isArray(value)) {
|
|
64043
|
+
return redactArray({ items: value, depth, budget });
|
|
64044
|
+
}
|
|
64045
|
+
if (isPlainObject2(value)) {
|
|
64046
|
+
return redactObject({ record: value, depth, budget });
|
|
64047
|
+
}
|
|
64048
|
+
return value;
|
|
64049
|
+
}
|
|
64050
|
+
function isOpaqueObject({ value }) {
|
|
64051
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) && !isPlainObject2(value) && !(value instanceof URLSearchParams);
|
|
64052
|
+
}
|
|
64053
|
+
function replaceOpaqueObject({ value }) {
|
|
64054
|
+
if (typeof value !== "object" || value === null || value instanceof Date) {
|
|
64055
|
+
return value;
|
|
64056
|
+
}
|
|
64057
|
+
if (value instanceof ArrayBuffer || ArrayBuffer.isView(value)) {
|
|
64058
|
+
return `[BINARY ${value.byteLength} bytes]`;
|
|
64059
|
+
}
|
|
64060
|
+
if (value instanceof Blob) {
|
|
64061
|
+
return `[BINARY ${value.size} bytes]`;
|
|
64062
|
+
}
|
|
64063
|
+
if (value instanceof FormData || typeof Reflect.get(value, "pipe") === "function") {
|
|
64064
|
+
return "[BINARY stream]";
|
|
64065
|
+
}
|
|
64066
|
+
return TRUNCATED_VALUE;
|
|
64067
|
+
}
|
|
64068
|
+
function redactArray({ items, depth, budget }) {
|
|
64069
|
+
const isTruncated = items.length > MAX_ARRAY_ENTRIES;
|
|
64070
|
+
const keptItems = isTruncated ? items.slice(0, MAX_ARRAY_ENTRIES) : items;
|
|
64071
|
+
let redactedItems;
|
|
64072
|
+
for (const [index, item] of keptItems.entries()) {
|
|
64073
|
+
const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
|
|
64074
|
+
if (redactedItem !== item) {
|
|
64075
|
+
redactedItems ??= [...keptItems];
|
|
64076
|
+
redactedItems[index] = redactedItem;
|
|
64077
|
+
}
|
|
64078
|
+
}
|
|
64079
|
+
const result = redactedItems ?? keptItems;
|
|
64080
|
+
return isTruncated ? [...result, TRUNCATED_VALUE] : result;
|
|
64081
|
+
}
|
|
64082
|
+
function redactObject({ record: record2, depth, budget }) {
|
|
64083
|
+
const redactedEntries = /* @__PURE__ */ new Map();
|
|
64084
|
+
const carriesOAuthCode = OAUTH_CODE_CONTEXT_KEYS.some((contextKey) => Object.hasOwn(record2, contextKey));
|
|
64085
|
+
const keptKeys = [];
|
|
64086
|
+
let isTruncated = false;
|
|
64087
|
+
for (const key in record2) {
|
|
64088
|
+
if (!Object.hasOwn(record2, key)) {
|
|
64089
|
+
continue;
|
|
64090
|
+
}
|
|
64091
|
+
if (keptKeys.length >= MAX_CONTAINER_ENTRIES || key.length > budget.remainingChars) {
|
|
64092
|
+
isTruncated = true;
|
|
64093
|
+
break;
|
|
64094
|
+
}
|
|
64095
|
+
budget.remainingChars -= key.length;
|
|
64096
|
+
keptKeys.push(key);
|
|
64097
|
+
const nestedValue = record2[key];
|
|
64098
|
+
const isSensitiveKey = isRedactedKey({ key }) || carriesOAuthCode && key === OAUTH_CODE_KEY;
|
|
64099
|
+
const shouldRedact = isSensitiveKey && nestedValue != null && typeof nestedValue !== "boolean";
|
|
64100
|
+
if (shouldRedact) {
|
|
64101
|
+
budget.remainingNodes -= 1;
|
|
64102
|
+
}
|
|
64103
|
+
const redactedNestedValue = shouldRedact ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
|
|
64104
|
+
if (redactedNestedValue !== nestedValue) {
|
|
64105
|
+
redactedEntries.set(key, redactedNestedValue);
|
|
64106
|
+
}
|
|
64107
|
+
}
|
|
64108
|
+
if (isTruncated) {
|
|
64109
|
+
const keptRecord = {};
|
|
64110
|
+
for (const key of keptKeys) {
|
|
64111
|
+
keptRecord[key] = redactedEntries.has(key) ? redactedEntries.get(key) : record2[key];
|
|
64112
|
+
}
|
|
64113
|
+
keptRecord[TRUNCATED_KEY] = TRUNCATED_VALUE;
|
|
64114
|
+
return keptRecord;
|
|
64115
|
+
}
|
|
64116
|
+
return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
|
|
64117
|
+
}
|
|
64118
|
+
function redactString({ text, budget }) {
|
|
64119
|
+
if (text.length > MAX_PARSED_STRING_LENGTH) {
|
|
64120
|
+
return TRUNCATED_VALUE;
|
|
64121
|
+
}
|
|
64122
|
+
if (!isInspectable({ value: text })) {
|
|
64123
|
+
return text;
|
|
64124
|
+
}
|
|
64125
|
+
const trimmedText = text.trim();
|
|
64126
|
+
if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
|
|
64127
|
+
try {
|
|
64128
|
+
const parsedValue = JSON.parse(trimmedText);
|
|
64129
|
+
const redactedValue = redactValue({
|
|
64130
|
+
value: parsedValue,
|
|
64131
|
+
depth: MAX_REDACTION_DEPTH,
|
|
64132
|
+
budget
|
|
64133
|
+
});
|
|
64134
|
+
return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
|
|
64135
|
+
} catch {
|
|
64136
|
+
return REDACTED_KEY_CANDIDATE_PATTERN.test(text) ? TRUNCATED_VALUE : redactFormEncoded({ text }) ?? text;
|
|
64137
|
+
}
|
|
64138
|
+
}
|
|
64139
|
+
return redactFormEncoded({ text }) ?? text;
|
|
64140
|
+
}
|
|
64141
|
+
function redactFormEncoded({ text, extraRedactedKeys }) {
|
|
64142
|
+
if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
|
|
64143
|
+
return void 0;
|
|
64144
|
+
}
|
|
64145
|
+
const params = new URLSearchParams(text);
|
|
64146
|
+
const carriesOAuthCode = OAUTH_CODE_CONTEXT_KEYS.some((contextKey) => params.has(contextKey));
|
|
64147
|
+
let hasRedactedParam = false;
|
|
64148
|
+
for (const key of new Set(params.keys())) {
|
|
64149
|
+
if (isRedactedKey({ key }) || extraRedactedKeys?.has(key.toLowerCase()) || carriesOAuthCode && key === OAUTH_CODE_KEY) {
|
|
64150
|
+
params.set(key, REDACTED_VALUE);
|
|
64151
|
+
hasRedactedParam = true;
|
|
64152
|
+
}
|
|
64153
|
+
}
|
|
64154
|
+
return hasRedactedParam ? params.toString() : void 0;
|
|
64155
|
+
}
|
|
64156
|
+
function isRedactedKey({ key }) {
|
|
64157
|
+
const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
|
|
64158
|
+
return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
|
|
64159
|
+
}
|
|
64160
|
+
function isInspectable({ value }) {
|
|
64161
|
+
if (typeof value === "string") {
|
|
64162
|
+
return value.length > MAX_PARSED_STRING_LENGTH || /^\s*[{[]/.test(value) || value.includes("=") && REDACTED_KEY_CANDIDATE_PATTERN.test(value);
|
|
64163
|
+
}
|
|
64164
|
+
return value instanceof URLSearchParams || Array.isArray(value) || isPlainObject2(value);
|
|
64165
|
+
}
|
|
64166
|
+
function isPlainObject2(value) {
|
|
64167
|
+
if (typeof value !== "object" || value === null) {
|
|
64168
|
+
return false;
|
|
64169
|
+
}
|
|
64170
|
+
const prototype = Object.getPrototypeOf(value);
|
|
64171
|
+
return prototype === Object.prototype || prototype === null;
|
|
64172
|
+
}
|
|
64173
|
+
|
|
64174
|
+
// ../hyperline-monitoring/build/logger/formatting/format.js
|
|
63924
64175
|
var REDACTED_HEADER_KEY_PATTERN = /authorization|authenticate|cookie|secret|token|credential|signature|jwt|api[_-]?key|access[_-]?token|refresh[_-]?token|private[_-]?key/i;
|
|
63925
64176
|
function jsonFormat(info) {
|
|
63926
64177
|
const prunedInfo = JSON.parse(prune(info));
|
|
@@ -63981,14 +64232,106 @@ function transformPrune(info) {
|
|
|
63981
64232
|
});
|
|
63982
64233
|
return info;
|
|
63983
64234
|
}
|
|
64235
|
+
var MAX_AXIOS_ERROR_DEPTH = 5;
|
|
64236
|
+
var MAX_AXIOS_ERROR_CONTAINER_ENTRIES = 1e3;
|
|
64237
|
+
var MAX_AXIOS_ERROR_VISITED_NODES = 5e3;
|
|
64238
|
+
var REDACTED_BODY_KEYS = /* @__PURE__ */ new Set(["requestBody", "responseBody"]);
|
|
63984
64239
|
function transformAxiosError(info) {
|
|
63985
|
-
|
|
63986
|
-
|
|
63987
|
-
|
|
64240
|
+
let walk;
|
|
64241
|
+
for (const [key, value] of Object.entries(info)) {
|
|
64242
|
+
if (typeof value !== "object" || value === null || REDACTED_BODY_KEYS.has(key)) {
|
|
64243
|
+
continue;
|
|
63988
64244
|
}
|
|
63989
|
-
|
|
64245
|
+
walk ??= {
|
|
64246
|
+
formatted: /* @__PURE__ */ new Map(),
|
|
64247
|
+
remainingNodes: MAX_AXIOS_ERROR_VISITED_NODES
|
|
64248
|
+
};
|
|
64249
|
+
const formattedValue = formatNestedAxiosErrors({
|
|
64250
|
+
value,
|
|
64251
|
+
depth: MAX_AXIOS_ERROR_DEPTH,
|
|
64252
|
+
walk
|
|
64253
|
+
});
|
|
64254
|
+
if (formattedValue !== value) {
|
|
64255
|
+
info[key] = formattedValue;
|
|
64256
|
+
}
|
|
64257
|
+
}
|
|
63990
64258
|
return info;
|
|
63991
64259
|
}
|
|
64260
|
+
function formatNestedAxiosErrors({ value, depth, walk }) {
|
|
64261
|
+
if (typeof value !== "object" || value === null) {
|
|
64262
|
+
return value;
|
|
64263
|
+
}
|
|
64264
|
+
if (walk.formatted.has(value)) {
|
|
64265
|
+
return walk.formatted.get(value);
|
|
64266
|
+
}
|
|
64267
|
+
if (Reflect.get(value, "name") === "AxiosError") {
|
|
64268
|
+
const formattedError = walk.remainingNodes > 0 ? formatAxiosError(value) : summarizeAxiosError({ error: value });
|
|
64269
|
+
walk.remainingNodes -= 1;
|
|
64270
|
+
walk.formatted.set(value, formattedError);
|
|
64271
|
+
return formattedError;
|
|
64272
|
+
}
|
|
64273
|
+
const isWalkable = Array.isArray(value) || value instanceof Error || isPlainRecord(value);
|
|
64274
|
+
if (!isWalkable || depth <= 0 || walk.remainingNodes <= 0) {
|
|
64275
|
+
return value;
|
|
64276
|
+
}
|
|
64277
|
+
walk.formatted.set(value, "[Circular]");
|
|
64278
|
+
walk.remainingNodes -= 1;
|
|
64279
|
+
const formattedValue = formatWalkableValue({ value, depth, walk });
|
|
64280
|
+
walk.formatted.set(value, formattedValue);
|
|
64281
|
+
return formattedValue;
|
|
64282
|
+
}
|
|
64283
|
+
function summarizeAxiosError({ error: error48 }) {
|
|
64284
|
+
return {
|
|
64285
|
+
name: Reflect.get(error48, "name"),
|
|
64286
|
+
message: Reflect.get(error48, "message"),
|
|
64287
|
+
code: Reflect.get(error48, "code")
|
|
64288
|
+
};
|
|
64289
|
+
}
|
|
64290
|
+
function formatWalkableValue({ value, depth, walk }) {
|
|
64291
|
+
if (Array.isArray(value)) {
|
|
64292
|
+
if (value.length > MAX_AXIOS_ERROR_CONTAINER_ENTRIES) {
|
|
64293
|
+
return value;
|
|
64294
|
+
}
|
|
64295
|
+
let formattedItems;
|
|
64296
|
+
for (const [index, item] of value.entries()) {
|
|
64297
|
+
const formattedItem = formatNestedAxiosErrors({
|
|
64298
|
+
value: item,
|
|
64299
|
+
depth: depth - 1,
|
|
64300
|
+
walk
|
|
64301
|
+
});
|
|
64302
|
+
if (formattedItem !== item) {
|
|
64303
|
+
formattedItems ??= [...value];
|
|
64304
|
+
formattedItems[index] = formattedItem;
|
|
64305
|
+
}
|
|
64306
|
+
}
|
|
64307
|
+
return formattedItems ?? value;
|
|
64308
|
+
}
|
|
64309
|
+
const keys = Object.keys(value);
|
|
64310
|
+
if (keys.length > MAX_AXIOS_ERROR_CONTAINER_ENTRIES) {
|
|
64311
|
+
return value;
|
|
64312
|
+
}
|
|
64313
|
+
const formattedEntries = /* @__PURE__ */ new Map();
|
|
64314
|
+
for (const key of keys) {
|
|
64315
|
+
const nestedValue = Reflect.get(value, key);
|
|
64316
|
+
const formattedNestedValue = formatNestedAxiosErrors({
|
|
64317
|
+
value: nestedValue,
|
|
64318
|
+
depth: depth - 1,
|
|
64319
|
+
walk
|
|
64320
|
+
});
|
|
64321
|
+
if (formattedNestedValue !== nestedValue) {
|
|
64322
|
+
formattedEntries.set(key, formattedNestedValue);
|
|
64323
|
+
}
|
|
64324
|
+
}
|
|
64325
|
+
if (formattedEntries.size === 0) {
|
|
64326
|
+
return value;
|
|
64327
|
+
}
|
|
64328
|
+
return {
|
|
64329
|
+
...value,
|
|
64330
|
+
// Error properties are not enumerable, so the spread would drop them.
|
|
64331
|
+
...value instanceof Error ? { name: value.name, message: value.message, stack: value.stack } : {},
|
|
64332
|
+
...Object.fromEntries(formattedEntries)
|
|
64333
|
+
};
|
|
64334
|
+
}
|
|
63992
64335
|
function formatAxiosError(error48) {
|
|
63993
64336
|
if (!isRecord(error48) || error48.name !== "AxiosError") {
|
|
63994
64337
|
return error48;
|
|
@@ -64001,9 +64344,9 @@ function formatAxiosError(error48) {
|
|
|
64001
64344
|
code: error48.code,
|
|
64002
64345
|
request: {
|
|
64003
64346
|
method: request?.method,
|
|
64004
|
-
url: request?.url,
|
|
64347
|
+
url: typeof request?.url === "string" ? redactLogUrl({ url: request.url }) : request?.url,
|
|
64005
64348
|
baseURL: request?.baseURL,
|
|
64006
|
-
params: request?.params,
|
|
64349
|
+
params: redactLogBody({ body: request?.params }),
|
|
64007
64350
|
headers: redactHeaders({ headers: request?.headers }),
|
|
64008
64351
|
"axios-retry": request?.["axios-retry"]
|
|
64009
64352
|
},
|
|
@@ -64011,7 +64354,7 @@ function formatAxiosError(error48) {
|
|
|
64011
64354
|
status: response?.status,
|
|
64012
64355
|
statusText: response?.statusText,
|
|
64013
64356
|
headers: redactHeaders({ headers: response?.headers }),
|
|
64014
|
-
data: response?.data
|
|
64357
|
+
data: redactLogBody({ body: response?.data })
|
|
64015
64358
|
}
|
|
64016
64359
|
};
|
|
64017
64360
|
}
|
|
@@ -64024,6 +64367,10 @@ function redactHeaders({ headers }) {
|
|
|
64024
64367
|
REDACTED_HEADER_KEY_PATTERN.test(headerKey) ? "<redacted>" : headerValue
|
|
64025
64368
|
]));
|
|
64026
64369
|
}
|
|
64370
|
+
function isPlainRecord(value) {
|
|
64371
|
+
const prototype = Object.getPrototypeOf(value);
|
|
64372
|
+
return prototype === Object.prototype || prototype === null;
|
|
64373
|
+
}
|
|
64027
64374
|
function isRecord(value) {
|
|
64028
64375
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
64029
64376
|
}
|
|
@@ -64053,7 +64400,7 @@ function logHttpResponse(logger2, response, responseTime, extra) {
|
|
|
64053
64400
|
const responseMetadata = {
|
|
64054
64401
|
statusCode,
|
|
64055
64402
|
responseTime,
|
|
64056
|
-
responseBody,
|
|
64403
|
+
responseBody: redactLogBody({ body: responseBody }),
|
|
64057
64404
|
// Redacted so secrets (authorization/cookie/token/…) never reach the logs
|
|
64058
64405
|
// while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
|
|
64059
64406
|
responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
|
|
@@ -64066,14 +64413,15 @@ function logHttpResponse(logger2, response, responseTime, extra) {
|
|
|
64066
64413
|
}
|
|
64067
64414
|
function transform2(request) {
|
|
64068
64415
|
const method = request.method.toUpperCase();
|
|
64069
|
-
const
|
|
64416
|
+
const originalUrl = redactLogUrl({ url: request.originalUrl });
|
|
64417
|
+
const message = `${method} ${originalUrl}`;
|
|
64070
64418
|
const metadata = {};
|
|
64071
64419
|
metadata.method = method;
|
|
64072
|
-
metadata.url = request.url;
|
|
64073
|
-
metadata.path = request.path;
|
|
64420
|
+
metadata.url = redactLogUrl({ url: request.url });
|
|
64421
|
+
metadata.path = redactLogUrl({ url: request.path });
|
|
64074
64422
|
metadata.hostname = request.hostname;
|
|
64075
|
-
metadata.originalUrl =
|
|
64076
|
-
metadata.requestBody =
|
|
64423
|
+
metadata.originalUrl = originalUrl;
|
|
64424
|
+
metadata.requestBody = redactLogBody({ body: request.body });
|
|
64077
64425
|
metadata.routePath = transformUrlIntoRoutePath(request);
|
|
64078
64426
|
metadata.apiKeyEnd = request.headers["authorization"]?.slice(-6);
|
|
64079
64427
|
return { message, metadata };
|
|
@@ -64120,7 +64468,16 @@ function buildLoggerFactory({ config: config4, context }) {
|
|
|
64120
64468
|
const internalLogger = winston.createLogger({
|
|
64121
64469
|
transports: transports2,
|
|
64122
64470
|
defaultMeta,
|
|
64123
|
-
format: winston.format.combine(
|
|
64471
|
+
format: winston.format.combine(
|
|
64472
|
+
winston.format.splat(),
|
|
64473
|
+
winston.format(addMetadata({ getCorrelationId, getExecutionContext }))(),
|
|
64474
|
+
// Before pruning: json-prune would otherwise serialize a binary
|
|
64475
|
+
// `response.data` byte by byte before it is summarised (#6006).
|
|
64476
|
+
winston.format(transformAxiosError)(),
|
|
64477
|
+
winston.format(transformErrorEnrich)({ depth: 5 }),
|
|
64478
|
+
winston.format(transformPrune)(),
|
|
64479
|
+
winston.format.timestamp()
|
|
64480
|
+
),
|
|
64124
64481
|
exitOnError: false
|
|
64125
64482
|
});
|
|
64126
64483
|
function createLogger3({ serviceName }) {
|
|
@@ -66470,7 +66827,12 @@ var import_shared4 = __toESM(require_shared(), 1);
|
|
|
66470
66827
|
var MILLISECONDS_PER_HOUR = 60 * 60 * 1e3;
|
|
66471
66828
|
var MILLISECONDS_PER_DAY = 24 * MILLISECONDS_PER_HOUR;
|
|
66472
66829
|
var LAST_MILLISECOND_OF_DAY = MILLISECONDS_PER_DAY - 1;
|
|
66473
|
-
var dateRealignmentModeSchema = external_exports.enum([
|
|
66830
|
+
var dateRealignmentModeSchema = external_exports.enum([
|
|
66831
|
+
"utc_midnight_import",
|
|
66832
|
+
"dst_hour_drift",
|
|
66833
|
+
"month_start_drift",
|
|
66834
|
+
"manual_phase_end_midnight"
|
|
66835
|
+
]).default("utc_midnight_import");
|
|
66474
66836
|
var DST_HOUR_SHIFT_BY_LOCAL_MILLISECOND_OF_DAY = /* @__PURE__ */ new Map([
|
|
66475
66837
|
[23 * MILLISECONDS_PER_HOUR, MILLISECONDS_PER_HOUR],
|
|
66476
66838
|
[LAST_MILLISECOND_OF_DAY - MILLISECONDS_PER_HOUR, MILLISECONDS_PER_HOUR],
|
|
@@ -66545,150 +66907,6 @@ var isAxiosError = axios.isAxiosError;
|
|
|
66545
66907
|
// ../hyperline-lib/build/httpClient/httpClient.js
|
|
66546
66908
|
import axios2 from "axios";
|
|
66547
66909
|
import axiosRetry, { isNetworkOrIdempotentRequestError, retryAfter } from "axios-retry";
|
|
66548
|
-
|
|
66549
|
-
// ../hyperline-lib/build/httpClient/logRedaction.js
|
|
66550
|
-
var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
|
|
66551
|
-
"accesstoken",
|
|
66552
|
-
"apikey",
|
|
66553
|
-
"apitoken",
|
|
66554
|
-
"assertion",
|
|
66555
|
-
"authtoken",
|
|
66556
|
-
"clientassertion",
|
|
66557
|
-
"codeverifier",
|
|
66558
|
-
"credentials",
|
|
66559
|
-
"idtoken",
|
|
66560
|
-
"privatekey",
|
|
66561
|
-
"refreshtoken",
|
|
66562
|
-
"sessiontoken",
|
|
66563
|
-
"token"
|
|
66564
|
-
]);
|
|
66565
|
-
var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password)$/;
|
|
66566
|
-
var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|password|assertion|verifier|credentials/i;
|
|
66567
|
-
var REDACTED_VALUE = "<redacted>";
|
|
66568
|
-
var MAX_REDACTION_DEPTH = 10;
|
|
66569
|
-
var MAX_PARSED_STRING_LENGTH = 16384;
|
|
66570
|
-
var MAX_VISITED_NODES = 1e3;
|
|
66571
|
-
var MAX_CONTAINER_ENTRIES = MAX_VISITED_NODES;
|
|
66572
|
-
function redactLogBody({ body }) {
|
|
66573
|
-
return redactValue({
|
|
66574
|
-
value: body,
|
|
66575
|
-
depth: MAX_REDACTION_DEPTH,
|
|
66576
|
-
budget: { remainingNodes: MAX_VISITED_NODES }
|
|
66577
|
-
});
|
|
66578
|
-
}
|
|
66579
|
-
function redactLogUrl({ url: url2 }) {
|
|
66580
|
-
const queryIndex = url2.indexOf("?");
|
|
66581
|
-
if (queryIndex === -1 || url2.length > MAX_PARSED_STRING_LENGTH) {
|
|
66582
|
-
return url2;
|
|
66583
|
-
}
|
|
66584
|
-
const redactedQuery = redactFormEncoded({ text: url2.slice(queryIndex + 1) });
|
|
66585
|
-
return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
|
|
66586
|
-
}
|
|
66587
|
-
function redactValue({ value, depth, budget }) {
|
|
66588
|
-
if (depth <= 0 || budget.remainingNodes <= 0) {
|
|
66589
|
-
return value;
|
|
66590
|
-
}
|
|
66591
|
-
budget.remainingNodes -= 1;
|
|
66592
|
-
if (typeof value === "string") {
|
|
66593
|
-
return redactString({ text: value, budget });
|
|
66594
|
-
}
|
|
66595
|
-
if (value instanceof URLSearchParams) {
|
|
66596
|
-
return redactFormEncoded({ text: value.toString() }) ?? value;
|
|
66597
|
-
}
|
|
66598
|
-
if (Array.isArray(value)) {
|
|
66599
|
-
return redactArray({ items: value, depth, budget });
|
|
66600
|
-
}
|
|
66601
|
-
if (isPlainObject2(value)) {
|
|
66602
|
-
return redactObject({ record: value, depth, budget });
|
|
66603
|
-
}
|
|
66604
|
-
return value;
|
|
66605
|
-
}
|
|
66606
|
-
function redactArray({ items, depth, budget }) {
|
|
66607
|
-
if (items.length > MAX_CONTAINER_ENTRIES) {
|
|
66608
|
-
return items;
|
|
66609
|
-
}
|
|
66610
|
-
let redactedItems;
|
|
66611
|
-
for (const [index, item] of items.entries()) {
|
|
66612
|
-
if (budget.remainingNodes <= 0) {
|
|
66613
|
-
break;
|
|
66614
|
-
}
|
|
66615
|
-
const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
|
|
66616
|
-
if (redactedItem !== item) {
|
|
66617
|
-
redactedItems ??= [...items];
|
|
66618
|
-
redactedItems[index] = redactedItem;
|
|
66619
|
-
}
|
|
66620
|
-
}
|
|
66621
|
-
return redactedItems ?? items;
|
|
66622
|
-
}
|
|
66623
|
-
function redactObject({ record: record2, depth, budget }) {
|
|
66624
|
-
const redactedEntries = /* @__PURE__ */ new Map();
|
|
66625
|
-
let entryCount = 0;
|
|
66626
|
-
for (const key in record2) {
|
|
66627
|
-
if (!Object.hasOwn(record2, key)) {
|
|
66628
|
-
continue;
|
|
66629
|
-
}
|
|
66630
|
-
entryCount += 1;
|
|
66631
|
-
if (entryCount > MAX_CONTAINER_ENTRIES) {
|
|
66632
|
-
return record2;
|
|
66633
|
-
}
|
|
66634
|
-
if (budget.remainingNodes <= 0) {
|
|
66635
|
-
break;
|
|
66636
|
-
}
|
|
66637
|
-
const nestedValue = record2[key];
|
|
66638
|
-
const redactedNestedValue = isRedactedKey({ key }) && nestedValue != null ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
|
|
66639
|
-
if (redactedNestedValue !== nestedValue) {
|
|
66640
|
-
redactedEntries.set(key, redactedNestedValue);
|
|
66641
|
-
}
|
|
66642
|
-
}
|
|
66643
|
-
return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
|
|
66644
|
-
}
|
|
66645
|
-
function redactString({ text, budget }) {
|
|
66646
|
-
if (text.length > MAX_PARSED_STRING_LENGTH) {
|
|
66647
|
-
return text;
|
|
66648
|
-
}
|
|
66649
|
-
const trimmedText = text.trim();
|
|
66650
|
-
if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
|
|
66651
|
-
try {
|
|
66652
|
-
const parsedValue = JSON.parse(trimmedText);
|
|
66653
|
-
const redactedValue = redactValue({
|
|
66654
|
-
value: parsedValue,
|
|
66655
|
-
depth: MAX_REDACTION_DEPTH,
|
|
66656
|
-
budget
|
|
66657
|
-
});
|
|
66658
|
-
return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
|
|
66659
|
-
} catch {
|
|
66660
|
-
return text;
|
|
66661
|
-
}
|
|
66662
|
-
}
|
|
66663
|
-
return redactFormEncoded({ text }) ?? text;
|
|
66664
|
-
}
|
|
66665
|
-
function redactFormEncoded({ text }) {
|
|
66666
|
-
if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
|
|
66667
|
-
return void 0;
|
|
66668
|
-
}
|
|
66669
|
-
const params = new URLSearchParams(text);
|
|
66670
|
-
let hasRedactedParam = false;
|
|
66671
|
-
for (const key of new Set(params.keys())) {
|
|
66672
|
-
if (isRedactedKey({ key })) {
|
|
66673
|
-
params.set(key, REDACTED_VALUE);
|
|
66674
|
-
hasRedactedParam = true;
|
|
66675
|
-
}
|
|
66676
|
-
}
|
|
66677
|
-
return hasRedactedParam ? params.toString() : void 0;
|
|
66678
|
-
}
|
|
66679
|
-
function isRedactedKey({ key }) {
|
|
66680
|
-
const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
|
|
66681
|
-
return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
|
|
66682
|
-
}
|
|
66683
|
-
function isPlainObject2(value) {
|
|
66684
|
-
if (typeof value !== "object" || value === null) {
|
|
66685
|
-
return false;
|
|
66686
|
-
}
|
|
66687
|
-
const prototype = Object.getPrototypeOf(value);
|
|
66688
|
-
return prototype === Object.prototype || prototype === null;
|
|
66689
|
-
}
|
|
66690
|
-
|
|
66691
|
-
// ../hyperline-lib/build/httpClient/httpClient.js
|
|
66692
66910
|
import { AxiosError } from "axios";
|
|
66693
66911
|
var recommendedRetryConfig = {
|
|
66694
66912
|
retries: 3,
|
|
@@ -66756,14 +66974,14 @@ function isTooManyRequestsError(error48) {
|
|
|
66756
66974
|
return error48.response?.status === 429;
|
|
66757
66975
|
}
|
|
66758
66976
|
var toLogRequest = (config4) => {
|
|
66759
|
-
const url2 =
|
|
66977
|
+
const url2 = config4.url ?? "";
|
|
66760
66978
|
return {
|
|
66761
66979
|
method: config4.method ?? "",
|
|
66762
66980
|
url: url2,
|
|
66763
66981
|
path: url2,
|
|
66764
66982
|
hostname: config4.baseURL ?? "",
|
|
66765
66983
|
originalUrl: `${config4.baseURL ?? ""}${url2}`,
|
|
66766
|
-
body:
|
|
66984
|
+
body: config4.data,
|
|
66767
66985
|
headers: {}
|
|
66768
66986
|
};
|
|
66769
66987
|
};
|
|
@@ -66783,9 +67001,13 @@ import multer2 from "multer";
|
|
|
66783
67001
|
// ../hyperline-lib/build/httpRouter/file.js
|
|
66784
67002
|
import helmet from "helmet";
|
|
66785
67003
|
|
|
66786
|
-
// ../hyperline-lib/build/publicApi/auth/
|
|
67004
|
+
// ../hyperline-lib/build/publicApi/auth/apiKey.js
|
|
66787
67005
|
import { randomBytes as randomBytes2, scryptSync } from "node:crypto";
|
|
66788
67006
|
|
|
67007
|
+
// ../hyperline-lib/build/publicApi/auth/apiKeyHashCache.js
|
|
67008
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
67009
|
+
var TTL_MS = 5 * 6e4;
|
|
67010
|
+
|
|
66789
67011
|
// ../hyperline-mcp/build/requestBuilder.js
|
|
66790
67012
|
function buildRequestConfig(path2, args, method, queryParamKeys = []) {
|
|
66791
67013
|
const { url: url2, usedKeys } = replacePathParams(path2, args);
|