hide-a-bed 4.2.0 → 5.0.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.
Files changed (75) hide show
  1. package/README.md +175 -14
  2. package/impl/changes.mjs +53 -0
  3. package/impl/errors.mjs +1 -1
  4. package/impl/query.mjs +14 -6
  5. package/impl/stream.mjs +2 -2
  6. package/impl/sugar/lock.mjs +70 -0
  7. package/impl/sugar/watch.mjs +154 -0
  8. package/index.mjs +23 -3
  9. package/integration/changes.mjs +60 -0
  10. package/integration/disconnect-watch.mjs +36 -0
  11. package/integration/watch.mjs +40 -0
  12. package/log.txt +84 -0
  13. package/package.json +3 -2
  14. package/schema/bind.mjs +8 -1
  15. package/schema/changes.mjs +59 -0
  16. package/schema/sugar/lock.mjs +50 -0
  17. package/schema/sugar/watch.mjs +29 -0
  18. package/types/changes-stream.d.ts +11 -0
  19. package/cjs/impl/bulk.cjs +0 -267
  20. package/cjs/impl/crud.cjs +0 -121
  21. package/cjs/impl/errors.cjs +0 -75
  22. package/cjs/impl/logger.cjs +0 -70
  23. package/cjs/impl/patch.cjs +0 -95
  24. package/cjs/impl/query.cjs +0 -110
  25. package/cjs/impl/queryBuilder.cjs +0 -99
  26. package/cjs/impl/retry.cjs +0 -54
  27. package/cjs/impl/stream.cjs +0 -121
  28. package/cjs/impl/trackedEmitter.cjs +0 -54
  29. package/cjs/impl/transactionErrors.cjs +0 -70
  30. package/cjs/index.cjs +0 -95
  31. package/cjs/schema/bind.cjs +0 -44
  32. package/cjs/schema/bulk.cjs +0 -88
  33. package/cjs/schema/config.cjs +0 -48
  34. package/cjs/schema/crud.cjs +0 -77
  35. package/cjs/schema/patch.cjs +0 -53
  36. package/cjs/schema/query.cjs +0 -62
  37. package/cjs/schema/stream.cjs +0 -42
  38. package/impl/bulk.d.mts +0 -11
  39. package/impl/bulk.d.mts.map +0 -1
  40. package/impl/crud.d.mts +0 -7
  41. package/impl/crud.d.mts.map +0 -1
  42. package/impl/errors.d.mts +0 -43
  43. package/impl/errors.d.mts.map +0 -1
  44. package/impl/logger.d.mts +0 -32
  45. package/impl/logger.d.mts.map +0 -1
  46. package/impl/patch.d.mts +0 -6
  47. package/impl/patch.d.mts.map +0 -1
  48. package/impl/query.d.mts +0 -195
  49. package/impl/query.d.mts.map +0 -1
  50. package/impl/queryBuilder.d.mts +0 -94
  51. package/impl/queryBuilder.d.mts.map +0 -1
  52. package/impl/retry.d.mts +0 -2
  53. package/impl/retry.d.mts.map +0 -1
  54. package/impl/stream.d.mts +0 -3
  55. package/impl/stream.d.mts.map +0 -1
  56. package/impl/trackedEmitter.d.mts +0 -8
  57. package/impl/trackedEmitter.d.mts.map +0 -1
  58. package/impl/transactionErrors.d.mts +0 -57
  59. package/impl/transactionErrors.d.mts.map +0 -1
  60. package/index.d.mts +0 -56
  61. package/index.d.mts.map +0 -1
  62. package/schema/bind.d.mts +0 -820
  63. package/schema/bind.d.mts.map +0 -1
  64. package/schema/bulk.d.mts +0 -910
  65. package/schema/bulk.d.mts.map +0 -1
  66. package/schema/config.d.mts +0 -79
  67. package/schema/config.d.mts.map +0 -1
  68. package/schema/crud.d.mts +0 -491
  69. package/schema/crud.d.mts.map +0 -1
  70. package/schema/patch.d.mts +0 -255
  71. package/schema/patch.d.mts.map +0 -1
  72. package/schema/query.d.mts +0 -406
  73. package/schema/query.d.mts.map +0 -1
  74. package/schema/stream.d.mts +0 -211
  75. package/schema/stream.d.mts.map +0 -1
