@haakco/hostingctl 1.0.537 → 1.0.539

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/main.js CHANGED
@@ -29707,6 +29707,60 @@ function companyAssetDestroyFavicon(options) {
29707
29707
  }));
29708
29708
  }
29709
29709
  /**
29710
+ * {@link /c/:company/billing/collection}
29711
+ */
29712
+ function companyBillingCollectionIndex(options) {
29713
+ const { client: request = client, ...config } = options;
29714
+ return withUnwrap(request({
29715
+ method: "GET",
29716
+ url: "/c/{company}/billing/collection",
29717
+ security: [{
29718
+ type: "http",
29719
+ scheme: "bearer"
29720
+ }],
29721
+ ...config,
29722
+ throwOnError: config.throwOnError ?? true
29723
+ }));
29724
+ }
29725
+ /**
29726
+ * @description The answer is the provider's signed form: the browser submits it, the provider takes the card,
29727
+ * and nothing is active until a verified confirmation arrives. A replacement leaves the current
29728
+ * method chargeable until the new one is verified, so a failed card update never removes a working
29729
+ * method.
29730
+ * @summary Start authorizing a method, or replace the existing one
29731
+ * {@link /c/:company/billing/collection/setup}
29732
+ */
29733
+ function companyBillingCollectionStore(options) {
29734
+ const { client: request = client, ...config } = options;
29735
+ return withUnwrap(request({
29736
+ method: "POST",
29737
+ url: "/c/{company}/billing/collection/setup",
29738
+ security: [{
29739
+ type: "http",
29740
+ scheme: "bearer"
29741
+ }],
29742
+ ...config,
29743
+ throwOnError: config.throwOnError ?? true
29744
+ }));
29745
+ }
29746
+ /**
29747
+ * @summary Withdraw authorization. Future charges stop immediately
29748
+ * {@link /c/:company/billing/collection/methods/:methodUuid/revoke}
29749
+ */
29750
+ function companyBillingCollectionRevoke(options) {
29751
+ const { client: request = client, ...config } = options;
29752
+ return withUnwrap(request({
29753
+ method: "POST",
29754
+ url: "/c/{company}/billing/collection/methods/{methodUuid}/revoke",
29755
+ security: [{
29756
+ type: "http",
29757
+ scheme: "bearer"
29758
+ }],
29759
+ ...config,
29760
+ throwOnError: config.throwOnError ?? true
29761
+ }));
29762
+ }
29763
+ /**
29710
29764
  * {@link /c/:company/billing/credit-notes}
29711
29765
  */
29712
29766
  function companyBillingCreditNoteIndex(options) {
@@ -35574,6 +35628,97 @@ function platformAlertUpdateSettings(options) {
35574
35628
  }));
35575
35629
  }
35576
35630
  /**
35631
+ * {@link /platform/billing/collection/status}
35632
+ */
35633
+ function platformBillingCollectionStatus(options = {}) {
35634
+ const { client: request = client, ...config } = options;
35635
+ return withUnwrap(request({
35636
+ method: "GET",
35637
+ url: "/platform/billing/collection/status",
35638
+ security: [{
35639
+ type: "http",
35640
+ scheme: "bearer"
35641
+ }],
35642
+ ...config,
35643
+ throwOnError: config.throwOnError ?? true
35644
+ }));
35645
+ }
35646
+ /**
35647
+ * @description A staff account is not a member of the company it is looking at, so the customer-scoped read
35648
+ * cannot answer this. It is the same derived shape the client sees, which is what stops an
35649
+ * operator's screen and the customer's screen disagreeing about what is owed.
35650
+ * @summary One client's collection standing, read through the platform owner rather than a client route
35651
+ * {@link /platform/companies/:company/billing/collection}
35652
+ */
35653
+ function platformBillingCollectionShow(options) {
35654
+ const { client: request = client, ...config } = options;
35655
+ return withUnwrap(request({
35656
+ method: "GET",
35657
+ url: "/platform/companies/{company}/billing/collection",
35658
+ security: [{
35659
+ type: "http",
35660
+ scheme: "bearer"
35661
+ }],
35662
+ ...config,
35663
+ throwOnError: config.throwOnError ?? true
35664
+ }));
35665
+ }
35666
+ /**
35667
+ * @description The invoice keeps its recorded state and simply becomes collectable again, so a wrong guess here
35668
+ * is recoverable: the next sweep will try again.
35669
+ * @summary Record that an unresolved charge did not happen
35670
+ * {@link /platform/companies/:company/billing/collection/attempts/:attemptUuid/not-charged}
35671
+ */
35672
+ function platformBillingCollectionReconcileNotCharged(options) {
35673
+ const { client: request = client, ...config } = options;
35674
+ return withUnwrap(request({
35675
+ method: "POST",
35676
+ url: "/platform/companies/{company}/billing/collection/attempts/{attemptUuid}/not-charged",
35677
+ security: [{
35678
+ type: "http",
35679
+ scheme: "bearer"
35680
+ }],
35681
+ ...config,
35682
+ throwOnError: config.throwOnError ?? true
35683
+ }));
35684
+ }
35685
+ /**
35686
+ * @description The resulting receipt is idempotent on that id, so recording the same settlement twice is the
35687
+ * same fact rather than a second payment.
35688
+ * @summary Record that an unresolved charge did settle, using the provider's own transaction id
35689
+ * {@link /platform/companies/:company/billing/collection/attempts/:attemptUuid/charged}
35690
+ */
35691
+ function platformBillingCollectionReconcileCharged(options) {
35692
+ const { client: request = client, ...config } = options;
35693
+ return withUnwrap(request({
35694
+ method: "POST",
35695
+ url: "/platform/companies/{company}/billing/collection/attempts/{attemptUuid}/charged",
35696
+ security: [{
35697
+ type: "http",
35698
+ scheme: "bearer"
35699
+ }],
35700
+ ...config,
35701
+ throwOnError: config.throwOnError ?? true
35702
+ }));
35703
+ }
35704
+ /**
35705
+ * @summary Record money received outside Hosting, against one invoice, attributed to this operator
35706
+ * {@link /platform/companies/:company/billing/collection/invoices/:invoiceUuid/receipts}
35707
+ */
35708
+ function platformBillingCollectionRecordReceipt(options) {
35709
+ const { client: request = client, ...config } = options;
35710
+ return withUnwrap(request({
35711
+ method: "POST",
35712
+ url: "/platform/companies/{company}/billing/collection/invoices/{invoiceUuid}/receipts",
35713
+ security: [{
35714
+ type: "http",
35715
+ scheme: "bearer"
35716
+ }],
35717
+ ...config,
35718
+ throwOnError: config.throwOnError ?? true
35719
+ }));
35720
+ }
35721
+ /**
35577
35722
  * {@link /platform/billing/discounts}
35578
35723
  */
35579
35724
  function platformBillingDiscountIndex(options = {}) {
@@ -37449,7 +37594,7 @@ function notificationsText(page) {
37449
37594
  return ` ${one.createdAt} ${read} ${one.title} ${one.id}`;
37450
37595
  }).join("\n");
37451
37596
  }
