oblien 2.7.1 → 2.8.0
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/README.md +1 -0
- package/dist/billing.d.ts +47 -8
- package/dist/billing.d.ts.map +1 -1
- package/dist/billing.js +54 -7
- package/dist/billing.js.map +1 -1
- package/dist/cli/commands/desktop.d.ts.map +1 -1
- package/dist/cli/commands/desktop.js +19 -7
- package/dist/cli/commands/desktop.js.map +1 -1
- package/dist/types/billing.d.ts +256 -13
- package/dist/types/billing.d.ts.map +1 -1
- package/dist/types/desktop.d.ts +6 -2
- package/dist/types/desktop.d.ts.map +1 -1
- package/dist/types/desktop.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/webhooks.d.ts +1 -1
- package/dist/types/webhooks.d.ts.map +1 -1
- package/docs/billing.md +110 -8
- package/docs/desktop.md +13 -7
- package/docs/namespaces.md +12 -6
- package/docs/releases/2.8.0.md +19 -0
- package/docs/webhooks.md +5 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -56,6 +56,7 @@ The client wraps every part of the platform. Each feature has a deep-dive page i
|
|
|
56
56
|
| **Desktop** | `runtime.desktop` | Live access, browser viewer and native VNC tunnel through the gateway | [docs/desktop](./docs/desktop.md) |
|
|
57
57
|
| **Pages** | `client.pages` | Deploy static files to the edge CDN with automatic TLS | [docs/pages](./docs/pages.md) |
|
|
58
58
|
| **Namespaces** | `client.namespaces` | Group workspaces; resource limits, quotas, per-namespace usage | [docs/namespaces](./docs/namespaces.md) |
|
|
59
|
+
| **Billing** | `client.billing` | Capped PAYG, prepaid monthly capacity, reseller subscriptions, transfer packs and saved usage comparisons | [docs/billing](./docs/billing.md) |
|
|
59
60
|
| **Domains** | `client.domain` | Slug/DNS pre-flight, route listing, SSL certs + auto-renew | [docs/domains](./docs/domains.md) |
|
|
60
61
|
| **Edge Proxy** | `client.edgeProxy` | Reverse-proxy subdomains to *verified* external upstreams | [docs/edge-proxy](./docs/edge-proxy.md) |
|
|
61
62
|
| **Edge Tunnel** | `client.edgeTunnel` | Expose a local port to the internet (ngrok-style) | [docs/edge-tunnel](./docs/edge-tunnel.md) |
|
package/dist/billing.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import type { HttpClient } from './http.js';
|
|
2
|
-
import type { BillingBalance, BillingCatalog, BillingDefaults, BillingDefaultsParams, BillingPolicy, BillingPolicyParams, CheckoutParams, CheckoutResponse, BillingCheckoutResponse, Entitlement, PortalParams, PortalResponse, BillingSubscriptionResponse, PreviewPlanChangeParams, BillingPlanChangeQuoteResponse, ChangePlanParams, BillingPlanChangeResponse, CancelPlanChangeParams, ResetQuotaParams, ResetQuotaResponse } from './types/billing.js';
|
|
2
|
+
import type { BillingBalance, BillingCatalog, BillingDefaults, BillingDefaultsParams, BillingPolicy, BillingPolicyParams, CheckoutParams, CheckoutResponse, BillingCheckoutResponse, Entitlement, PortalParams, PortalResponse, BillingSubscriptionResponse, PreviewPlanChangeParams, BillingPlanChangeQuoteResponse, ChangePlanParams, BillingPlanChangeResponse, CancelPlanChangeParams, ResetQuotaParams, ResetQuotaResponse, CapacityCatalog, CapacityResponse, CapacityQuoteResponse, PreviewCapacityParams, ConfirmCapacityParams, CapacityCheckoutParams, CapacityCheckoutResponse, BillingSavings } from './types/billing.js';
|
|
3
3
|
/**
|
|
4
|
-
* Billing — namespace-bound subscriptions,
|
|
4
|
+
* Billing — namespace-bound PAYG/monthly capacity, subscriptions, funding and entitlement.
|
|
5
5
|
*
|
|
6
6
|
* Oblien is the payment engine: it runs Stripe internally, meters usage, enforces
|
|
7
7
|
* quotas and suspends namespaces. You never touch Stripe and never re-implement quota
|
|
8
8
|
* math.
|
|
9
9
|
*
|
|
10
10
|
* **The namespace is the unit of billing.** Every subscription, quota, entitlement and
|
|
11
|
-
* suspension is per-namespace. The owner's wallet
|
|
11
|
+
* suspension is per-namespace. The owner's wallet funds payment; a purchased capacity
|
|
12
|
+
* pool belongs only to its namespace. That is what
|
|
12
13
|
* makes this usable for multi-tenant products: give each of your customers a namespace
|
|
13
14
|
* and they are billed independently.
|
|
14
15
|
*
|
|
@@ -35,7 +36,7 @@ import type { BillingBalance, BillingCatalog, BillingDefaults, BillingDefaultsPa
|
|
|
35
36
|
* the browser coming back. Poll {@link Billing.entitlement} or listen for
|
|
36
37
|
* `payment.succeeded`.
|
|
37
38
|
*
|
|
38
|
-
* ###
|
|
39
|
+
* ### Existing metered allowance integrations
|
|
39
40
|
*
|
|
40
41
|
* - **Mode B (above)** — Oblien hosts the payment against its own catalog. Use
|
|
41
42
|
* {@link Billing.catalog}, {@link Billing.checkout}, {@link Billing.portal}.
|
|
@@ -43,8 +44,12 @@ import type { BillingBalance, BillingCatalog, BillingDefaults, BillingDefaultsPa
|
|
|
43
44
|
* Skip checkout entirely and set the ceiling directly with {@link Billing.setPolicy}
|
|
44
45
|
* (or {@link Billing.setDefaults} for a template applied to every new namespace).
|
|
45
46
|
*
|
|
47
|
+
* Current compute uses {@link Billing.capacityCatalog}, {@link Billing.previewCapacity}
|
|
48
|
+
* and {@link Billing.confirmCapacity}; hosted monthly offers also use checkout with
|
|
49
|
+
* billingMode: 'monthly', capacity and credits: 0. See docs/billing.md for both flows.
|
|
50
|
+
*
|
|
46
51
|
* **Requires an `admin`- or `billing`-scoped API key** for everything except
|
|
47
|
-
* {@link Billing.catalog}. Namespace- and workspace-scoped tokens — the lightweight ones
|
|
52
|
+
* {@link Billing.catalog} and {@link Billing.capacityCatalog}. Namespace- and workspace-scoped tokens — the lightweight ones
|
|
48
53
|
* you hand to end-users — are refused on every billing route by design.
|
|
49
54
|
*/
|
|
50
55
|
export declare class Billing {
|
|
@@ -53,6 +58,36 @@ export declare class Billing {
|
|
|
53
58
|
constructor(client: {
|
|
54
59
|
_http: HttpClient;
|
|
55
60
|
});
|
|
61
|
+
/** Backend prices for both compute modes. Dollar amounts on quotes are cents. */
|
|
62
|
+
capacityCatalog(): Promise<CapacityCatalog>;
|
|
63
|
+
/** Paid-through coverage, effective pool, network extras and recorded savings. */
|
|
64
|
+
capacity(namespace: string): Promise<CapacityResponse>;
|
|
65
|
+
/** Quote a new pool or a wallet-funded change. Existing Stripe subscriptions
|
|
66
|
+
* use previewPlanChange/changePlan, preserving their saved prices. */
|
|
67
|
+
previewCapacity(namespace: string, params: PreviewCapacityParams): Promise<CapacityQuoteResponse>;
|
|
68
|
+
/** Atomically redeem eligible paid wallet funds and apply the saved quote.
|
|
69
|
+
* Namespace allowance numbers are not redeemable wallet money. */
|
|
70
|
+
confirmCapacity(namespace: string, params: ConfirmCapacityParams): Promise<CapacityResponse>;
|
|
71
|
+
/** Open Stripe for a saved monthly quote. Read capacity or signed events for
|
|
72
|
+
* fulfillment; returning from the browser is never proof of payment. */
|
|
73
|
+
capacityCheckout(namespace: string, params: CapacityCheckoutParams): Promise<CapacityCheckoutResponse>;
|
|
74
|
+
cancelCapacityChange(namespace: string, params: ConfirmCapacityParams): Promise<CapacityResponse>;
|
|
75
|
+
/** Wallet renewal only; hosted subscriptions use cancelSubscription/resumeSubscription. */
|
|
76
|
+
setCapacityAutoRenew(namespace: string, params: {
|
|
77
|
+
autoRenew: boolean;
|
|
78
|
+
idempotencyKey: string;
|
|
79
|
+
}): Promise<CapacityResponse>;
|
|
80
|
+
/** A separately funded proxy-transfer pack. Confirm with confirmCapacity. */
|
|
81
|
+
previewNetworkTopup(namespace: string, params: {
|
|
82
|
+
unitAmount: number;
|
|
83
|
+
idempotencyKey: string;
|
|
84
|
+
}): Promise<CapacityQuoteResponse>;
|
|
85
|
+
/** Saved metering comparisons, not a forecast or a refund. Amounts are USD. */
|
|
86
|
+
savings(params?: {
|
|
87
|
+
namespace?: string;
|
|
88
|
+
workspaceId?: string;
|
|
89
|
+
month?: string;
|
|
90
|
+
}): Promise<BillingSavings>;
|
|
56
91
|
/**
|
|
57
92
|
* Plans and credit packs on offer. Public — no authentication.
|
|
58
93
|
*
|
|
@@ -67,7 +102,7 @@ export declare class Billing {
|
|
|
67
102
|
/**
|
|
68
103
|
* Create a hosted checkout bound to a namespace, and get the URL to redirect to.
|
|
69
104
|
*
|
|
70
|
-
*
|
|
105
|
+
* Catalog credit products support two kinds:
|
|
71
106
|
*
|
|
72
107
|
* - `kind: 'topup'` + `packId` — adds the pack's credits to that namespace's ceiling.
|
|
73
108
|
* Unused purchased credits survive renewal and stack, so this unblocks a namespace that
|
|
@@ -97,6 +132,8 @@ export declare class Billing {
|
|
|
97
132
|
* For reseller pricing, send `offer` instead of planTierId/packId. A $10 offer with
|
|
98
133
|
* `credits: 100` funds 1000 wallet credits at the current standard rate and grants
|
|
99
134
|
* only 100 namespace credits. The offer name/description appears in checkout.
|
|
135
|
+
* A monthly capacity offer instead uses billingMode: 'monthly', capacity,
|
|
136
|
+
* credits: 0 and no credit policy; the saved provider fee is deducted from funding.
|
|
100
137
|
* Stripe-hosted checkout with native code entry is the default. Set
|
|
101
138
|
* `allowPromotionCodes: false` to disable codes, or `checkoutMode: 'oblien'`
|
|
102
139
|
* for the custom page with scoped, capped administrator promotions.
|
|
@@ -154,7 +191,9 @@ export declare class Billing {
|
|
|
154
191
|
* // ent.quota → { limit, used, balance } ← limit INCLUDES purchased top-ups
|
|
155
192
|
* ```
|
|
156
193
|
*
|
|
157
|
-
*
|
|
194
|
+
* A capacity contract returns billingMode, computeCovered and capacity; its quota
|
|
195
|
+
* uses null limit/balance for compatibility. Read coverage and actual pool limits.
|
|
196
|
+
* For a metered contract, quota.limit === null means no finite credit allowance.
|
|
158
197
|
*/
|
|
159
198
|
entitlement(namespace: string): Promise<Entitlement>;
|
|
160
199
|
/**
|
|
@@ -165,7 +204,7 @@ export declare class Billing {
|
|
|
165
204
|
* if (blocking) return showTopUpPrompt();
|
|
166
205
|
* ```
|
|
167
206
|
*
|
|
168
|
-
* `blocking`
|
|
207
|
+
* `blocking` reflects the applicable contract's suspension, expiry and funding. You do not
|
|
169
208
|
* have to enforce it yourself — Oblien already refuses creates, starts, resumes and
|
|
170
209
|
* wakes for a blocked namespace — but checking lets you show a useful message instead
|
|
171
210
|
* of surfacing an error.
|
package/dist/billing.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC5C,OAAO,KAAK,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,WAAW,EACX,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,uBAAuB,EACvB,8BAA8B,EAC9B,gBAAgB,EAChB,yBAAyB,EACzB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,qBAAqB,EAC/E,qBAAqB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,cAAc,EACxF,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,qBAAa,OAAO;IAClB,gBAAgB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,C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GAAG,OAAO,CAAC,WAAW,CAAC;IAQ1D;;;;;;;;;;;;OAYG;IACG,OAAO,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC;IAQzD;;;;;;OAMG;IACG,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAOvD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,mBAAmB,GAAG,OAAO,CAAC,aAAa,CAAC;IAQvF;;OAEG;IACG,QAAQ,IAAI,OAAO,CAAC,eAAe,CAAC;IAO1C;;;;;;;;;;;;;;;;;OAiBG;IACG,WAAW,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC;CAO3E"}
|
package/dist/billing.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Billing — namespace-bound subscriptions,
|
|
2
|
+
* Billing — namespace-bound PAYG/monthly capacity, subscriptions, funding and entitlement.
|
|
3
3
|
*
|
|
4
4
|
* Oblien is the payment engine: it runs Stripe internally, meters usage, enforces
|
|
5
5
|
* quotas and suspends namespaces. You never touch Stripe and never re-implement quota
|
|
6
6
|
* math.
|
|
7
7
|
*
|
|
8
8
|
* **The namespace is the unit of billing.** Every subscription, quota, entitlement and
|
|
9
|
-
* suspension is per-namespace. The owner's wallet
|
|
9
|
+
* suspension is per-namespace. The owner's wallet funds payment; a purchased capacity
|
|
10
|
+
* pool belongs only to its namespace. That is what
|
|
10
11
|
* makes this usable for multi-tenant products: give each of your customers a namespace
|
|
11
12
|
* and they are billed independently.
|
|
12
13
|
*
|
|
@@ -33,7 +34,7 @@
|
|
|
33
34
|
* the browser coming back. Poll {@link Billing.entitlement} or listen for
|
|
34
35
|
* `payment.succeeded`.
|
|
35
36
|
*
|
|
36
|
-
* ###
|
|
37
|
+
* ### Existing metered allowance integrations
|
|
37
38
|
*
|
|
38
39
|
* - **Mode B (above)** — Oblien hosts the payment against its own catalog. Use
|
|
39
40
|
* {@link Billing.catalog}, {@link Billing.checkout}, {@link Billing.portal}.
|
|
@@ -41,8 +42,12 @@
|
|
|
41
42
|
* Skip checkout entirely and set the ceiling directly with {@link Billing.setPolicy}
|
|
42
43
|
* (or {@link Billing.setDefaults} for a template applied to every new namespace).
|
|
43
44
|
*
|
|
45
|
+
* Current compute uses {@link Billing.capacityCatalog}, {@link Billing.previewCapacity}
|
|
46
|
+
* and {@link Billing.confirmCapacity}; hosted monthly offers also use checkout with
|
|
47
|
+
* billingMode: 'monthly', capacity and credits: 0. See docs/billing.md for both flows.
|
|
48
|
+
*
|
|
44
49
|
* **Requires an `admin`- or `billing`-scoped API key** for everything except
|
|
45
|
-
* {@link Billing.catalog}. Namespace- and workspace-scoped tokens — the lightweight ones
|
|
50
|
+
* {@link Billing.catalog} and {@link Billing.capacityCatalog}. Namespace- and workspace-scoped tokens — the lightweight ones
|
|
46
51
|
* you hand to end-users — are refused on every billing route by design.
|
|
47
52
|
*/
|
|
48
53
|
export class Billing {
|
|
@@ -51,6 +56,44 @@ export class Billing {
|
|
|
51
56
|
constructor(client) {
|
|
52
57
|
this._http = client._http;
|
|
53
58
|
}
|
|
59
|
+
/** Backend prices for both compute modes. Dollar amounts on quotes are cents. */
|
|
60
|
+
async capacityCatalog() {
|
|
61
|
+
return this._http.request({ method: 'GET', path: '/billing/capacity/catalog' });
|
|
62
|
+
}
|
|
63
|
+
/** Paid-through coverage, effective pool, network extras and recorded savings. */
|
|
64
|
+
async capacity(namespace) {
|
|
65
|
+
return this._http.request({ method: 'GET', path: '/billing/capacity', query: { namespace } });
|
|
66
|
+
}
|
|
67
|
+
/** Quote a new pool or a wallet-funded change. Existing Stripe subscriptions
|
|
68
|
+
* use previewPlanChange/changePlan, preserving their saved prices. */
|
|
69
|
+
async previewCapacity(namespace, params) {
|
|
70
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/preview', body: { ...params, namespace } });
|
|
71
|
+
}
|
|
72
|
+
/** Atomically redeem eligible paid wallet funds and apply the saved quote.
|
|
73
|
+
* Namespace allowance numbers are not redeemable wallet money. */
|
|
74
|
+
async confirmCapacity(namespace, params) {
|
|
75
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/confirm', body: { ...params, namespace } });
|
|
76
|
+
}
|
|
77
|
+
/** Open Stripe for a saved monthly quote. Read capacity or signed events for
|
|
78
|
+
* fulfillment; returning from the browser is never proof of payment. */
|
|
79
|
+
async capacityCheckout(namespace, params) {
|
|
80
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/checkout', body: { ...params, namespace } });
|
|
81
|
+
}
|
|
82
|
+
async cancelCapacityChange(namespace, params) {
|
|
83
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/change/cancel', body: { ...params, namespace } });
|
|
84
|
+
}
|
|
85
|
+
/** Wallet renewal only; hosted subscriptions use cancelSubscription/resumeSubscription. */
|
|
86
|
+
async setCapacityAutoRenew(namespace, params) {
|
|
87
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/renewal', body: { ...params, namespace } });
|
|
88
|
+
}
|
|
89
|
+
/** A separately funded proxy-transfer pack. Confirm with confirmCapacity. */
|
|
90
|
+
async previewNetworkTopup(namespace, params) {
|
|
91
|
+
return this._http.request({ method: 'POST', path: '/billing/capacity/network/preview', body: { ...params, namespace } });
|
|
92
|
+
}
|
|
93
|
+
/** Saved metering comparisons, not a forecast or a refund. Amounts are USD. */
|
|
94
|
+
async savings(params = {}) {
|
|
95
|
+
return this._http.request({ method: 'GET', path: '/billing/savings', query: params });
|
|
96
|
+
}
|
|
54
97
|
/**
|
|
55
98
|
* Plans and credit packs on offer. Public — no authentication.
|
|
56
99
|
*
|
|
@@ -70,7 +113,7 @@ export class Billing {
|
|
|
70
113
|
/**
|
|
71
114
|
* Create a hosted checkout bound to a namespace, and get the URL to redirect to.
|
|
72
115
|
*
|
|
73
|
-
*
|
|
116
|
+
* Catalog credit products support two kinds:
|
|
74
117
|
*
|
|
75
118
|
* - `kind: 'topup'` + `packId` — adds the pack's credits to that namespace's ceiling.
|
|
76
119
|
* Unused purchased credits survive renewal and stack, so this unblocks a namespace that
|
|
@@ -100,6 +143,8 @@ export class Billing {
|
|
|
100
143
|
* For reseller pricing, send `offer` instead of planTierId/packId. A $10 offer with
|
|
101
144
|
* `credits: 100` funds 1000 wallet credits at the current standard rate and grants
|
|
102
145
|
* only 100 namespace credits. The offer name/description appears in checkout.
|
|
146
|
+
* A monthly capacity offer instead uses billingMode: 'monthly', capacity,
|
|
147
|
+
* credits: 0 and no credit policy; the saved provider fee is deducted from funding.
|
|
103
148
|
* Stripe-hosted checkout with native code entry is the default. Set
|
|
104
149
|
* `allowPromotionCodes: false` to disable codes, or `checkoutMode: 'oblien'`
|
|
105
150
|
* for the custom page with scoped, capped administrator promotions.
|
|
@@ -207,7 +252,9 @@ export class Billing {
|
|
|
207
252
|
* // ent.quota → { limit, used, balance } ← limit INCLUDES purchased top-ups
|
|
208
253
|
* ```
|
|
209
254
|
*
|
|
210
|
-
*
|
|
255
|
+
* A capacity contract returns billingMode, computeCovered and capacity; its quota
|
|
256
|
+
* uses null limit/balance for compatibility. Read coverage and actual pool limits.
|
|
257
|
+
* For a metered contract, quota.limit === null means no finite credit allowance.
|
|
211
258
|
*/
|
|
212
259
|
async entitlement(namespace) {
|
|
213
260
|
return this._http.request({
|
|
@@ -224,7 +271,7 @@ export class Billing {
|
|
|
224
271
|
* if (blocking) return showTopUpPrompt();
|
|
225
272
|
* ```
|
|
226
273
|
*
|
|
227
|
-
* `blocking`
|
|
274
|
+
* `blocking` reflects the applicable contract's suspension, expiry and funding. You do not
|
|
228
275
|
* have to enforce it yourself — Oblien already refuses creates, starts, resumes and
|
|
229
276
|
* wakes for a blocked namespace — but checking lets you show a useful message instead
|
|
230
277
|
* of surfacing an error.
|
package/dist/billing.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.js","sourceRoot":"","sources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AM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB,kBAAkB,CAAC,SAAS,CAAC,EAAE;YACxD,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,QAAQ;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAkB;YACzC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB;SAC1B,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;OAiBG;IACH,KAAK,CAAC,WAAW,CAAC,MAA6B;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAkB;YACzC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,mBAAmB;YACzB,IAAI,EAAE,MAAM;SACb,CAAC,CAAC;IACL,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/desktop.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"desktop.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/desktop.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD/E"}
|
|
@@ -4,22 +4,34 @@ import { parseFlag, requireId } from './helpers.js';
|
|
|
4
4
|
export async function desktopCmd(args, flags) {
|
|
5
5
|
const action = args[0];
|
|
6
6
|
if (!action || action === '--help') {
|
|
7
|
-
console.log('Usage: oblien desktop <list|create|start|stop|delete|status|enable|disable|install|installation|credentials|ssh|vnc> <workspace-id> [session-id] [--name Work --resolution 1920x1080] [--session ID] [--port 5901]');
|
|
7
|
+
console.log('Usage: oblien desktop <list|create|update|start|stop|delete|status|enable|disable|install|installation|credentials|ssh|vnc> <workspace-id> [session-id] [--name Work --resolution 1920x1080] [--session ID] [--port 5901]');
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
if (!['list', 'create', 'start', 'stop', 'delete', 'status', 'enable', 'disable', 'install', 'installation', 'credentials', 'ssh', 'vnc'].includes(action))
|
|
10
|
+
if (!['list', 'create', 'update', 'start', 'stop', 'delete', 'status', 'enable', 'disable', 'install', 'installation', 'credentials', 'ssh', 'vnc'].includes(action))
|
|
11
11
|
throw new Error('Unknown desktop action');
|
|
12
12
|
const id = requireId(args[1], `desktop ${action} <workspace-id>`);
|
|
13
13
|
const client = buildClient(flags);
|
|
14
14
|
const sessionId = parseFlag(args.slice(2), '--session');
|
|
15
15
|
if (action === 'list')
|
|
16
16
|
return printResult(await client.workspaces.desktop.listSessions(id), flags.json);
|
|
17
|
-
if (action === 'create') {
|
|
17
|
+
if (action === 'create' || action === 'update') {
|
|
18
18
|
const name = parseFlag(args.slice(2), '--name');
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const size = parseFlag(args.slice(2), '--resolution');
|
|
20
|
+
const resolution = /^(\d+)x(\d+)$/.exec(size || '');
|
|
21
|
+
if (size && !resolution)
|
|
22
|
+
throw new Error('Use --resolution WIDTHxHEIGHT');
|
|
23
|
+
const patch = { ...(name ? { name } : {}), ...(resolution ? { resolution: { width: Number(resolution[1]), height: Number(resolution[2]) } } : {}) };
|
|
24
|
+
if (action === 'update') {
|
|
25
|
+
if (!name && !resolution)
|
|
26
|
+
throw new Error('Set --name or --resolution WIDTHxHEIGHT');
|
|
27
|
+
const selected = sessionId || requireId(args[2], 'desktop update <workspace-id> <session-id>');
|
|
28
|
+
return printResult(await client.workspaces.desktop.updateSession(id, selected, patch), flags.json);
|
|
29
|
+
}
|
|
30
|
+
if (!name)
|
|
31
|
+
throw new Error('Set --name before creating a desktop');
|
|
32
|
+
if (!resolution && (await client.workspaces.desktop.listSessions(id)).capabilities.resolution)
|
|
33
|
+
throw new Error('Set --resolution WIDTHxHEIGHT before creating a desktop');
|
|
34
|
+
return printResult(await client.workspaces.desktop.createSession(id, { ...patch, name }), flags.json);
|
|
23
35
|
}
|
|
24
36
|
if (action === 'start' || action === 'stop' || action === 'delete') {
|
|
25
37
|
const selected = sessionId || requireId(args[2], `desktop ${action} <workspace-id> <session-id>`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop.js","sourceRoot":"","sources":["../../../src/cli/commands/desktop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc,EAAE,KAAe;IAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CAAC,MAAM,IAAI,MAAM,KAAK,QAAQ,EAAE,CAAC;QACnC,OAAO,CAAC,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"desktop.js","sourceRoot":"","sources":["../../../src/cli/commands/desktop.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGpD,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,IAAc,EAAE,KAAe;IAC9D,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;IACvB,IAAI,CAAC,MAAM,IAAI,MA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C5H,MAAM,KAAK,GAAG,GAAG,EAAE;QACjB,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;QACxC,OAAO,CAAC,cAAc,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QACzC,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,GAAG,OAAO,CAAC,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,CAAC;IACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IAC9B,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACjC,CAAC"}
|
package/dist/types/billing.d.ts
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Billing types — namespace-bound subscriptions, credit top-ups and entitlement.
|
|
3
3
|
*
|
|
4
4
|
* The namespace is the unit of billing: every subscription, quota, entitlement and
|
|
5
|
-
* suspension is per-namespace. The owner
|
|
5
|
+
* suspension is per-namespace. The owner funds payments; purchased capacity is
|
|
6
|
+
* isolated to its namespace and does not change the owner's account plan.
|
|
6
7
|
*
|
|
7
8
|
* Credits are numbers on the wire; metered usage and refund adjustments may be fractional.
|
|
8
9
|
*/
|
|
@@ -80,6 +81,12 @@ export interface BillingOfferPolicy {
|
|
|
80
81
|
* un-block a namespace that has run out mid-cycle, with no plan change.
|
|
81
82
|
*/
|
|
82
83
|
export interface BillingOffer {
|
|
84
|
+
/** Monthly offers reserve a paid pool and use credits: 0. Omit (or use historical
|
|
85
|
+
* payg) for a metered credit offer; new capped PAYG uses previewCapacity. */
|
|
86
|
+
billingMode?: ComputeBillingMode;
|
|
87
|
+
capacity?: WorkspaceCapacity;
|
|
88
|
+
/** Optional published tariff. Changes retain the subscription's saved version by default. */
|
|
89
|
+
tariffId?: string;
|
|
83
90
|
/** Your server-side catalog reference; at most 100 characters. */
|
|
84
91
|
reference?: string;
|
|
85
92
|
/** Customer-facing product name; at most 120 characters. */
|
|
@@ -89,9 +96,9 @@ export interface BillingOffer {
|
|
|
89
96
|
/** USD cents, from 100 to 1000000. Funds the owner's wallet at Oblien's standard rate. */
|
|
90
97
|
unitAmount: number;
|
|
91
98
|
currency?: 'usd';
|
|
92
|
-
/** Namespace allowance, independent of wallet funding
|
|
99
|
+
/** Namespace allowance, independent of wallet funding. Use zero for monthly capacity. */
|
|
93
100
|
credits: number;
|
|
94
|
-
/**
|
|
101
|
+
/** Metered subscription only; rejected for monthly capacity, which has no credit overdraft. */
|
|
95
102
|
policy?: BillingOfferPolicy;
|
|
96
103
|
/** Subscription only. Saved VM caps; Oblien resolves effective account/platform capacity.
|
|
97
104
|
* Configured namespace caps may further restrict them; null means inherit.
|
|
@@ -110,7 +117,7 @@ export interface CheckoutParams {
|
|
|
110
117
|
offer?: BillingOffer;
|
|
111
118
|
/** With offer only: up to 35 string entries. Identity/routing/credit keys are reserved. */
|
|
112
119
|
metadata?: Record<string, string>;
|
|
113
|
-
/** Subscription only. Defaults to monthly. */
|
|
120
|
+
/** Subscription only. Defaults to monthly; capacity offers require monthly. */
|
|
114
121
|
billingInterval?: 'monthly' | 'yearly';
|
|
115
122
|
/**
|
|
116
123
|
* Where Stripe sends the browser after a successful payment.
|
|
@@ -154,6 +161,10 @@ export interface BillingCheckout {
|
|
|
154
161
|
/** Paid can remain pending until local fulfillment commits. Superseded checkouts do not replace a newer plan. */
|
|
155
162
|
fulfillmentStatus: 'pending' | 'completed' | 'partially_refunded' | 'refunded' | 'disputed' | 'expired' | 'failed' | 'superseded' | 'reversed';
|
|
156
163
|
walletCreditsGranted: number;
|
|
164
|
+
/** Monthly capacity: gross funding, provider fee, and signed net wallet change. */
|
|
165
|
+
walletCreditsFunded?: number;
|
|
166
|
+
capacityCreditsCharged?: number;
|
|
167
|
+
walletCreditDelta?: number;
|
|
157
168
|
namespaceCreditsGranted: number;
|
|
158
169
|
billingInterval: 'monthly' | 'yearly' | null;
|
|
159
170
|
subscriptionId: string | null;
|
|
@@ -290,15 +301,17 @@ export interface ResetQuotaResponse {
|
|
|
290
301
|
* The frozen entitlement status enum. Gate on exactly these four values — anything else
|
|
291
302
|
* breaks consumer banners.
|
|
292
303
|
*
|
|
293
|
-
* - `active` —
|
|
294
|
-
* - `past_due` —
|
|
295
|
-
* - `canceled` —
|
|
296
|
-
* - `credit_exhausted` —
|
|
304
|
+
* - `active` — the applicable funding or paid coverage permits compute.
|
|
305
|
+
* - `past_due` — the hosted subscription reports a payment problem; read current coverage.
|
|
306
|
+
* - `canceled` — the subscription or capacity period has ended.
|
|
307
|
+
* - `credit_exhausted` — required funding is missing, or the namespace is suspended.
|
|
308
|
+
* Read billingMode, computeCovered and BillingBalance.blocking; a monthly pool
|
|
309
|
+
* does not have an additional finite compute-credit allowance.
|
|
297
310
|
*/
|
|
298
311
|
export type EntitlementStatus = 'active' | 'past_due' | 'canceled' | 'credit_exhausted';
|
|
299
312
|
export interface EntitlementQuota {
|
|
300
313
|
/** Current namespace warning state; optional for older API deployments. */
|
|
301
|
-
alert?: import('./namespace.js').NamespaceQuotaAlert;
|
|
314
|
+
alert?: import('./namespace.js').NamespaceQuotaAlert | null;
|
|
302
315
|
/**
|
|
303
316
|
* The effective CEILING in credits: the plan's allowance plus any purchased top-ups.
|
|
304
317
|
* `null` = uncapped.
|
|
@@ -309,7 +322,8 @@ export interface EntitlementQuota {
|
|
|
309
322
|
/** Configured grace. Already included in balance; never add it a second time. */
|
|
310
323
|
overdraft?: number;
|
|
311
324
|
suspendThreshold?: number | null;
|
|
312
|
-
/**
|
|
325
|
+
/** Metered allowance: limit + overdraft - used. Capacity responses use null;
|
|
326
|
+
* gate on BillingBalance.blocking rather than recomputing access from this value. */
|
|
313
327
|
balance: number | null;
|
|
314
328
|
}
|
|
315
329
|
export interface Entitlement {
|
|
@@ -319,16 +333,23 @@ export interface Entitlement {
|
|
|
319
333
|
periodStart: string | null;
|
|
320
334
|
periodEnd: string | null;
|
|
321
335
|
quota: EntitlementQuota;
|
|
336
|
+
billingMode?: ComputeBillingMode;
|
|
337
|
+
computeCovered?: boolean;
|
|
338
|
+
capacity?: NamespaceCapacity | null;
|
|
322
339
|
}
|
|
323
340
|
export interface BillingBalance {
|
|
324
|
-
alert?: import('./namespace.js').NamespaceQuotaAlert;
|
|
341
|
+
alert?: import('./namespace.js').NamespaceQuotaAlert | null;
|
|
325
342
|
namespace: string;
|
|
326
343
|
/**
|
|
327
|
-
*
|
|
328
|
-
*
|
|
344
|
+
* The backend's billing gate for this contract: suspension, expiry or missing
|
|
345
|
+
* required funding. Paid monthly coverage survives an empty credit balance.
|
|
346
|
+
* Resource admission is checked separately when work is requested.
|
|
329
347
|
*/
|
|
330
348
|
blocking: boolean;
|
|
331
349
|
balance: number | null;
|
|
350
|
+
billingMode?: ComputeBillingMode;
|
|
351
|
+
computeCovered?: boolean;
|
|
352
|
+
paidThrough?: string | null;
|
|
332
353
|
}
|
|
333
354
|
/** Per-namespace allowance policy (Mode A: you collect payment, Oblien enforces the budget). */
|
|
334
355
|
export interface BillingPolicy {
|
|
@@ -358,4 +379,226 @@ export interface BillingDefaults extends Omit<BillingPolicy, 'purchasedCredits'
|
|
|
358
379
|
export interface BillingDefaultsParams extends BillingPolicyParams {
|
|
359
380
|
autoApply?: boolean;
|
|
360
381
|
}
|
|
382
|
+
/** Two compute policies; Stripe and wallet are payment sources, not modes. */
|
|
383
|
+
export type ComputeBillingMode = 'payg' | 'monthly';
|
|
384
|
+
export interface WorkspaceCapacity {
|
|
385
|
+
/** Shared CPU pool, in increments of 0.001 vCPU. Per-VM ceiling remains 12. */
|
|
386
|
+
vcpus: number;
|
|
387
|
+
memoryMb: number;
|
|
388
|
+
diskGb: number;
|
|
389
|
+
workspaces: number;
|
|
390
|
+
}
|
|
391
|
+
export interface CapacityTariff {
|
|
392
|
+
id: string;
|
|
393
|
+
currency: 'usd';
|
|
394
|
+
creditsPerDollar: number;
|
|
395
|
+
monthly: {
|
|
396
|
+
vcpuCents: number;
|
|
397
|
+
memoryGiBCents: number;
|
|
398
|
+
diskGiBCents: number;
|
|
399
|
+
minimumCents: number;
|
|
400
|
+
};
|
|
401
|
+
paygCapPercent: number;
|
|
402
|
+
usage: {
|
|
403
|
+
activeVcpuHourCents: number;
|
|
404
|
+
reservedGiBHourCents: number;
|
|
405
|
+
retainedGiBMonthCents: number;
|
|
406
|
+
monthHours: number;
|
|
407
|
+
};
|
|
408
|
+
network: {
|
|
409
|
+
managedProxyGiBCents: number;
|
|
410
|
+
minimumTopupCents: number;
|
|
411
|
+
};
|
|
412
|
+
requiredMeterVersion: number;
|
|
413
|
+
terms: {
|
|
414
|
+
cpuClass: 'shared';
|
|
415
|
+
networkIncluded: false;
|
|
416
|
+
backupsIncluded: false;
|
|
417
|
+
autoRenewDefault: false;
|
|
418
|
+
calendar: 'subscription_anniversary';
|
|
419
|
+
expiryGraceHours: number;
|
|
420
|
+
retainedAfterExpiryDays: number;
|
|
421
|
+
automaticDeletion: false;
|
|
422
|
+
retentionBilling: 'storage_until_deleted';
|
|
423
|
+
};
|
|
424
|
+
}
|
|
425
|
+
export interface CapacityCatalog {
|
|
426
|
+
currency: 'usd';
|
|
427
|
+
billingModes: ComputeBillingMode[];
|
|
428
|
+
tariffId: string;
|
|
429
|
+
tariff: CapacityTariff;
|
|
430
|
+
paymentSources: Record<ComputeBillingMode, Array<'wallet' | 'stripe'>>;
|
|
431
|
+
presets: Array<{
|
|
432
|
+
id: string;
|
|
433
|
+
capacity: WorkspaceCapacity;
|
|
434
|
+
monthlyAmount: number;
|
|
435
|
+
paygCapAmount: number;
|
|
436
|
+
resourceLimits: NamespaceResourceLimits;
|
|
437
|
+
}>;
|
|
438
|
+
}
|
|
439
|
+
/** Monetary amounts are USD cents; savings below are USD dollars. */
|
|
440
|
+
export interface CapacityQuote {
|
|
441
|
+
id: string;
|
|
442
|
+
namespace: string;
|
|
443
|
+
status: string;
|
|
444
|
+
action: 'start' | 'upgrade' | 'scheduled' | 'network_topup';
|
|
445
|
+
expiresAt: string;
|
|
446
|
+
effectiveAt: string;
|
|
447
|
+
periodEnd: string | null;
|
|
448
|
+
billingMode: ComputeBillingMode;
|
|
449
|
+
paymentSource: 'wallet' | 'stripe';
|
|
450
|
+
currency: 'usd';
|
|
451
|
+
current: {
|
|
452
|
+
capacity: WorkspaceCapacity;
|
|
453
|
+
billingMode: ComputeBillingMode;
|
|
454
|
+
monthlyAmount: number;
|
|
455
|
+
} | null;
|
|
456
|
+
capacity: WorkspaceCapacity | null;
|
|
457
|
+
tariffId: string;
|
|
458
|
+
monthlyAmount: number | null;
|
|
459
|
+
paygCapAmount: number | null;
|
|
460
|
+
unusedTimeCredit: number;
|
|
461
|
+
remainingTimeCharge: number;
|
|
462
|
+
amountDueNow: number;
|
|
463
|
+
walletCreditsRequired: number;
|
|
464
|
+
/** Existing retained-storage balance, in USD cents, payable separately. */
|
|
465
|
+
retainedStorageAmountDue: number;
|
|
466
|
+
nextPaymentAmount: number | null;
|
|
467
|
+
autoRenew: boolean;
|
|
468
|
+
networkIncluded: false;
|
|
469
|
+
networkBytes: number | null;
|
|
470
|
+
preservesUsage: true;
|
|
471
|
+
preservesPurchasedCredits: true;
|
|
472
|
+
}
|
|
473
|
+
export interface CapacitySavings {
|
|
474
|
+
currency: 'usd';
|
|
475
|
+
baseline: 'recorded_usage_at_saved_payg_rates';
|
|
476
|
+
usageBeforeCap: number;
|
|
477
|
+
capDiscount: number;
|
|
478
|
+
usageAfterCap: number;
|
|
479
|
+
usageCharged: number;
|
|
480
|
+
prepaidAmount: number;
|
|
481
|
+
/** Signed difference against capped PAYG for recorded usage; may be negative when idle. */
|
|
482
|
+
monthlyDifference: number;
|
|
483
|
+
networkIncluded: false;
|
|
484
|
+
refundsIncluded: false;
|
|
485
|
+
}
|
|
486
|
+
export interface NamespaceCapacity {
|
|
487
|
+
id: string;
|
|
488
|
+
namespace: string;
|
|
489
|
+
billingMode: ComputeBillingMode;
|
|
490
|
+
status: 'active' | 'expired' | 'revoked' | 'payment_required' | 'storage_payment_required' | 'pending';
|
|
491
|
+
provider: 'wallet' | 'stripe';
|
|
492
|
+
capacity: WorkspaceCapacity;
|
|
493
|
+
tariffId: string;
|
|
494
|
+
currency: 'usd';
|
|
495
|
+
monthlyAmount: number;
|
|
496
|
+
paygCapAmount: number;
|
|
497
|
+
periodStart: string;
|
|
498
|
+
periodEnd: string;
|
|
499
|
+
autoRenew: boolean;
|
|
500
|
+
computeCovered: boolean;
|
|
501
|
+
/** Storage prices and amountDue are USD dollars. Disks are not automatically deleted. */
|
|
502
|
+
retention: {
|
|
503
|
+
minimumDays: number;
|
|
504
|
+
automaticDeletion: false;
|
|
505
|
+
reviewAt: string;
|
|
506
|
+
storagePerGiBMonth: number;
|
|
507
|
+
amountDue: number;
|
|
508
|
+
currency: 'usd';
|
|
509
|
+
};
|
|
510
|
+
pendingChange: {
|
|
511
|
+
id: string;
|
|
512
|
+
billingMode: ComputeBillingMode;
|
|
513
|
+
capacity: WorkspaceCapacity;
|
|
514
|
+
monthlyAmount: number;
|
|
515
|
+
effectiveAt: string;
|
|
516
|
+
} | null;
|
|
517
|
+
resourceLimits: NamespaceResourceLimits;
|
|
518
|
+
savings: CapacitySavings | null;
|
|
519
|
+
network: {
|
|
520
|
+
service: 'managed_proxy_transfer';
|
|
521
|
+
included: false;
|
|
522
|
+
purchasedBytes: number;
|
|
523
|
+
consumedBytes: number;
|
|
524
|
+
reservedBytes: number;
|
|
525
|
+
availableBytes: number;
|
|
526
|
+
};
|
|
527
|
+
}
|
|
528
|
+
export interface CapacityResponse {
|
|
529
|
+
success: boolean;
|
|
530
|
+
namespace: string;
|
|
531
|
+
capacity: NamespaceCapacity | null;
|
|
532
|
+
catalog?: CapacityCatalog;
|
|
533
|
+
/** Resume the saved checkout or cancel by quote.id; no new payment is created by reading it. */
|
|
534
|
+
pendingCheckout: {
|
|
535
|
+
quote: CapacityQuote;
|
|
536
|
+
checkoutId: string | null;
|
|
537
|
+
url: string | null;
|
|
538
|
+
} | null;
|
|
539
|
+
}
|
|
540
|
+
export interface CapacityQuoteResponse {
|
|
541
|
+
success: boolean;
|
|
542
|
+
namespace: string;
|
|
543
|
+
quote: CapacityQuote;
|
|
544
|
+
}
|
|
545
|
+
export interface PreviewCapacityParams {
|
|
546
|
+
capacity: WorkspaceCapacity;
|
|
547
|
+
billingMode: ComputeBillingMode;
|
|
548
|
+
tariffId?: string;
|
|
549
|
+
paymentSource?: 'wallet' | 'stripe';
|
|
550
|
+
/** Wallet monthly renewals are opt-in; Stripe subscriptions recur until canceled. */
|
|
551
|
+
autoRenew?: boolean;
|
|
552
|
+
idempotencyKey: string;
|
|
553
|
+
}
|
|
554
|
+
export interface ConfirmCapacityParams {
|
|
555
|
+
quoteId: string;
|
|
556
|
+
idempotencyKey: string;
|
|
557
|
+
}
|
|
558
|
+
export interface CapacityCheckoutParams extends ConfirmCapacityParams {
|
|
559
|
+
successUrl?: string;
|
|
560
|
+
cancelUrl?: string;
|
|
561
|
+
customer?: {
|
|
562
|
+
email?: string;
|
|
563
|
+
name?: string;
|
|
564
|
+
};
|
|
565
|
+
allowPromotionCodes?: boolean;
|
|
566
|
+
checkoutMode?: 'stripe' | 'oblien';
|
|
567
|
+
}
|
|
568
|
+
export interface CapacityCheckoutResponse {
|
|
569
|
+
success: boolean;
|
|
570
|
+
namespace: string;
|
|
571
|
+
url?: string;
|
|
572
|
+
checkoutId?: string;
|
|
573
|
+
/** A retry after completion can return the terminal quote instead of another checkout. */
|
|
574
|
+
quote?: CapacityQuote;
|
|
575
|
+
}
|
|
576
|
+
export interface BillingSavings {
|
|
577
|
+
currency: 'usd';
|
|
578
|
+
period: {
|
|
579
|
+
month: string;
|
|
580
|
+
start: string;
|
|
581
|
+
end: string;
|
|
582
|
+
};
|
|
583
|
+
comparison: 'saved_usage_rates_before_caps';
|
|
584
|
+
complete: boolean;
|
|
585
|
+
monthlySubscriptionFeesIncluded: false;
|
|
586
|
+
refundsIncluded: false;
|
|
587
|
+
totals: {
|
|
588
|
+
beforeCaps: number;
|
|
589
|
+
capDiscount: number;
|
|
590
|
+
monthlyCoveredUsage: number;
|
|
591
|
+
usageCharged: number;
|
|
592
|
+
};
|
|
593
|
+
workspaces: Array<{
|
|
594
|
+
namespace: string | null;
|
|
595
|
+
workspaceId: string | null;
|
|
596
|
+
windows: number;
|
|
597
|
+
unavailableComponents: number;
|
|
598
|
+
beforeCaps: number;
|
|
599
|
+
capDiscount: number;
|
|
600
|
+
monthlyCoveredUsage: number;
|
|
601
|
+
usageCharged: number;
|
|
602
|
+
}>;
|
|
603
|
+
}
|
|
361
604
|
//# sourceMappingURL=billing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"billing.d.ts","sourceRoot":"","sources":["../../src/types/billing.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D,4CAA4C;AAC5C,MAAM,WAAW,WAAW;IAC1B,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,+EAA+E;IAC/E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,2EAA2E;IAC3E,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,8CAA8C;AAC9C,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,K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AU,EAAE,+BAA+B,CAAC;IAC5C,QAAQ,EAAE,OAAO,CAAC;IAClB,+BAA+B,EAAE,KAAK,CAAC;IACvC,eAAe,EAAE,KAAK,CAAC;IACvB,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IACvG,UAAU,EAAE,KAAK,CAAC;QAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,qBAAqB,EAAE,MAAM,CAAC;QACvH,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,mBAAmB,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACjG"}
|
package/dist/types/desktop.d.ts
CHANGED
|
@@ -17,8 +17,11 @@ export interface DesktopSession {
|
|
|
17
17
|
id: string;
|
|
18
18
|
name: string;
|
|
19
19
|
resolution?: DesktopResolution;
|
|
20
|
-
state: 'starting' | 'running' | 'stopping' | 'stopped' | 'failed';
|
|
20
|
+
state: 'starting' | 'running' | 'stopping' | 'deleting' | 'stopped' | 'failed';
|
|
21
21
|
managed: boolean;
|
|
22
|
+
can_delete?: boolean;
|
|
23
|
+
can_resize?: boolean;
|
|
24
|
+
deletion_pending?: boolean;
|
|
22
25
|
available: boolean;
|
|
23
26
|
created_at?: string;
|
|
24
27
|
updated_at?: string;
|
|
@@ -26,7 +29,8 @@ export interface DesktopSession {
|
|
|
26
29
|
}
|
|
27
30
|
export interface CreateDesktopSession {
|
|
28
31
|
name: string;
|
|
29
|
-
|
|
32
|
+
/** Required for virtual desktops; omit for an OS console. */
|
|
33
|
+
resolution?: DesktopResolution;
|
|
30
34
|
/** Repeat the same request with this key to reuse the saved desktop. */
|
|
31
35
|
idempotency_key?: string;
|
|
32
36
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop.d.ts","sourceRoot":"","sources":["../../src/types/desktop.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACpE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,iBAAiB,CAAC;QAAC,GAAG,EAAE,iBAAiB,CAAC;QAAC,OAAO,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC7F;AACD,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"desktop.d.ts","sourceRoot":"","sources":["../../src/types/desktop.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAAG,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE;AACpE,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE;QAAE,GAAG,EAAE,iBAAiB,CAAC;QAAC,GAAG,EAAE,iBAAiB,CAAC;QAAC,OAAO,EAAE,iBAAiB,CAAA;KAAE,CAAC;CAC7F;AACD,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,CAAC;IAC/E,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AACD,MAAM,WAAW,oBAAoB;IAAG,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,iBAAiB,CAAA;CAAE;AACvF,MAAM,WAAW,kBAAkB;IAAG,OAAO,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,cAAc,EAAE,CAAC;IAAC,YAAY,EAAE,0BAA0B,CAAA;CAAE;AAC3H,MAAM,WAAW,oBAAoB;IAAG,OAAO,EAAE,IAAI,CAAC;IAAC,OAAO,EAAE,cAAc,CAAA;CAAE;AAEhF,wBAAgB,kBAAkB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAGrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"desktop.js","sourceRoot":"","sources":["../../src/types/desktop.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"desktop.js","sourceRoot":"","sources":["../../src/types/desktop.ts"],"names":[],"mappings":"AAiCA,MAAM,UAAU,kBAAkB,CAAC,EAAU;IAC3C,IAAI,CAAC,6BAA6B,CAAC,IAAI,CAAC,EAAE,CAAC;QAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;IAC3F,OAAO,oBAAoB,GAAG,EAAE,CAAC;AACnC,CAAC"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type { CdnTokenScope, CdnFile, CdnTokenParams, CdnTokenResponse, CdnUploa
|
|
|
17
17
|
export type { BillingSubscription, BillingSubscriptionResponse, ResetQuotaParams, ResetQuotaResponse } from './billing.js';
|
|
18
18
|
export type { PreviewPlanChangeParams, BillingPlanChangeQuote, BillingPlanChangeQuoteResponse, ChangePlanParams, BillingPlanChangeStatus, BillingPlanChange, BillingPlanChangeResponse, CancelPlanChangeParams } from './billing.js';
|
|
19
19
|
export type { NamespaceQuotaAlert } from './namespace.js';
|
|
20
|
-
export type { BillingPlan, CreditPack, BillingCatalog, BillingOffer, BillingOfferPolicy, BillingCheckout, BillingCheckoutResponse, CheckoutParams, CheckoutResponse, PortalParams, PortalResponse, EntitlementStatus, EntitlementQuota, Entitlement, BillingBalance, BillingPolicy, BillingPolicyParams, BillingDefaults, BillingDefaultsParams, } from './billing.js';
|
|
20
|
+
export type { BillingPlan, CreditPack, BillingCatalog, BillingOffer, BillingOfferPolicy, BillingCheckout, BillingCheckoutResponse, CheckoutParams, CheckoutResponse, PortalParams, PortalResponse, EntitlementStatus, EntitlementQuota, Entitlement, BillingBalance, BillingPolicy, BillingPolicyParams, BillingDefaults, BillingDefaultsParams, ComputeBillingMode, WorkspaceCapacity, CapacityTariff, CapacityCatalog, CapacityQuote, CapacitySavings, NamespaceCapacity, CapacityResponse, CapacityQuoteResponse, PreviewCapacityParams, ConfirmCapacityParams, CapacityCheckoutParams, CapacityCheckoutResponse, BillingSavings, } from './billing.js';
|
|
21
21
|
export type { DesktopSshConnection, DesktopInstallation } from '../resources/desktop.js';
|
|
22
22
|
export type { DesktopResolution, DesktopSessionCapabilities, DesktopSession, CreateDesktopSession, UpdateDesktopSession, DesktopSessionList, DesktopSessionResult } from './desktop.js';
|
|
23
23
|
export type { ImageCatalogEntry, ImagesListResponse } from '../resources/images.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/D,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,aAAa,EACb,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3E,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAGlE,YAAY,EACV,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,WAAW,EACX,qBAAqB,EACrB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,eAAe,EACf,oBAAoB,EACpB,0BAA0B,EAC1B,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EAEnB,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EAEd,gBAAgB,EAChB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,cAAc,CAAC;AAG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,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,aAAa,EACb,OAAO,EACP,cAAc,EACd,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EACzB,aAAa,EACb,aAAa,EACb,eAAe,EACf,cAAc,EACd,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,YAAY,EACZ,oBAAoB,EACpB,SAAS,EACT,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,UAAU,CAAC;AAGlB,YAAY,EAAE,mBAAmB,EAAE,2BAA2B,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAC3H,YAAY,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,8BAA8B,EAC3F,gBAAgB,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,MAAM,cAAc,CAAC;AACxI,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,YAAY,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,EACX,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,eAAe,EACf,qBAAqB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/D,YAAY,EAAE,aAA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,EAAE,MAAM,wBAAwB,CAAC;AACpF,mBAAmB,YAAY,CAAC"}
|
package/dist/types/webhooks.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** Event types a webhook can subscribe to. */
|
|
2
|
-
export type WebhookEvent = 'vm.stopped' | 'vm.archived' | 'workload.started' | 'workload.exited' | 'workload.failed' | 'workload.stopped' | 'workload.restart_loop' | 'credits.low' | 'credits.depleted' | 'credits.usage' | 'namespace.quota.threshold' | 'payment.succeeded' | 'subscription.tier_changed' | 'subscription.change.scheduled' | 'subscription.change.applied' | 'subscription.change.canceled' | 'subscription.change.payment_required' | 'subscription.change.failed' | 'subscription.change.expired' | 'subscription.renewed' | 'subscription.past_due' | 'subscription.canceled' | 'subscription.updated' | 'entitlement.changed' | 'namespace.suspended' | 'namespace.restored';
|
|
2
|
+
export type WebhookEvent = 'vm.stopped' | 'vm.archived' | 'workload.started' | 'workload.exited' | 'workload.failed' | 'workload.stopped' | 'workload.restart_loop' | 'credits.low' | 'credits.depleted' | 'credits.usage' | 'namespace.quota.threshold' | 'payment.succeeded' | 'subscription.tier_changed' | 'subscription.change.scheduled' | 'subscription.change.applied' | 'subscription.change.canceled' | 'subscription.change.payment_required' | 'subscription.change.failed' | 'subscription.change.expired' | 'subscription.renewed' | 'subscription.past_due' | 'subscription.canceled' | 'subscription.updated' | 'entitlement.changed' | 'capacity.changed' | 'capacity.renewed' | 'capacity.expired' | 'capacity.payment_required' | 'capacity.revoked' | 'network.topup_applied' | 'network.allowance.low' | 'network.allowance.depleted' | 'storage.retention.payment_required' | 'storage.retention.paid' | 'namespace.suspended' | 'namespace.restored';
|
|
3
3
|
export interface Webhook {
|
|
4
4
|
id: number;
|
|
5
5
|
url: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhooks.d.ts","sourceRoot":"","sources":["../../src/types/webhooks.ts"],"names":[],"mappings":"AAEA,8CAA8C;AAC9C,MAAM,MAAM,YAAY,GACpB,YAAY,GAC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|
|
|
3
|
+
## PAYG and prepaid monthly capacity
|
|
4
|
+
|
|
5
|
+
Compute has two modes, `payg` and `monthly`. Stripe and wallet funds are payment
|
|
6
|
+
sources. Both modes share the namespace contract, resource enforcement, usage
|
|
7
|
+
ledger and signed billing events. Direct capacity purchases are available to
|
|
8
|
+
the account owner; hosting a customer checkout through reseller `offer` still
|
|
9
|
+
requires an Enterprise owner.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
const catalog = await client.billing.capacityCatalog();
|
|
13
|
+
const selected = catalog.presets.find(p => p.id === 'small')!;
|
|
14
|
+
const { quote } = await client.billing.previewCapacity(namespace, {
|
|
15
|
+
capacity: selected.capacity,
|
|
16
|
+
billingMode: 'monthly', paymentSource: 'wallet', autoRenew: false,
|
|
17
|
+
idempotencyKey: savedOrder.previewKey,
|
|
18
|
+
});
|
|
19
|
+
// Review backend-calculated amounts and effectiveAt before confirming.
|
|
20
|
+
await client.billing.confirmCapacity(namespace, {
|
|
21
|
+
quoteId: quote.id, idempotencyKey: savedOrder.confirmKey,
|
|
22
|
+
});
|
|
23
|
+
const { capacity, catalog: savedPrices } = await client.billing.capacity(namespace);
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Existing subscriptions retain their saved model after an SDK upgrade. Read `capacity(namespace)` first; a null capacity means this namespace has not adopted the capacity contract. An existing hosted reseller subscription uses plan changes to adopt monthly capacity at renewal. A quota edit cannot perform that conversion.
|
|
27
|
+
|
|
28
|
+
For PAYG use `billingMode: 'payg'` and `paymentSource: 'wallet'`. For recurring
|
|
29
|
+
card payment use `paymentSource: 'stripe'` and confirm the saved quote with
|
|
30
|
+
`capacityCheckout` instead. Native Stripe Checkout is the default, with the
|
|
31
|
+
existing optional `allowPromotionCodes` and `checkoutMode` controls. Returning
|
|
32
|
+
from checkout never proves payment: inspect committed coverage and signed events.
|
|
33
|
+
|
|
34
|
+
Quotes use USD **cents**; savings use USD **dollars**. Rates and presets come from
|
|
35
|
+
the backend, and existing contracts return their saved-tariff catalog. Only
|
|
36
|
+
eligible verified paid wallet funds can buy monthly coverage. Namespace
|
|
37
|
+
allowances and promotional grants are not money. Read `computeCovered` and
|
|
38
|
+
`periodEnd`: a prepaid month has no additional compute-credit ceiling, and a
|
|
39
|
+
zero wallet cannot remove that paid compute coverage. The manual namespace
|
|
40
|
+
suspension and purchased resource pool still apply.
|
|
41
|
+
|
|
42
|
+
Wallet monthly renewal is opt-in through
|
|
43
|
+
`setCapacityAutoRenew(namespace, { autoRenew, idempotencyKey })`. Wallet changes
|
|
44
|
+
use the same preview and confirm methods; pending reductions can be canceled
|
|
45
|
+
with `cancelCapacityChange(namespace, { quoteId, idempotencyKey })`. Hosted
|
|
46
|
+
subscription changes use `previewPlanChange` / `changePlan`, and renewal uses
|
|
47
|
+
`cancelSubscription` / `resumeSubscription`. Do not start a competing checkout
|
|
48
|
+
for an existing live subscription. Upgrades charge the prorated difference and
|
|
49
|
+
preserve usage/top-ups; reductions wait for the next period. Failed payment
|
|
50
|
+
retains the prior plan.
|
|
51
|
+
|
|
52
|
+
Use `previewCapacity` with `billingMode: 'payg'` and `paymentSource: 'wallet'`
|
|
53
|
+
to switch a hosted monthly pool to PAYG. Confirming schedules cancellation of
|
|
54
|
+
the old subscription at its paid-through date. The PAYG period starts only
|
|
55
|
+
after Stripe confirms the old subscription has ended. Cancel the pending
|
|
56
|
+
switch with `cancelCapacityChange` before the boundary to restore renewal.
|
|
57
|
+
An active wallet period keeps wallet payment for pool or mode changes; fund
|
|
58
|
+
that wallet by card if needed.
|
|
59
|
+
|
|
60
|
+
`billing.capacity(namespace).pendingCheckout` exposes the existing checkout URL
|
|
61
|
+
and quote ID after a lost response or reload. Resume that URL or cancel with
|
|
62
|
+
`cancelCapacityChange`; do not open a competing checkout.
|
|
63
|
+
|
|
64
|
+
At expiry compute stops, and the initial tariff retains disks for at least
|
|
65
|
+
30 days without automatic deletion. Provisioned storage is charged until
|
|
66
|
+
deleted. `capacity.retention.amountDue` and `storagePerGiBMonth` are USD dollars;
|
|
67
|
+
`quote.retainedStorageAmountDue` is USD cents, separate from compute pricing.
|
|
68
|
+
Fund the wallet to settle storage arrears before restarting. A confirmed late
|
|
69
|
+
renewal reverses storage charges for any time it covers.
|
|
70
|
+
|
|
71
|
+
Managed proxy transfer is separate in both modes. Quote a transfer pack with
|
|
72
|
+
`previewNetworkTopup(namespace, { unitAmount, idempotencyKey })`, then redeem it
|
|
73
|
+
through `confirmCapacity`. The pack uses eligible wallet funds and grants the
|
|
74
|
+
returned `networkBytes`; unused bytes carry forward. Compute remains covered
|
|
75
|
+
when its paid period is active even if the transfer allowance runs out.
|
|
76
|
+
|
|
77
|
+
`capacity.savings.monthlyDifference` includes the prepaid fee and may be negative
|
|
78
|
+
for an idle pool. `billing.savings({ namespace, month: '2026-10' })` returns a
|
|
79
|
+
ledger comparison for a UTC month; `monthlyCoveredUsage` excludes subscription
|
|
80
|
+
fees and is not cash savings. Respect `complete: false` for incomplete historical
|
|
81
|
+
breakdowns. Do not manufacture dollar conversions or savings locally.
|
|
82
|
+
|
|
83
|
+
Owner-only billing events include `capacity.changed`, `capacity.renewed`,
|
|
84
|
+
`capacity.expired`, `capacity.payment_required`, `capacity.revoked`,
|
|
85
|
+
`network.topup_applied`, `network.allowance.low`, `network.allowance.depleted`,
|
|
86
|
+
`storage.retention.payment_required` and `storage.retention.paid`.
|
|
87
|
+
They use the same signature, event-ID deduplication and namespace checks as the
|
|
88
|
+
existing subscription events. Keep all billing credentials on the server.
|
|
89
|
+
|
|
90
|
+
Full terms and routes: https://oblien.com/docs/concepts/compute-billing.
|
|
91
|
+
|
|
92
|
+
## Existing metered subscriptions
|
|
93
|
+
|
|
3
94
|
Namespace management is available from `oblien@2.3.0`; reseller checkout and
|
|
4
95
|
status reads from `2.4.0`. The `2.5.0` source adds typed offer policy/resource
|
|
5
96
|
caps and exported reseller types, with the matching API deployment.
|
|
@@ -67,7 +158,7 @@ an unapproved host returns `billing_redirect_not_allowed`. Supplied URLs require
|
|
|
67
158
|
to the first namespace checkout, without copying the API-key owner's details.
|
|
68
159
|
Reuse an idempotency key only when retrying the identical request.
|
|
69
160
|
|
|
70
|
-
Paid subscriptions provision the namespace and set its quota. Renewals reset usage
|
|
161
|
+
Paid metered subscriptions provision the namespace and set its quota. Renewals reset usage
|
|
71
162
|
once per cycle; purchased top-ups increase the ceiling and carry only their unused remainder into renewal.
|
|
72
163
|
Top-ups, renewals, and funded policy changes clear suspensions caused by billing;
|
|
73
164
|
manual suspensions stay in place. Workspaces can then be started explicitly.
|
|
@@ -131,7 +222,9 @@ is uncapped. `overdraft` must not exceed `suspendThreshold` when both are set.
|
|
|
131
222
|
|
|
132
223
|
## Access and reconciliation
|
|
133
224
|
|
|
134
|
-
`entitlement()`
|
|
225
|
+
`entitlement()` preserves `active`, `past_due`, `credit_exhausted`, and `canceled` across both contracts. Capacity responses include `tierId: 'capacity'`, `billingMode`, `computeCovered` and `capacity`. Their compatibility quota has null limit/balance and no alert. Read the returned `balance().blocking`, coverage and resource pool; do not infer an unlimited physical pool or a finite compute allowance from that quota. Monthly coverage survives an empty owner wallet, while manual suspension and resource admission remain enforced.
|
|
226
|
+
|
|
227
|
+
The following allowance/tier behavior applies to existing metered subscriptions.
|
|
135
228
|
|
|
136
229
|
The paid tier and period belong to that namespace's subscription. An account or
|
|
137
230
|
sibling namespace subscription cannot supply them. A namespace that has never
|
|
@@ -156,6 +249,8 @@ Billing events use a durable outbox with retry. Reconcile with `entitlement()` a
|
|
|
156
249
|
|
|
157
250
|
`POST /billing/checkout` also accepts a server-defined `offer` instead of a catalog `planTierId` or `packId`. Keep this request behind your authenticated backend and resolve the customer's namespace from your own database.
|
|
158
251
|
|
|
252
|
+
Choose the offer type explicitly. The example below is a **metered credit offer**. Monthly capacity uses `billingMode: 'monthly'`, `capacity: { vcpus, memoryMb, diskGb, workspaces }`, `credits: 0`, and no `policy`. It requires a monthly subscription, a retail price covering the saved provider cost, and successful physical admission. See [the monthly reseller example](https://oblien.com/docs/saas-reselling#monthly-capacity-offer).
|
|
253
|
+
|
|
159
254
|
```json
|
|
160
255
|
{
|
|
161
256
|
"namespace": "tenant-a",
|
|
@@ -188,9 +283,12 @@ This charges **$10**, funds the **owner's Oblien wallet** at the standard rate (
|
|
|
188
283
|
| `offer.description` | Optional customer-facing text, at most 500 characters |
|
|
189
284
|
| `offer.unitAmount` | Required integer USD cents, 100–1,000,000 ($1–$10,000) |
|
|
190
285
|
| `offer.currency` | `usd` only; defaults to `usd` |
|
|
191
|
-
| `offer.
|
|
192
|
-
| `offer.
|
|
193
|
-
| `offer.
|
|
286
|
+
| `offer.billingMode` | `monthly` purchases capacity; omit for a metered allowance. The historical `payg` offer value also selects that allowance product; new capped PAYG uses `previewCapacity`. |
|
|
287
|
+
| `offer.capacity` | Monthly only: required shared `vcpus`, `memoryMb`, `diskGb`, `workspaces`. |
|
|
288
|
+
| `offer.tariffId` | Monthly only: optional published tariff ID; saved terms are preserved by default. |
|
|
289
|
+
| `offer.credits` | Metered: integer 1–1,000,000,000. Monthly: `0` (the API also defaults an omitted value to zero). |
|
|
290
|
+
| `offer.policy` | Metered subscription only: optional `overdraft`, `suspendThreshold`, `onOverdraftAction`. Rejected for monthly capacity. |
|
|
291
|
+
| `offer.resourceLimits` | Subscription only: nonempty subset of `max_workspaces`, `max_vcpus`, `max_ram_mb`, `max_disk_gb`, `max_total_vcpus`, `max_total_ram_mb`, `max_total_disk_gb`; integer values 0–1,000,000,000 or `null`. These can further restrict a paid pool. |
|
|
194
292
|
| `metadata` | Optional, only with `offer`: at most 35 string entries; key `[A-Za-z0-9_]`, length 1–40; value at most 500 characters without control characters |
|
|
195
293
|
| `idempotencyKey` | Required with `offer`, nonempty string up to 200 characters; reuse only for an identical request |
|
|
196
294
|
|
|
@@ -206,7 +304,7 @@ Check `billing.catalog().reseller` before enabling offers with policy or limits:
|
|
|
206
304
|
capability. SDK 2.4.0 already transports reseller offers; the 2.5.0 source adds
|
|
207
305
|
these TypeScript fields and public reseller type exports.
|
|
208
306
|
|
|
209
|
-
|
|
307
|
+
For metered offers, grace is zero by default. To permit 60 extra namespace credits, save
|
|
210
308
|
`policy: { overdraft: 60, suspendThreshold: 60, onOverdraftAction: 'stop_workspaces' }`
|
|
211
309
|
on the subscription offer. `suspendThreshold` must be at least `overdraft`.
|
|
212
310
|
`quota.balance` already includes grace (`limit + overdraft - used`); never add it
|
|
@@ -222,7 +320,7 @@ refund of the current cycle removes its remaining allowance and grace; an old
|
|
|
222
320
|
invoice refund cannot erase a newer cycle.
|
|
223
321
|
|
|
224
322
|
`max_workspaces` counts allocated workspaces in this namespace. CPU, RAM and disk
|
|
225
|
-
are per-workspace caps. Oblien resolves the strictest cap from the saved offer,
|
|
323
|
+
are per-workspace caps. The three `max_total_*` fields additionally bound combined allocated resources, including stopped workspaces and pending changes. Oblien resolves the strictest cap from the saved offer,
|
|
226
324
|
configured namespace policy, owner account and platform. `null` inherits capacity;
|
|
227
325
|
it never removes another layer's restriction. Clients submit policy directly
|
|
228
326
|
without fetching account quota or calculating capacity. Namespace detail and
|
|
@@ -282,6 +380,8 @@ Requires an `admin` or `billing` credential. Looks up both owner and namespace b
|
|
|
282
380
|
|
|
283
381
|
`fulfilled` means initial processing finished; always inspect the net credit fields and `fulfillmentStatus` for `partially_refunded`, `refunded` or `disputed`. Use `GET /billing/entitlement` and `/billing/balance` for current access. The lookup describes the checkout's initial payment, not its later renewal invoices. Reseller subscriptions also expose `offer` and `metadata` through `GET /billing/subscription`; their `tierId` is `reseller` and does not upgrade owner capacity.
|
|
284
382
|
|
|
383
|
+
Monthly checkout results expose gross `walletCreditsFunded`, `capacityCreditsCharged` and signed `walletCreditDelta`, with zero `namespaceCreditsGranted`. Gross funding is not the spendable remainder; read committed capacity coverage instead of granting credits again.
|
|
384
|
+
|
|
285
385
|
Custom `payment.succeeded`, `subscription.renewed` and `entitlement.changed` events include `orgRef`, `namespace`, `kind`, `checkoutId`, `paymentId`, saved `offer`, application `metadata`, `amount: { unitAmount, currency }`, net `walletCredits` and `namespaceCredits`. Fulfillment uses stable receipt-based event IDs. Verify the raw-body HMAC, deduplicate by event ID, then re-read entitlement to handle reordering. Financial billing events are committed to a durable outbox with retries. Keep reconciliation polling to handle delayed or exhausted delivery and event reordering.
|
|
286
386
|
|
|
287
387
|
### Useful checkout and portal errors
|
|
@@ -385,9 +485,11 @@ Errors use `{ success:false, code, message, requestId }`, with safe diagnostic d
|
|
|
385
485
|
|
|
386
486
|
## Reseller subscription plan changes
|
|
387
487
|
|
|
488
|
+
The same methods also change hosted monthly capacity. Monthly offers use zero compute credits and no credit policy. The provider reserves the new pool and applies an immediate upgrade only after confirmed funding. Resource reductions and billing-mode changes wait for renewal, even when retail price increases. The quote's direction and effective date are authoritative. The prorated credit-increase formula below applies to metered offers. Direct owner capacity subscriptions use these methods without requiring reseller Enterprise eligibility.
|
|
489
|
+
|
|
388
490
|
|
|
389
491
|
These endpoints change an **existing reseller offer**, without creating a second
|
|
390
|
-
subscription or changing the owner's account plan. New quotes and acceptance require
|
|
492
|
+
subscription or changing the owner's account plan. New reseller quotes and acceptance require
|
|
391
493
|
an Enterprise owner and a server API key with `billing` or `admin` scope. Read and
|
|
392
494
|
cancel operations remain available if reseller eligibility later ends. End-user
|
|
393
495
|
namespace/workspace tokens cannot call billing APIs. Your backend must derive the
|
package/docs/desktop.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Desktop is an image capability. Linux virtual-display providers support named,
|
|
4
4
|
saved desktops with independent applications, profiles and resolutions. The
|
|
5
|
-
current macOS provider exposes one console
|
|
5
|
+
current macOS provider exposes one console connection, which can be renamed,
|
|
6
|
+
deleted and added again. Discover the
|
|
6
7
|
capabilities rather than branching on image names.
|
|
7
8
|
|
|
8
9
|
```ts
|
|
@@ -37,15 +38,19 @@ routing remains on the image gateway, independent of `runtime.forTarget()`.
|
|
|
37
38
|
|
|
38
39
|
The default limit is 10 saved desktops, including stopped ones. Each running
|
|
39
40
|
desktop uses the workspace's CPU/RAM; software packages remain shared read-only.
|
|
40
|
-
Resolution is required at creation, between 640×480 and
|
|
41
|
-
desktop's screen size with `updateSession(id, { resolution: { width, height } })`.
|
|
42
|
-
|
|
41
|
+
Resolution is required for virtual desktops at creation, between 640×480 and
|
|
42
|
+
3840×2160. Change a running or stopped Linux desktop's screen size with `updateSession(id, { resolution: { width, height } })`.
|
|
43
|
+
Live resizing keeps applications open. Check `session.can_resize`; OS consoles
|
|
44
|
+
without this capability use their native display settings. Names can change while running. Reuse the same `idempotency_key` and request body
|
|
43
45
|
on creation retries. Responses contain `{success: true, session}`; poll while
|
|
44
|
-
`state` is `starting` or `
|
|
46
|
+
`state` is `starting`, `stopping` or `deleting`. Other states: `running`, `stopped`, `failed`.
|
|
45
47
|
|
|
46
48
|
Disconnecting preserves running applications. **Stop** ends that desktop's apps
|
|
47
|
-
and keeps its profile. **Start** opens it again. **Delete**
|
|
48
|
-
|
|
49
|
+
and keeps its profile. **Start** opens it again. **Delete** automatically stops a running virtual desktop and removes its profile,
|
|
50
|
+
including files saved there. It returns once deletion is accepted; poll the
|
|
51
|
+
session list until it disappears. A main OS console has no private profile: Delete
|
|
52
|
+
removes its saved connection and disconnects viewers, preserving OS apps and files.
|
|
53
|
+
Add it again with `createSession({name: "Main desktop"})`, omitting resolution. Other desktops and
|
|
49
54
|
shared workspace files remain. A workspace cold boot restarts previously running
|
|
50
55
|
desktops with their profiles; it does not restore open app RAM. Use the existing
|
|
51
56
|
supported Linux VM memory snapshot/restore for that.
|
|
@@ -87,6 +92,7 @@ oblien desktop create WORKSPACE_ID --name Development --resolution 1920x1080
|
|
|
87
92
|
oblien desktop enable WORKSPACE_ID
|
|
88
93
|
oblien desktop vnc WORKSPACE_ID --session DESKTOP_ID --port 5901
|
|
89
94
|
oblien desktop ssh WORKSPACE_ID --session DESKTOP_ID
|
|
95
|
+
oblien desktop update WORKSPACE_ID DESKTOP_ID --resolution 1600x900
|
|
90
96
|
oblien desktop stop WORKSPACE_ID DESKTOP_ID
|
|
91
97
|
oblien desktop start WORKSPACE_ID DESKTOP_ID
|
|
92
98
|
oblien desktop delete WORKSPACE_ID DESKTOP_ID
|
package/docs/namespaces.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Group workspaces into isolated namespaces with **resource limits**, **spending quotas**, lifecycle controls, and **per-namespace usage** — the building block for multi-tenant setups (one namespace per customer/team).
|
|
4
4
|
|
|
5
|
+
Current compute uses a [capped PAYG or prepaid monthly contract](./billing.md#payg-and-prepaid-monthly-capacity). A paid monthly pool has no second finite compute-credit allowance. Existing credit contracts retain their quota rules; resource policy edits alone do not purchase or migrate coverage. Omitting a workspace namespace creates a personal account workspace with `namespace: null`; the literal `default` is a separate named namespace.
|
|
6
|
+
|
|
5
7
|
```typescript
|
|
6
8
|
const ns = client.namespaces;
|
|
7
9
|
```
|
|
@@ -20,7 +22,7 @@ const { data } = await ns.create({
|
|
|
20
22
|
name: 'production',
|
|
21
23
|
resource_limits: {
|
|
22
24
|
max_workspaces: 50,
|
|
23
|
-
max_vcpus:
|
|
25
|
+
max_vcpus: 12, // per-workspace platform maximum
|
|
24
26
|
max_ram_mb: 32768,
|
|
25
27
|
max_disk_gb: 100,
|
|
26
28
|
},
|
|
@@ -38,8 +40,9 @@ Invalid numbers and unknown keys return `invalid_resource_limits`.
|
|
|
38
40
|
`create`, `ensure`, `get` and `update` expose both `data.resource_limits` (saved
|
|
39
41
|
policy) and `data.effective_resource_limits` (current enforced ceilings). The
|
|
40
42
|
latter can change with account capacity while saved customer terms stay intact.
|
|
41
|
-
These limits do not reserve host capacity or funds. Account
|
|
42
|
-
|
|
43
|
+
These policy limits do not reserve host capacity or funds. Account capacity and
|
|
44
|
+
the namespace's applicable billing contract are checked at allocation time.
|
|
45
|
+
Monthly coverage comes from the separate verified capacity purchase.
|
|
43
46
|
|
|
44
47
|
## Lifecycle
|
|
45
48
|
|
|
@@ -52,16 +55,17 @@ const { namespaces } = await ns.list();
|
|
|
52
55
|
|
|
53
56
|
## Quotas (optional)
|
|
54
57
|
|
|
55
|
-
Spending limits
|
|
58
|
+
Spending limits for credit-metered services, with overdraft and threshold webhooks. This Mode A example applies when your backend owns a metered allowance cycle. Hosted subscriptions reconcile their own paid cycles. Monthly compute uses paid capacity coverage instead of these finite compute quotas.
|
|
56
59
|
|
|
57
60
|
```typescript
|
|
58
61
|
await ns.setQuota({
|
|
59
|
-
namespace: 'production', service: '
|
|
62
|
+
namespace: 'production', service: 'workspace_vm',
|
|
60
63
|
quotaLimit: 500, overdraft: 50,
|
|
61
64
|
onOverdraftAction: 'stop_workspaces',
|
|
62
65
|
notificationThresholds: [80, 95], // fires namespace.quota.threshold webhooks
|
|
63
66
|
});
|
|
64
|
-
|
|
67
|
+
// After external payment, reuse the same cycle end on retry.
|
|
68
|
+
await client.billing.resetQuota('production', { periodEnd: '2026-11-01T00:00:00Z' });
|
|
65
69
|
await ns.listWithQuotas();
|
|
66
70
|
```
|
|
67
71
|
|
|
@@ -90,6 +94,8 @@ A namespace-scoped key is pinned to its namespace: list/get/usage/webhooks all a
|
|
|
90
94
|
|
|
91
95
|
## Namespace credit alerts and customer recovery
|
|
92
96
|
|
|
97
|
+
Use these alerts for metered allowances. For monthly capacity, read coverage, transfer and retained-storage state with `billing.capacity(namespace)` and the [capacity events](./billing.md#payg-and-prepaid-monthly-capacity). A transfer warning alone does not revoke paid compute.
|
|
98
|
+
|
|
93
99
|
Oblien computes the warning state from the same quota row that enforces spending.
|
|
94
100
|
Read `quota.alert` from `GET /billing/entitlement?namespace=...`, or `alert` from
|
|
95
101
|
`GET /billing/balance?namespace=...`. Namespace quota rows also include `alert`.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# SDK 2.8.0
|
|
2
|
+
|
|
3
|
+
Adds typed capped PAYG and prepaid monthly capacity APIs, wallet redemption,
|
|
4
|
+
Stripe checkout, renewal preferences, pending checkout recovery, capacity
|
|
5
|
+
changes and managed proxy transfer packs. Both compute modes use the backend's
|
|
6
|
+
saved tariff, namespace contract and existing billing events.
|
|
7
|
+
|
|
8
|
+
Responses distinguish paid compute coverage, retained-storage balances,
|
|
9
|
+
resource limits, purchased transfer and recorded cap savings. Quote amounts
|
|
10
|
+
are cents; savings and retention balances are dollars. Storage and transfer
|
|
11
|
+
events use the existing signed webhook contract.
|
|
12
|
+
|
|
13
|
+
Requires the matching capacity API and compatible VM nodes. Read
|
|
14
|
+
`billing.capacityCatalog()` before enabling sales, and use saved idempotency
|
|
15
|
+
keys for every confirmation. Existing namespace, workspace and reseller
|
|
16
|
+
methods remain compatible. See [billing](../billing.md) for the full flow.
|
|
17
|
+
|
|
18
|
+
This release is prepared for the repository owner to publish. It has not been
|
|
19
|
+
published automatically.
|
package/docs/webhooks.md
CHANGED
|
@@ -14,6 +14,8 @@ const { events } = await wh.events();
|
|
|
14
14
|
|
|
15
15
|
Includes: `vm.stopped`, `vm.archived`, `workload.started|exited|failed|stopped|restart_loop`, `credits.usage`, `credits.low`, `credits.depleted`, `namespace.quota.threshold`.
|
|
16
16
|
|
|
17
|
+
Compute billing also publishes `capacity.changed`, `capacity.renewed`, `capacity.expired`, `capacity.payment_required`, `capacity.revoked`, `network.topup_applied`, `network.allowance.low`, `network.allowance.depleted`, `storage.retention.payment_required` and `storage.retention.paid`. These use durable signed billing delivery. Reconcile current coverage, transfer and storage with `billing.capacity(namespace)` after deduplicating the event ID.
|
|
18
|
+
|
|
17
19
|
## Create (namespace-scoped or account-wide)
|
|
18
20
|
|
|
19
21
|
```typescript
|
|
@@ -25,7 +27,7 @@ const { webhook } = await wh.create({
|
|
|
25
27
|
});
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
A namespace-bound webhook receives only events that carry that namespace; account-wide webhooks receive
|
|
30
|
+
A namespace-bound webhook receives only events that carry that namespace; account-wide webhooks receive their owner's authorized events. Register billing, credit, capacity, transfer and retained-storage hooks with an owner `admin` credential. Namespace-scoped keys can manage authorized operational hooks in their own namespace, but cannot manage billing webhook configurations.
|
|
29
31
|
|
|
30
32
|
## Manage
|
|
31
33
|
|
|
@@ -44,6 +46,8 @@ await wh.delete(webhook.id);
|
|
|
44
46
|
|
|
45
47
|
## Namespace credit alerts and customer recovery
|
|
46
48
|
|
|
49
|
+
These describe metered allowances. Monthly capacity has no additional compute-credit budget to exhaust; use the capacity, transfer and retained-storage events above. Read the API's `blocking` value rather than deriving access from a numeric credit balance.
|
|
50
|
+
|
|
47
51
|
Oblien computes the warning state from the same quota row that enforces spending.
|
|
48
52
|
Read `quota.alert` from `GET /billing/entitlement?namespace=...`, or `alert` from
|
|
49
53
|
`GET /billing/balance?namespace=...`. Namespace quota rows also include `alert`.
|