cencori 1.7.4 → 1.8.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/README.md +1 -1
- package/dist/catalog/index.d.mts +113 -0
- package/dist/catalog/index.d.ts +113 -0
- package/dist/catalog/index.js +73 -0
- package/dist/catalog/index.js.map +1 -0
- package/dist/catalog/index.mjs +45 -0
- package/dist/catalog/index.mjs.map +1 -0
- package/dist/index.d.mts +51 -1
- package/dist/index.d.ts +51 -1
- package/dist/index.js +78 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -1
package/README.md
CHANGED
|
@@ -320,7 +320,7 @@ export default function Chat() {
|
|
|
320
320
|
## Links
|
|
321
321
|
|
|
322
322
|
- [Documentation](https://cencori.com/docs)
|
|
323
|
-
- [Dashboard](https://cencori.com/
|
|
323
|
+
- [Dashboard](https://console.cencori.com/home)
|
|
324
324
|
- [GitHub](https://github.com/cencori/cencori)
|
|
325
325
|
|
|
326
326
|
## License
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public catalog — models and providers.
|
|
3
|
+
*
|
|
4
|
+
* Keyless helpers over the public endpoints (`GET /api/models`,
|
|
5
|
+
* `GET /api/providers`, `GET /api/providers/:id/logo`). No `Cencori` client
|
|
6
|
+
* or API key needed, so these are safe to call from a browser bundle when
|
|
7
|
+
* embedding Cencori's model/provider shelf (with logos) inside your product.
|
|
8
|
+
*
|
|
9
|
+
* This is the *marketing* catalog: static display pricing, no per-project
|
|
10
|
+
* availability. Authenticated callers needing per-key availability, DB-backed
|
|
11
|
+
* pricing and BYOK/custom rows should use `cencori.models.list()` instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { listCatalogModels, listCatalogProviders, providerLogoUrl } from 'cencori';
|
|
16
|
+
*
|
|
17
|
+
* const { data: models } = await listCatalogModels({ provider: 'openai' });
|
|
18
|
+
* const { data: providers } = await listCatalogProviders();
|
|
19
|
+
* const logo = providerLogoUrl('openai'); // https://cencori.com/api/providers/openai/logo
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const DEFAULT_CATALOG_BASE_URL = "https://cencori.com";
|
|
23
|
+
interface CatalogModelPricing {
|
|
24
|
+
input_per_million: number | null;
|
|
25
|
+
output_per_million: number | null;
|
|
26
|
+
currency: 'USD';
|
|
27
|
+
input_display: string;
|
|
28
|
+
output_display: string;
|
|
29
|
+
per_image: boolean;
|
|
30
|
+
per_image_usd: number | null;
|
|
31
|
+
}
|
|
32
|
+
interface CatalogModel {
|
|
33
|
+
id: string;
|
|
34
|
+
object: 'model';
|
|
35
|
+
name: string;
|
|
36
|
+
provider: string;
|
|
37
|
+
provider_name: string;
|
|
38
|
+
/** Absolute logo URL — safe to use as an <img> src directly. */
|
|
39
|
+
provider_logo_url: string;
|
|
40
|
+
owned_by: string;
|
|
41
|
+
type: string;
|
|
42
|
+
types: string[];
|
|
43
|
+
context_window: number;
|
|
44
|
+
context_display: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
capabilities?: Record<string, boolean>;
|
|
47
|
+
pricing: CatalogModelPricing;
|
|
48
|
+
added_at: string | null;
|
|
49
|
+
created: number;
|
|
50
|
+
}
|
|
51
|
+
interface CatalogProvider {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
/** Relative static icon path (may not exist for every vendor). */
|
|
55
|
+
icon: string;
|
|
56
|
+
/** Absolute icon URL. Falls back to `logo_url` when no static file exists. */
|
|
57
|
+
icon_url: string;
|
|
58
|
+
/** Absolute logo URL — always returns an SVG. Prefer this for embedding. */
|
|
59
|
+
logo_url: string;
|
|
60
|
+
website: string;
|
|
61
|
+
docs_url: string;
|
|
62
|
+
model_count: number;
|
|
63
|
+
}
|
|
64
|
+
interface CatalogModelsResponse {
|
|
65
|
+
object: 'list';
|
|
66
|
+
data: CatalogModel[];
|
|
67
|
+
providers: CatalogProvider[];
|
|
68
|
+
total: number;
|
|
69
|
+
distinct_model_ids: number;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
}
|
|
72
|
+
interface CatalogProvidersResponse {
|
|
73
|
+
object: 'list';
|
|
74
|
+
data: CatalogProvider[];
|
|
75
|
+
total: number;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
}
|
|
78
|
+
interface CatalogModelFilters {
|
|
79
|
+
/** Provider id, e.g. 'openai' (case-insensitive). */
|
|
80
|
+
provider?: string;
|
|
81
|
+
/** Model type: chat, reasoning, code, search, vision, image. */
|
|
82
|
+
type?: string;
|
|
83
|
+
/** Substring match on name, id, provider, description. */
|
|
84
|
+
search?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Capability filter — a model must carry every one listed:
|
|
87
|
+
* reasoning, vision, code, search, image, tools, structuredOutput,
|
|
88
|
+
* fileInput, videoInput, audioInput, caching.
|
|
89
|
+
*/
|
|
90
|
+
capability?: string | string[];
|
|
91
|
+
}
|
|
92
|
+
interface CatalogRequestOptions {
|
|
93
|
+
/** Catalog host (default: https://cencori.com). */
|
|
94
|
+
baseUrl?: string;
|
|
95
|
+
signal?: AbortSignal;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* List the public model catalog — the same data rendered on
|
|
99
|
+
* https://cencori.com/ai-gateway/models. No API key required.
|
|
100
|
+
*/
|
|
101
|
+
declare function listCatalogModels(filters?: CatalogModelFilters, options?: CatalogRequestOptions): Promise<CatalogModelsResponse>;
|
|
102
|
+
/** List providers with logo URLs and model counts. No API key required. */
|
|
103
|
+
declare function listCatalogProviders(options?: CatalogRequestOptions): Promise<CatalogProvidersResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Absolute URL of a provider's logo (SVG). Always resolves for known
|
|
106
|
+
* providers — serve it straight into an `<img>` tag. No fetch needed.
|
|
107
|
+
*
|
|
108
|
+
* NOTE: several brand marks are white (OpenAI, Anthropic) — render them on
|
|
109
|
+
* a dark chip.
|
|
110
|
+
*/
|
|
111
|
+
declare function providerLogoUrl(providerId: string, baseUrl?: string): string;
|
|
112
|
+
|
|
113
|
+
export { type CatalogModel, type CatalogModelFilters, type CatalogModelPricing, type CatalogModelsResponse, type CatalogProvider, type CatalogProvidersResponse, type CatalogRequestOptions, DEFAULT_CATALOG_BASE_URL, listCatalogModels, listCatalogProviders, providerLogoUrl };
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public catalog — models and providers.
|
|
3
|
+
*
|
|
4
|
+
* Keyless helpers over the public endpoints (`GET /api/models`,
|
|
5
|
+
* `GET /api/providers`, `GET /api/providers/:id/logo`). No `Cencori` client
|
|
6
|
+
* or API key needed, so these are safe to call from a browser bundle when
|
|
7
|
+
* embedding Cencori's model/provider shelf (with logos) inside your product.
|
|
8
|
+
*
|
|
9
|
+
* This is the *marketing* catalog: static display pricing, no per-project
|
|
10
|
+
* availability. Authenticated callers needing per-key availability, DB-backed
|
|
11
|
+
* pricing and BYOK/custom rows should use `cencori.models.list()` instead.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```typescript
|
|
15
|
+
* import { listCatalogModels, listCatalogProviders, providerLogoUrl } from 'cencori';
|
|
16
|
+
*
|
|
17
|
+
* const { data: models } = await listCatalogModels({ provider: 'openai' });
|
|
18
|
+
* const { data: providers } = await listCatalogProviders();
|
|
19
|
+
* const logo = providerLogoUrl('openai'); // https://cencori.com/api/providers/openai/logo
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
declare const DEFAULT_CATALOG_BASE_URL = "https://cencori.com";
|
|
23
|
+
interface CatalogModelPricing {
|
|
24
|
+
input_per_million: number | null;
|
|
25
|
+
output_per_million: number | null;
|
|
26
|
+
currency: 'USD';
|
|
27
|
+
input_display: string;
|
|
28
|
+
output_display: string;
|
|
29
|
+
per_image: boolean;
|
|
30
|
+
per_image_usd: number | null;
|
|
31
|
+
}
|
|
32
|
+
interface CatalogModel {
|
|
33
|
+
id: string;
|
|
34
|
+
object: 'model';
|
|
35
|
+
name: string;
|
|
36
|
+
provider: string;
|
|
37
|
+
provider_name: string;
|
|
38
|
+
/** Absolute logo URL — safe to use as an <img> src directly. */
|
|
39
|
+
provider_logo_url: string;
|
|
40
|
+
owned_by: string;
|
|
41
|
+
type: string;
|
|
42
|
+
types: string[];
|
|
43
|
+
context_window: number;
|
|
44
|
+
context_display: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
capabilities?: Record<string, boolean>;
|
|
47
|
+
pricing: CatalogModelPricing;
|
|
48
|
+
added_at: string | null;
|
|
49
|
+
created: number;
|
|
50
|
+
}
|
|
51
|
+
interface CatalogProvider {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
/** Relative static icon path (may not exist for every vendor). */
|
|
55
|
+
icon: string;
|
|
56
|
+
/** Absolute icon URL. Falls back to `logo_url` when no static file exists. */
|
|
57
|
+
icon_url: string;
|
|
58
|
+
/** Absolute logo URL — always returns an SVG. Prefer this for embedding. */
|
|
59
|
+
logo_url: string;
|
|
60
|
+
website: string;
|
|
61
|
+
docs_url: string;
|
|
62
|
+
model_count: number;
|
|
63
|
+
}
|
|
64
|
+
interface CatalogModelsResponse {
|
|
65
|
+
object: 'list';
|
|
66
|
+
data: CatalogModel[];
|
|
67
|
+
providers: CatalogProvider[];
|
|
68
|
+
total: number;
|
|
69
|
+
distinct_model_ids: number;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
}
|
|
72
|
+
interface CatalogProvidersResponse {
|
|
73
|
+
object: 'list';
|
|
74
|
+
data: CatalogProvider[];
|
|
75
|
+
total: number;
|
|
76
|
+
updated_at: string;
|
|
77
|
+
}
|
|
78
|
+
interface CatalogModelFilters {
|
|
79
|
+
/** Provider id, e.g. 'openai' (case-insensitive). */
|
|
80
|
+
provider?: string;
|
|
81
|
+
/** Model type: chat, reasoning, code, search, vision, image. */
|
|
82
|
+
type?: string;
|
|
83
|
+
/** Substring match on name, id, provider, description. */
|
|
84
|
+
search?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Capability filter — a model must carry every one listed:
|
|
87
|
+
* reasoning, vision, code, search, image, tools, structuredOutput,
|
|
88
|
+
* fileInput, videoInput, audioInput, caching.
|
|
89
|
+
*/
|
|
90
|
+
capability?: string | string[];
|
|
91
|
+
}
|
|
92
|
+
interface CatalogRequestOptions {
|
|
93
|
+
/** Catalog host (default: https://cencori.com). */
|
|
94
|
+
baseUrl?: string;
|
|
95
|
+
signal?: AbortSignal;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* List the public model catalog — the same data rendered on
|
|
99
|
+
* https://cencori.com/ai-gateway/models. No API key required.
|
|
100
|
+
*/
|
|
101
|
+
declare function listCatalogModels(filters?: CatalogModelFilters, options?: CatalogRequestOptions): Promise<CatalogModelsResponse>;
|
|
102
|
+
/** List providers with logo URLs and model counts. No API key required. */
|
|
103
|
+
declare function listCatalogProviders(options?: CatalogRequestOptions): Promise<CatalogProvidersResponse>;
|
|
104
|
+
/**
|
|
105
|
+
* Absolute URL of a provider's logo (SVG). Always resolves for known
|
|
106
|
+
* providers — serve it straight into an `<img>` tag. No fetch needed.
|
|
107
|
+
*
|
|
108
|
+
* NOTE: several brand marks are white (OpenAI, Anthropic) — render them on
|
|
109
|
+
* a dark chip.
|
|
110
|
+
*/
|
|
111
|
+
declare function providerLogoUrl(providerId: string, baseUrl?: string): string;
|
|
112
|
+
|
|
113
|
+
export { type CatalogModel, type CatalogModelFilters, type CatalogModelPricing, type CatalogModelsResponse, type CatalogProvider, type CatalogProvidersResponse, type CatalogRequestOptions, DEFAULT_CATALOG_BASE_URL, listCatalogModels, listCatalogProviders, providerLogoUrl };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/catalog/index.ts
|
|
21
|
+
var catalog_exports = {};
|
|
22
|
+
__export(catalog_exports, {
|
|
23
|
+
DEFAULT_CATALOG_BASE_URL: () => DEFAULT_CATALOG_BASE_URL,
|
|
24
|
+
listCatalogModels: () => listCatalogModels,
|
|
25
|
+
listCatalogProviders: () => listCatalogProviders,
|
|
26
|
+
providerLogoUrl: () => providerLogoUrl
|
|
27
|
+
});
|
|
28
|
+
module.exports = __toCommonJS(catalog_exports);
|
|
29
|
+
var DEFAULT_CATALOG_BASE_URL = "https://cencori.com";
|
|
30
|
+
function baseUrlOf(options) {
|
|
31
|
+
return (options?.baseUrl ?? DEFAULT_CATALOG_BASE_URL).replace(/\/$/, "");
|
|
32
|
+
}
|
|
33
|
+
function modelQuery(filters) {
|
|
34
|
+
const search = new URLSearchParams();
|
|
35
|
+
if (filters?.provider) search.set("provider", filters.provider);
|
|
36
|
+
if (filters?.type) search.set("type", filters.type);
|
|
37
|
+
if (filters?.search) search.set("search", filters.search);
|
|
38
|
+
const caps = filters?.capability ? Array.isArray(filters.capability) ? filters.capability : [filters.capability] : [];
|
|
39
|
+
for (const cap of caps) search.append("capability", cap);
|
|
40
|
+
const s = search.toString();
|
|
41
|
+
return s ? `?${s}` : "";
|
|
42
|
+
}
|
|
43
|
+
async function getJson(url, signal) {
|
|
44
|
+
const response = await fetch(url, { signal });
|
|
45
|
+
if (!response.ok) {
|
|
46
|
+
const body = await response.text().catch(() => "");
|
|
47
|
+
throw new Error(`Catalog request failed (${response.status} ${url})${body ? `: ${body.slice(0, 200)}` : ""}`);
|
|
48
|
+
}
|
|
49
|
+
return response.json();
|
|
50
|
+
}
|
|
51
|
+
function listCatalogModels(filters, options) {
|
|
52
|
+
return getJson(
|
|
53
|
+
`${baseUrlOf(options)}/api/models${modelQuery(filters)}`,
|
|
54
|
+
options?.signal
|
|
55
|
+
);
|
|
56
|
+
}
|
|
57
|
+
function listCatalogProviders(options) {
|
|
58
|
+
return getJson(
|
|
59
|
+
`${baseUrlOf(options)}/api/providers`,
|
|
60
|
+
options?.signal
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
function providerLogoUrl(providerId, baseUrl = DEFAULT_CATALOG_BASE_URL) {
|
|
64
|
+
return `${baseUrl.replace(/\/$/, "")}/api/providers/${encodeURIComponent(providerId)}/logo`;
|
|
65
|
+
}
|
|
66
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
67
|
+
0 && (module.exports = {
|
|
68
|
+
DEFAULT_CATALOG_BASE_URL,
|
|
69
|
+
listCatalogModels,
|
|
70
|
+
listCatalogProviders,
|
|
71
|
+
providerLogoUrl
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/catalog/index.ts"],"sourcesContent":["/**\n * Public catalog — models and providers.\n *\n * Keyless helpers over the public endpoints (`GET /api/models`,\n * `GET /api/providers`, `GET /api/providers/:id/logo`). No `Cencori` client\n * or API key needed, so these are safe to call from a browser bundle when\n * embedding Cencori's model/provider shelf (with logos) inside your product.\n *\n * This is the *marketing* catalog: static display pricing, no per-project\n * availability. Authenticated callers needing per-key availability, DB-backed\n * pricing and BYOK/custom rows should use `cencori.models.list()` instead.\n *\n * @example\n * ```typescript\n * import { listCatalogModels, listCatalogProviders, providerLogoUrl } from 'cencori';\n *\n * const { data: models } = await listCatalogModels({ provider: 'openai' });\n * const { data: providers } = await listCatalogProviders();\n * const logo = providerLogoUrl('openai'); // https://cencori.com/api/providers/openai/logo\n * ```\n */\n\nexport const DEFAULT_CATALOG_BASE_URL = 'https://cencori.com';\n\nexport interface CatalogModelPricing {\n input_per_million: number | null;\n output_per_million: number | null;\n currency: 'USD';\n input_display: string;\n output_display: string;\n per_image: boolean;\n per_image_usd: number | null;\n}\n\nexport interface CatalogModel {\n id: string;\n object: 'model';\n name: string;\n provider: string;\n provider_name: string;\n /** Absolute logo URL — safe to use as an <img> src directly. */\n provider_logo_url: string;\n owned_by: string;\n type: string;\n types: string[];\n context_window: number;\n context_display: string;\n description?: string;\n capabilities?: Record<string, boolean>;\n pricing: CatalogModelPricing;\n added_at: string | null;\n created: number;\n}\n\nexport interface CatalogProvider {\n id: string;\n name: string;\n /** Relative static icon path (may not exist for every vendor). */\n icon: string;\n /** Absolute icon URL. Falls back to `logo_url` when no static file exists. */\n icon_url: string;\n /** Absolute logo URL — always returns an SVG. Prefer this for embedding. */\n logo_url: string;\n website: string;\n docs_url: string;\n model_count: number;\n}\n\nexport interface CatalogModelsResponse {\n object: 'list';\n data: CatalogModel[];\n providers: CatalogProvider[];\n total: number;\n distinct_model_ids: number;\n updated_at: string;\n}\n\nexport interface CatalogProvidersResponse {\n object: 'list';\n data: CatalogProvider[];\n total: number;\n updated_at: string;\n}\n\nexport interface CatalogModelFilters {\n /** Provider id, e.g. 'openai' (case-insensitive). */\n provider?: string;\n /** Model type: chat, reasoning, code, search, vision, image. */\n type?: string;\n /** Substring match on name, id, provider, description. */\n search?: string;\n /**\n * Capability filter — a model must carry every one listed:\n * reasoning, vision, code, search, image, tools, structuredOutput,\n * fileInput, videoInput, audioInput, caching.\n */\n capability?: string | string[];\n}\n\nexport interface CatalogRequestOptions {\n /** Catalog host (default: https://cencori.com). */\n baseUrl?: string;\n signal?: AbortSignal;\n}\n\nfunction baseUrlOf(options?: CatalogRequestOptions): string {\n return (options?.baseUrl ?? DEFAULT_CATALOG_BASE_URL).replace(/\\/$/, '');\n}\n\nfunction modelQuery(filters?: CatalogModelFilters): string {\n const search = new URLSearchParams();\n if (filters?.provider) search.set('provider', filters.provider);\n if (filters?.type) search.set('type', filters.type);\n if (filters?.search) search.set('search', filters.search);\n const caps = filters?.capability\n ? (Array.isArray(filters.capability) ? filters.capability : [filters.capability])\n : [];\n for (const cap of caps) search.append('capability', cap);\n const s = search.toString();\n return s ? `?${s}` : '';\n}\n\nasync function getJson<T>(url: string, signal?: AbortSignal): Promise<T> {\n const response = await fetch(url, { signal });\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n throw new Error(`Catalog request failed (${response.status} ${url})${body ? `: ${body.slice(0, 200)}` : ''}`);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * List the public model catalog — the same data rendered on\n * https://cencori.com/ai-gateway/models. No API key required.\n */\nexport function listCatalogModels(\n filters?: CatalogModelFilters,\n options?: CatalogRequestOptions,\n): Promise<CatalogModelsResponse> {\n return getJson<CatalogModelsResponse>(\n `${baseUrlOf(options)}/api/models${modelQuery(filters)}`,\n options?.signal,\n );\n}\n\n/** List providers with logo URLs and model counts. No API key required. */\nexport function listCatalogProviders(\n options?: CatalogRequestOptions,\n): Promise<CatalogProvidersResponse> {\n return getJson<CatalogProvidersResponse>(\n `${baseUrlOf(options)}/api/providers`,\n options?.signal,\n );\n}\n\n/**\n * Absolute URL of a provider's logo (SVG). Always resolves for known\n * providers — serve it straight into an `<img>` tag. No fetch needed.\n *\n * NOTE: several brand marks are white (OpenAI, Anthropic) — render them on\n * a dark chip.\n */\nexport function providerLogoUrl(providerId: string, baseUrl: string = DEFAULT_CATALOG_BASE_URL): string {\n return `${baseUrl.replace(/\\/$/, '')}/api/providers/${encodeURIComponent(providerId)}/logo`;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBO,IAAM,2BAA2B;AAmFxC,SAAS,UAAU,SAAyC;AACxD,UAAQ,SAAS,WAAW,0BAA0B,QAAQ,OAAO,EAAE;AAC3E;AAEA,SAAS,WAAW,SAAuC;AACvD,QAAM,SAAS,IAAI,gBAAgB;AACnC,MAAI,SAAS,SAAU,QAAO,IAAI,YAAY,QAAQ,QAAQ;AAC9D,MAAI,SAAS,KAAM,QAAO,IAAI,QAAQ,QAAQ,IAAI;AAClD,MAAI,SAAS,OAAQ,QAAO,IAAI,UAAU,QAAQ,MAAM;AACxD,QAAM,OAAO,SAAS,aACf,MAAM,QAAQ,QAAQ,UAAU,IAAI,QAAQ,aAAa,CAAC,QAAQ,UAAU,IAC7E,CAAC;AACP,aAAW,OAAO,KAAM,QAAO,OAAO,cAAc,GAAG;AACvD,QAAM,IAAI,OAAO,SAAS;AAC1B,SAAO,IAAI,IAAI,CAAC,KAAK;AACzB;AAEA,eAAe,QAAW,KAAa,QAAkC;AACrE,QAAM,WAAW,MAAM,MAAM,KAAK,EAAE,OAAO,CAAC;AAC5C,MAAI,CAAC,SAAS,IAAI;AACd,UAAM,OAAO,MAAM,SAAS,KAAK,EAAE,MAAM,MAAM,EAAE;AACjD,UAAM,IAAI,MAAM,2BAA2B,SAAS,MAAM,IAAI,GAAG,IAAI,OAAO,KAAK,KAAK,MAAM,GAAG,GAAG,CAAC,KAAK,EAAE,EAAE;AAAA,EAChH;AACA,SAAO,SAAS,KAAK;AACzB;AAMO,SAAS,kBACZ,SACA,SAC8B;AAC9B,SAAO;AAAA,IACH,GAAG,UAAU,OAAO,CAAC,cAAc,WAAW,OAAO,CAAC;AAAA,IACtD,SAAS;AAAA,EACb;AACJ;AAGO,SAAS,qBACZ,SACiC;AACjC,SAAO;AAAA,IACH,GAAG,UAAU,OAAO,CAAC;AAAA,IACrB,SAAS;AAAA,EACb;AACJ;AASO,SAAS,gBAAgB,YAAoB,UAAkB,0BAAkC;AACpG,SAAO,GAAG,QAAQ,QAAQ,OAAO,EAAE,CAAC,kBAAkB,mBAAmB,UAAU,CAAC;AACxF;","names":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
// src/catalog/index.ts
|
|
2
|
+
var DEFAULT_CATALOG_BASE_URL = "https://cencori.com";
|
|
3
|
+
function baseUrlOf(options) {
|
|
4
|
+
return (options?.baseUrl ?? DEFAULT_CATALOG_BASE_URL).replace(/\/$/, "");
|
|
5
|
+
}
|
|
6
|
+
function modelQuery(filters) {
|
|
7
|
+
const search = new URLSearchParams();
|
|
8
|
+
if (filters?.provider) search.set("provider", filters.provider);
|
|
9
|
+
if (filters?.type) search.set("type", filters.type);
|
|
10
|
+
if (filters?.search) search.set("search", filters.search);
|
|
11
|
+
const caps = filters?.capability ? Array.isArray(filters.capability) ? filters.capability : [filters.capability] : [];
|
|
12
|
+
for (const cap of caps) search.append("capability", cap);
|
|
13
|
+
const s = search.toString();
|
|
14
|
+
return s ? `?${s}` : "";
|
|
15
|
+
}
|
|
16
|
+
async function getJson(url, signal) {
|
|
17
|
+
const response = await fetch(url, { signal });
|
|
18
|
+
if (!response.ok) {
|
|
19
|
+
const body = await response.text().catch(() => "");
|
|
20
|
+
throw new Error(`Catalog request failed (${response.status} ${url})${body ? `: ${body.slice(0, 200)}` : ""}`);
|
|
21
|
+
}
|
|
22
|
+
return response.json();
|
|
23
|
+
}
|
|
24
|
+
function listCatalogModels(filters, options) {
|
|
25
|
+
return getJson(
|
|
26
|
+
`${baseUrlOf(options)}/api/models${modelQuery(filters)}`,
|
|
27
|
+
options?.signal
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
function listCatalogProviders(options) {
|
|
31
|
+
return getJson(
|
|
32
|
+
`${baseUrlOf(options)}/api/providers`,
|
|
33
|
+
options?.signal
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
function providerLogoUrl(providerId, baseUrl = DEFAULT_CATALOG_BASE_URL) {
|
|
37
|
+
return `${baseUrl.replace(/\/$/, "")}/api/providers/${encodeURIComponent(providerId)}/logo`;
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
DEFAULT_CATALOG_BASE_URL,
|
|
41
|
+
listCatalogModels,
|
|
42
|
+
listCatalogProviders,
|
|
43
|
+
providerLogoUrl
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/catalog/index.ts"],"sourcesContent":["/**\n * Public catalog — models and providers.\n *\n * Keyless helpers over the public endpoints (`GET /api/models`,\n * `GET /api/providers`, `GET /api/providers/:id/logo`). No `Cencori` client\n * or API key needed, so these are safe to call from a browser bundle when\n * embedding Cencori's model/provider shelf (with logos) inside your product.\n *\n * This is the *marketing* catalog: static display pricing, no per-project\n * availability. Authenticated callers needing per-key availability, DB-backed\n * pricing and BYOK/custom rows should use `cencori.models.list()` instead.\n *\n * @example\n * ```typescript\n * import { listCatalogModels, listCatalogProviders, providerLogoUrl } from 'cencori';\n *\n * const { data: models } = await listCatalogModels({ provider: 'openai' });\n * const { data: providers } = await listCatalogProviders();\n * const logo = providerLogoUrl('openai'); // https://cencori.com/api/providers/openai/logo\n * ```\n */\n\nexport const DEFAULT_CATALOG_BASE_URL = 'https://cencori.com';\n\nexport interface CatalogModelPricing {\n input_per_million: number | null;\n output_per_million: number | null;\n currency: 'USD';\n input_display: string;\n output_display: string;\n per_image: boolean;\n per_image_usd: number | null;\n}\n\nexport interface CatalogModel {\n id: string;\n object: 'model';\n name: string;\n provider: string;\n provider_name: string;\n /** Absolute logo URL — safe to use as an <img> src directly. */\n provider_logo_url: string;\n owned_by: string;\n type: string;\n types: string[];\n context_window: number;\n context_display: string;\n description?: string;\n capabilities?: Record<string, boolean>;\n pricing: CatalogModelPricing;\n added_at: string | null;\n created: number;\n}\n\nexport interface CatalogProvider {\n id: string;\n name: string;\n /** Relative static icon path (may not exist for every vendor). */\n icon: string;\n /** Absolute icon URL. Falls back to `logo_url` when no static file exists. */\n icon_url: string;\n /** Absolute logo URL — always returns an SVG. Prefer this for embedding. */\n logo_url: string;\n website: string;\n docs_url: string;\n model_count: number;\n}\n\nexport interface CatalogModelsResponse {\n object: 'list';\n data: CatalogModel[];\n providers: CatalogProvider[];\n total: number;\n distinct_model_ids: number;\n updated_at: string;\n}\n\nexport interface CatalogProvidersResponse {\n object: 'list';\n data: CatalogProvider[];\n total: number;\n updated_at: string;\n}\n\nexport interface CatalogModelFilters {\n /** Provider id, e.g. 'openai' (case-insensitive). */\n provider?: string;\n /** Model type: chat, reasoning, code, search, vision, image. */\n type?: string;\n /** Substring match on name, id, provider, description. */\n search?: string;\n /**\n * Capability filter — a model must carry every one listed:\n * reasoning, vision, code, search, image, tools, structuredOutput,\n * fileInput, videoInput, audioInput, caching.\n */\n capability?: string | string[];\n}\n\nexport interface CatalogRequestOptions {\n /** Catalog host (default: https://cencori.com). */\n baseUrl?: string;\n signal?: AbortSignal;\n}\n\nfunction baseUrlOf(options?: CatalogRequestOptions): string {\n return (options?.baseUrl ?? DEFAULT_CATALOG_BASE_URL).replace(/\\/$/, '');\n}\n\nfunction modelQuery(filters?: CatalogModelFilters): string {\n const search = new URLSearchParams();\n if (filters?.provider) search.set('provider', filters.provider);\n if (filters?.type) search.set('type', filters.type);\n if (filters?.search) search.set('search', filters.search);\n const caps = filters?.capability\n ? (Array.isArray(filters.capability) ? filters.capability : [filters.capability])\n : [];\n for (const cap of caps) search.append('capability', cap);\n const s = search.toString();\n return s ? `?${s}` : '';\n}\n\nasync function getJson<T>(url: string, signal?: AbortSignal): Promise<T> {\n const response = await fetch(url, { signal });\n if (!response.ok) {\n const body = await response.text().catch(() => '');\n throw new Error(`Catalog request failed (${response.status} ${url})${body ? `: ${body.slice(0, 200)}` : ''}`);\n }\n return response.json() as Promise<T>;\n}\n\n/**\n * List the public model catalog — the same data rendered on\n * https://cencori.com/ai-gateway/models. No API key required.\n */\nexport function listCatalogModels(\n filters?: CatalogModelFilters,\n options?: CatalogRequestOptions,\n): Promise<CatalogModelsResponse> {\n return getJson<CatalogModelsResponse>(\n `${baseUrlOf(options)}/api/models${modelQuery(filters)}`,\n options?.signal,\n );\n}\n\n/** List providers with logo URLs and model counts. No API key required. */\nexport function listCatalogProviders(\n options?: CatalogRequestOptions,\n): Promise<CatalogProvidersResponse> {\n return getJson<CatalogProvidersResponse>(\n `${baseUrlOf(options)}/api/providers`,\n options?.signal,\n );\n}\n\n/**\n * Absolute URL of a provider's logo (SVG). Always resolves for known\n * providers — serve it straight into an `<img>` tag. No fetch needed.\n *\n * NOTE: several brand marks are white (OpenAI, Anthropic) — render them on\n * a dark chip.\n */\nexport function providerLogoUrl(providerId: string, baseUrl: string = DEFAULT_CATALOG_BASE_URL): string {\n return `${baseUrl.replace(/\\/$/, '')}/api/providers/${encodeURIComponent(providerId)}/logo`;\n}\n"],"mappings":";AAsBO,IAAM,2BAA2B;AAmFxC,SAAS,UAAU,SAAyC;AACxD,UAAQ,SAAS,WAAW,0BAA0B,QAAQ,OAAO,EAAE;AAC3E;AAEA,SAAS,WAAW,SAAuC;AACvD,QAAM,SAAS,IAAI,gBAAgB;AACnC,MAAI,SAAS,SAAU,QAAO,IAAI,YAAY,QAAQ,QAAQ;AAC9D,MAAI,SAAS,KAAM,QAAO,IAAI,QAAQ,QAAQ,IAAI;AAClD,MAAI,SAAS,OAAQ,QAAO,IAAI,UAAU,QAAQ,MAAM;AACxD,QAAM,OAAO,SAAS,aACf,MAAM,QAAQ,QAAQ,UAAU,IAAI,QAAQ,aAAa,CAAC,QAAQ,UAAU,IAC7E,CAAC;AACP,aAAW,OAAO,KAAM,QAAO,OAAO,cAAc,GAAG;AACvD,QAAM,IAAI,OAAO,SAAS;AAC1B,SAAO,IAAI,IAAI,CAAC,KAAK;AACzB;AAEA,eAAe,QAAW,KAAa,QAAkC;AACrE,QAAM,WAAW,MAAM,MAAM,KAAK,EAAE,OAAO,CAAC;AAC5C,MAAI,CAAC,SAAS,IAAI;AACd,UAAM,OAAO,MAAM,SAAS,KAAK,EAAE,MAAM,MAAM,EAAE;AACjD,UAAM,IAAI,MAAM,2BAA2B,SAAS,MAAM,IAAI,GAAG,IAAI,OAAO,KAAK,KAAK,MAAM,GAAG,GAAG,CAAC,KAAK,EAAE,EAAE;AAAA,EAChH;AACA,SAAO,SAAS,KAAK;AACzB;AAMO,SAAS,kBACZ,SACA,SAC8B;AAC9B,SAAO;AAAA,IACH,GAAG,UAAU,OAAO,CAAC,cAAc,WAAW,OAAO,CAAC;AAAA,IACtD,SAAS;AAAA,EACb;AACJ;AAGO,SAAS,qBACZ,SACiC;AACjC,SAAO;AAAA,IACH,GAAG,UAAU,OAAO,CAAC;AAAA,IACrB,SAAS;AAAA,EACb;AACJ;AASO,SAAS,gBAAgB,YAAoB,UAAkB,0BAAkC;AACpG,SAAO,GAAG,QAAQ,QAAQ,OAAO,EAAE,CAAC,kBAAkB,mBAAmB,UAAU,CAAC;AACxF;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -17,6 +17,7 @@ import { TelemetryClient } from './telemetry/index.mjs';
|
|
|
17
17
|
export { WebTelemetryPayload } from './telemetry/index.mjs';
|
|
18
18
|
import { WebNamespace } from './web/index.mjs';
|
|
19
19
|
export { WEB_FETCH_TOOL, WEB_SEARCH_TOOL, WebBrowseJob, WebBrowseRequest, WebBrowserAction, WebCrawlRequest, WebCrawlResponse, WebEvidenceSpan, WebExtractResult, WebFetchRequest, WebFetchResult, WebLink, WebSearchHit, WebSearchRequest, WebSearchResponse, WebTakedownRequest, WebTakedownResponse } from './web/index.mjs';
|
|
20
|
+
export { CatalogModel, CatalogModelFilters, CatalogModelPricing, CatalogModelsResponse, CatalogProvider, CatalogProvidersResponse, CatalogRequestOptions, DEFAULT_CATALOG_BASE_URL, listCatalogModels, listCatalogProviders, providerLogoUrl } from './catalog/index.mjs';
|
|
20
21
|
export { CencoriChatSettings, CencoriProvider, CencoriProviderSettings, cencori, createCencori } from './vercel/index.mjs';
|
|
21
22
|
import '@ai-sdk/provider';
|
|
22
23
|
|
|
@@ -429,10 +430,15 @@ declare class ModelsNamespace {
|
|
|
429
430
|
available?: boolean;
|
|
430
431
|
source?: string;
|
|
431
432
|
connection_id?: string;
|
|
433
|
+
limit?: number;
|
|
434
|
+
cursor?: string;
|
|
432
435
|
}): Promise<{
|
|
433
436
|
object: string;
|
|
434
437
|
data: UnifiedModel[];
|
|
435
438
|
providers: unknown[];
|
|
439
|
+
total: number;
|
|
440
|
+
next_cursor: string | null;
|
|
441
|
+
partial: boolean;
|
|
436
442
|
}>;
|
|
437
443
|
}
|
|
438
444
|
declare class ProviderConnectionsNamespace {
|
|
@@ -525,7 +531,11 @@ declare class InstallationsNamespace {
|
|
|
525
531
|
connection_ids?: string[];
|
|
526
532
|
approval_policy?: Record<string, unknown>;
|
|
527
533
|
}): Promise<unknown>;
|
|
528
|
-
list(tenantId?: string
|
|
534
|
+
list(tenantId?: string, params?: {
|
|
535
|
+
agent_id?: string;
|
|
536
|
+
limit?: number;
|
|
537
|
+
cursor?: string;
|
|
538
|
+
}): Promise<{
|
|
529
539
|
data: unknown[];
|
|
530
540
|
next_cursor: string | null;
|
|
531
541
|
}>;
|
|
@@ -549,6 +559,13 @@ declare class RunsNamespace {
|
|
|
549
559
|
response_format?: unknown;
|
|
550
560
|
session_id?: string;
|
|
551
561
|
}, idempotencyKey?: string, options?: EmbeddedRequestOptions): Promise<unknown>;
|
|
562
|
+
history(agentId: string, params?: {
|
|
563
|
+
limit?: number;
|
|
564
|
+
cursor?: string;
|
|
565
|
+
}): Promise<{
|
|
566
|
+
data: unknown[];
|
|
567
|
+
next_cursor: string | null;
|
|
568
|
+
}>;
|
|
552
569
|
get(runId: string, options?: EmbeddedRequestOptions): Promise<unknown>;
|
|
553
570
|
events(runId: string, params?: {
|
|
554
571
|
after?: string;
|
|
@@ -777,6 +794,27 @@ declare class McpServersNamespace {
|
|
|
777
794
|
}>;
|
|
778
795
|
refreshTools(serverId: string): Promise<unknown>;
|
|
779
796
|
}
|
|
797
|
+
declare class MarketplaceNamespace {
|
|
798
|
+
private config;
|
|
799
|
+
constructor(config: Required<CencoriConfig>);
|
|
800
|
+
list(params?: {
|
|
801
|
+
limit?: number;
|
|
802
|
+
cursor?: string;
|
|
803
|
+
}): Promise<{
|
|
804
|
+
data: unknown[];
|
|
805
|
+
next_cursor: string | null;
|
|
806
|
+
}>;
|
|
807
|
+
get(versionId: string): Promise<unknown>;
|
|
808
|
+
install(params: {
|
|
809
|
+
version_id: string;
|
|
810
|
+
tenant_id: string;
|
|
811
|
+
knowledge_base_ids?: string[];
|
|
812
|
+
connection_ids?: string[];
|
|
813
|
+
approval_policy?: Record<string, unknown>;
|
|
814
|
+
budget?: Record<string, unknown>;
|
|
815
|
+
overlay_config?: Record<string, unknown>;
|
|
816
|
+
}): Promise<unknown>;
|
|
817
|
+
}
|
|
780
818
|
declare class WebhooksNamespace {
|
|
781
819
|
private config;
|
|
782
820
|
constructor(config: Required<CencoriConfig>);
|
|
@@ -809,16 +847,27 @@ declare class UsageNamespace {
|
|
|
809
847
|
constructor(config: Required<CencoriConfig>);
|
|
810
848
|
summary(params?: {
|
|
811
849
|
days?: number;
|
|
850
|
+
since?: string;
|
|
851
|
+
until?: string;
|
|
812
852
|
tenant_id?: string;
|
|
813
853
|
agent_id?: string;
|
|
854
|
+
installation_id?: string;
|
|
855
|
+
model?: string;
|
|
814
856
|
}): Promise<{
|
|
815
857
|
totals: unknown;
|
|
816
858
|
groups: unknown[];
|
|
859
|
+
truncated: boolean;
|
|
860
|
+
row_cap: number;
|
|
861
|
+
unresolved_rows: number;
|
|
817
862
|
}>;
|
|
818
863
|
events(params?: {
|
|
819
864
|
days?: number;
|
|
865
|
+
since?: string;
|
|
866
|
+
until?: string;
|
|
820
867
|
tenant_id?: string;
|
|
821
868
|
agent_id?: string;
|
|
869
|
+
installation_id?: string;
|
|
870
|
+
model?: string;
|
|
822
871
|
limit?: number;
|
|
823
872
|
cursor?: string;
|
|
824
873
|
}): Promise<{
|
|
@@ -1057,6 +1106,7 @@ declare class Cencori {
|
|
|
1057
1106
|
readonly knowledge: KnowledgeNamespace;
|
|
1058
1107
|
readonly connections: ConnectionsNamespace;
|
|
1059
1108
|
readonly mcpServers: McpServersNamespace;
|
|
1109
|
+
readonly marketplace: MarketplaceNamespace;
|
|
1060
1110
|
readonly skills: SkillsNamespace;
|
|
1061
1111
|
readonly skillImports: SkillImportsNamespace;
|
|
1062
1112
|
readonly webhooks: WebhooksNamespace;
|
package/dist/index.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import { TelemetryClient } from './telemetry/index.js';
|
|
|
17
17
|
export { WebTelemetryPayload } from './telemetry/index.js';
|
|
18
18
|
import { WebNamespace } from './web/index.js';
|
|
19
19
|
export { WEB_FETCH_TOOL, WEB_SEARCH_TOOL, WebBrowseJob, WebBrowseRequest, WebBrowserAction, WebCrawlRequest, WebCrawlResponse, WebEvidenceSpan, WebExtractResult, WebFetchRequest, WebFetchResult, WebLink, WebSearchHit, WebSearchRequest, WebSearchResponse, WebTakedownRequest, WebTakedownResponse } from './web/index.js';
|
|
20
|
+
export { CatalogModel, CatalogModelFilters, CatalogModelPricing, CatalogModelsResponse, CatalogProvider, CatalogProvidersResponse, CatalogRequestOptions, DEFAULT_CATALOG_BASE_URL, listCatalogModels, listCatalogProviders, providerLogoUrl } from './catalog/index.js';
|
|
20
21
|
export { CencoriChatSettings, CencoriProvider, CencoriProviderSettings, cencori, createCencori } from './vercel/index.js';
|
|
21
22
|
import '@ai-sdk/provider';
|
|
22
23
|
|
|
@@ -429,10 +430,15 @@ declare class ModelsNamespace {
|
|
|
429
430
|
available?: boolean;
|
|
430
431
|
source?: string;
|
|
431
432
|
connection_id?: string;
|
|
433
|
+
limit?: number;
|
|
434
|
+
cursor?: string;
|
|
432
435
|
}): Promise<{
|
|
433
436
|
object: string;
|
|
434
437
|
data: UnifiedModel[];
|
|
435
438
|
providers: unknown[];
|
|
439
|
+
total: number;
|
|
440
|
+
next_cursor: string | null;
|
|
441
|
+
partial: boolean;
|
|
436
442
|
}>;
|
|
437
443
|
}
|
|
438
444
|
declare class ProviderConnectionsNamespace {
|
|
@@ -525,7 +531,11 @@ declare class InstallationsNamespace {
|
|
|
525
531
|
connection_ids?: string[];
|
|
526
532
|
approval_policy?: Record<string, unknown>;
|
|
527
533
|
}): Promise<unknown>;
|
|
528
|
-
list(tenantId?: string
|
|
534
|
+
list(tenantId?: string, params?: {
|
|
535
|
+
agent_id?: string;
|
|
536
|
+
limit?: number;
|
|
537
|
+
cursor?: string;
|
|
538
|
+
}): Promise<{
|
|
529
539
|
data: unknown[];
|
|
530
540
|
next_cursor: string | null;
|
|
531
541
|
}>;
|
|
@@ -549,6 +559,13 @@ declare class RunsNamespace {
|
|
|
549
559
|
response_format?: unknown;
|
|
550
560
|
session_id?: string;
|
|
551
561
|
}, idempotencyKey?: string, options?: EmbeddedRequestOptions): Promise<unknown>;
|
|
562
|
+
history(agentId: string, params?: {
|
|
563
|
+
limit?: number;
|
|
564
|
+
cursor?: string;
|
|
565
|
+
}): Promise<{
|
|
566
|
+
data: unknown[];
|
|
567
|
+
next_cursor: string | null;
|
|
568
|
+
}>;
|
|
552
569
|
get(runId: string, options?: EmbeddedRequestOptions): Promise<unknown>;
|
|
553
570
|
events(runId: string, params?: {
|
|
554
571
|
after?: string;
|
|
@@ -777,6 +794,27 @@ declare class McpServersNamespace {
|
|
|
777
794
|
}>;
|
|
778
795
|
refreshTools(serverId: string): Promise<unknown>;
|
|
779
796
|
}
|
|
797
|
+
declare class MarketplaceNamespace {
|
|
798
|
+
private config;
|
|
799
|
+
constructor(config: Required<CencoriConfig>);
|
|
800
|
+
list(params?: {
|
|
801
|
+
limit?: number;
|
|
802
|
+
cursor?: string;
|
|
803
|
+
}): Promise<{
|
|
804
|
+
data: unknown[];
|
|
805
|
+
next_cursor: string | null;
|
|
806
|
+
}>;
|
|
807
|
+
get(versionId: string): Promise<unknown>;
|
|
808
|
+
install(params: {
|
|
809
|
+
version_id: string;
|
|
810
|
+
tenant_id: string;
|
|
811
|
+
knowledge_base_ids?: string[];
|
|
812
|
+
connection_ids?: string[];
|
|
813
|
+
approval_policy?: Record<string, unknown>;
|
|
814
|
+
budget?: Record<string, unknown>;
|
|
815
|
+
overlay_config?: Record<string, unknown>;
|
|
816
|
+
}): Promise<unknown>;
|
|
817
|
+
}
|
|
780
818
|
declare class WebhooksNamespace {
|
|
781
819
|
private config;
|
|
782
820
|
constructor(config: Required<CencoriConfig>);
|
|
@@ -809,16 +847,27 @@ declare class UsageNamespace {
|
|
|
809
847
|
constructor(config: Required<CencoriConfig>);
|
|
810
848
|
summary(params?: {
|
|
811
849
|
days?: number;
|
|
850
|
+
since?: string;
|
|
851
|
+
until?: string;
|
|
812
852
|
tenant_id?: string;
|
|
813
853
|
agent_id?: string;
|
|
854
|
+
installation_id?: string;
|
|
855
|
+
model?: string;
|
|
814
856
|
}): Promise<{
|
|
815
857
|
totals: unknown;
|
|
816
858
|
groups: unknown[];
|
|
859
|
+
truncated: boolean;
|
|
860
|
+
row_cap: number;
|
|
861
|
+
unresolved_rows: number;
|
|
817
862
|
}>;
|
|
818
863
|
events(params?: {
|
|
819
864
|
days?: number;
|
|
865
|
+
since?: string;
|
|
866
|
+
until?: string;
|
|
820
867
|
tenant_id?: string;
|
|
821
868
|
agent_id?: string;
|
|
869
|
+
installation_id?: string;
|
|
870
|
+
model?: string;
|
|
822
871
|
limit?: number;
|
|
823
872
|
cursor?: string;
|
|
824
873
|
}): Promise<{
|
|
@@ -1057,6 +1106,7 @@ declare class Cencori {
|
|
|
1057
1106
|
readonly knowledge: KnowledgeNamespace;
|
|
1058
1107
|
readonly connections: ConnectionsNamespace;
|
|
1059
1108
|
readonly mcpServers: McpServersNamespace;
|
|
1109
|
+
readonly marketplace: MarketplaceNamespace;
|
|
1060
1110
|
readonly skills: SkillsNamespace;
|
|
1061
1111
|
readonly skillImports: SkillImportsNamespace;
|
|
1062
1112
|
readonly webhooks: WebhooksNamespace;
|