37452
- function statusText$1(report) {
37597
+ function statusText$2(report) {
37453
37598
  const lines = [
37454
37599
  `Profile "${report.profile}" → ${report.apiUrl}`,
37455
37600
  ` client ${report.clientId}`,
@@ -37475,7 +37620,7 @@ function authText(report) {
37475
37620
  if (isWrite(report)) return renderWriteOutcome(report, describeResult$1);
37476
37621
  if ("kind" in report && report.kind === "push-token") return authPushText(report);
37477
37622
  if (isLogin(report)) return loginText(report);
37478
- if (isStatus(report)) return statusText$1(report);
37623
+ if (isStatus(report)) return statusText$2(report);
37479
37624
  if (isLogout(report)) return logoutText(report);
37480
37625
  if (isImpersonation(report)) return impersonationText(report);
37481
37626
  if (isNotifications(report)) return notificationsText(report);
@@ -41657,6 +41802,22 @@ var BILLING_USAGE = `hostingctl billing <subcommand> [flags]
41657
41802
  discount redeem --company <slug> --code <spelling>
41658
41803
  Spend a code on your own company, changing what it is charged
41659
41804
  (needs --confirm)
41805
+ collection status Whether automatic collection may run, and what is missing
41806
+ collection show --company <slug> One client's method and where each invoice stands
41807
+ client collection --company <slug> The same standing, read as your own company
41808
+ collection setup --company <slug> [--replaces-method <uuid>]
41809
+ Start authorizing a method, or replace the one held
41810
+ (needs --confirm; nothing is chargeable until the provider confirms)
41811
+ collection revoke --company <slug> --method <uuid> [--reason <text>]
41812
+ Withdraw authorization; future charges stop now (needs --confirm)
41813
+ collection reconcile not-charged --company <slug> --attempt <uuid> --note <text>
41814
+ Record that an unresolved charge did not happen (needs --confirm)
41815
+ collection reconcile charged --company <slug> --attempt <uuid> --note <text>
41816
+ --transaction <ref> --amount <rand> --received-at <iso-8601>
41817
+ Record that it settled, from the provider's own id (needs --confirm)
41818
+ collection receipt --company <slug> --invoice <uuid> --note <text>
41819
+ --transaction <ref> --amount <rand> --received-at <iso-8601>
41820
+ Record money received outside Hosting (needs --confirm)
41660
41821
 
41661
41822
  Every write needs --confirm, and --dry-run describes it without sending anything.`;
41662
41823
  function issuerText(issuer) {
@@ -41860,7 +42021,7 @@ function product$1(context) {
41860
42021
  if (!known.includes(raw)) throw new UsageError(`--product must be one of ${known.join(", ")} (got ${raw}).`);
41861
42022
  return raw;
41862
42023
  }
41863
- var optional$4 = (context, flag) => {
42024
+ var optional$5 = (context, flag) => {
41864
42025
  const value = (context.flags.get(flag) ?? "").trim();
41865
42026
  return value === "" ? null : value;
41866
42027
  };
@@ -41868,8 +42029,8 @@ async function startRate(context) {
41868
42029
  const amountCents = randToCents$1(context, "--amount");
41869
42030
  const effectiveFrom = requiredFlag$2(context, "--from");
41870
42031
  const chosen = product$1(context);
41871
- const packageKey = optional$4(context, "--package");
41872
- const company = optional$4(context, "--company");
42032
+ const packageKey = optional$5(context, "--package");
42033
+ const company = optional$5(context, "--company");
41873
42034
  return {
41874
42035
  kind: "write",
41875
42036
  outcome: await confirmableWrite(context, `Start a ${chosen} rate${packageKey === null ? "" : ` for ${packageKey}`} of ${(amountCents / 100).toFixed(2)} rand${company === null ? " for every company" : ` for ${company}`} from ${effectiveFrom}.`, async () => platformBillingRateStore({ body: {
@@ -42133,6 +42294,269 @@ async function myCreditNote(context) {
42133
42294
  };
42134
42295
  }
42135
42296
  //#endregion
42297
+ //#region src/commands/billing-collection.ts
42298
+ /**
42299
+ * Automatic invoice collection, from a terminal.
42300
+ *
42301
+ * Two reads answer different callers: `status` is the platform's own readiness, `show` is where one
42302
+ * client's collection stands and is addressed through the platform owner because a staff account is
42303
+ * not a member of the company it is looking at, and `client collection` is the same standing read
42304
+ * through the customer route the caller's own token can reach.
42305
+ *
42306
+ * The four writes are the whole life of an authorization, and the two that record money demand a
42307
+ * `--note`. That is not a formality: `reconcile` and `receipt` are how a person states what an amount
42308
+ * of money actually did, so a settlement nobody had to explain cannot be recorded from here at all.
42309
+ */
42310
+ /** A flag's text, trimmed, or null when it was not given. */
42311
+ function optional$4(context, flag) {
42312
+ const value = (context.flags.get(flag) ?? "").trim();
42313
+ return value === "" ? null : value;
42314
+ }
42315
+ /** Whether the platform may collect automatically, and what would stop it. */
42316
+ async function collectionStatus() {
42317
+ return {
42318
+ kind: "collectionStatus",
42319
+ status: await platformBillingCollectionStatus({}).unwrap()
42320
+ };
42321
+ }
42322
+ /** One client's standing, as the platform owner reads it. */
42323
+ async function collectionShow(context) {
42324
+ return {
42325
+ kind: "collectionSummary",
42326
+ summary: await platformBillingCollectionShow({ path: { company: await requireCompany(context.flags) } }).unwrap()
42327
+ };
42328
+ }
42329
+ /** The caller's own company's standing, through the route its own token can reach. */
42330
+ async function myCompanyCollection(context) {
42331
+ return {
42332
+ kind: "collectionSummary",
42333
+ summary: await companyBillingCollectionIndex({ path: { company: await requireCompany(context.flags) } }).unwrap()
42334
+ };
42335
+ }
42336
+ /** Start an authorization, or replace the one already held. */
42337
+ async function collectionSetup(context) {
42338
+ const company = await requireCompany(context.flags);
42339
+ const replaces = optional$4(context, "--replaces-method");
42340
+ return {
42341
+ kind: "collectionSetup",
42342
+ outcome: await confirmableWrite(context, [
42343
+ `Start authorizing a payment method for ${company}${replaces === null ? "" : `, replacing ${replaces}`}.`,
42344
+ "This records the consent and creates a method that is PENDING: nothing is authorized, and no invoice can be charged, until the provider confirms it.",
42345
+ "The card is entered on the provider's own page in a browser, not here."
42346
+ ].join(" "), async () => (await companyBillingCollectionStore({
42347
+ path: { company },
42348
+ body: { replacesMethodUuid: replaces }
42349
+ }).unwrap()).method)
42350
+ };
42351
+ }
42352
+ /** Withdraw the authorization. Future charges stop immediately. */
42353
+ async function collectionRevoke(context) {
42354
+ const company = await requireCompany(context.flags);
42355
+ const methodUuid = requiredFlag$2(context, "--method");
42356
+ const reason = optional$4(context, "--reason");
42357
+ return {
42358
+ kind: "collectionRevoked",
42359
+ outcome: await confirmableWrite(context, [
42360
+ `Revoke payment method ${methodUuid} for ${company}${reason === null ? "" : `, recording: ${reason}`}.`,
42361
+ "Future automatic charges stop immediately.",
42362
+ "A charge already submitted to the provider may still settle, and the standing shows it as it happens."
42363
+ ].join(" "), async () => companyBillingCollectionRevoke({
42364
+ path: {
42365
+ company,
42366
+ methodUuid
42367
+ },
42368
+ body: { reason }
42369
+ }).unwrap())
42370
+ };
42371
+ }
42372
+ /**
42373
+ * Money fields on a `not-charged` decision, which says no money moved.
42374
+ *
42375
+ * Refused rather than ignored: a command that quietly dropped `--amount` would leave the caller
42376
+ * believing they had recorded a settlement.
42377
+ */
42378
+ function refuseSettlementFlags(context) {
42379
+ const given = [
42380
+ "--transaction",
42381
+ "--amount",
42382
+ "--received-at"
42383
+ ].filter((flag) => context.flags.has(flag));
42384
+ if (given.length === 0) return;
42385
+ throw new UsageError(`not-charged records that no money moved, so ${given.join(", ")} cannot be sent with it. Use "reconcile charged" to record a settlement.\n\n${BILLING_USAGE}`);
42386
+ }
42387
+ /** Record that an unresolved charge did not happen, with the note that says what was checked. */
42388
+ async function reconcileNotCharged(context, company, attemptUuid, note) {
42389
+ refuseSettlementFlags(context);
42390
+ return {
42391
+ kind: "collectionAttempt",
42392
+ outcome: await confirmableWrite(context, `Record that attempt ${attemptUuid} for ${company} did not charge, noting: ${note}. The invoice becomes collectable again and nothing is recorded as received.`, async () => platformBillingCollectionReconcileNotCharged({
42393
+ path: {
42394
+ company,
42395
+ attemptUuid
42396
+ },
42397
+ body: {
42398
+ decision: "not_charged",
42399
+ note
42400
+ }
42401
+ }).unwrap())
42402
+ };
42403
+ }
42404
+ /** Record that an unresolved charge did settle, using the provider's own transaction id. */
42405
+ async function reconcileCharged(context, company, attemptUuid, note) {
42406
+ const transaction = requiredFlag$2(context, "--transaction");
42407
+ const amountCents = randToCents$1(context, "--amount");
42408
+ const receivedAt = requiredFlag$2(context, "--received-at");
42409
+ return {
42410
+ kind: "collectionReceipt",
42411
+ outcome: await confirmableWrite(context, `Record that attempt ${attemptUuid} for ${company} settled ${(amountCents / 100).toFixed(2)} rand on ${receivedAt}, provider transaction ${transaction}, noting: ${note}. This records a settlement the provider already made; it sends no charge.`, async () => platformBillingCollectionReconcileCharged({
42412
+ path: {
42413
+ company,
42414
+ attemptUuid
42415
+ },
42416
+ body: {
42417
+ decision: "charged",
42418
+ note,
42419
+ providerTransactionReference: transaction,
42420
+ amountCents,
42421
+ receivedAt
42422
+ }
42423
+ }).unwrap())
42424
+ };
42425
+ }
42426
+ /** `collection reconcile <not-charged|charged>`: the two exits from a charge nobody can account for. */
42427
+ async function collectionReconcile(context, decision) {
42428
+ const company = await requireCompany(context.flags);
42429
+ const attemptUuid = requiredFlag$2(context, "--attempt");
42430
+ const note = requiredFlag$2(context, "--note");
42431
+ if (decision === "not-charged") return await reconcileNotCharged(context, company, attemptUuid, note);
42432
+ if (decision === "charged") return await reconcileCharged(context, company, attemptUuid, note);
42433
+ throw new UsageError(BILLING_USAGE);
42434
+ }
42435
+ /** Record money received outside Hosting, against one invoice, attributed to this operator. */
42436
+ async function collectionReceipt(context) {
42437
+ const company = await requireCompany(context.flags);
42438
+ const invoiceUuid = requiredFlag$2(context, "--invoice");
42439
+ const transaction = requiredFlag$2(context, "--transaction");
42440
+ const amountCents = randToCents$1(context, "--amount");
42441
+ const receivedAt = requiredFlag$2(context, "--received-at");
42442
+ const note = requiredFlag$2(context, "--note");
42443
+ return {
42444
+ kind: "collectionReceipt",
42445
+ outcome: await confirmableWrite(context, `Record ${(amountCents / 100).toFixed(2)} rand received outside Hosting against invoice ${invoiceUuid} for ${company} on ${receivedAt}, provider transaction ${transaction}, noting: ${note}. This states what a person verified: it sends no charge and manufactures no gateway evidence.`, async () => platformBillingCollectionRecordReceipt({
42446
+ path: {
42447
+ company,
42448
+ invoiceUuid
42449
+ },
42450
+ body: {
42451
+ providerTransactionReference: transaction,
42452
+ amountCents,
42453
+ receivedAt,
42454
+ note
42455
+ }
42456
+ }).unwrap())
42457
+ };
42458
+ }
42459
+ /** `collection <verb>`: the readiness read, one company's standing, and the four writes. */
42460
+ async function collectionCommand(context, rest) {
42461
+ if (rest[0] === "status") return await collectionStatus();
42462
+ if (rest[0] === "show") return await collectionShow(context);
42463
+ if (rest[0] === "setup") return await collectionSetup(context);
42464
+ if (rest[0] === "revoke") return await collectionRevoke(context);
42465
+ if (rest[0] === "reconcile") return await collectionReconcile(context, rest[1] ?? "");
42466
+ if (rest[0] === "receipt") return await collectionReceipt(context);
42467
+ throw new UsageError(BILLING_USAGE);
42468
+ }
42469
+ //#endregion
42470
+ //#region src/commands/billing-collection-text.ts
42471
+ /**
42472
+ * The text for the automatic-collection answers.
42473
+ *
42474
+ * Kept apart from the command's framing for the same reason the discount renderers are: one answer's
42475
+ * renderer is small, and a dozen of them beside the dispatcher stop being readable. `collectionText`
42476
+ * answers null for a report it does not own, so the caller stays a short chain.
42477
+ *
42478
+ * Nothing here prints a provider handle or a credential. The method is shown by its own UUID and
42479
+ * state, which is what the API exposes; the provider's stored reference never leaves the platform, and
42480
+ * the setup form is dropped before a report is built at all.
42481
+ */
42482
+ /** Whether collection may run, and the named items still missing when it may not. */
42483
+ function statusText$1(status) {
42484
+ return [
42485
+ `Automatic collection is ${status.enabled ? "ON" : "OFF"} — ${status.provider}, ${status.environment}`,
42486
+ status.ready ? " ready: every prerequisite is present, so a method can be charged" : ` NOT ready${status.missing.length === 0 ? "" : `: missing ${status.missing.join(", ")}`}`,
42487
+ ` consent terms version ${status.termsVersion}`
42488
+ ].join("\n");
42489
+ }
42490
+ /** One authorized method, or a line saying none is. */
42491
+ function methodText(method) {
42492
+ if (method === null) return " no payment method is recorded, so nothing can be collected";
42493
+ const lines = [` method ${method.uuid} is ${method.state}${method.isChargeable ? ", chargeable" : ", not chargeable"}`, ` ${method.provider}, ${method.environment}${method.consentTermsVersion === null ? "" : `, consent to terms ${method.consentTermsVersion}`}`];
42494
+ if (method.activatedAt !== null) lines.push(` activated ${method.activatedAt.slice(0, 10)}`);
42495
+ if (method.revokedAt !== null) lines.push(` revoked ${method.revokedAt.slice(0, 10)}${method.revokeReason === null ? "" : `: ${method.revokeReason}`}`);
42496
+ if (method.replacedByUuid !== null) lines.push(` replaced by ${method.replacedByUuid}`);
42497
+ if (method.failureReason !== null) lines.push(` failed: ${method.failureReason}`);
42498
+ return lines.join("\n");
42499
+ }
42500
+ /** What one receipt is doing: allocated against its invoice, or held for resolution. */
42501
+ function receiptLine(receipt) {
42502
+ return `${formatMoney(receipt.amountCents, receipt.currency)} ${receipt.source} ${receipt.state} on ${receipt.receivedAt.slice(0, 10)}`;
42503
+ }
42504
+ /** One invoice's derived position, with the reason a send is refused when it is. */
42505
+ function positionText(one) {
42506
+ const lines = [` ${one.number.padEnd(12)} ${one.position.padEnd(13)} ${formatMoney(one.payableCents, one.currency).padStart(16)} payable${one.nextCollectionOn === null ? "" : ` next ${one.nextCollectionOn.slice(0, 10)}`}`];
42507
+ if (one.blockedReason !== null) lines.push(` blocked: ${one.blockedReason}`);
42508
+ if (one.liveAttempt !== null) lines.push(` attempt ${one.liveAttempt.uuid} is ${one.liveAttempt.state}`);
42509
+ for (const receipt of one.receipts) lines.push(` receipt ${receiptLine(receipt)}`);
42510
+ return lines.join("\n");
42511
+ }
42512
+ /** One client's whole standing: readiness, the method, and where every invoice stands. */
42513
+ function summaryText(summary) {
42514
+ const lines = [
42515
+ `${summary.companySlug} — ${summary.currency}`,
42516
+ ` collection is ${summary.status.enabled ? "ON" : "OFF"}${summary.status.ready ? ", ready" : `, NOT ready${summary.status.missing.length === 0 ? "" : `: missing ${summary.status.missing.join(", ")}`}`}`,
42517
+ methodText(summary.method)
42518
+ ];
42519
+ if (summary.invoices.length === 0) lines.push(" no invoice is recorded for this company");
42520
+ else {
42521
+ lines.push(" invoices:");
42522
+ for (const one of summary.invoices) lines.push(positionText(one));
42523
+ }
42524
+ return lines.join("\n");
42525
+ }
42526
+ /**
42527
+ * A started authorization, which is never an active one.
42528
+ *
42529
+ * The provider's signed form is not printed: its fields carry the merchant's own credentials and belong
42530
+ * only in a browser, so a person reading this is told plainly that nothing is authorized yet.
42531
+ */
42532
+ function setupText(outcome) {
42533
+ return renderWriteOutcome(outcome, (method) => [
42534
+ `Method ${method.uuid} is ${method.state}. Nothing is authorized and no invoice can be charged until the provider confirms the authorization in the browser.`,
42535
+ "The provider's form is deliberately not printed here; it carries the merchant's own credentials.",
42536
+ "Read it back with `billing collection show --company <slug>` once the provider has answered."
42537
+ ].join("\n"));
42538
+ }
42539
+ function revokedText(outcome) {
42540
+ return renderWriteOutcome(outcome, (method) => [`Method ${method.uuid} is ${method.state}${method.revokedAt === null ? "" : ` as of ${method.revokedAt.slice(0, 10)}`}.`, "Future automatic charges stop here; a charge the provider already accepted may still settle."].join("\n"));
42541
+ }
42542
+ function attemptText(outcome) {
42543
+ return renderWriteOutcome(outcome, (attempt) => [`Attempt ${attempt.uuid} is ${attempt.state}.`, "The invoice is collectable again and nothing was recorded as received."].join("\n"));
42544
+ }
42545
+ /** A recorded settlement, saying whether it allocated or is held. */
42546
+ function receiptText(outcome) {
42547
+ return renderWriteOutcome(outcome, (receipt) => [`Receipt ${receipt.uuid}: ${receiptLine(receipt)}.`, receipt.state === "allocated" ? "The invoice owes nothing more against it." : "It is held unallocated for resolution rather than discarded, because the invoice did not owe it."].join("\n"));
42548
+ }
42549
+ /** The text for an automatic-collection answer, or null when this module does not own the report. */
42550
+ function collectionText(report) {
42551
+ if (report.kind === "collectionStatus") return statusText$1(report.status);
42552
+ if (report.kind === "collectionSummary") return summaryText(report.summary);
42553
+ if (report.kind === "collectionSetup") return setupText(report.outcome);
42554
+ if (report.kind === "collectionRevoked") return revokedText(report.outcome);
42555
+ if (report.kind === "collectionAttempt") return attemptText(report.outcome);
42556
+ if (report.kind === "collectionReceipt") return receiptText(report.outcome);
42557
+ return null;
42558
+ }
42559
+ //#endregion
42136
42560
  //#region src/commands/billing-discounts.ts
42137
42561
  /**
42138
42562
  * Discount codes: the promises the platform has made, and the three things a person may do with one.
@@ -42648,6 +43072,41 @@ var BILLING_METADATA = {
42648
43072
  takesValue: true,
42649
43073
  description: "A discount code's spelling: yours to name, or the one a client types."
42650
43074
  },
43075
+ {
43076
+ name: "--replaces-method",
43077
+ takesValue: true,
43078
+ description: "The payment method a new authorization replaces. The current method stays chargeable until the new one is confirmed."
43079
+ },
43080
+ {
43081
+ name: "--method",
43082
+ takesValue: true,
43083
+ description: "The payment method's UUID."
43084
+ },
43085
+ {
43086
+ name: "--attempt",
43087
+ takesValue: true,
43088
+ description: "The collection attempt's UUID, for a reconciliation."
43089
+ },
43090
+ {
43091
+ name: "--invoice",
43092
+ takesValue: true,
43093
+ description: "The invoice's UUID a receipt is recorded against."
43094
+ },
43095
+ {
43096
+ name: "--note",
43097
+ takesValue: true,
43098
+ description: "What was checked and where. Required by reconcile and receipt, because it is the evidence for a decision about money."
43099
+ },
43100
+ {
43101
+ name: "--transaction",
43102
+ takesValue: true,
43103
+ description: "The provider's own transaction id for the settlement; it is what makes recording the same one twice the same fact."
43104
+ },
43105
+ {
43106
+ name: "--received-at",
43107
+ takesValue: true,
43108
+ description: "When the money was received, as an ISO-8601 date and time."
43109
+ },
42651
43110
  {
42652
43111
  name: "--confirm",
42653
43112
  takesValue: false,
@@ -42702,7 +43161,17 @@ var BILLING_METADATA = {
42702
43161
  "discount",
42703
43162
  "discount issue",
42704
43163
  "discount end",
42705
- "discount redeem"
43164
+ "discount redeem",
43165
+ "collection",
43166
+ "collection status",
43167
+ "collection show",
43168
+ "client collection",
43169
+ "collection setup",
43170
+ "collection revoke",
43171
+ "collection reconcile",
43172
+ "collection reconcile not-charged",
43173
+ "collection reconcile charged",
43174
+ "collection receipt"
42706
43175
  ]
42707
43176
  };
42708
43177
  var BILLING_TOPICS = [
@@ -42725,6 +43194,10 @@ var BILLING_TOPICS = [
42725
43194
  {
42726
43195
  path: ["discount"],
42727
43196
  usage: "hostingctl billing discount <issue|end|redeem> [flags]\n\nA code grants a price, never a discount line: redeeming writes the company's own price window, so no issued document changes. Ending a code stops new redemptions and leaves the windows it granted running."
43197
+ },
43198
+ {
43199
+ path: ["collection"],
43200
+ usage: "hostingctl billing collection <status|show|setup|revoke|reconcile|receipt> [flags]\n\nAutomatic invoice collection. A method is only chargeable once the provider confirms it in a browser, and the two commands that record money (reconcile, receipt) both require --note: a settlement nobody had to explain cannot be recorded here. The provider's signed form and any provider handle are never printed."
42728
43201
  }
42729
43202
  ];
42730
43203
  //#endregion
@@ -42810,6 +43283,7 @@ async function clientDocuments(context, rest) {
42810
43283
  if (rest[0] === "credit-notes") return myCreditNotes(context);
42811
43284
  if (rest[0] === "credit-note") return myCreditNote(context);
42812
43285
  if (rest[0] === "credit-note-download") return downloadCreditNote(context);
43286
+ if (rest[0] === "collection") return myCompanyCollection(context);
42813
43287
  throw new UsageError(BILLING_USAGE);
42814
43288
  }
42815
43289
  /** `export <verb>`: the accountant's pack, from a terminal. */
@@ -42847,7 +43321,8 @@ var HANDLERS = {
42847
43321
  "payment-summary": paymentSummary,
42848
43322
  "payment-state": companyPaymentState,
42849
43323
  discounts: () => discountIndex(),
42850
- discount: discountCommand
43324
+ discount: discountCommand,
43325
+ collection: collectionCommand
42851
43326
  };
42852
43327
  var billing = {
42853
43328
  ...BILLING_METADATA,
@@ -42858,7 +43333,7 @@ var billing = {
42858
43333
  return handler(context, rest);
42859
43334
  },
42860
43335
  human(report) {
42861
- return discountText(report) ?? billingText(report);
43336
+ return discountText(report) ?? collectionText(report) ?? billingText(report);
42862
43337
  }
42863
43338
  };
42864
43339
  //#endregion
@@ -55422,6 +55897,109 @@ var billingAmountsDataSchema = object({
55422
55897
  vatCents: int(),
55423
55898
  grossCents: int()
55424
55899
  });
55900
+ var billingCollectionAttemptStateEnumSchema = _enum([
55901
+ "reserved",
55902
+ "submitted",
55903
+ "settled",
55904
+ "refused",
55905
+ "unknown",
55906
+ "abandoned"
55907
+ ]).describe("One instruction to charge one invoice, and what we actually know about it. `unknown` is the state that keeps this honest: the provider was called and no authoritative answer came back, so the money may or may not have moved. It fences the invoice — nothing is resent while a charge is unresolved — until an authoritative observation or an attributed operator record settles it.\n");
55908
+ var billingCollectionAttemptDataSchema = object({
55909
+ uuid: string(),
55910
+ state: billingCollectionAttemptStateEnumSchema.describe("One instruction to charge one invoice, and what we actually know about it. `unknown` is the state that keeps this honest: the provider was called and no authoritative answer came back, so the money may or may not have moved. It fences the invoice — nothing is resent while a charge is unresolved — until an authoritative observation or an attributed operator record settles it.\n"),
55911
+ amountCents: int(),
55912
+ currency: string(),
55913
+ reservedAt: string(),
55914
+ submittedAt: string().nullable(),
55915
+ settledAt: string().nullable(),
55916
+ refusedAt: string().nullable(),
55917
+ failureCode: string().nullable()
55918
+ });
55919
+ var billingCollectionPositionEnumSchema = _enum([
55920
+ "not_enrolled",
55921
+ "scheduled",
55922
+ "sending",
55923
+ "collected",
55924
+ "refused",
55925
+ "unknown",
55926
+ "settled",
55927
+ "not_collected",
55928
+ "not_issued"
55929
+ ]).describe("The single derived answer to \"where does collecting this invoice stand?\". Every surface reads this one vocabulary — the customer's page, the operator's page, the CLI and the scheduler — so a screen can never claim a different position from the one the sender acts on.\n| |\n|---|\n| `not_enrolled` <br/> No authorized method covers this invoice, or it predates the consent boundary. |\n| `scheduled` <br/> Payable, an active method exists, and the due date has not arrived. |\n| `sending` <br/> The provider has been asked and has not answered yet. |\n| `collected` <br/> A verified receipt covers everything still payable. |\n| `refused` <br/> The provider declined; the invoice stays payable and recoverable. |\n| `unknown` <br/> An answer never arrived, so nothing more is sent until it is resolved. |\n| `settled` <br/> Nothing is left to collect because credits and receipts cover the document. |\n| `not_collected` <br/> A person recorded the money, so nothing is collected automatically. |\n| `not_issued` <br/> The document is not an issued supply. |");
55930
+ var billingCollectionReceiptSourceEnumSchema = _enum([
55931
+ "automatic",
55932
+ "recorded",
55933
+ "reconciled"
55934
+ ]).describe("How a verified receipt came to exist. `automatic` is a receipt the provider reported for a Hosting instruction. `recorded` is money an operator attributed from outside Hosting, such as a bank line. `reconciled` is a receipt that settles a previously unresolved attempt using an authoritative provider observation. None of these can fabricate gateway evidence: every case names who or what established the receipt.\n");
55935
+ var billingCollectionReceiptStateEnumSchema = _enum([
55936
+ "allocated",
55937
+ "unallocated",
55938
+ "reversed"
55939
+ ]).describe("What a verified receipt is doing on its invoice. `unallocated` is a real answer, not a failure: a second genuine payment for an invoice that was already settled is kept for resolution rather than discarded, and money recorded from outside a Hosting attempt waits until an operator attributes it.\n| |\n|---|\n| `allocated` <br/> |\n| `unallocated` <br/> |\n| `reversed` <br/> The money came back: a refund or a dispute an operator established and attributed. |");
55940
+ var billingCollectionReceiptDataSchema = object({
55941
+ uuid: string(),
55942
+ amountCents: int(),
55943
+ currency: string(),
55944
+ source: billingCollectionReceiptSourceEnumSchema.describe("How a verified receipt came to exist. `automatic` is a receipt the provider reported for a Hosting instruction. `recorded` is money an operator attributed from outside Hosting, such as a bank line. `reconciled` is a receipt that settles a previously unresolved attempt using an authoritative provider observation. None of these can fabricate gateway evidence: every case names who or what established the receipt.\n"),
55945
+ state: billingCollectionReceiptStateEnumSchema.describe("What a verified receipt is doing on its invoice. `unallocated` is a real answer, not a failure: a second genuine payment for an invoice that was already settled is kept for resolution rather than discarded, and money recorded from outside a Hosting attempt waits until an operator attributes it.\n| |\n|---|\n| `allocated` <br/> |\n| `unallocated` <br/> |\n| `reversed` <br/> The money came back: a refund or a dispute an operator established and attributed. |"),
55946
+ receivedAt: string(),
55947
+ allocatedAt: string().nullable(),
55948
+ reversedAt: string().nullable(),
55949
+ reversalReason: string().nullable()
55950
+ });
55951
+ var billingCollectionStatusDataSchema = object({
55952
+ enabled: boolean(),
55953
+ provider: string(),
55954
+ environment: string(),
55955
+ ready: boolean(),
55956
+ termsVersion: string(),
55957
+ missing: array(string())
55958
+ });
55959
+ var billingPaymentMethodStateEnumSchema = _enum([
55960
+ "pending",
55961
+ "active",
55962
+ "revoked",
55963
+ "failed"
55964
+ ]).describe("Where an authorized payment method is in its life. `pending` is a real state and not an implementation detail leaked into the schema: a customer has been sent to the provider and nothing is authorized until a verified confirmation arrives. `active` is the only state that may be charged, and `revoked` is final for new sends even if the provider has not yet confirmed the cancellation.\n");
55965
+ var billingPaymentMethodDataSchema = object({
55966
+ uuid: string(),
55967
+ state: billingPaymentMethodStateEnumSchema.describe("Where an authorized payment method is in its life. `pending` is a real state and not an implementation detail leaked into the schema: a customer has been sent to the provider and nothing is authorized until a verified confirmation arrives. `active` is the only state that may be charged, and `revoked` is final for new sends even if the provider has not yet confirmed the cancellation.\n"),
55968
+ provider: string(),
55969
+ environment: string(),
55970
+ isChargeable: boolean(),
55971
+ consentTermsVersion: string().nullable(),
55972
+ consentAt: string().nullable(),
55973
+ consentEffectiveFrom: string().nullable(),
55974
+ activatedAt: string().nullable(),
55975
+ revokedAt: string().nullable(),
55976
+ revokeReason: string().nullable(),
55977
+ replacedByUuid: string().nullable(),
55978
+ failureReason: string().nullable()
55979
+ });
55980
+ var billingInvoiceCollectionPositionDataSchema = object({
55981
+ invoiceUuid: string(),
55982
+ number: string(),
55983
+ currency: string(),
55984
+ grossCents: int(),
55985
+ creditedCents: int(),
55986
+ allocatedCents: int(),
55987
+ payableCents: int(),
55988
+ position: billingCollectionPositionEnumSchema.describe("The single derived answer to \"where does collecting this invoice stand?\". Every surface reads this one vocabulary — the customer's page, the operator's page, the CLI and the scheduler — so a screen can never claim a different position from the one the sender acts on.\n| |\n|---|\n| `not_enrolled` <br/> No authorized method covers this invoice, or it predates the consent boundary. |\n| `scheduled` <br/> Payable, an active method exists, and the due date has not arrived. |\n| `sending` <br/> The provider has been asked and has not answered yet. |\n| `collected` <br/> A verified receipt covers everything still payable. |\n| `refused` <br/> The provider declined; the invoice stays payable and recoverable. |\n| `unknown` <br/> An answer never arrived, so nothing more is sent until it is resolved. |\n| `settled` <br/> Nothing is left to collect because credits and receipts cover the document. |\n| `not_collected` <br/> A person recorded the money, so nothing is collected automatically. |\n| `not_issued` <br/> The document is not an issued supply. |"),
55989
+ methodUuid: string().nullable(),
55990
+ nextCollectionOn: string().nullable(),
55991
+ blockedReason: string().nullable().describe("Why a send is refused right now, when it is. Never a provider payload."),
55992
+ liveAttempt: union([billingCollectionAttemptDataSchema, _null()]),
55993
+ receipts: array(billingCollectionReceiptDataSchema),
55994
+ attempts: array(billingCollectionAttemptDataSchema)
55995
+ });
55996
+ object({
55997
+ companySlug: string(),
55998
+ currency: string(),
55999
+ status: billingCollectionStatusDataSchema,
56000
+ method: union([billingPaymentMethodDataSchema, _null()]),
56001
+ invoices: array(billingInvoiceCollectionPositionDataSchema)
56002
+ });
55425
56003
  var billingDocumentStateEnumSchema = _enum([
55426
56004
  "preparing",
55427
56005
  "issued",
@@ -55662,7 +56240,12 @@ object({ items: array(object({
55662
56240
  customerMappings: array(billingExportProfileCustomerMappingDataSchema)
55663
56241
  })) });
55664
56242
  var billingPaymentStateEnumSchema = _enum(["paid", "unpaid"]).describe("Whether a person has recorded money as received. Phase 1 takes no money and acts on nothing: this is a statement a human made, with the source that distinguishes an assumption from an observation.\n");
55665
- var billingPaymentStateSourceEnumSchema = _enum(["assumed", "manual"]).describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know.\n");
56243
+ var billingPaymentStateSourceEnumSchema = _enum([
56244
+ "assumed",
56245
+ "manual",
56246
+ "collecting",
56247
+ "collected"
56248
+ ]).describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know. `collecting` is an invoice an authorized method is expected to pay, so it is unpaid and pending a verified receipt — never a person's statement. `collected` is a verified receipt that allocated to the invoice, and no person can claim it.\n");
55666
56249
  var billingInvoiceDataSchema = object({
55667
56250
  uuid: string(),
55668
56251
  number: string(),
@@ -55693,7 +56276,7 @@ var billingInvoiceDataSchema = object({
55693
56276
  pdfVerifiedAt: string().nullable(),
55694
56277
  deliveryState: billingDeliveryStateEnumSchema.describe("What we know about sending the document. The mail transport can prove submission, not mailbox delivery, so `sent` means \"the transport * accepted it for the billing contact\". A failed or missing contact never un-issues the document.\n"),
55695
56278
  paymentState: billingPaymentStateEnumSchema.describe("Whether a person has recorded money as received. Phase 1 takes no money and acts on nothing: this is a statement a human made, with the source that distinguishes an assumption from an observation.\n"),
55696
- paymentStateSource: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know.\n")
56279
+ paymentStateSource: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know. `collecting` is an invoice an authorized method is expected to pay, so it is unpaid and pending a verified receipt — never a person's statement. `collected` is a verified receipt that allocated to the invoice, and no person can claim it.\n")
55697
56280
  });
55698
56281
  object({
55699
56282
  items: array(object({
@@ -55713,7 +56296,7 @@ object({
55713
56296
  voidReason: string().nullable(),
55714
56297
  deliveryState: billingDeliveryStateEnumSchema.describe("What we know about sending the document. The mail transport can prove submission, not mailbox delivery, so `sent` means \"the transport * accepted it for the billing contact\". A failed or missing contact never un-issues the document.\n"),
55715
56298
  paymentState: billingPaymentStateEnumSchema.describe("Whether a person has recorded money as received. Phase 1 takes no money and acts on nothing: this is a statement a human made, with the source that distinguishes an assumption from an observation.\n"),
55716
- paymentStateSource: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know.\n")
56299
+ paymentStateSource: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know. `collecting` is an invoice an authorized method is expected to pay, so it is unpaid and pending a verified receipt — never a person's statement. `collected` is a verified receipt that allocated to the invoice, and no person can claim it.\n")
55717
56300
  })),
55718
56301
  meta: pageMetaDataSchema
55719
56302
  });
@@ -55741,6 +56324,12 @@ object({
55741
56324
  firstIssuedMonth: string().nullable(),
55742
56325
  issuanceActivated: boolean()
55743
56326
  });
56327
+ object({
56328
+ attemptUuid: string(),
56329
+ amountCents: int(),
56330
+ currency: string(),
56331
+ action: object({})
56332
+ });
55744
56333
  var hostingPurchasePeriodDataSchema = object({
55745
56334
  uuid: string(),
55746
56335
  companySlug: string(),
@@ -55771,11 +56360,15 @@ object({
55771
56360
  approvedAt: string()
55772
56361
  }), _null()])
55773
56362
  });
56363
+ object({
56364
+ method: billingPaymentMethodDataSchema,
56365
+ action: object({})
56366
+ });
55774
56367
  var billingPaymentStateDataSchema = object({
55775
56368
  invoiceUuid: string(),
55776
56369
  invoiceNumber: string(),
55777
56370
  paymentState: billingPaymentStateEnumSchema.describe("Whether a person has recorded money as received. Phase 1 takes no money and acts on nothing: this is a statement a human made, with the source that distinguishes an assumption from an observation.\n"),
55778
- source: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know.\n"),
56371
+ source: billingPaymentStateSourceEnumSchema.describe("Why the payment state says what it says. `assumed` is the default a new invoice carries so invoicing never waits on a payment workflow. It is deliberately not evidence of receipt: no receipt, bank line or settlement timestamp is fabricated from it. `manual` is a person recording what they know. `collecting` is an invoice an authorized method is expected to pay, so it is unpaid and pending a verified receipt — never a person's statement. `collected` is a verified receipt that allocated to the invoice, and no person can claim it.\n"),
55779
56372
  changedAt: string().nullable(),
55780
56373
  changedByUserId: int().nullable(),
55781
56374
  note: string().nullable()
@@ -58946,12 +59539,20 @@ var hostingVolumeInputDataSchema = object({
58946
59539
  name: string(),
58947
59540
  sizeMib: int()
58948
59541
  });
59542
+ var hostingEnvironmentPackageQuoteDataSchema = object({
59543
+ packageKey: string(),
59544
+ monthlyPeriod: string().describe("The local billing month these figures are stated for, as `YYYY-MM`."),
59545
+ currency: string(),
59546
+ monthly: billingAmountsDataSchema.describe("The whole package for one month, net, VAT and gross.")
59547
+ });
58949
59548
  object({
58950
59549
  key: string(),
58951
59550
  budget: hostingBudgetDataSchema,
58952
59551
  workloads: array(hostingEnvironmentPackageWorkloadDataSchema),
58953
59552
  volumes: array(hostingVolumeInputDataSchema),
58954
- databases: array(hostingDatabaseInputDataSchema)
59553
+ databases: array(hostingDatabaseInputDataSchema),
59554
+ monthlyQuote: union([hostingEnvironmentPackageQuoteDataSchema, _null()]),
59555
+ monthlyQuoteUnavailable: string().nullable().describe("Why `monthlyQuote` is absent, stated by name so a missing price is never read as a free one.")
58955
59556
  });
58956
59557
  object({
58957
59558
  items: array(object({
@@ -59597,7 +60198,7 @@ var hostingStorageObservationDataSchema = object({
59597
60198
  observedAt: string().nullable(),
59598
60199
  stale: boolean()
59599
60200
  });
59600
- object({ items: array(object({
60201
+ var hostingStorageBucketDataSchema = object({
59601
60202
  uuid: string(),
59602
60203
  name: string(),
59603
60204
  bucket: string(),
@@ -59612,7 +60213,8 @@ object({ items: array(object({
59612
60213
  bindings: array(hostingStorageBindingDataSchema),
59613
60214
  createdAt: string(),
59614
60215
  retiredAt: string().nullable()
59615
- })) });
60216
+ });
60217
+ object({ items: array(hostingStorageBucketDataSchema) });
59616
60218
  object({ items: array(object({
59617
60219
  uuid: string(),
59618
60220
  accessKeyHint: string(),
@@ -59646,7 +60248,7 @@ object({
59646
60248
  nextToken: string().nullable(),
59647
60249
  truncated: boolean()
59648
60250
  });
59649
- object({
60251
+ var hostingStorageQuoteDataSchema = object({
59650
60252
  bucketUuid: string().nullable(),
59651
60253
  bucketName: string().nullable(),
59652
60254
  productKey: string(),
@@ -59655,16 +60257,19 @@ object({
59655
60257
  currentBlocks: int(),
59656
60258
  targetBlocks: int(),
59657
60259
  addedBlocks: int(),
59658
- storageUnit: billingAmountsDataSchema.describe("One block, for one month."),
59659
- addedMonthly: billingAmountsDataSchema.describe("The increase, for one full month."),
59660
- targetMonthly: billingAmountsDataSchema.describe("Everything the bucket will hold once this lands, for one full month."),
59661
- proratedCharge: billingAmountsDataSchema.describe("The increase for the remainder of the current billing month."),
60260
+ storageUnit: billingAmountsDataSchema.describe("One block, for one month, at the current month's tax point."),
60261
+ addedMonthly: billingAmountsDataSchema.describe("The increase, for the next full billing month."),
60262
+ targetMonthly: billingAmountsDataSchema.describe("Everything the bucket will hold once this lands, for the next full billing month."),
60263
+ proratedCharge: billingAmountsDataSchema.describe("An indicative increase charge for the rest of the current month, from the instant this was priced."),
60264
+ monthlyPeriod: string().describe("The local billing month the monthly figures are stated for, as `YYYY-MM`."),
59662
60265
  proratedHeldSeconds: int(),
59663
60266
  proratedMonthSeconds: int(),
59664
60267
  transferUnit: billingAmountsDataSchema.describe("One block of chargeable download above the included allowance."),
59665
60268
  includedDownloadBytes: int().describe("Included external downloads for one full month, in bytes."),
59666
- vatBasisPoints: int(),
59667
- generatedAt: string()
60269
+ vatBasisPoints: int().describe("The VAT rate at the current month's tax point, which the prorated figure uses."),
60270
+ monthlyVatBasisPoints: int().describe("The VAT rate at the next month's tax point, which the monthly figures use."),
60271
+ generatedAt: string(),
60272
+ reviewToken: string().describe("The confirmation token a purchase or increase must send back. Every answer a client can act on is signed;\nonly the internal pre-sign construction behind it carries an empty string.")
59668
60273
  });
59669
60274
  object({
59670
60275
  rows: array(object({
@@ -60059,11 +60664,24 @@ object({
60059
60664
  reviewGeneration: int().min(1),
60060
60665
  deletionAcknowledged: boolean().describe("`boolean` rather than `accepted`, for the reason recorded on the delete-now request: the\naccepted rule's value set is inferred into the generated client as an enum OpenAPI cannot\nexpress. \"Must be true\" is enforced by PurgeHostingCancellationData, which cannot produce\nthe recorded sentence otherwise.")
60061
60666
  });
60667
+ var reconcileBillingCollectionAttemptRequestSchema = object({
60668
+ decision: _enum(["not_charged", "charged"]),
60669
+ note: string().max(250),
60670
+ providerTransactionReference: string().max(64).nullish(),
60671
+ amountCents: int().min(1).nullish(),
60672
+ receivedAt: datetime().nullish()
60673
+ }).describe("Resolve a charge nobody can account for.\n\nThe note is required because it is the evidence for a decision about money: what the operator\nchecked and where. `charged` additionally needs the provider's own transaction id and the amount\nthat actually settled, which is what makes the resulting receipt idempotent.");
60062
60674
  var reconfirmHostingDeletionRequestSchema = object({
60063
60675
  reviewGeneration: int().min(1),
60064
60676
  inventoryDigest: string().regex(/^[0-9a-f]{64}$/).describe("The digest from the review the caller read. Comparing it is what makes the confirmation name a\nscope that was on screen rather than whatever the environment happens to contain now."),
60065
60677
  deletionAcknowledged: boolean().describe("`boolean` rather than `accepted`, for the reason recorded on CreateHostingCancellationRequest:\nthe accepted rule's value set is inferred into the generated client as an enum OpenAPI\ncannot express. \"Must be true\" is enforced by ReconfirmHostingDeletionData, which cannot\nproduce the recorded sentence otherwise.")
60066
60678
  }).describe("Confirming that the scope a deletion would remove now is the one to remove.\n\nThe approved scope is refused by the teardown once the environment has changed, and the refusal is\nrecorded rather than repaired, because repairing it silently would delete something nobody agreed to.\nThis is the client's answer: the same shape as the delete-now confirmation so a client that can send\none can send the other, with its own sentence, because agreeing to a scope that grew is not the same\nstatement as agreeing to delete now.");
60679
+ var recordBillingCollectionReceiptRequestSchema = object({
60680
+ providerTransactionReference: string().max(64),
60681
+ amountCents: int().min(1),
60682
+ receivedAt: datetime(),
60683
+ note: string().max(250).nullish()
60684
+ }).describe("Record money received outside Hosting against one invoice, attributed to the operator who did it.\n\nThe provider's transaction id is required: it is the idempotency key, so a repeated submission is\nthe same settlement rather than a second one.");
60067
60685
  var recordHostingCustdAudienceRequestSchema = object({ audience: string().regex(/^[a-z0-9][a-z0-9._-]{2,199}$/) }).describe("The shape of one application workload's CustD realm audience name.\n\nAn audience name is the only input. Provider client id and redirect URIs belong to the realm\nintent's registration settings, never to the recorded audience binding, so this request cannot\nleak them into the binding. The alphabet is the same one the binding service records with.");
60068
60686
  var redeemBillingDiscountCodeRequestSchema = object({ code: string().max(64) }).describe("Redeeming a code.\n\nThe code is the only field: the account is the one the route resolved, never a value in the body, so a caller\ncannot redeem a code against somebody else's account.");
60069
60687
  var redeemMailboxRecoveryRequestSchema = object({
@@ -60071,6 +60689,10 @@ var redeemMailboxRecoveryRequestSchema = object({
60071
60689
  password: string(),
60072
60690
  password_confirmation: string()
60073
60691
  }).describe("Completing one mailbox password reset with the capability token from the link.\n\nThe token is taken in the POST body, never in a URL a scanner could follow, and it authorizes only\nthis one mailbox password change. The new password uses the same policy owner as every other\npassword (`Password::defaults()`) and must be confirmed.");
60692
+ var refundBillingCollectionReceiptRequestSchema = object({
60693
+ reason: string().max(250),
60694
+ reversedAt: datetime()
60695
+ }).describe("Record that verified money came back.\n\nThe reason is required because it is the evidence for a reversal: a refund is a cash movement, and the\nrecord has to say who established it and why. A credit note is a supply reversal and is not this.");
60074
60696
  object({
60075
60697
  name: string().max(255),
60076
60698
  email: email().max(255).describe("Live rows only. A closed account keeps its address as retained\nhistory, so the address is registrable again as a new person — which\nis the only reason this is not the whole-table rule it used to be."),
@@ -60316,6 +60938,7 @@ object({
60316
60938
  });
60317
60939
  var restoreHostingConfigurationRequestSchema = object({ desiredGeneration: int().min(0) }).describe("Restore the last known good configuration revision.\n\n`desiredGeneration` is the client's view of the environment, exactly as the other configuration\nwrites carry it: the restore must be refused rather than applied when somebody else changed the\nenvironment in between.");
60318
60940
  var restoreHostingTuningRequestSchema = object({ desiredGeneration: int().min(0) }).describe("Restore the last known good runtime tuning.\n\nOnly the generation is submitted: the values come from the recorded snapshot, never from the\nrequest, so a rollback cannot be used to write arbitrary tuning through a second path. The\ngeneration is the client's view of the environment, so a change made in between is refused rather\nthan overwritten.");
60941
+ var revokeBillingPaymentMethodRequestSchema = object({ reason: string().max(250).nullish() }).describe("Withdraw authorization. The reason is optional; stopping future charges is not conditional on it.");
60319
60942
  var rotateHostingExternalSecretConnectionRequestSchema = object({
60320
60943
  clientId: string().max(255),
60321
60944
  clientSecret: string().max(1024)
@@ -60489,6 +61112,7 @@ var storeBillingExportRequestSchema = object({
60489
61112
  from: date(),
60490
61113
  to: date()
60491
61114
  }).describe("One accountant's pack over a date range, or the preview of the same range.\n\nThe range is a pair of local calendar dates, matched against the document's own issue date (an\ninvoice's `invoice_date`, a credit note's `credit_date`), which is why they are `Y-m-d` rather than\ninstants: the accountant thinks in issue months, and a service period is never the selector. The\nrange is bounded so one request cannot try to build a pack over years of history.");
61115
+ var storeBillingPaymentMethodRequestSchema = object({ replacesMethodUuid: uuid().nullish() }).describe("Start authorizing a payment method, optionally replacing one that already exists.\n\nThere is no amount, no card field and no customer-supplied provider detail here: the customer is\nsent to the provider to enter the card, and only a verified provider confirmation can activate it.");
60492
61116
  var storeBillingRateRequestSchema = object({
60493
61117
  company: string().max(64).nullish(),
60494
61118
  product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. They are our product codes, not package keys: a package says what an environment holds, a product says what it is billed as.\n"),
@@ -60621,9 +61245,51 @@ var storeHostingStorageBindingRequestSchema = object({
60621
61245
  mode: hostingStorageBindingModeEnumSchema.describe("How one environment reaches a company's purchased object storage. The two modes are access paths to the *same* bucket, not separate products: a client can use a normal S3 client, mount the bucket at a directory in an application, or do both, and switching between them moves no data and costs nothing extra. `native` records that the client uses the branded S3 endpoint itself, so the platform composes no mount for it.\n")
60622
61246
  }).describe("Binding a purchased bucket to one environment, natively or as a managed directory.\n\nThe path is the dangerous part, so its rule is owned by `StorageMountPath` rather than written as\nbranching inside this declaration; a path that is not absolute, contains a traversal segment, is the\nfilesystem root or lands on a reserved system/managed location is refused before any write. Only the\nmount path is a directory inside the application tree, so it is validated here rather than by a\nbranching rule inside the controller.");
60623
61247
  var storeHostingStorageBucketRequestSchema = object({
60624
- name: string().min(1).max(64).regex(/^[\pL\pN][\pL\pN ._-]*$/).describe("The client's own label, so they can tell two purchases apart. Anything printable and short."),
60625
- capacityGb: int().min(10).max(1e5)
60626
- }).describe("One storage purchase.\n\nStorage is sold in whole 10 GB blocks, so the request states decimal gigabytes and the platform converts\nonce, into the bytes the row stores. A quantity that is not a whole block is refused here rather than\nrounded into an entitlement the quote did not show.");
61248
+ name: string().min(1).max(64).regex(/^[\pL\pN][\pL\pN ._-]*$/),
61249
+ quote: object({
61250
+ bucketUuid: string().nullish(),
61251
+ bucketName: string().nullish(),
61252
+ productKey: string(),
61253
+ currency: string(),
61254
+ blockBytes: number(),
61255
+ currentBlocks: number(),
61256
+ targetBlocks: number(),
61257
+ addedBlocks: number(),
61258
+ storageUnit: object({
61259
+ netCents: number(),
61260
+ vatCents: number(),
61261
+ grossCents: number()
61262
+ }),
61263
+ addedMonthly: object({
61264
+ netCents: number(),
61265
+ vatCents: number(),
61266
+ grossCents: number()
61267
+ }),
61268
+ targetMonthly: object({
61269
+ netCents: number(),
61270
+ vatCents: number(),
61271
+ grossCents: number()
61272
+ }),
61273
+ proratedCharge: object({
61274
+ netCents: number(),
61275
+ vatCents: number(),
61276
+ grossCents: number()
61277
+ }),
61278
+ monthlyPeriod: string(),
61279
+ proratedHeldSeconds: number(),
61280
+ proratedMonthSeconds: number(),
61281
+ transferUnit: object({
61282
+ netCents: number(),
61283
+ vatCents: number(),
61284
+ grossCents: number()
61285
+ }),
61286
+ includedDownloadBytes: number(),
61287
+ vatBasisPoints: number(),
61288
+ monthlyVatBasisPoints: number(),
61289
+ generatedAt: string(),
61290
+ reviewToken: string()
61291
+ })
61292
+ }).describe("One storage purchase.\n\nThe capacity is not a field of its own: it is the quote's own target, and the quote is what the client confirms. The\nname is the client's label for the bucket they are buying, so it is asked for at the confirmation rather than bound\ninto the quote.");
60627
61293
  var storeHostingStorageObjectGrantRequestSchema = object({
60628
61294
  key: string().max(1024).regex(/^[^\x00-\x1F\x7F]+$/),
60629
61295
  direction: _enum(["download", "upload"])
@@ -60871,7 +61537,49 @@ var updateHostingSshSourceRequestSchema = object({
60871
61537
  ref: string().max(255).nullish(),
60872
61538
  refKind: union([hostingSourceRefKindEnumSchema, _null()]).optional()
60873
61539
  }).describe("An edit to a Git-over-SSH source's label or ref.\n\nEvery field is optional: naming only a label leaves the ref alone, and naming only a ref leaves the\nlabel alone. The repository address and the key are absent on purpose — either one describes a\ndifferent source, so replacing it is a new connection rather than an edit.");
60874
- var updateHostingStorageCapacityRequestSchema = object({ capacityGb: int().min(10).max(1e5) }).describe("Adding capacity to an existing purchase.\n\nOnly an increase is accepted: a client buys more space, and a decrease would have to remove objects or\ninvent a partial refund, neither of which this product offers. The controller refuses a smaller value\nwith a useful reason rather than silently accepting it.");
61540
+ var updateHostingStorageCapacityRequestSchema = object({ quote: object({
61541
+ bucketUuid: string().nullish(),
61542
+ bucketName: string().nullish(),
61543
+ productKey: string(),
61544
+ currency: string(),
61545
+ blockBytes: number(),
61546
+ currentBlocks: number(),
61547
+ targetBlocks: number(),
61548
+ addedBlocks: number(),
61549
+ storageUnit: object({
61550
+ netCents: number(),
61551
+ vatCents: number(),
61552
+ grossCents: number()
61553
+ }),
61554
+ addedMonthly: object({
61555
+ netCents: number(),
61556
+ vatCents: number(),
61557
+ grossCents: number()
61558
+ }),
61559
+ targetMonthly: object({
61560
+ netCents: number(),
61561
+ vatCents: number(),
61562
+ grossCents: number()
61563
+ }),
61564
+ proratedCharge: object({
61565
+ netCents: number(),
61566
+ vatCents: number(),
61567
+ grossCents: number()
61568
+ }),
61569
+ monthlyPeriod: string(),
61570
+ proratedHeldSeconds: number(),
61571
+ proratedMonthSeconds: number(),
61572
+ transferUnit: object({
61573
+ netCents: number(),
61574
+ vatCents: number(),
61575
+ grossCents: number()
61576
+ }),
61577
+ includedDownloadBytes: number(),
61578
+ vatBasisPoints: number(),
61579
+ monthlyVatBasisPoints: number(),
61580
+ generatedAt: string(),
61581
+ reviewToken: string()
61582
+ }) }).describe("Adding capacity to an existing purchase.\n\nOnly an increase is accepted: a client buys more space, and a decrease would have to remove objects or invent a\npartial refund, neither of which this product offers. The target capacity is the quote's own, and a quote for less\nthan the bucket holds is refused by the purchase service rather than silently accepting it.");
60875
61583
  var updateHostingToolSelectionRequestSchema = object({
60876
61584
  enabled: boolean(),
60877
61585
  desiredGeneration: int().min(1)
@@ -60943,6 +61651,12 @@ var authSendVerificationNotificationStatus200Schema = messageDataSchema;
60943
61651
  var authSendVerificationNotificationStatus202Schema = messageDataSchema;
60944
61652
  object({ message: string().describe("Error overview.") });
60945
61653
  union([authSendVerificationNotificationStatus200Schema, authSendVerificationNotificationStatus202Schema]);
61654
+ _enum(["OK"]);
61655
+ union([
61656
+ _enum(["Malformed notification."]),
61657
+ _enum(["Notification was not accepted."]),
61658
+ _enum(["Notification could not be recorded."])
61659
+ ]);
60946
61660
  string().describe("The document kind: invoice or credit_note.");
60947
61661
  string().describe("The document UUID the render grant names.");
60948
61662
  string().describe("The render grant minted for exactly this document.");
@@ -61047,6 +61761,31 @@ union([
61047
61761
  ]);
61048
61762
  updateCompanyAssetRequestSchema.describe("Company logo or favicon upload. Accepted types, byte size and minimum\ndimensions come from config/media.php; SVG is not accepted.");
61049
61763
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
61764
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
61765
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
61766
+ union([
61767
+ object({ message: string().describe("Error overview.") }),
61768
+ object({ message: string().describe("Error overview.") }),
61769
+ object({
61770
+ message: string().describe("Errors overview."),
61771
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
61772
+ })
61773
+ ]);
61774
+ storeBillingPaymentMethodRequestSchema.optional().describe("Start authorizing a payment method, optionally replacing one that already exists.\n\nThere is no amount, no card field and no customer-supplied provider detail here: the customer is\nsent to the provider to enter the card, and only a verified provider confirmation can activate it.");
61775
+ union([
61776
+ object({ message: string().describe("Error overview.") }),
61777
+ object({ message: string().describe("Error overview.") }),
61778
+ string()
61779
+ ]);
61780
+ union([
61781
+ object({ message: string().describe("Error overview.") }),
61782
+ object({ message: string().describe("Error overview.") }),
61783
+ object({
61784
+ message: string().describe("Errors overview."),
61785
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
61786
+ })
61787
+ ]);
61788
+ revokeBillingPaymentMethodRequestSchema.optional().describe("Withdraw authorization. The reason is optional; stopping future charges is not conditional on it.");
61050
61789
  int().optional().default(25).describe("How many documents a page holds.");
61051
61790
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
61052
61791
  union([
@@ -63056,19 +63795,25 @@ union([
63056
63795
  messageDataSchema
63057
63796
  ]);
63058
63797
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
63798
+ var hostingStorageStoreStatus200Schema = hostingStorageBucketDataSchema;
63799
+ var hostingStorageStoreStatus201Schema = hostingStorageBucketDataSchema;
63800
+ var hostingStorageStoreStatus401Schema = object({ message: string().describe("Error overview.") });
63801
+ var hostingStorageStoreStatus403Schema = object({ message: string().describe("Error overview.") });
63802
+ var hostingStorageStoreStatus422Schema = messageDataSchema;
63803
+ union([hostingStorageStoreStatus200Schema, hostingStorageStoreStatus201Schema]);
63059
63804
  union([
63060
- object({ message: string().describe("Error overview.") }),
63061
- object({ message: string().describe("Error overview.") }),
63062
- messageDataSchema
63805
+ hostingStorageStoreStatus401Schema,
63806
+ hostingStorageStoreStatus403Schema,
63807
+ hostingStorageStoreStatus422Schema
63063
63808
  ]);
63064
- storeHostingStorageBucketRequestSchema.describe("One storage purchase.\n\nStorage is sold in whole 10 GB blocks, so the request states decimal gigabytes and the platform converts\nonce, into the bytes the row stores. A quantity that is not a whole block is refused here rather than\nrounded into an entitlement the quote did not show.");
63809
+ storeHostingStorageBucketRequestSchema.describe("One storage purchase.\n\nThe capacity is not a field of its own: it is the quote's own target, and the quote is what the client confirms. The\nname is the client's label for the bucket they are buying, so it is asked for at the confirmation rather than bound\ninto the quote.");
63065
63810
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
63066
63811
  union([
63067
63812
  object({ message: string().describe("Error overview.") }),
63068
63813
  object({ message: string().describe("Error overview.") }),
63069
63814
  messageDataSchema
63070
63815
  ]);
63071
- updateHostingStorageCapacityRequestSchema.describe("Adding capacity to an existing purchase.\n\nOnly an increase is accepted: a client buys more space, and a decrease would have to remove objects or\ninvent a partial refund, neither of which this product offers. The controller refuses a smaller value\nwith a useful reason rather than silently accepting it.");
63816
+ updateHostingStorageCapacityRequestSchema.describe("Adding capacity to an existing purchase.\n\nOnly an increase is accepted: a client buys more space, and a decrease would have to remove objects or invent a\npartial refund, neither of which this product offers. The target capacity is the quote's own, and a quote for less\nthan the bucket holds is refused by the purchase service rather than silently accepting it.");
63072
63817
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
63073
63818
  union([
63074
63819
  object({ message: string().describe("Error overview.") }),
@@ -63285,6 +64030,45 @@ union([
63285
64030
  ]);
63286
64031
  updatePlatformAlertSettingsRequestSchema.describe("The desired-enabled change to platform alerting.\n\nOne required boolean, because that is the whole settings surface. The service owns the rules that\ndecide whether the change is allowed; the route's `can:` middleware owns permission.");
63287
64032
  union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
64033
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
64034
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
64035
+ union([
64036
+ object({ message: string().describe("Error overview.") }),
64037
+ object({ message: string().describe("Error overview.") }),
64038
+ object({
64039
+ message: string().describe("Errors overview."),
64040
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
64041
+ })
64042
+ ]);
64043
+ reconcileBillingCollectionAttemptRequestSchema.describe("Resolve a charge nobody can account for.\n\nThe note is required because it is the evidence for a decision about money: what the operator\nchecked and where. `charged` additionally needs the provider's own transaction id and the amount\nthat actually settled, which is what makes the resulting receipt idempotent.");
64044
+ union([
64045
+ object({ message: string().describe("Error overview.") }),
64046
+ object({ message: string().describe("Error overview.") }),
64047
+ object({
64048
+ message: string().describe("Errors overview."),
64049
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
64050
+ })
64051
+ ]);
64052
+ reconcileBillingCollectionAttemptRequestSchema.describe("Resolve a charge nobody can account for.\n\nThe note is required because it is the evidence for a decision about money: what the operator\nchecked and where. `charged` additionally needs the provider's own transaction id and the amount\nthat actually settled, which is what makes the resulting receipt idempotent.");
64053
+ union([
64054
+ object({ message: string().describe("Error overview.") }),
64055
+ object({ message: string().describe("Error overview.") }),
64056
+ object({
64057
+ message: string().describe("Errors overview."),
64058
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
64059
+ })
64060
+ ]);
64061
+ recordBillingCollectionReceiptRequestSchema.describe("Record money received outside Hosting against one invoice, attributed to the operator who did it.\n\nThe provider's transaction id is required: it is the idempotency key, so a repeated submission is\nthe same settlement rather than a second one.");
64062
+ union([
64063
+ object({ message: string().describe("Error overview.") }),
64064
+ object({ message: string().describe("Error overview.") }),
64065
+ object({
64066
+ message: string().describe("Errors overview."),
64067
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
64068
+ })
64069
+ ]);
64070
+ refundBillingCollectionReceiptRequestSchema.describe("Record that verified money came back.\n\nThe reason is required because it is the evidence for a reversal: a refund is a cash movement, and the\nrecord has to say who established it and why. A credit note is a supply reversal and is not this.");
64071
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
63288
64072
  var platformBillingDiscountStoreStatus200Schema = billingDiscountCodeDataSchema;
63289
64073
  var platformBillingDiscountStoreStatus201Schema = billingDiscountCodeDataSchema;
63290
64074
  var platformBillingDiscountStoreStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -67062,7 +67846,7 @@ var USAGE = [
67062
67846
  "A setup choice records intent only and provisions nothing; an omitted --mail leaves the",
67063
67847
  "accepted mail choice unchanged."
67064
67848
  ].join("\n");
67065
- function quoteText(quote) {
67849
+ function quoteText$1(quote) {
67066
67850
  const price = quote.supplierPriceDecimal === null ? "no usable price" : `${quote.supplierPriceDecimal} ${quote.currencyCode}`;
67067
67851
  const premium = quote.isRegistryPremium === true ? " (registry premium)" : "";
67068
67852
  const available = quote.available ? "available" : "not available";
@@ -67491,7 +68275,7 @@ var registrar = {
67491
68275
  if ("kind" in report) return registrarContactText(report);
67492
68276
  if ("sent" in report) return renderWriteOutcome(report, describeWrite);
67493
68277
  if ("entries" in report) return historyText(report);
67494
- if ("supplierPriceDecimal" in report) return quoteText(report);
68278
+ if ("supplierPriceDecimal" in report) return quoteText$1(report);
67495
68279
  if ("domainUuid" in report) return statusText(report);
67496
68280
  return operationText(report);
67497
68281
  }
@@ -68302,8 +69086,11 @@ function userText(user) {
68302
69086
  var STORAGE_USAGE = [
68303
69087
  "Usage: hostingctl storage list --company <slug>",
68304
69088
  " hostingctl storage show <bucket-uuid> --company <slug>",
69089
+ " hostingctl storage quote --company <slug> --size <gb> [bucket-uuid]",
68305
69090
  " hostingctl storage add --company <slug> --name <name> --size <gb>",
69091
+ " --quote-file <quote.json>",
68306
69092
  " hostingctl storage grow <bucket-uuid> --company <slug> --size <gb>",
69093
+ " --quote-file <quote.json>",
68307
69094
  " hostingctl storage rotate <bucket-uuid> --company <slug>",
68308
69095
  " hostingctl storage retire <bucket-uuid> --company <slug>",
68309
69096
  " hostingctl storage objects <bucket-uuid> --company <slug> [--prefix <key-prefix>]",
@@ -68316,8 +69103,10 @@ var STORAGE_USAGE = [
68316
69103
  "",
68317
69104
  " list Every bucket the company bought, its capacity, its usage and its bindings.",
68318
69105
  " show One bucket: the endpoint, bucket name and region to configure, and what it holds.",
68319
- " add Buy storage. Capacity is sold in whole 10 GB blocks, from 10 to 100000 GB.",
68320
- " grow Buy more capacity for a bucket. Capacity is never reduced here.",
69106
+ " quote What a capacity costs, and the token a purchase or an increase is confirmed at it with.",
69107
+ " add Buy storage at a reviewed price. Capacity is sold in whole 10 GB blocks, from 10 to",
69108
+ " 100000 GB.",
69109
+ " grow Buy more capacity for a bucket at a reviewed price. Capacity is never reduced here.",
68321
69110
  " rotate Issue a new access key; the secret is printed once and never again.",
68322
69111
  " retire Stop the bucket's access at the gateway. Every object is kept.",
68323
69112
  " objects One page of keys and sizes; --prefix narrows it to a key prefix.",
@@ -68327,8 +69116,10 @@ var STORAGE_USAGE = [
68327
69116
  " unbind Stop an environment reaching the bucket. The objects are unchanged.",
68328
69117
  "",
68329
69118
  "The bucket endpoint, name and region are what an S3 client is configured with; keys are issued by",
68330
- "`storage rotate` and the secret is shown in that one answer. Every write needs --confirm; --dry-run",
68331
- "describes the change without sending it."
69119
+ "`storage rotate` and the secret is shown in that one answer. A purchase and an increase are confirmed",
69120
+ "at a price the client was shown: `storage quote --size <gb> --json > quote.json` saves it, and",
69121
+ "`--quote-file quote.json` sends that same price back rather than accepting a newer one. Every write",
69122
+ "needs --confirm; --dry-run describes the change without sending it."
68332
69123
  ].join("\n");
68333
69124
  var STORAGE_METADATA = {
68334
69125
  name: "storage",
@@ -68375,6 +69166,11 @@ var STORAGE_METADATA = {
68375
69166
  takesValue: true,
68376
69167
  description: "The directory the environment mounts the bucket at; it has to be absolute."
68377
69168
  },
69169
+ {
69170
+ name: "--quote-file",
69171
+ takesValue: true,
69172
+ description: "The saved answer of `storage quote --json`, whose price and token confirm a purchase or an increase."
69173
+ },
68378
69174
  {
68379
69175
  name: "--native",
68380
69176
  takesValue: false,
@@ -68384,6 +69180,7 @@ var STORAGE_METADATA = {
68384
69180
  subcommands: [
68385
69181
  "list",
68386
69182
  "show",
69183
+ "quote",
68387
69184
  "add",
68388
69185
  "grow",
68389
69186
  "rotate",
@@ -68417,6 +69214,17 @@ async function bucketPath(context, tail) {
68417
69214
  function refuseExtra(tail) {
68418
69215
  if (tail.length > 0) throw new UsageError(STORAGE_USAGE);
68419
69216
  }
69217
+ /**
69218
+ * The bucket a quote is for, or none when the quote prices a new purchase.
69219
+ *
69220
+ * A quote is asked for before there is anything to address, so this is the one bucket-scoped question
69221
+ * whose positional is optional; more than one is still a usage refusal.
69222
+ */
69223
+ function optionalBucketUuid(tail) {
69224
+ const [bucketUuid, ...extra] = tail;
69225
+ if (extra.length > 0) throw new UsageError(STORAGE_USAGE);
69226
+ return bucketUuid === void 0 || bucketUuid === "" ? null : bucketUuid;
69227
+ }
68420
69228
  /** The purchase's label, which is the client's own name for it. */
68421
69229
  function requiredName(context) {
68422
69230
  const name = trimmedFlag(context, "--name");
@@ -68475,6 +69283,7 @@ function storageText(report) {
68475
69283
  case "buckets": return bucketsText(report.buckets);
68476
69284
  case "objects": return objectsText(report.page, report.prefix);
68477
69285
  case "grant": return grantText(report.grant);
69286
+ case "quote": return quoteText(report.quote);
68478
69287
  case "bucket": return bucketText(report.bucket);
68479
69288
  }
68480
69289
  }
@@ -68557,6 +69366,52 @@ function grantText(grant) {
68557
69366
  ].join("\n");
68558
69367
  }
68559
69368
  /**
69369
+ * One capacity's price: what it costs a month, what it costs for the rest of this month, and what it is
69370
+ * measured against.
69371
+ *
69372
+ * Every figure is the API's own. The block size and the block counts are the ones the contract states, so
69373
+ * the capacity shown is the capacity being sold rather than one this rendering derived.
69374
+ */
69375
+ function quoteText(quote) {
69376
+ const blockGb = quote.blockBytes / 1e9;
69377
+ return [
69378
+ ` bucket ${quote.bucketUuid === null ? "a new bucket" : `${quote.bucketName ?? "bucket"} (${quote.bucketUuid})`}`,
69379
+ ` capacity ${capacity(quote.currentBlocks, blockGb)} to ${capacity(quote.targetBlocks, blockGb)}`,
69380
+ ` added ${String(quote.addedBlocks)} block(s) of ${String(blockGb)} GB`,
69381
+ ` added monthly ${withTax(quote.addedMonthly, quote.currency, quote.monthlyVatBasisPoints)}, from ${quote.monthlyPeriod}`,
69382
+ ` target monthly ${withTax(quote.targetMonthly, quote.currency, quote.monthlyVatBasisPoints)}, from ${quote.monthlyPeriod}`,
69383
+ ` this month ${withTax(quote.proratedCharge, quote.currency, quote.vatBasisPoints)}, estimate for the rest of this month`,
69384
+ ` download ${formatMoney(quote.transferUnit.grossCents, quote.currency)} a block above ${readableBytes(quote.includedDownloadBytes)} included a month`,
69385
+ ` priced ${quote.productKey} at ${quote.generatedAt}`,
69386
+ "",
69387
+ "Save this answer with --json and pass it back with --quote-file to confirm a purchase or an increase",
69388
+ "at this price. Asking again prices afresh; the quote in this answer is what confirms it."
69389
+ ].join("\n");
69390
+ }
69391
+ /**
69392
+ * The price a write would land at, in one line, for the description it is confirmed against.
69393
+ *
69394
+ * It states the recurring increase and the remainder of this month together, because confirming this price buys
69395
+ * both: the monthly figure starts next month, and the past month is only ever an estimate taken when it was priced.
69396
+ * The real prorated charge starts when the storage becomes usable, so it can be lower than the figure shown.
69397
+ */
69398
+ function quotePriceLine(quote) {
69399
+ const monthly = withTax(quote.addedMonthly, quote.currency, quote.monthlyVatBasisPoints);
69400
+ const remainder = withTax(quote.proratedCharge, quote.currency, quote.vatBasisPoints);
69401
+ return `At the reviewed price: ${monthly} a month from ${quote.monthlyPeriod}, plus an estimated ${remainder} for the rest of this month (priced ${quote.generatedAt}, before the storage becomes usable).`;
69402
+ }
69403
+ /** One capacity in whole GB, from the block count and size the quote states. */
69404
+ function capacity(blocks, blockGb) {
69405
+ return `${String(blocks * blockGb)} GB in ${String(blocks)} block(s)`;
69406
+ }
69407
+ /** A gross figure beside the net, the VAT and the rate that produced it, so the three agree. */
69408
+ function withTax(amounts, currency, basisPoints) {
69409
+ const rate = `${(basisPoints / 100).toFixed(2)}%`;
69410
+ const net = formatMoney(amounts.netCents, currency);
69411
+ const vat = formatMoney(amounts.vatCents, currency);
69412
+ return `${formatMoney(amounts.grossCents, currency)} incl. VAT (${net} + ${vat} VAT at ${rate})`;
69413
+ }
69414
+ /**
68560
69415
  * The one key pair the platform ever returns.
68561
69416
  *
68562
69417
  * The warning is not decoration: nothing here is written to a file, the platform cannot answer the pair a
@@ -68575,35 +69430,92 @@ function issuedText(issued) {
68575
69430
  ].join("\n");
68576
69431
  }
68577
69432
  //#endregion
68578
- //#region src/commands/storage-writes.ts
69433
+ //#region src/commands/storage-quote-file.ts
69434
+ /** Decimal bytes in one sold gigabyte: the unit a quote's block count is stated in. */
69435
+ var DECIMAL_BYTES_PER_GB = 1e9;
68579
69436
  /**
68580
- * The write half of `hostingctl storage`: buy, enlarge, issue a key, retire, bind and unbind.
69437
+ * The reviewed quote a confirmed purchase or increase is sent at.
68581
69438
  *
68582
- * Split from the read half so each module stays small enough to hold in mind, and because every function
68583
- * here goes through `confirmableWrite` — a dry run describes the change and sends nothing, and the write
68584
- * needs `--confirm`. The purchase and enlargement confirm lines carry the price book's own figures.
69439
+ * The file is the answer `storage quote --json` printed, which is the only shape this reads: an
69440
+ * envelope naming the answer as a quote, holding the API's own quote DTO. The DTO is validated
69441
+ * through the generated schema rather than restated here, so the file cannot drift from the contract.
68585
69442
  *
68586
- * The report types live with the command that returns them; importing them as types keeps this module from
68587
- * depending on the dispatcher at run time.
69443
+ * Everything checked here is a local fact — the file is readable JSON in that shape, it prices the
69444
+ * capacity and bucket this run asked for, and it carries a token at all. The company, the token's
69445
+ * expiry and the commercial terms stay the API's: it is the authority that can refuse a stale or
69446
+ * foreign quote, and this loader must not pretend to be.
68588
69447
  */
69448
+ function readSavedQuote(file, target) {
69449
+ const quote = quoteFrom(parsed(readBoundedImportFile(file, "storage quote"), file), file);
69450
+ assertSameTarget(quote, target, file);
69451
+ return quote;
69452
+ }
69453
+ /** The commands that produce a quote file and confirm it, in the order a client runs them. */
69454
+ function quoteSteps(company, target, name) {
69455
+ const size = String(target.capacityGb);
69456
+ return [target.bucketUuid === null ? `hostingctl storage quote --company ${company} --size ${size} --json > quote.json` : `hostingctl storage quote --company ${company} --size ${size} ${target.bucketUuid} --json > quote.json`, target.bucketUuid === null ? `hostingctl storage add --company ${company} --name ${name ?? "<name>"} --size ${size} --quote-file quote.json --confirm` : `hostingctl storage grow --company ${company} ${target.bucketUuid} --size ${size} --quote-file quote.json --confirm`];
69457
+ }
68589
69458
  /**
68590
- * The price book's answer for a purchase or an enlargement, as the sentence a confirmation shows.
69459
+ * The quote a confirmed write sends, echoed whole, or a refusal that names the two commands which produce one.
68591
69460
  *
68592
- * The CLI computes no amount: the figures come from the same owner the invoice is produced from, so the
68593
- * number a client confirms cannot disagree with what they are billed. A product with no recorded price
68594
- * refuses the command here, before anything is sent, rather than asking for confirmation of an unknown cost.
69461
+ * The API authenticates the quote it issued, so the write sends back the artifact the client read: the
69462
+ * amounts, the period, the currency and the capacity are the quote's own fields, and the confirmation token
69463
+ * travels inside it. Nothing is derived from the flags here, and nothing is re-read: a confirmed write never
69464
+ * asks for a fresh quote, so the retry that follows a refusal sends the same reviewed price.
69465
+ */
69466
+ function confirmedQuote(quote, company, target, name) {
69467
+ if (quote === null) throw new UsageError([
69468
+ "Confirming a storage write needs the quote it is confirmed at: pass --quote-file <path>.",
69469
+ "",
69470
+ ...quoteSteps(company, target, name)
69471
+ ].join("\n"));
69472
+ return quote;
69473
+ }
69474
+ /** The file's text as JSON, with a refusal that names the path rather than printing its contents. */
69475
+ function parsed(contents, file) {
69476
+ let value;
69477
+ try {
69478
+ value = JSON.parse(contents);
69479
+ } catch {
69480
+ throw new UsageError(`The storage quote file [${file}] is not valid JSON.`);
69481
+ }
69482
+ if (typeof value !== "object" || value === null || Array.isArray(value)) throw new UsageError(`The storage quote file [${file}] must contain the one JSON object \`storage quote --json\` prints.`);
69483
+ return value;
69484
+ }
69485
+ /** The quote inside the answer `storage quote --json` printed, validated by the API's own schema. */
69486
+ function quoteFrom(saved, file) {
69487
+ const quote = saved.kind === "quote" ? saved.quote : void 0;
69488
+ if (quote === void 0) throw new UsageError(`The storage quote file [${file}] is not a saved quote: it must be the answer \`storage quote --json\` printed.`);
69489
+ const checked = hostingStorageQuoteDataSchema.safeParse(quote);
69490
+ if (!checked.success) {
69491
+ const [issue] = checked.error.issues;
69492
+ throw new UsageError(`The storage quote file [${file}] is not a quote this CLI saved (${issue === void 0 ? "" : `${issue.path.join(".") || "quote"}: ${issue.message}`}). Ask for a fresh one.`);
69493
+ }
69494
+ return checked.data;
69495
+ }
69496
+ /**
69497
+ * Whether the quote prices this run: the capacity asked for, and the one bucket an increase is for.
69498
+ *
69499
+ * A quote for another capacity or another bucket would buy something else, so it is refused here
69500
+ * rather than confirmed and then refused by the API.
68595
69501
  */
68596
- async function quoteSentence(company, capacityGb, bucketUuid) {
68597
- const quote = (await hostingStorageQuoteShow({
69502
+ function assertSameTarget(quote, target, file) {
69503
+ const pricedGb = quote.targetBlocks * quote.blockBytes / DECIMAL_BYTES_PER_GB;
69504
+ if (pricedGb !== target.capacityGb) throw new UsageError(`The quote in [${file}] prices ${String(pricedGb)} GB, not the ${String(target.capacityGb)} GB this command asks for. Ask for a quote at this size.`);
69505
+ if (quote.bucketUuid !== target.bucketUuid) throw new UsageError(`The quote in [${file}] prices ${quote.bucketUuid === null ? "a new bucket" : `bucket ${quote.bucketUuid}`}, not the ${target.bucketUuid === null ? "a new bucket" : `bucket ${target.bucketUuid}`} this command asks for.`);
69506
+ if (quote.reviewToken === "") throw new UsageError(`The quote in [${file}] carries no confirmation token, so nothing can be confirmed with it. Ask for a fresh one.`);
69507
+ }
69508
+ //#endregion
69509
+ //#region src/commands/storage-writes.ts
69510
+ /** `storage quote`: the price of one capacity, read from the API's price book rather than computed here. */
69511
+ async function quotedPrice(company, capacityGb, bucketUuid) {
69512
+ return (await hostingStorageQuoteShow({
68598
69513
  path: { company },
68599
- query: {
69514
+ query: bucketUuid === null ? { capacityGb } : {
68600
69515
  capacityGb,
68601
- ...bucketUuid === void 0 ? {} : { bucket: bucketUuid }
69516
+ bucket: bucketUuid
68602
69517
  }
68603
69518
  })).data;
68604
- const included = `${String(Math.round(quote.includedDownloadBytes / 1e9))} GB of downloads included a month`;
68605
- const prorated = quote.proratedHeldSeconds > 0 ? ` ${formatMoney(quote.proratedCharge.grossCents, quote.currency)} covers the rest of this month.` : "";
68606
- return `It costs ${formatMoney(quote.addedMonthly.grossCents, quote.currency)} a month including VAT for ${String(quote.addedBlocks * 10)} GB more.${prorated} The bucket will cost ${formatMoney(quote.targetMonthly.grossCents, quote.currency)} a month including VAT, with ${included}, and ${formatMoney(quote.transferUnit.grossCents, quote.currency)} per additional 10 GB.`;
68607
69519
  }
68608
69520
  /** `storage add`: buy a bucket. The API records the purchase and reconciles it after the commit. */
68609
69521
  async function add(context, tail) {
@@ -68611,14 +69523,19 @@ async function add(context, tail) {
68611
69523
  const name = requiredName(context);
68612
69524
  const capacityGb = requiredSizeGb(context);
68613
69525
  const company = await requireCompany(context.flags);
68614
- return await confirmableWrite(context, `Buy ${String(capacityGb)} GB of object storage named "${name}" for ${company}. It is provisioning until reconciliation completes. ${await quoteSentence(company, capacityGb)}`, async () => {
69526
+ const target = {
69527
+ capacityGb,
69528
+ bucketUuid: null
69529
+ };
69530
+ const reviewed = await reviewedQuote(context, company, target);
69531
+ return await confirmableWrite(context, purchaseDescription(company, name, target, reviewed), async () => {
68615
69532
  return {
68616
69533
  kind: "bucket",
68617
69534
  bucket: (await hostingStorageStore({
68618
69535
  path: { company },
68619
69536
  body: {
68620
69537
  name,
68621
- capacityGb
69538
+ quote: confirmedQuote(reviewed?.quote ?? null, company, target, name)
68622
69539
  }
68623
69540
  })).data
68624
69541
  };
@@ -68627,13 +69544,17 @@ async function add(context, tail) {
68627
69544
  /** `storage grow <uuid>`: buy more of a bucket's capacity. The API refuses a decrease. */
68628
69545
  async function grow(context, tail) {
68629
69546
  const path = await bucketPath(context, tail);
68630
- const capacityGb = requiredSizeGb(context);
68631
- return await confirmableWrite(context, `Grow ${describeBucket(path)} to ${String(capacityGb)} GB. Capacity is only ever added here, and the objects are unchanged. ${await quoteSentence(path.company, capacityGb, path.bucketUuid)}`, async () => {
69547
+ const target = {
69548
+ capacityGb: requiredSizeGb(context),
69549
+ bucketUuid: path.bucketUuid
69550
+ };
69551
+ const reviewed = await reviewedQuote(context, path.company, target);
69552
+ return await confirmableWrite(context, increaseDescription(path, target, reviewed), async () => {
68632
69553
  return {
68633
69554
  kind: "bucket",
68634
69555
  bucket: (await hostingStorageUpdate({
68635
69556
  path,
68636
- body: { capacityGb }
69557
+ body: { quote: confirmedQuote(reviewed?.quote ?? null, path.company, target, null) }
68637
69558
  })).data
68638
69559
  };
68639
69560
  });
@@ -68698,6 +69619,49 @@ async function unbind(context, tail) {
68698
69619
  };
68699
69620
  });
68700
69621
  }
69622
+ /**
69623
+ * The quote a run is reviewed against: the saved file when one was given, a fresh read for a dry run, and
69624
+ * nothing otherwise.
69625
+ *
69626
+ * A confirmed write never asks for a new price. The token a client confirms with is the one from the price
69627
+ * they were shown, so a retry after a refusal sends that same token instead of accepting a newer figure
69628
+ * nobody reviewed.
69629
+ */
69630
+ async function reviewedQuote(context, company, target) {
69631
+ const file = trimmedFlag(context, "--quote-file");
69632
+ if (file !== "") return {
69633
+ quote: readSavedQuote(file, target),
69634
+ saved: true
69635
+ };
69636
+ if (!context.flags.has("--dry-run")) return null;
69637
+ return {
69638
+ quote: await quotedPrice(company, target.capacityGb, target.bucketUuid),
69639
+ saved: false
69640
+ };
69641
+ }
69642
+ /** What a purchase would do, at the price it was quoted at when one was read. */
69643
+ function purchaseDescription(company, name, target, review) {
69644
+ return [`Buy ${String(target.capacityGb)} GB of object storage named "${name}" for ${company}. The bucket is provisioning until reconciliation completes.`, ...pricedLines(company, target, name, review)].join("\n");
69645
+ }
69646
+ /** The same for an increase, which the API refuses to turn into a decrease. */
69647
+ function increaseDescription(path, target, review) {
69648
+ return [`Grow ${describeBucket(path)} to ${String(target.capacityGb)} GB. Capacity is only ever added here, and the objects are unchanged.`, ...pricedLines(path.company, target, null, review)].join("\n");
69649
+ }
69650
+ /**
69651
+ * The price a write would land at, or the two commands that produce a quote when none was read.
69652
+ *
69653
+ * A price read during a dry run is shown with the commands that save it, because a confirmed write has to send
69654
+ * a price the client still holds. Nothing is sent here: this only says what confirming would need.
69655
+ */
69656
+ function pricedLines(company, target, name, review) {
69657
+ if (review === null) return ["Confirm it at a reviewed price:", ...quoteSteps(company, target, name)];
69658
+ if (review.saved) return [quotePriceLine(review.quote), "Confirming sends this saved quote's token, so the price is not asked for again."];
69659
+ return [
69660
+ quotePriceLine(review.quote),
69661
+ "To confirm at this price, save it and pass it back:",
69662
+ ...quoteSteps(company, target, name)
69663
+ ];
69664
+ }
68701
69665
  //#endregion
68702
69666
  //#region src/commands/storage.ts
68703
69667
  /**
@@ -68709,6 +69673,9 @@ async function unbind(context, tail) {
68709
69673
  *
68710
69674
  * `rotate` is the only command that prints a secret, and it prints it in that single answer, because the
68711
69675
  * platform cannot return it again. Everything else reports the key's hint and never the key.
69676
+ *
69677
+ * The writes live in `storage-writes`: they all confirm through the shared gate before they send anything.
69678
+ * Reading what one costs is here with the other reads, because asking a price buys nothing.
68712
69679
  */
68713
69680
  var storage = {
68714
69681
  ...STORAGE_METADATA,
@@ -68723,6 +69690,7 @@ async function dispatch$1(context) {
68723
69690
  switch (subcommand) {
68724
69691
  case "list": return await list$1(context, tail);
68725
69692
  case "show": return await show(context, tail);
69693
+ case "quote": return await quote(context, tail);
68726
69694
  case "add": return await add(context, tail);
68727
69695
  case "grow": return await grow(context, tail);
68728
69696
  case "rotate": return await rotate(context, tail);
@@ -68750,6 +69718,20 @@ async function show(context, tail) {
68750
69718
  bucket: (await hostingStorageShow({ path: await bucketPath(context, tail) })).data
68751
69719
  };
68752
69720
  }
69721
+ /**
69722
+ * `storage quote`: what one capacity costs, for a new bucket or for enlarging one.
69723
+ *
69724
+ * Nothing is bought by asking, so there is no `--confirm`: the answer is the price, and saving it is what
69725
+ * lets a purchase be confirmed at it.
69726
+ */
69727
+ async function quote(context, tail) {
69728
+ const bucketUuid = optionalBucketUuid(tail);
69729
+ const capacityGb = requiredSizeGb(context);
69730
+ return {
69731
+ kind: "quote",
69732
+ quote: await quotedPrice(await requireCompany(context.flags), capacityGb, bucketUuid)
69733
+ };
69734
+ }
68753
69735
  /** `storage objects <uuid>`: one bounded page of keys and sizes, optionally under a prefix. */
68754
69736
  async function objects(context, tail) {
68755
69737
  const path = await bucketPath(context, tail);
@@ -69497,7 +70479,7 @@ function writeUpdateState(state, env = process.env) {
69497
70479
  }
69498
70480
  //#endregion
69499
70481
  //#region src/version.ts
69500
- var VERSION = "1.0.537";
70482
+ var VERSION = "1.0.539";
69501
70483
  //#endregion
69502
70484
  //#region src/commands/update.ts
69503
70485
  /**
@@ -69572,7 +70554,7 @@ var update = {
69572
70554
  }, process.env);
69573
70555
  return {
69574
70556
  ...known,
69575
- current: after ?? "1.0.537",
70557
+ current: after ?? "1.0.539",
69576
70558
  latest: after ?? latest,
69577
70559
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
69578
70560
  action: "run",
@@ -69849,7 +70831,7 @@ async function printUpdateNotice(options) {
69849
70831
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
69850
70832
  } catch {}
69851
70833
  if (latest === null) return;
69852
- if (!isNewerVersion(latest, "1.0.537")) return;
70834
+ if (!isNewerVersion(latest, "1.0.539")) return;
69853
70835
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
69854
70836
  }
69855
70837
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */