@coveo/push-api-client 2.4.9 → 2.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/__stub__/largeDocuments/documentGenerator.js +22 -0
- package/dist/__stub__/largeDocuments/documentGenerator.js.map +1 -0
- package/dist/definitions/__stub__/largeDocuments/documentGenerator.d.ts +12 -0
- package/dist/definitions/uploadStrategy/strategy.d.ts +7 -0
- package/dist/definitions/uploadStrategy/streamChunkStrategy.d.ts +3 -2
- package/dist/docs/classes/AnySecurityIdentityBuilder.html +2 -2
- package/dist/docs/classes/CatalogSource.html +7 -7
- package/dist/docs/classes/DocumentBuilder.html +16 -16
- package/dist/docs/classes/FieldAnalyser.html +3 -3
- package/dist/docs/classes/GroupSecurityIdentityBuilder.html +2 -2
- package/dist/docs/classes/PushSource.html +14 -14
- package/dist/docs/classes/UserSecurityIdentityBuilder.html +2 -2
- package/dist/docs/classes/VirtualGroupSecurityIdentityBuilder.html +2 -2
- package/dist/docs/classes/errors.FieldTypeInconsistencyError.html +1 -1
- package/dist/docs/classes/errors.InvalidDocument.html +1 -1
- package/dist/docs/classes/errors.InvalidPermanentId.html +1 -1
- package/dist/docs/classes/errors.NotAFileError.html +1 -1
- package/dist/docs/classes/errors.NotAJsonFileError.html +1 -1
- package/dist/docs/classes/errors.PrivilegeError.html +1 -1
- package/dist/docs/classes/errors.UnsupportedAttribute.html +1 -1
- package/dist/docs/classes/errors.UnsupportedFieldError.html +2 -2
- package/dist/docs/enums/PlatformEnvironment.html +1 -1
- package/dist/docs/interfaces/BatchUpdateDocuments.html +1 -1
- package/dist/docs/interfaces/Document.html +13 -13
- package/dist/docs/interfaces/SecurityIdentity.html +3 -3
- package/dist/docs/interfaces/SecurityIdentityBuilder.html +1 -1
- package/dist/docs/interfaces/UploadBatchCallbackData.html +1 -1
- package/dist/docs/modules.html +3 -3
- package/dist/source/batchUploadDocumentsFromFile.js +3 -2
- package/dist/source/batchUploadDocumentsFromFile.js.map +1 -1
- package/dist/source/catalog.stream.spec.js +39 -9
- package/dist/source/catalog.stream.spec.js.map +1 -1
- package/dist/uploadStrategy/streamChunkStrategy.js +13 -10
- package/dist/uploadStrategy/streamChunkStrategy.js.map +1 -1
- package/package.json +11 -11
package/dist/docs/modules.html
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@coveo/push-api-client</title><meta name="description" content="Documentation for @coveo/push-api-client"/><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 async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@coveo/push-api-client</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@coveo/push-api-client </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/errors.html" class="tsd-kind-icon">errors</a></li></ul></section><section class="tsd-index-section "><h3>Enumerations</h3><ul class="tsd-index-list"><li class="tsd-kind-enum"><a href="enums/PlatformEnvironment.html" class="tsd-kind-icon">Platform<wbr/>Environment</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/Region.html" class="tsd-kind-icon">Region</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/SourceVisibility.html" class="tsd-kind-icon">Source<wbr/>Visibility</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/AnySecurityIdentityBuilder.html" class="tsd-kind-icon">Any<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/CatalogSource.html" class="tsd-kind-icon">Catalog<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/DocumentBuilder.html" class="tsd-kind-icon">Document<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/FieldAnalyser.html" class="tsd-kind-icon">Field<wbr/>Analyser</a></li><li class="tsd-kind-class"><a href="classes/GroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/PushSource.html" class="tsd-kind-icon">Push<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/UserSecurityIdentityBuilder.html" class="tsd-kind-icon">User<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/VirtualGroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Virtual<wbr/>Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/BatchUpdateDocuments.html" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents</a></li><li class="tsd-kind-interface"><a href="interfaces/Document.html" class="tsd-kind-icon">Document</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentity.html" class="tsd-kind-icon">Security<wbr/>Identity</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentityBuilder.html" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-interface"><a href="interfaces/UploadBatchCallbackData.html" class="tsd-kind-icon">Upload<wbr/>Batch<wbr/>Callback<wbr/>Data</a></li></ul></section><section class="tsd-index-section "><h3>Type Aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#BatchUpdateDocumentsFromFiles" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files</a></li><li class="tsd-kind-type-alias"><a href="modules.html#CompressionType" class="tsd-kind-icon">Compression<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#FailedUploadCallback" class="tsd-kind-icon">Failed<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Metadata" class="tsd-kind-icon">Metadata</a></li><li class="tsd-kind-type-alias"><a href="modules.html#MetadataValue" class="tsd-kind-icon">Metadata<wbr/>Value</a></li><li class="tsd-kind-type-alias"><a href="modules.html#PlatformUrlOptions" class="tsd-kind-icon">Platform<wbr/>Url<wbr/>Options</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SecurityIdentityType" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SuccessfulUploadCallback" class="tsd-kind-icon">Successful<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Transformer" class="tsd-kind-icon">Transformer</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#BuiltInTransformers" class="tsd-kind-icon">Built<wbr/>In<wbr/>Transformers</a></li><li class="tsd-kind-variable"><a href="modules.html#Source" class="tsd-kind-icon">Source</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#parseAndGetDocumentBuilderFromJSONDocument" class="tsd-kind-icon">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type Aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="BatchUpdateDocumentsFromFiles" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files<a href="#BatchUpdateDocumentsFromFiles" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BatchUpdateDocumentsOptions</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">ConcurrentProcessing</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">ParseDocumentOptions</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/
|
1
|
+
<!DOCTYPE html><html class="default"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>@coveo/push-api-client</title><meta name="description" content="Documentation for @coveo/push-api-client"/><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 async src="assets/search.js" id="search-script"></script></head><body><script>document.body.classList.add(localStorage.getItem("tsd-theme") || "os")</script><header><div class="tsd-page-toolbar"><div class="container"><div class="table-wrap"><div class="table-cell" id="tsd-search" data-base="."><div class="field"><label for="tsd-search-field" class="tsd-widget search no-caption">Search</label><input type="text" id="tsd-search-field"/></div><ul class="results"><li class="state loading">Preparing search index...</li><li class="state failure">The search index is not available</li></ul><a href="index.html" class="title">@coveo/push-api-client</a></div><div class="table-cell" id="tsd-widgets"><div id="tsd-filter"><a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a><div class="tsd-filter-group"><div class="tsd-select" id="tsd-filter-visibility"><span class="tsd-select-label">All</span><ul class="tsd-select-list"><li data-value="public">Public</li><li data-value="protected">Public/Protected</li><li data-value="private" class="selected">All</li></ul></div> <input type="checkbox" id="tsd-filter-inherited" checked/><label class="tsd-widget" for="tsd-filter-inherited">Inherited</label><input type="checkbox" id="tsd-filter-externals" checked/><label class="tsd-widget" for="tsd-filter-externals">Externals</label></div></div><a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a></div></div></div></div><div class="tsd-page-title"><div class="container"><h1>@coveo/push-api-client </h1></div></div></header><div class="container container-main"><div class="row"><div class="col-8 col-content"><section class="tsd-panel-group tsd-index-group"><h2>Index</h2><section class="tsd-panel tsd-index-panel"><div class="tsd-index-content"><section class="tsd-index-section "><h3>Namespaces</h3><ul class="tsd-index-list"><li class="tsd-kind-namespace"><a href="modules/errors.html" class="tsd-kind-icon">errors</a></li></ul></section><section class="tsd-index-section "><h3>Enumerations</h3><ul class="tsd-index-list"><li class="tsd-kind-enum"><a href="enums/PlatformEnvironment.html" class="tsd-kind-icon">Platform<wbr/>Environment</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/Region.html" class="tsd-kind-icon">Region</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/SourceVisibility.html" class="tsd-kind-icon">Source<wbr/>Visibility</a></li></ul></section><section class="tsd-index-section "><h3>Classes</h3><ul class="tsd-index-list"><li class="tsd-kind-class"><a href="classes/AnySecurityIdentityBuilder.html" class="tsd-kind-icon">Any<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/CatalogSource.html" class="tsd-kind-icon">Catalog<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/DocumentBuilder.html" class="tsd-kind-icon">Document<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/FieldAnalyser.html" class="tsd-kind-icon">Field<wbr/>Analyser</a></li><li class="tsd-kind-class"><a href="classes/GroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/PushSource.html" class="tsd-kind-icon">Push<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/UserSecurityIdentityBuilder.html" class="tsd-kind-icon">User<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/VirtualGroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Virtual<wbr/>Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li></ul></section><section class="tsd-index-section "><h3>Interfaces</h3><ul class="tsd-index-list"><li class="tsd-kind-interface"><a href="interfaces/BatchUpdateDocuments.html" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents</a></li><li class="tsd-kind-interface"><a href="interfaces/Document.html" class="tsd-kind-icon">Document</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentity.html" class="tsd-kind-icon">Security<wbr/>Identity</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentityBuilder.html" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-interface"><a href="interfaces/UploadBatchCallbackData.html" class="tsd-kind-icon">Upload<wbr/>Batch<wbr/>Callback<wbr/>Data</a></li></ul></section><section class="tsd-index-section "><h3>Type Aliases</h3><ul class="tsd-index-list"><li class="tsd-kind-type-alias"><a href="modules.html#BatchUpdateDocumentsFromFiles" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files</a></li><li class="tsd-kind-type-alias"><a href="modules.html#CompressionType" class="tsd-kind-icon">Compression<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#FailedUploadCallback" class="tsd-kind-icon">Failed<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Metadata" class="tsd-kind-icon">Metadata</a></li><li class="tsd-kind-type-alias"><a href="modules.html#MetadataValue" class="tsd-kind-icon">Metadata<wbr/>Value</a></li><li class="tsd-kind-type-alias"><a href="modules.html#PlatformUrlOptions" class="tsd-kind-icon">Platform<wbr/>Url<wbr/>Options</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SecurityIdentityType" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SuccessfulUploadCallback" class="tsd-kind-icon">Successful<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Transformer" class="tsd-kind-icon">Transformer</a></li></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#BuiltInTransformers" class="tsd-kind-icon">Built<wbr/>In<wbr/>Transformers</a></li><li class="tsd-kind-variable"><a href="modules.html#Source" class="tsd-kind-icon">Source</a></li></ul></section><section class="tsd-index-section "><h3>Functions</h3><ul class="tsd-index-list"><li class="tsd-kind-function"><a href="modules.html#parseAndGetDocumentBuilderFromJSONDocument" class="tsd-kind-icon">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument</a></li></ul></section></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Type Aliases</h2><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="BatchUpdateDocumentsFromFiles" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files<a href="#BatchUpdateDocumentsFromFiles" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BatchUpdateDocumentsOptions</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">ConcurrentProcessing</span><span class="tsd-signature-symbol"> & </span><span class="tsd-signature-type">ParseDocumentOptions</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/interfaces.ts#L64">src/interfaces.ts:64</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="CompressionType" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Compression<wbr/>Type<a href="#CompressionType" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Compression<wbr/>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"UNCOMPRESSED"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"DEFLATE"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"GZIP"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"LZMA"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"ZLIB"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/document.ts#L42">src/document.ts:42</a></li></ul></aside><div class="tsd-comment tsd-typography"><div class="lead">
|
2
2
|
<p>The compression type that was applied to your compressed document.</p>
|
3
|
-
</div></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="FailedUploadCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Failed<wbr/>Upload<wbr/>Callback<a href="#FailedUploadCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Failed<wbr/>Upload<wbr/>Callback<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span>, value<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/help/fileConsumer.ts#L14">src/help/fileConsumer.ts:14</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span>, value<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>err: <span class="tsd-signature-type">unknown</span></h5></li><li><h5>value: <a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="Metadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Metadata<a href="#Metadata" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Metadata<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="modules.html#MetadataValue" class="tsd-signature-type" data-tsd-kind="Type alias">MetadataValue</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/document.ts#L37">src/document.ts:37</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="MetadataValue" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Metadata<wbr/>Value<a href="#MetadataValue" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Metadata<wbr/>Value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</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><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/document.ts#L36">src/document.ts:36</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="PlatformUrlOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Platform<wbr/>Url<wbr/>Options<a href="#PlatformUrlOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Platform<wbr/>Url<wbr/>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>environment<span class="tsd-signature-symbol">?: </span><a href="enums/PlatformEnvironment.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PlatformEnvironment</a><span class="tsd-signature-symbol">; </span>region<span class="tsd-signature-symbol">?: </span><a href="enums/Region.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Region</a><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/environment.ts#L14">src/environment.ts:14</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> environment<span class="tsd-signature-symbol">?: </span><a href="enums/PlatformEnvironment.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PlatformEnvironment</a></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> region<span class="tsd-signature-symbol">?: </span><a href="enums/Region.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Region</a></h5></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="SecurityIdentityType" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Security<wbr/>Identity<wbr/>Type<a href="#SecurityIdentityType" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Security<wbr/>Identity<wbr/>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"UNKNOWN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"USER"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"GROUP"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"VIRTUAL_GROUP"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/document.ts#L1">src/document.ts:1</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="SuccessfulUploadCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Successful<wbr/>Upload<wbr/>Callback<a href="#SuccessfulUploadCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Successful<wbr/>Upload<wbr/>Callback<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/help/fileConsumer.ts#L13">src/help/fileConsumer.ts:13</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>data: <a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="Transformer" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Transformer<a href="#Transformer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Transformer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>str<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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/validation/transformers/transformer.ts#L1">src/validation/transformers/transformer.ts:1</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>str<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><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>str: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></li></ul></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="BuiltInTransformers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Built<wbr/>In<wbr/>Transformers<a href="#BuiltInTransformers" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Built<wbr/>In<wbr/>Transformers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readonly</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>identity<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol">; </span>toLowerCase<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol">; </span>toSnakeCase<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol"> }</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/coveo/push-api-client.js/blob/e99181b/src/validation/transformers/transformer.ts#L56">src/validation/transformers/transformer.ts:56</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-variable"><a id="Source" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Source<a href="#Source" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Source<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><a href="classes/PushSource.html" class="tsd-signature-type" data-tsd-kind="Class">PushSource</a><span class="tsd-signature-symbol"> = PushSource</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/e99181b/src/source/source.ts#L6">src/source/source.ts:6</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>This class has been replaced by <a href="classes/PushSource.html">PushSource</a></p>
|
4
|
-
</dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a id="parseAndGetDocumentBuilderFromJSONDocument" class="tsd-anchor"></a><h3 class="tsd-anchor-link">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument<a href="#parseAndGetDocumentBuilderFromJSONDocument" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument<span class="tsd-signature-symbol">(</span>documentPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PathLike</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ParseDocumentOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/DocumentBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">DocumentBuilder</a><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/
|
3
|
+
</div></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="FailedUploadCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Failed<wbr/>Upload<wbr/>Callback<a href="#FailedUploadCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Failed<wbr/>Upload<wbr/>Callback<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span>, value<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/help/fileConsumer.ts#L14">src/help/fileConsumer.ts:14</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>err<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">unknown</span>, value<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>err: <span class="tsd-signature-type">unknown</span></h5></li><li><h5>value: <a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="Metadata" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Metadata<a href="#Metadata" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Metadata<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">, </span><a href="modules.html#MetadataValue" class="tsd-signature-type" data-tsd-kind="Type alias">MetadataValue</a><span class="tsd-signature-symbol">></span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/document.ts#L37">src/document.ts:37</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="MetadataValue" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Metadata<wbr/>Value<a href="#MetadataValue" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Metadata<wbr/>Value<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</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><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">boolean</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/document.ts#L36">src/document.ts:36</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="PlatformUrlOptions" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Platform<wbr/>Url<wbr/>Options<a href="#PlatformUrlOptions" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Platform<wbr/>Url<wbr/>Options<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span>environment<span class="tsd-signature-symbol">?: </span><a href="enums/PlatformEnvironment.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PlatformEnvironment</a><span class="tsd-signature-symbol">; </span>region<span class="tsd-signature-symbol">?: </span><a href="enums/Region.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Region</a><span class="tsd-signature-symbol"> }</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/environment.ts#L14">src/environment.ts:14</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> environment<span class="tsd-signature-symbol">?: </span><a href="enums/PlatformEnvironment.html" class="tsd-signature-type" data-tsd-kind="Enumeration">PlatformEnvironment</a></h5></li><li class="tsd-parameter"><h5><span class="tsd-flag ts-flagOptional">Optional</span> region<span class="tsd-signature-symbol">?: </span><a href="enums/Region.html" class="tsd-signature-type" data-tsd-kind="Enumeration">Region</a></h5></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="SecurityIdentityType" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Security<wbr/>Identity<wbr/>Type<a href="#SecurityIdentityType" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Security<wbr/>Identity<wbr/>Type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">"UNKNOWN"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"USER"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"GROUP"</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">"VIRTUAL_GROUP"</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/document.ts#L1">src/document.ts:1</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="SuccessfulUploadCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Successful<wbr/>Upload<wbr/>Callback<a href="#SuccessfulUploadCallback" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Successful<wbr/>Upload<wbr/>Callback<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/help/fileConsumer.ts#L13">src/help/fileConsumer.ts:13</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>data<span class="tsd-signature-symbol">: </span><a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>data: <a href="interfaces/UploadBatchCallbackData.html" class="tsd-signature-type" data-tsd-kind="Interface">UploadBatchCallbackData</a></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4></li></ul></li></ul></div></section><section class="tsd-panel tsd-member tsd-kind-type-alias"><a id="Transformer" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Transformer<a href="#Transformer" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Transformer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">(</span>str<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><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/validation/transformers/transformer.ts#L1">src/validation/transformers/transformer.ts:1</a></li></ul></aside><div class="tsd-type-declaration"><h4>Type declaration</h4><ul class="tsd-parameters"><li class="tsd-parameter-signature"><ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-type-alias"><li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>str<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><span class="tsd-signature-type">string</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>str: <span class="tsd-signature-type">string</span></h5></li></ul><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4></li></ul></li></ul></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><section class="tsd-panel tsd-member tsd-kind-variable"><a id="BuiltInTransformers" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Built<wbr/>In<wbr/>Transformers<a href="#BuiltInTransformers" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Built<wbr/>In<wbr/>Transformers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readonly</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-symbol">{ </span>identity<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol">; </span>toLowerCase<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol">; </span>toSnakeCase<span class="tsd-signature-symbol">: </span><a href="modules.html#Transformer" class="tsd-signature-type" data-tsd-kind="Type alias">Transformer</a><span class="tsd-signature-symbol"> }</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/coveo/push-api-client.js/blob/89c0c63/src/validation/transformers/transformer.ts#L56">src/validation/transformers/transformer.ts:56</a></li></ul></aside></section><section class="tsd-panel tsd-member tsd-kind-variable"><a id="Source" class="tsd-anchor"></a><h3 class="tsd-anchor-link"><span class="tsd-flag ts-flagConst">Const</span> Source<a href="#Source" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><div class="tsd-signature tsd-kind-icon">Source<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">typeof </span><a href="classes/PushSource.html" class="tsd-signature-type" data-tsd-kind="Class">PushSource</a><span class="tsd-signature-symbol"> = PushSource</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/source/source.ts#L6">src/source/source.ts:6</a></li></ul></aside><div class="tsd-comment tsd-typography"><dl class="tsd-comment-tags"><dt>deprecated</dt><dd><p>This class has been replaced by <a href="classes/PushSource.html">PushSource</a></p>
|
4
|
+
</dd></dl></div></section></section><section class="tsd-panel-group tsd-member-group "><h2>Functions</h2><section class="tsd-panel tsd-member tsd-kind-function"><a id="parseAndGetDocumentBuilderFromJSONDocument" class="tsd-anchor"></a><h3 class="tsd-anchor-link">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument<a href="#parseAndGetDocumentBuilderFromJSONDocument" aria-label="Permalink" class="tsd-anchor-icon"><svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-link" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></svg></a></h3><ul class="tsd-signatures tsd-kind-function"><li class="tsd-signature tsd-kind-icon">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument<span class="tsd-signature-symbol">(</span>documentPath<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">PathLike</span>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">ParseDocumentOptions</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="classes/DocumentBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">DocumentBuilder</a><span class="tsd-signature-symbol">[]</span></li></ul><ul class="tsd-descriptions"><li class="tsd-description"><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/89c0c63/src/validation/parseFile.ts#L27">src/validation/parseFile.ts:27</a></li></ul></aside><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameters"><li><h5>documentPath: <span class="tsd-signature-type">PathLike</span></h5></li><li><h5><span class="tsd-flag ts-flagOptional">Optional</span> options: <span class="tsd-signature-type">ParseDocumentOptions</span></h5></li></ul><h4 class="tsd-returns-title">Returns <a href="classes/DocumentBuilder.html" class="tsd-signature-type" data-tsd-kind="Class">DocumentBuilder</a><span class="tsd-signature-symbol">[]</span></h4></li></ul></section></section></div><div class="col-4 col-menu menu-sticky-wrap menu-highlight"><nav class="tsd-navigation primary"><ul><li class="current"><a href="modules.html">Exports</a></li><li class=" tsd-kind-namespace"><a href="modules/errors.html">errors</a></li></ul></nav><nav class="tsd-navigation secondary menu-sticky"><ul><li class="tsd-kind-enum"><a href="enums/PlatformEnvironment.html" class="tsd-kind-icon">Platform<wbr/>Environment</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/Region.html" class="tsd-kind-icon">Region</a></li><li class="tsd-kind-enum tsd-is-external"><a href="enums/SourceVisibility.html" class="tsd-kind-icon">Source<wbr/>Visibility</a></li><li class="tsd-kind-class"><a href="classes/AnySecurityIdentityBuilder.html" class="tsd-kind-icon">Any<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/CatalogSource.html" class="tsd-kind-icon">Catalog<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/DocumentBuilder.html" class="tsd-kind-icon">Document<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/FieldAnalyser.html" class="tsd-kind-icon">Field<wbr/>Analyser</a></li><li class="tsd-kind-class"><a href="classes/GroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/PushSource.html" class="tsd-kind-icon">Push<wbr/>Source</a></li><li class="tsd-kind-class"><a href="classes/UserSecurityIdentityBuilder.html" class="tsd-kind-icon">User<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-class"><a href="classes/VirtualGroupSecurityIdentityBuilder.html" class="tsd-kind-icon">Virtual<wbr/>Group<wbr/>Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-interface"><a href="interfaces/BatchUpdateDocuments.html" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents</a></li><li class="tsd-kind-interface"><a href="interfaces/Document.html" class="tsd-kind-icon">Document</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentity.html" class="tsd-kind-icon">Security<wbr/>Identity</a></li><li class="tsd-kind-interface"><a href="interfaces/SecurityIdentityBuilder.html" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Builder</a></li><li class="tsd-kind-interface"><a href="interfaces/UploadBatchCallbackData.html" class="tsd-kind-icon">Upload<wbr/>Batch<wbr/>Callback<wbr/>Data</a></li><li class="tsd-kind-type-alias"><a href="modules.html#BatchUpdateDocumentsFromFiles" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files</a></li><li class="tsd-kind-type-alias"><a href="modules.html#CompressionType" class="tsd-kind-icon">Compression<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#FailedUploadCallback" class="tsd-kind-icon">Failed<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Metadata" class="tsd-kind-icon">Metadata</a></li><li class="tsd-kind-type-alias"><a href="modules.html#MetadataValue" class="tsd-kind-icon">Metadata<wbr/>Value</a></li><li class="tsd-kind-type-alias"><a href="modules.html#PlatformUrlOptions" class="tsd-kind-icon">Platform<wbr/>Url<wbr/>Options</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SecurityIdentityType" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#SuccessfulUploadCallback" class="tsd-kind-icon">Successful<wbr/>Upload<wbr/>Callback</a></li><li class="tsd-kind-type-alias"><a href="modules.html#Transformer" class="tsd-kind-icon">Transformer</a></li><li class="tsd-kind-variable"><a href="modules.html#BuiltInTransformers" class="tsd-kind-icon">Built<wbr/>In<wbr/>Transformers</a></li><li class="tsd-kind-variable"><a href="modules.html#Source" class="tsd-kind-icon">Source</a></li><li class="tsd-kind-function"><a href="modules.html#parseAndGetDocumentBuilderFromJSONDocument" class="tsd-kind-icon">parse<wbr/>And<wbr/>Get<wbr/>Document<wbr/>Builder<wbr/>FromJSONDocument</a></li></ul></nav></div></div></div><footer class="with-border-bottom"><div class="container"><h2>Legend</h2><div class="tsd-legend-group"><ul class="tsd-legend"><li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li><li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li><li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li></ul><ul class="tsd-legend"><li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li><li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li></ul></div><h2>Settings</h2><p>Theme <select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></p></div></footer><div class="container tsd-generator"><p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div><div class="overlay"></div><script src="assets/main.js"></script></body></html>
|
@@ -10,8 +10,9 @@ class BatchUploadDocumentsFromFilesReturn {
|
|
10
10
|
constructor(platformClient, strategy, filesOrDirectories, options) {
|
11
11
|
this.consumer = new fileConsumer_1.FileConsumer((batch) => strategy.upload(batch), options);
|
12
12
|
this.internalPromise = (async () => {
|
13
|
-
var _a;
|
13
|
+
var _a, _b;
|
14
14
|
const files = (0, file_1.getAllJsonFilesFromEntries)(filesOrDirectories);
|
15
|
+
await ((_a = strategy.preUpload) === null || _a === void 0 ? void 0 : _a.call(strategy));
|
15
16
|
if (options.createFields) {
|
16
17
|
const analyser = new index_1.FieldAnalyser(platformClient);
|
17
18
|
for (const filePath of files.values()) {
|
@@ -22,7 +23,7 @@ class BatchUploadDocumentsFromFilesReturn {
|
|
22
23
|
await (0, fieldUtils_1.createFieldsFromReport)(platformClient, report);
|
23
24
|
}
|
24
25
|
await this.consumer.consume(files, options);
|
25
|
-
await ((
|
26
|
+
await ((_b = strategy.postUpload) === null || _b === void 0 ? void 0 : _b.call(strategy));
|
26
27
|
}).bind(this);
|
27
28
|
}
|
28
29
|
onBatchUpload(cb) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"batchUploadDocumentsFromFile.js","sourceRoot":"","sources":["../../src/source/batchUploadDocumentsFromFile.ts"],"names":[],"mappings":";;;AACA,4DAAmE;AACnE,uCAAwD;AACxD,uDAAkD;AAClD,oCAMkB;AAElB,uDAAmF;AAEnF,MAAa,mCAAmC;IAI9C,YACE,cAA8B,EAC9B,QAAwB,EACxB,kBAA4B,EAC5B,OAAgD;QAEhD,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAY,CAC9B,CAAC,KAA2B,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,EACvD,OAAO,CACR,CAAC;QAEF,IAAI,CAAC,eAAe,GAAG,CAAC,KAAK,IAAI,EAAE;;YACjC,MAAM,KAAK,GAAG,IAAA,iCAA0B,EAAC,kBAAkB,CAAC,CAAC;YAC7D,IAAI,OAAO,CAAC,YAAY,EAAE;gBACxB,MAAM,QAAQ,GAAG,IAAI,qBAAa,CAAC,cAAc,CAAC,CAAC;gBACnD,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE;oBACrC,MAAM,WAAW,GAAG,IAAA,sDAA0C,EAC5D,QAAQ,EACR,OAAO,CACR,CAAC;oBACF,MAAM,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;iBACjC;gBAED,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE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xB,MAAM,QAAQ,GAAG,IAAI,qBAAa,CAAC,cAAc,CAAC,CAAC;gBACnD,KAAK,MAAM,QAAQ,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE;oBACrC,MAAM,WAAW,GAAG,IAAA,sDAA0C,EAC5D,QAAQ,EACR,OAAO,CACR,CAAC;oBACF,MAAM,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;iBACjC;gBAED,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC;gBACjC,MAAM,IAAA,mCAAsB,EAAC,cAAc,EAAE,MAAM,CAAC,CAAC;aACtD;YAED,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC5C,MAAM,CAAA,MAAA,QAAQ,CAAC,UAAU,wDAAI,CAAA,CAAC;QAChC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAChB,CAAC;IAEM,aAAa,CAAC,EAA4B;QAC/C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,YAAY,CAAC,EAAwB;QAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,eAAe,EAAE,CAAC;IAChC,CAAC;CACF;AAnDD,kFAmDC"}
|
@@ -10,6 +10,8 @@ const path_1 = require("path");
|
|
10
10
|
const process_1 = require("process");
|
11
11
|
const catalog_1 = require("./catalog");
|
12
12
|
const __1 = require("..");
|
13
|
+
const documentGenerator_1 = require("../__stub__/largeDocuments/documentGenerator");
|
14
|
+
const fs_1 = require("fs");
|
13
15
|
const mockAxios = axios_1.default;
|
14
16
|
const mockedFieldAnalyser = jest.mocked(__1.FieldAnalyser);
|
15
17
|
const mockedPlatformClient = jest.mocked(platform_client_1.default);
|
@@ -60,7 +62,7 @@ const doMockFieldAnalyser = () => {
|
|
60
62
|
report: mockAnalyserReport,
|
61
63
|
}));
|
62
64
|
};
|
63
|
-
const
|
65
|
+
const mockSuccessAxiosCalls = () => {
|
64
66
|
mockAxios.post.mockImplementation((url) => {
|
65
67
|
if (url.match(/chunk/)) {
|
66
68
|
return Promise.resolve(doAxiosMockFileContainerResponse());
|
@@ -71,10 +73,18 @@ const mockAxiosForStreamCalls = () => {
|
|
71
73
|
return Promise.resolve({ data: {} });
|
72
74
|
});
|
73
75
|
};
|
74
|
-
const
|
75
|
-
|
76
|
-
|
76
|
+
const mockFailedChunkAxiosCalls = (err) => {
|
77
|
+
mockAxios.post.mockImplementation((url) => {
|
78
|
+
if (url.match(/chunk/)) {
|
79
|
+
return Promise.reject({ message: err });
|
80
|
+
}
|
81
|
+
if (url.match(/stream\/open/)) {
|
82
|
+
return Promise.resolve(doAxiosMockOpenStream());
|
83
|
+
}
|
84
|
+
return Promise.resolve({ data: {} });
|
77
85
|
});
|
86
|
+
};
|
87
|
+
const basicStreamExpectations = () => {
|
78
88
|
it('should open a stream', async () => {
|
79
89
|
expect(mockAxios.post).toHaveBeenNthCalledWith(1, 'https://api.cloud.coveo.com/push/v1/organizations/the_org/sources/the_id/stream/open', {}, expectedDocumentsHeaders);
|
80
90
|
});
|
@@ -82,7 +92,7 @@ const basicStreamExpectations = () => {
|
|
82
92
|
expect(mockAxios.post).toHaveBeenNthCalledWith(2, 'https://api.cloud.coveo.com/push/v1/organizations/the_org/sources/the_id/stream/the_stream_id/chunk', {}, expectedDocumentsHeaders);
|
83
93
|
});
|
84
94
|
it('should close a stream', async () => {
|
85
|
-
expect(mockAxios.post).
|
95
|
+
expect(mockAxios.post).toHaveBeenLastCalledWith('https://api.cloud.coveo.com/push/v1/organizations/the_org/sources/the_id/stream/the_stream_id/close', {}, expectedDocumentsHeaders);
|
86
96
|
});
|
87
97
|
};
|
88
98
|
describe('CatalogSource - Stream', () => {
|
@@ -98,7 +108,7 @@ describe('CatalogSource - Stream', () => {
|
|
98
108
|
});
|
99
109
|
describe('when streaming data from a batch', () => {
|
100
110
|
beforeEach(async () => {
|
101
|
-
|
111
|
+
mockSuccessAxiosCalls();
|
102
112
|
await source
|
103
113
|
.batchStreamDocumentsFromFiles('the_id', [(0, path_1.join)(pathToStub, 'mixdocuments')], { createFields: false })
|
104
114
|
.batch();
|
@@ -126,16 +136,36 @@ describe('CatalogSource - Stream', () => {
|
|
126
136
|
});
|
127
137
|
});
|
128
138
|
});
|
139
|
+
describe('when streaming large amount of data', () => {
|
140
|
+
beforeAll(() => {
|
141
|
+
(0, fs_1.mkdirSync)((0, path_1.join)(pathToStub, 'batman_temp_dir'));
|
142
|
+
(0, fs_1.writeFileSync)((0, path_1.join)(pathToStub, 'batman_temp_dir', 'mucho_batmans.json'), JSON.stringify((0, documentGenerator_1.generateBatmans)(10e3), null, 2) // Enough batmans so they can be sent in multiple chunks
|
143
|
+
);
|
144
|
+
});
|
145
|
+
beforeEach(async () => {
|
146
|
+
mockSuccessAxiosCalls();
|
147
|
+
await source
|
148
|
+
.batchStreamDocumentsFromFiles('the_id', [(0, path_1.join)(pathToStub, 'batman_temp_dir', 'mucho_batmans.json')], { createFields: false })
|
149
|
+
.batch();
|
150
|
+
});
|
151
|
+
afterAll(() => {
|
152
|
+
(0, fs_1.rmSync)((0, path_1.join)(pathToStub, 'batman_temp_dir'), {
|
153
|
+
recursive: true,
|
154
|
+
});
|
155
|
+
mockAxios.post.mockReset();
|
156
|
+
});
|
157
|
+
basicStreamExpectations();
|
158
|
+
});
|
129
159
|
describe('when streaming data from local files', () => {
|
130
160
|
beforeEach(async () => {
|
131
|
-
|
161
|
+
mockSuccessAxiosCalls();
|
132
162
|
});
|
133
163
|
afterAll(() => {
|
134
164
|
mockAxios.post.mockReset();
|
135
165
|
});
|
136
166
|
describe('API call expectations', () => {
|
137
167
|
beforeEach(async () => {
|
138
|
-
|
168
|
+
mockSuccessAxiosCalls();
|
139
169
|
await source
|
140
170
|
.batchStreamDocumentsFromFiles('the_id', [(0, path_1.join)(pathToStub, 'mixdocuments')], { createFields: false })
|
141
171
|
.batch();
|
@@ -176,7 +206,7 @@ describe('CatalogSource - Stream', () => {
|
|
176
206
|
});
|
177
207
|
it('should call the errorCallback on a failure from the API', async () => {
|
178
208
|
mockAxios.post.mockReset();
|
179
|
-
|
209
|
+
mockFailedChunkAxiosCalls('Error Message');
|
180
210
|
await source
|
181
211
|
.batchStreamDocumentsFromFiles('the_id', [(0, path_1.join)(pathToStub, 'mixdocuments')], { createFields: false })
|
182
212
|
.onBatchError(mockedErrorCallback)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"catalog.stream.spec.js","sourceRoot":"","sources":["../../src/source/catalog.stream.spec.ts"],"names":[],"mappings":";;AAAA,+CAA+C;AAC/C,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AACnB,IAAI,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;AAC5C,8DAAsD;AACtD,iCAA0B;AAC1B,+BAA0B;AAC1B,qCAA4B;AAC5B,uCAAwC;AACxC,0BAAiC;AACjC,MAAM,SAAS,GAAG,eAAkC,CAAC;AAErD,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAa,CAAC,CAAC;AACvD,MAAM,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,yBAAc,CAAC,CAAC;AACzD,MAAM,gBAAgB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACnC,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAClC,MAAM,YAAY,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAC/B,MAAM,eAAe,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AAClC,MAAM,kBAAkB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;AACrC,MAAM,qBAAqB,GA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,EACR,CAAC,0BAA0B,CAAC,EAC5B,EAAC,YAAY,EAAE,KAAK,EAAC,CACtB;iBACA,KAAK,EAAE,CACX,CAAC,OAAO,CAAC,OAAO,CACf,6DAA6D,CAC9D,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -20,16 +20,16 @@ class StreamChunkStrategy {
|
|
20
20
|
const chunk = await this.requestStreamChunk();
|
21
21
|
return (0, fileContainer_1.uploadContentToFileContainer)(chunk, batch);
|
22
22
|
}
|
23
|
-
|
24
|
-
|
23
|
+
async preUpload() {
|
24
|
+
await this.openStream();
|
25
25
|
}
|
26
|
-
async
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
32
|
-
|
26
|
+
async postUpload() {
|
27
|
+
await this.closeOpenedStream();
|
28
|
+
}
|
29
|
+
async openStream() {
|
30
|
+
const openStreamUrl = new url_1.URL(`${this.urlBuilder.baseStreamURL}/open`);
|
31
|
+
const res = await axios_1.default.post(openStreamUrl.toString(), {}, this.documentsAxiosConfig);
|
32
|
+
this._openedStream = res.data;
|
33
33
|
}
|
34
34
|
async closeOpenedStream() {
|
35
35
|
if (this._openedStream === null) {
|
@@ -41,7 +41,10 @@ class StreamChunkStrategy {
|
|
41
41
|
return res.data;
|
42
42
|
}
|
43
43
|
async requestStreamChunk() {
|
44
|
-
|
44
|
+
if (this._openedStream === null) {
|
45
|
+
throw 'No open stream found';
|
46
|
+
}
|
47
|
+
const { streamId } = this._openedStream;
|
45
48
|
const openStreamUrl = new url_1.URL(`${this.urlBuilder.baseStreamURL}/${streamId}/chunk`);
|
46
49
|
const res = await axios_1.default.post(openStreamUrl.toString(), {}, this.documentsAxiosConfig);
|
47
50
|
return res.data;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"streamChunkStrategy.js","sourceRoot":"","sources":["../../src/uploadStrategy/streamChunkStrategy.ts"],"names":[],"mappings":";;;AAAA,iC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push API client",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"files": [
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"type": "commonjs",
|
10
10
|
"types": "./dist/definitions/index.d.ts",
|
11
11
|
"dependencies": {
|
12
|
-
"@coveo/bueno": "^0.
|
12
|
+
"@coveo/bueno": "^0.38.0",
|
13
13
|
"@coveord/platform-client": "^33.0.0",
|
14
14
|
"abortcontroller-polyfill": "^1.7.1",
|
15
15
|
"axios": "^0.27.0",
|
@@ -18,25 +18,25 @@
|
|
18
18
|
},
|
19
19
|
"devDependencies": {
|
20
20
|
"@coveo/push-api-client": "file:.",
|
21
|
-
"@types/jest": "28.1.
|
22
|
-
"@types/node": "17.0.
|
23
|
-
"@typescript-eslint/eslint-plugin": "5.
|
24
|
-
"@typescript-eslint/parser": "5.
|
21
|
+
"@types/jest": "28.1.2",
|
22
|
+
"@types/node": "17.0.45",
|
23
|
+
"@typescript-eslint/eslint-plugin": "5.28.0",
|
24
|
+
"@typescript-eslint/parser": "5.28.0",
|
25
25
|
"cz-conventional-changelog": "3.3.0",
|
26
26
|
"dotenv": "16.0.1",
|
27
|
-
"eslint": "8.
|
27
|
+
"eslint": "8.18.0",
|
28
28
|
"eslint-config-prettier": "8.5.0",
|
29
29
|
"gts": "3.1.0",
|
30
30
|
"husky": "8.0.1",
|
31
31
|
"jest": "28.1.1",
|
32
|
-
"lint-staged": "13.0.
|
32
|
+
"lint-staged": "13.0.2",
|
33
33
|
"nodemon": "2.0.16",
|
34
|
-
"prettier": "2.
|
34
|
+
"prettier": "2.7.1",
|
35
35
|
"standard-version": "9.5.0",
|
36
|
-
"ts-jest": "28.0.
|
36
|
+
"ts-jest": "28.0.5",
|
37
37
|
"ts-node": "10.8.1",
|
38
38
|
"typedoc": "0.22.17",
|
39
|
-
"typescript": "4.7.
|
39
|
+
"typescript": "4.7.4"
|
40
40
|
},
|
41
41
|
"husky": {
|
42
42
|
"hooks": {
|