@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.mjs
CHANGED
|
@@ -813,13 +813,11 @@ var createClient = (config = {}) => {
|
|
|
813
813
|
};
|
|
814
814
|
};
|
|
815
815
|
|
|
816
|
-
// src/
|
|
817
|
-
var
|
|
818
|
-
|
|
819
|
-
);
|
|
816
|
+
// src/version.ts
|
|
817
|
+
var SDK_VERSION = "0.1.5";
|
|
818
|
+
var DEFAULT_API_VERSION = "2026-02-25";
|
|
820
819
|
|
|
821
820
|
// src/base-client.ts
|
|
822
|
-
var DEFAULT_API_VERSION = "2025-12-03";
|
|
823
821
|
function isSecureUrl(url) {
|
|
824
822
|
try {
|
|
825
823
|
const parsed = new URL(url);
|
|
@@ -833,8 +831,6 @@ function isSecureUrl(url) {
|
|
|
833
831
|
}
|
|
834
832
|
var BaseClient = class {
|
|
835
833
|
constructor(config = {}) {
|
|
836
|
-
/** The underlying HTTP client instance, exposed for namespace factories */
|
|
837
|
-
this.clientInstance = client;
|
|
838
834
|
this.config = config;
|
|
839
835
|
this.apiVersion = config.apiVersion ?? DEFAULT_API_VERSION;
|
|
840
836
|
if (config.baseUrl && !isSecureUrl(config.baseUrl)) {
|
|
@@ -842,10 +838,10 @@ var BaseClient = class {
|
|
|
842
838
|
"[GPT Core SDK] Warning: Using non-HTTPS URL. Credentials may be transmitted insecurely. Use HTTPS in production environments."
|
|
843
839
|
);
|
|
844
840
|
}
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
841
|
+
const clientConfig = {};
|
|
842
|
+
if (config.baseUrl) clientConfig["baseUrl"] = config.baseUrl;
|
|
843
|
+
this.clientInstance = createClient(createConfig(clientConfig));
|
|
844
|
+
this.clientInstance.interceptors.request.use((req) => {
|
|
849
845
|
const requestUrl = req.url || config.baseUrl || "";
|
|
850
846
|
if ((config.apiKey || config.token) && !isSecureUrl(requestUrl)) {
|
|
851
847
|
console.warn(
|
|
@@ -1327,6 +1323,11 @@ var RequestBuilder = class {
|
|
|
1327
1323
|
}
|
|
1328
1324
|
};
|
|
1329
1325
|
|
|
1326
|
+
// src/_internal/client.gen.ts
|
|
1327
|
+
var client = createClient(
|
|
1328
|
+
createConfig({ baseUrl: "http://localhost:33333" })
|
|
1329
|
+
);
|
|
1330
|
+
|
|
1330
1331
|
// src/_internal/sdk.gen.ts
|
|
1331
1332
|
var patchAdminAccountsByIdCredit = (options) => (options.client ?? client).patch({
|
|
1332
1333
|
security: [{ scheme: "bearer", type: "http" }],
|
|
@@ -1420,11 +1421,6 @@ var getAdminExtractionDocuments = (options) => (options.client ?? client).get({
|
|
|
1420
1421
|
url: "/admin/extraction/documents",
|
|
1421
1422
|
...options
|
|
1422
1423
|
});
|
|
1423
|
-
var getAdminBucketsByIdObjects = (options) => (options.client ?? client).get({
|
|
1424
|
-
security: [{ scheme: "bearer", type: "http" }],
|
|
1425
|
-
url: "/admin/buckets/{id}/objects",
|
|
1426
|
-
...options
|
|
1427
|
-
});
|
|
1428
1424
|
var postAdminDocumentsBulkDelete = (options) => (options.client ?? client).post({
|
|
1429
1425
|
security: [{ scheme: "bearer", type: "http" }],
|
|
1430
1426
|
url: "/admin/documents/bulk-delete",
|
|
@@ -1661,13 +1657,6 @@ function createStorageNamespace(rb) {
|
|
|
1661
1657
|
{ path: { id } },
|
|
1662
1658
|
options
|
|
1663
1659
|
);
|
|
1664
|
-
},
|
|
1665
|
-
objects: async (id, options) => {
|
|
1666
|
-
return rb.execute(
|
|
1667
|
-
getAdminBucketsByIdObjects,
|
|
1668
|
-
{ path: { id } },
|
|
1669
|
-
options
|
|
1670
|
-
);
|
|
1671
1660
|
}
|
|
1672
1661
|
}
|
|
1673
1662
|
};
|
|
@@ -1788,6 +1777,7 @@ export {
|
|
|
1788
1777
|
NetworkError,
|
|
1789
1778
|
NotFoundError,
|
|
1790
1779
|
RateLimitError,
|
|
1780
|
+
SDK_VERSION,
|
|
1791
1781
|
ServerError,
|
|
1792
1782
|
TimeoutError,
|
|
1793
1783
|
ValidationError,
|