hide-a-bed 7.1.0 → 7.1.1

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.
@@ -1,92 +1,90 @@
1
- import { RetryableError } from "./errors.mts";
2
- import type { RequestOptions } from "../../schema/request.mts";
3
- import { composeAbortSignal } from "./request.mts";
1
+ import { RetryableError } from './errors.mts'
2
+ import type { RequestOptions } from '../../schema/request.mts'
3
+ import { composeAbortSignal } from './request.mts'
4
4
 
5
- export type HttpMethod = "DELETE" | "GET" | "HEAD" | "POST" | "PUT";
5
+ export type HttpMethod = 'DELETE' | 'GET' | 'HEAD' | 'POST' | 'PUT'
6
6
 
7
- type NativeFetchBody = RequestInit["body"];
7
+ type NativeFetchBody = RequestInit['body']
8
8
 
9
9
  export type FetchBody =
10
10
  | NativeFetchBody
11
11
  | Record<string, unknown>
12
12
  | Array<unknown>
13
13
  | null
14
- | undefined;
14
+ | undefined
15
15
 
16
16
  export type FetchAuth = {
17
- password: string;
18
- username: string;
19
- };
17
+ password: string
18
+ username: string
19
+ }
20
20
 
21
21
  export type FetchResult<TBody> = {
22
- body: TBody;
23
- headers: Headers;
24
- statusCode: number;
25
- };
22
+ body: TBody
23
+ headers: Headers
24
+ statusCode: number
25
+ }
26
26
 
27
27
  export type FetchRequestOptions = {
28
- auth?: FetchAuth;
29
- body?: FetchBody;
30
- headers?: Record<string, string>;
31
- method: HttpMethod;
28
+ auth?: FetchAuth
29
+ body?: FetchBody
30
+ headers?: Record<string, string>
31
+ method: HttpMethod
32
32
  operation?:
33
- | "get"
34
- | "getAtRev"
35
- | "getDBInfo"
36
- | "headDB"
37
- | "patch"
38
- | "patchDangerously"
39
- | "put"
40
- | "query"
41
- | "queryStream"
42
- | "remove"
43
- | "request"
44
- | "watchDocs";
45
- request?: RequestOptions;
46
- signal?: AbortSignal;
47
- url: string | URL;
48
- };
33
+ | 'get'
34
+ | 'getAtRev'
35
+ | 'getDBInfo'
36
+ | 'headDB'
37
+ | 'patch'
38
+ | 'patchDangerously'
39
+ | 'put'
40
+ | 'query'
41
+ | 'queryStream'
42
+ | 'remove'
43
+ | 'request'
44
+ | 'watchDocs'
45
+ request?: RequestOptions
46
+ signal?: AbortSignal
47
+ url: string | URL
48
+ }
49
49
 
50
50
  const JSON_HEADERS = {
51
- "Content-Type": "application/json",
52
- } as const;
51
+ 'Content-Type': 'application/json'
52
+ } as const
53
53
 
54
54
  const hasHeader = (headers: Record<string, string>, name: string) => {
55
- const expected = name.toLowerCase();
56
- return Object.keys(headers).some(
57
- (header) => header.toLowerCase() === expected,
58
- );
59
- };
55
+ const expected = name.toLowerCase()
56
+ return Object.keys(headers).some(header => header.toLowerCase() === expected)
57
+ }
60
58
 
61
59
  const toBasicAuthHeader = ({ username, password }: FetchAuth) => {
62
- const token = Buffer.from(`${username}:${password}`).toString("base64");
63
- return `Basic ${token}`;
64
- };
60
+ const token = Buffer.from(`${username}:${password}`).toString('base64')
61
+ return `Basic ${token}`
62
+ }
65
63
 
66
64
  const prepareRequest = (options: FetchRequestOptions) => {
67
- const auth = options.auth;
68
- const headers = { ...(options.headers ?? {}) };
65
+ const auth = options.auth
66
+ const headers = { ...(options.headers ?? {}) }
69
67
 
70
- if (auth && !hasHeader(headers, "Authorization")) {
71
- headers.Authorization = toBasicAuthHeader(auth);
68
+ if (auth && !hasHeader(headers, 'Authorization')) {
69
+ headers.Authorization = toBasicAuthHeader(auth)
72
70
  }
73
71
 
74
- return { headers };
75
- };
72
+ return { headers }
73
+ }
76
74
 
