oblien 2.2.45 → 2.3.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.
Files changed (45) hide show
  1. package/README.md +1 -0
  2. package/dist/billing.d.ts +209 -0
  3. package/dist/billing.d.ts.map +1 -0
  4. package/dist/billing.js +276 -0
  5. package/dist/billing.js.map +1 -0
  6. package/dist/client.d.ts +6 -0
  7. package/dist/client.d.ts.map +1 -1
  8. package/dist/client.js +7 -0
  9. package/dist/client.js.map +1 -1
  10. package/dist/index.d.ts +2 -1
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +1 -0
  13. package/dist/index.js.map +1 -1
  14. package/dist/runtime-http.js +1 -1
  15. package/dist/runtime-http.js.map +1 -1
  16. package/dist/runtime.d.ts +8 -1
  17. package/dist/runtime.d.ts.map +1 -1
  18. package/dist/runtime.js +20 -2
  19. package/dist/runtime.js.map +1 -1
  20. package/dist/types/billing.d.ts +187 -0
  21. package/dist/types/billing.d.ts.map +1 -0
  22. package/dist/types/billing.js +10 -0
  23. package/dist/types/billing.js.map +1 -0
  24. package/dist/types/index.d.ts +4 -2
  25. package/dist/types/index.d.ts.map +1 -1
  26. package/dist/types/notifications.d.ts +8 -0
  27. package/dist/types/notifications.d.ts.map +1 -1
  28. package/dist/types/runtime.d.ts +46 -0
  29. package/dist/types/runtime.d.ts.map +1 -1
  30. package/dist/types/webhooks.d.ts +1 -1
  31. package/dist/types/webhooks.d.ts.map +1 -1
  32. package/dist/types/workspace-resources.d.ts +8 -0
  33. package/dist/types/workspace-resources.d.ts.map +1 -1
  34. package/dist/types/workspace.d.ts +27 -1
  35. package/dist/types/workspace.d.ts.map +1 -1
  36. package/dist/workspace-handle.d.ts +1 -0
  37. package/dist/workspace-handle.d.ts.map +1 -1
  38. package/dist/workspace-handle.js.map +1 -1
  39. package/dist/workspace.d.ts +1 -0
  40. package/dist/workspace.d.ts.map +1 -1
  41. package/dist/workspace.js +2 -2
  42. package/dist/workspace.js.map +1 -1
  43. package/docs/billing.md +130 -0
  44. package/docs/notifications.md +15 -0
  45. package/package.json +2 -1
package/README.md CHANGED
@@ -73,6 +73,7 @@ client
73
73
  ├── workspace(id) scoped handle (ID pre-filled)
74
74
  ├── pages static deploys to the edge CDN → docs/pages.md
75
75
  ├── namespaces grouping · limits · quotas · usage → docs/namespaces.md
76
+ ├── billing checkout · portal · renewal · quotas → docs/billing.md
76
77
  ├── domain slug/DNS checks · routes · SSL → docs/domains.md
77
78
  ├── edgeProxy subdomain → verified upstream → docs/edge-proxy.md
78
79
  ├── edgeTunnel local port → public URL → docs/edge-tunnel.md
