@hyperline/cli 0.1.0-build.1.f6d0f3c → 0.1.0-build.1.f9abc9e
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 +407 -345
- package/package.json +4 -4
|
@@ -4462,7 +4462,7 @@ var require_types = __commonJS({
|
|
|
4462
4462
|
...processCreateParams(params)
|
|
4463
4463
|
});
|
|
4464
4464
|
};
|
|
4465
|
-
exports.BRAND = Symbol("zod_brand");
|
|
4465
|
+
exports.BRAND = /* @__PURE__ */ Symbol("zod_brand");
|
|
4466
4466
|
var ZodBranded = class extends ZodType2 {
|
|
4467
4467
|
_parse(input) {
|
|
4468
4468
|
const { ctx } = this._processInputParams(input);
|
|
@@ -4693,14 +4693,14 @@ var require_types = __commonJS({
|
|
|
4693
4693
|
var oboolean = () => booleanType().optional();
|
|
4694
4694
|
exports.oboolean = oboolean;
|
|
4695
4695
|
exports.coerce = {
|
|
4696
|
-
string: (arg) => ZodString2.create({ ...arg, coerce: true }),
|
|
4697
|
-
number: (arg) => ZodNumber2.create({ ...arg, coerce: true }),
|
|
4698
|
-
boolean: (arg) => ZodBoolean2.create({
|
|
4696
|
+
string: ((arg) => ZodString2.create({ ...arg, coerce: true })),
|
|
4697
|
+
number: ((arg) => ZodNumber2.create({ ...arg, coerce: true })),
|
|
4698
|
+
boolean: ((arg) => ZodBoolean2.create({
|
|
4699
4699
|
...arg,
|
|
4700
4700
|
coerce: true
|
|
4701
|
-
}),
|
|
4702
|
-
bigint: (arg) => ZodBigInt2.create({ ...arg, coerce: true }),
|
|
4703
|
-
date: (arg) => ZodDate2.create({ ...arg, coerce: true })
|
|
4701
|
+
})),
|
|
4702
|
+
bigint: ((arg) => ZodBigInt2.create({ ...arg, coerce: true })),
|
|
4703
|
+
date: ((arg) => ZodDate2.create({ ...arg, coerce: true }))
|
|
4704
4704
|
};
|
|
4705
4705
|
exports.NEVER = parseUtil_1.INVALID;
|
|
4706
4706
|
}
|
|
@@ -4710,7 +4710,7 @@ var require_types = __commonJS({
|
|
|
4710
4710
|
var require_external = __commonJS({
|
|
4711
4711
|
"../../node_modules/@hyperline/shared/node_modules/zod/lib/external.js"(exports) {
|
|
4712
4712
|
"use strict";
|
|
4713
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4713
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
4714
4714
|
if (k2 === void 0) k2 = k;
|
|
4715
4715
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4716
4716
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
@@ -4719,10 +4719,10 @@ var require_external = __commonJS({
|
|
|
4719
4719
|
} };
|
|
4720
4720
|
}
|
|
4721
4721
|
Object.defineProperty(o, k2, desc);
|
|
4722
|
-
} : function(o, m, k, k2) {
|
|
4722
|
+
}) : (function(o, m, k, k2) {
|
|
4723
4723
|
if (k2 === void 0) k2 = k;
|
|
4724
4724
|
o[k2] = m[k];
|
|
4725
|
-
});
|
|
4725
|
+
}));
|
|
4726
4726
|
var __exportStar = exports && exports.__exportStar || function(m, exports2) {
|
|
4727
4727
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports2, p)) __createBinding(exports2, m, p);
|
|
4728
4728
|
};
|
|
@@ -4740,7 +4740,7 @@ var require_external = __commonJS({
|
|
|
4740
4740
|
var require_lib = __commonJS({
|
|
4741
4741
|
"../../node_modules/@hyperline/shared/node_modules/zod/lib/index.js"(exports) {
|
|
4742
4742
|
"use strict";
|
|
4743
|
-
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4743
|
+
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
4744
4744
|
if (k2 === void 0) k2 = k;
|
|
4745
4745
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
4746
4746
|
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
@@ -4749,13 +4749,13 @@ var require_lib = __commonJS({
|
|
|
4749
4749
|
} };
|
|
4750
4750
|
}
|
|
4751
4751
|
Object.defineProperty(o, k2, desc);
|
|
4752
|
-
} : function(o, m, k, k2) {
|
|
4752
|
+
}) : (function(o, m, k, k2) {
|
|
4753
4753
|
if (k2 === void 0) k2 = k;
|
|
4754
4754
|
o[k2] = m[k];
|
|
4755
|
-
});
|
|
4756
|
-
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? function(o, v) {
|
|
4755
|
+
}));
|
|
4756
|
+
var __setModuleDefault = exports && exports.__setModuleDefault || (Object.create ? (function(o, v) {
|
|
4757
4757
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
4758
|
-
} : function(o, v) {
|
|
4758
|
+
}) : function(o, v) {
|
|
4759
4759
|
o["default"] = v;
|
|
4760
4760
|
});
|
|
4761
4761
|
var __importStar = exports && exports.__importStar || function(mod2) {
|
|
@@ -5814,7 +5814,7 @@ var require_decimal = __commonJS({
|
|
|
5814
5814
|
Ctor.precision -= k;
|
|
5815
5815
|
return x;
|
|
5816
5816
|
}
|
|
5817
|
-
var divide2 = /* @__PURE__ */ function() {
|
|
5817
|
+
var divide2 = /* @__PURE__ */ (function() {
|
|
5818
5818
|
function multiplyInteger(x, k, base) {
|
|
5819
5819
|
var temp, carry = 0, i = x.length;
|
|
5820
5820
|
for (x = x.slice(); i--; ) {
|
|
@@ -5972,7 +5972,7 @@ var require_decimal = __commonJS({
|
|
|
5972
5972
|
}
|
|
5973
5973
|
return q;
|
|
5974
5974
|
};
|
|
5975
|
-
}();
|
|
5975
|
+
})();
|
|
5976
5976
|
function finalise2(x, sd, rm, isTruncated) {
|
|
5977
5977
|
var digits, i, j, k, rd, roundUp, w, xd, xdi, Ctor = x.constructor;
|
|
5978
5978
|
out: if (sd != null) {
|
|
@@ -6974,7 +6974,7 @@ var require_constants = __commonJS({
|
|
|
6974
6974
|
var secondsInYear = exports.secondsInYear = secondsInDay * daysInYear;
|
|
6975
6975
|
var secondsInMonth = exports.secondsInMonth = secondsInYear / 12;
|
|
6976
6976
|
var secondsInQuarter = exports.secondsInQuarter = secondsInMonth * 3;
|
|
6977
|
-
var constructFromSymbol = exports.constructFromSymbol = Symbol.for("constructDateFrom");
|
|
6977
|
+
var constructFromSymbol = exports.constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
6978
6978
|
}
|
|
6979
6979
|
});
|
|
6980
6980
|
|
|
@@ -20370,17 +20370,17 @@ var require_shared = __commonJS({
|
|
|
20370
20370
|
var require_react_production_min = __commonJS2({
|
|
20371
20371
|
"../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.production.min.js"(exports2) {
|
|
20372
20372
|
"use strict";
|
|
20373
|
-
var l = Symbol.for("react.element");
|
|
20374
|
-
var n = Symbol.for("react.portal");
|
|
20375
|
-
var p = Symbol.for("react.fragment");
|
|
20376
|
-
var q = Symbol.for("react.strict_mode");
|
|
20377
|
-
var r = Symbol.for("react.profiler");
|
|
20378
|
-
var t = Symbol.for("react.provider");
|
|
20379
|
-
var u = Symbol.for("react.context");
|
|
20380
|
-
var v = Symbol.for("react.forward_ref");
|
|
20381
|
-
var w = Symbol.for("react.suspense");
|
|
20382
|
-
var x = Symbol.for("react.memo");
|
|
20383
|
-
var y = Symbol.for("react.lazy");
|
|
20373
|
+
var l = /* @__PURE__ */ Symbol.for("react.element");
|
|
20374
|
+
var n = /* @__PURE__ */ Symbol.for("react.portal");
|
|
20375
|
+
var p = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
20376
|
+
var q = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
20377
|
+
var r = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
20378
|
+
var t = /* @__PURE__ */ Symbol.for("react.provider");
|
|
20379
|
+
var u = /* @__PURE__ */ Symbol.for("react.context");
|
|
20380
|
+
var v = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
20381
|
+
var w = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
20382
|
+
var x = /* @__PURE__ */ Symbol.for("react.memo");
|
|
20383
|
+
var y = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
20384
20384
|
var z11 = Symbol.iterator;
|
|
20385
20385
|
function A(a) {
|
|
20386
20386
|
if (null === a || "object" !== typeof a) return null;
|
|
@@ -20648,19 +20648,19 @@ var require_shared = __commonJS({
|
|
|
20648
20648
|
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
20649
20649
|
}
|
|
20650
20650
|
var ReactVersion = "18.3.1";
|
|
20651
|
-
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
20652
|
-
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
20653
|
-
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
20654
|
-
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
20655
|
-
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
20656
|
-
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
20657
|
-
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
20658
|
-
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
20659
|
-
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
20660
|
-
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
20661
|
-
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
20662
|
-
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
20663
|
-
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
20651
|
+
var REACT_ELEMENT_TYPE = /* @__PURE__ */ Symbol.for("react.element");
|
|
20652
|
+
var REACT_PORTAL_TYPE = /* @__PURE__ */ Symbol.for("react.portal");
|
|
20653
|
+
var REACT_FRAGMENT_TYPE = /* @__PURE__ */ Symbol.for("react.fragment");
|
|
20654
|
+
var REACT_STRICT_MODE_TYPE = /* @__PURE__ */ Symbol.for("react.strict_mode");
|
|
20655
|
+
var REACT_PROFILER_TYPE = /* @__PURE__ */ Symbol.for("react.profiler");
|
|
20656
|
+
var REACT_PROVIDER_TYPE = /* @__PURE__ */ Symbol.for("react.provider");
|
|
20657
|
+
var REACT_CONTEXT_TYPE = /* @__PURE__ */ Symbol.for("react.context");
|
|
20658
|
+
var REACT_FORWARD_REF_TYPE = /* @__PURE__ */ Symbol.for("react.forward_ref");
|
|
20659
|
+
var REACT_SUSPENSE_TYPE = /* @__PURE__ */ Symbol.for("react.suspense");
|
|
20660
|
+
var REACT_SUSPENSE_LIST_TYPE = /* @__PURE__ */ Symbol.for("react.suspense_list");
|
|
20661
|
+
var REACT_MEMO_TYPE = /* @__PURE__ */ Symbol.for("react.memo");
|
|
20662
|
+
var REACT_LAZY_TYPE = /* @__PURE__ */ Symbol.for("react.lazy");
|
|
20663
|
+
var REACT_OFFSCREEN_TYPE = /* @__PURE__ */ Symbol.for("react.offscreen");
|
|
20664
20664
|
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
20665
20665
|
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
20666
20666
|
function getIteratorFn(maybeIterable) {
|
|
@@ -21624,7 +21624,7 @@ var require_shared = __commonJS({
|
|
|
21624
21624
|
}
|
|
21625
21625
|
var REACT_MODULE_REFERENCE;
|
|
21626
21626
|
{
|
|
21627
|
-
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
21627
|
+
REACT_MODULE_REFERENCE = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
21628
21628
|
}
|
|
21629
21629
|
function isValidElementType(type) {
|
|
21630
21630
|
if (typeof type === "string" || typeof type === "function") {
|
|
@@ -23710,10 +23710,10 @@ var require_shared = __commonJS({
|
|
|
23710
23710
|
ZodId: () => ZodId,
|
|
23711
23711
|
ZodTranslationsSchemaFn: () => ZodTranslationsSchemaFn
|
|
23712
23712
|
});
|
|
23713
|
-
var
|
|
23713
|
+
var import_zod17 = require_lib();
|
|
23714
23714
|
var countryIds2 = ["all", ...countries.map(({ id }) => id)];
|
|
23715
|
-
var ZodId =
|
|
23716
|
-
var ZodTranslationsSchemaFn = (schema) =>
|
|
23715
|
+
var ZodId = import_zod17.z.enum(countryIds2);
|
|
23716
|
+
var ZodTranslationsSchemaFn = (schema) => import_zod17.z.record(import_zod17.z.string(), schema.optional());
|
|
23717
23717
|
var UsStates = [
|
|
23718
23718
|
{ id: "AA", name: "Armed Forces Americas" },
|
|
23719
23719
|
{ id: "AE", name: "Armed Forces Europe" },
|
|
@@ -26526,10 +26526,12 @@ Examples:
|
|
|
26526
26526
|
baseUrlOverride: resolveIngestBaseUrl(ctx.baseUrl)
|
|
26527
26527
|
});
|
|
26528
26528
|
});
|
|
26529
|
-
resource.command("delete").description(`Delete billable events by record IDs, customer ID, or all events.`).option("--matching <value>", `Matching strategy: record_ids, customer_id, or all`).option("--record-ids <value>", `Comma-separated list of record IDs (when matching=record_ids)`).option("--customer-id <value>", `Customer ID (when matching=customer_id)`).addHelpText("after", `
|
|
26529
|
+
resource.command("delete").description(`Delete billable events by record IDs, customer ID, event type, or all events.`).option("--matching <value>", `Matching strategy: record_ids, customer_id, event_type, or all`).option("--record-ids <value>", `Comma-separated list of record IDs (when matching=record_ids)`).option("--customer-id <value>", `Customer ID (when matching=customer_id)`).option("--event-type <value>", `Event type. Required when matching=event_type, optional narrowing when matching=customer_id`).addHelpText("after", `
|
|
26530
26530
|
Examples:
|
|
26531
26531
|
hyperline events delete --matching record_ids --record-ids evt_1,evt_2
|
|
26532
26532
|
hyperline events delete --matching customer_id --customer-id cus_xyz
|
|
26533
|
+
hyperline events delete --matching customer_id --customer-id cus_xyz --event-type api_call
|
|
26534
|
+
hyperline events delete --matching event_type --event-type api_call
|
|
26533
26535
|
hyperline events delete --matching all`).action(async (opts) => {
|
|
26534
26536
|
const ctx = resource.parent?.opts()._ctx;
|
|
26535
26537
|
if (!ctx) {
|
|
@@ -26537,8 +26539,12 @@ Examples:
|
|
|
26537
26539
|
process.exit(1);
|
|
26538
26540
|
}
|
|
26539
26541
|
const matching = opts.matching;
|
|
26540
|
-
if (!matching || !["record_ids", "customer_id", "all"].includes(matching)) {
|
|
26541
|
-
process.stderr.write("Error: --matching must be one of: record_ids, customer_id, all\n");
|
|
26542
|
+
if (!matching || !["record_ids", "customer_id", "event_type", "all"].includes(matching)) {
|
|
26543
|
+
process.stderr.write("Error: --matching must be one of: record_ids, customer_id, event_type, all\n");
|
|
26544
|
+
process.exit(1);
|
|
26545
|
+
}
|
|
26546
|
+
if (opts.eventType && matching !== "customer_id" && matching !== "event_type") {
|
|
26547
|
+
process.stderr.write("Error: --event-type only applies when --matching is customer_id or event_type\n");
|
|
26542
26548
|
process.exit(1);
|
|
26543
26549
|
}
|
|
26544
26550
|
let body;
|
|
@@ -26556,7 +26562,22 @@ Examples:
|
|
|
26556
26562
|
process.stderr.write("Error: --customer-id is required when matching=customer_id\n");
|
|
26557
26563
|
process.exit(1);
|
|
26558
26564
|
}
|
|
26559
|
-
body = {
|
|
26565
|
+
body = {
|
|
26566
|
+
matching: "customer_id",
|
|
26567
|
+
customer_id: opts.customerId,
|
|
26568
|
+
...opts.eventType ? { event_type: opts.eventType } : {}
|
|
26569
|
+
};
|
|
26570
|
+
} else if (matching === "event_type") {
|
|
26571
|
+
if (!opts.eventType) {
|
|
26572
|
+
process.stderr.write("Error: --event-type is required when matching=event_type\n");
|
|
26573
|
+
process.exit(1);
|
|
26574
|
+
}
|
|
26575
|
+
const confirmed = await confirmPrompt(`Are you sure you want to delete ALL events of type "${opts.eventType}" across every customer? (y/N) `);
|
|
26576
|
+
if (!confirmed) {
|
|
26577
|
+
process.stdout.write("Aborted.\n");
|
|
26578
|
+
return;
|
|
26579
|
+
}
|
|
26580
|
+
body = { matching: "event_type", event_type: opts.eventType };
|
|
26560
26581
|
} else {
|
|
26561
26582
|
const confirmed = await confirmPrompt("Are you sure you want to delete ALL events? (y/N) ");
|
|
26562
26583
|
if (!confirmed) {
|
|
@@ -27224,7 +27245,7 @@ Examples:
|
|
|
27224
27245
|
// build/commands/generated/customers.js
|
|
27225
27246
|
function registerCustomersCommands(parent) {
|
|
27226
27247
|
const resource = parent.command("customers").description("Manage customers");
|
|
27227
|
-
resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, created_at, updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).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.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).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("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).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("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).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("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).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("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).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("--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.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).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>", `custom_properties`).option("--payment-method-type <value>", `payment_method_type`).option("--payment-method-type.in <value>", `payment_method_type__in`).option("--created-at <value>", `created_at`).option("--created-at.not <value>", `created_at__not`).option("--created-at.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).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.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).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", `
|
|
27248
|
+
resource.command("list").description(`List customers with optional filters for name, type, status, currency, country, external_id, billing_email, search, tax_id, subscription_status, invoicing_entity_id, segment_id, custom_properties, payment_method_type, created_at, updated_at. Paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--name <value>", `name`).option("--name.not <value>", `name__not`).option("--name.is-null <value>", `name__isNull`).option("--name.is-not-null <value>", `name__isNotNull`).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.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).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("--country <value>", `country`).option("--country.not <value>", `country__not`).option("--country.is-null <value>", `country__isNull`).option("--country.is-not-null <value>", `country__isNotNull`).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("--external-id <value>", `external_id`).option("--external-id.not <value>", `external_id__not`).option("--external-id.is-null <value>", `external_id__isNull`).option("--external-id.is-not-null <value>", `external_id__isNotNull`).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("--billing-email <value>", `billing_email`).option("--billing-email.not <value>", `billing_email__not`).option("--billing-email.is-null <value>", `billing_email__isNull`).option("--billing-email.is-not-null <value>", `billing_email__isNotNull`).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("--search <value>", `search`).option("--tax-id <value>", `tax_id`).option("--tax-id.not <value>", `tax_id__not`).option("--tax-id.is-null <value>", `tax_id__isNull`).option("--tax-id.is-not-null <value>", `tax_id__isNotNull`).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("--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.is-null <value>", `invoicing_entity_id__isNull`).option("--invoicing-entity-id.is-not-null <value>", `invoicing_entity_id__isNotNull`).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>", `custom_properties`).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.is-null <value>", `created_at__isNull`).option("--created-at.is-not-null <value>", `created_at__isNotNull`).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.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).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", `
|
|
27228
27249
|
Examples:
|
|
27229
27250
|
hyperline customers list
|
|
27230
27251
|
hyperline customers list --take <take> --name <name>`).action(async (opts) => {
|
|
@@ -27368,6 +27389,8 @@ Examples:
|
|
|
27368
27389
|
args.payment_method_type = opts.paymentMethodType;
|
|
27369
27390
|
if (opts["paymentMethodType.in"] !== void 0)
|
|
27370
27391
|
args.payment_method_type__in = opts["paymentMethodType.in"];
|
|
27392
|
+
if (opts.integrationEntityId !== void 0)
|
|
27393
|
+
args.integration_entity_id = opts.integrationEntityId;
|
|
27371
27394
|
if (opts.createdAt !== void 0)
|
|
27372
27395
|
args.created_at = opts.createdAt;
|
|
27373
27396
|
if (opts["createdAt.not"] !== void 0)
|
|
@@ -27482,6 +27505,7 @@ Examples:
|
|
|
27482
27505
|
"custom_properties",
|
|
27483
27506
|
"payment_method_type",
|
|
27484
27507
|
"payment_method_type__in",
|
|
27508
|
+
"integration_entity_id",
|
|
27485
27509
|
"created_at",
|
|
27486
27510
|
"created_at__not",
|
|
27487
27511
|
"created_at__isNull",
|
|
@@ -28401,6 +28425,27 @@ Examples:
|
|
|
28401
28425
|
queryParamKeys: []
|
|
28402
28426
|
});
|
|
28403
28427
|
});
|
|
28428
|
+
resource.command("list").description(`List the client's data exports (customers, invoices, etc.) with pagination. Use take/skip to page through results.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
28429
|
+
Examples:
|
|
28430
|
+
hyperline exports list
|
|
28431
|
+
hyperline exports list --take <take>`).action(async (opts) => {
|
|
28432
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
28433
|
+
if (!ctx) {
|
|
28434
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
28435
|
+
process.exit(1);
|
|
28436
|
+
}
|
|
28437
|
+
const args = {};
|
|
28438
|
+
if (opts.take !== void 0)
|
|
28439
|
+
args.take = Number(opts.take);
|
|
28440
|
+
if (opts.skip !== void 0)
|
|
28441
|
+
args.skip = Number(opts.skip);
|
|
28442
|
+
await ctx.execute({
|
|
28443
|
+
method: "GET",
|
|
28444
|
+
path: "/v1/exports",
|
|
28445
|
+
args,
|
|
28446
|
+
queryParamKeys: ["take", "skip"]
|
|
28447
|
+
});
|
|
28448
|
+
});
|
|
28404
28449
|
resource.command("get").description(`Check the status of an export by ID. Status can be pending, processing, or completed. Use download_export to get the file once completed.`).requiredOption("--export-id <value>", `exportId parameter`).addHelpText("after", `
|
|
28405
28450
|
Examples:
|
|
28406
28451
|
hyperline exports get --export-id <exportId>`).action(async (opts) => {
|
|
@@ -28419,9 +28464,10 @@ Examples:
|
|
|
28419
28464
|
queryParamKeys: []
|
|
28420
28465
|
});
|
|
28421
28466
|
});
|
|
28422
|
-
resource.command("download").description(`Download the file for a completed export. Supports CSV, JSON, and XLSX formats depending on the export type.`).requiredOption("--export-id <value>", `exportId parameter`).addHelpText("after", `
|
|
28467
|
+
resource.command("download").description(`Download the file for a completed export. Supports CSV, JSON, and XLSX formats depending on the export type.`).requiredOption("--export-id <value>", `exportId parameter`).option("--as-redirect <value>", `as_redirect`).addHelpText("after", `
|
|
28423
28468
|
Examples:
|
|
28424
|
-
hyperline exports download --export-id <exportId
|
|
28469
|
+
hyperline exports download --export-id <exportId>
|
|
28470
|
+
hyperline exports download --export-id <exportId> --as-redirect <as_redirect>`).action(async (opts) => {
|
|
28425
28471
|
const ctx = resource.parent?.opts()._ctx;
|
|
28426
28472
|
if (!ctx) {
|
|
28427
28473
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -28430,11 +28476,13 @@ Examples:
|
|
|
28430
28476
|
const args = {};
|
|
28431
28477
|
if (opts.exportId !== void 0)
|
|
28432
28478
|
args.exportId = opts.exportId;
|
|
28479
|
+
if (opts.asRedirect !== void 0)
|
|
28480
|
+
args.as_redirect = opts.asRedirect;
|
|
28433
28481
|
await ctx.execute({
|
|
28434
28482
|
method: "GET",
|
|
28435
28483
|
path: "/v1/exports/{exportId}/download",
|
|
28436
28484
|
args,
|
|
28437
|
-
queryParamKeys: []
|
|
28485
|
+
queryParamKeys: ["as_redirect"]
|
|
28438
28486
|
});
|
|
28439
28487
|
});
|
|
28440
28488
|
}
|
|
@@ -28940,7 +28988,7 @@ Payment method strategy used to charge the invoice. Only applies to \`to_pay\` s
|
|
|
28940
28988
|
|
|
28941
28989
|
- \`current\`: Use the current default payment method of the customer.
|
|
28942
28990
|
- \`external\`: Manage the payment of the invoice outside of Hyperline.
|
|
28943
|
-
`).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("--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("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
|
|
28991
|
+
`).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("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).requiredOption("--line-items <value>", `line_items`).option("--transactions <value>", `transactions`).option("--coupons <value>", `coupons`).addHelpText("after", `
|
|
28944
28992
|
Examples:
|
|
28945
28993
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items>
|
|
28946
28994
|
hyperline invoices create-invoice --customer-id <customer_id> --line-items <line_items> --currency <currency> --status <status>
|
|
@@ -28983,6 +29031,8 @@ Examples:
|
|
|
28983
29031
|
args.payment_method_id = opts.paymentMethodId;
|
|
28984
29032
|
if (opts.bankAccountId !== void 0)
|
|
28985
29033
|
args.bank_account_id = opts.bankAccountId;
|
|
29034
|
+
if (opts.subscriptionId !== void 0)
|
|
29035
|
+
args.subscription_id = opts.subscriptionId;
|
|
28986
29036
|
if (opts.emittedAt !== void 0)
|
|
28987
29037
|
args.emitted_at = opts.emittedAt;
|
|
28988
29038
|
if (opts.dueAt !== void 0)
|
|
@@ -29961,7 +30011,7 @@ Examples:
|
|
|
29961
30011
|
]
|
|
29962
30012
|
});
|
|
29963
30013
|
});
|
|
29964
|
-
resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).addHelpText("after", `
|
|
30014
|
+
resource.command("create").description(`Create a new product with name, type (flat_fee, per_unit, usage, seat, etc.), and pricing configuration.`).requiredOption("--name <value>", `Product name.`).option("--description <value>", `Product description.`).option("--description-display-interval-dates", `Indicates if the dates of the interval should be automatically added in the product description on the invoices.`).option("--public-description <value>", `Public description of the product.`).option("--translations <value>", `Product name and description translations.`).option("--is-available-on-demand", `is_available_on_demand`).option("--is-available-on-subscription", `is_available_on_subscription`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--accounting <value>", `Mapping invoicing entity ID/accounting settings.`).requiredOption("--type <value>", `Product type for fixed fee products.`).requiredOption("--price-configurations <value>", `Price configurations for the product.`).option("--aggregator <value>", `Aggregator configuration to automatically count seats from billable events. Only count aggregators are supported for seat products.`).option("--aggregator-id <value>", `ID of an existing aggregator to link to this product.`).option("--unit-name <value>", `Name of the unit (e.g., 'user', 'seat').`).option("--is-connected-seat-item", `When true, the seat count is automatically synced from an external source (e.g., CRM users).`).option("--credit-aggregators <value>", `Multiple aggregators with weights for multi-aggregator credit consumption. Cannot be used together with aggregator or aggregator_id.`).option("--low-credits-threshold <number>", `Threshold indicating a low level of credits.`).option("--display-mode <value>", `How bundle items are displayed on invoices.`).option("--exclusive-items-enabled", `When true, only one item in the bundle can be active at a time.`).option("--bundle-items <value>", `Products included in this bundle. Percentages must sum to 100.`).addHelpText("after", `
|
|
29965
30015
|
Examples:
|
|
29966
30016
|
hyperline products create --name <name> --type <type> --price-configurations <price_configurations>
|
|
29967
30017
|
hyperline products create --name <name> --type <type> --price-configurations <price_configurations> --description <description> --description-display-interval-dates
|
|
@@ -29996,6 +30046,10 @@ Examples:
|
|
|
29996
30046
|
args.unit_name = opts.unitName;
|
|
29997
30047
|
if (opts.creditAggregators !== void 0)
|
|
29998
30048
|
args.credit_aggregators = opts.creditAggregators;
|
|
30049
|
+
if (opts.displayMode !== void 0)
|
|
30050
|
+
args.display_mode = opts.displayMode;
|
|
30051
|
+
if (opts.bundleItems !== void 0)
|
|
30052
|
+
args.bundle_items = opts.bundleItems;
|
|
29999
30053
|
if (opts.lowCreditsThreshold !== void 0)
|
|
30000
30054
|
args.low_credits_threshold = Number(opts.lowCreditsThreshold);
|
|
30001
30055
|
if (opts.descriptionDisplayIntervalDates !== void 0)
|
|
@@ -30006,6 +30060,8 @@ Examples:
|
|
|
30006
30060
|
args.is_available_on_subscription = true;
|
|
30007
30061
|
if (opts.isConnectedSeatItem !== void 0)
|
|
30008
30062
|
args.is_connected_seat_item = true;
|
|
30063
|
+
if (opts.exclusiveItemsEnabled !== void 0)
|
|
30064
|
+
args.exclusive_items_enabled = true;
|
|
30009
30065
|
await ctx.execute({
|
|
30010
30066
|
method: "POST",
|
|
30011
30067
|
path: "/v1/products",
|
|
@@ -30121,7 +30177,7 @@ Quote status.
|
|
|
30121
30177
|
- \`draft\`: The quote is a draft.
|
|
30122
30178
|
- \`approved\`: The quote is approved and ready to be sent to the customer.
|
|
30123
30179
|
- \`pending_signature\`: The quote is awaiting the customer's signature.
|
|
30124
|
-
`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. If not specified, automatically computed from the subscription configuration.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).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-taxes <value>", `Display tax breakdown on the quote.`).option("--display-price-tiers <value>", `Controls which price tiers are displayed on the quote.
|
|
30180
|
+
`).option("--owner-email <value>", `Email address of the Hyperline user acting as the quote owner. If not specified, the Hyperline account owner will be assigned.`).requiredOption("--customer-id <value>", `ID of the customer.`).option("--invoicing-entity-id <value>", `ID of the invoicing entity attached to the quote.`).option("--comments <value>", `Custom comments displayed on the quote.`).option("--terms <value>", `Custom quotation terms.`).option("--amount <number>", `Estimated contract value. If not specified, automatically computed from the subscription configuration.`).option("--collect-payment-details <value>", `Collect customer payment method mandate during signature flow or not.`).option("--collect-custom-property-ids <value>", `IDs of the customer custom properties required to be filled during the signature flow.`).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.
|
|
30125
30181
|
|
|
30126
30182
|
- \`all\`: Display all pricing tiers.
|
|
30127
30183
|
- \`matching\`: Only display the tiers used to compute the price based on quantity.
|
|
@@ -30157,6 +30213,8 @@ Examples:
|
|
|
30157
30213
|
args.require_tax_id = opts.requireTaxId;
|
|
30158
30214
|
if (opts.displayQuoteValue !== void 0)
|
|
30159
30215
|
args.display_quote_value = opts.displayQuoteValue;
|
|
30216
|
+
if (opts.displayQuoteValueWithTax !== void 0)
|
|
30217
|
+
args.display_quote_value_with_tax = opts.displayQuoteValueWithTax;
|
|
30160
30218
|
if (opts.displayTaxes !== void 0)
|
|
30161
30219
|
args.display_taxes = opts.displayTaxes;
|
|
30162
30220
|
if (opts.displayPriceTiers !== void 0)
|
|
@@ -30553,27 +30611,10 @@ Examples:
|
|
|
30553
30611
|
// build/commands/generated/subscriptions.js
|
|
30554
30612
|
function registerSubscriptionsCommands(parent) {
|
|
30555
30613
|
const resource = parent.command("subscriptions").description("Manage subscriptions");
|
|
30556
|
-
resource.command("
|
|
30557
|
-
Examples:
|
|
30558
|
-
hyperline subscriptions refresh
|
|
30559
|
-
hyperline subscriptions refresh --output json`).action(async (_opts) => {
|
|
30560
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
30561
|
-
if (!ctx) {
|
|
30562
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
30563
|
-
process.exit(1);
|
|
30564
|
-
}
|
|
30565
|
-
const args = {};
|
|
30566
|
-
await ctx.execute({
|
|
30567
|
-
method: "POST",
|
|
30568
|
-
path: "/v1/subscriptions/refresh",
|
|
30569
|
-
args,
|
|
30570
|
-
queryParamKeys: []
|
|
30571
|
-
});
|
|
30572
|
-
});
|
|
30573
|
-
resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
|
|
30614
|
+
resource.command("create-subscription-update").description(`Apply a single update to an existing subscription (e.g. change quantity, add/remove product, modify price).`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--type <value>", `type`).requiredOption("--payload <value>", `payload`).addHelpText("after", `
|
|
30574
30615
|
Examples:
|
|
30575
30616
|
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload>
|
|
30576
|
-
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at>
|
|
30617
|
+
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --apply-at <apply_at> --charge-at <charge_at>
|
|
30577
30618
|
hyperline subscriptions create-subscription-update --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --type <type> --payload <payload> --output json`).action(async (opts) => {
|
|
30578
30619
|
const ctx = resource.parent?.opts()._ctx;
|
|
30579
30620
|
if (!ctx) {
|
|
@@ -30589,6 +30630,8 @@ Examples:
|
|
|
30589
30630
|
args.apply_at = opts.applyAt;
|
|
30590
30631
|
if (opts.paymentSchedule !== void 0)
|
|
30591
30632
|
args.payment_schedule = opts.paymentSchedule;
|
|
30633
|
+
if (opts.chargeAt !== void 0)
|
|
30634
|
+
args.charge_at = opts.chargeAt;
|
|
30592
30635
|
if (opts.calculationMethod !== void 0)
|
|
30593
30636
|
args.calculation_method = opts.calculationMethod;
|
|
30594
30637
|
if (opts.type !== void 0)
|
|
@@ -30602,10 +30645,10 @@ Examples:
|
|
|
30602
30645
|
queryParamKeys: []
|
|
30603
30646
|
});
|
|
30604
30647
|
});
|
|
30605
|
-
resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
|
|
30648
|
+
resource.command("create-subscription-updates").description(`Apply multiple updates at once to an existing subscription in a single atomic operation.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
|
|
30606
30649
|
Examples:
|
|
30607
30650
|
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
30608
|
-
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at>
|
|
30651
|
+
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
|
|
30609
30652
|
hyperline subscriptions create-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --output json`).action(async (opts) => {
|
|
30610
30653
|
const ctx = resource.parent?.opts()._ctx;
|
|
30611
30654
|
if (!ctx) {
|
|
@@ -30621,6 +30664,8 @@ Examples:
|
|
|
30621
30664
|
args.apply_at = opts.applyAt;
|
|
30622
30665
|
if (opts.paymentSchedule !== void 0)
|
|
30623
30666
|
args.payment_schedule = opts.paymentSchedule;
|
|
30667
|
+
if (opts.chargeAt !== void 0)
|
|
30668
|
+
args.charge_at = opts.chargeAt;
|
|
30624
30669
|
if (opts.calculationMethod !== void 0)
|
|
30625
30670
|
args.calculation_method = opts.calculationMethod;
|
|
30626
30671
|
if (opts.updates !== void 0)
|
|
@@ -30758,10 +30803,10 @@ Examples:
|
|
|
30758
30803
|
queryParamKeys: []
|
|
30759
30804
|
});
|
|
30760
30805
|
});
|
|
30761
|
-
resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
|
|
30806
|
+
resource.command("simulate-subscription-updates").description(`Preview the effect of updates on a subscription without applying them. Returns simulated invoice and billing impact.`).requiredOption("--id <value>", `id parameter`).requiredOption("--application-schedule <value>", `application_schedule`).option("--apply-at <value>", `The date when the update should be applied. Required when application_schedule is 'scheduled'.`).requiredOption("--payment-schedule <value>", `payment_schedule`).option("--charge-at <value>", `The date when the resulting subscription update should be charged. Required when payment_schedule is 'custom'. Must be in the future.`).requiredOption("--calculation-method <value>", `calculation_method`).requiredOption("--updates <value>", `updates`).addHelpText("after", `
|
|
30762
30807
|
Examples:
|
|
30763
30808
|
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates>
|
|
30764
|
-
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at>
|
|
30809
|
+
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --apply-at <apply_at> --charge-at <charge_at>
|
|
30765
30810
|
hyperline subscriptions simulate-subscription-updates --id <id> --application-schedule <application_schedule> --payment-schedule <payment_schedule> --calculation-method <calculation_method> --updates <updates> --output json`).action(async (opts) => {
|
|
30766
30811
|
const ctx = resource.parent?.opts()._ctx;
|
|
30767
30812
|
if (!ctx) {
|
|
@@ -30777,6 +30822,8 @@ Examples:
|
|
|
30777
30822
|
args.apply_at = opts.applyAt;
|
|
30778
30823
|
if (opts.paymentSchedule !== void 0)
|
|
30779
30824
|
args.payment_schedule = opts.paymentSchedule;
|
|
30825
|
+
if (opts.chargeAt !== void 0)
|
|
30826
|
+
args.charge_at = opts.chargeAt;
|
|
30780
30827
|
if (opts.calculationMethod !== void 0)
|
|
30781
30828
|
args.calculation_method = opts.calculationMethod;
|
|
30782
30829
|
if (opts.updates !== void 0)
|
|
@@ -30906,7 +30953,7 @@ Examples:
|
|
|
30906
30953
|
queryParamKeys: []
|
|
30907
30954
|
});
|
|
30908
30955
|
});
|
|
30909
|
-
resource.command("list").description(`List subscriptions with filters for activation_strategy, status, currency, plan_id, original_quote_id, customer_id, invoicing_entity_id, purchase_order, updated_at, custom_properties. Draft, voided, and cancelled excluded by default. 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>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).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.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).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("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).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("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).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("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).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("--
|
|
30956
|
+
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, custom_properties. Draft, voided, and cancelled excluded by default. 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>", `status`).option("--status.in <value>", `status__in`).option("--currency <value>", `currency`).option("--currency.not <value>", `currency__not`).option("--currency.is-null <value>", `currency__isNull`).option("--currency.is-not-null <value>", `currency__isNotNull`).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.is-null <value>", `plan_id__isNull`).option("--plan-id.is-not-null <value>", `plan_id__isNotNull`).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("--original-quote-id <value>", `original_quote_id`).option("--original-quote-id.not <value>", `original_quote_id__not`).option("--original-quote-id.is-null <value>", `original_quote_id__isNull`).option("--original-quote-id.is-not-null <value>", `original_quote_id__isNotNull`).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("--customer-id <value>", `customer_id`).option("--customer-id.not <value>", `customer_id__not`).option("--customer-id.is-null <value>", `customer_id__isNull`).option("--customer-id.is-not-null <value>", `customer_id__isNotNull`).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("--invoicing-entity-id <value>", `invoicing_entity_id`).option("--purchase-order <value>", `purchase_order`).option("--purchase-order.not <value>", `purchase_order__not`).option("--purchase-order.is-null <value>", `purchase_order__isNull`).option("--purchase-order.is-not-null <value>", `purchase_order__isNotNull`).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("--custom-properties <value>", `custom_properties`).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.is-null <value>", `updated_at__isNull`).option("--updated-at.is-not-null <value>", `updated_at__isNotNull`).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", `
|
|
30910
30957
|
Examples:
|
|
30911
30958
|
hyperline subscriptions list
|
|
30912
30959
|
hyperline subscriptions list --take <take> --activation-strategy <activation_strategy>`).action(async (opts) => {
|
|
@@ -31006,6 +31053,12 @@ Examples:
|
|
|
31006
31053
|
args.purchase_order__startsWith = opts["purchaseOrder.startsWith"];
|
|
31007
31054
|
if (opts["purchaseOrder.endWith"] !== void 0)
|
|
31008
31055
|
args.purchase_order__endWith = opts["purchaseOrder.endWith"];
|
|
31056
|
+
if (opts.customProperties !== void 0)
|
|
31057
|
+
args.custom_properties = opts.customProperties;
|
|
31058
|
+
if (opts.invoiceDrafts !== void 0)
|
|
31059
|
+
args.invoice_drafts = opts.invoiceDrafts;
|
|
31060
|
+
if (opts.integrationEntityId !== void 0)
|
|
31061
|
+
args.integration_entity_id = opts.integrationEntityId;
|
|
31009
31062
|
if (opts.updatedAt !== void 0)
|
|
31010
31063
|
args.updated_at = opts.updatedAt;
|
|
31011
31064
|
if (opts["updatedAt.not"] !== void 0)
|
|
@@ -31024,10 +31077,6 @@ Examples:
|
|
|
31024
31077
|
args.updated_at__gt = opts["updatedAt.gt"];
|
|
31025
31078
|
if (opts["updatedAt.gte"] !== void 0)
|
|
31026
31079
|
args.updated_at__gte = opts["updatedAt.gte"];
|
|
31027
|
-
if (opts.customProperties !== void 0)
|
|
31028
|
-
args.custom_properties = opts.customProperties;
|
|
31029
|
-
if (opts.invoiceDrafts !== void 0)
|
|
31030
|
-
args.invoice_drafts = opts.invoiceDrafts;
|
|
31031
31080
|
if (opts.take !== void 0)
|
|
31032
31081
|
args.take = Number(opts.take);
|
|
31033
31082
|
if (opts.skip !== void 0)
|
|
@@ -31084,6 +31133,9 @@ Examples:
|
|
|
31084
31133
|
"purchase_order__contains",
|
|
31085
31134
|
"purchase_order__startsWith",
|
|
31086
31135
|
"purchase_order__endWith",
|
|
31136
|
+
"custom_properties",
|
|
31137
|
+
"invoice_drafts",
|
|
31138
|
+
"integration_entity_id",
|
|
31087
31139
|
"updated_at",
|
|
31088
31140
|
"updated_at__not",
|
|
31089
31141
|
"updated_at__isNull",
|
|
@@ -31092,16 +31144,258 @@ Examples:
|
|
|
31092
31144
|
"updated_at__lt",
|
|
31093
31145
|
"updated_at__lte",
|
|
31094
31146
|
"updated_at__gt",
|
|
31095
|
-
"updated_at__gte"
|
|
31096
|
-
"custom_properties",
|
|
31097
|
-
"invoice_drafts"
|
|
31147
|
+
"updated_at__gte"
|
|
31098
31148
|
]
|
|
31099
31149
|
});
|
|
31100
31150
|
});
|
|
31151
|
+
resource.command("get").description(`Retrieve full details of a subscription by ID including phases, products, billing dates, and status. Optionally include live_billing data.`).requiredOption("--id <value>", `id parameter`).option("--include-live-billing <value>", `include_live_billing`).addHelpText("after", `
|
|
31152
|
+
Examples:
|
|
31153
|
+
hyperline subscriptions get --id <id>
|
|
31154
|
+
hyperline subscriptions get --id <id> --include-live-billing <include_live_billing>`).action(async (opts) => {
|
|
31155
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31156
|
+
if (!ctx) {
|
|
31157
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31158
|
+
process.exit(1);
|
|
31159
|
+
}
|
|
31160
|
+
const args = {};
|
|
31161
|
+
if (opts.id !== void 0)
|
|
31162
|
+
args.id = opts.id;
|
|
31163
|
+
if (opts.includeLiveBilling !== void 0)
|
|
31164
|
+
args.include_live_billing = opts.includeLiveBilling;
|
|
31165
|
+
await ctx.execute({
|
|
31166
|
+
method: "GET",
|
|
31167
|
+
path: "/v2/subscriptions/{id}",
|
|
31168
|
+
args,
|
|
31169
|
+
queryParamKeys: ["include_live_billing"]
|
|
31170
|
+
});
|
|
31171
|
+
});
|
|
31172
|
+
resource.command("refresh-subscription-seat-products").description(`Trigger a count update on seat-based products within a subscription using the configured dataloader query.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31173
|
+
Examples:
|
|
31174
|
+
hyperline subscriptions refresh-subscription-seat-products --id <id>
|
|
31175
|
+
hyperline subscriptions refresh-subscription-seat-products --id <id> --output json`).action(async (opts) => {
|
|
31176
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31177
|
+
if (!ctx) {
|
|
31178
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31179
|
+
process.exit(1);
|
|
31180
|
+
}
|
|
31181
|
+
const args = {};
|
|
31182
|
+
if (opts.id !== void 0)
|
|
31183
|
+
args.id = opts.id;
|
|
31184
|
+
await ctx.execute({
|
|
31185
|
+
method: "POST",
|
|
31186
|
+
path: "/v2/subscriptions/{id}/refresh-seat-products",
|
|
31187
|
+
args,
|
|
31188
|
+
queryParamKeys: []
|
|
31189
|
+
});
|
|
31190
|
+
});
|
|
31191
|
+
resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Payload mirrors GET response structure.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
|
|
31192
|
+
Defines when invoices are generated relative to the billing period.
|
|
31193
|
+
|
|
31194
|
+
- \`period_start\`: Invoices are generated at the start of the billing period.
|
|
31195
|
+
- \`period_end\`: Invoices are generated at the end of the billing period.
|
|
31196
|
+
`).option("--estimated-arr <number>", `Estimated Annual Recurring Revenue generated by the subscription.`).option("--contract-value <number>", `Contract value of the subscription. This value is overridable by the user.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--phases <value>", `Array of subscription phases. Existing pending phases will be replaced by the ones in the array.`).option("--contract-terms <value>", `Contract terms to update.`).addHelpText("after", `
|
|
31197
|
+
Examples:
|
|
31198
|
+
hyperline subscriptions update --id <id>
|
|
31199
|
+
hyperline subscriptions update --id <id> --name <name> --purchase-order <purchase_order>
|
|
31200
|
+
hyperline subscriptions update --id <id> --output json`).action(async (opts) => {
|
|
31201
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31202
|
+
if (!ctx) {
|
|
31203
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31204
|
+
process.exit(1);
|
|
31205
|
+
}
|
|
31206
|
+
const args = {};
|
|
31207
|
+
if (opts.id !== void 0)
|
|
31208
|
+
args.id = opts.id;
|
|
31209
|
+
if (opts.name !== void 0)
|
|
31210
|
+
args.name = opts.name;
|
|
31211
|
+
if (opts.purchaseOrder !== void 0)
|
|
31212
|
+
args.purchase_order = opts.purchaseOrder;
|
|
31213
|
+
if (opts.crmOpportunityId !== void 0)
|
|
31214
|
+
args.crm_opportunity_id = opts.crmOpportunityId;
|
|
31215
|
+
if (opts.taxOnly !== void 0)
|
|
31216
|
+
args.tax_only = opts.taxOnly;
|
|
31217
|
+
if (opts.generateDraftInvoices !== void 0)
|
|
31218
|
+
args.generate_draft_invoices = opts.generateDraftInvoices;
|
|
31219
|
+
if (opts.generateDocument !== void 0)
|
|
31220
|
+
args.generate_document = opts.generateDocument;
|
|
31221
|
+
if (opts.documentName !== void 0)
|
|
31222
|
+
args.document_name = opts.documentName;
|
|
31223
|
+
if (opts.addTaxToDocument !== void 0)
|
|
31224
|
+
args.add_tax_to_document = opts.addTaxToDocument;
|
|
31225
|
+
if (opts.doNotChargeSubscription !== void 0)
|
|
31226
|
+
args.do_not_charge_subscription = opts.doNotChargeSubscription;
|
|
31227
|
+
if (opts.invoiceCustomNote !== void 0)
|
|
31228
|
+
args.invoice_custom_note = opts.invoiceCustomNote;
|
|
31229
|
+
if (opts.invoiceSchedule !== void 0)
|
|
31230
|
+
args.invoice_schedule = opts.invoiceSchedule;
|
|
31231
|
+
if (opts.startsAt !== void 0)
|
|
31232
|
+
args.starts_at = opts.startsAt;
|
|
31233
|
+
if (opts.initialBillingAt !== void 0)
|
|
31234
|
+
args.initial_billing_at = opts.initialBillingAt;
|
|
31235
|
+
if (opts.cancelAt !== void 0)
|
|
31236
|
+
args.cancel_at = opts.cancelAt;
|
|
31237
|
+
if (opts.properties !== void 0)
|
|
31238
|
+
args.properties = opts.properties;
|
|
31239
|
+
if (opts.customProperties !== void 0)
|
|
31240
|
+
args.custom_properties = opts.customProperties;
|
|
31241
|
+
if (opts.displayShippingDetails !== void 0)
|
|
31242
|
+
args.display_shipping_details = opts.displayShippingDetails;
|
|
31243
|
+
if (opts.phases !== void 0)
|
|
31244
|
+
args.phases = opts.phases;
|
|
31245
|
+
if (opts.contractTerms !== void 0)
|
|
31246
|
+
args.contract_terms = opts.contractTerms;
|
|
31247
|
+
if (opts.minimumInvoiceFee !== void 0)
|
|
31248
|
+
args.minimum_invoice_fee = Number(opts.minimumInvoiceFee);
|
|
31249
|
+
if (opts.estimatedArr !== void 0)
|
|
31250
|
+
args.estimated_arr = Number(opts.estimatedArr);
|
|
31251
|
+
if (opts.contractValue !== void 0)
|
|
31252
|
+
args.contract_value = Number(opts.contractValue);
|
|
31253
|
+
await ctx.execute({
|
|
31254
|
+
method: "PUT",
|
|
31255
|
+
path: "/v2/subscriptions/{id}",
|
|
31256
|
+
args,
|
|
31257
|
+
queryParamKeys: []
|
|
31258
|
+
});
|
|
31259
|
+
});
|
|
31260
|
+
resource.command("get-subscription-valuation").description(`Compute valuation metrics for a subscription: contract value (total/invoiced/remaining), recurring contract value, and ARR (fixed + variable). 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", `
|
|
31261
|
+
Examples:
|
|
31262
|
+
hyperline subscriptions get-subscription-valuation --id <id>
|
|
31263
|
+
hyperline subscriptions get-subscription-valuation --id <id> --granularity <granularity>`).action(async (opts) => {
|
|
31264
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31265
|
+
if (!ctx) {
|
|
31266
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31267
|
+
process.exit(1);
|
|
31268
|
+
}
|
|
31269
|
+
const args = {};
|
|
31270
|
+
if (opts.id !== void 0)
|
|
31271
|
+
args.id = opts.id;
|
|
31272
|
+
if (opts.granularity !== void 0)
|
|
31273
|
+
args.granularity = opts.granularity;
|
|
31274
|
+
await ctx.execute({
|
|
31275
|
+
method: "GET",
|
|
31276
|
+
path: "/v1/subscriptions/{id}/valuation",
|
|
31277
|
+
args,
|
|
31278
|
+
queryParamKeys: ["granularity"]
|
|
31279
|
+
});
|
|
31280
|
+
});
|
|
31281
|
+
}
|
|
31282
|
+
|
|
31283
|
+
// build/commands/generated/subscriptions-phases.js
|
|
31284
|
+
function registerSubscriptions_PhasesCommands(parent) {
|
|
31285
|
+
const resource = parent.command("subscriptions-phases").description("Manage subscriptions > phases");
|
|
31286
|
+
resource.command("list-subscription-phases").description(`List all phases of a subscription. Phases define time-bound product configurations within a subscription.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31287
|
+
Examples:
|
|
31288
|
+
hyperline subscriptions-phases list-subscription-phases --id <id>`).action(async (opts) => {
|
|
31289
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31290
|
+
if (!ctx) {
|
|
31291
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31292
|
+
process.exit(1);
|
|
31293
|
+
}
|
|
31294
|
+
const args = {};
|
|
31295
|
+
if (opts.id !== void 0)
|
|
31296
|
+
args.id = opts.id;
|
|
31297
|
+
await ctx.execute({
|
|
31298
|
+
method: "GET",
|
|
31299
|
+
path: "/v2/subscriptions/{id}/phases",
|
|
31300
|
+
args,
|
|
31301
|
+
queryParamKeys: []
|
|
31302
|
+
});
|
|
31303
|
+
});
|
|
31304
|
+
resource.command("get-subscription-phase").description(`Retrieve details of a specific phase within a subscription, including its products and billing configuration.`).requiredOption("--id <value>", `id parameter`).requiredOption("--phase-id <value>", `phaseId parameter`).addHelpText("after", `
|
|
31305
|
+
Examples:
|
|
31306
|
+
hyperline subscriptions-phases get-subscription-phase --id <id> --phase-id <phaseId>`).action(async (opts) => {
|
|
31307
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31308
|
+
if (!ctx) {
|
|
31309
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31310
|
+
process.exit(1);
|
|
31311
|
+
}
|
|
31312
|
+
const args = {};
|
|
31313
|
+
if (opts.id !== void 0)
|
|
31314
|
+
args.id = opts.id;
|
|
31315
|
+
if (opts.phaseId !== void 0)
|
|
31316
|
+
args.phaseId = opts.phaseId;
|
|
31317
|
+
await ctx.execute({
|
|
31318
|
+
method: "GET",
|
|
31319
|
+
path: "/v2/subscriptions/{id}/phases/{phaseId}",
|
|
31320
|
+
args,
|
|
31321
|
+
queryParamKeys: []
|
|
31322
|
+
});
|
|
31323
|
+
});
|
|
31324
|
+
resource.command("transition-subscription").description(`Transition a subscription to its next configured phase at a specified date.`).requiredOption("--id <value>", `id parameter`).option("--transition-date <value>", `Date of application of the transition. Use it if different than immediately to calculate pro-rata and display past or future dates on invoices. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
|
|
31325
|
+
Examples:
|
|
31326
|
+
hyperline subscriptions-phases transition-subscription --id <id>
|
|
31327
|
+
hyperline subscriptions-phases transition-subscription --id <id> --transition-date <transition_date>
|
|
31328
|
+
hyperline subscriptions-phases transition-subscription --id <id> --output json`).action(async (opts) => {
|
|
31329
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31330
|
+
if (!ctx) {
|
|
31331
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31332
|
+
process.exit(1);
|
|
31333
|
+
}
|
|
31334
|
+
const args = {};
|
|
31335
|
+
if (opts.id !== void 0)
|
|
31336
|
+
args.id = opts.id;
|
|
31337
|
+
if (opts.transitionDate !== void 0)
|
|
31338
|
+
args.transition_date = opts.transitionDate;
|
|
31339
|
+
await ctx.execute({
|
|
31340
|
+
method: "POST",
|
|
31341
|
+
path: "/v2/subscriptions/{id}/next-phase",
|
|
31342
|
+
args,
|
|
31343
|
+
queryParamKeys: []
|
|
31344
|
+
});
|
|
31345
|
+
});
|
|
31346
|
+
}
|
|
31347
|
+
|
|
31348
|
+
// build/commands/generated/subscriptions-templates.js
|
|
31349
|
+
function registerSubscriptions_TemplatesCommands(parent) {
|
|
31350
|
+
const resource = parent.command("subscriptions-templates").description("Manage subscriptions > templates");
|
|
31351
|
+
resource.command("list-subscription-templates").description(`List subscription templates with pagination. Templates define reusable subscription configurations with pre-configured products, phases, and billing settings.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
31352
|
+
Examples:
|
|
31353
|
+
hyperline subscriptions-templates list-subscription-templates
|
|
31354
|
+
hyperline subscriptions-templates list-subscription-templates --take <take>`).action(async (opts) => {
|
|
31355
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31356
|
+
if (!ctx) {
|
|
31357
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31358
|
+
process.exit(1);
|
|
31359
|
+
}
|
|
31360
|
+
const args = {};
|
|
31361
|
+
if (opts.take !== void 0)
|
|
31362
|
+
args.take = Number(opts.take);
|
|
31363
|
+
if (opts.skip !== void 0)
|
|
31364
|
+
args.skip = Number(opts.skip);
|
|
31365
|
+
await ctx.execute({
|
|
31366
|
+
method: "GET",
|
|
31367
|
+
path: "/v1/subscriptions/templates",
|
|
31368
|
+
args,
|
|
31369
|
+
queryParamKeys: ["take", "skip"]
|
|
31370
|
+
});
|
|
31371
|
+
});
|
|
31372
|
+
resource.command("get-subscription-template").description(`Retrieve a subscription template by ID with its full configuration including products, phases, and pricing details.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31373
|
+
Examples:
|
|
31374
|
+
hyperline subscriptions-templates get-subscription-template --id <id>`).action(async (opts) => {
|
|
31375
|
+
const ctx = resource.parent?.opts()._ctx;
|
|
31376
|
+
if (!ctx) {
|
|
31377
|
+
process.stderr.write("Error: Not authenticated\n");
|
|
31378
|
+
process.exit(1);
|
|
31379
|
+
}
|
|
31380
|
+
const args = {};
|
|
31381
|
+
if (opts.id !== void 0)
|
|
31382
|
+
args.id = opts.id;
|
|
31383
|
+
await ctx.execute({
|
|
31384
|
+
method: "GET",
|
|
31385
|
+
path: "/v1/subscriptions/templates/{id}",
|
|
31386
|
+
args,
|
|
31387
|
+
queryParamKeys: []
|
|
31388
|
+
});
|
|
31389
|
+
});
|
|
31390
|
+
}
|
|
31391
|
+
|
|
31392
|
+
// build/commands/generated/subscriptions-transitions.js
|
|
31393
|
+
function registerSubscriptions_TransitionsCommands(parent) {
|
|
31394
|
+
const resource = parent.command("subscriptions-transitions").description("Manage subscriptions > transitions");
|
|
31101
31395
|
resource.command("list-subscription-transitions").description(`List subscription transitions (migrations from one subscription to another). Filterable and paginated with take/skip.`).option("--take <number>", `take`).option("--skip <number>", `skip`).option("--status <value>", `status`).option("--status.in <value>", `status__in`).option("--source-subscription-id <value>", `source_subscription_id`).option("--source-subscription-id.not <value>", `source_subscription_id__not`).option("--source-subscription-id.is-null <value>", `source_subscription_id__isNull`).option("--source-subscription-id.is-not-null <value>", `source_subscription_id__isNotNull`).option("--source-subscription-id.equals <value>", `source_subscription_id__equals`).option("--source-subscription-id.contains <value>", `source_subscription_id__contains`).option("--source-subscription-id.starts-with <value>", `source_subscription_id__startsWith`).option("--source-subscription-id.end-with <value>", `source_subscription_id__endWith`).option("--base-subscription-id <value>", `base_subscription_id`).option("--base-subscription-id.not <value>", `base_subscription_id__not`).option("--base-subscription-id.is-null <value>", `base_subscription_id__isNull`).option("--base-subscription-id.is-not-null <value>", `base_subscription_id__isNotNull`).option("--base-subscription-id.equals <value>", `base_subscription_id__equals`).option("--base-subscription-id.contains <value>", `base_subscription_id__contains`).option("--base-subscription-id.starts-with <value>", `base_subscription_id__startsWith`).option("--base-subscription-id.end-with <value>", `base_subscription_id__endWith`).option("--target-subscription-id <value>", `target_subscription_id`).option("--target-subscription-id.not <value>", `target_subscription_id__not`).option("--target-subscription-id.is-null <value>", `target_subscription_id__isNull`).option("--target-subscription-id.is-not-null <value>", `target_subscription_id__isNotNull`).option("--target-subscription-id.equals <value>", `target_subscription_id__equals`).option("--target-subscription-id.contains <value>", `target_subscription_id__contains`).option("--target-subscription-id.starts-with <value>", `target_subscription_id__startsWith`).option("--target-subscription-id.end-with <value>", `target_subscription_id__endWith`).option("--transition-date <value>", `transition_date`).option("--transition-date.not <value>", `transition_date__not`).option("--transition-date.is-null <value>", `transition_date__isNull`).option("--transition-date.is-not-null <value>", `transition_date__isNotNull`).option("--transition-date.equals <value>", `transition_date__equals`).option("--transition-date.lt <value>", `transition_date__lt`).option("--transition-date.lte <value>", `transition_date__lte`).option("--transition-date.gt <value>", `transition_date__gt`).option("--transition-date.gte <value>", `transition_date__gte`).option("--transitioned-at <value>", `transitioned_at`).option("--transitioned-at.not <value>", `transitioned_at__not`).option("--transitioned-at.is-null <value>", `transitioned_at__isNull`).option("--transitioned-at.is-not-null <value>", `transitioned_at__isNotNull`).option("--transitioned-at.equals <value>", `transitioned_at__equals`).option("--transitioned-at.lt <value>", `transitioned_at__lt`).option("--transitioned-at.lte <value>", `transitioned_at__lte`).option("--transitioned-at.gt <value>", `transitioned_at__gt`).option("--transitioned-at.gte <value>", `transitioned_at__gte`).addHelpText("after", `
|
|
31102
31396
|
Examples:
|
|
31103
|
-
hyperline subscriptions list-subscription-transitions
|
|
31104
|
-
hyperline subscriptions list-subscription-transitions --take <take> --status <status>`).action(async (opts) => {
|
|
31397
|
+
hyperline subscriptions-transitions list-subscription-transitions
|
|
31398
|
+
hyperline subscriptions-transitions list-subscription-transitions --take <take> --status <status>`).action(async (opts) => {
|
|
31105
31399
|
const ctx = resource.parent?.opts()._ctx;
|
|
31106
31400
|
if (!ctx) {
|
|
31107
31401
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -31254,180 +31548,11 @@ Examples:
|
|
|
31254
31548
|
]
|
|
31255
31549
|
});
|
|
31256
31550
|
});
|
|
31257
|
-
resource.command("get").description(`Retrieve full details of a subscription by ID including phases, products, billing dates, and status. Optionally include live_billing data.`).requiredOption("--id <value>", `id parameter`).option("--include-live-billing <value>", `include_live_billing`).addHelpText("after", `
|
|
31258
|
-
Examples:
|
|
31259
|
-
hyperline subscriptions get --id <id>
|
|
31260
|
-
hyperline subscriptions get --id <id> --include-live-billing <include_live_billing>`).action(async (opts) => {
|
|
31261
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31262
|
-
if (!ctx) {
|
|
31263
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31264
|
-
process.exit(1);
|
|
31265
|
-
}
|
|
31266
|
-
const args = {};
|
|
31267
|
-
if (opts.id !== void 0)
|
|
31268
|
-
args.id = opts.id;
|
|
31269
|
-
if (opts.includeLiveBilling !== void 0)
|
|
31270
|
-
args.include_live_billing = opts.includeLiveBilling;
|
|
31271
|
-
await ctx.execute({
|
|
31272
|
-
method: "GET",
|
|
31273
|
-
path: "/v2/subscriptions/{id}",
|
|
31274
|
-
args,
|
|
31275
|
-
queryParamKeys: ["include_live_billing"]
|
|
31276
|
-
});
|
|
31277
|
-
});
|
|
31278
|
-
resource.command("list-subscription-phases").description(`List all phases of a subscription. Phases define time-bound product configurations within a subscription.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31279
|
-
Examples:
|
|
31280
|
-
hyperline subscriptions list-subscription-phases --id <id>`).action(async (opts) => {
|
|
31281
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31282
|
-
if (!ctx) {
|
|
31283
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31284
|
-
process.exit(1);
|
|
31285
|
-
}
|
|
31286
|
-
const args = {};
|
|
31287
|
-
if (opts.id !== void 0)
|
|
31288
|
-
args.id = opts.id;
|
|
31289
|
-
await ctx.execute({
|
|
31290
|
-
method: "GET",
|
|
31291
|
-
path: "/v2/subscriptions/{id}/phases",
|
|
31292
|
-
args,
|
|
31293
|
-
queryParamKeys: []
|
|
31294
|
-
});
|
|
31295
|
-
});
|
|
31296
|
-
resource.command("get-subscription-phase").description(`Retrieve details of a specific phase within a subscription, including its products and billing configuration.`).requiredOption("--id <value>", `id parameter`).requiredOption("--phase-id <value>", `phaseId parameter`).addHelpText("after", `
|
|
31297
|
-
Examples:
|
|
31298
|
-
hyperline subscriptions get-subscription-phase --id <id> --phase-id <phaseId>`).action(async (opts) => {
|
|
31299
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31300
|
-
if (!ctx) {
|
|
31301
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31302
|
-
process.exit(1);
|
|
31303
|
-
}
|
|
31304
|
-
const args = {};
|
|
31305
|
-
if (opts.id !== void 0)
|
|
31306
|
-
args.id = opts.id;
|
|
31307
|
-
if (opts.phaseId !== void 0)
|
|
31308
|
-
args.phaseId = opts.phaseId;
|
|
31309
|
-
await ctx.execute({
|
|
31310
|
-
method: "GET",
|
|
31311
|
-
path: "/v2/subscriptions/{id}/phases/{phaseId}",
|
|
31312
|
-
args,
|
|
31313
|
-
queryParamKeys: []
|
|
31314
|
-
});
|
|
31315
|
-
});
|
|
31316
|
-
resource.command("refresh-subscription-seat-products").description(`Trigger a count update on seat-based products within a subscription using the configured dataloader query.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31317
|
-
Examples:
|
|
31318
|
-
hyperline subscriptions refresh-subscription-seat-products --id <id>
|
|
31319
|
-
hyperline subscriptions refresh-subscription-seat-products --id <id> --output json`).action(async (opts) => {
|
|
31320
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31321
|
-
if (!ctx) {
|
|
31322
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31323
|
-
process.exit(1);
|
|
31324
|
-
}
|
|
31325
|
-
const args = {};
|
|
31326
|
-
if (opts.id !== void 0)
|
|
31327
|
-
args.id = opts.id;
|
|
31328
|
-
await ctx.execute({
|
|
31329
|
-
method: "POST",
|
|
31330
|
-
path: "/v2/subscriptions/{id}/refresh-seat-products",
|
|
31331
|
-
args,
|
|
31332
|
-
queryParamKeys: []
|
|
31333
|
-
});
|
|
31334
|
-
});
|
|
31335
|
-
resource.command("update").description(`Comprehensive subscription update: modify fields, manage phases (add/update/delete pending phases), update products within phases, and manage coupons. Payload mirrors GET response structure.`).requiredOption("--id <value>", `id parameter`).option("--name <value>", `Subscription custom name.`).option("--purchase-order <value>", `Reference to the purchase order.`).option("--minimum-invoice-fee <number>", `Minimum fee applied to each invoice outside of one time payments.`).option("--crm-opportunity-id <value>", `ID of the related opportunity/deal in the connected CRM.`).option("--tax-only <value>", `Only tax will be charged on this subscription.`).option("--generate-draft-invoices <value>", `Generate draft invoices for the subscription. Each invoice will need to be reviewed and validated manually before being sent`).option("--generate-document <value>", `Generate non-legal documents instead of invoices.`).option("--document-name <value>", `If \`generate_document\` is turned on, allows you to give a name to your document.`).option("--add-tax-to-document <value>", `If \`generate_document\` is turned on, will add taxes to document.`).option("--do-not-charge-subscription <value>", `Subscription will be invoiced but not charged (invoices/documents will be settled directly).`).option("--invoice-custom-note <value>", `Default custom note added to invoices generated by the subscription.`).option("--invoice-schedule <value>", `
|
|
31336
|
-
Defines when invoices are generated relative to the billing period.
|
|
31337
|
-
|
|
31338
|
-
- \`period_start\`: Invoices are generated at the start of the billing period.
|
|
31339
|
-
- \`period_end\`: Invoices are generated at the end of the billing period.
|
|
31340
|
-
`).option("--estimated-arr <number>", `Estimated Annual Recurring Revenue generated by the subscription.`).option("--contract-value <number>", `Contract value of the subscription. This value is overridable by the user.`).option("--starts-at <value>", `Applies only if the activation strategy is \`start_date\`. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--initial-billing-at <value>", `Date when the subscription will start being billed. If not specified, it will correspond to the \`starts_at\` date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--cancel-at <value>", `Subscription cancel date. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).option("--properties <value>", `Key/value pairs to store any metadata useful in your context.`).option("--custom-properties <value>", `A list of key value with the slug of the custom property as the key and the custom property value as value.`).option("--display-shipping-details <value>", `Indicates if the shipping details should be displayed on the subscription's invoices.`).option("--phases <value>", `Array of subscription phases. Existing pending phases will be replaced by the ones in the array.`).option("--contract-terms <value>", `Contract terms to update.`).addHelpText("after", `
|
|
31341
|
-
Examples:
|
|
31342
|
-
hyperline subscriptions update --id <id>
|
|
31343
|
-
hyperline subscriptions update --id <id> --name <name> --purchase-order <purchase_order>
|
|
31344
|
-
hyperline subscriptions update --id <id> --output json`).action(async (opts) => {
|
|
31345
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31346
|
-
if (!ctx) {
|
|
31347
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31348
|
-
process.exit(1);
|
|
31349
|
-
}
|
|
31350
|
-
const args = {};
|
|
31351
|
-
if (opts.id !== void 0)
|
|
31352
|
-
args.id = opts.id;
|
|
31353
|
-
if (opts.name !== void 0)
|
|
31354
|
-
args.name = opts.name;
|
|
31355
|
-
if (opts.purchaseOrder !== void 0)
|
|
31356
|
-
args.purchase_order = opts.purchaseOrder;
|
|
31357
|
-
if (opts.crmOpportunityId !== void 0)
|
|
31358
|
-
args.crm_opportunity_id = opts.crmOpportunityId;
|
|
31359
|
-
if (opts.taxOnly !== void 0)
|
|
31360
|
-
args.tax_only = opts.taxOnly;
|
|
31361
|
-
if (opts.generateDraftInvoices !== void 0)
|
|
31362
|
-
args.generate_draft_invoices = opts.generateDraftInvoices;
|
|
31363
|
-
if (opts.generateDocument !== void 0)
|
|
31364
|
-
args.generate_document = opts.generateDocument;
|
|
31365
|
-
if (opts.documentName !== void 0)
|
|
31366
|
-
args.document_name = opts.documentName;
|
|
31367
|
-
if (opts.addTaxToDocument !== void 0)
|
|
31368
|
-
args.add_tax_to_document = opts.addTaxToDocument;
|
|
31369
|
-
if (opts.doNotChargeSubscription !== void 0)
|
|
31370
|
-
args.do_not_charge_subscription = opts.doNotChargeSubscription;
|
|
31371
|
-
if (opts.invoiceCustomNote !== void 0)
|
|
31372
|
-
args.invoice_custom_note = opts.invoiceCustomNote;
|
|
31373
|
-
if (opts.invoiceSchedule !== void 0)
|
|
31374
|
-
args.invoice_schedule = opts.invoiceSchedule;
|
|
31375
|
-
if (opts.startsAt !== void 0)
|
|
31376
|
-
args.starts_at = opts.startsAt;
|
|
31377
|
-
if (opts.initialBillingAt !== void 0)
|
|
31378
|
-
args.initial_billing_at = opts.initialBillingAt;
|
|
31379
|
-
if (opts.cancelAt !== void 0)
|
|
31380
|
-
args.cancel_at = opts.cancelAt;
|
|
31381
|
-
if (opts.properties !== void 0)
|
|
31382
|
-
args.properties = opts.properties;
|
|
31383
|
-
if (opts.customProperties !== void 0)
|
|
31384
|
-
args.custom_properties = opts.customProperties;
|
|
31385
|
-
if (opts.displayShippingDetails !== void 0)
|
|
31386
|
-
args.display_shipping_details = opts.displayShippingDetails;
|
|
31387
|
-
if (opts.phases !== void 0)
|
|
31388
|
-
args.phases = opts.phases;
|
|
31389
|
-
if (opts.contractTerms !== void 0)
|
|
31390
|
-
args.contract_terms = opts.contractTerms;
|
|
31391
|
-
if (opts.minimumInvoiceFee !== void 0)
|
|
31392
|
-
args.minimum_invoice_fee = Number(opts.minimumInvoiceFee);
|
|
31393
|
-
if (opts.estimatedArr !== void 0)
|
|
31394
|
-
args.estimated_arr = Number(opts.estimatedArr);
|
|
31395
|
-
if (opts.contractValue !== void 0)
|
|
31396
|
-
args.contract_value = Number(opts.contractValue);
|
|
31397
|
-
await ctx.execute({
|
|
31398
|
-
method: "PUT",
|
|
31399
|
-
path: "/v2/subscriptions/{id}",
|
|
31400
|
-
args,
|
|
31401
|
-
queryParamKeys: []
|
|
31402
|
-
});
|
|
31403
|
-
});
|
|
31404
|
-
resource.command("transition").description(`Transition a subscription to its next configured phase at a specified date.`).requiredOption("--id <value>", `id parameter`).option("--transition-date <value>", `Date of application of the transition. Use it if different than immediately to calculate pro-rata and display past or future dates on invoices. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).addHelpText("after", `
|
|
31405
|
-
Examples:
|
|
31406
|
-
hyperline subscriptions transition --id <id>
|
|
31407
|
-
hyperline subscriptions transition --id <id> --transition-date <transition_date>
|
|
31408
|
-
hyperline subscriptions transition --id <id> --output json`).action(async (opts) => {
|
|
31409
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31410
|
-
if (!ctx) {
|
|
31411
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31412
|
-
process.exit(1);
|
|
31413
|
-
}
|
|
31414
|
-
const args = {};
|
|
31415
|
-
if (opts.id !== void 0)
|
|
31416
|
-
args.id = opts.id;
|
|
31417
|
-
if (opts.transitionDate !== void 0)
|
|
31418
|
-
args.transition_date = opts.transitionDate;
|
|
31419
|
-
await ctx.execute({
|
|
31420
|
-
method: "POST",
|
|
31421
|
-
path: "/v2/subscriptions/{id}/next-phase",
|
|
31422
|
-
args,
|
|
31423
|
-
queryParamKeys: []
|
|
31424
|
-
});
|
|
31425
|
-
});
|
|
31426
31551
|
resource.command("create-subscription-transition").description(`Create a transition from one subscription to another, configured from a subscription, plan, or template. Can be applied immediately or scheduled.`).requiredOption("--source-subscription-id <value>", `The ID of the subscription to transition from`).option("--name <value>", `An optional name for the transition`).option("--calculation-method <value>", `The calculation method to use for the transition. 'do_not_charge' will not generate any transition invoice. 'pro_rata' will generate a prorated invoice for the remaining period.`).option("--billing-cycle-transition-method <value>", `The billing cycle transition method to use. 'keep_current_billing_cycle' will keep the current billing cycle dates if possible. 'align_to_new_billing_cycle' will align the billing cycle to the transition date.`).requiredOption("--application-schedule <value>", `Whether the transition should be applied 'immediately' or 'scheduled' for a specific date. Past dates within the current billing period are supported and will be applied immediately.`).option("--transition-date <value>", `The date at which the transition should occur. Only applicable if the application schedule is 'scheduled'. Can be a past date within the current billing period. UTC date time string in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.`).requiredOption("--target-subscription <value>", `The configuration of the subscription to transition to`).addHelpText("after", `
|
|
31427
31552
|
Examples:
|
|
31428
|
-
hyperline subscriptions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription>
|
|
31429
|
-
hyperline subscriptions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription> --name <name> --calculation-method <calculation_method>
|
|
31430
|
-
hyperline subscriptions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription> --output json`).action(async (opts) => {
|
|
31553
|
+
hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription>
|
|
31554
|
+
hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription> --name <name> --calculation-method <calculation_method>
|
|
31555
|
+
hyperline subscriptions-transitions create-subscription-transition --source-subscription-id <source_subscription_id> --application-schedule <application_schedule> --target-subscription <target_subscription> --output json`).action(async (opts) => {
|
|
31431
31556
|
const ctx = resource.parent?.opts()._ctx;
|
|
31432
31557
|
if (!ctx) {
|
|
31433
31558
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -31457,7 +31582,7 @@ Examples:
|
|
|
31457
31582
|
});
|
|
31458
31583
|
resource.command("get-subscription-transition").description(`Retrieve details of a subscription transition by ID including source/target subscriptions and schedule.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31459
31584
|
Examples:
|
|
31460
|
-
hyperline subscriptions get-subscription-transition --id <id>`).action(async (opts) => {
|
|
31585
|
+
hyperline subscriptions-transitions get-subscription-transition --id <id>`).action(async (opts) => {
|
|
31461
31586
|
const ctx = resource.parent?.opts()._ctx;
|
|
31462
31587
|
if (!ctx) {
|
|
31463
31588
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -31475,8 +31600,8 @@ Examples:
|
|
|
31475
31600
|
});
|
|
31476
31601
|
resource.command("cancel-subscription-transition").description(`Cancel a scheduled subscription transition before it is applied.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31477
31602
|
Examples:
|
|
31478
|
-
hyperline subscriptions cancel-subscription-transition --id <id>
|
|
31479
|
-
hyperline subscriptions cancel-subscription-transition --id <id> --output json`).action(async (opts) => {
|
|
31603
|
+
hyperline subscriptions-transitions cancel-subscription-transition --id <id>
|
|
31604
|
+
hyperline subscriptions-transitions cancel-subscription-transition --id <id> --output json`).action(async (opts) => {
|
|
31480
31605
|
const ctx = resource.parent?.opts()._ctx;
|
|
31481
31606
|
if (!ctx) {
|
|
31482
31607
|
process.stderr.write("Error: Not authenticated\n");
|
|
@@ -31492,71 +31617,6 @@ Examples:
|
|
|
31492
31617
|
queryParamKeys: []
|
|
31493
31618
|
});
|
|
31494
31619
|
});
|
|
31495
|
-
resource.command("get-subscription-valuation").description(`Compute valuation metrics for a subscription: contract value (total/invoiced/remaining), recurring contract value, and ARR (fixed + variable). 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", `
|
|
31496
|
-
Examples:
|
|
31497
|
-
hyperline subscriptions get-subscription-valuation --id <id>
|
|
31498
|
-
hyperline subscriptions get-subscription-valuation --id <id> --granularity <granularity>`).action(async (opts) => {
|
|
31499
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31500
|
-
if (!ctx) {
|
|
31501
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31502
|
-
process.exit(1);
|
|
31503
|
-
}
|
|
31504
|
-
const args = {};
|
|
31505
|
-
if (opts.id !== void 0)
|
|
31506
|
-
args.id = opts.id;
|
|
31507
|
-
if (opts.granularity !== void 0)
|
|
31508
|
-
args.granularity = opts.granularity;
|
|
31509
|
-
await ctx.execute({
|
|
31510
|
-
method: "GET",
|
|
31511
|
-
path: "/v1/subscriptions/{id}/valuation",
|
|
31512
|
-
args,
|
|
31513
|
-
queryParamKeys: ["granularity"]
|
|
31514
|
-
});
|
|
31515
|
-
});
|
|
31516
|
-
}
|
|
31517
|
-
|
|
31518
|
-
// build/commands/generated/subscriptions-templates.js
|
|
31519
|
-
function registerSubscriptions_TemplatesCommands(parent) {
|
|
31520
|
-
const resource = parent.command("subscriptions-templates").description("Manage subscriptions > templates");
|
|
31521
|
-
resource.command("list-subscription-templates").description(`List subscription templates with pagination. Templates define reusable subscription configurations with pre-configured products, phases, and billing settings.`).option("--take <number>", `take`).option("--skip <number>", `skip`).addHelpText("after", `
|
|
31522
|
-
Examples:
|
|
31523
|
-
hyperline subscriptions-templates list-subscription-templates
|
|
31524
|
-
hyperline subscriptions-templates list-subscription-templates --take <take>`).action(async (opts) => {
|
|
31525
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31526
|
-
if (!ctx) {
|
|
31527
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31528
|
-
process.exit(1);
|
|
31529
|
-
}
|
|
31530
|
-
const args = {};
|
|
31531
|
-
if (opts.take !== void 0)
|
|
31532
|
-
args.take = Number(opts.take);
|
|
31533
|
-
if (opts.skip !== void 0)
|
|
31534
|
-
args.skip = Number(opts.skip);
|
|
31535
|
-
await ctx.execute({
|
|
31536
|
-
method: "GET",
|
|
31537
|
-
path: "/v1/subscriptions/templates",
|
|
31538
|
-
args,
|
|
31539
|
-
queryParamKeys: ["take", "skip"]
|
|
31540
|
-
});
|
|
31541
|
-
});
|
|
31542
|
-
resource.command("get-subscription-template").description(`Retrieve a subscription template by ID with its full configuration including products, phases, and pricing details.`).requiredOption("--id <value>", `id parameter`).addHelpText("after", `
|
|
31543
|
-
Examples:
|
|
31544
|
-
hyperline subscriptions-templates get-subscription-template --id <id>`).action(async (opts) => {
|
|
31545
|
-
const ctx = resource.parent?.opts()._ctx;
|
|
31546
|
-
if (!ctx) {
|
|
31547
|
-
process.stderr.write("Error: Not authenticated\n");
|
|
31548
|
-
process.exit(1);
|
|
31549
|
-
}
|
|
31550
|
-
const args = {};
|
|
31551
|
-
if (opts.id !== void 0)
|
|
31552
|
-
args.id = opts.id;
|
|
31553
|
-
await ctx.execute({
|
|
31554
|
-
method: "GET",
|
|
31555
|
-
path: "/v1/subscriptions/templates/{id}",
|
|
31556
|
-
args,
|
|
31557
|
-
queryParamKeys: []
|
|
31558
|
-
});
|
|
31559
|
-
});
|
|
31560
31620
|
}
|
|
31561
31621
|
|
|
31562
31622
|
// build/commands/generated/taxes.js
|
|
@@ -32109,8 +32169,10 @@ function registerAllCommands(program2) {
|
|
|
32109
32169
|
registerProductsCommands(program2);
|
|
32110
32170
|
registerPrice_ConfigurationsCommands(program2);
|
|
32111
32171
|
registerQuotesCommands(program2);
|
|
32112
|
-
registerSubscriptionsCommands(program2);
|
|
32113
32172
|
registerSubscriptions_TemplatesCommands(program2);
|
|
32173
|
+
registerSubscriptionsCommands(program2);
|
|
32174
|
+
registerSubscriptions_TransitionsCommands(program2);
|
|
32175
|
+
registerSubscriptions_PhasesCommands(program2);
|
|
32114
32176
|
registerTaxesCommands(program2);
|
|
32115
32177
|
registerWalletsCommands(program2);
|
|
32116
32178
|
registerWebhooksCommands(program2);
|
|
@@ -32694,7 +32756,7 @@ function $constructor(name, initializer3, params) {
|
|
|
32694
32756
|
Object.defineProperty(_, "name", { value: name });
|
|
32695
32757
|
return _;
|
|
32696
32758
|
}
|
|
32697
|
-
var $brand = Symbol("zod_brand");
|
|
32759
|
+
var $brand = /* @__PURE__ */ Symbol("zod_brand");
|
|
32698
32760
|
var $ZodAsyncError = class extends Error {
|
|
32699
32761
|
constructor() {
|
|
32700
32762
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
@@ -32841,7 +32903,7 @@ function floatSafeRemainder(val, step) {
|
|
|
32841
32903
|
const stepInt = Number.parseInt(step.toFixed(decCount).replace(".", ""));
|
|
32842
32904
|
return valInt % stepInt / 10 ** decCount;
|
|
32843
32905
|
}
|
|
32844
|
-
var EVALUATING = Symbol("evaluating");
|
|
32906
|
+
var EVALUATING = /* @__PURE__ */ Symbol("evaluating");
|
|
32845
32907
|
function defineLazy(object2, key, getter) {
|
|
32846
32908
|
let value = void 0;
|
|
32847
32909
|
Object.defineProperty(object2, key, {
|
|
@@ -41914,8 +41976,8 @@ function yo_default() {
|
|
|
41914
41976
|
|
|
41915
41977
|
// ../../node_modules/zod/v4/core/registries.js
|
|
41916
41978
|
var _a;
|
|
41917
|
-
var $output = Symbol("ZodOutput");
|
|
41918
|
-
var $input = Symbol("ZodInput");
|
|
41979
|
+
var $output = /* @__PURE__ */ Symbol("ZodOutput");
|
|
41980
|
+
var $input = /* @__PURE__ */ Symbol("ZodInput");
|
|
41919
41981
|
var $ZodRegistry = class {
|
|
41920
41982
|
constructor() {
|
|
41921
41983
|
this._map = /* @__PURE__ */ new WeakMap();
|
|
@@ -42952,7 +43014,7 @@ function _stringbool(Classes, _params) {
|
|
|
42952
43014
|
type: "pipe",
|
|
42953
43015
|
in: stringSchema,
|
|
42954
43016
|
out: booleanSchema,
|
|
42955
|
-
transform: (input, payload) => {
|
|
43017
|
+
transform: ((input, payload) => {
|
|
42956
43018
|
let data = input;
|
|
42957
43019
|
if (params.case !== "sensitive")
|
|
42958
43020
|
data = data.toLowerCase();
|
|
@@ -42971,14 +43033,14 @@ function _stringbool(Classes, _params) {
|
|
|
42971
43033
|
});
|
|
42972
43034
|
return {};
|
|
42973
43035
|
}
|
|
42974
|
-
},
|
|
42975
|
-
reverseTransform: (input, _payload) => {
|
|
43036
|
+
}),
|
|
43037
|
+
reverseTransform: ((input, _payload) => {
|
|
42976
43038
|
if (input === true) {
|
|
42977
43039
|
return truthyArray[0] || "true";
|
|
42978
43040
|
} else {
|
|
42979
43041
|
return falsyArray[0] || "false";
|
|
42980
43042
|
}
|
|
42981
|
-
},
|
|
43043
|
+
}),
|
|
42982
43044
|
error: params.error
|
|
42983
43045
|
});
|
|
42984
43046
|
return codec2;
|
|
@@ -44306,10 +44368,10 @@ var ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
|
|
|
44306
44368
|
inst.with = inst.check;
|
|
44307
44369
|
inst.clone = (def2, params) => clone(inst, def2, params);
|
|
44308
44370
|
inst.brand = () => inst;
|
|
44309
|
-
inst.register = (reg, meta3) => {
|
|
44371
|
+
inst.register = ((reg, meta3) => {
|
|
44310
44372
|
reg.add(inst, meta3);
|
|
44311
44373
|
return inst;
|
|
44312
|
-
};
|
|
44374
|
+
});
|
|
44313
44375
|
inst.parse = (data, params) => parse2(inst, data, params, { callee: inst.parse });
|
|
44314
44376
|
inst.safeParse = (data, params) => safeParse2(inst, data, params);
|
|
44315
44377
|
inst.parseAsync = async (data, params) => parseAsync2(inst, data, params, { callee: inst.parseAsync });
|
|
@@ -46997,7 +47059,7 @@ function cosine(Ctor, x) {
|
|
|
46997
47059
|
Ctor.precision -= k;
|
|
46998
47060
|
return x;
|
|
46999
47061
|
}
|
|
47000
|
-
var divide = /* @__PURE__ */ function() {
|
|
47062
|
+
var divide = /* @__PURE__ */ (function() {
|
|
47001
47063
|
function multiplyInteger(x, k, base) {
|
|
47002
47064
|
var temp, carry = 0, i = x.length;
|
|
47003
47065
|
for (x = x.slice(); i--; ) {
|
|
@@ -47155,7 +47217,7 @@ var divide = /* @__PURE__ */ function() {
|
|
|
47155
47217
|
}
|
|
47156
47218
|
return q;
|
|
47157
47219
|
};
|
|
47158
|
-
}();
|
|
47220
|
+
})();
|
|
47159
47221
|
function finalise(x, sd, rm, isTruncated) {
|
|
47160
47222
|
var digits, i, j, k, rd, roundUp, w, xd, xdi, Ctor = x.constructor;
|
|
47161
47223
|
out: if (sd != null) {
|
|
@@ -48112,7 +48174,7 @@ function tanh(x) {
|
|
|
48112
48174
|
function trunc(x) {
|
|
48113
48175
|
return finalise(x = new this(x), x.e + 1, 1);
|
|
48114
48176
|
}
|
|
48115
|
-
P[Symbol.for("nodejs.util.inspect.custom")] = P.toString;
|
|
48177
|
+
P[/* @__PURE__ */ Symbol.for("nodejs.util.inspect.custom")] = P.toString;
|
|
48116
48178
|
P[Symbol.toStringTag] = "Decimal";
|
|
48117
48179
|
var Decimal = P.constructor = clone2(DEFAULTS);
|
|
48118
48180
|
LN10 = new Decimal(LN10);
|
|
@@ -51114,7 +51176,7 @@ var toLogRequest = (config4) => {
|
|
|
51114
51176
|
url: config4.url ?? "",
|
|
51115
51177
|
path: config4.url ?? "",
|
|
51116
51178
|
hostname: config4.baseURL ?? "",
|
|
51117
|
-
originalUrl: `${config4.baseURL}${config4.url}`,
|
|
51179
|
+
originalUrl: `${config4.baseURL ?? ""}${config4.url}`,
|
|
51118
51180
|
body: config4.data,
|
|
51119
51181
|
headers: {}
|
|
51120
51182
|
};
|
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.f9abc9e",
|
|
4
4
|
"description": "Agent-first CLI for Hyperline API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
"@hyperline/ts-config": "workspace:*",
|
|
47
47
|
"@hyperline/vitest-config": "workspace:*",
|
|
48
48
|
"@types/node": "24.10.1",
|
|
49
|
-
"esbuild": "0.
|
|
50
|
-
"typescript": "6.0.
|
|
51
|
-
"vitest": "4.
|
|
49
|
+
"esbuild": "0.28.0",
|
|
50
|
+
"typescript": "6.0.3",
|
|
51
|
+
"vitest": "4.1.5"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public",
|