77
75
  const isAbortError = (err: unknown): err is DOMException => {
78
- return err instanceof DOMException && err.name === "AbortError";
79
- };
76
+ return err instanceof DOMException && err.name === 'AbortError'
77
+ }
80
78
 
81
79
  const isTimeoutError = (err: unknown): err is DOMException => {
82
- return err instanceof DOMException && err.name === "TimeoutError";
83
- };
80
+ return err instanceof DOMException && err.name === 'TimeoutError'
81
+ }
84
82
 
85
83
  const encodeBody = (body: FetchBody): NativeFetchBody | undefined => {
86
- if (body == null) return undefined;
84
+ if (body == null) return undefined
87
85
 
88
86
  if (
89
- typeof body === "string" ||
87
+ typeof body === 'string' ||
90
88
  body instanceof ArrayBuffer ||
91
89
  ArrayBuffer.isView(body) ||
92
90
  body instanceof Blob ||
@@ -94,89 +92,83 @@ const encodeBody = (body: FetchBody): NativeFetchBody | undefined => {
94
92
  body instanceof URLSearchParams ||
95
93
  body instanceof ReadableStream
96
94
  ) {
97
- return body as NativeFetchBody;
95
+ return body as NativeFetchBody
98
96
  }
99
97
 
100
- return JSON.stringify(body);
101
- };
98
+ return JSON.stringify(body)
99
+ }
102
100
 
103
101
  const parseJsonResponse = async (response: Response): Promise<unknown> => {
104
102
  if (response.status === 204 || response.status === 205) {
105
- return null;
103
+ return null
106
104
  }
107
105
 
108
- const text = await response.text();
106
+ const text = await response.text()
109
107
 
110
- if (text.trim() === "") {
111
- return null;
108
+ if (text.trim() === '') {
109
+ return null
112
110
  }
113
111
 
114
112
  try {
115
- return JSON.parse(text);
113
+ return JSON.parse(text)
116
114
  } catch (err) {
117
115
  if (response.ok) {
118
- throw err;
116
+ throw err
119
117
  }
120
118
 
121
- return text;
119
+ return text
122
120
  }
123
- };
121
+ }
124
122
 
125
123
  export async function fetchCouchJson<TBody = unknown>(
126
- options: FetchRequestOptions,
124
+ options: FetchRequestOptions
127
125
  ): Promise<FetchResult<TBody>> {
128
- let response: Response;
129
- const { headers } = prepareRequest(options);
130
- const { signal, timedOut } = composeAbortSignal(
131
- options.signal,
132
- options.request,
133
- );
126
+ let response: Response
127
+ const { headers } = prepareRequest(options)
128
+ const { signal, timedOut } = composeAbortSignal(options.signal, options.request)
134
129
 
135
130
  try {
136
131
  response = await fetch(options.url, {
137
132
  method: options.method,
138
133
  headers: {
139
134
  ...JSON_HEADERS,
140
- ...headers,
135
+ ...headers
141
136
  },
142
137
  body: encodeBody(options.body),
143
138
  signal,
144
- dispatcher: options.request?.dispatcher,
145
- });
139
+ dispatcher: options.request?.dispatcher
140
+ })
146
141
  } catch (err) {
147
142
  if (timedOut() || isTimeoutError(err)) {
148
- throw new RetryableError("Request timed out", 503, {
149
- category: "network",
143
+ throw new RetryableError('Request timed out', 503, {
144
+ category: 'network',
150
145
  cause: err,
151
- operation: options.operation,
152
- });
146
+ operation: options.operation
147
+ })
153
148
  }
154
149
 
155
150
  if (isAbortError(err)) {
156
- throw err;
151
+ throw err
157
152
  }
158
153
 
159
- RetryableError.handleNetworkError(err, options.operation);
154
+ RetryableError.handleNetworkError(err, options.operation)
160
155
  }
161
156
 
162
- const body = (await parseJsonResponse(response)) as TBody;
157
+ const body = (await parseJsonResponse(response)) as TBody
163
158
 
164
159
  return {
165
160
  body,
166
161
  headers: response.headers,
167
- statusCode: response.status,
168
- };
162
+ statusCode: response.status
163
+ }
169
164
  }
170
165
 
