@flashbacktech/flashbackclient 0.2.11 → 0.2.13
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/client.js +1 -1
- package/dist/api/index.d.ts +0 -5
- package/dist/api/index.js +0 -21
- package/package.json +2 -2
package/dist/api/client.js
CHANGED
|
@@ -167,7 +167,7 @@ class ApiClient {
|
|
|
167
167
|
return this.makeRequest('bucket', 'POST', data);
|
|
168
168
|
};
|
|
169
169
|
this.getStorageBuckets = async (workspaceId) => {
|
|
170
|
-
return this.makeRequest('bucket?', 'GET', null);
|
|
170
|
+
return this.makeRequest('bucket?workspaceId=' + workspaceId, 'GET', null);
|
|
171
171
|
};
|
|
172
172
|
this.validateStorageBucket = async (bucketId, data) => {
|
|
173
173
|
return this.makeRequest(`bucket/${bucketId}/validate`, 'POST', data);
|
package/dist/api/index.d.ts
CHANGED
|
@@ -16,9 +16,4 @@ import * as OrganizationTypes from './types/organization';
|
|
|
16
16
|
import * as NodeRegistrationTypes from './types/noderegistration';
|
|
17
17
|
import * as SystemEventTypes from './types/systemEvent';
|
|
18
18
|
import * as UserTypes from './types/user';
|
|
19
|
-
/**
|
|
20
|
-
* Generates an OpenAI-compatible API key/secret pair
|
|
21
|
-
* @returns Object containing apiKey and secretKey
|
|
22
|
-
*/
|
|
23
|
-
export declare function generateOpenAICompatibleKey(): string;
|
|
24
19
|
export { ApiClient, ApiTypes, AuthTypes, StatsTypes, ApiInterfaces, HttpError, BridgeTypes, EmailTypes, QuotaTypes, SubscriptionTypes, DeviceTypes, MFATypes, SettingsTypes, RolesTypes, WorkspaceTypes, OrganizationTypes, NodeRegistrationTypes, SystemEventTypes, UserTypes };
|
package/dist/api/index.js
CHANGED
|
@@ -34,7 +34,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.UserTypes = exports.SystemEventTypes = exports.NodeRegistrationTypes = exports.OrganizationTypes = exports.WorkspaceTypes = exports.RolesTypes = exports.SettingsTypes = exports.MFATypes = exports.DeviceTypes = exports.SubscriptionTypes = exports.QuotaTypes = exports.EmailTypes = exports.BridgeTypes = exports.HttpError = exports.ApiInterfaces = exports.StatsTypes = exports.AuthTypes = exports.ApiTypes = exports.ApiClient = void 0;
|
|
37
|
-
exports.generateOpenAICompatibleKey = generateOpenAICompatibleKey;
|
|
38
37
|
const client_1 = require("./client");
|
|
39
38
|
Object.defineProperty(exports, "ApiClient", { enumerable: true, get: function () { return client_1.ApiClient; } });
|
|
40
39
|
Object.defineProperty(exports, "HttpError", { enumerable: true, get: function () { return client_1.HttpError; } });
|
|
@@ -72,23 +71,3 @@ const SystemEventTypes = __importStar(require("./types/systemEvent"));
|
|
|
72
71
|
exports.SystemEventTypes = SystemEventTypes;
|
|
73
72
|
const UserTypes = __importStar(require("./types/user"));
|
|
74
73
|
exports.UserTypes = UserTypes;
|
|
75
|
-
const crypto = __importStar(require("crypto"));
|
|
76
|
-
/**
|
|
77
|
-
* Generates an OpenAI-compatible API key/secret pair
|
|
78
|
-
* @returns Object containing apiKey and secretKey
|
|
79
|
-
*/
|
|
80
|
-
function generateOpenAICompatibleKey() {
|
|
81
|
-
// Generate a random 32-byte key for the secret
|
|
82
|
-
const secretKey = crypto.randomBytes(32).toString('hex');
|
|
83
|
-
// Generate OpenAI-style API key (sk- prefix + 48 random characters)
|
|
84
|
-
const randomPart = crypto.randomBytes(24).toString('base64').replace(/[+/=]/g, (char) => {
|
|
85
|
-
switch (char) {
|
|
86
|
-
case '+': return 'A';
|
|
87
|
-
case '/': return 'B';
|
|
88
|
-
case '=': return 'C';
|
|
89
|
-
default: return char;
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
const apiKey = `sk-${randomPart}`;
|
|
93
|
-
return apiKey;
|
|
94
|
-
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flashbacktech/flashbackclient",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.13",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@aws-sdk/client-sts": "^3.777.0",
|
|
28
28
|
"@google-cloud/storage": "^7.15.0",
|
|
29
|
-
"@stellar/stellar-sdk": "^14.
|
|
29
|
+
"@stellar/stellar-sdk": "^14.0.0",
|
|
30
30
|
"formdata-node": "^6.0.3",
|
|
31
31
|
"google-auth-library": "^9.15.1",
|
|
32
32
|
"openai": "^6.6.0"
|