hide-a-bed 6.0.0-beta.0 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/migration_guides/v6.md +70 -0
  2. package/package.json +4 -1
  3. package/docs/.nojekyll +0 -1
  4. package/docs/assets/hierarchy.js +0 -1
  5. package/docs/assets/highlight.css +0 -113
  6. package/docs/assets/icons.js +0 -18
  7. package/docs/assets/icons.svg +0 -1
  8. package/docs/assets/main.js +0 -60
  9. package/docs/assets/navigation.js +0 -1
  10. package/docs/assets/search.js +0 -1
  11. package/docs/assets/style.css +0 -1633
  12. package/docs/classes/QueryBuilder.html +0 -42
  13. package/docs/functions/bindConfig.html +0 -4
  14. package/docs/functions/bulkGet.html +0 -14
  15. package/docs/functions/bulkGetDictionary.html +0 -10
  16. package/docs/functions/bulkRemove.html +0 -12
  17. package/docs/functions/bulkRemoveMap.html +0 -11
  18. package/docs/functions/bulkSave.html +0 -10
  19. package/docs/functions/bulkSaveTransaction.html +0 -23
  20. package/docs/functions/createLock.html +0 -7
  21. package/docs/functions/createQuery.html +0 -1
  22. package/docs/functions/get.html +0 -1
  23. package/docs/functions/getAtRev.html +0 -1
  24. package/docs/functions/getDBInfo.html +0 -10
  25. package/docs/functions/patch.html +0 -8
  26. package/docs/functions/patchDangerously.html +0 -9
  27. package/docs/functions/put.html +0 -1
  28. package/docs/functions/query.html +0 -15
  29. package/docs/functions/queryStream.html +0 -6
  30. package/docs/functions/remove.html +0 -1
  31. package/docs/functions/removeLock.html +0 -6
  32. package/docs/functions/watchDocs.html +0 -9
  33. package/docs/functions/withRetry.html +0 -6
  34. package/docs/hierarchy.html +0 -1
  35. package/docs/index.html +0 -483
  36. package/docs/interfaces/NetworkError.html +0 -6
  37. package/docs/interfaces/NotFoundError.html +0 -10
  38. package/docs/interfaces/RetryOptions.html +0 -10
  39. package/docs/interfaces/RetryableError.html +0 -10
  40. package/docs/interfaces/StandardSchemaV1.FailureResult.html +0 -4
  41. package/docs/interfaces/StandardSchemaV1.Issue.html +0 -6
  42. package/docs/interfaces/StandardSchemaV1.Options.html +0 -3
  43. package/docs/interfaces/StandardSchemaV1.PathSegment.html +0 -4
  44. package/docs/interfaces/StandardSchemaV1.Props.html +0 -10
  45. package/docs/interfaces/StandardSchemaV1.SuccessResult.html +0 -6
  46. package/docs/interfaces/StandardSchemaV1.Types.html +0 -6
  47. package/docs/interfaces/StandardSchemaV1.html +0 -4
  48. package/docs/modules/StandardSchemaV1.html +0 -1
  49. package/docs/modules.html +0 -1
  50. package/docs/types/BoundInstance.html +0 -1
  51. package/docs/types/BulkGetBound.html +0 -2
  52. package/docs/types/BulkGetDictionaryBound.html +0 -1
  53. package/docs/types/BulkGetDictionaryOptions.html +0 -2
  54. package/docs/types/BulkGetDictionaryResult.html +0 -3
  55. package/docs/types/BulkGetOptions.html +0 -3
  56. package/docs/types/BulkGetResponse.html +0 -1
  57. package/docs/types/CouchConfig-1.html +0 -1
  58. package/docs/types/CouchConfig.html +0 -1
  59. package/docs/types/CouchConfigInput.html +0 -1
  60. package/docs/types/CouchDoc-1.html +0 -1
  61. package/docs/types/CouchDoc.html +0 -2
  62. package/docs/types/CouchDocInput.html +0 -2
  63. package/docs/types/GetAtRevBound.html +0 -1
  64. package/docs/types/GetBound.html +0 -1
  65. package/docs/types/GetOptions.html +0 -2
  66. package/docs/types/LockDoc-1.html +0 -1
  67. package/docs/types/LockDoc.html +0 -1
  68. package/docs/types/LockOptions-1.html +0 -1
  69. package/docs/types/LockOptions.html +0 -1
  70. package/docs/types/LockOptionsInput.html +0 -1
  71. package/docs/types/OnInvalidDocAction.html +0 -1
  72. package/docs/types/OnRow.html +0 -1
  73. package/docs/types/QueryBound.html +0 -1
  74. package/docs/types/SimpleViewOptions-1.html +0 -1
  75. package/docs/types/SimpleViewOptions.html +0 -1
  76. package/docs/types/StandardSchemaV1.InferInput.html +0 -2
  77. package/docs/types/StandardSchemaV1.InferOutput.html +0 -2
  78. package/docs/types/StandardSchemaV1.Result.html +0 -2
  79. package/docs/types/ViewQueryResponse-1.html +0 -1
  80. package/docs/types/ViewQueryResponse.html +0 -2
  81. package/docs/types/ViewQueryResponseValidated.html +0 -2
  82. package/docs/types/ViewRow-1.html +0 -1
  83. package/docs/types/ViewRow.html +0 -2
  84. package/docs/types/ViewRowValidated.html +0 -7
  85. package/docs/types/ViewString.html +0 -1
  86. package/docs/types/WatchOptionsInput.html +0 -1
  87. package/docs/types/WatchOptionsSchema-1.html +0 -1
  88. package/docs/types/WatchOptionsSchema.html +0 -1
  89. package/impl/bulkGet.test.mts +0 -159
  90. package/impl/bulkRemove.test.mts +0 -102
  91. package/impl/bulkSave.test.mts +0 -319
  92. package/impl/get.test.mts +0 -114
  93. package/impl/getDBInfo.test.mts +0 -62
  94. package/impl/patch.test.mts +0 -142
  95. package/impl/put.test.mts +0 -114
  96. package/impl/query.test.mts +0 -280
  97. package/impl/remove.test.mts +0 -82
  98. package/impl/retry.test.mts +0 -77
  99. package/impl/stream.test.mts +0 -205
  100. package/impl/sugar/lock.test.mts +0 -113
  101. package/impl/sugar/watch.test.mts +0 -155
  102. package/impl/utils/errors.test.mts +0 -58
  103. package/impl/utils/logger.test.mts +0 -129
  104. package/impl/utils/parseRows.test.mts +0 -183
  105. package/impl/utils/queryBuilder.test.mts +0 -83
  106. package/impl/utils/queryString.test.mts +0 -53
  107. package/index.test.mts +0 -415
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ViewRow | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ViewRow</a></li></ul><h1>Type Alias ViewRow</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">ViewRow</span><span class="tsd-signature-symbol">:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-keyword">typeof</span> <a href="ViewRow.html" class="tsd-signature-type tsd-kind-type-alias">ViewRow</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L22">schema/couch/couch.output.schema.ts:22</a></li><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L29">schema/couch/couch.output.schema.ts:29</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,2 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ViewRow | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ViewRow</a></li></ul><h1>Type Alias ViewRow</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">ViewRow</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodObject</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">doc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><br/>            <span class="tsd-signature-type">ZodNullable</span><span class="tsd-signature-symbol">&lt;</span><br/>                <span class="tsd-signature-type">ZodObject</span><span class="tsd-signature-symbol">&lt;</span><br/>                    <span class="tsd-signature-symbol">{</span><br/>                        <span class="tsd-kind-property">_deleted</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodBoolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>                        <span class="tsd-kind-property">_id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodString</span><span class="tsd-signature-symbol">;</span><br/>                        <span class="tsd-kind-property">_rev</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNullable</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodString</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>                    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>                    <span class="tsd-signature-type">$loose</span><span class="tsd-signature-symbol">,</span><br/>                <span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>            <span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodString</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodString</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNullable</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodAny</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNullable</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodAny</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-type">$strip</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><div class="tsd-comment tsd-typography"><p>Default schema for a CouchDB view row if no validation schema is provided.</p>
2
- </div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L22">schema/couch/couch.output.schema.ts:22</a></li><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L29">schema/couch/couch.output.schema.ts:29</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,7 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ViewRowValidated | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ViewRowValidated</a></li></ul><h1>Type Alias ViewRowValidated&lt;DocSchema, KeySchema, ValueSchema&gt;</h1></div><section class="tsd-panel tsd-comment"><div class="tsd-comment tsd-typography"><p>A CouchDB view row with validated key, value, and document schemas.</p>
2
- </div></section><div class="tsd-signature"><span class="tsd-signature-keyword">type</span> <span class="tsd-kind-type-alias">ViewRowValidated</span><span class="tsd-signature-symbol">&lt;</span><br/>    <a class="tsd-signature-type tsd-kind-type-parameter" href="#docschema">DocSchema</a> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a><span class="tsd-signature-symbol">,</span><br/>    <a class="tsd-signature-type tsd-kind-type-parameter" href="#keyschema">KeySchema</a> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a><span class="tsd-signature-symbol">,</span><br/>    <a class="tsd-signature-type tsd-kind-type-parameter" href="#valueschema">ValueSchema</a> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span> <span class="tsd-signature-symbol">=</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-property" href="#doc">doc</a><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#docschema">DocSchema</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#error">error</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#id">id</a><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#key">key</a><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#keyschema">KeySchema</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-property" href="#value">value</a><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#valueschema">ValueSchema</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><section class="tsd-panel"><h4>Type Parameters</h4><ul class="tsd-type-parameter-list"><li><span id="docschema"><span class="tsd-kind-type-parameter">DocSchema</span> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a></span></li><li><span id="keyschema"><span class="tsd-kind-type-parameter">KeySchema</span> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a></span></li><li><span id="valueschema"><span class="tsd-kind-type-parameter">ValueSchema</span> <span class="tsd-signature-keyword">extends</span> <a href="../interfaces/StandardSchemaV1.html" class="tsd-signature-type tsd-kind-interface">StandardSchemaV1</a></span></li></ul></section><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L34">schema/couch/couch.output.schema.ts:34</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Properties</h3><div class="tsd-index-list"><a href="#doc" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>doc?</span></a>
3
- <a href="#error" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error?</span></a>
4
- <a href="#id" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id?</span></a>
5
- <a href="#key" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>key?</span></a>
6
- <a href="#value" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>value?</span></a>
7
- </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Properties</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="doc"><code class="tsd-tag">Optional</code><span>doc</span><a href="#doc" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">doc</span><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#docschema">DocSchema</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L42">schema/couch/couch.output.schema.ts:42</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="error"><code class="tsd-tag">Optional</code><span>error</span><a href="#error" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L43">schema/couch/couch.output.schema.ts:43</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="id"><code class="tsd-tag">Optional</code><span>id</span><a href="#id" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">id</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L39">schema/couch/couch.output.schema.ts:39</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="key"><code class="tsd-tag">Optional</code><span>key</span><a href="#key" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">key</span><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#keyschema">KeySchema</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L40">schema/couch/couch.output.schema.ts:40</a></li></ul></aside></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="value"><code class="tsd-tag">Optional</code><span>value</span><a href="#value" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><div class="tsd-signature"><span class="tsd-kind-property">value</span><span class="tsd-signature-symbol">?:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><a class="tsd-signature-type tsd-kind-type-parameter" href="#valueschema">ValueSchema</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.output.schema.ts#L41">schema/couch/couch.output.schema.ts:41</a></li></ul></aside></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Properties"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Properties</summary><div><a href="#doc"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>doc</span></a><a href="#error"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>error</span></a><a href="#id"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>id</span></a><a href="#key"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>key</span></a><a href="#value"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Property"><use href="../assets/icons.svg#icon-1024"></use></svg><span>value</span></a></div></details></div></details></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>ViewString | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">ViewString</a></li></ul><h1>Type Alias ViewString</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">ViewString</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;_all_docs&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">`</span><span class="tsd-signature-type">_design/</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-type">/_view/</span><span class="tsd-signature-symbol">${</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">`</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/couch/couch.input.schema.ts#L4">schema/couch/couch.input.schema.ts:4</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WatchOptionsInput | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">WatchOptionsInput</a></li></ul><h1>Type Alias WatchOptionsInput</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">WatchOptionsInput</span><span class="tsd-signature-symbol">:</span> <a href="StandardSchemaV1.InferInput.html" class="tsd-signature-type tsd-kind-type-alias">InferInput</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-keyword">typeof</span> <a href="WatchOptionsSchema.html" class="tsd-signature-type tsd-kind-type-alias">WatchOptionsSchema</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/sugar/watch.mts#L14">schema/sugar/watch.mts:14</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WatchOptionsSchema | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">WatchOptionsSchema</a></li></ul><h1>Type Alias WatchOptionsSchema</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">WatchOptionsSchema</span><span class="tsd-signature-symbol">:</span> <a href="StandardSchemaV1.InferOutput.html" class="tsd-signature-type tsd-kind-type-alias">InferOutput</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-keyword">typeof</span> <a href="WatchOptionsSchema.html" class="tsd-signature-type tsd-kind-type-alias">WatchOptionsSchema</a><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/sugar/watch.mts#L4">schema/sugar/watch.mts:4</a></li><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/sugar/watch.mts#L13">schema/sugar/watch.mts:13</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1 +0,0 @@
1
- <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>WatchOptionsSchema | @brivity/hide-a-bed</title><meta name="description" content="Documentation for @brivity/hide-a-bed"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">@brivity/hide-a-bed</a><div id="tsd-toolbar-links"></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">WatchOptionsSchema</a></li></ul><h1>Type Alias WatchOptionsSchema</h1></div><div class="tsd-signature"><span class="tsd-kind-type-alias">WatchOptionsSchema</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodObject</span><span class="tsd-signature-symbol">&lt;</span><br/>    <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">include_docs</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodDefault</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodBoolean</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">initialDelay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNumber</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">maxDelay</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNumber</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">maxRetries</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">ZodOptional</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ZodNumber</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-type">$strip</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">&gt;</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/sugar/watch.mts#L4">schema/sugar/watch.mts:4</a></li><li>Defined in <a href="https://github.com/DerrykBoyd/hide-a-bed/blob/924f741f6fd36e483aec12aa8737fdab16f11204/client/schema/sugar/watch.mts#L13">schema/sugar/watch.mts:13</a></li></ul></aside></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div></div><div class="site-menu"><nav class="tsd-navigation"><a href="../modules.html">@brivity/hide-a-bed</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>
@@ -1,159 +0,0 @@
1
- import assert from 'node:assert/strict'
2
- import test, { suite } from 'node:test'
3
- import needle from 'needle'
4
- import type { CouchConfigInput } from '../schema/config.mts'
5
- import { z } from 'zod'
6
- import { RetryableError } from './utils/errors.mts'
7
- import { bulkGet, bulkGetDictionary } from './bulkGet.mts'
8
- import { TEST_DB_URL } from '../test/setup-db.mts'
9
-
10
- const config: CouchConfigInput = {
11
- couch: TEST_DB_URL
12
- }
13
-
14
- async function ensureDoc(id: string, body: Record<string, unknown>) {
15
- await needle(
16
- 'put',
17
- `${TEST_DB_URL}/${id}`,
18
- {
19
- _id: id,
20
- ...body
21
- },
22
- { json: true }
23
- )
24
- }
25
-
26
- suite('bulkGet', () => {
27
- test('integration with pouchdb-server', async t => {
28
- await ensureDoc('doc-1', { value: 42 })
29
- await ensureDoc('doc-valid', { count: 7 })
30
- await ensureDoc('doc-invalid', { count: 'nope' })
31
-
32
- await t.test('fetches docs and not-found rows', async () => {
33
- const response = await bulkGet(config, ['doc-1', 'doc-missing'])
34
- assert.strictEqual(response.rows.length, 2)
35
- const [first, second] = response.rows
36
- assert.strictEqual(first?.id, 'doc-1')
37
- assert.strictEqual(first?.doc?._id, 'doc-1')
38
- assert.strictEqual(first?.doc?.value, 42)
39
- assert.strictEqual(second?.error, 'not_found')
40
- assert.strictEqual(second?.key, 'doc-missing')
41
- })
42
-
43
- await t.test('supports includeDocs=false via _bulkGetWithOptions', async () => {
44
- const response = await bulkGet(config, ['doc-1'], {
45
- includeDocs: false
46
- })
47
- assert.strictEqual(response.rows.length, 1)
48
- const [row] = response.rows
49
- assert.strictEqual(row?.id, 'doc-1')
50
- assert.ok(row?.value?.rev)
51
- assert.ok(!('doc' in (row as Record<string, unknown>)))
52
- })
53
-
54
- await t.test('validates documents when schema provided', async () => {
55
- const schema = z.looseObject({
56
- _id: z.string(),
57
- _rev: z.string().optional(),
58
- count: z.number()
59
- })
60
-
61
- const valid = await bulkGet(config, ['doc-valid'], {
62
- validate: {
63
- docSchema: schema
64
- }
65
- })
66
- assert.strictEqual(valid.rows[0]?.doc?.count, 7)
67
-
68
- await assert.rejects(
69
- () =>
70
- bulkGet(config, ['doc-invalid'], {
71
- validate: {
72
- docSchema: schema
73
- }
74
- }),
75
- (err: unknown) => {
76
- assert.ok(Array.isArray(err))
77
- assert.match(err[0]?.message, /Invalid input:/)
78
- return true
79
- }
80
- )
81
- })
82
-
83
- await t.test('skips invalid documents when onInvalidDoc=skip', async () => {
84
- const schema = z.looseObject({
85
- _id: z.string(),
86
- _rev: z.string().optional(),
87
- count: z.number()
88
- })
89
-
90
- const response = await bulkGet(config, ['doc-valid', 'doc-invalid'], {
91
- validate: {
92
- docSchema: schema,
93
- onInvalidDoc: 'skip'
94
- }
95
- })
96
-
97
- assert.strictEqual(response.rows.length, 1)
98
- assert.strictEqual(response.rows[0]?.doc?._id, 'doc-valid')
99
- assert.strictEqual(response.rows[0]?.doc?.count, 7)
100
- })
101
-
102
- await t.test('throws RetryableError for retryable status codes', async () => {
103
- const offlineConfig: CouchConfigInput = {
104
- couch: 'http://localhost:6553/offline-db'
105
- }
106
-
107
- await assert.rejects(
108
- () => bulkGet(offlineConfig, ['doc-1']),
109
- (err: unknown) => err instanceof RetryableError && err.statusCode === 503
110
- )
111
- })
112
-
113
- await t.test('bulkGetDictionary groups results', async () => {
114
- const result = await bulkGetDictionary(config, ['doc-valid', 'doc-missing'])
115
- assert.deepStrictEqual(Object.keys(result.found), ['doc-valid'])
116
- assert.strictEqual(result.found['doc-valid'].count, 7)
117
- assert.deepStrictEqual(Object.keys(result.notFound), ['doc-missing'])
118
- assert.strictEqual(result.notFound['doc-missing'].error, 'not_found')
119
- })
120
-
121
- await t.test('bulkGetDictionary with validation schema', async () => {
122
- const schema = z.looseObject({
123
- _id: z.string(),
124
- _rev: z.string().optional(),
125
- count: z.number()
126
- })
127
-
128
- const result = await bulkGetDictionary(config, ['doc-valid', 'doc-not-there'], {
129
- validate: {
130
- docSchema: schema
131
- }
132
- })
133
-
134
- assert.deepStrictEqual(Object.keys(result.found), ['doc-valid'])
135
- assert.strictEqual(result.found['doc-valid'].count, 7)
136
- assert.deepStrictEqual(Object.keys(result.notFound), ['doc-not-there'])
137
- assert.strictEqual(result.notFound['doc-not-there'].error, 'not_found')
138
- })
139
-
140
- await t.test('bulkGetDictionary skips invalid docs when requested', async () => {
141
- const schema = z.looseObject({
142
- _id: z.string(),
143
- _rev: z.string().optional(),
144
- count: z.number()
145
- })
146
-
147
- const result = await bulkGetDictionary(config, ['doc-valid', 'doc-invalid'], {
148
- validate: {
149
- docSchema: schema,
150
- onInvalidDoc: 'skip'
151
- }
152
- })
153
-
154
- assert.deepStrictEqual(Object.keys(result.found), ['doc-valid'])
155
- assert.strictEqual(result.found['doc-valid'].count, 7)
156
- assert.deepStrictEqual(Object.keys(result.notFound), [])
157
- })
158
- })
159
- })
@@ -1,102 +0,0 @@
1
- import assert from 'node:assert/strict'
2
- import test, { suite } from 'node:test'
3
- import needle from 'needle'
4
- import type { CouchConfigInput } from '../schema/config.mts'
5
- import { bulkRemove, bulkRemoveMap } from './bulkRemove.mts'
6
- import { TEST_DB_URL } from '../test/setup-db.mts'
7
-
8
- const config: CouchConfigInput = {
9
- couch: TEST_DB_URL
10
- }
11
-
12
- type DocBody = Record<string, unknown>
13
-
14
- async function saveDoc(id: string, body: DocBody) {
15
- const response = await needle(
16
- 'put',
17
- `${TEST_DB_URL}/${id}`,
18
- {
19
- _id: id,
20
- ...body
21
- },
22
- { json: true }
23
- )
24
-
25
- if (response.statusCode !== 201 && response.statusCode !== 200) {
26
- throw new Error(`Failed to save document ${id}: ${response.statusCode}`)
27
- }
28
-
29
- return response.body as { rev: string }
30
- }
31
-
32
- async function getDoc(id: string) {
33
- return needle('get', `${TEST_DB_URL}/${id}`, null, { json: true })
34
- }
35
-
36
- suite('bulkRemove', () => {
37
- test('it should throw if provided config is invalid', async () => {
38
- await assert.rejects(async () => {
39
- // @ts-expect-error testing invalid config
40
- await bulkRemove({ notAnOption: true, couch: DB_URL, useConsoleLogger: true }, ['doc1'])
41
- })
42
-
43
- await assert.rejects(async () => {
44
- // @ts-expect-error testing invalid config
45
- await bulkRemoveMap({ anotherBadOption: 123, couch: DB_URL, useConsoleLogger: true }, [
46
- 'doc1'
47
- ])
48
- })
49
- })
50
-
51
- test('integration with pouchdb-server', async t => {
52
- await t.test('removes documents via _bulk_docs', async () => {
53
- await saveDoc('bulk-remove-doc-1', { kind: 'test', count: 1 })
54
-
55
- const results = await bulkRemove(config, ['bulk-remove-doc-1'])
56
- assert.strictEqual(results.length, 1)
57
- const [first] = results
58
- assert.strictEqual(first?.id, 'bulk-remove-doc-1')
59
- assert.strictEqual(first?.ok, true)
60
- assert.ok(typeof first?.rev === 'string')
61
-
62
- const { statusCode, body } = await getDoc('bulk-remove-doc-1')
63
- assert.strictEqual(statusCode, 404)
64
- assert.strictEqual(body?.error, 'not_found')
65
- })
66
-
67
- await t.test('returns empty array when docs are missing', async () => {
68
- const results = await bulkRemove(config, ['bulk-remove-missing'])
69
- assert.deepStrictEqual(results, [])
70
- })
71
-
72
- await t.test('bulkRemoveMap removes each document individually', async () => {
73
- await saveDoc('bulk-remove-map-doc-1', { kind: 'map', count: 1 })
74
-
75
- const results = await bulkRemoveMap(config, ['bulk-remove-map-doc-1'])
76
- assert.strictEqual(results.length, 1)
77
- const [first] = results
78
- assert.ok(first)
79
- assert.strictEqual(first.id, 'bulk-remove-map-doc-1')
80
- assert.strictEqual(first.ok, true)
81
- assert.strictEqual(first.statusCode, 200)
82
-
83
- const { statusCode, body } = await getDoc('bulk-remove-map-doc-1')
84
- assert.strictEqual(statusCode, 404)
85
- assert.strictEqual(body?.error, 'not_found')
86
- })
87
-
88
- await t.test('bulkRemoveMap skips docs without revs', async () => {
89
- await saveDoc('bulk-remove-map-doc-2', { kind: 'map', count: 2 })
90
-
91
- const results = await bulkRemoveMap(config, [
92
- 'bulk-remove-map-doc-2',
93
- 'bulk-remove-map-missing'
94
- ])
95
- assert.strictEqual(results.length, 1)
96
- const [first] = results
97
- assert.ok(first)
98
- assert.strictEqual(first.id, 'bulk-remove-map-doc-2')
99
- assert.strictEqual(first.ok, true)
100
- })
101
- })
102
- })