@hyperline/cli 0.1.0-build.1.64a14fb → 0.1.0-build.1.65aac53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34894,10 +34894,10 @@ var require_shared = __commonJS({
34894
34894
  ZodId: () => ZodId,
34895
34895
  ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
34896
34896
  });
34897
- var import_zod18 = require_lib();
34897
+ var import_zod20 = require_lib();
34898
34898
  var countryIds2 = ["all", ...countries.map(({ id }) => id)];
34899
- var ZodId = import_zod18.z.enum(countryIds2);
34900
- var ZodTranslationsSchemaFn = (schema) => import_zod18.z.record(import_zod18.z.string(), schema.optional());
34899
+ var ZodId = import_zod20.z.enum(countryIds2);
34900
+ var ZodTranslationsSchemaFn = (schema) => import_zod20.z.record(import_zod20.z.string(), schema.optional());
34901
34901
  var UsStates = [
34902
34902
  { id: "AA", name: "Armed Forces Americas" },
34903
34903
  { id: "AE", name: "Armed Forces Europe" },
@@ -37934,7 +37934,7 @@ Examples:
37934
37934
  queryParamKeys: ["take", "skip"]
37935
37935
  });
37936
37936
  });
37937
- resource.command("get").description(`Retrieve a specific bank account by its ID. Returns bank account details including IBAN, BIC, and currency.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
37937
+ resource.command("get").description(`Retrieve a specific bank account by its ID. Returns masked bank account details, account type, balance, and currency.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
37938
37938
  Examples:
37939
37939
  hyperline bank-accounts get --id <id>`).action(async (opts) => {
37940
37940
  const ctx = resource.parent?.opts()._ctx;
@@ -37952,6 +37952,31 @@ Examples:
37952
37952
  queryParamKeys: []
37953
37953
  });
37954
37954
  });
37955
+ resource.command("list-bank-account-transactions").description(`List open banking transactions for a specific bank account. Paginated with limit/cursor.`).requiredOption("--id <value>", `id parameter`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).addHelpText("after", `
37956
+ Examples:
37957
+ hyperline bank-accounts list-bank-account-transactions --id <id>
37958
+ hyperline bank-accounts list-bank-account-transactions --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
37959
+ const ctx = resource.parent?.opts()._ctx;
37960
+ if (!ctx) {
37961
+ process.stderr.write("Error: Not authenticated\n");
37962
+ process.exit(1);
37963
+ }
37964
+ const args = {};
37965
+ if (opts.id !== void 0)
37966
+ args.id = opts.id;
37967
+ if (opts.cursor !== void 0)
37968
+ args.cursor = opts.cursor;
37969
+ if (opts.includeTotal !== void 0)
37970
+ args.include_total = opts.includeTotal;
37971
+ if (opts.limit !== void 0)
37972
+ args.limit = Number(opts.limit);
37973
+ await ctx.execute({
37974
+ method: "GET",
37975
+ path: "/v1/bank-accounts/{id}/transactions",
37976
+ args,
37977
+ queryParamKeys: ["limit", "cursor", "include_total"]
37978
+ });
37979
+ });
37955
37980
  }
37956
37981
 
37957
37982
  // build/commands/generated/companies.js
@@ -38020,7 +38045,7 @@ Examples:
38020
38045
  queryParamKeys: ["take", "skip"]
38021
38046
  });
38022
38047
  });
38023
- resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38048
+ resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38024
38049
  Examples:
38025
38050
  hyperline coupons create --name <name> --type <type>
38026
38051
  hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38039,6 +38064,10 @@ Examples:
38039
38064
  args.expiration_date = opts.expirationDate;
38040
38065
  if (opts.productIds !== void 0)
38041
38066
  args.product_ids = opts.productIds;
38067
+ if (opts.repeat !== void 0)
38068
+ args.repeat = opts.repeat;
38069
+ if (opts.duration !== void 0)
38070
+ args.duration = opts.duration;
38042
38071
  if (opts.type !== void 0)
38043
38072
  args.type = opts.type;
38044
38073
  if (opts.currency !== void 0)
@@ -38074,7 +38103,7 @@ Examples:
38074
38103
  queryParamKeys: []
38075
38104
  });
38076
38105
  });
38077
- resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38106
+ resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38078
38107
  Examples:
38079
38108
  hyperline coupons update --id <id> --name <name> --type <type>
38080
38109
  hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38095,6 +38124,10 @@ Examples:
38095
38124
  args.expiration_date = opts.expirationDate;
38096
38125
  if (opts.productIds !== void 0)
38097
38126
  args.product_ids = opts.productIds;
38127
+ if (opts.repeat !== void 0)
38128
+ args.repeat = opts.repeat;
38129
+ if (opts.duration !== void 0)
38130
+ args.duration = opts.duration;
38098
38131
  if (opts.type !== void 0)
38099
38132
  args.type = opts.type;
38100
38133
  if (opts.currency !== void 0)
@@ -38336,10 +38369,10 @@ Examples:
38336
38369
  queryParamKeys: []
38337
38370
  });
38338
38371
  });
38339
- resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (string, number, boolean, date, select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <value>", `entities`).option("--api-only", `api_only`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
38372
+ resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (string, number, boolean, date, select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <value>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
38340
38373
  Examples:
38341
38374
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities>
38342
- hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --authorized-values <authorized_values>
38375
+ hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
38343
38376
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --output json`).action(async (opts) => {
38344
38377
  const ctx = resource.parent?.opts()._ctx;
38345
38378
  if (!ctx) {
@@ -38359,6 +38392,8 @@ Examples:
38359
38392
  args.authorized_values = opts.authorizedValues;
38360
38393
  if (opts.apiOnly !== void 0)
38361
38394
  args.api_only = true;
38395
+ if (opts.required !== void 0)
38396
+ args.required = true;
38362
38397
  await ctx.execute({
38363
38398
  method: "POST",
38364
38399
  path: "/v1/custom-properties",
@@ -38366,10 +38401,10 @@ Examples:
38366
38401
  queryParamKeys: []
38367
38402
  });
38368
38403
  });
38369
- 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 <value>", `entities`).option("--api-only", `api_only`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
38404
+ 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 <value>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
38370
38405
  Examples:
38371
38406
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities>
38372
- hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --authorized-values <authorized_values>
38407
+ hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
38373
38408
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --output json`).action(async (opts) => {
38374
38409
  const ctx = resource.parent?.opts()._ctx;
38375
38410
  if (!ctx) {
@@ -38391,6 +38426,8 @@ Examples:
38391
38426
  args.authorized_values = opts.authorizedValues;
38392
38427
  if (opts.apiOnly !== void 0)
38393
38428
  args.api_only = true;
38429
+ if (opts.required !== void 0)
38430
+ args.required = true;
38394
38431
  await ctx.execute({
38395
38432
  method: "PUT",
38396
38433
  path: "/v1/custom-properties/{id}",
@@ -38429,16 +38466,24 @@ Examples:
38429
38466
  // build/commands/generated/customers.js
38430
38467
  function registerCustomersCommands(parent) {
38431
38468
  const resource = parent.command("customers").description("Manage customers");
38432
- resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, created_at, updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--currency.equals <value>", `currency__equals`).option("--currency.contains <value>", `currency__contains`).option("--currency.starts-with <value>", `currency__startsWith`).option("--currency.end-with <value>", `currency__endWith`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `custom_properties`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--integration-entity-id <value>", `integration_entity_id`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).option("--created-at.equals <value>", `created_at__equals`).option("--created-at.lt <value>", `created_at__lt`).option("--created-at.lte <value>", `created_at__lte`).option("--created-at.gt <value>", `created_at__gt`).option("--created-at.gte <value>", `created_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
38469
+ resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, integration_entity_id, created_at, and updated_at. Sortable by created_at or updated_at. Paginated with limit/cursor.`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--currency.equals <value>", `currency__equals`).option("--currency.contains <value>", `currency__contains`).option("--currency.starts-with <value>", `currency__startsWith`).option("--currency.end-with <value>", `currency__endWith`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `custom_properties`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--integration-entity-id <value>", `integration_entity_id`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).option("--created-at.equals <value>", `created_at__equals`).option("--created-at.lt <value>", `created_at__lt`).option("--created-at.lte <value>", `created_at__lte`).option("--created-at.gt <value>", `created_at__gt`).option("--created-at.gte <value>", `created_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
38433
38470
  Examples:
38434
38471
  hyperline customers list
38435
- hyperline customers list --take <take> --name <name>`).action(async (opts) => {
38472
+ hyperline customers list --limit <limit> --cursor <cursor>`).action(async (opts) => {
38436
38473
  const ctx = resource.parent?.opts()._ctx;
38437
38474
  if (!ctx) {
38438
38475
  process.stderr.write("Error: Not authenticated\n");
38439
38476
  process.exit(1);
38440
38477
  }
38441
38478
  const args = {};
38479
+ if (opts.cursor !== void 0)
38480
+ args.cursor = opts.cursor;
38481
+ if (opts.includeTotal !== void 0)
38482
+ args.include_total = opts.includeTotal;
38483
+ if (opts.order !== void 0)
38484
+ args.order = opts.order;
38485
+ if (opts.sort !== void 0)
38486
+ args.sort = opts.sort;
38442
38487
  if (opts.name !== void 0)
38443
38488
  args.name = opts.name;
38444
38489
  if (opts["name.not"] !== void 0)
@@ -38611,17 +38656,18 @@ Examples:
38611
38656
  args.updated_at__gt = opts["updatedAt.gt"];
38612
38657
  if (opts["updatedAt.gte"] !== void 0)
38613
38658
  args.updated_at__gte = opts["updatedAt.gte"];
38614
- if (opts.take !== void 0)
38615
- args.take = Number(opts.take);
38616
- if (opts.skip !== void 0)
38617
- args.skip = Number(opts.skip);
38659
+ if (opts.limit !== void 0)
38660
+ args.limit = Number(opts.limit);
38618
38661
  await ctx.execute({
38619
38662
  method: "GET",
38620
- path: "/v1/customers",
38663
+ path: "/v2/customers",
38621
38664
  args,
38622
38665
  queryParamKeys: [
38623
- "take",
38624
- "skip",
38666
+ "limit",
38667
+ "cursor",
38668
+ "include_total",
38669
+ "order",
38670
+ "sort",
38625
38671
  "name",
38626
38672
  "name__not",
38627
38673
  "name__isNull",
@@ -38711,19 +38757,41 @@ Examples:
38711
38757
  ]
38712
38758
  });
38713
38759
  });
38760
+ resource.command("get").description(`Retrieve full details of a customer by ID including billing info, address, subscriptions, custom properties, integrations, payment method, and bank account.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38761
+ Examples:
38762
+ hyperline customers get --id <id>`).action(async (opts) => {
38763
+ const ctx = resource.parent?.opts()._ctx;
38764
+ if (!ctx) {
38765
+ process.stderr.write("Error: Not authenticated\n");
38766
+ process.exit(1);
38767
+ }
38768
+ const args = {};
38769
+ if (opts.id !== void 0)
38770
+ args.id = opts.id;
38771
+ await ctx.execute({
38772
+ method: "GET",
38773
+ path: "/v2/customers/{id}",
38774
+ args,
38775
+ queryParamKeys: []
38776
+ });
38777
+ });
38714
38778
  resource.command("create-customer").description(`Create a new customer with billing details, address, currency, and optional provider mappings. Returns the full customer object.`).option("--name <value>", `Customer name.`).option("--type <value>", `
38715
38779
  Customer type.
38716
38780
 
38717
38781
  - \`corporate\`: The customer is a business entity.
38718
38782
  - \`person\`: The customer is a natural person.
38719
38783
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38720
- `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment delay. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay for payment collection. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
38784
+ `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
38785
+
38786
+ - \`taxable\`: Taxes are automatically determined for the customer.
38787
+ - \`exempt\`: The customer is exempt from tax.
38788
+ `).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 <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
38721
38789
  How customer invoices are issued from the parent organisation.
38722
38790
 
38723
38791
  - \`none\`: Invoices will keep being issued from this customer.
38724
38792
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38725
38793
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38726
- `).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--invoice-reminders-enabled <value>", `Indicates if invoice reminders are enabled for the customer.`).option("--price-book-id <value>", `Default price book ID assigned to the customer.`).addHelpText("after", `
38794
+ `).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--invoice-reminders-enabled <value>", `Indicates if invoice reminders are enabled for the customer.`).option("--price-book-id <value>", `Default price book ID assigned to the customer.`).option("--owner-id <value>", `ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.`).option("--follower-ids <value>", `IDs of Hyperline users following this customer.`).addHelpText("after", `
38727
38795
  Examples:
38728
38796
  hyperline customers create-customer
38729
38797
  hyperline customers create-customer --name <name> --type <type>
@@ -38742,10 +38810,14 @@ Examples:
38742
38810
  args.currency = opts.currency;
38743
38811
  if (opts.taxIds !== void 0)
38744
38812
  args.tax_ids = opts.taxIds;
38813
+ if (opts.taxability !== void 0)
38814
+ args.taxability = opts.taxability;
38745
38815
  if (opts.registrationNumber !== void 0)
38746
38816
  args.registration_number = opts.registrationNumber;
38747
38817
  if (opts.externalId !== void 0)
38748
38818
  args.external_id = opts.externalId;
38819
+ if (opts.domain !== void 0)
38820
+ args.domain = opts.domain;
38749
38821
  if (opts.invoicingEntityId !== void 0)
38750
38822
  args.invoicing_entity_id = opts.invoicingEntityId;
38751
38823
  if (opts.billingAddress !== void 0)
@@ -38778,6 +38850,10 @@ Examples:
38778
38850
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
38779
38851
  if (opts.priceBookId !== void 0)
38780
38852
  args.price_book_id = opts.priceBookId;
38853
+ if (opts.ownerId !== void 0)
38854
+ args.owner_id = opts.ownerId;
38855
+ if (opts.followerIds !== void 0)
38856
+ args.follower_ids = opts.followerIds;
38781
38857
  if (opts.taxRateCustom !== void 0)
38782
38858
  args.tax_rate_custom = Number(opts.taxRateCustom);
38783
38859
  if (opts.customPaymentDelay !== void 0)
@@ -38812,24 +38888,6 @@ Examples:
38812
38888
  queryParamKeys: []
38813
38889
  });
38814
38890
  });
38815
- resource.command("get").description(`Retrieve full details of a customer by ID including billing info, address, subscriptions, custom properties, and provider mappings.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38816
- Examples:
38817
- hyperline customers get --id <id>`).action(async (opts) => {
38818
- const ctx = resource.parent?.opts()._ctx;
38819
- if (!ctx) {
38820
- process.stderr.write("Error: Not authenticated\n");
38821
- process.exit(1);
38822
- }
38823
- const args = {};
38824
- if (opts.id !== void 0)
38825
- args.id = opts.id;
38826
- await ctx.execute({
38827
- method: "GET",
38828
- path: "/v1/customers/{id}",
38829
- args,
38830
- queryParamKeys: []
38831
- });
38832
- });
38833
38891
  resource.command("get-customer-portal-url").description(`Get a portal URL for a customer. The portal allows the customer to view invoices, update payment methods, and manage their account.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38834
38892
  Examples:
38835
38893
  hyperline customers get-customer-portal-url --id <id>`).action(async (opts) => {
@@ -38854,13 +38912,17 @@ Customer type.
38854
38912
  - \`corporate\`: The customer is a business entity.
38855
38913
  - \`person\`: The customer is a natural person.
38856
38914
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38857
- `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment delay. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay for payment collection. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
38915
+ `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
38916
+
38917
+ - \`taxable\`: Taxes are automatically determined for the customer.
38918
+ - \`exempt\`: The customer is exempt from tax.
38919
+ `).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 <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
38858
38920
  How customer invoices are issued from the parent organisation.
38859
38921
 
38860
38922
  - \`none\`: Invoices will keep being issued from this customer.
38861
38923
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38862
38924
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38863
- `).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--invoice-reminders-enabled <value>", `Indicates if invoice reminders are enabled for the customer.`).option("--price-book-id <value>", `Default price book ID assigned to the customer.`).addHelpText("after", `
38925
+ `).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--invoice-reminders-enabled <value>", `Indicates if invoice reminders are enabled for the customer.`).option("--price-book-id <value>", `Default price book ID assigned to the customer.`).option("--owner-id <value>", `ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.`).option("--follower-ids <value>", `IDs of Hyperline users following this customer.`).addHelpText("after", `
38864
38926
  Examples:
38865
38927
  hyperline customers update --id <id>
38866
38928
  hyperline customers update --id <id> --name <name> --type <type>
@@ -38881,10 +38943,14 @@ Examples:
38881
38943
  args.currency = opts.currency;
38882
38944
  if (opts.taxIds !== void 0)
38883
38945
  args.tax_ids = opts.taxIds;
38946
+ if (opts.taxability !== void 0)
38947
+ args.taxability = opts.taxability;
38884
38948
  if (opts.registrationNumber !== void 0)
38885
38949
  args.registration_number = opts.registrationNumber;
38886
38950
  if (opts.externalId !== void 0)
38887
38951
  args.external_id = opts.externalId;
38952
+ if (opts.domain !== void 0)
38953
+ args.domain = opts.domain;
38888
38954
  if (opts.invoicingEntityId !== void 0)
38889
38955
  args.invoicing_entity_id = opts.invoicingEntityId;
38890
38956
  if (opts.billingAddress !== void 0)
@@ -38919,6 +38985,10 @@ Examples:
38919
38985
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
38920
38986
  if (opts.priceBookId !== void 0)
38921
38987
  args.price_book_id = opts.priceBookId;
38988
+ if (opts.ownerId !== void 0)
38989
+ args.owner_id = opts.ownerId;
38990
+ if (opts.followerIds !== void 0)
38991
+ args.follower_ids = opts.followerIds;
38922
38992
  if (opts.taxRateCustom !== void 0)
38923
38993
  args.tax_rate_custom = Number(opts.taxRateCustom);
38924
38994
  if (opts.customPaymentDelay !== void 0)
@@ -39050,6 +39120,38 @@ Examples:
39050
39120
  queryParamKeys: []
39051
39121
  });
39052
39122
  });
