@haakco/hostingctl 1.0.754 → 1.0.762

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
@@ -29374,7 +29374,7 @@ function oneUuid$7(rest, usage) {
29374
29374
  * A required flag that arrives empty would be refused by the API anyway, but refusing here names the flag and
29375
29375
  * the command's own syntax, so the operator fixes the invocation instead of reading a validation body.
29376
29376
  */
29377
- function requiredFlag$3(context, flag, usage) {
29377
+ function requiredFlag$4(context, flag, usage) {
29378
29378
  const value = context.flags.get(flag)?.trim() ?? "";
29379
29379
  if (value === "") throw new UsageError(`${flag} is required.\n\n${usage}`);
29380
29380
  return value;
@@ -30271,6 +30271,214 @@ function companySentEmailShow(options) {
30271
30271
  }));
30272
30272
  }
30273
30273
  /**
30274
+ * {@link /c/:company/compliance/checklist}
30275
+ */
30276
+ function complianceChecklistShow(options) {
30277
+ const { client: request = client, ...config } = options;
30278
+ return withUnwrap(request({
30279
+ method: "GET",
30280
+ url: "/c/{company}/compliance/checklist",
30281
+ security: [{
30282
+ type: "http",
30283
+ scheme: "bearer"
30284
+ }],
30285
+ ...config,
30286
+ throwOnError: config.throwOnError ?? true
30287
+ }));
30288
+ }
30289
+ /**
30290
+ * {@link /c/:company/compliance/operator-terms}
30291
+ */
30292
+ function complianceOperatorTermsShow(options) {
30293
+ const { client: request = client, ...config } = options;
30294
+ return withUnwrap(request({
30295
+ method: "GET",
30296
+ url: "/c/{company}/compliance/operator-terms",
30297
+ security: [{
30298
+ type: "http",
30299
+ scheme: "bearer"
30300
+ }],
30301
+ ...config,
30302
+ throwOnError: config.throwOnError ?? true
30303
+ }));
30304
+ }
30305
+ /**
30306
+ * {@link /c/:company/compliance/checklist/items/:item}
30307
+ */
30308
+ function complianceChecklistTick(options) {
30309
+ const { client: request = client, ...config } = options;
30310
+ return withUnwrap(request({
30311
+ method: "PUT",
30312
+ url: "/c/{company}/compliance/checklist/items/{item}",
30313
+ security: [{
30314
+ type: "http",
30315
+ scheme: "bearer"
30316
+ }],
30317
+ ...config,
30318
+ throwOnError: config.throwOnError ?? true
30319
+ }));
30320
+ }
30321
+ /**
30322
+ * {@link /c/:company/compliance/operator-terms/acceptances}
30323
+ */
30324
+ function complianceOperatorTermsAccept(options) {
30325
+ const { client: request = client, ...config } = options;
30326
+ return withUnwrap(request({
30327
+ method: "POST",
30328
+ url: "/c/{company}/compliance/operator-terms/acceptances",
30329
+ security: [{
30330
+ type: "http",
30331
+ scheme: "bearer"
30332
+ }],
30333
+ ...config,
30334
+ throwOnError: config.throwOnError ?? true
30335
+ }));
30336
+ }
30337
+ /**
30338
+ * {@link /c/:company/compliance/documents/:document}
30339
+ */
30340
+ function complianceDocumentsShow(options) {
30341
+ const { client: request = client, ...config } = options;
30342
+ return withUnwrap(request({
30343
+ method: "GET",
30344
+ url: "/c/{company}/compliance/documents/{document}",
30345
+ security: [{
30346
+ type: "http",
30347
+ scheme: "bearer"
30348
+ }],
30349
+ ...config,
30350
+ throwOnError: config.throwOnError ?? true
30351
+ }));
30352
+ }
30353
+ /**
30354
+ * {@link /c/:company/compliance/evidence}
30355
+ */
30356
+ function complianceEvidenceExport(options) {
30357
+ const { client: request = client, ...config } = options;
30358
+ return withUnwrap(request({
30359
+ method: "GET",
30360
+ url: "/c/{company}/compliance/evidence",
30361
+ security: [{
30362
+ type: "http",
30363
+ scheme: "bearer"
30364
+ }],
30365
+ ...config,
30366
+ throwOnError: config.throwOnError ?? true
30367
+ }));
30368
+ }
30369
+ /**
30370
+ * {@link /c/:company/compliance/scans}
30371
+ */
30372
+ function complianceScansIndex(options) {
30373
+ const { client: request = client, ...config } = options;
30374
+ return withUnwrap(request({
30375
+ method: "GET",
30376
+ url: "/c/{company}/compliance/scans",
30377
+ security: [{
30378
+ type: "http",
30379
+ scheme: "bearer"
30380
+ }],
30381
+ ...config,
30382
+ throwOnError: config.throwOnError ?? true
30383
+ }));
30384
+ }
30385
+ /**
30386
+ * {@link /c/:company/compliance/scans}
30387
+ */
30388
+ function complianceScansStore(options) {
30389
+ const { client: request = client, ...config } = options;
30390
+ return withUnwrap(request({
30391
+ method: "POST",
30392
+ url: "/c/{company}/compliance/scans",
30393
+ security: [{
30394
+ type: "http",
30395
+ scheme: "bearer"
30396
+ }],
30397
+ ...config,
30398
+ throwOnError: config.throwOnError ?? true
30399
+ }));
30400
+ }
30401
+ /**
30402
+ * {@link /c/:company/compliance/upcoming}
30403
+ */
30404
+ function complianceUpcomingIndex(options) {
30405
+ const { client: request = client, ...config } = options;
30406
+ return withUnwrap(request({
30407
+ method: "GET",
30408
+ url: "/c/{company}/compliance/upcoming",
30409
+ security: [{
30410
+ type: "http",
30411
+ scheme: "bearer"
30412
+ }],
30413
+ ...config,
30414
+ throwOnError: config.throwOnError ?? true
30415
+ }));
30416
+ }
30417
+ /**
30418
+ * {@link /c/:company/compliance/calendar-feed}
30419
+ */
30420
+ function complianceCalendarFeedShow(options) {
30421
+ const { client: request = client, ...config } = options;
30422
+ return withUnwrap(request({
30423
+ method: "GET",
30424
+ url: "/c/{company}/compliance/calendar-feed",
30425
+ security: [{
30426
+ type: "http",
30427
+ scheme: "bearer"
30428
+ }],
30429
+ ...config,
30430
+ throwOnError: config.throwOnError ?? true
30431
+ }));
30432
+ }
30433
+ /**
30434
+ * {@link /c/:company/compliance/calendar-feed}
30435
+ */
30436
+ function complianceCalendarFeedIssue(options) {
30437
+ const { client: request = client, ...config } = options;
30438
+ return withUnwrap(request({
30439
+ method: "POST",
30440
+ url: "/c/{company}/compliance/calendar-feed",
30441
+ security: [{
30442
+ type: "http",
30443
+ scheme: "bearer"
30444
+ }],
30445
+ ...config,
30446
+ throwOnError: config.throwOnError ?? true
30447
+ }));
30448
+ }
30449
+ /**
30450
+ * {@link /c/:company/compliance/calendar-feed/:feedUuid}
30451
+ */
30452
+ function complianceCalendarFeedRevoke(options) {
30453
+ const { client: request = client, ...config } = options;
30454
+ return withUnwrap(request({
30455
+ method: "DELETE",
30456
+ url: "/c/{company}/compliance/calendar-feed/{feedUuid}",
30457
+ security: [{
30458
+ type: "http",
30459
+ scheme: "bearer"
30460
+ }],
30461
+ ...config,
30462
+ throwOnError: config.throwOnError ?? true
30463
+ }));
30464
+ }
30465
+ /**
30466
+ * {@link /c/:company/compliance/reminder-emails}
30467
+ */
30468
+ function complianceReminderEmailsUpdate(options) {
30469
+ const { client: request = client, ...config } = options;
30470
+ return withUnwrap(request({
30471
+ method: "PUT",
30472
+ url: "/c/{company}/compliance/reminder-emails",
30473
+ security: [{
30474
+ type: "http",
30475
+ scheme: "bearer"
30476
+ }],
30477
+ ...config,
30478
+ throwOnError: config.throwOnError ?? true
30479
+ }));
30480
+ }
30481
+ /**
30274
30482
  * {@link /c/:company/domains/:domainUuid/dns}
30275
30483
  */
30276
30484
  function domainsDnsShow(options) {
@@ -38605,6 +38813,54 @@ function domainsRegistrarOperationsSupersedeTransfer(options) {
38605
38813
  }));
38606
38814
  }
38607
38815
  /**
38816
+ * {@link /platform/companies/:company/security-compromises}
38817
+ */
38818
+ function securityCompromiseStore(options) {
38819
+ const { client: request = client, ...config } = options;
38820
+ return withUnwrap(request({
38821
+ method: "POST",
38822
+ url: "/platform/companies/{company}/security-compromises",
38823
+ security: [{
38824
+ type: "http",
38825
+ scheme: "bearer"
38826
+ }],
38827
+ ...config,
38828
+ throwOnError: config.throwOnError ?? true
38829
+ }));
38830
+ }
38831
+ /**
38832
+ * {@link /platform/companies/:company/security-compromises/:noticeUuid/resolve}
38833
+ */
38834
+ function securityCompromiseResolve(options) {
38835
+ const { client: request = client, ...config } = options;
38836
+ return withUnwrap(request({
38837
+ method: "POST",
38838
+ url: "/platform/companies/{company}/security-compromises/{noticeUuid}/resolve",
38839
+ security: [{
38840
+ type: "http",
38841
+ scheme: "bearer"
38842
+ }],
38843
+ ...config,
38844
+ throwOnError: config.throwOnError ?? true
38845
+ }));
38846
+ }
38847
+ /**
38848
+ * {@link /c/:company/compliance/security-compromises}
38849
+ */
38850
+ function complianceSecurityCompromisesIndex(options) {
38851
+ const { client: request = client, ...config } = options;
38852
+ return withUnwrap(request({
38853
+ method: "GET",
38854
+ url: "/c/{company}/compliance/security-compromises",
38855
+ security: [{
38856
+ type: "http",
38857
+ scheme: "bearer"
38858
+ }],
38859
+ ...config,
38860
+ throwOnError: config.throwOnError ?? true
38861
+ }));
38862
+ }
38863
+ /**
38608
38864
  * @summary Historical email addressed to this signed-in user; other recipients' rows are indistinguishable from missing
38609
38865
  * {@link /me/sent-emails/:uuid}
38610
38866
  */