171
166
  export async function fetchCouchStream(
172
- options: FetchRequestOptions,
167
+ options: FetchRequestOptions
173
168
  ): Promise<FetchResult<ReadableStream<Uint8Array> | null>> {
174
- let response: Response;
175
- const { headers } = prepareRequest(options);
176
- const { signal, timedOut } = composeAbortSignal(
177
- options.signal,
178
- options.request,
179
- );
169
+ let response: Response
170
+ const { headers } = prepareRequest(options)
171
+ const { signal, timedOut } = composeAbortSignal(options.signal, options.request)
180
172
 
181
173
  try {
182
174
  response = await fetch(options.url, {
@@ -184,27 +176,27 @@ export async function fetchCouchStream(
184
176
  headers,
185
177
  body: encodeBody(options.body),
186
178
  signal,
187
- dispatcher: options.request?.dispatcher,
188
- });
179
+ dispatcher: options.request?.dispatcher
180
+ })
189
181
  } catch (err) {
190
182
  if (timedOut() || isTimeoutError(err)) {
191
- throw new RetryableError("Request timed out", 503, {
192
- category: "network",
183
+ throw new RetryableError('Request timed out', 503, {
184
+ category: 'network',
193
185
  cause: err,
194
- operation: options.operation,
195
- });
186
+ operation: options.operation
187
+ })
196
188
  }
197
189
 
198
190
  if (isAbortError(err)) {
199
- throw err;
191
+ throw err
200
192
  }
201
193
 
202
- RetryableError.handleNetworkError(err, options.operation);
194
+ RetryableError.handleNetworkError(err, options.operation)
203
195
  }
204
196
 
205
197
  return {
206
198
  body: response.body,
207
199
  headers: response.headers,
208
- statusCode: response.status,
209
- };
200
+ statusCode: response.status
201
+ }
210
202
  }
package/index.mts CHANGED
@@ -1,20 +1,20 @@
1
- import { createQuery } from "./impl/utils/queryBuilder.mts";
2
- import { QueryBuilder } from "./impl/utils/queryBuilder.mts";
3
- import { bindConfig } from "./impl/bindConfig.mts";
4
- import { withRetry } from "./impl/retry.mts";
5
- import { bulkGet, bulkGetDictionary } from "./impl/bulkGet.mts";
6
- import { getAtRev, get } from "./impl/get.mts";
7
- import { queryStream } from "./impl/stream.mts";
8
- import { patch, patchDangerously } from "./impl/patch.mts";
9
- import { put } from "./impl/put.mts";
10
- import { remove } from "./impl/remove.mts";
11
- import { bulkSave, bulkSaveTransaction } from "./impl/bulkSave.mts";
12
- import { query } from "./impl/query.mts";
13
- import { getDBInfo } from "./impl/getDBInfo.mts";
14
- import { headDB } from "./impl/headDB.mts";
15
- import { bulkRemove, bulkRemoveMap } from "./impl/bulkRemove.mts";
16
- import { createLock, removeLock } from "./impl/sugar/lock.mts";
17
- import { watchDocs } from "./impl/sugar/watch.mts";
1
+ import { createQuery } from './impl/utils/queryBuilder.mts'
2
+ import { QueryBuilder } from './impl/utils/queryBuilder.mts'
3
+ import { bindConfig } from './impl/bindConfig.mts'
4
+ import { withRetry } from './impl/retry.mts'
5
+ import { bulkGet, bulkGetDictionary } from './impl/bulkGet.mts'
6
+ import { getAtRev, get } from './impl/get.mts'
7
+ import { queryStream } from './impl/stream.mts'
8
+ import { patch, patchDangerously } from './impl/patch.mts'
9
+ import { put } from './impl/put.mts'
10
+ import { remove } from './impl/remove.mts'
11
+ import { bulkSave, bulkSaveTransaction } from './impl/bulkSave.mts'
12
+ import { query } from './impl/query.mts'
13
+ import { getDBInfo } from './impl/getDBInfo.mts'
14
+ import { headDB } from './impl/headDB.mts'
15
+ import { bulkRemove, bulkRemoveMap } from './impl/bulkRemove.mts'
16
+ import { createLock, removeLock } from './impl/sugar/lock.mts'
17
+ import { watchDocs } from './impl/sugar/watch.mts'
18
18
 
