@decaf-ts/for-couchdb 0.12.0 → 0.13.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.
Files changed (50) hide show
  1. package/lib/cjs/index.cjs +1 -1
  2. package/lib/esm/index.js +1 -1
  3. package/lib/types/adapter.d.cts +2 -2
  4. package/lib/types/adapter.d.mts +2 -2
  5. package/lib/types/decorators.d.cts +1 -1
  6. package/lib/types/decorators.d.mts +1 -1
  7. package/lib/types/index.d.cts +12 -12
  8. package/lib/types/index.d.mts +12 -12
  9. package/lib/types/indexes/generator.d.cts +1 -1
  10. package/lib/types/indexes/generator.d.mts +1 -1
  11. package/lib/types/indexes/index.d.cts +1 -1
  12. package/lib/types/indexes/index.d.mts +1 -1
  13. package/lib/types/query/Paginator.d.cts +2 -2
  14. package/lib/types/query/Paginator.d.mts +2 -2
  15. package/lib/types/query/Statement.d.cts +3 -3
  16. package/lib/types/query/Statement.d.mts +3 -3
  17. package/lib/types/query/constants.d.cts +1 -1
  18. package/lib/types/query/constants.d.mts +1 -1
  19. package/lib/types/query/index.d.cts +4 -4
  20. package/lib/types/query/index.d.mts +4 -4
  21. package/lib/types/query/translate.d.cts +1 -1
  22. package/lib/types/query/translate.d.mts +1 -1
  23. package/lib/types/repository.d.cts +1 -1
  24. package/lib/types/repository.d.mts +1 -1
  25. package/lib/types/utils.d.cts +1 -1
  26. package/lib/types/utils.d.mts +1 -1
  27. package/lib/types/views/generator.d.cts +2 -2
  28. package/lib/types/views/generator.d.mts +2 -2
  29. package/lib/types/views/index.d.cts +2 -2
  30. package/lib/types/views/index.d.mts +2 -2
  31. package/package.json +1 -1
  32. package/lib/types/adapter.d.ts +0 -296
  33. package/lib/types/constants.d.ts +0 -42
  34. package/lib/types/decorators.d.ts +0 -8
  35. package/lib/types/errors.d.ts +0 -21
  36. package/lib/types/index.d.ts +0 -28
  37. package/lib/types/indexes/generator.d.ts +0 -51
  38. package/lib/types/indexes/index.d.ts +0 -1
  39. package/lib/types/metadata.d.ts +0 -4
  40. package/lib/types/query/Paginator.d.ts +0 -105
  41. package/lib/types/query/Statement.d.ts +0 -195
  42. package/lib/types/query/constants.d.ts +0 -47
  43. package/lib/types/query/index.d.ts +0 -4
  44. package/lib/types/query/translate.d.ts +0 -34
  45. package/lib/types/repository.d.ts +0 -39
  46. package/lib/types/types.d.ts +0 -166
  47. package/lib/types/utils.d.ts +0 -112
  48. package/lib/types/views/generator.d.ts +0 -13
  49. package/lib/types/views/index.d.ts +0 -2
  50. package/lib/types/views/types.d.ts +0 -30
package/lib/cjs/index.cjs CHANGED
@@ -37,7 +37,7 @@ __exportStar(require("./views/index.cjs"), exports);
37
37
  * @summary The version string of the for-couchdb package
38
38
  * @const VERSION
39
39
  */
40
- exports.VERSION = "0.11.0";
40
+ exports.VERSION = "0.12.0";
41
41
  /**
42
42
  * @description Stores the current package name
43
43
  * @summary The version string of the for-couchdb package
package/lib/esm/index.js CHANGED
@@ -20,7 +20,7 @@ export * from "./views/index.js";
20
20
  * @summary The version string of the for-couchdb package
21
21
  * @const VERSION
22
22
  */