@@ -44034,7 +44290,7 @@ var RUNTIME_VERSION_USAGE = [
44034
44290
  */
44035
44291
  async function setRuntimeVersion(context, path, extra) {
44036
44292
  if (extra.length > 0) throw new UsageError(RUNTIME_VERSION_USAGE);
44037
- const version = requiredFlag$3(context, "--version", RUNTIME_VERSION_USAGE);
44293
+ const version = requiredFlag$4(context, "--version", RUNTIME_VERSION_USAGE);
44038
44294
  const environmentPath = {
44039
44295
  company: path.company,
44040
44296
  environmentUuid: path.environmentUuid
@@ -44350,9 +44606,9 @@ function createText(report) {
44350
44606
  function writeAnyResultText(result) {
44351
44607
  const value = result;
44352
44608
  if (typeof value.message === "string" && typeof value.uuid !== "string") return ` ${value.message}`;
44353
- return writeResultText(result);
44609
+ return writeResultText$1(result);
44354
44610
  }
44355
- function writeResultText(result) {
44611
+ function writeResultText$1(result) {
44356
44612
  if ("failureStage" in result) return buildText(result);
44357
44613
  if ("releaseUuid" in result) return prepareImageText(result);
44358
44614
  if ("imageDigest" in result) return [` release ${result.uuid} ${result.status} running ${result.isRunning ? "yes" : "no"}`, ...imageProvenanceText(result)].join("\n");
@@ -44568,10 +44824,10 @@ async function show$7(context, rest) {
44568
44824
  async function set$2(context, rest) {
44569
44825
  noExtra$15(rest);
44570
44826
  const company = await requireCompany(context.flags);
44571
- const endpoint = requiredFlag$3(context, "--endpoint", BACKUP_DESTINATION_USAGE);
44572
- const bucket = requiredFlag$3(context, "--bucket", BACKUP_DESTINATION_USAGE);
44573
- const region = requiredFlag$3(context, "--region", BACKUP_DESTINATION_USAGE);
44574
- const accessKeyId = requiredFlag$3(context, "--access-key-id", BACKUP_DESTINATION_USAGE);
44827
+ const endpoint = requiredFlag$4(context, "--endpoint", BACKUP_DESTINATION_USAGE);
44828
+ const bucket = requiredFlag$4(context, "--bucket", BACKUP_DESTINATION_USAGE);
44829
+ const region = requiredFlag$4(context, "--region", BACKUP_DESTINATION_USAGE);
44830
+ const accessKeyId = requiredFlag$4(context, "--access-key-id", BACKUP_DESTINATION_USAGE);
44575
44831
  const secretAccessKey = readSecret(context, "secret-key", 4096, BACKUP_DESTINATION_USAGE).trim();
44576
44832
  const prefix = context.flags.get("--prefix")?.trim() ?? "";
44577
44833
  const armed = context.flags.has("--arm");
@@ -45178,27 +45434,27 @@ var storeHostingStorageBucketRequestContentFormatEnum = {
45178
45434
  * what makes `--dry-run` honest — and none of them asks the API what it thinks before saying what it will do.
45179
45435
  */
45180
45436
  /** A required value, or a usage error naming what is missing. */
45181
- function requiredFlag$2(context, flag) {
45437
+ function requiredFlag$3(context, flag) {
45182
45438
  const value = context.flags.get(flag) ?? "";
45183
45439
  if (value.trim() === "") throw new UsageError(`${flag} is required.\n\n${BILLING_USAGE}`);
45184
45440
  return value.trim();
45185
45441
  }
45186
45442
  /** Rand to cents, refusing anything that is not a positive amount of money. */
45187
45443
  function randToCents$1(context, flag) {
45188
- const raw = requiredFlag$2(context, flag);
45444
+ const raw = requiredFlag$3(context, flag);
45189
45445
  const cents = minorUnits(raw);
45190
45446
  if (cents === null || cents <= 0) throw new UsageError(`${flag} must be a positive amount of rand with at most two decimal places, e.g. 12.50 (got ${raw}).`);
45191
45447
  return cents;
45192
45448
  }
45193
45449
  /** A percentage to basis points, refusing anything outside 0–100 or finer than a basis point. */
45194
45450
  function percentToBasisPoints$1(context) {
45195
- const raw = requiredFlag$2(context, "--percent");
45451
+ const raw = requiredFlag$3(context, "--percent");
45196
45452
  const basisPoints = minorUnits(raw);
45197
45453
  if (basisPoints === null || basisPoints > 1e4) throw new UsageError(`--percent must be between 0 and 100 with at most two decimal places (got ${raw}).`);
45198
45454
  return basisPoints;
45199
45455
  }
45200
45456
  function product$1(context) {
45201
- const raw = requiredFlag$2(context, "--product");
45457
+ const raw = requiredFlag$3(context, "--product");
45202
45458
  const known = Object.values(billingProductEnum);
45203
45459
  if (!known.includes(raw)) throw new UsageError(`--product must be one of ${known.join(", ")} (got ${raw}).`);
45204
45460
  return raw;
@@ -45209,7 +45465,7 @@ var optional$6 = (context, flag) => {
45209
45465
  };
45210
45466
  async function startRate(context) {
45211
45467
  const amountCents = randToCents$1(context, "--amount");
45212
- const effectiveFrom = requiredFlag$2(context, "--from");
45468
+ const effectiveFrom = requiredFlag$3(context, "--from");
45213
45469
  const chosen = product$1(context);
45214
45470
  const packageKey = optional$6(context, "--package");
45215
45471
  const company = optional$6(context, "--company");
@@ -45225,7 +45481,7 @@ async function startRate(context) {
45225
45481
  };
45226
45482
  }
45227
45483
  async function endRate(context, rateUuid) {
45228
- const effectiveUntil = requiredFlag$2(context, "--until");
45484
+ const effectiveUntil = requiredFlag$3(context, "--until");
45229
45485
  return {
45230
45486
  kind: "write",
45231
45487
  outcome: await confirmableWrite(context, `End rate ${rateUuid} on ${effectiveUntil}. A rate that priced an issued document is never edited, so this closes the window and a new one starts after it.`, async () => platformBillingRateEnd({
@@ -45235,9 +45491,9 @@ async function endRate(context, rateUuid) {
45235
45491
  };
45236
45492
  }
45237
45493
  async function startTaxRate(context) {
45238
- const label = requiredFlag$2(context, "--label");
45494
+ const label = requiredFlag$3(context, "--label");
45239
45495
  const basisPoints = percentToBasisPoints$1(context);
45240
- const effectiveFrom = requiredFlag$2(context, "--from");
45496
+ const effectiveFrom = requiredFlag$3(context, "--from");
45241
45497
  return {
45242
45498
  kind: "write",
45243
45499
  outcome: await confirmableWrite(context, `Start a ${label} window at ${(basisPoints / 100).toFixed(2)}% from ${effectiveFrom}. This applies to every month that has no more specific rate.`, async () => platformBillingTaxRateStore({ body: {
@@ -45249,7 +45505,7 @@ async function startTaxRate(context) {
45249
45505
  }
45250
45506
  async function buildRun(context) {
45251
45507
  const company = await requireCompany(context.flags);
45252
- const localPeriod = requiredFlag$2(context, "--period");
45508
+ const localPeriod = requiredFlag$3(context, "--period");
45253
45509
  return {
45254
45510
  kind: "write",
45255
45511
  outcome: await confirmableWrite(context, `Price ${company} for ${localPeriod} from the purchase ledger. This reads the ledger and writes a run; it never writes back to the ledger.`, async () => platformBillingRunBuild({
@@ -45260,7 +45516,7 @@ async function buildRun(context) {
45260
45516
  }
45261
45517
  async function issueRun(context) {
45262
45518
  const company = await requireCompany(context.flags);
45263
- const localPeriod = requiredFlag$2(context, "--period");
45519
+ const localPeriod = requiredFlag$3(context, "--period");
45264
45520
  const run = await platformBillingRunShow({ path: {
45265
45521
  company,
45266
45522
  localPeriod
@@ -45280,7 +45536,7 @@ async function issueRun(context) {
45280
45536
  }
45281
45537
  async function retryInvoice(context) {
45282
45538
  const company = await requireCompany(context.flags);
45283
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45539
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45284
45540
  return {
45285
45541
  kind: "write",
45286
45542
  outcome: await confirmableWrite(context, `Retry producing the PDF for ${invoiceUuid}. The number stays: it was allocated when the document was reserved.`, async () => platformBillingInvoiceRetry({ path: {
@@ -45298,8 +45554,8 @@ async function retryInvoice(context) {
45298
45554
  */
45299
45555
  async function reRenderInvoice(context) {
45300
45556
  const company = await requireCompany(context.flags);
45301
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45302
- const reason = requiredFlag$2(context, "--reason");
45557
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45558
+ const reason = requiredFlag$3(context, "--reason");
45303
45559
  return {
45304
45560
  kind: "write",
45305
45561
  outcome: await confirmableWrite(context, `Re-render ${invoiceUuid} with the client's current particulars, keeping its number, date and amounts. Reason: ${reason}`, async () => platformBillingInvoiceReRender({
@@ -45313,8 +45569,8 @@ async function reRenderInvoice(context) {
45313
45569
  }
45314
45570
  async function voidInvoice(context) {
45315
45571
  const company = await requireCompany(context.flags);
45316
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45317
- const reason = requiredFlag$2(context, "--reason");
45572
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45573
+ const reason = requiredFlag$3(context, "--reason");
45318
45574
  return {
45319
45575
  kind: "write",
45320
45576
  outcome: await confirmableWrite(context, `Void the unissued reservation ${invoiceUuid}, leaving an explained gap in the series. Reason: ${reason}`, async () => platformBillingInvoiceVoid({
@@ -45328,8 +45584,8 @@ async function voidInvoice(context) {
45328
45584
  }
45329
45585
  async function creditInvoice(context) {
45330
45586
  const company = await requireCompany(context.flags);
45331
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45332
- const reason = requiredFlag$2(context, "--reason");
45587
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45588
+ const reason = requiredFlag$3(context, "--reason");
45333
45589
  return {
45334
45590
  kind: "write",
45335
45591
  outcome: await confirmableWrite(context, `Issue a credit note against ${invoiceUuid} for its full value. The reason is printed on the credit note. Reason: ${reason}`, async () => platformBillingInvoiceCredit({
@@ -45343,7 +45599,7 @@ async function creditInvoice(context) {
45343
45599
  }
45344
45600
  async function sendInvoice(context) {
45345
45601
  const company = await requireCompany(context.flags);
45346
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45602
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45347
45603
  return {
45348
45604
  kind: "write",
45349
45605
  outcome: await confirmableWrite(context, `Send ${invoiceUuid} to the client's billing contact again. This is the same document and the same number: nothing new is created, and a failed send never un-issues it.`, async () => platformBillingInvoiceSend({ path: {
@@ -45354,8 +45610,8 @@ async function sendInvoice(context) {
45354
45610
  }
45355
45611
  async function markPaymentState(context) {
45356
45612
  const company = await requireCompany(context.flags);
45357
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45358
- const state = requiredFlag$2(context, "--state");
45613
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45614
+ const state = requiredFlag$3(context, "--state");
45359
45615
  if (state !== "paid" && state !== "unpaid") throw new UsageError(`--state must be paid or unpaid (got ${state}).`);
45360
45616
  return {
45361
45617
  kind: "write",
@@ -45369,7 +45625,7 @@ async function markPaymentState(context) {
45369
45625
  };
45370
45626
  }
45371
45627
  async function activateIssuer(context) {
45372
- const firstIssuedMonth = requiredFlag$2(context, "--month");
45628
+ const firstIssuedMonth = requiredFlag$3(context, "--month");
45373
45629
  return {
45374
45630
  kind: "write",
45375
45631
  outcome: await confirmableWrite(context, `Turn issuance on, recording ${firstIssuedMonth} as the first month Hosting issues its own documents. Every month before it belongs to the previous system, and issuing one here would put two numbers on one supply.`, async () => platformBillingIssuerActivate({ body: { firstIssuedMonth } }).unwrap())
@@ -45388,8 +45644,8 @@ async function activateIssuer(context) {
45388
45644
  /** Turn a free holding into a paid one, at the approved package. */
45389
45645
  async function activatePaid(context) {
45390
45646
  const company = await requireCompany(context.flags);
45391
- const environmentUuid = requiredFlag$2(context, "--environment");
45392
- const packageKey = requiredFlag$2(context, "--package");
45647
+ const environmentUuid = requiredFlag$3(context, "--environment");
45648
+ const packageKey = requiredFlag$3(context, "--package");
45393
45649
  const approveSetup = context.flags.has("--approve-setup");
45394
45650
  return {
45395
45651
  kind: "write",
@@ -45408,9 +45664,9 @@ async function activatePaid(context) {
45408
45664
  /** Issue the replacement for an already-credited invoice, from a correction run. */
45409
45665
  async function replaceInvoice(context) {
45410
45666
  const company = await requireCompany(context.flags);
45411
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45412
- const run = requiredFlag$2(context, "--run");
45413
- const revision = Number(requiredFlag$2(context, "--revision"));
45667
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45668
+ const run = requiredFlag$3(context, "--run");
45669
+ const revision = Number(requiredFlag$3(context, "--revision"));
45414
45670
  if (!Number.isInteger(revision) || revision < 1) throw new UsageError("--revision must be the whole revision number of the correction run.");
45415
45671
  return {
45416
45672
  kind: "write",
@@ -45513,7 +45769,7 @@ async function collectionSetup(context) {
45513
45769
  /** Withdraw the authorization. Future charges stop immediately. */
45514
45770
  async function collectionRevoke(context) {
45515
45771
  const company = await requireCompany(context.flags);
45516
- const methodUuid = requiredFlag$2(context, "--method");
45772
+ const methodUuid = requiredFlag$3(context, "--method");
45517
45773
  const reason = optional$5(context, "--reason");
45518
45774
  return {
45519
45775
  kind: "collectionRevoked",
@@ -45564,9 +45820,9 @@ async function reconcileNotCharged(context, company, attemptUuid, note) {
45564
45820
  }
45565
45821
  /** Record that an unresolved charge did settle, using the provider's own transaction id. */
45566
45822
  async function reconcileCharged(context, company, attemptUuid, note) {
45567
- const transaction = requiredFlag$2(context, "--transaction");
45823
+ const transaction = requiredFlag$3(context, "--transaction");
45568
45824
  const amountCents = randToCents$1(context, "--amount");
45569
- const receivedAt = requiredFlag$2(context, "--received-at");
45825
+ const receivedAt = requiredFlag$3(context, "--received-at");
45570
45826
  return {
45571
45827
  kind: "collectionReceipt",
45572
45828
  outcome: await confirmableWrite(context, `Record that attempt ${attemptUuid} for ${company} settled ${randAmount(amountCents)} on ${receivedAt}, provider transaction ${transaction}, noting: ${note}. This records a settlement the provider already made; it sends no charge.`, async () => platformBillingCollectionReconcileCharged({
@@ -45587,8 +45843,8 @@ async function reconcileCharged(context, company, attemptUuid, note) {
45587
45843
  /** `collection reconcile <not-charged|charged>`: the two exits from a charge nobody can account for. */
45588
45844
  async function collectionReconcile(context, decision) {
45589
45845
  const company = await requireCompany(context.flags);
45590
- const attemptUuid = requiredFlag$2(context, "--attempt");
45591
- const note = requiredFlag$2(context, "--note");
45846
+ const attemptUuid = requiredFlag$3(context, "--attempt");
45847
+ const note = requiredFlag$3(context, "--note");
45592
45848
  if (decision === "not-charged") return await reconcileNotCharged(context, company, attemptUuid, note);
45593
45849
  if (decision === "charged") return await reconcileCharged(context, company, attemptUuid, note);
45594
45850
  throw new UsageError(BILLING_USAGE);
@@ -45596,11 +45852,11 @@ async function collectionReconcile(context, decision) {
45596
45852
  /** Record money received outside Hosting, against one invoice, attributed to this operator. */
45597
45853
  async function collectionReceipt(context) {
45598
45854
  const company = await requireCompany(context.flags);
45599
- const invoiceUuid = requiredFlag$2(context, "--invoice");
45600
- const transaction = requiredFlag$2(context, "--transaction");
45855
+ const invoiceUuid = requiredFlag$3(context, "--invoice");
45856
+ const transaction = requiredFlag$3(context, "--transaction");
45601
45857
  const amountCents = randToCents$1(context, "--amount");
45602
- const receivedAt = requiredFlag$2(context, "--received-at");
45603
- const note = requiredFlag$2(context, "--note");
45858
+ const receivedAt = requiredFlag$3(context, "--received-at");
45859
+ const note = requiredFlag$3(context, "--note");
45604
45860
  return {
45605
45861
  kind: "collectionReceipt",
45606
45862
  outcome: await confirmableWrite(context, `Record ${randAmount(amountCents)} 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({
@@ -45658,11 +45914,11 @@ async function saveBinary(data, path) {
45658
45914
  }
45659
45915
  return bytes.byteLength;
45660
45916
  }
45661
- var out = (context) => requiredFlag$2(context, "--out");
45917
+ var out = (context) => requiredFlag$3(context, "--out");
45662
45918
  /** One invoice of the caller's own company, as a PDF. */
45663
45919
  async function downloadInvoice(context) {
45664
45920
  const company = await requireCompany(context.flags);
45665
- const invoiceUuid = requiredFlag$2(context, "--uuid");
45921
+ const invoiceUuid = requiredFlag$3(context, "--uuid");
45666
45922
  const destination = out(context);
45667
45923
  return {
45668
45924
  kind: "saved",
@@ -45679,7 +45935,7 @@ async function downloadInvoice(context) {
45679
45935
  /** One credit note of the caller's own company, as a PDF. */
45680
45936
  async function downloadCreditNote(context) {
45681
45937
  const company = await requireCompany(context.flags);
45682
- const creditNoteUuid = requiredFlag$2(context, "--uuid");
45938
+ const creditNoteUuid = requiredFlag$3(context, "--uuid");
45683
45939
  const destination = out(context);
45684
45940
  return {
45685
45941
  kind: "saved",
@@ -45695,7 +45951,7 @@ async function downloadCreditNote(context) {
45695
45951
  }
45696
45952
  /** One export pack, as the archive the accountant imports. */
45697
45953
  async function downloadExport(context) {
45698
- const exportUuid = requiredFlag$2(context, "--uuid");
45954
+ const exportUuid = requiredFlag$3(context, "--uuid");
45699
45955
  const destination = out(context);
45700
45956
  const pack = await platformBillingExportShow({ path: { exportUuid } }).unwrap();
45701
45957
  if (pack.downloadUrl === null) throw new UsageError(`Export ${exportUuid} has no file: it is ${pack.state}, and only a ready pack has one.`);
@@ -45715,12 +45971,12 @@ async function downloadExport(context) {
45715
45971
  async function updateProfile(context) {
45716
45972
  const company = await requireCompany(context.flags);
45717
45973
  const body = {
45718
- ...context.flags.has("--legal-name") ? { legalName: requiredFlag$2(context, "--legal-name") } : {},
45719
- ...context.flags.has("--vat-number") ? { vatNumber: requiredFlag$2(context, "--vat-number") } : {},
45720
- ...context.flags.has("--billing-email") ? { billingEmail: requiredFlag$2(context, "--billing-email") } : {},
45721
- ...context.flags.has("--address-line-1") ? { addressLine1: requiredFlag$2(context, "--address-line-1") } : {},
45722
- ...context.flags.has("--city") ? { city: requiredFlag$2(context, "--city") } : {},
45723
- ...context.flags.has("--postal-code") ? { postalCode: requiredFlag$2(context, "--postal-code") } : {}
45974
+ ...context.flags.has("--legal-name") ? { legalName: requiredFlag$3(context, "--legal-name") } : {},
45975
+ ...context.flags.has("--vat-number") ? { vatNumber: requiredFlag$3(context, "--vat-number") } : {},
45976
+ ...context.flags.has("--billing-email") ? { billingEmail: requiredFlag$3(context, "--billing-email") } : {},
45977
+ ...context.flags.has("--address-line-1") ? { addressLine1: requiredFlag$3(context, "--address-line-1") } : {},
45978
+ ...context.flags.has("--city") ? { city: requiredFlag$3(context, "--city") } : {},
45979
+ ...context.flags.has("--postal-code") ? { postalCode: requiredFlag$3(context, "--postal-code") } : {}
45724
45980
  };
45725
45981
  if (Object.keys(body).length === 0) throw new UsageError("Nothing to change. Pass at least one of --legal-name, --vat-number, --billing-email, --address-line-1, --city or --postal-code.");
45726
45982
  return {
@@ -45753,7 +46009,7 @@ async function myInvoice(context) {
45753
46009
  kind: "invoice",
45754
46010
  invoice: await companyBillingInvoiceShow({ path: {
45755
46011
  company: await requireCompany(context.flags),
45756
- invoiceUuid: requiredFlag$2(context, "--uuid")
46012
+ invoiceUuid: requiredFlag$3(context, "--uuid")
45757
46013
  } }).unwrap()
45758
46014
  };
45759
46015
  }
@@ -45770,7 +46026,7 @@ async function myCreditNote(context) {
45770
46026
  kind: "myCreditNote",
45771
46027
  creditNote: await companyBillingCreditNoteShow({ path: {
45772
46028
  company: await requireCompany(context.flags),
45773
- creditNoteUuid: requiredFlag$2(context, "--uuid")
46029
+ creditNoteUuid: requiredFlag$3(context, "--uuid")
45774
46030
  } }).unwrap()
45775
46031
  };
45776
46032
  }
@@ -45909,7 +46165,7 @@ function collectionText(report) {
45909
46165
  * `min: 0` permits and an operator may legitimately promise.
45910
46166
  */
45911
46167
  function randToCents(context) {
45912
- const raw = requiredFlag$2(context, "--amount");
46168
+ const raw = requiredFlag$3(context, "--amount");
45913
46169
  const parts = /^(\d+)(?:\.(\d{1,2}))?$/.exec(raw);
45914
46170
  const cents = parts === null ? NaN : Number(`${parts[1]}${(parts[2] ?? "").padEnd(2, "0")}`);
45915
46171
  if (!Number.isSafeInteger(cents)) throw new UsageError(`--amount must be an amount of rand with at most two decimal places, e.g. 159.00 (got ${raw}).`);
@@ -46006,7 +46262,7 @@ async function endDiscount(context, codeUuid) {
46006
46262
  /** Spend a code on the caller's own company, which is the only account the route can reach. */
46007
46263
  async function redeemDiscount(context) {
46008
46264
  const company = await requireCompany(context.flags);
46009
- const code = requiredFlag$2(context, "--code");
46265
+ const code = requiredFlag$3(context, "--code");
46010
46266
  return {
46011
46267
  kind: "discountRedeemed",
46012
46268
  outcome: await confirmableWrite(context, `Redeem code ${code} against ${company}. This changes what this company is charged: the code's price becomes its own price window, and no issued document changes.`, async () => companyBillingDiscountRedeem({
@@ -46125,9 +46381,9 @@ async function exportPreview(context) {
46125
46381
  return {
46126
46382
  kind: "exportPreview",
46127
46383
  preview: await platformBillingExportPreview({ query: {
46128
- profile: requiredFlag$2(context, "--export-profile"),
46129
- from: requiredFlag$2(context, "--from"),
46130
- to: requiredFlag$2(context, "--to")
46384
+ profile: requiredFlag$3(context, "--export-profile"),
46385
+ from: requiredFlag$3(context, "--from"),
46386
+ to: requiredFlag$3(context, "--to")
46131
46387
  } }).unwrap()
46132
46388
  };
46133
46389
  }
@@ -46142,7 +46398,7 @@ async function exportsIndex() {
46142
46398
  async function exportShow(context) {
46143
46399
  return {
46144
46400
  kind: "export",
46145
- export: printable(await platformBillingExportShow({ path: { exportUuid: requiredFlag$2(context, "--uuid") } }).unwrap())
46401
+ export: printable(await platformBillingExportShow({ path: { exportUuid: requiredFlag$3(context, "--uuid") } }).unwrap())
46146
46402
  };
46147
46403
  }
46148
46404
  /** The saved mappings a request can name. */
@@ -46154,9 +46410,9 @@ async function exportProfiles() {
46154
46410
  }
46155
46411
  /** Queue one pack for a window. */
46156
46412
  async function exportRequest(context) {
46157
- const profile = requiredFlag$2(context, "--export-profile");
46158
- const from = requiredFlag$2(context, "--from");
46159
- const to = requiredFlag$2(context, "--to");
46413
+ const profile = requiredFlag$3(context, "--export-profile");
46414
+ const from = requiredFlag$3(context, "--from");
46415
+ const to = requiredFlag$3(context, "--to");
46160
46416
  return {
46161
46417
  kind: "write",
46162
46418
  outcome: await confirmableWrite(context, `Request an export pack for ${from} to ${to} using profile ${profile}. It is queued, not written here, and it covers only the documents the request selects.`, async () => printable(await platformBillingExportStore({ body: {
@@ -46526,11 +46782,11 @@ function changeDescription(preview) {
46526
46782
  return `Change the ${preview.product} list price for ${preview.packageKey} from ${randAmount(preview.currentAmountCents)} to ${randAmount(preview.newAmountCents)} from ${preview.effectiveOn} (${preview.effectiveFrom}). ${reach} ${preview.existingCustomerCount} existing customers, ${preview.keepingPriceCount} keeping their price.`;
46527
46783
  }
46528
46784
  async function changeRate(context) {
46529
- const on = requiredFlag$2(context, "--on");
46785
+ const on = requiredFlag$3(context, "--on");
46530
46786
  if (!/^\d{4}-\d{2}-\d{2}$/.test(on)) throw new UsageError(`--on must be a day, written YYYY-MM-DD (got ${on}).\n\n${BILLING_USAGE}`);
46531
46787
  const body = {
46532
46788
  product: product$1(context),
46533
- packageKey: requiredFlag$2(context, "--package"),
46789
+ packageKey: requiredFlag$3(context, "--package"),
46534
46790
  amountCents: randToCents$1(context, "--amount"),
46535
46791
  effectiveOn: on,
46536
46792
  existingCustomers: context.flags.has("--applies-to-all") ? billingRateExistingCustomerRuleEnum.applies_to_all : billingRateExistingCustomerRuleEnum.grandfathered
@@ -46574,7 +46830,7 @@ function optional$3(context, flag) {
46574
46830
  * transitions sit on, so it needs no authority a transition does not.
46575
46831
  */
46576
46832
  async function refundFor(context, company) {
46577
- const refundUuid = requiredFlag$2(context, "--refund");
46833
+ const refundUuid = requiredFlag$3(context, "--refund");
46578
46834
  const refund = (await platformBillingRefundIndex({ path: { company } }).unwrap()).items.find((one) => one.uuid === refundUuid);
46579
46835
  if (refund === void 0) throw new UsageError(`No return ${refundUuid} is recorded for ${company}.\n\n\`billing refunds --company ${company}\` lists the returns and their uuids.\n\n${BILLING_USAGE}`);
46580
46836
  return refund;
@@ -46602,7 +46858,7 @@ async function platformRefunds(context) {
46602
46858
  async function refundRequest(context) {
46603
46859
  const company = await requireCompany(context.flags);
46604
46860
  const amountCents = randToCents$1(context, "--amount");
46605
- const reason = requiredFlag$2(context, "--reason");
46861
+ const reason = requiredFlag$3(context, "--reason");
46606
46862
  const requestKey = optional$3(context, "--request-key");
46607
46863
  if (requestKey === null) throw new UsageError(`--request-key is required: it is what makes a retried request answer the same return instead of asking for the same money twice.\n\n${BILLING_USAGE}`);
46608
46864
  return {
@@ -46641,7 +46897,7 @@ async function refundSubmit(context) {
46641
46897
  async function refundSettle(context) {
46642
46898
  const company = await requireCompany(context.flags);
46643
46899
  const refund = await refundFor(context, company);
46644
- const reference = requiredFlag$2(context, "--provider-refund-reference");
46900
+ const reference = requiredFlag$3(context, "--provider-refund-reference");
46645
46901
  return {
46646
46902
  kind: "refundSettled",
46647
46903
  outcome: await confirmableWrite(context, [
@@ -46661,7 +46917,7 @@ async function refundSettle(context) {
46661
46917
  async function refundRefuse(context) {
46662
46918
  const company = await requireCompany(context.flags);
46663
46919
  const refund = await refundFor(context, company);
46664
- const note = requiredFlag$2(context, "--note");
46920
+ const note = requiredFlag$3(context, "--note");
46665
46921
  return {
46666
46922
  kind: "refundRefused",
46667
46923
  outcome: await confirmableWrite(context, [
@@ -46681,7 +46937,7 @@ async function refundRefuse(context) {
46681
46937
  async function refundUnknown(context) {
46682
46938
  const company = await requireCompany(context.flags);
46683
46939
  const refund = await refundFor(context, company);
46684
- const note = requiredFlag$2(context, "--note");
46940
+ const note = requiredFlag$3(context, "--note");
46685
46941
  return {
46686
46942
  kind: "refundUnknown",
46687
46943
  outcome: await confirmableWrite(context, [
@@ -46825,7 +47081,7 @@ async function run$1(context, rest) {
46825
47081
  kind: "run",
46826
47082
  run: await platformBillingRunShow({ path: {
46827
47083
  company: await requireCompany(context.flags),
46828
- localPeriod: requiredFlag$2(context, "--period")
47084
+ localPeriod: requiredFlag$3(context, "--period")
46829
47085
  } }).unwrap()
46830
47086
  };
46831
47087
  }
@@ -46850,7 +47106,7 @@ async function invoice(context, rest) {
46850
47106
  kind: "invoice",
46851
47107
  invoice: await platformBillingInvoiceShow({ path: {
46852
47108
  company: await requireCompany(context.flags),
46853
- invoiceUuid: requiredFlag$2(context, "--uuid")
47109
+ invoiceUuid: requiredFlag$3(context, "--uuid")
46854
47110
  } }).unwrap()
46855
47111
  };
46856
47112
  }
@@ -47281,7 +47537,7 @@ async function request(context, environmentUuid) {
47281
47537
  const timing = timingFlag(context);
47282
47538
  const serviceEnd = serviceEndFlag(context, timing);
47283
47539
  const reviewGeneration = generationFlag$3(context);
47284
- const reason = requiredFlag$1(context, "--reason", "request needs --reason");
47540
+ const reason = requiredFlag$2(context, "--reason", "request needs --reason");
47285
47541
  return await confirmableWrite(context, requestDescription({
47286
47542
  environmentUuid,
47287
47543
  timing,
@@ -47330,7 +47586,7 @@ async function withdraw(context, environmentUuid, cancellationUuid) {
47330
47586
  */
47331
47587
  async function reconfirm(context, environmentUuid, cancellationUuid) {
47332
47588
  const reviewGeneration = generationFlag$3(context);
47333
- const inventoryDigest = requiredFlag$1(context, "--digest", "reconfirm needs --digest, the inventoryDigest from the review it approves");
47589
+ const inventoryDigest = requiredFlag$2(context, "--digest", "reconfirm needs --digest, the inventoryDigest from the review it approves");
47334
47590
  return await confirmableWrite(context, reconfirmDescription(environmentUuid, cancellationUuid, reviewGeneration, inventoryDigest), async () => {
47335
47591
  return (await hostingCancellationReconfirm({
47336
47592
  path: {
@@ -47347,7 +47603,7 @@ async function reconfirm(context, environmentUuid, cancellationUuid) {
47347
47603
  });
47348
47604
  }
47349
47605
  /** One flag that must name a value, refused before any request rather than sent blank. */
47350
- function requiredFlag$1(context, flag, message) {
47606
+ function requiredFlag$2(context, flag, message) {
47351
47607
  const value = context.flags.get(flag)?.trim() ?? "";
47352
47608
  if (value === "") throw new UsageError(`${message}.\n\n${CANCELLATION_USAGE}`);
47353
47609
  return value;
@@ -48227,6 +48483,381 @@ function createCompletionCommand(specs) {
48227
48483
  };
48228
48484
  }
48229
48485
  //#endregion
48486
+ //#region src/commands/compliance-metadata.ts
48487
+ /**
48488
+ * `compliance` — a company's SOC 2 and POPIA checklist, its own duties, our operator terms, the documents it
48489
+ * generates, its scans, security notices and the signed evidence archive.
48490
+ */
48491
+ var COMPLIANCE_USAGE = [
48492
+ "Usage: hostingctl compliance checklist --company <slug> [--framework popia|soc2]",
48493
+ " hostingctl compliance tick <item> --company <slug> [--note <text>]",
48494
+ " hostingctl compliance untick <item> --company <slug>",
48495
+ " hostingctl compliance terms --company <slug>",
48496
+ " hostingctl compliance terms accept <version> --company <slug>",
48497
+ " hostingctl compliance document <name> --company <slug> --out <file> [--format markdown|pdf]",
48498
+ " hostingctl compliance evidence --company <slug> --from <YYYY-MM-DD> --until <YYYY-MM-DD> --out <file>",
48499
+ " hostingctl compliance scans --company <slug>",
48500
+ " hostingctl compliance scans run --company <slug>",
48501
+ " hostingctl compliance notices --company <slug>",
48502
+ " hostingctl compliance notices raise --company <slug> --environment <uuid>[,<uuid>...] --nature <text>",
48503
+ " --data-categories <text> --people <about> --records <about> --consequences <text> --measures <text>",
48504
+ " --contact <address> [--believed-from <ISO time>] (platform operators only)",
48505
+ " hostingctl compliance notices resolve <notice-uuid> --company <slug> (platform operators only)",
48506
+ " hostingctl compliance calendar --company <slug>",
48507
+ " hostingctl compliance calendar subscribe|revoke --company <slug>",
48508
+ " hostingctl compliance reminders on|off --company <slug>",
48509
+ "",
48510
+ " checklist How many items are open, then each item's state and the one action that closes it.",
48511
+ " tick Mark one of your own duties done, with an optional note or link; untick marks it open.",
48512
+ " terms Our POPIA operator terms: whether a version is offered and whether you accepted it.",
48513
+ " document responsibility-matrix, data-location-statement, checklist-report or operator-terms.",
48514
+ " evidence The signed ZIP of the records behind the checklist for a period.",
48515
+ " scans The latest scan of each target; `scans run` queues a fresh run.",
48516
+ " notices Security-compromise notices we have sent this company.",
48517
+ " calendar Your own private calendar feed; `subscribe` prints its links once.",
48518
+ " reminders Turn your own reminder email on or off.",
48519
+ "",
48520
+ "Every write needs --confirm; --dry-run describes it and sends nothing. Observed items cannot be ticked:",
48521
+ "they close when the underlying setting is fixed."
48522
+ ].join("\n");
48523
+ var COMPLIANCE_METADATA = {
48524
+ name: "compliance",
48525
+ summary: "A company's SOC 2 and POPIA checklist, duties, operator terms, documents, scans and evidence.",
48526
+ usage: COMPLIANCE_USAGE,
48527
+ flags: [
48528
+ {
48529
+ name: "--framework",
48530
+ takesValue: true,
48531
+ description: "Show only popia or soc2 items."
48532
+ },
48533
+ {
48534
+ name: "--note",
48535
+ takesValue: true,
48536
+ description: "A note or link recorded with a tick."
48537
+ },
48538
+ {
48539
+ name: "--format",
48540
+ takesValue: true,
48541
+ description: "markdown (default) or pdf."
48542
+ },
48543
+ {
48544
+ name: "--out",
48545
+ takesValue: true,
48546
+ description: "The file a document or the evidence archive is written to."
48547
+ },
48548
+ {
48549
+ name: "--from",
48550
+ takesValue: true,
48551
+ description: "The first day of the evidence period."
48552
+ },
48553
+ {
48554
+ name: "--until",
48555
+ takesValue: true,
48556
+ description: "The last day of the evidence period."
48557
+ },
48558
+ {
48559
+ name: "--environment",
48560
+ takesValue: true,
48561
+ description: "The affected environment uuids, comma-separated."
48562
+ },
48563
+ {
48564
+ name: "--nature",
48565
+ takesValue: true,
48566
+ description: "What happened, as far as we know."
48567
+ },
48568
+ {
48569
+ name: "--data-categories",
48570
+ takesValue: true,
48571
+ description: "The kinds of personal information affected."
48572
+ },
48573
+ {
48574
+ name: "--people",
48575
+ takesValue: true,
48576
+ description: "About how many people are affected."
48577
+ },
48578
+ {
48579
+ name: "--records",
48580
+ takesValue: true,
48581
+ description: "About how many records are affected."
48582
+ },
48583
+ {
48584
+ name: "--consequences",
48585
+ takesValue: true,
48586
+ description: "The likely consequences for the people affected."
48587
+ },
48588
+ {
48589
+ name: "--measures",
48590
+ takesValue: true,
48591
+ description: "What we have done about it."
48592
+ },
48593
+ {
48594
+ name: "--contact",
48595
+ takesValue: true,
48596
+ description: "Who the client contacts about the notice."
48597
+ },
48598
+ {
48599
+ name: "--believed-from",
48600
+ takesValue: true,
48601
+ description: "When we believe the access began (ISO 8601)."
48602
+ }
48603
+ ],
48604
+ subcommands: [
48605
+ "checklist",
48606
+ "tick",
48607
+ "untick",
48608
+ "terms",
48609
+ "document",
48610
+ "evidence",
48611
+ "scans",
48612
+ "notices",
48613
+ "calendar",
48614
+ "reminders"
48615
+ ]
48616
+ };
48617
+ //#endregion
48618
+ //#region src/commands/compliance-arguments.ts
48619
+ /** A flag the subcommand cannot run without; its absence is a usage error that repeats the usage. */
48620
+ function requiredFlag$1(context, flag) {
48621
+ const value = context.flags.get(flag) ?? "";
48622
+ if (value === "") throw new UsageError(`${flag} is required.\n\n${COMPLIANCE_USAGE}`);
48623
+ return value;
48624
+ }
48625
+ /** Every compliance write reports the same shape, whether it was sent or only described. */
48626
+ function complianceWrite(outcome) {
48627
+ return {
48628
+ kind: "write",
48629
+ outcome
48630
+ };
48631
+ }
48632
+ //#endregion
48633
+ //#region src/commands/compliance-text.ts
48634
+ var STATE$1 = {
48635
+ met: "met",
48636
+ not_met: "NOT MET",
48637
+ not_observable: "not observable",
48638
+ informational: "for your records",
48639
+ done: "done",
48640
+ open: "OPEN"
48641
+ };
48642
+ /** The Compliance page in plain text: the open total first, then each item with the one action that closes it. */
48643
+ function complianceText(report) {
48644
+ switch (report.kind) {
48645
+ case "checklist": return checklistText(report.checklist, report.framework ?? report.checklist.defaultFramework);
48646
+ case "terms": return termsText(report.terms);
48647
+ case "scans": return report.scans.latest.length === 0 ? "No scan has run yet." : report.scans.latest.map((result) => `${result.outcome.padEnd(8)} ${result.kind.padEnd(22)} ${result.target} ${result.summary}`).join("\n");
48648
+ case "notices": return noticesText(report.notices);
48649
+ case "calendar": return calendarText(report.state);
48650
+ case "saved": return `Wrote ${report.filename} (${report.contentType}) to ${report.file}.`;
48651
+ case "write": return renderWriteOutcome(report.outcome, writeResultText);
48652
+ }
48653
+ }
48654
+ function termsText(terms) {
48655
+ const position = terms.position;
48656
+ if (position.offeredVersion === null || position.offeredVersion === void 0) return "Operator terms: no version is offered at the moment.";
48657
+ return position.acceptedVersion === position.offeredVersion ? `Operator terms ${position.acceptedVersion} accepted by ${position.acceptedBy ?? "a former member"} at ${position.acceptedAt ?? ""}.` : `Operator terms ${position.offeredVersion} are offered and not accepted. Accept with: hostingctl compliance terms accept ${position.offeredVersion}`;
48658
+ }
48659
+ function noticesText(list) {
48660
+ if (list.notices.length === 0) return "No security notice has been sent to this company.";
48661
+ return list.notices.map((notice) => `${notice.raisedAt} ${notice.environmentName} ${notice.resolvedAt === null ? "OPEN" : "resolved"}\n ${notice.details.nature}\n Done: ${notice.details.measuresTaken}\n Contact: ${notice.details.contact}`).join("\n\n");
48662
+ }
48663
+ function calendarText(state) {
48664
+ return [state.feed ? `Calendar feed created ${state.feed.createdAt}; last read ${state.feed.lastReadAt ?? "never"}.` : "No calendar feed. Create one with: hostingctl compliance calendar subscribe --confirm", `Reminder email: ${state.reminderEmails ? "on" : "off"}.`].join("\n");
48665
+ }
48666
+ function writeResultText(result) {
48667
+ if ("googleCalendarUrl" in result) return `Feed links (shown only now):\n ${result.httpsUrl}\n ${result.webcalUrl}\n ${result.googleCalendarUrl}`;
48668
+ if ("message" in result) return result.message;
48669
+ if ("notices" in result) return `Raised ${result.notices.length} notice(s); the owners were told.`;
48670
+ return "Done.";
48671
+ }
48672
+ function checklistText(checklist, framework) {
48673
+ const items = checklist.items.filter((item) => framework === "soc2" ? item.tscCriteria !== "" : item.popiaSections !== "");
48674
+ const open = items.filter((item) => item.state === "not_met" || item.state === "open").length;
48675
+ const lines = [`${checklist.companyName}: ${open} items open (${framework === "soc2" ? "SOC 2" : "POPIA"} view, as of ${checklist.asOf}).`, ""];
48676
+ for (const item of items) {
48677
+ lines.push(`${(STATE$1[item.state] ?? item.state).padEnd(16)} ${item.slug} ${item.name}`);
48678
+ lines.push(`${"".padEnd(17)}${item.detail}`);
48679
+ for (const finding of item.findings) lines.push(`${"".padEnd(19)}- ${finding}`);
48680
+ if (item.state === "not_met" || item.state === "open") lines.push(`${"".padEnd(17)}→ ${item.closingAction}`);
48681
+ }
48682
+ return lines.join("\n");
48683
+ }
48684
+ //#endregion
48685
+ //#region src/commands/compliance-writes.ts
48686
+ /**
48687
+ * The operator's POPIA s21(2) notice. It needs platform client-management authority; the company's owners are
48688
+ * told at once in the product and by email.
48689
+ */
48690
+ async function notice(context, company, tail) {
48691
+ if (tail[0] === "resolve") {
48692
+ const noticeUuid = tail[1] ?? "";
48693
+ if (noticeUuid === "") throw new UsageError(COMPLIANCE_USAGE);
48694
+ return complianceWrite(await confirmableWrite(context, `Resolve security notice ${noticeUuid} for ${company}.`, async () => (await securityCompromiseResolve({ path: {
48695
+ company,
48696
+ noticeUuid
48697
+ } })).data));
48698
+ }
48699
+ const environmentUuids = requiredFlag$1(context, "--environment").split(",").map((uuid) => uuid.trim()).filter((uuid) => uuid !== "");
48700
+ const body = {
48701
+ environmentUuids,
48702
+ nature: requiredFlag$1(context, "--nature"),
48703
+ dataCategories: requiredFlag$1(context, "--data-categories"),
48704
+ approximateDataSubjects: requiredFlag$1(context, "--people"),
48705
+ approximateRecords: requiredFlag$1(context, "--records"),
48706
+ likelyConsequences: requiredFlag$1(context, "--consequences"),
48707
+ measuresTaken: requiredFlag$1(context, "--measures"),
48708
+ contact: requiredFlag$1(context, "--contact"),
48709
+ believedFrom: context.flags.get("--believed-from") ?? null
48710
+ };
48711
+ return complianceWrite(await confirmableWrite(context, `Tell ${company}'s owners now that the data of ${environmentUuids.length} environment(s) may have been accessed by an unauthorized person.`, async () => (await securityCompromiseStore({
48712
+ path: { company },
48713
+ body
48714
+ })).data));
48715
+ }
48716
+ async function calendar(context, company, action) {
48717
+ const path = { company };
48718
+ if (action === void 0) return {
48719
+ kind: "calendar",
48720
+ state: (await complianceCalendarFeedShow({ path })).data
48721
+ };
48722
+ if (action === "subscribe") return complianceWrite(await confirmableWrite(context, `Create your calendar feed for ${company}; any earlier link stops working.`, async () => (await complianceCalendarFeedIssue({ path })).data));
48723
+ if (action !== "revoke") throw new UsageError(COMPLIANCE_USAGE);
48724
+ const feed = (await complianceCalendarFeedShow({ path })).data.feed;
48725
+ if (feed === null || feed === void 0) throw new UsageError("You have no calendar feed for this company.");
48726
+ return complianceWrite(await confirmableWrite(context, `Revoke your calendar feed for ${company}.`, async () => (await complianceCalendarFeedRevoke({ path: {
48727
+ company,
48728
+ feedUuid: feed.uuid
48729
+ } })).data));
48730
+ }
48731
+ async function reminders(context, company, choice) {
48732
+ if (choice !== "on" && choice !== "off") throw new UsageError(COMPLIANCE_USAGE);
48733
+ return complianceWrite(await confirmableWrite(context, `Turn your reminder email ${choice} for ${company}.`, async () => (await complianceReminderEmailsUpdate({
48734
+ path: { company },
48735
+ body: { enabled: choice === "on" }
48736
+ })).data));
48737
+ }
48738
+ //#endregion
48739
+ //#region src/commands/export-file.ts
48740
+ /**
48741
+ * Write an exported pattern to the path `--out` named.
48742
+ *
48743
+ * The document is portable setup intent with no secret value, but a failed write still names only the
48744
+ * path: an export that could not be saved must not dump the customer's pattern into an error. The
48745
+ * target is the caller's own path, so it is written as given rather than into a managed location.
48746
+ */
48747
+ function writeExportFile(file, contents, mode = 420) {
48748
+ try {
48749
+ writeFileSync(file, contents, typeof contents === "string" ? {
48750
+ encoding: "utf8",
48751
+ mode
48752
+ } : { mode });
48753
+ } catch {
48754
+ throw new UsageError(`Could not write the export file [${file}].`);
48755
+ }
48756
+ }
48757
+ //#endregion
48758
+ //#region src/commands/compliance.ts
48759
+ var DOCUMENTS$1 = [
48760
+ "responsibility-matrix",
48761
+ "data-location-statement",
48762
+ "checklist-report",
48763
+ "operator-terms"
48764
+ ];
48765
+ /**
48766
+ * `compliance` — the Compliance page from a terminal. Reads are `company.view`; ticking a duty, accepting the
48767
+ * terms and running scans are `company.update`; the evidence archive needs `company.activity.view`.
48768
+ */
48769
+ var compliance = {
48770
+ ...COMPLIANCE_METADATA,
48771
+ async run(context) {
48772
+ const [group, ...tail] = context.positional;
48773
+ const company = await requireCompany(context.flags);
48774
+ const path = { company };
48775
+ switch (group) {
48776
+ case "checklist": return {
48777
+ kind: "checklist",
48778
+ checklist: (await complianceChecklistShow({ path })).data,
48779
+ framework: context.flags.get("--framework") ?? null
48780
+ };
48781
+ case "tick":
48782
+ case "untick": return await tick(context, company, tail, group === "tick");
48783
+ case "terms": return await terms(context, company, tail);
48784
+ case "document": return await document(context, company, tail[0]);
48785
+ case "evidence": return saved(context, (await complianceEvidenceExport({
48786
+ path,
48787
+ query: {
48788
+ from: requiredFlag$1(context, "--from"),
48789
+ until: requiredFlag$1(context, "--until")
48790
+ }
48791
+ })).data);
48792
+ case "scans":
48793
+ if (tail[0] === "run") return complianceWrite(await confirmableWrite(context, `Queue a scan of ${company}'s published addresses, mail domains and images.`, async () => (await complianceScansStore({ path })).data));
48794
+ return {
48795
+ kind: "scans",
48796
+ scans: (await complianceScansIndex({ path })).data
48797
+ };
48798
+ case "notices":
48799
+ if (tail[0] === "raise" || tail[0] === "resolve") return await notice(context, company, tail);
48800
+ return {
48801
+ kind: "notices",
48802
+ notices: (await complianceSecurityCompromisesIndex({ path })).data
48803
+ };
48804
+ case "calendar": return await calendar(context, company, tail[0]);
48805
+ case "reminders": return await reminders(context, company, tail[0]);
48806
+ default: throw new UsageError(COMPLIANCE_USAGE);
48807
+ }
48808
+ },
48809
+ human: complianceText
48810
+ };
48811
+ async function tick(context, company, tail, ticked) {
48812
+ const item = tail[0] ?? "";
48813
+ if (item === "") throw new UsageError(COMPLIANCE_USAGE);
48814
+ const note = context.flags.get("--note") ?? null;
48815
+ return complianceWrite(await confirmableWrite(context, ticked ? `Mark ${item} done for ${company}${note === null ? "" : ` with the note "${note}"`}.` : `Mark ${item} open again for ${company}.`, async () => (await complianceChecklistTick({
48816
+ path: {
48817
+ company,
48818
+ item
48819
+ },
48820
+ body: {
48821
+ ticked,
48822
+ note
48823
+ }
48824
+ })).data));
48825
+ }
48826
+ async function terms(context, company, tail) {
48827
+ if (tail[0] === void 0) return {
48828
+ kind: "terms",
48829
+ terms: (await complianceOperatorTermsShow({ path: { company } })).data
48830
+ };
48831
+ const version = tail[1] ?? "";
48832
+ if (tail[0] !== "accept" || version === "") throw new UsageError(COMPLIANCE_USAGE);
48833
+ return complianceWrite(await confirmableWrite(context, `Accept operator terms version ${version} on behalf of ${company}; your name and the time are recorded.`, async () => (await complianceOperatorTermsAccept({
48834
+ path: { company },
48835
+ body: { version }
48836
+ })).data));
48837
+ }
48838
+ async function document(context, company, name) {
48839
+ if (name === void 0 || !DOCUMENTS$1.includes(name)) throw new UsageError(`Name one document: ${DOCUMENTS$1.join(", ")}.`);
48840
+ const format = context.flags.get("--format") ?? "markdown";
48841
+ if (format !== "markdown" && format !== "pdf") throw new UsageError("--format is markdown or pdf.");
48842
+ return saved(context, (await complianceDocumentsShow({
48843
+ path: {
48844
+ company,
48845
+ document: name
48846
+ },
48847
+ query: { format }
48848
+ })).data);
48849
+ }
48850
+ function saved(context, file) {
48851
+ const out = requiredFlag$1(context, "--out");
48852
+ writeExportFile(out, file.encoding === "base64" ? Buffer.from(file.content, "base64") : Buffer.from(file.content, "utf8"), 384);
48853
+ return {
48854
+ kind: "saved",
48855
+ file: out,
48856
+ filename: file.filename,
48857
+ contentType: file.contentType
48858
+ };
48859
+ }
48860
+ //#endregion
48230
48861
  //#region src/commands/deletion-lock-text.ts
48231
48862
  var DELETION_LOCK_USAGE = [
48232
48863
  "Usage: hostingctl deletion-lock environment <environment-uuid> --company <slug> --generation <n> [--unlock]",
@@ -52747,25 +53378,6 @@ function invalidGenerationSettings() {
52747
53378
  return new UsageError("The declared secret generate settings are invalid; use base64url/hex bytes 16..256, alphanumeric length 22..256, or laravel-app-key without sizes.");
52748
53379
  }
52749
53380
  //#endregion
52750
- //#region src/commands/export-file.ts
52751
- /**
52752
- * Write an exported pattern to the path `--out` named.
52753
- *
52754
- * The document is portable setup intent with no secret value, but a failed write still names only the
52755
- * path: an export that could not be saved must not dump the customer's pattern into an error. The
52756
- * target is the caller's own path, so it is written as given rather than into a managed location.
52757
- */
52758
- function writeExportFile(file, contents, mode = 420) {
52759
- try {
52760
- writeFileSync(file, contents, {
52761
- encoding: "utf8",
52762
- mode
52763
- });
52764
- } catch {
52765
- throw new UsageError(`Could not write the export file [${file}].`);
52766
- }
52767
- }
52768
- //#endregion
52769
53381
  //#region src/commands/environment-secrets-local-env.ts
52770
53382
  /** The env file for a page's declared secrets. Pure, so the projection is provable without a filesystem. */
52771
53383
  function localEnvDocument(page, environmentUuid) {
@@ -61786,6 +62398,192 @@ var completeGitHubConnectionRequestSchema = object({
61786
62398
  installationId: int().min(1).nullish(),
61787
62399
  state: string().max(255)
61788
62400
  }).describe("What GitHub returned to the browser, forwarded by the signed-in administrator.\n\nNone of these values is trusted: the state binds the attempt to the requester and the\ninstallation is proven against GitHub's own answer before it is recorded.");
62401
+ var complianceCalendarFeedDataSchema = object({
62402
+ uuid: string(),
62403
+ createdAt: string(),
62404
+ lastReadAt: string().nullable()
62405
+ });
62406
+ var complianceCalendarFeedIssuedDataSchema = object({
62407
+ feed: complianceCalendarFeedDataSchema,
62408
+ httpsUrl: string(),
62409
+ webcalUrl: string(),
62410
+ googleCalendarUrl: string()
62411
+ });
62412
+ object({
62413
+ feed: union([complianceCalendarFeedDataSchema, _null()]),
62414
+ reminderEmails: boolean()
62415
+ });
62416
+ var complianceFrameworkEnumSchema = _enum(["soc2", "popia"]).describe("The two sets of references a checklist item carries; the view filters by one of them.\n");
62417
+ var complianceItemKindEnumSchema = _enum([
62418
+ "observed",
62419
+ "client",
62420
+ "platform"
62421
+ ]);
62422
+ var complianceItemStateEnumSchema = _enum([
62423
+ "met",
62424
+ "not_met",
62425
+ "not_observable",
62426
+ "informational",
62427
+ "done",
62428
+ "open"
62429
+ ]).describe("What a checklist item says now. Observed items answer `met`, `not_met`, `not_observable` or `informational` (a fact to record, never a failure). Client and platform duties answer `done` or `open`; a recurring duty whose period lapsed is `open` again. Only `not_met` and `open` count towards the open total.\n");
62430
+ var complianceChecklistItemDataSchema = object({
62431
+ slug: string(),
62432
+ kind: complianceItemKindEnumSchema,
62433
+ name: string(),
62434
+ description: string(),
62435
+ tscCriteria: string(),
62436
+ popiaSections: string(),
62437
+ state: complianceItemStateEnumSchema.describe("What a checklist item says now. Observed items answer `met`, `not_met`, `not_observable` or `informational` (a fact to record, never a failure). Client and platform duties answer `done` or `open`; a recurring duty whose period lapsed is `open` again. Only `not_met` and `open` count towards the open total.\n"),
62438
+ detail: string(),
62439
+ findings: array(string()),
62440
+ closingAction: string(),
62441
+ guidanceUrl: string().nullable(),
62442
+ recurrenceMonths: int().nullable(),
62443
+ tickedAt: string().nullable(),
62444
+ tickedBy: string().nullable(),
62445
+ note: string().nullable(),
62446
+ dueAt: string().nullable()
62447
+ });
62448
+ var complianceMemberAccessDataSchema = object({
62449
+ userUuid: string(),
62450
+ name: string(),
62451
+ email: string(),
62452
+ role: string(),
62453
+ strongAuthEnrolled: boolean(),
62454
+ lastActiveAt: string().nullable()
62455
+ });
62456
+ var complianceLocationDataSchema = object({
62457
+ provider: string(),
62458
+ countryCode: string(),
62459
+ country: string(),
62460
+ facility: string()
62461
+ });
62462
+ var complianceEnvironmentLocationDataSchema = object({
62463
+ environmentUuid: string(),
62464
+ environmentName: string(),
62465
+ cluster: union([complianceLocationDataSchema, _null()]),
62466
+ backups: union([complianceLocationDataSchema, _null()])
62467
+ });
62468
+ var complianceOperatorTermsDataSchema = object({
62469
+ offeredVersion: string().nullable(),
62470
+ acceptedVersion: string().nullable(),
62471
+ acceptedAt: string().nullable(),
62472
+ acceptedBy: string().nullable()
62473
+ });
62474
+ object({
62475
+ companySlug: string(),
62476
+ companyName: string(),
62477
+ asOf: string(),
62478
+ defaultFramework: complianceFrameworkEnumSchema.describe("The two sets of references a checklist item carries; the view filters by one of them.\n"),
62479
+ openCount: int(),
62480
+ items: array(complianceChecklistItemDataSchema),
62481
+ members: array(complianceMemberAccessDataSchema),
62482
+ locations: array(complianceEnvironmentLocationDataSchema),
62483
+ operatorTerms: complianceOperatorTermsDataSchema
62484
+ });
62485
+ var complianceCompromiseDetailsDataSchema = object({
62486
+ nature: string(),
62487
+ dataCategories: string(),
62488
+ approximateDataSubjects: string(),
62489
+ approximateRecords: string(),
62490
+ likelyConsequences: string(),
62491
+ measuresTaken: string(),
62492
+ contact: string(),
62493
+ believedFrom: string().nullable()
62494
+ });
62495
+ object({ notices: array(object({
62496
+ uuid: string(),
62497
+ environmentUuid: string(),
62498
+ environmentName: string(),
62499
+ raisedAt: string(),
62500
+ resolvedAt: string().nullable(),
62501
+ details: complianceCompromiseDetailsDataSchema
62502
+ })) });
62503
+ object({
62504
+ filename: string(),
62505
+ contentType: string(),
62506
+ encoding: string(),
62507
+ content: string()
62508
+ });
62509
+ var complianceDocumentFormatEnumSchema = _enum(["markdown", "pdf"]).describe("Markdown is always available; PDF needs the configured document renderer.\n");
62510
+ object({
62511
+ algorithm: string(),
62512
+ publicKey: string()
62513
+ });
62514
+ var complianceScanFindingDataSchema = object({
62515
+ code: string(),
62516
+ detail: string()
62517
+ });
62518
+ var complianceScanKindEnumSchema = _enum([
62519
+ "tls_certificate",
62520
+ "http_security_headers",
62521
+ "email_domain",
62522
+ "image_vulnerabilities",
62523
+ "exposed_ports"
62524
+ ]);
62525
+ var complianceScanOutcomeEnumSchema = _enum([
62526
+ "passed",
62527
+ "findings",
62528
+ "not_run"
62529
+ ]);
62530
+ object({
62531
+ latest: array(object({
62532
+ uuid: string(),
62533
+ kind: complianceScanKindEnumSchema,
62534
+ outcome: complianceScanOutcomeEnumSchema,
62535
+ target: string(),
62536
+ environmentUuid: string().nullable(),
62537
+ summary: string(),
62538
+ findings: array(complianceScanFindingDataSchema),
62539
+ scannedAt: string()
62540
+ })),
62541
+ lastScannedAt: string().nullable()
62542
+ });
62543
+ var complianceTickRequestSchema = object({
62544
+ ticked: boolean(),
62545
+ note: string().max(500).nullish()
62546
+ }).describe("Ticking or unticking one duty, with an optional note or link such as a registration number.");
62547
+ var complianceUpcomingActionEnumSchema = _enum([
62548
+ "tick_off",
62549
+ "renew",
62550
+ "upgrade",
62551
+ "pay",
62552
+ "open"
62553
+ ]).describe("The one action an Upcoming entry offers.\n");
62554
+ var complianceUpcomingCategoryEnumSchema = _enum([
62555
+ "popia",
62556
+ "soc2",
62557
+ "domains",
62558
+ "certificates",
62559
+ "runtimes",
62560
+ "billing",
62561
+ "platform"
62562
+ ]).describe("The tag an Upcoming entry carries, and the filter the list offers.\n");
62563
+ var complianceUpcomingSectionEnumSchema = _enum([
62564
+ "overdue",
62565
+ "next_30_days",
62566
+ "later"
62567
+ ]).describe("Where an entry sits on the agenda: overdue stays visible until it is resolved.\n");
62568
+ var complianceUpcomingEntryDataSchema = object({
62569
+ id: string(),
62570
+ date: string(),
62571
+ title: string(),
62572
+ category: complianceUpcomingCategoryEnumSchema.describe("The tag an Upcoming entry carries, and the filter the list offers.\n"),
62573
+ appliesTo: string(),
62574
+ environmentUuid: string().nullable(),
62575
+ action: complianceUpcomingActionEnumSchema.describe("The one action an Upcoming entry offers.\n"),
62576
+ actionPath: string(),
62577
+ section: complianceUpcomingSectionEnumSchema.describe("Where an entry sits on the agenda: overdue stays visible until it is resolved.\n"),
62578
+ itemSlug: string().nullable()
62579
+ });
62580
+ object({
62581
+ asOf: string(),
62582
+ overdueCount: int(),
62583
+ next30DaysCount: int(),
62584
+ summary: string(),
62585
+ entries: array(complianceUpcomingEntryDataSchema)
62586
+ });
61789
62587
  var emailMailboxImportFormatEnumSchema = _enum(["csv", "yaml"]).describe("The declared format of a bulk mailbox import document. CSV and YAML declare the same catalog-backed fields and reach the same validation and creation path, so the format names only how the declarations are parsed.\n");
61790
62588
  var confirmEmailMailboxImportRequestSchema = object({
61791
62589
  format: emailMailboxImportFormatEnumSchema.describe("The declared format of a bulk mailbox import document. CSV and YAML declare the same catalog-backed fields and reach the same validation and creation path, so the format names only how the declarations are parsed.\n"),
@@ -62679,7 +63477,9 @@ var emailKindEnumSchema = _enum([
62679
63477
  "platform-alert",
62680
63478
  "billing-price-increase-notice",
62681
63479
  "billing-price-increase-cancelled",
62682
- "contact-message"
63480
+ "contact-message",
63481
+ "security-compromise",
63482
+ "compliance-reminder"
62683
63483
  ]);
62684
63484
  var emailMailboxQuotaEnumSchema = _enum([
62685
63485
  "gb-5",
@@ -63313,7 +64113,8 @@ var hostingApplicationAddressDataSchema = object({
63313
64113
  routePending: boolean(),
63314
64114
  additionalAddresses: array(hostingApplicationAdditionalAddressDataSchema),
63315
64115
  publishedUrl: string().nullable(),
63316
- temporaryLoginSupported: boolean()
64116
+ temporaryLoginSupported: boolean(),
64117
+ resolves: boolean()
63317
64118
  });
63318
64119
  var hostingCuratedComponentOutputDataSchema = object({
63319
64120
  name: string(),
@@ -64250,7 +65051,8 @@ var hostingConfigurationApplicationPreviewDataSchema = object({
64250
65051
  createsApplication: boolean(),
64251
65052
  adoptsApplication: boolean(),
64252
65053
  addsDatabase: boolean(),
64253
- resources: union([hostingResourceDataSchema, _null()])
65054
+ resources: union([hostingResourceDataSchema, _null()]),
65055
+ unappliedDeclaredResources: union([hostingResourceDataSchema, _null()])
64254
65056
  });
64255
65057
  var hostingConfigurationBucketDataSchema = object({
64256
65058
  key: string(),
@@ -64892,7 +65694,7 @@ var hostingToolDataSchema = object({
64892
65694
  permitted: boolean()
64893
65695
  });
64894
65696
  var hostingServiceIncidentDataSchema = object({
64895
- kind: _enum(["application_database_connection"]),
65697
+ kind: _enum(["application_database_connection", "security_compromise"]),
64896
65698
  reason: union([_enum([
64897
65699
  "credential_refused",
64898
65700
  "server_unreachable",
@@ -65440,6 +66242,16 @@ var hostingRepositoryConnectionDataSchema = object({
65440
66242
  repositories: array(hostingRepositorySelectionDataSchema),
65441
66243
  lastDelivery: union([hostingRepositoryDeliveryDataSchema, _null()])
65442
66244
  });
66245
+ object({
66246
+ commitSha: string().describe("The commit the folder was read at."),
66247
+ configPath: string().nullable().describe("The configuration document found in the folder, which the client can import instead."),
66248
+ kind: string().nullable().describe("`static`, `frontend`, `node`, `python` or `php`; null when no standard kind matched."),
66249
+ reason: string().describe("The files that decided the kind, in the client's words."),
66250
+ documentRoot: string().nullable(),
66251
+ buildCommand: string().nullable(),
66252
+ command: string().nullable(),
66253
+ port: int().nullable()
66254
+ });
65443
66255
  var hostingRetentionCapabilitiesDataSchema = object({
65444
66256
  view: boolean(),
65445
66257
  request: boolean()
@@ -66373,6 +67185,11 @@ object({
66373
67185
  meta: pageMetaDataSchema,
66374
67186
  unreadTotal: int()
66375
67187
  });
67188
+ var operatorTermsAcceptanceRequestSchema = object({ version: string().max(32) }).describe("Accepting our operator terms names the version read, so a changed version is never accepted unseen.");
67189
+ var operatorTermsDocumentDataSchema = object({
67190
+ position: complianceOperatorTermsDataSchema,
67191
+ text: string().nullable()
67192
+ });
66376
67193
  var orphanedNamespaceDataSchema = object({
66377
67194
  clusterKey: string(),
66378
67195
  namespace: string(),
@@ -66686,6 +67503,17 @@ object({
66686
67503
  reviewGeneration: int().min(1),
66687
67504
  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.")
66688
67505
  });
67506
+ var raiseSecurityCompromiseRequestSchema = object({
67507
+ environmentUuids: array(uuid()).min(1).max(100).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }),
67508
+ nature: string().max(2e3),
67509
+ dataCategories: string().max(1e3),
67510
+ approximateDataSubjects: string().max(120),
67511
+ approximateRecords: string().max(120),
67512
+ likelyConsequences: string().max(2e3),
67513
+ measuresTaken: string().max(2e3),
67514
+ contact: string().max(255),
67515
+ believedFrom: datetime().nullish()
67516
+ }).describe("An operator's security-compromise notice: the affected environments and what we know.");
66689
67517
  var reRenderBillingInvoiceRequestSchema = object({ reason: string().max(255) }).describe("Re-rendering an issued invoice: the operator names why it is being re-rendered.\n\nThe reason is required because the document a client already holds is being replaced, and the replaced file and\nthe actor are recorded together. A re-render with no stated reason would be indistinguishable from an accident.");
66690
67518
  var reconcileBillingCollectionAttemptRequestSchema = object({
66691
67519
  decision: _enum(["not_charged", "charged"]),
@@ -67984,6 +68812,7 @@ object({
67984
68812
  lastRejectionReason: string().nullable(),
67985
68813
  lastError: string().nullable()
67986
68814
  });
68815
+ object({ message: string().describe("Error overview.") });
67987
68816
  object({
67988
68817
  message: string().describe("Errors overview."),
67989
68818
  errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
@@ -67991,7 +68820,6 @@ object({
67991
68820
  object({ message: string().describe("Error overview.") });
67992
68821
  object({ message: string().describe("Error overview.") });
67993
68822
  object({ message: string().describe("Error overview.") });
67994
- object({ message: string().describe("Error overview.") });
67995
68823
  union([
67996
68824
  object({ message: string().describe("Error overview.") }),
67997
68825
  messageDataSchema,
@@ -68275,6 +69103,65 @@ union([
68275
69103
  object({ message: string().describe("Error overview.") }),
68276
69104
  messageDataSchema
68277
69105
  ]);
69106
+ object({ message: string().describe("Error overview.") });
69107
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69108
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69109
+ union([
69110
+ object({ message: string().describe("Error overview.") }),
69111
+ object({ message: string().describe("Error overview.") }),
69112
+ messageDataSchema,
69113
+ messageDataSchema
69114
+ ]);
69115
+ complianceTickRequestSchema.describe("Ticking or unticking one duty, with an optional note or link such as a registration number.");
69116
+ var complianceOperatorTermsAcceptStatus200Schema = operatorTermsDocumentDataSchema;
69117
+ var complianceOperatorTermsAcceptStatus201Schema = operatorTermsDocumentDataSchema;
69118
+ var complianceOperatorTermsAcceptStatus401Schema = object({ message: string().describe("Error overview.") });
69119
+ var complianceOperatorTermsAcceptStatus403Schema = object({ message: string().describe("Error overview.") });
69120
+ var complianceOperatorTermsAcceptStatus422Schema = messageDataSchema;
69121
+ union([complianceOperatorTermsAcceptStatus200Schema, complianceOperatorTermsAcceptStatus201Schema]);
69122
+ union([
69123
+ complianceOperatorTermsAcceptStatus401Schema,
69124
+ complianceOperatorTermsAcceptStatus403Schema,
69125
+ complianceOperatorTermsAcceptStatus422Schema
69126
+ ]);
69127
+ operatorTermsAcceptanceRequestSchema.describe("Accepting our operator terms names the version read, so a changed version is never accepted unseen.");
69128
+ union([complianceDocumentFormatEnumSchema, _null()]).optional();
69129
+ union([
69130
+ object({ message: string().describe("Error overview.") }),
69131
+ object({ message: string().describe("Error overview.") }),
69132
+ object({ message: string().describe("Error overview.") }),
69133
+ messageDataSchema
69134
+ ]);
69135
+ union([
69136
+ object({ message: string().describe("Error overview.") }),
69137
+ object({ message: string().describe("Error overview.") }),
69138
+ object({ message: string().describe("Error overview.") }),
69139
+ messageDataSchema
69140
+ ]);
69141
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69142
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69143
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69144
+ union([object({ message: string().describe("Error overview.") }), object({ message: string().describe("Error overview.") })]);
69145
+ var complianceCalendarFeedIssueStatus200Schema = complianceCalendarFeedIssuedDataSchema;
69146
+ var complianceCalendarFeedIssueStatus201Schema = complianceCalendarFeedIssuedDataSchema;
69147
+ var complianceCalendarFeedIssueStatus401Schema = object({ message: string().describe("Error overview.") });
69148
+ var complianceCalendarFeedIssueStatus403Schema = object({ message: string().describe("Error overview.") });
69149
+ union([complianceCalendarFeedIssueStatus200Schema, complianceCalendarFeedIssueStatus201Schema]);
69150
+ union([complianceCalendarFeedIssueStatus401Schema, complianceCalendarFeedIssueStatus403Schema]);
69151
+ union([
69152
+ object({ message: string().describe("Error overview.") }),
69153
+ object({ message: string().describe("Error overview.") }),
69154
+ messageDataSchema
69155
+ ]);
69156
+ union([
69157
+ object({ message: string().describe("Error overview.") }),
69158
+ object({ message: string().describe("Error overview.") }),
69159
+ object({
69160
+ message: string().describe("Errors overview."),
69161
+ errors: record$1(string(), array(string())).describe("A detailed description of each field that failed validation.")
69162
+ })
69163
+ ]);
69164
+ object({ enabled: boolean() });
68278
69165
  union([messageDataSchema, messageDataSchema]);
68279
69166
  union([
68280
69167
  object({ message: string().describe("Error overview.") }),
@@ -70020,6 +70907,12 @@ union([
70020
70907
  hostingRepositoryConnectionSelectStatus422Schema
70021
70908
  ]);
70022
70909
  selectGitHubRepositoryRequestSchema.describe("One repository selected from a bound installation, by GitHub's numeric id.\n\nThe name is deliberately not accepted: a rename would otherwise silently stop matching,\nand the id is what the provider's own repository list is keyed on.");
70910
+ string().max(256).regex(/^(?:\.|(?!\.{1,2}(?:\/|$))[A-Za-z0-9_.-]+(?:\/(?!\.{1,2}(?:\/|$))[A-Za-z0-9_.-]+)*)$/).nullish();
70911
+ union([
70912
+ object({ message: string().describe("Error overview.") }),
70913
+ object({ message: string().describe("Error overview.") }),
70914
+ messageDataSchema
70915
+ ]);
70023
70916
  var hostingRepositoryConnectionStartStatus200Schema = gitHubConnectionStartDataSchema;
70024
70917
  var hostingRepositoryConnectionStartStatus201Schema = gitHubConnectionStartDataSchema;
70025
70918
  var hostingRepositoryConnectionStartStatus401Schema = object({ message: string().describe("Error overview.") });
@@ -71748,6 +72641,22 @@ union([
71748
72641
  messageDataSchema
71749
72642
  ]);
71750
72643
  registrarSupersedeTransferRequestSchema.describe("Explicit consent to close the prior unknown transfer after fresh provider checks.");
72644
+ union([
72645
+ object({ message: string().describe("Error overview.") }),
72646
+ object({ message: string().describe("Error overview.") }),
72647
+ messageDataSchema
72648
+ ]);
72649
+ raiseSecurityCompromiseRequestSchema.describe("An operator's security-compromise notice: the affected environments and what we know.");
72650
+ union([
72651
+ object({ message: string().describe("Error overview.") }),
72652
+ object({ message: string().describe("Error overview.") }),
72653
+ messageDataSchema
72654
+ ]);
72655
+ union([
72656
+ object({ message: string().describe("Error overview.") }),
72657
+ object({ message: string().describe("Error overview.") }),
72658
+ object({ message: string().describe("Error overview.") })
72659
+ ]);
71751
72660
  union([object({ message: string().describe("Error overview.") }), messageDataSchema]);
71752
72661
  union([
71753
72662
  stateManagerCallbackRefusalDataSchema,
@@ -72654,9 +73563,9 @@ async function companies(context, args) {
72654
73563
  async function addCompany(context, args) {
72655
73564
  noExtra$7(args);
72656
73565
  const body = {
72657
- name: requiredFlag$3(context, "--name", USAGE$13),
72658
- slug: requiredFlag$3(context, "--slug", USAGE$13).toLowerCase(),
72659
- adminEmail: requiredFlag$3(context, "--admin-email", USAGE$13).toLowerCase()
73566
+ name: requiredFlag$4(context, "--name", USAGE$13),
73567
+ slug: requiredFlag$4(context, "--slug", USAGE$13).toLowerCase(),
73568
+ adminEmail: requiredFlag$4(context, "--admin-email", USAGE$13).toLowerCase()
72660
73569
  };
72661
73570
  return {
72662
73571
  kind: "admin-write",
@@ -72666,8 +73575,8 @@ async function addCompany(context, args) {
72666
73575
  /** `company-member-add --company … --email … --role …`: attach an account that already exists. */
72667
73576
  async function addCompanyMember(context, args) {
72668
73577
  noExtra$7(args);
72669
- const company = requiredFlag$3(context, "--company", USAGE$13);
72670
- const email = requiredFlag$3(context, "--email", USAGE$13).toLowerCase();
73578
+ const company = requiredFlag$4(context, "--company", USAGE$13);
73579
+ const email = requiredFlag$4(context, "--email", USAGE$13).toLowerCase();
72671
73580
  const role = companyRole(context.flags.get("--role"), USAGE$13);
72672
73581
  return {
72673
73582
  kind: "admin-write",
@@ -72685,7 +73594,7 @@ async function lookup(context, args) {
72685
73594
  noExtra$7(args);
72686
73595
  return {
72687
73596
  kind: "domain-claim",
72688
- claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$3(context, "--hostname", USAGE$13).toLowerCase() } })).data
73597
+ claim: (await platformDomainOwnershipLookup({ query: { "filter[hostname]": requiredFlag$4(context, "--hostname", USAGE$13).toLowerCase() } })).data
72689
73598
  };
72690
73599
  }
72691
73600
  /** `company-closure <slug>`: what closing the company would do. */
@@ -72699,7 +73608,7 @@ async function companyClosure(slug, rest) {
72699
73608
  /** `company-close <slug> --reason …`: request the closure the review described. */
72700
73609
  async function closeCompany(context, slug, rest) {
72701
73610
  noExtra$7(rest);
72702
- const reason = requiredFlag$3(context, "--reason", USAGE$13);
73611
+ const reason = requiredFlag$4(context, "--reason", USAGE$13);
72703
73612
  const review = (await platformCompanyClosureShow({ path: { company: slug } })).data;
72704
73613
  if (!review.canFinalise) throw new UsageError(`Closing ${slug} is blocked: ${review.blockingReasons.join("; ") || "the review cannot be finalised"}.`);
72705
73614
  return {
@@ -73195,7 +74104,7 @@ function platformDatabasePoolsText(report) {
73195
74104
  */
73196
74105
  async function platformDnsPurge(context, action, uuid, usage) {
73197
74106
  if (action === "purge-revoke") {
73198
- const reason = requiredFlag$3(context, "--reason", usage);
74107
+ const reason = requiredFlag$4(context, "--reason", usage);
73199
74108
  return await confirmableWrite(context, `Withdraw the physical purge attestation of ${uuid}, with reason: ${reason}`, async () => (await platformDnsPurgeAttestationRevocation({
73200
74109
  path: { domain: uuid },
73201
74110
  body: { reason }
@@ -73203,13 +74112,13 @@ async function platformDnsPurge(context, action, uuid, usage) {
73203
74112
  }
73204
74113
  const body = {
73205
74114
  expectedGeneration: wholeNumberFlag(context.flags, "--generation") ?? missing(usage),
73206
- parentZone: requiredFlag$3(context, "--parent-zone", usage),
73207
- providerAccount: requiredFlag$3(context, "--provider-account", usage),
73208
- providerZone: requiredFlag$3(context, "--provider-zone", usage),
73209
- basis: requiredFlag$3(context, "--basis", usage),
73210
- evidenceReference: requiredFlag$3(context, "--evidence", usage),
73211
- observedAt: requiredFlag$3(context, "--observed-at", usage),
73212
- expiresAt: requiredFlag$3(context, "--expires-at", usage)
74115
+ parentZone: requiredFlag$4(context, "--parent-zone", usage),
74116
+ providerAccount: requiredFlag$4(context, "--provider-account", usage),
74117
+ providerZone: requiredFlag$4(context, "--provider-zone", usage),
74118
+ basis: requiredFlag$4(context, "--basis", usage),
74119
+ evidenceReference: requiredFlag$4(context, "--evidence", usage),
74120
+ observedAt: requiredFlag$4(context, "--observed-at", usage),
74121
+ expiresAt: requiredFlag$4(context, "--expires-at", usage)
73213
74122
  };
73214
74123
  return await confirmableWrite(context, `Attest that ${body.providerZone} in ${body.providerAccount} is physically purged (generation ${String(body.expectedGeneration)}, basis ${body.basis}), observed ${body.observedAt} and expiring ${body.expiresAt}, on ${body.evidenceReference}.`, async () => (await platformDnsPurgeAttestationStore({
73215
74124
  path: { domain: uuid },
@@ -73978,7 +74887,7 @@ async function platformSeedPlacements(context, action, seedUuid, rest) {
73978
74887
  /** `placement-add`: ask for the version to be prepared on one cluster. */
73979
74888
  async function add$3(context, seedUuid, versionUuid) {
73980
74889
  const body = {
73981
- clusterUuid: requiredFlag$3(context, "--cluster", USAGE$6),
74890
+ clusterUuid: requiredFlag$4(context, "--cluster", USAGE$6),
73982
74891
  preparationMode: preparationModeOf$1(context, "placement-add"),
73983
74892
  minimumSizeMib: requiredSize(context, USAGE$6),
73984
74893
  ...sourceStorageClassBody(context)
@@ -74057,7 +74966,7 @@ async function addWord(context, rest) {
74057
74966
  noExtra$4(rest);
74058
74967
  const body = {
74059
74968
  position: pickPosition(context),
74060
- word: requiredFlag$3(context, "--word", USAGE$5).toLowerCase(),
74969
+ word: requiredFlag$4(context, "--word", USAGE$5).toLowerCase(),
74061
74970
  description: context.flags.get("--description")?.trim() || null
74062
74971
  };
74063
74972
  return {
@@ -74192,7 +75101,7 @@ async function consumption(context, seedUuid, rest) {
74192
75101
  /** `promote <seed> --version …`. */
74193
75102
  async function promote(context, seedUuid, rest) {
74194
75103
  noExtra$3(rest);
74195
- const versionUuid = requiredFlag$3(context, "--version", USAGE$4);
75104
+ const versionUuid = requiredFlag$4(context, "--version", USAGE$4);
74196
75105
  return {
74197
75106
  kind: "seed-write",
74198
75107
  outcome: await confirmableWrite(context, `Promote version ${versionUuid} as seed ${seedUuid}'s selected version.`, async () => (await hostingSeedPromote({
@@ -74205,11 +75114,11 @@ async function promote(context, seedUuid, rest) {
74205
75114
  async function addVersion(context, seedUuid, rest) {
74206
75115
  noExtra$3(rest);
74207
75116
  const body = {
74208
- sourceRelease: requiredFlag$3(context, "--source-release", USAGE$4),
74209
- sourceCommit: requiredFlag$3(context, "--source-commit", USAGE$4),
74210
- sourceChecksum: requiredFlag$3(context, "--source-checksum", USAGE$4),
74211
- recipeRevision: requiredFlag$3(context, "--recipe-revision", USAGE$4),
74212
- runtimeImageDigest: requiredFlag$3(context, "--runtime-image-digest", USAGE$4),
75117
+ sourceRelease: requiredFlag$4(context, "--source-release", USAGE$4),
75118
+ sourceCommit: requiredFlag$4(context, "--source-commit", USAGE$4),
75119
+ sourceChecksum: requiredFlag$4(context, "--source-checksum", USAGE$4),
75120
+ recipeRevision: requiredFlag$4(context, "--recipe-revision", USAGE$4),
75121
+ runtimeImageDigest: requiredFlag$4(context, "--runtime-image-digest", USAGE$4),
74213
75122
  contentContract: contentContractOf(context.flags.get("--content-contract"), USAGE$4),
74214
75123
  releaseUuid: context.flags.get("--release")?.trim() || null
74215
75124
  };
@@ -75337,8 +76246,8 @@ async function record(context, environmentUuid) {
75337
76246
  */
75338
76247
  async function recordIntent(context, environmentUuid, verb, company) {
75339
76248
  const body = {
75340
- custdCompanyUuid: requiredFlag$3(context, "--custd-company", REALM_USAGE),
75341
- owningUserUuid: requiredFlag$3(context, "--owning-user", REALM_USAGE),
76249
+ custdCompanyUuid: requiredFlag$4(context, "--custd-company", REALM_USAGE),
76250
+ owningUserUuid: requiredFlag$4(context, "--owning-user", REALM_USAGE),
75342
76251
  registrationPolicy: registrationPolicyOf(context),
75343
76252
  loginPaused: context.flags.has("--login-paused"),
75344
76253
  expectedRevision: expectedRevisionOf(context),
@@ -75370,7 +76279,7 @@ async function retry(context, environmentUuid) {
75370
76279
  /** `realm audience <uuid> <workload-uuid>`: the name the environment's recorded intent then has to match. */
75371
76280
  async function audience(context, environmentUuid, workloadUuid) {
75372
76281
  const company = await requireCompany(context.flags);
75373
- const name = requiredFlag$3(context, "--audience", REALM_USAGE);
76282
+ const name = requiredFlag$4(context, "--audience", REALM_USAGE);
75374
76283
  return await confirmableWrite(context, `Record audience ${name} for workload ${workloadUuid} in ${environmentUuid}.`, async () => (await hostingApplicationSiteAccessAudienceStore({
75375
76284
  path: {
75376
76285
  company,
@@ -76404,11 +77313,11 @@ function registryCredential(context) {
76404
77313
  /** `registry-connections add`: store a new connection, reading the secret from stdin or the environment. */
76405
77314
  async function addRegistryConnection(context, company) {
76406
77315
  const body = {
76407
- name: requiredFlag$3(context, "--name", USAGE$1),
77316
+ name: requiredFlag$4(context, "--name", USAGE$1),
76408
77317
  provider: providerFlag(context),
76409
- host: requiredFlag$3(context, "--host", USAGE$1),
76410
- username: requiredFlag$3(context, "--username", USAGE$1),
76411
- repositoryScope: requiredFlag$3(context, "--repository-scope", USAGE$1),
77318
+ host: requiredFlag$4(context, "--host", USAGE$1),
77319
+ username: requiredFlag$4(context, "--username", USAGE$1),
77320
+ repositoryScope: requiredFlag$4(context, "--repository-scope", USAGE$1),
76412
77321
  credential: registryCredential(context),
76413
77322
  authRealm: textFlag(context, "--auth-realm"),
76414
77323
  authService: textFlag(context, "--auth-service"),
@@ -76515,7 +77424,7 @@ function credentialGiven(context) {
76515
77424
  }
76516
77425
  /** `--provider`, refused by name when it is not one of the API's own values. */
76517
77426
  function providerFlag(context) {
76518
- const raw = requiredFlag$3(context, "--provider", USAGE$1).toLowerCase();
77427
+ const raw = requiredFlag$4(context, "--provider", USAGE$1).toLowerCase();
76519
77428
  if (!PROVIDERS.has(raw)) throw new UsageError(`--provider must be one of ${[...PROVIDERS].join(", ")} (got "${raw}").\n\n${USAGE$1}`);
76520
77429
  return raw;
76521
77430
  }
@@ -77753,7 +78662,7 @@ function describeBucket(path) {
77753
78662
  * there rather than restated here, where it would become a second, older copy of the same operational limit.
77754
78663
  */
77755
78664
  function maximumBytes(context) {
77756
- const raw = requiredFlag$3(context, "--bytes", STORAGE_USAGE);
78665
+ const raw = requiredFlag$4(context, "--bytes", STORAGE_USAGE);
77757
78666
  const bytes = Number(raw);
77758
78667
  if (!/^\d+$/.test(raw) || !Number.isSafeInteger(bytes)) throw new UsageError(`--bytes must be a whole number of bytes, zero or more (got ${raw}).\n\n${STORAGE_USAGE}`);
77759
78668
  return bytes;
@@ -77766,7 +78675,7 @@ function maximumBytes(context) {
77766
78675
  * promise — no overage above the allowance is charged — while an invoice for nothing is not an amount at all.
77767
78676
  */
77768
78677
  function ceilingCents(context) {
77769
- const raw = requiredFlag$3(context, "--set", STORAGE_USAGE);
78678
+ const raw = requiredFlag$4(context, "--set", STORAGE_USAGE);
77770
78679
  const cents = minorUnits(raw);
77771
78680
  if (cents === null) throw new UsageError(`--set must be an amount of rand with at most two decimal places, e.g. 250.00 (got ${raw}).\n\n${STORAGE_USAGE}`);
77772
78681
  return cents;
@@ -77792,7 +78701,7 @@ function pageQuery(context) {
77792
78701
  /** The one retained namespace a read or a write names: its operation and its binding generation. */
77793
78702
  function retainedPair(context) {
77794
78703
  return {
77795
- retainedOperationId: requiredFlag$3(context, "--retained-operation-id", STORAGE_USAGE),
78704
+ retainedOperationId: requiredFlag$4(context, "--retained-operation-id", STORAGE_USAGE),
77796
78705
  retainedGeneration: generationFlag(context, "--retained-generation")
77797
78706
  };
77798
78707
  }
@@ -77803,7 +78712,7 @@ function retainedPair(context) {
77803
78712
  * which refuses it.
77804
78713
  */
77805
78714
  function generationFlag(context, flag) {
77806
- const raw = requiredFlag$3(context, flag, STORAGE_USAGE);
78715
+ const raw = requiredFlag$4(context, flag, STORAGE_USAGE);
77807
78716
  if (!/^\d+$/.test(raw) || !Number.isSafeInteger(Number(raw))) throw new UsageError(`${flag} must be a whole generation, zero or more (got ${raw}).\n\n${STORAGE_USAGE}`);
77808
78717
  return Number(raw);
77809
78718
  }
@@ -77854,9 +78763,9 @@ async function start(context, tail) {
77854
78763
  async function confirm$1(context, tail) {
77855
78764
  const path = await bucketPath(context, tail);
77856
78765
  const body = {
77857
- operationId: requiredFlag$3(context, "--operation-id", STORAGE_USAGE),
78766
+ operationId: requiredFlag$4(context, "--operation-id", STORAGE_USAGE),
77858
78767
  bindingGeneration: generationFlag(context, "--binding-generation"),
77859
- captureDigest: requiredFlag$3(context, "--capture-digest", STORAGE_USAGE)
78768
+ captureDigest: requiredFlag$4(context, "--capture-digest", STORAGE_USAGE)
77860
78769
  };
77861
78770
  return await confirmableWrite(context, confirmDescription(path, body.captureDigest), async () => {
77862
78771
  return {
@@ -77898,9 +78807,9 @@ async function restore(context, tail) {
77898
78807
  const path = await bucketPath(context, tail);
77899
78808
  const body = {
77900
78809
  ...retainedPair(context),
77901
- sourceKey: requiredFlag$3(context, "--source-key", STORAGE_USAGE),
77902
- sourceEtag: requiredFlag$3(context, "--source-etag", STORAGE_USAGE),
77903
- destinationKey: requiredFlag$3(context, "--destination-key", STORAGE_USAGE)
78810
+ sourceKey: requiredFlag$4(context, "--source-key", STORAGE_USAGE),
78811
+ sourceEtag: requiredFlag$4(context, "--source-etag", STORAGE_USAGE),
78812
+ destinationKey: requiredFlag$4(context, "--destination-key", STORAGE_USAGE)
77904
78813
  };
77905
78814
  return await confirmableWrite(context, restoreDescription(path, body), async () => {
77906
78815
  const answer = await hostingStorageAdoptionRestore({
@@ -77938,8 +78847,8 @@ async function dispose(context, tail) {
77938
78847
  async function repair(context, tail) {
77939
78848
  const path = await bucketPath(context, tail);
77940
78849
  const body = {
77941
- operationId: requiredFlag$3(context, "--operation-id", STORAGE_USAGE),
77942
- evidenceDigest: requiredFlag$3(context, "--evidence-digest", STORAGE_USAGE)
78850
+ operationId: requiredFlag$4(context, "--operation-id", STORAGE_USAGE),
78851
+ evidenceDigest: requiredFlag$4(context, "--evidence-digest", STORAGE_USAGE)
77943
78852
  };
77944
78853
  return await confirmableWrite(context, repairDescription(path, body.evidenceDigest), async () => {
77945
78854
  return {
@@ -79701,6 +80610,50 @@ function describeAge(seconds) {
79701
80610
  if (seconds >= 60) return `${String(Math.trunc(seconds / 60))}m`;
79702
80611
  return `${String(seconds)}s`;
79703
80612
  }
80613
+ //#endregion
80614
+ //#region src/commands/upcoming-metadata.ts
80615
+ var UPCOMING_USAGE = [
80616
+ "Usage: hostingctl upcoming --company <slug>",
80617
+ "",
80618
+ "Everything dated someone must act on: overdue first, then the next 30 days, then later, up to a year ahead.",
80619
+ "Tick a duty off with `hostingctl compliance tick <item>`."
80620
+ ].join("\n");
80621
+ var UPCOMING_METADATA = {
80622
+ name: "upcoming",
80623
+ summary: "What is due for a company: duties, renewals, upgrades and invoices, overdue first.",
80624
+ usage: UPCOMING_USAGE,
80625
+ flags: [],
80626
+ subcommands: []
80627
+ };
80628
+ //#endregion
80629
+ //#region src/commands/upcoming-text.ts
80630
+ /** Upcoming as an agenda: overdue, the next 30 days, then later. */
80631
+ function upcomingText(upcoming) {
80632
+ const sections = [
80633
+ ["Overdue", "overdue"],
80634
+ ["Next 30 days", "next_30_days"],
80635
+ ["Later", "later"]
80636
+ ];
80637
+ const lines = [upcoming.summary];
80638
+ for (const [title, section] of sections) {
80639
+ const entries = upcoming.entries.filter((entry) => entry.section === section);
80640
+ if (entries.length === 0) continue;
80641
+ lines.push("", title);
80642
+ for (const entry of entries) lines.push(` ${entry.date} ${entry.category.padEnd(12)} ${entry.title} (${entry.appliesTo})${entry.itemSlug ? ` [${entry.itemSlug}]` : ""}`);
80643
+ }
80644
+ return lines.join("\n");
80645
+ }
80646
+ //#endregion
80647
+ //#region src/commands/upcoming.ts
80648
+ /** `upcoming` — everything dated a company must act on; `--json` prints the API's own entries unchanged. */
80649
+ var upcoming = {
80650
+ ...UPCOMING_METADATA,
80651
+ async run(context) {
80652
+ if (context.positional.length > 0) throw new UsageError(UPCOMING_USAGE);
80653
+ return (await complianceUpcomingIndex({ path: { company: await requireCompany(context.flags) } })).data;
80654
+ },
80655
+ human: upcomingText
80656
+ };
79704
80657
  var UPDATE_METADATA = {
79705
80658
  name: "update",
79706
80659
  summary: "Update this copy of the CLI to the published version.",
@@ -80328,7 +81281,7 @@ function writeUpdateState(state, env = process.env) {
80328
81281
  }
80329
81282
  //#endregion
80330
81283
  //#region src/version.ts
80331
- var VERSION = "1.0.754";
81284
+ var VERSION = "1.0.762";
80332
81285
  //#endregion
80333
81286
  //#region src/commands/update.ts
80334
81287
  /**
@@ -80403,7 +81356,7 @@ var update = {
80403
81356
  }, process.env);
80404
81357
  return {
80405
81358
  ...known,
80406
- current: after ?? "1.0.754",
81359
+ current: after ?? "1.0.762",
80407
81360
  latest: after ?? latest,
80408
81361
  upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
80409
81362
  action: "run",
@@ -80560,6 +81513,8 @@ var COMMANDS = [
80560
81513
  register(deletionLock),
80561
81514
  register(access, ACCESS_TOPICS),
80562
81515
  register(alerts, ALERTS_TOPICS),
81516
+ register(compliance),
81517
+ register(upcoming),
80563
81518
  register(secretConnection),
80564
81519
  register(keys$1),
80565
81520
  register(mailbox$1, MAILBOX_TOPICS),
@@ -80685,7 +81640,7 @@ async function printUpdateNotice(options) {
80685
81640
  }, env, { waitMs: NOTICE_LOCK_WAIT_MS });
80686
81641
  } catch {}
80687
81642
  if (latest === null) return;
80688
- if (!isNewerVersion(latest, "1.0.754")) return;
81643
+ if (!isNewerVersion(latest, "1.0.762")) return;
80689
81644
  process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
80690
81645
  }
80691
81646
  /** Whether an environment variable is set to something, which is how CI and the opt-out are read. */