@hyperline/cli 0.1.0-build.1.f097051 → 0.1.0-build.1.f17e91a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34894,10 +34894,10 @@ var require_shared = __commonJS({
34894
34894
  ZodId: () => ZodId,
34895
34895
  ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
34896
34896
  });
34897
- var import_zod21 = require_lib();
34897
+ var import_zod20 = require_lib();
34898
34898
  var countryIds2 = ["all", ...countries.map(({ id }) => id)];
34899
- var ZodId = import_zod21.z.enum(countryIds2);
34900
- var ZodTranslationsSchemaFn = (schema) => import_zod21.z.record(import_zod21.z.string(), schema.optional());
34899
+ var ZodId = import_zod20.z.enum(countryIds2);
34900
+ var ZodTranslationsSchemaFn = (schema) => import_zod20.z.record(import_zod20.z.string(), schema.optional());
34901
34901
  var UsStates = [
34902
34902
  { id: "AA", name: "Armed Forces Americas" },
34903
34903
  { id: "AE", name: "Armed Forces Europe" },
@@ -37886,6 +37886,1250 @@ Examples:
37886
37886
  });
37887
37887
  }
37888
37888
 
37889
+ // build/commands/generated/accounting-accounts.js
37890
+ function registerAccounting_AccountsCommands(parent) {
37891
+ const resource = parent.command("accounting-accounts").description("Manage accounting > accounts");
37892
+ resource.command("list-ledger-accounts").description(`List accounting ledger accounts with optional balances.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `Filter by account ID.`).option("--ledger-id <value>", `Filter by ledger ID.`).option("--invoicing-entity-id <value>", `Filter by invoicing entity ID.`).option("--code <value>", `Filter by exact account code.`).option("--name <value>", `Filter by exact account name.`).option("--type <value>", `Filter by account type.`).option("--client-provider-id <value>", `Filter by connected provider ID.`).option("--search <value>", `Search account name or code.`).option("--year <number>", `Year used to calculate period balances.`).option("--quarter <number>", `Quarter used to calculate period balances.`).option("--sort-by <value>", `Field used to sort accounts.`).option("--order <value>", `Sort direction.`).addHelpText("after", `
37893
+ Examples:
37894
+ hyperline accounting-accounts list-ledger-accounts
37895
+ hyperline accounting-accounts list-ledger-accounts --take <take> --id <id>`).action(async (opts) => {
37896
+ const ctx = resource.parent?.opts()._ctx;
37897
+ if (!ctx) {
37898
+ process.stderr.write("Error: Not authenticated\n");
37899
+ process.exit(1);
37900
+ }
37901
+ const args = {};
37902
+ if (opts.id !== void 0)
37903
+ args.id = opts.id;
37904
+ if (opts.ledgerId !== void 0)
37905
+ args.ledger_id = opts.ledgerId;
37906
+ if (opts.invoicingEntityId !== void 0)
37907
+ args.invoicing_entity_id = opts.invoicingEntityId;
37908
+ if (opts.code !== void 0)
37909
+ args.code = opts.code;
37910
+ if (opts.name !== void 0)
37911
+ args.name = opts.name;
37912
+ if (opts.type !== void 0)
37913
+ args.type = opts.type;
37914
+ if (opts.clientProviderId !== void 0)
37915
+ args.client_provider_id = opts.clientProviderId;
37916
+ if (opts.search !== void 0)
37917
+ args.search = opts.search;
37918
+ if (opts.sortBy !== void 0)
37919
+ args.sort_by = opts.sortBy;
37920
+ if (opts.order !== void 0)
37921
+ args.order = opts.order;
37922
+ if (opts.take !== void 0)
37923
+ args.take = Number(opts.take);
37924
+ if (opts.skip !== void 0)
37925
+ args.skip = Number(opts.skip);
37926
+ if (opts.year !== void 0)
37927
+ args.year = Number(opts.year);
37928
+ if (opts.quarter !== void 0)
37929
+ args.quarter = Number(opts.quarter);
37930
+ await ctx.execute({
37931
+ method: "GET",
37932
+ path: "/v1/accounting/accounts",
37933
+ args,
37934
+ queryParamKeys: [
37935
+ "take",
37936
+ "skip",
37937
+ "id",
37938
+ "ledger_id",
37939
+ "invoicing_entity_id",
37940
+ "code",
37941
+ "name",
37942
+ "type",
37943
+ "client_provider_id",
37944
+ "search",
37945
+ "year",
37946
+ "quarter",
37947
+ "sort_by",
37948
+ "order"
37949
+ ]
37950
+ });
37951
+ });
37952
+ resource.command("list-primary-ledger-accounts").description(`List accounts from the primary ledger of an invoicing entity.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--invoicing-entity-id <value>", `Invoicing entity ID; defaults to the client's default.`).addHelpText("after", `
37953
+ Examples:
37954
+ hyperline accounting-accounts list-primary-ledger-accounts
37955
+ hyperline accounting-accounts list-primary-ledger-accounts --take <take> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
37956
+ const ctx = resource.parent?.opts()._ctx;
37957
+ if (!ctx) {
37958
+ process.stderr.write("Error: Not authenticated\n");
37959
+ process.exit(1);
37960
+ }
37961
+ const args = {};
37962
+ if (opts.invoicingEntityId !== void 0)
37963
+ args.invoicing_entity_id = opts.invoicingEntityId;
37964
+ if (opts.take !== void 0)
37965
+ args.take = Number(opts.take);
37966
+ if (opts.skip !== void 0)
37967
+ args.skip = Number(opts.skip);
37968
+ await ctx.execute({
37969
+ method: "GET",
37970
+ path: "/v1/accounting/primary-ledger/accounts",
37971
+ args,
37972
+ queryParamKeys: ["take", "skip", "invoicing_entity_id"]
37973
+ });
37974
+ });
37975
+ resource.command("get-ledger-account").description(`Retrieve a ledger account by its identifier.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
37976
+ Examples:
37977
+ hyperline accounting-accounts get-ledger-account --id <id>`).action(async (opts) => {
37978
+ const ctx = resource.parent?.opts()._ctx;
37979
+ if (!ctx) {
37980
+ process.stderr.write("Error: Not authenticated\n");
37981
+ process.exit(1);
37982
+ }
37983
+ const args = {};
37984
+ if (opts.id !== void 0)
37985
+ args.id = opts.id;
37986
+ await ctx.execute({
37987
+ method: "GET",
37988
+ path: "/v1/accounting/accounts/{id}",
37989
+ args,
37990
+ queryParamKeys: []
37991
+ });
37992
+ });
37993
+ resource.command("create-ledger-account").description(`Create an account in an accounting ledger.`).requiredOption("--ledger-id <value>", `Identifier of the ledger that owns the account.`).requiredOption("--code <value>", `Accounting code of the account.`).requiredOption("--type <value>", `Accounting type of the account.`).requiredOption("--name <value>", `Display name of the account.`).option("--provider-account-id <value>", `Optional account identifier in the connected provider.`).addHelpText("after", `
37994
+ Examples:
37995
+ hyperline accounting-accounts create-ledger-account --ledger-id <ledger_id> --code <code> --type <type> --name <name>
37996
+ hyperline accounting-accounts create-ledger-account --ledger-id <ledger_id> --code <code> --type <type> --name <name> --provider-account-id <provider_account_id>
37997
+ hyperline accounting-accounts create-ledger-account --ledger-id <ledger_id> --code <code> --type <type> --name <name> --output json`).action(async (opts) => {
37998
+ const ctx = resource.parent?.opts()._ctx;
37999
+ if (!ctx) {
38000
+ process.stderr.write("Error: Not authenticated\n");
38001
+ process.exit(1);
38002
+ }
38003
+ const args = {};
38004
+ if (opts.ledgerId !== void 0)
38005
+ args.ledger_id = opts.ledgerId;
38006
+ if (opts.code !== void 0)
38007
+ args.code = opts.code;
38008
+ if (opts.type !== void 0)
38009
+ args.type = opts.type;
38010
+ if (opts.name !== void 0)
38011
+ args.name = opts.name;
38012
+ if (opts.providerAccountId !== void 0)
38013
+ args.provider_account_id = opts.providerAccountId;
38014
+ await ctx.execute({
38015
+ method: "POST",
38016
+ path: "/v1/accounting/accounts",
38017
+ args,
38018
+ queryParamKeys: []
38019
+ });
38020
+ });
38021
+ resource.command("update-ledger-account").description(`Update an existing ledger account.`).requiredOption("--id <value>", `id parameter`).option("--code <value>", `Accounting code of the account.`).option("--type <value>", `Accounting type of the account.`).option("--name <value>", `Display name of the account.`).option("--description <value>", `Optional description of the account.`).option("--currency <value>", `ISO 4217 currency used by the account.`).addHelpText("after", `
38022
+ Examples:
38023
+ hyperline accounting-accounts update-ledger-account --id <id>
38024
+ hyperline accounting-accounts update-ledger-account --id <id> --code <code> --type <type>
38025
+ hyperline accounting-accounts update-ledger-account --id <id> --output json`).action(async (opts) => {
38026
+ const ctx = resource.parent?.opts()._ctx;
38027
+ if (!ctx) {
38028
+ process.stderr.write("Error: Not authenticated\n");
38029
+ process.exit(1);
38030
+ }
38031
+ const args = {};
38032
+ if (opts.id !== void 0)
38033
+ args.id = opts.id;
38034
+ if (opts.code !== void 0)
38035
+ args.code = opts.code;
38036
+ if (opts.type !== void 0)
38037
+ args.type = opts.type;
38038
+ if (opts.name !== void 0)
38039
+ args.name = opts.name;
38040
+ if (opts.description !== void 0)
38041
+ args.description = opts.description;
38042
+ if (opts.currency !== void 0)
38043
+ args.currency = opts.currency;
38044
+ await ctx.execute({
38045
+ method: "PUT",
38046
+ path: "/v1/accounting/accounts/{id}",
38047
+ args,
38048
+ queryParamKeys: []
38049
+ });
38050
+ });
38051
+ resource.command("delete-ledger-account").description(`Delete an unused accounting ledger account.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
38052
+ Examples:
38053
+ hyperline accounting-accounts delete-ledger-account --id <id>
38054
+ hyperline accounting-accounts delete-ledger-account --id <id> --output json`).action(async (opts) => {
38055
+ const ctx = resource.parent?.opts()._ctx;
38056
+ if (!ctx) {
38057
+ process.stderr.write("Error: Not authenticated\n");
38058
+ process.exit(1);
38059
+ }
38060
+ const args = {};
38061
+ if (opts.id !== void 0)
38062
+ args.id = opts.id;
38063
+ if (!opts.yes) {
38064
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
38065
+ if (!confirmed) {
38066
+ process.stdout.write("Aborted.\n");
38067
+ return;
38068
+ }
38069
+ }
38070
+ await ctx.execute({
38071
+ method: "DELETE",
38072
+ path: "/v1/accounting/accounts/{id}",
38073
+ args,
38074
+ queryParamKeys: []
38075
+ });
38076
+ });
38077
+ }
38078
+
38079
+ // build/commands/generated/accounting-journal-entries.js
38080
+ function registerAccounting_Journal_EntriesCommands(parent) {
38081
+ const resource = parent.command("accounting-journal-entries").description("Manage accounting > journal entries");
38082
+ resource.command("list-journal-entries").description(`List accounting journal entries with optional filters.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--entry-number <value>", `Filter by journal entry number.`).option("--status <value>", `Filter by journal entry status.`).option("--origin <value>", `Filter by automatic or manual origin.`).option("--ledger-id <value>", `Filter by ledger identifier.`).option("--invoicing-entity-id <value>", `Filter by invoicing entity identifier.`).option("--invoice-id <value>", `Filter by invoice identifier.`).option("--customer-id <value>", `Filter by customer identifier.`).option("--subscription-id <value>", `Filter by subscription identifier.`).option("--transaction-id <value>", `Filter by transaction identifier.`).option("--ledger-account-id <value>", `Filter entries containing a ledger account.`).option("--rule-id <value>", `Filter entries containing an accounting rule.`).option("--search <value>", `Search entry number, description, customer, or invoice.`).option("--year <number>", `Filter by entry year.`).option("--quarter <number>", `Filter by entry quarter.`).addHelpText("after", `
38083
+ Examples:
38084
+ hyperline accounting-journal-entries list-journal-entries
38085
+ hyperline accounting-journal-entries list-journal-entries --take <take> --entry-number <entry_number>`).action(async (opts) => {
38086
+ const ctx = resource.parent?.opts()._ctx;
38087
+ if (!ctx) {
38088
+ process.stderr.write("Error: Not authenticated\n");
38089
+ process.exit(1);
38090
+ }
38091
+ const args = {};
38092
+ if (opts.entryNumber !== void 0)
38093
+ args.entry_number = opts.entryNumber;
38094
+ if (opts.status !== void 0)
38095
+ args.status = opts.status;
38096
+ if (opts.origin !== void 0)
38097
+ args.origin = opts.origin;
38098
+ if (opts.ledgerId !== void 0)
38099
+ args.ledger_id = opts.ledgerId;
38100
+ if (opts.invoicingEntityId !== void 0)
38101
+ args.invoicing_entity_id = opts.invoicingEntityId;
38102
+ if (opts.invoiceId !== void 0)
38103
+ args.invoice_id = opts.invoiceId;
38104
+ if (opts.customerId !== void 0)
38105
+ args.customer_id = opts.customerId;
38106
+ if (opts.subscriptionId !== void 0)
38107
+ args.subscription_id = opts.subscriptionId;
38108
+ if (opts.transactionId !== void 0)
38109
+ args.transaction_id = opts.transactionId;
38110
+ if (opts.ledgerAccountId !== void 0)
38111
+ args.ledger_account_id = opts.ledgerAccountId;
38112
+ if (opts.ruleId !== void 0)
38113
+ args.rule_id = opts.ruleId;
38114
+ if (opts.search !== void 0)
38115
+ args.search = opts.search;
38116
+ if (opts.take !== void 0)
38117
+ args.take = Number(opts.take);
38118
+ if (opts.skip !== void 0)
38119
+ args.skip = Number(opts.skip);
38120
+ if (opts.year !== void 0)
38121
+ args.year = Number(opts.year);
38122
+ if (opts.quarter !== void 0)
38123
+ args.quarter = Number(opts.quarter);
38124
+ await ctx.execute({
38125
+ method: "GET",
38126
+ path: "/v1/accounting/journal-entries",
38127
+ args,
38128
+ queryParamKeys: [
38129
+ "take",
38130
+ "skip",
38131
+ "entry_number",
38132
+ "status",
38133
+ "origin",
38134
+ "ledger_id",
38135
+ "invoicing_entity_id",
38136
+ "invoice_id",
38137
+ "customer_id",
38138
+ "subscription_id",
38139
+ "transaction_id",
38140
+ "ledger_account_id",
38141
+ "rule_id",
38142
+ "search",
38143
+ "year",
38144
+ "quarter"
38145
+ ]
38146
+ });
38147
+ });
38148
+ resource.command("get-journal-entry").description(`Retrieve a journal entry and its lines by identifier.`).requiredOption("--id <value>", `id parameter`).option("--invoicing-entity-id <value>", `Require the entry to belong to this invoicing entity.`).addHelpText("after", `
38149
+ Examples:
38150
+ hyperline accounting-journal-entries get-journal-entry --id <id>
38151
+ hyperline accounting-journal-entries get-journal-entry --id <id> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
38152
+ const ctx = resource.parent?.opts()._ctx;
38153
+ if (!ctx) {
38154
+ process.stderr.write("Error: Not authenticated\n");
38155
+ process.exit(1);
38156
+ }
38157
+ const args = {};
38158
+ if (opts.id !== void 0)
38159
+ args.id = opts.id;
38160
+ if (opts.invoicingEntityId !== void 0)
38161
+ args.invoicing_entity_id = opts.invoicingEntityId;
38162
+ await ctx.execute({
38163
+ method: "GET",
38164
+ path: "/v1/accounting/journal-entries/{id}",
38165
+ args,
38166
+ queryParamKeys: ["invoicing_entity_id"]
38167
+ });
38168
+ });
38169
+ resource.command("create-manual-journal-entry").description(`Create and post a balanced manual journal entry attributed to the current user or API credential.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--description <value>", `Description recorded on the manual journal entry.`).requiredOption("--entry-date-at <value>", `Timestamp when the journal entry takes effect.`).requiredOption("--lines <json>", `Balanced debit and credit lines.`).option("--recognition-schedule <json>", `Optional recognition schedule for a deferred-revenue credit.`).addHelpText("after", `
38170
+ Examples:
38171
+ hyperline accounting-journal-entries create-manual-journal-entry --ledger-id <ledger_id> --description <description> --entry-date-at <entry_date_at> --lines <lines>
38172
+ hyperline accounting-journal-entries create-manual-journal-entry --ledger-id <ledger_id> --description <description> --entry-date-at <entry_date_at> --lines <lines> --recognition-schedule <recognition_schedule>
38173
+ hyperline accounting-journal-entries create-manual-journal-entry --ledger-id <ledger_id> --description <description> --entry-date-at <entry_date_at> --lines <lines> --output json`).action(async (opts) => {
38174
+ const ctx = resource.parent?.opts()._ctx;
38175
+ if (!ctx) {
38176
+ process.stderr.write("Error: Not authenticated\n");
38177
+ process.exit(1);
38178
+ }
38179
+ const args = {};
38180
+ if (opts.ledgerId !== void 0)
38181
+ args.ledger_id = opts.ledgerId;
38182
+ if (opts.description !== void 0)
38183
+ args.description = opts.description;
38184
+ if (opts.entryDateAt !== void 0)
38185
+ args.entry_date_at = opts.entryDateAt;
38186
+ if (opts.lines !== void 0)
38187
+ args.lines = JSON.parse(opts.lines);
38188
+ if (opts.recognitionSchedule !== void 0)
38189
+ args.recognition_schedule = JSON.parse(opts.recognitionSchedule);
38190
+ await ctx.execute({
38191
+ method: "POST",
38192
+ path: "/v1/accounting/journal-entries",
38193
+ args,
38194
+ queryParamKeys: []
38195
+ });
38196
+ });
38197
+ resource.command("preview-manual-journal-entry-recognition").description(`Preview revenue-recognition slices for a manual journal entry without writing data.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--amount <value>", `Deferred amount in minor ledger-currency units.`).requiredOption("--method <value>", `Recognition method to preview.`).option("--recognition-date <value>", `Recognition date for point-in-time recognition.`).option("--window <json>", `Service window for over-time recognition.`).option("--granularity <value>", `Slice granularity for over-time recognition.`).addHelpText("after", `
38198
+ Examples:
38199
+ hyperline accounting-journal-entries preview-manual-journal-entry-recognition --ledger-id <ledger_id> --amount <amount> --method <method>
38200
+ hyperline accounting-journal-entries preview-manual-journal-entry-recognition --ledger-id <ledger_id> --amount <amount> --method <method> --recognition-date <recognition_date> --window <window>
38201
+ hyperline accounting-journal-entries preview-manual-journal-entry-recognition --ledger-id <ledger_id> --amount <amount> --method <method> --output json`).action(async (opts) => {
38202
+ const ctx = resource.parent?.opts()._ctx;
38203
+ if (!ctx) {
38204
+ process.stderr.write("Error: Not authenticated\n");
38205
+ process.exit(1);
38206
+ }
38207
+ const args = {};
38208
+ if (opts.ledgerId !== void 0)
38209
+ args.ledger_id = opts.ledgerId;
38210
+ if (opts.amount !== void 0)
38211
+ args.amount = opts.amount;
38212
+ if (opts.method !== void 0)
38213
+ args.method = opts.method;
38214
+ if (opts.recognitionDate !== void 0)
38215
+ args.recognition_date = opts.recognitionDate;
38216
+ if (opts.granularity !== void 0)
38217
+ args.granularity = opts.granularity;
38218
+ if (opts.window !== void 0)
38219
+ args.window = JSON.parse(opts.window);
38220
+ await ctx.execute({
38221
+ method: "POST",
38222
+ path: "/v1/accounting/journal-entries/recognition-preview",
38223
+ args,
38224
+ queryParamKeys: []
38225
+ });
38226
+ });
38227
+ resource.command("list-journal-entry-lines").description(`List journal entry lines with optional filters.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--entry-id <value>", `Filter by journal entry identifier.`).option("--ledger-account-id <value>", `Filter by ledger account identifier.`).option("--invoice-line-item-id <value>", `Filter by invoice line item identifier.`).option("--type <value>", `Filter by debit or credit line type.`).option("--invoicing-entity-id <value>", `Filter by invoicing entity identifier.`).option("--entry-status <value>", `Filter by parent journal entry status.`).option("--customer-id <value>", `Filter by customer identifier.`).option("--search <value>", `Search line amount or parent entry data.`).option("--year <number>", `Filter by parent entry year.`).option("--quarter <number>", `Filter by parent entry quarter.`).addHelpText("after", `
38228
+ Examples:
38229
+ hyperline accounting-journal-entries list-journal-entry-lines
38230
+ hyperline accounting-journal-entries list-journal-entry-lines --take <take> --entry-id <entry_id>`).action(async (opts) => {
38231
+ const ctx = resource.parent?.opts()._ctx;
38232
+ if (!ctx) {
38233
+ process.stderr.write("Error: Not authenticated\n");
38234
+ process.exit(1);
38235
+ }
38236
+ const args = {};
38237
+ if (opts.entryId !== void 0)
38238
+ args.entry_id = opts.entryId;
38239
+ if (opts.ledgerAccountId !== void 0)
38240
+ args.ledger_account_id = opts.ledgerAccountId;
38241
+ if (opts.invoiceLineItemId !== void 0)
38242
+ args.invoice_line_item_id = opts.invoiceLineItemId;
38243
+ if (opts.type !== void 0)
38244
+ args.type = opts.type;
38245
+ if (opts.invoicingEntityId !== void 0)
38246
+ args.invoicing_entity_id = opts.invoicingEntityId;
38247
+ if (opts.entryStatus !== void 0)
38248
+ args.entry_status = opts.entryStatus;
38249
+ if (opts.customerId !== void 0)
38250
+ args.customer_id = opts.customerId;
38251
+ if (opts.search !== void 0)
38252
+ args.search = opts.search;
38253
+ if (opts.take !== void 0)
38254
+ args.take = Number(opts.take);
38255
+ if (opts.skip !== void 0)
38256
+ args.skip = Number(opts.skip);
38257
+ if (opts.year !== void 0)
38258
+ args.year = Number(opts.year);
38259
+ if (opts.quarter !== void 0)
38260
+ args.quarter = Number(opts.quarter);
38261
+ await ctx.execute({
38262
+ method: "GET",
38263
+ path: "/v1/accounting/journal-entry-lines",
38264
+ args,
38265
+ queryParamKeys: [
38266
+ "take",
38267
+ "skip",
38268
+ "entry_id",
38269
+ "ledger_account_id",
38270
+ "invoice_line_item_id",
38271
+ "type",
38272
+ "invoicing_entity_id",
38273
+ "entry_status",
38274
+ "customer_id",
38275
+ "search",
38276
+ "year",
38277
+ "quarter"
38278
+ ]
38279
+ });
38280
+ });
38281
+ }
38282
+
38283
+ // build/commands/generated/accounting-ledgers.js
38284
+ function registerAccounting_LedgersCommands(parent) {
38285
+ const resource = parent.command("accounting-ledgers").description("Manage accounting > ledgers");
38286
+ resource.command("list-ledgers").description(`List accounting ledgers for the authenticated client.`).option("--invoicing-entity-id <value>", `Filter by invoicing entity identifier.`).addHelpText("after", `
38287
+ Examples:
38288
+ hyperline accounting-ledgers list-ledgers
38289
+ hyperline accounting-ledgers list-ledgers --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
38290
+ const ctx = resource.parent?.opts()._ctx;
38291
+ if (!ctx) {
38292
+ process.stderr.write("Error: Not authenticated\n");
38293
+ process.exit(1);
38294
+ }
38295
+ const args = {};
38296
+ if (opts.invoicingEntityId !== void 0)
38297
+ args.invoicing_entity_id = opts.invoicingEntityId;
38298
+ await ctx.execute({
38299
+ method: "GET",
38300
+ path: "/v1/accounting/ledgers",
38301
+ args,
38302
+ queryParamKeys: ["invoicing_entity_id"]
38303
+ });
38304
+ });
38305
+ resource.command("get-ledger").description(`Retrieve an accounting ledger by its identifier.`).requiredOption("--id <value>", `id parameter`).option("--invoicing-entity-id <value>", `Require the ledger to belong to this invoicing entity.`).addHelpText("after", `
38306
+ Examples:
38307
+ hyperline accounting-ledgers get-ledger --id <id>
38308
+ hyperline accounting-ledgers get-ledger --id <id> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
38309
+ const ctx = resource.parent?.opts()._ctx;
38310
+ if (!ctx) {
38311
+ process.stderr.write("Error: Not authenticated\n");
38312
+ process.exit(1);
38313
+ }
38314
+ const args = {};
38315
+ if (opts.id !== void 0)
38316
+ args.id = opts.id;
38317
+ if (opts.invoicingEntityId !== void 0)
38318
+ args.invoicing_entity_id = opts.invoicingEntityId;
38319
+ await ctx.execute({
38320
+ method: "GET",
38321
+ path: "/v1/accounting/ledgers/{id}",
38322
+ args,
38323
+ queryParamKeys: ["invoicing_entity_id"]
38324
+ });
38325
+ });
38326
+ resource.command("create-ledger").description(`Create an accounting ledger for an invoicing entity.`).requiredOption("--invoicing-entity-id <value>", `Identifier of the invoicing entity that owns the ledger.`).requiredOption("--name <value>", `Display name of the ledger.`).requiredOption("--code <value>", `Optional accounting code of the ledger.`).requiredOption("--description <value>", `Optional description of the ledger.`).requiredOption("--type <value>", `Type of ledger.`).requiredOption("--currency <value>", `ISO 4217 currency used by the ledger.`).requiredOption("--entry-number-pattern <value>", `Entry numbering pattern containing \`{number}\`.`).requiredOption("--is-primary", `Whether this is the primary ledger for the invoicing entity.`).requiredOption("--is-inactive", `Whether the ledger is inactive.`).addHelpText("after", `
38327
+ Examples:
38328
+ hyperline accounting-ledgers create-ledger --invoicing-entity-id <invoicing_entity_id> --name <name> --code <code> --description <description> --type <type> --currency <currency> --entry-number-pattern <entry_number_pattern> --is-primary --is-inactive
38329
+ hyperline accounting-ledgers create-ledger --invoicing-entity-id <invoicing_entity_id> --name <name> --code <code> --description <description> --type <type> --currency <currency> --entry-number-pattern <entry_number_pattern> --is-primary --is-inactive --output json`).action(async (opts) => {
38330
+ const ctx = resource.parent?.opts()._ctx;
38331
+ if (!ctx) {
38332
+ process.stderr.write("Error: Not authenticated\n");
38333
+ process.exit(1);
38334
+ }
38335
+ const args = {};
38336
+ if (opts.invoicingEntityId !== void 0)
38337
+ args.invoicing_entity_id = opts.invoicingEntityId;
38338
+ if (opts.name !== void 0)
38339
+ args.name = opts.name;
38340
+ if (opts.code !== void 0)
38341
+ args.code = opts.code;
38342
+ if (opts.description !== void 0)
38343
+ args.description = opts.description;
38344
+ if (opts.type !== void 0)
38345
+ args.type = opts.type;
38346
+ if (opts.currency !== void 0)
38347
+ args.currency = opts.currency;
38348
+ if (opts.entryNumberPattern !== void 0)
38349
+ args.entry_number_pattern = opts.entryNumberPattern;
38350
+ if (opts.isPrimary !== void 0)
38351
+ args.is_primary = true;
38352
+ if (opts.isInactive !== void 0)
38353
+ args.is_inactive = true;
38354
+ await ctx.execute({
38355
+ method: "POST",
38356
+ path: "/v1/accounting/ledgers",
38357
+ args,
38358
+ queryParamKeys: []
38359
+ });
38360
+ });
38361
+ resource.command("update-ledger").description(`Update an existing accounting ledger.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Display name of the ledger.`).option("--code <value>", `Optional accounting code of the ledger.`).option("--description <value>", `Optional description of the ledger.`).option("--type <value>", `Type of ledger.`).option("--currency <value>", `ISO 4217 currency used by the ledger.`).option("--entry-number-pattern <value>", `Entry numbering pattern containing \`{number}\`.`).option("--next-entry-number <number>", `Next sequence number assigned to an entry.`).addHelpText("after", `
38362
+ Examples:
38363
+ hyperline accounting-ledgers update-ledger --id <id>
38364
+ hyperline accounting-ledgers update-ledger --id <id> --name <name> --code <code>
38365
+ hyperline accounting-ledgers update-ledger --id <id> --output json`).action(async (opts) => {
38366
+ const ctx = resource.parent?.opts()._ctx;
38367
+ if (!ctx) {
38368
+ process.stderr.write("Error: Not authenticated\n");
38369
+ process.exit(1);
38370
+ }
38371
+ const args = {};
38372
+ if (opts.id !== void 0)
38373
+ args.id = opts.id;
38374
+ if (opts.name !== void 0)
38375
+ args.name = opts.name;
38376
+ if (opts.code !== void 0)
38377
+ args.code = opts.code;
38378
+ if (opts.description !== void 0)
38379
+ args.description = opts.description;
38380
+ if (opts.type !== void 0)
38381
+ args.type = opts.type;
38382
+ if (opts.currency !== void 0)
38383
+ args.currency = opts.currency;
38384
+ if (opts.entryNumberPattern !== void 0)
38385
+ args.entry_number_pattern = opts.entryNumberPattern;
38386
+ if (opts.nextEntryNumber !== void 0)
38387
+ args.next_entry_number = Number(opts.nextEntryNumber);
38388
+ await ctx.execute({
38389
+ method: "PUT",
38390
+ path: "/v1/accounting/ledgers/{id}",
38391
+ args,
38392
+ queryParamKeys: []
38393
+ });
38394
+ });
38395
+ resource.command("delete-ledger").description(`Delete an unused accounting ledger.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
38396
+ Examples:
38397
+ hyperline accounting-ledgers delete-ledger --id <id>
38398
+ hyperline accounting-ledgers delete-ledger --id <id> --output json`).action(async (opts) => {
38399
+ const ctx = resource.parent?.opts()._ctx;
38400
+ if (!ctx) {
38401
+ process.stderr.write("Error: Not authenticated\n");
38402
+ process.exit(1);
38403
+ }
38404
+ const args = {};
38405
+ if (opts.id !== void 0)
38406
+ args.id = opts.id;
38407
+ if (!opts.yes) {
38408
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
38409
+ if (!confirmed) {
38410
+ process.stdout.write("Aborted.\n");
38411
+ return;
38412
+ }
38413
+ }
38414
+ await ctx.execute({
38415
+ method: "DELETE",
38416
+ path: "/v1/accounting/ledgers/{id}",
38417
+ args,
38418
+ queryParamKeys: []
38419
+ });
38420
+ });
38421
+ }
38422
+
38423
+ // build/commands/generated/accounting-reports.js
38424
+ function registerAccounting_ReportsCommands(parent) {
38425
+ const resource = parent.command("accounting-reports").description("Manage accounting > reports");
38426
+ resource.command("create-income-statement-export").description(`Queue an XLSX income-statement export for a ledger and inclusive period.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--period-from <value>", `First inclusive reporting date.`).requiredOption("--period-to <value>", `Last inclusive reporting date.`).option("--invoicing-entity-id <value>", `Optional invoicing entity identifier.`).option("--status <value>", `Journal-entry status scope; defaults to posted.`).option("--include-reversed", `Whether reversed entries are included.`).addHelpText("after", `
38427
+ Examples:
38428
+ hyperline accounting-reports create-income-statement-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to>
38429
+ hyperline accounting-reports create-income-statement-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to> --invoicing-entity-id <invoicing_entity_id> --status <status>
38430
+ hyperline accounting-reports create-income-statement-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to> --output json`).action(async (opts) => {
38431
+ const ctx = resource.parent?.opts()._ctx;
38432
+ if (!ctx) {
38433
+ process.stderr.write("Error: Not authenticated\n");
38434
+ process.exit(1);
38435
+ }
38436
+ const args = {};
38437
+ if (opts.ledgerId !== void 0)
38438
+ args.ledger_id = opts.ledgerId;
38439
+ if (opts.periodFrom !== void 0)
38440
+ args.period_from = opts.periodFrom;
38441
+ if (opts.periodTo !== void 0)
38442
+ args.period_to = opts.periodTo;
38443
+ if (opts.invoicingEntityId !== void 0)
38444
+ args.invoicing_entity_id = opts.invoicingEntityId;
38445
+ if (opts.status !== void 0)
38446
+ args.status = opts.status;
38447
+ if (opts.includeReversed !== void 0)
38448
+ args.include_reversed = true;
38449
+ await ctx.execute({
38450
+ method: "POST",
38451
+ path: "/v1/accounting/income-statement/export",
38452
+ args,
38453
+ queryParamKeys: []
38454
+ });
38455
+ });
38456
+ resource.command("create-general-ledger-export").description(`Queue an XLSX general-ledger export for a ledger and inclusive period.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--period-from <value>", `First inclusive reporting date.`).requiredOption("--period-to <value>", `Last inclusive reporting date.`).option("--invoicing-entity-id <value>", `Optional invoicing entity identifier.`).option("--status <value>", `Journal-entry status scope; defaults to posted.`).option("--include-reversed", `Whether reversed entries are included.`).option("--account-ids <json>", `Optional ledger-account identifiers.`).option("--account-types <json>", `Optional ledger-account types.`).addHelpText("after", `
38457
+ Examples:
38458
+ hyperline accounting-reports create-general-ledger-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to>
38459
+ hyperline accounting-reports create-general-ledger-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to> --invoicing-entity-id <invoicing_entity_id> --status <status>
38460
+ hyperline accounting-reports create-general-ledger-export --ledger-id <ledger_id> --period-from <period_from> --period-to <period_to> --output json`).action(async (opts) => {
38461
+ const ctx = resource.parent?.opts()._ctx;
38462
+ if (!ctx) {
38463
+ process.stderr.write("Error: Not authenticated\n");
38464
+ process.exit(1);
38465
+ }
38466
+ const args = {};
38467
+ if (opts.ledgerId !== void 0)
38468
+ args.ledger_id = opts.ledgerId;
38469
+ if (opts.periodFrom !== void 0)
38470
+ args.period_from = opts.periodFrom;
38471
+ if (opts.periodTo !== void 0)
38472
+ args.period_to = opts.periodTo;
38473
+ if (opts.invoicingEntityId !== void 0)
38474
+ args.invoicing_entity_id = opts.invoicingEntityId;
38475
+ if (opts.status !== void 0)
38476
+ args.status = opts.status;
38477
+ if (opts.includeReversed !== void 0)
38478
+ args.include_reversed = true;
38479
+ if (opts.accountIds !== void 0)
38480
+ args.account_ids = JSON.parse(opts.accountIds);
38481
+ if (opts.accountTypes !== void 0)
38482
+ args.account_types = JSON.parse(opts.accountTypes);
38483
+ await ctx.execute({
38484
+ method: "POST",
38485
+ path: "/v1/accounting/general-ledger/export",
38486
+ args,
38487
+ queryParamKeys: []
38488
+ });
38489
+ });
38490
+ }
38491
+
38492
+ // build/commands/generated/accounting-revenue-recognition.js
38493
+ function registerAccounting_Revenue_RecognitionCommands(parent) {
38494
+ const resource = parent.command("accounting-revenue-recognition").description("Manage accounting > revenue recognition");
38495
+ resource.command("get-rev-rec-waterfall").description(`Aggregate revenue-recognition schedules into a booked-by-recognition month matrix.`).option("--ledger-id <value>", `Ledger identifier.`).option("--year <number>", `Booked calendar year.`).option("--customer-id.in <value>", `Comma-separated customer identifiers.`).option("--product-id.in <value>", `Comma-separated product identifiers.`).option("--search <value>", `Search customer, product, invoice, or schedule data.`).addHelpText("after", `
38496
+ Examples:
38497
+ hyperline accounting-revenue-recognition get-rev-rec-waterfall
38498
+ hyperline accounting-revenue-recognition get-rev-rec-waterfall --ledger-id <ledger_id> --year <year>`).action(async (opts) => {
38499
+ const ctx = resource.parent?.opts()._ctx;
38500
+ if (!ctx) {
38501
+ process.stderr.write("Error: Not authenticated\n");
38502
+ process.exit(1);
38503
+ }
38504
+ const args = {};
38505
+ if (opts.ledgerId !== void 0)
38506
+ args.ledger_id = opts.ledgerId;
38507
+ if (opts["customerId.in"] !== void 0)
38508
+ args.customer_id__in = opts["customerId.in"];
38509
+ if (opts["productId.in"] !== void 0)
38510
+ args.product_id__in = opts["productId.in"];
38511
+ if (opts.search !== void 0)
38512
+ args.search = opts.search;
38513
+ if (opts.year !== void 0)
38514
+ args.year = Number(opts.year);
38515
+ await ctx.execute({
38516
+ method: "GET",
38517
+ path: "/v1/accounting/revrec/waterfall",
38518
+ args,
38519
+ queryParamKeys: [
38520
+ "ledger_id",
38521
+ "year",
38522
+ "customer_id__in",
38523
+ "product_id__in",
38524
+ "search"
38525
+ ]
38526
+ });
38527
+ });
38528
+ resource.command("get-rev-rec-waterfall-cell").description(`List the schedules and slices contributing to a waterfall cell.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--ledger-id <value>", `Ledger identifier.`).option("--booked-month <value>", `Booked month formatted YYYY-MM; required if year is absent.`).option("--year <number>", `Booked year; required if booked_month is absent.`).option("--recognition-month <value>", `Recognition month formatted YYYY-MM.`).option("--cell-type <value>", `Waterfall cell category.`).option("--status <value>", `Recognition status filter.`).option("--customer-id.in <value>", `Comma-separated customer identifiers.`).option("--product-id.in <value>", `Comma-separated product identifiers.`).option("--search <value>", `Search customer, product, invoice, or schedule data.`).addHelpText("after", `
38529
+ Examples:
38530
+ hyperline accounting-revenue-recognition get-rev-rec-waterfall-cell
38531
+ hyperline accounting-revenue-recognition get-rev-rec-waterfall-cell --take <take> --ledger-id <ledger_id>`).action(async (opts) => {
38532
+ const ctx = resource.parent?.opts()._ctx;
38533
+ if (!ctx) {
38534
+ process.stderr.write("Error: Not authenticated\n");
38535
+ process.exit(1);
38536
+ }
38537
+ const args = {};
38538
+ if (opts.ledgerId !== void 0)
38539
+ args.ledger_id = opts.ledgerId;
38540
+ if (opts.bookedMonth !== void 0)
38541
+ args.booked_month = opts.bookedMonth;
38542
+ if (opts.recognitionMonth !== void 0)
38543
+ args.recognition_month = opts.recognitionMonth;
38544
+ if (opts.cellType !== void 0)
38545
+ args.cell_type = opts.cellType;
38546
+ if (opts.status !== void 0)
38547
+ args.status = opts.status;
38548
+ if (opts["customerId.in"] !== void 0)
38549
+ args.customer_id__in = opts["customerId.in"];
38550
+ if (opts["productId.in"] !== void 0)
38551
+ args.product_id__in = opts["productId.in"];
38552
+ if (opts.search !== void 0)
38553
+ args.search = opts.search;
38554
+ if (opts.take !== void 0)
38555
+ args.take = Number(opts.take);
38556
+ if (opts.skip !== void 0)
38557
+ args.skip = Number(opts.skip);
38558
+ if (opts.year !== void 0)
38559
+ args.year = Number(opts.year);
38560
+ await ctx.execute({
38561
+ method: "GET",
38562
+ path: "/v1/accounting/revrec/waterfall/cell",
38563
+ args,
38564
+ queryParamKeys: [
38565
+ "take",
38566
+ "skip",
38567
+ "ledger_id",
38568
+ "booked_month",
38569
+ "year",
38570
+ "recognition_month",
38571
+ "cell_type",
38572
+ "status",
38573
+ "customer_id__in",
38574
+ "product_id__in",
38575
+ "search"
38576
+ ]
38577
+ });
38578
+ });
38579
+ resource.command("create-rev-rec-waterfall-export").description(`Queue an XLSX waterfall export for a ledger and year.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--year <number>", `Booked calendar year included in the export.`).addHelpText("after", `
38580
+ Examples:
38581
+ hyperline accounting-revenue-recognition create-rev-rec-waterfall-export --ledger-id <ledger_id> --year <year>
38582
+ hyperline accounting-revenue-recognition create-rev-rec-waterfall-export --ledger-id <ledger_id> --year <year> --output json`).action(async (opts) => {
38583
+ const ctx = resource.parent?.opts()._ctx;
38584
+ if (!ctx) {
38585
+ process.stderr.write("Error: Not authenticated\n");
38586
+ process.exit(1);
38587
+ }
38588
+ const args = {};
38589
+ if (opts.ledgerId !== void 0)
38590
+ args.ledger_id = opts.ledgerId;
38591
+ if (opts.year !== void 0)
38592
+ args.year = Number(opts.year);
38593
+ await ctx.execute({
38594
+ method: "POST",
38595
+ path: "/v1/accounting/revrec/waterfall/export",
38596
+ args,
38597
+ queryParamKeys: []
38598
+ });
38599
+ });
38600
+ resource.command("create-rev-rec-recognized-summary-export").description(`Queue an XLSX or CSV summary of recognized revenue for a month range.`).requiredOption("--ledger-id <value>", `Ledger identifier.`).requiredOption("--month-from <value>", `First recognition month included, formatted YYYY-MM.`).requiredOption("--month-to <value>", `Last recognition month included, formatted YYYY-MM.`).option("--file-type <value>", `Export file type; defaults to xlsx.`).addHelpText("after", `
38601
+ Examples:
38602
+ hyperline accounting-revenue-recognition create-rev-rec-recognized-summary-export --ledger-id <ledger_id> --month-from <month_from> --month-to <month_to>
38603
+ hyperline accounting-revenue-recognition create-rev-rec-recognized-summary-export --ledger-id <ledger_id> --month-from <month_from> --month-to <month_to> --file-type <file_type>
38604
+ hyperline accounting-revenue-recognition create-rev-rec-recognized-summary-export --ledger-id <ledger_id> --month-from <month_from> --month-to <month_to> --output json`).action(async (opts) => {
38605
+ const ctx = resource.parent?.opts()._ctx;
38606
+ if (!ctx) {
38607
+ process.stderr.write("Error: Not authenticated\n");
38608
+ process.exit(1);
38609
+ }
38610
+ const args = {};
38611
+ if (opts.ledgerId !== void 0)
38612
+ args.ledger_id = opts.ledgerId;
38613
+ if (opts.monthFrom !== void 0)
38614
+ args.month_from = opts.monthFrom;
38615
+ if (opts.monthTo !== void 0)
38616
+ args.month_to = opts.monthTo;
38617
+ if (opts.fileType !== void 0)
38618
+ args.file_type = opts.fileType;
38619
+ await ctx.execute({
38620
+ method: "POST",
38621
+ path: "/v1/accounting/revrec/recognized-summary/export",
38622
+ args,
38623
+ queryParamKeys: []
38624
+ });
38625
+ });
38626
+ resource.command("get-unbilled-revenue").description(`Get revenue accrued on a subscription's current open invoice.`).option("--subscription-id <value>", `Subscription identifier.`).addHelpText("after", `
38627
+ Examples:
38628
+ hyperline accounting-revenue-recognition get-unbilled-revenue
38629
+ hyperline accounting-revenue-recognition get-unbilled-revenue --subscription-id <subscription_id>`).action(async (opts) => {
38630
+ const ctx = resource.parent?.opts()._ctx;
38631
+ if (!ctx) {
38632
+ process.stderr.write("Error: Not authenticated\n");
38633
+ process.exit(1);
38634
+ }
38635
+ const args = {};
38636
+ if (opts.subscriptionId !== void 0)
38637
+ args.subscription_id = opts.subscriptionId;
38638
+ await ctx.execute({
38639
+ method: "GET",
38640
+ path: "/v1/accounting/revrec/unbilled",
38641
+ args,
38642
+ queryParamKeys: ["subscription_id"]
38643
+ });
38644
+ });
38645
+ resource.command("list-rev-rec-schedules").description(`List revenue-recognition schedules with embedded slices.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--invoicing-entity-id <value>", `Filter by invoicing entity identifier.`).option("--invoice-id <value>", `Filter by invoice identifier.`).addHelpText("after", `
38646
+ Examples:
38647
+ hyperline accounting-revenue-recognition list-rev-rec-schedules
38648
+ hyperline accounting-revenue-recognition list-rev-rec-schedules --take <take> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
38649
+ const ctx = resource.parent?.opts()._ctx;
38650
+ if (!ctx) {
38651
+ process.stderr.write("Error: Not authenticated\n");
38652
+ process.exit(1);
38653
+ }
38654
+ const args = {};
38655
+ if (opts.invoicingEntityId !== void 0)
38656
+ args.invoicing_entity_id = opts.invoicingEntityId;
38657
+ if (opts.invoiceId !== void 0)
38658
+ args.invoice_id = opts.invoiceId;
38659
+ if (opts.take !== void 0)
38660
+ args.take = Number(opts.take);
38661
+ if (opts.skip !== void 0)
38662
+ args.skip = Number(opts.skip);
38663
+ await ctx.execute({
38664
+ method: "GET",
38665
+ path: "/v1/accounting/revrec/schedules",
38666
+ args,
38667
+ queryParamKeys: ["take", "skip", "invoicing_entity_id", "invoice_id"]
38668
+ });
38669
+ });
38670
+ resource.command("get-rev-rec-schedule").description(`Retrieve a revenue-recognition schedule with its slices.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38671
+ Examples:
38672
+ hyperline accounting-revenue-recognition get-rev-rec-schedule --id <id>`).action(async (opts) => {
38673
+ const ctx = resource.parent?.opts()._ctx;
38674
+ if (!ctx) {
38675
+ process.stderr.write("Error: Not authenticated\n");
38676
+ process.exit(1);
38677
+ }
38678
+ const args = {};
38679
+ if (opts.id !== void 0)
38680
+ args.id = opts.id;
38681
+ await ctx.execute({
38682
+ method: "GET",
38683
+ path: "/v1/accounting/revrec/schedules/{id}",
38684
+ args,
38685
+ queryParamKeys: []
38686
+ });
38687
+ });
38688
+ resource.command("list-rev-rec-schedule-adjustments").description(`List the audit trail for manual schedule adjustments.`).requiredOption("--schedule-id <value>", `schedule_id parameter`).addHelpText("after", `
38689
+ Examples:
38690
+ hyperline accounting-revenue-recognition list-rev-rec-schedule-adjustments --schedule-id <schedule_id>`).action(async (opts) => {
38691
+ const ctx = resource.parent?.opts()._ctx;
38692
+ if (!ctx) {
38693
+ process.stderr.write("Error: Not authenticated\n");
38694
+ process.exit(1);
38695
+ }
38696
+ const args = {};
38697
+ if (opts.scheduleId !== void 0)
38698
+ args.schedule_id = opts.scheduleId;
38699
+ await ctx.execute({
38700
+ method: "GET",
38701
+ path: "/v1/accounting/revrec/schedules/{schedule_id}/adjustments",
38702
+ args,
38703
+ queryParamKeys: []
38704
+ });
38705
+ });
38706
+ resource.command("reshape-rev-rec-schedule").description(`Recognize an amount now and optionally spread the remainder over a new window.`).requiredOption("--schedule-id <value>", `schedule_id parameter`).requiredOption("--recognize-now-amount <value>", `Amount to recognize immediately in ledger currency.`).option("--window <json>", `Window over which to spread the remaining amount.`).requiredOption("--reason-code <value>", `Stable reason code for the adjustment.`).option("--reason-detail <value>", `Required explanation when reason_code is \`other\`.`).addHelpText("after", `
38707
+ Examples:
38708
+ hyperline accounting-revenue-recognition reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount> --reason-code <reason_code>
38709
+ hyperline accounting-revenue-recognition reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount> --reason-code <reason_code> --window <window> --reason-detail <reason_detail>
38710
+ hyperline accounting-revenue-recognition reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount> --reason-code <reason_code> --output json`).action(async (opts) => {
38711
+ const ctx = resource.parent?.opts()._ctx;
38712
+ if (!ctx) {
38713
+ process.stderr.write("Error: Not authenticated\n");
38714
+ process.exit(1);
38715
+ }
38716
+ const args = {};
38717
+ if (opts.scheduleId !== void 0)
38718
+ args.schedule_id = opts.scheduleId;
38719
+ if (opts.recognizeNowAmount !== void 0)
38720
+ args.recognize_now_amount = opts.recognizeNowAmount;
38721
+ if (opts.reasonCode !== void 0)
38722
+ args.reason_code = opts.reasonCode;
38723
+ if (opts.reasonDetail !== void 0)
38724
+ args.reason_detail = opts.reasonDetail;
38725
+ if (opts.window !== void 0)
38726
+ args.window = JSON.parse(opts.window);
38727
+ await ctx.execute({
38728
+ method: "POST",
38729
+ path: "/v1/accounting/revrec/schedules/{schedule_id}/reshape",
38730
+ args,
38731
+ queryParamKeys: []
38732
+ });
38733
+ });
38734
+ resource.command("preview-reshape-rev-rec-schedule").description(`Preview the exact reshape plan without writing data.`).requiredOption("--schedule-id <value>", `schedule_id parameter`).requiredOption("--recognize-now-amount <value>", `Amount to recognize immediately in ledger currency.`).option("--window <json>", `Window over which to spread the remaining amount.`).addHelpText("after", `
38735
+ Examples:
38736
+ hyperline accounting-revenue-recognition preview-reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount>
38737
+ hyperline accounting-revenue-recognition preview-reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount> --window <window>
38738
+ hyperline accounting-revenue-recognition preview-reshape-rev-rec-schedule --schedule-id <schedule_id> --recognize-now-amount <recognize_now_amount> --output json`).action(async (opts) => {
38739
+ const ctx = resource.parent?.opts()._ctx;
38740
+ if (!ctx) {
38741
+ process.stderr.write("Error: Not authenticated\n");
38742
+ process.exit(1);
38743
+ }
38744
+ const args = {};
38745
+ if (opts.scheduleId !== void 0)
38746
+ args.schedule_id = opts.scheduleId;
38747
+ if (opts.recognizeNowAmount !== void 0)
38748
+ args.recognize_now_amount = opts.recognizeNowAmount;
38749
+ if (opts.window !== void 0)
38750
+ args.window = JSON.parse(opts.window);
38751
+ await ctx.execute({
38752
+ method: "POST",
38753
+ path: "/v1/accounting/revrec/schedules/{schedule_id}/reshape/preview",
38754
+ args,
38755
+ queryParamKeys: []
38756
+ });
38757
+ });
38758
+ resource.command("get-rev-rec-slice").description(`Retrieve a tenant-scoped revenue-recognition slice.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38759
+ Examples:
38760
+ hyperline accounting-revenue-recognition get-rev-rec-slice --id <id>`).action(async (opts) => {
38761
+ const ctx = resource.parent?.opts()._ctx;
38762
+ if (!ctx) {
38763
+ process.stderr.write("Error: Not authenticated\n");
38764
+ process.exit(1);
38765
+ }
38766
+ const args = {};
38767
+ if (opts.id !== void 0)
38768
+ args.id = opts.id;
38769
+ await ctx.execute({
38770
+ method: "GET",
38771
+ path: "/v1/accounting/revrec/slices/{id}",
38772
+ args,
38773
+ queryParamKeys: []
38774
+ });
38775
+ });
38776
+ }
38777
+
38778
+ // build/commands/generated/accounting-rules.js
38779
+ function registerAccounting_RulesCommands(parent) {
38780
+ const resource = parent.command("accounting-rules").description("Manage accounting > rules");
38781
+ resource.command("list").description(`Retrieve existing accounting rules with optional filtering.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--ledger-id <value>", `ledger_id`).option("--ledger-id.not <value>", `ledger_id__not`).option("--ledger-id.is-null <value>", `ledger_id__isNull`).option("--ledger-id.is-not-null <value>", `ledger_id__isNotNull`).option("--ledger-id.equals <value>", `ledger_id__equals`).option("--ledger-id.contains <value>", `ledger_id__contains`).option("--ledger-id.starts-with <value>", `ledger_id__startsWith`).option("--ledger-id.end-with <value>", `ledger_id__endWith`).option("--category <value>", `category`).option("--category.not <value>", `category__not`).option("--category.is-null <value>", `category__isNull`).option("--category.is-not-null <value>", `category__isNotNull`).option("--category.equals <value>", `category__equals`).option("--category.contains <value>", `category__contains`).option("--category.starts-with <value>", `category__startsWith`).option("--category.end-with <value>", `category__endWith`).addHelpText("after", `
38782
+ Examples:
38783
+ hyperline accounting-rules list
38784
+ hyperline accounting-rules list --take <take> --ledger-id <ledger_id>`).action(async (opts) => {
38785
+ const ctx = resource.parent?.opts()._ctx;
38786
+ if (!ctx) {
38787
+ process.stderr.write("Error: Not authenticated\n");
38788
+ process.exit(1);
38789
+ }
38790
+ const args = {};
38791
+ if (opts.ledgerId !== void 0)
38792
+ args.ledger_id = opts.ledgerId;
38793
+ if (opts["ledgerId.not"] !== void 0)
38794
+ args.ledger_id__not = opts["ledgerId.not"];
38795
+ if (opts["ledgerId.isNull"] !== void 0)
38796
+ args.ledger_id__isNull = opts["ledgerId.isNull"];
38797
+ if (opts["ledgerId.isNotNull"] !== void 0)
38798
+ args.ledger_id__isNotNull = opts["ledgerId.isNotNull"];
38799
+ if (opts["ledgerId.equals"] !== void 0)
38800
+ args.ledger_id__equals = opts["ledgerId.equals"];
38801
+ if (opts["ledgerId.contains"] !== void 0)
38802
+ args.ledger_id__contains = opts["ledgerId.contains"];
38803
+ if (opts["ledgerId.startsWith"] !== void 0)
38804
+ args.ledger_id__startsWith = opts["ledgerId.startsWith"];
38805
+ if (opts["ledgerId.endWith"] !== void 0)
38806
+ args.ledger_id__endWith = opts["ledgerId.endWith"];
38807
+ if (opts.category !== void 0)
38808
+ args.category = opts.category;
38809
+ if (opts["category.not"] !== void 0)
38810
+ args.category__not = opts["category.not"];
38811
+ if (opts["category.isNull"] !== void 0)
38812
+ args.category__isNull = opts["category.isNull"];
38813
+ if (opts["category.isNotNull"] !== void 0)
38814
+ args.category__isNotNull = opts["category.isNotNull"];
38815
+ if (opts["category.equals"] !== void 0)
38816
+ args.category__equals = opts["category.equals"];
38817
+ if (opts["category.contains"] !== void 0)
38818
+ args.category__contains = opts["category.contains"];
38819
+ if (opts["category.startsWith"] !== void 0)
38820
+ args.category__startsWith = opts["category.startsWith"];
38821
+ if (opts["category.endWith"] !== void 0)
38822
+ args.category__endWith = opts["category.endWith"];
38823
+ if (opts.take !== void 0)
38824
+ args.take = Number(opts.take);
38825
+ if (opts.skip !== void 0)
38826
+ args.skip = Number(opts.skip);
38827
+ await ctx.execute({
38828
+ method: "GET",
38829
+ path: "/v1/accounting/rules",
38830
+ args,
38831
+ queryParamKeys: [
38832
+ "take",
38833
+ "skip",
38834
+ "ledger_id",
38835
+ "ledger_id__not",
38836
+ "ledger_id__isNull",
38837
+ "ledger_id__isNotNull",
38838
+ "ledger_id__equals",
38839
+ "ledger_id__contains",
38840
+ "ledger_id__startsWith",
38841
+ "ledger_id__endWith",
38842
+ "category",
38843
+ "category__not",
38844
+ "category__isNull",
38845
+ "category__isNotNull",
38846
+ "category__equals",
38847
+ "category__contains",
38848
+ "category__startsWith",
38849
+ "category__endWith"
38850
+ ]
38851
+ });
38852
+ });
38853
+ resource.command("get-accounting-rule-tree").description(`Retrieve accounting rules organized as a filter tree.`).option("--ledger-id <value>", `Ledger identifier.`).option("--invoicing-entity-id <value>", `Optional invoicing entity identifier.`).option("--max-depth <number>", `Maximum tree depth to return.`).option("--search <value>", `Search by rule identifier or category.`).addHelpText("after", `
38854
+ Examples:
38855
+ hyperline accounting-rules get-accounting-rule-tree
38856
+ hyperline accounting-rules get-accounting-rule-tree --ledger-id <ledger_id> --invoicing-entity-id <invoicing_entity_id>`).action(async (opts) => {
38857
+ const ctx = resource.parent?.opts()._ctx;
38858
+ if (!ctx) {
38859
+ process.stderr.write("Error: Not authenticated\n");
38860
+ process.exit(1);
38861
+ }
38862
+ const args = {};
38863
+ if (opts.ledgerId !== void 0)
38864
+ args.ledger_id = opts.ledgerId;
38865
+ if (opts.invoicingEntityId !== void 0)
38866
+ args.invoicing_entity_id = opts.invoicingEntityId;
38867
+ if (opts.search !== void 0)
38868
+ args.search = opts.search;
38869
+ if (opts.maxDepth !== void 0)
38870
+ args.max_depth = Number(opts.maxDepth);
38871
+ await ctx.execute({
38872
+ method: "GET",
38873
+ path: "/v1/accounting/rules/tree",
38874
+ args,
38875
+ queryParamKeys: [
38876
+ "ledger_id",
38877
+ "invoicing_entity_id",
38878
+ "max_depth",
38879
+ "search"
38880
+ ]
38881
+ });
38882
+ });
38883
+ resource.command("get-rule-defaults").description(`Preview default account values and priority for a new accounting rule.`).requiredOption("--ledger-id <value>", `Identifier of the ledger used to resolve defaults.`).requiredOption("--category <value>", `Category of the new accounting rule.`).option("--filters <json>", `Optional filters for the proposed rule.`).addHelpText("after", `
38884
+ Examples:
38885
+ hyperline accounting-rules get-rule-defaults --ledger-id <ledger_id> --category <category>
38886
+ hyperline accounting-rules get-rule-defaults --ledger-id <ledger_id> --category <category> --filters <filters>
38887
+ hyperline accounting-rules get-rule-defaults --ledger-id <ledger_id> --category <category> --output json`).action(async (opts) => {
38888
+ const ctx = resource.parent?.opts()._ctx;
38889
+ if (!ctx) {
38890
+ process.stderr.write("Error: Not authenticated\n");
38891
+ process.exit(1);
38892
+ }
38893
+ const args = {};
38894
+ if (opts.ledgerId !== void 0)
38895
+ args.ledger_id = opts.ledgerId;
38896
+ if (opts.category !== void 0)
38897
+ args.category = opts.category;
38898
+ if (opts.filters !== void 0)
38899
+ args.filters = JSON.parse(opts.filters);
38900
+ await ctx.execute({
38901
+ method: "POST",
38902
+ path: "/v1/accounting/rules/defaults",
38903
+ args,
38904
+ queryParamKeys: []
38905
+ });
38906
+ });
38907
+ resource.command("get").description(`Retrieve a single accounting rule by its identifier.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
38908
+ Examples:
38909
+ hyperline accounting-rules get --id <id>`).action(async (opts) => {
38910
+ const ctx = resource.parent?.opts()._ctx;
38911
+ if (!ctx) {
38912
+ process.stderr.write("Error: Not authenticated\n");
38913
+ process.exit(1);
38914
+ }
38915
+ const args = {};
38916
+ if (opts.id !== void 0)
38917
+ args.id = opts.id;
38918
+ await ctx.execute({
38919
+ method: "GET",
38920
+ path: "/v1/accounting/rules/{id}",
38921
+ args,
38922
+ queryParamKeys: []
38923
+ });
38924
+ });
38925
+ resource.command("create").description(`Create a new accounting rule for account code routing or journal posting.`).option("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).option("--name <value>", `Optional user-defined name for the rule.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).requiredOption("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
38926
+ Examples:
38927
+ hyperline accounting-rules create --category <category> --priority <priority>
38928
+ hyperline accounting-rules create --category <category> --priority <priority> --ledger-id <ledger_id> --name <name>
38929
+ hyperline accounting-rules create --category <category> --priority <priority> --output json`).action(async (opts) => {
38930
+ const ctx = resource.parent?.opts()._ctx;
38931
+ if (!ctx) {
38932
+ process.stderr.write("Error: Not authenticated\n");
38933
+ process.exit(1);
38934
+ }
38935
+ const args = {};
38936
+ if (opts.ledgerId !== void 0)
38937
+ args.ledger_id = opts.ledgerId;
38938
+ if (opts.name !== void 0)
38939
+ args.name = opts.name;
38940
+ if (opts.category !== void 0)
38941
+ args.category = opts.category;
38942
+ if (opts.intervalPeriod !== void 0)
38943
+ args.interval_period = opts.intervalPeriod;
38944
+ if (opts.revenueLedgerAccountId !== void 0)
38945
+ args.revenue_ledger_account_id = opts.revenueLedgerAccountId;
38946
+ if (opts.deferredRevenueLedgerAccountId !== void 0)
38947
+ args.deferred_revenue_ledger_account_id = opts.deferredRevenueLedgerAccountId;
38948
+ if (opts.deferredDiscountLedgerAccountId !== void 0)
38949
+ args.deferred_discount_ledger_account_id = opts.deferredDiscountLedgerAccountId;
38950
+ if (opts.contraRevenueLedgerAccountId !== void 0)
38951
+ args.contra_revenue_ledger_account_id = opts.contraRevenueLedgerAccountId;
38952
+ if (opts.discountLedgerAccountId !== void 0)
38953
+ args.discount_ledger_account_id = opts.discountLedgerAccountId;
38954
+ if (opts.arLedgerAccountId !== void 0)
38955
+ args.ar_ledger_account_id = opts.arLedgerAccountId;
38956
+ if (opts.cashLedgerAccountId !== void 0)
38957
+ args.cash_ledger_account_id = opts.cashLedgerAccountId;
38958
+ if (opts.paymentsClearingLedgerAccountId !== void 0)
38959
+ args.payments_clearing_ledger_account_id = opts.paymentsClearingLedgerAccountId;
38960
+ if (opts.outputTaxLedgerAccountId !== void 0)
38961
+ args.output_tax_ledger_account_id = opts.outputTaxLedgerAccountId;
38962
+ if (opts.uncollectibleDebitLedgerAccountId !== void 0)
38963
+ args.uncollectible_debit_ledger_account_id = opts.uncollectibleDebitLedgerAccountId;
38964
+ if (opts.customerCreditsLedgerAccountId !== void 0)
38965
+ args.customer_credits_ledger_account_id = opts.customerCreditsLedgerAccountId;
38966
+ if (opts.journalId !== void 0)
38967
+ args.journal_id = opts.journalId;
38968
+ if (opts.entityType !== void 0)
38969
+ args.entity_type = opts.entityType;
38970
+ if (opts.priority !== void 0)
38971
+ args.priority = Number(opts.priority);
38972
+ if (opts.intervalCount !== void 0)
38973
+ args.interval_count = Number(opts.intervalCount);
38974
+ if (opts.productIds !== void 0)
38975
+ args.product_ids = JSON.parse(opts.productIds);
38976
+ if (opts.productTypes !== void 0)
38977
+ args.product_types = JSON.parse(opts.productTypes);
38978
+ if (opts.customerIds !== void 0)
38979
+ args.customer_ids = JSON.parse(opts.customerIds);
38980
+ if (opts.currencies !== void 0)
38981
+ args.currencies = JSON.parse(opts.currencies);
38982
+ if (opts.countries !== void 0)
38983
+ args.countries = JSON.parse(opts.countries);
38984
+ if (opts.couponIds !== void 0)
38985
+ args.coupon_ids = JSON.parse(opts.couponIds);
38986
+ if (opts.clientProviderIds !== void 0)
38987
+ args.client_provider_ids = JSON.parse(opts.clientProviderIds);
38988
+ if (opts.paymentMethodTypes !== void 0)
38989
+ args.payment_method_types = JSON.parse(opts.paymentMethodTypes);
38990
+ await ctx.execute({
38991
+ method: "POST",
38992
+ path: "/v1/accounting/rules",
38993
+ args,
38994
+ queryParamKeys: []
38995
+ });
38996
+ });
38997
+ resource.command("update").description(`Update an existing accounting rule.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Optional user-defined name for the rule.`).option("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).option("--priority <number>", `Override order. Higher priority wins when multiple rules match.`).option("--product-ids <json>", `Product IDs to match. Empty means match all.`).option("--product-types <json>", `Product types to match. Allowed values: flat_fee, dynamic, seat, credit. Empty means match all.`).option("--customer-ids <json>", `Customer IDs for customer-specific overrides.`).option("--currencies <json>", `Currency codes to match (e.g. EUR, USD).`).option("--countries <json>", `Country codes for jurisdiction-based overrides.`).option("--coupon-ids <json>", `Coupon IDs to match. Empty means match all.`).option("--client-provider-ids <json>", `Client provider IDs to match. Empty means match all.`).option("--payment-method-types <json>", `Payment method types to match. Empty means match all.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).option("--revenue-ledger-account-id <value>", `Revenue ledger account ID used for invoice line revenue routing.`).option("--deferred-revenue-ledger-account-id <value>", `Deferred revenue ledger account ID used before revenue is recognized.`).option("--deferred-discount-ledger-account-id <value>", `Deferred discount ledger account ID used before discounts are recognized.`).option("--contra-revenue-ledger-account-id <value>", `Contra revenue ledger account ID used for amounts that reduce revenue.`).option("--discount-ledger-account-id <value>", `Discount ledger account ID used for recognized discounts.`).option("--ar-ledger-account-id <value>", `Accounts receivable ledger account ID used for invoice posting.`).option("--cash-ledger-account-id <value>", `Cash ledger account ID used for payment settlement.`).option("--payments-clearing-ledger-account-id <value>", `Payments clearing ledger account ID used while payments settle.`).option("--output-tax-ledger-account-id <value>", `Output tax ledger account ID used for tax liability.`).option("--uncollectible-debit-ledger-account-id <value>", `Ledger account ID debited when an invoice becomes uncollectible. Use an asset account for doubtful-receivable reclassification or an expense account for direct write-off.`).option("--customer-credits-ledger-account-id <value>", `Customer credits ledger account ID used for credit balances.`).option("--journal-id <value>", `Journal ID used to route entries in the accounting provider.`).option("--entity-type <value>", `Entity type the rule applies to.`).addHelpText("after", `
38998
+ Examples:
38999
+ hyperline accounting-rules update --id <id>
39000
+ hyperline accounting-rules update --id <id> --name <name> --category <category>
39001
+ hyperline accounting-rules update --id <id> --output json`).action(async (opts) => {
39002
+ const ctx = resource.parent?.opts()._ctx;
39003
+ if (!ctx) {
39004
+ process.stderr.write("Error: Not authenticated\n");
39005
+ process.exit(1);
39006
+ }
39007
+ const args = {};
39008
+ if (opts.id !== void 0)
39009
+ args.id = opts.id;
39010
+ if (opts.name !== void 0)
39011
+ args.name = opts.name;
39012
+ if (opts.category !== void 0)
39013
+ args.category = opts.category;
39014
+ if (opts.intervalPeriod !== void 0)
39015
+ args.interval_period = opts.intervalPeriod;
39016
+ if (opts.revenueLedgerAccountId !== void 0)
39017
+ args.revenue_ledger_account_id = opts.revenueLedgerAccountId;
39018
+ if (opts.deferredRevenueLedgerAccountId !== void 0)
39019
+ args.deferred_revenue_ledger_account_id = opts.deferredRevenueLedgerAccountId;
39020
+ if (opts.deferredDiscountLedgerAccountId !== void 0)
39021
+ args.deferred_discount_ledger_account_id = opts.deferredDiscountLedgerAccountId;
39022
+ if (opts.contraRevenueLedgerAccountId !== void 0)
39023
+ args.contra_revenue_ledger_account_id = opts.contraRevenueLedgerAccountId;
39024
+ if (opts.discountLedgerAccountId !== void 0)
39025
+ args.discount_ledger_account_id = opts.discountLedgerAccountId;
39026
+ if (opts.arLedgerAccountId !== void 0)
39027
+ args.ar_ledger_account_id = opts.arLedgerAccountId;
39028
+ if (opts.cashLedgerAccountId !== void 0)
39029
+ args.cash_ledger_account_id = opts.cashLedgerAccountId;
39030
+ if (opts.paymentsClearingLedgerAccountId !== void 0)
39031
+ args.payments_clearing_ledger_account_id = opts.paymentsClearingLedgerAccountId;
39032
+ if (opts.outputTaxLedgerAccountId !== void 0)
39033
+ args.output_tax_ledger_account_id = opts.outputTaxLedgerAccountId;
39034
+ if (opts.uncollectibleDebitLedgerAccountId !== void 0)
39035
+ args.uncollectible_debit_ledger_account_id = opts.uncollectibleDebitLedgerAccountId;
39036
+ if (opts.customerCreditsLedgerAccountId !== void 0)
39037
+ args.customer_credits_ledger_account_id = opts.customerCreditsLedgerAccountId;
39038
+ if (opts.journalId !== void 0)
39039
+ args.journal_id = opts.journalId;
39040
+ if (opts.entityType !== void 0)
39041
+ args.entity_type = opts.entityType;
39042
+ if (opts.priority !== void 0)
39043
+ args.priority = Number(opts.priority);
39044
+ if (opts.intervalCount !== void 0)
39045
+ args.interval_count = Number(opts.intervalCount);
39046
+ if (opts.productIds !== void 0)
39047
+ args.product_ids = JSON.parse(opts.productIds);
39048
+ if (opts.productTypes !== void 0)
39049
+ args.product_types = JSON.parse(opts.productTypes);
39050
+ if (opts.customerIds !== void 0)
39051
+ args.customer_ids = JSON.parse(opts.customerIds);
39052
+ if (opts.currencies !== void 0)
39053
+ args.currencies = JSON.parse(opts.currencies);
39054
+ if (opts.countries !== void 0)
39055
+ args.countries = JSON.parse(opts.countries);
39056
+ if (opts.couponIds !== void 0)
39057
+ args.coupon_ids = JSON.parse(opts.couponIds);
39058
+ if (opts.clientProviderIds !== void 0)
39059
+ args.client_provider_ids = JSON.parse(opts.clientProviderIds);
39060
+ if (opts.paymentMethodTypes !== void 0)
39061
+ args.payment_method_types = JSON.parse(opts.paymentMethodTypes);
39062
+ await ctx.execute({
39063
+ method: "PUT",
39064
+ path: "/v1/accounting/rules/{id}",
39065
+ args,
39066
+ queryParamKeys: []
39067
+ });
39068
+ });
39069
+ resource.command("delete").description(`Soft-delete an accounting rule.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
39070
+ Examples:
39071
+ hyperline accounting-rules delete --id <id>
39072
+ hyperline accounting-rules delete --id <id> --output json`).action(async (opts) => {
39073
+ const ctx = resource.parent?.opts()._ctx;
39074
+ if (!ctx) {
39075
+ process.stderr.write("Error: Not authenticated\n");
39076
+ process.exit(1);
39077
+ }
39078
+ const args = {};
39079
+ if (opts.id !== void 0)
39080
+ args.id = opts.id;
39081
+ if (!opts.yes) {
39082
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
39083
+ if (!confirmed) {
39084
+ process.stdout.write("Aborted.\n");
39085
+ return;
39086
+ }
39087
+ }
39088
+ await ctx.execute({
39089
+ method: "DELETE",
39090
+ path: "/v1/accounting/rules/{id}",
39091
+ args,
39092
+ queryParamKeys: []
39093
+ });
39094
+ });
39095
+ resource.command("resolve").description(`Preview which account codes would be resolved for a given context.`).requiredOption("--ledger-id <value>", `Identifier of the ledger this rule belongs to.`).requiredOption("--category <value>", `Rule category (e.g. accounting_software, invoice_posted).`).option("--product-id <value>", `Product ID to resolve against.`).option("--product-type <value>", `Product type to resolve against.`).option("--currency <value>", `Currency code to resolve against.`).option("--country <value>", `Country code to resolve against.`).option("--customer-id <value>", `Customer ID to resolve against.`).option("--interval-period <value>", `Billing interval period filter (month, year, etc.).`).option("--interval-count <number>", `Billing interval count filter.`).addHelpText("after", `
39096
+ Examples:
39097
+ hyperline accounting-rules resolve --ledger-id <ledger_id> --category <category>
39098
+ hyperline accounting-rules resolve --ledger-id <ledger_id> --category <category> --product-id <product_id> --product-type <product_type>
39099
+ hyperline accounting-rules resolve --ledger-id <ledger_id> --category <category> --output json`).action(async (opts) => {
39100
+ const ctx = resource.parent?.opts()._ctx;
39101
+ if (!ctx) {
39102
+ process.stderr.write("Error: Not authenticated\n");
39103
+ process.exit(1);
39104
+ }
39105
+ const args = {};
39106
+ if (opts.ledgerId !== void 0)
39107
+ args.ledger_id = opts.ledgerId;
39108
+ if (opts.category !== void 0)
39109
+ args.category = opts.category;
39110
+ if (opts.productId !== void 0)
39111
+ args.product_id = opts.productId;
39112
+ if (opts.productType !== void 0)
39113
+ args.product_type = opts.productType;
39114
+ if (opts.currency !== void 0)
39115
+ args.currency = opts.currency;
39116
+ if (opts.country !== void 0)
39117
+ args.country = opts.country;
39118
+ if (opts.customerId !== void 0)
39119
+ args.customer_id = opts.customerId;
39120
+ if (opts.intervalPeriod !== void 0)
39121
+ args.interval_period = opts.intervalPeriod;
39122
+ if (opts.intervalCount !== void 0)
39123
+ args.interval_count = Number(opts.intervalCount);
39124
+ await ctx.execute({
39125
+ method: "POST",
39126
+ path: "/v1/accounting/rules/resolve",
39127
+ args,
39128
+ queryParamKeys: []
39129
+ });
39130
+ });
39131
+ }
39132
+
37889
39133
  // build/commands/generated/analytics.js
