@hyperline/cli 0.1.0-build.1.bfa95a3 → 0.1.0-build.1.c149208
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 +1 -61
- package/package.json +3 -2
|
@@ -41892,7 +41892,7 @@ Examples:
|
|
|
41892
41892
|
// build/commands/generated/invoices-transactions.js
|
|
41893
41893
|
function registerInvoices_TransactionsCommands(parent) {
|
|
41894
41894
|
const resource = parent.command("invoices-transactions").description("Manage invoices > transactions");
|
|
41895
|
-
resource.command("create-invoice-transaction").description(`Record a payment transaction on an invoice.
|
|
41895
|
+
resource.command("create-invoice-transaction").description(`Record a payment transaction on an invoice. May update the invoice status to paid or partially_paid depending on the amount.`).requiredOption("--id <value>", `id parameter`).requiredOption("--amount <number>", `Transaction amount.`).requiredOption("--process-at <value>", `Date corresponding to the processing of the transaction. If in the future, the transaction is scheduled to be processed.`).option("--payment-method-id <value>", `Payment method used to execute the transaction. Only applies to scheduled transactions with a process_at date in the future.`).option("--payment-method-type <value>", `payment_method_type`).option("--bank-account-id <value>", `Bank account linked to the transaction.`).option("--provider-name <value>", `Provider name.`).option("--provider-id <value>", `Provider ID. Required if multiple instances of the same provider are connected in Hyperline.`).option("--provider-transaction-id <value>", `ID of the transaction on the provider's side. If the transaction is pending, Hyperline will automatically refresh it with the latest details until it is settled. Note that the \`amount\` and \`process_at\` fields may be overridden by the transaction data.`).addHelpText("after", `
|
|
41896
41896
|
Examples:
|
|
41897
41897
|
hyperline invoices-transactions create-invoice-transaction --id <id> --amount <amount> --process-at <process_at>
|
|
41898
41898
|
hyperline invoices-transactions create-invoice-transaction --id <id> --amount <amount> --process-at <process_at> --payment-method-id <payment_method_id> --payment-method-type <payment_method_type>
|
|
@@ -44653,66 +44653,6 @@ Examples:
|
|
|
44653
44653
|
// build/commands/generated/transactions.js
|
|
44654
44654
|
function registerTransactionsCommands(parent) {
|
|
44655
44655
|
const resource = parent.command("transactions").description("Manage transactions");
|
|
44656
|
-
resource.command("create").description(`Record an offline payment, refund, or chargeback; this records money already moved and does not initiate a payment.`).requiredOption("--customer-id <value>", `ID of the customer linked to the transaction.`).requiredOption("--amount <number>", `Positive transaction amount in the customer's currency's smallest unit.`).requiredOption("--date <value>", `Date when the offline transaction settled.`).option("--payment-method-type <value>", `Offline payment method: bank transfer or external payment.`).option("--bank-account-id <value>", `Bank account for a transfer, in the customer's currency; not allowed for external payments.`).requiredOption("--type <value>", `Type of offline transaction to record.`).option("--reference <value>", `Optional reference identifying the offline payment.`).option("--original-transaction-id <value>", `Original payment transaction ID for a refund or chargeback.`).addHelpText("after", `
|
|
44657
|
-
Examples:
|
|
44658
|
-
hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type>
|
|
44659
|
-
hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type> --payment-method-type <payment_method_type> --bank-account-id <bank_account_id>
|
|
44660
|
-
hyperline transactions create --customer-id <customer_id> --amount <amount> --date <date> --type <type> --output json`).action(async (opts) => {
|
|
44661
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
44662
|
-
if (!ctx) {
|
|
44663
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
44664
|
-
process.exit(1);
|
|
44665
|
-
}
|
|
44666
|
-
const args = {};
|
|
44667
|
-
if (opts.customerId !== void 0)
|
|
44668
|
-
args.customer_id = opts.customerId;
|
|
44669
|
-
if (opts.date !== void 0)
|
|
44670
|
-
args.date = opts.date;
|
|
44671
|
-
if (opts.paymentMethodType !== void 0)
|
|
44672
|
-
args.payment_method_type = opts.paymentMethodType;
|
|
44673
|
-
if (opts.bankAccountId !== void 0)
|
|
44674
|
-
args.bank_account_id = opts.bankAccountId;
|
|
44675
|
-
if (opts.type !== void 0)
|
|
44676
|
-
args.type = opts.type;
|
|
44677
|
-
if (opts.reference !== void 0)
|
|
44678
|
-
args.reference = opts.reference;
|
|
44679
|
-
if (opts.originalTransactionId !== void 0)
|
|
44680
|
-
args.original_transaction_id = opts.originalTransactionId;
|
|
44681
|
-
if (opts.amount !== void 0)
|
|
44682
|
-
args.amount = Number(opts.amount);
|
|
44683
|
-
await ctx.execute({
|
|
44684
|
-
method: "POST",
|
|
44685
|
-
path: "/v1/transactions",
|
|
44686
|
-
args,
|
|
44687
|
-
queryParamKeys: []
|
|
44688
|
-
});
|
|
44689
|
-
});
|
|
44690
|
-
resource.command("delete").description(`Delete an unallocated offline transaction with no wallet funding or dependent transactions; this does not reverse a payment.`).requiredOption("--id <value>", `id parameter`).option("--yes", "Skip confirmation").addHelpText("after", `
|
|
44691
|
-
Examples:
|
|
44692
|
-
hyperline transactions delete --id <id>
|
|
44693
|
-
hyperline transactions delete --id <id> --output json`).action(async (opts) => {
|
|
44694
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
44695
|
-
if (!ctx) {
|
|
44696
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
44697
|
-
process.exit(1);
|
|
44698
|
-
}
|
|
44699
|
-
const args = {};
|
|
44700
|
-
if (opts.id !== void 0)
|
|
44701
|
-
args.id = opts.id;
|
|
44702
|
-
if (!opts.yes) {
|
|
44703
|
-
const confirmed = await confirmPrompt("Are you sure? Pass --yes to skip. [y/N] ");
|
|
44704
|
-
if (!confirmed) {
|
|
44705
|
-
process.stdout.write("Aborted.\n");
|
|
44706
|
-
return;
|
|
44707
|
-
}
|
|
44708
|
-
}
|
|
44709
|
-
await ctx.execute({
|
|
44710
|
-
method: "DELETE",
|
|
44711
|
-
path: "/v1/transactions/{id}",
|
|
44712
|
-
args,
|
|
44713
|
-
queryParamKeys: []
|
|
44714
|
-
});
|
|
44715
|
-
});
|
|
44716
44656
|
resource.command("list").description(`List transactions across all invoices, including transactions without an invoice allocation. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
44717
44657
|
Examples:
|
|
44718
44658
|
hyperline transactions list
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hyperline/cli",
|
|
3
|
-
"version": "0.1.0-build.1.
|
|
3
|
+
"version": "0.1.0-build.1.c149208",
|
|
4
4
|
"description": "Agent-first CLI for Hyperline API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
"lint:check": "biome check",
|
|
19
19
|
"lint:check:ci": "biome ci",
|
|
20
20
|
"lint": "biome check --write",
|
|
21
|
-
"test": "TZ=UTC vitest run --project unit --passWithNoTests"
|
|
21
|
+
"test": "TZ=UTC vitest run --project unit --passWithNoTests",
|
|
22
|
+
"typecheck": "tsc -b --emitDeclarationOnly"
|
|
22
23
|
},
|
|
23
24
|
"dependencies": {
|
|
24
25
|
"@asteasolutions/zod-to-openapi": "8.1.0",
|