23
- export const VERSION = "0.11.0";
23
+ export const VERSION = "0.12.0";
24
24
  /**
25
25
  * @description Stores the current package name
26
26
  * @summary The version string of the for-couchdb package
@@ -1,8 +1,8 @@
1
1
  import { Adapter, AdapterFlags, Paginator, RawResult, ContextualArgs, PreparedModel } from "@decaf-ts/core";
2
2
  import { BaseError, type PrimaryKeyType } from "@decaf-ts/db-decorators";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { type MangoQuery, ViewResponse } from "./types.cjs";
5
- import { CouchDBStatement } from "./query/index.cjs";
4
+ import { type MangoQuery, ViewResponse } from "./types.d.cts";
5
+ import { CouchDBStatement } from "./query/index.d.cts";
6
6
  import { Context } from "@decaf-ts/core";
7
7
  import { type Constructor } from "@decaf-ts/decoration";
8
8
  import { Repository } from "@decaf-ts/core";
@@ -1,8 +1,8 @@
1
1
  import { Adapter, AdapterFlags, Paginator, RawResult, ContextualArgs, PreparedModel } from "@decaf-ts/core";
2
2
  import { BaseError, type PrimaryKeyType } from "@decaf-ts/db-decorators";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { type MangoQuery, ViewResponse } from "./types.js";
5
- import { CouchDBStatement } from "./query/index.js";
4
+ import { type MangoQuery, ViewResponse } from "./types.d.mts";
5
+ import { CouchDBStatement } from "./query/index.d.mts";
6
6
  import { Context } from "@decaf-ts/core";
7
7
  import { type Constructor } from "@decaf-ts/decoration";
8
8
  import { Repository } from "@decaf-ts/core";
@@ -1,5 +1,5 @@
1
1
  import { Condition } from "@decaf-ts/core";
2
- import { AggregateOptions, CouchDBViewOptions } from "./views/index.cjs";
2
+ import { AggregateOptions, CouchDBViewOptions } from "./views/index.d.cts";
3
3
  export declare function groupBy(compositionsOrOptions?: string[] | string | CouchDBViewOptions, nameOrOptions?: string | CouchDBViewOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
4
4
  export declare function count(valueOrCondition?: any | Condition<any> | AggregateOptions, options?: AggregateOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
5
5
  export declare function sum(conditionOrOptions?: Condition<any> | AggregateOptions, options?: AggregateOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
@@ -1,5 +1,5 @@
1
1
  import { Condition } from "@decaf-ts/core";
2
- import { AggregateOptions, CouchDBViewOptions } from "./views/index.js";
2
+ import { AggregateOptions, CouchDBViewOptions } from "./views/index.d.mts";
3
3
  export declare function groupBy(compositionsOrOptions?: string[] | string | CouchDBViewOptions, nameOrOptions?: string | CouchDBViewOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
4
4
  export declare function count(valueOrCondition?: any | Condition<any> | AggregateOptions, options?: AggregateOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
5
5
  export declare function sum(conditionOrOptions?: Condition<any> | AggregateOptions, options?: AggregateOptions): (target: any, propertyKey?: any, descriptor?: TypedPropertyDescriptor<any>) => any;
@@ -1,14 +1,14 @@
1
- export * from "./indexes/index.cjs";
2
- export * from "./repository.cjs";
3
- export * from "./adapter.cjs";
4
- export * from "./constants.cjs";
5
- export * from "./errors.cjs";
6
- export * from "./metadata.cjs";
7
- export * from "./decorators.cjs";
8
- export * from "./types.cjs";
9
- export * from "./utils.cjs";
10
- export * from "./query/index.cjs";
11
- export * from "./views/index.cjs";
1
+ export * from "./indexes/index.d.cts";
2
+ export * from "./repository.d.cts";
3
+ export * from "./adapter.d.cts";
4
+ export * from "./constants.d.cts";
5
+ export * from "./errors.d.cts";
6
+ export * from "./metadata.d.cts";
7
+ export * from "./decorators.d.cts";
8
+ export * from "./types.d.cts";
9
+ export * from "./utils.d.cts";
10
+ export * from "./query/index.d.cts";
11
+ export * from "./views/index.d.cts";
12
12
  /**
13
13
  * @description CouchDB adapter for Decaf.ts
14
14
  * @summary A TypeScript adapter for CouchDB database operations, providing a seamless integration with the Decaf.ts framework. This module includes classes, interfaces, and utilities for working with CouchDB databases, including support for Mango queries, document operations, and sequence management.
@@ -19,7 +19,7 @@ export * from "./views/index.cjs";
19
19
  * @summary The version string of the for-couchdb package
20
20
  * @const VERSION
21
21
  */
