@hyperline/cli 0.1.0-build.1.fabee10 → 0.1.0-build.1.fbb87e4

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.
@@ -38941,7 +38941,7 @@ Examples:
38941
38941
  ]
38942
38942
  });
38943
38943
  });
38944
- resource.command("get-accounting-rule-tree").description(`Retrieve accounting rules organized as a filter tree.`).option("--ledger-id <value>", `Ledger identifier.`).option("--invoicing-entity-id <value>", `Optional invoicing entity identifier.`).option("--max-depth <number>", `Maximum tree depth to return.`).option("--search <value>", `Search by rule identifier or category.`).addHelpText("after", `
38944
+ resource.command("get-accounting-rule-tree").description(`Retrieve accounting rules organized as a filter tree. Accounting software sync rules are excluded.`).option("--ledger-id <value>", `Ledger identifier.`).option("--invoicing-entity-id <value>", `Optional invoicing entity identifier.`).option("--max-depth <number>", `Maximum tree depth to return.`).option("--search <value>", `Search by rule identifier or category.`).addHelpText("after", `
38945
38945
  Examples:
38946
38946
  hyperline accounting-rules get-accounting-rule-tree
38947
38947
  hyperline accounting-rules get-accounting-rule-tree --ledger-id <ledger_id> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
@@ -39013,7 +39013,7 @@ Examples:
39013
39013
  queryParamKeys: []
39014
39014
  });
39015
39015
  });
39016
- resource.command("create").description(`Create a new accounting rule for account code routing or journal posting.`).option("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).option("--name <value>", `Optional user-defined name for the rule.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).requiredOption("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
39016
+ resource.command("create").description(`Create a new accounting rule for account code routing or journal posting.`).option("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).option("--name <value>", `Optional user-defined name for the rule.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).requiredOption("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--custom-property-filters <json>", `Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its \`values\` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the \`suggested_priority\` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set \`payments_clearing_ledger_account_id\`, as PSP payouts are booked without the invoice. Empty means match all.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
39017
39017
  Examples:
39018
39018
  hyperline accounting-rules create --category <category> --priority <priority>
39019
39019
  hyperline accounting-rules create --category <category> --priority <priority> --ledger-id <ledger_id> --name <name>
@@ -39078,6 +39078,8 @@ Examples:
39078
39078
  args.client_provider_ids = JSON.parse(opts.clientProviderIds);
39079
39079
  if (opts.paymentMethodTypes !== void 0)
39080
39080
  args.payment_method_types = JSON.parse(opts.paymentMethodTypes);
39081
+ if (opts.customPropertyFilters !== void 0)
39082
+ args.custom_property_filters = JSON.parse(opts.customPropertyFilters);
39081
39083
  await ctx.execute({
39082
39084
  method: "POST",
39083
39085
  path: "/v1/accounting/rules",
@@ -39085,7 +39087,7 @@ Examples:
39085
39087
  queryParamKeys: []
39086
39088
  });
39087
39089
  });
