@progress/sitefinity-webservices-sdk 1.1.16 → 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.
Files changed (233) hide show
  1. package/README.md +84 -51
  2. package/esm/chunks/chunk-2ID24RPE.mjs +179 -0
  3. package/esm/chunks/chunk-2ID24RPE.mjs.map +7 -0
  4. package/esm/chunks/chunk-AHDZ2CWQ.mjs +93 -0
  5. package/esm/chunks/chunk-AHDZ2CWQ.mjs.map +7 -0
  6. package/esm/chunks/chunk-BFLQBM7R.mjs +136 -0
  7. package/esm/chunks/chunk-BFLQBM7R.mjs.map +7 -0
  8. package/esm/chunks/chunk-CMGV26CS.mjs +66 -0
  9. package/esm/chunks/chunk-CMGV26CS.mjs.map +7 -0
  10. package/esm/chunks/chunk-DHWDJAGV.mjs +180 -0
  11. package/esm/chunks/chunk-DHWDJAGV.mjs.map +7 -0
  12. package/esm/chunks/chunk-EH4CERVO.mjs +82 -0
  13. package/esm/chunks/chunk-EH4CERVO.mjs.map +7 -0
  14. package/esm/chunks/chunk-F4CWOE7M.mjs +57 -0
  15. package/esm/chunks/chunk-F4CWOE7M.mjs.map +7 -0
  16. package/esm/chunks/chunk-FUFBYOIF.mjs +98 -0
  17. package/esm/chunks/chunk-FUFBYOIF.mjs.map +7 -0
  18. package/esm/chunks/chunk-J2B7UDVZ.mjs +132 -0
  19. package/esm/chunks/chunk-J2B7UDVZ.mjs.map +7 -0
  20. package/esm/chunks/chunk-L3IMDFA5.mjs +1 -0
  21. package/esm/chunks/chunk-L3IMDFA5.mjs.map +7 -0
  22. package/esm/chunks/chunk-NNYY2VBC.mjs +383 -0
  23. package/esm/chunks/chunk-NNYY2VBC.mjs.map +7 -0
  24. package/esm/chunks/chunk-PI55MBSL.mjs +256 -0
  25. package/esm/chunks/chunk-PI55MBSL.mjs.map +7 -0
  26. package/esm/chunks/chunk-PXPK2IV6.mjs +568 -0
  27. package/esm/chunks/chunk-PXPK2IV6.mjs.map +7 -0
  28. package/esm/chunks/chunk-QPSEKUOI.mjs +35 -0
  29. package/esm/chunks/chunk-QPSEKUOI.mjs.map +7 -0
  30. package/esm/chunks/chunk-RQAAYOY6.mjs +72 -0
  31. package/esm/chunks/chunk-RQAAYOY6.mjs.map +7 -0
  32. package/esm/chunks/chunk-TTVNTTW5.mjs +145 -0
  33. package/esm/chunks/chunk-TTVNTTW5.mjs.map +7 -0
  34. package/esm/chunks/chunk-VLDX2FH2.mjs +235 -0
  35. package/esm/chunks/chunk-VLDX2FH2.mjs.map +7 -0
  36. package/esm/chunks/chunk-VWT2RJET.mjs +102 -0
  37. package/esm/chunks/chunk-VWT2RJET.mjs.map +7 -0
  38. package/esm/chunks/chunk-W2OWM3L7.mjs +19 -0
  39. package/esm/chunks/chunk-W2OWM3L7.mjs.map +7 -0
  40. package/esm/chunks/chunk-WX5J7F5D.mjs +43 -0
  41. package/esm/chunks/chunk-WX5J7F5D.mjs.map +7 -0
  42. package/esm/chunks/chunk-YB2LMPUX.mjs +54 -0
  43. package/esm/chunks/chunk-YB2LMPUX.mjs.map +7 -0
  44. package/package.json +67 -36
  45. package/sitefinity-webservices-sdk.cjs +2761 -0
  46. package/sitefinity-webservices-sdk.cjs.map +7 -0
  47. package/sitefinity-webservices-sdk.d.mts +1 -0
  48. package/{dist/sitefinity-webservices-sdk.d.ts → sitefinity-webservices-sdk.d.ts} +6 -0
  49. package/sitefinity-webservices-sdk.global.d.ts +5 -0
  50. package/sitefinity-webservices-sdk.js +2764 -0
  51. package/sitefinity-webservices-sdk.js.map +7 -0
  52. package/sitefinity-webservices-sdk.min.js +3 -0
  53. package/sitefinity-webservices-sdk.mjs +124 -0
  54. package/sitefinity-webservices-sdk.mjs.map +7 -0
  55. package/src/BlobBuilder.d.ts +12 -0
  56. package/src/Data.d.ts +259 -0
  57. package/src/Expression.d.ts +37 -0
  58. package/src/OrderProperty.d.ts +24 -0
  59. package/src/Query.d.ts +104 -0
  60. package/src/QueryBase.d.ts +40 -0
  61. package/src/QueryBuilder.d.ts +29 -0
  62. package/src/Requests/BatchRequest.d.ts +174 -0
  63. package/src/Requests/ExecutableRequest.d.ts +43 -0
  64. package/src/Requests/Request.d.ts +225 -0
  65. package/src/Requests/RequestBase.d.ts +58 -0
  66. package/{dist/src → src}/Requests/RequestFactory.d.ts +24 -2
  67. package/src/Sitefinity.d.ts +141 -0
  68. package/src/Transport/FetchTransport.d.ts +17 -0
  69. package/src/Transport/HttpTransport.d.ts +69 -0
  70. package/src/Transport/XhrTransport.d.ts +8 -0
  71. package/src/WhereQuery.d.ts +88 -0
  72. package/src/chunk-upload/chunk-upload.sdk.d.ts +305 -0
  73. package/src/chunk-upload/chunked-file-upload.utilities.d.ts +58 -0
  74. package/{dist/src → src}/constants.d.ts +21 -0
  75. package/src/utils.d.ts +103 -0
  76. package/.editorconfig +0 -29
  77. package/.eslintignore +0 -4
  78. package/.eslintrc.js +0 -40
  79. package/.github/copilot-instructions.md +0 -72
  80. package/.github/instructions/sitefinity-webservices-sdk.instructions.md +0 -53
  81. package/config/helpers.ts +0 -8
  82. package/config/webpack.common.ts +0 -39
  83. package/config/webpack.dev.ts +0 -37
  84. package/config/webpack.prod.ts +0 -17
  85. package/dist/docs/.nojekyll +0 -1
  86. package/dist/docs/assets/highlight.css +0 -71
  87. package/dist/docs/assets/main.js +0 -58
  88. package/dist/docs/assets/search.js +0 -1
  89. package/dist/docs/assets/style.css +0 -1280
  90. package/dist/docs/classes/BlobBuilder.BlobBuilder.html +0 -137
  91. package/dist/docs/classes/Data.Data.html +0 -387
  92. package/dist/docs/classes/Expression.BinaryExpression.html +0 -184
  93. package/dist/docs/classes/Expression.ComplexExpression.html +0 -146
  94. package/dist/docs/classes/Expression.ExpressionBase.html +0 -125
  95. package/dist/docs/classes/OrderProperty.OrderProperty.html +0 -151
  96. package/dist/docs/classes/Query.Query.html +0 -353
  97. package/dist/docs/classes/QueryBase.QueryBase.html +0 -185
  98. package/dist/docs/classes/QueryBuilder.QueryBuilder.html +0 -206
  99. package/dist/docs/classes/Requests_BatchRequest.BatchRequest.html +0 -731
  100. package/dist/docs/classes/Requests_BatchRequest.Transaction.html +0 -332
  101. package/dist/docs/classes/Requests_ExecutableRequest.ExecutableRequest.html +0 -340
  102. package/dist/docs/classes/Requests_Request.CommitChunksRequest.html +0 -303
  103. package/dist/docs/classes/Requests_Request.CreateRelatedRequest.html +0 -310
  104. package/dist/docs/classes/Requests_Request.CreateRequest.html +0 -307
  105. package/dist/docs/classes/Requests_Request.DeleteRelatedByIdRequest.html +0 -309
  106. package/dist/docs/classes/Requests_Request.DeleteRelatedRequest.html +0 -302
  107. package/dist/docs/classes/Requests_Request.DeleteRequest.html +0 -298
  108. package/dist/docs/classes/Requests_Request.GetByIdRequest.html +0 -298
  109. package/dist/docs/classes/Requests_Request.GetRelatedByIdRequest.html +0 -309
  110. package/dist/docs/classes/Requests_Request.GetRelatedRequest.html +0 -302
  111. package/dist/docs/classes/Requests_Request.GetRequest.html +0 -295
  112. package/dist/docs/classes/Requests_Request.UpdateRequest.html +0 -309
  113. package/dist/docs/classes/Requests_Request.UploadChunkRequest.html +0 -359
  114. package/dist/docs/classes/Requests_Request.UploadRequest.html +0 -329
  115. package/dist/docs/classes/Requests_RequestBase.RequestBase.html +0 -275
  116. package/dist/docs/classes/Requests_RequestFactory.RequestFactory.html +0 -344
  117. package/dist/docs/classes/Sitefinity.Sitefinity.html +0 -188
  118. package/dist/docs/classes/WhereQuery.WhereQuery.html +0 -436
  119. package/dist/docs/classes/chunk_upload_chunk_upload_sdk.ChunkUploadSdk.html +0 -231
  120. package/dist/docs/classes/chunk_upload_chunked_file_upload_utilities.ChunkedFileUploadUtilities.html +0 -131
  121. package/dist/docs/classes/utils.utils.html +0 -303
  122. package/dist/docs/index.html +0 -129
  123. package/dist/docs/interfaces/Data.CreateRelatedRequestOptions.html +0 -155
  124. package/dist/docs/interfaces/Data.CreateRequestOptions.html +0 -153
  125. package/dist/docs/interfaces/Data.OperationsRequestOptions.html +0 -145
  126. package/dist/docs/interfaces/Data.PropertyRequestOptions.html +0 -149
  127. package/dist/docs/interfaces/Data.RequestOptionsBase.html +0 -136
  128. package/dist/docs/interfaces/Data.SingleRelatedItemRequestOptions.html +0 -155
  129. package/dist/docs/interfaces/Data.UpdateRequestOptions.html +0 -155
  130. package/dist/docs/interfaces/Data.UploadRequestOptions.html +0 -169
  131. package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRelatedRequestOptions.html +0 -161
  132. package/dist/docs/interfaces/Requests_BatchRequest.BatchCreateRequestOptions.html +0 -153
  133. package/dist/docs/interfaces/Requests_BatchRequest.BatchPropertyRequestOptions.html +0 -153
  134. package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsBase.html +0 -145
  135. package/dist/docs/interfaces/Requests_BatchRequest.BatchRequestOptionsExtended.html +0 -153
  136. package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleItemRequestOptions.html +0 -145
  137. package/dist/docs/interfaces/Requests_BatchRequest.BatchSingleRelatedItemRequestOptions.html +0 -161
  138. package/dist/docs/interfaces/Requests_BatchRequest.BatchUpdateRequestOptions.html +0 -161
  139. package/dist/docs/interfaces/Requests_ExecutableRequest.ResponseHandlers.html +0 -98
  140. package/dist/docs/interfaces/Requests_Request.CommitChunksRequestOptionsExtended.html +0 -215
  141. package/dist/docs/interfaces/Requests_Request.PostRequestOptionsExtended.html +0 -159
  142. package/dist/docs/interfaces/Requests_Request.PutRequestOptionsExtended.html +0 -161
  143. package/dist/docs/interfaces/Requests_Request.RelatedByIdRequestOptionsExtended.html +0 -169
  144. package/dist/docs/interfaces/Requests_Request.RelatedRequestOptionsExtended.html +0 -163
  145. package/dist/docs/interfaces/Requests_Request.UploadChunkRequestOptionsExtended.html +0 -217
  146. package/dist/docs/interfaces/Requests_Request.UploadRequestOptionsExtended.html +0 -180
  147. package/dist/docs/interfaces/Requests_RequestBase.RequestOptionsBaseExtended.html +0 -148
  148. package/dist/docs/interfaces/Sitefinity.SDKOptions.html +0 -128
  149. package/dist/docs/interfaces/Sitefinity.Token.html +0 -94
  150. package/dist/docs/interfaces/Sitefinity.TypeOptions.html +0 -160
  151. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadInfoDTO.html +0 -159
  152. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.ChunkUploadResult.html +0 -111
  153. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CleanUpChunksRequestOptions.html +0 -171
  154. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.CommitChunksRequestOptions.html +0 -204
  155. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.GetChunkUploadInfoRequestOptions.html +0 -166
  156. package/dist/docs/interfaces/chunk_upload_chunk_upload_sdk.UploadChunkRequestOptions.html +0 -206
  157. package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.ChunkFileResult.html +0 -101
  158. package/dist/docs/interfaces/chunk_upload_chunked_file_upload_utilities.FileUploadChunk.html +0 -94
  159. package/dist/docs/modules/BlobBuilder.html +0 -73
  160. package/dist/docs/modules/Data.html +0 -92
  161. package/dist/docs/modules/Expression.html +0 -77
  162. package/dist/docs/modules/OrderProperty.html +0 -73
  163. package/dist/docs/modules/Query.html +0 -73
  164. package/dist/docs/modules/QueryBase.html +0 -73
  165. package/dist/docs/modules/QueryBuilder.html +0 -73
  166. package/dist/docs/modules/Requests_BatchRequest.html +0 -94
  167. package/dist/docs/modules/Requests_ExecutableRequest.html +0 -78
  168. package/dist/docs/modules/Requests_Request.html +0 -114
  169. package/dist/docs/modules/Requests_RequestBase.html +0 -78
  170. package/dist/docs/modules/Requests_RequestFactory.html +0 -73
  171. package/dist/docs/modules/Sitefinity.html +0 -82
  172. package/dist/docs/modules/WhereQuery.html +0 -73
  173. package/dist/docs/modules/chunk_upload_chunk_upload_sdk.html +0 -88
  174. package/dist/docs/modules/chunk_upload_chunked_file_upload_utilities.html +0 -80
  175. package/dist/docs/modules/constants.html +0 -83
  176. package/dist/docs/modules/utils.html +0 -73
  177. package/dist/docs/modules.html +0 -80
  178. package/dist/docs/variables/constants.CONTENT_TYPES.html +0 -76
  179. package/dist/docs/variables/constants.EXPRESSION_TYPE.html +0 -106
  180. package/dist/docs/variables/constants.HEADER_NAMES.html +0 -102
  181. package/dist/docs/variables/constants.HTTP_METHODS.html +0 -84
  182. package/dist/docs/variables/constants.ODATA_PARAMS.html +0 -90
  183. package/dist/docs/variables/constants.SF_PARAMS.html +0 -84
  184. package/dist/samples.html +0 -625
  185. package/dist/sitefinity-webservices-sdk.js +0 -3243
  186. package/dist/sitefinity-webservices-sdk.js.map +0 -1
  187. package/dist/sitefinity-webservices-sdk.min.js +0 -1
  188. package/dist/src/BlobBuilder.d.ts +0 -14
  189. package/dist/src/Data.d.ts +0 -154
  190. package/dist/src/Data.spec.d.ts +0 -1
  191. package/dist/src/Expression.d.ts +0 -19
  192. package/dist/src/OrderProperty.d.ts +0 -8
  193. package/dist/src/Query.d.ts +0 -59
  194. package/dist/src/QueryBase.d.ts +0 -18
  195. package/dist/src/QueryBuilder.d.ts +0 -13
  196. package/dist/src/Requests/BatchRequest.d.ts +0 -146
  197. package/dist/src/Requests/ExecutableRequest.d.ts +0 -22
  198. package/dist/src/Requests/Request.d.ts +0 -132
  199. package/dist/src/Requests/RequestBase.d.ts +0 -27
  200. package/dist/src/Requests/request.spec.d.ts +0 -1
  201. package/dist/src/Sitefinity.d.ts +0 -75
  202. package/dist/src/Sitefinity.spec.d.ts +0 -1
  203. package/dist/src/WhereQuery.d.ts +0 -72
  204. package/dist/src/chunk-upload/chunk-upload.sdk.d.ts +0 -295
  205. package/dist/src/chunk-upload/chunk-upload.sdk.spec.d.ts +0 -1
  206. package/dist/src/chunk-upload/chunked-file-upload.utilities.d.ts +0 -13
  207. package/dist/src/utils.d.ts +0 -16
  208. package/karma.conf.js +0 -29
  209. package/sitefinity-webservices-sdk.ts +0 -15
  210. package/src/BlobBuilder.ts +0 -20
  211. package/src/Data.spec.ts +0 -160
  212. package/src/Data.ts +0 -418
  213. package/src/Expression.ts +0 -36
  214. package/src/OrderProperty.ts +0 -39
  215. package/src/Query.ts +0 -106
  216. package/src/QueryBase.ts +0 -57
  217. package/src/QueryBuilder.ts +0 -180
  218. package/src/Requests/BatchRequest.ts +0 -807
  219. package/src/Requests/ExecutableRequest.ts +0 -117
  220. package/src/Requests/Request.ts +0 -327
  221. package/src/Requests/RequestBase.ts +0 -163
  222. package/src/Requests/RequestFactory.ts +0 -75
  223. package/src/Requests/request.spec.ts +0 -154
  224. package/src/Sitefinity.spec.ts +0 -483
  225. package/src/Sitefinity.ts +0 -125
  226. package/src/WhereQuery.ts +0 -145
  227. package/src/chunk-upload/chunk-upload.sdk.spec.ts +0 -347
  228. package/src/chunk-upload/chunk-upload.sdk.ts +0 -439
  229. package/src/chunk-upload/chunked-file-upload.utilities.ts +0 -64
  230. package/src/constants.ts +0 -66
  231. package/src/utils.ts +0 -125
  232. package/template.html +0 -625
  233. package/tsconfig.json +0 -38