37890
39134
  function registerAnalyticsCommands(parent) {
37891
39135
  const resource = parent.command("analytics").description("Manage analytics");
@@ -37998,7 +39242,7 @@ Examples:
37998
39242
  queryParamKeys: []
37999
39243
  });
38000
39244
  });
38001
- resource.command("create-company").description(`Create a new company. The authentication token will automatically get access to the newly created company.`).requiredOption("--name <value>", `Company name.`).requiredOption("--address <value>", `Address of the default invoicing entity`).addHelpText("after", `
39245
+ resource.command("create-company").description(`Create a new company. The authentication token will automatically get access to the newly created company.`).requiredOption("--name <value>", `Company name.`).requiredOption("--address <json>", `Address of the default invoicing entity`).addHelpText("after", `
38002
39246
  Examples:
38003
39247
  hyperline companies create-company --name <name> --address <address>
38004
39248
  hyperline companies create-company --name <name> --address <address> --output json`).action(async (opts) => {
@@ -38011,7 +39255,7 @@ Examples:
38011
39255
  if (opts.name !== void 0)
38012
39256
  args.name = opts.name;
38013
39257
  if (opts.address !== void 0)
38014
- args.address = opts.address;
39258
+ args.address = JSON.parse(opts.address);
38015
39259
  await ctx.execute({
38016
39260
  method: "POST",
38017
39261
  path: "/v1/companies",
@@ -38045,7 +39289,7 @@ Examples:
38045
39289
  queryParamKeys: ["take", "skip"]
38046
39290
  });
38047
39291
  });
38048
- resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
39292
+ resource.command("create").description(`Create a new coupon with discount rules. Supports percentage or fixed amount discounts, duration limits, and redemption restrictions.`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38049
39293
  Examples:
38050
39294
  hyperline coupons create --name <name> --type <type>
38051
39295
  hyperline coupons create --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38062,12 +39306,8 @@ Examples:
38062
39306
  args.description = opts.description;
38063
39307
  if (opts.expirationDate !== void 0)
38064
39308
  args.expiration_date = opts.expirationDate;
38065
- if (opts.productIds !== void 0)
38066
- args.product_ids = opts.productIds;
38067
39309
  if (opts.repeat !== void 0)
38068
39310
  args.repeat = opts.repeat;
38069
- if (opts.duration !== void 0)
38070
- args.duration = opts.duration;
38071
39311
  if (opts.type !== void 0)
38072
39312
  args.type = opts.type;
38073
39313
  if (opts.currency !== void 0)
@@ -38078,6 +39318,10 @@ Examples:
38078
39318
  args.discount_amount = Number(opts.discountAmount);
38079
39319
  if (opts.discountPercent !== void 0)
38080
39320
  args.discount_percent = Number(opts.discountPercent);
39321
+ if (opts.productIds !== void 0)
39322
+ args.product_ids = JSON.parse(opts.productIds);
39323
+ if (opts.duration !== void 0)
39324
+ args.duration = JSON.parse(opts.duration);
38081
39325
  await ctx.execute({
38082
39326
  method: "POST",
38083
39327
  path: "/v1/coupons",
@@ -38103,7 +39347,7 @@ Examples:
38103
39347
  queryParamKeys: []
38104
39348
  });
38105
39349
  });
38106
- resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <value>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <value>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
39350
+ resource.command("update").description(`Update an existing coupon's name, discount rules, or restrictions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Coupon name.`).option("--description <value>", `Coupon description.`).option("--expiration-date <value>", `Date corresponding to the expiration of the coupon.`).option("--redemption-limit <number>", `Maximum number of subscriptions to which a single coupon can be applied.`).option("--product-ids <json>", `List of product IDs the coupon can be applied to. If empty, the coupon can be applied to any product.`).option("--repeat <value>", `Default repeat behaviour applied when the coupon is attached to a subscription. Valid values: \`once\`, \`forever\`, \`duration\`. Can be overridden at attach time.`).option("--duration <json>", `Default duration applied when \`repeat\` is \`duration\`. Required when \`repeat\` is \`duration\`, must be null otherwise.`).requiredOption("--type <value>", `type`).option("--discount-amount <number>", `Amount to apply as a discount on the total amount (excluding taxes) of a subscription. Expressed in the currency's smallest unit.`).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--discount-percent <number>", `Percentage to apply as a discount on the amount (excluding taxes) of a product.`).addHelpText("after", `
38107
39351
  Examples:
38108
39352
  hyperline coupons update --id <id> --name <name> --type <type>
38109
39353
  hyperline coupons update --id <id> --name <name> --type <type> --description <description> --expiration-date <expiration_date>
@@ -38122,12 +39366,8 @@ Examples:
38122
39366
  args.description = opts.description;
38123
39367
  if (opts.expirationDate !== void 0)
38124
39368
  args.expiration_date = opts.expirationDate;
38125
- if (opts.productIds !== void 0)
38126
- args.product_ids = opts.productIds;
38127
39369
  if (opts.repeat !== void 0)
38128
39370
  args.repeat = opts.repeat;
38129
- if (opts.duration !== void 0)
38130
- args.duration = opts.duration;
38131
39371
  if (opts.type !== void 0)
38132
39372
  args.type = opts.type;
38133
39373
  if (opts.currency !== void 0)
@@ -38138,6 +39378,10 @@ Examples:
38138
39378
  args.discount_amount = Number(opts.discountAmount);
38139
39379
  if (opts.discountPercent !== void 0)
38140
39380
  args.discount_percent = Number(opts.discountPercent);
39381
+ if (opts.productIds !== void 0)
39382
+ args.product_ids = JSON.parse(opts.productIds);
39383
+ if (opts.duration !== void 0)
39384
+ args.duration = JSON.parse(opts.duration);
38141
39385
  await ctx.execute({
38142
39386
  method: "PUT",
38143
39387
  path: "/v1/coupons/{id}",
@@ -38369,7 +39613,7 @@ Examples:
38369
39613
  queryParamKeys: []
38370
39614
  });
38371
39615
  });