39088
- resource.command("update").description(`Update an existing accounting rule.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Optional user-defined name for the rule.`).option("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).option("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
39090
+ resource.command("update").description(`Update an existing accounting rule.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Optional user-defined name for the rule.`).option("--category <value>", `Rule category. Cannot be changed after creation, must match the current category when sent.`).option("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--custom-property-filters <json>", `Invoice custom property filters. A rule matches only when every entry matches (AND across entries), and an entry matches when the invoice value is one of its \`values\` (any-of). Matching is strict: an invoice without a value for the property never matches. Each entry adds 10 to the \`suggested_priority\` returned by the rule defaults endpoint. Allowed on invoice_posted, invoice_settled, revenue_recognition, credit_note_created and accounting_software (invoice side) rules. An invoice_settled rule with filters cannot set \`payments_clearing_ledger_account_id\`, as PSP payouts are booked without the invoice. Empty means match all.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
39089
39091
  Examples:
39090
39092
  hyperline accounting-rules update --id <id>
39091
39093
  hyperline accounting-rules update --id <id> --name <name> --category <category>
@@ -39150,6 +39152,8 @@ Examples:
39150
39152
  args.client_provider_ids = JSON.parse(opts.clientProviderIds);
39151
39153
  if (opts.paymentMethodTypes !== void 0)
39152
39154
  args.payment_method_types = JSON.parse(opts.paymentMethodTypes);
39155
+ if (opts.customPropertyFilters !== void 0)
39156
+ args.custom_property_filters = JSON.parse(opts.customPropertyFilters);
39153
39157
  await ctx.execute({
39154
39158
  method: "PUT",
39155
39159
  path: "/v1/accounting/rules/{id}",
@@ -39183,7 +39187,7 @@ Examples:
39183
39187
  queryParamKeys: []
39184
39188
  });
39185
39189
  });
39186
- resource.command("resolve").description(`Preview which account codes would be resolved for a given context.`).requiredOption("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).option("--product-id <value>", `Product ID to resolve against.`).option("--product-type <value>", `Product type to resolve against.`).option("--currency <value>", `Currency code to resolve against.`).option("--country <value>", `Country code to resolve against.`).option("--customer-id <value>", `Customer ID to resolve against.`).option("--invoice-type <value>", `Invoice kind to resolve against. Accepts \`invoice\` or \`document\`; any other invoice kind is matched as \`invoice\`.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).addHelpText("after", `
39190
+ resource.command("resolve").description(`Preview which account codes would be resolved for a given context.`).requiredOption("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).option("--product-id <value>", `Product ID to resolve against.`).option("--product-type <value>", `Product type to resolve against.`).option("--currency <value>", `Currency code to resolve against.`).option("--country <value>", `Country code to resolve against.`).option("--customer-id <value>", `Customer ID to resolve against.`).option("--invoice-type <value>", `Invoice kind to resolve against. Accepts \`invoice\` or \`document\`; any other invoice kind is matched as \`invoice\`.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--custom-properties <json>", `Invoice custom property values to resolve against, keyed by custom property slug. Unknown slugs and null values are ignored. Rules with custom property filters never match without them.`).addHelpText("after", `
39187
39191
  Examples:
39188
39192
  hyperline accounting-rules resolve --ledger-id <ledger_id> --category <category>
39189
39193
  hyperline accounting-rules resolve --ledger-id <ledger_id> --category <category> --product-id <product_id> --product-type <product_type>
@@ -39214,6 +39218,8 @@ Examples:
39214
39218
  args.interval_period = opts.intervalPeriod;
39215
39219
  if (opts.intervalCount !== void 0)
39216
39220
  args.interval_count = Number(opts.intervalCount);
39221
+ if (opts.customProperties !== void 0)
39222
+ args.custom_properties = JSON.parse(opts.customProperties);
39217
39223
  await ctx.execute({
39218
39224
  method: "POST",
39219
39225
  path: "/v1/accounting/rules/resolve",
@@ -39223,164 +39229,158 @@ Examples:
39223
39229
  });
39224
39230
  }
39225
39231
 
39226
- // build/commands/generated/agents.js
39227
- function registerAgentsCommands(parent) {
39228
- const resource = parent.command("agents").description("Manage agents");
39229
- resource.command("list-agent-plans").description(`List AI agent billing plans: workspace-level offers carrying a billing mode (wallet/credits/windows), rate card, allowance windows, markups and per-seat credit grants. Filter by mode; paginated with take/skip.`).option("--mode <value>", `Billing mode.
39230
-
39231
- - wallet: Charges a monetary wallet.
39232
- - credits: Consumes a credit balance.
39233
- - windows: Meters weighted units against rolling allowances.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39232
+ // build/commands/generated/aggregators.js
39233
+ function registerAggregatorsCommands(parent) {
39234
+ const resource = parent.command("aggregators").description("Manage aggregators");
39235
+ resource.command("list").description(`List all aggregators with pagination. Aggregators define how billable events are counted or summed to compute usage.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39234
39236
  Examples:
39235
- hyperline agents list-agent-plans
39236
- hyperline agents list-agent-plans --mode <mode> --take <take>`).action(async (opts) => {
39237
+ hyperline aggregators list
39238
+ hyperline aggregators list --take <take>`).action(async (opts) => {
39237
39239
  const ctx = resource.parent?.opts()._ctx;
39238
39240
  if (!ctx) {
39239
39241
  process.stderr.write("Error: Not authenticated\n");
39240
39242
  process.exit(1);
39241
39243
  }
39242
39244
  const args = {};
39243
- if (opts.mode !== void 0)
39244
- args.mode = opts.mode;
39245
39245
  if (opts.take !== void 0)
39246
39246
  args.take = Number(opts.take);
39247
39247
  if (opts.skip !== void 0)
39248
39248
  args.skip = Number(opts.skip);
39249
39249
  await ctx.execute({
39250
39250
  method: "GET",
39251
- path: "/v1/agents/plans",
39251
+ path: "/v1/aggregators",
39252
39252
  args,
39253
- queryParamKeys: ["mode", "take", "skip"]
39253
+ queryParamKeys: ["take", "skip"]
39254
39254
  });
39255
39255
  });
39256
- resource.command("create-agent-plan").description(`Create an AI agent billing plan: name, billing mode (wallet/credits/windows), rate card reference, allowance windows, markups, per-seat credit grants and overage stance. Past-limit usage is priced EITHER by overage_markup_percent over the base rates OR by overage_rate_card_id, a currency rate card whose own rates are the overage price \u2014 never both. Metered overage mints the plan's invoice container.`).requiredOption("--name <value>", `Human-readable resource name.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
39257
-
39258
- - refuse: Rejects the call that crosses the boundary without deducting usage.
39259
- - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--windows <json>", `Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.`).option("--per-seat-credits <value>", `Credits granted per seat per billing period. Null grants no credits.`).option("--grant-rollover-enabled", `Whether granted credits survive renewal. Purchased credits always roll over.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
39260
-
39261
- - calendar_month: Settles at the end of each UTC calendar month.`).requiredOption("--mode <value>", `Billing mode.
39262
-
39263
- - wallet: Charges a monetary wallet.
39264
- - credits: Consumes a credit balance.
39265
- - windows: Meters weighted units against rolling allowances.`).addHelpText("after", `
39256
+ resource.command("create").description(`Create a new aggregator that counts or sums billable events. Aggregators can then be linked to products via aggregator_id.`).requiredOption("--entity <value>", `The billable event entity to aggregate.`).option("--type <value>", `The type of aggregator.`).option("--where <json>", `Filter conditions for the aggregation.`).option("--name <value>", `Name of the aggregator.`).option("--description <value>", `Description of the aggregator.`).option("--allow-negative-values", `Whether the aggregator can produce negative values.`).option("--aggregate-on-customers-enabled", `Whether the aggregator should aggregate on customers.`).option("--custom-event-name <value>", `Custom event name for the aggregator.`).option("--exposed-event-keys <json>", `Event keys exposed by the aggregator.`).option("--unit-name <value>", `Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.`).option("--default-interval-count <number>", `Default interval count for usage periods.`).option("--default-interval-period <value>", `Default interval period for usage periods.`).option("--thresholds <json>", `Thresholds for the aggregator.`).requiredOption("--operation <value>", `The aggregation operation to perform.`).option("--property <value>", `The property to sum.`).addHelpText("after", `
39266
39257
  Examples:
39267
- hyperline agents create-agent-plan --name <name> --mode <mode>
39268
- hyperline agents create-agent-plan --name <name> --mode <mode> --rate-card-id <rate_card_id> --overage-mode <overage_mode>
39269
- hyperline agents create-agent-plan --name <name> --mode <mode> --output json`).action(async (opts) => {
39258
+ hyperline aggregators create --entity <entity> --operation <operation>
39259
+ hyperline aggregators create --entity <entity> --operation <operation> --type <type> --where <where>
39260
+ hyperline aggregators create --entity <entity> --operation <operation> --output json`).action(async (opts) => {
39270
39261
  const ctx = resource.parent?.opts()._ctx;
39271
39262
  if (!ctx) {
39272
39263
  process.stderr.write("Error: Not authenticated\n");
39273
39264
  process.exit(1);
39274
39265
  }
39275
39266
  const args = {};
39267
+ if (opts.entity !== void 0)
39268
+ args.entity = opts.entity;
39269
+ if (opts.type !== void 0)
39270
+ args.type = opts.type;
39276
39271
  if (opts.name !== void 0)
39277
39272
  args.name = opts.name;
39278
- if (opts.rateCardId !== void 0)
39279
- args.rate_card_id = opts.rateCardId;
39280
- if (opts.overageMode !== void 0)
39281
- args.overage_mode = opts.overageMode;
39282
- if (opts.markupPercent !== void 0)
39283
- args.markup_percent = opts.markupPercent;
39284
- if (opts.overageMarkupPercent !== void 0)
39285
- args.overage_markup_percent = opts.overageMarkupPercent;
39286
- if (opts.overageRateCardId !== void 0)
39287
- args.overage_rate_card_id = opts.overageRateCardId;
39288
- if (opts.perSeatCredits !== void 0)
39289
- args.per_seat_credits = opts.perSeatCredits;
39290
- if (opts.settlementSchedule !== void 0)
39291
- args.settlement_schedule = opts.settlementSchedule;
39292
- if (opts.mode !== void 0)
39293
- args.mode = opts.mode;
39294
- if (opts.settlementIntervalMinutes !== void 0)
39295
- args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
39296
- if (opts.grantRolloverEnabled !== void 0)
39297
- args.grant_rollover_enabled = true;
39298
- if (opts.windows !== void 0)
39299
- args.windows = JSON.parse(opts.windows);
39273
+ if (opts.description !== void 0)
39274
+ args.description = opts.description;
39275
+ if (opts.customEventName !== void 0)
39276
+ args.custom_event_name = opts.customEventName;
39277
+ if (opts.unitName !== void 0)
39278
+ args.unit_name = opts.unitName;
39279
+ if (opts.defaultIntervalPeriod !== void 0)
39280
+ args.default_interval_period = opts.defaultIntervalPeriod;
39281
+ if (opts.operation !== void 0)
39282
+ args.operation = opts.operation;
39283
+ if (opts.property !== void 0)
39284
+ args.property = opts.property;
39285
+ if (opts.defaultIntervalCount !== void 0)
39286
+ args.default_interval_count = Number(opts.defaultIntervalCount);
39287
+ if (opts.allowNegativeValues !== void 0)
39288
+ args.allow_negative_values = true;
39289
+ if (opts.aggregateOnCustomersEnabled !== void 0)
39290
+ args.aggregate_on_customers_enabled = true;
39291
+ if (opts.where !== void 0)
39292
+ args.where = JSON.parse(opts.where);
39293
+ if (opts.exposedEventKeys !== void 0)
39294
+ args.exposed_event_keys = JSON.parse(opts.exposedEventKeys);
39295
+ if (opts.thresholds !== void 0)
39296
+ args.thresholds = JSON.parse(opts.thresholds);
39300
39297
  await ctx.execute({
39301
39298
  method: "POST",
39302
- path: "/v1/agents/plans",
39299
+ path: "/v1/aggregators",
39303
39300
  args,
39304
39301
  queryParamKeys: []
39305
39302
  });
39306
39303
  });
39307
- resource.command("get-agent-plan").description(`Get one AI agent billing plan by id, with its embedded rate card, window definitions, markups, per-seat grants and minted catalog object ids.`).requiredOption("--plan-id <value>", `plan_id parameter`).addHelpText("after", `
39304
+ resource.command("get").description(`Retrieve a specific aggregator by ID.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
39308
39305
  Examples:
39309
- hyperline agents get-agent-plan --plan-id <plan_id>`).action(async (opts) => {
39306
+ hyperline aggregators get --id <id>`).action(async (opts) => {
39310
39307
  const ctx = resource.parent?.opts()._ctx;
39311
39308
  if (!ctx) {
39312
39309
  process.stderr.write("Error: Not authenticated\n");
39313
39310
  process.exit(1);
39314
39311
  }
39315
39312
  const args = {};
39316
- if (opts.planId !== void 0)
39317
- args.plan_id = opts.planId;
39313
+ if (opts.id !== void 0)
39314
+ args.id = opts.id;
39318
39315
  await ctx.execute({
39319
39316
  method: "GET",
39320
- path: "/v1/agents/plans/{plan_id}",
39317
+ path: "/v1/aggregators/{id}",
39321
39318
  args,
39322
39319
  queryParamKeys: []
39323
39320
  });
39324
39321
  });
39325
- resource.command("replace-agent-plan").description(`Replace an AI agent billing plan (whole-row semantics). Changes take effect on the next call for every customer on the plan; mode is immutable. Overage is priced by overage_markup_percent or by overage_rate_card_id, never both.`).requiredOption("--plan-id <value>", `plan_id parameter`).requiredOption("--name <value>", `Human-readable resource name.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
39326
-
39327
- - refuse: Rejects the call that crosses the boundary without deducting usage.
39328
- - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--windows <json>", `Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.`).option("--per-seat-credits <value>", `Credits granted per seat per billing period. Null grants no credits.`).option("--grant-rollover-enabled", `Whether granted credits survive renewal. Purchased credits always roll over.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
39329
-
39330
- - calendar_month: Settles at the end of each UTC calendar month.`).addHelpText("after", `
39322
+ resource.command("update").description(`Update an existing aggregator's configuration.`).requiredOption("--id <value>", `id parameter`).option("--entity <value>", `The billable event entity to aggregate.`).option("--type <value>", `The type of aggregator.`).option("--where <json>", `Filter conditions for the aggregation.`).option("--name <value>", `Name of the aggregator.`).option("--description <value>", `Description of the aggregator.`).option("--allow-negative-values", `Whether the aggregator can produce negative values.`).option("--aggregate-on-customers-enabled", `Whether the aggregator should aggregate on customers.`).option("--custom-event-name <value>", `Custom event name for the aggregator.`).option("--exposed-event-keys <json>", `Event keys exposed by the aggregator.`).option("--unit-name <value>", `Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.`).option("--default-interval-count <number>", `Default interval count for usage periods.`).option("--default-interval-period <value>", `Default interval period for usage periods.`).option("--thresholds <json>", `Thresholds for the aggregator. Replaces existing thresholds.`).option("--operation <value>", `The aggregation operation to perform.`).option("--property <value>", `The property to sum. Required when operation is 'sum'.`).addHelpText("after", `
39331
39323
  Examples:
39332
- hyperline agents replace-agent-plan --plan-id <plan_id> --name <name>
39333
- hyperline agents replace-agent-plan --plan-id <plan_id> --name <name> --rate-card-id <rate_card_id> --overage-mode <overage_mode>
39334
- hyperline agents replace-agent-plan --plan-id <plan_id> --name <name> --output json`).action(async (opts) => {
39324
+ hyperline aggregators update --id <id>
39325
+ hyperline aggregators update --id <id> --entity <entity> --type <type>
39326
+ hyperline aggregators update --id <id> --output json`).action(async (opts) => {
39335
39327
  const ctx = resource.parent?.opts()._ctx;
39336
39328
  if (!ctx) {
39337
39329
  process.stderr.write("Error: Not authenticated\n");
39338
39330
  process.exit(1);
39339
39331
  }
39340
39332
  const args = {};
39341
- if (opts.planId !== void 0)
39342
- args.plan_id = opts.planId;
39333
+ if (opts.id !== void 0)
39334
+ args.id = opts.id;
39335
+ if (opts.entity !== void 0)
39336
+ args.entity = opts.entity;
39337
+ if (opts.type !== void 0)
39338
+ args.type = opts.type;
39343
39339
  if (opts.name !== void 0)
39344
39340
  args.name = opts.name;
39345
- if (opts.rateCardId !== void 0)
39346
- args.rate_card_id = opts.rateCardId;
39347
- if (opts.overageMode !== void 0)
39348
- args.overage_mode = opts.overageMode;
39349
- if (opts.markupPercent !== void 0)
39350
- args.markup_percent = opts.markupPercent;
39351
- if (opts.overageMarkupPercent !== void 0)
39352
- args.overage_markup_percent = opts.overageMarkupPercent;
39353
- if (opts.overageRateCardId !== void 0)
39354
- args.overage_rate_card_id = opts.overageRateCardId;
39355
- if (opts.perSeatCredits !== void 0)
39356
- args.per_seat_credits = opts.perSeatCredits;
39357
- if (opts.settlementSchedule !== void 0)
39358
- args.settlement_schedule = opts.settlementSchedule;
39359
- if (opts.settlementIntervalMinutes !== void 0)
39360
- args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
39361
- if (opts.grantRolloverEnabled !== void 0)
39362
- args.grant_rollover_enabled = true;
39363
- if (opts.windows !== void 0)
39364
- args.windows = JSON.parse(opts.windows);
39341
+ if (opts.description !== void 0)
39342
+ args.description = opts.description;
39343
+ if (opts.customEventName !== void 0)
39344
+ args.custom_event_name = opts.customEventName;
39345
+ if (opts.unitName !== void 0)
39346
+ args.unit_name = opts.unitName;
39347
+ if (opts.defaultIntervalPeriod !== void 0)
39348
+ args.default_interval_period = opts.defaultIntervalPeriod;
39349
+ if (opts.operation !== void 0)
39350
+ args.operation = opts.operation;
39351
+ if (opts.property !== void 0)
39352
+ args.property = opts.property;
39353
+ if (opts.defaultIntervalCount !== void 0)
39354
+ args.default_interval_count = Number(opts.defaultIntervalCount);
39355
+ if (opts.allowNegativeValues !== void 0)
39356
+ args.allow_negative_values = true;
39357
+ if (opts.aggregateOnCustomersEnabled !== void 0)
39358
+ args.aggregate_on_customers_enabled = true;
39359
+ if (opts.where !== void 0)
39360
+ args.where = JSON.parse(opts.where);
39361
+ if (opts.exposedEventKeys !== void 0)
39362
+ args.exposed_event_keys = JSON.parse(opts.exposedEventKeys);
39363
+ if (opts.thresholds !== void 0)
39364
+ args.thresholds = JSON.parse(opts.thresholds);
39365
39365
  await ctx.execute({
39366
39366
  method: "PUT",
39367
- path: "/v1/agents/plans/{plan_id}",
39367
+ path: "/v1/aggregators/{id}",
39368
39368
  args,
39369
39369
  queryParamKeys: []
39370
39370
  });
39371
39371
  });
39372
- resource.command("delete-agent-plan").description(`Delete an AI agent billing plan. Refused (409, plan_in_use) while any customer is still attached to it.`).requiredOption("--plan-id <value>", `plan_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39372
+ resource.command("delete").description(`Delete an aggregator by ID. Will fail if the aggregator is linked to a product.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39373
39373
  Examples:
39374
- hyperline agents delete-agent-plan --plan-id <plan_id>
39375
- hyperline agents delete-agent-plan --plan-id <plan_id> --output json`).action(async (opts) => {
39374
+ hyperline aggregators delete --id <id>
39375
+ hyperline aggregators delete --id <id> --output json`).action(async (opts) => {
39376
39376
  const ctx = resource.parent?.opts()._ctx;
39377
39377
  if (!ctx) {
39378
39378
  process.stderr.write("Error: Not authenticated\n");
39379
39379
  process.exit(1);
39380
39380
  }
39381
39381
  const args = {};
39382
- if (opts.planId !== void 0)
39383
- args.plan_id = opts.planId;
39382
+ if (opts.id !== void 0)
39383
+ args.id = opts.id;
39384
39384
  if (!opts.yes) {
39385
39385
  const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39386
39386
  if (!confirmed) {
@@ -39390,113 +39390,182 @@ Examples:
39390
39390
  }
39391
39391
  await ctx.execute({
39392
39392
  method: "DELETE",
39393
- path: "/v1/agents/plans/{plan_id}",
39393
+ path: "/v1/aggregators/{id}",
39394
39394
  args,
39395
39395
  queryParamKeys: []
39396
39396
  });
39397
39397
  });
39398
- resource.command("get-agent-default-plan").description(`Get the workspace's default AI agent billing plan marker (plan id and auto_apply flag). 404 when none is set.`).addHelpText("after", `
39398
+ }
39399
+
39400
+ // build/commands/generated/aggregators-usage.js
39401
+ function registerAggregators_UsageCommands(parent) {
39402
+ const resource = parent.command("aggregators-usage").description("Manage aggregators > usage");
39403
+ resource.command("get-aggregator-usage").description(`Retrieve a usage row for an aggregator. Use the timeseries, group-by-customer or events endpoints to query metering data.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
39399
39404
  Examples:
39400
- hyperline agents get-agent-default-plan`).action(async (_opts) => {
39405
+ hyperline aggregators-usage get-aggregator-usage --id <id>`).action(async (opts) => {
39401
39406
  const ctx = resource.parent?.opts()._ctx;
39402
39407
  if (!ctx) {
39403
39408
  process.stderr.write("Error: Not authenticated\n");
39404
39409
  process.exit(1);
39405
39410
  }
39406
39411
  const args = {};
39412
+ if (opts.id !== void 0)
39413
+ args.id = opts.id;
39407
39414
  await ctx.execute({
39408
39415
  method: "GET",
39409
- path: "/v1/agents/default-plan",
39416
+ path: "/v1/aggregators/{id}/usage",
39410
39417
  args,
39411
39418
  queryParamKeys: []
39412
39419
  });
39413
39420
  });
39414
- resource.command("set-agent-default-plan").description(`Mark one plan as the workspace's default AI agent billing plan (body: plan_id, optional auto_apply). Replaces the previous marker; 404 when the plan is not this workspace's.`).requiredOption("--plan-id <value>", `Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.`).option("--auto-apply", `Whether eligible newly ingested customers receive the default plan automatically.`).addHelpText("after", `
39421
+ resource.command("get-aggregator-usage-timeseries").description(`Get client-wide usage for an aggregator bucketed by month/day/hour over a period.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--group-by <value>", `Bucket size for the timeseries.`).addHelpText("after", `
39415
39422
  Examples:
39416
- hyperline agents set-agent-default-plan --plan-id <plan_id>
39417
- hyperline agents set-agent-default-plan --plan-id <plan_id> --auto-apply
39418
- hyperline agents set-agent-default-plan --plan-id <plan_id> --output json`).action(async (opts) => {
39423
+ hyperline aggregators-usage get-aggregator-usage-timeseries --id <id>
39424
+ hyperline aggregators-usage get-aggregator-usage-timeseries --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
39419
39425
  const ctx = resource.parent?.opts()._ctx;
39420
39426
  if (!ctx) {
39421
39427
  process.stderr.write("Error: Not authenticated\n");
39422
39428
  process.exit(1);
39423
39429
  }
39424
39430
  const args = {};
39425
- if (opts.planId !== void 0)
39426
- args.plan_id = opts.planId;
39427
- if (opts.autoApply !== void 0)
39428
- args.auto_apply = true;
39431
+ if (opts.id !== void 0)
39432
+ args.id = opts.id;
39433
+ if (opts.startDate !== void 0)
39434
+ args.start_date = opts.startDate;
39435
+ if (opts.endDate !== void 0)
39436
+ args.end_date = opts.endDate;
39437
+ if (opts.aggregatorFilterId !== void 0)
39438
+ args.aggregator_filter_id = opts.aggregatorFilterId;
39439
+ if (opts.groupBy !== void 0)
39440
+ args.group_by = opts.groupBy;
39429
39441
  await ctx.execute({
39430
- method: "PUT",
39431
- path: "/v1/agents/default-plan",
39442
+ method: "GET",
39443
+ path: "/v1/aggregators/{id}/usage/timeseries",
39432
39444
  args,
39433
- queryParamKeys: []
39445
+ queryParamKeys: [
39446
+ "start_date",
39447
+ "end_date",
39448
+ "aggregator_filter_id",
39449
+ "group_by"
39450
+ ]
39434
39451
  });
39435
39452
  });
39436
- resource.command("clear-agent-default-plan").description(`Clear the workspace's default AI agent billing plan marker. The plan itself is untouched. 404 when none is set.`).option("--yes", "Skip confirmation").addHelpText("after", `
39453
+ resource.command("get-aggregator-usage-group-by-customer").description(`Per-customer total usage for an aggregator over a period, ranked by total. Paginated with take/skip.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39437
39454
  Examples:
39438
- hyperline agents clear-agent-default-plan
39439
- hyperline agents clear-agent-default-plan --output json`).action(async (opts) => {
39455
+ hyperline aggregators-usage get-aggregator-usage-group-by-customer --id <id>
39456
+ hyperline aggregators-usage get-aggregator-usage-group-by-customer --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
39440
39457
  const ctx = resource.parent?.opts()._ctx;
39441
39458
  if (!ctx) {
39442
39459
  process.stderr.write("Error: Not authenticated\n");
39443
39460
  process.exit(1);
39444
39461
  }
39445
39462
  const args = {};
39446
- if (!opts.yes) {
39447
- const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39448
- if (!confirmed) {
39449
- process.stdout.write("Aborted.\n");
39450
- return;
39451
- }
39463
+ if (opts.id !== void 0)
39464
+ args.id = opts.id;
39465
+ if (opts.startDate !== void 0)
39466
+ args.start_date = opts.startDate;
39467
+ if (opts.endDate !== void 0)
39468
+ args.end_date = opts.endDate;
39469
+ if (opts.aggregatorFilterId !== void 0)
39470
+ args.aggregator_filter_id = opts.aggregatorFilterId;
39471
+ if (opts.take !== void 0)
39472
+ args.take = Number(opts.take);
39473
+ if (opts.skip !== void 0)
39474
+ args.skip = Number(opts.skip);
39475
+ await ctx.execute({
39476
+ method: "GET",
39477
+ path: "/v1/aggregators/{id}/usage/group-by-customer",
39478
+ args,
39479
+ queryParamKeys: [
39480
+ "start_date",
39481
+ "end_date",
39482
+ "aggregator_filter_id",
39483
+ "take",
39484
+ "skip"
39485
+ ]
39486
+ });
39487
+ });
39488
+ resource.command("get-aggregator-usage-events").description(`List raw billable events for an aggregator across every customer of the client. Paginated with take/skip.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39489
+ Examples:
39490
+ hyperline aggregators-usage get-aggregator-usage-events --id <id>
39491
+ hyperline aggregators-usage get-aggregator-usage-events --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
39492
+ const ctx = resource.parent?.opts()._ctx;
39493
+ if (!ctx) {
39494
+ process.stderr.write("Error: Not authenticated\n");
39495
+ process.exit(1);
39452
39496
  }
39497
+ const args = {};
39498
+ if (opts.id !== void 0)
39499
+ args.id = opts.id;
39500
+ if (opts.startDate !== void 0)
39501
+ args.start_date = opts.startDate;
39502
+ if (opts.endDate !== void 0)
39503
+ args.end_date = opts.endDate;
39504
+ if (opts.aggregatorFilterId !== void 0)
39505
+ args.aggregator_filter_id = opts.aggregatorFilterId;
39506
+ if (opts.take !== void 0)
39507
+ args.take = Number(opts.take);
39508
+ if (opts.skip !== void 0)
39509
+ args.skip = Number(opts.skip);
39453
39510
  await ctx.execute({
39454
- method: "DELETE",
39455
- path: "/v1/agents/default-plan",
39511
+ method: "GET",
39512
+ path: "/v1/aggregators/{id}/usage/events",
39456
39513
  args,
39457
- queryParamKeys: []
39514
+ queryParamKeys: [
39515
+ "start_date",
39516
+ "end_date",
39517
+ "aggregator_filter_id",
39518
+ "take",
39519
+ "skip"
39520
+ ]
39458
39521
  });
39459
39522
  });
39460
- resource.command("list-agent-rate-cards").description(`List AI rate cards: named pricing row sets in credits, window units or currency. Shows what plans/policies/products depend on each. Filter by denomination, currency or name search; paginated with take/skip.`).option("--denomination <value>", `Unit in which rate-card prices are expressed.
39523
+ }
39461
39524
 
39462
- - credits: Credit counts.
39463
- - units: Weighted rolling-allowance units.
39464
- - currency: Major units of the specified currency.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--search <value>", `search`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39525
+ // build/commands/generated/ai-billing.js
39526
+ function registerAi_BillingCommands(parent) {
39527
+ const resource = parent.command("ai-billing").description("Manage ai > billing");
39528
+ resource.command("list-agent-plans").description(`List AI agent billing plans: workspace-level offers carrying a billing mode (wallet/credits/windows), rate card, allowance windows, markups and per-seat credit grants. Filter by mode; paginated with take/skip.`).option("--mode <value>", `Billing mode.
39529
+
39530
+ - wallet: Charges a monetary wallet.
39531
+ - credits: Consumes a credit balance.
39532
+ - windows: Meters weighted units against rolling allowances.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39465
39533
  Examples:
39466
- hyperline agents list-agent-rate-cards
39467
- hyperline agents list-agent-rate-cards --denomination <denomination> --currency <currency>`).action(async (opts) => {
39534
+ hyperline ai-billing list-agent-plans
39535
+ hyperline ai-billing list-agent-plans --mode <mode> --take <take>`).action(async (opts) => {
39468
39536
  const ctx = resource.parent?.opts()._ctx;
39469
39537
  if (!ctx) {
39470
39538
  process.stderr.write("Error: Not authenticated\n");
39471
39539
  process.exit(1);
39472
39540
  }
39473
39541
  const args = {};
39474
- if (opts.denomination !== void 0)
39475
- args.denomination = opts.denomination;
39476
- if (opts.currency !== void 0)
39477
- args.currency = opts.currency;
39478
- if (opts.search !== void 0)
39479
- args.search = opts.search;
39542
+ if (opts.mode !== void 0)
39543
+ args.mode = opts.mode;
39480
39544
  if (opts.take !== void 0)
39481
39545
  args.take = Number(opts.take);
39482
39546
  if (opts.skip !== void 0)
39483
39547
  args.skip = Number(opts.skip);
39484
39548
  await ctx.execute({
39485
39549
  method: "GET",
39486
- path: "/v1/agents/rate-cards",
39550
+ path: "/v1/ai/billing/plans",
39487
39551
  args,
39488
- queryParamKeys: ["denomination", "currency", "search", "take", "skip"]
39552
+ queryParamKeys: ["mode", "take", "skip"]
39489
39553
  });
39490
39554
  });
39491
- resource.command("create-agent-rate-card").description(`Create an AI rate card with llm rows (per-1M input/output token rates) and item rows (per-unit rates), a denomination (credits/units/currency) and an optional USD fallback conversion.`).requiredOption("--name <value>", `Human-readable resource name.`).option("--fallback-per-usd <value>", `Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.`).requiredOption("--rows <json>", `All pricing rows on the card; replacement replaces the complete list.`).requiredOption("--denomination <value>", `Unit in which rate-card prices are expressed.
39555
+ resource.command("create-agent-plan").description(`Create an AI agent billing plan: name, billing mode (wallet/credits/windows), rate card reference, allowance windows, markups, per-seat credit grants and overage stance. Past-limit usage is priced EITHER by overage_markup_percent over the base rates OR by overage_rate_card_id, a currency rate card whose own rates are the overage price \u2014 never both. Metered overage mints the plan's invoice container.`).requiredOption("--name <value>", `Human-readable resource name.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
39492
39556
 
39493
- - credits: Credit counts.
39494
- - units: Weighted rolling-allowance units.
39495
- - currency: Major units of the specified currency.`).option("--currency <value>", `ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.`).addHelpText("after", `
39557
+ - refuse: Rejects the call that crosses the boundary without deducting usage.
39558
+ - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--windows <json>", `Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.`).option("--per-seat-credits <value>", `Credits granted per seat per billing period. Null grants no credits.`).option("--grant-rollover-enabled", `Whether granted credits survive renewal. Purchased credits always roll over.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
39559
+
39560
+ - calendar_month: Settles at the end of each UTC calendar month.`).requiredOption("--mode <value>", `Billing mode.
39561
+
39562
+ - wallet: Charges a monetary wallet.
39563
+ - credits: Consumes a credit balance.
39564
+ - windows: Meters weighted units against rolling allowances.`).addHelpText("after", `
39496
39565
  Examples:
39497
- hyperline agents create-agent-rate-card --name <name> --rows <rows> --denomination <denomination>
39498
- hyperline agents create-agent-rate-card --name <name> --rows <rows> --denomination <denomination> --fallback-per-usd <fallback_per_usd> --currency <currency>
39499
- hyperline agents create-agent-rate-card --name <name> --rows <rows> --denomination <denomination> --output json`).action(async (opts) => {
39566
+ hyperline ai-billing create-agent-plan --name <name> --mode <mode>
39567
+ hyperline ai-billing create-agent-plan --name <name> --mode <mode> --rate-card-id <rate_card_id> --overage-mode <overage_mode>
39568
+ hyperline ai-billing create-agent-plan --name <name> --mode <mode> --output json`).action(async (opts) => {
39500
39569
  const ctx = resource.parent?.opts()._ctx;
39501
39570
  if (!ctx) {
39502
39571
  process.stderr.write("Error: Not authenticated\n");
@@ -39505,77 +39574,112 @@ Examples:
39505
39574
  const args = {};
39506
39575
  if (opts.name !== void 0)
39507
39576
  args.name = opts.name;
39508
- if (opts.fallbackPerUsd !== void 0)
39509
- args.fallback_per_usd = opts.fallbackPerUsd;
39510
- if (opts.denomination !== void 0)
39511
- args.denomination = opts.denomination;
39512
- if (opts.currency !== void 0)
39513
- args.currency = opts.currency;
39514
- if (opts.rows !== void 0)
39515
- args.rows = JSON.parse(opts.rows);
39577
+ if (opts.rateCardId !== void 0)
39578
+ args.rate_card_id = opts.rateCardId;
39579
+ if (opts.overageMode !== void 0)
39580
+ args.overage_mode = opts.overageMode;
39581
+ if (opts.markupPercent !== void 0)
39582
+ args.markup_percent = opts.markupPercent;
39583
+ if (opts.overageMarkupPercent !== void 0)
39584
+ args.overage_markup_percent = opts.overageMarkupPercent;
39585
+ if (opts.overageRateCardId !== void 0)
39586
+ args.overage_rate_card_id = opts.overageRateCardId;
39587
+ if (opts.perSeatCredits !== void 0)
39588
+ args.per_seat_credits = opts.perSeatCredits;
39589
+ if (opts.settlementSchedule !== void 0)
39590
+ args.settlement_schedule = opts.settlementSchedule;
39591
+ if (opts.mode !== void 0)
39592
+ args.mode = opts.mode;
39593
+ if (opts.settlementIntervalMinutes !== void 0)
39594
+ args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
39595
+ if (opts.grantRolloverEnabled !== void 0)
39596
+ args.grant_rollover_enabled = true;
39597
+ if (opts.windows !== void 0)
39598
+ args.windows = JSON.parse(opts.windows);
39516
39599
  await ctx.execute({
39517
39600
  method: "POST",
39518
- path: "/v1/agents/rate-cards",
39601
+ path: "/v1/ai/billing/plans",
39519
39602
  args,
39520
39603
  queryParamKeys: []
39521
39604
  });
39522
39605
  });
39523
- resource.command("get-agent-rate-card").description(`Get one AI rate card by id with all its pricing rows and usage counts (plans, policies, credit product).`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).addHelpText("after", `
39606
+ resource.command("get-agent-plan").description(`Get one AI agent billing plan by id, with its embedded rate card, window definitions, markups, per-seat grants and minted catalog object ids.`).requiredOption("--plan-id <value>", `plan_id parameter`).addHelpText("after", `
39524
39607
  Examples:
39525
- hyperline agents get-agent-rate-card --rate-card-id <rate_card_id>`).action(async (opts) => {
39608
+ hyperline ai-billing get-agent-plan --plan-id <plan_id>`).action(async (opts) => {
39526
39609
  const ctx = resource.parent?.opts()._ctx;
39527
39610
  if (!ctx) {
39528
39611
  process.stderr.write("Error: Not authenticated\n");
39529
39612
  process.exit(1);
39530
39613
  }
39531
39614
  const args = {};
39532
- if (opts.rateCardId !== void 0)
39533
- args.rate_card_id = opts.rateCardId;
39615
+ if (opts.planId !== void 0)
39616
+ args.plan_id = opts.planId;
39534
39617
  await ctx.execute({
39535
39618
  method: "GET",
39536
- path: "/v1/agents/rate-cards/{rate_card_id}",
39619
+ path: "/v1/ai/billing/plans/{plan_id}",
39537
39620
  args,
39538
39621
  queryParamKeys: []
39539
39622
  });
39540
39623
  });
39541
- resource.command("replace-agent-rate-card").description(`Replace an AI rate card's rows, name, description and USD fallback (whole-card semantics). Denomination and currency are immutable.`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).requiredOption("--name <value>", `Human-readable resource name.`).option("--fallback-per-usd <value>", `Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.`).requiredOption("--rows <json>", `All pricing rows on the card; replacement replaces the complete list.`).addHelpText("after", `
39624
+ resource.command("replace-agent-plan").description(`Replace an AI agent billing plan (whole-row semantics). Changes take effect on the next call for every customer on the plan; mode is immutable. Overage is priced by overage_markup_percent or by overage_rate_card_id, never both.`).requiredOption("--plan-id <value>", `plan_id parameter`).requiredOption("--name <value>", `Human-readable resource name.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
39625
+
39626
+ - refuse: Rejects the call that crosses the boundary without deducting usage.
39627
+ - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--windows <json>", `Rolling allowances. Required for windows plans; each window meters every call. A plan replacement replaces the entire array.`).option("--per-seat-credits <value>", `Credits granted per seat per billing period. Null grants no credits.`).option("--grant-rollover-enabled", `Whether granted credits survive renewal. Purchased credits always roll over.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
39628
+
39629
+ - calendar_month: Settles at the end of each UTC calendar month.`).addHelpText("after", `
39542
39630
  Examples:
39543
- hyperline agents replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows>
39544
- hyperline agents replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows> --fallback-per-usd <fallback_per_usd>
39545
- hyperline agents replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows> --output json`).action(async (opts) => {
39631
+ hyperline ai-billing replace-agent-plan --plan-id <plan_id> --name <name>
39632
+ hyperline ai-billing replace-agent-plan --plan-id <plan_id> --name <name> --rate-card-id <rate_card_id> --overage-mode <overage_mode>
39633
+ hyperline ai-billing replace-agent-plan --plan-id <plan_id> --name <name> --output json`).action(async (opts) => {
39546
39634
  const ctx = resource.parent?.opts()._ctx;
39547
39635
  if (!ctx) {
39548
39636
  process.stderr.write("Error: Not authenticated\n");
39549
39637
  process.exit(1);
39550
39638
  }
39551
39639
  const args = {};
39552
- if (opts.rateCardId !== void 0)
39553
- args.rate_card_id = opts.rateCardId;
39640
+ if (opts.planId !== void 0)
39641
+ args.plan_id = opts.planId;
39554
39642
  if (opts.name !== void 0)
39555
39643
  args.name = opts.name;
39556
- if (opts.fallbackPerUsd !== void 0)
39557
- args.fallback_per_usd = opts.fallbackPerUsd;
39558
- if (opts.rows !== void 0)
39559
- args.rows = JSON.parse(opts.rows);
39644
+ if (opts.rateCardId !== void 0)
39645
+ args.rate_card_id = opts.rateCardId;
39646
+ if (opts.overageMode !== void 0)
39647
+ args.overage_mode = opts.overageMode;
39648
+ if (opts.markupPercent !== void 0)
39649
+ args.markup_percent = opts.markupPercent;
39650
+ if (opts.overageMarkupPercent !== void 0)
39651
+ args.overage_markup_percent = opts.overageMarkupPercent;
39652
+ if (opts.overageRateCardId !== void 0)
39653
+ args.overage_rate_card_id = opts.overageRateCardId;
39654
+ if (opts.perSeatCredits !== void 0)
39655
+ args.per_seat_credits = opts.perSeatCredits;
39656
+ if (opts.settlementSchedule !== void 0)
39657
+ args.settlement_schedule = opts.settlementSchedule;
39658
+ if (opts.settlementIntervalMinutes !== void 0)
39659
+ args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
39660
+ if (opts.grantRolloverEnabled !== void 0)
39661
+ args.grant_rollover_enabled = true;
39662
+ if (opts.windows !== void 0)
39663
+ args.windows = JSON.parse(opts.windows);
39560
39664
  await ctx.execute({
39561
39665
  method: "PUT",
39562
- path: "/v1/agents/rate-cards/{rate_card_id}",
39666
+ path: "/v1/ai/billing/plans/{plan_id}",
39563
39667
  args,
39564
39668
  queryParamKeys: []
39565
39669
  });
39566
39670
  });
39567
- resource.command("delete-agent-rate-card").description(`Delete an AI rate card. Refused (409, rate_card_in_use) while any plan, credit product or customer policy still uses it.`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39671
+ resource.command("delete-agent-plan").description(`Delete an AI agent billing plan. Refused (409, plan_in_use) while any customer is still attached to it.`).requiredOption("--plan-id <value>", `plan_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39568
39672
  Examples:
39569
- hyperline agents delete-agent-rate-card --rate-card-id <rate_card_id>
39570
- hyperline agents delete-agent-rate-card --rate-card-id <rate_card_id> --output json`).action(async (opts) => {
39673
+ hyperline ai-billing delete-agent-plan --plan-id <plan_id>
39674
+ hyperline ai-billing delete-agent-plan --plan-id <plan_id> --output json`).action(async (opts) => {
39571
39675
  const ctx = resource.parent?.opts()._ctx;
39572
39676
  if (!ctx) {
39573
39677
  process.stderr.write("Error: Not authenticated\n");
39574
39678
  process.exit(1);
39575
39679
  }
39576
39680
  const args = {};
39577
- if (opts.rateCardId !== void 0)
39578
- args.rate_card_id = opts.rateCardId;
39681
+ if (opts.planId !== void 0)
39682
+ args.plan_id = opts.planId;
39579
39683
  if (!opts.yes) {
39580
39684
  const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39581
39685
  if (!confirmed) {
@@ -39585,14 +39689,14 @@ Examples:
39585
39689
  }
39586
39690
  await ctx.execute({
39587
39691
  method: "DELETE",
39588
- path: "/v1/agents/rate-cards/{rate_card_id}",
39692
+ path: "/v1/ai/billing/plans/{plan_id}",
39589
39693
  args,
39590
39694
  queryParamKeys: []
39591
39695
  });
39592
39696
  });
39593
- resource.command("list-agent-credit-products").description(`List the credit products AI agent usage can draw down, with their purchasable packs and default rate cards. Customer pot balances live on the customer credits endpoints.`).addHelpText("after", `
39697
+ resource.command("get-agent-default-plan").description(`Get the workspace's default AI agent billing plan marker (plan id and auto_apply flag). 404 when none is set.`).addHelpText("after", `
39594
39698
  Examples:
39595
- hyperline agents list-agent-credit-products`).action(async (_opts) => {
39699
+ hyperline ai-billing get-agent-default-plan`).action(async (_opts) => {
39596
39700
  const ctx = resource.parent?.opts()._ctx;
39597
39701
  if (!ctx) {
39598
39702
  process.stderr.write("Error: Not authenticated\n");
@@ -39601,65 +39705,43 @@ Examples:
39601
39705
  const args = {};
39602
39706
  await ctx.execute({
39603
39707
  method: "GET",
39604
- path: "/v1/agents/credit-products",
39708
+ path: "/v1/ai/billing/default-plan",
39605
39709
  args,
39606
39710
  queryParamKeys: []
39607
39711
  });
39608
39712
  });
39609
- resource.command("list-agent-cost-catalog").description(`List the AI cost catalog: registry model prices merged with this workspace's negotiated overrides, its own custom cost items (source custom), and the unpriced pairs its telemetry has carried (source unlisted). Rates are USD decimal strings. Pass enabled_only=true for just the enabled catalog.`).option("--enabled-only <value>", `enabled_only`).addHelpText("after", `
39610
- Examples:
39611
- hyperline agents list-agent-cost-catalog
39612
- hyperline agents list-agent-cost-catalog --enabled-only <enabled_only>`).action(async (opts) => {
39613
- const ctx = resource.parent?.opts()._ctx;
39614
- if (!ctx) {
39615
- process.stderr.write("Error: Not authenticated\n");
39616
- process.exit(1);
39617
- }
39618
- const args = {};
39619
- if (opts.enabledOnly !== void 0)
39620
- args.enabled_only = opts.enabledOnly;
39621
- await ctx.execute({
39622
- method: "GET",
39623
- path: "/v1/agents/cost-catalog",
39624
- args,
39625
- queryParamKeys: ["enabled_only"]
39626
- });
39627
- });
39628
- resource.command("create-agent-cost-catalog-item").description(`Create a custom AI cost item so a non-LLM vendor call is priced instead of landing unpriced at $0. provider/item must match hyperline.cost({ vendor, item }) verbatim and each dimensions[].key must match the unit the SDK sends. Re-creating an existing open item returns it unchanged (200); a pair the global registry already prices is refused \u2014 use the overrides endpoint for that.`).requiredOption("--provider <value>", `AI model provider, or the vendor of a custom cost item. This is not an integration connection.`).requiredOption("--item <value>", `Custom item name matching the usage payload.`).requiredOption("--dimensions <json>", `Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.`).addHelpText("after", `
39713
+ resource.command("set-agent-default-plan").description(`Mark one plan as the workspace's default AI agent billing plan (body: plan_id, optional auto_apply). Replaces the previous marker; 404 when the plan is not this workspace's.`).requiredOption("--plan-id <value>", `Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.`).option("--auto-apply", `Whether eligible newly ingested customers receive the default plan automatically.`).addHelpText("after", `
39629
39714
  Examples:
39630
- hyperline agents create-agent-cost-catalog-item --provider <provider> --item <item> --dimensions <dimensions>
39631
- hyperline agents create-agent-cost-catalog-item --provider <provider> --item <item> --dimensions <dimensions> --output json`).action(async (opts) => {
39715
+ hyperline ai-billing set-agent-default-plan --plan-id <plan_id>
39716
+ hyperline ai-billing set-agent-default-plan --plan-id <plan_id> --auto-apply
39717
+ hyperline ai-billing set-agent-default-plan --plan-id <plan_id> --output json`).action(async (opts) => {
39632
39718
  const ctx = resource.parent?.opts()._ctx;
39633
39719
  if (!ctx) {
39634
39720
  process.stderr.write("Error: Not authenticated\n");
39635
39721
  process.exit(1);
39636
39722
  }
39637
39723
  const args = {};
39638
- if (opts.provider !== void 0)
39639
- args.provider = opts.provider;
39640
- if (opts.item !== void 0)
39641
- args.item = opts.item;
39642
- if (opts.dimensions !== void 0)
39643
- args.dimensions = JSON.parse(opts.dimensions);
39724
+ if (opts.planId !== void 0)
39725
+ args.plan_id = opts.planId;
39726
+ if (opts.autoApply !== void 0)
39727
+ args.auto_apply = true;
39644
39728
  await ctx.execute({
39645
- method: "POST",
39646
- path: "/v1/agents/cost-catalog/items",
39729
+ method: "PUT",
39730
+ path: "/v1/ai/billing/default-plan",
39647
39731
  args,
39648
39732
  queryParamKeys: []
39649
39733
  });
39650
39734
  });
39651
- resource.command("delete-agent-cost-catalog-item").description(`Close a custom AI cost item by its custom_item_id. History is kept; new calls on that pair go back to unpriced. An override id passed here is a 404.`).requiredOption("--item-id <value>", `item_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39735
+ resource.command("clear-agent-default-plan").description(`Clear the workspace's default AI agent billing plan marker. The plan itself is untouched. 404 when none is set.`).option("--yes", "Skip confirmation").addHelpText("after", `
39652
39736
  Examples:
39653
- hyperline agents delete-agent-cost-catalog-item --item-id <item_id>
39654
- hyperline agents delete-agent-cost-catalog-item --item-id <item_id> --output json`).action(async (opts) => {
39737
+ hyperline ai-billing clear-agent-default-plan
39738
+ hyperline ai-billing clear-agent-default-plan --output json`).action(async (opts) => {
39655
39739
  const ctx = resource.parent?.opts()._ctx;
39656
39740
  if (!ctx) {
39657
39741
  process.stderr.write("Error: Not authenticated\n");
39658
39742
  process.exit(1);
39659
39743
  }
39660
39744
  const args = {};
39661
- if (opts.itemId !== void 0)
39662
- args.item_id = opts.itemId;
39663
39745
  if (!opts.yes) {
39664
39746
  const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39665
39747
  if (!confirmed) {
@@ -39669,186 +39751,130 @@ Examples:
39669
39751
  }
39670
39752
  await ctx.execute({
39671
39753
  method: "DELETE",
39672
- path: "/v1/agents/cost-catalog/items/{item_id}",
39754
+ path: "/v1/ai/billing/default-plan",
39673
39755
  args,
39674
39756
  queryParamKeys: []
39675
39757
  });
39676
39758
  });
39677
- resource.command("upsert-agent-cost-catalog-override").description(`Set this workspace's negotiated price for a registry AI model (input/output/cached/cache-write USD per 1M tokens, plus optional dimensions). Replaces any open override immediately; historical calls keep their original rate. A pair the registry does not know is refused \u2014 create a custom cost item instead.`).requiredOption("--provider <value>", `AI model provider, or the vendor of a custom cost item. This is not an integration connection.`).requiredOption("--model <value>", `Model identifier, or custom item identifier. Null on wildcard pricing rows.`).requiredOption("--input-per-m-tokens <value>", `Provider cost in USD per million input tokens, as an exact decimal string.`).requiredOption("--output-per-m-tokens <value>", `Provider cost in USD per million output tokens, as an exact decimal string.`).option("--cached-input-per-m-tokens <value>", `Provider cost in USD per million cached input tokens, as an exact decimal string.`).option("--cache-write-per-m-tokens <value>", `Provider cost in USD per million cache write tokens, as an exact decimal string.`).option("--dimensions <json>", `Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.`).addHelpText("after", `
39678
- Examples:
39679
- hyperline agents upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens>
39680
- hyperline agents upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens> --cached-input-per-m-tokens <cached_input_per_m_tokens> --cache-write-per-m-tokens <cache_write_per_m_tokens>
39681
- hyperline agents upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens> --output json`).action(async (opts) => {
39682
- const ctx = resource.parent?.opts()._ctx;
39683
- if (!ctx) {
39684
- process.stderr.write("Error: Not authenticated\n");
39685
- process.exit(1);
39686
- }
39687
- const args = {};
39688
- if (opts.provider !== void 0)
39689
- args.provider = opts.provider;
39690
- if (opts.model !== void 0)
39691
- args.model = opts.model;
39692
- if (opts.inputPerMTokens !== void 0)
39693
- args.input_per_m_tokens = opts.inputPerMTokens;
39694
- if (opts.outputPerMTokens !== void 0)
39695
- args.output_per_m_tokens = opts.outputPerMTokens;
39696
- if (opts.cachedInputPerMTokens !== void 0)
39697
- args.cached_input_per_m_tokens = opts.cachedInputPerMTokens;
39698
- if (opts.cacheWritePerMTokens !== void 0)
39699
- args.cache_write_per_m_tokens = opts.cacheWritePerMTokens;
39700
- if (opts.dimensions !== void 0)
39701
- args.dimensions = JSON.parse(opts.dimensions);
39702
- await ctx.execute({
39703
- method: "PUT",
39704
- path: "/v1/agents/cost-catalog/overrides",
39705
- args,
39706
- queryParamKeys: []
39707
- });
39708
- });
39709
- resource.command("delete-agent-cost-catalog-override").description(`Close this workspace's negotiated price override by its override.id; pricing falls back to the global registry rate. A custom cost item id passed here is a 404.`).requiredOption("--override-id <value>", `override_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39759
+ resource.command("list-agent-rate-cards").description(`List AI rate cards: named pricing row sets in credits, window units or currency. Shows what plans/policies/products depend on each. Filter by denomination, currency or name search; paginated with take/skip.`).option("--denomination <value>", `Unit in which rate-card prices are expressed.
39760
+
39761
+ - credits: Credit counts.
39762
+ - units: Weighted rolling-allowance units.
39763
+ - currency: Major units of the specified currency.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--search <value>", `search`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39710
39764
  Examples:
39711
- hyperline agents delete-agent-cost-catalog-override --override-id <override_id>
39712
- hyperline agents delete-agent-cost-catalog-override --override-id <override_id> --output json`).action(async (opts) => {
39765
+ hyperline ai-billing list-agent-rate-cards
39766
+ hyperline ai-billing list-agent-rate-cards --denomination <denomination> --currency <currency>`).action(async (opts) => {
39713
39767
  const ctx = resource.parent?.opts()._ctx;
39714
39768
  if (!ctx) {
39715
39769
  process.stderr.write("Error: Not authenticated\n");
39716
39770
  process.exit(1);
39717
39771
  }
39718
39772
  const args = {};
39719
- if (opts.overrideId !== void 0)
39720
- args.override_id = opts.overrideId;
39721
- if (!opts.yes) {
39722
- const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39723
- if (!confirmed) {
39724
- process.stdout.write("Aborted.\n");
39725
- return;
39726
- }
39727
- }
39773
+ if (opts.denomination !== void 0)
39774
+ args.denomination = opts.denomination;
39775
+ if (opts.currency !== void 0)
39776
+ args.currency = opts.currency;
39777
+ if (opts.search !== void 0)
39778
+ args.search = opts.search;
39779
+ if (opts.take !== void 0)
39780
+ args.take = Number(opts.take);
39781
+ if (opts.skip !== void 0)
39782
+ args.skip = Number(opts.skip);
39728
39783
  await ctx.execute({
39729
- method: "DELETE",
39730
- path: "/v1/agents/cost-catalog/overrides/{override_id}",
39784
+ method: "GET",
39785
+ path: "/v1/ai/billing/rate-cards",
39731
39786
  args,
39732
- queryParamKeys: []
39787
+ queryParamKeys: ["denomination", "currency", "search", "take", "skip"]
39733
39788
  });
39734
39789
  });
39735
- resource.command("list-agent-customer-policies").description(`List all AI billing policies (scopes) for one customer: the default shared pool plus per-agent overrides. Accepts Hyperline or external customer ids.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
39790
+ resource.command("create-agent-rate-card").description(`Create an AI rate card with llm rows (per-1M input/output token rates) and item rows (per-unit rates), a denomination (credits/units/currency) and an optional USD fallback conversion.`).requiredOption("--name <value>", `Human-readable resource name.`).option("--fallback-per-usd <value>", `Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.`).requiredOption("--rows <json>", `All pricing rows on the card; replacement replaces the complete list.`).requiredOption("--denomination <value>", `Unit in which rate-card prices are expressed.
39791
+
39792
+ - credits: Credit counts.
39793
+ - units: Weighted rolling-allowance units.
39794
+ - currency: Major units of the specified currency.`).option("--currency <value>", `ISO 4217 currency code for monetary values. Null for counts or historical amounts without recorded currency.`).addHelpText("after", `
39736
39795
  Examples:
39737
- hyperline agents list-agent-customer-policies --customer-id <customer_id>`).action(async (opts) => {
39796
+ hyperline ai-billing create-agent-rate-card --name <name> --rows <rows> --denomination <denomination>
39797
+ hyperline ai-billing create-agent-rate-card --name <name> --rows <rows> --denomination <denomination> --fallback-per-usd <fallback_per_usd> --currency <currency>
39798
+ hyperline ai-billing create-agent-rate-card --name <name> --rows <rows> --denomination <denomination> --output json`).action(async (opts) => {
39738
39799
  const ctx = resource.parent?.opts()._ctx;
39739
39800
  if (!ctx) {
39740
39801
  process.stderr.write("Error: Not authenticated\n");
39741
39802
  process.exit(1);
39742
39803
  }
39743
39804
  const args = {};
39744
- if (opts.customerId !== void 0)
39745
- args.customer_id = opts.customerId;
39805
+ if (opts.name !== void 0)
39806
+ args.name = opts.name;
39807
+ if (opts.fallbackPerUsd !== void 0)
39808
+ args.fallback_per_usd = opts.fallbackPerUsd;
39809
+ if (opts.denomination !== void 0)
39810
+ args.denomination = opts.denomination;
39811
+ if (opts.currency !== void 0)
39812
+ args.currency = opts.currency;
39813
+ if (opts.rows !== void 0)
39814
+ args.rows = JSON.parse(opts.rows);
39746
39815
  await ctx.execute({
39747
- method: "GET",
39748
- path: "/v1/agents/customers/{customer_id}/policies",
39816
+ method: "POST",
39817
+ path: "/v1/ai/billing/rate-cards",
39749
39818
  args,
39750
39819
  queryParamKeys: []
39751
39820
  });
39752
39821
  });
39753
- resource.command("get-agent-customer-policy").description(`Get one customer's AI billing policy \u2014 the default shared pool, or one agent's own scope via the agent query param.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
39822
+ resource.command("get-agent-rate-card").description(`Get one AI rate card by id with all its pricing rows and usage counts (plans, policies, credit product).`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).addHelpText("after", `
39754
39823
  Examples:
39755
- hyperline agents get-agent-customer-policy --customer-id <customer_id>
39756
- hyperline agents get-agent-customer-policy --customer-id <customer_id> --agent <agent>`).action(async (opts) => {
39824
+ hyperline ai-billing get-agent-rate-card --rate-card-id <rate_card_id>`).action(async (opts) => {
39757
39825
  const ctx = resource.parent?.opts()._ctx;
39758
39826
  if (!ctx) {
39759
39827
  process.stderr.write("Error: Not authenticated\n");
39760
39828
  process.exit(1);
39761
39829
  }
39762
39830
  const args = {};
39763
- if (opts.customerId !== void 0)
39764
- args.customer_id = opts.customerId;
39765
- if (opts.agent !== void 0)
39766
- args.agent = opts.agent;
39831
+ if (opts.rateCardId !== void 0)
39832
+ args.rate_card_id = opts.rateCardId;
39767
39833
  await ctx.execute({
39768
39834
  method: "GET",
39769
- path: "/v1/agents/customers/{customer_id}/policy",
39835
+ path: "/v1/ai/billing/rate-cards/{rate_card_id}",
39770
39836
  args,
39771
- queryParamKeys: ["agent"]
39837
+ queryParamKeys: []
39772
39838
  });
39773
39839
  });
39774
- resource.command("upsert-agent-customer-policy").description(`Create or replace one customer's AI billing policy (whole-row). Pass plan_id to attach the customer to a billing plan \u2014 this also attaches the plan's overage invoice container to their subscription. Past-limit usage is priced by overage_markup_percent over the base rates, or by overage_rate_card_id (a currency rate card whose rates ARE the overage price) \u2014 never both. Wallet/credit pots are auto-opened empty.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).requiredOption("--mode <value>", `Billing mode.
39775
-
39776
- - wallet: Charges a monetary wallet.
39777
- - credits: Consumes a credit balance.
39778
- - windows: Meters weighted units against rolling allowances.`).option("--wallet-id <value>", `Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.`).option("--credit-product-id <value>", `Public credit product identifier whose balance this policy consumes.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
39779
-
39780
- - refuse: Rejects the call that crosses the boundary without deducting usage.
39781
- - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--overage-wallet-id <value>", `Wallet charged for overage. Null bills overage in arrears.`).option("--floor <value>", `Minimum available balance a spend check requires, in the policy's denomination.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
39782
-
39783
- - calendar_month: Settles at the end of each UTC calendar month.`).option("--credit-rates <json>", `Inline credit pricing. Mutually exclusive with rate_card_id. Omitted rates may be supplied by a plan or product default.`).option("--window-rates <json>", `Window definitions and optional inline unit rates. An attached plan may supply omitted definitions; rate_card_id may supply unit rates.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--plan-id <value>", `Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.`).requiredOption("--blocked", `Whether spending is disabled for this billing scope.`).addHelpText("after", `
39840
+ resource.command("replace-agent-rate-card").description(`Replace an AI rate card's rows, name, description and USD fallback (whole-card semantics). Denomination and currency are immutable.`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).requiredOption("--name <value>", `Human-readable resource name.`).option("--fallback-per-usd <value>", `Credits, allowance units, or major currency units per USD of provider cost. Null leaves unmatched usage unpriced.`).requiredOption("--rows <json>", `All pricing rows on the card; replacement replaces the complete list.`).addHelpText("after", `
39784
39841
  Examples:
39785
- hyperline agents upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked
39786
- hyperline agents upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked --agent <agent> --wallet-id <wallet_id>
39787
- hyperline agents upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked --output json`).action(async (opts) => {
39842
+ hyperline ai-billing replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows>
39843
+ hyperline ai-billing replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows> --fallback-per-usd <fallback_per_usd>
39844
+ hyperline ai-billing replace-agent-rate-card --rate-card-id <rate_card_id> --name <name> --rows <rows> --output json`).action(async (opts) => {
39788
39845
  const ctx = resource.parent?.opts()._ctx;
39789
39846
  if (!ctx) {
39790
39847
  process.stderr.write("Error: Not authenticated\n");
39791
39848
  process.exit(1);
39792
39849
  }
39793
39850
  const args = {};
39794
- if (opts.customerId !== void 0)
39795
- args.customer_id = opts.customerId;
39796
- if (opts.agent !== void 0)
39797
- args.agent = opts.agent;
39798
- if (opts.mode !== void 0)
39799
- args.mode = opts.mode;
39800
- if (opts.walletId !== void 0)
39801
- args.wallet_id = opts.walletId;
39802
- if (opts.creditProductId !== void 0)
39803
- args.credit_product_id = opts.creditProductId;
39804
- if (opts.markupPercent !== void 0)
39805
- args.markup_percent = opts.markupPercent;
39806
- if (opts.overageMode !== void 0)
39807
- args.overage_mode = opts.overageMode;
39808
- if (opts.overageMarkupPercent !== void 0)
39809
- args.overage_markup_percent = opts.overageMarkupPercent;
39810
- if (opts.overageRateCardId !== void 0)
39811
- args.overage_rate_card_id = opts.overageRateCardId;
39812
- if (opts.overageWalletId !== void 0)
39813
- args.overage_wallet_id = opts.overageWalletId;
39814
- if (opts.floor !== void 0)
39815
- args.floor = opts.floor;
39816
- if (opts.settlementSchedule !== void 0)
39817
- args.settlement_schedule = opts.settlementSchedule;
39818
39851
  if (opts.rateCardId !== void 0)
39819
39852
  args.rate_card_id = opts.rateCardId;
39820
- if (opts.planId !== void 0)
39821
- args.plan_id = opts.planId;
39822
- if (opts.settlementIntervalMinutes !== void 0)
39823
- args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
39824
- if (opts.blocked !== void 0)
39825
- args.blocked = true;
39826
- if (opts.creditRates !== void 0)
39827
- args.credit_rates = JSON.parse(opts.creditRates);
39828
- if (opts.windowRates !== void 0)
39829
- args.window_rates = JSON.parse(opts.windowRates);
39853
+ if (opts.name !== void 0)
39854
+ args.name = opts.name;
39855
+ if (opts.fallbackPerUsd !== void 0)
39856
+ args.fallback_per_usd = opts.fallbackPerUsd;
39857
+ if (opts.rows !== void 0)
39858
+ args.rows = JSON.parse(opts.rows);
39830
39859
  await ctx.execute({
39831
39860
  method: "PUT",
39832
- path: "/v1/agents/customers/{customer_id}/policy",
39861
+ path: "/v1/ai/billing/rate-cards/{rate_card_id}",
39833
39862
  args,
39834
- queryParamKeys: ["agent"]
39863
+ queryParamKeys: []
39835
39864
  });
39836
39865
  });
39837
- resource.command("delete-agent-customer-policy").description(`Delete one customer's AI billing policy scope. Refused (409) while it owes unsettled consumption or while agent overrides still depend on it.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).option("--yes", "Skip confirmation").addHelpText("after", `
39866
+ resource.command("delete-agent-rate-card").description(`Delete an AI rate card. Refused (409, rate_card_in_use) while any plan, credit product or customer policy still uses it.`).requiredOption("--rate-card-id <value>", `rate_card_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39838
39867
  Examples:
39839
- hyperline agents delete-agent-customer-policy --customer-id <customer_id>
39840
- hyperline agents delete-agent-customer-policy --customer-id <customer_id> --agent <agent>
39841
- hyperline agents delete-agent-customer-policy --customer-id <customer_id> --output json`).action(async (opts) => {
39868
+ hyperline ai-billing delete-agent-rate-card --rate-card-id <rate_card_id>
39869
+ hyperline ai-billing delete-agent-rate-card --rate-card-id <rate_card_id> --output json`).action(async (opts) => {
39842
39870
  const ctx = resource.parent?.opts()._ctx;
39843
39871
  if (!ctx) {
39844
39872
  process.stderr.write("Error: Not authenticated\n");
39845
39873
  process.exit(1);
39846
39874
  }
39847
39875
  const args = {};
39848
- if (opts.customerId !== void 0)
39849
- args.customer_id = opts.customerId;
39850
- if (opts.agent !== void 0)
39851
- args.agent = opts.agent;
39876
+ if (opts.rateCardId !== void 0)
39877
+ args.rate_card_id = opts.rateCardId;
39852
39878
  if (!opts.yes) {
39853
39879
  const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39854
39880
  if (!confirmed) {
@@ -39858,276 +39884,270 @@ Examples:
39858
39884
  }
39859
39885
  await ctx.execute({
39860
39886
  method: "DELETE",
39861
- path: "/v1/agents/customers/{customer_id}/policy",
39887
+ path: "/v1/ai/billing/rate-cards/{rate_card_id}",
39862
39888
  args,
39863
- queryParamKeys: ["agent"]
39889
+ queryParamKeys: []
39864
39890
  });
39865
39891
  });
39866
- resource.command("apply-agent-default-plan").description(`Apply the workspace's default AI agent billing plan to one customer (by id or external id). Idempotent; refuses (409) if the customer already has a different billing policy, 404 when no default plan is set.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
39892
+ resource.command("list-agent-credit-products").description(`List the credit products AI agent usage can draw down, with their purchasable packs and default rate cards. Customer pot balances live on the customer credits endpoints.`).addHelpText("after", `
39867
39893
  Examples:
39868
- hyperline agents apply-agent-default-plan --customer-id <customer_id>
39869
- hyperline agents apply-agent-default-plan --customer-id <customer_id> --output json`).action(async (opts) => {
39894
+ hyperline ai-billing list-agent-credit-products`).action(async (_opts) => {
39870
39895
  const ctx = resource.parent?.opts()._ctx;
39871
39896
  if (!ctx) {
39872
39897
  process.stderr.write("Error: Not authenticated\n");
39873
39898
  process.exit(1);
39874
39899
  }
39875
39900
  const args = {};
39876
- if (opts.customerId !== void 0)
39877
- args.customer_id = opts.customerId;
39878
39901
  await ctx.execute({
39879
- method: "POST",
39880
- path: "/v1/agents/customers/{customer_id}/apply-default-plan",
39902
+ method: "GET",
39903
+ path: "/v1/ai/billing/credit-products",
39881
39904
  args,
39882
39905
  queryParamKeys: []
39883
39906
  });
39884
39907
  });
39885
- resource.command("get-agent-customer-balance").description(`Get one customer's live AI balance, shaped by their billing mode: wallet shadow balance, credit pot, or rolling window meters with reset times. Includes per-agent scopes and overage state.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
39908
+ resource.command("list-agent-cost-catalog").description(`List the AI cost catalog: registry model prices merged with this workspace's negotiated overrides, its own custom cost items (source custom), and the unpriced pairs its telemetry has carried (source unlisted). Rates are USD decimal strings. Pass enabled_only=true for just the enabled catalog.`).option("--enabled-only <value>", `enabled_only`).addHelpText("after", `
39886
39909
  Examples:
39887
- hyperline agents get-agent-customer-balance --customer-id <customer_id>
39888
- hyperline agents get-agent-customer-balance --customer-id <customer_id> --agent <agent>`).action(async (opts) => {
39910
+ hyperline ai-billing list-agent-cost-catalog
39911
+ hyperline ai-billing list-agent-cost-catalog --enabled-only <enabled_only>`).action(async (opts) => {
39889
39912
  const ctx = resource.parent?.opts()._ctx;
39890
39913
  if (!ctx) {
39891
39914
  process.stderr.write("Error: Not authenticated\n");
39892
39915
  process.exit(1);
39893
39916
  }
39894
39917
  const args = {};
39895
- if (opts.customerId !== void 0)
39896
- args.customer_id = opts.customerId;
39897
- if (opts.agent !== void 0)
39898
- args.agent = opts.agent;
39918
+ if (opts.enabledOnly !== void 0)
39919
+ args.enabled_only = opts.enabledOnly;
39899
39920
  await ctx.execute({
39900
39921
  method: "GET",
39901
- path: "/v1/agents/customers/{customer_id}/balance",
39922
+ path: "/v1/ai/billing/cost-catalog",
39902
39923
  args,
39903
- queryParamKeys: ["agent"]
39924
+ queryParamKeys: ["enabled_only"]
39904
39925
  });
39905
39926
  });
39906
- resource.command("reset-agent-customer-windows").description(`Reset one customer's open AI allowance windows so their next call starts a fresh full allowance. Windows-mode scopes only.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
39927
+ resource.command("create-agent-cost-catalog-item").description(`Create a custom AI cost item so a non-LLM vendor call is priced instead of landing unpriced at $0. provider/item must match hyperline.cost({ vendor, item }) verbatim and each dimensions[].key must match the unit the SDK sends. Re-creating an existing open item returns it unchanged (200); a pair the global registry already prices is refused \u2014 use the overrides endpoint for that.`).requiredOption("--provider <value>", `AI model provider, or the vendor of a custom cost item. This is not an integration connection.`).requiredOption("--item <value>", `Custom item name matching the usage payload.`).requiredOption("--dimensions <json>", `Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.`).addHelpText("after", `
39907
39928
  Examples:
39908
- hyperline agents reset-agent-customer-windows --customer-id <customer_id>
39909
- hyperline agents reset-agent-customer-windows --customer-id <customer_id> --agent <agent>
39910
- hyperline agents reset-agent-customer-windows --customer-id <customer_id> --output json`).action(async (opts) => {
39929
+ hyperline ai-billing create-agent-cost-catalog-item --provider <provider> --item <item> --dimensions <dimensions>
39930
+ hyperline ai-billing create-agent-cost-catalog-item --provider <provider> --item <item> --dimensions <dimensions> --output json`).action(async (opts) => {
39911
39931
  const ctx = resource.parent?.opts()._ctx;
39912
39932
  if (!ctx) {
39913
39933
  process.stderr.write("Error: Not authenticated\n");
39914
39934
  process.exit(1);
39915
39935
  }
39916
39936
  const args = {};
39917
- if (opts.customerId !== void 0)
39918
- args.customer_id = opts.customerId;
39919
- if (opts.agent !== void 0)
39920
- args.agent = opts.agent;
39937
+ if (opts.provider !== void 0)
39938
+ args.provider = opts.provider;
39939
+ if (opts.item !== void 0)
39940
+ args.item = opts.item;
39941
+ if (opts.dimensions !== void 0)
39942
+ args.dimensions = JSON.parse(opts.dimensions);
39921
39943
  await ctx.execute({
39922
39944
  method: "POST",
39923
- path: "/v1/agents/customers/{customer_id}/windows/reset",
39945
+ path: "/v1/ai/billing/cost-catalog/items",
39924
39946
  args,
39925
- queryParamKeys: ["agent"]
39947
+ queryParamKeys: []
39926
39948
  });
39927
39949
  });
39928
- resource.command("list-agent-customer-consumption").description(`List one customer's AI consumption ledger entries, newest first, with amounts, denominations and overage flags. Filter by agent scope, overage, and from/to time range; paginated with take/skip.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent slug. An empty string selects the shared pool; omission includes all scopes.`).option("--overage <value>", `Filter by overage status. Omit to include both ordinary and overage entries.`).option("--from <value>", `UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--to <value>", `UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
39950
+ resource.command("delete-agent-cost-catalog-item").description(`Close a custom AI cost item by its custom_item_id. History is kept; new calls on that pair go back to unpriced. An override id passed here is a 404.`).requiredOption("--item-id <value>", `item_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39929
39951
  Examples:
39930
- hyperline agents list-agent-customer-consumption --customer-id <customer_id>
39931
- hyperline agents list-agent-customer-consumption --customer-id <customer_id> --agent <agent> --overage <overage>`).action(async (opts) => {
39952
+ hyperline ai-billing delete-agent-cost-catalog-item --item-id <item_id>
39953
+ hyperline ai-billing delete-agent-cost-catalog-item --item-id <item_id> --output json`).action(async (opts) => {
39932
39954
  const ctx = resource.parent?.opts()._ctx;
39933
39955
  if (!ctx) {
39934
39956
  process.stderr.write("Error: Not authenticated\n");
39935
39957
  process.exit(1);
39936
39958
  }
39937
39959
  const args = {};
39938
- if (opts.customerId !== void 0)
39939
- args.customer_id = opts.customerId;
39940
- if (opts.agent !== void 0)
39941
- args.agent = opts.agent;
39942
- if (opts.overage !== void 0)
39943
- args.overage = opts.overage;
39944
- if (opts.from !== void 0)
39945
- args.from = opts.from;
39946
- if (opts.to !== void 0)
39947
- args.to = opts.to;
39948
- if (opts.take !== void 0)
39949
- args.take = Number(opts.take);
39950
- if (opts.skip !== void 0)
39951
- args.skip = Number(opts.skip);
39960
+ if (opts.itemId !== void 0)
39961
+ args.item_id = opts.itemId;
39962
+ if (!opts.yes) {
39963
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39964
+ if (!confirmed) {
39965
+ process.stdout.write("Aborted.\n");
39966
+ return;
39967
+ }
39968
+ }
39952
39969
  await ctx.execute({
39953
- method: "GET",
39954
- path: "/v1/agents/customers/{customer_id}/consumption",
39970
+ method: "DELETE",
39971
+ path: "/v1/ai/billing/cost-catalog/items/{item_id}",
39955
39972
  args,
39956
- queryParamKeys: ["agent", "overage", "from", "to", "take", "skip"]
39973
+ queryParamKeys: []
39957
39974
  });
39958
39975
  });
39959
- resource.command("get-agent-customer-overview").description(`Get one customer's full AI billing overview: default policy, per-agent scopes, balances and billed consumption totals in one read.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
39976
+ resource.command("upsert-agent-cost-catalog-override").description(`Set this workspace's negotiated price for a registry AI model (input/output/cached/cache-write USD per 1M tokens, plus optional dimensions). Replaces any open override immediately; historical calls keep their original rate. A pair the registry does not know is refused \u2014 create a custom cost item instead.`).requiredOption("--provider <value>", `AI model provider, or the vendor of a custom cost item. This is not an integration connection.`).requiredOption("--model <value>", `Model identifier, or custom item identifier. Null on wildcard pricing rows.`).requiredOption("--input-per-m-tokens <value>", `Provider cost in USD per million input tokens, as an exact decimal string.`).requiredOption("--output-per-m-tokens <value>", `Provider cost in USD per million output tokens, as an exact decimal string.`).option("--cached-input-per-m-tokens <value>", `Provider cost in USD per million cached input tokens, as an exact decimal string.`).option("--cache-write-per-m-tokens <value>", `Provider cost in USD per million cache write tokens, as an exact decimal string.`).option("--dimensions <json>", `Additional billable dimensions; each key matches a usage_extra key and rates use the owning card's units or USD for cost-catalog dimensions.`).addHelpText("after", `
39960
39977
  Examples:
39961
- hyperline agents get-agent-customer-overview --customer-id <customer_id>`).action(async (opts) => {
39978
+ hyperline ai-billing upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens>
39979
+ hyperline ai-billing upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens> --cached-input-per-m-tokens <cached_input_per_m_tokens> --cache-write-per-m-tokens <cache_write_per_m_tokens>
39980
+ hyperline ai-billing upsert-agent-cost-catalog-override --provider <provider> --model <model> --input-per-m-tokens <input_per_m_tokens> --output-per-m-tokens <output_per_m_tokens> --output json`).action(async (opts) => {
39962
39981
  const ctx = resource.parent?.opts()._ctx;
39963
39982
  if (!ctx) {
39964
39983
  process.stderr.write("Error: Not authenticated\n");
39965
39984
  process.exit(1);
39966
39985
  }
39967
39986
  const args = {};
39968
- if (opts.customerId !== void 0)
39969
- args.customer_id = opts.customerId;
39987
+ if (opts.provider !== void 0)
39988
+ args.provider = opts.provider;
39989
+ if (opts.model !== void 0)
39990
+ args.model = opts.model;
39991
+ if (opts.inputPerMTokens !== void 0)
39992
+ args.input_per_m_tokens = opts.inputPerMTokens;
39993
+ if (opts.outputPerMTokens !== void 0)
39994
+ args.output_per_m_tokens = opts.outputPerMTokens;
39995
+ if (opts.cachedInputPerMTokens !== void 0)
39996
+ args.cached_input_per_m_tokens = opts.cachedInputPerMTokens;
39997
+ if (opts.cacheWritePerMTokens !== void 0)
39998
+ args.cache_write_per_m_tokens = opts.cacheWritePerMTokens;
39999
+ if (opts.dimensions !== void 0)
40000
+ args.dimensions = JSON.parse(opts.dimensions);
39970
40001
  await ctx.execute({
39971
- method: "GET",
39972
- path: "/v1/agents/customers/{customer_id}/overview",
40002
+ method: "PUT",
40003
+ path: "/v1/ai/billing/cost-catalog/overrides",
39973
40004
  args,
39974
40005
  queryParamKeys: []
39975
40006
  });
39976
40007
  });
39977
- }
39978
-
39979
- // build/commands/generated/aggregators.js
39980
- function registerAggregatorsCommands(parent) {
39981
- const resource = parent.command("aggregators").description("Manage aggregators");
39982
- resource.command("list").description(`List all aggregators with pagination. Aggregators define how billable events are counted or summed to compute usage.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
40008
+ resource.command("delete-agent-cost-catalog-override").description(`Close this workspace's negotiated price override by its override.id; pricing falls back to the global registry rate. A custom cost item id passed here is a 404.`).requiredOption("--override-id <value>", `override_id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39983
40009
  Examples:
39984
- hyperline aggregators list
39985
- hyperline aggregators list --take <take>`).action(async (opts) => {
40010
+ hyperline ai-billing delete-agent-cost-catalog-override --override-id <override_id>
40011
+ hyperline ai-billing delete-agent-cost-catalog-override --override-id <override_id> --output json`).action(async (opts) => {
39986
40012
  const ctx = resource.parent?.opts()._ctx;
39987
40013
  if (!ctx) {
39988
40014
  process.stderr.write("Error: Not authenticated\n");
39989
40015
  process.exit(1);
39990
40016
  }
39991
40017
  const args = {};
39992
- if (opts.take !== void 0)
39993
- args.take = Number(opts.take);
39994
- if (opts.skip !== void 0)
39995
- args.skip = Number(opts.skip);
40018
+ if (opts.overrideId !== void 0)
40019
+ args.override_id = opts.overrideId;
40020
+ if (!opts.yes) {
40021
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
40022
+ if (!confirmed) {
40023
+ process.stdout.write("Aborted.\n");
40024
+ return;
40025
+ }
40026
+ }
39996
40027
  await ctx.execute({
39997
- method: "GET",
39998
- path: "/v1/aggregators",
40028
+ method: "DELETE",
40029
+ path: "/v1/ai/billing/cost-catalog/overrides/{override_id}",
39999
40030
  args,
40000
- queryParamKeys: ["take", "skip"]
40031
+ queryParamKeys: []
40001
40032
  });
40002
40033
  });
40003
- resource.command("create").description(`Create a new aggregator that counts or sums billable events. Aggregators can then be linked to products via aggregator_id.`).requiredOption("--entity <value>", `The billable event entity to aggregate.`).option("--type <value>", `The type of aggregator.`).option("--where <json>", `Filter conditions for the aggregation.`).option("--name <value>", `Name of the aggregator.`).option("--description <value>", `Description of the aggregator.`).option("--allow-negative-values", `Whether the aggregator can produce negative values.`).option("--aggregate-on-customers-enabled", `Whether the aggregator should aggregate on customers.`).option("--custom-event-name <value>", `Custom event name for the aggregator.`).option("--exposed-event-keys <json>", `Event keys exposed by the aggregator.`).option("--unit-name <value>", `Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.`).option("--default-interval-count <number>", `Default interval count for usage periods.`).option("--default-interval-period <value>", `Default interval period for usage periods.`).option("--thresholds <json>", `Thresholds for the aggregator.`).requiredOption("--operation <value>", `The aggregation operation to perform.`).option("--property <value>", `The property to sum.`).addHelpText("after", `
40034
+ resource.command("list-agent-customer-policies").description(`List all AI billing policies (scopes) for one customer: the default shared pool plus per-agent overrides. Accepts Hyperline or external customer ids.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
40004
40035
  Examples:
40005
- hyperline aggregators create --entity <entity> --operation <operation>
40006
- hyperline aggregators create --entity <entity> --operation <operation> --type <type> --where <where>
40007
- hyperline aggregators create --entity <entity> --operation <operation> --output json`).action(async (opts) => {
40036
+ hyperline ai-billing list-agent-customer-policies --customer-id <customer_id>`).action(async (opts) => {
40008
40037
  const ctx = resource.parent?.opts()._ctx;
40009
40038
  if (!ctx) {
40010
40039
  process.stderr.write("Error: Not authenticated\n");
40011
40040
  process.exit(1);
40012
40041
  }
40013
40042
  const args = {};
40014
- if (opts.entity !== void 0)
40015
- args.entity = opts.entity;
40016
- if (opts.type !== void 0)
40017
- args.type = opts.type;
40018
- if (opts.name !== void 0)
40019
- args.name = opts.name;
40020
- if (opts.description !== void 0)
40021
- args.description = opts.description;
40022
- if (opts.customEventName !== void 0)
40023
- args.custom_event_name = opts.customEventName;
40024
- if (opts.unitName !== void 0)
40025
- args.unit_name = opts.unitName;
40026
- if (opts.defaultIntervalPeriod !== void 0)
40027
- args.default_interval_period = opts.defaultIntervalPeriod;
40028
- if (opts.operation !== void 0)
40029
- args.operation = opts.operation;
40030
- if (opts.property !== void 0)
40031
- args.property = opts.property;
40032
- if (opts.defaultIntervalCount !== void 0)
40033
- args.default_interval_count = Number(opts.defaultIntervalCount);
40034
- if (opts.allowNegativeValues !== void 0)
40035
- args.allow_negative_values = true;
40036
- if (opts.aggregateOnCustomersEnabled !== void 0)
40037
- args.aggregate_on_customers_enabled = true;
40038
- if (opts.where !== void 0)
40039
- args.where = JSON.parse(opts.where);
40040
- if (opts.exposedEventKeys !== void 0)
40041
- args.exposed_event_keys = JSON.parse(opts.exposedEventKeys);
40042
- if (opts.thresholds !== void 0)
40043
- args.thresholds = JSON.parse(opts.thresholds);
40043
+ if (opts.customerId !== void 0)
40044
+ args.customer_id = opts.customerId;
40044
40045
  await ctx.execute({
40045
- method: "POST",
40046
- path: "/v1/aggregators",
40046
+ method: "GET",
40047
+ path: "/v1/ai/billing/customers/{customer_id}/policies",
40047
40048
  args,
40048
40049
  queryParamKeys: []
40049
40050
  });
40050
40051
  });
40051
- resource.command("get").description(`Retrieve a specific aggregator by ID.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
40052
+ resource.command("get-agent-customer-policy").description(`Get one customer's AI billing policy \u2014 the default shared pool, or one agent's own scope via the agent query param.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
40052
40053
  Examples:
40053
- hyperline aggregators get --id <id>`).action(async (opts) => {
40054
+ hyperline ai-billing get-agent-customer-policy --customer-id <customer_id>
40055
+ hyperline ai-billing get-agent-customer-policy --customer-id <customer_id> --agent <agent>`).action(async (opts) => {
40054
40056
  const ctx = resource.parent?.opts()._ctx;
40055
40057
  if (!ctx) {
40056
40058
  process.stderr.write("Error: Not authenticated\n");
40057
40059
  process.exit(1);
40058
40060
  }
40059
40061
  const args = {};
40060
- if (opts.id !== void 0)
40061
- args.id = opts.id;
40062
+ if (opts.customerId !== void 0)
40063
+ args.customer_id = opts.customerId;
40064
+ if (opts.agent !== void 0)
40065
+ args.agent = opts.agent;
40062
40066
  await ctx.execute({
40063
40067
  method: "GET",
40064
- path: "/v1/aggregators/{id}",
40068
+ path: "/v1/ai/billing/customers/{customer_id}/policy",
40065
40069
  args,
40066
- queryParamKeys: []
40070
+ queryParamKeys: ["agent"]
40067
40071
  });
40068
40072
  });
40069
- resource.command("update").description(`Update an existing aggregator's configuration.`).requiredOption("--id <value>", `id parameter`).option("--entity <value>", `The billable event entity to aggregate.`).option("--type <value>", `The type of aggregator.`).option("--where <json>", `Filter conditions for the aggregation.`).option("--name <value>", `Name of the aggregator.`).option("--description <value>", `Description of the aggregator.`).option("--allow-negative-values", `Whether the aggregator can produce negative values.`).option("--aggregate-on-customers-enabled", `Whether the aggregator should aggregate on customers.`).option("--custom-event-name <value>", `Custom event name for the aggregator.`).option("--exposed-event-keys <json>", `Event keys exposed by the aggregator.`).option("--unit-name <value>", `Display name of the unit being measured (e.g. 'user', 'request'). Used as fallback for products attached to this aggregator.`).option("--default-interval-count <number>", `Default interval count for usage periods.`).option("--default-interval-period <value>", `Default interval period for usage periods.`).option("--thresholds <json>", `Thresholds for the aggregator. Replaces existing thresholds.`).option("--operation <value>", `The aggregation operation to perform.`).option("--property <value>", `The property to sum. Required when operation is 'sum'.`).addHelpText("after", `
40073
+ resource.command("upsert-agent-customer-policy").description(`Create or replace one customer's AI billing policy (whole-row). Pass plan_id to attach the customer to a billing plan \u2014 this also attaches the plan's overage invoice container to their subscription. Past-limit usage is priced by overage_markup_percent over the base rates, or by overage_rate_card_id (a currency rate card whose rates ARE the overage price) \u2014 never both. Wallet/credit pots are auto-opened empty.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).requiredOption("--mode <value>", `Billing mode.
40074
+
40075
+ - wallet: Charges a monetary wallet.
40076
+ - credits: Consumes a credit balance.
40077
+ - windows: Meters weighted units against rolling allowances.`).option("--wallet-id <value>", `Customer wallet identifier. Omit on wallet policy writes to provision or reuse the customer's wallet.`).option("--credit-product-id <value>", `Public credit product identifier whose balance this policy consumes.`).option("--markup-percent <value>", `Percentage added to resolved cost. Null on writes means no override; an attached plan may supply the value.`).option("--overage-mode <value>", `Behavior when credits or an allowance are exhausted. Policy values may inherit the attached plan.
40078
+
40079
+ - refuse: Rejects the call that crosses the boundary without deducting usage.
40080
+ - metered: Prices the whole call as monetary overage, using the overage card or USD provider cost plus markup.`).option("--overage-markup-percent <value>", `Percentage added to provider cost for overage. Mutually exclusive with overage_rate_card_id.`).option("--overage-rate-card-id <value>", `Currency rate card used to price overage directly. Null means provider cost plus the resolved overage markup.`).option("--overage-wallet-id <value>", `Wallet charged for overage. Null bills overage in arrears.`).option("--floor <value>", `Minimum available balance a spend check requires, in the policy's denomination.`).option("--settlement-interval-minutes <number>", `Settlement interval in minutes. Null means no interval override. Mutually exclusive with settlement_schedule.`).option("--settlement-schedule <value>", `Calendar settlement schedule. Null clears the override; mutually exclusive with settlement_interval_minutes.
40081
+
40082
+ - calendar_month: Settles at the end of each UTC calendar month.`).option("--credit-rates <json>", `Inline credit pricing. Mutually exclusive with rate_card_id. Omitted rates may be supplied by a plan or product default.`).option("--window-rates <json>", `Window definitions and optional inline unit rates. An attached plan may supply omitted definitions; rate_card_id may supply unit rates.`).option("--rate-card-id <value>", `Rate card reference. On policy writes, omission preserves the current reference and null detaches it; on plan replacement omission clears it.`).option("--plan-id <value>", `Billing plan reference. On policy writes, omission preserves the current plan and null detaches it.`).requiredOption("--blocked", `Whether spending is disabled for this billing scope.`).addHelpText("after", `
40070
40083
  Examples:
40071
- hyperline aggregators update --id <id>
40072
- hyperline aggregators update --id <id> --entity <entity> --type <type>
40073
- hyperline aggregators update --id <id> --output json`).action(async (opts) => {
40084
+ hyperline ai-billing upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked
40085
+ hyperline ai-billing upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked --agent <agent> --wallet-id <wallet_id>
40086
+ hyperline ai-billing upsert-agent-customer-policy --customer-id <customer_id> --mode <mode> --blocked --output json`).action(async (opts) => {
40074
40087
  const ctx = resource.parent?.opts()._ctx;
40075
40088
  if (!ctx) {
40076
40089
  process.stderr.write("Error: Not authenticated\n");
40077
40090
  process.exit(1);
40078
40091
  }
40079
40092
  const args = {};
40080
- if (opts.id !== void 0)
40081
- args.id = opts.id;
40082
- if (opts.entity !== void 0)
40083
- args.entity = opts.entity;
40084
- if (opts.type !== void 0)
40085
- args.type = opts.type;
40086
- if (opts.name !== void 0)
40087
- args.name = opts.name;
40088
- if (opts.description !== void 0)
40089
- args.description = opts.description;
40090
- if (opts.customEventName !== void 0)
40091
- args.custom_event_name = opts.customEventName;
40092
- if (opts.unitName !== void 0)
40093
- args.unit_name = opts.unitName;
40094
- if (opts.defaultIntervalPeriod !== void 0)
40095
- args.default_interval_period = opts.defaultIntervalPeriod;
40096
- if (opts.operation !== void 0)
40097
- args.operation = opts.operation;
40098
- if (opts.property !== void 0)
40099
- args.property = opts.property;
40100
- if (opts.defaultIntervalCount !== void 0)
40101
- args.default_interval_count = Number(opts.defaultIntervalCount);
40102
- if (opts.allowNegativeValues !== void 0)
40103
- args.allow_negative_values = true;
40104
- if (opts.aggregateOnCustomersEnabled !== void 0)
40105
- args.aggregate_on_customers_enabled = true;
40106
- if (opts.where !== void 0)
40107
- args.where = JSON.parse(opts.where);
40108
- if (opts.exposedEventKeys !== void 0)
40109
- args.exposed_event_keys = JSON.parse(opts.exposedEventKeys);
40110
- if (opts.thresholds !== void 0)
40111
- args.thresholds = JSON.parse(opts.thresholds);
40093
+ if (opts.customerId !== void 0)
40094
+ args.customer_id = opts.customerId;
40095
+ if (opts.agent !== void 0)
40096
+ args.agent = opts.agent;
40097
+ if (opts.mode !== void 0)
40098
+ args.mode = opts.mode;
40099
+ if (opts.walletId !== void 0)
40100
+ args.wallet_id = opts.walletId;
40101
+ if (opts.creditProductId !== void 0)
40102
+ args.credit_product_id = opts.creditProductId;
40103
+ if (opts.markupPercent !== void 0)
40104
+ args.markup_percent = opts.markupPercent;
40105
+ if (opts.overageMode !== void 0)
40106
+ args.overage_mode = opts.overageMode;
40107
+ if (opts.overageMarkupPercent !== void 0)
40108
+ args.overage_markup_percent = opts.overageMarkupPercent;
40109
+ if (opts.overageRateCardId !== void 0)
40110
+ args.overage_rate_card_id = opts.overageRateCardId;
40111
+ if (opts.overageWalletId !== void 0)
40112
+ args.overage_wallet_id = opts.overageWalletId;
40113
+ if (opts.floor !== void 0)
40114
+ args.floor = opts.floor;
40115
+ if (opts.settlementSchedule !== void 0)
40116
+ args.settlement_schedule = opts.settlementSchedule;
40117
+ if (opts.rateCardId !== void 0)
40118
+ args.rate_card_id = opts.rateCardId;
40119
+ if (opts.planId !== void 0)
40120
+ args.plan_id = opts.planId;
40121
+ if (opts.settlementIntervalMinutes !== void 0)
40122
+ args.settlement_interval_minutes = Number(opts.settlementIntervalMinutes);
40123
+ if (opts.blocked !== void 0)
40124
+ args.blocked = true;
40125
+ if (opts.creditRates !== void 0)
40126
+ args.credit_rates = JSON.parse(opts.creditRates);
40127
+ if (opts.windowRates !== void 0)
40128
+ args.window_rates = JSON.parse(opts.windowRates);
40112
40129
  await ctx.execute({
40113
40130
  method: "PUT",
40114
- path: "/v1/aggregators/{id}",
40131
+ path: "/v1/ai/billing/customers/{customer_id}/policy",
40115
40132
  args,
40116
- queryParamKeys: []
40133
+ queryParamKeys: ["agent"]
40117
40134
  });
40118
40135
  });
40119
- resource.command("delete").description(`Delete an aggregator by ID. Will fail if the aggregator is linked to a product.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
40136
+ resource.command("delete-agent-customer-policy").description(`Delete one customer's AI billing policy scope. Refused (409) while it owes unsettled consumption or while agent overrides still depend on it.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).option("--yes", "Skip confirmation").addHelpText("after", `
40120
40137
  Examples:
40121
- hyperline aggregators delete --id <id>
40122
- hyperline aggregators delete --id <id> --output json`).action(async (opts) => {
40138
+ hyperline ai-billing delete-agent-customer-policy --customer-id <customer_id>
40139
+ hyperline ai-billing delete-agent-customer-policy --customer-id <customer_id> --agent <agent>
40140
+ hyperline ai-billing delete-agent-customer-policy --customer-id <customer_id> --output json`).action(async (opts) => {
40123
40141
  const ctx = resource.parent?.opts()._ctx;
40124
40142
  if (!ctx) {
40125
40143
  process.stderr.write("Error: Not authenticated\n");
40126
40144
  process.exit(1);
40127
40145
  }
40128
40146
  const args = {};
40129
- if (opts.id !== void 0)
40130
- args.id = opts.id;
40147
+ if (opts.customerId !== void 0)
40148
+ args.customer_id = opts.customerId;
40149
+ if (opts.agent !== void 0)
40150
+ args.agent = opts.agent;
40131
40151
  if (!opts.yes) {
40132
40152
  const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
40133
40153
  if (!confirmed) {
@@ -40137,134 +40157,120 @@ Examples:
40137
40157
  }
40138
40158
  await ctx.execute({
40139
40159
  method: "DELETE",
40140
- path: "/v1/aggregators/{id}",
40160
+ path: "/v1/ai/billing/customers/{customer_id}/policy",
40141
40161
  args,
40142
- queryParamKeys: []
40162
+ queryParamKeys: ["agent"]
40143
40163
  });
40144
40164
  });
40145
- }
40146
-
40147
- // build/commands/generated/aggregators-usage.js
40148
- function registerAggregators_UsageCommands(parent) {
40149
- const resource = parent.command("aggregators-usage").description("Manage aggregators > usage");
40150
- resource.command("get-aggregator-usage").description(`Retrieve a usage row for an aggregator. Use the timeseries, group-by-customer or events endpoints to query metering data.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
40165
+ resource.command("apply-agent-default-plan").description(`Apply the workspace's default AI agent billing plan to one customer (by id or external id). Idempotent; refuses (409) if the customer already has a different billing policy, 404 when no default plan is set.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
40151
40166
  Examples:
40152
- hyperline aggregators-usage get-aggregator-usage --id <id>`).action(async (opts) => {
40167
+ hyperline ai-billing apply-agent-default-plan --customer-id <customer_id>
40168
+ hyperline ai-billing apply-agent-default-plan --customer-id <customer_id> --output json`).action(async (opts) => {
40153
40169
  const ctx = resource.parent?.opts()._ctx;
40154
40170
  if (!ctx) {
40155
40171
  process.stderr.write("Error: Not authenticated\n");
40156
40172
  process.exit(1);
40157
40173
  }
40158
40174
  const args = {};
40159
- if (opts.id !== void 0)
40160
- args.id = opts.id;
40175
+ if (opts.customerId !== void 0)
40176
+ args.customer_id = opts.customerId;
40161
40177
  await ctx.execute({
40162
- method: "GET",
40163
- path: "/v1/aggregators/{id}/usage",
40178
+ method: "POST",
40179
+ path: "/v1/ai/billing/customers/{customer_id}/apply-default-plan",
40164
40180
  args,
40165
40181
  queryParamKeys: []
40166
40182
  });
40167
40183
  });
40168
- resource.command("get-aggregator-usage-timeseries").description(`Get client-wide usage for an aggregator bucketed by month/day/hour over a period.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--group-by <value>", `Bucket size for the timeseries.`).addHelpText("after", `
40184
+ resource.command("get-agent-customer-balance").description(`Get one customer's live AI balance, shaped by their billing mode: wallet shadow balance, credit pot, or rolling window meters with reset times. Includes per-agent scopes and overage state.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
40169
40185
  Examples:
40170
- hyperline aggregators-usage get-aggregator-usage-timeseries --id <id>
40171
- hyperline aggregators-usage get-aggregator-usage-timeseries --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
40186
+ hyperline ai-billing get-agent-customer-balance --customer-id <customer_id>
40187
+ hyperline ai-billing get-agent-customer-balance --customer-id <customer_id> --agent <agent>`).action(async (opts) => {
40172
40188
  const ctx = resource.parent?.opts()._ctx;
40173
40189
  if (!ctx) {
40174
40190
  process.stderr.write("Error: Not authenticated\n");
40175
40191
  process.exit(1);
40176
40192
  }
40177
40193
  const args = {};
40178
- if (opts.id !== void 0)
40179
- args.id = opts.id;
40180
- if (opts.startDate !== void 0)
40181
- args.start_date = opts.startDate;
40182
- if (opts.endDate !== void 0)
40183
- args.end_date = opts.endDate;
40184
- if (opts.aggregatorFilterId !== void 0)
40185
- args.aggregator_filter_id = opts.aggregatorFilterId;
40186
- if (opts.groupBy !== void 0)
40187
- args.group_by = opts.groupBy;
40194
+ if (opts.customerId !== void 0)
40195
+ args.customer_id = opts.customerId;
40196
+ if (opts.agent !== void 0)
40197
+ args.agent = opts.agent;
40188
40198
  await ctx.execute({
40189
40199
  method: "GET",
40190
- path: "/v1/aggregators/{id}/usage/timeseries",
40200
+ path: "/v1/ai/billing/customers/{customer_id}/balance",
40191
40201
  args,
40192
- queryParamKeys: [
40193
- "start_date",
40194
- "end_date",
40195
- "aggregator_filter_id",
40196
- "group_by"
40197
- ]
40202
+ queryParamKeys: ["agent"]
40198
40203
  });
40199
40204
  });
40200
- resource.command("get-aggregator-usage-group-by-customer").description(`Per-customer total usage for an aggregator over a period, ranked by total. Paginated with take/skip.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
40205
+ resource.command("reset-agent-customer-windows").description(`Reset one customer's open AI allowance windows so their next call starts a fresh full allowance. Windows-mode scopes only.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent scope identifier. Null on scoped results denotes the customer's shared pool.`).addHelpText("after", `
40201
40206
  Examples:
40202
- hyperline aggregators-usage get-aggregator-usage-group-by-customer --id <id>
40203
- hyperline aggregators-usage get-aggregator-usage-group-by-customer --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
40207
+ hyperline ai-billing reset-agent-customer-windows --customer-id <customer_id>
40208
+ hyperline ai-billing reset-agent-customer-windows --customer-id <customer_id> --agent <agent>
40209
+ hyperline ai-billing reset-agent-customer-windows --customer-id <customer_id> --output json`).action(async (opts) => {
40204
40210
  const ctx = resource.parent?.opts()._ctx;
40205
40211
  if (!ctx) {
40206
40212
  process.stderr.write("Error: Not authenticated\n");
40207
40213
  process.exit(1);
40208
40214
  }
40209
40215
  const args = {};
40210
- if (opts.id !== void 0)
40211
- args.id = opts.id;
40212
- if (opts.startDate !== void 0)
40213
- args.start_date = opts.startDate;
40214
- if (opts.endDate !== void 0)
40215
- args.end_date = opts.endDate;
40216
- if (opts.aggregatorFilterId !== void 0)
40217
- args.aggregator_filter_id = opts.aggregatorFilterId;
40216
+ if (opts.customerId !== void 0)
40217
+ args.customer_id = opts.customerId;
40218
+ if (opts.agent !== void 0)
40219
+ args.agent = opts.agent;
40220
+ await ctx.execute({
40221
+ method: "POST",
40222
+ path: "/v1/ai/billing/customers/{customer_id}/windows/reset",
40223
+ args,
40224
+ queryParamKeys: ["agent"]
40225
+ });
40226
+ });
40227
+ resource.command("list-agent-customer-consumption").description(`List one customer's AI consumption ledger entries, newest first, with amounts, denominations and overage flags. Filter by agent scope, overage, and from/to time range; paginated with take/skip.`).requiredOption("--customer-id <value>", `customer_id parameter`).option("--agent <value>", `Agent slug. An empty string selects the shared pool; omission includes all scopes.`).option("--overage <value>", `Filter by overage status. Omit to include both ordinary and overage entries.`).option("--from <value>", `UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--to <value>", `UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
40228
+ Examples:
40229
+ hyperline ai-billing list-agent-customer-consumption --customer-id <customer_id>
40230
+ hyperline ai-billing list-agent-customer-consumption --customer-id <customer_id> --agent <agent> --overage <overage>`).action(async (opts) => {
40231
+ const ctx = resource.parent?.opts()._ctx;
40232
+ if (!ctx) {
40233
+ process.stderr.write("Error: Not authenticated\n");
40234
+ process.exit(1);
40235
+ }
40236
+ const args = {};
40237
+ if (opts.customerId !== void 0)
40238
+ args.customer_id = opts.customerId;
40239
+ if (opts.agent !== void 0)
40240
+ args.agent = opts.agent;
40241
+ if (opts.overage !== void 0)
40242
+ args.overage = opts.overage;
40243
+ if (opts.from !== void 0)
40244
+ args.from = opts.from;
40245
+ if (opts.to !== void 0)
40246
+ args.to = opts.to;
40218
40247
  if (opts.take !== void 0)
40219
40248
  args.take = Number(opts.take);
40220
40249
  if (opts.skip !== void 0)
40221
40250
  args.skip = Number(opts.skip);
40222
40251
  await ctx.execute({
40223
40252
  method: "GET",
40224
- path: "/v1/aggregators/{id}/usage/group-by-customer",
40253
+ path: "/v1/ai/billing/customers/{customer_id}/consumption",
40225
40254
  args,
40226
- queryParamKeys: [
40227
- "start_date",
40228
- "end_date",
40229
- "aggregator_filter_id",
40230
- "take",
40231
- "skip"
40232
- ]
40255
+ queryParamKeys: ["agent", "overage", "from", "to", "take", "skip"]
40233
40256
  });
40234
40257
  });
40235
- resource.command("get-aggregator-usage-events").description(`List raw billable events for an aggregator across every customer of the client. Paginated with take/skip.`).requiredOption("--id <value>", `id parameter`).option("--start-date <value>", `ISO-8601 date string.`).option("--end-date <value>", `ISO-8601 date string.`).option("--aggregator-filter-id <value>", `Optional aggregator filter ID. When set, restricts the result to events matching that filter's config. Must belong to the aggregator in the path.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
40258
+ resource.command("get-agent-customer-overview").description(`Get one customer's full AI billing overview: default policy, per-agent scopes, balances and billed consumption totals in one read.`).requiredOption("--customer-id <value>", `customer_id parameter`).addHelpText("after", `
40236
40259
  Examples:
40237
- hyperline aggregators-usage get-aggregator-usage-events --id <id>
40238
- hyperline aggregators-usage get-aggregator-usage-events --id <id> --start-date <start_date> --end-date <end_date>`).action(async (opts) => {
40260
+ hyperline ai-billing get-agent-customer-overview --customer-id <customer_id>`).action(async (opts) => {
40239
40261
  const ctx = resource.parent?.opts()._ctx;
40240
40262
  if (!ctx) {
40241
40263
  process.stderr.write("Error: Not authenticated\n");
40242
40264
  process.exit(1);
40243
40265
  }
40244
40266
  const args = {};
40245
- if (opts.id !== void 0)
40246
- args.id = opts.id;
40247
- if (opts.startDate !== void 0)
40248
- args.start_date = opts.startDate;
40249
- if (opts.endDate !== void 0)
40250
- args.end_date = opts.endDate;
40251
- if (opts.aggregatorFilterId !== void 0)
40252
- args.aggregator_filter_id = opts.aggregatorFilterId;
40253
- if (opts.take !== void 0)
40254
- args.take = Number(opts.take);
40255
- if (opts.skip !== void 0)
40256
- args.skip = Number(opts.skip);
40267
+ if (opts.customerId !== void 0)
40268
+ args.customer_id = opts.customerId;
40257
40269
  await ctx.execute({
40258
40270
  method: "GET",
40259
- path: "/v1/aggregators/{id}/usage/events",
40271
+ path: "/v1/ai/billing/customers/{customer_id}/overview",
40260
40272
  args,
40261
- queryParamKeys: [
40262
- "start_date",
40263
- "end_date",
40264
- "aggregator_filter_id",
40265
- "take",
40266
- "skip"
40267
- ]
40273
+ queryParamKeys: []
40268
40274
  });
40269
40275
  });
40270
40276
  }
@@ -40756,7 +40762,7 @@ Examples:
40756
40762
  queryParamKeys: []
40757
40763
  });
40758
40764
  });
40759
- resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (text, number, boolean, date, select, multi_select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Null means no default value.`).addHelpText("after", `
40765
+ resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (text, email, number, boolean, date, select, multi_select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Email defaults must be valid email addresses. Null means no default value.`).addHelpText("after", `
40760
40766
  Examples:
40761
40767
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities>
40762
40768
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -40790,7 +40796,7 @@ Examples:
40790
40796
  queryParamKeys: []
40791
40797
  });
40792
40798
  });
40793
- resource.command("update-custom-property").description(`Update an existing custom property definition by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Null means no default value.`).addHelpText("after", `
40799
+ resource.command("update-custom-property").description(`Update an existing custom property definition by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Email defaults must be valid email addresses. Null means no default value.`).addHelpText("after", `
40794
40800
  Examples:
40795
40801
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities>
40796
40802
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -41969,11 +41975,61 @@ Examples:
41969
41975
  queryParamKeys: []
41970
41976
  });
41971
41977
  });
41972
- resource.command("topup-customer-credits").description(`Add free credits to a customer's balance. Unlike purchase, this does not generate an invoice or charge the customer.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).requiredOption("--credit-count <number>", `Value indicating a number of credits to add. If \`price_id\` is defined, this value must correspond to a full credit pack for the price.`).option("--expires-at <value>", `Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
41978
+ resource.command("topup-customer-credits").description(`Add free credits to a customer's balance. Unlike purchase, this does not generate an invoice or charge the customer.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).requiredOption("--credit-count <number>", `Value indicating a number of credits to add. If \`price_id\` is defined, this value must correspond to a full credit pack for the price.`).option("--expires-at <value>", `Expiration date for credits linked to this transaction. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
41979
+ Examples:
41980
+ hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count>
41981
+ hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count> --expires-at <expires_at>
41982
+ hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count> --output json`).action(async (opts) => {
41983
+ const ctx = resource.parent?.opts()._ctx;
41984
+ if (!ctx) {
41985
+ process.stderr.write("Error: Not authenticated\n");
41986
+ process.exit(1);
41987
+ }
41988
+ const args = {};
41989
+ if (opts.id !== void 0)
41990
+ args.id = opts.id;
41991
+ if (opts.productId !== void 0)
41992
+ args.productId = opts.productId;
41993
+ if (opts.expiresAt !== void 0)
41994
+ args.expires_at = opts.expiresAt;
41995
+ if (opts.creditCount !== void 0)
41996
+ args.credit_count = Number(opts.creditCount);
41997
+ await ctx.execute({
41998
+ method: "POST",
41999
+ path: "/v1/customers/{id}/credits/{productId}/topup",
42000
+ args,
42001
+ queryParamKeys: []
42002
+ });
42003
+ });
42004
+ resource.command("create-customer-credits-usage").description(`Record credit usage for a customer's credit product. Deducts the specified usage_retained amount from the balance.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).requiredOption("--usage-retained <number>", `Value indicating the number of credits consumed.`).option("--event-id <value>", `Event ID corresponding to the credit consumption.`).addHelpText("after", `
42005
+ Examples:
42006
+ hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained>
42007
+ hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained> --event-id <event_id>
42008
+ hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained> --output json`).action(async (opts) => {
42009
+ const ctx = resource.parent?.opts()._ctx;
42010
+ if (!ctx) {
42011
+ process.stderr.write("Error: Not authenticated\n");
42012
+ process.exit(1);
42013
+ }
42014
+ const args = {};
42015
+ if (opts.id !== void 0)
42016
+ args.id = opts.id;
42017
+ if (opts.productId !== void 0)
42018
+ args.productId = opts.productId;
42019
+ if (opts.eventId !== void 0)
42020
+ args.event_id = opts.eventId;
42021
+ if (opts.usageRetained !== void 0)
42022
+ args.usage_retained = Number(opts.usageRetained);
42023
+ await ctx.execute({
42024
+ method: "POST",
42025
+ path: "/v1/customers/{id}/credits/{productId}/usage",
42026
+ args,
42027
+ queryParamKeys: []
42028
+ });
42029
+ });
42030
+ resource.command("get-customer-credit-portal-settings").description(`Get whether a customer can top up a credit product from the customer portal, at which price, and which prices can be selected.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).addHelpText("after", `
41973
42031
  Examples:
41974
- hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count>
41975
- hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count> --expires-at <expires_at>
41976
- hyperline customers-credits topup-customer-credits --id <id> --product-id <productId> --credit-count <credit_count> --output json`).action(async (opts) => {
42032
+ hyperline customers-credits get-customer-credit-portal-settings --id <id> --product-id <productId>`).action(async (opts) => {
41977
42033
  const ctx = resource.parent?.opts()._ctx;
41978
42034
  if (!ctx) {
41979
42035
  process.stderr.write("Error: Not authenticated\n");
@@ -41984,22 +42040,18 @@ Examples:
41984
42040
  args.id = opts.id;
41985
42041
  if (opts.productId !== void 0)
41986
42042
  args.productId = opts.productId;
41987
- if (opts.expiresAt !== void 0)
41988
- args.expires_at = opts.expiresAt;
41989
- if (opts.creditCount !== void 0)
41990
- args.credit_count = Number(opts.creditCount);
41991
42043
  await ctx.execute({
41992
- method: "POST",
41993
- path: "/v1/customers/{id}/credits/{productId}/topup",
42044
+ method: "GET",
42045
+ path: "/v1/customers/{id}/credits/{productId}/portal-settings",
41994
42046
  args,
41995
42047
  queryParamKeys: []
41996
42048
  });
41997
42049
  });
41998
- resource.command("create-customer-credits-usage").description(`Record credit usage for a customer's credit product. Deducts the specified usage_retained amount from the balance.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).requiredOption("--usage-retained <number>", `Value indicating the number of credits consumed.`).option("--event-id <value>", `Event ID corresponding to the credit consumption.`).addHelpText("after", `
42050
+ resource.command("update-customer-credit-portal-settings").description(`Enable or disable customer portal credit top-ups for a customer and credit product, with the price configuration (or a custom price) the customer pays.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).requiredOption("--enabled", `Whether the customer can buy this credit product from the customer portal. Enabling requires a price: \`price_configuration_id\`, \`custom_price_configuration\`, or the price already set. Disabling clears the price and removes the customer's own price.`).option("--price-configuration-id <value>", `ID of one of the credit product's price configurations, in the customer's price book and currency, of type \`bundle\`, \`volume\` or \`bulk\`. Mutually exclusive with \`custom_price_configuration\`.`).option("--custom-price-configuration <json>", `A price of the customer's own, in the customer's currency, replacing any previous one. Same shape as a credit product price configuration. Mutually exclusive with \`price_configuration_id\`.`).addHelpText("after", `
41999
42051
  Examples:
42000
- hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained>
42001
- hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained> --event-id <event_id>
42002
- hyperline customers-credits create-customer-credits-usage --id <id> --product-id <productId> --usage-retained <usage_retained> --output json`).action(async (opts) => {
42052
+ hyperline customers-credits update-customer-credit-portal-settings --id <id> --product-id <productId> --enabled
42053
+ hyperline customers-credits update-customer-credit-portal-settings --id <id> --product-id <productId> --enabled --price-configuration-id <price_configuration_id> --custom-price-configuration <custom_price_configuration>
42054
+ hyperline customers-credits update-customer-credit-portal-settings --id <id> --product-id <productId> --enabled --output json`).action(async (opts) => {
42003
42055
  const ctx = resource.parent?.opts()._ctx;
42004
42056
  if (!ctx) {
42005
42057
  process.stderr.write("Error: Not authenticated\n");
@@ -42010,13 +42062,15 @@ Examples:
42010
42062
  args.id = opts.id;
42011
42063
  if (opts.productId !== void 0)
42012
42064
  args.productId = opts.productId;
42013
- if (opts.eventId !== void 0)
42014
- args.event_id = opts.eventId;
42015
- if (opts.usageRetained !== void 0)
42016
- args.usage_retained = Number(opts.usageRetained);
42065
+ if (opts.priceConfigurationId !== void 0)
42066
+ args.price_configuration_id = opts.priceConfigurationId;
42067
+ if (opts.enabled !== void 0)
42068
+ args.enabled = true;
42069
+ if (opts.customPriceConfiguration !== void 0)
42070
+ args.custom_price_configuration = JSON.parse(opts.customPriceConfiguration);
42017
42071
  await ctx.execute({
42018
- method: "POST",
42019
- path: "/v1/customers/{id}/credits/{productId}/usage",
42072
+ method: "PUT",
42073
+ path: "/v1/customers/{id}/credits/{productId}/portal-settings",
42020
42074
  args,
42021
42075
  queryParamKeys: []
42022
42076
  });
@@ -42976,7 +43030,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
42976
43030
 
42977
43031
  - \`current\`: Use the current default payment method of the customer.
42978
43032
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
42979
- `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <json>", `line_items`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
43033
+ `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), resolved to the start of that day in the customer timezone. Requires \`status\` to be \`draft\` and an issue date after today. Default to \`manual\`.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <json>", `line_items`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
42980
43034
  Examples:
42981
43035
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
42982
43036
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -43027,6 +43081,8 @@ Examples:
43027
43081
  args.due_at = opts.dueAt;
43028
43082
  if (opts.settledAt !== void 0)
43029
43083
  args.settled_at = opts.settledAt;
43084
+ if (opts.issuingMethod !== void 0)
43085
+ args.issuing_method = opts.issuingMethod;
43030
43086
  if (opts.properties !== void 0)
43031
43087
  args.properties = JSON.parse(opts.properties);
43032
43088
  if (opts.customProperties !== void 0)
@@ -43216,7 +43272,7 @@ Examples:
43216
43272
 
43217
43273
  - \`auto\`: Tax is automatically computed and applied.
43218
43274
  - \`not_eligible\`: Tax collection is disabled for the invoice.
43219
- `).option("--line-items <json>", `line_items`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
43275
+ `).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), in the invoice timezone. The issue date must be after today. Set to \`manual\` to unschedule the invoice.`).option("--emitted-at <value>", `Issue date of the draft invoice. For a scheduled invoice, the day on which it is automatically finalized.`).option("--line-items <json>", `line_items`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
43220
43276
  Examples:
43221
43277
  hyperline invoices update --id <id>
43222
43278
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -43245,6 +43301,10 @@ Examples:
43245
43301
  args.footer = opts.footer;
43246
43302
  if (opts.taxScheme !== void 0)
43247
43303
  args.tax_scheme = opts.taxScheme;
43304
+ if (opts.issuingMethod !== void 0)
43305
+ args.issuing_method = opts.issuingMethod;
43306
+ if (opts.emittedAt !== void 0)
43307
+ args.emitted_at = opts.emittedAt;
43248
43308
  if (opts.paymentMethodType !== void 0)
43249
43309
  args.payment_method_type = opts.paymentMethodType;
43250
43310
  if (opts.paymentMethodId !== void 0)
@@ -43938,6 +43998,44 @@ Examples:
43938
43998
  queryParamKeys: []
43939
43999
  });
43940
44000
  });
44001
+ 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", `
44002
+ Examples:
44003
+ hyperline price-configurations create --currency <currency> --billing-interval <billing_interval> --type <type> --prices <prices> --product-id <product_id>
44004
+ 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>
44005
+ hyperline price-configurations create --currency <currency> --billing-interval <billing_interval> --type <type> --prices <prices> --product-id <product_id> --output json`).action(async (opts) => {
44006
+ const ctx = resource.parent?.opts()._ctx;
44007
+ if (!ctx) {
44008
+ process.stderr.write("Error: Not authenticated\n");
44009
+ process.exit(1);
44010
+ }
44011
+ const args = {};
44012
+ if (opts.currency !== void 0)
44013
+ args.currency = opts.currency;
44014
+ if (opts.priceBookId !== void 0)
44015
+ args.price_book_id = opts.priceBookId;
44016
+ if (opts.type !== void 0)
44017
+ args.type = opts.type;
44018
+ if (opts.productId !== void 0)
44019
+ args.product_id = opts.productId;
44020
+ if (opts.allowOnPortal !== void 0)
44021
+ args.allow_on_portal = true;
44022
+ if (opts.countries !== void 0)
44023
+ args.countries = JSON.parse(opts.countries);
44024
+ if (opts.billingInterval !== void 0)
44025
+ args.billing_interval = JSON.parse(opts.billingInterval);
44026
+ if (opts.commitmentInterval !== void 0)
44027
+ args.commitment_interval = JSON.parse(opts.commitmentInterval);
44028
+ if (opts.prices !== void 0)
44029
+ args.prices = JSON.parse(opts.prices);
44030
+ if (opts.meteringFilter !== void 0)
44031
+ args.metering_filter = JSON.parse(opts.meteringFilter);
44032
+ await ctx.execute({
44033
+ method: "POST",
44034
+ path: "/v1/price-configurations",
44035
+ args,
44036
+ queryParamKeys: []
44037
+ });
44038
+ });
43941
44039
  resource.command("update-prices").description(`Update the prices of an existing price configuration by ID. Allows changing tier thresholds, unit prices, and flat fees.`).requiredOption("--id <value>", `id parameter`).option("--stdin", `Read JSON array input from stdin`).addHelpText("after", `
43942
44040
  Examples:
43943
44041
  hyperline price-configurations update-prices --id <id>
@@ -44136,7 +44234,7 @@ How the periodic credit allowance is granted for partial billing periods.
44136
44234
 
44137
44235
  - \`prorated\` (default): the granted credits are prorated to the elapsed period.
44138
44236
  - \`full_allowance\`: the full allowance is always granted (the invoice remains prorated).
44139
- `).option("--credits-balance-auto-creation-enabled <value>", `Default for the \`credits_balance_auto_creation_enabled\` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. \`true\` when unset. A subscription product can override it.`).option("--portal-top-up-auto-activation-enabled <value>", `Whether portal top-ups are enabled for the customer when a credit balance of this product is created for them, from a subscription or manually. Portal top-ups must also be enabled in the hosted pages settings to show on the portal. \`false\` when unset.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <json>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
44237
+ `).option("--credits-balance-auto-creation-enabled <value>", `Default for the \`credits_balance_auto_creation_enabled\` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. \`true\` when unset. A subscription product can override it.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <json>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
44140
44238
  Examples:
44141
44239
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
44142
44240
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
@@ -44163,8 +44261,6 @@ Examples:
44163
44261
  args.credits_grant_mode = opts.creditsGrantMode;
44164
44262
  if (opts.creditsBalanceAutoCreationEnabled !== void 0)
44165
44263
  args.credits_balance_auto_creation_enabled = opts.creditsBalanceAutoCreationEnabled;
44166
- if (opts.portalTopUpAutoActivationEnabled !== void 0)
44167
- args.portal_top_up_auto_activation_enabled = opts.portalTopUpAutoActivationEnabled;
44168
44264
  if (opts.displayMode !== void 0)
44169
44265
  args.display_mode = opts.displayMode;
44170
44266
  if (opts.lowCreditsThreshold !== void 0)
@@ -44695,6 +44791,25 @@ Examples:
44695
44791
  queryParamKeys: []
44696
44792
  });
44697
44793
  });
44794
+ resource.command("duplicate").description(`Create a draft duplicate of an existing quote, including its linked invoice or subscription configuration.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
44795
+ Examples:
44796
+ hyperline quotes duplicate --id <id>
44797
+ hyperline quotes duplicate --id <id> --output json`).action(async (opts) => {
44798
+ const ctx = resource.parent?.opts()._ctx;
44799
+ if (!ctx) {
44800
+ process.stderr.write("Error: Not authenticated\n");
44801
+ process.exit(1);
44802
+ }
44803
+ const args = {};
44804
+ if (opts.id !== void 0)
44805
+ args.id = opts.id;
44806
+ await ctx.execute({
44807
+ method: "POST",
44808
+ path: "/v1/quotes/{id}/duplicate",
44809
+ args,
44810
+ queryParamKeys: []
44811
+ });
44812
+ });
44698
44813
  resource.command("download").description(`Download the PDF of a quote. Supports locale parameter for localization.`).requiredOption("--id <value>", `id parameter`).option("--locale <value>", `Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.`).addHelpText("after", `
44699
44814
  Examples:
44700
44815
  hyperline quotes download --id <id>
@@ -44754,11 +44869,11 @@ Examples:
44754
44869
  queryParamKeys: []
44755
44870
  });
44756
44871
  });
44757
- resource.command("send").description(`Send a quote by email for customer signature. Requires the quote to be approved first.`).requiredOption("--id <value>", `id parameter`).requiredOption("--email <value>", `Email address to which the quote will be sent for signature.`).option("--message <value>", `Custom message used in the email content.`).addHelpText("after", `
44872
+ 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", `
44758
44873
  Examples:
44759
- hyperline quotes send --id <id> --email <email>
44874
+ hyperline quotes send --id <id>
44760
44875
  hyperline quotes send --id <id> --email <email> --message <message>
44761
- hyperline quotes send --id <id> --email <email> --output json`).action(async (opts) => {
44876
+ hyperline quotes send --id <id> --output json`).action(async (opts) => {
44762
44877
  const ctx = resource.parent?.opts()._ctx;
44763
44878
  if (!ctx) {
44764
44879
  process.stderr.write("Error: Not authenticated\n");
@@ -44778,6 +44893,51 @@ Examples:
44778
44893
  queryParamKeys: []
44779
44894
  });
44780
44895
  });
44896
+ resource.command("list-quote-signers").description(`List the signers of a quote in signing order, with each signer's status (pending, notified, viewed, signed, declined). An empty list means the quote uses the single-signer flow of \`send_quote\`.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
44897
+ Examples:
44898
+ hyperline quotes list-quote-signers --id <id>`).action(async (opts) => {
44899
+ const ctx = resource.parent?.opts()._ctx;
44900
+ if (!ctx) {
44901
+ process.stderr.write("Error: Not authenticated\n");
44902
+ process.exit(1);
44903
+ }
44904
+ const args = {};
44905
+ if (opts.id !== void 0)
44906
+ args.id = opts.id;
44907
+ await ctx.execute({
44908
+ method: "GET",
44909
+ path: "/v1/quotes/{id}/signers",
44910
+ args,
44911
+ queryParamKeys: []
44912
+ });
44913
+ });
44914
+ resource.command("set-quote-signers").description(`Replace the full list of signers of a quote. Signers with the same \`step_order\` sign in parallel; steps sign in ascending order. Requires at least one \`external\` signer, and a \`countersigner\` must sign after an external step. Set signers before calling \`send_quote\`, which then emails the signers of the first step and no longer needs \`email\`. Pass an empty list to go back to the single-signer flow.`).requiredOption("--id <value>", `id parameter`).requiredOption("--signers <json>", `
44915
+ Signature circuit of the quote, replaced as a whole.
44916
+
44917
+ Signers sign step by step, in ascending \`step_order\`. Signers sharing a step sign in parallel, and the next step opens once all of them have signed. The circuit needs at least one \`external\` signer, and a \`countersigner\` must sign after the first external step.
44918
+
44919
+ Signers who already signed cannot be removed or moved. Once the quote is out for signature at an electronic signature provider, the circuit can no longer be changed.
44920
+ `).addHelpText("after", `
44921
+ Examples:
44922
+ hyperline quotes set-quote-signers --id <id> --signers <signers>
44923
+ hyperline quotes set-quote-signers --id <id> --signers <signers> --output json`).action(async (opts) => {
44924
+ const ctx = resource.parent?.opts()._ctx;
44925
+ if (!ctx) {
44926
+ process.stderr.write("Error: Not authenticated\n");
44927
+ process.exit(1);
44928
+ }
44929
+ const args = {};
44930
+ if (opts.id !== void 0)
44931
+ args.id = opts.id;
44932
+ if (opts.signers !== void 0)
44933
+ args.signers = JSON.parse(opts.signers);
44934
+ await ctx.execute({
44935
+ method: "PUT",
44936
+ path: "/v1/quotes/{id}/signers",
44937
+ args,
44938
+ queryParamKeys: []
44939
+ });
44940
+ });
44781
44941
  resource.command("sign").description(`Manually mark a quote as signed externally. Optionally upload a signed PDF. Bypasses the built-in Hyperline signature flow.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
44782
44942
  Examples:
44783
44943
  hyperline quotes sign --id <id>
@@ -45088,9 +45248,10 @@ Examples:
45088
45248
  queryParamKeys: []
45089
45249
  });
45090
45250
  });
45091
- resource.command("reinstate").description(`Reinstate a subscription that is scheduled for cancellation, reverting it to active status.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
45251
+ resource.command("reinstate").description(`Reinstate a subscription, reverting it to active status. Works for a subscription scheduled for cancellation and for a fully-cancelled one. For a fully-cancelled subscription, optionally pass reactivate_at and invoicing_mode (or charge_line_items for a custom charge) to control how the cancelled gap is invoiced.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date a fully-cancelled subscription resumes from. Defaults to now. Ignored for scheduled-cancellation reinstatement.`).option("--invoicing-mode <value>", `How the paused/cancelled gap is invoiced when the subscription resumes. \`charge_full_period\`: bill the frozen periods as if never paused. \`prorate_remaining_period\`: skip the gap and bill the prorated remainder from the resume date. \`resume_at_next_cycle\` (default): skip the gap with no catch-up invoice.`).option("--charge-line-items <json>", `Custom charge: bill exactly these lines on an immediate resume instead of applying \`invoicing_mode\`. The lines cover the stopped period (pause or cancellation date to resume date). Requires the \`invoices_create\` permission. Fully-cancelled subscriptions only.`).addHelpText("after", `
45092
45252
  Examples:
45093
45253
  hyperline subscriptions reinstate --id <id>
45254
+ hyperline subscriptions reinstate --id <id> --reactivate-at <reactivate_at> --invoicing-mode <invoicing_mode>
45094
45255
  hyperline subscriptions reinstate --id <id> --output json`).action(async (opts) => {
45095
45256
  const ctx = resource.parent?.opts()._ctx;
45096
45257
  if (!ctx) {
@@ -45100,6 +45261,12 @@ Examples:
45100
45261
  const args = {};
45101
45262
  if (opts.id !== void 0)
45102
45263
  args.id = opts.id;
45264
+ if (opts.reactivateAt !== void 0)
45265
+ args.reactivate_at = opts.reactivateAt;
45266
+ if (opts.invoicingMode !== void 0)
45267
+ args.invoicing_mode = opts.invoicingMode;
45268
+ if (opts.chargeLineItems !== void 0)
45269
+ args.charge_line_items = JSON.parse(opts.chargeLineItems);
45103
45270
  await ctx.execute({
45104
45271
  method: "POST",
45105
45272
  path: "/v1/subscriptions/{id}/reinstate",
@@ -45107,7 +45274,7 @@ Examples:
45107
45274
  queryParamKeys: []
45108
45275
  });
45109
45276
  });
45110
- resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption. If the subscription is already paused, updates (or clears) its reactivation date.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date when the subscription will be automatically reactivated. Must be a future date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
45277
+ resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption. If the subscription is already paused, updates (or clears) its reactivation date.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date when the subscription will be automatically reactivated. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. A date on or before the pause date resumes it at the next scheduled run.`).addHelpText("after", `
45111
45278
  Examples:
45112
45279
  hyperline subscriptions pause --id <id>
45113
45280
  hyperline subscriptions pause --id <id> --reactivate-at <reactivate_at>
@@ -45148,9 +45315,10 @@ Examples:
45148
45315
  queryParamKeys: []
45149
45316
  });
45150
45317
  });
45151
- resource.command("reactivate").description(`Resume a paused subscription, restarting billing from the current date.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
45318
+ resource.command("reactivate").description(`Resume a paused subscription. Optionally pass reactivate_at (may be in the past, after the pause date; a future date schedules it) and invoicing_mode (or charge_line_items for a custom charge) to control how the paused gap is invoiced.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date the subscription resumes from. May be in the past (after the pause date). Defaults to now. A future date schedules the reactivation.`).option("--invoicing-mode <value>", `How the paused/cancelled gap is invoiced when the subscription resumes. \`charge_full_period\`: bill the frozen periods as if never paused. \`prorate_remaining_period\`: skip the gap and bill the prorated remainder from the resume date. \`resume_at_next_cycle\` (default): skip the gap with no catch-up invoice.`).option("--charge-line-items <json>", `Custom charge: bill exactly these lines on an immediate resume instead of applying \`invoicing_mode\`. The lines cover the stopped period (pause or cancellation date to resume date). Requires the \`invoices_create\` permission. Not allowed with a future \`reactivate_at\`.`).addHelpText("after", `
45152
45319
  Examples:
45153
45320
  hyperline subscriptions reactivate --id <id>
45321
+ hyperline subscriptions reactivate --id <id> --reactivate-at <reactivate_at> --invoicing-mode <invoicing_mode>
45154
45322
  hyperline subscriptions reactivate --id <id> --output json`).action(async (opts) => {
45155
45323
  const ctx = resource.parent?.opts()._ctx;
45156
45324
  if (!ctx) {
@@ -45160,6 +45328,12 @@ Examples:
45160
45328
  const args = {};
45161
45329
  if (opts.id !== void 0)
45162
45330
  args.id = opts.id;
45331
+ if (opts.reactivateAt !== void 0)
45332
+ args.reactivate_at = opts.reactivateAt;
45333
+ if (opts.invoicingMode !== void 0)
45334
+ args.invoicing_mode = opts.invoicingMode;
45335
+ if (opts.chargeLineItems !== void 0)
45336
+ args.charge_line_items = JSON.parse(opts.chargeLineItems);
45163
45337
  await ctx.execute({
45164
45338
  method: "POST",
45165
45339
  path: "/v1/subscriptions/{id}/reactivate",
@@ -46743,10 +46917,10 @@ function registerAllCommands(program2) {
46743
46917
  registerAccounting_ReportsCommands(program2);
46744
46918
  registerAccounting_Revenue_RecognitionCommands(program2);
46745
46919
  registerAccounting_RulesCommands(program2);
46746
- registerAgentsCommands(program2);
46747
46920
  registerCustom_PropertiesCommands(program2);
46748
46921
  registerAggregatorsCommands(program2);
46749
46922
  registerAggregators_UsageCommands(program2);
46923
+ registerAi_BillingCommands(program2);
46750
46924
  registerAnalyticsCommands(program2);
46751
46925
  registerBank_AccountsCommands(program2);
46752
46926
  registerCompaniesCommands(program2);
@@ -62780,17 +62954,17 @@ var languages = [
62780
62954
 
62781
62955
  // ../hyperline-i18n/build/locales/de.js
62782
62956
  var de = {
62783
- "accounting.invoicePosted.entryDescription": "Buchungseintrag f\xFCr Rechnung {{invoiceId}}",
62784
- "accounting.transactionSettled.entryDescription": "Zahlungsabwicklung f\xFCr Rechnung {{invoiceId}}",
62785
- "accounting.transactionRefunded.entryDescription": "R\xFCckerstattung f\xFCr Rechnung {{invoiceId}}",
62786
62957
  "accounting.creditNotePosted.entryDescription": "Gutschrift {{creditNoteId}} f\xFCr Rechnung {{invoiceId}}",
62787
- "accounting.standaloneCreditNotePosted.entryDescription": "Gutschrift {{creditNoteId}}",
62958
+ "accounting.invoicePosted.entryDescription": "Buchungseintrag f\xFCr Rechnung {{invoiceId}}",
62959
+ "accounting.revrec.closedPeriodFallbackNote": " (in die n\xE4chste offene Periode gebucht \u2013 Zielperiode geschlossen; urspr\xFCngliches Datum {{originalDate}})",
62788
62960
  "accounting.revrec.creditLineDescription": "Umsatz realisieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
62789
62961
  "accounting.revrec.debitLineDescription": "Abgrenzungsposten reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
62790
62962
  "accounting.revrec.discountCreditLineDescription": "Erl\xF6sminderung (Rabatt) erfassen \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
62791
- "accounting.revrec.closedPeriodFallbackNote": " (in die n\xE4chste offene Periode gebucht \u2013 Zielperiode geschlossen; urspr\xFCngliches Datum {{originalDate}})",
62792
62963
  "accounting.revrec.discountDebitLineDescription": "Abgegrenzten Rabatt reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
62793
62964
  "accounting.revrec.entryDescription": "Umsatzrealisierung f\xFCr Zeitplan {{scheduleId}}, Zeitraum {{periodStart}} - {{periodEnd}}",
62965
+ "accounting.standaloneCreditNotePosted.entryDescription": "Gutschrift {{creditNoteId}}",
62966
+ "accounting.transactionRefunded.entryDescription": "R\xFCckerstattung f\xFCr Rechnung {{invoiceId}}",
62967
+ "accounting.transactionSettled.entryDescription": "Zahlungsabwicklung f\xFCr Rechnung {{invoiceId}}",
62794
62968
  "creditNotes.refundChargeName": "R\xFCckerstattung f\xFCr die Rechnung",
62795
62969
  "credits.bundleOf": "{{productName}} - Paket mit {{creditCount}} Guthaben",
62796
62970
  "credits.unitsOf": "{{productName}} - {{creditCount}} Guthaben",
@@ -62804,9 +62978,9 @@ var de = {
62804
62978
  "invoices.prorata.paymentForItemFullPeriod": "Zahlung f\xFCr",
62805
62979
  "invoices.prorata.refundForItem": "Anteilig erstatteter Betrag f\xFCr",
62806
62980
  "invoices.prorata.refundForItemFullPeriod": "Erstattung f\xFCr",
62807
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 abgelaufenes Guthaben",
62808
62981
  "subscriptions.closingChargeName": "Abschlussgeb\xFChr f\xFCr das Abonnement",
62809
62982
  "subscriptions.correction": "Vorperiodische Anpassung",
62983
+ "subscriptions.reinstatementRechargeName": "Wiederherstellungsgeb\xFChr f\xFCr den stornierten Zeitraum",
62810
62984
  "subscriptions.updates.addCoupon": "Gutschein hinzuf\xFCgen {{couponName}}",
62811
62985
  "subscriptions.updates.addProduct": "{{productName}} hinzuf\xFCgen",
62812
62986
  "subscriptions.updates.removeCoupon": "Gutschein entfernen {{couponName}}",
@@ -62821,7 +62995,8 @@ var de = {
62821
62995
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Betrag von {{amount}} (mit einer minimal zugesicherten Anzahl von {{committedCount}}) f\xFCr den anteiligen Zeitraum nicht in Rechnung gestellt",
62822
62996
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Diese Position wurde f\xFCr den anteiligen Zeitraum in Rechnung gestellt",
62823
62997
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Betrag von {{amount}} f\xFCr den anteiligen Zeitraum nicht in Rechnung gestellt",
62824
- "subscriptions.updates.updatePrices": "Preise f\xFCr {{productName}} aktualisieren"
62998
+ "subscriptions.updates.updatePrices": "Preise f\xFCr {{productName}} aktualisieren",
62999
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 abgelaufenes Guthaben"
62825
63000
  };
62826
63001
 
62827
63002
  // ../hyperline-i18n/build/locales/en.js
@@ -62838,6 +63013,7 @@ var en = {
62838
63013
  "invoices.prorata.refundForItemFullPeriod": "Refund for",
62839
63014
  "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 expired balance",
62840
63015
  "subscriptions.closingChargeName": "Closing fee for subscription",
63016
+ "subscriptions.reinstatementRechargeName": "Reinstatement recharge of canceled period",
62841
63017
  "subscriptions.correction": "Adjustment previous period",
62842
63018
  "subscriptions.updates.addCoupon": "Add coupon {{couponName}}",
62843
63019
  "subscriptions.updates.addProduct": "Add {{productName}}",
@@ -62872,17 +63048,17 @@ var en = {
62872
63048
 
62873
63049
  // ../hyperline-i18n/build/locales/es.js
62874
63050
  var es = {
62875
- "accounting.invoicePosted.entryDescription": "Asiento contable para la factura {{invoiceId}}",
62876
- "accounting.transactionSettled.entryDescription": "Liquidaci\xF3n de pago para la factura {{invoiceId}}",
62877
- "accounting.transactionRefunded.entryDescription": "Reembolso de la factura {{invoiceId}}",
62878
63051
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para la factura {{invoiceId}}",
62879
- "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
63052
+ "accounting.invoicePosted.entryDescription": "Asiento contable para la factura {{invoiceId}}",
63053
+ "accounting.revrec.closedPeriodFallbackNote": " (registrado en el pr\xF3ximo per\xEDodo abierto \u2014 per\xEDodo contable de destino cerrado; fecha original {{originalDate}})",
62880
63054
  "accounting.revrec.creditLineDescription": "Reconocer ingresos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62881
63055
  "accounting.revrec.debitLineDescription": "Disminuci\xF3n de ingresos diferidos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62882
63056
  "accounting.revrec.discountCreditLineDescription": "Reconocer contra-ingresos (descuento) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62883
- "accounting.revrec.closedPeriodFallbackNote": " (registrado en el pr\xF3ximo per\xEDodo abierto \u2014 per\xEDodo contable de destino cerrado; fecha original {{originalDate}})",
62884
63057
  "accounting.revrec.discountDebitLineDescription": "Disminuci\xF3n de descuento diferido \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62885
63058
  "accounting.revrec.entryDescription": "Reconocimiento de ingresos para el cronograma {{scheduleId}}, per\xEDodo {{periodStart}} - {{periodEnd}}",
63059
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
63060
+ "accounting.transactionRefunded.entryDescription": "Reembolso de la factura {{invoiceId}}",
63061
+ "accounting.transactionSettled.entryDescription": "Liquidaci\xF3n de pago para la factura {{invoiceId}}",
62886
63062
  "creditNotes.refundChargeName": "Reembolso por factura",
62887
63063
  "credits.bundleOf": "{{productName}} - Paquete de {{creditCount}} cr\xE9ditos",
62888
63064
  "credits.unitsOf": "{{productName}} - {{creditCount}} cr\xE9ditos",
@@ -62896,9 +63072,9 @@ var es = {
62896
63072
  "invoices.prorata.paymentForItemFullPeriod": "Pago por",
62897
63073
  "invoices.prorata.refundForItem": "Reembolso prorrateado por",
62898
63074
  "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
62899
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo caducado",
62900
63075
  "subscriptions.closingChargeName": "Cargo por cierre de suscripci\xF3n",
62901
63076
  "subscriptions.correction": "Ajuste del periodo anterior",
63077
+ "subscriptions.reinstatementRechargeName": "Recarga de reinstalaci\xF3n del per\xEDodo cancelado",
62902
63078
  "subscriptions.updates.addCoupon": "A\xF1adir cup\xF3n {{couponName}}",
62903
63079
  "subscriptions.updates.addProduct": "A\xF1adir {{productName}}",
62904
63080
  "subscriptions.updates.removeCoupon": "Eliminar cup\xF3n {{couponName}}",
@@ -62913,22 +63089,23 @@ var es = {
62913
63089
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Importe de {{amount}} (con un m\xEDnimo comprometido de {{committedCount}}) no facturado para el per\xEDodo prorrateado",
62914
63090
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Esta l\xEDnea ha sido facturada para el per\xEDodo prorrateado",
62915
63091
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Importe de {{amount}} no facturado para el per\xEDodo prorrateado",
62916
- "subscriptions.updates.updatePrices": "Actualizar precios para {{productName}}"
63092
+ "subscriptions.updates.updatePrices": "Actualizar precios para {{productName}}",
63093
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo caducado"
62917
63094
  };
62918
63095
 
62919
63096
  // ../hyperline-i18n/build/locales/fr.js
62920
63097
  var fr = {
63098
+ "accounting.creditNotePosted.entryDescription": "Avoir {{creditNoteId}} pour la facture {{invoiceId}}",
63099
+ "accounting.invoicePosted.entryDescription": "\xC9criture de comptabilisation pour la facture {{invoiceId}}",
63100
+ "accounting.revrec.closedPeriodFallbackNote": " (comptabilis\xE9 sur la prochaine p\xE9riode ouverte \u2014 p\xE9riode comptable cible cl\xF4tur\xE9e ; date d'origine {{originalDate}})",
62921
63101
  "accounting.revrec.creditLineDescription": "Reconnaissance du chiffre d'affaires \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62922
63102
  "accounting.revrec.debitLineDescription": "Diminution des produits constat\xE9s d'avance \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62923
63103
  "accounting.revrec.discountCreditLineDescription": "Reconnaissance du contre-revenu (remise) \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62924
- "accounting.revrec.closedPeriodFallbackNote": " (comptabilis\xE9 sur la prochaine p\xE9riode ouverte \u2014 p\xE9riode comptable cible cl\xF4tur\xE9e ; date d'origine {{originalDate}})",
62925
63104
  "accounting.revrec.discountDebitLineDescription": "Diminution des remises diff\xE9r\xE9es \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62926
- "accounting.invoicePosted.entryDescription": "\xC9criture de comptabilisation pour la facture {{invoiceId}}",
62927
- "accounting.transactionSettled.entryDescription": "R\xE8glement de la facture {{invoiceId}}",
62928
- "accounting.transactionRefunded.entryDescription": "Remboursement de la facture {{invoiceId}}",
62929
- "accounting.creditNotePosted.entryDescription": "Avoir {{creditNoteId}} pour la facture {{invoiceId}}",
62930
- "accounting.standaloneCreditNotePosted.entryDescription": "Avoir {{creditNoteId}}",
62931
63105
  "accounting.revrec.entryDescription": "Reconnaissance du chiffre d'affaires pour l'\xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodStart}} - {{periodEnd}}",
63106
+ "accounting.standaloneCreditNotePosted.entryDescription": "Avoir {{creditNoteId}}",
63107
+ "accounting.transactionRefunded.entryDescription": "Remboursement de la facture {{invoiceId}}",
63108
+ "accounting.transactionSettled.entryDescription": "R\xE8glement de la facture {{invoiceId}}",
62932
63109
  "creditNotes.refundChargeName": "Remboursement pour facture",
62933
63110
  "credits.bundleOf": "{{productName}} - Pack de {{creditCount}} cr\xE9dits",
62934
63111
  "credits.unitsOf": "{{productName}} - {{creditCount}} cr\xE9dits",
@@ -62942,9 +63119,9 @@ var fr = {
62942
63119
  "invoices.prorata.paymentForItemFullPeriod": "Paiement pour",
62943
63120
  "invoices.prorata.refundForItem": "Remboursement au prorata pour",
62944
63121
  "invoices.prorata.refundForItemFullPeriod": "Remboursement pour",
62945
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 solde expir\xE9",
62946
63122
  "subscriptions.closingChargeName": "Frais de cl\xF4ture pour abonnement",
62947
63123
  "subscriptions.correction": "Ajustement p\xE9riode pr\xE9c\xE9dente",
63124
+ "subscriptions.reinstatementRechargeName": "Recharge de r\xE9tablissement de la p\xE9riode annul\xE9e",
62948
63125
  "subscriptions.updates.addCoupon": "Ajout du coupon {{couponName}}",
62949
63126
  "subscriptions.updates.addProduct": "Ajout {{productName}}",
62950
63127
  "subscriptions.updates.removeCoupon": "Retrait du coupon {{couponName}}",
@@ -62959,22 +63136,23 @@ var fr = {
62959
63136
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Montant de {{amount}} (avec un minimum engag\xE9 de {{committedCount}}) non factur\xE9 pour la p\xE9riode proratis\xE9e",
62960
63137
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Cette ligne a \xE9t\xE9 factur\xE9e pour la p\xE9riode proratis\xE9e",
62961
63138
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Montant de {{amount}} non factur\xE9 pour la p\xE9riode proratis\xE9e",
62962
- "subscriptions.updates.updatePrices": "Mise \xE0 jour des prix pour {{productName}}"
63139
+ "subscriptions.updates.updatePrices": "Mise \xE0 jour des prix pour {{productName}}",
63140
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 solde expir\xE9"
62963
63141
  };
62964
63142
 
62965
63143
  // ../hyperline-i18n/build/locales/it.js
62966
63144
  var it = {
62967
- "accounting.invoicePosted.entryDescription": "Registrazione contabile per la fattura {{invoiceId}}",
62968
- "accounting.transactionSettled.entryDescription": "Regolamento pagamento per la fattura {{invoiceId}}",
62969
- "accounting.transactionRefunded.entryDescription": "Rimborso per la fattura {{invoiceId}}",
62970
63145
  "accounting.creditNotePosted.entryDescription": "Nota di credito {{creditNoteId}} per la fattura {{invoiceId}}",
62971
- "accounting.standaloneCreditNotePosted.entryDescription": "Nota di credito {{creditNoteId}}",
63146
+ "accounting.invoicePosted.entryDescription": "Registrazione contabile per la fattura {{invoiceId}}",
63147
+ "accounting.revrec.closedPeriodFallbackNote": " (registrato nel prossimo periodo aperto \u2014 periodo contabile di destinazione chiuso; data originale {{originalDate}})",
62972
63148
  "accounting.revrec.creditLineDescription": "Riconoscere i ricavi \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62973
63149
  "accounting.revrec.debitLineDescription": "Diminuzione dei ricavi differiti \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62974
63150
  "accounting.revrec.discountCreditLineDescription": "Riconoscere il contra-ricavo (sconto) \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62975
- "accounting.revrec.closedPeriodFallbackNote": " (registrato nel prossimo periodo aperto \u2014 periodo contabile di destinazione chiuso; data originale {{originalDate}})",
62976
63151
  "accounting.revrec.discountDebitLineDescription": "Diminuzione dello sconto differito \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62977
63152
  "accounting.revrec.entryDescription": "Riconoscimento dei ricavi per il programma {{scheduleId}}, periodo {{periodStart}} - {{periodEnd}}",
63153
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota di credito {{creditNoteId}}",
63154
+ "accounting.transactionRefunded.entryDescription": "Rimborso per la fattura {{invoiceId}}",
63155
+ "accounting.transactionSettled.entryDescription": "Regolamento pagamento per la fattura {{invoiceId}}",
62978
63156
  "creditNotes.refundChargeName": "Rimborso per fattura",
62979
63157
  "credits.bundleOf": "{{productName}} - Pacchetto di {{creditCount}} crediti",
62980
63158
  "credits.unitsOf": "{{productName}} - {{creditCount}} crediti",
@@ -62988,9 +63166,9 @@ var it = {
62988
63166
  "invoices.prorata.paymentForItemFullPeriod": "Pagamento per",
62989
63167
  "invoices.prorata.refundForItem": "Rimborso proporzionale per",
62990
63168
  "invoices.prorata.refundForItemFullPeriod": "Rimborso per",
62991
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo scaduto",
62992
63169
  "subscriptions.closingChargeName": "Costo di chiusura per abbonamento",
62993
63170
  "subscriptions.correction": "Correzione periodo precedente",
63171
+ "subscriptions.reinstatementRechargeName": "Ricarica di reintegrazione del periodo annullato",
62994
63172
  "subscriptions.updates.addCoupon": "Aggiungi coupon {{couponName}}",
62995
63173
  "subscriptions.updates.addProduct": "Aggiungi {{productName}}",
62996
63174
  "subscriptions.updates.removeCoupon": "Rimuovi coupon {{couponName}}",
@@ -63005,14 +63183,29 @@ var it = {
63005
63183
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Importo di {{amount}} (con un minimo impegnato di {{committedCount}}) non fatturato per il periodo proporzionato",
63006
63184
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Questa voce \xE8 stata fatturata per il periodo proporzionato",
63007
63185
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Importo di {{amount}} non fatturato per il periodo proporzionato",
63008
- "subscriptions.updates.updatePrices": "Aggiorna prezzi per {{productName}}"
63186
+ "subscriptions.updates.updatePrices": "Aggiorna prezzi per {{productName}}",
63187
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo scaduto"
63009
63188
  };
63010
63189
 
63011
63190
  // ../hyperline-i18n/build/locales/lt.js
63012
63191
  var lt = {
63192
+ "accounting.creditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}} s\u0105skaitai fakt\u016Brai {{invoiceId}}",
63193
+ "accounting.invoicePosted.entryDescription": "I\u0161ra\u0161ytos s\u0105skaitos fakt\u016Bros {{invoiceId}} registravimo \u012Fra\u0161as",
63194
+ "accounting.revrec.closedPeriodFallbackNote": " (u\u017Eregistruota kitame atvirame laikotarpyje, nes tikslinis apskaitos laikotarpis u\u017Edarytas; pradin\u0117 data {{originalDate}})",
63195
+ "accounting.revrec.creditLineDescription": "Pajam\u0173 pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63196
+ "accounting.revrec.debitLineDescription": "Atid\u0117t\u0173j\u0173 pajam\u0173 suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63197
+ "accounting.revrec.discountCreditLineDescription": "Pajamas ma\u017Einan\u010Dios sumos (nuolaidos) pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63198
+ "accounting.revrec.discountDebitLineDescription": "Atid\u0117tosios nuolaidos suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63199
+ "accounting.revrec.entryDescription": "Pajam\u0173 pripa\u017Einimas pagal grafik\u0105 {{scheduleId}}, laikotarpis {{periodStart}}\u2013{{periodEnd}}",
63200
+ "accounting.standaloneCreditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}}",
63201
+ "accounting.transactionRefunded.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} gr\u0105\u017Einimas",
63202
+ "accounting.transactionSettled.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} mok\u0117jimo sudengimas",
63013
63203
  "creditNotes.refundChargeName": "S\u0105skaitos fakt\u016Bros gr\u0105\u017Einimas",
63014
63204
  "credits.bundleOf": "{{productName}} \u2013 {{creditCount}} kredit\u0173 paketas",
63015
63205
  "credits.unitsOf": "{{productName}} \u2013 {{creditCount}} kredit\u0173",
63206
+ "einvoicing.paymentFromWallet": "Mok\u0117jimas i\u0161 pinigin\u0117s",
63207
+ "einvoicing.paymentProcessed": "Mok\u0117jimas apdorotas",
63208
+ "einvoicing.paymentReceived": "Mok\u0117jimas gautas",
63016
63209
  "invoices.outstandingProduct.description": "Neapmok\u0117ta {{date}} i\u0161ra\u0161ytos s\u0105skaitos fakt\u016Bros{{invoiceNumber}} suma",
63017
63210
  "invoices.outstandingProduct.descriptionPeriod": "Neapmok\u0117ta s\u0105skaitos fakt\u016Bros{{invoiceNumber}} suma u\u017E laikotarp\u012F nuo {{periodStart}} iki {{periodEnd}}",
63018
63211
  "invoices.outstandingProduct.name": "Neapmok\u0117tas likutis",
@@ -63020,53 +63213,40 @@ var lt = {
63020
63213
  "invoices.prorata.paymentForItemFullPeriod": "Mok\u0117jimas u\u017E",
63021
63214
  "invoices.prorata.refundForItem": "Proporcingas gr\u0105\u017Einimas u\u017E",
63022
63215
  "invoices.prorata.refundForItemFullPeriod": "Gr\u0105\u017Einimas u\u017E",
63023
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 nebegaliojantis likutis",
63024
63216
  "subscriptions.closingChargeName": "Prenumeratos u\u017Ebaigimo mokestis",
63025
63217
  "subscriptions.correction": "Ankstesnio laikotarpio koregavimas",
63218
+ "subscriptions.reinstatementRechargeName": "Atnaujinimo \u012Fmokos u\u017E nutraukt\u0105 laikotarp\u012F",
63026
63219
  "subscriptions.updates.addCoupon": "Prid\u0117ti kupon\u0105 {{couponName}}",
63027
63220
  "subscriptions.updates.addProduct": "Prid\u0117ti {{productName}}",
63028
63221
  "subscriptions.updates.removeCoupon": "Pa\u0161alinti kupon\u0105 {{couponName}}",
63029
63222
  "subscriptions.updates.removeProduct": "Pa\u0161alinti {{productName}}",
63030
63223
  "subscriptions.updates.unit": "vnt.",
63031
- "subscriptions.updates.updatePrices": "Atnaujinti {{productName}} kainas",
63032
63224
  "subscriptions.updates.updateCount": "Atnaujinti {{productName}} kiek\u012F ({{previousCount}} \u2192 {{newCount}} {{unit}})",
63033
- "subscriptions.updates.updateCount.description.prorata.committed.invoiced": "Pritaikytas minimalus \u012Fsipareigotas {{committedCount}} kiekis.",
63034
- "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma (minimalus \u012Fsipareigotas kiekis \u2013 {{committedCount}})",
63035
- "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "U\u017E \u0161i\u0105 eilut\u0119 proporcingam laikotarpiui s\u0105skaita fakt\u016Bra i\u0161ra\u0161yta",
63036
- "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma",
63037
63225
  "subscriptions.updates.updateCount.description.full.committed.invoiced": "Visam laikotarpiui pritaikytas minimalus \u012Fsipareigotas {{committedCount}} kiekis.",
63038
63226
  "subscriptions.updates.updateCount.description.full.committed.not_invoiced": "Visam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma (minimalus \u012Fsipareigotas kiekis \u2013 {{committedCount}})",
63039
63227
  "subscriptions.updates.updateCount.description.full.not_committed.invoiced": "U\u017E \u0161i\u0105 eilut\u0119 visam laikotarpiui s\u0105skaita fakt\u016Bra i\u0161ra\u0161yta",
63040
63228
  "subscriptions.updates.updateCount.description.full.not_committed.not_invoiced": "Visam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma",
63041
- "accounting.invoicePosted.entryDescription": "I\u0161ra\u0161ytos s\u0105skaitos fakt\u016Bros {{invoiceId}} registravimo \u012Fra\u0161as",
63042
- "accounting.transactionSettled.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} mok\u0117jimo sudengimas",
63043
- "accounting.transactionRefunded.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} gr\u0105\u017Einimas",
63044
- "accounting.creditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}} s\u0105skaitai fakt\u016Brai {{invoiceId}}",
63045
- "accounting.standaloneCreditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}}",
63046
- "accounting.revrec.entryDescription": "Pajam\u0173 pripa\u017Einimas pagal grafik\u0105 {{scheduleId}}, laikotarpis {{periodStart}}\u2013{{periodEnd}}",
63047
- "accounting.revrec.debitLineDescription": "Atid\u0117t\u0173j\u0173 pajam\u0173 suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63048
- "accounting.revrec.creditLineDescription": "Pajam\u0173 pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63049
- "accounting.revrec.discountDebitLineDescription": "Atid\u0117tosios nuolaidos suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63050
- "accounting.revrec.discountCreditLineDescription": "Pajamas ma\u017Einan\u010Dios sumos (nuolaidos) pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
63051
- "accounting.revrec.closedPeriodFallbackNote": " (u\u017Eregistruota kitame atvirame laikotarpyje, nes tikslinis apskaitos laikotarpis u\u017Edarytas; pradin\u0117 data {{originalDate}})",
63052
- "einvoicing.paymentProcessed": "Mok\u0117jimas apdorotas",
63053
- "einvoicing.paymentReceived": "Mok\u0117jimas gautas",
63054
- "einvoicing.paymentFromWallet": "Mok\u0117jimas i\u0161 pinigin\u0117s"
63229
+ "subscriptions.updates.updateCount.description.prorata.committed.invoiced": "Pritaikytas minimalus \u012Fsipareigotas {{committedCount}} kiekis.",
63230
+ "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma (minimalus \u012Fsipareigotas kiekis \u2013 {{committedCount}})",
63231
+ "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "U\u017E \u0161i\u0105 eilut\u0119 proporcingam laikotarpiui s\u0105skaita fakt\u016Bra i\u0161ra\u0161yta",
63232
+ "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma",
63233
+ "subscriptions.updates.updatePrices": "Atnaujinti {{productName}} kainas",
63234
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 nebegaliojantis likutis"
63055
63235
  };
63056
63236
 
63057
63237
  // ../hyperline-i18n/build/locales/nl.js
63058
63238
  var nl = {
63059
- "accounting.invoicePosted.entryDescription": "Boekingsregel voor factuur {{invoiceId}}",
63060
- "accounting.transactionSettled.entryDescription": "Betalingsafwikkeling voor factuur {{invoiceId}}",
63061
- "accounting.transactionRefunded.entryDescription": "Terugbetaling voor factuur {{invoiceId}}",
63062
63239
  "accounting.creditNotePosted.entryDescription": "Creditnota {{creditNoteId}} voor factuur {{invoiceId}}",
63063
- "accounting.standaloneCreditNotePosted.entryDescription": "Creditnota {{creditNoteId}}",
63240
+ "accounting.invoicePosted.entryDescription": "Boekingsregel voor factuur {{invoiceId}}",
63241
+ "accounting.revrec.closedPeriodFallbackNote": " (geboekt in de volgende open periode \u2014 doelboekingsperiode gesloten; oorspronkelijke datum {{originalDate}})",
63064
63242
  "accounting.revrec.creditLineDescription": "Omzet erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
63065
63243
  "accounting.revrec.debitLineDescription": "Uitgestelde omzet verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
63066
63244
  "accounting.revrec.discountCreditLineDescription": "Omzetvermindering (korting) erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
63067
- "accounting.revrec.closedPeriodFallbackNote": " (geboekt in de volgende open periode \u2014 doelboekingsperiode gesloten; oorspronkelijke datum {{originalDate}})",
63068
63245
  "accounting.revrec.discountDebitLineDescription": "Uitgestelde korting verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
63069
63246
  "accounting.revrec.entryDescription": "Omzeterkenning voor schema {{scheduleId}}, periode {{periodStart}} - {{periodEnd}}",
63247
+ "accounting.standaloneCreditNotePosted.entryDescription": "Creditnota {{creditNoteId}}",
63248
+ "accounting.transactionRefunded.entryDescription": "Terugbetaling voor factuur {{invoiceId}}",
63249
+ "accounting.transactionSettled.entryDescription": "Betalingsafwikkeling voor factuur {{invoiceId}}",
63070
63250
  "creditNotes.refundChargeName": "Terugbetaling voor factuur",
63071
63251
  "credits.bundleOf": "{{productName}} - Bundel van {{creditCount}} credits",
63072
63252
  "credits.unitsOf": "{{productName}} - {{creditCount}} credits",
@@ -63080,9 +63260,9 @@ var nl = {
63080
63260
  "invoices.prorata.paymentForItemFullPeriod": "Betaling voor",
63081
63261
  "invoices.prorata.refundForItem": "Gedeeltelijke terugbetaling voor",
63082
63262
  "invoices.prorata.refundForItemFullPeriod": "Terugbetaling voor",
63083
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 verlopen saldo",
63084
63263
  "subscriptions.closingChargeName": "Afsluitkosten voor abonnement",
63085
63264
  "subscriptions.correction": "Aanpassing vorige periode",
63265
+ "subscriptions.reinstatementRechargeName": "Herstelkosten van geannuleerde periode",
63086
63266
  "subscriptions.updates.addCoupon": "Coupon toevoegen {{couponName}}",
63087
63267
  "subscriptions.updates.addProduct": "{{productName}} toevoegen",
63088
63268
  "subscriptions.updates.removeCoupon": "Coupon verwijderen {{couponName}}",
@@ -63097,22 +63277,23 @@ var nl = {
63097
63277
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Bedrag van {{amount}} (met een minimaal toegezegd aantal van {{committedCount}}) niet gefactureerd voor de geproportioneerde periode",
63098
63278
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Deze regel is gefactureerd voor de geproportioneerde periode",
63099
63279
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Bedrag van {{amount}} niet gefactureerd voor de geproportioneerde periode",
63100
- "subscriptions.updates.updatePrices": "Prijzen bijwerken voor {{productName}}"
63280
+ "subscriptions.updates.updatePrices": "Prijzen bijwerken voor {{productName}}",
63281
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 verlopen saldo"
63101
63282
  };
63102
63283
 
63103
63284
  // ../hyperline-i18n/build/locales/pl.js
63104
63285
  var pl = {
63105
- "accounting.invoicePosted.entryDescription": "Zapis ksi\u0119gowy dla faktury {{invoiceId}}",
63106
- "accounting.transactionSettled.entryDescription": "Rozliczenie p\u0142atno\u015Bci dla faktury {{invoiceId}}",
63107
- "accounting.transactionRefunded.entryDescription": "Zwrot za faktur\u0119 {{invoiceId}}",
63108
63286
  "accounting.creditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}} dla faktury {{invoiceId}}",
63109
- "accounting.standaloneCreditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}}",
63287
+ "accounting.invoicePosted.entryDescription": "Zapis ksi\u0119gowy dla faktury {{invoiceId}}",
63288
+ "accounting.revrec.closedPeriodFallbackNote": " (zaksi\u0119gowano w nast\u0119pnym otwartym okresie \u2014 docelowy okres ksi\u0119gowy zamkni\u0119ty; pierwotna data {{originalDate}})",
63110
63289
  "accounting.revrec.creditLineDescription": "Rozpoznanie przychodu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
63111
63290
  "accounting.revrec.debitLineDescription": "Zmniejszenie przychod\xF3w przysz\u0142ych okres\xF3w \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
63112
63291
  "accounting.revrec.discountCreditLineDescription": "Rozpoznanie kontra-przychodu (rabat) \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
63113
- "accounting.revrec.closedPeriodFallbackNote": " (zaksi\u0119gowano w nast\u0119pnym otwartym okresie \u2014 docelowy okres ksi\u0119gowy zamkni\u0119ty; pierwotna data {{originalDate}})",
63114
63292
  "accounting.revrec.discountDebitLineDescription": "Zmniejszenie odroczonego rabatu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
63115
63293
  "accounting.revrec.entryDescription": "Rozpoznanie przychodu dla harmonogramu {{scheduleId}}, okres {{periodStart}} - {{periodEnd}}",
63294
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}}",
63295
+ "accounting.transactionRefunded.entryDescription": "Zwrot za faktur\u0119 {{invoiceId}}",
63296
+ "accounting.transactionSettled.entryDescription": "Rozliczenie p\u0142atno\u015Bci dla faktury {{invoiceId}}",
63116
63297
  "creditNotes.refundChargeName": "Zwrot za faktur\u0119",
63117
63298
  "credits.bundleOf": "{{productName}} - Pakiet {{creditCount}} kredyt\xF3w",
63118
63299
  "credits.unitsOf": "{{productName}} - {{creditCount}} kredyt\xF3w",
@@ -63126,9 +63307,9 @@ var pl = {
63126
63307
  "invoices.prorata.paymentForItemFullPeriod": "P\u0142atno\u015B\u0107 za",
63127
63308
  "invoices.prorata.refundForItem": "Zwrot proporcjonalny za",
63128
63309
  "invoices.prorata.refundForItemFullPeriod": "Zwrot za",
63129
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 wygas\u0142e saldo",
63130
63310
  "subscriptions.closingChargeName": "Op\u0142ata za zamkni\u0119cie subskrypcji",
63131
63311
  "subscriptions.correction": "Korekta poprzedniego okresu",
63312
+ "subscriptions.reinstatementRechargeName": "Op\u0142ata za przywr\xF3cenie anulowanego okresu",
63132
63313
  "subscriptions.updates.addCoupon": "Dodaj kupon {{couponName}}",
63133
63314
  "subscriptions.updates.addProduct": "Dodaj {{productName}}",
63134
63315
  "subscriptions.updates.removeCoupon": "Usu\u0144 kupon {{couponName}}",
@@ -63143,22 +63324,23 @@ var pl = {
63143
63324
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Kwota {{amount}} (z minimaln\u0105 zobowi\u0105zan\u0105 ilo\u015Bci\u0105 {{committedCount}}) niefakturowana za okres proporcjonalny",
63144
63325
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Ta pozycja zosta\u0142a zafakturowana za okres proporcjonalny",
63145
63326
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Kwota {{amount}} niefakturowana za okres proporcjonalny",
63146
- "subscriptions.updates.updatePrices": "Aktualizuj ceny dla {{productName}}"
63327
+ "subscriptions.updates.updatePrices": "Aktualizuj ceny dla {{productName}}",
63328
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 wygas\u0142e saldo"
63147
63329
  };
63148
63330
 
63149
63331
  // ../hyperline-i18n/build/locales/pt.js
63150
63332
  var pt = {
63151
- "accounting.invoicePosted.entryDescription": "Lan\xE7amento cont\xE1bil para a fatura {{invoiceId}}",
63152
- "accounting.transactionSettled.entryDescription": "Liquida\xE7\xE3o de pagamento para a fatura {{invoiceId}}",
63153
- "accounting.transactionRefunded.entryDescription": "Reembolso da fatura {{invoiceId}}",
63154
63333
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para a fatura {{invoiceId}}",
63155
- "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
63334
+ "accounting.invoicePosted.entryDescription": "Lan\xE7amento cont\xE1bil para a fatura {{invoiceId}}",
63335
+ "accounting.revrec.closedPeriodFallbackNote": " (lan\xE7ado no pr\xF3ximo per\xEDodo aberto \u2014 per\xEDodo cont\xE1bil de destino fechado; data original {{originalDate}})",
63156
63336
  "accounting.revrec.creditLineDescription": "Reconhecer receita \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
63157
63337
  "accounting.revrec.debitLineDescription": "Diminui\xE7\xE3o da receita diferida \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
63158
63338
  "accounting.revrec.discountCreditLineDescription": "Reconhecer contra-receita (desconto) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
63159
- "accounting.revrec.closedPeriodFallbackNote": " (lan\xE7ado no pr\xF3ximo per\xEDodo aberto \u2014 per\xEDodo cont\xE1bil de destino fechado; data original {{originalDate}})",
63160
63339
  "accounting.revrec.discountDebitLineDescription": "Diminui\xE7\xE3o do desconto diferido \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
63161
63340
  "accounting.revrec.entryDescription": "Reconhecimento de receita para o cronograma {{scheduleId}}, per\xEDodo {{periodStart}} - {{periodEnd}}",
63341
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
63342
+ "accounting.transactionRefunded.entryDescription": "Reembolso da fatura {{invoiceId}}",
63343
+ "accounting.transactionSettled.entryDescription": "Liquida\xE7\xE3o de pagamento para a fatura {{invoiceId}}",
63162
63344
  "creditNotes.refundChargeName": "Reembolso pela fatura",
63163
63345
  "credits.bundleOf": "{{productName}} - Pacote de {{creditCount}} cr\xE9ditos",
63164
63346
  "credits.unitsOf": "{{productName}} - {{creditCount}} cr\xE9ditos",
@@ -63172,9 +63354,9 @@ var pt = {
63172
63354
  "invoices.prorata.paymentForItemFullPeriod": "Pagamento por",
63173
63355
  "invoices.prorata.refundForItem": "Reembolso proporcional por",
63174
63356
  "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
63175
- "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo expirado",
63176
63357
  "subscriptions.closingChargeName": "Taxa de encerramento da assinatura",
63177
63358
  "subscriptions.correction": "Ajuste do per\xEDodo anterior",
63359
+ "subscriptions.reinstatementRechargeName": "Recarga de reintegra\xE7\xE3o do per\xEDodo cancelado",
63178
63360
  "subscriptions.updates.addCoupon": "Adicionar cupom {{couponName}}",
63179
63361
  "subscriptions.updates.addProduct": "Adicionar {{productName}}",
63180
63362
  "subscriptions.updates.removeCoupon": "Remover cupom {{couponName}}",
@@ -63189,7 +63371,8 @@ var pt = {
63189
63371
  "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Valor de {{amount}} (com um m\xEDnimo comprometido de {{committedCount}}) n\xE3o faturado para o per\xEDodo proporcional",
63190
63372
  "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "Esta linha foi faturada para o per\xEDodo proporcional",
63191
63373
  "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Valor de {{amount}} n\xE3o faturado para o per\xEDodo proporcional",
63192
- "subscriptions.updates.updatePrices": "Atualizar pre\xE7os para {{productName}}"
63374
+ "subscriptions.updates.updatePrices": "Atualizar pre\xE7os para {{productName}}",
63375
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo expirado"
63193
63376
  };
63194
63377
 
63195
63378
  // ../hyperline-i18n/build/language.js
@@ -65968,6 +66151,150 @@ var isAxiosError = axios.isAxiosError;
65968
66151
  // ../hyperline-lib/build/httpClient/httpClient.js
65969
66152
  import axios2 from "axios";
65970
66153
  import axiosRetry, { isNetworkOrIdempotentRequestError, retryAfter } from "axios-retry";
66154
+
66155
+ // ../hyperline-lib/build/httpClient/logRedaction.js
66156
+ var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
66157
+ "accesstoken",
66158
+ "apikey",
66159
+ "apitoken",
66160
+ "assertion",
66161
+ "authtoken",
66162
+ "clientassertion",
66163
+ "codeverifier",
66164
+ "credentials",
66165
+ "idtoken",
66166
+ "privatekey",
66167
+ "refreshtoken",
66168
+ "sessiontoken",
66169
+ "token"
66170
+ ]);
66171
+ var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password)$/;
66172
+ var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|password|assertion|verifier|credentials/i;
66173
+ var REDACTED_VALUE = "<redacted>";
66174
+ var MAX_REDACTION_DEPTH = 10;
66175
+ var MAX_PARSED_STRING_LENGTH = 16384;
66176
+ var MAX_VISITED_NODES = 1e3;
66177
+ var MAX_CONTAINER_ENTRIES = MAX_VISITED_NODES;
66178
+ function redactLogBody({ body }) {
66179
+ return redactValue({
66180
+ value: body,
66181
+ depth: MAX_REDACTION_DEPTH,
66182
+ budget: { remainingNodes: MAX_VISITED_NODES }
66183
+ });
66184
+ }
66185
+ function redactLogUrl({ url: url2 }) {
66186
+ const queryIndex = url2.indexOf("?");
66187
+ if (queryIndex === -1 || url2.length > MAX_PARSED_STRING_LENGTH) {
66188
+ return url2;
66189
+ }
66190
+ const redactedQuery = redactFormEncoded({ text: url2.slice(queryIndex + 1) });
66191
+ return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
66192
+ }
66193
+ function redactValue({ value, depth, budget }) {
66194
+ if (depth <= 0 || budget.remainingNodes <= 0) {
66195
+ return value;
66196
+ }
66197
+ budget.remainingNodes -= 1;
66198
+ if (typeof value === "string") {
66199
+ return redactString({ text: value, budget });
66200
+ }
66201
+ if (value instanceof URLSearchParams) {
66202
+ return redactFormEncoded({ text: value.toString() }) ?? value;
66203
+ }
66204
+ if (Array.isArray(value)) {
66205
+ return redactArray({ items: value, depth, budget });
66206
+ }
66207
+ if (isPlainObject2(value)) {
66208
+ return redactObject({ record: value, depth, budget });
66209
+ }
66210
+ return value;
66211
+ }
66212
+ function redactArray({ items, depth, budget }) {
66213
+ if (items.length > MAX_CONTAINER_ENTRIES) {
66214
+ return items;
66215
+ }
66216
+ let redactedItems;
66217
+ for (const [index, item] of items.entries()) {
66218
+ if (budget.remainingNodes <= 0) {
66219
+ break;
66220
+ }
66221
+ const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
66222
+ if (redactedItem !== item) {
66223
+ redactedItems ??= [...items];
66224
+ redactedItems[index] = redactedItem;
66225
+ }
66226
+ }
66227
+ return redactedItems ?? items;
66228
+ }
66229
+ function redactObject({ record: record2, depth, budget }) {
66230
+ const redactedEntries = /* @__PURE__ */ new Map();
66231
+ let entryCount = 0;
66232
+ for (const key in record2) {
66233
+ if (!Object.hasOwn(record2, key)) {
66234
+ continue;
66235
+ }
66236
+ entryCount += 1;
66237
+ if (entryCount > MAX_CONTAINER_ENTRIES) {
66238
+ return record2;
66239
+ }
66240
+ if (budget.remainingNodes <= 0) {
66241
+ break;
66242
+ }
66243
+ const nestedValue = record2[key];
66244
+ const redactedNestedValue = isRedactedKey({ key }) && nestedValue != null ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
66245
+ if (redactedNestedValue !== nestedValue) {
66246
+ redactedEntries.set(key, redactedNestedValue);
66247
+ }
66248
+ }
66249
+ return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
66250
+ }
66251
+ function redactString({ text, budget }) {
66252
+ if (text.length > MAX_PARSED_STRING_LENGTH) {
66253
+ return text;
66254
+ }
66255
+ const trimmedText = text.trim();
66256
+ if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
66257
+ try {
66258
+ const parsedValue = JSON.parse(trimmedText);
66259
+ const redactedValue = redactValue({
66260
+ value: parsedValue,
66261
+ depth: MAX_REDACTION_DEPTH,
66262
+ budget
66263
+ });
66264
+ return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
66265
+ } catch {
66266
+ return text;
66267
+ }
66268
+ }
66269
+ return redactFormEncoded({ text }) ?? text;
66270
+ }
66271
+ function redactFormEncoded({ text }) {
66272
+ if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
66273
+ return void 0;
66274
+ }
66275
+ const params = new URLSearchParams(text);
66276
+ let hasRedactedParam = false;
66277
+ for (const key of new Set(params.keys())) {
66278
+ if (isRedactedKey({ key })) {
66279
+ params.set(key, REDACTED_VALUE);
66280
+ hasRedactedParam = true;
66281
+ }
66282
+ }
66283
+ return hasRedactedParam ? params.toString() : void 0;
66284
+ }
66285
+ function isRedactedKey({ key }) {
66286
+ const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
66287
+ return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
66288
+ }
66289
+ function isPlainObject2(value) {
66290
+ if (typeof value !== "object" || value === null) {
66291
+ return false;
66292
+ }
66293
+ const prototype = Object.getPrototypeOf(value);
66294
+ return prototype === Object.prototype || prototype === null;
66295
+ }
66296
+
66297
+ // ../hyperline-lib/build/httpClient/httpClient.js
65971
66298
  import { AxiosError } from "axios";
65972
66299
  var recommendedRetryConfig = {
65973
66300
  retries: 3,
@@ -66035,13 +66362,14 @@ function isTooManyRequestsError(error48) {
66035
66362
  return error48.response?.status === 429;
66036
66363
  }
66037
66364
  var toLogRequest = (config4) => {
66365
+ const url2 = redactLogUrl({ url: config4.url ?? "" });
66038
66366
  return {
66039
66367
  method: config4.method ?? "",
66040
- url: config4.url ?? "",
66041
- path: config4.url ?? "",
66368
+ url: url2,
66369
+ path: url2,
66042
66370
  hostname: config4.baseURL ?? "",
66043
- originalUrl: `${config4.baseURL ?? ""}${config4.url}`,
66044
- body: config4.data,
66371
+ originalUrl: `${config4.baseURL ?? ""}${url2}`,
66372
+ body: redactLogBody({ body: config4.data }),
66045
66373
  headers: {}
66046
66374
  };
66047
66375
  };