39123
+ resource.command("get-customer-arr-history").description(`List every subscription-level ARR evolution for a customer, including previous and current fixed, variable, and total annual values in each subscription currency. Results are latest-first and paginated with limit/cursor.`).requiredOption("--id <value>", `id parameter`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--occurred-at.gte <value>", `Return evolutions that occurred at or after this UTC date and time.`).option("--occurred-at.lte <value>", `Return evolutions that occurred at or before this UTC date and time.`).addHelpText("after", `
39124
+ Examples:
39125
+ hyperline customers get-customer-arr-history --id <id>
39126
+ hyperline customers get-customer-arr-history --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
39127
+ const ctx = resource.parent?.opts()._ctx;
39128
+ if (!ctx) {
39129
+ process.stderr.write("Error: Not authenticated\n");
39130
+ process.exit(1);
39131
+ }
39132
+ const args = {};
39133
+ if (opts.id !== void 0)
39134
+ args.id = opts.id;
39135
+ if (opts.cursor !== void 0)
39136
+ args.cursor = opts.cursor;
39137
+ if (opts["occurredAt.gte"] !== void 0)
39138
+ args.occurred_at__gte = opts["occurredAt.gte"];
39139
+ if (opts["occurredAt.lte"] !== void 0)
39140
+ args.occurred_at__lte = opts["occurredAt.lte"];
39141
+ if (opts.limit !== void 0)
39142
+ args.limit = Number(opts.limit);
39143
+ await ctx.execute({
39144
+ method: "GET",
39145
+ path: "/v1/customers/{id}/arr-history",
39146
+ args,
39147
+ queryParamKeys: [
39148
+ "limit",
39149
+ "cursor",
39150
+ "occurred_at__gte",
39151
+ "occurred_at__lte"
39152
+ ]
39153
+ });
39154
+ });
39053
39155
  resource.command("get-customer-valuation").description(`Compute aggregated valuation metrics for a customer across all active subscriptions, grouped by currency. Returns contract value, recurring contract value, and ARR for each subscription and aggregated totals. Optionally pass granularity (year/quarter/month) for period breakdown.`).requiredOption("--id <value>", `id parameter`).option("--granularity <value>", `Period granularity for the breakdown. When provided, contract value and recurring contract value include a \`by_period\` array.`).addHelpText("after", `
39054
39156
  Examples:
39055
39157
  hyperline customers get-customer-valuation --id <id>
@@ -39583,6 +39685,7 @@ Export name.
39583
39685
  - \`draft_invoices\`: Export all draft invoices, with customer and product information.
39584
39686
  - \`open_invoices\`: Export all open invoices, with customer and product information.
39585
39687
  - \`live_subscriptions\`: List of all active subscriptions line by line.
39688
+ - \`credit_balances\`: Monthly credit balance roll-forward per customer and credit type (opening, top-ups, consumption, expiry, closing).
39586
39689
  `).requiredOption("--file-type <value>", `
39587
39690
  Export file type.
39588
39691
 
@@ -39816,16 +39919,20 @@ Examples:
39816
39919
  // build/commands/generated/invoices.js
39817
39920
  function registerInvoicesCommands(parent) {
39818
39921
  const resource = parent.command("invoices").description("Manage invoices");
39819
- resource.command("list").description(`List invoices with filters for type, status, customer_id, customer_external_id, subscription_id, invoicing_entity_id, invoice_number, period dates, emission_date, due_date, and updated_at. Sortable by created_at or emitted_at. By default, open invoices are excluded. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--customer-external-id <value>", `customer_external_id`).option("--subscription-id <value>", `subscription_id`).option("--subscription-id.not <value>", `subscription_id__not`).option("--subscription-id.is-null <value>", `subscription_id__isNull`).option("--subscription-id.is-not-null <value>", `subscription_id__isNotNull`).option("--subscription-id.equals <value>", `subscription_id__equals`).option("--subscription-id.contains <value>", `subscription_id__contains`).option("--subscription-id.starts-with <value>", `subscription_id__startsWith`).option("--subscription-id.end-with <value>", `subscription_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--invoice-number <value>", `invoice_number`).option("--invoice-number.not <value>", `invoice_number__not`).option("--invoice-number.is-null <value>", `invoice_number__isNull`).option("--invoice-number.is-not-null <value>", `invoice_number__isNotNull`).option("--invoice-number.equals <value>", `invoice_number__equals`).option("--invoice-number.contains <value>", `invoice_number__contains`).option("--invoice-number.starts-with <value>", `invoice_number__startsWith`).option("--invoice-number.end-with <value>", `invoice_number__endWith`).option("--original-invoice-id <value>", `original_invoice_id`).option("--original-invoice-id.not <value>", `original_invoice_id__not`).option("--original-invoice-id.is-null <value>", `original_invoice_id__isNull`).option("--original-invoice-id.is-not-null <value>", `original_invoice_id__isNotNull`).option("--original-invoice-id.equals <value>", `original_invoice_id__equals`).option("--original-invoice-id.contains <value>", `original_invoice_id__contains`).option("--original-invoice-id.starts-with <value>", `original_invoice_id__startsWith`).option("--original-invoice-id.end-with <value>", `original_invoice_id__endWith`).option("--original-invoice-number <value>", `original_invoice_number`).option("--original-invoice-number.not <value>", `original_invoice_number__not`).option("--original-invoice-number.is-null <value>", `original_invoice_number__isNull`).option("--original-invoice-number.is-not-null <value>", `original_invoice_number__isNotNull`).option("--original-invoice-number.equals <value>", `original_invoice_number__equals`).option("--original-invoice-number.contains <value>", `original_invoice_number__contains`).option("--original-invoice-number.starts-with <value>", `original_invoice_number__startsWith`).option("--original-invoice-number.end-with <value>", `original_invoice_number__endWith`).option("--line-item-id <value>", `line_item_id`).option("--period-start <value>", `period_start`).option("--period-start.not <value>", `period_start__not`).option("--period-start.is-null <value>", `period_start__isNull`).option("--period-start.is-not-null <value>", `period_start__isNotNull`).option("--period-start.equals <value>", `period_start__equals`).option("--period-start.lt <value>", `period_start__lt`).option("--period-start.lte <value>", `period_start__lte`).option("--period-start.gt <value>", `period_start__gt`).option("--period-start.gte <value>", `period_start__gte`).option("--period-end <value>", `period_end`).option("--period-end.not <value>", `period_end__not`).option("--period-end.is-null <value>", `period_end__isNull`).option("--period-end.is-not-null <value>", `period_end__isNotNull`).option("--period-end.equals <value>", `period_end__equals`).option("--period-end.lt <value>", `period_end__lt`).option("--period-end.lte <value>", `period_end__lte`).option("--period-end.gt <value>", `period_end__gt`).option("--period-end.gte <value>", `period_end__gte`).option("--emission-date <value>", `emission_date`).option("--emission-date.not <value>", `emission_date__not`).option("--emission-date.is-null <value>", `emission_date__isNull`).option("--emission-date.is-not-null <value>", `emission_date__isNotNull`).option("--emission-date.equals <value>", `emission_date__equals`).option("--emission-date.lt <value>", `emission_date__lt`).option("--emission-date.lte <value>", `emission_date__lte`).option("--emission-date.gt <value>", `emission_date__gt`).option("--emission-date.gte <value>", `emission_date__gte`).option("--due-date <value>", `due_date`).option("--due-date.not <value>", `due_date__not`).option("--due-date.is-null <value>", `due_date__isNull`).option("--due-date.is-not-null <value>", `due_date__isNotNull`).option("--due-date.equals <value>", `due_date__equals`).option("--due-date.lt <value>", `due_date__lt`).option("--due-date.lte <value>", `due_date__lte`).option("--due-date.gt <value>", `due_date__gt`).option("--due-date.gte <value>", `due_date__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
39922
+ resource.command("list").description(`List invoices with filters for type, status, customer_id, customer_external_id, subscription_id, invoicing_entity_id, invoice_number, period dates, emission_date, due_date, and updated_at. Sortable by created_at or emitted_at. By default, open invoices are excluded. Paginated with limit/cursor.`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--customer-external-id <value>", `customer_external_id`).option("--subscription-id <value>", `subscription_id`).option("--subscription-id.not <value>", `subscription_id__not`).option("--subscription-id.is-null <value>", `subscription_id__isNull`).option("--subscription-id.is-not-null <value>", `subscription_id__isNotNull`).option("--subscription-id.equals <value>", `subscription_id__equals`).option("--subscription-id.contains <value>", `subscription_id__contains`).option("--subscription-id.starts-with <value>", `subscription_id__startsWith`).option("--subscription-id.end-with <value>", `subscription_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--invoice-number <value>", `invoice_number`).option("--invoice-number.not <value>", `invoice_number__not`).option("--invoice-number.is-null <value>", `invoice_number__isNull`).option("--invoice-number.is-not-null <value>", `invoice_number__isNotNull`).option("--invoice-number.equals <value>", `invoice_number__equals`).option("--invoice-number.contains <value>", `invoice_number__contains`).option("--invoice-number.starts-with <value>", `invoice_number__startsWith`).option("--invoice-number.end-with <value>", `invoice_number__endWith`).option("--original-invoice-id <value>", `original_invoice_id`).option("--original-invoice-id.not <value>", `original_invoice_id__not`).option("--original-invoice-id.is-null <value>", `original_invoice_id__isNull`).option("--original-invoice-id.is-not-null <value>", `original_invoice_id__isNotNull`).option("--original-invoice-id.equals <value>", `original_invoice_id__equals`).option("--original-invoice-id.contains <value>", `original_invoice_id__contains`).option("--original-invoice-id.starts-with <value>", `original_invoice_id__startsWith`).option("--original-invoice-id.end-with <value>", `original_invoice_id__endWith`).option("--original-invoice-number <value>", `original_invoice_number`).option("--original-invoice-number.not <value>", `original_invoice_number__not`).option("--original-invoice-number.is-null <value>", `original_invoice_number__isNull`).option("--original-invoice-number.is-not-null <value>", `original_invoice_number__isNotNull`).option("--original-invoice-number.equals <value>", `original_invoice_number__equals`).option("--original-invoice-number.contains <value>", `original_invoice_number__contains`).option("--original-invoice-number.starts-with <value>", `original_invoice_number__startsWith`).option("--original-invoice-number.end-with <value>", `original_invoice_number__endWith`).option("--line-item-id <value>", `line_item_id`).option("--period-start <value>", `period_start`).option("--period-start.not <value>", `period_start__not`).option("--period-start.is-null <value>", `period_start__isNull`).option("--period-start.is-not-null <value>", `period_start__isNotNull`).option("--period-start.equals <value>", `period_start__equals`).option("--period-start.lt <value>", `period_start__lt`).option("--period-start.lte <value>", `period_start__lte`).option("--period-start.gt <value>", `period_start__gt`).option("--period-start.gte <value>", `period_start__gte`).option("--period-end <value>", `period_end`).option("--period-end.not <value>", `period_end__not`).option("--period-end.is-null <value>", `period_end__isNull`).option("--period-end.is-not-null <value>", `period_end__isNotNull`).option("--period-end.equals <value>", `period_end__equals`).option("--period-end.lt <value>", `period_end__lt`).option("--period-end.lte <value>", `period_end__lte`).option("--period-end.gt <value>", `period_end__gt`).option("--period-end.gte <value>", `period_end__gte`).option("--issued-at <value>", `issued_at`).option("--issued-at.not <value>", `issued_at__not`).option("--issued-at.is-null <value>", `issued_at__isNull`).option("--issued-at.is-not-null <value>", `issued_at__isNotNull`).option("--issued-at.equals <value>", `issued_at__equals`).option("--issued-at.lt <value>", `issued_at__lt`).option("--issued-at.lte <value>", `issued_at__lte`).option("--issued-at.gt <value>", `issued_at__gt`).option("--issued-at.gte <value>", `issued_at__gte`).option("--due-at <value>", `due_at`).option("--due-at.not <value>", `due_at__not`).option("--due-at.is-null <value>", `due_at__isNull`).option("--due-at.is-not-null <value>", `due_at__isNotNull`).option("--due-at.equals <value>", `due_at__equals`).option("--due-at.lt <value>", `due_at__lt`).option("--due-at.lte <value>", `due_at__lte`).option("--due-at.gt <value>", `due_at__gt`).option("--due-at.gte <value>", `due_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).option("--updated-at.equals <value>", `updated_at__equals`).option("--updated-at.lt <value>", `updated_at__lt`).option("--updated-at.lte <value>", `updated_at__lte`).option("--updated-at.gt <value>", `updated_at__gt`).option("--updated-at.gte <value>", `updated_at__gte`).addHelpText("after", `
39820
39923
  Examples:
39821
39924
  hyperline invoices list
39822
- hyperline invoices list --take <take> --order <order>`).action(async (opts) => {
39925
+ hyperline invoices list --limit <limit> --cursor <cursor>`).action(async (opts) => {
39823
39926
  const ctx = resource.parent?.opts()._ctx;
39824
39927
  if (!ctx) {
39825
39928
  process.stderr.write("Error: Not authenticated\n");
39826
39929
  process.exit(1);
39827
39930
  }
39828
39931
  const args = {};
39932
+ if (opts.cursor !== void 0)
39933
+ args.cursor = opts.cursor;
39934
+ if (opts.includeTotal !== void 0)
39935
+ args.include_total = opts.includeTotal;
39829
39936
  if (opts.order !== void 0)
39830
39937
  args.order = opts.order;
39831
39938
  if (opts.sort !== void 0)
@@ -39974,42 +40081,42 @@ Examples:
39974
40081
  args.period_end__gt = opts["periodEnd.gt"];
39975
40082
  if (opts["periodEnd.gte"] !== void 0)
39976
40083
  args.period_end__gte = opts["periodEnd.gte"];
39977
- if (opts.emissionDate !== void 0)
39978
- args.emission_date = opts.emissionDate;
39979
- if (opts["emissionDate.not"] !== void 0)
39980
- args.emission_date__not = opts["emissionDate.not"];
39981
- if (opts["emissionDate.isNull"] !== void 0)
39982
- args.emission_date__isNull = opts["emissionDate.isNull"];
39983
- if (opts["emissionDate.isNotNull"] !== void 0)
39984
- args.emission_date__isNotNull = opts["emissionDate.isNotNull"];
39985
- if (opts["emissionDate.equals"] !== void 0)
39986
- args.emission_date__equals = opts["emissionDate.equals"];
39987
- if (opts["emissionDate.lt"] !== void 0)
39988
- args.emission_date__lt = opts["emissionDate.lt"];
39989
- if (opts["emissionDate.lte"] !== void 0)
39990
- args.emission_date__lte = opts["emissionDate.lte"];
39991
- if (opts["emissionDate.gt"] !== void 0)
39992
- args.emission_date__gt = opts["emissionDate.gt"];
39993
- if (opts["emissionDate.gte"] !== void 0)
39994
- args.emission_date__gte = opts["emissionDate.gte"];
39995
- if (opts.dueDate !== void 0)
39996
- args.due_date = opts.dueDate;
39997
- if (opts["dueDate.not"] !== void 0)
39998
- args.due_date__not = opts["dueDate.not"];
39999
- if (opts["dueDate.isNull"] !== void 0)
40000
- args.due_date__isNull = opts["dueDate.isNull"];
40001
- if (opts["dueDate.isNotNull"] !== void 0)
40002
- args.due_date__isNotNull = opts["dueDate.isNotNull"];
40003
- if (opts["dueDate.equals"] !== void 0)
40004
- args.due_date__equals = opts["dueDate.equals"];
40005
- if (opts["dueDate.lt"] !== void 0)
40006
- args.due_date__lt = opts["dueDate.lt"];
40007
- if (opts["dueDate.lte"] !== void 0)
40008
- args.due_date__lte = opts["dueDate.lte"];
40009
- if (opts["dueDate.gt"] !== void 0)
40010
- args.due_date__gt = opts["dueDate.gt"];
40011
- if (opts["dueDate.gte"] !== void 0)
40012
- args.due_date__gte = opts["dueDate.gte"];
40084
+ if (opts.issuedAt !== void 0)
40085
+ args.issued_at = opts.issuedAt;
40086
+ if (opts["issuedAt.not"] !== void 0)
40087
+ args.issued_at__not = opts["issuedAt.not"];
40088
+ if (opts["issuedAt.isNull"] !== void 0)
40089
+ args.issued_at__isNull = opts["issuedAt.isNull"];
40090
+ if (opts["issuedAt.isNotNull"] !== void 0)
40091
+ args.issued_at__isNotNull = opts["issuedAt.isNotNull"];
40092
+ if (opts["issuedAt.equals"] !== void 0)
40093
+ args.issued_at__equals = opts["issuedAt.equals"];
40094
+ if (opts["issuedAt.lt"] !== void 0)
40095
+ args.issued_at__lt = opts["issuedAt.lt"];
40096
+ if (opts["issuedAt.lte"] !== void 0)
40097
+ args.issued_at__lte = opts["issuedAt.lte"];
40098
+ if (opts["issuedAt.gt"] !== void 0)
40099
+ args.issued_at__gt = opts["issuedAt.gt"];
40100
+ if (opts["issuedAt.gte"] !== void 0)
40101
+ args.issued_at__gte = opts["issuedAt.gte"];
40102
+ if (opts.dueAt !== void 0)
40103
+ args.due_at = opts.dueAt;
40104
+ if (opts["dueAt.not"] !== void 0)
40105
+ args.due_at__not = opts["dueAt.not"];
40106
+ if (opts["dueAt.isNull"] !== void 0)
40107
+ args.due_at__isNull = opts["dueAt.isNull"];
40108
+ if (opts["dueAt.isNotNull"] !== void 0)
40109
+ args.due_at__isNotNull = opts["dueAt.isNotNull"];
40110
+ if (opts["dueAt.equals"] !== void 0)
40111
+ args.due_at__equals = opts["dueAt.equals"];
40112
+ if (opts["dueAt.lt"] !== void 0)
40113
+ args.due_at__lt = opts["dueAt.lt"];
40114
+ if (opts["dueAt.lte"] !== void 0)
40115
+ args.due_at__lte = opts["dueAt.lte"];
40116
+ if (opts["dueAt.gt"] !== void 0)
40117
+ args.due_at__gt = opts["dueAt.gt"];
40118
+ if (opts["dueAt.gte"] !== void 0)
40119
+ args.due_at__gte = opts["dueAt.gte"];
40013
40120
  if (opts.updatedAt !== void 0)
40014
40121
  args.updated_at = opts.updatedAt;
40015
40122
  if (opts["updatedAt.not"] !== void 0)
@@ -40028,17 +40135,16 @@ Examples:
40028
40135
  args.updated_at__gt = opts["updatedAt.gt"];
40029
40136
  if (opts["updatedAt.gte"] !== void 0)
40030
40137
  args.updated_at__gte = opts["updatedAt.gte"];
40031
- if (opts.take !== void 0)
40032
- args.take = Number(opts.take);
40033
- if (opts.skip !== void 0)
40034
- args.skip = Number(opts.skip);
40138
+ if (opts.limit !== void 0)
40139
+ args.limit = Number(opts.limit);
40035
40140
  await ctx.execute({
40036
40141
  method: "GET",
40037
- path: "/v1/invoices",
40142
+ path: "/v2/invoices",
40038
40143
  args,
40039
40144
  queryParamKeys: [
40040
- "take",
40041
- "skip",
40145
+ "limit",
40146
+ "cursor",
40147
+ "include_total",
40042
40148
  "order",
40043
40149
  "sort",
40044
40150
  "type",
@@ -40113,24 +40219,24 @@ Examples:
40113
40219
  "period_end__lte",
40114
40220
  "period_end__gt",
40115
40221
  "period_end__gte",
40116
- "emission_date",
40117
- "emission_date__not",
40118
- "emission_date__isNull",
40119
- "emission_date__isNotNull",
40120
- "emission_date__equals",
40121
- "emission_date__lt",
40122
- "emission_date__lte",
40123
- "emission_date__gt",
40124
- "emission_date__gte",
40125
- "due_date",
40126
- "due_date__not",
40127
- "due_date__isNull",
40128
- "due_date__isNotNull",
40129
- "due_date__equals",
40130
- "due_date__lt",
40131
- "due_date__lte",
40132
- "due_date__gt",
40133
- "due_date__gte",
40222
+ "issued_at",
40223
+ "issued_at__not",
40224
+ "issued_at__isNull",
40225
+ "issued_at__isNotNull",
40226
+ "issued_at__equals",
40227
+ "issued_at__lt",
40228
+ "issued_at__lte",
40229
+ "issued_at__gt",
40230
+ "issued_at__gte",
40231
+ "due_at",
40232
+ "due_at__not",
40233
+ "due_at__isNull",
40234
+ "due_at__isNotNull",
40235
+ "due_at__equals",
40236
+ "due_at__lt",
40237
+ "due_at__lte",
40238
+ "due_at__gt",
40239
+ "due_at__gte",
40134
40240
  "updated_at",
40135
40241
  "updated_at__not",
40136
40242
  "updated_at__isNull",
@@ -40157,7 +40263,7 @@ Examples:
40157
40263
  - \`archived\`: A previous version of an invoice.
40158
40264
  - \`charged_on_parent\`: Invoice is charged on the parent customer.
40159
40265
  - \`pending_parent_concat\`: Invoice is pending invoices concatenation on the parent customer to be grouped.
40160
- - \`uncollectible\`: Invoice is uncollectible (bad debt).
40266
+ - \`uncollectible\`: Invoice is uncollectible (bad debt). Only metadata (properties, custom_note, custom_properties) can be updated in this status.
40161
40267
  `).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the invoice.`).option("--number <value>", `Invoice number. If specified, the invoice will be considered as imported from an external source and the number will not be generated by Hyperline. You are responsible for avoiding duplicates and ensuring it does not impact the numbering sequence in Hyperline.`).option("--type <value>", `Type of the invoice.
40162
40268
 
40163
40269
  - \`invoice\`: Legal invoice to be paid by your customer.
@@ -40172,7 +40278,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
40172
40278
 
40173
40279
  - \`current\`: Use the current default payment method of the customer.
40174
40280
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
40175
- `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
40281
+ `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
40176
40282
  Examples:
40177
40283
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
40178
40284
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -40225,6 +40331,8 @@ Examples:
40225
40331
  args.settled_at = opts.settledAt;
40226
40332
  if (opts.properties !== void 0)
40227
40333
  args.properties = opts.properties;
40334
+ if (opts.customProperties !== void 0)
40335
+ args.custom_properties = opts.customProperties;
40228
40336
  if (opts.lineItems !== void 0)
40229
40337
  args.line_items = opts.lineItems;
40230
40338
  if (opts.transactions !== void 0)
@@ -40238,10 +40346,15 @@ Examples:
40238
40346
  queryParamKeys: []
40239
40347
  });
40240
40348
  });
40241
- resource.command("create-credit-note").description(`Create a credit note for an existing invoice by ID. Credit notes partially or fully reverse an invoice amount.`).requiredOption("--id <value>", `id parameter`).option("--amount-including-tax <number>", `Amount of the credit note. If not specified, the amount will be computed from the original invoice.`).option("--status <value>", `Status of the credit note.
40349
+ resource.command("create-credit-note").description(`Create a credit note for an existing invoice by ID. Credit notes partially or fully reverse an invoice amount. Optionally trigger a refund via wallet, original payment method, or external settlement.`).requiredOption("--id <value>", `id parameter`).option("--amount-including-tax <number>", `Amount of the credit note. If not specified, the amount will be computed from the original invoice.`).option("--status <value>", `Status of the credit note.
40242
40350
 
40243
40351
  - \`to_pay\`: Credit note is awaiting payment.
40244
40352
  - \`draft\`: Credit note is in draft mode (not finalized yet).
40353
+ `).option("--trigger-refund", `Whether to trigger a refund for the credit note amount. Defaults to \`false\`. When \`true\`, the refund is issued using \`refund_method\`.`).option("--refund-method <value>", `How the refund should be settled. Only used when \`trigger_refund\` is \`true\`. Defaults to \`original_payment_method\`.
40354
+
40355
+ - \`wallet\`: Credit the customer's wallet with the refunded amount.
40356
+ - \`original_payment_method\`: Refund to the payment method used on the original invoice.
40357
+ - \`external\`: Mark the refund as settled externally (no automatic transfer).
40245
40358
  `).addHelpText("after", `
40246
40359
  Examples:
40247
40360
  hyperline invoices create-credit-note --id <id>
@@ -40257,8 +40370,12 @@ Examples:
40257
40370
  args.id = opts.id;
40258
40371
  if (opts.status !== void 0)
40259
40372
  args.status = opts.status;
40373
+ if (opts.refundMethod !== void 0)
40374
+ args.refund_method = opts.refundMethod;
40260
40375
  if (opts.amountIncludingTax !== void 0)
40261
40376
  args.amount_including_tax = Number(opts.amountIncludingTax);
40377
+ if (opts.triggerRefund !== void 0)
40378
+ args.trigger_refund = true;
40262
40379
  await ctx.execute({
40263
40380
  method: "POST",
40264
40381
  path: "/v1/invoices/{id}/credit-notes",
@@ -40370,7 +40487,7 @@ Examples:
40370
40487
  queryParamKeys: []
40371
40488
  });
40372
40489
  });
40373
- resource.command("get").description(`Retrieve full details of an invoice by ID including line items, transactions, customer info, and billing metadata.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
40490
+ resource.command("get").description(`Retrieve the details of an invoice by ID including line items, transactions, customer info, and billing metadata.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
40374
40491
  Examples:
40375
40492
  hyperline invoices get --id <id>`).action(async (opts) => {
40376
40493
  const ctx = resource.parent?.opts()._ctx;
@@ -40383,12 +40500,12 @@ Examples:
40383
40500
  args.id = opts.id;
40384
40501
  await ctx.execute({
40385
40502
  method: "GET",
40386
- path: "/v1/invoices/{id}",
40503
+ path: "/v2/invoices/{id}",
40387
40504
  args,
40388
40505
  queryParamKeys: []
40389
40506
  });
40390
40507
  });
40391
- resource.command("update").description(`Update a draft or grace_period invoice. Allows modifying line items, dates, and metadata before finalization.`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
40508
+ resource.command("update").description(`Update an invoice. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices are restricted to metadata (paid: custom_note/purchase_order; uncollectible: properties/custom_note/custom_properties).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
40392
40509
 
40393
40510
  - \`invoice\`: Legal invoice to be paid by your customer.
40394
40511
  - \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
@@ -40397,7 +40514,7 @@ Examples:
40397
40514
 
40398
40515
  - \`auto\`: Tax is automatically computed and applied.
40399
40516
  - \`not_eligible\`: Tax collection is disabled for the invoice.
40400
- `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40517
+ `).option("--line-items <value>", `line_items`).option("--coupons <value>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
40401
40518
  Examples:
40402
40519
  hyperline invoices update --id <id>
40403
40520
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -40438,6 +40555,8 @@ Examples:
40438
40555
  args.bank_account_id = opts.bankAccountId;
40439
40556
  if (opts.properties !== void 0)
40440
40557
  args.properties = opts.properties;
40558
+ if (opts.customProperties !== void 0)
40559
+ args.custom_properties = opts.customProperties;
40441
40560
  if (opts.customer !== void 0)
40442
40561
  args.customer = opts.customer;
40443
40562
  await ctx.execute({
@@ -40558,7 +40677,7 @@ Examples:
40558
40677
  queryParamKeys: []
40559
40678
  });
40560
40679
  });
40561
- resource.command("delete-invoice-transaction").description(`Delete a scheduled transaction from an invoice. Only applies to transactions that haven't been processed yet.`).requiredOption("--id <value>", `id parameter`).requiredOption("--transaction-id <value>", `transactionId parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
40680
+ resource.command("delete-invoice-transaction").description(`Delete a scheduled transaction or wallet debit from an invoice.`).requiredOption("--id <value>", `id parameter`).requiredOption("--transaction-id <value>", `transactionId parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
40562
40681
  Examples:
40563
40682
  hyperline invoices-transactions delete-invoice-transaction --id <id> --transaction-id <transactionId>
40564
40683
  hyperline invoices-transactions delete-invoice-transaction --id <id> --transaction-id <transactionId> --output json`).action(async (opts) => {
@@ -40630,7 +40749,7 @@ Examples:
40630
40749
  queryParamKeys: []
40631
40750
  });
40632
40751
  });
40633
- resource.command("create-invoicing-entity").description(`Create a new invoicing entity with company details, address, and tax configuration. Used as the sender on invoices.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).requiredOption("--name <value>", `The name of the invoicing entity.`).option("--trade-name <value>", `The trade name of the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).requiredOption("--country <value>", `The country in which the invoicing entity is registered.`).requiredOption("--currency <value>", `The currency code that the invoicing entity operates in.`).requiredOption("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--next-invoice-number <number>", `The next invoice number to be used.`).option("--next-credit-note-number <number>", `The next credit note number to be used.`).option("--next-document-number <number>", `The next document number to be used.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--quote-footer <value>", `The footer text to be used in quotes.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).addHelpText("after", `
40752
+ resource.command("create-invoicing-entity").description(`Create a new invoicing entity with company details, address, and tax configuration. Used as the sender on invoices.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).requiredOption("--name <value>", `The name of the invoicing entity.`).option("--trade-name <value>", `The trade name of the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).requiredOption("--country <value>", `The country in which the invoicing entity is registered.`).requiredOption("--currency <value>", `The currency code that the invoicing entity operates in.`).requiredOption("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--next-invoice-number <number>", `The next invoice number to be used.`).option("--next-credit-note-number <number>", `The next credit note number to be used.`).option("--next-document-number <number>", `The next document number to be used.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--quote-footer <value>", `The footer text to be used in quotes.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).option("--credit-note-wallet-refund-enabled", `When enabled, credit note refunds default to the customer's wallet for invoices under this invoicing entity. The default applies only when \`refund_method\` is omitted on \`POST /v1/invoices/{id}/credit-notes\`; an explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).addHelpText("after", `
40634
40753
  Examples:
40635
40754
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency>
40636
40755
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency> --is-default --trade-name <trade_name>
@@ -40709,6 +40828,8 @@ Examples:
40709
40828
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40710
40829
  if (opts.isDefault !== void 0)
40711
40830
  args.is_default = true;
40831
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40832
+ args.credit_note_wallet_refund_enabled = true;
40712
40833
  await ctx.execute({
40713
40834
  method: "POST",
40714
40835
  path: "/v1/invoicing-entities",
@@ -40716,7 +40837,7 @@ Examples:
40716
40837
  queryParamKeys: []
40717
40838
  });
40718
40839
  });
40719
- resource.command("update-invoicing-entity").description(`Update an existing invoicing entity's details (address, tax ID, branding, etc.).`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `The name of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).option("--country <value>", `The country in which the invoicing entity is registered.`).option("--currency <value>", `The currency code that the invoicing entity operates in.`).option("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).addHelpText("after", `
40840
+ resource.command("update-invoicing-entity").description(`Update an existing invoicing entity's details (address, tax ID, branding, etc.).`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `The name of the invoicing entity.`).option("--registration-number <value>", `The registration number of the invoicing entity.`).option("--tax-id <value>", `The tax identification number of the invoicing entity.`).option("--billing-email <value>", `The billing email address for the invoicing entity.`).option("--timezone <value>", `The timezone the invoicing entity operates in.`).option("--language <value>", `The default language of the invoicing entity.`).option("--is-default", `Flag to indicate if this is the default invoicing entity. If true, it will switch the other existing invoicing entities to non-default.`).option("--address-line1 <value>", `The first line of the address for the invoicing entity.`).option("--address-line2 <value>", `The second line of the address for the invoicing entity.`).option("--zip-code <value>", `The postal code for the invoicing entity's address.`).option("--state <value>", `The state or province of the invoicing entity.`).option("--city <value>", `The city of the invoicing entity.`).option("--country <value>", `The country in which the invoicing entity is registered.`).option("--currency <value>", `The currency code that the invoicing entity operates in.`).option("--accounting-currency <value>", `The currency used for accounting purposes.`).option("--invoice-number-pattern <value>", `The pattern used for generating invoice numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--credit-note-number-pattern <value>", `The pattern used for generating credit note numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--document-number-pattern <value>", `The pattern used for generating document numbers. Available dynamic elements: number {number} (mandatory), year {YYYY}, month {MM} and day {DD}.`).option("--default-payment-delay <number>", `The default payment term in days.`).option("--invoice-grace-period-duration <number>", `The grace period duration in days.`).option("--invoice-payment-initiation-delay <number>", `The payment initiation delay in days for the invoices.`).option("--document-payment-initiation-delay <number>", `The payment initiation delay in days for the custom documents.`).option("--invoice-late-fees <value>", `The late fees applicable to the invoices.`).option("--invoice-footer <value>", `The footer text to be used in invoices.`).option("--document-footer <value>", `The footer text to be used in documents. If not specified, the invoice footer will be used.`).option("--logo-url <value>", `URL of the logo to be used in invoices.`).option("--favicon-url <value>", `URL of the logo to be used as favicon.`).option("--brand-color <value>", `Brand color to be used in invoices (hexadecimal color code).`).option("--forced-customer-type <value>", `Forces all customers created under this invoicing entity to have this type. Set to null to allow users to choose.`).option("--credit-note-wallet-refund-enabled", `When enabled, credit note refunds default to the customer's wallet for invoices under this invoicing entity. The default applies only when \`refund_method\` is omitted on \`POST /v1/invoices/{id}/credit-notes\`; an explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).addHelpText("after", `
40720
40841
  Examples:
40721
40842
  hyperline invoicing-entities update-invoicing-entity --id <id>
40722
40843
  hyperline invoicing-entities update-invoicing-entity --id <id> --name <name> --registration-number <registration_number>
@@ -40787,6 +40908,8 @@ Examples:
40787
40908
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40788
40909
  if (opts.isDefault !== void 0)
40789
40910
  args.is_default = true;
40911
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40912
+ args.credit_note_wallet_refund_enabled = true;
40790
40913
  await ctx.execute({
40791
40914
  method: "PUT",
40792
40915
  path: "/v1/invoicing-entities/{id}",
@@ -41195,7 +41318,12 @@ Examples:
41195
41318
  ]
41196
41319
  });
41197
41320
  });
41198
- resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <value>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
41321
+ resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--credits-grant-mode <value>", `
41322
+ How the periodic credit allowance is granted for partial billing periods.
41323
+
41324
+ - \`prorated\` (default): the granted credits are prorated to the elapsed period.
41325
+ - \`full_allowance\`: the full allowance is always granted (the invoice remains prorated).
41326
+ `).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <value>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
41199
41327
  Examples:
41200
41328
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
41201
41329
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
@@ -41230,6 +41358,8 @@ Examples:
41230
41358
  args.unit_name = opts.unitName;
41231
41359
  if (opts.creditAggregators !== void 0)
41232
41360
  args.credit_aggregators = opts.creditAggregators;
41361
+ if (opts.creditsGrantMode !== void 0)
41362
+ args.credits_grant_mode = opts.creditsGrantMode;
41233
41363
  if (opts.displayMode !== void 0)
41234
41364
  args.display_mode = opts.displayMode;
41235
41365
  if (opts.bundleItems !== void 0)
@@ -41331,6 +41461,32 @@ Examples:
41331
41461
  queryParamKeys: []
41332
41462
  });
