@hyperline/cli 0.1.0-build.1.d44f30d → 0.1.0-build.1.dbcbc44

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.
@@ -38429,16 +38429,24 @@ Examples:
38429
38429
  // build/commands/generated/customers.js
38430
38430
  function registerCustomersCommands(parent) {
38431
38431
  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", `
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, 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
38433
  Examples:
38434
38434
  hyperline customers list
38435
- hyperline customers list --take <take> --name <name>`).action(async (opts) => {
38435
+ hyperline customers list --limit <limit> --cursor <cursor>`).action(async (opts) => {
38436
38436
  const ctx = resource.parent?.opts()._ctx;
38437
38437
  if (!ctx) {
38438
38438
  process.stderr.write("Error: Not authenticated\n");
38439
38439
  process.exit(1);
38440
38440
  }
38441
38441
  const args = {};
38442
+ if (opts.cursor !== void 0)
38443
+ args.cursor = opts.cursor;
38444
+ if (opts.includeTotal !== void 0)
38445
+ args.include_total = opts.includeTotal;
38446
+ if (opts.order !== void 0)
38447
+ args.order = opts.order;
38448
+ if (opts.sort !== void 0)
38449
+ args.sort = opts.sort;
38442
38450
  if (opts.name !== void 0)
38443
38451
  args.name = opts.name;
38444
38452
  if (opts["name.not"] !== void 0)
@@ -38611,17 +38619,18 @@ Examples:
38611
38619
  args.updated_at__gt = opts["updatedAt.gt"];
38612
38620
  if (opts["updatedAt.gte"] !== void 0)
38613
38621
  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);
38622
+ if (opts.limit !== void 0)
38623
+ args.limit = Number(opts.limit);
38618
38624
  await ctx.execute({
38619
38625
  method: "GET",
38620
- path: "/v1/customers",
38626
+ path: "/v2/customers",
38621
38627
  args,
38622
38628
  queryParamKeys: [
38623
- "take",
38624
- "skip",
38629
+ "limit",
38630
+ "cursor",
38631
+ "include_total",
38632
+ "order",
38633
+ "sort",
38625
38634
  "name",
38626
38635
  "name__not",
38627
38636
  "name__isNull",
@@ -38711,6 +38720,24 @@ Examples:
38711
38720
  ]
38712
38721
  });
38713
38722
  });
38723
+ 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", `
38724
+ Examples:
38725
+ hyperline customers get --id <id>`).action(async (opts) => {
38726
+ const ctx = resource.parent?.opts()._ctx;
38727
+ if (!ctx) {
38728
+ process.stderr.write("Error: Not authenticated\n");
38729
+ process.exit(1);
38730
+ }
38731
+ const args = {};
38732
+ if (opts.id !== void 0)
38733
+ args.id = opts.id;
38734
+ await ctx.execute({
38735
+ method: "GET",
38736
+ path: "/v2/customers/{id}",
38737
+ args,
38738
+ queryParamKeys: []
38739
+ });
38740
+ });
38714
38741
  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
38742
  Customer type.
38716
38743
 
@@ -38812,24 +38839,6 @@ Examples:
38812
38839
  queryParamKeys: []
38813
38840
  });
38814
38841
  });
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
38842
  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
38843
  Examples:
38835
38844
  hyperline customers get-customer-portal-url --id <id>`).action(async (opts) => {
@@ -40175,7 +40184,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
40175
40184
 
40176
40185
  - \`current\`: Use the current default payment method of the customer.
40177
40186
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
40178
- `).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", `
40187
+ `).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", `
40179
40188
  Examples:
40180
40189
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
40181
40190
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -40228,6 +40237,8 @@ Examples:
40228
40237
  args.settled_at = opts.settledAt;
40229
40238
  if (opts.properties !== void 0)
40230
40239
  args.properties = opts.properties;
40240
+ if (opts.customProperties !== void 0)
40241
+ args.custom_properties = opts.customProperties;
40231
40242
  if (opts.lineItems !== void 0)
40232
40243
  args.line_items = opts.lineItems;
40233
40244
  if (opts.transactions !== void 0)
@@ -40241,10 +40252,15 @@ Examples:
40241
40252
  queryParamKeys: []
40242
40253
  });
40243
40254
  });
40244
- 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.
40255
+ 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.
40245
40256
 
40246
40257
  - \`to_pay\`: Credit note is awaiting payment.
40247
40258
  - \`draft\`: Credit note is in draft mode (not finalized yet).
40259
+ `).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\`.
40260
+
40261
+ - \`wallet\`: Credit the customer's wallet with the refunded amount.
40262
+ - \`original_payment_method\`: Refund to the payment method used on the original invoice.
40263
+ - \`external\`: Mark the refund as settled externally (no automatic transfer).
40248
40264
  `).addHelpText("after", `
40249
40265
  Examples:
40250
40266
  hyperline invoices create-credit-note --id <id>
@@ -40260,8 +40276,12 @@ Examples:
40260
40276
  args.id = opts.id;
40261
40277
  if (opts.status !== void 0)
40262
40278
  args.status = opts.status;
40279
+ if (opts.refundMethod !== void 0)
40280
+ args.refund_method = opts.refundMethod;
40263
40281
  if (opts.amountIncludingTax !== void 0)
40264
40282
  args.amount_including_tax = Number(opts.amountIncludingTax);
40283
+ if (opts.triggerRefund !== void 0)
40284
+ args.trigger_refund = true;
40265
40285
  await ctx.execute({
40266
40286
  method: "POST",
40267
40287
  path: "/v1/invoices/{id}/credit-notes",
@@ -40400,7 +40420,7 @@ Examples:
40400
40420
 
40401
40421
  - \`auto\`: Tax is automatically computed and applied.
40402
40422
  - \`not_eligible\`: Tax collection is disabled for the invoice.
40403
- `).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", `
40423
+ `).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", `
40404
40424
  Examples:
40405
40425
  hyperline invoices update --id <id>
40406
40426
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -40441,6 +40461,8 @@ Examples:
40441
40461
  args.bank_account_id = opts.bankAccountId;
40442
40462
  if (opts.properties !== void 0)
40443
40463
  args.properties = opts.properties;
40464
+ if (opts.customProperties !== void 0)
40465
+ args.custom_properties = opts.customProperties;
40444
40466
  if (opts.customer !== void 0)
40445
40467
  args.customer = opts.customer;
40446
40468
  await ctx.execute({
@@ -40633,7 +40655,7 @@ Examples:
40633
40655
  queryParamKeys: []
40634
40656
  });
40635
40657
  });
40636
- 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", `
40658
+ 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", `
40637
40659
  Examples:
40638
40660
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency>
40639
40661
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency> --is-default --trade-name <trade_name>
@@ -40712,6 +40734,8 @@ Examples:
40712
40734
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40713
40735
  if (opts.isDefault !== void 0)
40714
40736
  args.is_default = true;
40737
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40738
+ args.credit_note_wallet_refund_enabled = true;
40715
40739
  await ctx.execute({
40716
40740
  method: "POST",
40717
40741
  path: "/v1/invoicing-entities",
@@ -40719,7 +40743,7 @@ Examples:
40719
40743
  queryParamKeys: []
40720
40744
  });
40721
40745
  });
40722
- 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", `
40746
+ 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", `
40723
40747
  Examples:
40724
40748
  hyperline invoicing-entities update-invoicing-entity --id <id>
40725
40749
  hyperline invoicing-entities update-invoicing-entity --id <id> --name <name> --registration-number <registration_number>
@@ -40790,6 +40814,8 @@ Examples:
40790
40814
  args.document_payment_initiation_delay = Number(opts.documentPaymentInitiationDelay);
40791
40815
  if (opts.isDefault !== void 0)
40792
40816
  args.is_default = true;
40817
+ if (opts.creditNoteWalletRefundEnabled !== void 0)
40818
+ args.credit_note_wallet_refund_enabled = true;
40793
40819
  await ctx.execute({
40794
40820
  method: "PUT",
40795
40821
  path: "/v1/invoicing-entities/{id}",
@@ -61463,6 +61489,7 @@ function getConfig(schema, testValues) {
61463
61489
  var config3 = getConfig({
61464
61490
  // config
61465
61491
  APP_VERSION: types.string().optional(),
61492
+ DD_SERVICE: types.string().optional(),
61466
61493
  LOGGER_CONSOLE_ENABLED: types.boolean().optional(),
61467
61494
  LOGGER_STDOUT_ENABLED: types.boolean().optional(),
61468
61495
  NODE_ENV: types.enum(["local", "test", "staging", "sandbox", "production"]),
@@ -61472,6 +61499,7 @@ var config3 = getConfig({
61472
61499
  // secrets
61473
61500
  }, {
61474
61501
  APP_VERSION: void 0,
61502
+ DD_SERVICE: void 0,
61475
61503
  LOGGER_CONSOLE_ENABLED: false,
61476
61504
  LOGGER_STDOUT_ENABLED: false,
61477
61505
  EVENT_LOOP_MONITORING_ENABLED: false,
@@ -61750,13 +61778,16 @@ var loggerFactory = buildLoggerFactory({
61750
61778
  },
61751
61779
  context: {
61752
61780
  env: config3.NODE_ENV,
61753
- service: "api",
61781
+ service: config3.DD_SERVICE ?? "api",
61754
61782
  version: config3.APP_VERSION
61755
61783
  }
61756
61784
  });
61757
61785
  var createLogger2 = loggerFactory.createLogger;
61758
61786
  var logger = loggerFactory.createLogger({ serviceName: "default" });
61759
61787
 
61788
+ // ../hyperline-monitoring/build/tracing/tracing.js
61789
+ import tracer from "dd-trace";
61790
+
61760
61791
  // ../hyperline-lib/build/utils/config/usStates.js
61761
61792
  var usStates = [
61762
61793
  "AA",
@@ -4,6 +4,7 @@
4
4
  "axios": "1.13.2",
5
5
  "axios-retry": "4.5.0",
6
6
  "commander": "13.1.0",
7
+ "dd-trace": "5.45.0",
7
8
  "dotenv": "16.3.1",
8
9
  "express": "5.2.1",
9
10
  "express-idempotency": "2.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.d44f30d",
3
+ "version": "0.1.0-build.1.dbcbc44",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -27,6 +27,7 @@
27
27
  "axios": "1.13.2",
28
28
  "axios-retry": "4.5.0",
29
29
  "commander": "13.1.0",
30
+ "dd-trace": "5.45.0",
30
31
  "dotenv": "16.3.1",
31
32
  "express": "5.2.1",
32
33
  "express-idempotency": "2.0.0",