38372
- resource.command("create-custom-property").description(`Create a new custom property definition with a name, type (string, number, boolean, date, select), and optional default value.`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <value>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
39616
+ 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", `
38373
39617
  Examples:
38374
39618
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities>
38375
39619
  hyperline custom-properties create-custom-property --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -38386,14 +39630,14 @@ Examples:
38386
39630
  args.type = opts.type;
38387
39631
  if (opts.slug !== void 0)
38388
39632
  args.slug = opts.slug;
38389
- if (opts.entities !== void 0)
38390
- args.entities = opts.entities;
38391
- if (opts.authorizedValues !== void 0)
38392
- args.authorized_values = opts.authorizedValues;
38393
39633
  if (opts.apiOnly !== void 0)
38394
39634
  args.api_only = true;
38395
39635
  if (opts.required !== void 0)
38396
39636
  args.required = true;
39637
+ if (opts.entities !== void 0)
39638
+ args.entities = JSON.parse(opts.entities);
39639
+ if (opts.authorizedValues !== void 0)
39640
+ args.authorized_values = JSON.parse(opts.authorizedValues);
38397
39641
  await ctx.execute({
38398
39642
  method: "POST",
38399
39643
  path: "/v1/custom-properties",
@@ -38401,7 +39645,7 @@ Examples:
38401
39645
  queryParamKeys: []
38402
39646
  });
38403
39647
  });
