@haakco/hostingctl 1.0.815 → 1.0.817
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 +80 -19
- package/dist/main.js.map +1 -1
- package/package.json +1 -1
- package/platform/darwin-arm64/hostingctl +0 -0
- package/platform/darwin-x64/hostingctl +0 -0
- package/platform/linux-arm64/hostingctl +0 -0
- package/platform/linux-x64/hostingctl +0 -0
- package/platform/windows-x64/hostingctl.exe +0 -0
package/dist/main.js
CHANGED
|
@@ -38159,6 +38159,23 @@ function platformBillingIssuerActivate(options) {
|
|
|
38159
38159
|
}));
|
|
38160
38160
|
}
|
|
38161
38161
|
/**
|
|
38162
|
+
* {@link /platform/companies/:company/billing/one-off-invoices}
|
|
38163
|
+
*/
|
|
38164
|
+
function platformBillingOneOffInvoiceStore(options) {
|
|
38165
|
+
const { client: request = client, ...config } = options;
|
|
38166
|
+
return withUnwrap(request({
|
|
38167
|
+
method: "POST",
|
|
38168
|
+
url: "/platform/companies/{company}/billing/one-off-invoices",
|
|
38169
|
+
security: [{
|
|
38170
|
+
type: "http",
|
|
38171
|
+
scheme: "bearer"
|
|
38172
|
+
}],
|
|
38173
|
+
contentType: { request: "application/json" },
|
|
38174
|
+
...config,
|
|
38175
|
+
throwOnError: config.throwOnError ?? true
|
|
38176
|
+
}));
|
|
38177
|
+
}
|
|
38178
|
+
/**
|
|
38162
38179
|
* {@link /platform/companies/:company/hosting-environments/:environmentUuid/paid-activation}
|
|
38163
38180
|
*/
|
|
38164
38181
|
function platformBillingPaidActivationStore(options) {
|
|
@@ -46646,7 +46663,7 @@ var BILLING_USAGE = `hostingctl billing <subcommand> [flags]
|
|
|
46646
46663
|
issuer Who issues our documents, and whether issuance is on
|
|
46647
46664
|
issuer activate --month <YYYY-MM> Record the first month Hosting issues its own documents
|
|
46648
46665
|
rates [--company <slug>] Every recorded price window
|
|
46649
|
-
rate start --product <MHU|MHS|STO|TRF> --amount <rand> --from <date> [--package <key>] [--company <slug>]
|
|
46666
|
+
rate start --product <MHU|MHS|STO|TRF|SUN> --amount <rand> --from <date> [--package <key>] [--company <slug>]
|
|
46650
46667
|
rate end <rate-uuid> --until <date> End a price window
|
|
46651
46668
|
rate change --product <code> --package <key> --amount <rand> --on <YYYY-MM-DD> [--applies-to-all]
|
|
46652
46669
|
Schedule a list-price change from a day
|
|
@@ -46657,6 +46674,8 @@ var BILLING_USAGE = `hostingctl billing <subcommand> [flags]
|
|
|
46657
46674
|
run build --company <slug> --period <YYYY-MM>
|
|
46658
46675
|
run issue --company <slug> --period <YYYY-MM>
|
|
46659
46676
|
invoices --company <slug> Documents issued to one company
|
|
46677
|
+
invoice create --company <slug> --file <invoice.json>
|
|
46678
|
+
Issue sundries/extras with VAT-inclusive unit cents (needs --confirm)
|
|
46660
46679
|
invoice --company <slug> --uuid <uuid> One document, as it was frozen
|
|
46661
46680
|
invoice retry --company <slug> --uuid <uuid>
|
|
46662
46681
|
invoice re-render --company <slug> --uuid <uuid> --reason <text>
|
|
@@ -46834,7 +46853,8 @@ var billingProductEnum = {
|
|
|
46834
46853
|
MHU: "MHU",
|
|
46835
46854
|
MHS: "MHS",
|
|
46836
46855
|
STO: "STO",
|
|
46837
|
-
TRF: "TRF"
|
|
46856
|
+
TRF: "TRF",
|
|
46857
|
+
SUN: "SUN"
|
|
46838
46858
|
};
|
|
46839
46859
|
var billingRateExistingCustomerRuleEnum = {
|
|
46840
46860
|
grandfathered: "grandfathered",
|
|
@@ -54157,8 +54177,9 @@ var billingProductEnumSchema = _enum([
|
|
|
54157
54177
|
"MHU",
|
|
54158
54178
|
"MHS",
|
|
54159
54179
|
"STO",
|
|
54160
|
-
"TRF"
|
|
54161
|
-
|
|
54180
|
+
"TRF",
|
|
54181
|
+
"SUN"
|
|
54182
|
+
]).describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n");
|
|
54162
54183
|
var billingPriceSourceEnumSchema = _enum([
|
|
54163
54184
|
"company_rate",
|
|
54164
54185
|
"default_rate",
|
|
@@ -54166,7 +54187,7 @@ var billingPriceSourceEnumSchema = _enum([
|
|
|
54166
54187
|
"free_allowance"
|
|
54167
54188
|
]).describe("Which price a rated line segment resolved to. The source is frozen onto the line so a later price book change cannot rewrite why a past segment was worth what it was. A free-allowance segment has no rate at all.\n| |\n|---|\n| `company_rate` <br/> A company-specific rate window applied. |\n| `default_rate` <br/> The default (company-null) rate window applied. |\n| `protected_rate` <br/> An existing customer's protected price: the lowest earlier list price, kept when the list price rose. |\n| `free_allowance` <br/> A period held under the free allowance: a stated zero line, never an omission. |");
|
|
54168
54189
|
var billingCompanyPriceDataSchema = object({
|
|
54169
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
54190
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
54170
54191
|
packageKey: string(),
|
|
54171
54192
|
name: string().describe("The key's name a customer reads, such as \"Standard unit\"."),
|
|
54172
54193
|
yourPrice: billingAmountsDataSchema,
|
|
@@ -54231,7 +54252,9 @@ var billingDocumentLineDataSchema = object({
|
|
|
54231
54252
|
vatBasisPoints: int(),
|
|
54232
54253
|
vatCents: int(),
|
|
54233
54254
|
grossCents: int(),
|
|
54234
|
-
taxPointOn: string()
|
|
54255
|
+
taxPointOn: string(),
|
|
54256
|
+
unitGrossCents: int().nullable(),
|
|
54257
|
+
discountCents: int()
|
|
54235
54258
|
});
|
|
54236
54259
|
var billingDocumentPaymentDataSchema = object({
|
|
54237
54260
|
accountHolder: string(),
|
|
@@ -54339,7 +54362,7 @@ var billingDiscountCodeDataSchema = object({
|
|
|
54339
54362
|
uuid: string(),
|
|
54340
54363
|
code: string(),
|
|
54341
54364
|
kind: billingDiscountKindEnumSchema.describe("What a discount code states: a price, or a share off the list price. A code's promise is an **amount**, because an amount is what a client is charged and what a price window records. A percentage is therefore a way of *deriving* that amount once, at the month the window opens, against the list price effective then — not a second pricing rule that would reprice a settled month when a list price moves. The kind is stored rather than inferred from which column is filled, so a half-written code cannot mean two things and an existing row keeps its original meaning as `amount`.\n"),
|
|
54342
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
54365
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
54343
54366
|
packageKey: string().nullable(),
|
|
54344
54367
|
amountCents: int().nullable(),
|
|
54345
54368
|
basisPoints: int().nullable().describe("The share off the list price in ten-thousandths; null for a code that states a price instead."),
|
|
@@ -54418,7 +54441,7 @@ var billingExportProfileTaxMappingDataSchema = object({
|
|
|
54418
54441
|
taxCode: string().nullable()
|
|
54419
54442
|
});
|
|
54420
54443
|
var billingExportProfileProductMappingDataSchema = object({
|
|
54421
|
-
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
54444
|
+
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
54422
54445
|
accountCode: string().nullable(),
|
|
54423
54446
|
itemName: string().nullable()
|
|
54424
54447
|
});
|
|
@@ -54539,6 +54562,7 @@ object({
|
|
|
54539
54562
|
currency: string(),
|
|
54540
54563
|
action: object({})
|
|
54541
54564
|
});
|
|
54565
|
+
var billingOneOffInvoiceUnitLabelEnumSchema = _enum(["hours", "items"]);
|
|
54542
54566
|
var hostingPurchasePeriodDataSchema = object({
|
|
54543
54567
|
uuid: string(),
|
|
54544
54568
|
companySlug: string(),
|
|
@@ -54600,7 +54624,7 @@ object({
|
|
|
54600
54624
|
});
|
|
54601
54625
|
var billingRateExistingCustomerRuleEnumSchema = _enum(["grandfathered", "applies_to_all"]);
|
|
54602
54626
|
object({
|
|
54603
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
54627
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
54604
54628
|
packageKey: string(),
|
|
54605
54629
|
amountBasis: billingAmountBasisEnumSchema.describe("What one rate amount is for, and whether the amount already includes VAT. A recurring packaging price is charged per month and prorated by time held; a setup price is charged once for an approved event and is never prorated. A **VAT-inclusive** recurring price is the third case, and it exists because some prices are agreed as a consumer figure: R3.00 per 10 GB including VAT cannot be expressed as a whole number of net cents that reproduces R30.00 for ten blocks, so the agreed gross figure is what the price book stores and the VAT is separated out of it. That keeps a quote and an invoice equal to the number the client was given, instead of two cents away from it. Keeping all three in one effective-dated price table means there is one place a price lives, not three.\n"),
|
|
54606
54630
|
currentAmountCents: int(),
|
|
@@ -54658,7 +54682,7 @@ object({ items: array(object({
|
|
|
54658
54682
|
id: int(),
|
|
54659
54683
|
uuid: string(),
|
|
54660
54684
|
companySlug: string().nullable(),
|
|
54661
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
54685
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
54662
54686
|
packageKey: string().nullable(),
|
|
54663
54687
|
amountBasis: billingAmountBasisEnumSchema.describe("What one rate amount is for, and whether the amount already includes VAT. A recurring packaging price is charged per month and prorated by time held; a setup price is charged once for an approved event and is never prorated. A **VAT-inclusive** recurring price is the third case, and it exists because some prices are agreed as a consumer figure: R3.00 per 10 GB including VAT cannot be expressed as a whole number of net cents that reproduces R30.00 for ten blocks, so the agreed gross figure is what the price book stores and the VAT is separated out of it. That keeps a quote and an invoice equal to the number the client was given, instead of two cents away from it. Keeping all three in one effective-dated price table means there is one place a price lives, not three.\n"),
|
|
54664
54688
|
amountCents: int(),
|
|
@@ -61097,7 +61121,7 @@ var saveHostingDomainRedirectRequestSchema = object({
|
|
|
61097
61121
|
destinationUrl: string().max(2048).nullish()
|
|
61098
61122
|
}).describe("One whole-domain redirect to save.\n\nThe source name comes from the route, the environment from the route, and the target is one of two\nnamed shapes: an application alias (`hostingDomainUuid`) or an explicitly saved HTTPS address\n(`destinationUrl`). The service refuses the combination each shape cannot use, so a body cannot\ndescribe a state the database would refuse.");
|
|
61099
61123
|
var scheduleBillingPriceChangeRequestSchema = object({
|
|
61100
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
61124
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
61101
61125
|
packageKey: string().max(64),
|
|
61102
61126
|
amountCents: int().min(0).max(1e8),
|
|
61103
61127
|
effectiveOn: date(),
|
|
@@ -61298,7 +61322,7 @@ var stateManagerIntentRequestSchema = object({
|
|
|
61298
61322
|
var storeBillingDiscountCodeRequestSchema = object({
|
|
61299
61323
|
company: string().max(64).nullish(),
|
|
61300
61324
|
kind: billingDiscountKindEnumSchema.optional().describe("What a discount code states: a price, or a share off the list price. A code's promise is an **amount**, because an amount is what a client is charged and what a price window records. A percentage is therefore a way of *deriving* that amount once, at the month the window opens, against the list price effective then — not a second pricing rule that would reprice a settled month when a list price moves. The kind is stored rather than inferred from which column is filled, so a half-written code cannot mean two things and an existing row keeps its original meaning as `amount`.\n"),
|
|
61301
|
-
product: billingProductEnumSchema.optional().describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
61325
|
+
product: billingProductEnumSchema.optional().describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
61302
61326
|
packageKey: string().max(64).nullish(),
|
|
61303
61327
|
amountCents: int().min(0).max(1e8).optional(),
|
|
61304
61328
|
basisPoints: int().min(1).max(1e4).optional().describe("A share above 100% would charge a client for being given a code, and zero grants nothing at all."),
|
|
@@ -61322,7 +61346,7 @@ var storeBillingExportProfileRequestSchema = object({
|
|
|
61322
61346
|
taxCode: string().max(32).nullish()
|
|
61323
61347
|
})).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
61324
61348
|
productMappings: array(object({
|
|
61325
|
-
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
61349
|
+
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
61326
61350
|
accountCode: string().max(32).nullish(),
|
|
61327
61351
|
itemName: string().max(64).nullish()
|
|
61328
61352
|
})).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
@@ -61337,10 +61361,20 @@ var storeBillingExportRequestSchema = object({
|
|
|
61337
61361
|
from: date(),
|
|
61338
61362
|
to: date()
|
|
61339
61363
|
}).describe("One accountant's pack over a date range, or the preview of the same range.\n\nThe range is a pair of local calendar dates, matched against the document's own issue date (an\ninvoice's `invoice_date`, a credit note's `credit_date`), which is why they are `Y-m-d` rather than\ninstants: the accountant thinks in issue months, and a service period is never the selector. The\nrange is bounded so one request cannot try to build a pack over years of history.");
|
|
61364
|
+
var storeBillingOneOffInvoiceRequestSchema = object({
|
|
61365
|
+
issuingRequestKey: uuid(),
|
|
61366
|
+
lines: array(object({
|
|
61367
|
+
description: string().max(255),
|
|
61368
|
+
quantity: int().min(1).max(1e3),
|
|
61369
|
+
unitGrossCents: int().min(1).max(1e8),
|
|
61370
|
+
discountCents: int().min(0).max(1e8).optional(),
|
|
61371
|
+
unitLabel: billingOneOffInvoiceUnitLabelEnumSchema.optional()
|
|
61372
|
+
})).min(1).max(20)
|
|
61373
|
+
});
|
|
61340
61374
|
var storeBillingPaymentMethodRequestSchema = object({ replacesMethodUuid: uuid().nullish() }).describe("Start authorizing a payment method, optionally replacing one that already exists.\n\nThere is no amount, no card field and no customer-supplied provider detail here: the customer is\nsent to the provider to enter the card, and only a verified provider confirmation can activate it.");
|
|
61341
61375
|
var storeBillingRateRequestSchema = object({
|
|
61342
61376
|
company: string().max(64).nullish(),
|
|
61343
|
-
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
61377
|
+
product: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
61344
61378
|
packageKey: string().max(64).nullish(),
|
|
61345
61379
|
amountCents: int().min(0).max(1e8),
|
|
61346
61380
|
amountBasis: union([billingAmountBasisEnumSchema, _null()]).optional(),
|
|
@@ -61709,7 +61743,7 @@ var updateBillingExportProfileRequestSchema = object({
|
|
|
61709
61743
|
taxCode: string().max(32).nullish()
|
|
61710
61744
|
})).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
61711
61745
|
productMappings: array(object({
|
|
61712
|
-
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope.
|
|
61746
|
+
productCode: billingProductEnumSchema.describe("The tariff lines our documents define. `MHU` is the recurring managed hosting unit; `MHS` is the one-off managed hosting setup. `STO` is one recurring 10 GB storage block and `TRF` is one recurring chargeable 10 GB transfer block; the product variant (object storage, disk) is the rate's `package_key`, which is the price book's existing scope. `SUN` is a staff-issued sundry or time line, also selectable in the existing one-off price book. Product codes describe what a document bills as, while package keys scope the agreed price.\n"),
|
|
61713
61747
|
accountCode: string().max(32).nullish(),
|
|
61714
61748
|
itemName: string().max(64).nullish()
|
|
61715
61749
|
})).refine((items) => new Set(items).size === items.length, { message: "Array entries must be unique" }).optional(),
|
|
@@ -67118,6 +67152,13 @@ union([
|
|
|
67118
67152
|
messageDataSchema,
|
|
67119
67153
|
messageDataSchema
|
|
67120
67154
|
]);
|
|
67155
|
+
object({ company: string() });
|
|
67156
|
+
union([
|
|
67157
|
+
object({ message: string().describe("Error overview.") }),
|
|
67158
|
+
object({ message: string().describe("Error overview.") }),
|
|
67159
|
+
messageDataSchema,
|
|
67160
|
+
messageDataSchema
|
|
67161
|
+
]);
|
|
67121
67162
|
activateHostingPaidRequestSchema.describe("Approving one environment's move onto a paid purchase.\n\nThe package is not validated against a list here: the supported keys belong to the purchase catalog, and\nthe service refuses anything it does not offer by name with the keys it does. Repeating that list in a\nsecond place is how two answers start disagreeing.\n\n`approveSetupCharge` is explicit rather than implied by activating. A setup is charged once per\nenvironment, ever, so whether this approval includes it is a decision the operator makes and the audit\nrecords.");
|
|
67122
67163
|
object({
|
|
67123
67164
|
company: string(),
|
|
@@ -68284,7 +68325,7 @@ var BILLING_METADATA = {
|
|
|
68284
68325
|
{
|
|
68285
68326
|
name: "--product",
|
|
68286
68327
|
takesValue: true,
|
|
68287
|
-
description: "A rate's product: MHU, MHS, STO or
|
|
68328
|
+
description: "A rate's product: MHU, MHS, STO, TRF or SUN."
|
|
68288
68329
|
},
|
|
68289
68330
|
{
|
|
68290
68331
|
name: "--package",
|
|
@@ -68553,6 +68594,7 @@ var BILLING_METADATA = {
|
|
|
68553
68594
|
"run issue",
|
|
68554
68595
|
"invoices",
|
|
68555
68596
|
"invoice",
|
|
68597
|
+
"invoice create",
|
|
68556
68598
|
"invoice retry",
|
|
68557
68599
|
"invoice void",
|
|
68558
68600
|
"invoice credit",
|
|
@@ -68621,6 +68663,20 @@ var BILLING_METADATA = {
|
|
|
68621
68663
|
"refund status"
|
|
68622
68664
|
]
|
|
68623
68665
|
};
|
|
68666
|
+
// src/commands/billing-one-off.ts
|
|
68667
|
+
/** Issue described extras using the same invoice lifecycle as monthly charges. */
|
|
68668
|
+
async function issueOneOffInvoice(context) {
|
|
68669
|
+
const company = await requireCompany(context.flags);
|
|
68670
|
+
const request = billingRequestFromFile(context, "one-off invoice", storeBillingOneOffInvoiceRequestSchema);
|
|
68671
|
+
const total = request.lines.reduce((sum, line) => sum + line.quantity * line.unitGrossCents - (line.discountCents ?? 0), 0);
|
|
68672
|
+
return {
|
|
68673
|
+
kind: "write",
|
|
68674
|
+
outcome: await confirmableWrite(context, `Issue a one-off invoice to ${company}: ${request.lines.length} line(s), ${(total / 100).toFixed(2)} ZAR including VAT. This reserves a number and queues its PDF; it does not take payment.`, async () => platformBillingOneOffInvoiceStore({
|
|
68675
|
+
path: { company },
|
|
68676
|
+
body: request
|
|
68677
|
+
}).unwrap())
|
|
68678
|
+
};
|
|
68679
|
+
}
|
|
68624
68680
|
// src/commands/billing-operation-text.ts
|
|
68625
68681
|
/** A support or client view of a billing account statement. */
|
|
68626
68682
|
function accountText(account) {
|
|
@@ -69008,6 +69064,7 @@ async function invoices(context) {
|
|
|
69008
69064
|
};
|
|
69009
69065
|
}
|
|
69010
69066
|
async function invoice(context, rest) {
|
|
69067
|
+
if (rest[0] === "create") return issueOneOffInvoice(context);
|
|
69011
69068
|
if (rest[0] === "retry") return retryInvoice(context);
|
|
69012
69069
|
if (rest[0] === "re-render") return reRenderInvoice(context);
|
|
69013
69070
|
if (rest[0] === "void") return voidInvoice(context);
|
|
@@ -69092,6 +69149,10 @@ var billing = {
|
|
|
69092
69149
|
};
|
|
69093
69150
|
// src/commands/billing-topics.ts
|
|
69094
69151
|
var BILLING_TOPICS = [
|
|
69152
|
+
{
|
|
69153
|
+
path: ["invoice", "create"],
|
|
69154
|
+
usage: "hostingctl billing invoice create --company <slug> --file <invoice.json> --confirm\n\nIssue sundries or extra work through the normal invoice lifecycle. The file contains issuingRequestKey (UUID) and lines with description, quantity, unitGrossCents (including VAT), optional discountCents (amount off the whole line) and unitLabel (hours or items). Reuse the same key and contents after a failed response. --dry-run sends nothing; issuing does not take a payment."
|
|
69155
|
+
},
|
|
69095
69156
|
{
|
|
69096
69157
|
path: ["issuer"],
|
|
69097
69158
|
usage: "hostingctl billing issuer [update --file <issuer.json>]\n\nRead the billing issuer or update named particulars from a validated JSON request file. Existing issued documents keep their frozen identity."
|
|
@@ -86409,7 +86470,7 @@ function writeUpdateState(state, env = process.env) {
|
|
|
86409
86470
|
} catch {}
|
|
86410
86471
|
}
|
|
86411
86472
|
// src/version.ts
|
|
86412
|
-
var VERSION = "1.0.
|
|
86473
|
+
var VERSION = "1.0.817";
|
|
86413
86474
|
// src/commands/update.ts
|
|
86414
86475
|
/**
|
|
86415
86476
|
* `update` — bring this copy of the CLI up to the published version.
|
|
@@ -86483,7 +86544,7 @@ var update = {
|
|
|
86483
86544
|
}, process.env);
|
|
86484
86545
|
return {
|
|
86485
86546
|
...known,
|
|
86486
|
-
current: after ?? "1.0.
|
|
86547
|
+
current: after ?? "1.0.817",
|
|
86487
86548
|
latest: after ?? latest,
|
|
86488
86549
|
upToDate: after !== null && (latest === null || !isNewerVersion(latest, after)),
|
|
86489
86550
|
action: "run",
|
|
@@ -86765,7 +86826,7 @@ async function printUpdateNotice(options) {
|
|
|
86765
86826
|
}, env, { waitMs: NOTICE_LOCK_WAIT_MS });
|
|
86766
86827
|
} catch {}
|
|
86767
86828
|
if (latest === null) return;
|
|
86768
|
-
if (!isNewerVersion(latest, "1.0.
|
|
86829
|
+
if (!isNewerVersion(latest, "1.0.817")) return;
|
|
86769
86830
|
process.stderr.write(`A newer hostingctl is published: ${latest} (this copy is ${VERSION}). Run \`hostingctl update\` to update.\n`);
|
|
86770
86831
|
}
|
|
86771
86832
|
/** Whether an environment variable is set to something, which is how CI and the opt-out are read. */
|