@hyperline/cli 0.1.0-build.1.d661ec4 → 0.1.0-build.1.d803cfa
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 +27 -1
- package/package.json +1 -1
|
@@ -40469,7 +40469,7 @@ Examples:
|
|
|
40469
40469
|
queryParamKeys: []
|
|
40470
40470
|
});
|
|
40471
40471
|
});
|
|
40472
|
-
resource.command("update").description(`Update an invoice. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices are restricted to metadata (paid: custom_note; uncollectible: properties/custom_note/custom_properties).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
|
|
40472
|
+
resource.command("update").description(`Update an invoice. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices are restricted to metadata (paid: custom_note/purchase_order; uncollectible: properties/custom_note/custom_properties).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
|
|
40473
40473
|
|
|
40474
40474
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
40475
40475
|
- \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
|
|
@@ -41425,6 +41425,32 @@ Examples:
|
|
|
41425
41425
|
queryParamKeys: []
|
|
41426
41426
|
});
|
|
41427
41427
|
});
|
|
41428
|
+
resource.command("delete").description(`Permanently delete an archived product by ID. Products attached to subscriptions, plans, or templates cannot be deleted.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
41429
|
+
Examples:
|
|
41430
|
+
hyperline products delete --id <id>
|
|
41431
|
+
hyperline products delete --id <id> --output json`).action(async (opts) => {
|
|
41432
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
41433
|
+
if (!ctx) {
|
|
41434
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
41435
|
+
process.exit(1);
|
|
41436
|
+
}
|
|
41437
|
+
const args = {};
|
|
41438
|
+
if (opts.id !== void 0)
|
|
41439
|
+
args.id = opts.id;
|
|
41440
|
+
if (!opts.yes) {
|
|
41441
|
+
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
41442
|
+
if (!confirmed) {
|
|
41443
|
+
process.stdout.write("Aborted.\n");
|
|
41444
|
+
return;
|
|
41445
|
+
}
|
|
41446
|
+
}
|
|
41447
|
+
await ctx.execute({
|
|
41448
|
+
method: "DELETE",
|
|
41449
|
+
path: "/v1/products/{id}",
|
|
41450
|
+
args,
|
|
41451
|
+
queryParamKeys: []
|
|
41452
|
+
});
|
|
41453
|
+
});
|
|
41428
41454
|
resource.command("unarchive").description(`Restore a previously archived product, making it available for new subscriptions again.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
41429
41455
|
Examples:
|
|
41430
41456
|
hyperline products unarchive --id <id>
|