@progress/sitefinity-webservices-sdk 1.0.4 → 1.1.3
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/.eslintrc.js +30 -9
- package/README.md +28 -11
- package/config/helpers.ts +8 -0
- package/config/webpack.common.ts +39 -0
- package/config/webpack.dev.ts +37 -0
- package/config/webpack.prod.ts +17 -0
- package/dist/docs/assets/highlight.css +23 -9
- package/dist/docs/assets/main.js +58 -52
- package/dist/docs/assets/search.js +1 -1
- package/dist/docs/assets/style.css +488 -621
- package/dist/docs/classes/BlobBuilder.BlobBuilder.html +137 -0
- package/dist/docs/classes/Data.Data.html +387 -0
- package/dist/docs/classes/Expression.BinaryExpression.html +184 -1
- package/dist/docs/classes/Expression.ComplexExpression.html +146 -1
- package/dist/docs/classes/Expression.ExpressionBase.html +125 -1
- package/dist/docs/classes/OrderProperty.OrderProperty.html +151 -0
- package/dist/docs/classes/Query.Query.html +353 -0
- package/dist/docs/classes/QueryBase.QueryBase.html +185 -0
- package/dist/docs/classes/QueryBuilder.QueryBuilder.html +204 -0
- package/dist/docs/classes/Requests_BatchRequest.BatchRequest.html +731 -17
- package/dist/docs/classes/Requests_BatchRequest.Transaction.html +332 -17
- package/dist/docs/classes/Requests_ExecutableRequest.ExecutableRequest.html +340 -1
- package/dist/docs/classes/Requests_Request.CommitChunksRequest.html +303 -0
- package/dist/docs/classes/Requests_Request.CreateRelatedRequest.html +310 -1
- package/dist/docs/classes/Requests_Request.CreateRequest.html +307 -1
- package/dist/docs/classes/Requests_Request.DeleteRelatedByIdRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.DeleteRelatedRequest.html +302 -1
- package/dist/docs/classes/Requests_Request.DeleteRequest.html +298 -1
- package/dist/docs/classes/Requests_Request.GetByIdRequest.html +298 -1
- package/dist/docs/classes/Requests_Request.GetRelatedByIdRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.GetRelatedRequest.html +302 -1
- package/dist/docs/classes/Requests_Request.GetRequest.html +295 -1
- package/dist/docs/classes/Requests_Request.UpdateRequest.html +309 -1
- package/dist/docs/classes/Requests_Request.UploadChunkRequest.html +352 -0
- package/dist/docs/classes/Requests_Request.UploadRequest.html +329 -1
- package/dist/docs/classes/Requests_RequestBase.RequestBase.html +275 -1
- package/dist/docs/classes/Requests_RequestFactory.RequestFactory.html +344 -1
- package/dist/docs/classes/Sitefinity.Sitefinity.html +188 -0
- package/dist/docs/classes/WhereQuery.WhereQuery.html +417 -0
- package/dist/docs/classes/chunk_upload_chunk_upload_sdk.ChunkUploadSdk.html +231 -0
- package/dist/docs/classes/chunk_upload_chunked_file_upload_utilities.ChunkedFileUploadUtilities.html +131 -0
- package/dist/docs/classes/utils.utils.html +303 -0
- package/dist/docs/index.html +84 -15
- package/dist/docs/interfaces/Data.CreateRelatedRequestOptions.html +155 -1
- package/dist/docs/interfaces/Data.CreateRequestOptions.html +153 -1
- package/dist/docs/interfaces/Data.OperationsRequestOptions.html +145 -1
- package/dist/docs/interfaces/Data.PropertyRequestOptions.html +149 -1
- package/dist/docs/interfaces/Data.RequestOptionsBase.html +136 -1
- package/dist/docs/interfaces/Data.SingleRelatedItemRequestOptions.html +155 -1
- package/dist/docs/interfaces/Data.UpdateRequestOptions.html +155 -1
- package/dist/docs/interfaces/Data.UploadRequestOptions.html +169 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRelatedRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRequestOptions.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchPropertyRequestOptions.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsBase.html +145 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsExtended.html +153 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleItemRequestOptions.html +145 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleRelatedItemRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_BatchRequest.BatchUpdateRequestOptions.html +161 -1
- package/dist/docs/interfaces/Requests_ExecutableRequest.ResponseHandlers.html +98 -5
- package/dist/docs/interfaces/Requests_Request.CommitChunksRequestOptionsExtended.html +215 -0
- package/dist/docs/interfaces/Requests_Request.PostRequestOptionsExtended.html +159 -1
- package/dist/docs/interfaces/Requests_Request.PutRequestOptionsExtended.html +161 -1
- package/dist/docs/interfaces/Requests_Request.RelatedByIdRequestOptionsExtended.html +169 -1
- package/dist/docs/interfaces/Requests_Request.RelatedRequestOptionsExtended.html +163 -1
- package/dist/docs/interfaces/Requests_Request.UploadChunkRequestOptionsExtended.html +210 -0
- package/dist/docs/interfaces/Requests_Request.UploadRequestOptionsExtended.html +180 -1
- package/dist/docs/interfaces/Requests_RequestBase.RequestOptionsBaseExtended.html +148 -1
- package/dist/docs/interfaces/Sitefinity.SDKOptions.html +128 -9
- package/dist/docs/interfaces/Sitefinity.Token.html +94 -1
- package/dist/docs/interfaces/Sitefinity.TypeOptions.html +144 -13
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadInfoDTO.html +159 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadResult.html +111 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CleanUpChunksRequestOptions.html +171 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CommitChunksRequestOptions.html +204 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.GetChunkUploadInfoRequestOptions.html +166 -0
- package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.UploadChunkRequestOptions.html +201 -0
- package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.ChunkFileResult.html +101 -0
- package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.FileUploadChunk.html +94 -0
- package/dist/docs/modules/BlobBuilder.html +73 -1
- package/dist/docs/modules/Data.html +92 -1
- package/dist/docs/modules/Expression.html +77 -1
- package/dist/docs/modules/OrderProperty.html +73 -1
- package/dist/docs/modules/Query.html +73 -1
- package/dist/docs/modules/QueryBase.html +73 -1
- package/dist/docs/modules/QueryBuilder.html +73 -1
- package/dist/docs/modules/Requests_BatchRequest.html +94 -1
- package/dist/docs/modules/Requests_ExecutableRequest.html +78 -1
- package/dist/docs/modules/Requests_Request.html +114 -1
- package/dist/docs/modules/Requests_RequestBase.html +78 -1
- package/dist/docs/modules/Requests_RequestFactory.html +73 -1
- package/dist/docs/modules/Sitefinity.html +82 -1
- package/dist/docs/modules/WhereQuery.html +73 -1
- package/dist/docs/modules/chunk_upload_chunk_upload_sdk.html +88 -0
- package/dist/docs/modules/chunk_upload_chunked_file_upload_utilities.html +80 -0
- package/dist/docs/modules/constants.html +83 -1
- package/dist/docs/modules/utils.html +73 -1
- package/dist/docs/modules.html +80 -1
- package/dist/docs/variables/constants.CONTENT_TYPES.html +76 -0
- package/dist/docs/variables/constants.EXPRESSION_TYPE.html +104 -0
- package/dist/docs/variables/constants.HEADER_NAMES.html +102 -0
- package/dist/docs/variables/constants.HTTP_METHODS.html +84 -0
- package/dist/docs/variables/constants.ODATA_PARAMS.html +90 -0
- package/dist/docs/variables/constants.SF_PARAMS.html +84 -0
- package/dist/samples.html +237 -38
- package/dist/sitefinity-webservices-sdk.d.ts +0 -1
- package/dist/sitefinity-webservices-sdk.js +524 -119
- package/dist/sitefinity-webservices-sdk.js.map +1 -1
- package/dist/sitefinity-webservices-sdk.min.js +1 -2
- package/dist/src/Data.d.ts +10 -0
- package/dist/src/Data.spec.d.ts +1 -0
- package/dist/src/Query.d.ts +3 -3
- package/dist/src/Requests/ExecutableRequest.d.ts +3 -1
- package/dist/src/Requests/Request.d.ts +42 -0
- package/dist/src/Requests/RequestBase.d.ts +1 -2
- package/dist/src/Requests/RequestFactory.d.ts +3 -1
- package/dist/src/Requests/request.spec.d.ts +1 -0
- package/dist/src/Sitefinity.d.ts +2 -2
- package/dist/src/Sitefinity.spec.d.ts +1 -0
- package/dist/src/WhereQuery.d.ts +2 -2
- package/dist/src/chunk-upload/chunk-upload.sdk.d.ts +290 -0
- package/dist/src/chunk-upload/chunk-upload.sdk.spec.d.ts +1 -0
- package/dist/src/chunk-upload/chunked-file-upload.utilities.d.ts +13 -0
- package/dist/src/constants.d.ts +5 -0
- package/package.json +24 -22
- package/sitefinity-webservices-sdk.ts +0 -1
- package/src/Data.spec.ts +12 -12
- package/src/Data.ts +19 -4
- package/src/OrderProperty.ts +7 -7
- package/src/Query.ts +4 -4
- package/src/QueryBase.ts +4 -4
- package/src/QueryBuilder.ts +38 -38
- package/src/Requests/BatchRequest.ts +25 -25
- package/src/Requests/ExecutableRequest.ts +30 -24
- package/src/Requests/Request.ts +109 -2
- package/src/Requests/RequestBase.ts +3 -4
- package/src/Requests/RequestFactory.ts +9 -1
- package/src/Requests/request.spec.ts +10 -10
- package/src/Sitefinity.spec.ts +6 -6
- package/src/Sitefinity.ts +5 -5
- package/src/WhereQuery.ts +2 -2
- package/src/chunk-upload/chunk-upload.sdk.spec.ts +340 -0
- package/src/chunk-upload/chunk-upload.sdk.ts +436 -0
- package/src/chunk-upload/chunked-file-upload.utilities.ts +64 -0
- package/src/constants.ts +35 -30
- package/src/utils.ts +10 -10
- package/template.html +191 -38
- package/tsconfig.json +11 -3
- package/.npmignore +0 -92
- package/ci/pipelines/ci.yml +0 -219
- package/config/helpers.js +0 -10
- package/config/webpack.common.js +0 -39
- package/config/webpack.dev.js +0 -19
- package/config/webpack.prod.js +0 -25
- package/dist/docs/assets/icons.css +0 -1043
- package/dist/docs/assets/icons.png +0 -0
- package/dist/docs/assets/icons@2x.png +0 -0
- package/dist/docs/assets/widgets.png +0 -0
- package/dist/docs/assets/widgets@2x.png +0 -0
- package/dist/docs/classes/BlobBuilder.BlobBuilder-1.html +0 -7
- package/dist/docs/classes/Data.Data-1.html +0 -65
- package/dist/docs/classes/OrderProperty.OrderProperty-1.html +0 -1
- package/dist/docs/classes/Query.Query-1.html +0 -33
- package/dist/docs/classes/QueryBase.QueryBase-1.html +0 -7
- package/dist/docs/classes/QueryBuilder.QueryBuilder-1.html +0 -1
- package/dist/docs/classes/Sitefinity.Sitefinity-1.html +0 -5
- package/dist/docs/classes/WhereQuery.WhereQuery-1.html +0 -31
- package/dist/docs/classes/utils.utils-1.html +0 -1
- package/dist/sitefinity-webservices-sdk.min.js.LICENSE.txt +0 -14
- package/package-lock.json +0 -17487
- package/type.txt +0 -1
- package/version.txt +0 -1
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<!DOCTYPE html><html class="default" lang="en"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>SF_PARAMS | @progress/sitefinity-webservices-sdk</title><meta name="description" content="Documentation for @progress/sitefinity-webservices-sdk"/><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.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os"</script><header class="tsd-page-toolbar">
|
|
2
|
+
<div class="tsd-toolbar-contents container">
|
|
3
|
+
<div class="table-cell" id="tsd-search" data-base="..">
|
|
4
|
+
<div class="field"><label for="tsd-search-field" class="tsd-widget tsd-toolbar-icon search no-caption"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-text)"></path></svg></label><input type="text" id="tsd-search-field" aria-label="Search"/></div>
|
|
5
|
+
<div class="field">
|
|
6
|
+
<div id="tsd-toolbar-links"></div></div>
|
|
7
|
+
<ul class="results">
|
|
8
|
+
<li class="state loading">Preparing search index...</li>
|
|
9
|
+
<li class="state failure">The search index is not available</li></ul><a href="../index.html" class="title">@progress/sitefinity-webservices-sdk</a></div>
|
|
10
|
+
<div class="table-cell" id="tsd-widgets"><a href="#" class="tsd-widget tsd-toolbar-icon menu no-caption" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="1" y="3" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-text)"></rect></svg></a></div></div></header>
|
|
11
|
+
<div class="container container-main">
|
|
12
|
+
<div class="col-8 col-content">
|
|
13
|
+
<div class="tsd-page-title">
|
|
14
|
+
<ul class="tsd-breadcrumb">
|
|
15
|
+
<li><a href="../modules.html">@progress/sitefinity-webservices-sdk</a></li>
|
|
16
|
+
<li><a href="../modules/constants.html">constants</a></li>
|
|
17
|
+
<li><a href="constants.SF_PARAMS.html">SF_PARAMS</a></li></ul>
|
|
18
|
+
<h1>Variable SF_PARAMS<code class="tsd-tag ts-flagConst">Const</code> </h1></div>
|
|
19
|
+
<div class="tsd-signature">SF_<wbr/>PARAMS<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{ </span><br/><span> </span>culture<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>fallbackParams<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>parentId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>provider<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span> </span>siteId<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">; </span><br/><span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol"> = ...</span></div>
|
|
20
|
+
<div class="tsd-type-declaration">
|
|
21
|
+
<h4>Type declaration</h4>
|
|
22
|
+
<ul class="tsd-parameters">
|
|
23
|
+
<li class="tsd-parameter">
|
|
24
|
+
<h5>culture<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
|
|
25
|
+
<li class="tsd-parameter">
|
|
26
|
+
<h5>fallback<wbr/>Params<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
|
|
27
|
+
<li class="tsd-parameter">
|
|
28
|
+
<h5>parent<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
|
|
29
|
+
<li class="tsd-parameter">
|
|
30
|
+
<h5>provider<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li>
|
|
31
|
+
<li class="tsd-parameter">
|
|
32
|
+
<h5>site<wbr/>Id<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span></h5></li></ul></div><aside class="tsd-sources">
|
|
33
|
+
<ul>
|
|
34
|
+
<li>Defined in constants.ts:30</li></ul></aside></div>
|
|
35
|
+
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
|
|
36
|
+
<div class="tsd-navigation settings">
|
|
37
|
+
<details class="tsd-index-accordion"><summary class="tsd-accordion-summary">
|
|
38
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Settings</h3></summary>
|
|
39
|
+
<div class="tsd-accordion-details">
|
|
40
|
+
<div class="tsd-filter-visibility">
|
|
41
|
+
<h4 class="uppercase">Member Visibility</h4><form>
|
|
42
|
+
<ul id="tsd-filter-options">
|
|
43
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li>
|
|
44
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-private" name="private"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Private</span></label></li>
|
|
45
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li>
|
|
46
|
+
<li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></form></div>
|
|
47
|
+
<div class="tsd-theme-toggle">
|
|
48
|
+
<h4 class="uppercase">Theme</h4><select id="theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div>
|
|
49
|
+
<nav class="tsd-navigation primary">
|
|
50
|
+
<details class="tsd-index-accordion" open><summary class="tsd-accordion-summary">
|
|
51
|
+
<h3><svg width="20" height="20" viewBox="0 0 24 24" fill="none"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-text)"></path></svg> Modules</h3></summary>
|
|
52
|
+
<div class="tsd-accordion-details">
|
|
53
|
+
<ul>
|
|
54
|
+
<li class="current"><a href="../modules.html">@progress/sitefinity-<wbr/>webservices-<wbr/>sdk</a>
|
|
55
|
+
<ul>
|
|
56
|
+
<li class="tsd-kind-module"><a href="../modules/BlobBuilder.html">Blob<wbr/>Builder</a></li>
|
|
57
|
+
<li class="tsd-kind-module"><a href="../modules/Data.html">Data</a></li>
|
|
58
|
+
<li class="tsd-kind-module"><a href="../modules/Expression.html">Expression</a></li>
|
|
59
|
+
<li class="tsd-kind-module"><a href="../modules/OrderProperty.html">Order<wbr/>Property</a></li>
|
|
60
|
+
<li class="tsd-kind-module"><a href="../modules/Query.html">Query</a></li>
|
|
61
|
+
<li class="tsd-kind-module"><a href="../modules/QueryBase.html">Query<wbr/>Base</a></li>
|
|
62
|
+
<li class="tsd-kind-module"><a href="../modules/QueryBuilder.html">Query<wbr/>Builder</a></li>
|
|
63
|
+
<li class="tsd-kind-module"><a href="../modules/Requests_BatchRequest.html">Requests/<wbr/>Batch<wbr/>Request</a></li>
|
|
64
|
+
<li class="tsd-kind-module"><a href="../modules/Requests_ExecutableRequest.html">Requests/<wbr/>Executable<wbr/>Request</a></li>
|
|
65
|
+
<li class="tsd-kind-module"><a href="../modules/Requests_Request.html">Requests/<wbr/>Request</a></li>
|
|
66
|
+
<li class="tsd-kind-module"><a href="../modules/Requests_RequestBase.html">Requests/<wbr/>Request<wbr/>Base</a></li>
|
|
67
|
+
<li class="tsd-kind-module"><a href="../modules/Requests_RequestFactory.html">Requests/<wbr/>Request<wbr/>Factory</a></li>
|
|
68
|
+
<li class="tsd-kind-module"><a href="../modules/Sitefinity.html">Sitefinity</a></li>
|
|
69
|
+
<li class="tsd-kind-module"><a href="../modules/WhereQuery.html">Where<wbr/>Query</a></li>
|
|
70
|
+
<li class="tsd-kind-module"><a href="../modules/chunk_upload_chunk_upload_sdk.html">chunk-<wbr/>upload/chunk-<wbr/>upload.sdk</a></li>
|
|
71
|
+
<li class="tsd-kind-module"><a href="../modules/chunk_upload_chunked_file_upload_utilities.html">chunk-<wbr/>upload/chunked-<wbr/>file-<wbr/>upload.utilities</a></li>
|
|
72
|
+
<li class="current tsd-kind-module"><a href="../modules/constants.html">constants</a></li>
|
|
73
|
+
<li class="tsd-kind-module"><a href="../modules/utils.html">utils</a></li></ul></li></ul></div></details></nav>
|
|
74
|
+
<nav class="tsd-navigation secondary menu-sticky">
|
|
75
|
+
<ul>
|
|
76
|
+
<li class="tsd-kind-variable tsd-parent-kind-module"><a href="constants.CONTENT_TYPES.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6" id="icon-32-path"></rect><path d="M11.106 16L8.85 7.24H9.966L11.454 13.192C11.558 13.608 11.646 13.996 11.718 14.356C11.79 14.708 11.842 14.976 11.874 15.16C11.906 14.976 11.954 14.708 12.018 14.356C12.09 13.996 12.178 13.608 12.282 13.192L13.758 7.24H14.85L12.582 16H11.106Z" fill="var(--color-text)" id="icon-32-text"></path></svg>CONTENT_<wbr/>TYPES</a></li>
|
|
77
|
+
<li class="tsd-kind-variable tsd-parent-kind-module"><a href="constants.EXPRESSION_TYPE.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>EXPRESSION_<wbr/>TYPE</a></li>
|
|
78
|
+
<li class="tsd-kind-variable tsd-parent-kind-module"><a href="constants.HEADER_NAMES.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>HEADER_<wbr/>NAMES</a></li>
|
|
79
|
+
<li class="tsd-kind-variable tsd-parent-kind-module"><a href="constants.HTTP_METHODS.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>HTTP_<wbr/>METHODS</a></li>
|
|
80
|
+
<li class="tsd-kind-variable tsd-parent-kind-module"><a href="constants.ODATA_PARAMS.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>ODATA_<wbr/>PARAMS</a></li>
|
|
81
|
+
<li class="current tsd-kind-variable tsd-parent-kind-module"><a href="constants.SF_PARAMS.html" class="tsd-index-link"><svg class="tsd-kind-icon" width="24" height="24" viewBox="0 0 24 24"><use href="#icon-32-path"></use><use href="#icon-32-text"></use></svg>SF_<wbr/>PARAMS</a></li></ul></nav></div></div>
|
|
82
|
+
<div class="container tsd-generator">
|
|
83
|
+
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></div>
|
|
84
|
+
<div class="overlay"></div><script src="../assets/main.js"></script></body></html>
|
package/dist/samples.html
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<title></title>
|
|
6
|
+
<script src="sitefinity-webservices-sdk.js"></script></head>
|
|
7
|
+
|
|
8
|
+
<body>
|
|
9
|
+
<script>
|
|
10
|
+
function clearHtmlMessages() {
|
|
2
11
|
document.getElementById("message").innerHTML = "";
|
|
3
12
|
document.getElementById("container").innerHTML = "";
|
|
4
13
|
document.getElementById("containerErr").innerHTML = "";
|
|
@@ -9,38 +18,10 @@
|
|
|
9
18
|
var links = document.getElementsByTagName('input');
|
|
10
19
|
|
|
11
20
|
for (var i = 0; i < links.length; i++) {
|
|
12
|
-
if(links[i].hasAttribute("onclick"))
|
|
13
|
-
|
|
21
|
+
if (links[i].hasAttribute("onclick"))
|
|
22
|
+
links[i].addEventListener('click', clearHtmlMessages, false);
|
|
14
23
|
};
|
|
15
|
-
|
|
16
24
|
}
|
|
17
|
-
|
|
18
|
-
var query = new Sitefinity.Sitefinity.Query();
|
|
19
|
-
|
|
20
|
-
var query0 = query.where().and().endsWith("Title", "Record").done().or().startsWith('Title', 'asd').done().done();
|
|
21
|
-
var query1 = query.where().or().endsWith("Record", "Title").ne('age', '15').eq('Content', 'test').done().done();
|
|
22
|
-
var query2 = query.where().and().endsWith("Title", "Record").done().done();
|
|
23
|
-
var query3 = query.where().endsWith("Record", "Title").or().ne('age', '15').eq('Content', 'test').done().done();
|
|
24
|
-
var query4 = query.where().not().endsWith("Record", "Title").done().and().not().eq('Content', 'test').done().done().done();
|
|
25
|
-
var query5 = query.where().not().and().endsWith("Record", "Title").eq('Content', 'test').done().done().done();
|
|
26
|
-
var query6 = query.select("Id", "Title", "Content").expand('Tags').order("Title desc").where().ne('Title', 'zzz').eq('Title', 'newTitle').done()//.count();
|
|
27
|
-
var query7 = query.order("Title desc").where().eq('Title', 'newTitleUPDATE1').done().select("Title", "Content");
|
|
28
|
-
var query8 = query.where().eq('Title', 'newTitleN11').done();
|
|
29
|
-
var query9 = query.where().eq('Title', null).done();
|
|
30
|
-
var query10 = query.count();
|
|
31
|
-
|
|
32
|
-
var queryIDs = query.select('Id');
|
|
33
|
-
console.log(query0.build());
|
|
34
|
-
console.log(query1.build());
|
|
35
|
-
console.log(query2.build());
|
|
36
|
-
console.log(query3.build());
|
|
37
|
-
console.log(query4.build());
|
|
38
|
-
console.log(query5.build());
|
|
39
|
-
console.log(query6.build());
|
|
40
|
-
console.log(query7.build());
|
|
41
|
-
console.log(query8.build());
|
|
42
|
-
console.log(query9.build());
|
|
43
|
-
console.log(query10.build());
|
|
44
25
|
//Create Item
|
|
45
26
|
var newsItem = {
|
|
46
27
|
"Title": 'newTitleN11',
|
|
@@ -61,10 +42,10 @@
|
|
|
61
42
|
var options = {
|
|
62
43
|
baseUrl: sitefinityUrl + "/api/default/",
|
|
63
44
|
handlers: {
|
|
64
|
-
failureCb: function() {
|
|
45
|
+
failureCb: function () {
|
|
65
46
|
console.log("Global error occured");
|
|
66
47
|
},
|
|
67
|
-
successCb: function() {
|
|
48
|
+
successCb: function () {
|
|
68
49
|
console.log("Success executing request");
|
|
69
50
|
}
|
|
70
51
|
}
|
|
@@ -74,6 +55,35 @@
|
|
|
74
55
|
var sf = new Sitefinity.Sitefinity(options);
|
|
75
56
|
sf.setToken("");
|
|
76
57
|
|
|
58
|
+
|
|
59
|
+
var query = new Sitefinity.Query();
|
|
60
|
+
|
|
61
|
+
var query0 = query.where().and().endsWith("Title", "Record").done().or().startsWith('Title', 'asd').done().done();
|
|
62
|
+
var query1 = query.where().or().endsWith("Record", "Title").ne('age', '15').eq('Content', 'test').done().done();
|
|
63
|
+
var query2 = query.where().and().endsWith("Title", "Record").done().done();
|
|
64
|
+
var query3 = query.where().endsWith("Record", "Title").or().ne('age', '15').eq('Content', 'test').done().done();
|
|
65
|
+
var query4 = query.where().not().endsWith("Record", "Title").done().and().not().eq('Content', 'test').done().done().done();
|
|
66
|
+
var query5 = query.where().not().and().endsWith("Record", "Title").eq('Content', 'test').done().done().done();
|
|
67
|
+
var query6 = query.select("Id", "Title", "Content").expand('Tags').order("Title desc").where().ne('Title', 'zzz').eq('Title', 'newTitle').done()//.count();
|
|
68
|
+
var query7 = query.order("Title desc").where().eq('Title', 'newTitleUPDATE1').done().select("Title", "Content");
|
|
69
|
+
var query8 = query.where().eq('Title', 'newTitleN11').done();
|
|
70
|
+
var query9 = query.where().eq('Title', null).done();
|
|
71
|
+
var query10 = query.count();
|
|
72
|
+
|
|
73
|
+
var queryIDs = query.select('Id');
|
|
74
|
+
console.log(query0.build());
|
|
75
|
+
console.log(query1.build());
|
|
76
|
+
console.log(query2.build());
|
|
77
|
+
console.log(query3.build());
|
|
78
|
+
console.log(query4.build());
|
|
79
|
+
console.log(query5.build());
|
|
80
|
+
console.log(query6.build());
|
|
81
|
+
console.log(query7.build());
|
|
82
|
+
console.log(query8.build());
|
|
83
|
+
console.log(query9.build());
|
|
84
|
+
console.log(query10.build());
|
|
85
|
+
|
|
86
|
+
|
|
77
87
|
var inputElement = document.getElementById('getGuid');
|
|
78
88
|
var that = this;
|
|
79
89
|
// Success and Failure CB's
|
|
@@ -81,7 +91,7 @@
|
|
|
81
91
|
document.getElementById("container").innerHTML = JSON.stringify(data);
|
|
82
92
|
}
|
|
83
93
|
|
|
84
|
-
var successCbBatch = function(data) {
|
|
94
|
+
var successCbBatch = function (data) {
|
|
85
95
|
document.getElementById("container").innerHTML = JSON.stringify(data);
|
|
86
96
|
}
|
|
87
97
|
|
|
@@ -386,13 +396,13 @@
|
|
|
386
396
|
}
|
|
387
397
|
|
|
388
398
|
function login() {
|
|
389
|
-
var url = sitefinityUrl + "/
|
|
399
|
+
var url = sitefinityUrl + "/sitefinity/oauth/token";
|
|
390
400
|
var data = {
|
|
391
401
|
username: "",
|
|
392
402
|
password: "",
|
|
393
403
|
grant_type: "password",
|
|
394
|
-
client_id: "
|
|
395
|
-
client_secret: "
|
|
404
|
+
client_id: "",
|
|
405
|
+
client_secret: ""
|
|
396
406
|
};
|
|
397
407
|
|
|
398
408
|
var body = "";
|
|
@@ -423,4 +433,193 @@
|
|
|
423
433
|
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
|
424
434
|
|
|
425
435
|
xhr.send(body);
|
|
426
|
-
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
var typeOptions = {
|
|
439
|
+
entitySet: "images"
|
|
440
|
+
};
|
|
441
|
+
|
|
442
|
+
var sfData = sf.data(typeOptions);
|
|
443
|
+
var chunkSdk = sfData.chunkUpload;
|
|
444
|
+
|
|
445
|
+
function chunkUpload() {
|
|
446
|
+
var chunkUploadIndicator = document.getElementById("chunkUploadIndicator");
|
|
447
|
+
var acceptedFiles = ["gif", "jpg", "jpeg", "png", "webp", "bmp"];
|
|
448
|
+
var file = document.getElementById("chunkUploadInput").files[0];
|
|
449
|
+
|
|
450
|
+
if (!file) {
|
|
451
|
+
chunkUploadIndicator.textContent = "Please select an image.";
|
|
452
|
+
return;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
var extension = file.name.split('.').pop();
|
|
456
|
+
|
|
457
|
+
const showError = (error) => {
|
|
458
|
+
chunkUploadIndicator.textContent = error.message;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (!acceptedFiles.includes(extension)) {
|
|
462
|
+
chunkUploadIndicator.textContent = "This upload is only for the image types: .gif, .jpg, .jpeg, .png, .webp, .bmp";
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
var imgElement = document.createElement("img");
|
|
467
|
+
imgElement.addEventListener("load", function (ev) {
|
|
468
|
+
var width = imgElement.width;
|
|
469
|
+
var height = imgElement.height;
|
|
470
|
+
imgElement.remove();
|
|
471
|
+
|
|
472
|
+
var libraryId = "4ba7ad46-f29b-4e65-be17-9bf7ce5ba1fb";
|
|
473
|
+
var getChunkUploadInfoRequestOptions = {
|
|
474
|
+
data: {
|
|
475
|
+
libraryId
|
|
476
|
+
},
|
|
477
|
+
failureCb: err => showError(err),
|
|
478
|
+
successCb: uploadInfo => {
|
|
479
|
+
if (uploadInfo.ProviderSupportsChunkUpload) {
|
|
480
|
+
var chunksResult = chunkSdk.chunkFile(file, uploadInfo.ChunkSize, file.type);
|
|
481
|
+
let successfullyUploadedChunks = 0;
|
|
482
|
+
|
|
483
|
+
chunksResult.chunks.forEach(chunk => {
|
|
484
|
+
var parameters = {
|
|
485
|
+
data: {
|
|
486
|
+
fileMimeType: file.type,
|
|
487
|
+
chunkedFileUploadSessionId: uploadInfo.ChunkedFileUploadSessionId,
|
|
488
|
+
chunkSize: chunk.content.size,
|
|
489
|
+
chunkOrdinal: chunk.ordinal,
|
|
490
|
+
numberOfChunks: chunksResult.totalChunksCount,
|
|
491
|
+
chunkBlob: chunk.content,
|
|
492
|
+
blobStorageProviderName: uploadInfo.BlobStorageProviderName,
|
|
493
|
+
positionOfChunkInQueue: chunk.ordinal
|
|
494
|
+
},
|
|
495
|
+
successCb: chunkUploadResult => {
|
|
496
|
+
if (chunkUploadResult.SuccessfullyUploaded) {
|
|
497
|
+
successfullyUploadedChunks++;
|
|
498
|
+
|
|
499
|
+
if (successfullyUploadedChunks === chunksResult.totalChunksCount) {
|
|
500
|
+
var uploadProperties = {
|
|
501
|
+
Title: "Test",
|
|
502
|
+
UrlName: "test",
|
|
503
|
+
ParentId: libraryId,
|
|
504
|
+
Height: height,
|
|
505
|
+
Width: width,
|
|
506
|
+
// FolderId: GUID of the folder you would like to have the image uploaded
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
var commitChunksOptions = {
|
|
510
|
+
data: {
|
|
511
|
+
chunkedFileUploadSessionId: uploadInfo.ChunkedFileUploadSessionId,
|
|
512
|
+
contentType: file.type,
|
|
513
|
+
fileTotalSize: chunksResult.fileTotalSize,
|
|
514
|
+
numberOfChunks: chunksResult.totalChunksCount,
|
|
515
|
+
name: file.name,
|
|
516
|
+
uploadProperties: uploadProperties,
|
|
517
|
+
blobStorageProviderName: uploadInfo.BlobStorageProviderName,
|
|
518
|
+
itemId: undefined // set item id of the file you would like to replace
|
|
519
|
+
},
|
|
520
|
+
failureCb: err => showError(err),
|
|
521
|
+
successCb: commitChunksResult => {
|
|
522
|
+
|
|
523
|
+
var createdItemId = commitChunksResult.Id;
|
|
524
|
+
var directUpload = true; // false if you are replacing the image
|
|
525
|
+
|
|
526
|
+
sfData.operation({
|
|
527
|
+
key: createdItemId,
|
|
528
|
+
data: {
|
|
529
|
+
action: "Publish",
|
|
530
|
+
actionParameters: {
|
|
531
|
+
directUpload
|
|
532
|
+
}
|
|
533
|
+
},
|
|
534
|
+
successCb: operationResult => {
|
|
535
|
+
chunkUploadIndicator.textContent = "Published";
|
|
536
|
+
},
|
|
537
|
+
failureCb: err => showError(err)
|
|
538
|
+
});
|
|
539
|
+
|
|
540
|
+
}
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
chunkSdk.commitChunks(commitChunksOptions);
|
|
544
|
+
}
|
|
545
|
+
} else {
|
|
546
|
+
// handle single chunk upload failure
|
|
547
|
+
// this is good place to try uploading the chunk again
|
|
548
|
+
// here is also a good place to use the following code, to clean up the chunks
|
|
549
|
+
// before committing the chunks, this call will delete all chunks from this session
|
|
550
|
+
|
|
551
|
+
// var cleanUpChunksRequestOptions: CleanUpChunksRequestOptions = {
|
|
552
|
+
// data: {
|
|
553
|
+
// chunkedFileUploadSessionId: uploadInfo.ChunkedFileUploadSessionId,
|
|
554
|
+
// blobStorageProviderName: uploadInfo.BlobStorageProviderName
|
|
555
|
+
// }
|
|
556
|
+
// };
|
|
557
|
+
// chunkSdk.cleanUpChunks(cleanUpChunksRequestOptions);
|
|
558
|
+
}
|
|
559
|
+
},
|
|
560
|
+
progressCb: (progressEv) => {
|
|
561
|
+
var percentComplete = (successfullyUploadedChunks / chunksResult.totalChunksCount) * 100;
|
|
562
|
+
chunkUploadIndicator.textContent = `Progress: ${percentComplete}%`;
|
|
563
|
+
},
|
|
564
|
+
failureCb: err => showError(err)
|
|
565
|
+
};
|
|
566
|
+
|
|
567
|
+
var chunkUploadHandlers = chunkSdk.uploadChunk(parameters);
|
|
568
|
+
});
|
|
569
|
+
} else {
|
|
570
|
+
chunkUploadIndicator.textContent = "The currently selected blob storage provider does not support uploading in chunks.";
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
chunkSdk.getChunkUploadInfo(getChunkUploadInfoRequestOptions)
|
|
578
|
+
});
|
|
579
|
+
|
|
580
|
+
imgElement.src = window.URL.createObjectURL(file);
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
</script>
|
|
584
|
+
Usage: <br /><code>
|
|
585
|
+
<b>
|
|
586
|
+
sf = new Sitefinity(options);<br />data = sf.data(dataOptions);<br />data.get(); data.destroy ...
|
|
587
|
+
<br />data.batch(successCb, failureCb).get().Update...done(); content id's starts from 0 to n ('get' is 0 'update' is 1 etc.).
|
|
588
|
+
</b>
|
|
589
|
+
</code><br /><br />
|
|
590
|
+
<input type="button" value="login" onclick="login()" />
|
|
591
|
+
<input type="button" value="requestGet" onclick="requestGet()" />
|
|
592
|
+
<input type="button" value="requestGetCount" onclick="requestGetCount()" />
|
|
593
|
+
<input type="button" value="requestGetSingle" onclick="requestGetSingle()" />
|
|
594
|
+
<input type="button" value="requestGetRelated" onclick="requestGetRelated()" />
|
|
595
|
+
<input type="button" value="requestUpdate" onclick="requestUpdate()" />
|
|
596
|
+
<input type="button" value="requestCreate" onclick="requestCreate()" />
|
|
597
|
+
<input type="button" value="requestCreateRelated" onclick="requestCreateRelated()" />
|
|
598
|
+
<input type="button" value="requestDelete" onclick="requestDelete()" />
|
|
599
|
+
<input type="button" value="requestDeleteRelated" onclick="requestDeleteRelated()" />
|
|
600
|
+
<input type="button" value="requestBatch" onclick="requestBatch()" />
|
|
601
|
+
<input type="button" value="requestOperation" onclick="requestOperation()" />
|
|
602
|
+
<input type="button" value="requestOperationAction" onclick="requestOperationAction()" />
|
|
603
|
+
<input type="button" value="requestOperationActionSingle" onclick="requestOperationActionSingle()" />
|
|
604
|
+
<br />
|
|
605
|
+
<br />
|
|
606
|
+
<input type="text" id="getGuid" value="00000000-0000-0000-0000-000000000000" size="50" />
|
|
607
|
+
<span>related ID</span><input type="text" id="getRelatedGuid" value="00000000-0000-0000-0000-000000000000"
|
|
608
|
+
size="50" />
|
|
609
|
+
<br />
|
|
610
|
+
<br />
|
|
611
|
+
<input type="file" name="photo" id="photo">
|
|
612
|
+
<input type="button" value="Upload" onclick="upload()">
|
|
613
|
+
<hr>
|
|
614
|
+
<input type="file" name="chunkUploadInput" id="chunkUploadInput" accept=".gif, .jpg, .jpeg, .png, .webp, .bmp">
|
|
615
|
+
<input type="button" id="chunkUploadBtn" value="Chunked upload" onclick="chunkUpload()">
|
|
616
|
+
<span id="chunkUploadIndicator">Progress: not started</span>
|
|
617
|
+
<div id="some_container_div"></div>
|
|
618
|
+
<br />
|
|
619
|
+
<br />
|
|
620
|
+
<div id="message" style="color: blue; border: 1px solid;"></div>
|
|
621
|
+
<div id="container" style="color: green; border: 1px solid;"></div>
|
|
622
|
+
<div id="containerErr" style="color: red; border: 1px solid;"></div>
|
|
623
|
+
</body>
|
|
624
|
+
|
|
625
|
+
</html>
|
|
@@ -4,7 +4,6 @@ export * from "./src/utils";
|
|
|
4
4
|
export * from "./src/WhereQuery";
|
|
5
5
|
export * from "./src/Sitefinity";
|
|
6
6
|
export * from "./src/QueryBuilder";
|
|
7
|
-
export * from "./src/QueryBase";
|
|
8
7
|
export * from "./src/Query";
|
|
9
8
|
export * from "./src/OrderProperty";
|
|
10
9
|
export * from "./src/Expression";
|