@hyperline/cli 0.1.0-build.1.ae39ce9 → 0.1.0-build.1.aeb38db

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.
@@ -33833,7 +33833,7 @@ var require_shared = __commonJS({
33833
33833
  getNameForCurrency: () => getNameForCurrency,
33834
33834
  getNaturalNumber: () => getNaturalNumber,
33835
33835
  getSymbolForCurrency: () => getSymbolForCurrency,
33836
- getTimezoneByName: () => getTimezoneByName,
33836
+ getTimezoneByName: () => getTimezoneByName2,
33837
33837
  getTimezoneOffsetName: () => getTimezoneOffsetName,
33838
33838
  getTimezones: () => getTimezones2,
33839
33839
  getValidTimezonesNames: () => getValidTimezonesNames,
@@ -33850,7 +33850,7 @@ var require_shared = __commonJS({
33850
33850
  subtract: () => subtract,
33851
33851
  sum: () => sum2,
33852
33852
  toLocalTime: () => toLocalTime3,
33853
- toUtc: () => toUtc2,
33853
+ toUtc: () => toUtc3,
33854
33854
  useDebounce: () => useDebounce
33855
33855
  });
33856
33856
  module.exports = __toCommonJS(shared_exports);
@@ -34985,10 +34985,10 @@ var require_shared = __commonJS({
34985
34985
  ZodId: () => ZodId,
34986
34986
  ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
34987
34987
  });
34988
- var import_zod21 = require_lib();
34988
+ var import_zod22 = require_lib();
34989
34989
  var countryIds2 = ["all", ...countries.map(({ id }) => id)];
34990
- var ZodId = import_zod21.z.enum(countryIds2);
34991
- var ZodTranslationsSchemaFn = (schema) => import_zod21.z.record(import_zod21.z.string(), schema.optional());
34990
+ var ZodId = import_zod22.z.enum(countryIds2);
34991
+ var ZodTranslationsSchemaFn = (schema) => import_zod22.z.record(import_zod22.z.string(), schema.optional());
34992
34992
  var UsStates = [
34993
34993
  { id: "AA", name: "Armed Forces Americas" },
34994
34994
  { id: "AE", name: "Armed Forces Europe" },
@@ -36287,14 +36287,14 @@ var require_shared = __commonJS({
36287
36287
  ZodNumberCurrencyPositiveValue: () => ZodNumberCurrencyPositiveValue,
36288
36288
  ZodNumberCurrencyPositiveValueExcludingZero: () => ZodNumberCurrencyPositiveValueExcludingZero
36289
36289
  });
36290
- var import_zod22 = require_lib();
36291
- var ZodCurrencyId = import_zod22.z.enum(
36290
+ var import_zod23 = require_lib();
36291
+ var ZodCurrencyId = import_zod23.z.enum(
36292
36292
  all_default.map(({ id }) => id)
36293
36293
  );
36294
- var ZodNumberCurrency = import_zod22.z.string().or(import_zod22.z.number().transform((number4) => number4)).transform((number4) => number4);
36295
- var ZodNumberCurrencyPositiveValue = import_zod22.z.number().min(0).transform((number4) => number4).transform((number4) => number4);
36296
- var ZodNumberCurrencyPositiveValueExcludingZero = import_zod22.z.number().gt(0).transform((number4) => number4).transform((number4) => number4);
36297
- var ZodCurrencyMap = import_zod22.z.record(ZodNumberCurrency).refine(
36294
+ var ZodNumberCurrency = import_zod23.z.string().or(import_zod23.z.number().transform((number4) => number4)).transform((number4) => number4);
36295
+ var ZodNumberCurrencyPositiveValue = import_zod23.z.number().min(0).transform((number4) => number4).transform((number4) => number4);
36296
+ var ZodNumberCurrencyPositiveValueExcludingZero = import_zod23.z.number().gt(0).transform((number4) => number4).transform((number4) => number4);
36297
+ var ZodCurrencyMap = import_zod23.z.record(ZodNumberCurrency).refine(
36298
36298
  (data) => Object.keys(data).every((key) => ZodCurrencyId.safeParse(key).success),
36299
36299
  {
36300
36300
  message: "Invalid currency key.",
@@ -36557,14 +36557,14 @@ var require_shared = __commonJS({
36557
36557
  function getTimezones2() {
36558
36558
  return timezones;
36559
36559
  }
36560
- function getTimezoneByName(tz) {
36560
+ function getTimezoneByName2(tz) {
36561
36561
  var _a2;
36562
36562
  if (tz === "UTC") {
36563
36563
  return timezones.find(({ name }) => name === "Etc/UTC");
36564
36564
  }
36565
36565
  return (_a2 = timezones.find(({ name }) => name === tz)) != null ? _a2 : timezones.find(({ group }) => group.includes(tz));
36566
36566
  }
36567
- function toUtc2(date5, timezone) {
36567
+ function toUtc3(date5, timezone) {
36568
36568
  return (0, import_date_fns_tz.fromZonedTime)(date5, timezone);
36569
36569
  }
36570
36570
  function toLocalTime3(date5, localTimezone) {
@@ -36575,7 +36575,7 @@ var require_shared = __commonJS({
36575
36575
  );
36576
36576
  var constructDateFromTimezoneToLocal = (date5, timezone) => {
36577
36577
  if (!timezone) return date5;
36578
- const timezoneObj = getTimezoneByName(timezone);
36578
+ const timezoneObj = getTimezoneByName2(timezone);
36579
36579
  if (!timezoneObj) return date5;
36580
36580
  const dateAtTimezone = new Date(
36581
36581
  date5.getFullYear(),
@@ -40756,7 +40756,7 @@ Examples:
40756
40756
  queryParamKeys: []
40757
40757
  });
40758
40758
  });
40759
- 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 <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).addHelpText("after", `
40759
+ resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (text, number, boolean, date, select, multi_select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Null means no default value.`).addHelpText("after", `
40760
40760
  Examples:
40761
40761
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities>
40762
40762
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -40781,6 +40781,8 @@ Examples:
40781
40781
  args.entities = JSON.parse(opts.entities);
40782
40782
  if (opts.authorizedValues !== void 0)
40783
40783
  args.authorized_values = JSON.parse(opts.authorizedValues);
40784
+ if (opts.defaultValue !== void 0)
40785
+ args.default_value = JSON.parse(opts.defaultValue);
40784
40786
  await ctx.execute({
40785
40787
  method: "POST",
40786
40788
  path: "/v1/custom-properties",
@@ -40788,7 +40790,7 @@ Examples:
40788
40790
  queryParamKeys: []
40789
40791
  });
40790
40792
  });
40791
- resource.command("update-custom-property").description(`Update an existing custom property definition by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).addHelpText("after", `
40793
+ resource.command("update-custom-property").description(`Update an existing custom property definition by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <json>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <json>", `authorized_values`).option("--default-value <json>", `Value set on entities created without an explicit value for this custom property. On existing entities without a value, it also satisfies \`required\`. Must match the custom property type, and one of \`authorized_values\` for \`select\` and \`multi_select\` types. Dates are ISO 8601 strings. Null means no default value.`).addHelpText("after", `
40792
40794
  Examples:
40793
40795
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities>
40794
40796
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -40815,6 +40817,8 @@ Examples:
40815
40817
  args.entities = JSON.parse(opts.entities);
40816
40818
  if (opts.authorizedValues !== void 0)
40817
40819
  args.authorized_values = JSON.parse(opts.authorizedValues);
40820
+ if (opts.defaultValue !== void 0)
40821
+ args.default_value = JSON.parse(opts.defaultValue);
40818
40822
  await ctx.execute({
40819
40823
  method: "PUT",
40820
40824
  path: "/v1/custom-properties/{id}",
@@ -41172,7 +41176,7 @@ Customer type.
41172
41176
 
41173
41177
  - \`taxable\`: Taxes are automatically determined for the customer.
41174
41178
  - \`exempt\`: The customer is exempt from tax.
41175
- `).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
41179
+ `).option("--registration-number <value>", `Customer registration number.`).option("--einvoicing-code <value>", `Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
41176
41180
  How customer invoices are issued from the parent organisation.
41177
41181
 
41178
41182
  - \`none\`: Invoices will keep being issued from this customer.
@@ -41201,6 +41205,8 @@ Examples:
41201
41205
  args.taxability = opts.taxability;
41202
41206
  if (opts.registrationNumber !== void 0)
41203
41207
  args.registration_number = opts.registrationNumber;
41208
+ if (opts.einvoicingCode !== void 0)
41209
+ args.einvoicing_code = opts.einvoicingCode;
41204
41210
  if (opts.externalId !== void 0)
41205
41211
  args.external_id = opts.externalId;
41206
41212
  if (opts.domain !== void 0)
@@ -41307,7 +41313,7 @@ Customer type.
41307
41313
 
41308
41314
  - \`taxable\`: Taxes are automatically determined for the customer.
41309
41315
  - \`exempt\`: The customer is exempt from tax.
41310
- `).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
41316
+ `).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--einvoicing-code <value>", `Customer electronic invoicing code, used to route their e-invoices to the relevant platform (e.g. Chorus Pro routing code or Peppol identifier).`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <json>", `Customer billing address.`).option("--shipping-address <json>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <json>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <json>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <json>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
41311
41317
  How customer invoices are issued from the parent organisation.
41312
41318
 
41313
41319
  - \`none\`: Invoices will keep being issued from this customer.
@@ -41338,6 +41344,8 @@ Examples:
41338
41344
  args.taxability = opts.taxability;
41339
41345
  if (opts.registrationNumber !== void 0)
41340
41346
  args.registration_number = opts.registrationNumber;
41347
+ if (opts.einvoicingCode !== void 0)
41348
+ args.einvoicing_code = opts.einvoicingCode;
41341
41349
  if (opts.externalId !== void 0)
41342
41350
  args.external_id = opts.externalId;
41343
41351
  if (opts.domain !== void 0)
@@ -41591,7 +41599,7 @@ Examples:
41591
41599
  queryParamKeys: []
41592
41600
  });
41593
41601
  });
41594
- resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).requiredOption("--type <value>", `Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.`).addHelpText("after", `
41602
+ resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--type <value>", `Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
41595
41603
  Examples:
41596
41604
  hyperline customers-address create-customer-address --customer-id <customerId> --type <type>
41597
41605
  hyperline customers-address create-customer-address --customer-id <customerId> --type <type> --name <name> --line1 <line1>
@@ -41604,6 +41612,8 @@ Examples:
41604
41612
  const args = {};
41605
41613
  if (opts.customerId !== void 0)
41606
41614
  args.customerId = opts.customerId;
41615
+ if (opts.type !== void 0)
41616
+ args.type = opts.type;
41607
41617
  if (opts.name !== void 0)
41608
41618
  args.name = opts.name;
41609
41619
  if (opts.line1 !== void 0)
@@ -41618,8 +41628,8 @@ Examples:
41618
41628
  args.state = opts.state;
41619
41629
  if (opts.country !== void 0)
41620
41630
  args.country = opts.country;
41621
- if (opts.type !== void 0)
41622
- args.type = opts.type;
41631
+ if (opts.taxId !== void 0)
41632
+ args.tax_id = opts.taxId;
41623
41633
  await ctx.execute({
41624
41634
  method: "POST",
41625
41635
  path: "/v1/customers/{customerId}/addresses",
@@ -41627,7 +41637,7 @@ Examples:
41627
41637
  queryParamKeys: []
41628
41638
  });
41629
41639
  });
41630
- resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).addHelpText("after", `
41640
+ resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `Only for US country. Second part of subdivision code in ISO format. See [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US).`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
41631
41641
  Examples:
41632
41642
  hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId>
41633
41643
  hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId> --name <name> --line1 <line1>
@@ -41656,6 +41666,8 @@ Examples:
41656
41666
  args.state = opts.state;
41657
41667
  if (opts.country !== void 0)
41658
41668
  args.country = opts.country;
41669
+ if (opts.taxId !== void 0)
41670
+ args.tax_id = opts.taxId;
41659
41671
  await ctx.execute({
41660
41672
  method: "PATCH",
41661
41673
  path: "/v1/customers/{customerId}/addresses/{addressId}",
@@ -41838,7 +41850,7 @@ Examples:
41838
41850
  queryParamKeys: []
41839
41851
  });
41840
41852
  });
41841
- resource.command("list-customer-credit-transactions").description(`List all transactions (purchases, topups, usages) for a specific credit product. Paginated with take/skip and optional filters.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--type <value>", `type`).option("--invoice-id <value>", `invoice_id`).option("--created-at <value>", `created_at`).addHelpText("after", `
41853
+ resource.command("list-customer-credit-transactions").description(`List all transactions (topups, usages, expirations) for a specific credit product. Paginated with take/skip and optional filters.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--type <value>", `type`).option("--invoice-id <value>", `invoice_id`).option("--created-at <value>", `created_at`).addHelpText("after", `
41842
41854
  Examples:
41843
41855
  hyperline customers-credits list-customer-credit-transactions --id <id> --product-id <productId>
41844
41856
  hyperline customers-credits list-customer-credit-transactions --id <id> --product-id <productId> --take <take> --type <type>`).action(async (opts) => {
@@ -42964,7 +42976,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
42964
42976
 
42965
42977
  - \`current\`: Use the current default payment method of the customer.
42966
42978
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
42967
- `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <json>", `line_items`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
42979
+ `).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), resolved to the start of that day in the customer timezone. Requires \`status\` to be \`draft\` and an issue date after today. Default to \`manual\`.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <json>", `line_items`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
42968
42980
  Examples:
42969
42981
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
42970
42982
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -43015,6 +43027,8 @@ Examples:
43015
43027
  args.due_at = opts.dueAt;
43016
43028
  if (opts.settledAt !== void 0)
43017
43029
  args.settled_at = opts.settledAt;
43030
+ if (opts.issuingMethod !== void 0)
43031
+ args.issuing_method = opts.issuingMethod;
43018
43032
  if (opts.properties !== void 0)
43019
43033
  args.properties = JSON.parse(opts.properties);
43020
43034
  if (opts.customProperties !== void 0)
@@ -43204,7 +43218,7 @@ Examples:
43204
43218
 
43205
43219
  - \`auto\`: Tax is automatically computed and applied.
43206
43220
  - \`not_eligible\`: Tax collection is disabled for the invoice.
43207
- `).option("--line-items <json>", `line_items`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
43221
+ `).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), in the invoice timezone. The issue date must be after today. Set to \`manual\` to unschedule the invoice.`).option("--emitted-at <value>", `Issue date of the draft invoice. For a scheduled invoice, the day on which it is automatically finalized.`).option("--line-items <json>", `line_items`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
43208
43222
  Examples:
43209
43223
  hyperline invoices update --id <id>
43210
43224
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -43233,6 +43247,10 @@ Examples:
43233
43247
  args.footer = opts.footer;
43234
43248
  if (opts.taxScheme !== void 0)
43235
43249
  args.tax_scheme = opts.taxScheme;
43250
+ if (opts.issuingMethod !== void 0)
43251
+ args.issuing_method = opts.issuingMethod;
43252
+ if (opts.emittedAt !== void 0)
43253
+ args.emitted_at = opts.emittedAt;
43236
43254
  if (opts.paymentMethodType !== void 0)
43237
43255
  args.payment_method_type = opts.paymentMethodType;
43238
43256
  if (opts.paymentMethodId !== void 0)
@@ -44124,7 +44142,7 @@ How the periodic credit allowance is granted for partial billing periods.
44124
44142
 
44125
44143
  - \`prorated\` (default): the granted credits are prorated to the elapsed period.
44126
44144
  - \`full_allowance\`: the full allowance is always granted (the invoice remains prorated).
44127
- `).option("--credits-balance-auto-creation-enabled <value>", `Default for the \`credits_balance_auto_creation_enabled\` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. \`true\` when unset. A subscription product can override it.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <json>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
44145
+ `).option("--credits-balance-auto-creation-enabled <value>", `Default for the \`credits_balance_auto_creation_enabled\` setting of subscription products using this credit product: whether the customer credit balance is created as soon as the product is added to a subscription. \`true\` when unset. A subscription product can override it.`).option("--portal-top-up-auto-activation-enabled <value>", `Whether portal top-ups are enabled for the customer when a credit balance of this product is created for them, from a subscription or manually. Portal top-ups must also be enabled in the hosted pages settings to show on the portal. \`false\` when unset.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <json>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
44128
44146
  Examples:
44129
44147
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
44130
44148
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
@@ -44151,6 +44169,8 @@ Examples:
44151
44169
  args.credits_grant_mode = opts.creditsGrantMode;
44152
44170
  if (opts.creditsBalanceAutoCreationEnabled !== void 0)
44153
44171
  args.credits_balance_auto_creation_enabled = opts.creditsBalanceAutoCreationEnabled;
44172
+ if (opts.portalTopUpAutoActivationEnabled !== void 0)
44173
+ args.portal_top_up_auto_activation_enabled = opts.portalTopUpAutoActivationEnabled;
44154
44174
  if (opts.displayMode !== void 0)
44155
44175
  args.display_mode = opts.displayMode;
44156
44176
  if (opts.lowCreditsThreshold !== void 0)
@@ -44325,7 +44345,7 @@ Quote status.
44325
44345
  - \`all\`: Display all pricing tiers.
44326
44346
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
44327
44347
  - \`none\`: Hide all pricing tiers.
44328
- `).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 <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
44348
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
44329
44349
  Examples:
44330
44350
  hyperline quotes create --customer-id <customer_id>
44331
44351
  hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
@@ -44368,8 +44388,8 @@ Examples:
44368
44388
  args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
44369
44389
  if (opts.displayDocumentsInPreview !== void 0)
44370
44390
  args.display_documents_in_preview = opts.displayDocumentsInPreview;
44371
- if (opts.displaySubscriptionOnUpdate !== void 0)
44372
- args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
44391
+ if (opts.subscriptionUpdateDisplay !== void 0)
44392
+ args.subscription_update_display = opts.subscriptionUpdateDisplay;
44373
44393
  if (opts.generateDraftInvoices !== void 0)
44374
44394
  args.generate_draft_invoices = opts.generateDraftInvoices;
44375
44395
  if (opts.templateId !== void 0)
@@ -44617,7 +44637,7 @@ Examples:
44617
44637
  - \`all\`: Display all pricing tiers.
44618
44638
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
44619
44639
  - \`none\`: Hide all pricing tiers.
44620
- `).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 <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
44640
+ `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
44621
44641
  Examples:
44622
44642
  hyperline quotes update --id <id>
44623
44643
  hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
@@ -44656,8 +44676,8 @@ Examples:
44656
44676
  args.display_first_invoice_amount = opts.displayFirstInvoiceAmount;
44657
44677
  if (opts.displayDocumentsInPreview !== void 0)
44658
44678
  args.display_documents_in_preview = opts.displayDocumentsInPreview;
44659
- if (opts.displaySubscriptionOnUpdate !== void 0)
44660
- args.display_subscription_on_update = opts.displaySubscriptionOnUpdate;
44679
+ if (opts.subscriptionUpdateDisplay !== void 0)
44680
+ args.subscription_update_display = opts.subscriptionUpdateDisplay;
44661
44681
  if (opts.generateDraftInvoices !== void 0)
44662
44682
  args.generate_draft_invoices = opts.generateDraftInvoices;
44663
44683
  if (opts.crmOpportunityId !== void 0)
@@ -62719,6 +62739,25 @@ var DomainSchema = external_exports.string().trim().toLowerCase().regex(/^(?!:\/
62719
62739
  example: "acme.com"
62720
62740
  });
62721
62741
 
62742
+ // ../hyperline-lib/build/http/dto/emailStatus.js
62743
+ var EmailStatusSchema = external_exports.enum([
62744
+ "sent",
62745
+ "delivered",
62746
+ "opened",
62747
+ "clicked",
62748
+ "spammed",
62749
+ "bounced",
62750
+ "queued",
62751
+ "drafted",
62752
+ "attempted",
62753
+ "failed",
62754
+ "undeliverable",
62755
+ "converted",
62756
+ "suppressed",
62757
+ "unsubscribed",
62758
+ "dropped"
62759
+ ]);
62760
+
62722
62761
  // ../hyperline-lib/build/http/dto/error.js
62723
62762
  var ErrorSchema = external_exports.object({
62724
62763
  message: external_exports.string()
@@ -65850,6 +65889,8 @@ var usStates = [
65850
65889
 
65851
65890
  // ../hyperline-lib/build/utils/dates.js
65852
65891
  var import_shared2 = __toESM(require_shared(), 1);
65892
+ var PERIOD_BOUND_DRIFT_TOLERANCE_MS = 2 * 60 * 1e3;
65893
+ var DST_SHIFT_MS = 60 * 60 * 1e3;
65853
65894
 
65854
65895
  // ../hyperline-lib/build/utils/document.js
65855
65896
  var import_shared3 = __toESM(require_shared(), 1);
@@ -65861,6 +65902,11 @@ import * as https from "node:https";
65861
65902
  import { createHash as createHash2 } from "node:crypto";
65862
65903
  import { deepEqual } from "fast-equals";
65863
65904
 
65905
+ // ../hyperline-lib/build/utils/realignDatesToTimezone.js
65906
+ var import_shared4 = __toESM(require_shared(), 1);
65907
+ var MILLISECONDS_PER_DAY = 24 * 60 * 60 * 1e3;
65908
+ var LAST_MILLISECOND_OF_DAY = MILLISECONDS_PER_DAY - 1;
65909
+
65864
65910
  // ../hyperline-lib/build/utils/api/filterBuilder.js
65865
65911
  var baseAuthorizedOperators = ["not", "isNull", "isNotNull"];
65866
65912
  var booleanAuthorizedOperators = [
@@ -65927,7 +65973,7 @@ var isAxiosError = axios.isAxiosError;
65927
65973
 
65928
65974
  // ../hyperline-lib/build/httpClient/httpClient.js
65929
65975
  import axios2 from "axios";
65930
- import axiosRetry, { isNetworkOrIdempotentRequestError } from "axios-retry";
65976
+ import axiosRetry, { isNetworkOrIdempotentRequestError, retryAfter } from "axios-retry";
65931
65977
  import { AxiosError } from "axios";
65932
65978
  var recommendedRetryConfig = {
65933
65979
  retries: 3,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.ae39ce9",
3
+ "version": "0.1.0-build.1.aeb38db",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",