@gpt-platform/admin 0.1.4 → 0.2.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.
- package/dist/index.d.mts +3373 -1639
- package/dist/index.d.ts +3373 -1639
- package/dist/index.js +14 -23
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -23
- package/dist/index.mjs.map +1 -1
- package/llms.txt +25 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __export(index_exports, {
|
|
|
28
28
|
NetworkError: () => NetworkError,
|
|
29
29
|
NotFoundError: () => NotFoundError,
|
|
30
30
|
RateLimitError: () => RateLimitError,
|
|
31
|
+
SDK_VERSION: () => SDK_VERSION,
|
|
31
32
|
ServerError: () => ServerError,
|
|
32
33
|
TimeoutError: () => TimeoutError,
|
|
33
34
|
ValidationError: () => ValidationError,
|
|
@@ -851,13 +852,11 @@ var createClient = (config = {}) => {
|
|
|
851
852
|
};
|
|
852
853
|
};
|
|
853
854
|
|
|
854
|
-
// src/
|
|
855
|
-
var
|
|
856
|
-
|
|
857
|
-
);
|
|
855
|
+
// src/version.ts
|
|
856
|
+
var SDK_VERSION = "0.1.5";
|
|
857
|
+
var DEFAULT_API_VERSION = "2026-02-25";
|
|
858
858
|
|
|
859
859
|
// src/base-client.ts
|
|
860
|
-
var DEFAULT_API_VERSION = "2025-12-03";
|
|
861
860
|
function isSecureUrl(url) {
|
|
862
861
|
try {
|
|
863
862
|
const parsed = new URL(url);
|
|
@@ -871,8 +870,6 @@ function isSecureUrl(url) {
|
|
|
871
870
|
}
|
|
872
871
|
var BaseClient = class {
|
|
873
872
|
constructor(config = {}) {
|
|
874
|
-
/** The underlying HTTP client instance, exposed for namespace factories */
|
|
875
|
-
this.clientInstance = client;
|
|
876
873
|
this.config = config;
|
|
877
874
|
this.apiVersion = config.apiVersion ?? DEFAULT_API_VERSION;
|
|
878
875
|
if (config.baseUrl && !isSecureUrl(config.baseUrl)) {
|
|
@@ -880,10 +877,10 @@ var BaseClient = class {
|
|
|
880
877
|
"[GPT Core SDK] Warning: Using non-HTTPS URL. Credentials may be transmitted insecurely. Use HTTPS in production environments."
|
|
881
878
|
);
|
|
882
879
|
}
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
880
|
+
const clientConfig = {};
|
|
881
|
+
if (config.baseUrl) clientConfig["baseUrl"] = config.baseUrl;
|
|
882
|
+
this.clientInstance = createClient(createConfig(clientConfig));
|
|
883
|
+
this.clientInstance.interceptors.request.use((req) => {
|
|
887
884
|
const requestUrl = req.url || config.baseUrl || "";
|
|
888
885
|
if ((config.apiKey || config.token) && !isSecureUrl(requestUrl)) {
|
|
889
886
|
console.warn(
|
|
@@ -1365,6 +1362,11 @@ var RequestBuilder = class {
|
|
|
1365
1362
|
}
|
|
1366
1363
|
};
|
|
1367
1364
|
|
|
1365
|
+
// src/_internal/client.gen.ts
|
|
1366
|
+
var client = createClient(
|
|
1367
|
+
createConfig({ baseUrl: "http://localhost:33333" })
|
|
1368
|
+
);
|
|
1369
|
+
|
|
1368
1370
|
// src/_internal/sdk.gen.ts
|
|
1369
1371
|
var patchAdminAccountsByIdCredit = (options) => (options.client ?? client).patch({
|
|
1370
1372
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -1458,11 +1460,6 @@ var getAdminExtractionDocuments = (options) => (options.client ?? client).get({
|
|
|
1458
1460
|
url: "/admin/extraction/documents",
|
|
1459
1461
|
...options
|
|
1460
1462
|
});
|
|
1461
|
-
var getAdminBucketsByIdObjects = (options) => (options.client ?? client).get({
|
|
1462
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1463
|
-
url: "/admin/buckets/{id}/objects",
|
|
1464
|
-
...options
|
|
1465
|
-
});
|
|
1466
1463
|
var postAdminDocumentsBulkDelete = (options) => (options.client ?? client).post({
|
|
1467
1464
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1468
1465
|
url: "/admin/documents/bulk-delete",
|
|
@@ -1699,13 +1696,6 @@ function createStorageNamespace(rb) {
|
|
|
1699
1696
|
{ path: { id } },
|
|
1700
1697
|
options
|
|
1701
1698
|
);
|
|
1702
|
-
},
|
|
1703
|
-
objects: async (id, options) => {
|
|
1704
|
-
return rb.execute(
|
|
1705
|
-
getAdminBucketsByIdObjects,
|
|
1706
|
-
{ path: { id } },
|
|
1707
|
-
options
|
|
1708
|
-
);
|
|
1709
1699
|
}
|
|
1710
1700
|
}
|
|
1711
1701
|
};
|
|
@@ -1827,6 +1817,7 @@ var index_default = GptAdmin;
|
|
|
1827
1817
|
NetworkError,
|
|
1828
1818
|
NotFoundError,
|
|
1829
1819
|
RateLimitError,
|
|
1820
|
+
SDK_VERSION,
|
|
1830
1821
|
ServerError,
|
|
1831
1822
|
TimeoutError,
|
|
1832
1823
|
ValidationError,
|