@sitevision/api 2025.10.1 → 2025.11.1
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/index.d.ts +1 -0
- package/package.json +2 -2
- package/server/FileUtil/index.d.ts +23 -0
- package/server/FileUtil/index.js +1 -0
- package/server/GeolocationValueBuilder/index.d.ts +95 -0
- package/server/GeolocationValueBuilder/index.js +15 -0
- package/server/ImageUtil/index.d.ts +23 -0
- package/server/ImageUtil/index.js +1 -0
- package/server/LinkValueBuilder/index.d.ts +1 -1
- package/server/MetadataUtil/index.d.ts +23 -2
- package/server/MetadataUtil/index.js +2 -1
- package/server/RelatedValueBuilder/index.d.ts +1 -1
- package/types/senselogic/sitevision/api/metadata/value/GeolocationValue/index.d.ts +25 -0
- package/types/senselogic/sitevision/api/metadata/value/GeolocationValue/index.js +10 -0
- package/types/senselogic/sitevision/api/script/VersionedRestApi/index.d.ts +1 -1
package/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ import './server/FilterBuilder';
|
|
|
37
37
|
import './server/FolderUtil';
|
|
38
38
|
import './server/FontUtil';
|
|
39
39
|
import './server/FormatterBuilderFactory';
|
|
40
|
+
import './server/GeolocationValueBuilder';
|
|
40
41
|
import './server/HighlightBuilder';
|
|
41
42
|
import './server/IconUtil';
|
|
42
43
|
import './server/ImageLinkRenderer';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitevision/api",
|
|
3
|
-
"version": "2025.
|
|
3
|
+
"version": "2025.11.1",
|
|
4
4
|
"author": "Sitevision AB",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"access": "public",
|
|
31
31
|
"directory": "dist"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "197b8117f3063b9725e9c0329d24e3e9fb6172af"
|
|
34
34
|
}
|
|
@@ -131,6 +131,29 @@ export interface FileUtil {
|
|
|
131
131
|
*/
|
|
132
132
|
createFileFromTemporary(aParent: Node, aTemporaryFile: Node): Node;
|
|
133
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Copies a file to a given parent.
|
|
136
|
+
*
|
|
137
|
+
* <p>
|
|
138
|
+
* Note that the <code>aParent</code> of the file must be a <code>sv:localFileRepository</code>, <code>sv:fileRepository</code>,
|
|
139
|
+
* <code>sv:personalFileRepository</code> or a <code>sv:folder</code> residing as sub node to a file repository.
|
|
140
|
+
* The <code>aParent</code> must not be trashed.
|
|
141
|
+
* </p>
|
|
142
|
+
* <p>
|
|
143
|
+
* <strong>Permission note!</strong> Current user must be authorized to alter the parent node
|
|
144
|
+
* (e.g. {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE}).
|
|
145
|
+
* </p>
|
|
146
|
+
*
|
|
147
|
+
* @param aFile the file node to copy
|
|
148
|
+
* @param aParent the parent node where the file should be copied to
|
|
149
|
+
* @return a file node corresponding to the newly created file
|
|
150
|
+
* @throws ConstraintViolationException if the user is not authorized to alter the parent node, if an invalid
|
|
151
|
+
* parent node is specified, if an invalid file node is specified
|
|
152
|
+
* @throws RepositoryException if something else goes wrong
|
|
153
|
+
* @since Sitevision 2026.01.1
|
|
154
|
+
*/
|
|
155
|
+
copyFile(aFile: Node, aParent: Node): Node;
|
|
156
|
+
|
|
134
157
|
/**
|
|
135
158
|
* Updates the binary content of an existing file using a uri string.
|
|
136
159
|
*
|
package/server/FileUtil/index.js
CHANGED
|
@@ -12,6 +12,7 @@ var _default = exports["default"] = {
|
|
|
12
12
|
createFile: function createFile() {},
|
|
13
13
|
createFileFromBase64: function createFileFromBase64() {},
|
|
14
14
|
createFileFromTemporary: function createFileFromTemporary() {},
|
|
15
|
+
copyFile: function copyFile() {},
|
|
15
16
|
updateBinaryContent: function updateBinaryContent() {},
|
|
16
17
|
updateBinaryContentFromBase64: function updateBinaryContentFromBase64() {},
|
|
17
18
|
updateBinaryContentFromTemporary: function updateBinaryContentFromTemporary() {},
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
import type { String } from "../../types/java/lang/String";
|
|
5
|
+
|
|
6
|
+
import type { GeolocationValue } from "../../types/senselogic/sitevision/api/metadata/value/GeolocationValue";
|
|
7
|
+
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Builder to create {@link GeolocationValue} instances that can be used to set geolocation metadata.
|
|
11
|
+
*
|
|
12
|
+
* <p>
|
|
13
|
+
* GeolocationValueBuilder has three <strong>mandatory attributes</strong>:
|
|
14
|
+
* </p>
|
|
15
|
+
* <ul>
|
|
16
|
+
* <li>
|
|
17
|
+
* <em>name</em> - The location name. Must not be null or blank.
|
|
18
|
+
* </li>
|
|
19
|
+
* <li>
|
|
20
|
+
* <em>latitude</em> - The Latitude. Must be a double value within range <code>[-90.0 ... 90.0]</code>.
|
|
21
|
+
* </li>
|
|
22
|
+
* <li>
|
|
23
|
+
* <em>longitude</em> - The Longitude. Must be a double value within range <code>[-180.0 ... 180.0]</code>.
|
|
24
|
+
* </li>
|
|
25
|
+
* </ul>
|
|
26
|
+
* <p>
|
|
27
|
+
* Using the GeolocationValueBuilder is pretty straightforward, if you remember that it is <strong>stateful</strong>. Conceptually you
|
|
28
|
+
* would typically use it like this:
|
|
29
|
+
* </p>
|
|
30
|
+
* <ol>
|
|
31
|
+
* <li>Get the GeolocationValueBuilder</li>
|
|
32
|
+
* <li>Set the name</li>
|
|
33
|
+
* <li>Set the latitude</li>
|
|
34
|
+
* <li>Set the longitude</li>
|
|
35
|
+
* <li>Do build</li>
|
|
36
|
+
* </ol>
|
|
37
|
+
* <p>
|
|
38
|
+
* When you have built a <code>GeolocationValue</code> instance, you can re-use the GeolocationValueBuilder to build more instances.
|
|
39
|
+
* Something like:
|
|
40
|
+
* </p>
|
|
41
|
+
* <ol>
|
|
42
|
+
* <li>Possibly set a new name</li>
|
|
43
|
+
* <li>Possibly set a new latitude</li>
|
|
44
|
+
* <li>Possibly set a new longitude</li>
|
|
45
|
+
* <li>Do build</li>
|
|
46
|
+
* </ol>
|
|
47
|
+
*
|
|
48
|
+
* <p>
|
|
49
|
+
* <strong>Tip!</strong> The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains
|
|
50
|
+
* more information about Builders and how to work with them!
|
|
51
|
+
* </p>
|
|
52
|
+
*
|
|
53
|
+
* <p>
|
|
54
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
55
|
+
* {@link senselogic.sitevision.api.metadata.MetadataUtil#getGeolocationValueBuilder()}.
|
|
56
|
+
* See {@link senselogic.sitevision.api.metadata.MetadataUtil} for how to obtain an instance of the <code>MetadataUtil</code> interface.
|
|
57
|
+
* </p>
|
|
58
|
+
* @author Magnus Lövgren
|
|
59
|
+
* @since Sitevision 2025.11.1
|
|
60
|
+
*/
|
|
61
|
+
export interface GeolocationValueBuilder extends Builder {
|
|
62
|
+
/**
|
|
63
|
+
* Sets the location name.
|
|
64
|
+
* @param aLocationName the location name, must not be null or blank
|
|
65
|
+
* @return this builder
|
|
66
|
+
*/
|
|
67
|
+
setName(aLocationName: String | string): GeolocationValueBuilder;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Sets the latitude.
|
|
71
|
+
* @param aLatitude the latitude, must be within range [-90.0 ... 90.0]
|
|
72
|
+
* @return this builder
|
|
73
|
+
*/
|
|
74
|
+
setLatitude(aLatitude: number): GeolocationValueBuilder;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Sets the longitude.
|
|
78
|
+
* @param aLongitude the longitude, must be within range [-180.0 ... 180.0]
|
|
79
|
+
* @return this builder
|
|
80
|
+
*/
|
|
81
|
+
setLongitude(aLongitude: number): GeolocationValueBuilder;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Creates a GeolocationValue instance using current state of this builder.
|
|
85
|
+
* @return a geolocation value
|
|
86
|
+
* @throws IllegalStateException if the name, longitude or latitude value are invalid
|
|
87
|
+
*/
|
|
88
|
+
build(): GeolocationValue;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
declare namespace GeolocationValueBuilder {}
|
|
92
|
+
|
|
93
|
+
declare var geolocationValueBuilder: GeolocationValueBuilder;
|
|
94
|
+
|
|
95
|
+
export default geolocationValueBuilder;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* This file is auto generated. Do not modify it manually.
|
|
9
|
+
*/
|
|
10
|
+
var _default = exports["default"] = {
|
|
11
|
+
setName: function setName() {},
|
|
12
|
+
setLatitude: function setLatitude() {},
|
|
13
|
+
setLongitude: function setLongitude() {},
|
|
14
|
+
build: function build() {}
|
|
15
|
+
};
|
|
@@ -158,6 +158,29 @@ export interface ImageUtil {
|
|
|
158
158
|
*/
|
|
159
159
|
createImageFromTemporary(aParent: Node, aTemporaryFile: Node): Node;
|
|
160
160
|
|
|
161
|
+
/**
|
|
162
|
+
* Copies an image to a given parent.
|
|
163
|
+
*
|
|
164
|
+
* <p>
|
|
165
|
+
* Note that the <code>aParent</code> for the image must be a <code>sv:localImageRepository</code>, <code>sv:imageRepository</code>,
|
|
166
|
+
* <code>sv:personalImageRepository</code> or a <code>sv:folder</code> residing as sub node to an image repository.
|
|
167
|
+
* The <code>aParent</code> must not be trashed.
|
|
168
|
+
* </p>
|
|
169
|
+
* <p>
|
|
170
|
+
* <strong>Permission note!</strong> Current user must be authorized to alter the parent node
|
|
171
|
+
* (e.g. {@link senselogic.sitevision.api.security.PermissionUtil.Permission#WRITE}).
|
|
172
|
+
* </p>
|
|
173
|
+
*
|
|
174
|
+
* @param aImage the image node to copy
|
|
175
|
+
* @param aParent the parent node where the image should be copied to
|
|
176
|
+
* @return an image node corresponding to the newly created image
|
|
177
|
+
* @throws ConstraintViolationException if the user is not authorized to alter the parent node, if an invalid
|
|
178
|
+
* parent node is specified, if an invalid image node is specified
|
|
179
|
+
* @throws RepositoryException if something else goes wrong
|
|
180
|
+
* @since Sitevision 2026.01.1
|
|
181
|
+
*/
|
|
182
|
+
copyImage(aImage: Node, aParent: Node): Node;
|
|
183
|
+
|
|
161
184
|
/**
|
|
162
185
|
* Updates the binary content of an existing image using a uri string.
|
|
163
186
|
*
|
|
@@ -12,6 +12,7 @@ var _default = exports["default"] = {
|
|
|
12
12
|
createImage: function createImage() {},
|
|
13
13
|
createImageFromBase64: function createImageFromBase64() {},
|
|
14
14
|
createImageFromTemporary: function createImageFromTemporary() {},
|
|
15
|
+
copyImage: function copyImage() {},
|
|
15
16
|
updateBinaryContent: function updateBinaryContent() {},
|
|
16
17
|
updateBinaryContentFromBase64: function updateBinaryContentFromBase64() {},
|
|
17
18
|
updateBinaryContentFromTemporary: function updateBinaryContentFromTemporary() {},
|
|
@@ -8,7 +8,7 @@ import type { LinkValue } from "../../types/senselogic/sitevision/api/metadata/v
|
|
|
8
8
|
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Builder to create LinkValue instances that can be used to set link metadata.
|
|
11
|
+
* Builder to create {@link LinkValue} instances that can be used to set link metadata.
|
|
12
12
|
*
|
|
13
13
|
* <p>
|
|
14
14
|
* LinkValueBuilder has one <strong>mandatory attribute</strong>:
|
|
@@ -10,6 +10,7 @@ import type { String } from "../../types/java/lang/String";
|
|
|
10
10
|
import type { List } from "../../types/java/util/List";
|
|
11
11
|
import type { LinkValueBuilder } from "../LinkValueBuilder";
|
|
12
12
|
import type { RelatedValueBuilder } from "../RelatedValueBuilder";
|
|
13
|
+
import type { GeolocationValueBuilder } from "../GeolocationValueBuilder";
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* <p>
|
|
@@ -140,6 +141,11 @@ export interface MetadataUtil {
|
|
|
140
141
|
* a comma separated string of the tag names. Note that tag names provided as a comma separated string must be prefixed with #.
|
|
141
142
|
* It is also possible to provide a collection or an array of <code>sv:tag</code> or strings of tag names.
|
|
142
143
|
* </li>
|
|
144
|
+
* <li>
|
|
145
|
+
* <strong>geolocation</strong> <em>(since Sitevision 2025.11.1)</em><br>
|
|
146
|
+
* The value must be a {@link senselogic.sitevision.api.metadata.value.GeolocationValue}.
|
|
147
|
+
* If no valid value is provided an <code>UnsupportedOperationException</code> is thrown.
|
|
148
|
+
* </li>
|
|
143
149
|
* </ul>
|
|
144
150
|
*
|
|
145
151
|
* <p>
|
|
@@ -332,7 +338,7 @@ export interface MetadataUtil {
|
|
|
332
338
|
|
|
333
339
|
/**
|
|
334
340
|
* <p>
|
|
335
|
-
* Returns a link value builder that
|
|
341
|
+
* Returns a link value builder that creates {@link senselogic.sitevision.api.metadata.value.LinkValue} instances.
|
|
336
342
|
* </p>
|
|
337
343
|
*
|
|
338
344
|
* <p>
|
|
@@ -347,7 +353,7 @@ export interface MetadataUtil {
|
|
|
347
353
|
|
|
348
354
|
/**
|
|
349
355
|
* <p>
|
|
350
|
-
* Returns a related value builder that
|
|
356
|
+
* Returns a related value builder that creates {@link senselogic.sitevision.api.metadata.value.RelatedValue} instances.
|
|
351
357
|
* </p>
|
|
352
358
|
*
|
|
353
359
|
* <p>
|
|
@@ -359,6 +365,21 @@ export interface MetadataUtil {
|
|
|
359
365
|
* @since Sitevision 3.6
|
|
360
366
|
*/
|
|
361
367
|
getRelatedValueBuilder(): RelatedValueBuilder;
|
|
368
|
+
|
|
369
|
+
/**
|
|
370
|
+
* <p>
|
|
371
|
+
* Returns a geolocation value builder that creates {@link senselogic.sitevision.api.metadata.value.GeolocationValue} instances.
|
|
372
|
+
* </p>
|
|
373
|
+
*
|
|
374
|
+
* <p>
|
|
375
|
+
* <strong>Tip!</strong> A <code>GeolocationValue</code> can be used to set a <em>geolocation metadata</em>
|
|
376
|
+
* via {@link #setMetadataPropertyValue(javax.jcr.Node, String, Object)}
|
|
377
|
+
* or {@link #setMetadataPropertyValue(javax.jcr.Node, javax.jcr.Property, Object)}.
|
|
378
|
+
* </p>
|
|
379
|
+
* @return a geolocation value builder
|
|
380
|
+
* @since Sitevision 2025.11.1
|
|
381
|
+
*/
|
|
382
|
+
getGeolocationValueBuilder(): GeolocationValueBuilder;
|
|
362
383
|
}
|
|
363
384
|
|
|
364
385
|
declare namespace MetadataUtil {}
|
|
@@ -14,5 +14,6 @@ var _default = exports["default"] = {
|
|
|
14
14
|
getRelatedMetadataPropertyValues: function getRelatedMetadataPropertyValues() {},
|
|
15
15
|
getLinkMetadataPropertyValue: function getLinkMetadataPropertyValue() {},
|
|
16
16
|
getLinkValueBuilder: function getLinkValueBuilder() {},
|
|
17
|
-
getRelatedValueBuilder: function getRelatedValueBuilder() {}
|
|
17
|
+
getRelatedValueBuilder: function getRelatedValueBuilder() {},
|
|
18
|
+
getGeolocationValueBuilder: function getGeolocationValueBuilder() {}
|
|
18
19
|
};
|
|
@@ -8,7 +8,7 @@ import type { RelatedValue } from "../../types/senselogic/sitevision/api/metadat
|
|
|
8
8
|
import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Builder to create RelatedValue instances that can be used to set related metadata.
|
|
11
|
+
* Builder to create {@link RelatedValue} instances that can be used to set related metadata.
|
|
12
12
|
*
|
|
13
13
|
* <p>
|
|
14
14
|
* RelatedValueBuilder has one <strong>mandatory attribute</strong>:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto generated from JavaDoc. Do not modify it manually.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A temporary representation of a geolocation metadata value.
|
|
7
|
+
*
|
|
8
|
+
* <p>
|
|
9
|
+
* An instance of this interface can be used in MetadataUtil when setting a geolocation metadata via the
|
|
10
|
+
* {@link senselogic.sitevision.api.metadata.MetadataUtil#setMetadataPropertyValue(javax.jcr.Node, String, Object)}
|
|
11
|
+
* or
|
|
12
|
+
* {@link senselogic.sitevision.api.metadata.MetadataUtil#setMetadataPropertyValue(javax.jcr.Node, javax.jcr.Property, Object)}
|
|
13
|
+
* </p>
|
|
14
|
+
*
|
|
15
|
+
* <p>
|
|
16
|
+
* An instance of the Sitevision class implementing this interface can be obtained via
|
|
17
|
+
* {@link senselogic.sitevision.api.metadata.builder.GeolocationValueBuilder#build()}.
|
|
18
|
+
* See {@link senselogic.sitevision.api.metadata.builder.GeolocationValueBuilder} for how to obtain an instance of the
|
|
19
|
+
* <code>GeolocationValueBuilder</code> interface.
|
|
20
|
+
* </p>
|
|
21
|
+
* @author Magnus Lövgren
|
|
22
|
+
* @since Sitevision 2025.11.1
|
|
23
|
+
* @see senselogic.sitevision.api.metadata.builder.GeolocationValueBuilder
|
|
24
|
+
*/
|
|
25
|
+
export type GeolocationValue = {};
|
|
@@ -146,7 +146,7 @@ export type VersionedRestApi = {
|
|
|
146
146
|
): unknown;
|
|
147
147
|
|
|
148
148
|
/**
|
|
149
|
-
* Executes a PUT endpoint of the REST API
|
|
149
|
+
* Executes a PUT endpoint of the REST API, targeting an instance of the context.
|
|
150
150
|
*
|
|
151
151
|
* <p>
|
|
152
152
|
* Delegates execution to {@link RestApi#put(javax.jcr.Node, String, javax.jcr.Node, Object) RestApi.put(Node,String,Node,Options)}
|