@@ -0,0 +1,124 @@
1
+ import {
2
+ FetchTransport
3
+ } from "./esm/chunks/chunk-QPSEKUOI.mjs";
4
+ import "./esm/chunks/chunk-L3IMDFA5.mjs";
5
+ import {
6
+ Sitefinity
7
+ } from "./esm/chunks/chunk-VWT2RJET.mjs";
8
+ import {
9
+ RequestFactory
10
+ } from "./esm/chunks/chunk-AHDZ2CWQ.mjs";
11
+ import {
12
+ BatchRequest,
13
+ Transaction
14
+ } from "./esm/chunks/chunk-PXPK2IV6.mjs";
15
+ import {
16
+ CommitChunksRequest,
17
+ CreateRelatedRequest,
18
+ CreateRequest,
19
+ DeleteRelatedByIdRequest,
20
+ DeleteRelatedRequest,
21
+ DeleteRequest,
22
+ GetByIdRequest,
23
+ GetRelatedByIdRequest,
24
+ GetRelatedRequest,
25
+ GetRequest,
26
+ UpdateRequest,
27
+ UploadChunkRequest,
28
+ UploadRequest
29
+ } from "./esm/chunks/chunk-PI55MBSL.mjs";
30
+ import {
31
+ ExecutableRequest
32
+ } from "./esm/chunks/chunk-FUFBYOIF.mjs";
33
+ import {
34
+ XhrTransport
35
+ } from "./esm/chunks/chunk-WX5J7F5D.mjs";
36
+ import {
37
+ RequestBase
38
+ } from "./esm/chunks/chunk-TTVNTTW5.mjs";
39
+ import {
40
+ BlobBuilder
41
+ } from "./esm/chunks/chunk-W2OWM3L7.mjs";
42
+ import {
43
+ Data
44
+ } from "./esm/chunks/chunk-NNYY2VBC.mjs";
45
+ import {
46
+ ChunkUploadSdk
47
+ } from "./esm/chunks/chunk-VLDX2FH2.mjs";
48
+ import {
49
+ ChunkedFileUploadUtilities
50
+ } from "./esm/chunks/chunk-EH4CERVO.mjs";
51
+ import {
52
+ Query
53
+ } from "./esm/chunks/chunk-J2B7UDVZ.mjs";
54
+ import {
55
+ QueryBase
56
+ } from "./esm/chunks/chunk-CMGV26CS.mjs";
57
+ import {
58
+ QueryBuilder
59
+ } from "./esm/chunks/chunk-DHWDJAGV.mjs";
60
+ import {
61
+ WhereQuery
62
+ } from "./esm/chunks/chunk-BFLQBM7R.mjs";
63
+ import {
64
+ CONTENT_TYPES,
65
+ EXPRESSION_TYPE,
66
+ HEADER_NAMES,
67
+ HTTP_METHODS,
68
+ ODATA_PARAMS,
69
+ SF_PARAMS
70
+ } from "./esm/chunks/chunk-RQAAYOY6.mjs";
71
+ import {
72
+ BinaryExpression,
73
+ ComplexExpression,
74
+ ExpressionBase
75
+ } from "./esm/chunks/chunk-F4CWOE7M.mjs";
76
+ import {
77
+ OrderProperty
78
+ } from "./esm/chunks/chunk-YB2LMPUX.mjs";
79
+ import {
80
+ utils
81
+ } from "./esm/chunks/chunk-2ID24RPE.mjs";
82
+ export {
83
+ BatchRequest,
84
+ BinaryExpression,
85
+ BlobBuilder,
86
+ CONTENT_TYPES,
87
+ ChunkUploadSdk,
88
+ ChunkedFileUploadUtilities,
89
+ CommitChunksRequest,
90
+ ComplexExpression,
91
+ CreateRelatedRequest,
92
+ CreateRequest,
93
+ Data,
94
+ DeleteRelatedByIdRequest,
95
+ DeleteRelatedRequest,
96
+ DeleteRequest,
97
+ EXPRESSION_TYPE,
98
+ ExecutableRequest,
99
+ ExpressionBase,
100
+ FetchTransport,
101
+ GetByIdRequest,
102
+ GetRelatedByIdRequest,
103
+ GetRelatedRequest,
104
+ GetRequest,
105
+ HEADER_NAMES,
106
+ HTTP_METHODS,
107
+ ODATA_PARAMS,
108
+ OrderProperty,
109
+ Query,
110
+ QueryBase,
111
+ QueryBuilder,
112
+ RequestBase,
113
+ RequestFactory,
114
+ SF_PARAMS,
115
+ Sitefinity,
116
+ Transaction,
117
+ UpdateRequest,
118
+ UploadChunkRequest,
119
+ UploadRequest,
120
+ WhereQuery,
121
+ XhrTransport,
122
+ utils
123
+ };
124
+ //# sourceMappingURL=sitefinity-webservices-sdk.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": [],
4
+ "sourcesContent": [],
5
+ "mappings": "",
6
+ "names": []
7
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Incrementally builds a `Blob`, primarily for multipart batch MIME bodies.
3
+ *
4
+ * This is a low-level helper for advanced request construction.
5
+ */
6
+ export declare class BlobBuilder {
7
+ private blob;
8
+ /** Appends a value to the blob being built. */
9
+ append(value: any): void;
10
+ /** Returns the accumulated blob content. */
11
+ build(): Blob;
12
+ }
package/src/Data.d.ts ADDED
@@ -0,0 +1,259 @@
1
+ import { ChunkUploadSdk } from "./chunk-upload/chunk-upload.sdk";
2
+ import { Query } from "./Query";
3
+ import { RequestFactory } from "./Requests/RequestFactory";
4
+ import { TypeOptions } from "./Sitefinity";
5
+ /**
6
+ * Client for issuing requests against one Sitefinity entity set.
7
+ */
8
+ export declare class Data {
9
+ private urlOptions;
10
+ private factory;
11
+ /**
12
+ * Creates an entity-set data client.
13
+ *
14
+ * @param urlOptions Entity-set and request URL options.
15
+ * @param factory Internal request factory used to create SDK requests.
16
+ */
17
+ constructor(urlOptions: TypeOptions, factory: RequestFactory);
18
+ /**
19
+ * Returns the chunk-upload service for this entity set.
20
+ *
21
+ * Use it for uploads that must be sent in chunks and committed after all chunks
22
+ * complete. A new service instance is returned for each access.
23
+ *
24
+ * @returns The chunk-upload service.
25
+ */
26
+ get chunkUpload(): ChunkUploadSdk;
27
+ /**
28
+ * Executes a GET request to retrieve a collection of items.
29
+ *
30
+ * @param parameters Query, action, fallback-property, and callback options.
31
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
32
+ * @throws If request creation fails.
33
+ */
34
+ get(parameters: RequestOptionsBase): void;
35
+ /**
36
+ * Executes a GET request to retrieve operations for an item or its parent collection.
37
+ *
38
+ * When `key` is omitted, `parentId` is added to the operations URL.
39
+ *
40
+ * @param parameters Operation and callback options.
41
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
42
+ * @throws If the underlying request cannot be created.
43
+ */
44
+ getOperations(parameters: OperationsRequestOptions): void;
45
+ /**
46
+ * Executes a GET request for a single item.
47
+ *
48
+ * @param parameters Item key, query, action, and callback options.
49
+ * @returns Nothing. The item is delivered to `successCb` or `failureCb`.
50
+ * @throws If `key` is missing.
51
+ */
52
+ getSingle(parameters: RequestOptionsBase): void;
53
+ /**
54
+ * Executes a POST request for a single item.
55
+ *
56
+ * @param parameters Item data, optional key/action, and callbacks.
57
+ * @returns Nothing. The created item or error is delivered to a callback.
58
+ * @throws If `data` is missing.
59
+ */
60
+ create(parameters: CreateRequestOptions): void;
61
+ /**
62
+ * Executes a PATCH request to update a single item.
63
+ *
64
+ * @param parameters Item key, update data, optional temporary-save flag, and callbacks.
65
+ * @returns Nothing. The updated item or error is delivered to a callback.
66
+ * @throws If `key` or `data` is missing.
67
+ *
68
+ * @example
69
+ * const data = sf.data({
70
+ * entitySet: "newsitems",
71
+ * provider: "OpenAccessDataProvider",
72
+ * culture: "en"
73
+ * });
74
+ *
75
+ * data.update({
76
+ * key: "00000000-0000-0000-0000-000000000000",
77
+ * data: { Title: "Updated news title" },
78
+ * saveTemp: true,
79
+ * successCb,
80
+ * failureCb
81
+ * });
82
+ */
83
+ update(parameters: UpdateRequestOptions): void;
84
+ /**
85
+ * Executes a DELETE request to delete a single item.
86
+ *
87
+ * @param parameters Item key, optional action, and callbacks.
88
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
89
+ * @throws If `key` is missing.
90
+ */
91
+ destroy(parameters: RequestOptionsBase): void;
92
+ /**
93
+ * Executes a POST request to execute a workflow operation for a single item.
94
+ *
95
+ * @param parameters Item key, operation data, and callbacks.
96
+ * @returns Nothing. The operation result is delivered to a callback.
97
+ * @throws If `key` or `data` is missing.
98
+ */
99
+ operation(parameters: CreateRequestOptions): void;
100
+ /**
101
+ * Executes a GET request to retrieve a property of a single item.
102
+ *
103
+ * @param parameters Item key, property name, and callbacks.
104
+ * @returns Nothing. The property value is delivered to a callback.
105
+ * @throws If `key` or `property` is missing.
106
+ */
107
+ getProperty(parameters: PropertyRequestOptions): void;
108
+ /**
109
+ * Executes a GET request to retrieve a related property value of a single item.
110
+ *
111
+ * @param parameters Item key, relation property name, and callbacks.
112
+ * @returns Nothing. The related value is delivered to a callback.
113
+ * @throws If `key` or `property` is missing.
114
+ */
115
+ getRelated(parameters: PropertyRequestOptions): void;
116
+ /**
117
+ * Executes a GET request to retrieve a related item by its ID.
118
+ *
119
+ * @param parameters Item key, relation property, related item ID, and callbacks.
120
+ * @returns Nothing. The related item is delivered to a callback.
121
+ * @throws If `key`, `property`, or `relatedId` is missing.
122
+ */
123
+ getRelatedById(parameters: SingleRelatedItemRequestOptions): void;
124
+ /**
125
+ * Executes a DELETE request for all members associated with a relation property.
126
+ *
127
+ * @param parameters Item key, relation property, and callbacks.
128
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
129
+ * @throws If `key` or `property` is missing.
130
+ */
131
+ destroyRelated(parameters: PropertyRequestOptions): void;
132
+ /**
133
+ * Executes a DELETE request for one member of a relation property.
134
+ *
135
+ * @param parameters Item key, relation property, related item ID, and callbacks.
136
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
137
+ * @throws If `key`, `property`, or `relatedId` is missing.
138
+ */
139
+ destroyRelatedById(parameters: SingleRelatedItemRequestOptions): void;
140
+ /**
141
+ * Executes a POST request to add a related item to a property collection.
142
+ *
143
+ * @param parameters Item key, relation property, related item link, and callbacks.
144
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
145
+ * @throws If `key`, `property`, or `link` is missing.
146
+ */
147
+ createRelated(parameters: CreateRelatedRequestOptions): void;
148
+ /**
149
+ * Executes a POST request to upload a media item and optionally update or publish it.
150
+ *
151
+ * The SDK orchestrates the upload in a transaction. `content`, `contentType`, `name`,
152
+ * and `uploadProperties` are required. When `payload` is supplied, it updates the
153
+ * uploaded item; when `publish` is `true`, it then executes the `Publish` operation.
154
+ *
155
+ * @param parameters Upload data, optional post-upload payload, publish flag, and callbacks.
156
+ * @returns Nothing. The result is delivered to `successCb` or `failureCb`.
157
+ * @throws If required upload data is missing.
158
+ *
159
+ * @example
160
+ * const data = sf.data({ entitySet: "images" });
161
+ * data.upload({
162
+ * data: {
163
+ * content: "base64 file content",
164
+ * contentType: "image/jpeg",
165
+ * name: "test.jpg",
166
+ * payload: { Title: "Test" },
167
+ * uploadProperties: {
168
+ * ParentId: "4BA7AD46-F29B-4E65-BE17-9BF7CE5BA1FB"
169
+ * }
170
+ * },
171
+ * successCb,
172
+ * failureCb
173
+ * });
174
+ */
175
+ upload(parameters: UploadRequestOptions): void;
176
+ }
177
+ /**
178
+ * Common query, URL-action, callback, and item-key options for data requests.
179
+ */
180
+ export interface RequestOptionsBase {
181
+ /** OData query to apply to the request. */
182
+ query?: Query;
183
+ /** Optional action appended to the request URL. */
184
+ action?: string;
185
+ /** Called with the successful response payload. */
186
+ successCb?: Function;
187
+ /** Called with the failure payload, including the HTTP status when available. */
188
+ failureCb?: Function;
189
+ /** Called with the upload or request progress event when available. */
190
+ progressCb?: Function;
191
+ /** Additional property names requested for culture fallback. */
192
+ fallbackProperties?: string[];
193
+ /** Item key used by single-item and relation requests. */
194
+ key?: string | number;
195
+ }
196
+ /**
197
+ * Options for retrieving the operations available to an item or parent collection.
198
+ */
199
+ export interface OperationsRequestOptions extends RequestOptionsBase {
200
+ /** Parent item ID used when retrieving collection operations without a `key`. */
201
+ parentId?: string;
202
+ }
203
+ /**
204
+ * Options for creating an item or executing an item operation.
205
+ */
206
+ export interface CreateRequestOptions extends RequestOptionsBase {
207
+ /** Entity data sent in the request body. Required by `create` and `operation`. */
208
+ data?: object;
209
+ }
210
+ /**
211
+ * Options for updating an existing item.
212
+ */
213
+ export interface UpdateRequestOptions extends CreateRequestOptions {
214
+ /** Saves the update as temporary data when true. */
215
+ saveTemp?: boolean;
216
+ }
217
+ /**
218
+ * Options for addressing an item property or relation.
219
+ */
220
+ export interface PropertyRequestOptions extends RequestOptionsBase {
221
+ /** Relation or property name addressed by the request. */
222
+ property: string;
223
+ }
224
+ /**
225
+ * Options for addressing one item within a relation.
226
+ */
227
+ export interface SingleRelatedItemRequestOptions extends PropertyRequestOptions {
228
+ /** ID of the related item addressed by the request. */
229
+ relatedId: string;
230
+ }
231
+ /**
232
+ * Options for adding an item to a relation.
233
+ */
234
+ export interface CreateRelatedRequestOptions extends PropertyRequestOptions {
235
+ /** OData link or ID of the related item to add. */
236
+ link: string | number;
237
+ }
238
+ /**
239
+ * Options for uploading a media item and optionally updating or publishing it.
240
+ */
241
+ export interface UploadRequestOptions extends CreateRequestOptions {
242
+ /** Upload content and metadata. */
243
+ data: {
244
+ /** Base64 or other content representation accepted by the upload endpoint. */
245
+ content: string;
246
+ /** MIME type of the uploaded file. */
247
+ contentType: string;
248
+ /** Upload-specific properties such as a media-library parent ID. */
249
+ uploadProperties: {
250
+ [key: string]: string;
251
+ };
252
+ /** File name sent to Sitefinity. */
253
+ name: string;
254
+ /** Properties applied to the uploaded item after upload. */
255
+ payload?: object;
256
+ };
257
+ /** Publishes the uploaded item after any payload update when true. */
258
+ publish?: boolean;
259
+ }
@@ -0,0 +1,37 @@
1
+ /** Base node for a query filter expression. */
2
+ export declare class ExpressionBase {
3
+ type: string;
4
+ /** Creates an expression node with the specified operator or logical type. */
5
+ constructor(type: string);
6
+ /** Returns this expression's operator or logical type. */
7
+ getType(): string;
8
+ }
9
+ /** A filter expression comparing one property with one constant value. */
10
+ export declare class BinaryExpression extends ExpressionBase {
11
+ parameter: string;
12
+ constant: any;
13
+ caseSensitive: boolean;
14
+ /**
15
+ * Creates a comparison expression.
16
+ *
17
+ * @param type Supported comparison operator, such as `eq`, `ne`, or `contains`.
18
+ * @param parameter Property being tested.
19
+ * @param constant Value compared with the property.
20
+ * @param caseSensitive Whether string functions should preserve case.
21
+ */
22
+ constructor(type: string, parameter: string, constant: any, caseSensitive?: boolean);
23
+ /** Returns the property being compared. */
24
+ getParameter(): string;
25
+ /** Returns the comparison value. */
26
+ getConstant(): any;
27
+ /** Returns whether string matching preserves case. */
28
+ isCaseSensitive(): boolean;
29
+ }
30
+ /** A filter expression containing one or more child expression nodes. */
31
+ export declare class ComplexExpression extends ExpressionBase {
32
+ private expressions;
33
+ /** Creates a logical expression containing the supplied child nodes. */
34
+ constructor(type: string, expressions: ExpressionBase[]);
35
+ /** Returns the child expressions in their current order. */
36
+ getExpressions(): ExpressionBase[];
37
+ }
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Represents one validated OData order-by property and direction.
3
+ */
4
+ export declare class OrderProperty {
5
+ private propertyPath;
6
+ private isDesc;
7
+ /**
8
+ * Creates an order-by descriptor.
9
+ *
10
+ * The property path may include a trailing `asc` or `desc` direction.
11
+ * Without a direction, ascending order is used.
12
+ *
13
+ * @param propertyPath Property name, optionally followed by `asc` or `desc`.
14
+ * @param isDesc Explicit direction override when supplied.
15
+ * @throws Error If the property name is not a string or the direction is invalid.
16
+ */
17
+ constructor(propertyPath: string, isDesc?: boolean);
18
+ /** Returns the property name without its direction. */
19
+ getPropertyPath(): string;
20
+ /** Returns `true` for descending order and `false` for ascending order. */
21
+ getDirection(): boolean;
22
+ /** Returns the normalized `property direction` string used in `$orderby`. */
23
+ getValue(): string;
24
+ }
package/src/Query.d.ts ADDED
@@ -0,0 +1,104 @@
1
+ import { QueryBase } from "./QueryBase";
2
+ import { WhereQuery } from "./WhereQuery";
3
+ import { OrderProperty } from "./OrderProperty";
4
+ /**
5
+ * Builds an immutable, fluent OData query.
6
+ *
7
+ * Each modifier returns a cloned query, so a base query can be reused to create
8
+ * independent variants. Call {@link build} after completing the chain to obtain
9
+ * the query parameter object passed to a Sitefinity data request.
10
+ *
11
+ * @example
12
+ * const query = new Query()
13
+ * .select("Title", "Content")
14
+ * .where()
15
+ * .eq("Status", "Live")
16
+ * .done()
17
+ * .order("Title desc")
18
+ * .skip(10)
19
+ * .take(10);
20
+ *
21
+ * query.build();
22
+ * // { $select: "Title, Content", $filter: "(Status eq 'Live')",
23
+ * // $orderby: "Title desc", $skip: 10, $top: 10 }
24
+ */
25
+ export declare class Query extends QueryBase {
26
+ /** The order-by clauses, when an order has been configured. */
27
+ orderProperties: OrderProperty[];
28
+ /** The number of records to skip, when paging is configured. */
29
+ skipValue: number;
30
+ /** The maximum number of records to return, when paging is configured. */
31
+ takeValue: number;
32
+ /** The full-text search expression, when configured. */
33
+ searchValue: string;
34
+ /** Whether the service should include the total count in the response. */
35
+ inlineCount: boolean;
36
+ /** The root filter expression, when a where clause has been configured. */
37
+ filter: WhereQuery<Query>;
38
+ /** Creates an empty query with no selected fields, filters, ordering, or paging. */
39
+ constructor();
40
+ /**
41
+ * Starts a filter expression.
42
+ *
43
+ * The returned builder is generic over its parent query. Call `done()` to
44
+ * return to this query; nested logical groups require one `done()` per group.
45
+ *
46
+ * @returns A fluent filter builder.
47
+ */
48
+ where(): WhereQuery<Query>;
49
+ /**
50
+ * Specifies one or more order-by clauses.
51
+ *
52
+ * Each property may be followed by `asc` or `desc`; ascending order is the
53
+ * default. Property names must be simple paths without a dot.
54
+ *
55
+ * @param properties Property names and optional directions.
56
+ * @returns A cloned query containing the requested ordering.
57
+ * @throws Error If a property is not a string, contains a nested path, or
58
+ * has an invalid direction.
59
+ *
60
+ * @example
61
+ * new Query().order("Title desc", "PublicationDate asc");
62
+ */
63
+ order(...properties: string[]): Query;
64
+ /**
65
+ * Skips a number of records before returning results.
66
+ *
67
+ * @param value Number of records to skip.
68
+ * @returns A cloned query with `$skip` configured.
69
+ */
70
+ skip(value: number): Query;
71
+ /**
72
+ * Limits the number of records returned.
73
+ *
74
+ * @param value Maximum number of records to return.
75
+ * @returns A cloned query with `$top` configured.
76
+ */
77
+ take(value: number): Query;
78
+ /**
79
+ * Adds a full-text search expression.
80
+ *
81
+ * @param value Search text understood by the Sitefinity service.
82
+ * @returns A cloned query with `$search` configured.
83
+ */
84
+ search(value: string): Query;
85
+ /**
86
+ * Requests the total matching count with the result.
87
+ *
88
+ * @param inline Whether `$count` should be enabled. Defaults to `true`.
89
+ * @returns A cloned query with `$count` configured.
90
+ */
91
+ count(inline?: boolean): Query;
92
+ /**
93
+ * Converts this query into OData query parameters.
94
+ *
95
+ * The returned object may contain `$filter`, `$select`, `$expand`,
96
+ * `$orderby`, `$skip`, `$top`, `$count`, and `$search`. Empty clauses are
97
+ * omitted. Building does not mutate the query.
98
+ *
99
+ * @returns The query parameter object for a data request.
100
+ */
101
+ build(): {
102
+ [key: string]: string;
103
+ };
104
+ }
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Base class for query projections.
3
+ *
4
+ * `Query` extends this class with filtering, ordering, searching, and paging.
5
+ * Projection methods are immutable: each call returns a clone that preserves
6
+ * the concrete query prototype, so fluent chains continue to expose derived
7
+ * query methods.
8
+ */
9
+ export declare class QueryBase {
10
+ /** Selected scalar properties, or `null` when no projection was configured. */
11
+ selectProperties: string[];
12
+ /** Selected navigation properties, or `null` when no expansion was configured. */
13
+ expandProperties: string[];
14
+ /** Creates an empty projection. */
15
+ constructor();
16
+ /**
17
+ * Selects the scalar fields returned by the service.
18
+ *
19
+ * Duplicate names are removed while preserving their first occurrence.
20
+ * Property names must be simple paths without a dot.
21
+ *
22
+ * @param properties Field names to include.
23
+ * @returns A cloned query with `$select` configured.
24
+ * @throws Error If a property is not a string or is a nested path.
25
+ */
26
+ select(...properties: string[]): this;
27
+ /**
28
+ * Selects the navigation properties expanded by the service.
29
+ *
30
+ * Duplicate names are removed while preserving their first occurrence.
31
+ * Property names must be simple paths without a dot.
32
+ *
33
+ * @param properties Navigation property names to expand.
34
+ * @returns A cloned query with `$expand` configured.
35
+ * @throws Error If a property is not a string or is a nested path.
36
+ */
37
+ expand(...properties: string[]): this;
38
+ protected validatePropertyPaths(propPaths: string[], allowNested?: boolean): void;
39
+ protected clone(setter?: ((newObj: this) => void)): this;
40
+ }
@@ -0,0 +1,29 @@
1
+ import { Query } from "./Query";
2
+ /**
3
+ * Serializes a {@link Query} and its expression tree to OData query parameters.
4
+ */
5
+ export declare class QueryBuilder {
6
+ private query;
7
+ /** Creates a builder for the supplied query. */
8
+ constructor(query: Query);
9
+ /**
10
+ * Serializes the query into OData parameter names and values.
11
+ *
12
+ * Supported output keys are `$filter`, `$select`, `$expand`, `$orderby`,
13
+ * `$skip`, `$top`, `$count`, and `$search`. Missing or empty clauses are
14
+ * omitted. String constants are escaped and quoted; GUID constants remain
15
+ * unquoted, and `in` requires an array value.
16
+ *
17
+ * @returns An object suitable for the data request's query parameters.
18
+ * @throws Error If the expression tree is invalid, an operator is unsupported,
19
+ * or an `in` condition does not contain an array.
20
+ */
21
+ build(): {
22
+ [key: string]: string;
23
+ };
24
+ private buildComplexExpression;
25
+ private buildBinaryExpression;
26
+ private applyCaseSensitiveSettings;
27
+ private checkType;
28
+ private isGuid;
29
+ }