hide-a-bed 5.1.4 → 5.2.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 +13 -1
- package/cjs/impl/util.cjs +64 -0
- package/cjs/index.cjs +7 -2
- package/cjs/schema/bind.cjs +3 -1
- package/cjs/schema/query.cjs +2 -2
- package/cjs/schema/util.cjs +39 -0
- package/impl/util.d.mts +3 -0
- package/impl/util.d.mts.map +1 -0
- package/impl/util.mjs +36 -0
- package/index.d.mts +4 -1
- package/index.d.mts.map +1 -1
- package/index.mjs +7 -2
- package/package.json +1 -1
- package/schema/bind.d.mts +222 -0
- package/schema/bind.d.mts.map +1 -1
- package/schema/bind.mjs +3 -1
- package/schema/query.mjs +2 -2
- package/schema/util.d.mts +160 -0
- package/schema/util.d.mts.map +1 -0
- package/schema/util.mjs +35 -0
package/README.md
CHANGED
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
And some utility apis
|
|
16
16
|
|
|
17
|
+
- [`getDBInfo()`](#getDBInfo)
|
|
17
18
|
- [`createQuery()`](#createquery) 🍭
|
|
18
19
|
- [`withRetry()`](#withretry)
|
|
19
20
|
|
|
@@ -48,7 +49,7 @@ If you need to force autocompletion/type-checking, you can add the following jsd
|
|
|
48
49
|
|
|
49
50
|
```
|
|
50
51
|
function doSomething (services)
|
|
51
|
-
/** @type { import('hide-a-bed
|
|
52
|
+
/** @type { import('hide-a-bed').DB} db */
|
|
52
53
|
const db = services.db;
|
|
53
54
|
```
|
|
54
55
|
|
|
@@ -394,6 +395,17 @@ try {
|
|
|
394
395
|
}
|
|
395
396
|
```
|
|
396
397
|
|
|
398
|
+
#### getDBInfo()
|
|
399
|
+
|
|
400
|
+
Get basic info about a db in couch
|
|
401
|
+
|
|
402
|
+
```
|
|
403
|
+
const config = { couch: 'http://localhost:5984/mydb' }
|
|
404
|
+
const result = await getDBInfo(config)
|
|
405
|
+
// result: { db_name: 'test', doc_count: 3232 }
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
|
|
397
409
|
### View Queries
|
|
398
410
|
|
|
399
411
|
#### query
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var util_exports = {};
|
|
30
|
+
__export(util_exports, {
|
|
31
|
+
getDBInfo: () => getDBInfo
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(util_exports);
|
|
34
|
+
var import_needle = __toESM(require("needle"), 1);
|
|
35
|
+
var import_errors = require("./errors.cjs");
|
|
36
|
+
var import_logger = require("./logger.cjs");
|
|
37
|
+
var import_util = require("../schema/util.cjs");
|
|
38
|
+
const opts = {
|
|
39
|
+
json: true,
|
|
40
|
+
headers: {
|
|
41
|
+
"Content-Type": "application/json"
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
const getDBInfo = import_util.GetDBInfo.implement(async (config) => {
|
|
45
|
+
const logger = (0, import_logger.createLogger)(config);
|
|
46
|
+
const url = `${config.couch}`;
|
|
47
|
+
let resp;
|
|
48
|
+
try {
|
|
49
|
+
resp = await (0, import_needle.default)("get", url, opts);
|
|
50
|
+
} catch (err) {
|
|
51
|
+
logger.error("Error during put operation:", err);
|
|
52
|
+
import_errors.RetryableError.handleNetworkError(err);
|
|
53
|
+
}
|
|
54
|
+
if (!resp) {
|
|
55
|
+
logger.error("No response received from put request");
|
|
56
|
+
throw new import_errors.RetryableError("no response", 503);
|
|
57
|
+
}
|
|
58
|
+
const result = resp.body;
|
|
59
|
+
if (import_errors.RetryableError.isRetryableStatusCode(resp.statusCode)) {
|
|
60
|
+
logger.warn(`Retryable status code received: ${resp.statusCode}`);
|
|
61
|
+
throw new import_errors.RetryableError(result.reason || "retryable error", resp.statusCode);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
});
|
package/cjs/index.cjs
CHANGED
|
@@ -28,6 +28,7 @@ __export(index_exports, {
|
|
|
28
28
|
createQuery: () => import_queryBuilder.createQuery,
|
|
29
29
|
get: () => import_crud.get,
|
|
30
30
|
getAtRev: () => import_crud.getAtRev,
|
|
31
|
+
getDBInfo: () => import_util.getDBInfo,
|
|
31
32
|
patch: () => import_patch.patch,
|
|
32
33
|
patchDangerously: () => import_patch.patchDangerously,
|
|
33
34
|
put: () => import_crud.put,
|
|
@@ -48,6 +49,7 @@ var import_watch = require("./impl/sugar/watch.cjs");
|
|
|
48
49
|
var import_query = require("./impl/query.cjs");
|
|
49
50
|
var import_stream = require("./impl/stream.cjs");
|
|
50
51
|
var import_queryBuilder = require("./impl/queryBuilder.cjs");
|
|
52
|
+
var import_util = require("./impl/util.cjs");
|
|
51
53
|
var import_retry = require("./impl/retry.cjs");
|
|
52
54
|
var import_bulk2 = require("./schema/bulk.cjs");
|
|
53
55
|
var import_config = require("./schema/config.cjs");
|
|
@@ -59,6 +61,7 @@ var import_lock2 = require("./schema/sugar/lock.cjs");
|
|
|
59
61
|
var import_watch2 = require("./schema/sugar/watch.cjs");
|
|
60
62
|
var import_crud2 = require("./schema/crud.cjs");
|
|
61
63
|
var import_bind = require("./schema/bind.cjs");
|
|
64
|
+
var import_util2 = require("./schema/util.cjs");
|
|
62
65
|
const schema = {
|
|
63
66
|
CouchConfig: import_config.CouchConfig,
|
|
64
67
|
SimpleViewQuery: import_query2.SimpleViewQuery,
|
|
@@ -85,7 +88,8 @@ const schema = {
|
|
|
85
88
|
RemoveLock: import_lock2.RemoveLock,
|
|
86
89
|
Changes: import_changes2.Changes,
|
|
87
90
|
ChangesOptions: import_changes2.ChangesOptions,
|
|
88
|
-
ChangesResponse: import_changes2.ChangesResponse
|
|
91
|
+
ChangesResponse: import_changes2.ChangesResponse,
|
|
92
|
+
GetDBInfo: import_util2.GetDBInfo
|
|
89
93
|
};
|
|
90
94
|
function doBind(config) {
|
|
91
95
|
const retryOptions = {
|
|
@@ -111,7 +115,8 @@ function doBind(config) {
|
|
|
111
115
|
createLock: import_lock.createLock.bind(null, config),
|
|
112
116
|
removeLock: import_lock.removeLock.bind(null, config),
|
|
113
117
|
watchDocs: import_watch.watchDocs.bind(null, config),
|
|
114
|
-
changes: import_changes.changes.bind(null, config)
|
|
118
|
+
changes: import_changes.changes.bind(null, config),
|
|
119
|
+
getDBInfo: config.bindWithRetry ? (0, import_retry.withRetry)(import_util.getDBInfo.bind(null, config), retryOptions) : import_util.getDBInfo.bind(null, config)
|
|
115
120
|
};
|
|
116
121
|
return result;
|
|
117
122
|
}
|
package/cjs/schema/bind.cjs
CHANGED
|
@@ -33,6 +33,7 @@ var import_stream = require("./stream.cjs");
|
|
|
33
33
|
var import_lock = require("./sugar/lock.cjs");
|
|
34
34
|
var import_changes = require("./changes.cjs");
|
|
35
35
|
var import_watch = require("./sugar/watch.cjs");
|
|
36
|
+
var import_util = require("./util.cjs");
|
|
36
37
|
const BindBase = import_zod.z.object({
|
|
37
38
|
bulkGet: import_bulk.BulkGetBound,
|
|
38
39
|
bulkSave: import_bulk.BulkSaveBound,
|
|
@@ -48,7 +49,8 @@ const BindBase = import_zod.z.object({
|
|
|
48
49
|
createLock: import_lock.CreateLockBound,
|
|
49
50
|
removeLock: import_lock.RemoveLockBound,
|
|
50
51
|
changes: import_changes.ChangesBound,
|
|
51
|
-
watchDocs: import_watch.WatchDocsBound
|
|
52
|
+
watchDocs: import_watch.WatchDocsBound,
|
|
53
|
+
getDBInfo: import_util.GetDBInfoBound
|
|
52
54
|
});
|
|
53
55
|
const RebindOptions = import_config.CouchConfig.omit({ couch: true });
|
|
54
56
|
const BindReturns = BindBase.extend({
|
package/cjs/schema/query.cjs
CHANGED
|
@@ -42,8 +42,8 @@ const SimpleViewOptions = import_zod.z.object({
|
|
|
42
42
|
startkey: import_zod.z.any().optional(),
|
|
43
43
|
endkey: import_zod.z.any().optional(),
|
|
44
44
|
descending: import_zod.z.boolean().optional().describe("sort results descending"),
|
|
45
|
-
skip: import_zod.z.number().
|
|
46
|
-
limit: import_zod.z.number().
|
|
45
|
+
skip: import_zod.z.number().nonnegative().optional().describe("skip this many rows"),
|
|
46
|
+
limit: import_zod.z.number().nonnegative().optional().describe("limit the results to this many rows"),
|
|
47
47
|
key: import_zod.z.any().optional(),
|
|
48
48
|
keys: import_zod.z.array(import_zod.z.any()).optional(),
|
|
49
49
|
include_docs: import_zod.z.boolean().optional().describe("join the id to the doc and return it"),
|
|
@@ -0,0 +1,39 @@
|
|
|
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 util_exports = {};
|
|
20
|
+
__export(util_exports, {
|
|
21
|
+
DBInfo: () => DBInfo,
|
|
22
|
+
GetDBInfo: () => GetDBInfo,
|
|
23
|
+
GetDBInfoBound: () => GetDBInfoBound
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(util_exports);
|
|
26
|
+
var import_zod = require("zod");
|
|
27
|
+
var import_config = require("./config.cjs");
|
|
28
|
+
const DBInfo = import_zod.z.object({
|
|
29
|
+
db_name: import_zod.z.string(),
|
|
30
|
+
doc_count: import_zod.z.number(),
|
|
31
|
+
update_seq: import_zod.z.number(),
|
|
32
|
+
compact_running: import_zod.z.boolean().nullish(),
|
|
33
|
+
disk_size: import_zod.z.number().nullish(),
|
|
34
|
+
committed_update_seq: import_zod.z.number().nullish()
|
|
35
|
+
}).passthrough();
|
|
36
|
+
const GetDBInfo = import_zod.z.function().args(
|
|
37
|
+
import_config.CouchConfig
|
|
38
|
+
).returns(import_zod.z.promise(DBInfo));
|
|
39
|
+
const GetDBInfoBound = import_zod.z.function().args().returns(import_zod.z.promise(DBInfo));
|
package/impl/util.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.mts","sourceRoot":"","sources":["util.mjs"],"names":[],"mappings":"AAaA,4DAA4D;AAC5D,wBADY,OAAO,oBAAoB,EAAE,eAAe,CAsBtD"}
|
package/impl/util.mjs
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
import needle from 'needle'
|
|
3
|
+
import { RetryableError, NotFoundError } from './errors.mjs'
|
|
4
|
+
import { createLogger } from './logger.mjs'
|
|
5
|
+
import { GetDBInfo } from '../schema/util.mjs'
|
|
6
|
+
|
|
7
|
+
const opts = {
|
|
8
|
+
json: true,
|
|
9
|
+
headers: {
|
|
10
|
+
'Content-Type': 'application/json'
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/** @type { import('../schema/util.mjs').GetDBInfoSchema} */
|
|
15
|
+
export const getDBInfo = GetDBInfo.implement(async (config) => {
|
|
16
|
+
const logger = createLogger(config)
|
|
17
|
+
const url = `${config.couch}`
|
|
18
|
+
let resp
|
|
19
|
+
try {
|
|
20
|
+
resp = await needle('get', url, opts)
|
|
21
|
+
} catch (err) {
|
|
22
|
+
logger.error('Error during put operation:', err)
|
|
23
|
+
RetryableError.handleNetworkError(err)
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (!resp) {
|
|
27
|
+
logger.error('No response received from put request')
|
|
28
|
+
throw new RetryableError('no response', 503)
|
|
29
|
+
}
|
|
30
|
+
const result = resp.body
|
|
31
|
+
if (RetryableError.isRetryableStatusCode(resp.statusCode)) {
|
|
32
|
+
logger.warn(`Retryable status code received: ${resp.statusCode}`)
|
|
33
|
+
throw new RetryableError(result.reason || 'retryable error', resp.statusCode)
|
|
34
|
+
}
|
|
35
|
+
return result
|
|
36
|
+
})
|
package/index.d.mts
CHANGED
|
@@ -33,7 +33,9 @@ export namespace schema {
|
|
|
33
33
|
export { Changes };
|
|
34
34
|
export { ChangesOptions };
|
|
35
35
|
export { ChangesResponse };
|
|
36
|
+
export { GetDBInfo };
|
|
36
37
|
}
|
|
38
|
+
import { getDBInfo } from './impl/util.mjs';
|
|
37
39
|
import { patch } from './impl/patch.mjs';
|
|
38
40
|
import { patchDangerously } from './impl/patch.mjs';
|
|
39
41
|
import { bulkRemove } from './impl/bulk.mjs';
|
|
@@ -73,5 +75,6 @@ import { RemoveLock } from './schema/sugar/lock.mjs';
|
|
|
73
75
|
import { Changes } from './schema/changes.mjs';
|
|
74
76
|
import { ChangesOptions } from './schema/changes.mjs';
|
|
75
77
|
import { ChangesResponse } from './schema/changes.mjs';
|
|
76
|
-
|
|
78
|
+
import { GetDBInfo } from './schema/util.mjs';
|
|
79
|
+
export { get, getAtRev, put, bulkGet, bulkSave, query, queryStream, getDBInfo, patch, patchDangerously, bulkRemove, bulkGetDictionary, bulkSaveTransaction, withRetry, createQuery, createLock, removeLock };
|
|
77
80
|
//# sourceMappingURL=index.d.mts.map
|
package/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["index.mjs"],"names":[],"mappings":"iBAmHe,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;oBAhHP,iBAAiB;yBAAjB,iBAAiB;oBAAjB,iBAAiB;wBADkC,iBAAiB;yBAAjB,iBAAiB;sBAMjF,kBAAkB;4BACZ,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BAErB,iBAAiB;sBANH,kBAAkB;iCAAlB,kBAAkB;2BAH4B,iBAAiB;kCAAjB,iBAAiB;oCAAjB,iBAAiB;AAwFvG,uDAAuD;AACvD,yBADY,OAAO,mBAAmB,EAAE,UAAU,CAuBhD;0BArGwB,kBAAkB;4BAFhB,yBAAyB;2BAJd,uBAAuB;2BAAvB,uBAAuB;kBAL5C,KAAK;4BAqBW,mBAAmB;4BARzB,qBAAqB;gCACQ,oBAAoB;wCAApB,oBAAoB;sCAEhC,qBAAqB;sBAArB,qBAAqB;yBAJoB,mBAAmB;wBAAnB,mBAAmB;2BAAnB,mBAAmB;kCAAnB,mBAAmB;oCAAnB,mBAAmB;yBAQ3B,mBAAmB;yBAAnB,mBAAmB;yBAAnB,mBAAmB;iCAAnB,mBAAmB;sBAHzD,oBAAoB;iCAApB,oBAAoB;8BAGkB,mBAAmB;qBAC/D,mBAAmB;qBAHK,yBAAyB;0BACzD,0BAA0B;4BADM,yBAAyB;2BAAzB,yBAAyB;2BAAzB,yBAAyB;wBAH1B,sBAAsB;+BAAtB,sBAAsB;gCAAtB,sBAAsB;0BAOrD,mBAAmB"}
|
package/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { watchDocs } from './impl/sugar/watch.mjs'
|
|
|
9
9
|
import { query } from './impl/query.mjs'
|
|
10
10
|
import { queryStream } from './impl/stream.mjs'
|
|
11
11
|
import { createQuery } from './impl/queryBuilder.mjs'
|
|
12
|
+
import { getDBInfo } from './impl/util.mjs'
|
|
12
13
|
import { withRetry } from './impl/retry.mjs'
|
|
13
14
|
import { BulkSave, BulkGet, BulkRemove, BulkGetDictionary, BulkSaveTransaction } from './schema/bulk.mjs'
|
|
14
15
|
import { CouchConfig } from './schema/config.mjs'
|
|
@@ -20,6 +21,7 @@ import { Lock, LockOptions, CreateLock, RemoveLock } from './schema/sugar/lock.m
|
|
|
20
21
|
import { WatchDocs } from './schema/sugar/watch.mjs'
|
|
21
22
|
import { CouchDoc, CouchDocResponse, CouchPut, CouchGet, CouchGetAtRev } from './schema/crud.mjs'
|
|
22
23
|
import { Bind, BindReturns } from './schema/bind.mjs'
|
|
24
|
+
import { GetDBInfo } from './schema/util.mjs'
|
|
23
25
|
|
|
24
26
|
const schema = {
|
|
25
27
|
CouchConfig,
|
|
@@ -47,7 +49,8 @@ const schema = {
|
|
|
47
49
|
RemoveLock,
|
|
48
50
|
Changes,
|
|
49
51
|
ChangesOptions,
|
|
50
|
-
ChangesResponse
|
|
52
|
+
ChangesResponse,
|
|
53
|
+
GetDBInfo
|
|
51
54
|
}
|
|
52
55
|
/**
|
|
53
56
|
* @param {import('./schema/config.mjs').CouchConfigSchema } config
|
|
@@ -78,7 +81,8 @@ function doBind (config) {
|
|
|
78
81
|
createLock: createLock.bind(null, config),
|
|
79
82
|
removeLock: removeLock.bind(null, config),
|
|
80
83
|
watchDocs: watchDocs.bind(null, config),
|
|
81
|
-
changes: changes.bind(null, config)
|
|
84
|
+
changes: changes.bind(null, config),
|
|
85
|
+
getDBInfo: config.bindWithRetry ? withRetry(getDBInfo.bind(null, config), retryOptions) : getDBInfo.bind(null, config)
|
|
82
86
|
}
|
|
83
87
|
|
|
84
88
|
return result
|
|
@@ -120,6 +124,7 @@ export {
|
|
|
120
124
|
query,
|
|
121
125
|
queryStream,
|
|
122
126
|
schema,
|
|
127
|
+
getDBInfo,
|
|
123
128
|
|
|
124
129
|
// sugar methods
|
|
125
130
|
patch,
|
package/package.json
CHANGED
package/schema/bind.d.mts
CHANGED
|
@@ -499,6 +499,28 @@ export const BindBase: z.ZodObject<{
|
|
|
499
499
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
500
500
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
501
501
|
}>>;
|
|
502
|
+
getDBInfo: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
503
|
+
db_name: z.ZodString;
|
|
504
|
+
doc_count: z.ZodNumber;
|
|
505
|
+
update_seq: z.ZodNumber;
|
|
506
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
507
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
508
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
509
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
510
|
+
db_name: z.ZodString;
|
|
511
|
+
doc_count: z.ZodNumber;
|
|
512
|
+
update_seq: z.ZodNumber;
|
|
513
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
514
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
515
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
516
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
517
|
+
db_name: z.ZodString;
|
|
518
|
+
doc_count: z.ZodNumber;
|
|
519
|
+
update_seq: z.ZodNumber;
|
|
520
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
521
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
522
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
523
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
502
524
|
}, "strip", z.ZodTypeAny, {
|
|
503
525
|
query: (args_0: string, args_1: {
|
|
504
526
|
startkey?: any;
|
|
@@ -670,6 +692,14 @@ export const BindBase: z.ZodObject<{
|
|
|
670
692
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
671
693
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
672
694
|
};
|
|
695
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
696
|
+
db_name: z.ZodString;
|
|
697
|
+
doc_count: z.ZodNumber;
|
|
698
|
+
update_seq: z.ZodNumber;
|
|
699
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
700
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
701
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
702
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
673
703
|
}, {
|
|
674
704
|
query: (args_0: string, args_1: {
|
|
675
705
|
startkey?: any;
|
|
@@ -841,6 +871,14 @@ export const BindBase: z.ZodObject<{
|
|
|
841
871
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
842
872
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
843
873
|
};
|
|
874
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
875
|
+
db_name: z.ZodString;
|
|
876
|
+
doc_count: z.ZodNumber;
|
|
877
|
+
update_seq: z.ZodNumber;
|
|
878
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
879
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
880
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
881
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
844
882
|
}>;
|
|
845
883
|
export const BindReturns: z.ZodObject<{
|
|
846
884
|
query: z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodOptional<z.ZodObject<{
|
|
@@ -1343,6 +1381,28 @@ export const BindReturns: z.ZodObject<{
|
|
|
1343
1381
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
1344
1382
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
1345
1383
|
}>>;
|
|
1384
|
+
getDBInfo: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
1385
|
+
db_name: z.ZodString;
|
|
1386
|
+
doc_count: z.ZodNumber;
|
|
1387
|
+
update_seq: z.ZodNumber;
|
|
1388
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1389
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1390
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1391
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1392
|
+
db_name: z.ZodString;
|
|
1393
|
+
doc_count: z.ZodNumber;
|
|
1394
|
+
update_seq: z.ZodNumber;
|
|
1395
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1396
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1397
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1398
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1399
|
+
db_name: z.ZodString;
|
|
1400
|
+
doc_count: z.ZodNumber;
|
|
1401
|
+
update_seq: z.ZodNumber;
|
|
1402
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1403
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1404
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1405
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1346
1406
|
options: z.ZodFunction<z.ZodTuple<[z.ZodObject<Omit<{
|
|
1347
1407
|
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1348
1408
|
couch: z.ZodString;
|
|
@@ -1919,6 +1979,28 @@ export const BindReturns: z.ZodObject<{
|
|
|
1919
1979
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
1920
1980
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
1921
1981
|
}>>;
|
|
1982
|
+
getDBInfo: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
1983
|
+
db_name: z.ZodString;
|
|
1984
|
+
doc_count: z.ZodNumber;
|
|
1985
|
+
update_seq: z.ZodNumber;
|
|
1986
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1987
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1988
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1989
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
1990
|
+
db_name: z.ZodString;
|
|
1991
|
+
doc_count: z.ZodNumber;
|
|
1992
|
+
update_seq: z.ZodNumber;
|
|
1993
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
1994
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1995
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
1996
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
1997
|
+
db_name: z.ZodString;
|
|
1998
|
+
doc_count: z.ZodNumber;
|
|
1999
|
+
update_seq: z.ZodNumber;
|
|
2000
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2001
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2002
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2003
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
1922
2004
|
}, "strip", z.ZodTypeAny, {
|
|
1923
2005
|
query: (args_0: string, args_1: {
|
|
1924
2006
|
startkey?: any;
|
|
@@ -2090,6 +2172,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2090
2172
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2091
2173
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2092
2174
|
};
|
|
2175
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
2176
|
+
db_name: z.ZodString;
|
|
2177
|
+
doc_count: z.ZodNumber;
|
|
2178
|
+
update_seq: z.ZodNumber;
|
|
2179
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2180
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2181
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2182
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2093
2183
|
}, {
|
|
2094
2184
|
query: (args_0: string, args_1: {
|
|
2095
2185
|
startkey?: any;
|
|
@@ -2261,6 +2351,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2261
2351
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2262
2352
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2263
2353
|
};
|
|
2354
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
2355
|
+
db_name: z.ZodString;
|
|
2356
|
+
doc_count: z.ZodNumber;
|
|
2357
|
+
update_seq: z.ZodNumber;
|
|
2358
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2359
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2360
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2361
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2264
2362
|
}>>;
|
|
2265
2363
|
}, "strip", z.ZodTypeAny, {
|
|
2266
2364
|
options: (args_0: z.objectInputType<Omit<{
|
|
@@ -2459,6 +2557,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2459
2557
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2460
2558
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2461
2559
|
};
|
|
2560
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
2561
|
+
db_name: z.ZodString;
|
|
2562
|
+
doc_count: z.ZodNumber;
|
|
2563
|
+
update_seq: z.ZodNumber;
|
|
2564
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2565
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2566
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2567
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2462
2568
|
};
|
|
2463
2569
|
query: (args_0: string, args_1: {
|
|
2464
2570
|
startkey?: any;
|
|
@@ -2630,6 +2736,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2630
2736
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2631
2737
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2632
2738
|
};
|
|
2739
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
2740
|
+
db_name: z.ZodString;
|
|
2741
|
+
doc_count: z.ZodNumber;
|
|
2742
|
+
update_seq: z.ZodNumber;
|
|
2743
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2744
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2745
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2746
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2633
2747
|
}, {
|
|
2634
2748
|
options: (args_0: z.objectOutputType<Omit<{
|
|
2635
2749
|
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -2827,6 +2941,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2827
2941
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2828
2942
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2829
2943
|
};
|
|
2944
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
2945
|
+
db_name: z.ZodString;
|
|
2946
|
+
doc_count: z.ZodNumber;
|
|
2947
|
+
update_seq: z.ZodNumber;
|
|
2948
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
2949
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2950
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
2951
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
2830
2952
|
};
|
|
2831
2953
|
query: (args_0: string, args_1: {
|
|
2832
2954
|
startkey?: any;
|
|
@@ -2998,6 +3120,14 @@ export const BindReturns: z.ZodObject<{
|
|
|
2998
3120
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
2999
3121
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
3000
3122
|
};
|
|
3123
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
3124
|
+
db_name: z.ZodString;
|
|
3125
|
+
doc_count: z.ZodNumber;
|
|
3126
|
+
update_seq: z.ZodNumber;
|
|
3127
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3128
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3129
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3130
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
3001
3131
|
}>;
|
|
3002
3132
|
/** @typedef { z.infer<typeof BindReturns> } BindReturnsSchema */
|
|
3003
3133
|
export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
@@ -3576,6 +3706,28 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
3576
3706
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
3577
3707
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
3578
3708
|
}>>;
|
|
3709
|
+
getDBInfo: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
3710
|
+
db_name: z.ZodString;
|
|
3711
|
+
doc_count: z.ZodNumber;
|
|
3712
|
+
update_seq: z.ZodNumber;
|
|
3713
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3714
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3715
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3716
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
3717
|
+
db_name: z.ZodString;
|
|
3718
|
+
doc_count: z.ZodNumber;
|
|
3719
|
+
update_seq: z.ZodNumber;
|
|
3720
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3721
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3722
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3723
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
3724
|
+
db_name: z.ZodString;
|
|
3725
|
+
doc_count: z.ZodNumber;
|
|
3726
|
+
update_seq: z.ZodNumber;
|
|
3727
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
3728
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3729
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
3730
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
3579
3731
|
options: z.ZodFunction<z.ZodTuple<[z.ZodObject<Omit<{
|
|
3580
3732
|
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
3581
3733
|
couch: z.ZodString;
|
|
@@ -4152,6 +4304,28 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
4152
4304
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4153
4305
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4154
4306
|
}>>;
|
|
4307
|
+
getDBInfo: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
4308
|
+
db_name: z.ZodString;
|
|
4309
|
+
doc_count: z.ZodNumber;
|
|
4310
|
+
update_seq: z.ZodNumber;
|
|
4311
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4312
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4313
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4314
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
4315
|
+
db_name: z.ZodString;
|
|
4316
|
+
doc_count: z.ZodNumber;
|
|
4317
|
+
update_seq: z.ZodNumber;
|
|
4318
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4319
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4320
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4321
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
4322
|
+
db_name: z.ZodString;
|
|
4323
|
+
doc_count: z.ZodNumber;
|
|
4324
|
+
update_seq: z.ZodNumber;
|
|
4325
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4326
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4327
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4328
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
4155
4329
|
}, "strip", z.ZodTypeAny, {
|
|
4156
4330
|
query: (args_0: string, args_1: {
|
|
4157
4331
|
startkey?: any;
|
|
@@ -4323,6 +4497,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
4323
4497
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4324
4498
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4325
4499
|
};
|
|
4500
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
4501
|
+
db_name: z.ZodString;
|
|
4502
|
+
doc_count: z.ZodNumber;
|
|
4503
|
+
update_seq: z.ZodNumber;
|
|
4504
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4505
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4506
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4507
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4326
4508
|
}, {
|
|
4327
4509
|
query: (args_0: string, args_1: {
|
|
4328
4510
|
startkey?: any;
|
|
@@ -4494,6 +4676,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
4494
4676
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4495
4677
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4496
4678
|
};
|
|
4679
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
4680
|
+
db_name: z.ZodString;
|
|
4681
|
+
doc_count: z.ZodNumber;
|
|
4682
|
+
update_seq: z.ZodNumber;
|
|
4683
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4684
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4685
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4686
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4497
4687
|
}>>;
|
|
4498
4688
|
}, "strip", z.ZodTypeAny, {
|
|
4499
4689
|
options: (args_0: z.objectInputType<Omit<{
|
|
@@ -4692,6 +4882,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
4692
4882
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4693
4883
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4694
4884
|
};
|
|
4885
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
4886
|
+
db_name: z.ZodString;
|
|
4887
|
+
doc_count: z.ZodNumber;
|
|
4888
|
+
update_seq: z.ZodNumber;
|
|
4889
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
4890
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4891
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
4892
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4695
4893
|
};
|
|
4696
4894
|
query: (args_0: string, args_1: {
|
|
4697
4895
|
startkey?: any;
|
|
@@ -4863,6 +5061,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
4863
5061
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4864
5062
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
4865
5063
|
};
|
|
5064
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectOutputType<{
|
|
5065
|
+
db_name: z.ZodString;
|
|
5066
|
+
doc_count: z.ZodNumber;
|
|
5067
|
+
update_seq: z.ZodNumber;
|
|
5068
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
5069
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5070
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5071
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
4866
5072
|
}, {
|
|
4867
5073
|
options: (args_0: z.objectOutputType<Omit<{
|
|
4868
5074
|
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -5060,6 +5266,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
5060
5266
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
5061
5267
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
5062
5268
|
};
|
|
5269
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
5270
|
+
db_name: z.ZodString;
|
|
5271
|
+
doc_count: z.ZodNumber;
|
|
5272
|
+
update_seq: z.ZodNumber;
|
|
5273
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
5274
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5275
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5276
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
5063
5277
|
};
|
|
5064
5278
|
query: (args_0: string, args_1: {
|
|
5065
5279
|
startkey?: any;
|
|
@@ -5231,6 +5445,14 @@ export const Bind: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
|
5231
5445
|
on: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
5232
5446
|
removeListener: (args_0: string, args_1: (args_0: any, ...args: unknown[]) => void, ...args: unknown[]) => any;
|
|
5233
5447
|
};
|
|
5448
|
+
getDBInfo: (...args: unknown[]) => Promise<z.objectInputType<{
|
|
5449
|
+
db_name: z.ZodString;
|
|
5450
|
+
doc_count: z.ZodNumber;
|
|
5451
|
+
update_seq: z.ZodNumber;
|
|
5452
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
5453
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5454
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
5455
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
5234
5456
|
}>>;
|
|
5235
5457
|
export type BindBaseSchema = z.infer<typeof BindBase>;
|
|
5236
5458
|
export type BindReturnsSchema = z.infer<typeof BindReturns>;
|
package/schema/bind.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bind.d.mts","sourceRoot":"","sources":["bind.mjs"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"bind.d.mts","sourceRoot":"","sources":["bind.mjs"],"names":[],"mappings":"AAaA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAuE;6BAVxD,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC;gCAQxB,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC;yBAG3B,CAAC,CAAC,KAAK,CAAC,OAAO,IAAI,CAAC;kBAzCjB,KAAK"}
|
package/schema/bind.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { SimpleViewQueryStreamBound } from './stream.mjs'
|
|
|
9
9
|
import { CreateLockBound, RemoveLockBound } from './sugar/lock.mjs'
|
|
10
10
|
import { ChangesBound } from './changes.mjs'
|
|
11
11
|
import { WatchDocsBound } from './sugar/watch.mjs'
|
|
12
|
+
import { GetDBInfoBound } from './util.mjs'
|
|
12
13
|
|
|
13
14
|
export const BindBase = z.object({
|
|
14
15
|
bulkGet: BulkGetBound,
|
|
@@ -25,7 +26,8 @@ export const BindBase = z.object({
|
|
|
25
26
|
createLock: CreateLockBound,
|
|
26
27
|
removeLock: RemoveLockBound,
|
|
27
28
|
changes: ChangesBound,
|
|
28
|
-
watchDocs: WatchDocsBound
|
|
29
|
+
watchDocs: WatchDocsBound,
|
|
30
|
+
getDBInfo: GetDBInfoBound
|
|
29
31
|
})
|
|
30
32
|
/** @typedef { z.infer<typeof BindBase> } BindBaseSchema */
|
|
31
33
|
|
package/schema/query.mjs
CHANGED
|
@@ -20,8 +20,8 @@ export const SimpleViewOptions = z.object({
|
|
|
20
20
|
startkey: z.any().optional(),
|
|
21
21
|
endkey: z.any().optional(),
|
|
22
22
|
descending: z.boolean().optional().describe('sort results descending'),
|
|
23
|
-
skip: z.number().
|
|
24
|
-
limit: z.number().
|
|
23
|
+
skip: z.number().nonnegative().optional().describe('skip this many rows'),
|
|
24
|
+
limit: z.number().nonnegative().optional().describe('limit the results to this many rows'),
|
|
25
25
|
key: z.any().optional(),
|
|
26
26
|
keys: z.array(z.any()).optional(),
|
|
27
27
|
include_docs: z.boolean().optional().describe('join the id to the doc and return it'),
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
/** example of dbinfo
|
|
2
|
+
* {
|
|
3
|
+
"db_name": "plumber",
|
|
4
|
+
"doc_count": 12712696,
|
|
5
|
+
"doc_del_count": 43,
|
|
6
|
+
"update_seq": 23873804,
|
|
7
|
+
"purge_seq": 0,
|
|
8
|
+
"compact_running": false,
|
|
9
|
+
"disk_size": 287263179958,
|
|
10
|
+
"data_size": 144202211934,
|
|
11
|
+
"instance_start_time": "1741900082995812",
|
|
12
|
+
"disk_format_version": 6,
|
|
13
|
+
"committed_update_seq": 23873801
|
|
14
|
+
} */
|
|
15
|
+
export const DBInfo: z.ZodObject<{
|
|
16
|
+
db_name: z.ZodString;
|
|
17
|
+
doc_count: z.ZodNumber;
|
|
18
|
+
update_seq: z.ZodNumber;
|
|
19
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
20
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
21
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
22
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
23
|
+
db_name: z.ZodString;
|
|
24
|
+
doc_count: z.ZodNumber;
|
|
25
|
+
update_seq: z.ZodNumber;
|
|
26
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
27
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
28
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
29
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
30
|
+
db_name: z.ZodString;
|
|
31
|
+
doc_count: z.ZodNumber;
|
|
32
|
+
update_seq: z.ZodNumber;
|
|
33
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
34
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
35
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
36
|
+
}, z.ZodTypeAny, "passthrough">>;
|
|
37
|
+
export const GetDBInfo: z.ZodFunction<z.ZodTuple<[z.ZodObject<{
|
|
38
|
+
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
39
|
+
couch: z.ZodString;
|
|
40
|
+
bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
41
|
+
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
42
|
+
initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
43
|
+
backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
44
|
+
useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
45
|
+
logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
46
|
+
error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
47
|
+
warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
48
|
+
info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
49
|
+
debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
50
|
+
}, "strip", z.ZodTypeAny, {
|
|
51
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
52
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
53
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
54
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
55
|
+
}, {
|
|
56
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
57
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
58
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
59
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
60
|
+
}>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
|
|
61
|
+
_normalizedLogger: z.ZodOptional<z.ZodAny>;
|
|
62
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
63
|
+
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
64
|
+
couch: z.ZodString;
|
|
65
|
+
bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
66
|
+
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
67
|
+
initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
68
|
+
backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
69
|
+
useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
70
|
+
logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
71
|
+
error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
72
|
+
warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
73
|
+
info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
74
|
+
debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
75
|
+
}, "strip", z.ZodTypeAny, {
|
|
76
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
77
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
78
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
79
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
80
|
+
}, {
|
|
81
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
82
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
83
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
84
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
85
|
+
}>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
|
|
86
|
+
_normalizedLogger: z.ZodOptional<z.ZodAny>;
|
|
87
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
88
|
+
throwOnGetNotFound: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
89
|
+
couch: z.ZodString;
|
|
90
|
+
bindWithRetry: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
91
|
+
maxRetries: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
92
|
+
initialDelay: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
93
|
+
backoffFactor: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
94
|
+
useConsoleLogger: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
95
|
+
logger: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
|
96
|
+
error: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
97
|
+
warn: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
98
|
+
info: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
99
|
+
debug: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
|
|
100
|
+
}, "strip", z.ZodTypeAny, {
|
|
101
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
102
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
103
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
104
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
105
|
+
}, {
|
|
106
|
+
error?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
107
|
+
warn?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
108
|
+
info?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
109
|
+
debug?: ((args_0: any, ...args: unknown[]) => void) | undefined;
|
|
110
|
+
}>, z.ZodFunction<z.ZodTuple<[z.ZodString, z.ZodAny], z.ZodUnknown>, z.ZodVoid>]>>;
|
|
111
|
+
_normalizedLogger: z.ZodOptional<z.ZodAny>;
|
|
112
|
+
}, z.ZodTypeAny, "passthrough">>], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
113
|
+
db_name: z.ZodString;
|
|
114
|
+
doc_count: z.ZodNumber;
|
|
115
|
+
update_seq: z.ZodNumber;
|
|
116
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
117
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
118
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
119
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
120
|
+
db_name: z.ZodString;
|
|
121
|
+
doc_count: z.ZodNumber;
|
|
122
|
+
update_seq: z.ZodNumber;
|
|
123
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
124
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
125
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
126
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
127
|
+
db_name: z.ZodString;
|
|
128
|
+
doc_count: z.ZodNumber;
|
|
129
|
+
update_seq: z.ZodNumber;
|
|
130
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
131
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
132
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
133
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
134
|
+
/** @typedef { z.infer<typeof GetDBInfo> } GetDBInfoSchema */
|
|
135
|
+
export const GetDBInfoBound: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodPromise<z.ZodObject<{
|
|
136
|
+
db_name: z.ZodString;
|
|
137
|
+
doc_count: z.ZodNumber;
|
|
138
|
+
update_seq: z.ZodNumber;
|
|
139
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
140
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
141
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
142
|
+
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
143
|
+
db_name: z.ZodString;
|
|
144
|
+
doc_count: z.ZodNumber;
|
|
145
|
+
update_seq: z.ZodNumber;
|
|
146
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
147
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
148
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
149
|
+
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
150
|
+
db_name: z.ZodString;
|
|
151
|
+
doc_count: z.ZodNumber;
|
|
152
|
+
update_seq: z.ZodNumber;
|
|
153
|
+
compact_running: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
|
|
154
|
+
disk_size: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
155
|
+
committed_update_seq: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
156
|
+
}, z.ZodTypeAny, "passthrough">>>>;
|
|
157
|
+
export type GetDBInfoSchema = z.infer<typeof GetDBInfo>;
|
|
158
|
+
export type GetDBInfoBoundSchema = z.infer<typeof GetDBInfoBound>;
|
|
159
|
+
import { z } from 'zod';
|
|
160
|
+
//# sourceMappingURL=util.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.mts","sourceRoot":"","sources":["util.mjs"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;IAaI;AAEJ;;;;;;;;;;;;;;;;;;;;;iCAOgB;AAEhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mCAE4B;AAC5B,6DAA6D;AAE7D;;;;;;;;;;;;;;;;;;;;;mCAC4B;8BAHb,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC;mCAIzB,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC;kBAlC3B,KAAK"}
|
package/schema/util.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { z } from 'zod'
|
|
2
|
+
import { CouchConfig } from './config.mjs'
|
|
3
|
+
|
|
4
|
+
/** example of dbinfo
|
|
5
|
+
* {
|
|
6
|
+
"db_name": "plumber",
|
|
7
|
+
"doc_count": 12712696,
|
|
8
|
+
"doc_del_count": 43,
|
|
9
|
+
"update_seq": 23873804,
|
|
10
|
+
"purge_seq": 0,
|
|
11
|
+
"compact_running": false,
|
|
12
|
+
"disk_size": 287263179958,
|
|
13
|
+
"data_size": 144202211934,
|
|
14
|
+
"instance_start_time": "1741900082995812",
|
|
15
|
+
"disk_format_version": 6,
|
|
16
|
+
"committed_update_seq": 23873801
|
|
17
|
+
} */
|
|
18
|
+
|
|
19
|
+
export const DBInfo = z.object({
|
|
20
|
+
db_name: z.string(),
|
|
21
|
+
doc_count: z.number(),
|
|
22
|
+
update_seq: z.number(),
|
|
23
|
+
compact_running: z.boolean().nullish(),
|
|
24
|
+
disk_size: z.number().nullish(),
|
|
25
|
+
committed_update_seq: z.number().nullish()
|
|
26
|
+
}).passthrough()
|
|
27
|
+
|
|
28
|
+
export const GetDBInfo = z.function().args(
|
|
29
|
+
CouchConfig,
|
|
30
|
+
).returns(z.promise(DBInfo))
|
|
31
|
+
/** @typedef { z.infer<typeof GetDBInfo> } GetDBInfoSchema */
|
|
32
|
+
|
|
33
|
+
export const GetDBInfoBound = z.function().args(
|
|
34
|
+
).returns(z.promise(DBInfo))
|
|
35
|
+
/** @typedef { z.infer<typeof GetDBInfoBound> } GetDBInfoBoundSchema */
|