@hyperline/cli 0.1.0-build.1.5bb74e4 → 0.1.0-build.1.5bec39a
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.
- package/dist/bin/hyperline-main.js +592 -100
- package/package.json +1 -1
|
@@ -34985,10 +34985,10 @@ var require_shared = __commonJS({
|
|
|
34985
34985
|
ZodId: () => ZodId,
|
|
34986
34986
|
ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
|
|
34987
34987
|
});
|
|
34988
|
-
var
|
|
34988
|
+
var import_zod25 = require_lib();
|
|
34989
34989
|
var countryIds2 = ["all", ...countries.map(({ id }) => id)];
|
|
34990
|
-
var ZodId =
|
|
34991
|
-
var ZodTranslationsSchemaFn = (schema) =>
|
|
34990
|
+
var ZodId = import_zod25.z.enum(countryIds2);
|
|
34991
|
+
var ZodTranslationsSchemaFn = (schema) => import_zod25.z.record(import_zod25.z.string(), schema.optional());
|
|
34992
34992
|
var UsStates = [
|
|
34993
34993
|
{ id: "AA", name: "Armed Forces Americas" },
|
|
34994
34994
|
{ id: "AE", name: "Armed Forces Europe" },
|
|
@@ -36287,14 +36287,14 @@ var require_shared = __commonJS({
|
|
|
36287
36287
|
ZodNumberCurrencyPositiveValue: () => ZodNumberCurrencyPositiveValue,
|
|
36288
36288
|
ZodNumberCurrencyPositiveValueExcludingZero: () => ZodNumberCurrencyPositiveValueExcludingZero
|
|
36289
36289
|
});
|
|
36290
|
-
var
|
|
36291
|
-
var ZodCurrencyId =
|
|
36290
|
+
var import_zod26 = require_lib();
|
|
36291
|
+
var ZodCurrencyId = import_zod26.z.enum(
|
|
36292
36292
|
all_default.map(({ id }) => id)
|
|
36293
36293
|
);
|
|
36294
|
-
var ZodNumberCurrency =
|
|
36295
|
-
var ZodNumberCurrencyPositiveValue =
|
|
36296
|
-
var ZodNumberCurrencyPositiveValueExcludingZero =
|
|
36297
|
-
var ZodCurrencyMap =
|
|
36294
|
+
var ZodNumberCurrency = import_zod26.z.string().or(import_zod26.z.number().transform((number4) => number4)).transform((number4) => number4);
|
|
36295
|
+
var ZodNumberCurrencyPositiveValue = import_zod26.z.number().min(0).transform((number4) => number4).transform((number4) => number4);
|
|
36296
|
+
var ZodNumberCurrencyPositiveValueExcludingZero = import_zod26.z.number().gt(0).transform((number4) => number4).transform((number4) => number4);
|
|
36297
|
+
var ZodCurrencyMap = import_zod26.z.record(ZodNumberCurrency).refine(
|
|
36298
36298
|
(data) => Object.keys(data).every((key) => ZodCurrencyId.safeParse(key).success),
|
|
36299
36299
|
{
|
|
36300
36300
|
message: "Invalid currency key.",
|
|
@@ -40673,6 +40673,52 @@ Examples:
|
|
|
40673
40673
|
});
|
|
40674
40674
|
}
|
|
40675
40675
|
|
|
40676
|
+
// build/commands/generated/approval-workflows.js
|
|
40677
|
+
function registerApproval_WorkflowsCommands(parent) {
|
|
40678
|
+
const resource = parent.command("approval-workflows").description("Manage approval workflows");
|
|
40679
|
+
resource.command("list").description(`List approval workflows with their steps and approvers. Those whose \`applicable_flows\` include \`workflow_step\` can be picked as the \`approvalWorkflowId\` of a workflow's Request approval step (\`hyperline.request_approval\`). Filter with \`is_active\`; paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--is-active <value>", `Only return workflows matching this active state.`).addHelpText("after", `
|
|
40680
|
+
Examples:
|
|
40681
|
+
hyperline approval-workflows list
|
|
40682
|
+
hyperline approval-workflows list --take <take> --is-active <is_active>`).action(async (opts) => {
|
|
40683
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40684
|
+
if (!ctx) {
|
|
40685
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40686
|
+
process.exit(1);
|
|
40687
|
+
}
|
|
40688
|
+
const args = {};
|
|
40689
|
+
if (opts.isActive !== void 0)
|
|
40690
|
+
args.is_active = opts.isActive;
|
|
40691
|
+
if (opts.take !== void 0)
|
|
40692
|
+
args.take = Number(opts.take);
|
|
40693
|
+
if (opts.skip !== void 0)
|
|
40694
|
+
args.skip = Number(opts.skip);
|
|
40695
|
+
await ctx.execute({
|
|
40696
|
+
method: "GET",
|
|
40697
|
+
path: "/v1/approvals/workflows",
|
|
40698
|
+
args,
|
|
40699
|
+
queryParamKeys: ["take", "skip", "is_active"]
|
|
40700
|
+
});
|
|
40701
|
+
});
|
|
40702
|
+
resource.command("get").description(`Retrieve a single approval workflow.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
40703
|
+
Examples:
|
|
40704
|
+
hyperline approval-workflows get --id <id>`).action(async (opts) => {
|
|
40705
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40706
|
+
if (!ctx) {
|
|
40707
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40708
|
+
process.exit(1);
|
|
40709
|
+
}
|
|
40710
|
+
const args = {};
|
|
40711
|
+
if (opts.id !== void 0)
|
|
40712
|
+
args.id = opts.id;
|
|
40713
|
+
await ctx.execute({
|
|
40714
|
+
method: "GET",
|
|
40715
|
+
path: "/v1/approvals/workflows/{id}",
|
|
40716
|
+
args,
|
|
40717
|
+
queryParamKeys: []
|
|
40718
|
+
});
|
|
40719
|
+
});
|
|
40720
|
+
}
|
|
40721
|
+
|
|
40676
40722
|
// build/commands/generated/bank-accounts.js
|
|
40677
40723
|
function registerBank_AccountsCommands(parent) {
|
|
40678
40724
|
const resource = parent.command("bank-accounts").description("Manage bank accounts");
|
|
@@ -40862,6 +40908,332 @@ Examples:
|
|
|
40862
40908
|
});
|
|
40863
40909
|
}
|
|
40864
40910
|
|
|
40911
|
+
// build/commands/generated/contracts-clauses.js
|
|
40912
|
+
function registerContracts_ClausesCommands(parent) {
|
|
40913
|
+
const resource = parent.command("contracts-clauses").description("Manage contracts > clauses");
|
|
40914
|
+
resource.command("list-contract-clauses").description(`List the contract clauses of the contract library, with their texts and translations. Use the returned IDs in \`contract_clause_ids\` when creating a quote. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
40915
|
+
Examples:
|
|
40916
|
+
hyperline contracts-clauses list-contract-clauses
|
|
40917
|
+
hyperline contracts-clauses list-contract-clauses --take <take>`).action(async (opts) => {
|
|
40918
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40919
|
+
if (!ctx) {
|
|
40920
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40921
|
+
process.exit(1);
|
|
40922
|
+
}
|
|
40923
|
+
const args = {};
|
|
40924
|
+
if (opts.take !== void 0)
|
|
40925
|
+
args.take = Number(opts.take);
|
|
40926
|
+
if (opts.skip !== void 0)
|
|
40927
|
+
args.skip = Number(opts.skip);
|
|
40928
|
+
await ctx.execute({
|
|
40929
|
+
method: "GET",
|
|
40930
|
+
path: "/v1/contracts/clauses",
|
|
40931
|
+
args,
|
|
40932
|
+
queryParamKeys: ["take", "skip"]
|
|
40933
|
+
});
|
|
40934
|
+
});
|
|
40935
|
+
resource.command("create-contract-clause").description(`Create a contract clause in the contract library, with a default text and optional translations keyed by language code.`).requiredOption("--name <value>", `Name of the contract clause, displayed in the contract library.`).requiredOption("--text <value>", `Default text of the clause, used when no translation exists for the customer language. Plain text, line breaks are preserved.`).option("--translations <json>", `Translations of the clause, keyed by language code. The translation matching the customer language is used instead of \`text\`.`).option("--invoicing-entity-ids <json>", `IDs of the invoicing entities for which the clause is available when building a quote.`).addHelpText("after", `
|
|
40936
|
+
Examples:
|
|
40937
|
+
hyperline contracts-clauses create-contract-clause --name <name> --text <text>
|
|
40938
|
+
hyperline contracts-clauses create-contract-clause --name <name> --text <text> --translations <translations> --invoicing-entity-ids <invoicing_entity_ids>
|
|
40939
|
+
hyperline contracts-clauses create-contract-clause --name <name> --text <text> --output json`).action(async (opts) => {
|
|
40940
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40941
|
+
if (!ctx) {
|
|
40942
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40943
|
+
process.exit(1);
|
|
40944
|
+
}
|
|
40945
|
+
const args = {};
|
|
40946
|
+
if (opts.name !== void 0)
|
|
40947
|
+
args.name = opts.name;
|
|
40948
|
+
if (opts.text !== void 0)
|
|
40949
|
+
args.text = opts.text;
|
|
40950
|
+
if (opts.translations !== void 0)
|
|
40951
|
+
args.translations = JSON.parse(opts.translations);
|
|
40952
|
+
if (opts.invoicingEntityIds !== void 0)
|
|
40953
|
+
args.invoicing_entity_ids = JSON.parse(opts.invoicingEntityIds);
|
|
40954
|
+
await ctx.execute({
|
|
40955
|
+
method: "POST",
|
|
40956
|
+
path: "/v1/contracts/clauses",
|
|
40957
|
+
args,
|
|
40958
|
+
queryParamKeys: []
|
|
40959
|
+
});
|
|
40960
|
+
});
|
|
40961
|
+
resource.command("get-contract-clause").description(`Retrieve a contract clause by ID.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
40962
|
+
Examples:
|
|
40963
|
+
hyperline contracts-clauses get-contract-clause --id <id>`).action(async (opts) => {
|
|
40964
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40965
|
+
if (!ctx) {
|
|
40966
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40967
|
+
process.exit(1);
|
|
40968
|
+
}
|
|
40969
|
+
const args = {};
|
|
40970
|
+
if (opts.id !== void 0)
|
|
40971
|
+
args.id = opts.id;
|
|
40972
|
+
await ctx.execute({
|
|
40973
|
+
method: "GET",
|
|
40974
|
+
path: "/v1/contracts/clauses/{id}",
|
|
40975
|
+
args,
|
|
40976
|
+
queryParamKeys: []
|
|
40977
|
+
});
|
|
40978
|
+
});
|
|
40979
|
+
resource.command("update-contract-clause").description(`Update the name, text, translations or invoicing entities of a contract clause. Sending \`translations\` replaces all existing translations.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Name of the contract clause, displayed in the contract library.`).option("--text <value>", `Default text of the clause, used when no translation exists for the customer language. Plain text, line breaks are preserved.`).option("--translations <json>", `Translations of the clause, keyed by language code. Replaces all existing translations: omitted languages are removed.`).option("--invoicing-entity-ids <json>", `IDs of the invoicing entities for which the clause is available when building a quote.`).addHelpText("after", `
|
|
40980
|
+
Examples:
|
|
40981
|
+
hyperline contracts-clauses update-contract-clause --id <id>
|
|
40982
|
+
hyperline contracts-clauses update-contract-clause --id <id> --name <name> --text <text>
|
|
40983
|
+
hyperline contracts-clauses update-contract-clause --id <id> --output json`).action(async (opts) => {
|
|
40984
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40985
|
+
if (!ctx) {
|
|
40986
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40987
|
+
process.exit(1);
|
|
40988
|
+
}
|
|
40989
|
+
const args = {};
|
|
40990
|
+
if (opts.id !== void 0)
|
|
40991
|
+
args.id = opts.id;
|
|
40992
|
+
if (opts.name !== void 0)
|
|
40993
|
+
args.name = opts.name;
|
|
40994
|
+
if (opts.text !== void 0)
|
|
40995
|
+
args.text = opts.text;
|
|
40996
|
+
if (opts.translations !== void 0)
|
|
40997
|
+
args.translations = JSON.parse(opts.translations);
|
|
40998
|
+
if (opts.invoicingEntityIds !== void 0)
|
|
40999
|
+
args.invoicing_entity_ids = JSON.parse(opts.invoicingEntityIds);
|
|
41000
|
+
await ctx.execute({
|
|
41001
|
+
method: "PUT",
|
|
41002
|
+
path: "/v1/contracts/clauses/{id}",
|
|
41003
|
+
args,
|
|
41004
|
+
queryParamKeys: []
|
|
41005
|
+
});
|
|
41006
|
+
});
|
|
41007
|
+
resource.command("delete-contract-clause").description(`Delete a contract clause from the contract library. Existing quotes keep their copy of the clause.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
41008
|
+
Examples:
|
|
41009
|
+
hyperline contracts-clauses delete-contract-clause --id <id>
|
|
41010
|
+
hyperline contracts-clauses delete-contract-clause --id <id> --output json`).action(async (opts) => {
|
|
41011
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41012
|
+
if (!ctx) {
|
|
41013
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41014
|
+
process.exit(1);
|
|
41015
|
+
}
|
|
41016
|
+
const args = {};
|
|
41017
|
+
if (opts.id !== void 0)
|
|
41018
|
+
args.id = opts.id;
|
|
41019
|
+
if (!opts.yes) {
|
|
41020
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
41021
|
+
if (!confirmed) {
|
|
41022
|
+
process.stdout.write("Aborted.\n");
|
|
41023
|
+
return;
|
|
41024
|
+
}
|
|
41025
|
+
}
|
|
41026
|
+
await ctx.execute({
|
|
41027
|
+
method: "DELETE",
|
|
41028
|
+
path: "/v1/contracts/clauses/{id}",
|
|
41029
|
+
args,
|
|
41030
|
+
queryParamKeys: []
|
|
41031
|
+
});
|
|
41032
|
+
});
|
|
41033
|
+
}
|
|
41034
|
+
|
|
41035
|
+
// build/commands/generated/contracts-documents.js
|
|
41036
|
+
function registerContracts_DocumentsCommands(parent) {
|
|
41037
|
+
const resource = parent.command("contracts-documents").description("Manage contracts > documents");
|
|
41038
|
+
resource.command("list-contract-documents").description(`List the contract documents of the contract library (terms of service, DPA, SLA...), with their contents per language and countries and the files of each content. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
41039
|
+
Examples:
|
|
41040
|
+
hyperline contracts-documents list-contract-documents
|
|
41041
|
+
hyperline contracts-documents list-contract-documents --take <take>`).action(async (opts) => {
|
|
41042
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41043
|
+
if (!ctx) {
|
|
41044
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41045
|
+
process.exit(1);
|
|
41046
|
+
}
|
|
41047
|
+
const args = {};
|
|
41048
|
+
if (opts.take !== void 0)
|
|
41049
|
+
args.take = Number(opts.take);
|
|
41050
|
+
if (opts.skip !== void 0)
|
|
41051
|
+
args.skip = Number(opts.skip);
|
|
41052
|
+
await ctx.execute({
|
|
41053
|
+
method: "GET",
|
|
41054
|
+
path: "/v1/contracts/documents",
|
|
41055
|
+
args,
|
|
41056
|
+
queryParamKeys: ["take", "skip"]
|
|
41057
|
+
});
|
|
41058
|
+
});
|
|
41059
|
+
resource.command("create-contract-document").description(`Create a contract document in the contract library. Its files are added afterwards per language with \`create_contract_document_content\`.`).requiredOption("--name <value>", `Name of the contract document, displayed in the contract library.`).option("--invoicing-entity-ids <json>", `IDs of the invoicing entities for which the contract document is available when building a quote.`).addHelpText("after", `
|
|
41060
|
+
Examples:
|
|
41061
|
+
hyperline contracts-documents create-contract-document --name <name>
|
|
41062
|
+
hyperline contracts-documents create-contract-document --name <name> --invoicing-entity-ids <invoicing_entity_ids>
|
|
41063
|
+
hyperline contracts-documents create-contract-document --name <name> --output json`).action(async (opts) => {
|
|
41064
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41065
|
+
if (!ctx) {
|
|
41066
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41067
|
+
process.exit(1);
|
|
41068
|
+
}
|
|
41069
|
+
const args = {};
|
|
41070
|
+
if (opts.name !== void 0)
|
|
41071
|
+
args.name = opts.name;
|
|
41072
|
+
if (opts.invoicingEntityIds !== void 0)
|
|
41073
|
+
args.invoicing_entity_ids = JSON.parse(opts.invoicingEntityIds);
|
|
41074
|
+
await ctx.execute({
|
|
41075
|
+
method: "POST",
|
|
41076
|
+
path: "/v1/contracts/documents",
|
|
41077
|
+
args,
|
|
41078
|
+
queryParamKeys: []
|
|
41079
|
+
});
|
|
41080
|
+
});
|
|
41081
|
+
resource.command("get-contract-document").description(`Retrieve a contract document by ID, with its contents and their files.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
41082
|
+
Examples:
|
|
41083
|
+
hyperline contracts-documents get-contract-document --id <id>`).action(async (opts) => {
|
|
41084
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41085
|
+
if (!ctx) {
|
|
41086
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41087
|
+
process.exit(1);
|
|
41088
|
+
}
|
|
41089
|
+
const args = {};
|
|
41090
|
+
if (opts.id !== void 0)
|
|
41091
|
+
args.id = opts.id;
|
|
41092
|
+
await ctx.execute({
|
|
41093
|
+
method: "GET",
|
|
41094
|
+
path: "/v1/contracts/documents/{id}",
|
|
41095
|
+
args,
|
|
41096
|
+
queryParamKeys: []
|
|
41097
|
+
});
|
|
41098
|
+
});
|
|
41099
|
+
resource.command("update-contract-document").description(`Update the name or invoicing entities of a contract document. Its files are updated per content with \`update_contract_document_content\`.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Name of the contract document, displayed in the contract library.`).option("--invoicing-entity-ids <json>", `IDs of the invoicing entities for which the contract document is available when building a quote.`).addHelpText("after", `
|
|
41100
|
+
Examples:
|
|
41101
|
+
hyperline contracts-documents update-contract-document --id <id>
|
|
41102
|
+
hyperline contracts-documents update-contract-document --id <id> --name <name> --invoicing-entity-ids <invoicing_entity_ids>
|
|
41103
|
+
hyperline contracts-documents update-contract-document --id <id> --output json`).action(async (opts) => {
|
|
41104
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41105
|
+
if (!ctx) {
|
|
41106
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41107
|
+
process.exit(1);
|
|
41108
|
+
}
|
|
41109
|
+
const args = {};
|
|
41110
|
+
if (opts.id !== void 0)
|
|
41111
|
+
args.id = opts.id;
|
|
41112
|
+
if (opts.name !== void 0)
|
|
41113
|
+
args.name = opts.name;
|
|
41114
|
+
if (opts.invoicingEntityIds !== void 0)
|
|
41115
|
+
args.invoicing_entity_ids = JSON.parse(opts.invoicingEntityIds);
|
|
41116
|
+
await ctx.execute({
|
|
41117
|
+
method: "PUT",
|
|
41118
|
+
path: "/v1/contracts/documents/{id}",
|
|
41119
|
+
args,
|
|
41120
|
+
queryParamKeys: []
|
|
41121
|
+
});
|
|
41122
|
+
});
|
|
41123
|
+
resource.command("delete-contract-document").description(`Delete a contract document from the contract library. Existing quotes keep their copy of the files.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
41124
|
+
Examples:
|
|
41125
|
+
hyperline contracts-documents delete-contract-document --id <id>
|
|
41126
|
+
hyperline contracts-documents delete-contract-document --id <id> --output json`).action(async (opts) => {
|
|
41127
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41128
|
+
if (!ctx) {
|
|
41129
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41130
|
+
process.exit(1);
|
|
41131
|
+
}
|
|
41132
|
+
const args = {};
|
|
41133
|
+
if (opts.id !== void 0)
|
|
41134
|
+
args.id = opts.id;
|
|
41135
|
+
if (!opts.yes) {
|
|
41136
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
41137
|
+
if (!confirmed) {
|
|
41138
|
+
process.stdout.write("Aborted.\n");
|
|
41139
|
+
return;
|
|
41140
|
+
}
|
|
41141
|
+
}
|
|
41142
|
+
await ctx.execute({
|
|
41143
|
+
method: "DELETE",
|
|
41144
|
+
path: "/v1/contracts/documents/{id}",
|
|
41145
|
+
args,
|
|
41146
|
+
queryParamKeys: []
|
|
41147
|
+
});
|
|
41148
|
+
});
|
|
41149
|
+
resource.command("create-contract-document-content").description(`Add a content to a contract document: its files for one language (\`default\` as fallback) and optional countries, sent as a comma-separated list. At least one PDF or Word file is required.`).requiredOption("--id <value>", `id parameter`).requiredOption("--language <value>", `Language of the content. \`default\` is used when no content exists for the customer language.`).option("--countries <value>", `Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty means all countries. In a multipart request, send a comma-separated list.`).requiredOption("--files <paths...>", `Paths of the local files to upload (space-separated, sends a multipart request)`).addHelpText("after", `
|
|
41150
|
+
Examples:
|
|
41151
|
+
hyperline contracts-documents create-contract-document-content --id <id> --language <language> --files <path>
|
|
41152
|
+
hyperline contracts-documents create-contract-document-content --id <id> --language <language> --files <path> --countries <countries>
|
|
41153
|
+
hyperline contracts-documents create-contract-document-content --id <id> --language <language> --files <path> --output json`).action(async (opts) => {
|
|
41154
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41155
|
+
if (!ctx) {
|
|
41156
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41157
|
+
process.exit(1);
|
|
41158
|
+
}
|
|
41159
|
+
const args = {};
|
|
41160
|
+
if (opts.id !== void 0)
|
|
41161
|
+
args.id = opts.id;
|
|
41162
|
+
if (opts.language !== void 0)
|
|
41163
|
+
args.language = opts.language;
|
|
41164
|
+
if (opts.countries !== void 0)
|
|
41165
|
+
args.countries = opts.countries;
|
|
41166
|
+
const files = {};
|
|
41167
|
+
if (opts.files !== void 0)
|
|
41168
|
+
files.files = [opts.files].flat();
|
|
41169
|
+
await ctx.execute({
|
|
41170
|
+
method: "POST",
|
|
41171
|
+
path: "/v1/contracts/documents/{id}/contents",
|
|
41172
|
+
args,
|
|
41173
|
+
queryParamKeys: [],
|
|
41174
|
+
files
|
|
41175
|
+
});
|
|
41176
|
+
});
|
|
41177
|
+
resource.command("update-contract-document-content").description(`Update a contract document content. Sent files replace all its existing files: use it to publish a new version of a document. Existing quotes keep their copy of the previous files.`).requiredOption("--id <value>", `id parameter`).requiredOption("--content-id <value>", `contentId parameter`).option("--language <value>", `Language of the content. \`default\` is used when no content exists for the customer language.`).option("--countries <value>", `Countries the content applies to, as ISO 3166-1 alpha-2 codes. Empty means all countries. In a multipart request, send a comma-separated list, or an empty value for all countries.`).option("--files <paths...>", `Paths of the local files to upload (space-separated, sends a multipart request)`).addHelpText("after", `
|
|
41178
|
+
Examples:
|
|
41179
|
+
hyperline contracts-documents update-contract-document-content --id <id> --content-id <contentId>
|
|
41180
|
+
hyperline contracts-documents update-contract-document-content --id <id> --content-id <contentId> --language <language> --countries <countries>
|
|
41181
|
+
hyperline contracts-documents update-contract-document-content --id <id> --content-id <contentId> --output json`).action(async (opts) => {
|
|
41182
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41183
|
+
if (!ctx) {
|
|
41184
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41185
|
+
process.exit(1);
|
|
41186
|
+
}
|
|
41187
|
+
const args = {};
|
|
41188
|
+
if (opts.id !== void 0)
|
|
41189
|
+
args.id = opts.id;
|
|
41190
|
+
if (opts.contentId !== void 0)
|
|
41191
|
+
args.contentId = opts.contentId;
|
|
41192
|
+
if (opts.language !== void 0)
|
|
41193
|
+
args.language = opts.language;
|
|
41194
|
+
if (opts.countries !== void 0)
|
|
41195
|
+
args.countries = opts.countries;
|
|
41196
|
+
const files = {};
|
|
41197
|
+
if (opts.files !== void 0)
|
|
41198
|
+
files.files = [opts.files].flat();
|
|
41199
|
+
await ctx.execute({
|
|
41200
|
+
method: "PUT",
|
|
41201
|
+
path: "/v1/contracts/documents/{id}/contents/{contentId}",
|
|
41202
|
+
args,
|
|
41203
|
+
queryParamKeys: [],
|
|
41204
|
+
files
|
|
41205
|
+
});
|
|
41206
|
+
});
|
|
41207
|
+
resource.command("delete-contract-document-content").description(`Delete a content (one language and countries version) of a contract document.`).requiredOption("--id <value>", `id parameter`).requiredOption("--content-id <value>", `contentId parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
41208
|
+
Examples:
|
|
41209
|
+
hyperline contracts-documents delete-contract-document-content --id <id> --content-id <contentId>
|
|
41210
|
+
hyperline contracts-documents delete-contract-document-content --id <id> --content-id <contentId> --output json`).action(async (opts) => {
|
|
41211
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41212
|
+
if (!ctx) {
|
|
41213
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41214
|
+
process.exit(1);
|
|
41215
|
+
}
|
|
41216
|
+
const args = {};
|
|
41217
|
+
if (opts.id !== void 0)
|
|
41218
|
+
args.id = opts.id;
|
|
41219
|
+
if (opts.contentId !== void 0)
|
|
41220
|
+
args.contentId = opts.contentId;
|
|
41221
|
+
if (!opts.yes) {
|
|
41222
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
41223
|
+
if (!confirmed) {
|
|
41224
|
+
process.stdout.write("Aborted.\n");
|
|
41225
|
+
return;
|
|
41226
|
+
}
|
|
41227
|
+
}
|
|
41228
|
+
await ctx.execute({
|
|
41229
|
+
method: "DELETE",
|
|
41230
|
+
path: "/v1/contracts/documents/{id}/contents/{contentId}",
|
|
41231
|
+
args,
|
|
41232
|
+
queryParamKeys: []
|
|
41233
|
+
});
|
|
41234
|
+
});
|
|
41235
|
+
}
|
|
41236
|
+
|
|
40865
41237
|
// build/commands/generated/coupons.js
|
|
40866
41238
|
function registerCouponsCommands(parent) {
|
|
40867
41239
|
const resource = parent.command("coupons").description("Manage coupons");
|
|
@@ -41313,7 +41685,7 @@ Examples:
|
|
|
41313
41685
|
// build/commands/generated/customers.js
|
|
41314
41686
|
function registerCustomersCommands(parent) {
|
|
41315
41687
|
const resource = parent.command("customers").description("Manage customers");
|
|
41316
|
-
resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, tax_id_status, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, integration_entity_id, created_at, and updated_at. Sortable by created_at or updated_at. Paginated with limit/cursor.`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).option("--tax-id-status <value>", `
|
|
41688
|
+
resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, tax_id_status, subscription_status, invoicing_entity_id, segment_id, custom_properties (JSON object of slug to exact value, e.g. {"my_slug":"value"}; slugs matching no custom property are ignored), payment_method_type, integration_entity_id, created_at, and updated_at. Sortable by created_at or updated_at. Paginated with limit/cursor.`).option("--limit <number>", `Maximum number of items to return (1-100).`).option("--cursor <value>", `Opaque cursor returned in the previous response's \`next_cursor\`. Omit to fetch the first page.`).option("--include-total <value>", `Set to \`true\` to include \`total\` in the response.`).option("--order <value>", `Sort direction.`).option("--sort <value>", `Field used to sort the results.`).option("--tax-id-status <value>", `
|
|
41317
41689
|
Verification status of the customer tax ID.
|
|
41318
41690
|
|
|
41319
41691
|
- \`valid\`: Tax ID has been verified and is valid.
|
|
@@ -41321,7 +41693,7 @@ Verification status of the customer tax ID.
|
|
|
41321
41693
|
- \`mismatch\`: Tax ID is valid but is for a different country than the customer's country.
|
|
41322
41694
|
- \`unverified\`: Tax ID has not been verified yet.
|
|
41323
41695
|
- \`unsupported\`: Tax ID verification for this type not supported yet.
|
|
41324
|
-
`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.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("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `
|
|
41696
|
+
`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--type <value>", `type`).option("--type.in <value>", `type__in`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.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("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).option("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.equals <value>", `country__equals`).option("--country.contains <value>", `country__contains`).option("--country.starts-with <value>", `country__startsWith`).option("--country.end-with <value>", `country__endWith`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).option("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.equals <value>", `external_id__equals`).option("--external-id.contains <value>", `external_id__contains`).option("--external-id.starts-with <value>", `external_id__startsWith`).option("--external-id.end-with <value>", `external_id__endWith`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).option("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.equals <value>", `billing_email__equals`).option("--billing-email.contains <value>", `billing_email__contains`).option("--billing-email.starts-with <value>", `billing_email__startsWith`).option("--billing-email.end-with <value>", `billing_email__endWith`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).option("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.equals <value>", `tax_id__equals`).option("--tax-id.contains <value>", `tax_id__contains`).option("--tax-id.starts-with <value>", `tax_id__startsWith`).option("--tax-id.end-with <value>", `tax_id__endWith`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).option("--subscription-status <value>", `subscription_status`).option("--subscription-status.in <value>", `subscription_status__in`).option("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--invoicing-entity-id.not <value>", `invoicing_entity_id__not`).option("--invoicing-entity-id.equals <value>", `invoicing_entity_id__equals`).option("--invoicing-entity-id.contains <value>", `invoicing_entity_id__contains`).option("--invoicing-entity-id.starts-with <value>", `invoicing_entity_id__startsWith`).option("--invoicing-entity-id.end-with <value>", `invoicing_entity_id__endWith`).option("--segment-id <value>", `segment_id`).option("--custom-properties <value>", `Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with \`__contains\` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is \`false\`, \`0\`, \`null\` or an empty string, are ignored.`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--integration-entity-id <value>", `integration_entity_id`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.equals <value>", `created_at__equals`).option("--created-at.lt <value>", `created_at__lt`).option("--created-at.lte <value>", `created_at__lte`).option("--created-at.gt <value>", `created_at__gt`).option("--created-at.gte <value>", `created_at__gte`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).option("--updated-at.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", `
|
|
41325
41697
|
Examples:
|
|
41326
41698
|
hyperline customers list
|
|
41327
41699
|
hyperline customers list --limit <limit> --cursor <cursor>`).action(async (opts) => {
|
|
@@ -42042,7 +42414,13 @@ Examples:
|
|
|
42042
42414
|
queryParamKeys: []
|
|
42043
42415
|
});
|
|
42044
42416
|
});
|
|
42045
|
-
resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--type <value>", `Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `
|
|
42417
|
+
resource.command("create-customer-address").description(`Create a shipping address with type shipping; billing creation is rejected because a customer can have at most one billing address, managed through the customer endpoint.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--type <value>", `Only shipping addresses can be created here. A customer has at most one active billing address, managed through the customer or by updating its address ID.`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. \`CA\` for \`US-CA\`) for:
|
|
42418
|
+
- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
42419
|
+
- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)
|
|
42420
|
+
- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)
|
|
42421
|
+
- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)
|
|
42422
|
+
|
|
42423
|
+
A code or a name is accepted (e.g. \`ON\` or \`Ontario\`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
|
|
42046
42424
|
Examples:
|
|
42047
42425
|
hyperline customers-address create-customer-address --customer-id <customerId> --type <type>
|
|
42048
42426
|
hyperline customers-address create-customer-address --customer-id <customerId> --type <type> --name <name> --line1 <line1>
|
|
@@ -42080,7 +42458,13 @@ Examples:
|
|
|
42080
42458
|
queryParamKeys: []
|
|
42081
42459
|
});
|
|
42082
42460
|
});
|
|
42083
|
-
resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `
|
|
42461
|
+
resource.command("update-customer-address").description(`Update a billing or shipping address by ID; billing changes also update the customer billing-address projection.`).requiredOption("--customer-id <value>", `customerId parameter`).requiredOption("--address-id <value>", `addressId parameter`).option("--name <value>", `Address name.`).option("--line1 <value>", `Address first line.`).option("--line2 <value>", `Address second line (optional).`).option("--city <value>", `Address city.`).option("--zip <value>", `Address ZIP code.`).option("--state <value>", `State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. \`CA\` for \`US-CA\`) for:
|
|
42462
|
+
- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
42463
|
+
- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)
|
|
42464
|
+
- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)
|
|
42465
|
+
- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)
|
|
42466
|
+
|
|
42467
|
+
A code or a name is accepted (e.g. \`ON\` or \`Ontario\`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.`).option("--country <value>", `Two-letter country code in ISO format. See [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).`).option("--tax-id <value>", `Tax ID override for a shipping address. Null or blank inherits the customer's tax ID; omission on update preserves the override. Billing addresses cannot have an override.`).addHelpText("after", `
|
|
42084
42468
|
Examples:
|
|
42085
42469
|
hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId>
|
|
42086
42470
|
hyperline customers-address update-customer-address --customer-id <customerId> --address-id <addressId> --name <name> --line1 <line1>
|
|
@@ -43330,10 +43714,10 @@ Examples:
|
|
|
43330
43714
|
]
|
|
43331
43715
|
});
|
|
43332
43716
|
});
|
|
43333
|
-
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", `
|
|
43717
|
+
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.`).requiredOption("--file <path>", `Path of the local file to upload (sends a multipart request)`).addHelpText("after", `
|
|
43334
43718
|
Examples:
|
|
43335
|
-
hyperline files create --name <name> --customer-id <customer_id>
|
|
43336
|
-
hyperline files create --name <name> --customer-id <customer_id> --output json`).action(async (opts) => {
|
|
43719
|
+
hyperline files create --name <name> --customer-id <customer_id> --file <path>
|
|
43720
|
+
hyperline files create --name <name> --customer-id <customer_id> --file <path> --output json`).action(async (opts) => {
|
|
43337
43721
|
const ctx = resource.parent?.opts()._ctx;
|
|
43338
43722
|
if (!ctx) {
|
|
43339
43723
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -43344,11 +43728,15 @@ Examples:
|
|
|
43344
43728
|
args.name = opts.name;
|
|
43345
43729
|
if (opts.customerId !== void 0)
|
|
43346
43730
|
args.customer_id = opts.customerId;
|
|
43731
|
+
const files = {};
|
|
43732
|
+
if (opts.file !== void 0)
|
|
43733
|
+
files.file = [opts.file].flat();
|
|
43347
43734
|
await ctx.execute({
|
|
43348
43735
|
method: "POST",
|
|
43349
43736
|
path: "/v1/files",
|
|
43350
43737
|
args,
|
|
43351
|
-
queryParamKeys: []
|
|
43738
|
+
queryParamKeys: [],
|
|
43739
|
+
files
|
|
43352
43740
|
});
|
|
43353
43741
|
});
|
|
43354
43742
|
resource.command("delete").description(`Permanently delete a file by ID.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
@@ -43901,6 +44289,36 @@ Examples:
|
|
|
43901
44289
|
queryParamKeys: []
|
|
43902
44290
|
});
|
|
43903
44291
|
});
|
|
44292
|
+
resource.command("send-invoice-emails").description(`Send a specific email (\`email_type\`, e.g. \`invoice_ready\` for the to-pay email) to the customer for a list of invoice IDs, asynchronously in batch. Returns a batch_id only; outcomes arrive via webhooks (invoice.batch.email_succeeded / invoice.batch.email_skipped / invoice.batch.email_failed). An invoice whose status doesn't match the email (e.g. a draft or an invoice still pending approval after validate_invoice) is skipped, so check each invoice's status with get_invoice first. Every call sends the emails again: never re-call it to retry or check status.`).option("--batch-id <value>", `Optional client-supplied identifier for the batch. Echoed back in the response and on the emitted webhook events. Generated if omitted.`).requiredOption("--email-type <value>", `The email to send. The invoice's status must resolve to this email, otherwise it is skipped with reason \`email_type_mismatch\`.
|
|
44293
|
+
|
|
44294
|
+
- \`invoice_ready\`: The to-pay invoice email (for \`to_pay\`, \`partially_paid\`, \`late\` invoices).
|
|
44295
|
+
- \`invoice_settled\`: The paid-invoice email (for \`paid\` invoices).
|
|
44296
|
+
- \`invoice_errored\`: The failed-payment email (for \`error\` invoices with a payment method).
|
|
44297
|
+
- \`credit_note_ready\`: The issued-credit-note email (for \`to_pay\`, \`partially_paid\` refunds).
|
|
44298
|
+
- \`credit_note_settled\`: The credit-note email (for paid refunds).`).requiredOption("--ids <json>", `IDs of the invoices to send the email for. Processed asynchronously; each outcome is reported via webhook events.`).addHelpText("after", `
|
|
44299
|
+
Examples:
|
|
44300
|
+
hyperline invoices send-invoice-emails --email-type <email_type> --ids <ids>
|
|
44301
|
+
hyperline invoices send-invoice-emails --email-type <email_type> --ids <ids> --batch-id <batch_id>
|
|
44302
|
+
hyperline invoices send-invoice-emails --email-type <email_type> --ids <ids> --output json`).action(async (opts) => {
|
|
44303
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
44304
|
+
if (!ctx) {
|
|
44305
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
44306
|
+
process.exit(1);
|
|
44307
|
+
}
|
|
44308
|
+
const args = {};
|
|
44309
|
+
if (opts.batchId !== void 0)
|
|
44310
|
+
args.batch_id = opts.batchId;
|
|
44311
|
+
if (opts.emailType !== void 0)
|
|
44312
|
+
args.email_type = opts.emailType;
|
|
44313
|
+
if (opts.ids !== void 0)
|
|
44314
|
+
args.ids = JSON.parse(opts.ids);
|
|
44315
|
+
await ctx.execute({
|
|
44316
|
+
method: "POST",
|
|
44317
|
+
path: "/v1/invoices/send-email",
|
|
44318
|
+
args,
|
|
44319
|
+
queryParamKeys: []
|
|
44320
|
+
});
|
|
44321
|
+
});
|
|
43904
44322
|
resource.command("mark-invoice-as-uncollectible").description(`Mark an invoice as uncollectible for accounting write-off purposes. The invoice remains in the system for record keeping.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
43905
44323
|
Examples:
|
|
43906
44324
|
hyperline invoices mark-invoice-as-uncollectible --id <id>
|
|
@@ -44033,10 +44451,10 @@ Examples:
|
|
|
44033
44451
|
queryParamKeys: []
|
|
44034
44452
|
});
|
|
44035
44453
|
});
|
|
44036
|
-
resource.command("upload-pdf-to").description(`Upload a custom PDF file (max 5MB) to attach to an existing invoice, replacing the auto-generated PDF.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
44454
|
+
resource.command("upload-pdf-to").description(`Upload a custom PDF file (max 5MB) to attach to an existing invoice, replacing the auto-generated PDF.`).requiredOption("--id <value>", `id parameter`).requiredOption("--file <path>", `Path of the local file to upload (sends a multipart request)`).addHelpText("after", `
|
|
44037
44455
|
Examples:
|
|
44038
|
-
hyperline invoices upload-pdf-to --id <id>
|
|
44039
|
-
hyperline invoices upload-pdf-to --id <id> --output json`).action(async (opts) => {
|
|
44456
|
+
hyperline invoices upload-pdf-to --id <id> --file <path>
|
|
44457
|
+
hyperline invoices upload-pdf-to --id <id> --file <path> --output json`).action(async (opts) => {
|
|
44040
44458
|
const ctx = resource.parent?.opts()._ctx;
|
|
44041
44459
|
if (!ctx) {
|
|
44042
44460
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -44045,11 +44463,15 @@ Examples:
|
|
|
44045
44463
|
const args = {};
|
|
44046
44464
|
if (opts.id !== void 0)
|
|
44047
44465
|
args.id = opts.id;
|
|
44466
|
+
const files = {};
|
|
44467
|
+
if (opts.file !== void 0)
|
|
44468
|
+
files.file = [opts.file].flat();
|
|
44048
44469
|
await ctx.execute({
|
|
44049
44470
|
method: "POST",
|
|
44050
44471
|
path: "/v1/invoices/{id}/upload",
|
|
44051
44472
|
args,
|
|
44052
|
-
queryParamKeys: []
|
|
44473
|
+
queryParamKeys: [],
|
|
44474
|
+
files
|
|
44053
44475
|
});
|
|
44054
44476
|
});
|
|
44055
44477
|
resource.command("download").description(`Download the PDF of an invoice as a downloadable file. The HTTP client must follow redirects. Supports lang/locale params for localization.`).requiredOption("--id <value>", `id parameter`).option("--lang <value>", `lang`).option("--locale <value>", `Locale as a supported language code and an uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen.`).addHelpText("after", `
|
|
@@ -44188,7 +44610,13 @@ Examples:
|
|
|
44188
44610
|
queryParamKeys: []
|
|
44189
44611
|
});
|
|
44190
44612
|
});
|
|
44191
|
-
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>", `
|
|
44613
|
+
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>", `State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. \`CA\` for \`US-CA\`) for:
|
|
44614
|
+
- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
44615
|
+
- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)
|
|
44616
|
+
- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)
|
|
44617
|
+
- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)
|
|
44618
|
+
|
|
44619
|
+
A code or a name is accepted (e.g. \`ON\` or \`Ontario\`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.`).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. Defaults to \`true\`.`).option("--fx-conversion-display-enabled", `Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to \`true\`.`).addHelpText("after", `
|
|
44192
44620
|
Examples:
|
|
44193
44621
|
hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency>
|
|
44194
44622
|
hyperline invoicing-entities create-invoicing-entity --name <name> --country <country> --currency <currency> --accounting-currency <accounting_currency> --is-default --trade-name <trade_name>
|
|
@@ -44280,7 +44708,13 @@ Examples:
|
|
|
44280
44708
|
queryParamKeys: []
|
|
44281
44709
|
});
|
|
44282
44710
|
});
|
|
44283
|
-
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>", `
|
|
44711
|
+
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>", `State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. \`CA\` for \`US-CA\`) for:
|
|
44712
|
+
- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
44713
|
+
- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)
|
|
44714
|
+
- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)
|
|
44715
|
+
- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)
|
|
44716
|
+
|
|
44717
|
+
A code or a name is accepted (e.g. \`ON\` or \`Ontario\`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.`).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. Defaults to \`true\`.`).option("--fx-conversion-display-enabled", `Whether the exchange rate and converted amount in the accounting currency are displayed on the invoice PDF when the invoice currency differs from the accounting currency. The conversion data is still stored and returned by the API when disabled. Defaults to \`true\`.`).addHelpText("after", `
|
|
44284
44718
|
Examples:
|
|
44285
44719
|
hyperline invoicing-entities update-invoicing-entity --id <id>
|
|
44286
44720
|
hyperline invoicing-entities update-invoicing-entity --id <id> --name <name> --registration-number <registration_number>
|
|
@@ -44763,7 +45197,7 @@ Examples:
|
|
|
44763
45197
|
// build/commands/generated/products.js
|
|
44764
45198
|
function registerProductsCommands(parent) {
|
|
44765
45199
|
const resource = parent.command("products").description("Manage products");
|
|
44766
|
-
resource.command("list").description(`List products with optional filters for id, status, name, description, type, and
|
|
45200
|
+
resource.command("list").description(`List products with optional filters for id, status, name, description, type, price_book_id, and custom_properties (JSON object of slug to exact value, e.g. {"my_slug":"value"}; slugs matching no custom property are rejected). Products define what is being sold (flat fee, per-unit, usage-based, etc.). Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.equals <value>", `name__equals`).option("--name.contains <value>", `name__contains`).option("--name.starts-with <value>", `name__startsWith`).option("--name.end-with <value>", `name__endWith`).option("--description <value>", `description`).option("--description.not <value>", `description__not`).option("--description.equals <value>", `description__equals`).option("--description.contains <value>", `description__contains`).option("--description.starts-with <value>", `description__startsWith`).option("--description.end-with <value>", `description__endWith`).option("--description.is-null <value>", `description__isNull`).option("--description.is-not-null <value>", `description__isNotNull`).option("--type <value>", `type`).option("--type.not <value>", `type__not`).option("--type.equals <value>", `type__equals`).option("--type.contains <value>", `type__contains`).option("--type.starts-with <value>", `type__startsWith`).option("--type.end-with <value>", `type__endWith`).option("--price-book-id <value>", `price_book_id`).option("--custom-properties <value>", `Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with \`__contains\` for a case-sensitive substring match on text values. Several entries are combined with AND. A slug that matches no custom property returns a \`400\` error.`).addHelpText("after", `
|
|
44767
45201
|
Examples:
|
|
44768
45202
|
hyperline products list
|
|
44769
45203
|
hyperline products list --take <take> --id <id>`).action(async (opts) => {
|
|
@@ -44831,6 +45265,8 @@ Examples:
|
|
|
44831
45265
|
args.type__endWith = opts["type.endWith"];
|
|
44832
45266
|
if (opts.priceBookId !== void 0)
|
|
44833
45267
|
args.price_book_id = opts.priceBookId;
|
|
45268
|
+
if (opts.customProperties !== void 0)
|
|
45269
|
+
args.custom_properties = opts.customProperties;
|
|
44834
45270
|
if (opts.take !== void 0)
|
|
44835
45271
|
args.take = Number(opts.take);
|
|
44836
45272
|
if (opts.skip !== void 0)
|
|
@@ -44870,7 +45306,8 @@ Examples:
|
|
|
44870
45306
|
"type__contains",
|
|
44871
45307
|
"type__startsWith",
|
|
44872
45308
|
"type__endWith",
|
|
44873
|
-
"price_book_id"
|
|
45309
|
+
"price_book_id",
|
|
45310
|
+
"custom_properties"
|
|
44874
45311
|
]
|
|
44875
45312
|
});
|
|
44876
45313
|
});
|
|
@@ -45154,7 +45591,7 @@ Quote status.
|
|
|
45154
45591
|
- \`all\`: Display all pricing tiers.
|
|
45155
45592
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
45156
45593
|
- \`none\`: Hide all pricing tiers.
|
|
45157
|
-
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).addHelpText("after", `
|
|
45594
|
+
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--template-id <value>", `ID of the quote template. If not specified, a subscription configuration or an \`invoice\` payload must be defined.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--subscription <json>", `Subscription configuration constituting the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided, a draft invoice is created and linked to the quote. Cannot be combined with \`subscription\` or \`template_id\`.`).option("--attachments <paths...>", `Paths of the local files to upload (space-separated, sends a multipart request)`).addHelpText("after", `
|
|
45158
45595
|
Examples:
|
|
45159
45596
|
hyperline quotes create --customer-id <customer_id>
|
|
45160
45597
|
hyperline quotes create --customer-id <customer_id> --status <status> --owner-email <owner_email>
|
|
@@ -45219,11 +45656,15 @@ Examples:
|
|
|
45219
45656
|
args.subscription = JSON.parse(opts.subscription);
|
|
45220
45657
|
if (opts.invoice !== void 0)
|
|
45221
45658
|
args.invoice = JSON.parse(opts.invoice);
|
|
45659
|
+
const files = {};
|
|
45660
|
+
if (opts.attachments !== void 0)
|
|
45661
|
+
files.attachments = [opts.attachments].flat();
|
|
45222
45662
|
await ctx.execute({
|
|
45223
45663
|
method: "POST",
|
|
45224
45664
|
path: "/v1/quotes",
|
|
45225
45665
|
args,
|
|
45226
|
-
queryParamKeys: []
|
|
45666
|
+
queryParamKeys: [],
|
|
45667
|
+
files
|
|
45227
45668
|
});
|
|
45228
45669
|
});
|
|
45229
45670
|
resource.command("list").description(`List quotes with optional filters for id, number, status, customer_id, template_id, crm_opportunity_id, type, and updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--id <value>", `id`).option("--id.not <value>", `id__not`).option("--id.equals <value>", `id__equals`).option("--id.contains <value>", `id__contains`).option("--id.starts-with <value>", `id__startsWith`).option("--id.end-with <value>", `id__endWith`).option("--number <value>", `number`).option("--number.not <value>", `number__not`).option("--number.equals <value>", `number__equals`).option("--number.contains <value>", `number__contains`).option("--number.starts-with <value>", `number__startsWith`).option("--number.end-with <value>", `number__endWith`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.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("--template-id <value>", `template_id`).option("--template-id.not <value>", `template_id__not`).option("--template-id.equals <value>", `template_id__equals`).option("--template-id.contains <value>", `template_id__contains`).option("--template-id.starts-with <value>", `template_id__startsWith`).option("--template-id.end-with <value>", `template_id__endWith`).option("--template-id.is-null <value>", `template_id__isNull`).option("--template-id.is-not-null <value>", `template_id__isNotNull`).option("--crm-opportunity-id <value>", `crm_opportunity_id`).option("--crm-opportunity-id.not <value>", `crm_opportunity_id__not`).option("--crm-opportunity-id.equals <value>", `crm_opportunity_id__equals`).option("--crm-opportunity-id.contains <value>", `crm_opportunity_id__contains`).option("--crm-opportunity-id.starts-with <value>", `crm_opportunity_id__startsWith`).option("--crm-opportunity-id.end-with <value>", `crm_opportunity_id__endWith`).option("--crm-opportunity-id.is-null <value>", `crm_opportunity_id__isNull`).option("--crm-opportunity-id.is-not-null <value>", `crm_opportunity_id__isNotNull`).option("--type <value>", `type`).option("--updated-at <value>", `updated_at`).option("--updated-at.not <value>", `updated_at__not`).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", `
|
|
@@ -45400,12 +45841,30 @@ Examples:
|
|
|
45400
45841
|
queryParamKeys: []
|
|
45401
45842
|
});
|
|
45402
45843
|
});
|
|
45844
|
+
resource.command("get-quote-pricing").description(`Priced view of a quote: amount excluding tax, tax amount and amount including tax for the quote and each configuration, and per subscription phase the engine-priced amount, effective unit amount and tax of every product line (flat, tiered, volume, bulk, package...). Use it to show a quote's totals and line prices instead of re-implementing pricing from raw price tiers.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
45845
|
+
Examples:
|
|
45846
|
+
hyperline quotes get-quote-pricing --id <id>`).action(async (opts) => {
|
|
45847
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
45848
|
+
if (!ctx) {
|
|
45849
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
45850
|
+
process.exit(1);
|
|
45851
|
+
}
|
|
45852
|
+
const args = {};
|
|
45853
|
+
if (opts.id !== void 0)
|
|
45854
|
+
args.id = opts.id;
|
|
45855
|
+
await ctx.execute({
|
|
45856
|
+
method: "GET",
|
|
45857
|
+
path: "/v1/quotes/{id}/pricing",
|
|
45858
|
+
args,
|
|
45859
|
+
queryParamKeys: []
|
|
45860
|
+
});
|
|
45861
|
+
});
|
|
45403
45862
|
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. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation.`).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. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count. Set to \`null\` to clear the manually set value.`).option("--contract-value <number>", `What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for \`subscription\` and \`subscription_update\` quotes, unless set manually. Not set on \`one_off\` quotes. When specified, overrides the computed value. Set to \`null\` to go back to the computed 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.
|
|
45404
45863
|
|
|
45405
45864
|
- \`all\`: Display all pricing tiers.
|
|
45406
45865
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
45407
45866
|
- \`none\`: Hide all pricing tiers.
|
|
45408
|
-
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).addHelpText("after", `
|
|
45867
|
+
`).option("--display-phase-value <value>", `Display per-phase value breakdown on the quote.`).option("--display-discounts-on-total <value>", `Display discounts on the totals, with product prices before discount. Totals then follow the contract value, so discounts with a limited duration are included.`).option("--display-first-invoice-amount <value>", `Display the first invoice amount on the quote.`).option("--display-documents-in-preview <value>", `Display attached documents in the quote preview.`).option("--subscription-update-display <value>", `Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.`).option("--generate-draft-invoices <value>", `When \`true\`, the invoice issued after signature stays in \`draft\` status instead of being emitted for payment. Use this when you want to review the final invoice manually before sending it. Defaults to \`false\`.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--expires-at <value>", `Quote expiration date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. Set to \`null\` to clear the expiration.`).option("--subscription <json>", `Subscription configuration constituting the quote. When provided on a draft quote, it creates or replaces the draft subscription attached to the quote.`).option("--invoice <json>", `Invoice configuration constituting the one-off quote. When provided on a draft one-off quote, it deletes the previous draft invoice and creates a fresh one linked to the quote. \`invoice.invoicing_entity_id\` is ignored on update \u2014 the quote's existing invoicing entity is reused.`).option("--attachments <paths...>", `Paths of the local files to upload (space-separated, sends a multipart request)`).addHelpText("after", `
|
|
45409
45868
|
Examples:
|
|
45410
45869
|
hyperline quotes update --id <id>
|
|
45411
45870
|
hyperline quotes update --id <id> --owner-email <owner_email> --catalog-version-id <catalog_version_id>
|
|
@@ -45466,11 +45925,15 @@ Examples:
|
|
|
45466
45925
|
args.subscription = JSON.parse(opts.subscription);
|
|
45467
45926
|
if (opts.invoice !== void 0)
|
|
45468
45927
|
args.invoice = JSON.parse(opts.invoice);
|
|
45928
|
+
const files = {};
|
|
45929
|
+
if (opts.attachments !== void 0)
|
|
45930
|
+
files.attachments = [opts.attachments].flat();
|
|
45469
45931
|
await ctx.execute({
|
|
45470
45932
|
method: "PATCH",
|
|
45471
45933
|
path: "/v1/quotes/{id}",
|
|
45472
45934
|
args,
|
|
45473
|
-
queryParamKeys: []
|
|
45935
|
+
queryParamKeys: [],
|
|
45936
|
+
files
|
|
45474
45937
|
});
|
|
45475
45938
|
});
|
|
45476
45939
|
resource.command("duplicate").description(`Create a draft duplicate of an existing quote, including its linked invoice or subscription configuration.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
@@ -45623,9 +46086,10 @@ Examples:
|
|
|
45623
46086
|
queryParamKeys: []
|
|
45624
46087
|
});
|
|
45625
46088
|
});
|
|
45626
|
-
resource.command("sign").description(`Manually mark a quote as signed externally. Optionally upload a signed PDF. Bypasses the built-in Hyperline signature flow.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
46089
|
+
resource.command("sign").description(`Manually mark a quote as signed externally. Optionally upload a signed PDF. Bypasses the built-in Hyperline signature flow.`).requiredOption("--id <value>", `id parameter`).option("--signed-quote <path>", `Path of the local file to upload (sends a multipart request)`).addHelpText("after", `
|
|
45627
46090
|
Examples:
|
|
45628
46091
|
hyperline quotes sign --id <id>
|
|
46092
|
+
hyperline quotes sign --id <id> --signed-quote <path>
|
|
45629
46093
|
hyperline quotes sign --id <id> --output json`).action(async (opts) => {
|
|
45630
46094
|
const ctx = resource.parent?.opts()._ctx;
|
|
45631
46095
|
if (!ctx) {
|
|
@@ -45635,11 +46099,15 @@ Examples:
|
|
|
45635
46099
|
const args = {};
|
|
45636
46100
|
if (opts.id !== void 0)
|
|
45637
46101
|
args.id = opts.id;
|
|
46102
|
+
const files = {};
|
|
46103
|
+
if (opts.signedQuote !== void 0)
|
|
46104
|
+
files.signed_quote = [opts.signedQuote].flat();
|
|
45638
46105
|
await ctx.execute({
|
|
45639
46106
|
method: "POST",
|
|
45640
46107
|
path: "/v1/quotes/{id}/sign",
|
|
45641
46108
|
args,
|
|
45642
|
-
queryParamKeys: []
|
|
46109
|
+
queryParamKeys: [],
|
|
46110
|
+
files
|
|
45643
46111
|
});
|
|
45644
46112
|
});
|
|
45645
46113
|
resource.command("void").description(`Void an existing quote, canceling it and preventing further actions.`).requiredOption("--id <value>", `id parameter`).requiredOption("--reason <value>", `Quote voiding reason.`).addHelpText("after", `
|
|
@@ -46235,7 +46703,7 @@ Examples:
|
|
|
46235
46703
|
queryParamKeys: []
|
|
46236
46704
|
});
|
|
46237
46705
|
});
|
|
46238
|
-
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, cancel_at, custom_properties, and the active contract: contract_start__gte/__lte, contract_end__gte/__lte, renew_automatically. For upcoming renewals, combine contract_end__gte/__lte with renew_automatically, plus cancel_at for scheduled cancellations. 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>", `
|
|
46706
|
+
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, cancel_at, custom_properties (JSON object of slug to exact value, e.g. {"my_slug":"value"}; slugs matching no custom property are ignored), and the active contract: contract_start__gte/__lte, contract_end__gte/__lte, renew_automatically. For upcoming renewals, combine contract_end__gte/__lte with renew_automatically, plus cancel_at for scheduled cancellations. 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>", `
|
|
46239
46707
|
Subscription status filter.
|
|
46240
46708
|
|
|
46241
46709
|
- \`active\`, \`pending\`, \`paused\`, \`errored\`, \`cancelled\`, \`draft\`, \`voided\`, \`archived\`: match that status.
|
|
@@ -46244,7 +46712,7 @@ Subscription status filter.
|
|
|
46244
46712
|
- \`any\`: every status, no exclusion.
|
|
46245
46713
|
|
|
46246
46714
|
Use \`status__in\` with comma-separated values to combine statuses. When the filter is omitted, \`draft\`, \`voided\`, \`cancelled\` and \`archived\` subscriptions are excluded.
|
|
46247
|
-
`).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.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.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("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).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("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).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.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("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--custom-properties <value>", `
|
|
46715
|
+
`).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.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.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("--plan-id.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).option("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).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("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).option("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.equals <value>", `customer_id__equals`).option("--customer-id.contains <value>", `customer_id__contains`).option("--customer-id.starts-with <value>", `customer_id__startsWith`).option("--customer-id.end-with <value>", `customer_id__endWith`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).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.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("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).option("--custom-properties <value>", `Filter by custom property values, as a JSON object mapping a custom property slug to the exact value to match. Suffix a slug with \`__contains\` for a case-sensitive substring match on text values. Several entries are combined with AND. Entries whose slug matches no custom property, or whose value is \`false\`, \`0\`, \`null\` or an empty string, are ignored.`).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.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`).option("--cancel-at <value>", `cancel_at`).option("--cancel-at.not <value>", `cancel_at__not`).option("--cancel-at.equals <value>", `cancel_at__equals`).option("--cancel-at.lt <value>", `cancel_at__lt`).option("--cancel-at.lte <value>", `cancel_at__lte`).option("--cancel-at.gt <value>", `cancel_at__gt`).option("--cancel-at.gte <value>", `cancel_at__gte`).option("--cancel-at.is-null <value>", `cancel_at__isNull`).option("--cancel-at.is-not-null <value>", `cancel_at__isNotNull`).option("--contract-start.gte <value>", `Return only subscriptions whose active contract starts on or after this date.`).option("--contract-start.lte <value>", `Return only subscriptions whose active contract starts on or before this date.`).option("--contract-end.gte <value>", `Return only subscriptions whose active contract ends on or after this date.`).option("--contract-end.lte <value>", `Return only subscriptions whose active contract ends on or before this date.`).option("--renew-automatically <value>", `Return only subscriptions whose active contract renews automatically (\`true\`) or not (\`false\`).`).addHelpText("after", `
|
|
46248
46716
|
Examples:
|
|
46249
46717
|
hyperline subscriptions list
|
|
46250
46718
|
hyperline subscriptions list --take <take> --activation-strategy <activation_strategy>`).action(async (opts) => {
|
|
@@ -47644,9 +48112,12 @@ function registerAllCommands(program2) {
|
|
|
47644
48112
|
registerAi_BillingCommands(program2);
|
|
47645
48113
|
registerAi_CostsCommands(program2);
|
|
47646
48114
|
registerAnalyticsCommands(program2);
|
|
48115
|
+
registerApproval_WorkflowsCommands(program2);
|
|
47647
48116
|
registerBank_AccountsCommands(program2);
|
|
47648
48117
|
registerCatalogCommands(program2);
|
|
47649
48118
|
registerCompaniesCommands(program2);
|
|
48119
|
+
registerContracts_ClausesCommands(program2);
|
|
48120
|
+
registerContracts_DocumentsCommands(program2);
|
|
47650
48121
|
registerCouponsCommands(program2);
|
|
47651
48122
|
registerCoupons_Promotion_CodesCommands(program2);
|
|
47652
48123
|
registerCustomers_CreditsCommands(program2);
|
|
@@ -64355,6 +64826,23 @@ var PublicCursorPaginationParams = {
|
|
|
64355
64826
|
};
|
|
64356
64827
|
var PublicCursorPaginationSchema = zod_default.object(PublicCursorPaginationParams);
|
|
64357
64828
|
|
|
64829
|
+
// ../hyperline-lib/build/http/dto/paymentMethodBrand.js
|
|
64830
|
+
var PaymentMethodBrandSchema = external_exports.enum([
|
|
64831
|
+
"amex",
|
|
64832
|
+
"bancontact",
|
|
64833
|
+
"cartes_bancaires",
|
|
64834
|
+
"diners",
|
|
64835
|
+
"discover",
|
|
64836
|
+
"jcb",
|
|
64837
|
+
"link",
|
|
64838
|
+
"maestro",
|
|
64839
|
+
"mastercard",
|
|
64840
|
+
"other",
|
|
64841
|
+
"unionpay",
|
|
64842
|
+
"unknown",
|
|
64843
|
+
"visa"
|
|
64844
|
+
]);
|
|
64845
|
+
|
|
64358
64846
|
// ../hyperline-monitoring/build/context/context.js
|
|
64359
64847
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
64360
64848
|
var executionContextStorage = new AsyncLocalStorage();
|
|
@@ -67244,69 +67732,6 @@ var Decimal = P.constructor = clone2(DEFAULTS);
|
|
|
67244
67732
|
LN10 = new Decimal(LN10);
|
|
67245
67733
|
PI = new Decimal(PI);
|
|
67246
67734
|
|
|
67247
|
-
// ../hyperline-lib/build/utils/config/usStates.js
|
|
67248
|
-
var usStates = [
|
|
67249
|
-
"AA",
|
|
67250
|
-
"AE",
|
|
67251
|
-
"AK",
|
|
67252
|
-
"AL",
|
|
67253
|
-
"AP",
|
|
67254
|
-
"AR",
|
|
67255
|
-
"AS",
|
|
67256
|
-
"AZ",
|
|
67257
|
-
"CA",
|
|
67258
|
-
"CO",
|
|
67259
|
-
"CT",
|
|
67260
|
-
"DC",
|
|
67261
|
-
"DE",
|
|
67262
|
-
"FL",
|
|
67263
|
-
"GA",
|
|
67264
|
-
"GU",
|
|
67265
|
-
"HI",
|
|
67266
|
-
"IA",
|
|
67267
|
-
"ID",
|
|
67268
|
-
"IL",
|
|
67269
|
-
"IN",
|
|
67270
|
-
"KS",
|
|
67271
|
-
"KY",
|
|
67272
|
-
"LA",
|
|
67273
|
-
"MA",
|
|
67274
|
-
"MD",
|
|
67275
|
-
"ME",
|
|
67276
|
-
"MI",
|
|
67277
|
-
"MN",
|
|
67278
|
-
"MO",
|
|
67279
|
-
"MP",
|
|
67280
|
-
"MS",
|
|
67281
|
-
"MT",
|
|
67282
|
-
"NC",
|
|
67283
|
-
"ND",
|
|
67284
|
-
"NE",
|
|
67285
|
-
"NH",
|
|
67286
|
-
"NJ",
|
|
67287
|
-
"NM",
|
|
67288
|
-
"NV",
|
|
67289
|
-
"NY",
|
|
67290
|
-
"OH",
|
|
67291
|
-
"OK",
|
|
67292
|
-
"OR",
|
|
67293
|
-
"PA",
|
|
67294
|
-
"PR",
|
|
67295
|
-
"RI",
|
|
67296
|
-
"SC",
|
|
67297
|
-
"SD",
|
|
67298
|
-
"TN",
|
|
67299
|
-
"TX",
|
|
67300
|
-
"UT",
|
|
67301
|
-
"VA",
|
|
67302
|
-
"VI",
|
|
67303
|
-
"VT",
|
|
67304
|
-
"WA",
|
|
67305
|
-
"WI",
|
|
67306
|
-
"WV",
|
|
67307
|
-
"WY"
|
|
67308
|
-
];
|
|
67309
|
-
|
|
67310
67735
|
// ../hyperline-lib/build/utils/dates.js
|
|
67311
67736
|
var import_shared2 = __toESM(require_shared(), 1);
|
|
67312
67737
|
var PERIOD_BOUND_DRIFT_TOLERANCE_MS = 2 * 60 * 1e3;
|
|
@@ -67381,8 +67806,14 @@ var authorizedOperators = [
|
|
|
67381
67806
|
var NullFilterValueSchema = BooleanSchema.or(external_exports.literal("")).optional();
|
|
67382
67807
|
|
|
67383
67808
|
// ../hyperline-lib/build/http/dto/state.js
|
|
67384
|
-
var StateSchema = external_exports.
|
|
67385
|
-
description:
|
|
67809
|
+
var StateSchema = external_exports.string().openapi({
|
|
67810
|
+
description: `State or province of the address, stored as its code (the second part of the ISO 3166-2 code, e.g. \`CA\` for \`US-CA\`) for:
|
|
67811
|
+
- United States: state, see [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US)
|
|
67812
|
+
- Canada: province or territory, see [ISO 3166-2:CA](https://en.wikipedia.org/wiki/ISO_3166-2:CA)
|
|
67813
|
+
- Italy: province, see [ISO 3166-2:IT](https://en.wikipedia.org/wiki/ISO_3166-2:IT)
|
|
67814
|
+
- Brazil: state, see [ISO 3166-2:BR](https://en.wikipedia.org/wiki/ISO_3166-2:BR)
|
|
67815
|
+
|
|
67816
|
+
A code or a name is accepted (e.g. \`ON\` or \`Ontario\`); a value that matches neither for these countries is rejected. For any other country, the state is ignored.`,
|
|
67386
67817
|
example: "CA"
|
|
67387
67818
|
});
|
|
67388
67819
|
|
|
@@ -67496,6 +67927,7 @@ var toLogRequest = (config4) => {
|
|
|
67496
67927
|
};
|
|
67497
67928
|
|
|
67498
67929
|
// ../hyperline-lib/build/httpClient/publicUrlFetch.js
|
|
67930
|
+
import { lookup as lookupCallback } from "node:dns";
|
|
67499
67931
|
import { lookup } from "node:dns/promises";
|
|
67500
67932
|
import { isIP } from "node:net";
|
|
67501
67933
|
import { Agent, fetch as fetch2 } from "undici";
|
|
@@ -67583,6 +68015,62 @@ import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/
|
|
|
67583
68015
|
// ../hyperline-mcp/build/server/server.js
|
|
67584
68016
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
67585
68017
|
|
|
68018
|
+
// build/multipart.js
|
|
68019
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
68020
|
+
import { basename, extname } from "node:path";
|
|
68021
|
+
var MIMETYPES_BY_EXTENSION = {
|
|
68022
|
+
".csv": "text/csv",
|
|
68023
|
+
".doc": "application/msword",
|
|
68024
|
+
".docx": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
|
|
68025
|
+
".gif": "image/gif",
|
|
68026
|
+
".jpeg": "image/jpeg",
|
|
68027
|
+
".jpg": "image/jpeg",
|
|
68028
|
+
".json": "application/json",
|
|
68029
|
+
".pdf": "application/pdf",
|
|
68030
|
+
".png": "image/png",
|
|
68031
|
+
".svg": "image/svg+xml",
|
|
68032
|
+
".txt": "text/plain",
|
|
68033
|
+
".xls": "application/vnd.ms-excel",
|
|
68034
|
+
".xlsx": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
|
|
68035
|
+
".xml": "application/xml"
|
|
68036
|
+
};
|
|
68037
|
+
function getMimetypeFromPath(filePath) {
|
|
68038
|
+
return MIMETYPES_BY_EXTENSION[extname(filePath).toLowerCase()] ?? "application/octet-stream";
|
|
68039
|
+
}
|
|
68040
|
+
function appendFormValue({ formData, key, value }) {
|
|
68041
|
+
if (value === void 0) {
|
|
68042
|
+
return;
|
|
68043
|
+
}
|
|
68044
|
+
if (value === null) {
|
|
68045
|
+
formData.append(key, "");
|
|
68046
|
+
return;
|
|
68047
|
+
}
|
|
68048
|
+
if (Array.isArray(value)) {
|
|
68049
|
+
for (const [index, item] of value.entries()) {
|
|
68050
|
+
appendFormValue({ formData, key: `${key}[${index}]`, value: item });
|
|
68051
|
+
}
|
|
68052
|
+
return;
|
|
68053
|
+
}
|
|
68054
|
+
if (typeof value === "object") {
|
|
68055
|
+
throw new Error(`--${key} cannot be sent alongside files: a multipart request only carries scalar fields.`);
|
|
68056
|
+
}
|
|
68057
|
+
formData.append(key, String(value));
|
|
68058
|
+
}
|
|
68059
|
+
async function buildMultipartBody({ data, files }) {
|
|
68060
|
+
const formData = new FormData();
|
|
68061
|
+
for (const [key, value] of Object.entries(data)) {
|
|
68062
|
+
appendFormValue({ formData, key, value });
|
|
68063
|
+
}
|
|
68064
|
+
const fileUploads = Object.entries(files).flatMap(([fieldName, filePaths]) => filePaths.map((filePath) => ({ fieldName, filePath })));
|
|
68065
|
+
const fileContents = await Promise.all(fileUploads.map(({ filePath }) => readFile2(filePath)));
|
|
68066
|
+
for (const [index, { fieldName, filePath }] of fileUploads.entries()) {
|
|
68067
|
+
formData.append(fieldName, new Blob([new Uint8Array(fileContents[index])], {
|
|
68068
|
+
type: getMimetypeFromPath(filePath)
|
|
68069
|
+
}), basename(filePath));
|
|
68070
|
+
}
|
|
68071
|
+
return formData;
|
|
68072
|
+
}
|
|
68073
|
+
|
|
67586
68074
|
// build/output.js
|
|
67587
68075
|
function formatOutput({ data, format: format2 }) {
|
|
67588
68076
|
if (format2 === "json") {
|
|
@@ -67642,7 +68130,7 @@ function createCLIContext({ apiKey, baseUrl, outputFormat, source, companyId })
|
|
|
67642
68130
|
return {
|
|
67643
68131
|
baseUrl,
|
|
67644
68132
|
outputFormat,
|
|
67645
|
-
async execute({ method, path: path2, args, queryParamKeys = [], body, baseUrlOverride }) {
|
|
68133
|
+
async execute({ method, path: path2, args, queryParamKeys = [], body, files, baseUrlOverride }) {
|
|
67646
68134
|
const { url: url2, params, data } = buildRequestConfig({
|
|
67647
68135
|
path: path2,
|
|
67648
68136
|
args,
|
|
@@ -67651,12 +68139,16 @@ function createCLIContext({ apiKey, baseUrl, outputFormat, source, companyId })
|
|
|
67651
68139
|
});
|
|
67652
68140
|
const requestData = body ?? data;
|
|
67653
68141
|
const hasData = Array.isArray(requestData) ? requestData.length > 0 : requestData != null && Object.keys(requestData).length > 0;
|
|
68142
|
+
const hasFiles = Object.values(files ?? {}).some((filePaths) => filePaths.length > 0);
|
|
67654
68143
|
try {
|
|
67655
68144
|
const response = await httpClient.request({
|
|
67656
68145
|
method,
|
|
67657
68146
|
url: url2,
|
|
67658
68147
|
params,
|
|
67659
|
-
data:
|
|
68148
|
+
data: hasFiles ? await buildMultipartBody({
|
|
68149
|
+
data: requestData ?? {},
|
|
68150
|
+
files: files ?? {}
|
|
68151
|
+
}) : hasData ? requestData : void 0,
|
|
67660
68152
|
...baseUrlOverride ? { baseURL: baseUrlOverride } : {},
|
|
67661
68153
|
headers: {
|
|
67662
68154
|
"Hyperline-Source": source,
|