@hyperline/cli 0.1.0-build.1.23c80aa → 0.1.0-build.1.245f22f
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 +111 -4
- package/package.json +1 -1
|
@@ -40673,9 +40673,88 @@ Examples:
|
|
|
40673
40673
|
});
|
|
40674
40674
|
}
|
|
40675
40675
|
|
|
40676
|
+
// build/commands/generated/approval-requests.js
|
|
40677
|
+
function registerApproval_RequestsCommands(parent) {
|
|
40678
|
+
const resource = parent.command("approval-requests").description("Manage approval > requests");
|
|
40679
|
+
resource.command("get").description(`Retrieve an approval request and its decisions.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
40680
|
+
Examples:
|
|
40681
|
+
hyperline approval-requests get --id <id>`).action(async (opts) => {
|
|
40682
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40683
|
+
if (!ctx) {
|
|
40684
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40685
|
+
process.exit(1);
|
|
40686
|
+
}
|
|
40687
|
+
const args = {};
|
|
40688
|
+
if (opts.id !== void 0)
|
|
40689
|
+
args.id = opts.id;
|
|
40690
|
+
await ctx.execute({
|
|
40691
|
+
method: "GET",
|
|
40692
|
+
path: "/v1/approvals/requests/{id}",
|
|
40693
|
+
args,
|
|
40694
|
+
queryParamKeys: []
|
|
40695
|
+
});
|
|
40696
|
+
});
|
|
40697
|
+
resource.command("approve").description(`Approve the current step of an approval request.`).requiredOption("--id <value>", `id parameter`).requiredOption("--step-id <value>", `Expected current workflow step ID. A stale step is rejected instead of deciding the next step.`).option("--approver-id <value>", `Identifier of the account member making the decision. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user.`).option("--comment <value>", `Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters.`).option("--approver-email <value>", `Email of the account member making the decision, matched case-insensitively. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user.`).addHelpText("after", `
|
|
40698
|
+
Examples:
|
|
40699
|
+
hyperline approval-requests approve --id <id> --step-id <step_id>
|
|
40700
|
+
hyperline approval-requests approve --id <id> --step-id <step_id> --approver-id <approver_id> --comment <comment>
|
|
40701
|
+
hyperline approval-requests approve --id <id> --step-id <step_id> --output json`).action(async (opts) => {
|
|
40702
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40703
|
+
if (!ctx) {
|
|
40704
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40705
|
+
process.exit(1);
|
|
40706
|
+
}
|
|
40707
|
+
const args = {};
|
|
40708
|
+
if (opts.id !== void 0)
|
|
40709
|
+
args.id = opts.id;
|
|
40710
|
+
if (opts.stepId !== void 0)
|
|
40711
|
+
args.step_id = opts.stepId;
|
|
40712
|
+
if (opts.approverId !== void 0)
|
|
40713
|
+
args.approver_id = opts.approverId;
|
|
40714
|
+
if (opts.comment !== void 0)
|
|
40715
|
+
args.comment = opts.comment;
|
|
40716
|
+
if (opts.approverEmail !== void 0)
|
|
40717
|
+
args.approver_email = opts.approverEmail;
|
|
40718
|
+
await ctx.execute({
|
|
40719
|
+
method: "POST",
|
|
40720
|
+
path: "/v1/approvals/requests/{id}/approve",
|
|
40721
|
+
args,
|
|
40722
|
+
queryParamKeys: []
|
|
40723
|
+
});
|
|
40724
|
+
});
|
|
40725
|
+
resource.command("reject").description(`Reject an approval request with a required comment.`).requiredOption("--id <value>", `id parameter`).requiredOption("--step-id <value>", `Expected current workflow step ID. A stale step is rejected instead of deciding the next step.`).option("--approver-id <value>", `Identifier of the account member making the decision. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user.`).requiredOption("--comment <value>", `Decision comment. Required and nonblank when rejecting; optional when approving. Trimmed, with a maximum of 2000 characters.`).option("--approver-email <value>", `Email of the account member making the decision, matched case-insensitively. Supply exactly one of approver_id or approver_email. With a user token, this must be the authenticated user.`).addHelpText("after", `
|
|
40726
|
+
Examples:
|
|
40727
|
+
hyperline approval-requests reject --id <id> --step-id <step_id> --comment <comment>
|
|
40728
|
+
hyperline approval-requests reject --id <id> --step-id <step_id> --comment <comment> --approver-id <approver_id> --approver-email <approver_email>
|
|
40729
|
+
hyperline approval-requests reject --id <id> --step-id <step_id> --comment <comment> --output json`).action(async (opts) => {
|
|
40730
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
40731
|
+
if (!ctx) {
|
|
40732
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
40733
|
+
process.exit(1);
|
|
40734
|
+
}
|
|
40735
|
+
const args = {};
|
|
40736
|
+
if (opts.id !== void 0)
|
|
40737
|
+
args.id = opts.id;
|
|
40738
|
+
if (opts.stepId !== void 0)
|
|
40739
|
+
args.step_id = opts.stepId;
|
|
40740
|
+
if (opts.approverId !== void 0)
|
|
40741
|
+
args.approver_id = opts.approverId;
|
|
40742
|
+
if (opts.comment !== void 0)
|
|
40743
|
+
args.comment = opts.comment;
|
|
40744
|
+
if (opts.approverEmail !== void 0)
|
|
40745
|
+
args.approver_email = opts.approverEmail;
|
|
40746
|
+
await ctx.execute({
|
|
40747
|
+
method: "POST",
|
|
40748
|
+
path: "/v1/approvals/requests/{id}/reject",
|
|
40749
|
+
args,
|
|
40750
|
+
queryParamKeys: []
|
|
40751
|
+
});
|
|
40752
|
+
});
|
|
40753
|
+
}
|
|
40754
|
+
|
|
40676
40755
|
// build/commands/generated/approval-workflows.js
|
|
40677
40756
|
function registerApproval_WorkflowsCommands(parent) {
|
|
40678
|
-
const resource = parent.command("approval-workflows").description("Manage approval workflows");
|
|
40757
|
+
const resource = parent.command("approval-workflows").description("Manage approval > workflows");
|
|
40679
40758
|
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
40759
|
Examples:
|
|
40681
40760
|
hyperline approval-workflows list
|
|
@@ -44097,7 +44176,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
|
|
|
44097
44176
|
|
|
44098
44177
|
- \`current\`: Use the current default payment method of the customer.
|
|
44099
44178
|
- \`external\`: Manage the payment of the invoice outside of Hyperline.
|
|
44100
|
-
`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), resolved to the start of that day in the customer timezone. Requires \`status\` to be \`draft\` and an issue date after today. Default to \`manual\`.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).requiredOption("--line-items <json>", `line_items`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
|
|
44179
|
+
`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--emitted-at <value>", `Issue date of the invoice.`).option("--due-at <value>", `Due date of the invoice. Computed from the issue date and the payment delay configured in your settings.`).option("--settled-at <value>", `Date the invoice was fully paid.`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), resolved to the start of that day in the customer timezone. Requires \`status\` to be \`draft\` and an issue date after today. Default to \`manual\`.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--original-invoice-id <value>", `Reference invoice for a credit note, including an imported invoice. Must belong to the same customer, currency and invoicing entity. This reference does not apply credit; use \`allocations\` separately.`).requiredOption("--line-items <json>", `line_items`).option("--allocations <json>", `Invoice applications for a credit note, independent of \`original_invoice_id\`. Omit or send an empty array to apply no credit. Created atomically with the credit note. Amounts must fit the available credit and target balances. For \`paid\` credit notes, non-empty allocations and explicit transactions must settle the full amount; no refund transaction is inferred.`).option("--transactions <json>", `transactions`).option("--coupons <json>", `coupons`).addHelpText("after", `
|
|
44101
44180
|
Examples:
|
|
44102
44181
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
|
|
44103
44182
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
|
|
@@ -44150,6 +44229,8 @@ Examples:
|
|
|
44150
44229
|
args.settled_at = opts.settledAt;
|
|
44151
44230
|
if (opts.issuingMethod !== void 0)
|
|
44152
44231
|
args.issuing_method = opts.issuingMethod;
|
|
44232
|
+
if (opts.originalInvoiceId !== void 0)
|
|
44233
|
+
args.original_invoice_id = opts.originalInvoiceId;
|
|
44153
44234
|
if (opts.properties !== void 0)
|
|
44154
44235
|
args.properties = JSON.parse(opts.properties);
|
|
44155
44236
|
if (opts.customProperties !== void 0)
|
|
@@ -44158,6 +44239,8 @@ Examples:
|
|
|
44158
44239
|
args.additional_display_fields = JSON.parse(opts.additionalDisplayFields);
|
|
44159
44240
|
if (opts.lineItems !== void 0)
|
|
44160
44241
|
args.line_items = JSON.parse(opts.lineItems);
|
|
44242
|
+
if (opts.allocations !== void 0)
|
|
44243
|
+
args.allocations = JSON.parse(opts.allocations);
|
|
44161
44244
|
if (opts.transactions !== void 0)
|
|
44162
44245
|
args.transactions = JSON.parse(opts.transactions);
|
|
44163
44246
|
if (opts.coupons !== void 0)
|
|
@@ -44360,7 +44443,28 @@ Examples:
|
|
|
44360
44443
|
queryParamKeys: []
|
|
44361
44444
|
});
|
|
44362
44445
|
});
|
|
44363
|
-
resource.command("update").description(`
|
|
44446
|
+
resource.command("update-credit-note-allocations").description(`Replace a credit note's invoice allocations, including imported invoices, without changing its original invoice reference.`).requiredOption("--id <value>", `id parameter`).requiredOption("--allocations <json>", `Complete replacement of this credit note's invoice applications. An empty array removes all applications, preserving the original invoice reference. Targets must share the customer, currency and invoicing entity. Amounts exceeding available credit or invoice balances are rejected.`).addHelpText("after", `
|
|
44447
|
+
Examples:
|
|
44448
|
+
hyperline invoices update-credit-note-allocations --id <id> --allocations <allocations>
|
|
44449
|
+
hyperline invoices update-credit-note-allocations --id <id> --allocations <allocations> --output json`).action(async (opts) => {
|
|
44450
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
44451
|
+
if (!ctx) {
|
|
44452
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
44453
|
+
process.exit(1);
|
|
44454
|
+
}
|
|
44455
|
+
const args = {};
|
|
44456
|
+
if (opts.id !== void 0)
|
|
44457
|
+
args.id = opts.id;
|
|
44458
|
+
if (opts.allocations !== void 0)
|
|
44459
|
+
args.allocations = JSON.parse(opts.allocations);
|
|
44460
|
+
await ctx.execute({
|
|
44461
|
+
method: "PUT",
|
|
44462
|
+
path: "/v1/invoices/{id}/allocations",
|
|
44463
|
+
args,
|
|
44464
|
+
queryParamKeys: []
|
|
44465
|
+
});
|
|
44466
|
+
});
|
|
44467
|
+
resource.command("update").description(`Update an invoice. Send original_invoice_id alone to fill a missing reference on an imported credit note without changing allocations. Draft/grace_period allow modifying line items, dates, and metadata before finalization. Finalized invoices allow updating product and price links and revenue classification on existing line items by ID, with unchanged amounts/taxes and automatic accounting reposting, plus metadata (paid/partially_paid: custom_note/purchase_order/custom_properties/additional_display_fields/subscription_id; uncollectible: properties/custom_note/custom_properties/additional_display_fields/subscription_id).`).requiredOption("--id <value>", `id parameter`).option("--type <value>", `Type of the invoice.
|
|
44364
44468
|
|
|
44365
44469
|
- \`invoice\`: Legal invoice to be paid by your customer.
|
|
44366
44470
|
- \`credit_note\`: Legal credit note cancelling an invoice and refunding your customer.
|
|
@@ -44369,7 +44473,7 @@ Examples:
|
|
|
44369
44473
|
|
|
44370
44474
|
- \`auto\`: Tax is automatically computed and applied.
|
|
44371
44475
|
- \`not_eligible\`: Tax collection is disabled for the invoice.
|
|
44372
|
-
`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), in the invoice timezone. The issue date must be after today. Set to \`manual\` to unschedule the invoice.`).option("--emitted-at <value>", `Issue date of the draft invoice. For a scheduled invoice, the day on which it is automatically finalized.`).option("--line-items <json>", `Draft edits replace the line list. Finalized invoice line updates accept up to 100 lines per request and update only the specified existing line IDs and allow product and price links and revenue classification; amounts and taxes stay unchanged. Accounting postings are rebuilt atomically; updates affecting closed accounting periods are rejected.`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
|
|
44476
|
+
`).option("--issuing-method <value>", `Set to \`scheduled\` to finalize the draft invoice automatically on its issue date (\`emitted_at\`), in the invoice timezone. The issue date must be after today. Set to \`manual\` to unschedule the invoice.`).option("--emitted-at <value>", `Issue date of the draft invoice. For a scheduled invoice, the day on which it is automatically finalized.`).option("--line-items <json>", `Draft edits replace the line list. Finalized invoice line updates accept up to 100 lines per request and update only the specified existing line IDs and allow product and price links and revenue classification; amounts and taxes stay unchanged. Accounting postings are rebuilt atomically; updates affecting closed accounting periods are rejected.`).option("--coupons <json>", `coupons`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-id <value>", `ID of the default payment method used to pay the invoice. Transactions related to the invoice may use different payment methods.`).option("--bank-account-id <value>", `ID of the bank account displayed on the invoice. Transactions related to the invoice may use different bank accounts.`).option("--subscription-id <value>", `ID of the subscription related to the invoice.`).option("--original-invoice-id <value>", `Fill a missing reference invoice on an imported credit note. Cannot replace or clear an existing reference. Does not change allocations. Send this field alone.`).option("--properties <json>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <json>", `Values for custom properties defined for the \`invoice\` entity, keyed by slug.`).option("--additional-display-fields <json>", `Ordered additional fields displayed on the invoice PDF. Invoice and customer custom properties are referenced by slug.`).option("--customer <json>", `Override customer details on the invoice. Only allowed for draft or grace period invoices.`).addHelpText("after", `
|
|
44373
44477
|
Examples:
|
|
44374
44478
|
hyperline invoices update --id <id>
|
|
44375
44479
|
hyperline invoices update --id <id> --type <type> --document-name <document_name>
|
|
@@ -44410,6 +44514,8 @@ Examples:
|
|
|
44410
44514
|
args.bank_account_id = opts.bankAccountId;
|
|
44411
44515
|
if (opts.subscriptionId !== void 0)
|
|
44412
44516
|
args.subscription_id = opts.subscriptionId;
|
|
44517
|
+
if (opts.originalInvoiceId !== void 0)
|
|
44518
|
+
args.original_invoice_id = opts.originalInvoiceId;
|
|
44413
44519
|
if (opts.lineItems !== void 0)
|
|
44414
44520
|
args.line_items = JSON.parse(opts.lineItems);
|
|
44415
44521
|
if (opts.coupons !== void 0)
|
|
@@ -48079,6 +48185,7 @@ function registerAllCommands(program2) {
|
|
|
48079
48185
|
registerAi_BillingCommands(program2);
|
|
48080
48186
|
registerAi_CostsCommands(program2);
|
|
48081
48187
|
registerAnalyticsCommands(program2);
|
|
48188
|
+
registerApproval_RequestsCommands(program2);
|
|
48082
48189
|
registerApproval_WorkflowsCommands(program2);
|
|
48083
48190
|
registerBank_AccountsCommands(program2);
|
|
48084
48191
|
registerCatalogCommands(program2);
|