@@ -0,0 +1,209 @@
1
+ import type { HttpClient } from './http.js';
2
+ import type { BillingBalance, BillingCatalog, BillingDefaults, BillingDefaultsParams, BillingPolicy, BillingPolicyParams, CheckoutParams, CheckoutResponse, Entitlement, PortalParams, PortalResponse, BillingSubscriptionResponse, ResetQuotaParams, ResetQuotaResponse } from './types/billing.js';
3
+ /**
4
+ * Billing — namespace-bound subscriptions, credit top-ups, and entitlement.
5
+ *
6
+ * Oblien is the payment engine: it runs Stripe internally, meters usage, enforces
7
+ * quotas and suspends namespaces. You never touch Stripe and never re-implement quota
8
+ * math.
9
+ *
10
+ * **The namespace is the unit of billing.** Every subscription, quota, entitlement and
11
+ * suspension is per-namespace, so exhausting one never affects a sibling. That is what
12
+ * makes this usable for multi-tenant products: give each of your customers a namespace
13
+ * and they are billed independently.
14
+ *
15
+ * ### Selling credits to a namespace
16
+ *
17
+ * ```ts
18
+ * // 1. Show what's for sale (public — no auth needed).
19
+ * const { creditPacks } = await client.billing.catalog();
20
+ *
21
+ * // 2. Create a checkout bound to the customer's namespace.
22
+ * const { url } = await client.billing.checkout({
23
+ * namespace: 'tenant-abc',
24
+ * kind: 'topup',
25
+ * packId: creditPacks[0].packId,
26
+ * successUrl: 'https://your-app.com/billing/done',
27
+ * cancelUrl: 'https://your-app.com/billing',
28
+ * });
29
+ *
30
+ * // 3. Send the browser there. On the cleared payment Oblien credits THAT namespace.
31
+ * redirect(url);
32
+ * ```
33
+ *
34
+ * Do **not** grant access off the redirect — the payment is confirmed by webhook, not by
35
+ * the browser coming back. Poll {@link Billing.entitlement} or listen for
36
+ * `payment.succeeded`.
37
+ *
38
+ * ### Two ways to use this
39
+ *
40
+ * - **Mode B (above)** — Oblien hosts the payment against its own catalog. Use
41
+ * {@link Billing.catalog}, {@link Billing.checkout}, {@link Billing.portal}.
42
+ * - **Mode A** — you collect your own money and only want Oblien to enforce a budget.
43
+ * Skip checkout entirely and set the ceiling directly with {@link Billing.setPolicy}
44
+ * (or {@link Billing.setDefaults} for a template applied to every new namespace).
45
+ *
46
+ * **Requires an `admin`- or `billing`-scoped API key** for everything except
47
+ * {@link Billing.catalog}. Namespace- and workspace-scoped tokens — the lightweight ones
48
+ * you hand to end-users — are refused on every billing route by design.
49
+ */
50
+ export declare class Billing {
51
+ /** @internal */
52
+ private readonly _http;
53
+ constructor(client: {
54
+ _http: HttpClient;
55
+ });
56
+ /**
57
+ * Plans and credit packs on offer. Public — no authentication.
58
+ *
59
+ * Read prices from here rather than hardcoding them: the catalog is the platform's
60
+ * source of truth and can change without an SDK release.
61
+ *
62
+ * ```ts
63
+ * const { plans, creditPacks } = await client.billing.catalog();
64
+ * ```
65
+ */
66
+ catalog(): Promise<BillingCatalog>;
67
+ /**
68
+ * Create a hosted checkout bound to a namespace, and get the URL to redirect to.
69
+ *
70
+ * Two kinds:
71
+ *
72
+ * - `kind: 'topup'` + `packId` — adds the pack's credits to that namespace's ceiling.
73
+ * They **survive renewal** and stack, so this is how you un-block a namespace that
74
+ * ran out mid-cycle without changing its plan.
75
+ * - `kind: 'subscription'` + `planTierId` — puts the namespace on a recurring tier.
76
+ * Renewals reset usage and re-assert the ceiling automatically.
77
+ *
78
+ * ```ts
79
+ * const { url, checkoutId } = await client.billing.checkout({
80
+ * namespace: 'tenant-abc',
81
+ * kind: 'topup',
82
+ * packId: 'pack_1k',
83
+ * successUrl: 'https://your-app.com/billing/done',
84
+ * cancelUrl: 'https://your-app.com/billing',
85
+ * idempotencyKey: `topup-${orderId}`,
86
+ * });
87
+ * ```
88
+ *
89
+ * On `successUrl` / `cancelUrl`: both are optional, and their HOST must be on the
90
+ * platform's redirect allowlist. An off-allowlist host **silently falls back** to the
91
+ * platform default instead of erroring (open-redirect mitigation) — so a returned
92
+ * `url` is not proof your URL was accepted. Have the operator allowlist your host via
93
+ * `REDIRECT_ALLOWED_HOSTS`.
94
+ *
95
+ * Fulfilment is idempotent: a webhook redelivery never credits twice, and a delivery
96
+ * whose allocation fails is retried until it lands. A customer who has paid is never
97
+ * left with a namespace that is still capped.
98
+ *
99
+ * @throws ValidationError on an unknown namespace, kind, plan or pack.
100
+ */
101
+ checkout(params: CheckoutParams): Promise<CheckoutResponse>;
102
+ /**
103
+ * Open the hosted "manage subscription / payment method / invoices" portal.
104
+ *
105
+ * Opens only this namespace's isolated Stripe customer. Resolve the namespace from
106
+ * your authenticated customer on your server; keep the admin/billing key there.
107
+ *
108
+ * ```ts
109
+ * const { url } = await client.billing.portal({ namespace: 'tenant-abc', returnUrl: 'https://your-app.com/billing' });
110
+ * ```
111
+ *
112
+ * @throws NotFoundError (`no_customer`) if this namespace has never checked out.
113
+ * @throws ConflictError (`billing_customer_conflict`) for shared legacy billing.
114
+ */
115
+ portal(params: PortalParams): Promise<PortalResponse>;
116
+ /** Read this namespace's subscription, including a pending end-of-period cancellation. */
117
+ subscription(namespace: string): Promise<BillingSubscriptionResponse>;
118
+ /** Stop renewal at the end of the paid period. Repeat calls are safe. */
119
+ cancelSubscription(namespace: string): Promise<BillingSubscriptionResponse>;
120
+ /** Undo scheduled cancellation before the subscription ends; no charge is created. */
121
+ resumeSubscription(namespace: string): Promise<BillingSubscriptionResponse>;
122
+ /**
123
+ * Mode A: start a new allowance cycle without losing purchased credits.
124
+ * Supply the same periodEnd on retry. Mode-B subscriptions renew automatically.
125
+ */
126
+ resetQuota(namespace: string, params: ResetQuotaParams): Promise<ResetQuotaResponse>;
127
+ /**
128
+ * Everything you need to render a namespace's billing state: tier, status, period and
129
+ * quota. This is the single call behind tier badges, usage bars and access gating.
130
+ *
131
+ * ```ts
132
+ * const ent = await client.billing.entitlement('tenant-abc');
133
+ * // ent.status → 'active' | 'past_due' | 'canceled' | 'credit_exhausted'
134
+ * // ent.quota → { limit, used, balance } ← limit INCLUDES purchased top-ups
135
+ * ```
136
+ *
137
+ * `quota.limit === null` means uncapped.
138
+ */
139
+ entitlement(namespace: string): Promise<Entitlement>;
140
+ /**
141
+ * The one-shot "can this namespace do work right now?" check.
142
+ *
143
+ * ```ts
144
+ * const { blocking } = await client.billing.balance('tenant-abc');
145
+ * if (blocking) return showTopUpPrompt();
146
+ * ```
147
+ *
148
+ * `blocking` is `true` when the namespace is suspended or out of credits. You do not
149
+ * have to enforce it yourself — Oblien already refuses creates, starts, resumes and
150
+ * wakes for a blocked namespace — but checking lets you show a useful message instead
151
+ * of surfacing an error.
152
+ */
153
+ balance(namespace: string): Promise<BillingBalance>;
154
+ /**
155
+ * Read a namespace's allowance policy.
156
+ *
157
+ * ```ts
158
+ * const policy = await client.billing.policy('tenant-abc');
159
+ * ```
160
+ */
161
+ policy(namespace: string): Promise<BillingPolicy>;
162
+ /**
163
+ * Set a namespace's budget directly — **Mode A**, for when you collect your own
164
+ * payment and just want Oblien to meter and enforce.
165
+ *
166
+ * ```ts
167
+ * await client.billing.setPolicy('tenant-abc', {
168
+ * quotaLimit: 5000, // included allowance for the cycle
169
+ * overdraft: 500, // may run this far past it before being BLOCKED
170
+ * suspendThreshold: 500, // ...and this far before being SUSPENDED
171
+ * onOverdraftAction: 'stop_workspaces',
172
+ * });
173
+ * ```
174
+ *
175
+ * `overdraft` must be `<= suspendThreshold`, otherwise the request is rejected with
176
+ * `invalid_policy`. The reverse would wedge the namespace: it would stop accepting
177
+ * work before it was ever suspended or reset, so it could never recover.
178
+ *
179
+ * `quotaLimit: null` makes the namespace uncapped. Note that `purchasedCredits` is
180
+ * read-only here — only a {@link Billing.checkout} top-up moves it.
181
+ *
182
+ * @throws ValidationError (`invalid_policy`) on an inverted grace ladder.
183
+ */
184
+ setPolicy(namespace: string, params: BillingPolicyParams): Promise<BillingPolicy>;
185
+ /**
186
+ * Read the template policy applied to new namespaces.
187
+ */
188
+ defaults(): Promise<BillingDefaults>;
189
+ /**
190
+ * Set the template policy applied to every NEW namespace — so you configure the budget
191
+ * once instead of per tenant.
192
+ *
193
+ * ```ts
194
+ * await client.billing.setDefaults({
195
+ * quotaLimit: 1000,
196
+ * overdraft: 0,
197
+ * suspendThreshold: 0,
198
+ * autoApply: true,
199
+ * });
200
+ * ```
201
+ *
202
+ * Worth setting: a namespace with no ceiling and no default is **uncapped**, so it
203
+ * meters usage without ever blocking.
204
+ *
205
+ * Same `overdraft <= suspendThreshold` rule as {@link Billing.setPolicy}.
206
+ */
207
+ setDefaults(params: BillingDefaultsParams): Promise<BillingDefaults>;
208
+ }
209
+ //# sourceMappingURL=billing.d.ts.map
@@ -0,0 +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,WAAW,EACX,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,oBAAoB,CAAC;AAE5B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,qBAAa,OAAO;IAClB,gBAAgB;IAChB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAa;gBAEvB,MAAM,EAAE;QAAE,KAAK,EAAE,UAAU,CAAA;KAAE;IAIzC;;;;;;;;;OASG;IACG,OAAO,IAAI,OAAO,CAAC,cAAc,C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Oblien is the payment engine: it runs Stripe internally, meters usage, enforces
5
+ * quotas and suspends namespaces. You never touch Stripe and never re-implement quota
6
+ * math.
7
+ *
8
+ * **The namespace is the unit of billing.** Every subscription, quota, entitlement and
9
+ * suspension is per-namespace, so exhausting one never affects a sibling. That is what
10
+ * makes this usable for multi-tenant products: give each of your customers a namespace
11
+ * and they are billed independently.
12
+ *
13
+ * ### Selling credits to a namespace
14
+ *
15
+ * ```ts
16
+ * // 1. Show what's for sale (public — no auth needed).
17
+ * const { creditPacks } = await client.billing.catalog();
18
+ *
19
+ * // 2. Create a checkout bound to the customer's namespace.
20
+ * const { url } = await client.billing.checkout({
21
+ * namespace: 'tenant-abc',
22
+ * kind: 'topup',
23
+ * packId: creditPacks[0].packId,
24
+ * successUrl: 'https://your-app.com/billing/done',
25
+ * cancelUrl: 'https://your-app.com/billing',
26
+ * });
27
+ *
28
+ * // 3. Send the browser there. On the cleared payment Oblien credits THAT namespace.
29
+ * redirect(url);
30
+ * ```
31
+ *
32
+ * Do **not** grant access off the redirect — the payment is confirmed by webhook, not by
33
+ * the browser coming back. Poll {@link Billing.entitlement} or listen for
34
+ * `payment.succeeded`.
35
+ *
36
+ * ### Two ways to use this
37
+ *
38
+ * - **Mode B (above)** — Oblien hosts the payment against its own catalog. Use
39
+ * {@link Billing.catalog}, {@link Billing.checkout}, {@link Billing.portal}.
40
+ * - **Mode A** — you collect your own money and only want Oblien to enforce a budget.
41
+ * Skip checkout entirely and set the ceiling directly with {@link Billing.setPolicy}
42
+ * (or {@link Billing.setDefaults} for a template applied to every new namespace).
43
+ *
44
+ * **Requires an `admin`- or `billing`-scoped API key** for everything except
45
+ * {@link Billing.catalog}. Namespace- and workspace-scoped tokens — the lightweight ones
46
+ * you hand to end-users — are refused on every billing route by design.
47
+ */
48
+ export class Billing {
49
+ /** @internal */
50
+ _http;
51
+ constructor(client) {
52
+ this._http = client._http;
53
+ }
54
+ /**
55
+ * Plans and credit packs on offer. Public — no authentication.
56
+ *
57
+ * Read prices from here rather than hardcoding them: the catalog is the platform's
58
+ * source of truth and can change without an SDK release.
59
+ *
60
+ * ```ts
61
+ * const { plans, creditPacks } = await client.billing.catalog();
62
+ * ```
63
+ */
64
+ async catalog() {
65
+ return this._http.request({
66
+ method: 'GET',
67
+ path: '/billing/catalog',
68
+ });
69
+ }
70
+ /**
71
+ * Create a hosted checkout bound to a namespace, and get the URL to redirect to.
72
+ *
73
+ * Two kinds:
74
+ *
75
+ * - `kind: 'topup'` + `packId` — adds the pack's credits to that namespace's ceiling.
76
+ * They **survive renewal** and stack, so this is how you un-block a namespace that
77
+ * ran out mid-cycle without changing its plan.
78
+ * - `kind: 'subscription'` + `planTierId` — puts the namespace on a recurring tier.
79
+ * Renewals reset usage and re-assert the ceiling automatically.
80
+ *
81
+ * ```ts
82
+ * const { url, checkoutId } = await client.billing.checkout({
83
+ * namespace: 'tenant-abc',
84
+ * kind: 'topup',
85
+ * packId: 'pack_1k',
86
+ * successUrl: 'https://your-app.com/billing/done',
87
+ * cancelUrl: 'https://your-app.com/billing',
88
+ * idempotencyKey: `topup-${orderId}`,
89
+ * });
90
+ * ```
91
+ *
92
+ * On `successUrl` / `cancelUrl`: both are optional, and their HOST must be on the
93
+ * platform's redirect allowlist. An off-allowlist host **silently falls back** to the
94
+ * platform default instead of erroring (open-redirect mitigation) — so a returned
95
+ * `url` is not proof your URL was accepted. Have the operator allowlist your host via
96
+ * `REDIRECT_ALLOWED_HOSTS`.
97
+ *
98
+ * Fulfilment is idempotent: a webhook redelivery never credits twice, and a delivery
99
+ * whose allocation fails is retried until it lands. A customer who has paid is never
100
+ * left with a namespace that is still capped.
101
+ *
102
+ * @throws ValidationError on an unknown namespace, kind, plan or pack.
103
+ */
104
+ async checkout(params) {
105
+ return this._http.request({
106
+ method: 'POST',
107
+ path: '/billing/checkout',
108
+ body: params,
109
+ });
110
+ }
111
+ /**
112
+ * Open the hosted "manage subscription / payment method / invoices" portal.
113
+ *
114
+ * Opens only this namespace's isolated Stripe customer. Resolve the namespace from
115
+ * your authenticated customer on your server; keep the admin/billing key there.
116
+ *
117
+ * ```ts
118
+ * const { url } = await client.billing.portal({ namespace: 'tenant-abc', returnUrl: 'https://your-app.com/billing' });
119
+ * ```
120
+ *
121
+ * @throws NotFoundError (`no_customer`) if this namespace has never checked out.
122
+ * @throws ConflictError (`billing_customer_conflict`) for shared legacy billing.
123
+ */
124
+ async portal(params) {
125
+ if (!params?.namespace?.trim())
126
+ throw new TypeError('billing.portal requires a namespace');
127
+ return this._http.request({
128
+ method: 'POST',
129
+ path: '/billing/portal',
130
+ body: params,
131
+ });
132
+ }
133
+ /** Read this namespace's subscription, including a pending end-of-period cancellation. */
134
+ async subscription(namespace) {
135
+ return this._http.request({
136
+ method: 'GET', path: '/billing/subscription', query: { namespace },
137
+ });
138
+ }
139
+ /** Stop renewal at the end of the paid period. Repeat calls are safe. */
140
+ async cancelSubscription(namespace) {
141
+ return this._http.request({
142
+ method: 'POST', path: '/billing/subscription/cancel', body: { namespace },
143
+ });
144
+ }
145
+ /** Undo scheduled cancellation before the subscription ends; no charge is created. */
146
+ async resumeSubscription(namespace) {
147
+ return this._http.request({
148
+ method: 'POST', path: '/billing/subscription/resume', body: { namespace },
149
+ });
150
+ }
151
+ /**
152
+ * Mode A: start a new allowance cycle without losing purchased credits.
153
+ * Supply the same periodEnd on retry. Mode-B subscriptions renew automatically.
154
+ */
155
+ async resetQuota(namespace, params) {
156
+ return this._http.request({
157
+ method: 'POST', path: `/billing/policy/${encodeURIComponent(namespace)}/reset`, body: params,
158
+ });
159
+ }
160
+ /**
161
+ * Everything you need to render a namespace's billing state: tier, status, period and
162
+ * quota. This is the single call behind tier badges, usage bars and access gating.
163
+ *
164
+ * ```ts
165
+ * const ent = await client.billing.entitlement('tenant-abc');
166
+ * // ent.status → 'active' | 'past_due' | 'canceled' | 'credit_exhausted'
167
+ * // ent.quota → { limit, used, balance } ← limit INCLUDES purchased top-ups
168
+ * ```
169
+ *
170
+ * `quota.limit === null` means uncapped.
171
+ */
172
+ async entitlement(namespace) {
173
+ return this._http.request({
174
+ method: 'GET',
175
+ path: '/billing/entitlement',
176
+ query: { namespace },
177
+ });
178
+ }
179
+ /**
180
+ * The one-shot "can this namespace do work right now?" check.
181
+ *
182
+ * ```ts
183
+ * const { blocking } = await client.billing.balance('tenant-abc');
184
+ * if (blocking) return showTopUpPrompt();
185
+ * ```
186
+ *
187
+ * `blocking` is `true` when the namespace is suspended or out of credits. You do not
188
+ * have to enforce it yourself — Oblien already refuses creates, starts, resumes and
189
+ * wakes for a blocked namespace — but checking lets you show a useful message instead
190
+ * of surfacing an error.
191
+ */
192
+ async balance(namespace) {
193
+ return this._http.request({
194
+ method: 'GET',
195
+ path: '/billing/balance',
196
+ query: { namespace },
197
+ });
198
+ }
199
+ /**
200
+ * Read a namespace's allowance policy.
201
+ *
202
+ * ```ts
203
+ * const policy = await client.billing.policy('tenant-abc');
204
+ * ```
205
+ */
206
+ async policy(namespace) {
207
+ return this._http.request({
208
+ method: 'GET',
209
+ path: `/billing/policy/${encodeURIComponent(namespace)}`,
210
+ });
211
+ }
212
+ /**
213
+ * Set a namespace's budget directly — **Mode A**, for when you collect your own
214
+ * payment and just want Oblien to meter and enforce.
215
+ *
216
+ * ```ts
217
+ * await client.billing.setPolicy('tenant-abc', {
218
+ * quotaLimit: 5000, // included allowance for the cycle
219
+ * overdraft: 500, // may run this far past it before being BLOCKED
220
+ * suspendThreshold: 500, // ...and this far before being SUSPENDED
221
+ * onOverdraftAction: 'stop_workspaces',
222
+ * });
223
+ * ```
224
+ *
225
+ * `overdraft` must be `<= suspendThreshold`, otherwise the request is rejected with
226
+ * `invalid_policy`. The reverse would wedge the namespace: it would stop accepting
227
+ * work before it was ever suspended or reset, so it could never recover.
228
+ *
229
+ * `quotaLimit: null` makes the namespace uncapped. Note that `purchasedCredits` is
230
+ * read-only here — only a {@link Billing.checkout} top-up moves it.
231
+ *
232
+ * @throws ValidationError (`invalid_policy`) on an inverted grace ladder.
233
+ */
234
+ async setPolicy(namespace, params) {
235
+ return this._http.request({
236
+ method: 'PUT',
237
+ path: `/billing/policy/${encodeURIComponent(namespace)}`,
238
+ body: params,
239
+ });
240
+ }
241
+ /**
242
+ * Read the template policy applied to new namespaces.
243
+ */
244
+ async defaults() {
245
+ return this._http.request({
246
+ method: 'GET',
247
+ path: '/billing/defaults',
248
+ });
249
+ }
250
+ /**
251
+ * Set the template policy applied to every NEW namespace — so you configure the budget
252
+ * once instead of per tenant.
253
+ *
254
+ * ```ts
255
+ * await client.billing.setDefaults({
256
+ * quotaLimit: 1000,
257
+ * overdraft: 0,
258
+ * suspendThreshold: 0,
259
+ * autoApply: true,
260
+ * });
261
+ * ```
262
+ *
263
+ * Worth setting: a namespace with no ceiling and no default is **uncapped**, so it
264
+ * meters usage without ever blocking.
265
+ *
266
+ * Same `overdraft <= suspendThreshold` rule as {@link Billing.setPolicy}.
267
+ */
268
+ async setDefaults(params) {
269
+ return this._http.request({
270
+ method: 'PUT',
271
+ path: '/billing/defaults',
272
+ body: params,
273
+ });
274
+ }
275
+ }
276
+ //# sourceMappingURL=billing.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"billing.js","sourceRoot":"","sources":["../src/billing.ts"],"names":[],"mappings":"AAkBA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,MAAM,OAAO,OAAO;IAClB,gBAAgB;IACC,KAAK,CAAa;IAEnC,YAAY,MAA6B;QACvC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,OAAO;QACX,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAiB;YACxC,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,kBAAkB;SACzB,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAiCG;IACH,KAAK,CAAC,QAAQ,CAAC,MAAs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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"}
package/dist/client.d.ts CHANGED
@@ -12,6 +12,7 @@ import { Domain } from './domain.js';
12
12
  import { Tokens } from './tokens.js';
