@dotbots-boutique/server-sdk 0.3.0 → 0.3.3
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/client.js +3 -2
- package/dist/proxy/handlers.js +1 -1
- package/package.json +1 -1
package/dist/client.js
CHANGED
|
@@ -52,6 +52,7 @@ class DotBotsBackend {
|
|
|
52
52
|
tools: request.tools,
|
|
53
53
|
stream: false,
|
|
54
54
|
maxTokens: request.maxTokens,
|
|
55
|
+
paidBy: request.paidBy,
|
|
55
56
|
orgId: request.orgId,
|
|
56
57
|
}),
|
|
57
58
|
});
|
|
@@ -101,12 +102,12 @@ class DotBotsBackend {
|
|
|
101
102
|
}
|
|
102
103
|
}
|
|
103
104
|
async charge(featureCode, options) {
|
|
104
|
-
const response = await fetch(`${this.getProxyUrl()}/charge`, {
|
|
105
|
+
const response = await fetch(`${this.getProxyUrl()}/payments/charge`, {
|
|
105
106
|
method: 'POST',
|
|
106
107
|
headers: this.baseHeaders(),
|
|
107
108
|
body: JSON.stringify({
|
|
108
109
|
featureCode,
|
|
109
|
-
paidBy: options.paidBy,
|
|
110
|
+
paidBy: options.paidBy ?? 'org',
|
|
110
111
|
orgId: options.orgId,
|
|
111
112
|
quantity: options.quantity ?? 1,
|
|
112
113
|
}),
|
package/dist/proxy/handlers.js
CHANGED
|
@@ -80,7 +80,7 @@ function handleAiCall(store, decodeJwt, getFeatureConfig, processAiCall) {
|
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
// ---------------------------------------------------------------------------
|
|
83
|
-
// POST /charge
|
|
83
|
+
// POST /payments/charge
|
|
84
84
|
// ---------------------------------------------------------------------------
|
|
85
85
|
function handleCharge(store, decodeJwt, getFeatureConfig, processCharge) {
|
|
86
86
|
const authenticate = resolveAuth(store, decodeJwt);
|
package/package.json
CHANGED