22
- export declare const VERSION = "0.11.0";
22
+ export declare const VERSION = "0.12.0";
23
23
  /**
24
24
  * @description Stores the current package name
25
25
  * @summary The version string of the for-couchdb package
@@ -1,14 +1,14 @@
1
- export * from "./indexes/index.js";
2
- export * from "./repository.js";
3
- export * from "./adapter.js";
4
- export * from "./constants.js";
5
- export * from "./errors.js";
6
- export * from "./metadata.js";
7
- export * from "./decorators.js";
8
- export * from "./types.js";
9
- export * from "./utils.js";
10
- export * from "./query/index.js";
11
- export * from "./views/index.js";
1
+ export * from "./indexes/index.d.mts";
2
+ export * from "./repository.d.mts";
3
+ export * from "./adapter.d.mts";
4
+ export * from "./constants.d.mts";
5
+ export * from "./errors.d.mts";
6
+ export * from "./metadata.d.mts";
7
+ export * from "./decorators.d.mts";
8
+ export * from "./types.d.mts";
9
+ export * from "./utils.d.mts";
10
+ export * from "./query/index.d.mts";
11
+ export * from "./views/index.d.mts";
12
12
  /**
13
13
  * @description CouchDB adapter for Decaf.ts
14
14
  * @summary A TypeScript adapter for CouchDB database operations, providing a seamless integration with the Decaf.ts framework. This module includes classes, interfaces, and utilities for working with CouchDB databases, including support for Mango queries, document operations, and sequence management.
@@ -19,7 +19,7 @@ export * from "./views/index.js";
19
19
  * @summary The version string of the for-couchdb package
20
20
  * @const VERSION
21
21
  */
