@dooor-ai/cortexdb 0.6.1 → 0.6.3
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 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -0
- package/dist/index.js.map +1 -1
- package/dist/schema-cli/index.js +889 -14
- package/dist/schema-cli/index.js.map +1 -1
- package/dist/schema-decorators/decorators.d.ts +175 -0
- package/dist/schema-decorators/decorators.d.ts.map +1 -0
- package/dist/schema-decorators/decorators.js +277 -0
- package/dist/schema-decorators/decorators.js.map +1 -0
- package/dist/schema-decorators/index.d.ts +10 -0
- package/dist/schema-decorators/index.d.ts.map +1 -0
- package/dist/schema-decorators/index.js +25 -0
- package/dist/schema-decorators/index.js.map +1 -0
- package/dist/schema-decorators/loader.d.ts +12 -0
- package/dist/schema-decorators/loader.d.ts.map +1 -0
- package/dist/schema-decorators/loader.js +161 -0
- package/dist/schema-decorators/loader.js.map +1 -0
- package/dist/schema-decorators/validator.d.ts +26 -0
- package/dist/schema-decorators/validator.d.ts.map +1 -0
- package/dist/schema-decorators/validator.js +193 -0
- package/dist/schema-decorators/validator.js.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/package.json +20 -1
package/README.md
CHANGED
|
@@ -43,6 +43,7 @@ CortexDB handles the complex infrastructure of vector databases (Qdrant), object
|
|
|
43
43
|
- **Type-safe**: Full TypeScript support with comprehensive type definitions
|
|
44
44
|
- **Modern API**: Async/await using native fetch (Node.js 18+)
|
|
45
45
|
- **Infra management**: Database (`client.databases`) and embedding provider (`client.embeddingProviders`) APIs built-in
|
|
46
|
+
- **🆕 TypeScript Decorators**: Define schemas using decorators (like TypeORM) with full IDE support - see [Schema Decorators Guide](./SCHEMA_DECORATORS_GUIDE.md)
|
|
46
47
|
|
|
47
48
|
## Installation
|
|
48
49
|
|
package/dist/index.d.ts
CHANGED
|
@@ -8,4 +8,5 @@ export * from "./ai-providers/api";
|
|
|
8
8
|
export * from "./types";
|
|
9
9
|
export * from "./exceptions";
|
|
10
10
|
export * from "./http/client";
|
|
11
|
+
export { Collection, Field, FieldOptions, CollectionOptions, ManyToOne, OneToOne, OneToMany, ManyToMany, ManyToOneOptions, OneToOneOptions, OneToManyOptions, ManyToManyOptions, RelationOptions, loadTypeScriptSchemasSync, LoadedCollection, validateSchema, formatValidationErrors, ValidationError, ValidationResult, } from "./schema-decorators";
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAG9B,cAAc,UAAU,CAAC;AAGzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,8BAA8B;AAG9B,cAAc,UAAU,CAAC;AAGzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AAGnC,cAAc,SAAS,CAAC;AAGxB,cAAc,cAAc,CAAC;AAG7B,cAAc,eAAe,CAAC;AAI9B,OAAO,EACL,UAAU,EACV,KAAK,EACL,YAAY,EACZ,iBAAiB,EACjB,SAAS,EACT,QAAQ,EACR,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,yBAAyB,EACzB,gBAAgB,EAEhB,cAAc,EACd,sBAAsB,EACtB,eAAe,EACf,gBAAgB,GACjB,MAAM,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
16
|
};
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.formatValidationErrors = exports.validateSchema = exports.loadTypeScriptSchemasSync = exports.ManyToMany = exports.OneToMany = exports.OneToOne = exports.ManyToOne = exports.Field = exports.Collection = void 0;
|
|
18
19
|
// Main client
|
|
19
20
|
__exportStar(require("./client"), exports);
|
|
20
21
|
// API classes
|
|
@@ -29,4 +30,17 @@ __exportStar(require("./types"), exports);
|
|
|
29
30
|
__exportStar(require("./exceptions"), exports);
|
|
30
31
|
// HTTP Client (for advanced usage)
|
|
31
32
|
__exportStar(require("./http/client"), exports);
|
|
33
|
+
// Schema decorators (for TypeScript-based schema definitions)
|
|
34
|
+
// Note: Collection decorator shadows the Collection interface from types
|
|
35
|
+
var schema_decorators_1 = require("./schema-decorators");
|
|
36
|
+
Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return schema_decorators_1.Collection; } });
|
|
37
|
+
Object.defineProperty(exports, "Field", { enumerable: true, get: function () { return schema_decorators_1.Field; } });
|
|
38
|
+
Object.defineProperty(exports, "ManyToOne", { enumerable: true, get: function () { return schema_decorators_1.ManyToOne; } });
|
|
39
|
+
Object.defineProperty(exports, "OneToOne", { enumerable: true, get: function () { return schema_decorators_1.OneToOne; } });
|
|
40
|
+
Object.defineProperty(exports, "OneToMany", { enumerable: true, get: function () { return schema_decorators_1.OneToMany; } });
|
|
41
|
+
Object.defineProperty(exports, "ManyToMany", { enumerable: true, get: function () { return schema_decorators_1.ManyToMany; } });
|
|
42
|
+
Object.defineProperty(exports, "loadTypeScriptSchemasSync", { enumerable: true, get: function () { return schema_decorators_1.loadTypeScriptSchemasSync; } });
|
|
43
|
+
// Validation
|
|
44
|
+
Object.defineProperty(exports, "validateSchema", { enumerable: true, get: function () { return schema_decorators_1.validateSchema; } });
|
|
45
|
+
Object.defineProperty(exports, "formatValidationErrors", { enumerable: true, get: function () { return schema_decorators_1.formatValidationErrors; } });
|
|
32
46
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,8BAA8B
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA,8BAA8B;;;;;;;;;;;;;;;;;AAE9B,cAAc;AACd,2CAAyB;AAEzB,cAAc;AACd,oDAAkC;AAClC,gDAA8B;AAC9B,kDAAgC;AAChC,kDAAgC;AAChC,qDAAmC;AAEnC,QAAQ;AACR,0CAAwB;AAExB,aAAa;AACb,+CAA6B;AAE7B,mCAAmC;AACnC,gDAA8B;AAE9B,8DAA8D;AAC9D,yEAAyE;AACzE,yDAqB6B;AApB3B,+GAAA,UAAU,OAAA;AACV,0GAAA,KAAK,OAAA;AAGL,8GAAA,SAAS,OAAA;AACT,6GAAA,QAAQ,OAAA;AACR,8GAAA,SAAS,OAAA;AACT,+GAAA,UAAU,OAAA;AAMV,8HAAA,yBAAyB,OAAA;AAEzB,aAAa;AACb,mHAAA,cAAc,OAAA;AACd,2HAAA,sBAAsB,OAAA"}
|