@schematichq/schematic-typescript-node 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/resources/billing/client/Client.d.ts +47 -0
- package/dist/api/resources/billing/client/requests/ListBillingPricesRequest.d.ts +3 -0
- package/dist/api/resources/billing/client/requests/ListBillingProductPricesRequest.d.ts +3 -0
- package/dist/api/resources/billing/types/DeleteBillingCouponResponse.d.ts +6 -0
- package/dist/api/resources/billing/types/DeleteBillingCustomerResponse.d.ts +6 -0
- package/dist/api/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +6 -0
- package/dist/api/resources/billing/types/ListBillingPricesParams.d.ts +2 -0
- package/dist/api/resources/billing/types/ListBillingProductPricesParams.d.ts +2 -0
- package/dist/api/resources/billing/types/index.d.ts +3 -0
- package/dist/api/resources/plans/client/Client.d.ts +1 -5
- package/dist/api/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +1 -6
- package/dist/api/resources/webhooks/client/Client.d.ts +18 -0
- package/dist/api/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
- package/dist/api/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/api/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +6 -0
- package/dist/api/resources/webhooks/types/index.d.ts +1 -0
- package/dist/api/types/AccountMemberPermission.d.ts +0 -1
- package/dist/api/types/CheckFlagsResponseData.d.ts +2 -0
- package/dist/api/types/CompanyCreditBalance.d.ts +8 -0
- package/dist/api/types/CompanySubscriptionResponseData.d.ts +1 -0
- package/dist/api/types/FeatureEntitlement.d.ts +4 -0
- package/dist/api/types/RulesengineFeatureEntitlement.d.ts +4 -0
- package/dist/api/types/TestWebhookResponseData.d.ts +4 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/credits/check.d.ts +9 -5
- package/dist/credits/types.d.ts +11 -9
- package/dist/datastream/merge.d.ts +1 -1
- package/dist/index.js +9 -9
- package/dist/rules-engine.d.ts +4 -0
- package/dist/serialization/resources/billing/types/DeleteBillingCouponResponse.d.ts +11 -0
- package/dist/serialization/resources/billing/types/DeleteBillingCustomerResponse.d.ts +11 -0
- package/dist/serialization/resources/billing/types/DeleteBillingInvoiceResponse.d.ts +11 -0
- package/dist/serialization/resources/billing/types/ListBillingPricesParams.d.ts +1 -0
- package/dist/serialization/resources/billing/types/ListBillingProductPricesParams.d.ts +1 -0
- package/dist/serialization/resources/billing/types/index.d.ts +3 -0
- package/dist/serialization/resources/plans/client/requests/PublishPlanVersionRequestBody.d.ts +0 -2
- package/dist/serialization/resources/webhooks/client/requests/TestWebhookRequestBody.d.ts +10 -0
- package/dist/serialization/resources/webhooks/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/webhooks/types/SendTestWebhookActionResponse.d.ts +11 -0
- package/dist/serialization/resources/webhooks/types/index.d.ts +1 -0
- package/dist/serialization/types/AccountMemberPermission.d.ts +1 -1
- package/dist/serialization/types/CheckFlagsResponseData.d.ts +2 -0
- package/dist/serialization/types/CompanyCreditBalance.d.ts +11 -0
- package/dist/serialization/types/CompanySubscriptionResponseData.d.ts +1 -0
- package/dist/serialization/types/FeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/RulesengineFeatureEntitlement.d.ts +2 -0
- package/dist/serialization/types/TestWebhookResponseData.d.ts +10 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/wasm/rulesengine.js +4 -4
- package/dist/wrapper.d.ts +0 -30
- package/package.json +1 -1
package/dist/wrapper.d.ts
CHANGED
|
@@ -270,36 +270,6 @@ export declare class SchematicClient extends BaseClient {
|
|
|
270
270
|
* event — across pods and process restarts, not just within one process.
|
|
271
271
|
*/
|
|
272
272
|
trackWithReservation(reservation: Reservation, actualQuantity: number, options?: TrackWithReservationOptions): Promise<void>;
|
|
273
|
-
/**
|
|
274
|
-
* Lease-aware credit balance for display, in the same three-way split the
|
|
275
|
-
* server exposes on `listCompanyCreditBalances`:
|
|
276
|
-
*
|
|
277
|
-
* - `remaining`: credits available to draw right now — the server balance
|
|
278
|
-
* (`company.creditBalances[creditId]`, already net of any active lease
|
|
279
|
-
* tranche): `B − L`.
|
|
280
|
-
* - `reserved`: the active lease's unsettled hold — its unspent local
|
|
281
|
-
* balance plus open reservations (`L − spent`), reported as the
|
|
282
|
-
* aggregate the server models.
|
|
283
|
-
* - `settled`: the economic balance the end user should see —
|
|
284
|
-
* `remaining + reserved = B − spent`. Invariant to in-flight holds, so
|
|
285
|
-
* a counter bound to it doesn't dip mid-call.
|
|
286
|
-
*
|
|
287
|
-
* Bind a user-facing "credits remaining" counter to `settled`: the server
|
|
288
|
-
* balance alone reads low (or 0) while a lease still has unspent balance.
|
|
289
|
-
*
|
|
290
|
-
* `reserved` is 0 when no lease is held or the held lease has expired — the
|
|
291
|
-
* server refunds an expired lease's unspent hold into the balance, so
|
|
292
|
-
* counting a stale local entry would double-count. Returns zeros when
|
|
293
|
-
* credit leases / datastream aren't configured or the company can't be
|
|
294
|
-
* resolved. The `reserved` term comes from this process's lease +
|
|
295
|
-
* reservation stores, so it (and `settled`) is per-process unless
|
|
296
|
-
* Redis-backed stores are configured.
|
|
297
|
-
*/
|
|
298
|
-
getCreditBalance(company: Record<string, string>, creditId: string): Promise<{
|
|
299
|
-
remaining: number;
|
|
300
|
-
reserved: number;
|
|
301
|
-
settled: number;
|
|
302
|
-
}>;
|
|
303
273
|
private resolveCompanyId;
|
|
304
274
|
/**
|
|
305
275
|
* Send a non-blocking event to create or update companies and users.
|