@hyperline/cli 0.1.0-build.1.5d814bb → 0.1.0-build.1.64a032e
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 +101 -95
- package/package.json +1 -1
|
@@ -27860,101 +27860,6 @@ Examples:
|
|
|
27860
27860
|
queryParamKeys: []
|
|
27861
27861
|
});
|
|
27862
27862
|
});
|
|
27863
|
-
resource.command("list-customers-segments").description(`Retrieve all customer segments.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
27864
|
-
Examples:
|
|
27865
|
-
hyperline customers list-customers-segments
|
|
27866
|
-
hyperline customers list-customers-segments --take <take>`).action(async (opts) => {
|
|
27867
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
27868
|
-
if (!ctx) {
|
|
27869
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
27870
|
-
process.exit(1);
|
|
27871
|
-
}
|
|
27872
|
-
const args = {};
|
|
27873
|
-
if (opts.take !== void 0)
|
|
27874
|
-
args.take = Number(opts.take);
|
|
27875
|
-
if (opts.skip !== void 0)
|
|
27876
|
-
args.skip = Number(opts.skip);
|
|
27877
|
-
await ctx.execute({
|
|
27878
|
-
method: "GET",
|
|
27879
|
-
path: "/v1/customers/segments",
|
|
27880
|
-
args,
|
|
27881
|
-
queryParamKeys: ["take", "skip"]
|
|
27882
|
-
});
|
|
27883
|
-
});
|
|
27884
|
-
resource.command("create-customers-segment").description(`Create a new customer segment.`).requiredOption("--name <value>", `name`).option("--description <value>", `description`).requiredOption("--rules <value>", `rules`).addHelpText("after", `
|
|
27885
|
-
Examples:
|
|
27886
|
-
hyperline customers create-customers-segment --name <name> --rules <rules>
|
|
27887
|
-
hyperline customers create-customers-segment --name <name> --rules <rules> --description <description>
|
|
27888
|
-
hyperline customers create-customers-segment --name <name> --rules <rules> --output json`).action(async (opts) => {
|
|
27889
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
27890
|
-
if (!ctx) {
|
|
27891
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
27892
|
-
process.exit(1);
|
|
27893
|
-
}
|
|
27894
|
-
const args = {};
|
|
27895
|
-
if (opts.name !== void 0)
|
|
27896
|
-
args.name = opts.name;
|
|
27897
|
-
if (opts.description !== void 0)
|
|
27898
|
-
args.description = opts.description;
|
|
27899
|
-
if (opts.rules !== void 0)
|
|
27900
|
-
args.rules = opts.rules;
|
|
27901
|
-
await ctx.execute({
|
|
27902
|
-
method: "POST",
|
|
27903
|
-
path: "/v1/customers/segments",
|
|
27904
|
-
args,
|
|
27905
|
-
queryParamKeys: []
|
|
27906
|
-
});
|
|
27907
|
-
});
|
|
27908
|
-
resource.command("preview-customers-segments").description(`Preview which customers match the given segment criteria without saving the segment.`).option("--take <number>", `take`).option("--skip <number>", `skip`).requiredOption("--rules <value>", `rules`).addHelpText("after", `
|
|
27909
|
-
Examples:
|
|
27910
|
-
hyperline customers preview-customers-segments --rules <rules>
|
|
27911
|
-
hyperline customers preview-customers-segments --rules <rules> --take <take>
|
|
27912
|
-
hyperline customers preview-customers-segments --rules <rules> --output json`).action(async (opts) => {
|
|
27913
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
27914
|
-
if (!ctx) {
|
|
27915
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
27916
|
-
process.exit(1);
|
|
27917
|
-
}
|
|
27918
|
-
const args = {};
|
|
27919
|
-
if (opts.rules !== void 0)
|
|
27920
|
-
args.rules = opts.rules;
|
|
27921
|
-
if (opts.take !== void 0)
|
|
27922
|
-
args.take = Number(opts.take);
|
|
27923
|
-
if (opts.skip !== void 0)
|
|
27924
|
-
args.skip = Number(opts.skip);
|
|
27925
|
-
await ctx.execute({
|
|
27926
|
-
method: "POST",
|
|
27927
|
-
path: "/v1/customers/segments/preview",
|
|
27928
|
-
args,
|
|
27929
|
-
queryParamKeys: ["take", "skip"]
|
|
27930
|
-
});
|
|
27931
|
-
});
|
|
27932
|
-
resource.command("update-customers-segment").description(`Update an existing customer segment.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `name`).option("--description <value>", `description`).option("--rules <value>", `rules`).addHelpText("after", `
|
|
27933
|
-
Examples:
|
|
27934
|
-
hyperline customers update-customers-segment --id <id>
|
|
27935
|
-
hyperline customers update-customers-segment --id <id> --name <name> --description <description>
|
|
27936
|
-
hyperline customers update-customers-segment --id <id> --output json`).action(async (opts) => {
|
|
27937
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
27938
|
-
if (!ctx) {
|
|
27939
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
27940
|
-
process.exit(1);
|
|
27941
|
-
}
|
|
27942
|
-
const args = {};
|
|
27943
|
-
if (opts.id !== void 0)
|
|
27944
|
-
args.id = opts.id;
|
|
27945
|
-
if (opts.name !== void 0)
|
|
27946
|
-
args.name = opts.name;
|
|
27947
|
-
if (opts.description !== void 0)
|
|
27948
|
-
args.description = opts.description;
|
|
27949
|
-
if (opts.rules !== void 0)
|
|
27950
|
-
args.rules = opts.rules;
|
|
27951
|
-
await ctx.execute({
|
|
27952
|
-
method: "PUT",
|
|
27953
|
-
path: "/v1/customers/segments/{id}",
|
|
27954
|
-
args,
|
|
27955
|
-
queryParamKeys: []
|
|
27956
|
-
});
|
|
27957
|
-
});
|
|
27958
27863
|
resource.command("get-customer-valuation").description(`Compute aggregated valuation metrics for a customer across all active subscriptions, grouped by currency. Returns contract value, recurring contract value, and ARR for each subscription and aggregated totals. Optionally pass granularity (year/quarter/month) for period breakdown.`).requiredOption("--id <value>", `id parameter`).option("--granularity <value>", `Period granularity for the breakdown. When provided, contract value and recurring contract value include a \`by_period\` array.`).addHelpText("after", `
|
|
27959
27864
|
Examples:
|
|
27960
27865
|
hyperline customers get-customer-valuation --id <id>
|
|
@@ -28393,6 +28298,106 @@ Examples:
|
|
|
28393
28298
|
});
|
|
28394
28299
|
}
|
|
28395
28300
|
|
|
28301
|
+
// build/commands/generated/customers-segments.js
|
|
28302
|
+
function registerCustomers_SegmentsCommands(parent) {
|
|
28303
|
+
const resource = parent.command("customers-segments").description("Manage customers > segments");
|
|
28304
|
+
resource.command("list").description(`Retrieve all customer segments.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
28305
|
+
Examples:
|
|
28306
|
+
hyperline customers-segments list
|
|
28307
|
+
hyperline customers-segments list --take <take>`).action(async (opts) => {
|
|
28308
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
28309
|
+
if (!ctx) {
|
|
28310
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
28311
|
+
process.exit(1);
|
|
28312
|
+
}
|
|
28313
|
+
const args = {};
|
|
28314
|
+
if (opts.take !== void 0)
|
|
28315
|
+
args.take = Number(opts.take);
|
|
28316
|
+
if (opts.skip !== void 0)
|
|
28317
|
+
args.skip = Number(opts.skip);
|
|
28318
|
+
await ctx.execute({
|
|
28319
|
+
method: "GET",
|
|
28320
|
+
path: "/v1/customers/segments",
|
|
28321
|
+
args,
|
|
28322
|
+
queryParamKeys: ["take", "skip"]
|
|
28323
|
+
});
|
|
28324
|
+
});
|
|
28325
|
+
resource.command("create").description(`Create a new customer segment.`).requiredOption("--name <value>", `name`).option("--description <value>", `description`).requiredOption("--rules <value>", `rules`).addHelpText("after", `
|
|
28326
|
+
Examples:
|
|
28327
|
+
hyperline customers-segments create --name <name> --rules <rules>
|
|
28328
|
+
hyperline customers-segments create --name <name> --rules <rules> --description <description>
|
|
28329
|
+
hyperline customers-segments create --name <name> --rules <rules> --output json`).action(async (opts) => {
|
|
28330
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
28331
|
+
if (!ctx) {
|
|
28332
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
28333
|
+
process.exit(1);
|
|
28334
|
+
}
|
|
28335
|
+
const args = {};
|
|
28336
|
+
if (opts.name !== void 0)
|
|
28337
|
+
args.name = opts.name;
|
|
28338
|
+
if (opts.description !== void 0)
|
|
28339
|
+
args.description = opts.description;
|
|
28340
|
+
if (opts.rules !== void 0)
|
|
28341
|
+
args.rules = opts.rules;
|
|
28342
|
+
await ctx.execute({
|
|
28343
|
+
method: "POST",
|
|
28344
|
+
path: "/v1/customers/segments",
|
|
28345
|
+
args,
|
|
28346
|
+
queryParamKeys: []
|
|
28347
|
+
});
|
|
28348
|
+
});
|
|
28349
|
+
resource.command("preview").description(`Preview which customers match the given segment rules without saving the segment.`).option("--take <number>", `take`).option("--skip <number>", `skip`).requiredOption("--rules <value>", `rules`).addHelpText("after", `
|
|
28350
|
+
Examples:
|
|
28351
|
+
hyperline customers-segments preview --rules <rules>
|
|
28352
|
+
hyperline customers-segments preview --rules <rules> --take <take>
|
|
28353
|
+
hyperline customers-segments preview --rules <rules> --output json`).action(async (opts) => {
|
|
28354
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
28355
|
+
if (!ctx) {
|
|
28356
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
28357
|
+
process.exit(1);
|
|
28358
|
+
}
|
|
28359
|
+
const args = {};
|
|
28360
|
+
if (opts.rules !== void 0)
|
|
28361
|
+
args.rules = opts.rules;
|
|
28362
|
+
if (opts.take !== void 0)
|
|
28363
|
+
args.take = Number(opts.take);
|
|
28364
|
+
if (opts.skip !== void 0)
|
|
28365
|
+
args.skip = Number(opts.skip);
|
|
28366
|
+
await ctx.execute({
|
|
28367
|
+
method: "POST",
|
|
28368
|
+
path: "/v1/customers/segments/preview",
|
|
28369
|
+
args,
|
|
28370
|
+
queryParamKeys: ["take", "skip"]
|
|
28371
|
+
});
|
|
28372
|
+
});
|
|
28373
|
+
resource.command("update").description(`Update an existing customer segment.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `name`).option("--description <value>", `description`).option("--rules <value>", `rules`).addHelpText("after", `
|
|
28374
|
+
Examples:
|
|
28375
|
+
hyperline customers-segments update --id <id>
|
|
28376
|
+
hyperline customers-segments update --id <id> --name <name> --description <description>
|
|
28377
|
+
hyperline customers-segments update --id <id> --output json`).action(async (opts) => {
|
|
28378
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
28379
|
+
if (!ctx) {
|
|
28380
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
28381
|
+
process.exit(1);
|
|
28382
|
+
}
|
|
28383
|
+
const args = {};
|
|
28384
|
+
if (opts.id !== void 0)
|
|
28385
|
+
args.id = opts.id;
|
|
28386
|
+
if (opts.name !== void 0)
|
|
28387
|
+
args.name = opts.name;
|
|
28388
|
+
if (opts.description !== void 0)
|
|
28389
|
+
args.description = opts.description;
|
|
28390
|
+
if (opts.rules !== void 0)
|
|
28391
|
+
args.rules = opts.rules;
|
|
28392
|
+
await ctx.execute({
|
|
28393
|
+
method: "PUT",
|
|
28394
|
+
path: "/v1/customers/segments/{id}",
|
|
28395
|
+
args,
|
|
28396
|
+
queryParamKeys: []
|
|
28397
|
+
});
|
|
28398
|
+
});
|
|
28399
|
+
}
|
|
28400
|
+
|
|
28396
28401
|
// build/commands/generated/exports.js
|
|
28397
28402
|
function registerExportsCommands(parent) {
|
|
28398
28403
|
const resource = parent.command("exports").description("Manage exports");
|
|
@@ -32141,6 +32146,7 @@ function registerAllCommands(program2) {
|
|
|
32141
32146
|
registerCustomers_Payment_MethodsCommands(program2);
|
|
32142
32147
|
registerCustomersCommands(program2);
|
|
32143
32148
|
registerOrganisationsCommands(program2);
|
|
32149
|
+
registerCustomers_SegmentsCommands(program2);
|
|
32144
32150
|
registerExportsCommands(program2);
|
|
32145
32151
|
registerFilesCommands(program2);
|
|
32146
32152
|
registerInvoicesCommands(program2);
|