41333
41463
  });
41464
+ resource.command("delete").description(`Permanently delete an archived product by ID. Products attached to subscriptions, plans, or templates cannot be deleted.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
41465
+ Examples:
41466
+ hyperline products delete --id <id>
41467
+ hyperline products delete --id <id> --output json`).action(async (opts) => {
41468
+ const ctx = resource.parent?.opts()._ctx;
41469
+ if (!ctx) {
41470
+ process.stderr.write("Error: Not authenticated\n");
41471
+ process.exit(1);
41472
+ }
41473
+ const args = {};
41474
+ if (opts.id !== void 0)
41475
+ args.id = opts.id;
41476
+ if (!opts.yes) {
41477
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
41478
+ if (!confirmed) {
41479
+ process.stdout.write("Aborted.\n");
41480
+ return;
41481
+ }
41482
+ }
41483
+ await ctx.execute({
41484
+ method: "DELETE",
41485
+ path: "/v1/products/{id}",
41486
+ args,
41487
+ queryParamKeys: []
41488
+ });
41489
+ });
41334
41490
  resource.command("unarchive").description(`Restore a previously archived product, making it available for new subscriptions again.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
41335
41491
  Examples:
41336
41492
  hyperline products unarchive --id <id>
@@ -41355,18 +41511,18 @@ Examples:
41355
41511
  // build/commands/generated/quotes.js
41356
41512
  function registerQuotesCommands(parent) {
41357
41513
  const resource = parent.command("quotes").description("Manage quotes");
41358
- resource.command("create").description(`Create a new quote for a customer with line items, products, and optional file attachments. Quotes can be sent for signature and converted to subscriptions.`).option("--status <value>", `
41514
+ resource.command("create").description(`Create a new quote for a customer. Use \`subscription\` (or \`template_id\`) for subscription quotes; use \`invoice\` for one-off quotes backed by a draft invoice with line items. Quotes can be sent for signature and converted to subscriptions or one-off invoices. When creating from a quote template, do not combine \`template_id\` with subscription overrides for dates, contract terms, products, phases, coupons, discounts, prices, or seats in this call: first create the quote from \`template_id\` so template terms and contract documents are copied, then call \`update_quote\` with the subscription payload.`).option("--status <value>", `
41359
41515
  Quote status.
41360
41516
 
41361
41517
  - \`draft\`: The quote is a draft.
41362
41518
  - \`approved\`: The quote is approved and ready to be sent to the customer.
41363
41519
  - \`pending_signature\`: The quote is awaiting the customer's signature.
41364
- `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. If not specified, automatically computed from the subscription configuration.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41520
+ `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored \u2014 the amount is always derived from the linked invoice's \`amount_excluding_tax\`.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41365
41521
 
41366
41522
  - \`all\`: Display all pricing tiers.
41367
41523
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
41368
41524
  - \`none\`: Hide all pricing tiers.
41369
- `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <value>", `Subscription configuration constituting the quote.`).addHelpText("after", `
41525
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <value>", `Subscription configuration constituting the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
41370
41526
  Examples:
41371
41527
  hyperline quotes create --customer-id <customer_id>
41372
41528
  hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
@@ -41393,6 +41549,8 @@ Examples:
41393
41549
  args.collect_payment_details = opts.collectPaymentDetails;
41394
41550
  if (opts.collectCustomPropertyIds !== void 0)
41395
41551
  args.collect_custom_property_ids = opts.collectCustomPropertyIds;
41552
+ if (opts.contractClauseIds !== void 0)
41553
+ args.contract_clause_ids = opts.contractClauseIds;
41396
41554
  if (opts.requireTaxId !== void 0)
41397
41555
  args.require_tax_id = opts.requireTaxId;
41398
41556
  if (opts.displayQuoteValue !== void 0)
@@ -41411,12 +41569,16 @@ Examples:
41411
41569
  args.display_documents_in_preview = opts.displayDocumentsInPreview;
41412
41570
  if (opts.displaySubscriptionOnUpdate !== void 0)
41413
41571
  args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
41572
+ if (opts.generateDraftInvoices !== void 0)
41573
+ args.generate_draft_invoices = opts.generateDraftInvoices;
41414
41574
  if (opts.templateId !== void 0)
41415
41575
  args.template_id = opts.templateId;
41416
41576
  if (opts.expiresAt !== void 0)
41417
41577
  args.expires_at = opts.expiresAt;
41418
41578
  if (opts.subscription !== void 0)
41419
41579
  args.subscription = opts.subscription;
41580
+ if (opts.invoice !== void 0)
41581
+ args.invoice = opts.invoice;
41420
41582
  if (opts.amount !== void 0)
41421
41583
  args.amount = Number(opts.amount);
41422
41584
  await ctx.execute({
@@ -41645,6 +41807,73 @@ Examples:
41645
41807
  queryParamKeys: []
41646
41808
  });
41647
41809
  });
41810
+ resource.command("update").description(`Update quote-level fields before a quote is finalized. On draft quotes, pass \`subscription\` to create or replace the draft subscription configuration, or pass \`invoice\` on a one-off quote to replace the linked draft invoice. For quotes created from \`template_id\`, use this tool for subscription overrides such as dates, contract terms, products, phases, coupons, discounts, prices, seats, and subscription custom properties. Omit \`terms\`, \`comments\`, and \`contract_clause_ids\` unless deliberately overriding template content.`).requiredOption("--id <value>", `id parameter`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. Set to \`null\` to clear the manually set value.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41811
+
41812
+ - \`all\`: Display all pricing tiers.
41813
+ - \`matching\`: Only display the tiers used to compute the price based on quantity.
41814
+ - \`none\`: Hide all pricing tiers.
41815
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--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 <value>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
41816
+ Examples:
41817
+ hyperline quotes update --id <id>
41818
+ hyperline quotes update --id <id> --owner-email <owner_email> --comments <comments>
41819
+ hyperline quotes update --id <id> --output json`).action(async (opts) => {
41820
+ const ctx = resource.parent?.opts()._ctx;
41821
+ if (!ctx) {
41822
+ process.stderr.write("Error: Not authenticated\n");
41823
+ process.exit(1);
41824
+ }
41825
+ const args = {};
41826
+ if (opts.id !== void 0)
41827
+ args.id = opts.id;
41828
+ if (opts.ownerEmail !== void 0)
41829
+ args.owner_email = opts.ownerEmail;
41830
+ if (opts.comments !== void 0)
41831
+ args.comments = opts.comments;
41832
+ if (opts.terms !== void 0)
41833
+ args.terms = opts.terms;
41834
+ if (opts.collectPaymentDetails !== void 0)
41835
+ args.collect_payment_details = opts.collectPaymentDetails;
41836
+ if (opts.collectCustomPropertyIds !== void 0)
41837
+ args.collect_custom_property_ids = opts.collectCustomPropertyIds;
41838
+ if (opts.contractClauseIds !== void 0)
41839
+ args.contract_clause_ids = opts.contractClauseIds;
41840
+ if (opts.requireTaxId !== void 0)
41841
+ args.require_tax_id = opts.requireTaxId;
41842
+ if (opts.displayQuoteValue !== void 0)
41843
+ args.display_quote_value = opts.displayQuoteValue;
41844
+ if (opts.displayQuoteValueWithTax !== void 0)
41845
+ args.display_quote_value_with_tax = opts.displayQuoteValueWithTax;
41846
+ if (opts.displayTaxes !== void 0)
41847
+ args.display_taxes = opts.displayTaxes;
41848
+ if (opts.displayPriceTiers !== void 0)
41849
+ args.display_price_tiers = opts.displayPriceTiers;
41850
+ if (opts.displayPhaseValue !== void 0)
41851
+ args.display_phase_value = opts.displayPhaseValue;
41852
+ if (opts.displayFirstInvoiceAmount !== void 0)
41853
+ args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
41854
+ if (opts.displayDocumentsInPreview !== void 0)
41855
+ args.display_documents_in_preview = opts.displayDocumentsInPreview;
41856
+ if (opts.displaySubscriptionOnUpdate !== void 0)
41857
+ args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
41858
+ if (opts.generateDraftInvoices !== void 0)
41859
+ args.generate_draft_invoices = opts.generateDraftInvoices;
41860
+ if (opts.crmOpportunityId !== void 0)
41861
+ args.crm_opportunity_id = opts.crmOpportunityId;
41862
+ if (opts.expiresAt !== void 0)
41863
+ args.expires_at = opts.expiresAt;
41864
+ if (opts.subscription !== void 0)
41865
+ args.subscription = opts.subscription;
41866
+ if (opts.invoice !== void 0)
41867
+ args.invoice = opts.invoice;
41868
+ if (opts.amount !== void 0)
41869
+ args.amount = Number(opts.amount);
41870
+ await ctx.execute({
41871
+ method: "PATCH",
41872
+ path: "/v1/quotes/{id}",
41873
+ args,
41874
+ queryParamKeys: []
41875
+ });
41876
+ });
41648
41877
  resource.command("download").description(`Download the PDF of a quote. Supports locale parameter for localization.`).requiredOption("--id <value>", `id parameter`).option("--locale <value>", `locale`).addHelpText("after", `
41649
41878
  Examples:
41650
41879
  hyperline quotes download --id <id>
@@ -41685,6 +41914,25 @@ Examples:
41685
41914
  queryParamKeys: []
41686
41915
  });
41687
41916
  });
41917
+ resource.command("finalize").description(`Finalize a draft quote. The quote is submitted for approval when approval is required, otherwise it becomes approved and ready to be sent for signature.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
41918
+ Examples:
41919
+ hyperline quotes finalize --id <id>
41920
+ hyperline quotes finalize --id <id> --output json`).action(async (opts) => {
41921
+ const ctx = resource.parent?.opts()._ctx;
41922
+ if (!ctx) {
41923
+ process.stderr.write("Error: Not authenticated\n");
41924
+ process.exit(1);
41925
+ }
41926
+ const args = {};
41927
+ if (opts.id !== void 0)
41928
+ args.id = opts.id;
41929
+ await ctx.execute({
41930
+ method: "POST",
41931
+ path: "/v1/quotes/{id}/finalize",
41932
+ args,
41933
+ queryParamKeys: []
41934
+ });
41935
+ });
41688
41936
  resource.command("send").description(`Send a quote by email for customer signature. Requires the quote to be approved first.`).requiredOption("--id <value>", `id parameter`).requiredOption("--email <value>", `Email address to which the quote will be sent for signature.`).option("--message <value>", `Custom message used in the email content.`).addHelpText("after", `
41689
41937
  Examples:
41690
41938
  hyperline quotes send --id <id> --email <email>
@@ -41792,14 +42040,13 @@ Examples:
41792
42040
  });
