@hyperline/cli 0.1.0-build.1.2d5778a → 0.1.0-build.1.3076756

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.
@@ -38762,7 +38762,7 @@ How customer invoices are issued from the parent organisation.
38762
38762
  - \`none\`: Invoices will keep being issued from this customer.
38763
38763
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38764
38764
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38765
- `).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", `
38765
+ `).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", `
38766
38766
  Examples:
38767
38767
  hyperline customers create-customer
38768
38768
  hyperline customers create-customer --name <name> --type <type>
@@ -38819,6 +38819,10 @@ Examples:
38819
38819
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
38820
38820
  if (opts.priceBookId !== void 0)
38821
38821
  args.price_book_id = opts.priceBookId;
38822
+ if (opts.ownerId !== void 0)
38823
+ args.owner_id = opts.ownerId;
38824
+ if (opts.followerIds !== void 0)
38825
+ args.follower_ids = opts.followerIds;
38822
38826
  if (opts.taxRateCustom !== void 0)
38823
38827
  args.tax_rate_custom = Number(opts.taxRateCustom);
38824
38828
  if (opts.customPaymentDelay !== void 0)
@@ -38887,7 +38891,7 @@ How customer invoices are issued from the parent organisation.
38887
38891
  - \`none\`: Invoices will keep being issued from this customer.
38888
38892
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38889
38893
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38890
- `).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", `
38894
+ `).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", `
38891
38895
  Examples:
38892
38896
  hyperline customers update --id <id>
38893
38897
  hyperline customers update --id <id> --name <name> --type <type>
@@ -38948,6 +38952,10 @@ Examples:
38948
38952
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
38949
38953
  if (opts.priceBookId !== void 0)
38950
38954
  args.price_book_id = opts.priceBookId;
38955
+ if (opts.ownerId !== void 0)
38956
+ args.owner_id = opts.ownerId;
38957
+ if (opts.followerIds !== void 0)
38958
+ args.follower_ids = opts.followerIds;
38951
38959
  if (opts.taxRateCustom !== void 0)
38952
38960
  args.tax_rate_custom = Number(opts.taxRateCustom);
38953
38961
  if (opts.customPaymentDelay !== void 0)
@@ -41801,6 +41809,25 @@ Examples:
41801
41809
  queryParamKeys: []
41802
41810
  });
41803
41811
  });
41812
+ 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", `
41813
+ Examples:
41814
+ hyperline quotes finalize --id <id>
41815
+ hyperline quotes finalize --id <id> --output json`).action(async (opts) => {
41816
+ const ctx = resource.parent?.opts()._ctx;
41817
+ if (!ctx) {
41818
+ process.stderr.write("Error: Not authenticated\n");
41819
+ process.exit(1);
41820
+ }
41821
+ const args = {};
41822
+ if (opts.id !== void 0)
41823
+ args.id = opts.id;
41824
+ await ctx.execute({
41825
+ method: "POST",
41826
+ path: "/v1/quotes/{id}/finalize",
41827
+ args,
41828
+ queryParamKeys: []
41829
+ });
41830
+ });
41804
41831
  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", `
41805
41832
  Examples:
41806
41833
  hyperline quotes send --id <id> --email <email>
@@ -42858,7 +42885,7 @@ Examples:
42858
42885
  ]
42859
42886
  });
42860
42887
  });
42861
- 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", `
42888
+ 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", `
42862
42889
  Examples:
42863
42890
  hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription>
42864
42891
  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>
@@ -61644,6 +61671,7 @@ import * as winston from "winston";
61644
61671
 
61645
61672
  // ../hyperline-monitoring/build/logger/formatting/format.js
61646
61673
  import prune from "json-prune";
61674
+ var REDACTED_HEADER_KEY_PATTERN = /authorization|authenticate|cookie|secret|token|credential|signature|jwt|api[_-]?key|access[_-]?token|refresh[_-]?token|private[_-]?key/i;
61647
61675
  function jsonFormat(info) {
61648
61676
  const prunedInfo = JSON.parse(prune(info));
61649
61677
  for (const [key, value] of Object.entries(prunedInfo)) {
@@ -61726,17 +61754,26 @@ function formatAxiosError(error48) {
61726
61754
  url: request?.url,
61727
61755
  baseURL: request?.baseURL,
61728
61756
  params: request?.params,
61729
- headers: request?.headers,
61757
+ headers: redactHeaders({ headers: request?.headers }),
61730
61758
  "axios-retry": request?.["axios-retry"]
61731
61759
  },
61732
61760
  response: {
61733
61761
  status: response?.status,
61734
61762
  statusText: response?.statusText,
61735
- headers: response?.headers,
61763
+ headers: redactHeaders({ headers: response?.headers }),
61736
61764
  data: response?.data
61737
61765
  }
61738
61766
  };
61739
61767
  }