38404
- resource.command("update-custom-property").description(`Update an existing custom property definition by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `name`).requiredOption("--type <value>", `type`).requiredOption("--slug <value>", `slug`).requiredOption("--entities <value>", `entities`).option("--api-only", `api_only`).option("--required", `required`).option("--authorized-values <value>", `authorized_values`).addHelpText("after", `
39648
+ 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", `
38405
39649
  Examples:
38406
39650
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities>
38407
39651
  hyperline custom-properties update-custom-property --id <id> --name <name> --type <type> --slug <slug> --entities <entities> --api-only --required
@@ -38420,14 +39664,14 @@ Examples:
38420
39664
  args.type = opts.type;
38421
39665
  if (opts.slug !== void 0)
38422
39666
  args.slug = opts.slug;
38423
- if (opts.entities !== void 0)
38424
- args.entities = opts.entities;
38425
- if (opts.authorizedValues !== void 0)
38426
- args.authorized_values = opts.authorizedValues;
38427
39667
  if (opts.apiOnly !== void 0)
38428
39668
  args.api_only = true;
38429
39669
  if (opts.required !== void 0)
38430
39670
  args.required = true;
39671
+ if (opts.entities !== void 0)
39672
+ args.entities = JSON.parse(opts.entities);
39673
+ if (opts.authorizedValues !== void 0)
39674
+ args.authorized_values = JSON.parse(opts.authorizedValues);
38431
39675
  await ctx.execute({
38432
39676
  method: "PUT",
38433
39677
  path: "/v1/custom-properties/{id}",
@@ -38781,17 +40025,17 @@ Customer type.
38781
40025
  - \`corporate\`: The customer is a business entity.
38782
40026
  - \`person\`: The customer is a natural person.
38783
40027
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38784
- `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--local-tax-number <value>", `Customer local tax number.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
40028
+ `).option("--currency <value>", `Currency code. See [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217#List_of_ISO_4217_currency_codes).`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--tax-ids <json>", `Customer tax IDs.`).option("--local-tax-number <value>", `Customer local tax number.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
38785
40029
 
38786
40030
  - \`taxable\`: Taxes are automatically determined for the customer.
38787
40031
  - \`exempt\`: The customer is exempt from tax.
38788
- `).option("--registration-number <value>", `Customer registration number.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
40032
+ `).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>", `
38789
40033
  How customer invoices are issued from the parent organisation.
38790
40034
 
38791
40035
  - \`none\`: Invoices will keep being issued from this customer.
38792
40036
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38793
40037
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38794
- `).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--invoice-reminders-enabled <value>", `Indicates if invoice reminders are enabled for the customer.`).option("--price-book-id <value>", `Default price book ID assigned to the customer.`).option("--owner-id <value>", `ID of the Hyperline user responsible for this customer and targeted by customer agent notifications.`).option("--follower-ids <value>", `IDs of Hyperline users following this customer.`).addHelpText("after", `
40038
+ `).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `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("--force-invoice-draft <value>", `Indicates if customer invoices should be created as draft invoices.`).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 <json>", `IDs of Hyperline users following this customer.`).addHelpText("after", `
38795
40039
  Examples:
38796
40040
  hyperline customers create-customer
38797
40041
  hyperline customers create-customer --name <name> --type <type>
@@ -38808,8 +40052,6 @@ Examples:
38808
40052
  args.type = opts.type;
38809
40053
  if (opts.currency !== void 0)
38810
40054
  args.currency = opts.currency;
38811
- if (opts.taxIds !== void 0)
38812
- args.tax_ids = opts.taxIds;
38813
40055
  if (opts.localTaxNumber !== void 0)
38814
40056
  args.local_tax_number = opts.localTaxNumber;
38815
40057
  if (opts.taxability !== void 0)
@@ -38822,40 +40064,26 @@ Examples:
38822
40064
  args.domain = opts.domain;
38823
40065
  if (opts.invoicingEntityId !== void 0)
38824
40066
  args.invoicing_entity_id = opts.invoicingEntityId;
38825
- if (opts.billingAddress !== void 0)
38826
- args.billing_address = opts.billingAddress;
38827
- if (opts.shippingAddress !== void 0)
38828
- args.shipping_address = opts.shippingAddress;
38829
40067
  if (opts.billingEmail !== void 0)
38830
40068
  args.billing_email = opts.billingEmail;
38831
- if (opts.invoiceEmails !== void 0)
38832
- args.invoice_emails = opts.invoiceEmails;
38833
40069
  if (opts.language !== void 0)
38834
40070
  args.language = opts.language;
38835
40071
  if (opts.timezone !== void 0)
38836
40072
  args.timezone = opts.timezone;
38837
- if (opts.availablePaymentMethods !== void 0)
38838
- args.available_payment_methods = opts.availablePaymentMethods;
38839
40073
  if (opts.paymentMethodType !== void 0)
38840
40074
  args.payment_method_type = opts.paymentMethodType;
38841
- if (opts.bankAccount !== void 0)
38842
- args.bank_account = opts.bankAccount;
38843
40075
  if (opts.organisationId !== void 0)
38844
40076
  args.organisation_id = opts.organisationId;
38845
40077
  if (opts.organisationInvoicing !== void 0)
38846
40078
  args.organisation_invoicing = opts.organisationInvoicing;
38847
- if (opts.properties !== void 0)
38848
- args.properties = opts.properties;
38849
- if (opts.customProperties !== void 0)
38850
- args.custom_properties = opts.customProperties;
38851
40079
  if (opts.invoiceRemindersEnabled !== void 0)
38852
40080
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
40081
+ if (opts.forceInvoiceDraft !== void 0)
40082
+ args.force_invoice_draft = opts.forceInvoiceDraft;
38853
40083
  if (opts.priceBookId !== void 0)
38854
40084
  args.price_book_id = opts.priceBookId;
38855
40085
  if (opts.ownerId !== void 0)
38856
40086
  args.owner_id = opts.ownerId;
38857
- if (opts.followerIds !== void 0)
38858
- args.follower_ids = opts.followerIds;
38859
40087
  if (opts.taxRateCustom !== void 0)
38860
40088
  args.tax_rate_custom = Number(opts.taxRateCustom);
38861
40089
  if (opts.customPaymentDelay !== void 0)
@@ -38864,6 +40092,24 @@ Examples:
38864
40092
  args.custom_payment_initiation_delay = Number(opts.customPaymentInitiationDelay);
38865
40093
  if (opts.isGovernmentAffiliated !== void 0)
38866
40094
  args.is_government_affiliated = true;
40095
+ if (opts.taxIds !== void 0)
40096
+ args.tax_ids = JSON.parse(opts.taxIds);
40097
+ if (opts.billingAddress !== void 0)
40098
+ args.billing_address = JSON.parse(opts.billingAddress);
40099
+ if (opts.shippingAddress !== void 0)
40100
+ args.shipping_address = JSON.parse(opts.shippingAddress);
40101
+ if (opts.invoiceEmails !== void 0)
40102
+ args.invoice_emails = JSON.parse(opts.invoiceEmails);
40103
+ if (opts.availablePaymentMethods !== void 0)
40104
+ args.available_payment_methods = JSON.parse(opts.availablePaymentMethods);
40105
+ if (opts.bankAccount !== void 0)
40106
+ args.bank_account = JSON.parse(opts.bankAccount);
40107
+ if (opts.properties !== void 0)
40108
+ args.properties = JSON.parse(opts.properties);
40109
+ if (opts.customProperties !== void 0)
40110
+ args.custom_properties = JSON.parse(opts.customProperties);
40111
+ if (opts.followerIds !== void 0)
40112
+ args.follower_ids = JSON.parse(opts.followerIds);
38867
40113
  await ctx.execute({
38868
40114
  method: "POST",
38869
40115
  path: "/v1/customers",
@@ -38871,7 +40117,7 @@ Examples:
38871
40117
  queryParamKeys: []
38872
40118
  });
38873
40119
  });
38874
- resource.command("create-customers").description(`Create up to 50 customers in a single batch request. Returns successes and errors separately for each customer in the batch.`).requiredOption("--customers <value>", `customers`).addHelpText("after", `
40120
+ resource.command("create-customers").description(`Create up to 50 customers in a single batch request. Returns successes and errors separately for each customer in the batch.`).requiredOption("--customers <json>", `customers`).addHelpText("after", `
38875
40121
  Examples:
38876
40122
  hyperline customers create-customers --customers <customers>
38877
40123
  hyperline customers create-customers --customers <customers> --output json`).action(async (opts) => {
@@ -38882,7 +40128,7 @@ Examples:
38882
40128
  }
38883
40129
  const args = {};
38884
40130
  if (opts.customers !== void 0)
38885
- args.customers = opts.customers;
40131
+ args.customers = JSON.parse(opts.customers);
38886
40132
  await ctx.execute({
38887
40133
  method: "POST",
38888
40134
  path: "/v1/customers/batch",
@@ -38914,17 +40160,17 @@ Customer type.
38914
40160
  - \`corporate\`: The customer is a business entity.
38915
40161
  - \`person\`: The customer is a natural person.
38916
40162
  - \`automatically_created\`: The customer was automatically imported (e.g. from a data loader). This value cannot be used when creating/editing.
38917
- `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <value>", `Customer tax IDs.`).option("--local-tax-number <value>", `Customer local tax number.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
40163
+ `).option("--currency <value>", `Customer currency. Can only be changed if the customer doesn't have existing invoices, a wallet or a payment method saved.`).option("--tax-ids <json>", `Customer tax IDs.`).option("--local-tax-number <value>", `Customer local tax number.`).option("--tax-rate-custom <number>", `Customer custom tax rate. If not defined, the rate will be automatically determined based on the customer's country, your country, and applicable legal requirements.`).option("--taxability <value>", `Customer taxability.
38918
40164
 
38919
40165
  - \`taxable\`: Taxes are automatically determined for the customer.
38920
40166
  - \`exempt\`: The customer is exempt from tax.
38921
- `).option("--registration-number <value>", `Customer registration number.`).option("--is-government-affiliated", `Indicates if the customer is affiliated with a government entity.`).option("--external-id <value>", `ID of the customer in your system. This helps matching your customer with the one on Hyperline.`).option("--domain <value>", `Customer domain. If not defined, it is inferred from the billing email.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity this customer will be attached to.`).option("--billing-address <value>", `Customer billing address.`).option("--shipping-address <value>", `Customer shipping address.`).option("--billing-email <value>", `Email to which all communications will be sent.`).option("--invoice-emails <value>", `Emails to which invoices will be sent (e.g. payer, finance team, accounting firm). If not defined, invoices will be sent to the \`billing_email\`; otherwise, they won't be sent to the \`billing_email\`.`).option("--language <value>", `Language used for invoices, emails, and hosted pages.`).option("--timezone <value>", `Customer timezone.`).option("--available-payment-methods <value>", `List of payment methods you allow your customer to pay with. You customer will be able to select one of them in their portal page and those will be the default options when creating a checkout session.`).option("--payment-method-type <value>", `Default payment method type used to pay subscriptions and one-off invoices.`).option("--payment-method-id <value>", `ID of the default payment method of the customer. Only applies to card and direct debit.`).option("--bank-account <value>", `Custom bank account for the customer. If not defined and customer paying by bank transfer, the bank accounts configured in your account settings will be used.`).option("--custom-payment-delay <number>", `Custom payment terms in days. If not defined, the default one defined on the related invoicing entity will be used.`).option("--custom-payment-initiation-delay <number>", `Custom initiation delay in days before triggering payment. If not defined, the default one defined on the related invoicing entity will be used.`).option("--organisation-id <value>", `Parent organization ID to which the client is attached.`).option("--organisation-invoicing <value>", `
40167
+ `).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>", `
38922
40168
  How customer invoices are issued from the parent organisation.
38923
40169
 
38924
40170
  - \`none\`: Invoices will keep being issued from this customer.
38925
40171
  - \`every_invoice\`: Customer invoices will be issued from the organisation individually.
38926
40172
  - \`concat\`: Customer invoices will be grouped into a global parent invoice at a regular schedule (configured on the organisation).
38927
- `).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", `
40173
+ `).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `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("--force-invoice-draft <value>", `Indicates if customer invoices should be created as draft invoices.`).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 <json>", `IDs of Hyperline users following this customer.`).addHelpText("after", `
38928
40174
  Examples:
38929
40175
  hyperline customers update --id <id>
38930
40176
  hyperline customers update --id <id> --name <name> --type <type>
@@ -38943,8 +40189,6 @@ Examples:
38943
40189
  args.type = opts.type;
38944
40190
  if (opts.currency !== void 0)
38945
40191
  args.currency = opts.currency;
38946
- if (opts.taxIds !== void 0)
38947
- args.tax_ids = opts.taxIds;
38948
40192
  if (opts.localTaxNumber !== void 0)
38949
40193
  args.local_tax_number = opts.localTaxNumber;
38950
40194
  if (opts.taxability !== void 0)
@@ -38957,42 +40201,28 @@ Examples:
38957
40201
  args.domain = opts.domain;
38958
40202
  if (opts.invoicingEntityId !== void 0)
38959
40203
  args.invoicing_entity_id = opts.invoicingEntityId;
38960
- if (opts.billingAddress !== void 0)
38961
- args.billing_address = opts.billingAddress;
38962
- if (opts.shippingAddress !== void 0)
38963
- args.shipping_address = opts.shippingAddress;
38964
40204
  if (opts.billingEmail !== void 0)
38965
40205
  args.billing_email = opts.billingEmail;
38966
- if (opts.invoiceEmails !== void 0)
38967
- args.invoice_emails = opts.invoiceEmails;
38968
40206
  if (opts.language !== void 0)
38969
40207
  args.language = opts.language;
38970
40208
  if (opts.timezone !== void 0)
38971
40209
  args.timezone = opts.timezone;
38972
- if (opts.availablePaymentMethods !== void 0)
38973
- args.available_payment_methods = opts.availablePaymentMethods;
38974
40210
  if (opts.paymentMethodType !== void 0)
38975
40211
  args.payment_method_type = opts.paymentMethodType;
38976
40212
  if (opts.paymentMethodId !== void 0)
38977
40213
  args.payment_method_id = opts.paymentMethodId;
38978
- if (opts.bankAccount !== void 0)
38979
- args.bank_account = opts.bankAccount;
38980
40214
  if (opts.organisationId !== void 0)
38981
40215
  args.organisation_id = opts.organisationId;
38982
40216
  if (opts.organisationInvoicing !== void 0)
38983
40217
  args.organisation_invoicing = opts.organisationInvoicing;
38984
- if (opts.properties !== void 0)
38985
- args.properties = opts.properties;
38986
- if (opts.customProperties !== void 0)
38987
- args.custom_properties = opts.customProperties;
38988
40218
  if (opts.invoiceRemindersEnabled !== void 0)
38989
40219
  args.invoice_reminders_enabled = opts.invoiceRemindersEnabled;
40220
+ if (opts.forceInvoiceDraft !== void 0)
40221
+ args.force_invoice_draft = opts.forceInvoiceDraft;
38990
40222
  if (opts.priceBookId !== void 0)
38991
40223
  args.price_book_id = opts.priceBookId;
38992
40224
  if (opts.ownerId !== void 0)
38993
40225
  args.owner_id = opts.ownerId;
38994
- if (opts.followerIds !== void 0)
38995
- args.follower_ids = opts.followerIds;
38996
40226
  if (opts.taxRateCustom !== void 0)
38997
40227
  args.tax_rate_custom = Number(opts.taxRateCustom);
38998
40228
  if (opts.customPaymentDelay !== void 0)
@@ -39001,6 +40231,24 @@ Examples:
39001
40231
  args.custom_payment_initiation_delay = Number(opts.customPaymentInitiationDelay);
39002
40232
  if (opts.isGovernmentAffiliated !== void 0)
39003
40233
  args.is_government_affiliated = true;