41793
42041
  }
41794
42042
 
41795
- // build/commands/generated/subscriptions.js
41796
- function registerSubscriptionsCommands(parent) {
41797
- const resource = parent.command("subscriptions").description("Manage subscriptions");
41798
- resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
42043
+ // build/commands/generated/quotes-templates.js
42044
+ function registerQuotes_TemplatesCommands(parent) {
42045
+ const resource = parent.command("quotes-templates").description("Manage quotes > templates");
42046
+ resource.command("list-quote-templates").description(`List quote templates with pagination and optional filters for id, name, subscription_template_id, and search. Use template IDs to create quotes from reusable quote defaults.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.is-null <value>", `id__isNull`).option("--id.is-not-null <value>", `id__isNotNull`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--subscription-template-id <value>", `subscription_template_id`).option("--subscription-template-id.not <value>", `subscription_template_id__not`).option("--subscription-template-id.is-null <value>", `subscription_template_id__isNull`).option("--subscription-template-id.is-not-null <value>", `subscription_template_id__isNotNull`).option("--subscription-template-id.equals <value>", `subscription_template_id__equals`).option("--subscription-template-id.contains <value>", `subscription_template_id__contains`).option("--subscription-template-id.starts-with <value>", `subscription_template_id__startsWith`).option("--subscription-template-id.end-with <value>", `subscription_template_id__endWith`).option("--search <value>", `search`).addHelpText("after", `
41799
42047
  Examples:
41800
- hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
41801
- hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at> --charge-at <charge_at>
41802
- hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --output json`).action(async (opts) => {
42048
+ hyperline quotes-templates list-quote-templates
42049
+ hyperline quotes-templates list-quote-templates --take <take> --id <id>`).action(async (opts) => {
41803
42050
  const ctx = resource.parent?.opts()._ctx;
41804
42051
  if (!ctx) {
41805
42052
  process.stderr.write("Error: Not authenticated\n");
@@ -41808,20 +42055,147 @@ Examples:
41808
42055
  const args = {};
41809
42056
  if (opts.id !== void 0)
41810
42057
  args.id = opts.id;
41811
- if (opts.applicationSchedule !== void 0)
41812
- args.application_schedule = opts.applicationSchedule;
41813
- if (opts.applyAt !== void 0)
41814
- args.apply_at = opts.applyAt;
41815
- if (opts.paymentSchedule !== void 0)
41816
- args.payment_schedule = opts.paymentSchedule;
41817
- if (opts.chargeAt !== void 0)
41818
- args.charge_at = opts.chargeAt;
41819
- if (opts.calculationMethod !== void 0)
41820
- args.calculation_method = opts.calculationMethod;
41821
- if (opts.type !== void 0)
41822
- args.type = opts.type;
41823
- if (opts.payload !== void 0)
41824
- args.payload = opts.payload;
42058
+ if (opts["id.not"] !== void 0)
42059
+ args.id__not = opts["id.not"];
42060
+ if (opts["id.isNull"] !== void 0)
42061
+ args.id__isNull = opts["id.isNull"];
42062
+ if (opts["id.isNotNull"] !== void 0)
42063
+ args.id__isNotNull = opts["id.isNotNull"];
42064
+ if (opts["id.equals"] !== void 0)
42065
+ args.id__equals = opts["id.equals"];
42066
+ if (opts["id.contains"] !== void 0)
42067
+ args.id__contains = opts["id.contains"];
42068
+ if (opts["id.startsWith"] !== void 0)
42069
+ args.id__startsWith = opts["id.startsWith"];
42070
+ if (opts["id.endWith"] !== void 0)
42071
+ args.id__endWith = opts["id.endWith"];
42072
+ if (opts.name !== void 0)
42073
+ args.name = opts.name;
42074
+ if (opts["name.not"] !== void 0)
42075
+ args.name__not = opts["name.not"];
42076
+ if (opts["name.isNull"] !== void 0)
42077
+ args.name__isNull = opts["name.isNull"];
42078
+ if (opts["name.isNotNull"] !== void 0)
42079
+ args.name__isNotNull = opts["name.isNotNull"];
42080
+ if (opts["name.equals"] !== void 0)
42081
+ args.name__equals = opts["name.equals"];
42082
+ if (opts["name.contains"] !== void 0)
42083
+ args.name__contains = opts["name.contains"];
42084
+ if (opts["name.startsWith"] !== void 0)
42085
+ args.name__startsWith = opts["name.startsWith"];
42086
+ if (opts["name.endWith"] !== void 0)
42087
+ args.name__endWith = opts["name.endWith"];
42088
+ if (opts.subscriptionTemplateId !== void 0)
42089
+ args.subscription_template_id = opts.subscriptionTemplateId;
42090
+ if (opts["subscriptionTemplateId.not"] !== void 0)
42091
+ args.subscription_template_id__not = opts["subscriptionTemplateId.not"];
42092
+ if (opts["subscriptionTemplateId.isNull"] !== void 0)
42093
+ args.subscription_template_id__isNull = opts["subscriptionTemplateId.isNull"];
42094
+ if (opts["subscriptionTemplateId.isNotNull"] !== void 0)
42095
+ args.subscription_template_id__isNotNull = opts["subscriptionTemplateId.isNotNull"];
42096
+ if (opts["subscriptionTemplateId.equals"] !== void 0)
42097
+ args.subscription_template_id__equals = opts["subscriptionTemplateId.equals"];
42098
+ if (opts["subscriptionTemplateId.contains"] !== void 0)
42099
+ args.subscription_template_id__contains = opts["subscriptionTemplateId.contains"];
42100
+ if (opts["subscriptionTemplateId.startsWith"] !== void 0)
42101
+ args.subscription_template_id__startsWith = opts["subscriptionTemplateId.startsWith"];
42102
+ if (opts["subscriptionTemplateId.endWith"] !== void 0)
42103
+ args.subscription_template_id__endWith = opts["subscriptionTemplateId.endWith"];
42104
+ if (opts.search !== void 0)
42105
+ args.search = opts.search;
42106
+ if (opts.take !== void 0)
42107
+ args.take = Number(opts.take);
42108
+ if (opts.skip !== void 0)
42109
+ args.skip = Number(opts.skip);
42110
+ await ctx.execute({
42111
+ method: "GET",
42112
+ path: "/v1/quotes/templates",
42113
+ args,
42114
+ queryParamKeys: [
42115
+ "take",
42116
+ "skip",
42117
+ "id",
42118
+ "id__not",
42119
+ "id__isNull",
42120
+ "id__isNotNull",
42121
+ "id__equals",
42122
+ "id__contains",
42123
+ "id__startsWith",
42124
+ "id__endWith",
42125
+ "name",
42126
+ "name__not",
42127
+ "name__isNull",
42128
+ "name__isNotNull",
42129
+ "name__equals",
42130
+ "name__contains",
42131
+ "name__startsWith",
42132
+ "name__endWith",
42133
+ "subscription_template_id",
42134
+ "subscription_template_id__not",
42135
+ "subscription_template_id__isNull",
42136
+ "subscription_template_id__isNotNull",
42137
+ "subscription_template_id__equals",
42138
+ "subscription_template_id__contains",
42139
+ "subscription_template_id__startsWith",
42140
+ "subscription_template_id__endWith",
42141
+ "search"
42142
+ ]
42143
+ });
42144
+ });
42145
+ resource.command("get-quote-template").description(`Retrieve a quote template by ID with quote defaults, display options, attachments, and linked contract template/clause IDs.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
42146
+ Examples:
42147
+ hyperline quotes-templates get-quote-template --id <id>`).action(async (opts) => {
42148
+ const ctx = resource.parent?.opts()._ctx;
42149
+ if (!ctx) {
42150
+ process.stderr.write("Error: Not authenticated\n");
42151
+ process.exit(1);
42152
+ }
42153
+ const args = {};
42154
+ if (opts.id !== void 0)
42155
+ args.id = opts.id;
42156
+ await ctx.execute({
42157
+ method: "GET",
42158
+ path: "/v1/quotes/templates/{id}",
42159
+ args,
42160
+ queryParamKeys: []
42161
+ });
42162
+ });
42163
+ }
42164
+
42165
+ // build/commands/generated/subscriptions.js
42166
+ function registerSubscriptionsCommands(parent) {
42167
+ const resource = parent.command("subscriptions").description("Manage subscriptions");
42168
+ resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
42169
+ Examples:
42170
+ hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
42171
+ hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at> --charge-at <charge_at>
42172
+ hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --output json`).action(async (opts) => {
42173
+ const ctx = resource.parent?.opts()._ctx;
42174
+ if (!ctx) {
42175
+ process.stderr.write("Error: Not authenticated\n");
42176
+ process.exit(1);
42177
+ }
42178
+ const args = {};
42179
+ if (opts.id !== void 0)
42180
+ args.id = opts.id;
42181
+ if (opts.applicationSchedule !== void 0)
42182
+ args.application_schedule = opts.applicationSchedule;
42183
+ if (opts.applyAt !== void 0)
42184
+ args.apply_at = opts.applyAt;
42185
+ if (opts.paymentSchedule !== void 0)
42186
+ args.payment_schedule = opts.paymentSchedule;
42187
+ if (opts.chargeAt !== void 0)
42188
+ args.charge_at = opts.chargeAt;
42189
+ if (opts.calculationMethod !== void 0)
42190
+ args.calculation_method = opts.calculationMethod;
42191
+ if (opts.precision !== void 0)
42192
+ args.precision = opts.precision;
42193
+ if (opts.refundMethod !== void 0)
42194
+ args.refund_method = opts.refundMethod;
42195
+ if (opts.type !== void 0)
42196
+ args.type = opts.type;
42197
+ if (opts.payload !== void 0)
42198
+ args.payload = opts.payload;
41825
42199
  await ctx.execute({
41826
42200
  method: "POST",
41827
42201
  path: "/v1/subscriptions/{id}/update",
@@ -41829,7 +42203,7 @@ Examples:
41829
42203
  queryParamKeys: []
41830
42204
  });
41831
42205
  });
41832
- resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42206
+ resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
41833
42207
  Examples:
41834
42208
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
41835
42209
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -41852,6 +42226,10 @@ Examples:
41852
42226
  args.charge_at = opts.chargeAt;
41853
42227
  if (opts.calculationMethod !== void 0)
41854
42228
  args.calculation_method = opts.calculationMethod;
42229
+ if (opts.precision !== void 0)
42230
+ args.precision = opts.precision;
42231
+ if (opts.refundMethod !== void 0)
42232
+ args.refund_method = opts.refundMethod;
41855
42233
  if (opts.updates !== void 0)
41856
42234
  args.updates = opts.updates;
41857
42235
  await ctx.execute({
@@ -41861,7 +42239,7 @@ Examples:
41861
42239
  queryParamKeys: []
41862
42240
  });
41863
42241
  });
41864
- resource.command("cancel").description(`Cancel a subscription. Supports immediate or end-of-period cancellation. Optionally specify a cancellation reason.`).requiredOption("--id <value>", `id parameter`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--reason <value>", `Reason for the cancellation.`).option("--pro-rata", `Indicates if the cancel should refund the customer using a pro rata strategy.`).addHelpText("after", `
42242
+ resource.command("cancel").description(`Cancel a subscription. Supports immediate or end-of-period cancellation. Optionally specify a cancellation reason.`).requiredOption("--id <value>", `id parameter`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--reason <value>", `Reason for the cancellation.`).option("--pro-rata", `Indicates if the cancel should refund the customer using a pro rata strategy.`).option("--refund-method <value>", `Override the refund destination for the resulting credit note. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).addHelpText("after", `
41865
42243
  Examples:
41866
42244
  hyperline subscriptions cancel --id <id>
41867
42245
  hyperline subscriptions cancel --id <id> --cancel-at <cancel_at> --reason <reason>
@@ -41878,6 +42256,8 @@ Examples:
41878
42256
  args.cancel_at = opts.cancelAt;
41879
42257
  if (opts.reason !== void 0)
41880
42258
  args.reason = opts.reason;
42259
+ if (opts.refundMethod !== void 0)
42260
+ args.refund_method = opts.refundMethod;
41881
42261
  if (opts.proRata !== void 0)
41882
42262
  args.pro_rata = true;
41883
42263
  await ctx.execute({
@@ -41906,7 +42286,7 @@ Examples:
41906
42286
  queryParamKeys: []
41907
42287
  });
41908
42288
  });
41909
- resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption.`).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.`).addHelpText("after", `
42289
+ resource.command("pause").description(`Pause a subscription. Billing stops while paused. Optionally specify a reactivate_at date for automatic resumption. If the subscription is already paused, updates (or clears) its reactivation date.`).requiredOption("--id <value>", `id parameter`).option("--reactivate-at <value>", `Date when the subscription will be automatically reactivated. Must be a future date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
41910
42290
  Examples:
41911
42291
  hyperline subscriptions pause --id <id>
41912
42292
  hyperline subscriptions pause --id <id> --reactivate-at <reactivate_at>
@@ -41987,7 +42367,7 @@ Examples:
41987
42367
  queryParamKeys: []
41988
42368
  });
41989
42369
  });
41990
- resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
42370
+ resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
41991
42371
  Examples:
41992
42372
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
41993
42373
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -42010,6 +42390,10 @@ Examples:
42010
42390
  args.charge_at = opts.chargeAt;
42011
42391
  if (opts.calculationMethod !== void 0)
42012
42392
  args.calculation_method = opts.calculationMethod;
42393
+ if (opts.precision !== void 0)
42394
+ args.precision = opts.precision;
42395
+ if (opts.refundMethod !== void 0)
42396
+ args.refund_method = opts.refundMethod;
42013
42397
  if (opts.updates !== void 0)
42014
42398
  args.updates = opts.updates;