61768
+ function redactHeaders({ headers }) {
61769
+ if (!isRecord(headers)) {
61770
+ return headers;
61771
+ }
61772
+ return Object.fromEntries(Object.entries(headers).map(([headerKey, headerValue]) => [
61773
+ headerKey,
61774
+ REDACTED_HEADER_KEY_PATTERN.test(headerKey) ? "<redacted>" : headerValue
61775
+ ]));
61776
+ }
61740
61777
  function isRecord(value) {
61741
61778
  return typeof value === "object" && value !== null && !Array.isArray(value);
61742
61779
  }
@@ -62118,7 +62155,9 @@ var de = {
62118
62155
  "invoices.outstandingProduct.descriptionPeriod": "Unbezahlter Betrag der Rechnung{{invoiceNumber}} vom {{periodStart}} bis {{periodEnd}}",
62119
62156
  "invoices.outstandingProduct.name": "Offener Saldo",
62120
62157
  "invoices.prorata.paymentForItem": "Anteilig berechneter Betrag f\xFCr",
62158
+ "invoices.prorata.paymentForItemFullPeriod": "Zahlung f\xFCr",
62121
62159
  "invoices.prorata.refundForItem": "Anteilig erstatteter Betrag f\xFCr",
62160
+ "invoices.prorata.refundForItemFullPeriod": "Erstattung f\xFCr",
62122
62161
  "subscriptions.closingChargeName": "Abschlussgeb\xFChr f\xFCr das Abonnement",
62123
62162
  "subscriptions.correction": "Vorperiodische Anpassung",
62124
62163
  "subscriptions.updates.addCoupon": "Gutschein hinzuf\xFCgen {{couponName}}",
@@ -62147,7 +62186,9 @@ var en = {
62147
62186
  "invoices.outstandingProduct.descriptionPeriod": "Unpaid amount from the invoice{{invoiceNumber}} from {{periodStart}} to {{periodEnd}}",
62148
62187
  "invoices.outstandingProduct.name": "Outstanding balance",
62149
62188
  "invoices.prorata.paymentForItem": "Prorated payment for",
62189
+ "invoices.prorata.paymentForItemFullPeriod": "Payment for",
62150
62190
  "invoices.prorata.refundForItem": "Prorated refund for",
62191
+ "invoices.prorata.refundForItemFullPeriod": "Refund for",
62151
62192
  "subscriptions.closingChargeName": "Closing fee for subscription",
62152
62193
  "subscriptions.correction": "Adjustment previous period",
62153
62194
  "subscriptions.updates.addCoupon": "Add coupon {{couponName}}",
@@ -62200,7 +62241,9 @@ var es = {
62200
62241
  "invoices.outstandingProduct.descriptionPeriod": "Monto pendiente de la factura{{invoiceNumber}} del {{periodStart}} al {{periodEnd}}",
62201
62242
  "invoices.outstandingProduct.name": "Saldo pendiente",
62202
62243
  "invoices.prorata.paymentForItem": "Pago prorrateado por",
62244
+ "invoices.prorata.paymentForItemFullPeriod": "Pago por",
62203
62245
  "invoices.prorata.refundForItem": "Reembolso prorrateado por",
62246
+ "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
62204
62247
  "subscriptions.closingChargeName": "Cargo por cierre de suscripci\xF3n",
62205
62248
  "subscriptions.correction": "Ajuste del periodo anterior",
62206
62249
  "subscriptions.updates.addCoupon": "A\xF1adir cup\xF3n {{couponName}}",
@@ -62241,7 +62284,9 @@ var fr = {
62241
62284
  "invoices.outstandingProduct.descriptionPeriod": "Montant impay\xE9 de la facture{{invoiceNumber}} du {{periodStart}} au {{periodEnd}}",
62242
62285
  "invoices.outstandingProduct.name": "Solde impay\xE9",
62243
62286
  "invoices.prorata.paymentForItem": "Paiement au prorata pour",
62287
+ "invoices.prorata.paymentForItemFullPeriod": "Paiement pour",
62244
62288
  "invoices.prorata.refundForItem": "Remboursement au prorata pour",
62289
+ "invoices.prorata.refundForItemFullPeriod": "Remboursement pour",
62245
62290
  "subscriptions.closingChargeName": "Frais de cl\xF4ture pour abonnement",
62246
62291
  "subscriptions.correction": "Ajustement p\xE9riode pr\xE9c\xE9dente",
62247
62292
  "subscriptions.updates.addCoupon": "Ajout du coupon {{couponName}}",
@@ -62282,7 +62327,9 @@ var it = {
62282
62327
  "invoices.outstandingProduct.descriptionPeriod": "Importo insoluto della fattura{{invoiceNumber}} dal {{periodStart}} al {{periodEnd}}",
62283
62328
  "invoices.outstandingProduct.name": "Saldo insoluto",
62284
62329
  "invoices.prorata.paymentForItem": "Pagamento proporzionale per",
62330
+ "invoices.prorata.paymentForItemFullPeriod": "Pagamento per",
62285
62331
  "invoices.prorata.refundForItem": "Rimborso proporzionale per",
62332
+ "invoices.prorata.refundForItemFullPeriod": "Rimborso per",
62286
62333
  "subscriptions.closingChargeName": "Costo di chiusura per abbonamento",
62287
62334
  "subscriptions.correction": "Correzione periodo precedente",
62288
62335
  "subscriptions.updates.addCoupon": "Aggiungi coupon {{couponName}}",
@@ -62323,7 +62370,9 @@ var nl = {
62323
62370
  "invoices.outstandingProduct.descriptionPeriod": "Onbetaald bedrag van de factuur{{invoiceNumber}} van {{periodStart}} tot {{periodEnd}}",
62324
62371
  "invoices.outstandingProduct.name": "Openstaand saldo",
62325
62372
  "invoices.prorata.paymentForItem": "Gedeeltelijke betaling voor",
62373
+ "invoices.prorata.paymentForItemFullPeriod": "Betaling voor",
62326
62374
  "invoices.prorata.refundForItem": "Gedeeltelijke terugbetaling voor",
62375
+ "invoices.prorata.refundForItemFullPeriod": "Terugbetaling voor",
62327
62376
  "subscriptions.closingChargeName": "Afsluitkosten voor abonnement",
62328
62377
  "subscriptions.correction": "Aanpassing vorige periode",
62329
62378
  "subscriptions.updates.addCoupon": "Coupon toevoegen {{couponName}}",
@@ -62364,7 +62413,9 @@ var pl = {
62364
62413
  "invoices.outstandingProduct.descriptionPeriod": "Nieop\u0142acona kwota z faktury{{invoiceNumber}} od {{periodStart}} do {{periodEnd}}",
62365
62414
  "invoices.outstandingProduct.name": "Niezap\u0142acone saldo",
62366
62415
  "invoices.prorata.paymentForItem": "P\u0142atno\u015B\u0107 proporcjonalna za",
62416
+ "invoices.prorata.paymentForItemFullPeriod": "P\u0142atno\u015B\u0107 za",
62367
62417
  "invoices.prorata.refundForItem": "Zwrot proporcjonalny za",
62418
+ "invoices.prorata.refundForItemFullPeriod": "Zwrot za",
62368
62419
  "subscriptions.closingChargeName": "Op\u0142ata za zamkni\u0119cie subskrypcji",
62369
62420
  "subscriptions.correction": "Korekta poprzedniego okresu",
62370
62421
  "subscriptions.updates.addCoupon": "Dodaj kupon {{couponName}}",
@@ -62405,7 +62456,9 @@ var pt = {
62405
62456
  "invoices.outstandingProduct.descriptionPeriod": "Valor em aberto da fatura{{invoiceNumber}} de {{periodStart}} a {{periodEnd}}",
62406
62457
  "invoices.outstandingProduct.name": "Saldo em aberto",
62407
62458
  "invoices.prorata.paymentForItem": "Pagamento proporcional por",
62459
+ "invoices.prorata.paymentForItemFullPeriod": "Pagamento por",
62408
62460
  "invoices.prorata.refundForItem": "Reembolso proporcional por",
62461
+ "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
62409
62462
  "subscriptions.closingChargeName": "Taxa de encerramento da assinatura",
62410
62463
  "subscriptions.correction": "Ajuste do per\xEDodo anterior",
62411
62464
  "subscriptions.updates.addCoupon": "Adicionar cupom {{couponName}}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperline/cli",
3
- "version": "0.1.0-build.1.2d5778a",
3
+ "version": "0.1.0-build.1.3076756",
4
4
  "description": "Agent-first CLI for Hyperline API",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",