40234
+ if (opts.taxIds !== void 0)
40235
+ args.tax_ids = JSON.parse(opts.taxIds);
40236
+ if (opts.billingAddress !== void 0)
40237
+ args.billing_address = JSON.parse(opts.billingAddress);
40238
+ if (opts.shippingAddress !== void 0)
40239
+ args.shipping_address = JSON.parse(opts.shippingAddress);
40240
+ if (opts.invoiceEmails !== void 0)
40241
+ args.invoice_emails = JSON.parse(opts.invoiceEmails);
40242
+ if (opts.availablePaymentMethods !== void 0)
40243
+ args.available_payment_methods = JSON.parse(opts.availablePaymentMethods);
40244
+ if (opts.bankAccount !== void 0)
40245
+ args.bank_account = JSON.parse(opts.bankAccount);
40246
+ if (opts.properties !== void 0)
40247
+ args.properties = JSON.parse(opts.properties);
40248
+ if (opts.customProperties !== void 0)
40249
+ args.custom_properties = JSON.parse(opts.customProperties);
40250
+ if (opts.followerIds !== void 0)
40251
+ args.follower_ids = JSON.parse(opts.followerIds);
39004
40252
  await ctx.execute({
39005
40253
  method: "PUT",
39006
40254
  path: "/v1/customers/{id}",
@@ -39355,7 +40603,7 @@ Examples:
39355
40603
  queryParamKeys: ["take", "skip", "type", "invoice_id", "created_at"]
39356
40604
  });
39357
40605
  });