19
19
  export {
20
20
  get,
@@ -45,8 +45,8 @@ export {
45
45
  QueryBuilder,
46
46
  createQuery,
47
47
  createLock,
48
- removeLock,
49
- };
48
+ removeLock
49
+ }
50
50
 
51
51
  export {
52
52
  ConflictError,
@@ -54,8 +54,8 @@ export {
54
54
  NotFoundError,
55
55
  OperationError,
56
56
  RetryableError,
57
- ValidationError,
58
- } from "./impl/utils/errors.mts";
57
+ ValidationError
58
+ } from './impl/utils/errors.mts'
59
59
 
60
60
  export type {
61
61
  BulkGetBound,
@@ -63,52 +63,39 @@ export type {
63
63
  BulkGetDictionaryOptions,
64
64
  BulkGetDictionaryResult,
65
65
  BulkGetOptions,
66
- BulkGetResponse,
67
- } from "./impl/bulkGet.mts";
68
- export type { OnInvalidDocAction } from "./impl/utils/parseRows.mts";
69
- export type { GetOptions, GetBound, GetAtRevBound } from "./impl/get.mts";
70
- export type { QueryBound } from "./impl/query.mts";
66
+ BulkGetResponse
67
+ } from './impl/bulkGet.mts'
68
+ export type { OnInvalidDocAction } from './impl/utils/parseRows.mts'
69
+ export type { GetOptions, GetBound, GetAtRevBound } from './impl/get.mts'
70
+ export type { QueryBound } from './impl/query.mts'
71
71
  export type {
72
72
  ViewString,
73
- ViewOptions as SimpleViewOptions,
74
- } from "./schema/couch/couch.input.schema.ts";
73
+ ViewOptions as SimpleViewOptions
74
+ } from './schema/couch/couch.input.schema.ts'
75
75
  export type {
76
76
  ViewRow,
77
77
  CouchDoc,
78
78
  CouchDocInput,
79
79
  ViewQueryResponse,
80
80
  ViewQueryResponseValidated,
81
- ViewRowValidated,
82
- } from "./schema/couch/couch.output.schema.ts";
83
- export type { RetryOptions } from "./impl/retry.mts";
81
+ ViewRowValidated
82
+ } from './schema/couch/couch.output.schema.ts'
83
+ export type { RetryOptions } from './impl/retry.mts'
84
84
  export type {
85
85
  ErrorCategory,
86
86
  ErrorOperation,
87
87
  HideABedErrorOptions,
88
88
  NetworkError,
89
- ValidationErrorOptions,
90
- } from "./impl/utils/errors.mts";
91
- export type { OnRow } from "./impl/stream.mts";
92
- export type {
93
- CouchAuth,
94
- CouchAuthInput,
95
- CouchConfig,
96
- CouchConfigInput,
97
- } from "./schema/config.mts";
98
- export type {
99
- Dispatcher,
100
- RequestOptions,
101
- RequestOptionsInput,
102
- } from "./schema/request.mts";
103
- export type {
104
- LockOptions,
105
- LockOptionsInput,
106
- LockDoc,
107
- } from "./schema/sugar/lock.mts";
108
- export type { WatchHandle, WatchListener } from "./impl/sugar/watch.mts";
89
+ ValidationErrorOptions
90
+ } from './impl/utils/errors.mts'
91
+ export type { OnRow } from './impl/stream.mts'
92
+ export type { CouchAuth, CouchAuthInput, CouchConfig, CouchConfigInput } from './schema/config.mts'
93
+ export type { Dispatcher, RequestOptions, RequestOptionsInput } from './schema/request.mts'
94
+ export type { LockOptions, LockOptionsInput, LockDoc } from './schema/sugar/lock.mts'
95
+ export type { WatchHandle, WatchListener } from './impl/sugar/watch.mts'
109
96
  export type {
110
97
  WatchOptions as WatchOptionsSchema,
111
- WatchOptionsInput,
112
- } from "./schema/sugar/watch.mts";
113
- export type { BoundInstance } from "./impl/bindConfig.mts";
114
- export type { StandardSchemaV1 } from "./types/standard-schema.ts";
98
+ WatchOptionsInput
99
+ } from './schema/sugar/watch.mts'
100
+ export type { BoundInstance } from './impl/bindConfig.mts'
101
+ export type { StandardSchemaV1 } from './types/standard-schema.ts'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hide-a-bed",
3
- "version": "7.1.0",
3
+ "version": "7.1.1",
4
4
  "description": "An abstraction over couchdb calls that includes easy mock/stubs with pouchdb",
