@hyperline/cli 0.1.0-build.1.f3906be → 0.1.0-build.1.f3a8945
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/hyperline-main.js +876 -567
- package/package.json +1 -1
|
@@ -33833,7 +33833,7 @@ var require_shared = __commonJS({
|
|
|
33833
33833
|
getNameForCurrency: () => getNameForCurrency,
|
|
33834
33834
|
getNaturalNumber: () => getNaturalNumber,
|
|
33835
33835
|
getSymbolForCurrency: () => getSymbolForCurrency,
|
|
33836
|
-
getTimezoneByName: () =>
|
|
33836
|
+
getTimezoneByName: () => getTimezoneByName2,
|
|
33837
33837
|
getTimezoneOffsetName: () => getTimezoneOffsetName,
|
|
33838
33838
|
getTimezones: () => getTimezones2,
|
|
33839
33839
|
getValidTimezonesNames: () => getValidTimezonesNames,
|
|
@@ -33850,7 +33850,7 @@ var require_shared = __commonJS({
|
|
|
33850
33850
|
subtract: () => subtract,
|
|
33851
33851
|
sum: () => sum2,
|
|
33852
33852
|
toLocalTime: () => toLocalTime3,
|
|
33853
|
-
toUtc: () =>
|
|
33853
|
+
toUtc: () => toUtc3,
|
|
33854
33854
|
useDebounce: () => useDebounce
|
|
33855
33855
|
});
|
|
33856
33856
|
module.exports = __toCommonJS(shared_exports);
|
|
@@ -34985,10 +34985,10 @@ var require_shared = __commonJS({
|
|
|
34985
34985
|
ZodId: () => ZodId,
|
|
34986
34986
|
ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
|
|
34987
34987
|
});
|
|
34988
|
-
var
|
|
34988
|
+
var import_zod22 = require_lib();
|
|
34989
34989
|
var countryIds2 = ["all", ...countries.map(({ id }) => id)];
|
|
34990
|
-
var ZodId =
|
|
34991
|
-
var ZodTranslationsSchemaFn = (schema) =>
|
|
34990
|
+
var ZodId = import_zod22.z.enum(countryIds2);
|
|
34991
|
+
var ZodTranslationsSchemaFn = (schema) => import_zod22.z.record(import_zod22.z.string(), schema.optional());
|
|
34992
34992
|
var UsStates = [
|
|
34993
34993
|
{ id: "AA", name: "Armed Forces Americas" },
|
|
34994
34994
|
{ id: "AE", name: "Armed Forces Europe" },
|
|
@@ -36287,14 +36287,14 @@ var require_shared = __commonJS({
|
|
|
36287
36287
|
ZodNumberCurrencyPositiveValue: () => ZodNumberCurrencyPositiveValue,
|
|
36288
36288
|
ZodNumberCurrencyPositiveValueExcludingZero: () => ZodNumberCurrencyPositiveValueExcludingZero
|
|
36289
36289
|
});
|
|
36290
|
-
var
|
|
36291
|
-
var ZodCurrencyId =
|
|
36290
|
+
var import_zod23 = require_lib();
|
|
36291
|
+
var ZodCurrencyId = import_zod23.z.enum(
|
|
36292
36292
|
all_default.map(({ id }) => id)
|
|
36293
36293
|
);
|
|
36294
|
-
var ZodNumberCurrency =
|
|
36295
|
-
var ZodNumberCurrencyPositiveValue =
|
|
36296
|
-
var ZodNumberCurrencyPositiveValueExcludingZero =
|
|
36297
|
-
var ZodCurrencyMap =
|
|
36294
|
+
var ZodNumberCurrency = import_zod23.z.string().or(import_zod23.z.number().transform((number4) => number4)).transform((number4) => number4);
|
|
36295
|
+
var ZodNumberCurrencyPositiveValue = import_zod23.z.number().min(0).transform((number4) => number4).transform((number4) => number4);
|
|
36296
|
+
var ZodNumberCurrencyPositiveValueExcludingZero = import_zod23.z.number().gt(0).transform((number4) => number4).transform((number4) => number4);
|
|
36297
|
+
var ZodCurrencyMap = import_zod23.z.record(ZodNumberCurrency).refine(
|
|
36298
36298
|
(data) => Object.keys(data).every((key) => ZodCurrencyId.safeParse(key).success),
|
|
36299
36299
|
{
|
|
36300
36300
|
message: "Invalid currency key.",
|
|
@@ -36557,14 +36557,14 @@ var require_shared = __commonJS({
|
|
|
36557
36557
|
function getTimezones2() {
|
|
36558
36558
|
return timezones;
|
|
36559
36559
|
}
|
|
36560
|
-
function
|
|
36560
|
+
function getTimezoneByName2(tz) {
|
|
36561
36561
|
var _a2;
|
|
36562
36562
|
if (tz === "UTC") {
|
|
36563
36563
|
return timezones.find(({ name }) => name === "Etc/UTC");
|
|
36564
36564
|
}
|
|
36565
36565
|
return (_a2 = timezones.find(({ name }) => name === tz)) != null ? _a2 : timezones.find(({ group }) => group.includes(tz));
|
|
36566
36566
|
}
|
|
36567
|
-
function
|
|
36567
|
+
function toUtc3(date5, timezone) {
|
|
36568
36568
|
return (0, import_date_fns_tz.fromZonedTime)(date5, timezone);
|
|
36569
36569
|
}
|
|
36570
36570
|
function toLocalTime3(date5, localTimezone) {
|
|
@@ -36575,7 +36575,7 @@ var require_shared = __commonJS({
|
|
|
36575
36575
|
);
|
|
36576
36576
|
var constructDateFromTimezoneToLocal = (date5, timezone) => {
|
|
36577
36577
|
if (!timezone) return date5;
|
|
36578
|
-
const timezoneObj =
|
|
36578
|
+
const timezoneObj = getTimezoneByName2(timezone);
|
|
36579
36579
|
if (!timezoneObj) return date5;
|
|
36580
36580
|
const dateAtTimezone = new Date(
|
|
36581
36581
|
date5.getFullYear(),
|
|
@@ -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
|
|
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/
|
|
39227
|
-
function
|
|
39228
|
-
const resource = parent.command("
|
|
39229
|
-
resource.command("list
|
|
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
|
|
39236
|
-
hyperline
|
|
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/
|
|
39251
|
+
path: "/v1/aggregators",
|
|
39252
39252
|
args,
|
|
39253
|
-
queryParamKeys: ["
|
|
39253
|
+
queryParamKeys: ["take", "skip"]
|
|
39254
39254
|
});
|
|
39255
39255
|
});
|
|
39256
|
-
resource.command("create
|
|
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
|
|
39268
|
-
hyperline
|
|
39269
|
-
hyperline
|
|
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.
|
|
39279
|
-
args.
|
|
39280
|
-
if (opts.
|
|
39281
|
-
args.
|
|
39282
|
-
if (opts.
|
|
39283
|
-
args.
|
|
39284
|
-
if (opts.
|
|
39285
|
-
args.
|
|
39286
|
-
if (opts.
|
|
39287
|
-
args.
|
|
39288
|
-
if (opts.
|
|
39289
|
-
args.
|
|
39290
|
-
if (opts.
|
|
39291
|
-
args.
|
|
39292
|
-
if (opts.
|
|
39293
|
-
args.
|
|
39294
|
-
if (opts.
|
|
39295
|
-
args.
|
|
39296
|
-
if (opts.
|
|
39297
|
-
args.
|
|
39298
|
-
if (opts.
|
|
39299
|
-
args.
|
|
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/
|
|
39299
|
+
path: "/v1/aggregators",
|
|
39303
39300
|
args,
|
|
39304
39301
|
queryParamKeys: []
|
|
39305
39302
|
});
|
|
39306
39303
|
});
|
|
39307
|
-
resource.command("get
|
|
39304
|
+
resource.command("get").description(`Retrieve a specific aggregator by ID.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
39308
39305
|
Examples:
|
|
39309
|
-
hyperline
|
|
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.
|
|
39317
|
-
args.
|
|
39313
|
+
if (opts.id !== void 0)
|
|
39314
|
+
args.id = opts.id;
|
|
39318
39315
|
await ctx.execute({
|
|
39319
39316
|
method: "GET",
|
|
39320
|
-
path: "/v1/
|
|
39317
|
+
path: "/v1/aggregators/{id}",
|
|
39321
39318
|
args,
|
|
39322
39319
|
queryParamKeys: []
|
|
39323
39320
|
});
|
|
39324
39321
|
});
|
|
39325
|
-
resource.command("
|
|
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
|
|
39333
|
-
hyperline
|
|
39334
|
-
hyperline
|
|
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.
|
|
39342
|
-
args.
|
|
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.
|
|
39346
|
-
args.
|
|
39347
|
-
if (opts.
|
|
39348
|
-
args.
|
|
39349
|
-
if (opts.
|
|
39350
|
-
args.
|
|
39351
|
-
if (opts.
|
|
39352
|
-
args.
|
|
39353
|
-
if (opts.
|
|
39354
|
-
args.
|
|
39355
|
-
if (opts.
|
|
39356
|
-
args.
|
|
39357
|
-
if (opts.
|
|
39358
|
-
args.
|
|
39359
|
-
if (opts.
|
|
39360
|
-
args.
|
|
39361
|
-
if (opts.
|
|
39362
|
-
args.
|
|
39363
|
-
if (opts.
|
|
39364
|
-
args.
|
|
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/
|
|
39367
|
+
path: "/v1/aggregators/{id}",
|
|
39368
39368
|
args,
|
|
39369
39369
|
queryParamKeys: []
|
|
39370
39370
|
});
|
|
39371
39371
|
});
|
|
39372
|
-
resource.command("delete
|
|
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
|
|
39375
|
-
hyperline
|
|
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.
|
|
39383
|
-
args.
|
|
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,100 +39390,399 @@ Examples:
|
|
|
39390
39390
|
}
|
|
39391
39391
|
await ctx.execute({
|
|
39392
39392
|
method: "DELETE",
|
|
39393
|
-
path: "/v1/
|
|
39393
|
+
path: "/v1/aggregators/{id}",
|
|
39394
39394
|
args,
|
|
39395
39395
|
queryParamKeys: []
|
|
39396
39396
|
});
|
|
39397
39397
|
});
|
|
39398
|
-
|
|
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
|
|
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/
|
|
39416
|
+
path: "/v1/aggregators/{id}/usage",
|
|
39410
39417
|
args,
|
|
39411
39418
|
queryParamKeys: []
|
|
39412
39419
|
});
|
|
39413
39420
|
});
|
|
39414
|
-
resource.command("
|
|
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
|
|
39417
|
-
hyperline
|
|
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.
|
|
39426
|
-
args.
|
|
39427
|
-
if (opts.
|
|
39428
|
-
args.
|
|
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: "
|
|
39431
|
-
path: "/v1/
|
|
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("
|
|
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
|
|
39439
|
-
hyperline
|
|
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 (
|
|
39447
|
-
|
|
39448
|
-
|
|
39449
|
-
|
|
39450
|
-
|
|
39451
|
-
|
|
39452
|
-
|
|
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);
|
|
39453
39475
|
await ctx.execute({
|
|
39454
|
-
method: "
|
|
39455
|
-
path: "/v1/
|
|
39476
|
+
method: "GET",
|
|
39477
|
+
path: "/v1/aggregators/{id}/usage/group-by-customer",
|
|
39456
39478
|
args,
|
|
39457
|
-
queryParamKeys: [
|
|
39479
|
+
queryParamKeys: [
|
|
39480
|
+
"start_date",
|
|
39481
|
+
"end_date",
|
|
39482
|
+
"aggregator_filter_id",
|
|
39483
|
+
"take",
|
|
39484
|
+
"skip"
|
|
39485
|
+
]
|
|
39458
39486
|
});
|
|
39459
39487
|
});
|
|
39460
|
-
resource.command("
|
|
39461
|
-
|
|
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", `
|
|
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", `
|
|
39465
39489
|
Examples:
|
|
39466
|
-
hyperline
|
|
39467
|
-
hyperline
|
|
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);
|
|
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);
|
|
39510
|
+
await ctx.execute({
|
|
39511
|
+
method: "GET",
|
|
39512
|
+
path: "/v1/aggregators/{id}/usage/events",
|
|
39513
|
+
args,
|
|
39514
|
+
queryParamKeys: [
|
|
39515
|
+
"start_date",
|
|
39516
|
+
"end_date",
|
|
39517
|
+
"aggregator_filter_id",
|
|
39518
|
+
"take",
|
|
39519
|
+
"skip"
|
|
39520
|
+
]
|
|
39521
|
+
});
|
|
39522
|
+
});
|
|
39523
|
+
}
|
|
39524
|
+
|
|
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", `
|
|
39533
|
+
Examples:
|
|
39534
|
+
hyperline ai-billing list-agent-plans
|
|
39535
|
+
hyperline ai-billing list-agent-plans --mode <mode> --take <take>`).action(async (opts) => {
|
|
39536
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39537
|
+
if (!ctx) {
|
|
39538
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39539
|
+
process.exit(1);
|
|
39540
|
+
}
|
|
39541
|
+
const args = {};
|
|
39542
|
+
if (opts.mode !== void 0)
|
|
39543
|
+
args.mode = opts.mode;
|
|
39544
|
+
if (opts.take !== void 0)
|
|
39545
|
+
args.take = Number(opts.take);
|
|
39546
|
+
if (opts.skip !== void 0)
|
|
39547
|
+
args.skip = Number(opts.skip);
|
|
39548
|
+
await ctx.execute({
|
|
39549
|
+
method: "GET",
|
|
39550
|
+
path: "/v1/ai-billing/plans",
|
|
39551
|
+
args,
|
|
39552
|
+
queryParamKeys: ["mode", "take", "skip"]
|
|
39553
|
+
});
|
|
39554
|
+
});
|
|
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.
|
|
39556
|
+
|
|
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", `
|
|
39565
|
+
Examples:
|
|
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) => {
|
|
39569
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39570
|
+
if (!ctx) {
|
|
39571
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39572
|
+
process.exit(1);
|
|
39573
|
+
}
|
|
39574
|
+
const args = {};
|
|
39575
|
+
if (opts.name !== void 0)
|
|
39576
|
+
args.name = opts.name;
|
|
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);
|
|
39599
|
+
await ctx.execute({
|
|
39600
|
+
method: "POST",
|
|
39601
|
+
path: "/v1/ai-billing/plans",
|
|
39602
|
+
args,
|
|
39603
|
+
queryParamKeys: []
|
|
39604
|
+
});
|
|
39605
|
+
});
|
|
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", `
|
|
39607
|
+
Examples:
|
|
39608
|
+
hyperline ai-billing get-agent-plan --plan-id <plan_id>`).action(async (opts) => {
|
|
39609
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39610
|
+
if (!ctx) {
|
|
39611
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39612
|
+
process.exit(1);
|
|
39613
|
+
}
|
|
39614
|
+
const args = {};
|
|
39615
|
+
if (opts.planId !== void 0)
|
|
39616
|
+
args.plan_id = opts.planId;
|
|
39617
|
+
await ctx.execute({
|
|
39618
|
+
method: "GET",
|
|
39619
|
+
path: "/v1/ai-billing/plans/{plan_id}",
|
|
39620
|
+
args,
|
|
39621
|
+
queryParamKeys: []
|
|
39622
|
+
});
|
|
39623
|
+
});
|
|
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", `
|
|
39630
|
+
Examples:
|
|
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) => {
|
|
39634
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39635
|
+
if (!ctx) {
|
|
39636
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39637
|
+
process.exit(1);
|
|
39638
|
+
}
|
|
39639
|
+
const args = {};
|
|
39640
|
+
if (opts.planId !== void 0)
|
|
39641
|
+
args.plan_id = opts.planId;
|
|
39642
|
+
if (opts.name !== void 0)
|
|
39643
|
+
args.name = opts.name;
|
|
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);
|
|
39664
|
+
await ctx.execute({
|
|
39665
|
+
method: "PUT",
|
|
39666
|
+
path: "/v1/ai-billing/plans/{plan_id}",
|
|
39667
|
+
args,
|
|
39668
|
+
queryParamKeys: []
|
|
39669
|
+
});
|
|
39670
|
+
});
|
|
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", `
|
|
39672
|
+
Examples:
|
|
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) => {
|
|
39675
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39676
|
+
if (!ctx) {
|
|
39677
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39678
|
+
process.exit(1);
|
|
39679
|
+
}
|
|
39680
|
+
const args = {};
|
|
39681
|
+
if (opts.planId !== void 0)
|
|
39682
|
+
args.plan_id = opts.planId;
|
|
39683
|
+
if (!opts.yes) {
|
|
39684
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
39685
|
+
if (!confirmed) {
|
|
39686
|
+
process.stdout.write("Aborted.\n");
|
|
39687
|
+
return;
|
|
39688
|
+
}
|
|
39689
|
+
}
|
|
39690
|
+
await ctx.execute({
|
|
39691
|
+
method: "DELETE",
|
|
39692
|
+
path: "/v1/ai-billing/plans/{plan_id}",
|
|
39693
|
+
args,
|
|
39694
|
+
queryParamKeys: []
|
|
39695
|
+
});
|
|
39696
|
+
});
|
|
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", `
|
|
39698
|
+
Examples:
|
|
39699
|
+
hyperline ai-billing get-agent-default-plan`).action(async (_opts) => {
|
|
39468
39700
|
const ctx = resource.parent?.opts()._ctx;
|
|
39469
39701
|
if (!ctx) {
|
|
39470
39702
|
process.stderr.write("Error: Not authenticated\n");
|
|
39471
39703
|
process.exit(1);
|
|
39472
39704
|
}
|
|
39473
39705
|
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;
|
|
39480
|
-
if (opts.take !== void 0)
|
|
39481
|
-
args.take = Number(opts.take);
|
|
39482
|
-
if (opts.skip !== void 0)
|
|
39483
|
-
args.skip = Number(opts.skip);
|
|
39484
39706
|
await ctx.execute({
|
|
39485
39707
|
method: "GET",
|
|
39486
|
-
path: "/v1/
|
|
39708
|
+
path: "/v1/ai-billing/default-plan",
|
|
39709
|
+
args,
|
|
39710
|
+
queryParamKeys: []
|
|
39711
|
+
});
|
|
39712
|
+
});
|
|
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", `
|
|
39714
|
+
Examples:
|
|
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) => {
|
|
39718
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39719
|
+
if (!ctx) {
|
|
39720
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39721
|
+
process.exit(1);
|
|
39722
|
+
}
|
|
39723
|
+
const args = {};
|
|
39724
|
+
if (opts.planId !== void 0)
|
|
39725
|
+
args.plan_id = opts.planId;
|
|
39726
|
+
if (opts.autoApply !== void 0)
|
|
39727
|
+
args.auto_apply = true;
|
|
39728
|
+
await ctx.execute({
|
|
39729
|
+
method: "PUT",
|
|
39730
|
+
path: "/v1/ai-billing/default-plan",
|
|
39731
|
+
args,
|
|
39732
|
+
queryParamKeys: []
|
|
39733
|
+
});
|
|
39734
|
+
});
|
|
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", `
|
|
39736
|
+
Examples:
|
|
39737
|
+
hyperline ai-billing clear-agent-default-plan
|
|
39738
|
+
hyperline ai-billing clear-agent-default-plan --output json`).action(async (opts) => {
|
|
39739
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39740
|
+
if (!ctx) {
|
|
39741
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39742
|
+
process.exit(1);
|
|
39743
|
+
}
|
|
39744
|
+
const args = {};
|
|
39745
|
+
if (!opts.yes) {
|
|
39746
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
39747
|
+
if (!confirmed) {
|
|
39748
|
+
process.stdout.write("Aborted.\n");
|
|
39749
|
+
return;
|
|
39750
|
+
}
|
|
39751
|
+
}
|
|
39752
|
+
await ctx.execute({
|
|
39753
|
+
method: "DELETE",
|
|
39754
|
+
path: "/v1/ai-billing/default-plan",
|
|
39755
|
+
args,
|
|
39756
|
+
queryParamKeys: []
|
|
39757
|
+
});
|
|
39758
|
+
});
|
|
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", `
|
|
39764
|
+
Examples:
|
|
39765
|
+
hyperline ai-billing list-agent-rate-cards
|
|
39766
|
+
hyperline ai-billing list-agent-rate-cards --denomination <denomination> --currency <currency>`).action(async (opts) => {
|
|
39767
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
39768
|
+
if (!ctx) {
|
|
39769
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
39770
|
+
process.exit(1);
|
|
39771
|
+
}
|
|
39772
|
+
const args = {};
|
|
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);
|
|
39783
|
+
await ctx.execute({
|
|
39784
|
+
method: "GET",
|
|
39785
|
+
path: "/v1/ai-billing/rate-cards",
|
|
39487
39786
|
args,
|
|
39488
39787
|
queryParamKeys: ["denomination", "currency", "search", "take", "skip"]
|
|
39489
39788
|
});
|
|
@@ -39494,9 +39793,9 @@ Examples:
|
|
|
39494
39793
|
- units: Weighted rolling-allowance units.
|
|
39495
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", `
|
|
39496
39795
|
Examples:
|
|
39497
|
-
hyperline
|
|
39498
|
-
hyperline
|
|
39499
|
-
hyperline
|
|
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) => {
|
|
39500
39799
|
const ctx = resource.parent?.opts()._ctx;
|
|
39501
39800
|
if (!ctx) {
|
|
39502
39801
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39515,14 +39814,14 @@ Examples:
|
|
|
39515
39814
|
args.rows = JSON.parse(opts.rows);
|
|
39516
39815
|
await ctx.execute({
|
|
39517
39816
|
method: "POST",
|
|
39518
|
-
path: "/v1/
|
|
39817
|
+
path: "/v1/ai-billing/rate-cards",
|
|
39519
39818
|
args,
|
|
39520
39819
|
queryParamKeys: []
|
|
39521
39820
|
});
|
|
39522
39821
|
});
|
|
39523
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", `
|
|
39524
39823
|
Examples:
|
|
39525
|
-
hyperline
|
|
39824
|
+
hyperline ai-billing get-agent-rate-card --rate-card-id <rate_card_id>`).action(async (opts) => {
|
|
39526
39825
|
const ctx = resource.parent?.opts()._ctx;
|
|
39527
39826
|
if (!ctx) {
|
|
39528
39827
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39533,16 +39832,16 @@ Examples:
|
|
|
39533
39832
|
args.rate_card_id = opts.rateCardId;
|
|
39534
39833
|
await ctx.execute({
|
|
39535
39834
|
method: "GET",
|
|
39536
|
-
path: "/v1/
|
|
39835
|
+
path: "/v1/ai-billing/rate-cards/{rate_card_id}",
|
|
39537
39836
|
args,
|
|
39538
39837
|
queryParamKeys: []
|
|
39539
39838
|
});
|
|
39540
39839
|
});
|
|
39541
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", `
|
|
39542
39841
|
Examples:
|
|
39543
|
-
hyperline
|
|
39544
|
-
hyperline
|
|
39545
|
-
hyperline
|
|
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) => {
|
|
39546
39845
|
const ctx = resource.parent?.opts()._ctx;
|
|
39547
39846
|
if (!ctx) {
|
|
39548
39847
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39559,15 +39858,15 @@ Examples:
|
|
|
39559
39858
|
args.rows = JSON.parse(opts.rows);
|
|
39560
39859
|
await ctx.execute({
|
|
39561
39860
|
method: "PUT",
|
|
39562
|
-
path: "/v1/
|
|
39861
|
+
path: "/v1/ai-billing/rate-cards/{rate_card_id}",
|
|
39563
39862
|
args,
|
|
39564
39863
|
queryParamKeys: []
|
|
39565
39864
|
});
|
|
39566
39865
|
});
|
|
39567
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", `
|
|
39568
39867
|
Examples:
|
|
39569
|
-
hyperline
|
|
39570
|
-
hyperline
|
|
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) => {
|
|
39571
39870
|
const ctx = resource.parent?.opts()._ctx;
|
|
39572
39871
|
if (!ctx) {
|
|
39573
39872
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39585,14 +39884,14 @@ Examples:
|
|
|
39585
39884
|
}
|
|
39586
39885
|
await ctx.execute({
|
|
39587
39886
|
method: "DELETE",
|
|
39588
|
-
path: "/v1/
|
|
39887
|
+
path: "/v1/ai-billing/rate-cards/{rate_card_id}",
|
|
39589
39888
|
args,
|
|
39590
39889
|
queryParamKeys: []
|
|
39591
39890
|
});
|
|
39592
39891
|
});
|
|
39593
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", `
|
|
39594
39893
|
Examples:
|
|
39595
|
-
hyperline
|
|
39894
|
+
hyperline ai-billing list-agent-credit-products`).action(async (_opts) => {
|
|
39596
39895
|
const ctx = resource.parent?.opts()._ctx;
|
|
39597
39896
|
if (!ctx) {
|
|
39598
39897
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39601,15 +39900,15 @@ Examples:
|
|
|
39601
39900
|
const args = {};
|
|
39602
39901
|
await ctx.execute({
|
|
39603
39902
|
method: "GET",
|
|
39604
|
-
path: "/v1/
|
|
39903
|
+
path: "/v1/ai-billing/credit-products",
|
|
39605
39904
|
args,
|
|
39606
39905
|
queryParamKeys: []
|
|
39607
39906
|
});
|
|
39608
39907
|
});
|
|
39609
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", `
|
|
39610
39909
|
Examples:
|
|
39611
|
-
hyperline
|
|
39612
|
-
hyperline
|
|
39910
|
+
hyperline ai-billing list-agent-cost-catalog
|
|
39911
|
+
hyperline ai-billing list-agent-cost-catalog --enabled-only <enabled_only>`).action(async (opts) => {
|
|
39613
39912
|
const ctx = resource.parent?.opts()._ctx;
|
|
39614
39913
|
if (!ctx) {
|
|
39615
39914
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39620,15 +39919,15 @@ Examples:
|
|
|
39620
39919
|
args.enabled_only = opts.enabledOnly;
|
|
39621
39920
|
await ctx.execute({
|
|
39622
39921
|
method: "GET",
|
|
39623
|
-
path: "/v1/
|
|
39922
|
+
path: "/v1/ai-billing/cost-catalog",
|
|
39624
39923
|
args,
|
|
39625
39924
|
queryParamKeys: ["enabled_only"]
|
|
39626
39925
|
});
|
|
39627
39926
|
});
|
|
39628
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", `
|
|
39629
39928
|
Examples:
|
|
39630
|
-
hyperline
|
|
39631
|
-
hyperline
|
|
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) => {
|
|
39632
39931
|
const ctx = resource.parent?.opts()._ctx;
|
|
39633
39932
|
if (!ctx) {
|
|
39634
39933
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39643,15 +39942,15 @@ Examples:
|
|
|
39643
39942
|
args.dimensions = JSON.parse(opts.dimensions);
|
|
39644
39943
|
await ctx.execute({
|
|
39645
39944
|
method: "POST",
|
|
39646
|
-
path: "/v1/
|
|
39945
|
+
path: "/v1/ai-billing/cost-catalog/items",
|
|
39647
39946
|
args,
|
|
39648
39947
|
queryParamKeys: []
|
|
39649
39948
|
});
|
|
39650
39949
|
});
|
|
39651
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", `
|
|
39652
39951
|
Examples:
|
|
39653
|
-
hyperline
|
|
39654
|
-
hyperline
|
|
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) => {
|
|
39655
39954
|
const ctx = resource.parent?.opts()._ctx;
|
|
39656
39955
|
if (!ctx) {
|
|
39657
39956
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39669,16 +39968,16 @@ Examples:
|
|
|
39669
39968
|
}
|
|
39670
39969
|
await ctx.execute({
|
|
39671
39970
|
method: "DELETE",
|
|
39672
|
-
path: "/v1/
|
|
39971
|
+
path: "/v1/ai-billing/cost-catalog/items/{item_id}",
|
|
39673
39972
|
args,
|
|
39674
39973
|
queryParamKeys: []
|
|
39675
39974
|
});
|
|
39676
39975
|
});
|
|
39677
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", `
|
|
39678
39977
|
Examples:
|
|
39679
|
-
hyperline
|
|
39680
|
-
hyperline
|
|
39681
|
-
hyperline
|
|
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) => {
|
|
39682
39981
|
const ctx = resource.parent?.opts()._ctx;
|
|
39683
39982
|
if (!ctx) {
|
|
39684
39983
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39701,15 +40000,15 @@ Examples:
|
|
|
39701
40000
|
args.dimensions = JSON.parse(opts.dimensions);
|
|
39702
40001
|
await ctx.execute({
|
|
39703
40002
|
method: "PUT",
|
|
39704
|
-
path: "/v1/
|
|
40003
|
+
path: "/v1/ai-billing/cost-catalog/overrides",
|
|
39705
40004
|
args,
|
|
39706
40005
|
queryParamKeys: []
|
|
39707
40006
|
});
|
|
39708
40007
|
});
|
|
39709
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", `
|
|
39710
40009
|
Examples:
|
|
39711
|
-
hyperline
|
|
39712
|
-
hyperline
|
|
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) => {
|
|
39713
40012
|
const ctx = resource.parent?.opts()._ctx;
|
|
39714
40013
|
if (!ctx) {
|
|
39715
40014
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39727,14 +40026,14 @@ Examples:
|
|
|
39727
40026
|
}
|
|
39728
40027
|
await ctx.execute({
|
|
39729
40028
|
method: "DELETE",
|
|
39730
|
-
path: "/v1/
|
|
40029
|
+
path: "/v1/ai-billing/cost-catalog/overrides/{override_id}",
|
|
39731
40030
|
args,
|
|
39732
40031
|
queryParamKeys: []
|
|
39733
40032
|
});
|
|
39734
40033
|
});
|
|
39735
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", `
|
|
39736
40035
|
Examples:
|
|
39737
|
-
hyperline
|
|
40036
|
+
hyperline ai-billing list-agent-customer-policies --customer-id <customer_id>`).action(async (opts) => {
|
|
39738
40037
|
const ctx = resource.parent?.opts()._ctx;
|
|
39739
40038
|
if (!ctx) {
|
|
39740
40039
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39745,15 +40044,15 @@ Examples:
|
|
|
39745
40044
|
args.customer_id = opts.customerId;
|
|
39746
40045
|
await ctx.execute({
|
|
39747
40046
|
method: "GET",
|
|
39748
|
-
path: "/v1/
|
|
40047
|
+
path: "/v1/ai-billing/customers/{customer_id}/policies",
|
|
39749
40048
|
args,
|
|
39750
40049
|
queryParamKeys: []
|
|
39751
40050
|
});
|
|
39752
40051
|
});
|
|
39753
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", `
|
|
39754
40053
|
Examples:
|
|
39755
|
-
hyperline
|
|
39756
|
-
hyperline
|
|
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) => {
|
|
39757
40056
|
const ctx = resource.parent?.opts()._ctx;
|
|
39758
40057
|
if (!ctx) {
|
|
39759
40058
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39766,7 +40065,7 @@ Examples:
|
|
|
39766
40065
|
args.agent = opts.agent;
|
|
39767
40066
|
await ctx.execute({
|
|
39768
40067
|
method: "GET",
|
|
39769
|
-
path: "/v1/
|
|
40068
|
+
path: "/v1/ai-billing/customers/{customer_id}/policy",
|
|
39770
40069
|
args,
|
|
39771
40070
|
queryParamKeys: ["agent"]
|
|
39772
40071
|
});
|
|
@@ -39782,9 +40081,9 @@ Examples:
|
|
|
39782
40081
|
|
|
39783
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", `
|
|
39784
40083
|
Examples:
|
|
39785
|
-
hyperline
|
|
39786
|
-
hyperline
|
|
39787
|
-
hyperline
|
|
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) => {
|
|
39788
40087
|
const ctx = resource.parent?.opts()._ctx;
|
|
39789
40088
|
if (!ctx) {
|
|
39790
40089
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39829,16 +40128,16 @@ Examples:
|
|
|
39829
40128
|
args.window_rates = JSON.parse(opts.windowRates);
|
|
39830
40129
|
await ctx.execute({
|
|
39831
40130
|
method: "PUT",
|
|
39832
|
-
path: "/v1/
|
|
40131
|
+
path: "/v1/ai-billing/customers/{customer_id}/policy",
|
|
39833
40132
|
args,
|
|
39834
40133
|
queryParamKeys: ["agent"]
|
|
39835
40134
|
});
|
|
39836
40135
|
});
|
|
39837
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", `
|
|
39838
40137
|
Examples:
|
|
39839
|
-
hyperline
|
|
39840
|
-
hyperline
|
|
39841
|
-
hyperline
|
|
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) => {
|
|
39842
40141
|
const ctx = resource.parent?.opts()._ctx;
|
|
39843
40142
|
if (!ctx) {
|
|
39844
40143
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -39858,413 +40157,120 @@ Examples:
|
|
|
39858
40157
|
}
|
|
39859
40158
|
await ctx.execute({
|
|
39860
40159
|
method: "DELETE",
|
|
39861
|
-
path: "/v1/
|
|
40160
|
+
path: "/v1/ai-billing/customers/{customer_id}/policy",
|
|
39862
40161
|
args,
|
|
39863
40162
|
queryParamKeys: ["agent"]
|
|
39864
40163
|
});
|
|
39865
40164
|
});
|
|
39866
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", `
|
|
39867
40166
|
Examples:
|
|
39868
|
-
hyperline
|
|
39869
|
-
hyperline
|
|
39870
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39871
|
-
if (!ctx) {
|
|
39872
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39873
|
-
process.exit(1);
|
|
39874
|
-
}
|
|
39875
|
-
const args = {};
|
|
39876
|
-
if (opts.customerId !== void 0)
|
|
39877
|
-
args.customer_id = opts.customerId;
|
|
39878
|
-
await ctx.execute({
|
|
39879
|
-
method: "POST",
|
|
39880
|
-
path: "/v1/agents/customers/{customer_id}/apply-default-plan",
|
|
39881
|
-
args,
|
|
39882
|
-
queryParamKeys: []
|
|
39883
|
-
});
|
|
39884
|
-
});
|
|
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", `
|
|
39886
|
-
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) => {
|
|
39889
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39890
|
-
if (!ctx) {
|
|
39891
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39892
|
-
process.exit(1);
|
|
39893
|
-
}
|
|
39894
|
-
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;
|
|
39899
|
-
await ctx.execute({
|
|
39900
|
-
method: "GET",
|
|
39901
|
-
path: "/v1/agents/customers/{customer_id}/balance",
|
|
39902
|
-
args,
|
|
39903
|
-
queryParamKeys: ["agent"]
|
|
39904
|
-
});
|
|
39905
|
-
});
|
|
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", `
|
|
39907
|
-
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) => {
|
|
39911
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39912
|
-
if (!ctx) {
|
|
39913
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39914
|
-
process.exit(1);
|
|
39915
|
-
}
|
|
39916
|
-
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;
|
|
39921
|
-
await ctx.execute({
|
|
39922
|
-
method: "POST",
|
|
39923
|
-
path: "/v1/agents/customers/{customer_id}/windows/reset",
|
|
39924
|
-
args,
|
|
39925
|
-
queryParamKeys: ["agent"]
|
|
39926
|
-
});
|
|
39927
|
-
});
|
|
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", `
|
|
39929
|
-
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) => {
|
|
39932
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39933
|
-
if (!ctx) {
|
|
39934
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39935
|
-
process.exit(1);
|
|
39936
|
-
}
|
|
39937
|
-
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);
|
|
39952
|
-
await ctx.execute({
|
|
39953
|
-
method: "GET",
|
|
39954
|
-
path: "/v1/agents/customers/{customer_id}/consumption",
|
|
39955
|
-
args,
|
|
39956
|
-
queryParamKeys: ["agent", "overage", "from", "to", "take", "skip"]
|
|
39957
|
-
});
|
|
39958
|
-
});
|
|
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", `
|
|
39960
|
-
Examples:
|
|
39961
|
-
hyperline agents get-agent-customer-overview --customer-id <customer_id>`).action(async (opts) => {
|
|
39962
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39963
|
-
if (!ctx) {
|
|
39964
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39965
|
-
process.exit(1);
|
|
39966
|
-
}
|
|
39967
|
-
const args = {};
|
|
39968
|
-
if (opts.customerId !== void 0)
|
|
39969
|
-
args.customer_id = opts.customerId;
|
|
39970
|
-
await ctx.execute({
|
|
39971
|
-
method: "GET",
|
|
39972
|
-
path: "/v1/agents/customers/{customer_id}/overview",
|
|
39973
|
-
args,
|
|
39974
|
-
queryParamKeys: []
|
|
39975
|
-
});
|
|
39976
|
-
});
|
|
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", `
|
|
39983
|
-
Examples:
|
|
39984
|
-
hyperline aggregators list
|
|
39985
|
-
hyperline aggregators list --take <take>`).action(async (opts) => {
|
|
39986
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
39987
|
-
if (!ctx) {
|
|
39988
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
39989
|
-
process.exit(1);
|
|
39990
|
-
}
|
|
39991
|
-
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);
|
|
39996
|
-
await ctx.execute({
|
|
39997
|
-
method: "GET",
|
|
39998
|
-
path: "/v1/aggregators",
|
|
39999
|
-
args,
|
|
40000
|
-
queryParamKeys: ["take", "skip"]
|
|
40001
|
-
});
|
|
40002
|
-
});
|
|
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", `
|
|
40004
|
-
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) => {
|
|
40008
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
40009
|
-
if (!ctx) {
|
|
40010
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
40011
|
-
process.exit(1);
|
|
40012
|
-
}
|
|
40013
|
-
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);
|
|
40044
|
-
await ctx.execute({
|
|
40045
|
-
method: "POST",
|
|
40046
|
-
path: "/v1/aggregators",
|
|
40047
|
-
args,
|
|
40048
|
-
queryParamKeys: []
|
|
40049
|
-
});
|
|
40050
|
-
});
|
|
40051
|
-
resource.command("get").description(`Retrieve a specific aggregator by ID.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
40052
|
-
Examples:
|
|
40053
|
-
hyperline aggregators get --id <id>`).action(async (opts) => {
|
|
40054
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
40055
|
-
if (!ctx) {
|
|
40056
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
40057
|
-
process.exit(1);
|
|
40058
|
-
}
|
|
40059
|
-
const args = {};
|
|
40060
|
-
if (opts.id !== void 0)
|
|
40061
|
-
args.id = opts.id;
|
|
40062
|
-
await ctx.execute({
|
|
40063
|
-
method: "GET",
|
|
40064
|
-
path: "/v1/aggregators/{id}",
|
|
40065
|
-
args,
|
|
40066
|
-
queryParamKeys: []
|
|
40067
|
-
});
|
|
40068
|
-
});
|
|
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", `
|
|
40070
|
-
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) => {
|
|
40074
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
40075
|
-
if (!ctx) {
|
|
40076
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
40077
|
-
process.exit(1);
|
|
40078
|
-
}
|
|
40079
|
-
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);
|
|
40112
|
-
await ctx.execute({
|
|
40113
|
-
method: "PUT",
|
|
40114
|
-
path: "/v1/aggregators/{id}",
|
|
40115
|
-
args,
|
|
40116
|
-
queryParamKeys: []
|
|
40117
|
-
});
|
|
40118
|
-
});
|
|
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", `
|
|
40120
|
-
Examples:
|
|
40121
|
-
hyperline aggregators delete --id <id>
|
|
40122
|
-
hyperline aggregators delete --id <id> --output json`).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) => {
|
|
40123
40169
|
const ctx = resource.parent?.opts()._ctx;
|
|
40124
40170
|
if (!ctx) {
|
|
40125
40171
|
process.stderr.write("Error: Not authenticated\n");
|
|
40126
40172
|
process.exit(1);
|
|
40127
40173
|
}
|
|
40128
40174
|
const args = {};
|
|
40129
|
-
if (opts.
|
|
40130
|
-
args.
|
|
40131
|
-
if (!opts.yes) {
|
|
40132
|
-
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
40133
|
-
if (!confirmed) {
|
|
40134
|
-
process.stdout.write("Aborted.\n");
|
|
40135
|
-
return;
|
|
40136
|
-
}
|
|
40137
|
-
}
|
|
40175
|
+
if (opts.customerId !== void 0)
|
|
40176
|
+
args.customer_id = opts.customerId;
|
|
40138
40177
|
await ctx.execute({
|
|
40139
|
-
method: "
|
|
40140
|
-
path: "/v1/
|
|
40178
|
+
method: "POST",
|
|
40179
|
+
path: "/v1/ai-billing/customers/{customer_id}/apply-default-plan",
|
|
40141
40180
|
args,
|
|
40142
40181
|
queryParamKeys: []
|
|
40143
40182
|
});
|
|
40144
40183
|
});
|
|
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", `
|
|
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", `
|
|
40151
40185
|
Examples:
|
|
40152
|
-
hyperline
|
|
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) => {
|
|
40153
40188
|
const ctx = resource.parent?.opts()._ctx;
|
|
40154
40189
|
if (!ctx) {
|
|
40155
40190
|
process.stderr.write("Error: Not authenticated\n");
|
|
40156
40191
|
process.exit(1);
|
|
40157
40192
|
}
|
|
40158
40193
|
const args = {};
|
|
40159
|
-
if (opts.
|
|
40160
|
-
args.
|
|
40194
|
+
if (opts.customerId !== void 0)
|
|
40195
|
+
args.customer_id = opts.customerId;
|
|
40196
|
+
if (opts.agent !== void 0)
|
|
40197
|
+
args.agent = opts.agent;
|
|
40161
40198
|
await ctx.execute({
|
|
40162
40199
|
method: "GET",
|
|
40163
|
-
path: "/v1/
|
|
40200
|
+
path: "/v1/ai-billing/customers/{customer_id}/balance",
|
|
40164
40201
|
args,
|
|
40165
|
-
queryParamKeys: []
|
|
40202
|
+
queryParamKeys: ["agent"]
|
|
40166
40203
|
});
|
|
40167
40204
|
});
|
|
40168
|
-
resource.command("
|
|
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", `
|
|
40169
40206
|
Examples:
|
|
40170
|
-
hyperline
|
|
40171
|
-
hyperline
|
|
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) => {
|
|
40172
40210
|
const ctx = resource.parent?.opts()._ctx;
|
|
40173
40211
|
if (!ctx) {
|
|
40174
40212
|
process.stderr.write("Error: Not authenticated\n");
|
|
40175
40213
|
process.exit(1);
|
|
40176
40214
|
}
|
|
40177
40215
|
const args = {};
|
|
40178
|
-
if (opts.
|
|
40179
|
-
args.
|
|
40180
|
-
if (opts.
|
|
40181
|
-
args.
|
|
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;
|
|
40216
|
+
if (opts.customerId !== void 0)
|
|
40217
|
+
args.customer_id = opts.customerId;
|
|
40218
|
+
if (opts.agent !== void 0)
|
|
40219
|
+
args.agent = opts.agent;
|
|
40188
40220
|
await ctx.execute({
|
|
40189
|
-
method: "
|
|
40190
|
-
path: "/v1/
|
|
40221
|
+
method: "POST",
|
|
40222
|
+
path: "/v1/ai-billing/customers/{customer_id}/windows/reset",
|
|
40191
40223
|
args,
|
|
40192
|
-
queryParamKeys: [
|
|
40193
|
-
"start_date",
|
|
40194
|
-
"end_date",
|
|
40195
|
-
"aggregator_filter_id",
|
|
40196
|
-
"group_by"
|
|
40197
|
-
]
|
|
40224
|
+
queryParamKeys: ["agent"]
|
|
40198
40225
|
});
|
|
40199
40226
|
});
|
|
40200
|
-
resource.command("
|
|
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", `
|
|
40201
40228
|
Examples:
|
|
40202
|
-
hyperline
|
|
40203
|
-
hyperline
|
|
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) => {
|
|
40204
40231
|
const ctx = resource.parent?.opts()._ctx;
|
|
40205
40232
|
if (!ctx) {
|
|
40206
40233
|
process.stderr.write("Error: Not authenticated\n");
|
|
40207
40234
|
process.exit(1);
|
|
40208
40235
|
}
|
|
40209
40236
|
const args = {};
|
|
40210
|
-
if (opts.
|
|
40211
|
-
args.
|
|
40212
|
-
if (opts.
|
|
40213
|
-
args.
|
|
40214
|
-
if (opts.
|
|
40215
|
-
args.
|
|
40216
|
-
if (opts.
|
|
40217
|
-
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/
|
|
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-
|
|
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
|
|
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.
|
|
40246
|
-
args.
|
|
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/
|
|
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
|
}
|
|
@@ -40428,7 +40434,7 @@ Examples:
|
|
|
40428
40434
|
queryParamKeys: ["take", "skip"]
|
|
40429
40435
|
});
|
|
40430
40436
|
});
|
|
40431
|
-
resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
|
|
40437
|
+
resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
|
|
40432
40438
|
Examples:
|
|
40433
40439
|
hyperline coupons create --name <name> --type <type>
|
|
40434
40440
|
hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
|
|
@@ -40461,6 +40467,8 @@ Examples:
|
|
|
40461
40467
|
args.product_ids = JSON.parse(opts.productIds);
|
|
40462
40468
|
if (opts.duration !== void 0)
|
|
40463
40469
|
args.duration = JSON.parse(opts.duration);
|
|
40470
|
+
if (opts.properties !== void 0)
|
|
40471
|
+
args.properties = JSON.parse(opts.properties);
|
|
40464
40472
|
await ctx.execute({
|
|
40465
40473
|
method: "POST",
|
|
40466
40474
|
path: "/v1/coupons",
|
|
@@ -40486,7 +40494,7 @@ Examples:
|
|
|
40486
40494
|
queryParamKeys: []
|
|
40487
40495
|
});
|
|
40488
40496
|
});
|
|
40489
|
-
resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
|
|
40497
|
+
resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
|
|
40490
40498
|
Examples:
|
|
40491
40499
|
hyperline coupons update --id <id> --name <name> --type <type>
|
|
40492
40500
|
hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
|
|
@@ -40521,6 +40529,8 @@ Examples:
|
|
|
40521
40529
|
args.product_ids = JSON.parse(opts.productIds);
|
|
40522
40530
|
if (opts.duration !== void 0)
|
|
40523
40531
|
args.duration = JSON.parse(opts.duration);
|
|
40532
|
+
if (opts.properties !== void 0)
|
|
40533
|
+
args.properties = JSON.parse(opts.properties);
|
|
40524
40534
|
await ctx.execute({
|
|
40525
40535
|
method: "PUT",
|
|
40526
40536
|
path: "/v1/coupons/{id}",
|
|
@@ -40752,7 +40762,7 @@ Examples:
|
|
|
40752
40762
|
queryParamKeys: []
|
|
40753
40763
|
});
|
|
40754
40764
|
});
|
|
40755
|
-
resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (
|
|
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", `
|
|
40756
40766
|
Examples:
|
|
40757
40767
|
hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities>
|
|
40758
40768
|
hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
|
|
@@ -40777,6 +40787,8 @@ Examples:
|
|
|
40777
40787
|
args.entities = JSON.parse(opts.entities);
|
|
40778
40788
|
if (opts.authorizedValues !== void 0)
|
|
40779
40789
|
args.authorized_values = JSON.parse(opts.authorizedValues);
|
|
40790
|
+
if (opts.defaultValue !== void 0)
|
|
40791
|
+
args.default_value = JSON.parse(opts.defaultValue);
|
|
40780
40792
|
await ctx.execute({
|
|
40781
40793
|
method: "POST",
|
|
40782
40794
|
path: "/v1/custom-properties",
|
|
@@ -40784,7 +40796,7 @@ Examples:
|
|
|
40784
40796
|
queryParamKeys: []
|
|
40785
40797
|
});
|
|
40786
40798
|
});
|
|
40787
|
-
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`).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", `
|
|
40788
40800
|
Examples:
|
|
40789
40801
|
hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities>
|
|
40790
40802
|
hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
|
|
@@ -40811,6 +40823,8 @@ Examples:
|
|
|
40811
40823
|
args.entities = JSON.parse(opts.entities);
|
|
40812
40824
|
if (opts.authorizedValues !== void 0)
|
|
40813
40825
|
args.authorized_values = JSON.parse(opts.authorizedValues);
|
|
40826
|
+
if (opts.defaultValue !== void 0)
|
|
40827
|
+
args.default_value = JSON.parse(opts.defaultValue);
|
|
40814
40828
|
await ctx.execute({
|
|
40815
40829
|
method: "PUT",
|
|
40816
40830
|
path: "/v1/custom-properties/{id}",
|
|
@@ -41168,7 +41182,7 @@ Customer type.
|
|
|
41168
41182
|
|
|
41169
41183
|
- \`taxable\`: Taxes are automatically determined for the customer.
|
|
41170
41184
|
- \`exempt\`: The customer is exempt from tax.
|
|
41171
|
-
`).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
41185
|
+
`).option("--registration-number <value>", `Customer registration number.`).option("--einvoicing-code <value>", `Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
41172
41186
|
How customer invoices are issued from the parent organisation.
|
|
41173
41187
|
|
|
41174
41188
|
- \`none\`: Invoices will keep being issued from this customer.
|
|
@@ -41197,6 +41211,8 @@ Examples:
|
|
|
41197
41211
|
args.taxability = opts.taxability;
|
|
41198
41212
|
if (opts.registrationNumber !== void 0)
|
|
41199
41213
|
args.registration_number = opts.registrationNumber;
|
|
41214
|
+
if (opts.einvoicingCode !== void 0)
|
|
41215
|
+
args.einvoicing_code = opts.einvoicingCode;
|
|
41200
41216
|
if (opts.externalId !== void 0)
|
|
41201
41217
|
args.external_id = opts.externalId;
|
|
41202
41218
|
if (opts.domain !== void 0)
|
|
@@ -41303,7 +41319,7 @@ Customer type.
|
|
|
41303
41319
|
|
|
41304
41320
|
- \`taxable\`: Taxes are automatically determined for the customer.
|
|
41305
41321
|
- \`exempt\`: The customer is exempt from tax.
|
|
41306
|
-
`).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
41322
|
+
`).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--einvoicing-code <value>", `Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
|
|
41307
41323
|
How customer invoices are issued from the parent organisation.
|
|
41308
41324
|
|
|
41309
41325
|
- \`none\`: Invoices will keep being issued from this customer.
|
|
@@ -41334,6 +41350,8 @@ Examples:
|
|
|
41334
41350
|
args.taxability = opts.taxability;
|
|
41335
41351
|
if (opts.registrationNumber !== void 0)
|
|
41336
41352
|
args.registration_number = opts.registrationNumber;
|
|
41353
|
+
if (opts.einvoicingCode !== void 0)
|
|
41354
|
+
args.einvoicing_code = opts.einvoicingCode;
|
|
41337
41355
|
if (opts.externalId !== void 0)
|
|
41338
41356
|
args.external_id = opts.externalId;
|
|
41339
41357
|
if (opts.domain !== void 0)
|
|
@@ -41587,7 +41605,7 @@ Examples:
|
|
|
41587
41605
|
queryParamKeys: []
|
|
41588
41606
|
});
|
|
41589
41607
|
});
|
|
41590
|
-
resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).
|
|
41608
|
+
resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--type <value>", `Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
|
|
41591
41609
|
Examples:
|
|
41592
41610
|
hyperline customers-address create-customer-address --customer-id <customerId> --type <type>
|
|
41593
41611
|
hyperline customers-address create-customer-address --customer-id <customerId> --type <type> --name <name> --line1 <line1>
|
|
@@ -41600,6 +41618,8 @@ Examples:
|
|
|
41600
41618
|
const args = {};
|
|
41601
41619
|
if (opts.customerId !== void 0)
|
|
41602
41620
|
args.customerId = opts.customerId;
|
|
41621
|
+
if (opts.type !== void 0)
|
|
41622
|
+
args.type = opts.type;
|
|
41603
41623
|
if (opts.name !== void 0)
|
|
41604
41624
|
args.name = opts.name;
|
|
41605
41625
|
if (opts.line1 !== void 0)
|
|
@@ -41614,8 +41634,8 @@ Examples:
|
|
|
41614
41634
|
args.state = opts.state;
|
|
41615
41635
|
if (opts.country !== void 0)
|
|
41616
41636
|
args.country = opts.country;
|
|
41617
|
-
if (opts.
|
|
41618
|
-
args.
|
|
41637
|
+
if (opts.taxId !== void 0)
|
|
41638
|
+
args.tax_id = opts.taxId;
|
|
41619
41639
|
await ctx.execute({
|
|
41620
41640
|
method: "POST",
|
|
41621
41641
|
path: "/v1/customers/{customerId}/addresses",
|
|
@@ -41623,7 +41643,7 @@ Examples:
|
|
|
41623
41643
|
queryParamKeys: []
|
|
41624
41644
|
});
|
|
41625
41645
|
});
|
|
41626
|
-
resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).addHelpText("after", `
|
|
41646
|
+
resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
|
|
41627
41647
|
Examples:
|
|
41628
41648
|
hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId>
|
|
41629
41649
|
hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId> --name <name> --line1 <line1>
|
|
@@ -41652,6 +41672,8 @@ Examples:
|
|
|
41652
41672
|
args.state = opts.state;
|
|
41653
41673
|
if (opts.country !== void 0)
|
|
41654
41674
|
args.country = opts.country;
|
|
41675
|
+
if (opts.taxId !== void 0)
|
|
41676
|
+
args.tax_id = opts.taxId;
|
|
41655
41677
|
await ctx.execute({
|
|
41656
41678
|
method: "PATCH",
|
|
41657
41679
|
path: "/v1/customers/{customerId}/addresses/{addressId}",
|
|
@@ -41834,7 +41856,7 @@ Examples:
|
|
|
41834
41856
|
queryParamKeys: []
|
|
41835
41857
|
});
|
|
41836
41858
|
});
|
|
41837
|
-
resource.command("list-customer-credit-transactions").description(`List all transactions (
|
|
41859
|
+
resource.command("list-customer-credit-transactions").description(`List all transactions (topups, usages, expirations) for a specific credit product. Paginated with take/skip and optional filters.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--type <value>", `type`).option("--invoice-id <value>", `invoice_id`).option("--created-at <value>", `created_at`).addHelpText("after", `
|
|
41838
41860
|
Examples:
|
|
41839
41861
|
hyperline customers-credits list-customer-credit-transactions --id <id> --product-id <productId>
|
|
41840
41862
|
hyperline customers-credits list-customer-credit-transactions --id <id> --product-id <productId> --take <take> --type <type>`).action(async (opts) => {
|
|
@@ -42005,6 +42027,54 @@ Examples:
|
|
|
42005
42027
|
queryParamKeys: []
|
|
42006
42028
|
});
|
|
42007
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", `
|
|
42031
|
+
Examples:
|
|
42032
|
+
hyperline customers-credits get-customer-credit-portal-settings --id <id> --product-id <productId>`).action(async (opts) => {
|
|
42033
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42034
|
+
if (!ctx) {
|
|
42035
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42036
|
+
process.exit(1);
|
|
42037
|
+
}
|
|
42038
|
+
const args = {};
|
|
42039
|
+
if (opts.id !== void 0)
|
|
42040
|
+
args.id = opts.id;
|
|
42041
|
+
if (opts.productId !== void 0)
|
|
42042
|
+
args.productId = opts.productId;
|
|
42043
|
+
await ctx.execute({
|
|
42044
|
+
method: "GET",
|
|
42045
|
+
path: "/v1/customers/{id}/credits/{productId}/portal-settings",
|
|
42046
|
+
args,
|
|
42047
|
+
queryParamKeys: []
|
|
42048
|
+
});
|
|
42049
|
+
});
|
|
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", `
|
|
42051
|
+
Examples:
|
|
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) => {
|
|
42055
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
42056
|
+
if (!ctx) {
|
|
42057
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
42058
|
+
process.exit(1);
|
|
42059
|
+
}
|
|
42060
|
+
const args = {};
|
|
42061
|
+
if (opts.id !== void 0)
|
|
42062
|
+
args.id = opts.id;
|
|
42063
|
+
if (opts.productId !== void 0)
|
|
42064
|
+
args.productId = opts.productId;
|
|
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);
|
|
42071
|
+
await ctx.execute({
|
|
42072
|
+
method: "PUT",
|
|
42073
|
+
path: "/v1/customers/{id}/credits/{productId}/portal-settings",
|
|
42074
|
+
args,
|
|
42075
|
+
queryParamKeys: []
|
|
42076
|
+
});
|
|
42077
|
+
});
|
|
42008
42078
|
}
|
|
42009
42079
|
|
|
42010
42080
|
// build/commands/generated/customers-payment-methods.js
|
|
@@ -42960,7 +43030,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
|
|
|
42960
43030
|
|
|
42961
43031
|
- \`current\`: Use the current default payment method of the customer.
|
|
42962
43032
|
- \`external\`: Manage the payment of the invoice outside of Hyperline.
|
|
42963
|
-
`).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", `
|
|
42964
43034
|
Examples:
|
|
42965
43035
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
|
|
42966
43036
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
|
|
@@ -43011,6 +43081,8 @@ Examples:
|
|
|
43011
43081
|
args.due_at = opts.dueAt;
|
|
43012
43082
|
if (opts.settledAt !== void 0)
|
|
43013
43083
|
args.settled_at = opts.settledAt;
|
|
43084
|
+
if (opts.issuingMethod !== void 0)
|
|
43085
|
+
args.issuing_method = opts.issuingMethod;
|
|
43014
43086
|
if (opts.properties !== void 0)
|
|
43015
43087
|
args.properties = JSON.parse(opts.properties);
|
|
43016
43088
|
if (opts.customProperties !== void 0)
|
|
@@ -43200,7 +43272,7 @@ Examples:
|
|
|
43200
43272
|
|
|
43201
43273
|
- \`auto\`: Tax is automatically computed and applied.
|
|
43202
43274
|
- \`not_eligible\`: Tax collection is disabled for the invoice.
|
|
43203
|
-
`).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", `
|
|
43204
43276
|
Examples:
|
|
43205
43277
|
hyperline invoices update --id <id>
|
|
43206
43278
|
hyperline invoices update --id <id> --type <type> --document-name <document_name>
|
|
@@ -43229,6 +43301,10 @@ Examples:
|
|
|
43229
43301
|
args.footer = opts.footer;
|
|
43230
43302
|
if (opts.taxScheme !== void 0)
|
|
43231
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;
|
|
43232
43308
|
if (opts.paymentMethodType !== void 0)
|
|
43233
43309
|
args.payment_method_type = opts.paymentMethodType;
|
|
43234
43310
|
if (opts.paymentMethodId !== void 0)
|
|
@@ -43922,6 +43998,44 @@ Examples:
|
|
|
43922
43998
|
queryParamKeys: []
|
|
43923
43999
|
});
|
|
43924
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
|
+
});
|
|
43925
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", `
|
|
43926
44040
|
Examples:
|
|
43927
44041
|
hyperline price-configurations update-prices --id <id>
|
|
@@ -44321,7 +44435,7 @@ Quote status.
|
|
|
44321
44435
|
- \`all\`: Display all pricing tiers.
|
|
44322
44436
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
44323
44437
|
- \`none\`: Hide all pricing tiers.
|
|
44324
|
-
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--
|
|
44438
|
+
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
|
|
44325
44439
|
Examples:
|
|
44326
44440
|
hyperline quotes create --customer-id <customer_id>
|
|
44327
44441
|
hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
|
|
@@ -44364,8 +44478,8 @@ Examples:
|
|
|
44364
44478
|
args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
|
|
44365
44479
|
if (opts.displayDocumentsInPreview !== void 0)
|
|
44366
44480
|
args.display_documents_in_preview = opts.displayDocumentsInPreview;
|
|
44367
|
-
if (opts.
|
|
44368
|
-
args.
|
|
44481
|
+
if (opts.subscriptionUpdateDisplay !== void 0)
|
|
44482
|
+
args.subscription_update_display = opts.subscriptionUpdateDisplay;
|
|
44369
44483
|
if (opts.generateDraftInvoices !== void 0)
|
|
44370
44484
|
args.generate_draft_invoices = opts.generateDraftInvoices;
|
|
44371
44485
|
if (opts.templateId !== void 0)
|
|
@@ -44613,7 +44727,7 @@ Examples:
|
|
|
44613
44727
|
- \`all\`: Display all pricing tiers.
|
|
44614
44728
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
44615
44729
|
- \`none\`: Hide all pricing tiers.
|
|
44616
|
-
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--
|
|
44730
|
+
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
|
|
44617
44731
|
Examples:
|
|
44618
44732
|
hyperline quotes update --id <id>
|
|
44619
44733
|
hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
|
|
@@ -44652,8 +44766,8 @@ Examples:
|
|
|
44652
44766
|
args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
|
|
44653
44767
|
if (opts.displayDocumentsInPreview !== void 0)
|
|
44654
44768
|
args.display_documents_in_preview = opts.displayDocumentsInPreview;
|
|
44655
|
-
if (opts.
|
|
44656
|
-
args.
|
|
44769
|
+
if (opts.subscriptionUpdateDisplay !== void 0)
|
|
44770
|
+
args.subscription_update_display = opts.subscriptionUpdateDisplay;
|
|
44657
44771
|
if (opts.generateDraftInvoices !== void 0)
|
|
44658
44772
|
args.generate_draft_invoices = opts.generateDraftInvoices;
|
|
44659
44773
|
if (opts.crmOpportunityId !== void 0)
|
|
@@ -44677,6 +44791,25 @@ Examples:
|
|
|
44677
44791
|
queryParamKeys: []
|
|
44678
44792
|
});
|
|
44679
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
|
+
});
|
|
44680
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", `
|
|
44681
44814
|
Examples:
|
|
44682
44815
|
hyperline quotes download --id <id>
|
|
@@ -45089,7 +45222,7 @@ Examples:
|
|
|
45089
45222
|
queryParamKeys: []
|
|
45090
45223
|
});
|
|
45091
45224
|
});
|
|
45092
|
-
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.
|
|
45225
|
+
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", `
|
|
45093
45226
|
Examples:
|
|
45094
45227
|
hyperline subscriptions pause --id <id>
|
|
45095
45228
|
hyperline subscriptions pause --id <id> --reactivate-at <reactivate_at>
|
|
@@ -45130,9 +45263,10 @@ Examples:
|
|
|
45130
45263
|
queryParamKeys: []
|
|
45131
45264
|
});
|
|
45132
45265
|
});
|
|
45133
|
-
resource.command("reactivate").description(`Resume a paused subscription,
|
|
45266
|
+
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 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.`).addHelpText("after", `
|
|
45134
45267
|
Examples:
|
|
45135
45268
|
hyperline subscriptions reactivate --id <id>
|
|
45269
|
+
hyperline subscriptions reactivate --id <id> --reactivate-at <reactivate_at> --invoicing-mode <invoicing_mode>
|
|
45136
45270
|
hyperline subscriptions reactivate --id <id> --output json`).action(async (opts) => {
|
|
45137
45271
|
const ctx = resource.parent?.opts()._ctx;
|
|
45138
45272
|
if (!ctx) {
|
|
@@ -45142,6 +45276,10 @@ Examples:
|
|
|
45142
45276
|
const args = {};
|
|
45143
45277
|
if (opts.id !== void 0)
|
|
45144
45278
|
args.id = opts.id;
|
|
45279
|
+
if (opts.reactivateAt !== void 0)
|
|
45280
|
+
args.reactivate_at = opts.reactivateAt;
|
|
45281
|
+
if (opts.invoicingMode !== void 0)
|
|
45282
|
+
args.invoicing_mode = opts.invoicingMode;
|
|
45145
45283
|
await ctx.execute({
|
|
45146
45284
|
method: "POST",
|
|
45147
45285
|
path: "/v1/subscriptions/{id}/reactivate",
|
|
@@ -46725,10 +46863,10 @@ function registerAllCommands(program2) {
|
|
|
46725
46863
|
registerAccounting_ReportsCommands(program2);
|
|
46726
46864
|
registerAccounting_Revenue_RecognitionCommands(program2);
|
|
46727
46865
|
registerAccounting_RulesCommands(program2);
|
|
46728
|
-
registerAgentsCommands(program2);
|
|
46729
46866
|
registerCustom_PropertiesCommands(program2);
|
|
46730
46867
|
registerAggregatorsCommands(program2);
|
|
46731
46868
|
registerAggregators_UsageCommands(program2);
|
|
46869
|
+
registerAi_BillingCommands(program2);
|
|
46732
46870
|
registerAnalyticsCommands(program2);
|
|
46733
46871
|
registerBank_AccountsCommands(program2);
|
|
46734
46872
|
registerCompaniesCommands(program2);
|
|
@@ -62715,6 +62853,25 @@ var DomainSchema = external_exports.string().trim().toLowerCase().regex(/^(?!:\/
|
|
|
62715
62853
|
example: "acme.com"
|
|
62716
62854
|
});
|
|
62717
62855
|
|
|
62856
|
+
// ../hyperline-lib/build/http/dto/emailStatus.js
|
|
62857
|
+
var EmailStatusSchema = external_exports.enum([
|
|
62858
|
+
"sent",
|
|
62859
|
+
"delivered",
|
|
62860
|
+
"opened",
|
|
62861
|
+
"clicked",
|
|
62862
|
+
"spammed",
|
|
62863
|
+
"bounced",
|
|
62864
|
+
"queued",
|
|
62865
|
+
"drafted",
|
|
62866
|
+
"attempted",
|
|
62867
|
+
"failed",
|
|
62868
|
+
"undeliverable",
|
|
62869
|
+
"converted",
|
|
62870
|
+
"suppressed",
|
|
62871
|
+
"unsubscribed",
|
|
62872
|
+
"dropped"
|
|
62873
|
+
]);
|
|
62874
|
+
|
|
62718
62875
|
// ../hyperline-lib/build/http/dto/error.js
|
|
62719
62876
|
var ErrorSchema = external_exports.object({
|
|
62720
62877
|
message: external_exports.string()
|
|
@@ -65846,6 +66003,8 @@ var usStates = [
|
|
|
65846
66003
|
|
|
65847
66004
|
// ../hyperline-lib/build/utils/dates.js
|
|
65848
66005
|
var import_shared2 = __toESM(require_shared(), 1);
|
|
66006
|
+
var PERIOD_BOUND_DRIFT_TOLERANCE_MS = 2 * 60 * 1e3;
|
|
66007
|
+
var DST_SHIFT_MS = 60 * 60 * 1e3;
|
|
65849
66008
|
|
|
65850
66009
|
// ../hyperline-lib/build/utils/document.js
|
|
65851
66010
|
var import_shared3 = __toESM(require_shared(), 1);
|
|
@@ -65857,6 +66016,11 @@ import * as https from "node:https";
|
|
|
65857
66016
|
import { createHash as createHash2 } from "node:crypto";
|
|
65858
66017
|
import { deepEqual } from "fast-equals";
|
|
65859
66018
|
|
|
66019
|
+
// ../hyperline-lib/build/utils/realignDatesToTimezone.js
|
|
66020
|
+
var import_shared4 = __toESM(require_shared(), 1);
|
|
66021
|
+
var MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1e3;
|
|
66022
|
+
var LAST_MILLISECOND_OF_DAY = MILLISECONDS_PER_DAY - 1;
|
|
66023
|
+
|
|
65860
66024
|
// ../hyperline-lib/build/utils/api/filterBuilder.js
|
|
65861
66025
|
var baseAuthorizedOperators = ["not", "isNull", "isNotNull"];
|
|
65862
66026
|
var booleanAuthorizedOperators = [
|
|
@@ -65923,7 +66087,151 @@ var isAxiosError = axios.isAxiosError;
|
|
|
65923
66087
|
|
|
65924
66088
|
// ../hyperline-lib/build/httpClient/httpClient.js
|
|
65925
66089
|
import axios2 from "axios";
|
|
65926
|
-
import axiosRetry, { isNetworkOrIdempotentRequestError } from "axios-retry";
|
|
66090
|
+
import axiosRetry, { isNetworkOrIdempotentRequestError, retryAfter } from "axios-retry";
|
|
66091
|
+
|
|
66092
|
+
// ../hyperline-lib/build/httpClient/logRedaction.js
|
|
66093
|
+
var REDACTED_KEY_NAMES = /* @__PURE__ */ new Set([
|
|
66094
|
+
"accesstoken",
|
|
66095
|
+
"apikey",
|
|
66096
|
+
"apitoken",
|
|
66097
|
+
"assertion",
|
|
66098
|
+
"authtoken",
|
|
66099
|
+
"clientassertion",
|
|
66100
|
+
"codeverifier",
|
|
66101
|
+
"credentials",
|
|
66102
|
+
"idtoken",
|
|
66103
|
+
"privatekey",
|
|
66104
|
+
"refreshtoken",
|
|
66105
|
+
"sessiontoken",
|
|
66106
|
+
"token"
|
|
66107
|
+
]);
|
|
66108
|
+
var REDACTED_KEY_SUFFIX_PATTERN = /(secret|password)$/;
|
|
66109
|
+
var REDACTED_KEY_CANDIDATE_PATTERN = /token|key|secret|password|assertion|verifier|credentials/i;
|
|
66110
|
+
var REDACTED_VALUE = "<redacted>";
|
|
66111
|
+
var MAX_REDACTION_DEPTH = 10;
|
|
66112
|
+
var MAX_PARSED_STRING_LENGTH = 16384;
|
|
66113
|
+
var MAX_VISITED_NODES = 1e3;
|
|
66114
|
+
var MAX_CONTAINER_ENTRIES = MAX_VISITED_NODES;
|
|
66115
|
+
function redactLogBody({ body }) {
|
|
66116
|
+
return redactValue({
|
|
66117
|
+
value: body,
|
|
66118
|
+
depth: MAX_REDACTION_DEPTH,
|
|
66119
|
+
budget: { remainingNodes: MAX_VISITED_NODES }
|
|
66120
|
+
});
|
|
66121
|
+
}
|
|
66122
|
+
function redactLogUrl({ url: url2 }) {
|
|
66123
|
+
const queryIndex = url2.indexOf("?");
|
|
66124
|
+
if (queryIndex === -1 || url2.length > MAX_PARSED_STRING_LENGTH) {
|
|
66125
|
+
return url2;
|
|
66126
|
+
}
|
|
66127
|
+
const redactedQuery = redactFormEncoded({ text: url2.slice(queryIndex + 1) });
|
|
66128
|
+
return redactedQuery === void 0 ? url2 : `${url2.slice(0, queryIndex)}?${redactedQuery}`;
|
|
66129
|
+
}
|
|
66130
|
+
function redactValue({ value, depth, budget }) {
|
|
66131
|
+
if (depth <= 0 || budget.remainingNodes <= 0) {
|
|
66132
|
+
return value;
|
|
66133
|
+
}
|
|
66134
|
+
budget.remainingNodes -= 1;
|
|
66135
|
+
if (typeof value === "string") {
|
|
66136
|
+
return redactString({ text: value, budget });
|
|
66137
|
+
}
|
|
66138
|
+
if (value instanceof URLSearchParams) {
|
|
66139
|
+
return redactFormEncoded({ text: value.toString() }) ?? value;
|
|
66140
|
+
}
|
|
66141
|
+
if (Array.isArray(value)) {
|
|
66142
|
+
return redactArray({ items: value, depth, budget });
|
|
66143
|
+
}
|
|
66144
|
+
if (isPlainObject2(value)) {
|
|
66145
|
+
return redactObject({ record: value, depth, budget });
|
|
66146
|
+
}
|
|
66147
|
+
return value;
|
|
66148
|
+
}
|
|
66149
|
+
function redactArray({ items, depth, budget }) {
|
|
66150
|
+
if (items.length > MAX_CONTAINER_ENTRIES) {
|
|
66151
|
+
return items;
|
|
66152
|
+
}
|
|
66153
|
+
let redactedItems;
|
|
66154
|
+
for (const [index, item] of items.entries()) {
|
|
66155
|
+
if (budget.remainingNodes <= 0) {
|
|
66156
|
+
break;
|
|
66157
|
+
}
|
|
66158
|
+
const redactedItem = redactValue({ value: item, depth: depth - 1, budget });
|
|
66159
|
+
if (redactedItem !== item) {
|
|
66160
|
+
redactedItems ??= [...items];
|
|
66161
|
+
redactedItems[index] = redactedItem;
|
|
66162
|
+
}
|
|
66163
|
+
}
|
|
66164
|
+
return redactedItems ?? items;
|
|
66165
|
+
}
|
|
66166
|
+
function redactObject({ record: record2, depth, budget }) {
|
|
66167
|
+
const redactedEntries = /* @__PURE__ */ new Map();
|
|
66168
|
+
let entryCount = 0;
|
|
66169
|
+
for (const key in record2) {
|
|
66170
|
+
if (!Object.hasOwn(record2, key)) {
|
|
66171
|
+
continue;
|
|
66172
|
+
}
|
|
66173
|
+
entryCount += 1;
|
|
66174
|
+
if (entryCount > MAX_CONTAINER_ENTRIES) {
|
|
66175
|
+
return record2;
|
|
66176
|
+
}
|
|
66177
|
+
if (budget.remainingNodes <= 0) {
|
|
66178
|
+
break;
|
|
66179
|
+
}
|
|
66180
|
+
const nestedValue = record2[key];
|
|
66181
|
+
const redactedNestedValue = isRedactedKey({ key }) && nestedValue != null ? REDACTED_VALUE : redactValue({ value: nestedValue, depth: depth - 1, budget });
|
|
66182
|
+
if (redactedNestedValue !== nestedValue) {
|
|
66183
|
+
redactedEntries.set(key, redactedNestedValue);
|
|
66184
|
+
}
|
|
66185
|
+
}
|
|
66186
|
+
return redactedEntries.size === 0 ? record2 : { ...record2, ...Object.fromEntries(redactedEntries) };
|
|
66187
|
+
}
|
|
66188
|
+
function redactString({ text, budget }) {
|
|
66189
|
+
if (text.length > MAX_PARSED_STRING_LENGTH) {
|
|
66190
|
+
return text;
|
|
66191
|
+
}
|
|
66192
|
+
const trimmedText = text.trim();
|
|
66193
|
+
if (trimmedText.startsWith("{") || trimmedText.startsWith("[")) {
|
|
66194
|
+
try {
|
|
66195
|
+
const parsedValue = JSON.parse(trimmedText);
|
|
66196
|
+
const redactedValue = redactValue({
|
|
66197
|
+
value: parsedValue,
|
|
66198
|
+
depth: MAX_REDACTION_DEPTH,
|
|
66199
|
+
budget
|
|
66200
|
+
});
|
|
66201
|
+
return redactedValue === parsedValue ? text : JSON.stringify(redactedValue);
|
|
66202
|
+
} catch {
|
|
66203
|
+
return text;
|
|
66204
|
+
}
|
|
66205
|
+
}
|
|
66206
|
+
return redactFormEncoded({ text }) ?? text;
|
|
66207
|
+
}
|
|
66208
|
+
function redactFormEncoded({ text }) {
|
|
66209
|
+
if (!text.includes("=") || !REDACTED_KEY_CANDIDATE_PATTERN.test(text)) {
|
|
66210
|
+
return void 0;
|
|
66211
|
+
}
|
|
66212
|
+
const params = new URLSearchParams(text);
|
|
66213
|
+
let hasRedactedParam = false;
|
|
66214
|
+
for (const key of new Set(params.keys())) {
|
|
66215
|
+
if (isRedactedKey({ key })) {
|
|
66216
|
+
params.set(key, REDACTED_VALUE);
|
|
66217
|
+
hasRedactedParam = true;
|
|
66218
|
+
}
|
|
66219
|
+
}
|
|
66220
|
+
return hasRedactedParam ? params.toString() : void 0;
|
|
66221
|
+
}
|
|
66222
|
+
function isRedactedKey({ key }) {
|
|
66223
|
+
const normalizedKey = key.toLowerCase().replace(/[_-]/g, "");
|
|
66224
|
+
return REDACTED_KEY_NAMES.has(normalizedKey) || REDACTED_KEY_SUFFIX_PATTERN.test(normalizedKey);
|
|
66225
|
+
}
|
|
66226
|
+
function isPlainObject2(value) {
|
|
66227
|
+
if (typeof value !== "object" || value === null) {
|
|
66228
|
+
return false;
|
|
66229
|
+
}
|
|
66230
|
+
const prototype = Object.getPrototypeOf(value);
|
|
66231
|
+
return prototype === Object.prototype || prototype === null;
|
|
66232
|
+
}
|
|
66233
|
+
|
|
66234
|
+
// ../hyperline-lib/build/httpClient/httpClient.js
|
|
65927
66235
|
import { AxiosError } from "axios";
|
|
65928
66236
|
var recommendedRetryConfig = {
|
|
65929
66237
|
retries: 3,
|
|
@@ -65991,13 +66299,14 @@ function isTooManyRequestsError(error48) {
|
|
|
65991
66299
|
return error48.response?.status === 429;
|
|
65992
66300
|
}
|
|
65993
66301
|
var toLogRequest = (config4) => {
|
|
66302
|
+
const url2 = redactLogUrl({ url: config4.url ?? "" });
|
|
65994
66303
|
return {
|
|
65995
66304
|
method: config4.method ?? "",
|
|
65996
|
-
url:
|
|
65997
|
-
path:
|
|
66305
|
+
url: url2,
|
|
66306
|
+
path: url2,
|
|
65998
66307
|
hostname: config4.baseURL ?? "",
|
|
65999
|
-
originalUrl: `${config4.baseURL ?? ""}${
|
|
66000
|
-
body: config4.data,
|
|
66308
|
+
originalUrl: `${config4.baseURL ?? ""}${url2}`,
|
|
66309
|
+
body: redactLogBody({ body: config4.data }),
|
|
66001
66310
|
headers: {}
|
|
66002
66311
|
};
|
|
66003
66312
|
};
|