39358
- resource.command("create-customer-credit").description(`Create a credit entity for a customer linked to a specific product with an optional initial balance.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `Credit product ID.`).option("--name <value>", `Credit name.`).option("--current-balance <number>", `Current credit balance.`).option("--low-count-threshold <number>", `Value indicating a low threshold.`).option("--auto-topup <value>", `Auto top-up options.`).addHelpText("after", `
40606
+ resource.command("create-customer-credit").description(`Create a credit entity for a customer linked to a specific product with an optional initial balance.`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `Credit product ID.`).option("--name <value>", `Credit name.`).option("--current-balance <number>", `Current credit balance.`).option("--low-count-threshold <number>", `Value indicating a low threshold.`).option("--auto-topup <json>", `Auto top-up options.`).addHelpText("after", `
39359
40607
  Examples:
39360
40608
  hyperline customers-credits create-customer-credit --id <id> --product-id <product_id>
39361
40609
  hyperline customers-credits create-customer-credit --id <id> --product-id <product_id> --name <name> --current-balance <current_balance>
@@ -39372,12 +40620,12 @@ Examples:
39372
40620
  args.product_id = opts.productId;
39373
40621
  if (opts.name !== void 0)
39374
40622
  args.name = opts.name;
39375
- if (opts.autoTopup !== void 0)
39376
- args.auto_topup = opts.autoTopup;
39377
40623
  if (opts.currentBalance !== void 0)
39378
40624
  args.current_balance = Number(opts.currentBalance);
39379
40625
  if (opts.lowCountThreshold !== void 0)
39380
40626
  args.low_count_threshold = Number(opts.lowCountThreshold);
40627
+ if (opts.autoTopup !== void 0)
40628
+ args.auto_topup = JSON.parse(opts.autoTopup);
39381
40629
  await ctx.execute({
39382
40630
  method: "POST",
39383
40631
  path: "/v1/customers/{id}/credits",
@@ -39385,7 +40633,7 @@ Examples:
39385
40633
  queryParamKeys: []
39386
40634
  });
39387
40635
  });
39388
- resource.command("update-customer-credit").description(`Update the configuration of a customer's credit product (e.g. balance thresholds, auto-topup settings).`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).option("--name <value>", `Credit name.`).option("--low-count-threshold <number>", `Value indicating a low threshold.`).option("--auto-topup <value>", `Auto top-up options.`).addHelpText("after", `
40636
+ resource.command("update-customer-credit").description(`Update the configuration of a customer's credit product (e.g. balance thresholds, auto-topup settings).`).requiredOption("--id <value>", `id parameter`).requiredOption("--product-id <value>", `productId parameter`).option("--name <value>", `Credit name.`).option("--low-count-threshold <number>", `Value indicating a low threshold.`).option("--auto-topup <json>", `Auto top-up options.`).addHelpText("after", `
39389
40637
  Examples:
39390
40638
  hyperline customers-credits update-customer-credit --id <id> --product-id <productId>
39391
40639
  hyperline customers-credits update-customer-credit --id <id> --product-id <productId> --name <name> --low-count-threshold <low_count_threshold>
@@ -39402,10 +40650,10 @@ Examples:
39402
40650
  args.productId = opts.productId;
39403
40651
  if (opts.name !== void 0)
39404
40652
  args.name = opts.name;
39405
- if (opts.autoTopup !== void 0)
39406
- args.auto_topup = opts.autoTopup;
39407
40653
  if (opts.lowCountThreshold !== void 0)
39408
40654
  args.low_count_threshold = Number(opts.lowCountThreshold);
40655
+ if (opts.autoTopup !== void 0)
40656
+ args.auto_topup = JSON.parse(opts.autoTopup);
39409
40657
  await ctx.execute({
39410
40658
  method: "PUT",
39411
40659
  path: "/v1/customers/{id}/credits/{productId}",
@@ -39618,7 +40866,7 @@ Examples:
39618
40866
  queryParamKeys: ["take", "skip"]
39619
40867
  });
39620
40868
  });
39621
- resource.command("create").description(`Create a new customer segment.`).requiredOption("--name <value>", `name`).option("--description <value>", `description`).requiredOption("--rules <value>", `rules`).addHelpText("after", `
40869
+ resource.command("create").description(`Create a new customer segment.`).requiredOption("--name <value>", `name`).option("--description <value>", `description`).requiredOption("--rules <json>", `rules`).addHelpText("after", `
39622
40870
  Examples:
39623
40871
  hyperline customers-segments create --name <name> --rules <rules>
39624
40872
  hyperline customers-segments create --name <name> --rules <rules> --description <description>
@@ -39634,7 +40882,7 @@ Examples:
39634
40882
  if (opts.description !== void 0)
39635
40883
  args.description = opts.description;
39636
40884
  if (opts.rules !== void 0)
39637
- args.rules = opts.rules;
40885
+ args.rules = JSON.parse(opts.rules);
39638
40886
  await ctx.execute({
39639
40887
  method: "POST",
39640
40888
  path: "/v1/customers/segments",
@@ -39642,7 +40890,7 @@ Examples:
39642
40890
  queryParamKeys: []
39643
40891
  });
39644
40892
  });
39645
- resource.command("update").description(`Update an existing customer segment.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `name`).option("--description <value>", `description`).option("--rules <value>", `rules`).addHelpText("after", `
40893
+ resource.command("update").description(`Update an existing customer segment.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `name`).option("--description <value>", `description`).option("--rules <json>", `rules`).addHelpText("after", `
39646
40894
  Examples:
39647
40895
  hyperline customers-segments update --id <id>
39648
40896
  hyperline customers-segments update --id <id> --name <name> --description <description>
@@ -39660,7 +40908,7 @@ Examples:
39660
40908
  if (opts.description !== void 0)
39661
40909
  args.description = opts.description;
39662
40910
  if (opts.rules !== void 0)
39663
- args.rules = opts.rules;
40911
+ args.rules = JSON.parse(opts.rules);
39664
40912
  await ctx.execute({
39665
40913
  method: "PATCH",
39666
40914
  path: "/v1/customers/segments/{id}",
@@ -39868,7 +41116,7 @@ Examples:
39868
41116
  ]
39869
41117
  });
39870
41118
  });
39871
- resource.command("create").description(`Upload a new file (max 10MB). Requires multipart form data with a file field and metadata (name, optional customer_id).`).requiredOption("--name <value>", `Name of the file to be uploaded.`).requiredOption("--customer-id <value>", `ID of the customer to link the file to.`).addHelpText("after", `
41119
+ resource.command("create").description(`Upload a new file (max 10MB). Requires multipart form data with a file field and metadata (name and customer_id).`).requiredOption("--name <value>", `Name of the file to be uploaded.`).requiredOption("--customer-id <value>", `ID of the customer to link the file to.`).addHelpText("after", `
39872
41120
  Examples:
39873
41121
  hyperline files create --name <name> --customer-id <customer_id>
39874
41122
  hyperline files create --name <name> --customer-id <customer_id> --output json`).action(async (opts) => {
@@ -40279,7 +41527,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
40279
41527
 
40280
41528
  - \`current\`: Use the current default payment method of the customer.
40281
41529
  - \`external\`: Manage the payment of the invoice outside of Hyperline.
40282
- `).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.`).option("--additional-display-fields <value>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
41530
+ `).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", `
40283
41531
  Examples:
40284
41532
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
40285
41533
  hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
@@ -40331,17 +41579,17 @@ Examples:
40331
41579
  if (opts.settledAt !== void 0)
40332
41580
  args.settled_at = opts.settledAt;
40333
41581
  if (opts.properties !== void 0)
40334
- args.properties = opts.properties;
41582
+ args.properties = JSON.parse(opts.properties);
40335
41583
  if (opts.customProperties !== void 0)
40336
- args.custom_properties = opts.customProperties;
41584
+ args.custom_properties = JSON.parse(opts.customProperties);
40337
41585
  if (opts.additionalDisplayFields !== void 0)
40338
- args.additional_display_fields = opts.additionalDisplayFields;
41586
+ args.additional_display_fields = JSON.parse(opts.additionalDisplayFields);
40339
41587
  if (opts.lineItems !== void 0)
40340
- args.line_items = opts.lineItems;
41588
+ args.line_items = JSON.parse(opts.lineItems);
40341
41589
  if (opts.transactions !== void 0)
40342
- args.transactions = opts.transactions;
41590
+ args.transactions = JSON.parse(opts.transactions);
40343
41591
  if (opts.coupons !== void 0)
40344
- args.coupons = opts.coupons;
41592
+ args.coupons = JSON.parse(opts.coupons);
40345
41593
  await ctx.execute({
40346
41594
  method: "POST",
40347
41595
  path: "/v1/invoices",
@@ -40386,7 +41634,7 @@ Examples:
40386
41634
  queryParamKeys: []
40387
41635
  });
40388
41636
  });
40389
- resource.command("create-invoices").description(`Create multiple invoices asynchronously in batch. Track results via webhooks (invoice.batch.creation_succeeded / invoice.batch.creation_failed). Returns a batch_id.`).option("--batch-id <value>", `Optional identifier for the batch request. If not provided, a unique ID will be generated.`).requiredOption("--invoices <value>", `List of invoices to create (max 50).`).addHelpText("after", `
41637
+ resource.command("create-invoices").description(`Create multiple invoices asynchronously in batch. Track results via webhooks (invoice.batch.creation_succeeded / invoice.batch.creation_failed). Returns a batch_id.`).option("--batch-id <value>", `Optional identifier for the batch request. If not provided, a unique ID will be generated.`).requiredOption("--invoices <json>", `List of invoices to create (max 50).`).addHelpText("after", `
40390
41638
  Examples:
40391
41639
  hyperline invoices create-invoices --invoices <invoices>
40392
41640
  hyperline invoices create-invoices --invoices <invoices> --batch-id <batch_id>
@@ -40400,7 +41648,7 @@ Examples:
40400
41648
  if (opts.batchId !== void 0)
40401
41649
  args.batch_id = opts.batchId;
40402
41650
  if (opts.invoices !== void 0)
40403
- args.invoices = opts.invoices;
41651
+ args.invoices = JSON.parse(opts.invoices);
40404
41652
  await ctx.execute({
40405
41653
  method: "POST",
40406
41654
  path: "/v2/invoices/batch",
@@ -40408,7 +41656,7 @@ Examples:
40408
41656
  queryParamKeys: []
40409
41657
  });
40410
41658
  });
40411
- resource.command("validate").description(`Finalize a draft invoice: sets its status to to_pay, assigns an invoice number, and makes it immutable. This action is irreversible.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
41659
+ resource.command("validate").description(`Submit a draft invoice for finalization. The result may be pending approval or finalized for payment.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
40412
41660
  Examples:
40413
41661
  hyperline invoices validate --id <id>
40414
41662
  hyperline invoices validate --id <id> --output json`).action(async (opts) => {
@@ -40427,10 +41675,10 @@ Examples:
40427
41675
  queryParamKeys: []
40428
41676
  });
40429
41677
  });
40430
- resource.command("charge").description(`Manually trigger payment collection for an invoice. Optionally specify a payment_method_id to charge.`).requiredOption("--id <value>", `id parameter`).option("--payment-method-id <value>", `Payment method used to execute the payment. This payment method will override any previously set method on the invoice.`).addHelpText("after", `
41678
+ resource.command("charge").description(`Manually trigger payment collection for an invoice. Optionally specify a payment_method_id and an amount to charge now.`).requiredOption("--id <value>", `id parameter`).option("--payment-method-id <value>", `Payment method used to execute the payment. This payment method will override any previously set method on the invoice.`).option("--amount <number>", `Amount to charge now, expressed in the currency's smallest unit. Defaults to the outstanding invoice amount.`).addHelpText("after", `
40431
41679
  Examples:
40432
41680
  hyperline invoices charge --id <id>
40433
- hyperline invoices charge --id <id> --payment-method-id <payment_method_id>
41681
+ hyperline invoices charge --id <id> --payment-method-id <payment_method_id> --amount <amount>
40434
41682
  hyperline invoices charge --id <id> --output json`).action(async (opts) => {
40435
41683
  const ctx = resource.parent?.opts()._ctx;
40436
41684
  if (!ctx) {
@@ -40442,6 +41690,8 @@ Examples:
40442
41690
  args.id = opts.id;
40443
41691
  if (opts.paymentMethodId !== void 0)
40444
41692
  args.payment_method_id = opts.paymentMethodId;
41693
+ if (opts.amount !== void 0)
41694
+ args.amount = Number(opts.amount);
40445
41695
  await ctx.execute({
40446
41696
  method: "POST",
40447
41697
  path: "/v1/invoices/{id}/charge",
@@ -40517,7 +41767,7 @@ Examples:
40517
41767
 
40518
41768
  - \`auto\`: Tax is automatically computed and applied.
40519
41769
  - \`not_eligible\`: Tax collection is disabled for the invoice.
40520
- `).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("--subscription-id <value>", `ID of the subscription related to the invoice.`).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("--additional-display-fields <value>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <value>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
41770
+ `).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", `
40521
41771
  Examples:
40522
41772
  hyperline invoices update --id <id>
40523
41773
  hyperline invoices update --id <id> --type <type> --document-name <document_name>
@@ -40546,10 +41796,6 @@ Examples:
40546
41796
  args.footer = opts.footer;
40547
41797
  if (opts.taxScheme !== void 0)
40548
41798
  args.tax_scheme = opts.taxScheme;
40549
- if (opts.lineItems !== void 0)
40550
- args.line_items = opts.lineItems;
40551
- if (opts.coupons !== void 0)
40552
- args.coupons = opts.coupons;
40553
41799
  if (opts.paymentMethodType !== void 0)
40554
41800
  args.payment_method_type = opts.paymentMethodType;
40555
41801
  if (opts.paymentMethodId !== void 0)
@@ -40558,14 +41804,18 @@ Examples:
40558
41804
  args.bank_account_id = opts.bankAccountId;
40559
41805
  if (opts.subscriptionId !== void 0)
40560
41806
  args.subscription_id = opts.subscriptionId;
41807
+ if (opts.lineItems !== void 0)
41808
+ args.line_items = JSON.parse(opts.lineItems);
41809
+ if (opts.coupons !== void 0)
41810
+ args.coupons = JSON.parse(opts.coupons);
40561
41811
  if (opts.properties !== void 0)
40562
- args.properties = opts.properties;
41812
+ args.properties = JSON.parse(opts.properties);
40563
41813
  if (opts.customProperties !== void 0)
40564
- args.custom_properties = opts.customProperties;
41814
+ args.custom_properties = JSON.parse(opts.customProperties);
40565
41815
  if (opts.additionalDisplayFields !== void 0)
40566
- args.additional_display_fields = opts.additionalDisplayFields;
41816
+ args.additional_display_fields = JSON.parse(opts.additionalDisplayFields);
40567
41817
  if (opts.customer !== void 0)
40568
- args.customer = opts.customer;
41818
+ args.customer = JSON.parse(opts.customer);
40569
41819
  await ctx.execute({
40570
41820
  method: "PATCH",
40571
41821
  path: "/v1/invoices/{id}",
@@ -40646,7 +41896,7 @@ Examples:
40646
41896
  // build/commands/generated/invoices-transactions.js
40647
41897
  function registerInvoices_TransactionsCommands(parent) {
40648
41898
  const resource = parent.command("invoices-transactions").description("Manage invoices > transactions");
40649
- resource.command("create-invoice-transaction").description(`Record a payment transaction on an invoice. May update the invoice status to paid or partially_paid depending on the amount.`).requiredOption("--id <value>", `id parameter`).requiredOption("--amount <number>", `Transaction amount.`).requiredOption("--process-at <value>", `Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.`).option("--payment-method-id <value>", `Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.`).option("--payment-method-type <value>", `payment_method_type`).option("--bank-account-id <value>", `Bank account linked to the transaction.`).option("--provider-name <value>", `Provider name.`).option("--provider-id <value>", `Provider ID. Required if multiple instances of the same provider are connected in Hyperline.`).option("--provider-transaction-id <value>", `ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the \`amount\` and \`process_at\` fields may be overridden by the transaction data.`).addHelpText("after", `
41899
+ resource.command("create-invoice-transaction").description(`Record a payment transaction on an invoice. Rejects transactions that cannot be allocated, including cancelled invoices or invoices with no remaining capacity; excess amounts remain unallocated.`).requiredOption("--id <value>", `id parameter`).requiredOption("--amount <number>", `Transaction amount.`).requiredOption("--process-at <value>", `Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.`).option("--payment-method-id <value>", `Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.`).option("--payment-method-type <value>", `payment_method_type`).option("--bank-account-id <value>", `Bank account linked to the transaction.`).option("--provider-name <value>", `Provider name.`).option("--provider-id <value>", `Provider ID. Required if multiple instances of the same provider are connected in Hyperline.`).option("--provider-transaction-id <value>", `ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the \`amount\` and \`process_at\` fields may be overridden by the transaction data.`).addHelpText("after", `
40650
41900
  Examples:
40651
41901
  hyperline invoices-transactions create-invoice-transaction --id <id> --amount <amount> --process-at <process_at>
40652
41902
  hyperline invoices-transactions create-invoice-transaction --id <id> --amount <amount> --process-at <process_at> --payment-method-id <payment_method_id> --payment-method-type <payment_method_type>
@@ -40754,7 +42004,7 @@ Examples:
40754
42004
  queryParamKeys: []
40755
42005
  });
40756
42006
  });
40757
- 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.`).option("--standalone-credit-note-creation-enabled", `Whether credit notes without an original invoice can be created under this invoicing entity.`).addHelpText("after", `
42007
+ 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. It cannot be changed after creation.`).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 and no \`refund_method\` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).option("--standalone-credit-note-creation-enabled", `Whether credit notes without an original invoice can be created under this invoicing entity.`).addHelpText("after", `
40758
42008
  Examples:
40759
42009
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency>
40760
42010
  hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency> --is-default --trade-name <trade_name>
@@ -40844,7 +42094,7 @@ Examples:
40844
42094
  queryParamKeys: []
40845
42095
  });
40846
42096
  });
40847
- 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.`).option("--standalone-credit-note-creation-enabled", `Whether credit notes without an original invoice can be created under this invoicing entity.`).addHelpText("after", `
42097
+ 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. It cannot be changed after creation.`).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 and no \`refund_method\` is specified, credit note refunds default to the customer's wallet, including credit notes generated by subscription updates, cancellations, and transitions. An explicit \`refund_method\` always wins. Requires wallets to be enabled at the workspace level.`).option("--standalone-credit-note-creation-enabled", `Whether credit notes without an original invoice can be created under this invoicing entity.`).addHelpText("after", `
40848
42098
  Examples:
40849
42099
  hyperline invoicing-entities update-invoicing-entity --id <id>
40850
42100
  hyperline invoicing-entities update-invoicing-entity --id <id> --name <name> --registration-number <registration_number>
@@ -41014,12 +42264,12 @@ function registerPaymentsCommands(parent) {
41014
42264
  Payment type.
41015
42265
 
41016
42266
  - \`one_time\`: One-time payment, generating one-off invoice.
41017
- `).requiredOption("--customer-id <value>", `ID of the customer.`).option("--products <value>", `Products composing the related invoice.`).option("--purchase-order <value>", `Purchase order added on the generated invoice.`).option("--custom-note <value>", `Custom note added on the generated invoice.`).requiredOption("--charging-method <value>", `
42267
+ `).requiredOption("--customer-id <value>", `ID of the customer.`).option("--products <json>", `Products composing the related invoice.`).option("--purchase-order <value>", `Purchase order added on the generated invoice.`).option("--custom-note <value>", `Custom note added on the generated invoice.`).requiredOption("--charging-method <value>", `
41018
42268
  Charging method.
41019
42269
 
41020
42270
  - \`immediately\`: Customer's payment method will be charged directly to pay the invoice.
41021
42271
  - \`checkout\`: Dedicated checkout page will be created for the customer to pay the invoice.
41022
- `).option("--payment-method-type <value>", `Type of payment method to use to pay the invoice. If not specified, the payment_method_id or the default customer payment method is used.`).option("--payment-method-id <value>", `ID of the payment method to use to pay the invoice. Ignored if payment_method_type is specified.`).option("--available-payment-methods <value>", `available_payment_methods`).option("--checkout-session <value>", `Only applies to \`checkout\` charging method.`).addHelpText("after", `
42272
+ `).option("--payment-method-type <value>", `Type of payment method to use to pay the invoice. If not specified, the payment_method_id or the default customer payment method is used.`).option("--payment-method-id <value>", `ID of the payment method to use to pay the invoice. Ignored if payment_method_type is specified.`).option("--available-payment-methods <json>", `available_payment_methods`).option("--checkout-session <json>", `Only applies to \`checkout\` charging method.`).addHelpText("after", `
41023
42273
  Examples:
41024
42274
  hyperline payments create --type <type> --customer-id <customer_id> --charging-method <charging_method>
41025
42275
  hyperline payments create --type <type> --customer-id <customer_id> --charging-method <charging_method> --products <products> --purchase-order <purchase_order>
@@ -41034,8 +42284,6 @@ Examples:
41034
42284
  args.type = opts.type;
41035
42285
  if (opts.customerId !== void 0)
41036
42286
  args.customer_id = opts.customerId;
41037
- if (opts.products !== void 0)
41038
- args.products = opts.products;
41039
42287
  if (opts.purchaseOrder !== void 0)
41040
42288
  args.purchase_order = opts.purchaseOrder;
41041
42289
  if (opts.customNote !== void 0)
@@ -41046,10 +42294,12 @@ Examples:
41046
42294
  args.payment_method_type = opts.paymentMethodType;
41047
42295
  if (opts.paymentMethodId !== void 0)
41048
42296
  args.payment_method_id = opts.paymentMethodId;
42297
+ if (opts.products !== void 0)
42298
+ args.products = JSON.parse(opts.products);
41049
42299
  if (opts.availablePaymentMethods !== void 0)
41050
- args.available_payment_methods = opts.availablePaymentMethods;
42300
+ args.available_payment_methods = JSON.parse(opts.availablePaymentMethods);
41051
42301
  if (opts.checkoutSession !== void 0)
41052
- args.checkout_session = opts.checkoutSession;
42302
+ args.checkout_session = JSON.parse(opts.checkoutSession);
41053
42303
  await ctx.execute({
41054
42304
  method: "POST",
41055
42305
  path: "/v1/payments",
@@ -41345,12 +42595,12 @@ Examples:
41345
42595
  ]
41346
42596
  });
41347
42597
  });
41348
- resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--credits-grant-mode <value>", `
42598
+ resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <json>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <json>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <json>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <json>", `Price configurations for the product.`).option("--aggregator <json>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <json>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--credits-grant-mode <value>", `
41349
42599
  How the periodic credit allowance is granted for partial billing periods.
41350
42600
 
41351
42601
  - \`prorated\` (default): the granted credits are prorated to the elapsed period.
41352
42602
  - \`full_allowance\`: the full allowance is always granted (the invoice remains prorated).
41353
- `).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <value>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
42603
+ `).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", `
41354
42604
  Examples:
41355
42605
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
41356
42606
  hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
@@ -41367,30 +42617,16 @@ Examples:
41367
42617
  args.description = opts.description;
41368
42618
  if (opts.publicDescription !== void 0)
41369
42619
  args.public_description = opts.publicDescription;
41370
- if (opts.translations !== void 0)
41371
- args.translations = opts.translations;
41372
- if (opts.customProperties !== void 0)
41373
- args.custom_properties = opts.customProperties;
41374
- if (opts.accounting !== void 0)
41375
- args.accounting = opts.accounting;
41376
42620
  if (opts.type !== void 0)
41377
42621
  args.type = opts.type;
41378
- if (opts.priceConfigurations !== void 0)
41379
- args.price_configurations = opts.priceConfigurations;
41380
- if (opts.aggregator !== void 0)
41381
- args.aggregator = opts.aggregator;
41382
42622
  if (opts.aggregatorId !== void 0)
41383
42623
  args.aggregator_id = opts.aggregatorId;
41384
42624
  if (opts.unitName !== void 0)
41385
42625
  args.unit_name = opts.unitName;
41386
- if (opts.creditAggregators !== void 0)
41387
- args.credit_aggregators = opts.creditAggregators;
41388
42626
  if (opts.creditsGrantMode !== void 0)
41389
42627
  args.credits_grant_mode = opts.creditsGrantMode;
41390
42628
  if (opts.displayMode !== void 0)
41391
42629
  args.display_mode = opts.displayMode;
41392
- if (opts.bundleItems !== void 0)
41393
- args.bundle_items = opts.bundleItems;
41394
42630
  if (opts.lowCreditsThreshold !== void 0)
41395
42631
  args.low_credits_threshold = Number(opts.lowCreditsThreshold);
41396
42632
  if (opts.descriptionDisplayIntervalDates !== void 0)
@@ -41403,6 +42639,20 @@ Examples:
41403
42639
  args.is_connected_seat_item = true;
41404
42640
  if (opts.exclusiveItemsEnabled !== void 0)
41405
42641
  args.exclusive_items_enabled = true;
42642
+ if (opts.translations !== void 0)
42643
+ args.translations = JSON.parse(opts.translations);
42644
+ if (opts.customProperties !== void 0)
42645
+ args.custom_properties = JSON.parse(opts.customProperties);
42646
+ if (opts.accounting !== void 0)
42647
+ args.accounting = JSON.parse(opts.accounting);
42648
+ if (opts.priceConfigurations !== void 0)
42649
+ args.price_configurations = JSON.parse(opts.priceConfigurations);
42650
+ if (opts.aggregator !== void 0)
42651
+ args.aggregator = JSON.parse(opts.aggregator);
42652
+ if (opts.creditAggregators !== void 0)
42653
+ args.credit_aggregators = JSON.parse(opts.creditAggregators);
42654
+ if (opts.bundleItems !== void 0)
42655
+ args.bundle_items = JSON.parse(opts.bundleItems);
41406
42656
  await ctx.execute({
41407
42657
  method: "POST",
41408
42658
  path: "/v1/products",
@@ -41431,7 +42681,7 @@ Examples:
41431
42681
  queryParamKeys: ["price_book_id"]
41432
42682
  });
41433
42683
  });
41434
- resource.command("update").description(`Update a product's name, description, type, or configuration by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--properties <value>", `properties`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).addHelpText("after", `
42684
+ resource.command("update").description(`Update a product's name, description, type, or configuration by ID.`).requiredOption("--id <value>", `id parameter`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--public-description <value>", `Public description of the product.`).option("--translations <json>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--properties <json>", `properties`).option("--custom-properties <json>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <json>", `Mapping invoicing entity ID/accounting settings.`).addHelpText("after", `
41435
42685
  Examples:
41436
42686
  hyperline products update --id <id> --name <name>
41437
42687
  hyperline products update --id <id> --name <name> --description <description> --public-description <public_description>
@@ -41450,18 +42700,18 @@ Examples:
41450
42700
  args.description = opts.description;
41451
42701
  if (opts.publicDescription !== void 0)
41452
42702
  args.public_description = opts.publicDescription;
41453
- if (opts.translations !== void 0)
41454
- args.translations = opts.translations;
41455
- if (opts.properties !== void 0)
41456
- args.properties = opts.properties;
41457
- if (opts.customProperties !== void 0)
41458
- args.custom_properties = opts.customProperties;
41459
- if (opts.accounting !== void 0)
41460
- args.accounting = opts.accounting;
41461
42703
  if (opts.isAvailableOnDemand !== void 0)
41462
42704
  args.is_available_on_demand = true;
41463
42705
  if (opts.isAvailableOnSubscription !== void 0)
41464
42706
  args.is_available_on_subscription = true;
42707
+ if (opts.translations !== void 0)
42708
+ args.translations = JSON.parse(opts.translations);
42709
+ if (opts.properties !== void 0)
42710
+ args.properties = JSON.parse(opts.properties);
42711
+ if (opts.customProperties !== void 0)
42712
+ args.custom_properties = JSON.parse(opts.customProperties);
42713
+ if (opts.accounting !== void 0)
42714
+ args.accounting = JSON.parse(opts.accounting);
41465
42715
  await ctx.execute({
41466
42716
  method: "PUT",
41467
42717
  path: "/v1/products/{id}",
@@ -41538,18 +42788,18 @@ Examples:
41538
42788
  // build/commands/generated/quotes.js
41539
42789
  function registerQuotesCommands(parent) {
41540
42790
  const resource = parent.command("quotes").description("Manage quotes");
41541
- resource.command("create").description(`Create a new quote for a customer. Use \`subscription\` (or \`template_id\`) for subscription quotes; use \`invoice\` for one-off quotes backed by a draft invoice with line items. Quotes can be sent for signature and converted to subscriptions or one-off invoices. When creating from a quote template, do not combine \`template_id\` with subscription overrides for dates, contract terms, products, phases, coupons, discounts, prices, or seats in this call: first create the quote from \`template_id\` so template terms and contract documents are copied, then call \`update_quote\` with the subscription payload.`).option("--status <value>", `
42791
+ resource.command("create").description(`Create a new quote for a customer. The quote carries its own configuration inline \u2014 build \`subscription\` in this call with its contract terms, phases, products and prices; there is no separate step to create a subscription first and reference it by ID. Use \`subscription\` (or \`template_id\`) for subscription quotes; use \`invoice\` for one-off quotes backed by a draft invoice with line items. Quotes can be sent for signature and converted to subscriptions or one-off invoices. When creating from a quote template, do not combine \`template_id\` with subscription overrides for dates, contract terms, products, phases, coupons, discounts, prices, or seats in this call: first create the quote from \`template_id\` so template terms and contract documents are copied, then call \`update_quote\` with the subscription payload. Discover product and price configuration IDs with \`get_catalog_context\`; validate the exact payload first with \`simulate_create_quote\` (identical schema, nothing persisted).`).option("--status <value>", `
41542
42792
  Quote status.
41543
42793
 
41544
42794
  - \`draft\`: The quote is a draft.
41545
42795
  - \`approved\`: The quote is approved and ready to be sent to the customer.
41546
42796
  - \`pending_signature\`: The quote is awaiting the customer's signature.
41547
- `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored \u2014 the amount is always derived from the linked invoice's \`amount_excluding_tax\`.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
42797
+ `).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--catalog-version-id <value>", `ID of a published catalog version to price every product of the quote from, instead of the live products catalog. A product's own \`catalog_version_id\` takes precedence, and explicit \`prices\` always win over both.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored \u2014 the amount is always derived from the linked invoice's \`amount_excluding_tax\`.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <json>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <json>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41548
42798
 
41549
42799
  - \`all\`: Display all pricing tiers.
41550
42800
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
41551
42801
  - \`none\`: Hide all pricing tiers.
41552
- `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <value>", `Subscription configuration constituting the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
42802
+ `).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", `
41553
42803
  Examples:
41554
42804
  hyperline quotes create --customer-id <customer_id>
41555
42805
  hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
@@ -41568,16 +42818,14 @@ Examples:
41568
42818
  args.customer_id = opts.customerId;
41569
42819
  if (opts.invoicingEntityId !== void 0)
41570
42820
  args.invoicing_entity_id = opts.invoicingEntityId;
42821
+ if (opts.catalogVersionId !== void 0)
42822
+ args.catalog_version_id = opts.catalogVersionId;
41571
42823
  if (opts.comments !== void 0)
41572
42824
  args.comments = opts.comments;
41573
42825
  if (opts.terms !== void 0)
41574
42826
  args.terms = opts.terms;
41575
42827
  if (opts.collectPaymentDetails !== void 0)
41576
42828
  args.collect_payment_details = opts.collectPaymentDetails;
41577
- if (opts.collectCustomPropertyIds !== void 0)
41578
- args.collect_custom_property_ids = opts.collectCustomPropertyIds;
41579
- if (opts.contractClauseIds !== void 0)
41580
- args.contract_clause_ids = opts.contractClauseIds;
41581
42829
  if (opts.requireTaxId !== void 0)
41582
42830
  args.require_tax_id = opts.requireTaxId;
41583
42831
  if (opts.displayQuoteValue !== void 0)
@@ -41602,12 +42850,16 @@ Examples:
41602
42850
  args.template_id = opts.templateId;
41603
42851
  if (opts.expiresAt !== void 0)
41604
42852
  args.expires_at = opts.expiresAt;
41605
- if (opts.subscription !== void 0)
41606
- args.subscription = opts.subscription;
41607
- if (opts.invoice !== void 0)
41608
- args.invoice = opts.invoice;
41609
42853
  if (opts.amount !== void 0)
41610
42854
  args.amount = Number(opts.amount);
42855
+ if (opts.collectCustomPropertyIds !== void 0)
42856
+ args.collect_custom_property_ids = JSON.parse(opts.collectCustomPropertyIds);
42857
+ if (opts.contractClauseIds !== void 0)
42858
+ args.contract_clause_ids = JSON.parse(opts.contractClauseIds);
42859
+ if (opts.subscription !== void 0)
42860
+ args.subscription = JSON.parse(opts.subscription);
42861
+ if (opts.invoice !== void 0)
42862
+ args.invoice = JSON.parse(opts.invoice);
41611
42863
  await ctx.execute({
41612
42864
  method: "POST",
41613
42865
  path: "/v1/quotes",
@@ -41834,15 +43086,15 @@ Examples:
41834
43086
  queryParamKeys: []
41835
43087
  });
41836
43088
  });
41837
- resource.command("update").description(`Update quote-level fields before a quote is finalized. On draft quotes, pass \`subscription\` to create or replace the draft subscription configuration, or pass \`invoice\` on a one-off quote to replace the linked draft invoice. For quotes created from \`template_id\`, use this tool for subscription overrides such as dates, contract terms, products, phases, coupons, discounts, prices, seats, and subscription custom properties. Omit \`terms\`, \`comments\`, and \`contract_clause_ids\` unless deliberately overriding template content.`).requiredOption("--id <value>", `id parameter`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. Set to \`null\` to clear the manually set value.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <value>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
43089
+ resource.command("update").description(`Update quote-level fields before a quote is finalized. On draft quotes, pass \`subscription\` inline \u2014 the full configuration, not a reference to an existing subscription \u2014 to create or replace the draft subscription configuration, or pass \`invoice\` on a one-off quote to replace the linked draft invoice. For quotes created from \`template_id\`, use this tool for subscription overrides such as dates, contract terms, products, phases, coupons, discounts, prices, seats, and subscription custom properties. Omit \`terms\`, \`comments\`, and \`contract_clause_ids\` unless deliberately overriding template content. Discover product and price configuration IDs with \`get_catalog_context\`.`).requiredOption("--id <value>", `id parameter`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner.`).option("--catalog-version-id <value>", `ID of a published catalog version to price every product of the quote from, instead of the live products catalog. A product's own \`catalog_version_id\` takes precedence, and explicit \`prices\` always win over both.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. Set to \`null\` to clear the manually set value.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <json>", `IDs of the customer custom properties required to be filled during the signature flow.`).option("--contract-clause-ids <json>", `IDs of the contract clauses used in the quote terms.`).option("--require-tax-id <value>", `Require the customer to provide a tax ID during the signature flow.`).option("--display-quote-value <value>", `Display the total quote value on the quote.`).option("--display-quote-value-with-tax <value>", `Display the total quote value including tax on the quote. Only applies to \`one_off\` quotes.`).option("--display-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
41838
43090
 
41839
43091
  - \`all\`: Display all pricing tiers.
41840
43092
  - \`matching\`: Only display the tiers used to compute the price based on quantity.
41841
43093
  - \`none\`: Hide all pricing tiers.
41842
- `).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--display-subscription-on-update <value>", `Display subscription details on subscription update quotes.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <value>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <value>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
43094
+ `).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", `
41843
43095
  Examples:
41844
43096
  hyperline quotes update --id <id>
41845
- hyperline quotes update --id <id> --owner-email <owner_email> --comments <comments>
43097
+ hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
41846
43098
  hyperline quotes update --id <id> --output json`).action(async (opts) => {
41847
43099
  const ctx = resource.parent?.opts()._ctx;
41848
43100
  if (!ctx) {
@@ -41854,16 +43106,14 @@ Examples:
41854
43106
  args.id = opts.id;
41855
43107
  if (opts.ownerEmail !== void 0)
41856
43108
  args.owner_email = opts.ownerEmail;
43109
+ if (opts.catalogVersionId !== void 0)
43110
+ args.catalog_version_id = opts.catalogVersionId;
41857
43111
  if (opts.comments !== void 0)
41858
43112
  args.comments = opts.comments;
41859
43113
  if (opts.terms !== void 0)
41860
43114
  args.terms = opts.terms;
41861
43115
  if (opts.collectPaymentDetails !== void 0)
41862
43116
  args.collect_payment_details = opts.collectPaymentDetails;
41863
- if (opts.collectCustomPropertyIds !== void 0)
41864
- args.collect_custom_property_ids = opts.collectCustomPropertyIds;
41865
- if (opts.contractClauseIds !== void 0)
41866
- args.contract_clause_ids = opts.contractClauseIds;
41867
43117
  if (opts.requireTaxId !== void 0)
41868
43118
  args.require_tax_id = opts.requireTaxId;
41869
43119
  if (opts.displayQuoteValue !== void 0)
@@ -41888,12 +43138,16 @@ Examples:
41888
43138
  args.crm_opportunity_id = opts.crmOpportunityId;
41889
43139
  if (opts.expiresAt !== void 0)
41890
43140
  args.expires_at = opts.expiresAt;
41891
- if (opts.subscription !== void 0)
41892
- args.subscription = opts.subscription;
41893
- if (opts.invoice !== void 0)
41894
- args.invoice = opts.invoice;
41895
43141
  if (opts.amount !== void 0)
41896
43142
  args.amount = Number(opts.amount);
43143
+ if (opts.collectCustomPropertyIds !== void 0)
43144
+ args.collect_custom_property_ids = JSON.parse(opts.collectCustomPropertyIds);
43145
+ if (opts.contractClauseIds !== void 0)
43146
+ args.contract_clause_ids = JSON.parse(opts.contractClauseIds);
43147
+ if (opts.subscription !== void 0)
43148
+ args.subscription = JSON.parse(opts.subscription);
43149
+ if (opts.invoice !== void 0)
43150
+ args.invoice = JSON.parse(opts.invoice);
41897
43151
  await ctx.execute({
41898
43152
  method: "PATCH",
41899
43153
  path: "/v1/quotes/{id}",
@@ -42192,7 +43446,7 @@ Examples:
42192
43446
  // build/commands/generated/subscriptions.js
42193
43447
  function registerSubscriptionsCommands(parent) {
42194
43448
  const resource = parent.command("subscriptions").description("Manage subscriptions");
42195
- resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
43449
+ resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--type <value>", `type`).requiredOption("--payload <json>", `payload`).addHelpText("after", `
42196
43450
  Examples:
42197
43451
  hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
42198
43452
  hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at> --charge-at <charge_at>
@@ -42222,7 +43476,7 @@ Examples:
42222
43476
  if (opts.type !== void 0)
42223
43477
  args.type = opts.type;
42224
43478
  if (opts.payload !== void 0)
42225
- args.payload = opts.payload;
43479
+ args.payload = JSON.parse(opts.payload);
42226
43480
  await ctx.execute({
42227
43481
  method: "POST",
42228
43482
  path: "/v1/subscriptions/{id}/update",
@@ -42230,7 +43484,7 @@ Examples:
42230
43484
  queryParamKeys: []
42231
43485
  });
42232
43486
  });
42233
- resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
43487
+ resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <json>", `updates`).addHelpText("after", `
42234
43488
  Examples:
42235
43489
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
42236
43490
  hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -42258,7 +43512,7 @@ Examples:
42258
43512
  if (opts.refundMethod !== void 0)
42259
43513
  args.refund_method = opts.refundMethod;
42260
43514
  if (opts.updates !== void 0)
42261
- args.updates = opts.updates;
43515
+ args.updates = JSON.parse(opts.updates);
42262
43516
  await ctx.execute({
42263
43517
  method: "POST",
42264
43518
  path: "/v1/subscriptions/{id}/update-many",
@@ -42394,7 +43648,7 @@ Examples:
42394
43648
  queryParamKeys: []
42395
43649
  });
42396
43650
  });
42397
- resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
43651
+ resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).option("--precision <value>", `Granularity used to prorate the update amount. Defaults to 'calendar_days' when omitted, prorating on whole calendar days; 'milliseconds' prorates on the exact elapsed time, charging the precise partial period.`).option("--refund-method <value>", `Override the refund destination when the update generates a refund credit note (e.g. seat reduction). When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).requiredOption("--updates <json>", `updates`).addHelpText("after", `
42398
43652
  Examples:
42399
43653
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
42400
43654
  hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
@@ -42422,7 +43676,7 @@ Examples:
42422
43676
  if (opts.refundMethod !== void 0)
42423
43677
  args.refund_method = opts.refundMethod;
42424
43678
  if (opts.updates !== void 0)
42425
- args.updates = opts.updates;
43679
+ args.updates = JSON.parse(opts.updates);
42426
43680
  await ctx.execute({
42427
43681
  method: "POST",
42428
43682
  path: "/v1/subscriptions/{id}/simulate-updates",
@@ -42430,14 +43684,14 @@ Examples:
42430
43684
  queryParamKeys: []
42431
43685
  });
42432
43686
  });
42433
- resource.command("create").description(`Create a new subscription from a template, plan, or manually with products and phases. Requires a customer_id and at least one of: template_id, template_configuration_id, products, or phases.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--activation-strategy <value>", `
43687
+ resource.command("create").description(`Create a new subscription. Requires \`customer_id\` plus one source: \`template_id\` (optionally with \`template_configuration_id\`) to instantiate a subscription template; flat \`products\` with a top-level \`activation_strategy\`; or explicit \`phases\`, where each phase needs \`activation_strategy\`, \`end_strategy\`, \`billing_date_setting\`, and \`products\` (each with \`id\`, usually a \`payment_interval\`). \`contract_terms\` requires both \`activation_strategy\` and \`end_strategy\`. Discover product and price configuration IDs with \`get_catalog_context\`; validate the exact payload first with \`simulate_create_subscription\` (identical schema, nothing persisted).`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--activation-strategy <value>", `
42434
43688
  Strategy used to activate the subscription.
42435
43689
 
42436
43690
  - \`start_date\`: The subscription will become active on the specified start date. If the start date is in the past, it will be activated immediately.
42437
43691
  - \`manually\`: The subscription requires activation through a manual action.
42438
43692
  - \`checkout\`: The subscription will be activated once the checkout is completed, but only if the start date is in the past. Otherwise, activation will occur later on the specified start date.
42439
43693
  - \`quote\`: The subscription will be activated depending on the configuration and the signature of the related quote.
42440
- `).option("--products <value>", `Products that make up the subscription.`).option("--coupons <value>", `coupons`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--contract-terms <value>", `Contract terms linked to the subscription.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancellation-strategy <value>", `
43694
+ `).option("--products <json>", `Products that make up the subscription.`).option("--coupons <json>", `coupons`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the subscription. If not defined, fallback to customer's invoicing entity.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--contract-terms <json>", `Contract terms linked to the subscription.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancellation-strategy <value>", `
42441
43695
  Strategy used to cancel the subscription. If not specified \`do_nothing\` is used.
42442
43696
 
42443
43697
  - \`charge_prorata\`: Will charge the customer the unpaid amount for the prorated period up to the end of the current period.
@@ -42446,23 +43700,23 @@ Strategy used to cancel the subscription. If not specified \`do_nothing\` is use
42446
43700
  - \`refund_custom\`: Will refund to the customer a custom amount.
42447
43701
  - \`end_of_period\`: Will cancel the subscription at the end date of the current billing period.
42448
43702
  - \`do_nothing\`: Will only cease the subscription without any additional actions.
42449
- `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--cancellation-refund-method <value>", `Override the refund destination for credit notes generated by \`refund_prorata\` / \`refund_custom\` cancellation strategies. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
43703
+ `).option("--cancellation-amount <number>", `Custom amount used when cancelling the subscription. Only applies to the \`charge_custom\` or the \`refund_custom\` cancellation strategy.`).option("--cancellation-refund-method <value>", `Override the refund destination for credit notes generated by \`refund_prorata\` / \`refund_custom\` cancellation strategies. When omitted, falls back to the invoicing entity's \`creditNoteWalletRefundEnabled\` setting.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42450
43704
  Defines when invoices are generated relative to the billing period.
42451
43705
 
42452
43706
  - \`period_start\`: Invoices are generated at the start of the billing period.
42453
43707
  - \`period_end\`: Invoices are generated at the end of the billing period.
42454
- `).option("--template-id <value>", `ID of the template that the subscription is linked to.`).option("--template-configuration-id <value>", `ID of the template configuration that the subscription is linked to.`).option("--trial <value>", `Create a free trial phase based on the plan configuration. Only applies if a \`plan_id\` is provided.`).option("--payment-method-strategy <value>", `
43708
+ `).option("--template-id <value>", `ID of the template that the subscription is linked to.`).option("--template-configuration-id <value>", `ID of the template configuration that the subscription is linked to.`).option("--trial <json>", `Create a free trial phase based on the plan configuration. Only applies if a \`plan_id\` is provided.`).option("--payment-method-strategy <value>", `
42455
43709
  Payment method strategy used to bill the subscription. By default, the current payment method of the customer will be used.
42456
43710
 
42457
43711
  - \`new\`: Ask the customer for a new payment method. The customer can fill in their payment method either on the subscription's checkout session or on their portal page.
42458
43712
  - \`current\`: Use the current default payment method of the customer.
42459
43713
  - \`external\`: Manage the payments of the subscription outside of Hyperline.
42460
- `).option("--available-payment-method-types <value>", `Set the allowed types of payment methods for the customer. Only applies to the \`new\` payment method strategy.`).option("--billing-cycle-alignment <value>", `
42461
- Alignment of product billing cycles. Only applies when creating a subscription from a plan.
43714
+ `).option("--available-payment-method-types <json>", `Set the allowed types of payment methods for the customer. Only applies to the \`new\` payment method strategy.`).option("--billing-cycle-alignment <value>", `
43715
+ Alignment of product billing cycles. Only applies when creating a subscription from a plan. If omitted, the billing cycles alignment configured in the account subscription settings applies.
42462
43716
 
42463
43717
  - \`calendar_period\`: The billing cycles of the products will be aligned on the calendar period, after the first period which will be invoiced taking into account the prorata of the first cycle compared to the product periodicity.
42464
43718
  - \`anniversary\`: The billing cycles of the products will be aligned on the anniversary of the phase initial billing date.
42465
- `).option("--checkout-session <value>", `Checkout session of the subscription.`).option("--phases <value>", `phases`).addHelpText("after", `
43719
+ `).option("--checkout-session <json>", `Checkout session of the subscription.`).option("--phases <json>", `phases`).addHelpText("after", `
42466
43720
  Examples:
42467
43721
  hyperline subscriptions create --customer-id <customer_id>
42468
43722
  hyperline subscriptions create --customer-id <customer_id> --activation-strategy <activation_strategy> --products <products>
@@ -42477,10 +43731,6 @@ Examples:
42477
43731
  args.customer_id = opts.customerId;
42478
43732
  if (opts.activationStrategy !== void 0)
42479
43733
  args.activation_strategy = opts.activationStrategy;
42480
- if (opts.products !== void 0)
42481
- args.products = opts.products;
42482
- if (opts.coupons !== void 0)
42483
- args.coupons = opts.coupons;
42484
43734
  if (opts.name !== void 0)
42485
43735
  args.name = opts.name;
42486
43736
  if (opts.purchaseOrder !== void 0)
@@ -42489,8 +43739,6 @@ Examples:
42489
43739
  args.invoicing_entity_id = opts.invoicingEntityId;
42490
43740
  if (opts.crmOpportunityId !== void 0)
42491
43741
  args.crm_opportunity_id = opts.crmOpportunityId;
42492
- if (opts.contractTerms !== void 0)
42493
- args.contract_terms = opts.contractTerms;
42494
43742
  if (opts.startsAt !== void 0)
42495
43743
  args.starts_at = opts.startsAt;
42496
43744
  if (opts.initialBillingAt !== void 0)
@@ -42503,10 +43751,6 @@ Examples:
42503
43751
  args.cancellation_strategy = opts.cancellationStrategy;
42504
43752
  if (opts.cancellationRefundMethod !== void 0)
42505
43753
  args.cancellation_refund_method = opts.cancellationRefundMethod;
42506
- if (opts.properties !== void 0)
42507
- args.properties = opts.properties;
42508
- if (opts.customProperties !== void 0)
42509
- args.custom_properties = opts.customProperties;
42510
43754
  if (opts.taxOnly !== void 0)
42511
43755
  args.tax_only = opts.taxOnly;
42512
43756
  if (opts.generateDraftInvoices !== void 0)
@@ -42527,22 +43771,32 @@ Examples:
42527
43771
  args.template_id = opts.templateId;
42528
43772
  if (opts.templateConfigurationId !== void 0)
42529
43773
  args.template_configuration_id = opts.templateConfigurationId;
42530
- if (opts.trial !== void 0)
42531
- args.trial = opts.trial;
42532
43774
  if (opts.paymentMethodStrategy !== void 0)
42533
43775
  args.payment_method_strategy = opts.paymentMethodStrategy;
42534
- if (opts.availablePaymentMethodTypes !== void 0)
42535
- args.available_payment_method_types = opts.availablePaymentMethodTypes;
42536
43776
  if (opts.billingCycleAlignment !== void 0)
42537
43777
  args.billing_cycle_alignment = opts.billingCycleAlignment;
42538
- if (opts.checkoutSession !== void 0)
42539
- args.checkout_session = opts.checkoutSession;
42540
- if (opts.phases !== void 0)
42541
- args.phases = opts.phases;
42542
43778
  if (opts.minimumInvoiceFee !== void 0)
42543
43779
  args.minimum_invoice_fee = Number(opts.minimumInvoiceFee);
42544
43780
  if (opts.cancellationAmount !== void 0)
42545
43781
  args.cancellation_amount = Number(opts.cancellationAmount);
43782
+ if (opts.products !== void 0)
43783
+ args.products = JSON.parse(opts.products);
43784
+ if (opts.coupons !== void 0)
43785
+ args.coupons = JSON.parse(opts.coupons);
43786
+ if (opts.contractTerms !== void 0)
43787
+ args.contract_terms = JSON.parse(opts.contractTerms);
43788
+ if (opts.properties !== void 0)
43789
+ args.properties = JSON.parse(opts.properties);
43790
+ if (opts.customProperties !== void 0)
43791
+ args.custom_properties = JSON.parse(opts.customProperties);
43792
+ if (opts.trial !== void 0)
43793
+ args.trial = JSON.parse(opts.trial);
43794
+ if (opts.availablePaymentMethodTypes !== void 0)
43795
+ args.available_payment_method_types = JSON.parse(opts.availablePaymentMethodTypes);
43796
+ if (opts.checkoutSession !== void 0)
43797
+ args.checkout_session = JSON.parse(opts.checkoutSession);
43798
+ if (opts.phases !== void 0)
43799
+ args.phases = JSON.parse(opts.phases);
42546
43800
  await ctx.execute({
42547
43801
  method: "POST",
42548
43802
  path: "/v2/subscriptions",
@@ -42550,7 +43804,16 @@ Examples:
42550
43804
  queryParamKeys: []
42551
43805
  });
42552
43806
  });
42553
- resource.command("list").description(`List subscriptions with filters for activation_strategy, status, currency, plan_id, original_quote_id, integration_entity_id, customer_id, invoicing_entity_id, purchase_order, updated_at, custom_properties. Draft, voided, and cancelled excluded by default. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--activation-strategy <value>", `activation_strategy`).option("--activation-strategy.in <value>", `activation_strategy__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("--plan-id <value>", `plan_id`).option("--plan-id.not <value>", `plan_id__not`).option("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--plan-id.equals <value>", `plan_id__equals`).option("--plan-id.contains <value>", `plan_id__contains`).option("--plan-id.starts-with <value>", `plan_id__startsWith`).option("--plan-id.end-with <value>", `plan_id__endWith`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--original-quote-id.equals <value>", `original_quote_id__equals`).option("--original-quote-id.contains <value>", `original_quote_id__contains`).option("--original-quote-id.starts-with <value>", `original_quote_id__startsWith`).option("--original-quote-id.end-with <value>", `original_quote_id__endWith`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--purchase-order.equals <value>", `purchase_order__equals`).option("--purchase-order.contains <value>", `purchase_order__contains`).option("--purchase-order.starts-with <value>", `purchase_order__startsWith`).option("--purchase-order.end-with <value>", `purchase_order__endWith`).option("--custom-properties <value>", `custom_properties`).option("--invoice-drafts <value>", `invoice_drafts`).option("--integration-entity-id <value>", `integration_entity_id`).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", `
43807
+ resource.command("list").description(`List subscriptions with filters for activation_strategy, status, currency, plan_id, original_quote_id, integration_entity_id, customer_id, invoicing_entity_id, purchase_order, updated_at, custom_properties. Draft, voided, cancelled and archived excluded by default (status=all applies the same exclusion); status=any returns every status. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--activation-strategy <value>", `activation_strategy`).option("--activation-strategy.in <value>", `activation_strategy__in`).option("--status <value>", `
43808
+ Subscription status filter.
43809
+
43810
+ - \`active\`, \`pending\`, \`paused\`, \`errored\`, \`cancelled\`, \`draft\`, \`voided\`, \`archived\`: match that status.
43811
+ - \`inactive\`: shortcut for \`pending\` + \`paused\`.
43812
+ - \`all\`: every status except \`draft\`, \`voided\`, \`cancelled\` and \`archived\` \u2014 the same exclusion as omitting the filter.
43813
+ - \`any\`: every status, no exclusion.
43814
+
43815
+ Use \`status__in\` with comma-separated values to combine statuses. When the filter is omitted, \`draft\`, \`voided\`, \`cancelled\` and \`archived\` subscriptions are excluded.
43816
+ `).option("--status.in <value>", `Comma-separated list of subscription statuses to include. Same values as \`status\`.`).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("--plan-id <value>", `plan_id`).option("--plan-id.not <value>", `plan_id__not`).option("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--plan-id.equals <value>", `plan_id__equals`).option("--plan-id.contains <value>", `plan_id__contains`).option("--plan-id.starts-with <value>", `plan_id__startsWith`).option("--plan-id.end-with <value>", `plan_id__endWith`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--original-quote-id.equals <value>", `original_quote_id__equals`).option("--original-quote-id.contains <value>", `original_quote_id__contains`).option("--original-quote-id.starts-with <value>", `original_quote_id__startsWith`).option("--original-quote-id.end-with <value>", `original_quote_id__endWith`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--purchase-order.equals <value>", `purchase_order__equals`).option("--purchase-order.contains <value>", `purchase_order__contains`).option("--purchase-order.starts-with <value>", `purchase_order__startsWith`).option("--purchase-order.end-with <value>", `purchase_order__endWith`).option("--custom-properties <value>", `custom_properties`).option("--invoice-drafts <value>", `invoice_drafts`).option("--integration-entity-id <value>", `integration_entity_id`).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", `
42554
43817
  Examples:
42555
43818
  hyperline subscriptions list
42556
43819
  hyperline subscriptions list --take <take> --activation-strategy <activation_strategy>`).action(async (opts) => {
@@ -42785,12 +44048,12 @@ Examples:
42785
44048
  queryParamKeys: []
42786
44049
  });
42787
44050
  });
42788
- resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Draft quote subscription configuration must be updated through PATCH /v1/quotes/{id}.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
44051
+ resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Pending phases are replaced by the provided array. Discover product and price configuration IDs with \`get_catalog_context\`. Draft quote subscription configuration must be updated through \`update_quote\`, not here.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
42789
44052
  Defines when invoices are generated relative to the billing period.
42790
44053
 
42791
44054
  - \`period_start\`: Invoices are generated at the start of the billing period.
42792
44055
  - \`period_end\`: Invoices are generated at the end of the billing period.
42793
- `).option("--estimated-arr <number>", `Estimated Annual Recurring Revenue generated by the subscription.`).option("--contract-value <number>", `Contract value of the subscription. This value is overridable by the user.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).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("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--phases <value>", `Array of subscription phases. Existing pending phases will be replaced by the ones in the array.`).option("--contract-terms <value>", `Contract terms to update.`).addHelpText("after", `
44056
+ `).option("--estimated-arr <number>", `Estimated Annual Recurring Revenue generated by the subscription.`).option("--contract-value <number>", `Contract value of the subscription. This value is overridable by the user.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--phases <json>", `Array of subscription phases. Existing pending phases will be replaced by the ones in the array.`).option("--contract-terms <json>", `Contract terms to update.`).addHelpText("after", `
42794
44057
  Examples:
42795
44058
  hyperline subscriptions update --id <id>
42796
44059
  hyperline subscriptions update --id <id> --name <name> --purchase-order <purchase_order>
@@ -42831,22 +44094,22 @@ Examples:
42831
44094
  args.initial_billing_at = opts.initialBillingAt;
42832
44095
  if (opts.cancelAt !== void 0)
42833
44096
  args.cancel_at = opts.cancelAt;
42834
- if (opts.properties !== void 0)
42835
- args.properties = opts.properties;
42836
- if (opts.customProperties !== void 0)
42837
- args.custom_properties = opts.customProperties;
42838
44097
  if (opts.displayShippingDetails !== void 0)
42839
44098
  args.display_shipping_details = opts.displayShippingDetails;
42840
- if (opts.phases !== void 0)
42841
- args.phases = opts.phases;
42842
- if (opts.contractTerms !== void 0)
42843
- args.contract_terms = opts.contractTerms;
42844
44099
  if (opts.minimumInvoiceFee !== void 0)
42845
44100
  args.minimum_invoice_fee = Number(opts.minimumInvoiceFee);
42846
44101
  if (opts.estimatedArr !== void 0)
42847
44102
  args.estimated_arr = Number(opts.estimatedArr);
42848
44103
  if (opts.contractValue !== void 0)
42849
44104
  args.contract_value = Number(opts.contractValue);
44105
+ if (opts.properties !== void 0)
44106
+ args.properties = JSON.parse(opts.properties);
44107
+ if (opts.customProperties !== void 0)
44108
+ args.custom_properties = JSON.parse(opts.customProperties);
44109
+ if (opts.phases !== void 0)
44110
+ args.phases = JSON.parse(opts.phases);
44111
+ if (opts.contractTerms !== void 0)
44112
+ args.contract_terms = JSON.parse(opts.contractTerms);
42850
44113
  await ctx.execute({
42851
44114
  method: "PUT",
42852
44115
  path: "/v2/subscriptions/{id}",
@@ -43177,7 +44440,7 @@ Examples:
43177
44440
  ]
43178
44441
  });
43179
44442
  });