5
5
  "keywords": [
6
6
  "couchdb",
@@ -48,7 +48,7 @@
48
48
  "format:check": "oxfmt --check .",
49
49
  "typecheck": "tsc --noEmit",
50
50
  "typecheck:watch": "tsc --noEmit --watch",
51
- "prepublishOnly": "npm run build",
51
+ "prepublishOnly": "npm test && npm run build",
52
52
  "validate": "npm run format:check && npm run lint && npm run typecheck",
53
53
  "full": "npm run lint:fix && npm run build && npm run clean"
54
54
  },
@@ -1,18 +1,18 @@
1
- import type z from "zod";
2
- import { CouchConfig, type CouchConfigInput } from "../schema/config.mts";
3
- import { type BulkGetBound, type BulkGetDictionaryBound } from "./bulkGet.mts";
4
- import { type GetBound, type GetAtRevBound } from "./get.mts";
5
- import { queryStream } from "./stream.mts";
6
- import { patch, patchDangerously } from "./patch.mts";
7
- import { put } from "./put.mts";
8
- import type { QueryBound } from "./query.mts";
9
- import { bulkRemove, bulkRemoveMap } from "./bulkRemove.mts";
10
- import { bulkSave, bulkSaveTransaction } from "./bulkSave.mts";
11
- import { getDBInfo } from "./getDBInfo.mts";
12
- import { headDB } from "./headDB.mts";
13
- import { remove } from "./remove.mts";
14
- import { createLock, removeLock } from "./sugar/lock.mts";
15
- import { watchDocs } from "./sugar/watch.mts";
1
+ import type z from 'zod';
2
+ import { CouchConfig, type CouchConfigInput } from '../schema/config.mts';
3
+ import { type BulkGetBound, type BulkGetDictionaryBound } from './bulkGet.mts';
4
+ import { type GetBound, type GetAtRevBound } from './get.mts';
5
+ import { queryStream } from './stream.mts';
6
+ import { patch, patchDangerously } from './patch.mts';
7
+ import { put } from './put.mts';
8
+ import type { QueryBound } from './query.mts';
9
+ import { bulkRemove, bulkRemoveMap } from './bulkRemove.mts';
10
+ import { bulkSave, bulkSaveTransaction } from './bulkSave.mts';
11
+ import { getDBInfo } from './getDBInfo.mts';
12
+ import { headDB } from './headDB.mts';
13
+ import { remove } from './remove.mts';
14
+ import { createLock, removeLock } from './sugar/lock.mts';
15
+ import { watchDocs } from './sugar/watch.mts';
16
16
  type BoundConfigMethod<T> = T extends (...args: infer Args) => infer Result ? Args extends [unknown, ...infer Rest] ? (...args: Rest) => Result : never : never;