13
13
  import { Analytics } from './analytics.js';
14
14
  import { Cdn } from './cdn.js';
15
+ import { Billing } from './billing.js';
15
16
  import type { OblienOptions } from './types/index.js';
16
17
  /**
17
18
  * Oblien API client.
@@ -65,6 +66,11 @@ export declare class Oblien {
65
66
  readonly analytics: Analytics;
66
67
  /** CDN — issue upload tokens, upload files, and manage stored files (namespace-aware). */
67
68
  readonly cdn: Cdn;
69
+ /**
70
+ * Billing — namespace-bound subscriptions, credit top-ups and entitlement.
71
+ * Requires an admin- or billing-scoped key (the catalog is public).
72
+ */
73
+ readonly billing: Billing;
68
74
  constructor(options: OblienOptions);
69
75
  /**
70
76
  * Replace the current auth with a Bearer token.
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAA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ytics } from './analytics.js';
14
14
  import { Cdn } from './cdn.js';
15
+ import { Billing } from './billing.js';
15
16
  /**
16
17
  * Oblien API client.
17
18
  *
@@ -64,6 +65,11 @@ export class Oblien {
64
65
  analytics;
65
66
  /** CDN — issue upload tokens, upload files, and manage stored files (namespace-aware). */
66
67
  cdn;