43180
- 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. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) 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' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved \u2014 use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns 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", `
44443
+ resource.command("create-subscription-transition").description(`Submit a transition from one subscription to another. The result may be pending approval, 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. 'pro_rata_separate_documents' issues a credit note for the current period (the amount invoiced when 'last_renewal', otherwise a prorated cancellation credit) 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' (the default) keeps the current billing cycle dates; the request is rejected when the phases share no product billing periodicity, as the cycle cannot then be preserved \u2014 use 'align_to_new_billing_cycle' in that case. 'align_to_new_billing_cycle' aligns 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 <json>", `The configuration of the subscription to transition to`).addHelpText("after", `
43181
44444
  Examples:
43182
44445
  hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription>
43183
44446
  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>
@@ -43201,7 +44464,7 @@ Examples:
43201
44464
  if (opts.transitionDate !== void 0)
43202
44465
  args.transition_date = opts.transitionDate;
43203
44466
  if (opts.targetSubscription !== void 0)
43204
- args.target_subscription = opts.targetSubscription;
44467
+ args.target_subscription = JSON.parse(opts.targetSubscription);
43205
44468
  await ctx.execute({
43206
44469
  method: "POST",
43207
44470
  path: "/v2/subscriptions/transitions",
@@ -43394,6 +44657,66 @@ Examples:
43394
44657
  // build/commands/generated/transactions.js
43395
44658
  function registerTransactionsCommands(parent) {
43396
44659
  const resource = parent.command("transactions").description("Manage transactions");
44660
+ resource.command("create").description(`Record an offline payment, refund, or chargeback; this records money already moved and does not initiate a payment.`).requiredOption("--customer-id <value>", `ID of the customer linked to the transaction.`).requiredOption("--amount <number>", `Positive transaction amount in the customer's currency's smallest unit.`).requiredOption("--date <value>", `Date when the offline transaction settled.`).option("--payment-method-type <value>", `Offline payment method: bank transfer or external payment.`).option("--bank-account-id <value>", `Bank account for a transfer, in the customer's currency; not allowed for external payments.`).requiredOption("--type <value>", `Type of offline transaction to record.`).option("--reference <value>", `Optional reference identifying the offline payment.`).option("--original-transaction-id <value>", `Original payment transaction ID for a refund or chargeback.`).addHelpText("after", `
44661
+ Examples:
44662
+ hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type>
44663
+ hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type> --payment-method-type <payment_method_type> --bank-account-id <bank_account_id>
44664
+ hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type> --output json`).action(async (opts) => {
44665
+ const ctx = resource.parent?.opts()._ctx;
44666
+ if (!ctx) {
44667
+ process.stderr.write("Error: Not authenticated\n");
44668
+ process.exit(1);
44669
+ }
44670
+ const args = {};
44671
+ if (opts.customerId !== void 0)
44672
+ args.customer_id = opts.customerId;
44673
+ if (opts.date !== void 0)
44674
+ args.date = opts.date;
44675
+ if (opts.paymentMethodType !== void 0)
44676
+ args.payment_method_type = opts.paymentMethodType;
44677
+ if (opts.bankAccountId !== void 0)
44678
+ args.bank_account_id = opts.bankAccountId;
44679
+ if (opts.type !== void 0)
44680
+ args.type = opts.type;
44681
+ if (opts.reference !== void 0)
44682
+ args.reference = opts.reference;
44683
+ if (opts.originalTransactionId !== void 0)
44684
+ args.original_transaction_id = opts.originalTransactionId;
44685
+ if (opts.amount !== void 0)
44686
+ args.amount = Number(opts.amount);
44687
+ await ctx.execute({
44688
+ method: "POST",
44689
+ path: "/v1/transactions",
44690
+ args,
44691
+ queryParamKeys: []
44692
+ });
44693
+ });
44694
+ resource.command("delete").description(`Delete an unallocated offline transaction with no wallet funding or dependent transactions; this does not reverse a payment.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
44695
+ Examples:
44696
+ hyperline transactions delete --id <id>
44697
+ hyperline transactions delete --id <id> --output json`).action(async (opts) => {
44698
+ const ctx = resource.parent?.opts()._ctx;
44699
+ if (!ctx) {
44700
+ process.stderr.write("Error: Not authenticated\n");
44701
+ process.exit(1);
44702
+ }
44703
+ const args = {};
44704
+ if (opts.id !== void 0)
44705
+ args.id = opts.id;
44706
+ if (!opts.yes) {
44707
+ const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
44708
+ if (!confirmed) {
44709
+ process.stdout.write("Aborted.\n");
44710
+ return;
44711
+ }
44712
+ }
44713
+ await ctx.execute({
44714
+ method: "DELETE",
44715
+ path: "/v1/transactions/{id}",
44716
+ args,
44717
+ queryParamKeys: []
44718
+ });
44719
+ });
43397
44720
  resource.command("list").description(`List transactions across all invoices, including transactions without an invoice allocation. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
43398
44721
  Examples:
43399
44722
  hyperline transactions list
@@ -43473,7 +44796,7 @@ Examples:
43473
44796
  queryParamKeys: []
43474
44797
  });
43475
44798
  });
43476
- resource.command("update-wallet-settings").description(`Update global wallet settings for the account.`).option("--enabled", `Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in \`active\` state and with money.`).option("--allow-free-credits", `Allow top up for free amounts on wallets.`).option("--allow-topup-on-portal", `Allow wallet top up on customer's portal.`).option("--product-ids <value>", `Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.`).addHelpText("after", `
44799
+ resource.command("update-wallet-settings").description(`Update global wallet settings for the account.`).option("--enabled", `Indicates if the wallet feature is enabled or not. If disabled, wallets won't be debited even if they are in \`active\` state and with money.`).option("--allow-free-credits", `Allow top up for free amounts on wallets.`).option("--allow-topup-on-portal", `Allow wallet top up on customer's portal.`).option("--product-ids <json>", `Product IDs on which wallet will apply. If empty, the wallet will apply to all invoice line items.`).addHelpText("after", `
43477
44800
  Examples:
43478
44801
  hyperline wallets update-wallet-settings
43479
44802
  hyperline wallets update-wallet-settings --enabled --allow-free-credits
@@ -43484,14 +44807,14 @@ Examples:
43484
44807
  process.exit(1);
43485
44808
  }
43486
44809
  const args = {};
43487
- if (opts.productIds !== void 0)
43488
- args.product_ids = opts.productIds;
43489
44810
  if (opts.enabled !== void 0)
43490
44811
  args.enabled = true;
43491
44812
  if (opts.allowFreeCredits !== void 0)
43492
44813
  args.allow_free_credits = true;
43493
44814
  if (opts.allowTopupOnPortal !== void 0)
43494
44815
  args.allow_topup_on_portal = true;
44816
+ if (opts.productIds !== void 0)
44817
+ args.product_ids = JSON.parse(opts.productIds);
43495
44818
  await ctx.execute({
43496
44819
  method: "PATCH",
43497
44820
  path: "/v1/wallets/settings",
@@ -43522,7 +44845,7 @@ Examples:
43522
44845
  queryParamKeys: ["customer_id", "take", "skip"]
43523
44846
  });
43524
44847
  });
43525
- resource.command("create").description(`Create a new prepaid wallet for a customer with an initial balance and currency.`).requiredOption("--customer-id <value>", `Wallet customer ID.`).option("--low-projected-balance-threshold <number>", `Threshold indicating a low level of wallet projected balance.`).requiredOption("--is-auto-load-enabled <value>", `Indicates if the wallet is auto-loaded regularly.`).option("--auto-load-type <value>", `Indicates if the auto-load is free or paid.`).option("--auto-load-amount <number>", `Amount to auto-load. Expressed in currency's smallest unit.`).option("--auto-load-reset", `Indicates if the wallet amount must be reset before auto-load.`).option("--auto-load-interval <value>", `Interval indicating how often the wallet is auto-loaded.`).option("--auto-load-next-date <value>", `Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--auto-load-threshold <number>", `Threshold to auto-load. Expressed in currency's smallest unit.`).addHelpText("after", `
44848
+ resource.command("create").description(`Create a new prepaid wallet for a customer with an initial balance and currency.`).requiredOption("--customer-id <value>", `Wallet customer ID.`).option("--low-projected-balance-threshold <number>", `Threshold indicating a low level of wallet projected balance.`).requiredOption("--is-auto-load-enabled <value>", `Indicates if the wallet is auto-loaded regularly.`).option("--auto-load-type <value>", `Indicates if the auto-load is free or paid.`).option("--auto-load-amount <number>", `Amount to auto-load. Expressed in currency's smallest unit.`).option("--auto-load-reset", `Indicates if the wallet amount must be reset before auto-load.`).option("--auto-load-interval <json>", `Interval indicating how often the wallet is auto-loaded.`).option("--auto-load-next-date <value>", `Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--auto-load-threshold <number>", `Threshold to auto-load. Expressed in currency's smallest unit.`).addHelpText("after", `
43526
44849
  Examples:
43527
44850
  hyperline wallets create --customer-id <customer_id> --is-auto-load-enabled <is_auto_load_enabled>
43528
44851
  hyperline wallets create --customer-id <customer_id> --is-auto-load-enabled <is_auto_load_enabled> --low-projected-balance-threshold <low_projected_balance_threshold> --auto-load-type <auto_load_type>
@@ -43539,8 +44862,6 @@ Examples:
43539
44862
  args.is_auto_load_enabled = opts.isAutoLoadEnabled;
43540
44863
  if (opts.autoLoadType !== void 0)
43541
44864
  args.auto_load_type = opts.autoLoadType;
43542
- if (opts.autoLoadInterval !== void 0)
43543
- args.auto_load_interval = opts.autoLoadInterval;
43544
44865
  if (opts.autoLoadNextDate !== void 0)
43545
44866
  args.auto_load_next_date = opts.autoLoadNextDate;
43546
44867
  if (opts.lowProjectedBalanceThreshold !== void 0)
@@ -43551,6 +44872,8 @@ Examples:
43551
44872
  args.auto_load_threshold = Number(opts.autoLoadThreshold);
43552
44873
  if (opts.autoLoadReset !== void 0)
43553
44874
  args.auto_load_reset = true;
44875
+ if (opts.autoLoadInterval !== void 0)
44876
+ args.auto_load_interval = JSON.parse(opts.autoLoadInterval);
43554
44877
  await ctx.execute({
43555
44878
  method: "POST",
43556
44879
  path: "/v1/wallets",
@@ -43576,7 +44899,7 @@ Examples:
43576
44899
  queryParamKeys: []
43577
44900
  });
43578
44901
  });
43579
- resource.command("update").description(`Update a wallet's configuration (e.g. name, auto-topup settings).`).requiredOption("--id <value>", `id parameter`).option("--state <value>", `Wallet state.`).option("--low-projected-balance-threshold <number>", `Threshold indicating a low level of wallet projected balance.`).requiredOption("--is-auto-load-enabled <value>", `Indicates if the wallet is auto-loaded regularly.`).option("--auto-load-type <value>", `Indicates if the auto-load is free or paid.`).option("--auto-load-amount <number>", `Amount to auto-load. Expressed in currency's smallest unit.`).option("--auto-load-reset", `Indicates if the wallet amount must be reset before auto-load.`).option("--auto-load-interval <value>", `Interval indicating how often the wallet is auto-loaded.`).option("--auto-load-next-date <value>", `Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--auto-load-threshold <number>", `Threshold to auto-load. Expressed in currency's smallest unit.`).addHelpText("after", `
44902
+ resource.command("update").description(`Update a wallet's configuration (e.g. name, auto-topup settings).`).requiredOption("--id <value>", `id parameter`).option("--state <value>", `Wallet state.`).option("--low-projected-balance-threshold <number>", `Threshold indicating a low level of wallet projected balance.`).requiredOption("--is-auto-load-enabled <value>", `Indicates if the wallet is auto-loaded regularly.`).option("--auto-load-type <value>", `Indicates if the auto-load is free or paid.`).option("--auto-load-amount <number>", `Amount to auto-load. Expressed in currency's smallest unit.`).option("--auto-load-reset", `Indicates if the wallet amount must be reset before auto-load.`).option("--auto-load-interval <json>", `Interval indicating how often the wallet is auto-loaded.`).option("--auto-load-next-date <value>", `Date on which the next auto-load will be executed. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--auto-load-threshold <number>", `Threshold to auto-load. Expressed in currency's smallest unit.`).addHelpText("after", `
43580
44903
  Examples:
43581
44904
  hyperline wallets update --id <id> --is-auto-load-enabled <is_auto_load_enabled>
43582
44905
  hyperline wallets update --id <id> --is-auto-load-enabled <is_auto_load_enabled> --state <state> --low-projected-balance-threshold <low_projected_balance_threshold>
@@ -43595,8 +44918,6 @@ Examples:
43595
44918
  args.is_auto_load_enabled = opts.isAutoLoadEnabled;
43596
44919
  if (opts.autoLoadType !== void 0)
43597
44920
  args.auto_load_type = opts.autoLoadType;
43598
- if (opts.autoLoadInterval !== void 0)
43599
- args.auto_load_interval = opts.autoLoadInterval;
43600
44921
  if (opts.autoLoadNextDate !== void 0)
43601
44922
  args.auto_load_next_date = opts.autoLoadNextDate;
43602
44923
  if (opts.lowProjectedBalanceThreshold !== void 0)
@@ -43607,6 +44928,8 @@ Examples:
43607
44928
  args.auto_load_threshold = Number(opts.autoLoadThreshold);
43608
44929
  if (opts.autoLoadReset !== void 0)
43609
44930
  args.auto_load_reset = true;
44931
+ if (opts.autoLoadInterval !== void 0)
44932
+ args.auto_load_interval = JSON.parse(opts.autoLoadInterval);
43610
44933
  await ctx.execute({
43611
44934
  method: "PUT",
43612
44935
  path: "/v1/wallets/{id}",
@@ -43614,7 +44937,7 @@ Examples:
43614
44937
  queryParamKeys: []
43615
44938
  });
43616
44939
  });
43617
- resource.command("load").description(`Add paid credits by charging the customer's payment method, or add free credits by issuing a credit note.`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Wallet load type. Use \`paid\` to collect payment from the customer's payment method, or \`free\` to grant credits without collecting payment.`).option("--amount <number>", `Amount to be loaded onto the wallet as free credits. A corresponding credit note will be generated and no payment is collected. Expressed in currency's smallest unit.`).option("--comment <value>", `Internal comment stored on the wallet transaction for context.`).option("--document-status <value>", `Indicates the status of the generated credit note for free top-ups.`).option("--bank-account-id <value>", `Bank account ID to use when recording a paid wallet load by bank transfer.`).option("--reference <value>", `Reference stored on the generated payment document for a paid wallet load.`).addHelpText("after", `
44940
+ resource.command("load").description(`Add free credits, load selected line items from a paid invoice, apply unallocated funds from an existing payment transaction, or record a new paid transaction.`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Wallet load type. Use \`paid\` to load paid invoice line items, apply an existing payment transaction, or record a new one, or \`free\` to grant credits without collecting payment.`).option("--amount <number>", `Amount to be loaded onto the wallet as free credits. A corresponding credit note will be generated and no payment is collected. Expressed in currency's smallest unit.`).option("--comment <value>", `Internal comment stored on the wallet transaction for context.`).option("--document-status <value>", `Indicates the status of the generated credit note for free top-ups.`).option("--transaction-id <value>", `Existing payment transaction ID whose unallocated amount will be loaded onto the wallet.`).option("--invoice-id <value>", `Paid invoice ID whose selected line items will be loaded onto the wallet.`).option("--invoice-line-item-ids <json>", `IDs of paid invoice line items whose combined amount will be loaded onto the wallet.`).option("--date <value>", `Date of the new offline payment transaction recorded for the wallet load. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--bank-account-id <value>", `Bank account ID to use when recording a new paid wallet load by bank transfer.`).option("--reference <value>", `Reference stored on the new payment transaction for a paid wallet load.`).addHelpText("after", `
43618
44941
  Examples:
43619
44942
  hyperline wallets load --id <id>
43620
44943
  hyperline wallets load --id <id> --type <type> --amount <amount>
@@ -43633,12 +44956,20 @@ Examples:
43633
44956
  args.comment = opts.comment;
43634
44957
  if (opts.documentStatus !== void 0)
43635
44958
  args.document_status = opts.documentStatus;
44959
+ if (opts.transactionId !== void 0)
44960
+ args.transaction_id = opts.transactionId;
44961
+ if (opts.invoiceId !== void 0)
44962
+ args.invoice_id = opts.invoiceId;
44963
+ if (opts.date !== void 0)
44964
+ args.date = opts.date;
43636
44965
  if (opts.bankAccountId !== void 0)
43637
44966
  args.bank_account_id = opts.bankAccountId;
43638
44967
  if (opts.reference !== void 0)
43639
44968
  args.reference = opts.reference;
43640
44969
  if (opts.amount !== void 0)
43641
44970
  args.amount = Number(opts.amount);
44971
+ if (opts.invoiceLineItemIds !== void 0)
44972
+ args.invoice_line_item_ids = JSON.parse(opts.invoiceLineItemIds);
43642
44973
  await ctx.execute({
43643
44974
  method: "POST",
43644
44975
  path: "/v1/wallets/{id}/load",
@@ -43749,7 +45080,7 @@ Examples:
43749
45080
  queryParamKeys: []
43750
45081
  });
43751
45082
  });
43752
- resource.command("create-webhook-endpoint").description(`Create a new webhook endpoint with a URL and list of event types to subscribe to.`).option("--description <value>", `Webhook endpoint description.`).requiredOption("--url <value>", `Webhook endpoint URL.`).option("--secret <value>", `Webhook endpoint verification secret (base64 encoded random bytes). If not defined, a secret is automatically generated and only accessible in the UI.`).option("--rate-limit <number>", `Webhook rate limit (per second).`).option("--event-types <value>", `Webhook event types filter. If not defined, all event messages will be sent.`).addHelpText("after", `
45083
+ resource.command("create-webhook-endpoint").description(`Create a new webhook endpoint with a URL and list of event types to subscribe to.`).option("--description <value>", `Webhook endpoint description.`).requiredOption("--url <value>", `Webhook endpoint URL.`).option("--secret <value>", `Webhook endpoint verification secret (base64 encoded random bytes). If not defined, a secret is automatically generated and only accessible in the UI.`).option("--rate-limit <number>", `Webhook rate limit (per second).`).option("--event-types <json>", `Webhook event types filter. If not defined, all event messages will be sent.`).addHelpText("after", `
43753
45084
  Examples:
43754
45085
  hyperline webhooks create-webhook-endpoint --url <url>
43755
45086
  hyperline webhooks create-webhook-endpoint --url <url> --description <description> --secret <secret>
@@ -43766,10 +45097,10 @@ Examples:
43766
45097
  args.url = opts.url;
43767
45098
  if (opts.secret !== void 0)
43768
45099
  args.secret = opts.secret;
43769
- if (opts.eventTypes !== void 0)
43770
- args.event_types = opts.eventTypes;
43771
45100
  if (opts.rateLimit !== void 0)
43772
45101
  args.rate_limit = Number(opts.rateLimit);
45102
+ if (opts.eventTypes !== void 0)
45103
+ args.event_types = JSON.parse(opts.eventTypes);
43773
45104
  await ctx.execute({
43774
45105
  method: "POST",
43775
45106
  path: "/v1/webhooks/endpoints",
@@ -43777,7 +45108,7 @@ Examples:
43777
45108
  queryParamKeys: []
43778
45109
  });
43779
45110
  });