42015
42399
  await ctx.execute({
@@ -42035,7 +42419,7 @@ Strategy used to cancel the subscription. If not specified \`do_nothing\` is use
42035
42419
  - \`refund_custom\`: Will refund to the customer a custom amount.
42036
42420
  - \`end_of_period\`: Will cancel the subscription at the end date of the current billing period.
42037
42421
  - \`do_nothing\`: Will only cease the subscription without any additional actions.
42038
- `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42422
+ `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--cancellation-refund-method <value>", `Override the refund destination for credit notes generated by \`refund_prorata\` / \`refund_custom\` cancellation strategies. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42039
42423
  Defines when invoices are generated relative to the billing period.
42040
42424
 
42041
42425
  - \`period_start\`: Invoices are generated at the start of the billing period.
@@ -42090,6 +42474,8 @@ Examples:
42090
42474
  args.cancel_at = opts.cancelAt;
42091
42475
  if (opts.cancellationStrategy !== void 0)
42092
42476
  args.cancellation_strategy = opts.cancellationStrategy;
42477
+ if (opts.cancellationRefundMethod !== void 0)
42478
+ args.cancellation_refund_method = opts.cancellationRefundMethod;
42093
42479
  if (opts.properties !== void 0)
42094
42480
  args.properties = opts.properties;
42095
42481
  if (opts.customProperties !== void 0)
@@ -42372,7 +42758,7 @@ Examples:
42372
42758
  queryParamKeys: []
42373
42759
  });
42374
42760
  });
42375
- resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Payload mirrors GET response structure.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42761
+ resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Draft quote subscription configuration must be updated through PATCH /v1/quotes/{id}.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42376
42762
  Defines when invoices are generated relative to the billing period.
42377
42763
 
42378
42764
  - \`period_start\`: Invoices are generated at the start of the billing period.
@@ -42441,6 +42827,38 @@ Examples:
42441
42827
  queryParamKeys: []
42442
42828
  });
42443
42829
  });
42830
+ resource.command("get-subscription-arr-history").description(`List every ARR evolution for a subscription, including previous and current fixed, variable, and total annual values in the subscription currency. Results are latest-first and paginated with limit/cursor.`).requiredOption("--id <value>", `id parameter`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--occurred-at.gte <value>", `Return evolutions that occurred at or after this UTC date and time.`).option("--occurred-at.lte <value>", `Return evolutions that occurred at or before this UTC date and time.`).addHelpText("after", `
42831
+ Examples:
42832
+ hyperline subscriptions get-subscription-arr-history --id <id>
42833
+ hyperline subscriptions get-subscription-arr-history --id <id> --limit <limit> --cursor <cursor>`).action(async (opts) => {
42834
+ const ctx = resource.parent?.opts()._ctx;
42835
+ if (!ctx) {
42836
+ process.stderr.write("Error: Not authenticated\n");
42837
+ process.exit(1);
42838
+ }
42839
+ const args = {};
42840
+ if (opts.id !== void 0)
42841
+ args.id = opts.id;
42842
+ if (opts.cursor !== void 0)
42843
+ args.cursor = opts.cursor;
42844
+ if (opts["occurredAt.gte"] !== void 0)
42845
+ args.occurred_at__gte = opts["occurredAt.gte"];
42846
+ if (opts["occurredAt.lte"] !== void 0)
42847
+ args.occurred_at__lte = opts["occurredAt.lte"];
42848
+ if (opts.limit !== void 0)
42849
+ args.limit = Number(opts.limit);
42850
+ await ctx.execute({
42851
+ method: "GET",
42852
+ path: "/v1/subscriptions/{id}/arr-history",
42853
+ args,
42854
+ queryParamKeys: [
42855
+ "limit",
42856
+ "cursor",
42857
+ "occurred_at__gte",
42858
+ "occurred_at__lte"
42859
+ ]
42860
+ });
42861
+ });
42444
42862
  resource.command("get-subscription-valuation").description(`Compute valuation metrics for a subscription: contract value (total/invoiced/remaining), recurring contract value, and ARR (fixed + variable). Optionally pass granularity (year/quarter/month) for period breakdown.`).requiredOption("--id <value>", `id parameter`).option("--granularity <value>", `Period granularity for the breakdown. When provided, contract value and recurring contract value include a \`by_period\` array.`).addHelpText("after", `
42445
42863
  Examples:
42446
42864
  hyperline subscriptions get-subscription-valuation --id <id>
@@ -42732,7 +43150,7 @@ Examples:
42732
43150
  ]
42733
43151
  });
42734
43152
  });
42735
- resource.command("create-subscription-transition").description(`Create a transition from one subscription to another, configured from a subscription, plan, or template. Can be applied immediately or scheduled.`).requiredOption("--source-subscription-id <value>", `The ID of the subscription to transition from`).option("--name <value>", `An optional name for the transition`).option("--calculation-method <value>", `The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period.`).option("--billing-cycle-transition-method <value>", `The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date.`).requiredOption("--application-schedule <value>", `Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately.`).option("--transition-date <value>", `The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).requiredOption("--target-subscription <value>", `The configuration of the subscription to transition to`).addHelpText("after", `
43153
+ resource.command("create-subscription-transition").description(`Create a transition from one subscription to another, configured from a subscription, plan, or template. Can be applied immediately or scheduled.`).requiredOption("--source-subscription-id <value>", `The ID of the subscription to transition from`).option("--name <value>", `An optional name for the transition`).option("--calculation-method <value>", `The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period. 'refund_and_reinvoice' (only available with application_schedule 'last_renewal') issues a credit note for what was invoiced for the current period and a separate invoice for the new configuration.`).option("--billing-cycle-transition-method <value>", `The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date.`).requiredOption("--application-schedule <value>", `When the transition should be applied: 'immediately', 'scheduled' for a specific date, or 'last_renewal' to apply it retroactively to the start of the current billing period (refunding what was already invoiced for that period and re-charging the new configuration). Past dates within the current billing period are supported and will be applied immediately.`).option("--transition-date <value>", `The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).requiredOption("--target-subscription <value>", `The configuration of the subscription to transition to`).addHelpText("after", `
42736
43154
  Examples:
42737
43155
  hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription>
42738
43156
  hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription> --name <name> --calculation-method <calculation_method>
@@ -42946,6 +43364,30 @@ Examples:
42946
43364
  });
42947
43365
  }
42948
43366
 
43367
+ // build/commands/generated/transactions.js
43368
+ function registerTransactionsCommands(parent) {
43369
+ const resource = parent.command("transactions").description("Manage transactions");
43370
+ resource.command("refund").description(`Refund a settled banking transaction for its full amount. The related invoice will switch back to to pay status. Use the create credit note endpoint if you want to cancel (and optionally refund) the initial invoice.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
43371
+ Examples:
43372
+ hyperline transactions refund --id <id>
43373
+ hyperline transactions refund --id <id> --output json`).action(async (opts) => {
43374
+ const ctx = resource.parent?.opts()._ctx;
43375
+ if (!ctx) {
43376
+ process.stderr.write("Error: Not authenticated\n");
43377
+ process.exit(1);
43378
+ }
43379
+ const args = {};
43380
+ if (opts.id !== void 0)
43381
+ args.id = opts.id;
43382
+ await ctx.execute({
43383
+ method: "POST",
43384
+ path: "/v1/transactions/{id}/refund",
43385
+ args,
43386
+ queryParamKeys: []
43387
+ });
43388
+ });
43389
+ }
43390
+
42949
43391
  // build/commands/generated/wallets.js
42950
43392
  function registerWalletsCommands(parent) {
42951
43393
  const resource = parent.command("wallets").description("Manage wallets");
@@ -43106,10 +43548,10 @@ Examples:
43106
43548
  queryParamKeys: []
43107
43549
  });
43108
43550
  });
43109
- resource.command("load").description(`Add credits to a wallet by charging the customer's payment method. The customer must have an active payment method.`).requiredOption("--id <value>", `id parameter`).option("--amount <number>", `Amount to be loaded onto the wallet. A corresponding invoice to pay will be generated. Expressed in currency's smallest unit.`).option("--amount-free <number>", `Amount free/offered to be loaded onto the wallet. No invoice is generated. Expressed in currency's smallest unit.`).option("--document-status <value>", `Indicates the status of the document (credit note in case of free top-up or invoice)`).addHelpText("after", `
43551
+ resource.command("load").description(`Add paid credits by charging the customer's payment method, or add free credits by issuing a credit note.`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Wallet load type. Use \`paid\` to collect payment from the customer's payment method, or \`free\` to grant credits without collecting payment.`).option("--amount <number>", `Amount to be loaded onto the wallet as free credits. A corresponding credit note will be generated and no payment is collected. Expressed in currency's smallest unit.`).option("--comment <value>", `Internal comment stored on the wallet transaction for context.`).option("--document-status <value>", `Indicates the status of the generated credit note for free top-ups.`).option("--bank-account-id <value>", `Bank account ID to use when recording a paid wallet load by bank transfer.`).option("--reference <value>", `Reference stored on the generated payment document for a paid wallet load.`).addHelpText("after", `
43110
43552
  Examples:
43111
43553
  hyperline wallets load --id <id>
43112
- hyperline wallets load --id <id> --amount <amount> --amount-free <amount_free>
43554
+ hyperline wallets load --id <id> --type <type> --amount <amount>
43113
43555
  hyperline wallets load --id <id> --output json`).action(async (opts) => {
43114
43556
  const ctx = resource.parent?.opts()._ctx;
43115
43557
  if (!ctx) {
@@ -43119,12 +43561,18 @@ Examples:
43119
43561
  const args = {};
43120
43562
  if (opts.id !== void 0)
43121
43563
  args.id = opts.id;
43564
+ if (opts.type !== void 0)
43565
+ args.type = opts.type;
43566
+ if (opts.comment !== void 0)
43567
+ args.comment = opts.comment;
43122
43568
  if (opts.documentStatus !== void 0)
43123
43569
  args.document_status = opts.documentStatus;
43570
+ if (opts.bankAccountId !== void 0)
43571
+ args.bank_account_id = opts.bankAccountId;
43572
+ if (opts.reference !== void 0)
43573
+ args.reference = opts.reference;
43124
43574
  if (opts.amount !== void 0)
43125
43575
  args.amount = Number(opts.amount);
43126
- if (opts.amountFree !== void 0)
43127
- args.amount_free = Number(opts.amountFree);
43128
43576
  await ctx.execute({
43129
43577
  method: "POST",
43130
43578
  path: "/v1/wallets/{id}/load",
@@ -43353,11 +43801,13 @@ function registerAllCommands(program2) {
43353
43801
  registerProductsCommands(program2);
43354
43802
  registerPrice_ConfigurationsCommands(program2);
43355
43803
  registerQuotesCommands(program2);
43804
+ registerQuotes_TemplatesCommands(program2);
43356
43805
  registerSubscriptions_TemplatesCommands(program2);
43357
43806
  registerSubscriptionsCommands(program2);
43358
43807
  registerSubscriptions_TransitionsCommands(program2);
43359
43808
  registerSubscriptions_PhasesCommands(program2);
43360
43809
  registerTaxesCommands(program2);
43810
+ registerTransactionsCommands(program2);
43361
43811
  registerWalletsCommands(program2);
43362
43812
  registerWebhooksCommands(program2);
43363
43813
  }
@@ -57148,6 +57598,7 @@ var BooleanSchema = external_exports.boolean().or(external_exports.enum(["true",
57148
57598
  });
57149
57599
  var StringSchemaForMultipartForm = external_exports.string().transform((value) => value === "" ? null : value);
57150
57600
  var StringArraySchemaForMultipartForm = external_exports.string().array().or(external_exports.string().length(0)).transform((value) => typeof value === "string" ? [] : value);
57601
+ var CommaSeparatedArraySchema = external_exports.string().optional().transform((raw) => raw ? raw.split(",").filter(Boolean) : void 0);
57151
57602
  var urlRegex = /^(?:(?:https?):\/\/)?(?:www\.)?(?:[\w-]+\.)+[a-z]{2,7}(?:\/\S*)?$/i;
57152
57603
  var ZodFlexibleUrl = external_exports.string({ message: "Invalid URL" }).regex(urlRegex).transform((url2) => {
57153
57604
  if (!url2)
@@ -57188,121 +57639,501 @@ var AmountSchema = external_exports.number().openapi({
57188
57639
  description: `Monetary amount. ${amountDescription}`
57189
57640
  });
57190
57641
 
57191
- // ../../node_modules/decimal.js/decimal.mjs
57192
- var EXP_LIMIT = 9e15;
57193
- var MAX_DIGITS = 1e9;
57194
- var NUMERALS = "0123456789abcdef";
57195
- var LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058";
57196
- var PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789";
57197
- var DEFAULTS = {
57198
- // These values must be integers within the stated ranges (inclusive).
57199
- // Most of these values can be changed at run-time using the `Decimal.config` method.
57200
- // The maximum number of significant digits of the result of a calculation or base conversion.
57201
- // E.g. `Decimal.config({ precision: 20 });`
57202
- precision: 20,
57203
- // 1 to MAX_DIGITS
57204
- // The rounding mode used when rounding to `precision`.
57205
- //
57206
- // ROUND_UP 0 Away from zero.
57207
- // ROUND_DOWN 1 Towards zero.
57208
- // ROUND_CEIL 2 Towards +Infinity.
57209
- // ROUND_FLOOR 3 Towards -Infinity.
57210
- // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.
57211
- // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
57212
- // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
57213
- // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
57214
- // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
57215
- //
57216
- // E.g.
57217
- // `Decimal.rounding = 4;`
57218
- // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
57219
- rounding: 4,
57220
- // 0 to 8
57221
- // The modulo mode used when calculating the modulus: a mod n.
57222
- // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
57223
- // The remainder (r) is calculated as: r = a - n * q.
57224
- //
57225
- // UP 0 The remainder is positive if the dividend is negative, else is negative.
57226
- // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).
57227
- // FLOOR 3 The remainder has the same sign as the divisor (Python %).
57228
- // HALF_EVEN 6 The IEEE 754 remainder function.
57229
- // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
57230
- //
57231
- // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
57232
- // division (9) are commonly used for the modulus operation. The other rounding modes can also
57233
- // be used, but they may not give useful results.
57234
- modulo: 1,
57235
- // 0 to 9
57236
- // The exponent value at and beneath which `toString` returns exponential notation.
57237
- // JavaScript numbers: -7
57238
- toExpNeg: -7,
57239
- // 0 to -EXP_LIMIT
57240
- // The exponent value at and above which `toString` returns exponential notation.
57241
- // JavaScript numbers: 21
57242
- toExpPos: 21,
57243
- // 0 to EXP_LIMIT
57244
- // The minimum exponent value, beneath which underflow to zero occurs.
57245
- // JavaScript numbers: -324 (5e-324)
57246
- minE: -EXP_LIMIT,
57247
- // -1 to -EXP_LIMIT
57248
- // The maximum exponent value, above which overflow to Infinity occurs.
57249
- // JavaScript numbers: 308 (1.7976931348623157e+308)
57250
- maxE: EXP_LIMIT,
57251
- // 1 to EXP_LIMIT
57252
- // Whether to use cryptographically-secure random number generation, if available.
57253
- crypto: false
57254
- // true/false
57255
- };
57256
- var inexact;
57257
- var quadrant;
57258
- var external = true;
57259
- var decimalError = "[DecimalError] ";
57260
- var invalidArgument = decimalError + "Invalid argument: ";
57261
- var precisionLimitExceeded = decimalError + "Precision limit exceeded";
57262
- var cryptoUnavailable = decimalError + "crypto unavailable";
57263
- var tag = "[object Decimal]";
57264
- var mathfloor = Math.floor;
57265
- var mathpow = Math.pow;
57266
- var isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i;
57267
- var isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i;
57268
- var isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i;
57269
- var isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
57270
- var BASE = 1e7;
57271
- var LOG_BASE = 7;
57272
- var MAX_SAFE_INTEGER = 9007199254740991;
57273
- var LN10_PRECISION = LN10.length - 1;
57274
- var PI_PRECISION = PI.length - 1;
57275
- var P = { toStringTag: tag };
57276
- P.absoluteValue = P.abs = function() {
57277
- var x = new this.constructor(this);
57278
- if (x.s < 0) x.s = 1;
57279
- return finalise(x);
57280
- };
57281
- P.ceil = function() {
57282
- return finalise(new this.constructor(this), this.e + 1, 2);
57283
- };
57284
- P.clampedTo = P.clamp = function(min2, max2) {
57285
- var k, x = this, Ctor = x.constructor;
57286
- min2 = new Ctor(min2);
57287
- max2 = new Ctor(max2);
57288
- if (!min2.s || !max2.s) return new Ctor(NaN);
57289
- if (min2.gt(max2)) throw Error(invalidArgument + max2);
57290
- k = x.cmp(min2);
57291
- return k < 0 ? min2 : x.cmp(max2) > 0 ? max2 : new Ctor(x);
57642
+ // ../hyperline-monitoring/build/context/context.js
57643
+ import { AsyncLocalStorage } from "node:async_hooks";
57644
+ var executionContextStorage = new AsyncLocalStorage();
57645
+ function getExecutionContext() {
57646
+ return executionContextStorage.getStore();
57647
+ }
57648
+
57649
+ // ../hyperline-monitoring/build/context/correlationId.js
57650
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
57651
+ var correlationIdStorage = new AsyncLocalStorage2();
57652
+ function getCorrelationId() {
57653
+ return correlationIdStorage.getStore();
57654
+ }
57655
+
57656
+ // ../hyperline-config/build/index.js
57657
+ import "dotenv/config";
57658
+ import * as stackTraceParser from "stacktrace-parser";
57659
+ function coerceBoolean() {
57660
+ return external_exports.any().refine((value) => ["true", "false"].includes(value), {
57661
+ message: "Expected boolean"
57662
+ }).transform((value) => (
57663
+ // biome-ignore lint/complexity/noUselessTernary: ignore
57664
+ value === "true" ? true : false
57665
+ ));
57666
+ }
57667
+ var types = {
57668
+ string: external_exports.coerce.string,
57669
+ number: external_exports.coerce.number,
57670
+ boolean: coerceBoolean,
57671
+ enum: external_exports.enum
57292
57672
  };
57293
- P.comparedTo = P.cmp = function(y) {
57294
- var i, j, xdL, ydL, x = this, xd = x.d, yd = (y = new x.constructor(y)).d, xs = x.s, ys = y.s;
57295
- if (!xd || !yd) {
57296
- return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;
57297
- }
57298
- if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;
57299
- if (xs !== ys) return xs;
57300
- if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;
57301
- xdL = xd.length;
57302
- ydL = yd.length;
57303
- for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {
57304
- if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;
57305
- }
57673
+ function getConfig(schema, testValues) {
57674
+ const validator = external_exports.object(Object.fromEntries(Object.entries(schema).map(([key, zodType]) => {
57675
+ if (zodType instanceof ZodOptional) {
57676
+ return [key, external_exports.string().optional()];
57677
+ }
57678
+ return [key, external_exports.string()];
57679
+ })));
57680
+ const processEnv = process.env;
57681
+ const isTestMode = processEnv.NODE_ENV === "test";
57682
+ const envVariables = {
57683
+ ...processEnv,
57684
+ ...isTestMode && testValues ? Object.fromEntries(Object.entries(testValues).map(([key, value]) => [key, String(value)])) : {}
57685
+ };
57686
+ const packageName = envVariables.npm_package_name;
57687
+ const parseProcessEnvResult = validator.safeParse(envVariables);
57688
+ if (!parseProcessEnvResult.success) {
57689
+ const parsedStackTrace = stackTraceParser.parse(parseProcessEnvResult.error.stack ?? "");
57690
+ const getConfigCallLine = parsedStackTrace.find((line) => {
57691
+ return !line.file?.includes("hyperline-config") && (line.file?.includes("apps/") || line.file?.includes("core/") || line.file?.includes("packages/"));
57692
+ });
57693
+ const callerFile = getConfigCallLine?.file;
57694
+ console.error(`Invalid environment variables for service \`${packageName}\`: \`${callerFile}\``);
57695
+ console.error(parseProcessEnvResult.error.format());
57696
+ process.exit(1);
57697
+ }
57698
+ const coercion = external_exports.object(schema);
57699
+ return coercion.parse(parseProcessEnvResult.data);
57700
+ }
57701
+
57702
+ // ../hyperline-monitoring/build/config.js
57703
+ var config2 = getConfig({
57704
+ // config
57705
+ APP_VERSION: types.string().optional(),
57706
+ DD_SERVICE: types.string().optional(),
57707
+ LOGGER_CONSOLE_ENABLED: types.boolean().optional(),
57708
+ LOGGER_STDOUT_ENABLED: types.boolean().optional(),
57709
+ NODE_ENV: types.enum(["local", "test", "staging", "sandbox", "production"]),
57710
+ EVENT_LOOP_MONITORING_ENABLED: types.boolean().optional(),
57711
+ MEMORY_MONITORING_ENABLED: types.boolean().optional(),
57712
+ MEMORY_MONITORING_INTERVAL_MS: types.number().optional()
57713
+ // secrets
57714
+ }, {
57715
+ APP_VERSION: void 0,
57716
+ DD_SERVICE: void 0,
57717
+ LOGGER_CONSOLE_ENABLED: false,
57718
+ LOGGER_STDOUT_ENABLED: false,
57719
+ EVENT_LOOP_MONITORING_ENABLED: false,
57720
+ MEMORY_MONITORING_ENABLED: false,
57721
+ MEMORY_MONITORING_INTERVAL_MS: 3e4,
57722
+ NODE_ENV: "test"
57723
+ });
57724
+
57725
+ // ../hyperline-monitoring/build/logger/logger.js
57726
+ import * as util from "node:util";
57727
+ import prune2 from "json-prune";
57728
+ import * as winston from "winston";
57729
+
57730
+ // ../hyperline-monitoring/build/logger/formatting/format.js
57731
+ import prune from "json-prune";
57732
+ var REDACTED_HEADER_KEY_PATTERN = /authorization|authenticate|cookie|secret|token|credential|signature|jwt|api[_-]?key|access[_-]?token|refresh[_-]?token|private[_-]?key/i;
57733
+ function jsonFormat(info) {
57734
+ const prunedInfo = JSON.parse(prune(info));
57735
+ for (const [key, value] of Object.entries(prunedInfo)) {
57736
+ info[key] = value;
57737
+ }
57738
+ return info;
57739
+ }
57740
+ function addMetadata({ getCorrelationId: getCorrelationId2, getExecutionContext: getExecutionContext2 }) {
57741
+ return (info) => {
57742
+ const correlationId = getCorrelationId2();
57743
+ const executionContext = getExecutionContext2();
57744
+ let traceContext;
57745
+ return {
57746
+ ...info,
57747
+ ...executionContext ?? {},
57748
+ ...traceContext ?? {},
57749
+ correlationId
57750
+ };
57751
+ };
57752
+ }
57753
+ function transformErrorEnrich(info, { depth }) {
57754
+ if (depth <= 0) {
57755
+ return info;
57756
+ }
57757
+ Object.entries(info).forEach(([key, value]) => {
57758
+ let newValue = value;
57759
+ if (newValue instanceof Error) {
57760
+ newValue = {
57761
+ ...newValue,
57762
+ // Copy error properties manually because they're not enumerable
57763
+ level: newValue.level,
57764
+ stack: newValue.stack,
57765
+ message: newValue.message,
57766
+ name: newValue.name
57767
+ };
57768
+ }
57769
+ if (newValue instanceof Object) {
57770
+ newValue = transformErrorEnrich(newValue, { depth: depth - 1 });
57771
+ }
57772
+ const isPropertyWritable = Object.getOwnPropertyDescriptor(info, key)?.writable ?? true;
57773
+ if (isPropertyWritable && newValue !== value) {
57774
+ info[key] = newValue;
57775
+ }
57776
+ });
57777
+ return info;
57778
+ }
57779
+ function transformPrune(info) {
57780
+ Object.entries(info).forEach(([key, value]) => {
57781
+ if (typeof value === "function") {
57782
+ return;
57783
+ }
57784
+ const newValue = value instanceof Object ? JSON.parse(prune(value, { depthDecr: 6 })) : value;
57785
+ const isPropertyWritable = Object.getOwnPropertyDescriptor(info, key)?.writable ?? true;
57786
+ if (isPropertyWritable && newValue !== value) {
57787
+ info[key] = newValue;
57788
+ }
57789
+ });
57790
+ return info;
57791
+ }
57792
+ function transformAxiosError(info) {
57793
+ Object.entries(info).forEach(([key, value]) => {
57794
+ if (typeof value === "object" && value?.name === "AxiosError") {
57795
+ info[key] = formatAxiosError(value);
57796
+ }
57797
+ });
57798
+ return info;
57799
+ }
57800
+ function formatAxiosError(error48) {
57801
+ if (!isRecord(error48) || error48.name !== "AxiosError") {
57802
+ return error48;
57803
+ }
57804
+ const request = isRecord(error48.config) ? error48.config : void 0;
57805
+ const response = isRecord(error48.response) ? error48.response : void 0;
57806
+ return {
57807
+ name: error48.name,
57808
+ message: error48.message,
57809
+ code: error48.code,
57810
+ request: {
57811
+ method: request?.method,
57812
+ url: request?.url,
57813
+ baseURL: request?.baseURL,
57814
+ params: request?.params,
57815
+ headers: redactHeaders({ headers: request?.headers }),
57816
+ "axios-retry": request?.["axios-retry"]
57817
+ },
57818
+ response: {
57819
+ status: response?.status,
57820
+ statusText: response?.statusText,
57821
+ headers: redactHeaders({ headers: response?.headers }),
57822
+ data: response?.data
57823
+ }
57824
+ };
57825
+ }
57826
+ function redactHeaders({ headers }) {
57827
+ if (!isRecord(headers)) {
57828
+ return headers;
57829
+ }
57830
+ return Object.fromEntries(Object.entries(headers).map(([headerKey, headerValue]) => [
57831
+ headerKey,
57832
+ REDACTED_HEADER_KEY_PATTERN.test(headerKey) ? "<redacted>" : headerValue
57833
+ ]));
57834
+ }
57835
+ function isRecord(value) {
57836
+ return typeof value === "object" && value !== null && !Array.isArray(value);
57837
+ }
57838
+
57839
+ // ../hyperline-monitoring/build/logger/formatting/routePath.js
57840
+ function transformUrlIntoRoutePath({ params, originalUrl }) {
57841
+ let routePath = originalUrl;
57842
+ for (const [param, value] of Object.entries(params ?? {})) {
57843
+ const strValue = Array.isArray(value) ? value.join("/") : value;
57844
+ routePath = routePath.replace(strValue, `:${param}`);
57845
+ }
57846
+ return routePath.split("?")[0] ?? routePath;
57847
+ }
57848
+
57849
+ // ../hyperline-monitoring/build/logger/formatting/http.js
57850
+ function logHttpRequest(logger2, request, extra) {
57851
+ const { message, metadata } = transform2(request);
57852
+ logger2.info(`HTTP REQ - ${message} ${extra?.postfix || ""}`, {
57853
+ ...metadata,
57854
+ ...extra?.metadata ?? {}
57855
+ });
57856
+ }
57857
+ function logHttpResponse(logger2, response, responseTime, extra) {
57858
+ const { request, statusCode, responseBody, responseHeaders } = response;
57859
+ const { message, metadata } = transform2(request);
57860
+ const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
57861
+ const responseMetadata = {
57862
+ statusCode,
57863
+ responseTime,
57864
+ responseBody,
57865
+ // Redacted so secrets (authorization/cookie/token/…) never reach the logs
57866
+ // while diagnostic headers (e.g. rate-limit headers on a 429) stay visible.
57867
+ responseHeaders: responseHeaders === void 0 ? void 0 : redactHeaders({ headers: responseHeaders })
57868
+ };
57869
+ logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
57870
+ ...metadata,
57871
+ ...responseMetadata,
57872
+ ...extra?.metadata ?? {}
57873
+ });
57874
+ }
57875
+ function transform2(request) {
57876
+ const method = request.method.toUpperCase();
57877
+ const message = `${method} ${request.originalUrl}`;
57878
+ const metadata = {};
57879
+ metadata.method = method;
57880
+ metadata.url = request.url;
57881
+ metadata.path = request.path;
57882
+ metadata.hostname = request.hostname;
57883
+ metadata.originalUrl = request.originalUrl;
57884
+ metadata.requestBody = request.body;
57885
+ metadata.routePath = transformUrlIntoRoutePath(request);
57886
+ metadata.apiKeyEnd = request.headers["authorization"]?.slice(-6);
57887
+ return { message, metadata };
57888
+ }
57889
+ function getReadableTime(time3) {
57890
+ return time3 < 1e4 ? `${time3}ms` : `${Math.round(time3 / 1e3)}s`;
57891
+ }
57892
+
57893
+ // ../hyperline-monitoring/build/logger/utils/network.js
57894
+ import * as os2 from "node:os";
57895
+ function getIpAddress() {
57896
+ const interfaces = Object.values(os2.networkInterfaces()).flat().filter((networkInterface) => {
57897
+ return networkInterface !== void 0;
57898
+ });
57899
+ const mainInterface = interfaces.find(({ family, internal }) => family === "IPv4" && internal === false);
57900
+ return mainInterface ? mainInterface.address : null;
57901
+ }
57902
+
57903
+ // ../hyperline-monitoring/build/logger/logger.js
57904
+ function buildLoggerFactory({ config: config4, context }) {
57905
+ const defaultMeta = {
57906
+ env: context.env,
57907
+ service: context.service,
57908
+ version: context.version,
57909
+ pid: process.pid,
57910
+ ppid: process.ppid,
57911
+ host: getIpAddress()
57912
+ };
57913
+ const transports2 = [];
57914
+ if (config4.enableConsoleTransport) {
57915
+ transports2.push(createTransportConsole());
57916
+ }
57917
+ if (config4.enableStdoutTransport) {
57918
+ transports2.push(createTransportStdout());
57919
+ }
57920
+ if (Object.values(config4).every((value) => !value)) {
57921
+ transports2.push(createTransportSilent());
57922
+ }
57923
+ for (const transport of transports2) {
57924
+ transport.on("error", (error48) => {
57925
+ console.error(`Unable to log to transport=${transport.name}: ${error48.message} ${JSON.stringify(error48)}`);
57926
+ });
57927
+ }
57928
+ const internalLogger = winston.createLogger({
57929
+ transports: transports2,
57930
+ defaultMeta,
57931
+ format: winston.format.combine(winston.format.splat(), winston.format(addMetadata({ getCorrelationId, getExecutionContext }))(), winston.format(transformErrorEnrich)({ depth: 5 }), winston.format(transformPrune)(), winston.format(transformAxiosError)(), winston.format.timestamp()),
57932
+ exitOnError: false
57933
+ });
57934
+ function createLogger3({ serviceName }) {
57935
+ const logger2 = internalLogger.child({ subService: serviceName });
57936
+ return {
57937
+ debug: bindLogger(logger2, "debug"),
57938
+ info: bindLogger(logger2, "info"),
57939
+ warn: bindLogger(logger2, "warn"),
57940
+ error: bindLogger(logger2, "error"),
57941
+ on: logger2.on.bind(logger2),
57942
+ end: logger2.end.bind(logger2)
57943
+ };
57944
+ }
57945
+ return {
57946
+ createLogger: createLogger3
57947
+ };
57948
+ }
57949
+ function bindLogger(logger2, severity) {
57950
+ return (message, data) => {
57951
+ logger2[severity].bind(logger2)(message, preserveReservedKeys(data));
57952
+ };
57953
+ }
57954
+ function preserveReservedKeys(data) {
57955
+ if (!data)
57956
+ return;
57957
+ return Object.fromEntries(Object.entries(data).map(([key, value]) => {
57958
+ let finalKey = key;
57959
+ if (key === "status") {
57960
+ finalKey = "_status";
57961
+ } else if (key === "service") {
57962
+ finalKey = "_service";
57963
+ }
57964
+ return [finalKey, value];
57965
+ }));
57966
+ }
57967
+ var verboseLevels = ["warn", "error", "debug"];
57968
+ function createTransportConsole() {
57969
+ return new winston.transports.Console({
57970
+ level: "debug",
57971
+ handleExceptions: true,
57972
+ format: winston.format.combine(winston.format(jsonFormat)(), winston.format((info) => {
57973
+ const { level, message, ...others } = info;
57974
+ const parts = [message];
57975
+ if (Object.keys(others).length > 0 && verboseLevels.includes(level)) {
57976
+ const rawOthers = JSON.parse(prune2(others));
57977
+ parts.push(util.inspect(rawOthers, false, 4, true));
57978
+ }
57979
+ info.message = parts.filter((part) => !!part).join("\n");
57980
+ return info;
57981
+ })(), winston.format.colorize(), winston.format.printf(({ timestamp, level, message, service = "?" }) => {
57982
+ const result = `[${timestamp}] ${level} ${service}: ${message}`;
57983
+ return result.replace(/\\n/g, "\n");
57984
+ }))
57985
+ });
57986
+ }
57987
+ function createTransportStdout() {
57988
+ return new winston.transports.Console({
57989
+ level: "debug",
57990
+ handleExceptions: true,
57991
+ format: winston.format.combine(winston.format(jsonFormat)(), winston.format.timestamp(), winston.format.json())
57992
+ });
57993
+ }
57994
+ function createTransportSilent() {
57995
+ return new winston.transports.Console({
57996
+ silent: true
57997
+ });
57998
+ }
57999
+
58000
+ // ../hyperline-monitoring/build/logger/instance.js
58001
+ var loggerFactory = buildLoggerFactory({
58002
+ config: {
58003
+ enableConsoleTransport: config2.LOGGER_CONSOLE_ENABLED ?? false,
58004
+ enableStdoutTransport: config2.LOGGER_STDOUT_ENABLED ?? false
58005
+ },
58006
+ context: {
58007
+ env: config2.NODE_ENV,
58008
+ service: config2.DD_SERVICE ?? "api",
58009
+ version: config2.APP_VERSION
58010
+ }
58011
+ });
58012
+ var createLogger2 = loggerFactory.createLogger;
58013
+ var logger = loggerFactory.createLogger({ serviceName: "default" });
58014
+
58015
+ // ../hyperline-monitoring/build/tracing/tracing.js
58016
+ import tracer from "dd-trace";
58017
+
58018
+ // ../hyperline-lib/build/utils/aws.js
58019
+ import { GetBucketLocationCommand, S3Client } from "@aws-sdk/client-s3";
58020
+ import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
58021
+
58022
+ // ../../node_modules/decimal.js/decimal.mjs
58023
+ var EXP_LIMIT = 9e15;
58024
+ var MAX_DIGITS = 1e9;
58025
+ var NUMERALS = "0123456789abcdef";
58026
+ var LN10 = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058";
58027
+ var PI = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789";
58028
+ var DEFAULTS = {
58029
+ // These values must be integers within the stated ranges (inclusive).
58030
+ // Most of these values can be changed at run-time using the `Decimal.config` method.
58031
+ // The maximum number of significant digits of the result of a calculation or base conversion.
58032
+ // E.g. `Decimal.config({ precision: 20 });`
58033
+ precision: 20,
58034
+ // 1 to MAX_DIGITS
58035
+ // The rounding mode used when rounding to `precision`.
58036
+ //
58037
+ // ROUND_UP 0 Away from zero.
58038
+ // ROUND_DOWN 1 Towards zero.
58039
+ // ROUND_CEIL 2 Towards +Infinity.
58040
+ // ROUND_FLOOR 3 Towards -Infinity.
58041
+ // ROUND_HALF_UP 4 Towards nearest neighbour. If equidistant, up.
58042
+ // ROUND_HALF_DOWN 5 Towards nearest neighbour. If equidistant, down.
58043
+ // ROUND_HALF_EVEN 6 Towards nearest neighbour. If equidistant, towards even neighbour.
58044
+ // ROUND_HALF_CEIL 7 Towards nearest neighbour. If equidistant, towards +Infinity.
58045
+ // ROUND_HALF_FLOOR 8 Towards nearest neighbour. If equidistant, towards -Infinity.
58046
+ //
58047
+ // E.g.
58048
+ // `Decimal.rounding = 4;`
58049
+ // `Decimal.rounding = Decimal.ROUND_HALF_UP;`
58050
+ rounding: 4,
58051
+ // 0 to 8
58052
+ // The modulo mode used when calculating the modulus: a mod n.
58053
+ // The quotient (q = a / n) is calculated according to the corresponding rounding mode.
58054
+ // The remainder (r) is calculated as: r = a - n * q.
58055
+ //
58056
+ // UP 0 The remainder is positive if the dividend is negative, else is negative.
58057
+ // DOWN 1 The remainder has the same sign as the dividend (JavaScript %).
58058
+ // FLOOR 3 The remainder has the same sign as the divisor (Python %).
58059
+ // HALF_EVEN 6 The IEEE 754 remainder function.
58060
+ // EUCLID 9 Euclidian division. q = sign(n) * floor(a / abs(n)). Always positive.
58061
+ //
58062
+ // Truncated division (1), floored division (3), the IEEE 754 remainder (6), and Euclidian
58063
+ // division (9) are commonly used for the modulus operation. The other rounding modes can also
58064
+ // be used, but they may not give useful results.
58065
+ modulo: 1,
58066
+ // 0 to 9
58067
+ // The exponent value at and beneath which `toString` returns exponential notation.
58068
+ // JavaScript numbers: -7
58069
+ toExpNeg: -7,
58070
+ // 0 to -EXP_LIMIT
58071
+ // The exponent value at and above which `toString` returns exponential notation.
58072
+ // JavaScript numbers: 21
58073
+ toExpPos: 21,
58074
+ // 0 to EXP_LIMIT
58075
+ // The minimum exponent value, beneath which underflow to zero occurs.
58076
+ // JavaScript numbers: -324 (5e-324)
58077
+ minE: -EXP_LIMIT,
58078
+ // -1 to -EXP_LIMIT
58079
+ // The maximum exponent value, above which overflow to Infinity occurs.
58080
+ // JavaScript numbers: 308 (1.7976931348623157e+308)
58081
+ maxE: EXP_LIMIT,
58082
+ // 1 to EXP_LIMIT
58083
+ // Whether to use cryptographically-secure random number generation, if available.
58084
+ crypto: false
58085
+ // true/false
58086
+ };
58087
+ var inexact;
58088
+ var quadrant;
58089
+ var external = true;
58090
+ var decimalError = "[DecimalError] ";
58091
+ var invalidArgument = decimalError + "Invalid argument: ";
58092
+ var precisionLimitExceeded = decimalError + "Precision limit exceeded";
58093
+ var cryptoUnavailable = decimalError + "crypto unavailable";
58094
+ var tag = "[object Decimal]";
58095
+ var mathfloor = Math.floor;
58096
+ var mathpow = Math.pow;
58097
+ var isBinary = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i;
58098
+ var isHex = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i;
58099
+ var isOctal = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i;
58100
+ var isDecimal = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;
58101
+ var BASE = 1e7;
58102
+ var LOG_BASE = 7;
58103
+ var MAX_SAFE_INTEGER = 9007199254740991;
58104
+ var LN10_PRECISION = LN10.length - 1;
58105
+ var PI_PRECISION = PI.length - 1;
58106
+ var P = { toStringTag: tag };
58107
+ P.absoluteValue = P.abs = function() {
58108
+ var x = new this.constructor(this);
58109
+ if (x.s < 0) x.s = 1;
58110
+ return finalise(x);
58111
+ };
58112
+ P.ceil = function() {
58113
+ return finalise(new this.constructor(this), this.e + 1, 2);
58114
+ };
58115
+ P.clampedTo = P.clamp = function(min2, max2) {
58116
+ var k, x = this, Ctor = x.constructor;
58117
+ min2 = new Ctor(min2);
58118
+ max2 = new Ctor(max2);
58119
+ if (!min2.s || !max2.s) return new Ctor(NaN);
58120
+ if (min2.gt(max2)) throw Error(invalidArgument + max2);
58121
+ k = x.cmp(min2);
58122
+ return k < 0 ? min2 : x.cmp(max2) > 0 ? max2 : new Ctor(x);
58123
+ };
58124
+ P.comparedTo = P.cmp = function(y) {
58125
+ var i, j, xdL, ydL, x = this, xd = x.d, yd = (y = new x.constructor(y)).d, xs = x.s, ys = y.s;
58126
+ if (!xd || !yd) {
58127
+ return !xs || !ys ? NaN : xs !== ys ? xs : xd === yd ? 0 : !xd ^ xs < 0 ? 1 : -1;
58128
+ }
58129
+ if (!xd[0] || !yd[0]) return xd[0] ? xs : yd[0] ? -ys : 0;
58130
+ if (xs !== ys) return xs;
58131
+ if (x.e !== y.e) return x.e > y.e ^ xs < 0 ? 1 : -1;
58132
+ xdL = xd.length;
58133
+ ydL = yd.length;
58134
+ for (i = 0, j = xdL < ydL ? xdL : ydL; i < j; ++i) {
58135
+ if (xd[i] !== yd[i]) return xd[i] > yd[i] ^ xs < 0 ? 1 : -1;
58136
+ }
57306
58137
  return xdL === ydL ? 0 : xdL > ydL ^ xs < 0 ? 1 : -1;
57307
58138
  };
57308
58139
  P.cosine = P.cos = function() {
@@ -59009,7 +59840,7 @@ function ceil(x) {
59009
59840
  function clamp(x, min2, max2) {
59010
59841
  return new this(x).clamp(min2, max2);
59011
59842
  }
59012
- function config2(obj) {
59843
+ function config3(obj) {
59013
59844
  if (!obj || typeof obj !== "object") throw Error(decimalError + "Object expected");
59014
59845
  var i, p, v, useDefaults = obj.defaults === true, ps = [
59015
59846
  "precision",
@@ -59163,7 +59994,7 @@ function clone2(obj) {
59163
59994
  Decimal2.ROUND_HALF_CEIL = 7;
59164
59995
  Decimal2.ROUND_HALF_FLOOR = 8;
59165
59996
  Decimal2.EUCLID = 9;
59166
- Decimal2.config = Decimal2.set = config2;
59997
+ Decimal2.config = Decimal2.set = config3;
59167
59998
  Decimal2.clone = clone2;
59168
59999
  Decimal2.isDecimal = isDecimalInstance;
59169
60000
  Decimal2.abs = abs;
@@ -61315,444 +62146,86 @@ var countriesAndCurrencies = (
61315
62146
  },
61316
62147
  {
61317
62148
  countryCode: "VN",
61318
- countryName: "Vietnam",
61319
- currencyCode: "VND",
61320
- population: "89571130",
61321
- capital: "Hanoi",
61322
- continentName: "Asia"
61323
- },
61324
- {
61325
- countryCode: "VU",
61326
- countryName: "Vanuatu",
61327
- currencyCode: "VUV",
61328
- population: "221552",
61329
- capital: "Port Vila",
61330
- continentName: "Oceania"
61331
- },
61332
- {
61333
- countryCode: "WF",
61334
- countryName: "Wallis and Futuna",
61335
- currencyCode: "XPF",
61336
- population: "16025",
61337
- capital: "Mata-Utu",
61338
- continentName: "Oceania"
61339
- },
61340
- {
61341
- countryCode: "WS",
61342
- countryName: "Samoa",
61343
- currencyCode: "WST",
61344
- population: "192001",
61345
- capital: "Apia",
61346
- continentName: "Oceania"
61347
- },
61348
- {
61349
- countryCode: "XK",
61350
- countryName: "Kosovo",
61351
- currencyCode: "EUR",
61352
- population: "1800000",
61353
- capital: "Pristina",
61354
- continentName: "Europe"
61355
- },
61356
- {
61357
- countryCode: "YE",
61358
- countryName: "Yemen",
61359
- currencyCode: "YER",
61360
- population: "23495361",
61361
- capital: "Sanaa",
61362
- continentName: "Asia"
61363
- },
61364
- {
61365
- countryCode: "YT",
61366
- countryName: "Mayotte",
61367
- currencyCode: "EUR",
61368
- population: "159042",
61369
- capital: "Mamoudzou",
61370
- continentName: "Africa"
61371
- },
61372
- {
61373
- countryCode: "ZA",
61374
- countryName: "South Africa",
61375
- currencyCode: "ZAR",
61376
- population: "49000000",
61377
- capital: "Pretoria",
61378
- continentName: "Africa"
61379
- },
61380
- {
61381
- countryCode: "ZM",
61382
- countryName: "Zambia",
61383
- currencyCode: "ZMW",
61384
- population: "13460305",
61385
- capital: "Lusaka",
61386
- continentName: "Africa"
61387
- },
61388
- {
61389
- countryCode: "ZW",
61390
- countryName: "Zimbabwe",
61391
- currencyCode: "ZWL",
61392
- population: "13061000",
61393
- capital: "Harare",
61394
- continentName: "Africa"
61395
- }
61396
- ]
61397
- );
61398
-
61399
- // ../hyperline-monitoring/build/context/context.js
61400
- import { AsyncLocalStorage } from "node:async_hooks";
61401
- var executionContextStorage = new AsyncLocalStorage();
61402
- function getExecutionContext() {
61403
- return executionContextStorage.getStore();
61404
- }
61405
-
61406
- // ../hyperline-monitoring/build/context/correlationId.js
61407
- import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
61408
- var correlationIdStorage = new AsyncLocalStorage2();
61409
- function getCorrelationId() {
61410
- return correlationIdStorage.getStore();
61411
- }
61412
-
61413
- // ../hyperline-config/build/index.js
61414
- import "dotenv/config";
61415
- import * as stackTraceParser from "stacktrace-parser";
61416
- function coerceBoolean() {
61417
- return external_exports.any().refine((value) => ["true", "false"].includes(value), {
61418
- message: "Expected boolean"
61419
- }).transform((value) => (
61420
- // biome-ignore lint/complexity/noUselessTernary: ignore
61421
- value === "true" ? true : false
61422
- ));
61423
- }
61424
- var types = {
61425
- string: external_exports.coerce.string,
61426
- number: external_exports.coerce.number,
61427
- boolean: coerceBoolean,
61428
- enum: external_exports.enum
61429
- };
61430
- function getConfig(schema, testValues) {
61431
- const validator = external_exports.object(Object.fromEntries(Object.entries(schema).map(([key, zodType]) => {
61432
- if (zodType instanceof ZodOptional) {
61433
- return [key, external_exports.string().optional()];
61434
- }
61435
- return [key, external_exports.string()];
61436
- })));
61437
- const processEnv = process.env;
61438
- const isTestMode = processEnv.NODE_ENV === "test";
61439
- const envVariables = {
61440
- ...processEnv,
61441
- ...isTestMode && testValues ? Object.fromEntries(Object.entries(testValues).map(([key, value]) => [key, String(value)])) : {}
61442
- };
61443
- const packageName = envVariables.npm_package_name;
61444
- const parseProcessEnvResult = validator.safeParse(envVariables);
61445
- if (!parseProcessEnvResult.success) {
61446
- const parsedStackTrace = stackTraceParser.parse(parseProcessEnvResult.error.stack ?? "");
61447
- const getConfigCallLine = parsedStackTrace.find((line) => {
61448
- return !line.file?.includes("hyperline-config") && (line.file?.includes("apps/") || line.file?.includes("core/") || line.file?.includes("packages/"));
61449
- });
61450
- const callerFile = getConfigCallLine?.file;
61451
- console.error(`Invalid environment variables for service \`${packageName}\`: \`${callerFile}\``);
61452
- console.error(parseProcessEnvResult.error.format());
61453
- process.exit(1);
61454
- }
61455
- const coercion = external_exports.object(schema);
61456
- return coercion.parse(parseProcessEnvResult.data);
61457
- }
61458
-
61459
- // ../hyperline-monitoring/build/config.js
61460
- var config3 = getConfig({
61461
- // config
61462
- APP_VERSION: types.string().optional(),
61463
- LOGGER_CONSOLE_ENABLED: types.boolean().optional(),
61464
- LOGGER_STDOUT_ENABLED: types.boolean().optional(),
61465
- NODE_ENV: types.enum(["local", "test", "staging", "sandbox", "production"]),
61466
- EVENT_LOOP_MONITORING_ENABLED: types.boolean().optional(),
61467
- MEMORY_MONITORING_ENABLED: types.boolean().optional(),
61468
- MEMORY_MONITORING_INTERVAL_MS: types.number().optional()
61469
- // secrets
61470
- }, {
61471
- APP_VERSION: void 0,
61472
- LOGGER_CONSOLE_ENABLED: false,
61473
- LOGGER_STDOUT_ENABLED: false,
61474
- EVENT_LOOP_MONITORING_ENABLED: false,
61475
- MEMORY_MONITORING_ENABLED: false,
61476
- MEMORY_MONITORING_INTERVAL_MS: 3e4,
61477
- NODE_ENV: "test"
61478
- });
61479
-
61480
- // ../hyperline-monitoring/build/logger/logger.js
61481
- import * as util from "node:util";
61482
- import prune2 from "json-prune";
61483
- import * as winston from "winston";
61484
-
61485
- // ../hyperline-monitoring/build/logger/formatting/format.js
61486
- import prune from "json-prune";
61487
- function jsonFormat(info) {
61488
- const prunedInfo = JSON.parse(prune(info));
61489
- for (const [key, value] of Object.entries(prunedInfo)) {
61490
- info[key] = value;
61491
- }
61492
- return info;
61493
- }
61494
- function addMetadata({ getCorrelationId: getCorrelationId2, getExecutionContext: getExecutionContext2 }) {
61495
- return (info) => {
61496
- const correlationId = getCorrelationId2();
61497
- const executionContext = getExecutionContext2();
61498
- let traceContext;
61499
- return {
61500
- ...info,
61501
- ...executionContext ?? {},
61502
- ...traceContext ?? {},
61503
- correlationId
61504
- };
61505
- };
61506
- }
61507
- function transformErrorEnrich(info, { depth }) {
61508
- if (depth <= 0) {
61509
- return info;
61510
- }
61511
- Object.entries(info).forEach(([key, value]) => {
61512
- let newValue = value;
61513
- if (newValue instanceof Error) {
61514
- newValue = {
61515
- ...newValue,
61516
- // Copy error properties manually because they're not enumerable
61517
- level: newValue.level,
61518
- stack: newValue.stack,
61519
- message: newValue.message,
61520
- name: newValue.name
61521
- };
61522
- }
61523
- if (newValue instanceof Object) {
61524
- newValue = transformErrorEnrich(newValue, { depth: depth - 1 });
61525
- }
61526
- const isPropertyWritable = Object.getOwnPropertyDescriptor(info, key)?.writable ?? true;
61527
- if (isPropertyWritable && newValue !== value) {
61528
- info[key] = newValue;
61529
- }
61530
- });
61531
- return info;
61532
- }
61533
- function transformPrune(info) {
61534
- Object.entries(info).forEach(([key, value]) => {
61535
- if (typeof value === "function") {
61536
- return;
61537
- }
61538
- const newValue = value instanceof Object ? JSON.parse(prune(value, { depthDecr: 6 })) : value;
61539
- const isPropertyWritable = Object.getOwnPropertyDescriptor(info, key)?.writable ?? true;
61540
- if (isPropertyWritable && newValue !== value) {
61541
- info[key] = newValue;
61542
- }
61543
- });
61544
- return info;
61545
- }
61546
- function transformAxiosError(info) {
61547
- Object.entries(info).forEach(([key, value]) => {
61548
- if (typeof value === "object" && value?.name === "AxiosError") {
61549
- info[key] = formatAxiosError(value);
61550
- }
61551
- });
61552
- return info;
61553
- }
61554
- function formatAxiosError(error48) {
61555
- if (!isRecord(error48) || error48.name !== "AxiosError") {
61556
- return error48;
61557
- }
61558
- const request = isRecord(error48.config) ? error48.config : void 0;
61559
- const response = isRecord(error48.response) ? error48.response : void 0;
61560
- return {
61561
- name: error48.name,
61562
- message: error48.message,
61563
- code: error48.code,
61564
- request: {
61565
- method: request?.method,
61566
- url: request?.url,
61567
- baseURL: request?.baseURL,
61568
- params: request?.params,
61569
- headers: request?.headers,
61570
- "axios-retry": request?.["axios-retry"]
62149
+ countryName: "Vietnam",
62150
+ currencyCode: "VND",
62151
+ population: "89571130",
62152
+ capital: "Hanoi",
62153
+ continentName: "Asia"
61571
62154
  },
61572
- response: {
61573
- status: response?.status,
61574
- statusText: response?.statusText,
61575
- headers: response?.headers,
61576
- data: response?.data
61577
- }
61578
- };
61579
- }
61580
- function isRecord(value) {
61581
- return typeof value === "object" && value !== null && !Array.isArray(value);
61582
- }
61583
-
61584
- // ../hyperline-monitoring/build/logger/formatting/routePath.js
61585
- function transformUrlIntoRoutePath({ params, originalUrl }) {
61586
- let routePath = originalUrl;
61587
- for (const [param, value] of Object.entries(params ?? {})) {
61588
- const strValue = Array.isArray(value) ? value.join("/") : value;
61589
- routePath = routePath.replace(strValue, `:${param}`);
61590
- }
61591
- return routePath.split("?")[0] ?? routePath;
61592
- }
61593
-
61594
- // ../hyperline-monitoring/build/logger/formatting/http.js
61595
- function logHttpRequest(logger2, request, extra) {
61596
- const { message, metadata } = transform2(request);
61597
- logger2.info(`HTTP REQ - ${message} ${extra?.postfix || ""}`, {
61598
- ...metadata,
61599
- ...extra?.metadata ?? {}
61600
- });
61601
- }
61602
- function logHttpResponse(logger2, response, responseTime, extra) {
61603
- const { request, statusCode, responseBody } = response;
61604
- const { message, metadata } = transform2(request);
61605
- const readableResponseTime = responseTime ? getReadableTime(responseTime) : void 0;
61606
- const responseMetadata = {
61607
- statusCode,
61608
- responseTime,
61609
- responseBody
61610
- };
61611
- logger2.info(`HTTP RES - ${message} ${statusCode} ${readableResponseTime || ""} ${extra?.postfix || ""}`, {
61612
- ...metadata,
61613
- ...responseMetadata,
61614
- ...extra?.metadata ?? {}
61615
- });
61616
- }
61617
- function transform2(request) {
61618
- const method = request.method.toUpperCase();
61619
- const message = `${method} ${request.originalUrl}`;
61620
- const metadata = {};
61621
- metadata.method = method;
61622
- metadata.url = request.url;
61623
- metadata.path = request.path;
61624
- metadata.hostname = request.hostname;
61625
- metadata.originalUrl = request.originalUrl;
61626
- metadata.requestBody = request.body;
61627
- metadata.routePath = transformUrlIntoRoutePath(request);
61628
- metadata.apiKeyEnd = request.headers["authorization"]?.slice(-6);
61629
- return { message, metadata };
61630
- }
61631
- function getReadableTime(time3) {
61632
- return time3 < 1e4 ? `${time3}ms` : `${Math.round(time3 / 1e3)}s`;
61633
- }
61634
-
61635
- // ../hyperline-monitoring/build/logger/utils/network.js
61636
- import * as os2 from "node:os";
61637
- function getIpAddress() {
61638
- const interfaces = Object.values(os2.networkInterfaces()).flat().filter((networkInterface) => {
61639
- return networkInterface !== void 0;
61640
- });
61641
- const mainInterface = interfaces.find(({ family, internal }) => family === "IPv4" && internal === false);
61642
- return mainInterface ? mainInterface.address : null;
61643
- }
61644
-
61645
- // ../hyperline-monitoring/build/logger/logger.js
61646
- function buildLoggerFactory({ config: config4, context }) {
61647
- const defaultMeta = {
61648
- env: context.env,
61649
- service: context.service,
61650
- version: context.version,
61651
- pid: process.pid,
61652
- ppid: process.ppid,
61653
- host: getIpAddress()
61654
- };
61655
- const transports2 = [];
61656
- if (config4.enableConsoleTransport) {
61657
- transports2.push(createTransportConsole());
61658
- }
61659
- if (config4.enableStdoutTransport) {
61660
- transports2.push(createTransportStdout());
61661
- }
61662
- if (Object.values(config4).every((value) => !value)) {
61663
- transports2.push(createTransportSilent());
61664
- }
61665
- for (const transport of transports2) {
61666
- transport.on("error", (error48) => {
61667
- console.error(`Unable to log to transport=${transport.name}: ${error48.message} ${JSON.stringify(error48)}`);
61668
- });
61669
- }
61670
- const internalLogger = winston.createLogger({
61671
- transports: transports2,
61672
- defaultMeta,
61673
- format: winston.format.combine(winston.format.splat(), winston.format(addMetadata({ getCorrelationId, getExecutionContext }))(), winston.format(transformErrorEnrich)({ depth: 5 }), winston.format(transformPrune)(), winston.format(transformAxiosError)(), winston.format.timestamp()),
61674
- exitOnError: false
61675
- });
61676
- function createLogger3({ serviceName }) {
61677
- const logger2 = internalLogger.child({ subService: serviceName });
61678
- return {
61679
- debug: bindLogger(logger2, "debug"),
61680
- info: bindLogger(logger2, "info"),
61681
- warn: bindLogger(logger2, "warn"),
61682
- error: bindLogger(logger2, "error"),
61683
- on: logger2.on.bind(logger2),
61684
- end: logger2.end.bind(logger2)
61685
- };
61686
- }
61687
- return {
61688
- createLogger: createLogger3
61689
- };
61690
- }
61691
- function bindLogger(logger2, severity) {
61692
- return (message, data) => {
61693
- logger2[severity].bind(logger2)(message, preserveReservedKeys(data));
61694
- };
61695
- }
61696
- function preserveReservedKeys(data) {
61697
- if (!data)
61698
- return;
61699
- return Object.fromEntries(Object.entries(data).map(([key, value]) => {
61700
- let finalKey = key;
61701
- if (key === "status") {
61702
- finalKey = "_status";
61703
- } else if (key === "service") {
61704
- finalKey = "_service";
62155
+ {
62156
+ countryCode: "VU",
62157
+ countryName: "Vanuatu",
62158
+ currencyCode: "VUV",
62159
+ population: "221552",
62160
+ capital: "Port Vila",
62161
+ continentName: "Oceania"
62162
+ },
62163
+ {
62164
+ countryCode: "WF",
62165
+ countryName: "Wallis and Futuna",
62166
+ currencyCode: "XPF",
62167
+ population: "16025",
62168
+ capital: "Mata-Utu",
62169
+ continentName: "Oceania"
62170
+ },
62171
+ {
62172
+ countryCode: "WS",
62173
+ countryName: "Samoa",
62174
+ currencyCode: "WST",
62175
+ population: "192001",
62176
+ capital: "Apia",
62177
+ continentName: "Oceania"
62178
+ },
62179
+ {
62180
+ countryCode: "XK",
62181
+ countryName: "Kosovo",
62182
+ currencyCode: "EUR",
62183
+ population: "1800000",
62184
+ capital: "Pristina",
62185
+ continentName: "Europe"
62186
+ },
62187
+ {
62188
+ countryCode: "YE",
62189
+ countryName: "Yemen",
62190
+ currencyCode: "YER",
62191
+ population: "23495361",
62192
+ capital: "Sanaa",
62193
+ continentName: "Asia"
62194
+ },
62195
+ {
62196
+ countryCode: "YT",
62197
+ countryName: "Mayotte",
62198
+ currencyCode: "EUR",
62199
+ population: "159042",
62200
+ capital: "Mamoudzou",
62201
+ continentName: "Africa"
62202
+ },
62203
+ {
62204
+ countryCode: "ZA",
62205
+ countryName: "South Africa",
62206
+ currencyCode: "ZAR",
62207
+ population: "49000000",
62208
+ capital: "Pretoria",
62209
+ continentName: "Africa"
62210
+ },
62211
+ {
62212
+ countryCode: "ZM",
62213
+ countryName: "Zambia",
62214
+ currencyCode: "ZMW",
62215
+ population: "13460305",
62216
+ capital: "Lusaka",
62217
+ continentName: "Africa"
62218
+ },
62219
+ {
62220
+ countryCode: "ZW",
62221
+ countryName: "Zimbabwe",
62222
+ currencyCode: "ZWL",
62223
+ population: "13061000",
62224
+ capital: "Harare",
62225
+ continentName: "Africa"
61705
62226
  }
61706
- return [finalKey, value];
61707
- }));
61708
- }
61709
- var verboseLevels = ["warn", "error", "debug"];
61710
- function createTransportConsole() {
61711
- return new winston.transports.Console({
61712
- level: "debug",
61713
- handleExceptions: true,
61714
- format: winston.format.combine(winston.format(jsonFormat)(), winston.format((info) => {
61715
- const { level, message, ...others } = info;
61716
- const parts = [message];
61717
- if (Object.keys(others).length > 0 && verboseLevels.includes(level)) {
61718
- const rawOthers = JSON.parse(prune2(others));
61719
- parts.push(util.inspect(rawOthers, false, 4, true));
61720
- }
61721
- info.message = parts.filter((part) => !!part).join("\n");
61722
- return info;
61723
- })(), winston.format.colorize(), winston.format.printf(({ timestamp, level, message, service = "?" }) => {
61724
- const result = `[${timestamp}] ${level} ${service}: ${message}`;
61725
- return result.replace(/\\n/g, "\n");
61726
- }))
61727
- });
61728
- }
61729
- function createTransportStdout() {
61730
- return new winston.transports.Console({
61731
- level: "debug",
61732
- handleExceptions: true,
61733
- format: winston.format.combine(winston.format(jsonFormat)(), winston.format.timestamp(), winston.format.json())
61734
- });
61735
- }
61736
- function createTransportSilent() {
61737
- return new winston.transports.Console({
61738
- silent: true
61739
- });
61740
- }
61741
-
61742
- // ../hyperline-monitoring/build/logger/instance.js
61743
- var loggerFactory = buildLoggerFactory({
61744
- config: {
61745
- enableConsoleTransport: config3.LOGGER_CONSOLE_ENABLED ?? false,
61746
- enableStdoutTransport: config3.LOGGER_STDOUT_ENABLED ?? false
61747
- },
61748
- context: {
61749
- env: config3.NODE_ENV,
61750
- service: "api",
61751
- version: config3.APP_VERSION
61752
- }
61753
- });
61754
- var createLogger2 = loggerFactory.createLogger;
61755
- var logger = loggerFactory.createLogger({ serviceName: "default" });
62227
+ ]
62228
+ );
61756
62229
 
61757
62230
  // ../hyperline-lib/build/utils/config/usStates.js
61758
62231
  var usStates = [
@@ -61884,6 +62357,12 @@ var DateTimeSchema = external_exports.iso.datetime({
61884
62357
  example: "2024-12-20T16:04:11Z"
61885
62358
  });
61886
62359
 
62360
+ // ../hyperline-lib/build/http/dto/domain.js
62361
+ var DomainSchema = external_exports.string().trim().toLowerCase().regex(/^(?!:\/\/)(?=.{1,253}$)(?!-)([a-z0-9-]{1,63}\.)+[a-z]{2,63}$/, "Invalid domain").openapi({
62362
+ description: "Domain name.",
62363
+ example: "acme.com"
62364
+ });
62365
+
61887
62366
  // ../hyperline-lib/build/http/dto/error.js
61888
62367
  var ErrorSchema = external_exports.object({
61889
62368
  message: external_exports.string()
@@ -61904,7 +62383,7 @@ var PublicCursorPaginationParams = {
61904
62383
  description: "Opaque cursor returned in the previous response's `next_cursor`. Omit to fetch the first page."
61905
62384
  }),
61906
62385
  include_total: BooleanSchema.optional().default(false).openapi({
61907
- description: "Set to `true` to include `total` in the response. Off by default because computing the total runs a full COUNT(*) and is significantly slower on large datasets.",
62386
+ description: "Set to `true` to include `total` in the response.",
61908
62387
  example: false
61909
62388
  })
61910
62389
  };
@@ -61938,10 +62417,13 @@ var languages = [
61938
62417
  var de = {
61939
62418
  "accounting.invoicePosted.entryDescription": "Buchungseintrag f\xFCr Rechnung {{invoiceId}}",
61940
62419
  "accounting.transactionSettled.entryDescription": "Zahlungsabwicklung f\xFCr Rechnung {{invoiceId}}",
62420
+ "accounting.transactionRefunded.entryDescription": "R\xFCckerstattung f\xFCr Rechnung {{invoiceId}}",
61941
62421
  "accounting.creditNotePosted.entryDescription": "Gutschrift {{creditNoteId}} f\xFCr Rechnung {{invoiceId}}",
62422
+ "accounting.standaloneCreditNotePosted.entryDescription": "Gutschrift {{creditNoteId}}",
61942
62423
  "accounting.revrec.creditLineDescription": "Umsatz realisieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
61943
62424
  "accounting.revrec.debitLineDescription": "Abgrenzungsposten reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
61944
62425
  "accounting.revrec.discountCreditLineDescription": "Erl\xF6sminderung (Rabatt) erfassen \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
62426
+ "accounting.revrec.closedPeriodFallbackNote": " (in die n\xE4chste offene Periode gebucht \u2013 Zielperiode geschlossen; urspr\xFCngliches Datum {{originalDate}})",
61945
62427
  "accounting.revrec.discountDebitLineDescription": "Abgegrenzten Rabatt reduzieren \u2013 Zeitplan {{scheduleId}}, Zeitraum {{periodDate}}",
61946
62428
  "accounting.revrec.entryDescription": "Umsatzrealisierung f\xFCr Zeitplan {{scheduleId}}, Zeitraum {{periodStart}} - {{periodEnd}}",
61947
62429
  "creditNotes.refundChargeName": "R\xFCckerstattung f\xFCr die Rechnung",
@@ -61954,7 +62436,9 @@ var de = {
61954
62436
  "invoices.outstandingProduct.descriptionPeriod": "Unbezahlter Betrag der Rechnung{{invoiceNumber}} vom {{periodStart}} bis {{periodEnd}}",
61955
62437
  "invoices.outstandingProduct.name": "Offener Saldo",
61956
62438
  "invoices.prorata.paymentForItem": "Anteilig berechneter Betrag f\xFCr",
62439
+ "invoices.prorata.paymentForItemFullPeriod": "Zahlung f\xFCr",
61957
62440
  "invoices.prorata.refundForItem": "Anteilig erstatteter Betrag f\xFCr",
62441
+ "invoices.prorata.refundForItemFullPeriod": "Erstattung f\xFCr",
61958
62442
  "subscriptions.closingChargeName": "Abschlussgeb\xFChr f\xFCr das Abonnement",
61959
62443
  "subscriptions.correction": "Vorperiodische Anpassung",
61960
62444
  "subscriptions.updates.addCoupon": "Gutschein hinzuf\xFCgen {{couponName}}",
@@ -61983,7 +62467,9 @@ var en = {
61983
62467
  "invoices.outstandingProduct.descriptionPeriod": "Unpaid amount from the invoice{{invoiceNumber}} from {{periodStart}} to {{periodEnd}}",
61984
62468
  "invoices.outstandingProduct.name": "Outstanding balance",
61985
62469
  "invoices.prorata.paymentForItem": "Prorated payment for",
62470
+ "invoices.prorata.paymentForItemFullPeriod": "Payment for",
61986
62471
  "invoices.prorata.refundForItem": "Prorated refund for",
62472
+ "invoices.prorata.refundForItemFullPeriod": "Refund for",
61987
62473
  "subscriptions.closingChargeName": "Closing fee for subscription",
61988
62474
  "subscriptions.correction": "Adjustment previous period",
61989
62475
  "subscriptions.updates.addCoupon": "Add coupon {{couponName}}",
@@ -62003,12 +62489,15 @@ var en = {
62003
62489
  "subscriptions.updates.updateCount.description.full.not_committed.not_invoiced": "Amount of {{amount}} not invoiced for the full period",
62004
62490
  "accounting.invoicePosted.entryDescription": "Posting entry for Invoice {{invoiceId}} issued",
62005
62491
  "accounting.transactionSettled.entryDescription": "Payment settlement for Invoice {{invoiceId}}",
62492
+ "accounting.transactionRefunded.entryDescription": "Refund for Invoice {{invoiceId}}",
62006
62493
  "accounting.creditNotePosted.entryDescription": "Credit note {{creditNoteId}} for Invoice {{invoiceId}}",
62494
+ "accounting.standaloneCreditNotePosted.entryDescription": "Credit note {{creditNoteId}}",
62007
62495
  "accounting.revrec.entryDescription": "Revenue recognition for schedule {{scheduleId}}, period {{periodStart}} - {{periodEnd}}",
62008
62496
  "accounting.revrec.debitLineDescription": "Decrease deferred revenue \u2013 schedule {{scheduleId}}, period {{periodDate}}",
62009
62497
  "accounting.revrec.creditLineDescription": "Recognize revenue \u2013 schedule {{scheduleId}}, period {{periodDate}}",
62010
62498
  "accounting.revrec.discountDebitLineDescription": "Decrease deferred discount \u2013 schedule {{scheduleId}}, period {{periodDate}}",
62011
62499
  "accounting.revrec.discountCreditLineDescription": "Recognize contra-revenue (discount) \u2013 schedule {{scheduleId}}, period {{periodDate}}",
62500
+ "accounting.revrec.closedPeriodFallbackNote": " (posted to next open period \u2014 target accounting period closed; original date {{originalDate}})",
62012
62501
  "einvoicing.paymentProcessed": "Payment processed",
62013
62502
  "einvoicing.paymentReceived": "Payment received",
62014
62503
  "einvoicing.paymentFromWallet": "Payment from wallet"
@@ -62018,10 +62507,13 @@ var en = {
62018
62507
  var es = {
62019
62508
  "accounting.invoicePosted.entryDescription": "Asiento contable para la factura {{invoiceId}}",
62020
62509
  "accounting.transactionSettled.entryDescription": "Liquidaci\xF3n de pago para la factura {{invoiceId}}",
62510
+ "accounting.transactionRefunded.entryDescription": "Reembolso de la factura {{invoiceId}}",
62021
62511
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para la factura {{invoiceId}}",
62512
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
62022
62513
  "accounting.revrec.creditLineDescription": "Reconocer ingresos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62023
62514
  "accounting.revrec.debitLineDescription": "Disminuci\xF3n de ingresos diferidos \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62024
62515
  "accounting.revrec.discountCreditLineDescription": "Reconocer contra-ingresos (descuento) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62516
+ "accounting.revrec.closedPeriodFallbackNote": " (registrado en el pr\xF3ximo per\xEDodo abierto \u2014 per\xEDodo contable de destino cerrado; fecha original {{originalDate}})",
62025
62517
  "accounting.revrec.discountDebitLineDescription": "Disminuci\xF3n de descuento diferido \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62026
62518
  "accounting.revrec.entryDescription": "Reconocimiento de ingresos para el cronograma {{scheduleId}}, per\xEDodo {{periodStart}} - {{periodEnd}}",
62027
62519
  "creditNotes.refundChargeName": "Reembolso por factura",
@@ -62034,7 +62526,9 @@ var es = {
62034
62526
  "invoices.outstandingProduct.descriptionPeriod": "Monto pendiente de la factura{{invoiceNumber}} del {{periodStart}} al {{periodEnd}}",
62035
62527
  "invoices.outstandingProduct.name": "Saldo pendiente",
62036
62528
  "invoices.prorata.paymentForItem": "Pago prorrateado por",
62529
+ "invoices.prorata.paymentForItemFullPeriod": "Pago por",
62037
62530
  "invoices.prorata.refundForItem": "Reembolso prorrateado por",
62531
+ "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
62038
62532
  "subscriptions.closingChargeName": "Cargo por cierre de suscripci\xF3n",
62039
62533
  "subscriptions.correction": "Ajuste del periodo anterior",
62040
62534
  "subscriptions.updates.addCoupon": "A\xF1adir cup\xF3n {{couponName}}",
@@ -62059,10 +62553,13 @@ var fr = {
62059
62553
  "accounting.revrec.creditLineDescription": "Reconnaissance du chiffre d'affaires \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62060
62554
  "accounting.revrec.debitLineDescription": "Diminution des produits constat\xE9s d'avance \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62061
62555
  "accounting.revrec.discountCreditLineDescription": "Reconnaissance du contre-revenu (remise) \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62556
+ "accounting.revrec.closedPeriodFallbackNote": " (comptabilis\xE9 sur la prochaine p\xE9riode ouverte \u2014 p\xE9riode comptable cible cl\xF4tur\xE9e ; date d'origine {{originalDate}})",
62062
62557
  "accounting.revrec.discountDebitLineDescription": "Diminution des remises diff\xE9r\xE9es \u2013 \xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodDate}}",
62063
62558
  "accounting.invoicePosted.entryDescription": "\xC9criture de comptabilisation pour la facture {{invoiceId}}",
62064
62559
  "accounting.transactionSettled.entryDescription": "R\xE8glement de la facture {{invoiceId}}",
62560
+ "accounting.transactionRefunded.entryDescription": "Remboursement de la facture {{invoiceId}}",
62065
62561
  "accounting.creditNotePosted.entryDescription": "Avoir {{creditNoteId}} pour la facture {{invoiceId}}",
62562
+ "accounting.standaloneCreditNotePosted.entryDescription": "Avoir {{creditNoteId}}",
62066
62563
  "accounting.revrec.entryDescription": "Reconnaissance du chiffre d'affaires pour l'\xE9ch\xE9ancier {{scheduleId}}, p\xE9riode {{periodStart}} - {{periodEnd}}",
62067
62564
  "creditNotes.refundChargeName": "Remboursement pour facture",
62068
62565
  "credits.bundleOf": "{{productName}} - Pack de {{creditCount}} cr\xE9dits",
@@ -62074,7 +62571,9 @@ var fr = {
62074
62571
  "invoices.outstandingProduct.descriptionPeriod": "Montant impay\xE9 de la facture{{invoiceNumber}} du {{periodStart}} au {{periodEnd}}",
62075
62572
  "invoices.outstandingProduct.name": "Solde impay\xE9",
62076
62573
  "invoices.prorata.paymentForItem": "Paiement au prorata pour",
62574
+ "invoices.prorata.paymentForItemFullPeriod": "Paiement pour",
62077
62575
  "invoices.prorata.refundForItem": "Remboursement au prorata pour",
62576
+ "invoices.prorata.refundForItemFullPeriod": "Remboursement pour",
62078
62577
  "subscriptions.closingChargeName": "Frais de cl\xF4ture pour abonnement",
62079
62578
  "subscriptions.correction": "Ajustement p\xE9riode pr\xE9c\xE9dente",
62080
62579
  "subscriptions.updates.addCoupon": "Ajout du coupon {{couponName}}",
@@ -62098,10 +62597,13 @@ var fr = {
62098
62597
  var it = {
62099
62598
  "accounting.invoicePosted.entryDescription": "Registrazione contabile per la fattura {{invoiceId}}",
62100
62599
  "accounting.transactionSettled.entryDescription": "Regolamento pagamento per la fattura {{invoiceId}}",
62600
+ "accounting.transactionRefunded.entryDescription": "Rimborso per la fattura {{invoiceId}}",
62101
62601
  "accounting.creditNotePosted.entryDescription": "Nota di credito {{creditNoteId}} per la fattura {{invoiceId}}",
62602
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota di credito {{creditNoteId}}",
62102
62603
  "accounting.revrec.creditLineDescription": "Riconoscere i ricavi \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62103
62604
  "accounting.revrec.debitLineDescription": "Diminuzione dei ricavi differiti \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62104
62605
  "accounting.revrec.discountCreditLineDescription": "Riconoscere il contra-ricavo (sconto) \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62606
+ "accounting.revrec.closedPeriodFallbackNote": " (registrato nel prossimo periodo aperto \u2014 periodo contabile di destinazione chiuso; data originale {{originalDate}})",
62105
62607
  "accounting.revrec.discountDebitLineDescription": "Diminuzione dello sconto differito \u2013 programma {{scheduleId}}, periodo {{periodDate}}",
62106
62608
  "accounting.revrec.entryDescription": "Riconoscimento dei ricavi per il programma {{scheduleId}}, periodo {{periodStart}} - {{periodEnd}}",
62107
62609
  "creditNotes.refundChargeName": "Rimborso per fattura",
@@ -62114,7 +62616,9 @@ var it = {
62114
62616
  "invoices.outstandingProduct.descriptionPeriod": "Importo insoluto della fattura{{invoiceNumber}} dal {{periodStart}} al {{periodEnd}}",
62115
62617
  "invoices.outstandingProduct.name": "Saldo insoluto",
62116
62618
  "invoices.prorata.paymentForItem": "Pagamento proporzionale per",
62619
+ "invoices.prorata.paymentForItemFullPeriod": "Pagamento per",
62117
62620
  "invoices.prorata.refundForItem": "Rimborso proporzionale per",
62621
+ "invoices.prorata.refundForItemFullPeriod": "Rimborso per",
62118
62622
  "subscriptions.closingChargeName": "Costo di chiusura per abbonamento",
62119
62623
  "subscriptions.correction": "Correzione periodo precedente",
62120
62624
  "subscriptions.updates.addCoupon": "Aggiungi coupon {{couponName}}",
@@ -62138,10 +62642,13 @@ var it = {
62138
62642
  var nl = {
62139
62643
  "accounting.invoicePosted.entryDescription": "Boekingsregel voor factuur {{invoiceId}}",
62140
62644
  "accounting.transactionSettled.entryDescription": "Betalingsafwikkeling voor factuur {{invoiceId}}",
62645
+ "accounting.transactionRefunded.entryDescription": "Terugbetaling voor factuur {{invoiceId}}",
62141
62646
  "accounting.creditNotePosted.entryDescription": "Creditnota {{creditNoteId}} voor factuur {{invoiceId}}",
62647
+ "accounting.standaloneCreditNotePosted.entryDescription": "Creditnota {{creditNoteId}}",
62142
62648
  "accounting.revrec.creditLineDescription": "Omzet erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
62143
62649
  "accounting.revrec.debitLineDescription": "Uitgestelde omzet verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
62144
62650
  "accounting.revrec.discountCreditLineDescription": "Omzetvermindering (korting) erkennen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
62651
+ "accounting.revrec.closedPeriodFallbackNote": " (geboekt in de volgende open periode \u2014 doelboekingsperiode gesloten; oorspronkelijke datum {{originalDate}})",
62145
62652
  "accounting.revrec.discountDebitLineDescription": "Uitgestelde korting verlagen \u2013 schema {{scheduleId}}, periode {{periodDate}}",
62146
62653
  "accounting.revrec.entryDescription": "Omzeterkenning voor schema {{scheduleId}}, periode {{periodStart}} - {{periodEnd}}",
62147
62654
  "creditNotes.refundChargeName": "Terugbetaling voor factuur",
@@ -62154,7 +62661,9 @@ var nl = {
62154
62661
  "invoices.outstandingProduct.descriptionPeriod": "Onbetaald bedrag van de factuur{{invoiceNumber}} van {{periodStart}} tot {{periodEnd}}",
62155
62662
  "invoices.outstandingProduct.name": "Openstaand saldo",
62156
62663
  "invoices.prorata.paymentForItem": "Gedeeltelijke betaling voor",
62664
+ "invoices.prorata.paymentForItemFullPeriod": "Betaling voor",
62157
62665
  "invoices.prorata.refundForItem": "Gedeeltelijke terugbetaling voor",
62666
+ "invoices.prorata.refundForItemFullPeriod": "Terugbetaling voor",
62158
62667
  "subscriptions.closingChargeName": "Afsluitkosten voor abonnement",
62159
62668
  "subscriptions.correction": "Aanpassing vorige periode",
62160
62669
  "subscriptions.updates.addCoupon": "Coupon toevoegen {{couponName}}",
@@ -62178,10 +62687,13 @@ var nl = {
62178
62687
  var pl = {
62179
62688
  "accounting.invoicePosted.entryDescription": "Zapis ksi\u0119gowy dla faktury {{invoiceId}}",
62180
62689
  "accounting.transactionSettled.entryDescription": "Rozliczenie p\u0142atno\u015Bci dla faktury {{invoiceId}}",
62690
+ "accounting.transactionRefunded.entryDescription": "Zwrot za faktur\u0119 {{invoiceId}}",
62181
62691
  "accounting.creditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}} dla faktury {{invoiceId}}",
62692
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota kredytowa {{creditNoteId}}",
62182
62693
  "accounting.revrec.creditLineDescription": "Rozpoznanie przychodu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
62183
62694
  "accounting.revrec.debitLineDescription": "Zmniejszenie przychod\xF3w przysz\u0142ych okres\xF3w \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
62184
62695
  "accounting.revrec.discountCreditLineDescription": "Rozpoznanie kontra-przychodu (rabat) \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
62696
+ "accounting.revrec.closedPeriodFallbackNote": " (zaksi\u0119gowano w nast\u0119pnym otwartym okresie \u2014 docelowy okres ksi\u0119gowy zamkni\u0119ty; pierwotna data {{originalDate}})",
62185
62697
  "accounting.revrec.discountDebitLineDescription": "Zmniejszenie odroczonego rabatu \u2013 harmonogram {{scheduleId}}, okres {{periodDate}}",
62186
62698
  "accounting.revrec.entryDescription": "Rozpoznanie przychodu dla harmonogramu {{scheduleId}}, okres {{periodStart}} - {{periodEnd}}",
62187
62699
  "creditNotes.refundChargeName": "Zwrot za faktur\u0119",
@@ -62194,7 +62706,9 @@ var pl = {
62194
62706
  "invoices.outstandingProduct.descriptionPeriod": "Nieop\u0142acona kwota z faktury{{invoiceNumber}} od {{periodStart}} do {{periodEnd}}",
62195
62707
  "invoices.outstandingProduct.name": "Niezap\u0142acone saldo",
62196
62708
  "invoices.prorata.paymentForItem": "P\u0142atno\u015B\u0107 proporcjonalna za",
62709
+ "invoices.prorata.paymentForItemFullPeriod": "P\u0142atno\u015B\u0107 za",
62197
62710
  "invoices.prorata.refundForItem": "Zwrot proporcjonalny za",
62711
+ "invoices.prorata.refundForItemFullPeriod": "Zwrot za",
62198
62712
  "subscriptions.closingChargeName": "Op\u0142ata za zamkni\u0119cie subskrypcji",
62199
62713
  "subscriptions.correction": "Korekta poprzedniego okresu",
62200
62714
  "subscriptions.updates.addCoupon": "Dodaj kupon {{couponName}}",
@@ -62218,10 +62732,13 @@ var pl = {
62218
62732
  var pt = {
62219
62733
  "accounting.invoicePosted.entryDescription": "Lan\xE7amento cont\xE1bil para a fatura {{invoiceId}}",
62220
62734
  "accounting.transactionSettled.entryDescription": "Liquida\xE7\xE3o de pagamento para a fatura {{invoiceId}}",
62735
+ "accounting.transactionRefunded.entryDescription": "Reembolso da fatura {{invoiceId}}",
62221
62736
  "accounting.creditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}} para a fatura {{invoiceId}}",
62737
+ "accounting.standaloneCreditNotePosted.entryDescription": "Nota de cr\xE9dito {{creditNoteId}}",
62222
62738
  "accounting.revrec.creditLineDescription": "Reconhecer receita \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62223
62739
  "accounting.revrec.debitLineDescription": "Diminui\xE7\xE3o da receita diferida \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62224
62740
  "accounting.revrec.discountCreditLineDescription": "Reconhecer contra-receita (desconto) \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62741
+ "accounting.revrec.closedPeriodFallbackNote": " (lan\xE7ado no pr\xF3ximo per\xEDodo aberto \u2014 per\xEDodo cont\xE1bil de destino fechado; data original {{originalDate}})",
62225
62742
  "accounting.revrec.discountDebitLineDescription": "Diminui\xE7\xE3o do desconto diferido \u2013 cronograma {{scheduleId}}, per\xEDodo {{periodDate}}",
62226
62743
  "accounting.revrec.entryDescription": "Reconhecimento de receita para o cronograma {{scheduleId}}, per\xEDodo {{periodStart}} - {{periodEnd}}",
62227
62744
  "creditNotes.refundChargeName": "Reembolso pela fatura",
@@ -62234,7 +62751,9 @@ var pt = {
62234
62751
  "invoices.outstandingProduct.descriptionPeriod": "Valor em aberto da fatura{{invoiceNumber}} de {{periodStart}} a {{periodEnd}}",
62235
62752
  "invoices.outstandingProduct.name": "Saldo em aberto",
62236
62753
  "invoices.prorata.paymentForItem": "Pagamento proporcional por",
62754
+ "invoices.prorata.paymentForItemFullPeriod": "Pagamento por",
62237
62755
  "invoices.prorata.refundForItem": "Reembolso proporcional por",
62756
+ "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
62238
62757
  "subscriptions.closingChargeName": "Taxa de encerramento da assinatura",
62239
62758
  "subscriptions.correction": "Ajuste do per\xEDodo anterior",
62240
62759
  "subscriptions.updates.addCoupon": "Adicionar cupom {{couponName}}",
@@ -62356,10 +62875,16 @@ function buildHttpClient(dependencies) {
62356
62875
  return response;
62357
62876
  }, (error48) => {
62358
62877
  if (error48.response) {
62359
- const { config: responseConfig, status } = error48.response;
62878
+ const { config: responseConfig, status, headers } = error48.response;
62360
62879
  const timeStart = responseConfig.metadata.timeStart;
62361
62880
  const responseTime = timeStart ? Date.now() - timeStart : void 0;
62362
- logHttpResponse(logger2, { request: toLogRequest(responseConfig), statusCode: status }, responseTime, { metadata: { error: error48.message } });
62881
+ logHttpResponse(logger2, {
62882
+ request: toLogRequest(responseConfig),
62883
+ statusCode: status,
62884
+ // Surfaces upstream response headers on error responses (e.g. the
62885
+ // rate-limit headers on a 429); redacted in logHttpResponse.
62886
+ responseHeaders: headers
62887
+ }, responseTime, { metadata: { error: error48.message } });
62363
62888
  }
62364
62889
  return Promise.reject(error48);
62365
62890
  });
@@ -62452,6 +62977,9 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
62452
62977
 
62453
62978
  // ../hyperline-mcp/build/server/server.js
62454
62979
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
62980
+ var defaultToolOutputSchema = {
62981
+ result: external_exports.unknown()
62982
+ };
62455
62983
 
62456
62984
  // ../hyperline-mcp/build/session/sessionKey.js
62457
62985
  import { createHmac } from "node:crypto";