22
- export declare const VERSION = "0.11.0";
22
+ export declare const VERSION = "0.12.0";
23
23
  /**
24
24
  * @description Stores the current package name
25
25
  * @summary The version string of the for-couchdb package
@@ -1,5 +1,5 @@
1
1
  import { Model } from "@decaf-ts/decorator-validation";
2
- import { CreateIndexRequest } from "../types.cjs";
2
+ import { CreateIndexRequest } from "../types.d.cts";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
4
  /**
5
5
  * @description Generates CouchDB index configurations for models
@@ -1,5 +1,5 @@
1
1
  import { Model } from "@decaf-ts/decorator-validation";
2
- import { CreateIndexRequest } from "../types.js";
2
+ import { CreateIndexRequest } from "../types.d.mts";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
4
  /**
5
5
  * @description Generates CouchDB index configurations for models
@@ -1 +1 @@
1
- export * from "./generator.cjs";
1
+ export * from "./generator.d.cts";
@@ -1 +1 @@
1
- export * from "./generator.js";
1
+ export * from "./generator.d.mts";
@@ -1,7 +1,7 @@
1
1
  import { MaybeContextualArg, Paginator } from "@decaf-ts/core";
2
- import { MangoQuery } from "../types.cjs";
2
+ import { MangoQuery } from "../types.d.cts";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { CouchDBAdapter } from "../adapter.cjs";
4
+ import { CouchDBAdapter } from "../adapter.d.cts";
5
5
  import { Constructor } from "@decaf-ts/decoration";
6
6
  /**
7
7
  * @description Paginator for ConuchDB query results
@@ -1,7 +1,7 @@
1
1
  import { MaybeContextualArg, Paginator } from "@decaf-ts/core";
2
- import { MangoQuery } from "../types.js";
2
+ import { MangoQuery } from "../types.d.mts";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { CouchDBAdapter } from "../adapter.js";
4
+ import { CouchDBAdapter } from "../adapter.d.mts";
5
5
  import { Constructor } from "@decaf-ts/decoration";
6
6
  /**
7
7
  * @description Paginator for ConuchDB query results
@@ -1,8 +1,8 @@
1
1
  import { Adapter, AdapterFlags, Condition, ContextOf, SelectSelector, Statement, UnsupportedError, ViewKind } from "@decaf-ts/core";
2
- import { MangoQuery, MangoSelector, ViewResponse } from "../types.cjs";
2
+ import { MangoQuery, MangoSelector, ViewResponse } from "../types.d.cts";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { CouchDBViewMetadata } from "../views/types.cjs";
5
- import { CouchDBAdapter } from "../adapter.cjs";
4
+ import { CouchDBViewMetadata } from "../views/types.d.cts";
5
+ import { CouchDBAdapter } from "../adapter.d.cts";
6
6
  type CouchDBViewDescriptor = {
7
7
  ddoc: string;
8
8
  view: string;
@@ -1,8 +1,8 @@
1
1
  import { Adapter, AdapterFlags, Condition, ContextOf, SelectSelector, Statement, UnsupportedError, ViewKind } from "@decaf-ts/core";
2
- import { MangoQuery, MangoSelector, ViewResponse } from "../types.js";
2
+ import { MangoQuery, MangoSelector, ViewResponse } from "../types.d.mts";
3
3
  import { Model } from "@decaf-ts/decorator-validation";
4
- import { CouchDBViewMetadata } from "../views/types.js";
5
- import { CouchDBAdapter } from "../adapter.js";
4
+ import { CouchDBViewMetadata } from "../views/types.d.mts";
5
+ import { CouchDBAdapter } from "../adapter.d.mts";
6
6
  type CouchDBViewDescriptor = {
7
7
  ddoc: string;
8
8
  view: string;
@@ -1,4 +1,4 @@
1
- import { MangoOperator } from "../types.cjs";
1
+ import { MangoOperator } from "../types.d.cts";
2
2
  /**
3
3
  * @description Default query limit for CouchDB queries
4
4
  * @summary Maximum number of documents to return in a single query
@@ -1,4 +1,4 @@
1
- import { MangoOperator } from "../types.js";
1
+ import { MangoOperator } from "../types.d.mts";
2
2
  /**
3
3
  * @description Default query limit for CouchDB queries
4
4
  * @summary Maximum number of documents to return in a single query
@@ -1,4 +1,4 @@
1
- export * from "./constants.cjs";
2
- export * from "./Paginator.cjs";
3
- export * from "./Statement.cjs";
4
- export * from "./translate.cjs";
1
+ export * from "./constants.d.cts";
2
+ export * from "./Paginator.d.cts";
3
+ export * from "./Statement.d.cts";
4
+ export * from "./translate.d.cts";
@@ -1,4 +1,4 @@
1
- export * from "./constants.js";
2
- export * from "./Paginator.js";
3
- export * from "./Statement.js";
4
- export * from "./translate.js";
1
+ export * from "./constants.d.mts";
2
+ export * from "./Paginator.d.mts";
3
+ export * from "./Statement.d.mts";
4
+ export * from "./translate.d.mts";
@@ -1,5 +1,5 @@
1
1
  import { GroupOperator, Operator } from "@decaf-ts/core";
2
- import { MangoOperator } from "../types.cjs";
2
+ import { MangoOperator } from "../types.d.cts";
3
3
  /**
4
4
  * @description Translates core operators to CouchDB Mango operators
5
5
  * @summary Converts Decaf.ts core operators to their equivalent CouchDB Mango query operators
@@ -1,5 +1,5 @@
1
1
  import { GroupOperator, Operator } from "@decaf-ts/core";
2
- import { MangoOperator } from "../types.js";
2
+ import { MangoOperator } from "../types.d.mts";
3
3
  /**
4
4
  * @description Translates core operators to CouchDB Mango operators
5
5
  * @summary Converts Decaf.ts core operators to their equivalent CouchDB Mango query operators
@@ -1,7 +1,7 @@
1
1
  import { MaybeContextualArg, Repository } from "@decaf-ts/core";
2
2
  import { Model } from "@decaf-ts/decorator-validation";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
- import type { CouchDBAdapter } from "./adapter.cjs";
4
+ import type { CouchDBAdapter } from "./adapter.d.cts";
5
5
  import { ContextOf } from "@decaf-ts/core";
6
6
  import type { PrimaryKeyType } from "@decaf-ts/db-decorators";
7
7
  export declare class CouchDBRepository<M extends Model, A extends CouchDBAdapter<any, any, any>> extends Repository<M, A> {
@@ -1,7 +1,7 @@
1
1
  import { MaybeContextualArg, Repository } from "@decaf-ts/core";
2
2
  import { Model } from "@decaf-ts/decorator-validation";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
- import type { CouchDBAdapter } from "./adapter.js";
4
+ import type { CouchDBAdapter } from "./adapter.d.mts";
5
5
  import { ContextOf } from "@decaf-ts/core";
6
6
  import type { PrimaryKeyType } from "@decaf-ts/db-decorators";
7
7
  export declare class CouchDBRepository<M extends Model, A extends CouchDBAdapter<any, any, any>> extends Repository<M, A> {
@@ -1,5 +1,5 @@
1
1
  import { OrderDirection } from "@decaf-ts/core";
2
- import { CreateIndexRequest } from "./types.cjs";
2
+ import { CreateIndexRequest } from "./types.d.cts";
3
3
  /**
4
4
  * @description Re-authenticates a connection to CouchDB
5
5
  * @summary Refreshes the authentication for a CouchDB connection using the provided credentials
@@ -1,5 +1,5 @@
1
1
  import { OrderDirection } from "@decaf-ts/core";
2
- import { CreateIndexRequest } from "./types.js";
2
+ import { CreateIndexRequest } from "./types.d.mts";
3
3
  /**
4
4
  * @description Re-authenticates a connection to CouchDB
5
5
  * @summary Refreshes the authentication for a CouchDB connection using the provided credentials
@@ -1,9 +1,9 @@
1
1
  import { ViewKind } from "@decaf-ts/core";
2
2
  import { Model } from "@decaf-ts/decorator-validation";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
- import { CreateIndexRequest } from "../types.cjs";
4
+ import { CreateIndexRequest } from "../types.d.cts";
5
5
  import { Operator } from "@decaf-ts/core";
6
- import { CouchDBDesignDoc, CouchDBViewMetadata, ViewIndexDefinition } from "./types.cjs";
6
+ import { CouchDBDesignDoc, CouchDBViewMetadata, ViewIndexDefinition } from "./types.d.cts";
7
7
  export declare function generateViewName(tableName: string, attr: string, kind: ViewKind, meta: CouchDBViewMetadata, separator?: string): string;
8
8
  export declare function generateDesignDocName(tableName: string, viewName: string, separator?: string): string;
9
9
  export declare function findViewMetadata<M extends Model>(model: Constructor<M>, kind: ViewKind, attribute?: string): CouchDBViewMetadata[];
@@ -1,9 +1,9 @@
1
1
  import { ViewKind } from "@decaf-ts/core";
2
2
  import { Model } from "@decaf-ts/decorator-validation";
3
3
  import { Constructor } from "@decaf-ts/decoration";
4
- import { CreateIndexRequest } from "../types.js";
4
+ import { CreateIndexRequest } from "../types.d.mts";
5
5
  import { Operator } from "@decaf-ts/core";
6
- import { CouchDBDesignDoc, CouchDBViewMetadata, ViewIndexDefinition } from "./types.js";
6
+ import { CouchDBDesignDoc, CouchDBViewMetadata, ViewIndexDefinition } from "./types.d.mts";
7
7
  export declare function generateViewName(tableName: string, attr: string, kind: ViewKind, meta: CouchDBViewMetadata, separator?: string): string;
8
8
  export declare function generateDesignDocName(tableName: string, viewName: string, separator?: string): string;
9
9
  export declare function findViewMetadata<M extends Model>(model: Constructor<M>, kind: ViewKind, attribute?: string): CouchDBViewMetadata[];
@@ -1,2 +1,2 @@
1
- export * from "./types.cjs";
2
- export * from "./generator.cjs";
1
+ export * from "./types.d.cts";
2
+ export * from "./generator.d.cts";
@@ -1,2 +1,2 @@
1
- export * from "./types.js";
2
- export * from "./generator.js";
1
+ export * from "./types.d.mts";
2
+ export * from "./generator.d.mts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@decaf-ts/for-couchdb",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "decaf-ts couchdb wrappers",
5
5
  "type": "module",
6
6
  "exports": {