17
17
  type BoundMethods = {
18
18
  bulkGet: BulkGetBound;
@@ -1 +1 @@
1
- {"version":3,"file":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G;IACzC,OAAO,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC,GAAG,aAAa,CAAA;CACxE,CAAA;AAED;;;;GAIG;AACH,eAAO,MAAM,UAAU,GAAI,QAAQ,gBAAgB,KAAG,aAcrD,CAAA;AAED;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC/E,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,GAAG,CAAC,EAC3D,MAAM,EAAE,WAAW,UAYpB"}
@@ -1,4 +1,4 @@
1
- import { type CouchConfigInput } from "../schema/config.mts";
1
+ import { type CouchConfigInput } from '../schema/config.mts';
2
2
  /**
3
3
  * Performs a health check against the target CouchDB database using `HEAD /{db}`.
4
4
  *
@@ -1 +1 @@
1
- {"version":3,"file":"headDB.d.mts","sourceRoot":"","sources":["../../../impl/headDB.mts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAK1E;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,GAAU,aAAa,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAqCxE,CAAC"}
1
+ {"version":3,"file":"headDB.d.mts","sourceRoot":"","sources":["../../../impl/headDB.mts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAA;AAKzE;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,GAAU,aAAa,gBAAgB,KAAG,OAAO,CAAC,IAAI,CAqCxE,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { StandardSchemaV1 } from "../../types/standard-schema.ts";
1
+ import type { StandardSchemaV1 } from '../../types/standard-schema.ts';
2
2
  /**
3
3
  * Represents a network-level error emitted by Node.js or HTTP client libraries.
4
4
  *
@@ -14,8 +14,8 @@ export interface NetworkError {
14
14
  */
15
15
  message?: string;
16
16
  }
17
- export type ErrorCategory = "conflict" | "network" | "not_found" | "operation" | "retryable" | "validation" | "transaction";
18
- export type ErrorOperation = "get" | "getAtRev" | "getDBInfo" | "headDB" | "patch" | "patchDangerously" | "put" | "query" | "queryStream" | "remove" | "request" | "watchDocs";
17
+ export type ErrorCategory = 'conflict' | 'network' | 'not_found' | 'operation' | 'retryable' | 'validation' | 'transaction';
18
+ export type ErrorOperation = 'get' | 'getAtRev' | 'getDBInfo' | 'headDB' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
19
19
  export declare const hasStatusCode: (error: unknown) => error is {
20
20
  statusCode: number;
21
21
  };
@@ -50,7 +50,7 @@ export declare class HideABedError extends Error {
50
50
  readonly statusCode?: number;
51
51
  constructor(message: string, options: HideABedErrorOptions);
52
52
  }
53
- export type ValidationErrorOptions = Omit<Partial<HideABedErrorOptions>, "category" | "retryable"> & {
53
+ export type ValidationErrorOptions = Omit<Partial<HideABedErrorOptions>, 'category' | 'retryable'> & {
54
54
  issues: ReadonlyArray<StandardSchemaV1.Issue>;
55
55
  message?: string;
56
56
  };
@@ -64,7 +64,7 @@ export type ValidationErrorOptions = Omit<Partial<HideABedErrorOptions>, "catego
64
64
  * @public
65
65
  */
66
66
  export declare class NotFoundError extends HideABedError {
67
- constructor(docId: string, options?: Omit<Partial<HideABedErrorOptions>, "category" | "docId" | "retryable"> & {
67
+ constructor(docId: string, options?: Omit<Partial<HideABedErrorOptions>, 'category' | 'docId' | 'retryable'> & {
68
68
  message?: string;
69
69
  });
70
70
  }
@@ -74,7 +74,7 @@ export declare class NotFoundError extends HideABedError {
74
74
  * @public
75
75
  */
76
76
  export declare class ConflictError extends HideABedError {
77
- constructor(docId: string, options?: Omit<Partial<HideABedErrorOptions>, "category" | "docId" | "retryable"> & {
77
+ constructor(docId: string, options?: Omit<Partial<HideABedErrorOptions>, 'category' | 'docId' | 'retryable'> & {
78
78
  message?: string;
79
79
  });
80
80
  }
@@ -84,8 +84,8 @@ export declare class ConflictError extends HideABedError {
84
84
  * @public
85
85
  */
86
86
  export declare class OperationError extends HideABedError {
87
- constructor(message: string, options?: Omit<Partial<HideABedErrorOptions>, "category" | "retryable"> & {
88
- category?: Extract<ErrorCategory, "operation" | "transaction">;
87
+ constructor(message: string, options?: Omit<Partial<HideABedErrorOptions>, 'category' | 'retryable'> & {
88
+ category?: Extract<ErrorCategory, 'operation' | 'transaction'>;
89
89
  });
90
90
  }
91
91
  /**
@@ -94,7 +94,7 @@ export declare class OperationError extends HideABedError {
94
94
  * @public
95
95
  */
96
96
  export declare class ValidationError extends HideABedError {
97
- readonly issues: ValidationErrorOptions["issues"];
97
+ readonly issues: ValidationErrorOptions['issues'];
98
98
  constructor(options: ValidationErrorOptions);
99
99
  }
100
100
  /**
@@ -107,8 +107,8 @@ export declare class ValidationError extends HideABedError {
107
107
  * @public
108
108
  */
109
109
  export declare class RetryableError extends HideABedError {
110
- constructor(message: string, statusCode?: number, options?: Omit<Partial<HideABedErrorOptions>, "category" | "retryable" | "statusCode"> & {
111
- category?: Extract<ErrorCategory, "network" | "retryable">;
110
+ constructor(message: string, statusCode?: number, options?: Omit<Partial<HideABedErrorOptions>, 'category' | 'retryable' | 'statusCode'> & {
111
+ category?: Extract<ErrorCategory, 'network' | 'retryable'>;
112
112
  });
113
113
  /**
114
114
  * Determines whether the provided status code should be treated as retryable.
@@ -136,7 +136,7 @@ type ResponseErrorOptions = {
136
136
  operation: ErrorOperation;
137
137
  statusCode?: number;
138
138
  };
139
- export declare function createResponseError({ body, defaultMessage, docId, notFoundMessage, operation, statusCode, }: ResponseErrorOptions): HideABedError;
139
+ export declare function createResponseError({ body, defaultMessage, docId, notFoundMessage, operation, statusCode }: ResponseErrorOptions): HideABedError;
140
140
  export declare function isConflictError(err: unknown): boolean;
141
141
  export {};
142
142
  //# sourceMappingURL=errors.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.mts","sourceRoot":"","sources":["../../../../impl/utils/errors.mts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAGvE;;;;GAIG;AACH,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAMD,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,SAAS,GACT,WAAW,GACX,WAAW,GACX,WAAW,GACX,YAAY,GACZ,aAAa,CAAC;AAElB,MAAM,MAAM,cAAc,GACtB,KAAK,GACL,UAAU,GACV,WAAW,GACX,QAAQ,GACR,OAAO,GACP,kBAAkB,GAClB,KAAK,GACL,OAAO,GACP,aAAa,GACb,QAAQ,GACR,SAAS,GACT,WAAW,CAAC;AA2ChB,eAAO,MAAM,aAAa,GACxB,OAAO,OAAO,KACb,KAAK,IAAI;IAAE,UAAU,EAAE,MAAM,CAAA;CAM/B,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,EAAE,SAAS,MAAM,YAKnE,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,aAAa,CAAC;IACxB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,C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;;GAQG;AACH,qBAAa,cAAe,SAAQ,aAAa;gBAE7C,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,EACnB,OAAO,GAAE,IAAI,CAAC,OAAO,CAAC,oBAAoB,CAAC,EAAE,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC,GAAG;QACtF,QAAQ,CAAC,EAAE,OAAO,CAAC,aAAa,EAAE,SAAS,GAAG,WAAW,CAAC,CAAA;KACtD;IAeR;;;;;;OAMG;IACH,MAAM,CAAC,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,IAAI,MAAM;IAKlF;;;;;;;OAOG;IACH,MAAM,CAAC,kBAAkB,CAAC,GAAG,EAAE,OAAO,EAAE,SAAS,GAAE,cAA0B,GAAG,KAAK;CAgBtF;AAED,KAAK,oBAAoB,GAAG;IAC1B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,cAAc,CAAA;IACzB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAYD,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACX,EAAE,oBAAoB,GAAG,aAAa,CAwCtC;AAED,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAKrD"}
@@ -1,6 +1,6 @@
1
- import type { RequestOptions } from "../../schema/request.mts";
2
- export type HttpMethod = "DELETE" | "GET" | "HEAD" | "POST" | "PUT";
3
- type NativeFetchBody = RequestInit["body"];
1
+ import type { RequestOptions } from '../../schema/request.mts';
2
+ export type HttpMethod = 'DELETE' | 'GET' | 'HEAD' | 'POST' | 'PUT';
3
+ type NativeFetchBody = RequestInit['body'];
4
4
  export type FetchBody = NativeFetchBody | Record<string, unknown> | Array<unknown> | null | undefined;
5
5
  export type FetchAuth = {
6
6
  password: string;
@@ -16,7 +16,7 @@ export type FetchRequestOptions = {
16
16
  body?: FetchBody;
17
17
  headers?: Record<string, string>;
18
18
  method: HttpMethod;
19
- operation?: "get" | "getAtRev" | "getDBInfo" | "headDB" | "patch" | "patchDangerously" | "put" | "query" | "queryStream" | "remove" | "request" | "watchDocs";
19
+ operation?: 'get' | 'getAtRev' | 'getDBInfo' | 'headDB' | 'patch' | 'patchDangerously' | 'put' | 'query' | 'queryStream' | 'remove' | 'request' | 'watchDocs';
20
20
  request?: RequestOptions;
21
21
  signal?: AbortSignal;
22
22
  url: string | URL;