@chainfuse/types 2.10.0 → 2.10.2
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/ai-tools/index.d.ts +2 -2
- package/dist/ai-tools/index.js +2 -2
- package/dist/ai-tools/workers-ai/catalog.d.ts +5 -3
- package/dist/ai-tools/workers-ai/catalog.js +5 -3
- package/dist/ai-tools/workers-ai/index.d.ts +1 -1
- package/dist/d1/index.d.ts +2 -2
- package/dist/index.d.ts +13 -4
- package/dist/index.js +10 -4
- package/package.json +5 -5
package/dist/ai-tools/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import type { EnumOrEnumLike } from '../index.js';
|
|
3
3
|
import { type CloudflareFunctionModelsEnum, type CloudflareModelsEnum } from './workers-ai/index.js';
|
|
4
|
-
export * from './azure/index.js';
|
|
5
|
-
export * from './workers-ai/index.js';
|
|
6
4
|
export interface Coordinate {
|
|
7
5
|
lat: string;
|
|
8
6
|
lon: string;
|
|
@@ -84,3 +82,5 @@ export declare const default_mc_sentiment: LanguageModelValues;
|
|
|
84
82
|
export declare const default_mc_safety: LanguageModelValues;
|
|
85
83
|
export declare const default_mc_image: ImageModelValues;
|
|
86
84
|
export declare const default_mc_embedding: TextEmbeddingModelValues;
|
|
85
|
+
export * from './azure/index.js';
|
|
86
|
+
export * from './workers-ai/index.js';
|
package/dist/ai-tools/index.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { enabledCloudflareLlmEmbeddingProviders, enabledCloudflareLlmFunctionProviders, enabledCloudflareLlmImageProviders, enabledCloudflareLlmProviders } from './workers-ai/index.js';
|
|
3
|
-
export * from './azure/index.js';
|
|
4
|
-
export * from './workers-ai/index.js';
|
|
5
3
|
export var AiModels;
|
|
6
4
|
(function (AiModels) {
|
|
7
5
|
let LanguageModels;
|
|
@@ -104,3 +102,5 @@ export const default_mc_sentiment = AiModels.LanguageModels.Azure.gpt4o_mini;
|
|
|
104
102
|
export const default_mc_safety = AiModels.LanguageModels.Cloudflare['@hf/thebloke/llamaguard-7b-awq'];
|
|
105
103
|
export const default_mc_image = AiModels.ImageModels.Cloudflare['@cf/stabilityai/stable-diffusion-xl-base-1.0'];
|
|
106
104
|
export const default_mc_embedding = AiModels.TextEmbeddingModels.Cloudflare['@cf/baai/bge-large-en-v1.5'];
|
|
105
|
+
export * from './azure/index.js';
|
|
106
|
+
export * from './workers-ai/index.js';
|
|
@@ -556,6 +556,7 @@ export declare const workersAiCatalog: {
|
|
|
556
556
|
readonly price: 0.56;
|
|
557
557
|
readonly currency: "USD";
|
|
558
558
|
}];
|
|
559
|
+
readonly function_calling: true;
|
|
559
560
|
};
|
|
560
561
|
}, {
|
|
561
562
|
readonly id: "31097538-a3ff-4e6e-bb56-ad0e1f428b61";
|
|
@@ -682,13 +683,14 @@ export declare const workersAiCatalog: {
|
|
|
682
683
|
readonly context_window: 131000;
|
|
683
684
|
readonly price: readonly [{
|
|
684
685
|
readonly unit: "per M input tokens";
|
|
685
|
-
readonly price: 0;
|
|
686
|
+
readonly price: 0.27;
|
|
686
687
|
readonly currency: "USD";
|
|
687
688
|
}, {
|
|
688
689
|
readonly unit: "per M output tokens";
|
|
689
|
-
readonly price: 0;
|
|
690
|
+
readonly price: 0.85;
|
|
690
691
|
readonly currency: "USD";
|
|
691
692
|
}];
|
|
693
|
+
readonly function_calling: true;
|
|
692
694
|
readonly terms: "https://github.com/meta-llama/llama-models/blob/main/models/llama4/LICENSE";
|
|
693
695
|
};
|
|
694
696
|
}, {
|
|
@@ -699,7 +701,7 @@ export declare const workersAiCatalog: {
|
|
|
699
701
|
readonly created_at: "2025-03-18 03:58:02.423";
|
|
700
702
|
readonly tags: readonly [];
|
|
701
703
|
readonly properties: {
|
|
702
|
-
readonly context_window:
|
|
704
|
+
readonly context_window: 80000;
|
|
703
705
|
readonly price: readonly [{
|
|
704
706
|
readonly unit: "per M input tokens";
|
|
705
707
|
readonly price: 0.35;
|
|
@@ -632,6 +632,7 @@ export const workersAiCatalog = {
|
|
|
632
632
|
currency: 'USD',
|
|
633
633
|
},
|
|
634
634
|
],
|
|
635
|
+
function_calling: true,
|
|
635
636
|
},
|
|
636
637
|
},
|
|
637
638
|
{
|
|
@@ -774,15 +775,16 @@ export const workersAiCatalog = {
|
|
|
774
775
|
price: [
|
|
775
776
|
{
|
|
776
777
|
unit: 'per M input tokens',
|
|
777
|
-
price: 0,
|
|
778
|
+
price: 0.27,
|
|
778
779
|
currency: 'USD',
|
|
779
780
|
},
|
|
780
781
|
{
|
|
781
782
|
unit: 'per M output tokens',
|
|
782
|
-
price: 0,
|
|
783
|
+
price: 0.85,
|
|
783
784
|
currency: 'USD',
|
|
784
785
|
},
|
|
785
786
|
],
|
|
787
|
+
function_calling: true,
|
|
786
788
|
terms: 'https://github.com/meta-llama/llama-models/blob/main/models/llama4/LICENSE',
|
|
787
789
|
},
|
|
788
790
|
},
|
|
@@ -794,7 +796,7 @@ export const workersAiCatalog = {
|
|
|
794
796
|
created_at: '2025-03-18 03:58:02.423',
|
|
795
797
|
tags: [],
|
|
796
798
|
properties: {
|
|
797
|
-
context_window:
|
|
799
|
+
context_window: 80000,
|
|
798
800
|
price: [
|
|
799
801
|
{
|
|
800
802
|
unit: 'per M input tokens',
|
|
@@ -12,7 +12,7 @@ type cloudflareFilteredModelPossibilitiesRaw<M extends cloudflareModelTypes = cl
|
|
|
12
12
|
type cloudflareFilteredModelPossibilities<M extends cloudflareModelTypes = cloudflareModelTypes, K extends cloudflareModelPossibilitiesProperties<M> = cloudflareModelPossibilitiesProperties<M>, V extends cloudflareModelPossibilitiesRaw<M>['properties'][K] = any> = cloudflareFilteredModelPossibilitiesRaw<M, K, V>['name'];
|
|
13
13
|
export declare const enabledCloudflareLlmEmbeddingProviders: cloudflareModelPossibilities<'Text Embeddings'>[];
|
|
14
14
|
export declare const enabledCloudflareLlmProviders: cloudflareModelPossibilities<'Text Generation'>[];
|
|
15
|
-
export declare const enabledCloudflareLlmFunctionProviders: ("@cf/meta/llama-3.3-70b-instruct-fp8-fast" | "@hf/nousresearch/hermes-2-pro-mistral-7b")[];
|
|
15
|
+
export declare const enabledCloudflareLlmFunctionProviders: ("@cf/meta/llama-3.3-70b-instruct-fp8-fast" | "@hf/nousresearch/hermes-2-pro-mistral-7b" | "@cf/mistralai/mistral-small-3.1-24b-instruct" | "@cf/meta/llama-4-scout-17b-16e-instruct")[];
|
|
16
16
|
export declare const enabledCloudflareLlmImageProviders: cloudflareModelPossibilities<'Text-to-Image'>[];
|
|
17
17
|
export type CloudflareModelsEnum<M extends cloudflareModelTypes = cloudflareModelTypes> = {
|
|
18
18
|
[K in cloudflareModelPossibilities<M>]: `workersai:${K}`;
|
package/dist/d1/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import type { Buffer } from 'node:buffer';
|
|
2
|
-
export * from './tenants/index.js';
|
|
3
|
-
export * from './users/index.js';
|
|
4
2
|
export type PrefixedUuid = `${'t_' | 'd_' | 'u_'}${UuidExport['utf8']}${'' | '_p'}`;
|
|
5
3
|
export interface UuidExport {
|
|
6
4
|
utf8: ReturnType<typeof crypto.randomUUID>;
|
|
@@ -15,3 +13,5 @@ export type ISODateString = `${number}-${number}-${number}T${number}:${number}:$
|
|
|
15
13
|
* Supports any format supported by `cron-parser` library @link https://www.npmjs.com/package/cron-parser#supported-format
|
|
16
14
|
*/
|
|
17
15
|
export type CronString = `${string | number} ${string | number} ${string | number} ${string | number} ${string | number}` | `${string | number} ${string | number} ${string | number} ${string | number} ${string | number} ${string | number}`;
|
|
16
|
+
export * from './tenants/index.js';
|
|
17
|
+
export * from './users/index.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './d0/index.js';
|
|
3
|
-
export * from './d1/index.js';
|
|
4
|
-
export * from './discourse/index.js';
|
|
1
|
+
import { z } from 'zod';
|
|
5
2
|
export type EnumOrEnumLike<T> = T extends Record<string, infer V> ? V : T extends Readonly<Record<string, infer V>> ? V : never;
|
|
6
3
|
export type NamespaceEnumObject<T> = {
|
|
7
4
|
[K in keyof T as EnumOrEnumLike<T[K]> extends never ? never : K]?: T[K] extends Record<any, any> ? T[K][keyof T[K]] : never;
|
|
@@ -73,3 +70,15 @@ export declare enum DOLocations {
|
|
|
73
70
|
'Africa' = "afr",
|
|
74
71
|
'Middle East' = "me"
|
|
75
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* @link https://zod.dev/?id=json-type
|
|
75
|
+
*/
|
|
76
|
+
declare const literalSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;
|
|
77
|
+
type Json = z.infer<typeof literalSchema> | {
|
|
78
|
+
[key: string]: Json;
|
|
79
|
+
} | Json[];
|
|
80
|
+
export declare const jsonSchema: z.ZodType<Json>;
|
|
81
|
+
export * from './ai-tools/index.js';
|
|
82
|
+
export * from './d0/index.js';
|
|
83
|
+
export * from './d1/index.js';
|
|
84
|
+
export * from './discourse/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export * from './d0/index.js';
|
|
3
|
-
export * from './d1/index.js';
|
|
4
|
-
export * from './discourse/index.js';
|
|
1
|
+
import { z } from 'zod';
|
|
5
2
|
/**
|
|
6
3
|
* @link https://developers.cloudflare.com/durable-objects/reference/data-location/#restrict-durable-objects-to-a-jurisdiction
|
|
7
4
|
*/
|
|
@@ -25,3 +22,12 @@ export var DOLocations;
|
|
|
25
22
|
DOLocations["Africa"] = "afr";
|
|
26
23
|
DOLocations["Middle East"] = "me";
|
|
27
24
|
})(DOLocations || (DOLocations = {}));
|
|
25
|
+
/**
|
|
26
|
+
* @link https://zod.dev/?id=json-type
|
|
27
|
+
*/
|
|
28
|
+
const literalSchema = z.union([z.string(), z.number(), z.boolean(), z.null()]);
|
|
29
|
+
export const jsonSchema = z.lazy(() => z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]));
|
|
30
|
+
export * from './ai-tools/index.js';
|
|
31
|
+
export * from './d0/index.js';
|
|
32
|
+
export * from './d1/index.js';
|
|
33
|
+
export * from './discourse/index.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainfuse/types",
|
|
3
|
-
"version": "2.10.
|
|
3
|
+
"version": "2.10.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "ChainFuse",
|
|
6
6
|
"homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
|
|
@@ -91,11 +91,11 @@
|
|
|
91
91
|
"prettier": "@demosjarco/prettier-config",
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"validator": "^13.15.0",
|
|
94
|
-
"zod": "^3.24.
|
|
94
|
+
"zod": "^3.24.3"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@cloudflare/workers-types": "^4.
|
|
98
|
-
"@types/validator": "^13.
|
|
97
|
+
"@cloudflare/workers-types": "^4.20250422.0",
|
|
98
|
+
"@types/validator": "^13.15.0"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "cdc081af61b02d5ad07ee205637659b79532c6f5"
|
|
101
101
|
}
|