43780
- resource.command("update-webhook-endpoint").description(`Update a webhook endpoint's URL, subscribed events, or enabled status.`).requiredOption("--id <value>", `id parameter`).option("--description <value>", `Webhook endpoint description.`).requiredOption("--url <value>", `Webhook endpoint URL.`).option("--rate-limit <number>", `Webhook rate limit (per second).`).option("--event-types <value>", `Webhook event types filter. If not defined, all event messages will be sent.`).addHelpText("after", `
45111
+ resource.command("update-webhook-endpoint").description(`Update a webhook endpoint's URL, subscribed events, or enabled status.`).requiredOption("--id <value>", `id parameter`).option("--description <value>", `Webhook endpoint description.`).requiredOption("--url <value>", `Webhook endpoint URL.`).option("--rate-limit <number>", `Webhook rate limit (per second).`).option("--event-types <json>", `Webhook event types filter. If not defined, all event messages will be sent.`).addHelpText("after", `
43781
45112
  Examples:
43782
45113
  hyperline webhooks update-webhook-endpoint --id <id> --url <url>
43783
45114
  hyperline webhooks update-webhook-endpoint --id <id> --url <url> --description <description> --rate-limit <rate_limit>
@@ -43794,10 +45125,10 @@ Examples:
43794
45125
  args.description = opts.description;
43795
45126
  if (opts.url !== void 0)
43796
45127
  args.url = opts.url;
43797
- if (opts.eventTypes !== void 0)
43798
- args.event_types = opts.eventTypes;
43799
45128
  if (opts.rateLimit !== void 0)
43800
45129
  args.rate_limit = Number(opts.rateLimit);
45130
+ if (opts.eventTypes !== void 0)
45131
+ args.event_types = JSON.parse(opts.eventTypes);
43801
45132
  await ctx.execute({
43802
45133
  method: "PUT",
43803
45134
  path: "/v1/webhooks/endpoints/{id}",
@@ -43831,7 +45162,7 @@ Examples:
43831
45162
  queryParamKeys: []
43832
45163
  });
43833
45164
  });
43834
- resource.command("list-webhook-messages").description(`List webhook messages sent across all endpoints. Filterable by event_types, before/after dates. Payloads are expunged after 90 days. Uses cursor-based pagination.`).option("--before <value>", `Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--after <value>", `Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--event-types <value>", `Event types to consider.`).option("--limit <number>", `limit`).option("--iterator <value>", `iterator`).addHelpText("after", `
45165
+ resource.command("list-webhook-messages").description(`List webhook messages sent across all endpoints. Filterable by event_types, before/after dates. Payloads are expunged after 90 days. Uses cursor-based pagination.`).option("--before <value>", `Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--after <value>", `Date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--event-types <json>", `Event types to consider.`).option("--limit <number>", `limit`).option("--iterator <value>", `iterator`).addHelpText("after", `
43835
45166
  Examples:
43836
45167
  hyperline webhooks list-webhook-messages
43837
45168
  hyperline webhooks list-webhook-messages --before <before> --after <after>`).action(async (opts) => {
@@ -43845,12 +45176,12 @@ Examples:
43845
45176
  args.before = opts.before;
43846
45177
  if (opts.after !== void 0)
43847
45178
  args.after = opts.after;
43848
- if (opts.eventTypes !== void 0)
43849
- args.event_types = opts.eventTypes;
43850
45179
  if (opts.iterator !== void 0)
43851
45180
  args.iterator = opts.iterator;
43852
45181
  if (opts.limit !== void 0)
43853
45182
  args.limit = Number(opts.limit);
45183
+ if (opts.eventTypes !== void 0)
45184
+ args.event_types = JSON.parse(opts.eventTypes);
43854
45185
  await ctx.execute({
43855
45186
  method: "GET",
43856
45187
  path: "/v1/webhooks/messages",
@@ -43862,6 +45193,12 @@ Examples:
43862
45193
 
43863
45194
  // build/commands/generated/index.js
43864
45195
  function registerAllCommands(program2) {
45196
+ registerAccounting_Journal_EntriesCommands(program2);
45197
+ registerAccounting_LedgersCommands(program2);
45198
+ registerAccounting_AccountsCommands(program2);
45199
+ registerAccounting_ReportsCommands(program2);
45200
+ registerAccounting_Revenue_RecognitionCommands(program2);
45201
+ registerAccounting_RulesCommands(program2);
43865
45202
  registerCustom_PropertiesCommands(program2);
43866
45203
  registerAnalyticsCommands(program2);
43867
45204
  registerBank_AccountsCommands(program2);
@@ -59850,6 +61187,12 @@ var languages = [
59850
61187
  { id: "en", name: "English", isoCode: "en", locale: "en-US" },
59851
61188
  { id: "de", name: "German", isoCode: "de", locale: "de-DE" },
59852
61189
  { id: "it", name: "Italian", isoCode: "it", locale: "it-IT" },
61190
+ {
61191
+ id: "lt",
61192
+ name: "Lithuanian",
61193
+ isoCode: "lt",
61194
+ locale: "lt-LT"
61195
+ },
59853
61196
  { id: "nl", name: "Dutch", isoCode: "nl", locale: "nl-NL" },
59854
61197
  { id: "es", name: "Spanish", isoCode: "es", locale: "es-ES" },
59855
61198
  { id: "pt", name: "Portuguese", isoCode: "pt", locale: "pt-PT" },
@@ -59882,6 +61225,7 @@ var de = {
59882
61225
  "invoices.prorata.paymentForItemFullPeriod": "Zahlung f\xFCr",
59883
61226
  "invoices.prorata.refundForItem": "Anteilig erstatteter Betrag f\xFCr",
59884
61227
  "invoices.prorata.refundForItemFullPeriod": "Erstattung f\xFCr",
61228
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 abgelaufenes Guthaben",
59885
61229
  "subscriptions.closingChargeName": "Abschlussgeb\xFChr f\xFCr das Abonnement",
59886
61230
  "subscriptions.correction": "Vorperiodische Anpassung",
59887
61231
  "subscriptions.updates.addCoupon": "Gutschein hinzuf\xFCgen {{couponName}}",
@@ -59913,6 +61257,7 @@ var en = {
59913
61257
  "invoices.prorata.paymentForItemFullPeriod": "Payment for",
59914
61258
  "invoices.prorata.refundForItem": "Prorated refund for",
59915
61259
  "invoices.prorata.refundForItemFullPeriod": "Refund for",
61260
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 expired balance",
59916
61261
  "subscriptions.closingChargeName": "Closing fee for subscription",
59917
61262
  "subscriptions.correction": "Adjustment previous period",
59918
61263
  "subscriptions.updates.addCoupon": "Add coupon {{couponName}}",
@@ -59972,6 +61317,7 @@ var es = {
59972
61317
  "invoices.prorata.paymentForItemFullPeriod": "Pago por",
59973
61318
  "invoices.prorata.refundForItem": "Reembolso prorrateado por",
59974
61319
  "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
61320
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo caducado",
59975
61321
  "subscriptions.closingChargeName": "Cargo por cierre de suscripci\xF3n",
59976
61322
  "subscriptions.correction": "Ajuste del periodo anterior",
59977
61323
  "subscriptions.updates.addCoupon": "A\xF1adir cup\xF3n {{couponName}}",
@@ -60017,6 +61363,7 @@ var fr = {
60017
61363
  "invoices.prorata.paymentForItemFullPeriod": "Paiement pour",
60018
61364
  "invoices.prorata.refundForItem": "Remboursement au prorata pour",
60019
61365
  "invoices.prorata.refundForItemFullPeriod": "Remboursement pour",
61366
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 solde expir\xE9",
60020
61367
  "subscriptions.closingChargeName": "Frais de cl\xF4ture pour abonnement",
60021
61368
  "subscriptions.correction": "Ajustement p\xE9riode pr\xE9c\xE9dente",
60022
61369
  "subscriptions.updates.addCoupon": "Ajout du coupon {{couponName}}",
@@ -60062,6 +61409,7 @@ var it = {
60062
61409
  "invoices.prorata.paymentForItemFullPeriod": "Pagamento per",
60063
61410
  "invoices.prorata.refundForItem": "Rimborso proporzionale per",
60064
61411
  "invoices.prorata.refundForItemFullPeriod": "Rimborso per",
61412
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo scaduto",
60065
61413
  "subscriptions.closingChargeName": "Costo di chiusura per abbonamento",
60066
61414
  "subscriptions.correction": "Correzione periodo precedente",
60067
61415
  "subscriptions.updates.addCoupon": "Aggiungi coupon {{couponName}}",
@@ -60081,6 +61429,52 @@ var it = {
60081
61429
  "subscriptions.updates.updatePrices": "Aggiorna prezzi per {{productName}}"
60082
61430
  };
60083
61431
 
61432
+ // ../hyperline-i18n/build/locales/lt.js
61433
+ var lt = {
61434
+ "creditNotes.refundChargeName": "S\u0105skaitos fakt\u016Bros gr\u0105\u017Einimas",
61435
+ "credits.bundleOf": "{{productName}} \u2013 {{creditCount}} kredit\u0173 paketas",
61436
+ "credits.unitsOf": "{{productName}} \u2013 {{creditCount}} kredit\u0173",
61437
+ "invoices.outstandingProduct.description": "Neapmok\u0117ta {{date}} i\u0161ra\u0161ytos s\u0105skaitos fakt\u016Bros{{invoiceNumber}} suma",
61438
+ "invoices.outstandingProduct.descriptionPeriod": "Neapmok\u0117ta s\u0105skaitos fakt\u016Bros{{invoiceNumber}} suma u\u017E laikotarp\u012F nuo {{periodStart}} iki {{periodEnd}}",
61439
+ "invoices.outstandingProduct.name": "Neapmok\u0117tas likutis",
61440
+ "invoices.prorata.paymentForItem": "Proporcingas mok\u0117jimas u\u017E",
61441
+ "invoices.prorata.paymentForItemFullPeriod": "Mok\u0117jimas u\u017E",
61442
+ "invoices.prorata.refundForItem": "Proporcingas gr\u0105\u017Einimas u\u017E",
61443
+ "invoices.prorata.refundForItemFullPeriod": "Gr\u0105\u017Einimas u\u017E",
61444
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 nebegaliojantis likutis",
61445
+ "subscriptions.closingChargeName": "Prenumeratos u\u017Ebaigimo mokestis",
61446
+ "subscriptions.correction": "Ankstesnio laikotarpio koregavimas",
61447
+ "subscriptions.updates.addCoupon": "Prid\u0117ti kupon\u0105 {{couponName}}",
61448
+ "subscriptions.updates.addProduct": "Prid\u0117ti {{productName}}",
61449
+ "subscriptions.updates.removeCoupon": "Pa\u0161alinti kupon\u0105 {{couponName}}",
61450
+ "subscriptions.updates.removeProduct": "Pa\u0161alinti {{productName}}",
61451
+ "subscriptions.updates.unit": "vnt.",
61452
+ "subscriptions.updates.updatePrices": "Atnaujinti {{productName}} kainas",
61453
+ "subscriptions.updates.updateCount": "Atnaujinti {{productName}} kiek\u012F ({{previousCount}} \u2192 {{newCount}} {{unit}})",
61454
+ "subscriptions.updates.updateCount.description.prorata.committed.invoiced": "Pritaikytas minimalus \u012Fsipareigotas {{committedCount}} kiekis.",
61455
+ "subscriptions.updates.updateCount.description.prorata.committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma (minimalus \u012Fsipareigotas kiekis \u2013 {{committedCount}})",
61456
+ "subscriptions.updates.updateCount.description.prorata.not_committed.invoiced": "U\u017E \u0161i\u0105 eilut\u0119 proporcingam laikotarpiui s\u0105skaita fakt\u016Bra i\u0161ra\u0161yta",
61457
+ "subscriptions.updates.updateCount.description.prorata.not_committed.not_invoiced": "Proporcingam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma",
61458
+ "subscriptions.updates.updateCount.description.full.committed.invoiced": "Visam laikotarpiui pritaikytas minimalus \u012Fsipareigotas {{committedCount}} kiekis.",
61459
+ "subscriptions.updates.updateCount.description.full.committed.not_invoiced": "Visam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma (minimalus \u012Fsipareigotas kiekis \u2013 {{committedCount}})",
61460
+ "subscriptions.updates.updateCount.description.full.not_committed.invoiced": "U\u017E \u0161i\u0105 eilut\u0119 visam laikotarpiui s\u0105skaita fakt\u016Bra i\u0161ra\u0161yta",
61461
+ "subscriptions.updates.updateCount.description.full.not_committed.not_invoiced": "Visam laikotarpiui nei\u0161ra\u0161yta {{amount}} suma",
61462
+ "accounting.invoicePosted.entryDescription": "I\u0161ra\u0161ytos s\u0105skaitos fakt\u016Bros {{invoiceId}} registravimo \u012Fra\u0161as",
61463
+ "accounting.transactionSettled.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} mok\u0117jimo sudengimas",
61464
+ "accounting.transactionRefunded.entryDescription": "S\u0105skaitos fakt\u016Bros {{invoiceId}} gr\u0105\u017Einimas",
61465
+ "accounting.creditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}} s\u0105skaitai fakt\u016Brai {{invoiceId}}",
61466
+ "accounting.standaloneCreditNotePosted.entryDescription": "Kreditin\u0117 s\u0105skaita {{creditNoteId}}",
61467
+ "accounting.revrec.entryDescription": "Pajam\u0173 pripa\u017Einimas pagal grafik\u0105 {{scheduleId}}, laikotarpis {{periodStart}}\u2013{{periodEnd}}",
61468
+ "accounting.revrec.debitLineDescription": "Atid\u0117t\u0173j\u0173 pajam\u0173 suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
61469
+ "accounting.revrec.creditLineDescription": "Pajam\u0173 pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
61470
+ "accounting.revrec.discountDebitLineDescription": "Atid\u0117tosios nuolaidos suma\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
61471
+ "accounting.revrec.discountCreditLineDescription": "Pajamas ma\u017Einan\u010Dios sumos (nuolaidos) pripa\u017Einimas \u2013 grafikas {{scheduleId}}, laikotarpis {{periodDate}}",
61472
+ "accounting.revrec.closedPeriodFallbackNote": " (u\u017Eregistruota kitame atvirame laikotarpyje, nes tikslinis apskaitos laikotarpis u\u017Edarytas; pradin\u0117 data {{originalDate}})",
61473
+ "einvoicing.paymentProcessed": "Mok\u0117jimas apdorotas",
61474
+ "einvoicing.paymentReceived": "Mok\u0117jimas gautas",
61475
+ "einvoicing.paymentFromWallet": "Mok\u0117jimas i\u0161 pinigin\u0117s"
61476
+ };
61477
+
60084
61478
  // ../hyperline-i18n/build/locales/nl.js
60085
61479
  var nl = {
60086
61480
  "accounting.invoicePosted.entryDescription": "Boekingsregel voor factuur {{invoiceId}}",
@@ -60107,6 +61501,7 @@ var nl = {
60107
61501
  "invoices.prorata.paymentForItemFullPeriod": "Betaling voor",
60108
61502
  "invoices.prorata.refundForItem": "Gedeeltelijke terugbetaling voor",
60109
61503
  "invoices.prorata.refundForItemFullPeriod": "Terugbetaling voor",
61504
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 verlopen saldo",
60110
61505
  "subscriptions.closingChargeName": "Afsluitkosten voor abonnement",
60111
61506
  "subscriptions.correction": "Aanpassing vorige periode",
60112
61507
  "subscriptions.updates.addCoupon": "Coupon toevoegen {{couponName}}",
@@ -60152,6 +61547,7 @@ var pl = {
60152
61547
  "invoices.prorata.paymentForItemFullPeriod": "P\u0142atno\u015B\u0107 za",
60153
61548
  "invoices.prorata.refundForItem": "Zwrot proporcjonalny za",
60154
61549
  "invoices.prorata.refundForItemFullPeriod": "Zwrot za",
61550
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 wygas\u0142e saldo",
60155
61551
  "subscriptions.closingChargeName": "Op\u0142ata za zamkni\u0119cie subskrypcji",
60156
61552
  "subscriptions.correction": "Korekta poprzedniego okresu",
60157
61553
  "subscriptions.updates.addCoupon": "Dodaj kupon {{couponName}}",
@@ -60197,6 +61593,7 @@ var pt = {
60197
61593
  "invoices.prorata.paymentForItemFullPeriod": "Pagamento por",
60198
61594
  "invoices.prorata.refundForItem": "Reembolso proporcional por",
60199
61595
  "invoices.prorata.refundForItemFullPeriod": "Reembolso por",
61596
+ "wallets.expiredBalanceInvoiceLineName": "{{walletName}} \u2013 saldo expirado",
60200
61597
  "subscriptions.closingChargeName": "Taxa de encerramento da assinatura",
60201
61598
  "subscriptions.correction": "Ajuste do per\xEDodo anterior",
60202
61599
  "subscriptions.updates.addCoupon": "Adicionar cupom {{couponName}}",
@@ -60223,6 +61620,7 @@ var translations = {
60223
61620
  fr,
60224
61621
  de,
60225
61622
  it,
61623
+ lt,
60226
61624
  nl,
60227
61625
  es,
60228
61626
  pt,
@@ -60661,9 +62059,6 @@ var loggerFactory = buildLoggerFactory({
60661
62059
  var createLogger2 = loggerFactory.createLogger;
60662
62060
  var logger = loggerFactory.createLogger({ serviceName: "default" });
60663
62061
 
60664
- // ../hyperline-monitoring/build/tracing/tracing.js
60665
- import tracer from "dd-trace";
60666
-
60667
62062
  // ../hyperline-lib/build/utils/aws.js
60668
62063
  import { GetBucketLocationCommand, S3Client } from "@aws-sdk/client-s3";
60669
62064
  import { GetCallerIdentityCommand, STSClient } from "@aws-sdk/client-sts";
@@ -62917,6 +64312,7 @@ var import_shared3 = __toESM(require_shared(), 1);
62917
64312
  import * as https from "node:https";
62918
64313
 
62919
64314
  // ../hyperline-lib/build/utils/json.js
64315
+ import { createHash as createHash2 } from "node:crypto";
62920
64316
  import { deepEqual } from "fast-equals";
62921
64317
 
62922
64318
  // ../hyperline-lib/build/utils/api/filterBuilder.js
@@ -62969,7 +64365,7 @@ import { RateLimiterRedis as RateLimiterRedis2, RateLimiterRes as RateLimiterRes
62969
64365
  import multer from "multer";
62970
64366
 
62971
64367
  // ../hyperline-lib/build/http/middlewares/idempotency.js
62972
- import { createHash as createHash2 } from "node:crypto";
64368
+ import { createHash as createHash3 } from "node:crypto";
62973
64369
  import { isDeepStrictEqual } from "node:util";
62974
64370
  import { idempotency } from "express-idempotency";
62975
64371
 
@@ -63143,15 +64539,6 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
63143
64539
 
63144
64540
  // ../hyperline-mcp/build/server/server.js
63145
64541
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
63146
- var defaultToolOutputSchema = {
63147
- result: external_exports.unknown()
63148
- };
63149
-
63150
- // ../hyperline-mcp/build/session/sessionKey.js
63151
- import { createHmac } from "node:crypto";
63152
-
63153
- // ../hyperline-mcp/build/session/sessionManager.js
63154
- import { LRUCache } from "lru-cache";
63155
64542
 
63156
64543
  // build/output.js
63157
64544
  function formatOutput({ data, format: format2 }) {