@coveo/push-api-client 1.6.8 → 2.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.
- package/dist/definitions/environment.d.ts +3 -3
- package/dist/definitions/fieldAnalyser/fieldAnalyser.d.ts +2 -10
- package/dist/definitions/fieldAnalyser/{utils.d.ts → fieldUtils.d.ts} +0 -0
- package/dist/definitions/fieldAnalyser/{utils.spec.d.ts → fieldsUtils.spec.d.ts} +0 -0
- package/dist/definitions/fieldAnalyser/inconsistencies.d.ts +1 -1
- package/dist/definitions/fieldAnalyser/typeUtils.d.ts +3 -0
- package/dist/definitions/{source.spec.d.ts → fieldAnalyser/typeUtils.spec.d.ts} +0 -0
- package/dist/definitions/help/fileConsumer.d.ts +26 -0
- package/dist/definitions/help/fileConsumer.spec.d.ts +1 -0
- package/dist/definitions/index.d.ts +6 -2
- package/dist/definitions/interfaces.d.ts +36 -0
- package/dist/definitions/source/batchUpdateDocumentsFromFile.d.ts +10 -0
- package/dist/definitions/{source.d.ts → source/push.d.ts} +34 -69
- package/dist/definitions/source/push.spec.d.ts +1 -0
- package/dist/definitions/source/securityIdenty.d.ts +42 -0
- package/dist/definitions/source/source.d.ts +5 -0
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/classes/AnySecurityIdentityBuilder.html +3 -3
- package/dist/docs/classes/DocumentBuilder.html +17 -17
- package/dist/docs/classes/FieldAnalyser.html +3 -3
- package/dist/docs/classes/GroupSecurityIdentityBuilder.html +3 -3
- package/dist/docs/classes/PushSource.html +43 -0
- package/dist/docs/classes/UserSecurityIdentityBuilder.html +3 -3
- package/dist/docs/classes/VirtualGroupSecurityIdentityBuilder.html +3 -3
- package/dist/docs/enums/PlatformEnvironment.html +1 -1
- package/dist/docs/enums/Region.html +1 -1
- package/dist/docs/enums/SourceVisibility.html +1 -1
- package/dist/docs/index.html +1 -1
- package/dist/docs/interfaces/BatchUpdateDocuments.html +1 -1
- package/dist/docs/interfaces/Document.html +14 -14
- package/dist/docs/interfaces/SecurityIdentity.html +4 -4
- package/dist/docs/interfaces/SecurityIdentityBuilder.html +1 -1
- package/dist/docs/interfaces/UploadBatchCallbackData.html +1 -1
- package/dist/docs/modules.html +3 -2
- package/dist/environment.js.map +1 -1
- package/dist/fieldAnalyser/fieldAnalyser.js +21 -62
- package/dist/fieldAnalyser/fieldAnalyser.js.map +1 -1
- package/dist/fieldAnalyser/fieldAnalyser.spec.js +15 -22
- package/dist/fieldAnalyser/fieldAnalyser.spec.js.map +1 -1
- package/dist/fieldAnalyser/{utils.js → fieldUtils.js} +1 -1
- package/dist/fieldAnalyser/fieldUtils.js.map +1 -0
- package/dist/fieldAnalyser/{utils.spec.js → fieldsUtils.spec.js} +4 -4
- package/dist/fieldAnalyser/fieldsUtils.spec.js.map +1 -0
- package/dist/fieldAnalyser/inconsistencies.js.map +1 -1
- package/dist/fieldAnalyser/typeUtils.js +39 -0
- package/dist/fieldAnalyser/typeUtils.js.map +1 -0
- package/dist/fieldAnalyser/typeUtils.spec.js +48 -0
- package/dist/fieldAnalyser/typeUtils.spec.js.map +1 -0
- package/dist/help/fileConsumer.js +100 -0
- package/dist/help/fileConsumer.js.map +1 -0
- package/dist/help/fileConsumer.spec.js +75 -0
- package/dist/help/fileConsumer.spec.js.map +1 -0
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/dist/interfaces.js +3 -0
- package/dist/interfaces.js.map +1 -0
- package/dist/localtest.js +2 -2
- package/dist/localtest.js.map +1 -1
- package/dist/source/batchUpdateDocumentsFromFile.js +42 -0
- package/dist/source/batchUpdateDocumentsFromFile.js.map +1 -0
- package/dist/{source.js → source/push.js} +43 -128
- package/dist/source/push.js.map +1 -0
- package/dist/{source.spec.js → source/push.spec.js} +41 -27
- package/dist/source/push.spec.js.map +1 -0
- package/dist/source/securityIdenty.js +59 -0
- package/dist/source/securityIdenty.js.map +1 -0
- package/dist/source/source.js +9 -0
- package/dist/source/source.js.map +1 -0
- package/package.json +1 -1
- package/dist/docs/classes/Source.html +0 -45
- package/dist/docs/interfaces/BatchUpdateDocumentsFromFiles.html +0 -7
- package/dist/fieldAnalyser/utils.js.map +0 -1
- package/dist/fieldAnalyser/utils.spec.js.map +0 -1
- package/dist/source.js.map +0 -1
- package/dist/source.spec.js.map +0 -1
package/dist/docs/modules.html
CHANGED
@@ -1,3 +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>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/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/
|
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>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/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></ul></section><section class="tsd-index-section "><h3>Variables</h3><ul class="tsd-index-list"><li class="tsd-kind-variable"><a href="modules.html#Source" class="tsd-kind-icon">Source</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></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/bca460b/src/interfaces.ts#L38">src/interfaces.ts:38</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/bca460b/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="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/b72a40b/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/b72a40b/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="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/b72a40b/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="UploadBatchCallback" class="tsd-anchor"></a><h3 class="tsd-anchor-link">Upload<wbr/>Batch<wbr/>Callback<a href="#UploadBatchCallback" 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">Upload<wbr/>Batch<wbr/>Callback<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><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</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></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/b72a40b/src/source.ts#L53">src/source.ts:53</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><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</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>err: <span class="tsd-signature-type">unknown</span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">null</span></h5></li><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></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></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/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/Source.html" class="tsd-kind-icon">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/BatchUpdateDocumentsFromFiles.html" class="tsd-kind-icon">Batch<wbr/>Update<wbr/>Documents<wbr/>From<wbr/>Files</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#CompressionType" class="tsd-kind-icon">Compression<wbr/>Type</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#SecurityIdentityType" class="tsd-kind-icon">Security<wbr/>Identity<wbr/>Type</a></li><li class="tsd-kind-type-alias"><a href="modules.html#UploadBatchCallback" class="tsd-kind-icon">Upload<wbr/>Batch<wbr/>Callback</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-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-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</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-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>
|
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>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></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/bca460b/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>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/bca460b/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/bca460b/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/bca460b/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/bca460b/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>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></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/coveo/push-api-client.js/blob/bca460b/src/help/fileConsumer.ts#L12">src/help/fileConsumer.ts:12</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><section class="tsd-panel-group tsd-member-group "><h2>Variables</h2><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/bca460b/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></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></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/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-variable"><a href="modules.html#Source" class="tsd-kind-icon">Source</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>
|
package/dist/environment.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,8DAA6D;AAC7D,4DAAgD;AAAxC,yGAAA,MAAM,OAAA;AAEd,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,gCAAS,CAAA;IACT,sCAAe,CAAA;IACf,oCAAa,CAAA;AACf,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAEY,QAAA,mBAAmB,GAAG,mBAAmB,CAAC,IAAa,CAAC;AACxD,QAAA,cAAc,GAAG,wBAAM,CAAC,EAAW,CAAC;AAOjD,MAAM,cAAc,GAAuB;IACzC,WAAW,EAAE,2BAAmB;IAChC,MAAM,EAAE,sBAAc;CACvB,CAAC;AAEF,SAAgB,WAAW,CAAC,
|
1
|
+
{"version":3,"file":"environment.js","sourceRoot":"","sources":["../src/environment.ts"],"names":[],"mappings":";;;AAAA,8DAA6D;AAC7D,4DAAgD;AAAxC,yGAAA,MAAM,OAAA;AAEd,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,kCAAW,CAAA;IACX,gCAAS,CAAA;IACT,sCAAe,CAAA;IACf,oCAAa,CAAA;AACf,CAAC,EALW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAK9B;AAEY,QAAA,mBAAmB,GAAG,mBAAmB,CAAC,IAAa,CAAC;AACxD,QAAA,cAAc,GAAG,wBAAM,CAAC,EAAW,CAAC;AAOjD,MAAM,cAAc,GAAuB;IACzC,WAAW,EAAE,2BAAmB;IAChC,MAAM,EAAE,sBAAc;CACvB,CAAC;AAEF,SAAgB,WAAW,CAAC,OAA4B;IACtD,OAAO,mCAAO,cAAc,GAAK,OAAO,CAAC,CAAC;IAC1C,MAAM,MAAM,GACV,OAAO,CAAC,WAAW,KAAK,2BAAmB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC;IACzE,MAAM,SAAS,GACb,OAAO,CAAC,MAAM,KAAK,sBAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC;IAEhE,OAAO,cAAc,MAAM,GAAG,SAAS,wCAAwC,CAAC;AAClF,CAAC;AARD,kCAQC;AAED,SAAgB,+BAA+B,CAC7C,CAAsB;IAEtB,QAAQ,CAAC,EAAE;QACT,KAAK,KAAK;YACR,OAAO,6BAAW,CAAC,GAAG,CAAC;QACzB,KAAK,IAAI;YACP,OAAO,6BAAW,CAAC,OAAO,CAAC;QAC7B,KAAK,MAAM;YACT,OAAO,6BAAW,CAAC,IAAI,CAAC;QAC1B,KAAK,OAAO;YACV,OAAO,6BAAW,CAAC,KAAK,CAAC;QAC3B;YACE,OAAO,6BAAW,CAAC,IAAI,CAAC;KAC3B;AACH,CAAC;AAfD,0EAeC"}
|
@@ -2,10 +2,11 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.FieldAnalyser = void 0;
|
4
4
|
const platform_client_1 = require("@coveord/platform-client");
|
5
|
-
const
|
5
|
+
const fieldUtils_1 = require("./fieldUtils");
|
6
6
|
const fieldStore_1 = require("./fieldStore");
|
7
7
|
const inconsistencies_1 = require("./inconsistencies");
|
8
8
|
const fieldErrors_1 = require("../errors/fieldErrors");
|
9
|
+
const typeUtils_1 = require("./typeUtils");
|
9
10
|
/**
|
10
11
|
* Analyse documents to detect type inconsistencies and missing fields in your index.
|
11
12
|
*
|
@@ -14,7 +15,7 @@ class FieldAnalyser {
|
|
14
15
|
constructor(platformClient) {
|
15
16
|
this.platformClient = platformClient;
|
16
17
|
this.inconsistencies = new inconsistencies_1.Inconsistencies();
|
17
|
-
this.missingFields = new
|
18
|
+
this.missingFields = new fieldStore_1.FieldStore();
|
18
19
|
}
|
19
20
|
/**
|
20
21
|
* Adds a batch of document builders to the analyser
|
@@ -42,30 +43,35 @@ class FieldAnalyser {
|
|
42
43
|
* @return {*} {FieldAnalyserReport}
|
43
44
|
*/
|
44
45
|
report() {
|
45
|
-
|
46
|
-
this.
|
46
|
+
this.ensurePermanentId(this.missingFields);
|
47
|
+
this.removeInconsistentFields();
|
47
48
|
return {
|
48
|
-
fields:
|
49
|
+
fields: this.missingFields.marshal(),
|
49
50
|
inconsistencies: this.inconsistencies,
|
50
51
|
};
|
51
52
|
}
|
53
|
+
removeInconsistentFields() {
|
54
|
+
for (const fieldname of this.inconsistencies.keys()) {
|
55
|
+
this.missingFields.delete(fieldname);
|
56
|
+
}
|
57
|
+
}
|
52
58
|
storeMetadata(metadataKey, metadataValue) {
|
53
|
-
const
|
54
|
-
const
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
const fieldTypeCount = fieldTypeMap.get(metadataType);
|
59
|
-
fieldTypeMap.set(metadataType, fieldTypeCount ? fieldTypeCount + 1 : initialTypeCount);
|
59
|
+
const alreadyGuessedType = this.missingFields.get(metadataKey);
|
60
|
+
const newGuessedType = (0, typeUtils_1.getGuessedTypeFromValue)(metadataValue);
|
61
|
+
if (!alreadyGuessedType ||
|
62
|
+
(0, typeUtils_1.isValidTypeTransition)(alreadyGuessedType, newGuessedType)) {
|
63
|
+
this.missingFields.set(metadataKey, newGuessedType);
|
60
64
|
}
|
61
65
|
else {
|
62
|
-
|
63
|
-
|
66
|
+
this.inconsistencies.add(metadataKey, [
|
67
|
+
alreadyGuessedType,
|
68
|
+
newGuessedType,
|
69
|
+
]);
|
64
70
|
}
|
65
71
|
}
|
66
72
|
async ensureExistingFields() {
|
67
73
|
if (this.existingFields === undefined) {
|
68
|
-
this.existingFields = await (0,
|
74
|
+
this.existingFields = await (0, fieldUtils_1.listAllFieldsFromOrg)(this.platformClient);
|
69
75
|
}
|
70
76
|
return this.existingFields;
|
71
77
|
}
|
@@ -81,53 +87,6 @@ class FieldAnalyser {
|
|
81
87
|
fieldStore.set('permanentid', platform_client_1.FieldTypes.STRING);
|
82
88
|
}
|
83
89
|
}
|
84
|
-
getFieldTypes() {
|
85
|
-
const fieldStore = new fieldStore_1.FieldStore();
|
86
|
-
this.missingFields.forEach((fieldTypeMap, fieldName) => {
|
87
|
-
this.storePossibleTypeInconsistencies(fieldName, fieldTypeMap);
|
88
|
-
const fieldType = this.getMostProbableType(fieldTypeMap);
|
89
|
-
fieldStore.set(fieldName, fieldType);
|
90
|
-
});
|
91
|
-
return fieldStore;
|
92
|
-
}
|
93
|
-
storePossibleTypeInconsistencies(fieldName, fieldTypeMap) {
|
94
|
-
if (fieldTypeMap.size > 1) {
|
95
|
-
const fieldTypes = Array.from(fieldTypeMap.keys());
|
96
|
-
this.inconsistencies.add(fieldName, fieldTypes);
|
97
|
-
}
|
98
|
-
}
|
99
|
-
getMostProbableType(field) {
|
100
|
-
const sortedType = Array.from(field.entries()).sort((a, b) => {
|
101
|
-
const countDiff = b[1] - a[1];
|
102
|
-
return countDiff ? countDiff : this.typeCompare(a[0], b[0]);
|
103
|
-
});
|
104
|
-
return sortedType[0][0];
|
105
|
-
}
|
106
|
-
typeCompare(field1, field2) {
|
107
|
-
const precedence = (field) => FieldAnalyser.fieldTypePrecedence.indexOf(field);
|
108
|
-
if (precedence(field1) < precedence(field2)) {
|
109
|
-
return 1;
|
110
|
-
}
|
111
|
-
if (precedence(field1) > precedence(field2)) {
|
112
|
-
return -1;
|
113
|
-
}
|
114
|
-
return 0;
|
115
|
-
}
|
116
|
-
getGuessedTypeFromValue(obj) {
|
117
|
-
switch (typeof obj) {
|
118
|
-
case 'number':
|
119
|
-
return this.getSpecificNumericType(obj);
|
120
|
-
case 'string':
|
121
|
-
return platform_client_1.FieldTypes.STRING;
|
122
|
-
default:
|
123
|
-
return platform_client_1.FieldTypes.STRING;
|
124
|
-
}
|
125
|
-
}
|
126
|
-
getSpecificNumericType(_number) {
|
127
|
-
// TODO: CDX-838 Support LONG, LONG32 and DATE types
|
128
|
-
return platform_client_1.FieldTypes.DOUBLE;
|
129
|
-
}
|
130
90
|
}
|
131
91
|
exports.FieldAnalyser = FieldAnalyser;
|
132
|
-
FieldAnalyser.fieldTypePrecedence = ['DOUBLE', 'STRING'];
|
133
92
|
//# sourceMappingURL=fieldAnalyser.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fieldAnalyser.js","sourceRoot":"","sources":["../../src/fieldAnalyser/fieldAnalyser.ts"],"names":[],"mappings":";;;AAAA,8DAAgF;AAEhF,
|
1
|
+
{"version":3,"file":"fieldAnalyser.js","sourceRoot":"","sources":["../../src/fieldAnalyser/fieldAnalyser.ts"],"names":[],"mappings":";;;AAAA,8DAAgF;AAEhF,6CAAkD;AAClD,6CAAwC;AACxC,uDAAkD;AAClD,uDAAyD;AACzD,2CAA2E;AAO3E;;;GAGG;AACH,MAAa,aAAa;IAKxB,YAA2B,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;QACvD,IAAI,CAAC,eAAe,GAAG,IAAI,iCAAe,EAAE,CAAC;QAC7C,IAAI,CAAC,aAAa,GAAG,IAAI,uBAAU,EAAE,CAAC;IACxC,CAAC;IAED;;;;;;OAMG;IACI,KAAK,CAAC,GAAG,CAAC,KAAwB;QACvC,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAEzD,KAAK,CAAC,OAAO,CAAC,CAAC,GAAoB,EAAE,EAAE;YACrC,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,mBAAK,GAAG,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,CAAC;YAEnE,KAAK,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,IAAI,gBAAgB,EAAE;gBAC3D,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC,KAA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,cAAc,CAAC,CAAC;SACvE;QACD,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEO,iBAAiB,CAAC,UAAsB;;QAC9C,MAAM,WAAW,GAAG,MAAA,IAAI,CAAC,cAAc,0CAAE,IAAI,CAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CACxC,CAAC;QAEF,IAAI,WAAW,EAAE;YACf,IAAI,WAAW,CAAC,IAAI,KAAK,4BAAU,CAAC,MAAM,EAAE;gBAC1C,MAAM,IAAI,gCAAkB,CAAC,WAAW,CAAC,CAAC;aAC3C;SACF;aAAM;YACL,UAAU,CAAC,GAAG,CAAC,aAAa,EAAE,4BAAU,CAAC,MAAM,CAAC,CAAC;SAClD;IACH,CAAC;CACF;AA3FD,sCA2FC"}
|
@@ -13,7 +13,8 @@ const buildDocument = (metadata) => {
|
|
13
13
|
return doc;
|
14
14
|
};
|
15
15
|
const docWithNewFields = buildDocument({
|
16
|
-
|
16
|
+
some_integer: 100,
|
17
|
+
promo_price: 23.99,
|
17
18
|
description: 'Plumbus can generate and store vast amounts of heat, allowing it to be used for cooking, ironing or just heating the room.',
|
18
19
|
additional_info: 'Plumbus can secrete various agents from itself and has adaptive rubbing surfaces, making it useful for cleaning.',
|
19
20
|
price: 'six-and-a-half Brapples',
|
@@ -94,6 +95,10 @@ describe('FieldAnalyser', () => {
|
|
94
95
|
const docBuilders = [docWithNewFields, docWithExistingFields];
|
95
96
|
const { fields } = (await analyser.add(docBuilders)).report();
|
96
97
|
expect(fields).toStrictEqual([
|
98
|
+
{
|
99
|
+
name: 'some_integer',
|
100
|
+
type: 'LONG',
|
101
|
+
},
|
97
102
|
{
|
98
103
|
name: 'promo_price',
|
99
104
|
type: 'DOUBLE',
|
@@ -135,10 +140,14 @@ describe('FieldAnalyser', () => {
|
|
135
140
|
it('should detect type inconsistencies', () => {
|
136
141
|
const inconsistenciesSet = report.inconsistencies;
|
137
142
|
expect(inconsistenciesSet.get('price')).toStrictEqual(new Set(['DOUBLE', 'STRING']));
|
138
|
-
expect(inconsistenciesSet.get('available')).toStrictEqual(new Set(['
|
143
|
+
expect(inconsistenciesSet.get('available')).toStrictEqual(new Set(['LONG', 'STRING']));
|
139
144
|
});
|
140
145
|
it('should still provide fields to create', () => {
|
141
146
|
expect(report.fields).toStrictEqual([
|
147
|
+
{
|
148
|
+
name: 'some_integer',
|
149
|
+
type: 'LONG',
|
150
|
+
},
|
142
151
|
{
|
143
152
|
name: 'promo_price',
|
144
153
|
type: 'DOUBLE',
|
@@ -151,28 +160,12 @@ describe('FieldAnalyser', () => {
|
|
151
160
|
name: 'additional_info',
|
152
161
|
type: 'STRING',
|
153
162
|
},
|
154
|
-
{
|
155
|
-
name: 'price',
|
156
|
-
type: 'STRING',
|
157
|
-
},
|
158
|
-
{
|
159
|
-
name: 'available',
|
160
|
-
type: 'DOUBLE',
|
161
|
-
},
|
162
163
|
]);
|
163
164
|
});
|
164
|
-
it('should
|
165
|
-
|
166
|
-
|
167
|
-
name
|
168
|
-
type: 'STRING',
|
169
|
-
});
|
170
|
-
});
|
171
|
-
it('should associate to a field a type with the most occurences', () => {
|
172
|
-
// In this scenario, there were 2 occurences of numeric value and 1 occurence of string value for the same metadata
|
173
|
-
expect(report.fields).toContainEqual({
|
174
|
-
name: 'available',
|
175
|
-
type: 'DOUBLE',
|
165
|
+
it('should not return fields with inconsistencies', () => {
|
166
|
+
report.fields.forEach((field) => {
|
167
|
+
expect(field.name).not.toEqual('available');
|
168
|
+
expect(field.name).not.toEqual('price');
|
176
169
|
});
|
177
170
|
});
|
178
171
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"fieldAnalyser.spec.js","sourceRoot":"","sources":["../../src/fieldAnalyser/fieldAnalyser.spec.ts"],"names":[],"mappings":";;AAAA,IAAI,CAAC,IAAI,CAAC,0BAA0B,CAAC,CAAC;AAEtC,8DAAoE;AACpE,0BAA6C;AAC7C,uDAAyD;AACzD,mDA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,CAAC,CAAC,EAAE,UAAU,GAAG,CAAC,CAAC,CAAC;QAC9C,MAAM,MAAM,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;KACxC;AACH,CAAC,CAAC;AATW,QAAA,YAAY,gBASvB"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
jest.mock('@coveord/platform-client');
|
4
4
|
const platform_client_1 = require("@coveord/platform-client");
|
5
|
-
const
|
5
|
+
const fieldUtils_1 = require("./fieldUtils");
|
6
6
|
const mockedPlatformClient = jest.mocked(platform_client_1.default);
|
7
7
|
const mockedCreateField = jest.fn();
|
8
8
|
const mockedListFields = jest.fn();
|
@@ -36,7 +36,7 @@ describe('fieldUtils', () => {
|
|
36
36
|
items: [{ name: 'type' }],
|
37
37
|
totalPages: 2,
|
38
38
|
});
|
39
|
-
await (0,
|
39
|
+
await (0, fieldUtils_1.listAllFieldsFromOrg)(client);
|
40
40
|
});
|
41
41
|
it('should list all fields from org', async () => {
|
42
42
|
expect(mockedListFields).toHaveBeenCalledTimes(2);
|
@@ -68,7 +68,7 @@ describe('fieldUtils', () => {
|
|
68
68
|
batches: [['field1', 'field2', 'field3', 'field4', 'field5', 'field6']],
|
69
69
|
},
|
70
70
|
])('should split fields into smaller batches', async ({ batchLimit, batches }) => {
|
71
|
-
await (0,
|
71
|
+
await (0, fieldUtils_1.createFields)(client, fields, batchLimit);
|
72
72
|
expect(mockedCreateField).toHaveBeenCalledTimes(batches.length);
|
73
73
|
batches.forEach((batch, index) => {
|
74
74
|
const field = batch.map((f) => ({
|
@@ -79,4 +79,4 @@ describe('fieldUtils', () => {
|
|
79
79
|
});
|
80
80
|
});
|
81
81
|
});
|
82
|
-
//# sourceMappingURL=
|
82
|
+
//# sourceMappingURL=fieldsUtils.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"fieldsUtils.spec.js","sourceRoot":"","sources":["../../src/fieldAnalyser/f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AAC,CAAC;YAC/C,MAAM,CAAC,iBAAiB,CAAC,CAAC,qBAAqB,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;YAChE,OAAO,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;gBAC/B,MAAM,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC9B,IAAI,EAAE,CAAC;iBACR,CAAC,CAAC,CAAC;gBACJ,MAAM,CAAC,iBAAiB,CAAC,CAAC,uBAAuB,CAAC,KAAK,GAAG,CAAC,EAAE,KAAK,CAAC,CAAC;YACtE,CAAC,CAAC,CAAC;QACL,CAAC,CACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"inconsistencies.js","sourceRoot":"","sources":["../../src/fieldAnalyser/inconsistencies.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAgB,SAAQ,
|
1
|
+
{"version":3,"file":"inconsistencies.js","sourceRoot":"","sources":["../../src/fieldAnalyser/inconsistencies.ts"],"names":[],"mappings":";;;AAEA,MAAa,eAAgB,SAAQ,GAA4B;IAC/D;QACE,KAAK,EAAE,CAAC;IACV,CAAC;IAEM,GAAG,CAAC,SAAiB,EAAE,KAAmB;QAC/C,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC/C,IAAI,CAAC,GAAG,CAAC,SAAS,EAAE,IAAI,GAAG,CAAa,CAAC,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACtE,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAVD,0CAUC"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getGuessedTypeFromValue = exports.isValidTypeTransition = void 0;
|
4
|
+
const platform_client_1 = require("@coveord/platform-client");
|
5
|
+
const acceptedTransitions = [
|
6
|
+
{ from: platform_client_1.FieldTypes.LONG, to: [platform_client_1.FieldTypes.LONG_64, platform_client_1.FieldTypes.DOUBLE] },
|
7
|
+
{ from: platform_client_1.FieldTypes.LONG_64, to: [platform_client_1.FieldTypes.DOUBLE] },
|
8
|
+
];
|
9
|
+
function isValidTypeTransition(currentState, nextState) {
|
10
|
+
var _a;
|
11
|
+
if (currentState === nextState) {
|
12
|
+
return true;
|
13
|
+
}
|
14
|
+
const differentStateTransition = (_a = acceptedTransitions
|
15
|
+
.find((a) => a.from === currentState)) === null || _a === void 0 ? void 0 : _a.to.includes(nextState);
|
16
|
+
return Boolean(differentStateTransition);
|
17
|
+
}
|
18
|
+
exports.isValidTypeTransition = isValidTypeTransition;
|
19
|
+
function getGuessedTypeFromValue(obj) {
|
20
|
+
switch (typeof obj) {
|
21
|
+
case 'number':
|
22
|
+
return getSpecificNumericType(obj);
|
23
|
+
case 'string':
|
24
|
+
return platform_client_1.FieldTypes.STRING;
|
25
|
+
default:
|
26
|
+
return platform_client_1.FieldTypes.STRING;
|
27
|
+
}
|
28
|
+
}
|
29
|
+
exports.getGuessedTypeFromValue = getGuessedTypeFromValue;
|
30
|
+
function getSpecificNumericType(number) {
|
31
|
+
const is32BitInteger = (x) => (x | 0) === x;
|
32
|
+
if (Number.isInteger(number)) {
|
33
|
+
return is32BitInteger(number) ? platform_client_1.FieldTypes.LONG : platform_client_1.FieldTypes.LONG_64;
|
34
|
+
}
|
35
|
+
else {
|
36
|
+
return platform_client_1.FieldTypes.DOUBLE;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
//# sourceMappingURL=typeUtils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typeUtils.js","sourceRoot":"","sources":["../../src/fieldAnalyser/typeUtils.ts"],"names":[],"mappings":";;;AAAA,8DAAoD;AAEpD,MAAM,mBAAmB,GAAqD;IAC5E,EAAC,IAAI,EA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
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
const platform_client_1 = require("@coveord/platform-client");
|
4
|
+
const typeUtils_1 = require("./typeUtils");
|
5
|
+
describe('typeUtils', () => {
|
6
|
+
const signedIntegerLimit = 0b1111111111111111111111111111111;
|
7
|
+
it.each([
|
8
|
+
// String
|
9
|
+
{ value: 'over 9000', type: platform_client_1.FieldTypes.STRING },
|
10
|
+
// LONG
|
11
|
+
{ value: 0, type: platform_client_1.FieldTypes.LONG },
|
12
|
+
{ value: -10, type: platform_client_1.FieldTypes.LONG },
|
13
|
+
{ value: signedIntegerLimit, type: platform_client_1.FieldTypes.LONG },
|
14
|
+
{ value: 10.0, type: platform_client_1.FieldTypes.LONG },
|
15
|
+
// LONG 64
|
16
|
+
{ value: signedIntegerLimit + 1, type: platform_client_1.FieldTypes.LONG_64 },
|
17
|
+
{ value: signedIntegerLimit * -1 - 2, type: platform_client_1.FieldTypes.LONG_64 },
|
18
|
+
// DOUBLE
|
19
|
+
{ value: 3.14, type: platform_client_1.FieldTypes.DOUBLE },
|
20
|
+
{ value: -1.23, type: platform_client_1.FieldTypes.DOUBLE },
|
21
|
+
{ value: 9.164e-17, type: platform_client_1.FieldTypes.DOUBLE },
|
22
|
+
{ value: -9.1642346778e-175, type: platform_client_1.FieldTypes.DOUBLE },
|
23
|
+
])('value $value should be of type $type', ({ value, type }) => {
|
24
|
+
expect((0, typeUtils_1.getGuessedTypeFromValue)(value)).toBe(type);
|
25
|
+
});
|
26
|
+
describe('when the transition is authorized', () => {
|
27
|
+
it.each([
|
28
|
+
{ from: platform_client_1.FieldTypes.LONG, to: platform_client_1.FieldTypes.LONG },
|
29
|
+
{ from: platform_client_1.FieldTypes.LONG, to: platform_client_1.FieldTypes.LONG_64 },
|
30
|
+
{ from: platform_client_1.FieldTypes.LONG, to: platform_client_1.FieldTypes.DOUBLE },
|
31
|
+
{ from: platform_client_1.FieldTypes.LONG_64, to: platform_client_1.FieldTypes.DOUBLE },
|
32
|
+
{ from: platform_client_1.FieldTypes.DOUBLE, to: platform_client_1.FieldTypes.DOUBLE },
|
33
|
+
])('should return true', ({ from, to }) => {
|
34
|
+
expect((0, typeUtils_1.isValidTypeTransition)(from, to)).toBe(true);
|
35
|
+
});
|
36
|
+
});
|
37
|
+
describe('when the transition is not authorized', () => {
|
38
|
+
it.each([
|
39
|
+
{ from: platform_client_1.FieldTypes.LONG_64, to: platform_client_1.FieldTypes.LONG },
|
40
|
+
{ from: platform_client_1.FieldTypes.DOUBLE, to: platform_client_1.FieldTypes.LONG_64 },
|
41
|
+
{ from: platform_client_1.FieldTypes.LONG_64, to: platform_client_1.FieldTypes.STRING },
|
42
|
+
{ from: platform_client_1.FieldTypes.STRING, to: platform_client_1.FieldTypes.LONG },
|
43
|
+
])('should return true', ({ from, to }) => {
|
44
|
+
expect((0, typeUtils_1.isValidTypeTransition)(from, to)).toBe(false);
|
45
|
+
});
|
46
|
+
});
|
47
|
+
});
|
48
|
+
//# sourceMappingURL=typeUtils.spec.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"typeUtils.spec.js","sourceRoot":"","sources":["../../src/fieldAnalyser/typeUtils.spec.ts"],"names":[],"mappings":";;AAAA,8DAAoD;AACpD,2CAA2E;AAE3E,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,MAAM,kBAAkB,GAAG,iCAAiC,CAAC;IAE7D,EAAE,CAAC,IAAI,CAAC;QACN,SAAS;QACT,EAAC,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,4BAAU,CAAC,MAAM,EAAC;QAC7C,OAAO;QACP,EAAC,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,4BAAU,CAAC,IAAI,EAAC;QACjC,EAAC,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,4BAAU,CAAC,IAAI,EAAC;QACnC,EAAC,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,4BAAU,CAAC,IAAI,EAA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