@tangle-network/agent-app 3.0.23 → 3.0.25
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/billing/index.d.ts +2 -0
- package/dist/billing/index.js +1 -1
- package/dist/chat-routes/index.js +1 -1
- package/dist/{chunk-2SDX3OC4.js → chunk-63JF23V6.js} +3 -2
- package/dist/{chunk-2SDX3OC4.js.map → chunk-63JF23V6.js.map} +1 -1
- package/dist/{chunk-XCMTWZ36.js → chunk-FYWWQRLA.js} +2 -2
- package/dist/{chunk-XCMTWZ36.js.map → chunk-FYWWQRLA.js.map} +1 -1
- package/dist/platform/billing.d.ts +3 -1
- package/dist/platform/index.js +2 -1
- package/dist/platform/index.js.map +1 -1
- package/dist/preset-cloudflare/index.js +1 -1
- package/dist/public-consultation/index.js +1 -1
- package/package.json +1 -1
|
@@ -100,13 +100,15 @@ export interface PlatformBillingHttp {
|
|
|
100
100
|
getUsageByProduct(userApiKey: string): Promise<PlatformUsageProductRow[]>;
|
|
101
101
|
/** GET /v1/billing/product-entitlement?product=<id> (user bearer). */
|
|
102
102
|
getProductEntitlement(userApiKey: string, productId: string): Promise<ProductEntitlement>;
|
|
103
|
-
/** POST /v1/billing/deduct (service token).
|
|
103
|
+
/** POST /v1/billing/deduct (service token). Platform refuses a deduct without
|
|
104
|
+
* `keyId`, the id of a key the charged user owns (their sign-in key). */
|
|
104
105
|
deduct(input: {
|
|
105
106
|
platformUserId: string;
|
|
106
107
|
amountUsd: number;
|
|
107
108
|
type: string;
|
|
108
109
|
description: string;
|
|
109
110
|
referenceId: string;
|
|
111
|
+
keyId?: string;
|
|
110
112
|
}): Promise<void>;
|
|
111
113
|
/** Absolute URL of the platform's billing-management surface. */
|
|
112
114
|
billingUrl(): string;
|
package/dist/platform/index.js
CHANGED
|
@@ -576,7 +576,8 @@ function createPlatformBillingHttp(opts) {
|
|
|
576
576
|
type: input.type,
|
|
577
577
|
product: opts.productSlug,
|
|
578
578
|
description: input.description,
|
|
579
|
-
referenceId: input.referenceId
|
|
579
|
+
referenceId: input.referenceId,
|
|
580
|
+
...input.keyId ? { keyId: input.keyId } : {}
|
|
580
581
|
})
|
|
581
582
|
}, headers);
|
|
582
583
|
},
|