68
+ /**
69
+ * Billing — namespace-bound subscriptions, credit top-ups and entitlement.
70
+ * Requires an admin- or billing-scoped key (the catalog is public).
71
+ */
72
+ billing;
67
73
  constructor(options) {
68
74
  this._http = new HttpClient(options);
69
75
  this._cdnBaseUrl = (options.cdnBaseUrl ?? 'https://cdn.oblien.com/api').replace(/\/$/, '');
@@ -79,6 +85,7 @@ export class Oblien {
79
85
  this.tokens = new Tokens(this);
80
86
  this.analytics = new Analytics(this);
81
87
  this.cdn = new Cdn(this);
88
+ this.billing = new Billing(this);
82
89
  }
83
90
  /**
84
91
  * Replace the current auth with a Bearer token.
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAA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G;IACH,SAAS,CAAC,WAAmB;QAC3B,OAAO,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;IAC3D,CAAC;CACF"}
package/dist/index.d.ts CHANGED
@@ -19,10 +19,11 @@ export { Domain } from './domain.js';
19
19
  export { Tokens } from './tokens.js';
20
20
  export { Analytics } from './analytics.js';
21
21
  export { Cdn, CdnDomains } from './cdn.js';
22
+ export { Billing } from './billing.js';
22
23
  export { Runtime } from './runtime.js';
23
24
  export { RuntimeWebSocket } from './runtime/ws.js';
24
25
  export { RuntimeProxy } from './runtime/proxy.js';
25
26
  export type { ProxyFetchInit } from './runtime/proxy.js';
26
27
  export { OblienError, AuthenticationError, NotFoundError, RateLimitError, ValidationError, PaymentRequiredError, ConflictError, } from './error.js';
27
- export type { OblienOptions, RequestOptions, ApiResponse, WorkspaceCreateParams, WorkspaceUpdateParams, WorkspaceListParams, WorkspaceListResponse, WorkspaceData, ResourceSpec, LifecycleSpec, NetworkSpec, FirewallRule, PrivateLink, RuntimeOptions, FileListParams, FileEntry, FileListResponse, FileReadParams, FileReadResponse, FileWriteParams, FileWriteResponse, FileMkdirParams, FileStatParams, FileStatResponse, FileDeleteParams, ContentSearchParams, SearchMatch, ContentSearchResponse, FileSearchParams, FileSearchResponse, SearchStatusResponse, SearchInitResponse, ExecRunParams, ExecTask, ExecListResponse, ExecStreamEvent, TerminalCreateParams, TerminalSession, TerminalListResponse, TerminalScrollbackResponse, WatcherCreateParams, WatcherInfo, WatcherListResponse, WSOptions, WSMessage, WSTerminalResize, WSTerminalExit, WSTerminalEvent, WSWatcherChange, WSWatcherReady, WSWatcherOverflow, WSWatcherEvent, TransferProgress, TransferDownloadParams, TransferUploadParams, TransferUploadResponse, LifecycleStatus, MakeTemporaryParams, UpdateTtlParams, SshStatus, SshPasswordParams, SshKeyParams, PublicAccessPort, ExposePortParams, UpdateSlugParams, SnapshotParams, ArchiveCreateParams, ArchiveInfo, WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, UsageParams, UpdateResourcesParams, UpdateMetadataParams, ApiAccessStatus, RawTokenResponse, NetworkUpdateParams, NetworkConfig, LogsParams, LogFile, LogStreamEvent, StatsEvent, WorkloadStatsEvent, WorkloadLogEntry, ImagesListParams, DomainInfo, ConnectDomainParams, ConnectDomainResponse, CheckDNSParams, CheckDNSResponse, RenewSSLResponse, CheckSlugParams, CheckSlugResponse, VerifyDomainParams, VerifyDomainResponse, DomainListParams, DomainRoute, DomainRoutesResponse, SslCertificate, SslListResponse, SslAutoRenewResponse, PageData, PageCreateParams, PageDeployParams, PageUpdateParams, PageListResponse, PageDomainResponse, PageDNSCheckResponse, PageSSLRenewResponse, RouteMatchType, RouteMatch, RouteProxyAction, RouteRewriteAction, RouteRedirectAction, RouteHeadersAction, RouteAction, RouteRule, PageRoutesInput, PageRouteConfig, PageRoutesResponse, PageRouteVersion, PageRoutesGetResponse, RoutesInput, RoutesResult, RoutesGetResponse, SiteData, SiteCreateParams, SiteUpdateParams, SiteListResponse, EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse, EdgeProxyVerificationStatus, EdgeProxyVerification, EdgeProxyVerificationChallenge, EdgeProxyVerificationCheckResult, EdgeProxyVerificationListResponse, EdgeTunnelSSLState, EdgeTunnelData, EdgeTunnelCreateParams, EdgeTunnelCheckDomainParams, EdgeTunnelCheckDomainResponse, EdgeTunnelUpdateParams, EdgeTunnelListResponse, EdgeTunnelIssueTokenParams, EdgeTunnelTokenResponse, EdgeTunnelSSLRenewResponse, PushPlatform, PushDeviceStatus, PushTokenStatus, PushDevice, RegisterDeviceParams, PushDeviceListResponse, WorkspacePushToken, CreatedWorkspacePushToken, CreatePushTokenParams, PushTokenListResponse, SendNotificationParams, SendNotificationResponse, WebhookEvent, Webhook, WebhookCreateParams, WebhookUpdateParams, WebhookListParams, WebhookListResponse, WebhookEventsResponse, NamespaceStatus, NamespaceType, NamespaceResourceLimits, NamespaceData, NamespaceCreateParams, NamespaceEnsureParams, NamespaceEnsureResponse, NamespaceUpdateParams, NamespaceListParams, NamespaceListResponse, NamespaceActivity, NamespaceActivityParams, NamespaceUsageParams, NamespaceUsageUnitsParams, NamespaceUsageUnitBucket, NamespaceUsageUnits, NamespaceDeleteParams, OverdraftAction, NamespaceQuota, SetNamespaceQuotaParams, ResetNamespaceQuotaParams, NamespaceListWithQuotasParams, NamespaceDetailsParams, DefaultQuotaConfig, SetDefaultQuotaParams, ToggleDefaultQuotaAutoApplyParams, DeleteDefaultQuotaParams, AnalyticsOverview, AnalyticsDomainSummary, AnalyticsHomeSummary, AnalyticsBucket, AnalyticsTimeseriesParams, AnalyticsTimeseriesResponse, AnalyticsGeoEntry, AnalyticsGeoParams, AnalyticsGeoResponse, AnalyticsRequestEntry, AnalyticsRequestsParams, AnalyticsRequestsResponse, AnalyticsStreamTokenResponse, CdnTokenScope, CdnFile, CdnTokenParams, CdnTokenResponse, CdnUploadInput, CdnUploadParams, CdnUploadVariant, CdnUploadResponse, CdnUploadManyResponse, CdnProcessUrlsParams, CdnProcessUrlsResponse, CdnLimitsResponse, CdnVariantOptionsResponse, CdnListParams, CdnPagination, CdnListResponse, CdnStatsParams, CdnStats, CdnStatsResponse, CdnFileResponse, CdnVariantSpec, CdnVariantOptions, CdnUsageParams, CdnUsageResponse, CdnUsageSeriesParams, CdnUsageSeriesResponse, CdnDomainAddParams, CdnDomainListParams, CdnDomainSsl, CdnDomainDns, CdnDomainAddResponse, CdnDomain, CdnDomainListResponse, CdnDomainRemoveResponse, } from './types/index.js';
28
+ export type { OblienOptions, RequestOptions, ApiResponse, WorkspaceCreateParams, WorkspaceUpdateParams, WorkspaceListParams, WorkspaceListResponse, WorkspaceData, ResourceSpec, LifecycleSpec, NetworkSpec, FirewallRule, PrivateLink, RuntimeOptions, RuntimeInfo, RuntimeBootService, RuntimeTarget, RuntimeDiscovery, FileListParams, FileEntry, FileListResponse, FileReadParams, FileReadResponse, FileWriteParams, FileWriteResponse, FileMkdirParams, FileStatParams, FileStatResponse, FileDeleteParams, ContentSearchParams, SearchMatch, ContentSearchResponse, FileSearchParams, FileSearchResponse, SearchStatusResponse, SearchInitResponse, ExecRunParams, ExecTask, ExecListResponse, ExecStreamEvent, TerminalCreateParams, TerminalSession, TerminalListResponse, TerminalScrollbackResponse, WatcherCreateParams, WatcherInfo, WatcherListResponse, WSOptions, WSMessage, WSTerminalResize, WSTerminalExit, WSTerminalEvent, WSWatcherChange, WSWatcherReady, WSWatcherOverflow, WSWatcherEvent, TransferProgress, TransferDownloadParams, TransferUploadParams, TransferUploadResponse, LifecycleStatus, MakeTemporaryParams, UpdateTtlParams, SshStatus, SshPasswordParams, SshKeyParams, PublicAccessPort, ExposePortParams, UpdateSlugParams, SnapshotParams, ArchiveCreateParams, ArchiveInfo, WorkloadCreateParams, WorkloadUpdateParams, WorkloadInfo, WorkloadListParams, UsageParams, UpdateResourcesParams, UpdateMetadataParams, ApiAccessStatus, RawTokenResponse, NetworkUpdateParams, NetworkConfig, LogsParams, LogFile, LogStreamEvent, StatsEvent, WorkloadStatsEvent, WorkloadLogEntry, ImagesListParams, DomainInfo, ConnectDomainParams, ConnectDomainResponse, CheckDNSParams, CheckDNSResponse, RenewSSLResponse, CheckSlugParams, CheckSlugResponse, VerifyDomainParams, VerifyDomainResponse, DomainListParams, DomainRoute, DomainRoutesResponse, SslCertificate, SslListResponse, SslAutoRenewResponse, PageData, PageCreateParams, PageDeployParams, PageUpdateParams, PageListResponse, PageDomainResponse, PageDNSCheckResponse, PageSSLRenewResponse, RouteMatchType, RouteMatch, RouteProxyAction, RouteRewriteAction, RouteRedirectAction, RouteHeadersAction, RouteAction, RouteRule, PageRoutesInput, PageRouteConfig, PageRoutesResponse, PageRouteVersion, PageRoutesGetResponse, RoutesInput, RoutesResult, RoutesGetResponse, SiteData, SiteCreateParams, SiteUpdateParams, SiteListResponse, EdgeProxyData, EdgeProxyCreateParams, EdgeProxyUpdateParams, EdgeProxyListResponse, EdgeProxyVerificationStatus, EdgeProxyVerification, EdgeProxyVerificationChallenge, EdgeProxyVerificationCheckResult, EdgeProxyVerificationListResponse, EdgeTunnelSSLState, EdgeTunnelData, EdgeTunnelCreateParams, EdgeTunnelCheckDomainParams, EdgeTunnelCheckDomainResponse, EdgeTunnelUpdateParams, EdgeTunnelListResponse, EdgeTunnelIssueTokenParams, EdgeTunnelTokenResponse, EdgeTunnelSSLRenewResponse, PushPlatform, PushDeviceStatus, PushTokenStatus, PushDevice, RegisterDeviceParams, PushDeviceListResponse, WorkspacePushToken, CreatedWorkspacePushToken, CreatePushTokenParams, PushTokenListResponse, SendNotificationParams, SendNotificationResponse, WebhookEvent, Webhook, WebhookCreateParams, WebhookUpdateParams, WebhookListParams, WebhookListResponse, WebhookEventsResponse, NamespaceStatus, NamespaceType, NamespaceResourceLimits, NamespaceData, NamespaceCreateParams, NamespaceEnsureParams, NamespaceEnsureResponse, NamespaceUpdateParams, NamespaceListParams, NamespaceListResponse, NamespaceActivity, NamespaceActivityParams, NamespaceUsageParams, NamespaceUsageUnitsParams, NamespaceUsageUnitBucket, NamespaceUsageUnits, NamespaceDeleteParams, OverdraftAction, NamespaceQuota, SetNamespaceQuotaParams, ResetNamespaceQuotaParams, NamespaceListWithQuotasParams, NamespaceDetailsParams, DefaultQuotaConfig, SetDefaultQuotaParams, ToggleDefaultQuotaAutoApplyParams, DeleteDefaultQuotaParams, AnalyticsOverview, AnalyticsDomainSummary, AnalyticsHomeSummary, AnalyticsBucket, AnalyticsTimeseriesParams, AnalyticsTimeseriesResponse, AnalyticsGeoEntry, AnalyticsGeoParams, AnalyticsGeoResponse, AnalyticsRequestEntry, AnalyticsRequestsParams, AnalyticsRequestsResponse, AnalyticsStreamTokenResponse, CdnTokenScope, CdnFile, CdnTokenParams, CdnTokenResponse, CdnUploadInput, CdnUploadParams, CdnUploadVariant, CdnUploadResponse, CdnUploadManyResponse, CdnProcessUrlsParams, CdnProcessUrlsResponse, CdnLimitsResponse, CdnVariantOptionsResponse, CdnListParams, CdnPagination, CdnListResponse, CdnStatsParams, CdnStats, CdnStatsResponse, CdnFileResponse, CdnVariantSpec, CdnVariantOptions, CdnUsageParams, CdnUsageResponse, CdnUsageSeriesParams, CdnUsageSeriesResponse, CdnDomainAddParams, CdnDomainListParams, CdnDomainSsl, CdnDomainDns, CdnDomainAddResponse, CdnDomain, CdnDomainListResponse, CdnDomainRemoveResponse, } from './types/index.js';
28
29
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,6CAA6C;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAChG,YAAY,EAAE,mBAAmB,EAAE,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AAqB,EACrB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ export { Domain } from './domain.js';
19
19
  export { Tokens } from './tokens.js';
20
20
  export { Analytics } from './analytics.js';
21
21
  export { Cdn, CdnDomains } from './cdn.js';
22
+ export { Billing } from './billing.js';
22
23
  export { Runtime } from './runtime.js';
23
24
  export { RuntimeWebSocket } from './runtime/ws.js';
24
25
  export { RuntimeProxy } from './runtime/proxy.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,OAAO,EAAE,MAAM,IAAI,OAAO,EAAE,MAAM,aAAa,CAAC;AAEhD,sEAAsE;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,6CAA6C;AAC7C,OAAO,EAAE,KAAK,IAAI,KAAK,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAEhG,OAAO,EAAE,MAAM,EAAE,M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