@@ -1,62 +0,0 @@
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
- var query_exports = {};
20
- __export(query_exports, {
21
- SimpleViewOptions: () => SimpleViewOptions,
22
- SimpleViewQuery: () => SimpleViewQuery,
23
- SimpleViewQueryBound: () => SimpleViewQueryBound,
24
- SimpleViewQueryResponse: () => SimpleViewQueryResponse,
25
- ViewRow: () => ViewRow
26
- });
27
- module.exports = __toCommonJS(query_exports);
28
- var import_zod = require("zod");
29
- var import_config = require("./config.cjs");
30
- const ViewRow = import_zod.z.object({
31
- id: import_zod.z.string().optional(),
32
- key: import_zod.z.any().nullable(),
33
- value: import_zod.z.any().nullable(),
34
- doc: import_zod.z.object({}).passthrough().optional().nullish(),
35
- error: import_zod.z.string().optional().describe("usually not_found, if something is wrong with this doc")
36
- });
37
- const SimpleViewQueryResponse = import_zod.z.object({
38
- error: import_zod.z.string().optional().describe("if something is wrong"),
39
- rows: import_zod.z.array(ViewRow)
40
- }).passthrough();
41
- const SimpleViewOptions = import_zod.z.object({
42
- startkey: import_zod.z.any().optional(),
43
- endkey: import_zod.z.any().optional(),
44
- descending: import_zod.z.boolean().optional().describe("sort results descending"),
45
- skip: import_zod.z.number().positive().optional().describe("skip this many rows"),
46
- limit: import_zod.z.number().positive().optional().describe("limit the results to this many rows"),
47
- key: import_zod.z.any().optional(),
48
- keys: import_zod.z.array(import_zod.z.any()).optional(),
49
- include_docs: import_zod.z.boolean().optional().describe("join the id to the doc and return it"),
50
- reduce: import_zod.z.boolean().optional().describe("reduce the results"),
51
- group: import_zod.z.boolean().optional().describe("group the results"),
52
- group_level: import_zod.z.number().positive().optional().describe("group the results at this level")
53
- }).optional().describe("query options");
54
- const SimpleViewQuery = import_zod.z.function().args(
55
- import_config.CouchConfig,
56
- import_zod.z.string().describe("the view name"),
57
- SimpleViewOptions
58
- ).returns(import_zod.z.promise(SimpleViewQueryResponse));
59
- const SimpleViewQueryBound = import_zod.z.function().args(
60
- import_zod.z.string().describe("the view name"),
61
- SimpleViewOptions
62
- ).returns(import_zod.z.promise(SimpleViewQueryResponse));
@@ -1,42 +0,0 @@
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
- var stream_exports = {};
20
- __export(stream_exports, {
21
- OnRow: () => OnRow,
22
- SimpleViewQueryStream: () => SimpleViewQueryStream,
23
- SimpleViewQueryStreamBound: () => SimpleViewQueryStreamBound
24
- });
25
- module.exports = __toCommonJS(stream_exports);
26
- var import_zod = require("zod");
27
- var import_config = require("./config.cjs");
28
- var import_query = require("./query.cjs");
29
- const OnRow = import_zod.z.function().args(
30
- import_query.ViewRow
31
- );
32
- const SimpleViewQueryStream = import_zod.z.function().args(
33
- import_config.CouchConfig,
34
- import_zod.z.string().describe("the view name"),
35
- import_query.SimpleViewOptions,
36
- OnRow
37
- ).returns(import_zod.z.promise(import_zod.z.undefined()));
38
- const SimpleViewQueryStreamBound = import_zod.z.function().args(
39
- import_zod.z.string().describe("the view name"),
40
- import_query.SimpleViewOptions,
41
- OnRow
42
- ).returns(import_zod.z.promise(import_zod.z.undefined()));
package/impl/bulk.d.mts DELETED
@@ -1,11 +0,0 @@
1
- /** @type { import('../schema/bulk.mjs').BulkSaveSchema } */
2
- export const bulkSave: import("../schema/bulk.mjs").BulkSaveSchema;
3
- /** @type { import('../schema/bulk.mjs').BulkGetSchema } */
4
- export const bulkGet: import("../schema/bulk.mjs").BulkGetSchema;
5
- /** @type { import('../schema/bulk.mjs').BulkRemoveSchema } */
6
- export const bulkRemove: import("../schema/bulk.mjs").BulkRemoveSchema;
7
- /** @type { import('../schema/bulk.mjs').BulkGetDictionarySchema } */
8
- export const bulkGetDictionary: import("../schema/bulk.mjs").BulkGetDictionarySchema;
9
- /** @type { import('../schema/bulk.mjs').BulkSaveTransactionSchema } bulkSaveTransaction */
10
- export const bulkSaveTransaction: import("../schema/bulk.mjs").BulkSaveTransactionSchema;
11
- //# sourceMappingURL=bulk.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bulk.d.mts","sourceRoot":"","sources":["bulk.mjs"],"names":[],"mappings":"AAkBA,4DAA4D;AAC5D,uBADY,OAAO,oBAAoB,EAAE,cAAc,CAsCrD;AAEF,2DAA2D;AAC3D,sBADY,OAAO,oBAAoB,EAAE,aAAa,CA8BpD;AAIF,8DAA8D;AAC9D,yBADY,OAAO,oBAAoB,EAAE,gBAAgB,CAkBvD;AAEF,qEAAqE;AACrE,gCADY,OAAO,oBAAoB,EAAE,uBAAuB,CAwB9D;AAEF,2FAA2F;AAC3F,kCADY,OAAO,oBAAoB,EAAE,yBAAyB,CAiJhE"}
package/impl/crud.d.mts DELETED
@@ -1,7 +0,0 @@
1
- /** @type { import('../schema/crud.mjs').CouchGetSchema } */
2
- export const get: import("../schema/crud.mjs").CouchGetSchema;
3
- /** @type { import('../schema/crud.mjs').CouchGetAtRevSchema } */
4
- export const getAtRev: import("../schema/crud.mjs").CouchGetAtRevSchema;
5
- /** @type { import('../schema/crud.mjs').CouchPutSchema } */
6
- export const put: import("../schema/crud.mjs").CouchPutSchema;
7
- //# sourceMappingURL=crud.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crud.d.mts","sourceRoot":"","sources":["crud.mjs"],"names":[],"mappings":"AAqDA,4DAA4D;AAC5D,kBADY,OAAO,oBAAoB,EAAE,cAAc,CAIrD;AAEF,iEAAiE;AACjE,uBADY,OAAO,oBAAoB,EAAE,mBAAmB,CAI1D;AAEF,4DAA4D;AAC5D,kBADY,OAAO,oBAAoB,EAAE,cAAc,CAqCrD"}
package/impl/errors.d.mts DELETED
@@ -1,43 +0,0 @@
1
- /**
2
- * @typedef {Object} NetworkError
3
- * @property {string} code - The error code
4
- * @property {string} [message] - Optional error message
5
- */
6
- export class NotFoundError extends Error {
7
- /**
8
- * @param {string} docId - The ID of the document that wasn't found
9
- * @param {string} [message] - Optional error message
10
- */
11
- constructor(docId: string, message?: string | undefined);
12
- docId: string;
13
- }
14
- export class RetryableError extends Error {
15
- /**
16
- * @param {number|undefined} statusCode - The HTTP status code to check
17
- * @returns {boolean} Whether the status code is retryable
18
- */
19
- static isRetryableStatusCode(statusCode: number | undefined): boolean;
20
- /**
21
- * @param {NetworkError | unknown} err - The network error to handle
22
- * @throws {RetryableError} If the error is retryable
23
- * @throws {Error} If the error is not retryable
24
- */
25
- static handleNetworkError(err: NetworkError | unknown): void;
26
- /**
27
- * @param {string} message - The error message
28
- * @param {number|undefined} statusCode - The HTTP status code
29
- */
30
- constructor(message: string, statusCode: number | undefined);
31
- statusCode: number | undefined;
32
- }
33
- export type NetworkError = {
34
- /**
35
- * - The error code
36
- */
37
- code: string;
38
- /**
39
- * - Optional error message
40
- */
41
- message?: string | undefined;
42
- };
43
- //# sourceMappingURL=errors.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["errors.mjs"],"names":[],"mappings":"AAEA;;;;GAIG;AAEH;IACE;;;OAGG;IACH,mBAHW,MAAM,gCAOhB;IADC,cAAkB;CAErB;AAED;IAWE;;;OAGG;IACH,yCAHW,MAAM,GAAC,SAAS,GACd,OAAO,CAKnB;IAED;;;;OAIG;IACH,+BAJW,YAAY,GAAG,OAAO,QAsBhC;IA1CD;;;OAGG;IACH,qBAHW,MAAM,cACN,MAAM,GAAC,SAAS,EAM1B;IADC,+BAA4B;CAoC/B;;;;;UA5Da,MAAM"}
package/impl/logger.d.mts DELETED
@@ -1,32 +0,0 @@
1
- /**
2
- * @typedef {Object} Logger
3
- * @property {(...args: any[]) => void} error - Log error messages
4
- * @property {(...args: any[]) => void} warn - Log warning messages
5
- * @property {(...args: any[]) => void} info - Log info messages
6
- * @property {(...args: any[]) => void} debug - Log debug messages
7
- */
8
- /**
9
- * Creates a unified logger interface that works with both function and object-style loggers
10
- * @param {import('../schema/config.mjs').CouchConfigSchema} config
11
- * @returns {Logger} Normalized logger interface
12
- */
13
- export function createLogger(config: import("../schema/config.mjs").CouchConfigSchema): Logger;
14
- export type Logger = {
15
- /**
16
- * - Log error messages
17
- */
18
- error: (...args: any[]) => void;
19
- /**
20
- * - Log warning messages
21
- */
22
- warn: (...args: any[]) => void;
23
- /**
24
- * - Log info messages
25
- */
26
- info: (...args: any[]) => void;
27
- /**
28
- * - Log debug messages
29
- */
30
- debug: (...args: any[]) => void;
31
- };
32
- //# sourceMappingURL=logger.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.d.mts","sourceRoot":"","sources":["logger.mjs"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;;GAIG;AACH,qCAHW,OAAO,sBAAsB,EAAE,iBAAiB,GAC9C,MAAM,CA+ClB;;;;;WAxDa,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;UACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;UACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;WACxB,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI"}
package/impl/patch.d.mts DELETED
@@ -1,6 +0,0 @@
1
- export function sleep(ms: any): Promise<any>;
2
- /** @type { import('../schema/patch.mjs').PatchSchema } */
3
- export const patch: import("../schema/patch.mjs").PatchSchema;
4
- /** @type { import('../schema/patch.mjs').PatchDangerouslySchema } */
5
- export const patchDangerously: import("../schema/patch.mjs").PatchDangerouslySchema;
6
- //# sourceMappingURL=patch.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patch.d.mts","sourceRoot":"","sources":["patch.mjs"],"names":[],"mappings":"AAIO,6CAAmE;AAE1E,0DAA0D;AAC1D,oBADY,OAAO,qBAAqB,EAAE,WAAW,CAmBnD;AAEF,qEAAqE;AACrE,+BADY,OAAO,qBAAqB,EAAE,sBAAsB,CA4D9D"}
package/impl/query.d.mts DELETED
@@ -1,195 +0,0 @@
1
- /**
2
- * @param {{ [key: string]: any }} options - The options object containing query parameters.
3
- * @param {string[]} params - The list of parameter names to include in the query string.
4
- */
5
- /**
6
- * @param {{ [key: string]: any }} options
7
- * @param {string[]} params
8
- * @returns {string}
9
- */
10
- export function queryString(options: {
11
- [key: string]: any;
12
- } | undefined, params: string[]): string;
13
- /**
14
- * @type { z.infer<SimpleViewQuery> }
15
- * @param {import('../schema/config.mjs').CouchConfigSchema} config
16
- * @param {string} view
17
- * @param {import('../schema/query.mjs').SimpleViewOptionsSchema} [options]
18
- */
19
- export const query: z.infer<z.ZodFunction<z.ZodTuple<[z.ZodObject<{
20
- throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
21
- couch: z.ZodString;
22
- bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
23
- maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
24
- initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
25
- backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
26
- useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
27
- logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
28
- error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
29
- warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
30
- info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
31
- debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
32
- }, "strip", z.ZodTypeAny, {
33
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
34
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
35
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
36
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
37
- }, {
38
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
39
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
40
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
41
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
42
- }>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
43
- _normalizedLogger: z.ZodOptional<z.ZodAny>;
44
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
45
- throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
46
- couch: z.ZodString;
47
- bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
48
- maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
49
- initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
50
- backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
51
- useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
52
- logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
53
- error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
54
- warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
55
- info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
56
- debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
57
- }, "strip", z.ZodTypeAny, {
58
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
59
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
60
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
61
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
62
- }, {
63
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
64
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
65
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
66
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
67
- }>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
68
- _normalizedLogger: z.ZodOptional<z.ZodAny>;
69
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
70
- throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
71
- couch: z.ZodString;
72
- bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
73
- maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
74
- initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
75
- backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
76
- useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
77
- logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
78
- error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
79
- warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
80
- info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
81
- debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
82
- }, "strip", z.ZodTypeAny, {
83
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
84
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
85
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
86
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
87
- }, {
88
- error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
89
- warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
90
- info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
91
- debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
92
- }>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
93
- _normalizedLogger: z.ZodOptional<z.ZodAny>;
94
- }, z.ZodTypeAny, "passthrough">>, z.ZodString, z.ZodOptional<z.ZodObject<{
95
- startkey: z.ZodOptional<z.ZodAny>;
96
- endkey: z.ZodOptional<z.ZodAny>;
97
- descending: z.ZodOptional<z.ZodBoolean>;
98
- skip: z.ZodOptional<z.ZodNumber>;
99
- limit: z.ZodOptional<z.ZodNumber>;
100
- key: z.ZodOptional<z.ZodAny>;
101
- keys: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
102
- include_docs: z.ZodOptional<z.ZodBoolean>;
103
- reduce: z.ZodOptional<z.ZodBoolean>;
104
- group: z.ZodOptional<z.ZodBoolean>;
105
- group_level: z.ZodOptional<z.ZodNumber>;
106
- }, "strip", z.ZodTypeAny, {
107
- startkey?: any;
108
- endkey?: any;
109
- descending?: boolean | undefined;
110
- skip?: number | undefined;
111
- limit?: number | undefined;
112
- key?: any;
113
- keys?: any[] | undefined;
114
- include_docs?: boolean | undefined;
115
- reduce?: boolean | undefined;
116
- group?: boolean | undefined;
117
- group_level?: number | undefined;
118
- }, {
119
- startkey?: any;
120
- endkey?: any;
121
- descending?: boolean | undefined;
122
- skip?: number | undefined;
123
- limit?: number | undefined;
124
- key?: any;
125
- keys?: any[] | undefined;
126
- include_docs?: boolean | undefined;
127
- reduce?: boolean | undefined;
128
- group?: boolean | undefined;
129
- group_level?: number | undefined;
130
- }>>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
131
- error: z.ZodOptional<z.ZodString>;
132
- rows: z.ZodArray<z.ZodObject<{
133
- id: z.ZodOptional<z.ZodString>;
134
- key: z.ZodNullable<z.ZodAny>;
135
- value: z.ZodNullable<z.ZodAny>;
136
- doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
137
- error: z.ZodOptional<z.ZodString>;
138
- }, "strip", z.ZodTypeAny, {
139
- id?: string | undefined;
140
- key?: any;
141
- value?: any;
142
- doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
143
- error?: string | undefined;
144
- }, {
145
- id?: string | undefined;
146
- key?: any;
147
- value?: any;
148
- doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
149
- error?: string | undefined;
150
- }>, "many">;
151
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
152
- error: z.ZodOptional<z.ZodString>;
153
- rows: z.ZodArray<z.ZodObject<{
154
- id: z.ZodOptional<z.ZodString>;
155
- key: z.ZodNullable<z.ZodAny>;
156
- value: z.ZodNullable<z.ZodAny>;
157
- doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
158
- error: z.ZodOptional<z.ZodString>;
159
- }, "strip", z.ZodTypeAny, {
160
- id?: string | undefined;
161
- key?: any;
162
- value?: any;
163
- doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
164
- error?: string | undefined;
165
- }, {
166
- id?: string | undefined;
167
- key?: any;
168
- value?: any;
169
- doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
170
- error?: string | undefined;
171
- }>, "many">;
172
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
173
- error: z.ZodOptional<z.ZodString>;
174
- rows: z.ZodArray<z.ZodObject<{
175
- id: z.ZodOptional<z.ZodString>;
176
- key: z.ZodNullable<z.ZodAny>;
177
- value: z.ZodNullable<z.ZodAny>;
178
- doc: z.ZodOptional<z.ZodNullable<z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>>;
179
- error: z.ZodOptional<z.ZodString>;
180
- }, "strip", z.ZodTypeAny, {
181
- id?: string | undefined;
182
- key?: any;
183
- value?: any;
184
- doc?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
185
- error?: string | undefined;
186
- }, {
187
- id?: string | undefined;
188
- key?: any;
189
- value?: any;
190
- doc?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
191
- error?: string | undefined;
192
- }>, "many">;
193
- }, z.ZodTypeAny, "passthrough">>>>>;
194
- import { z } from 'zod';
195
- //# sourceMappingURL=query.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"query.d.mts","sourceRoot":"","sources":["query.mjs"],"names":[],"mappings":"AAsFA;;;GAGG;AACH;;;;GAIG;AACH,qCAJW;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,sBACtB,MAAM,EAAE,GACN,MAAM,CAoBlB;AAtGD;;;;;GAKG;AACH,oBALW,CAAC,CAAC,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAAiB,CAwEjC;kBAlFgB,KAAK"}
@@ -1,94 +0,0 @@
1
- /**
2
- * @typedef {Object} QueryOptions
3
- * @property {any} [key] - Exact key to match
4
- * @property {any} [startkey] - Start of key range
5
- * @property {any} [endkey] - End of key range
6
- * @property {boolean} [reduce] - Whether to use reduce function
7
- * @property {boolean} [group] - Whether to group results
8
- * @property {number} [group_level] - Level at which to group
9
- * @property {string} [stale] - Stale parameter value
10
- * @property {number} [limit] - Max number of results
11
- */
12
- export class QueryBuilder {
13
- /**
14
- * @param {any} key
15
- * @returns {QueryBuilder}
16
- */
17
- key(key: any): QueryBuilder;
18
- /**
19
- * @param {any} startkey
20
- * @returns {QueryBuilder}
21
- */
22
- startKey(startkey: any): QueryBuilder;
23
- /**
24
- * @param {any} endkey
25
- * @returns {QueryBuilder}
26
- */
27
- endKey(endkey: any): QueryBuilder;
28
- /**
29
- * @param {boolean} reduce
30
- * @returns {QueryBuilder}
31
- */
32
- reduce(reduce?: boolean): QueryBuilder;
33
- /**
34
- * @param {boolean} group
35
- * @returns {QueryBuilder}
36
- */
37
- group(group?: boolean): QueryBuilder;
38
- /**
39
- * @param {number} level
40
- * @returns {QueryBuilder}
41
- */
42
- groupLevel(level: number): QueryBuilder;
43
- /**
44
- * @param {string} stale
45
- * @returns {QueryBuilder}
46
- */
47
- stale(stale: string): QueryBuilder;
48
- /**
49
- * @param {number} limit
50
- * @returns {QueryBuilder}
51
- */
52
- limit(limit: number): QueryBuilder;
53
- /**
54
- * @returns {QueryOptions}
55
- */
56
- build(): QueryOptions;
57
- #private;
58
- }
59
- export function createQuery(): QueryBuilder;
60
- export type QueryOptions = {
61
- /**
62
- * - Exact key to match
63
- */
64
- key?: any;
65
- /**
66
- * - Start of key range
67
- */
68
- startkey?: any;
69
- /**
70
- * - End of key range
71
- */
72
- endkey?: any;
73
- /**
74
- * - Whether to use reduce function
75
- */
76
- reduce?: boolean | undefined;
77
- /**
78
- * - Whether to group results
79
- */
80
- group?: boolean | undefined;
81
- /**
82
- * - Level at which to group
83
- */
84
- group_level?: number | undefined;
85
- /**
86
- * - Stale parameter value
87
- */
88
- stale?: string | undefined;
89
- /**
90
- * - Max number of results
91
- */
92
- limit?: number | undefined;
93
- };
94
- //# sourceMappingURL=queryBuilder.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"queryBuilder.d.mts","sourceRoot":"","sources":["queryBuilder.mjs"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AAEH;IAIE;;;OAGG;IACH,SAHW,GAAG,GACD,YAAY,CAKxB;IAED;;;OAGG;IACH,mBAHW,GAAG,GACD,YAAY,CAKxB;IAED;;;OAGG;IACH,eAHW,GAAG,GACD,YAAY,CAKxB;IAED;;;OAGG;IACH,gBAHW,OAAO,GACL,YAAY,CAKxB;IAED;;;OAGG;IACH,cAHW,OAAO,GACL,YAAY,CAKxB;IAED;;;OAGG;IACH,kBAHW,MAAM,GACJ,YAAY,CAKxB;IAED;;;OAGG;IACH,aAHW,MAAM,GACJ,YAAY,CAKxB;IAED;;;OAGG;IACH,aAHW,MAAM,GACJ,YAAY,CAKxB;IAED;;OAEG;IACH,SAFa,YAAY,CAIxB;;CACF;AAEM,4CAA4C;;;;;UA9FrC,GAAG;;;;eACH,GAAG;;;;aACH,GAAG"}
package/impl/retry.d.mts DELETED
@@ -1,2 +0,0 @@
1
- export function withRetry(fn: any, options?: {}): (...args: any[]) => Promise<any>;
2
- //# sourceMappingURL=retry.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retry.d.mts","sourceRoot":"","sources":["retry.mjs"],"names":[],"mappings":"AAGA,mFAmCC"}
package/impl/stream.d.mts DELETED
@@ -1,3 +0,0 @@
1
- /** @type { import('../schema/stream.mjs').SimpleViewQueryStreamSchema } queryStream */
2
- export const queryStream: import("../schema/stream.mjs").SimpleViewQueryStreamSchema;
3
- //# sourceMappingURL=stream.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.d.mts","sourceRoot":"","sources":["stream.mjs"],"names":[],"mappings":"AASA,uFAAuF;AACvF,0BADY,OAAO,sBAAsB,EAAE,2BAA2B,CAwFpE"}
@@ -1,8 +0,0 @@
1
- export class TrackedEmitter extends EventEmitter<[never]> {
2
- constructor(options: any);
3
- delay: any;
4
- emit(event: any, ...args: any[]): Promise<any>;
5
- }
6
- export function setupEmitter(config: any): any;
7
- import { EventEmitter } from 'events';
8
- //# sourceMappingURL=trackedEmitter.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"trackedEmitter.d.mts","sourceRoot":"","sources":["trackedEmitter.mjs"],"names":[],"mappings":"AAEA;IAEE,0BAGC;IADoB,WAA0B;IAG/C,+CAiBC;CACF;AAEM,+CAGN;6BAhC4B,QAAQ"}
@@ -1,57 +0,0 @@
1
- export class TransactionSetupError extends Error {
2
- /**
3
- * @param {string} message
4
- * @param {Record<string, any>} details
5
- */
6
- constructor(message: string, details?: Record<string, any>);
7
- details: Record<string, any>;
8
- }
9
- export class TransactionVersionConflictError extends Error {
10
- /**
11
- * @param {string[]} conflictingIds
12
- */
13
- constructor(conflictingIds: string[]);
14
- conflictingIds: string[];
15
- }
16
- export class TransactionBulkOperationError extends Error {
17
- /**
18
- * @param {Array<{ok?: boolean|null, id?: string|null, rev?: string|null, error?: string|null, reason?: string|null}>} failedDocs
19
- */
20
- constructor(failedDocs: Array<{
21
- ok?: boolean | null;
22
- id?: string | null;
23
- rev?: string | null;
24
- error?: string | null;
25
- reason?: string | null;
26
- }>);
27
- failedDocs: {
28
- ok?: boolean | null;
29
- id?: string | null;
30
- rev?: string | null;
31
- error?: string | null;
32
- reason?: string | null;
33
- }[];
34
- }
35
- export class TransactionRollbackError extends Error {
36
- /**
37
- * @param {string} message
38
- * @param {Error} originalError
39
- * @param {Array<{ok?: boolean|null, id?: string|null, rev?: string|null, error?: string|null, reason?: string|null}>} rollbackResults
40
- */
41
- constructor(message: string, originalError: Error, rollbackResults: Array<{
42
- ok?: boolean | null;
43
- id?: string | null;
44
- rev?: string | null;
45
- error?: string | null;
46
- reason?: string | null;
47
- }>);
48
- originalError: Error;
49
- rollbackResults: {
50
- ok?: boolean | null;
51
- id?: string | null;
52
- rev?: string | null;
53
- error?: string | null;
54
- reason?: string | null;
55
- }[];
56
- }
57
- //# sourceMappingURL=transactionErrors.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"transactionErrors.d.mts","sourceRoot":"","sources":["transactionErrors.mjs"],"names":[],"mappings":"AAAA;IACE;;;OAGG;IACH,qBAHW,MAAM,YACN,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAM7B;IADC,6BAAsB;CAEzB;AAED;IACE;;OAEG;IACH,4BAFW,MAAM,EAAE,EAMlB;IADC,yBAAoC;CAEvC;AAED;IACE;;OAEG;IACH,wBAFW,KAAK,CAAC;QAAC,EAAE,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAC,CAAC,EAMpH;IADC;aALqB,OAAO,GAAC,IAAI;aAAO,MAAM,GAAC,IAAI;cAAQ,MAAM,GAAC,IAAI;gBAAU,MAAM,GAAC,IAAI;iBAAW,MAAM,GAAC,IAAI;QAKrF;CAE/B;AAED;IACE;;;;OAIG;IACH,qBAJW,MAAM,iBACN,KAAK,mBACL,KAAK,CAAC;QAAC,EAAE,CAAC,EAAE,OAAO,GAAC,IAAI,CAAC;QAAC,EAAE,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAC,IAAI,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,GAAC,IAAI,CAAA;KAAC,CAAC,EAOpH;IAFC,qBAAkC;IAClC;aANqB,OAAO,GAAC,IAAI;aAAO,MAAM,GAAC,IAAI;cAAQ,MAAM,GAAC,IAAI;gBAAU,MAAM,GAAC,IAAI;iBAAW,MAAM,GAAC,IAAI;QAM3E;CAEzC"}