@sitevision/api 2023.8.1 → 2023.9.2

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 CHANGED
@@ -73,6 +73,7 @@ import './server/OfflineVersionPropertyUtil';
73
73
  import './server/OnlineVersionPropertyUtil';
74
74
  import './server/OutputUtil';
75
75
  import './server/PageUtil';
76
+ import './server/PermissionCheckBuilder';
76
77
  import './server/PermissionUtil';
77
78
  import './server/PermissionUtil.Permission';
78
79
  import './server/PortletContextUtil';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitevision/api",
3
- "version": "2023.8.1",
3
+ "version": "2023.9.2",
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": "84e58906704af5e7bcc97eae2a5b4b4c89a8031f"
33
+ "gitHead": "16599f319593fade8bb3f415c4ff9bd744556602"
34
34
  }
@@ -75,13 +75,12 @@ export interface FilterBuilder extends Builder {
75
75
  *
76
76
  * <p>
77
77
  * <strong>Query syntax note! </strong>Query strings should be expressed according to the <em>Solr query syntax</em>.
78
- * The syntax is basically the <em>
78
+ * The syntax is basically the<em>
79
79
  * <a href="http://lucene.apache.org/core/4_10_3/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description">
80
- * Lucene query syntax</a></em>
81
- * with <em><a href="http://wiki.apache.org/solr/SolrQuerySyntax#Differences_From_Lucene_Query_Parser">some minor differences</a></em>.
80
+ * Lucene query syntax</a></em> with some minor differences (solr syntax allows open-ended range queries and pure negative queries).
82
81
  * Also note that a general recommendation is to always use the <em>prefix operators</em> (<code>+</code>/<code>-</code>) instead of the
83
82
  * <em>boolean keywords</em> (AND/OR/NOT) to avoid unexpected behaviour. For deeper understanding, see for example
84
- * <a href="http://searchhub.org/2011/12/28/why-not-and-or-and-not/">Why Not AND, OR, And NOT?</a>.
83
+ * <a href="https://lucidworks.com/post/solr-boolean-operators/" target="_blank">Why Not AND, OR, And NOT?</a>.
85
84
  * </p>
86
85
  * @param aFilterQuery the filter query, a <code>null</code> or whitespace-only value will be ignored
87
86
  * @return this builder
@@ -361,6 +361,12 @@ export interface NodeTypeUtil extends NodeTypeUtilConstants {
361
361
  */
362
362
  IMAGE_FILTER_TYPE: "sv:imageFilter";
363
363
 
364
+ /**
365
+ * The primary node type name for the image filter repository type.
366
+ * @since Sitevision 2023.09.1
367
+ */
368
+ IMAGE_FILTER_REPOSITORY_TYPE: "sv:imageFilterRepository";
369
+
364
370
  /**
365
371
  * The primary node type name for the image repository type.
366
372
  * @since Sitevision 3.6.3
@@ -1122,6 +1128,24 @@ export interface NodeTypeUtil extends NodeTypeUtilConstants {
1122
1128
  */
1123
1129
  OAUTH2_CONFIGURATION_TYPE: "sv:oAuth2Configuration";
1124
1130
 
1131
+ /**
1132
+ * The primary node type name for the work status type.
1133
+ * @since Sitevision 2023.09.2
1134
+ */
1135
+ WORK_STATUS_TYPE: "sv:workStatus";
1136
+
1137
+ /**
1138
+ * The primary node type name for the work status template type.
1139
+ * @since Sitevision 2023.09.2
1140
+ */
1141
+ WORK_STATUS_TEMPLATE_TYPE: "sv:workStatusTemplate";
1142
+
1143
+ /**
1144
+ * The primary node type name for the work status template repository type.
1145
+ * @since Sitevision 2023.09.2
1146
+ */
1147
+ WORK_STATUS_TEMPLATE_REPOSITORY_TYPE: "sv:workStatusTemplateRepository";
1148
+
1125
1149
  /**
1126
1150
  * Checks if a node is a layout.
1127
1151
  * @param aNode the node to be checked
@@ -0,0 +1,59 @@
1
+ import type { PermissionStrategy } from "../../types/senselogic/sitevision/api/search/searcher/component/PermissionStrategy";
2
+ import type { PermissionCheck } from "../../types/senselogic/sitevision/api/search/searcher/component/PermissionCheck";
3
+ import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
4
+
5
+ /**
6
+ * <p>
7
+ * Builder for creating a {@link senselogic.sitevision.api.search.searcher.component.PermissionCheck} component.
8
+ * </p>
9
+ *
10
+ * <p>
11
+ * PermissionCheck has one <em>optional</em> attribute:
12
+ * </p>
13
+ * <ul>
14
+ * <li>
15
+ * <em>permission strategy</em> - the permission checking strategy.
16
+ * Default is {@link senselogic.sitevision.api.search.searcher.component.PermissionStrategy#EARLY_CHECK}.
17
+ * </li>
18
+ * </ul>
19
+ *
20
+ * <p>
21
+ * <strong>Tip!</strong> The {@link senselogic.sitevision.api.base.Builder Builder interface documentation} contains
22
+ * more information about Builders and how to work with them!
23
+ * </p>
24
+ *
25
+ * <p>
26
+ * An instance of the Sitevision class implementing this interface can be obtained via
27
+ * {@link senselogic.sitevision.api.search.SearchFactory#getPermissionCheckBuilder()}.
28
+ * See {@link senselogic.sitevision.api.search.SearchFactory} for how to obtain an instance of the <code>SearchFactory</code> interface.
29
+ * </p>
30
+ * @author Magnus Lövgren
31
+ * @since Sitevision 2023.09.1
32
+ */
33
+ export interface PermissionCheckBuilder extends Builder {
34
+ /**
35
+ * Sets the permission strategy.
36
+ * @param aPermissionStrategy the permission strategy
37
+ * @return this builder
38
+ */
39
+ setPermissionStrategy(
40
+ aPermissionStrategy: PermissionStrategy
41
+ ): PermissionCheckBuilder;
42
+
43
+ /**
44
+ * Creates a PermissionCheck component instance using currently specified state/behaviour.
45
+ *
46
+ * <p>
47
+ * Default strategy {@link senselogic.sitevision.api.search.searcher.component.PermissionStrategy#EARLY_CHECK} will be used
48
+ * if the component has no state (i.e. no {@link PermissionStrategy} explicitly set) when built.
49
+ * </p>
50
+ * @return a permission check component
51
+ */
52
+ build(): PermissionCheck;
53
+ }
54
+
55
+ declare namespace PermissionCheckBuilder {}
56
+
57
+ declare var permissionCheckBuilder: PermissionCheckBuilder;
58
+
59
+ export default permissionCheckBuilder;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {
8
+ setPermissionStrategy: function setPermissionStrategy() {},
9
+ build: function build() {}
10
+ };
11
+ exports["default"] = _default;
@@ -442,6 +442,20 @@ export interface ResourceLocatorUtil {
442
442
  * @see senselogic.sitevision.api.cookie.SiteCookieUtil
443
443
  */
444
444
  getSiteCookieRepository(): Node;
445
+
446
+ /**
447
+ * Gets the image filter repository (sv:imageFilterRepository) for the site of current node.
448
+ * @return the image filter repository, or null if indeterminable.
449
+ * @since Sitevision 2023.09.1
450
+ */
451
+ getImageFilterRepository(): Node;
452
+
453
+ /**
454
+ * Gets the work status template repository (sv:workStatusTemplateRepository) for the site of current node.
455
+ * @return the work status template repository, or null if indeterminable.
456
+ * @since Sitevision 2023.09.2
457
+ */
458
+ getWorkStatusTemplateRepository(): Node;
445
459
  }
446
460
 
447
461
  declare namespace ResourceLocatorUtil {}
@@ -45,6 +45,8 @@ var _default = {
45
45
  getTrashcan: function getTrashcan() {},
46
46
  getPrincipalRepository: function getPrincipalRepository() {},
47
47
  getAliasRepository: function getAliasRepository() {},
48
- getSiteCookieRepository: function getSiteCookieRepository() {}
48
+ getSiteCookieRepository: function getSiteCookieRepository() {},
49
+ getImageFilterRepository: function getImageFilterRepository() {},
50
+ getWorkStatusTemplateRepository: function getWorkStatusTemplateRepository() {}
49
51
  };
50
52
  exports["default"] = _default;
@@ -13,6 +13,7 @@ import type { SpellCheckBuilder } from "../SpellCheckBuilder";
13
13
  import type { StandardParserBuilder } from "../StandardParserBuilder";
14
14
  import type { QueryStringUtil } from "../QueryStringUtil";
15
15
  import type { MonitorBuilder } from "../MonitorBuilder";
16
+ import type { PermissionCheckBuilder } from "../PermissionCheckBuilder";
16
17
 
17
18
  /**
18
19
  * Factory for creating search-related instances.
@@ -112,6 +113,13 @@ export interface SearchFactory {
112
113
  * @since Sitevision 4.1
113
114
  */
114
115
  getMonitorBuilder(): MonitorBuilder;
116
+
117
+ /**
118
+ * Gets a PermissionCheckBuilder instance.
119
+ * @return a PermissionCheckBuilder instance
120
+ * @since Sitevision 2023.09.1
121
+ */
122
+ getPermissionCheckBuilder(): PermissionCheckBuilder;
115
123
  }
116
124
 
117
125
  declare namespace SearchFactory {}
@@ -17,6 +17,7 @@ var _default = {
17
17
  getSpellCheckBuilder: function getSpellCheckBuilder() {},
18
18
  getStandardParserBuilder: function getStandardParserBuilder() {},
19
19
  getQueryStringUtil: function getQueryStringUtil() {},
20
- getMonitorBuilder: function getMonitorBuilder() {}
20
+ getMonitorBuilder: function getMonitorBuilder() {},
21
+ getPermissionCheckBuilder: function getPermissionCheckBuilder() {}
21
22
  };
22
23
  exports["default"] = _default;
@@ -40,12 +40,10 @@ import type { SearchResult } from "../../types/senselogic/sitevision/api/search/
40
40
  * <strong>Query syntax note! </strong>Query strings should be expressed according to the <em>Solr query syntax</em>.
41
41
  * The syntax is basically the
42
42
  * <em><a href="http://lucene.apache.org/core/4_10_3/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description">
43
- * Lucene query syntax</a></em>
44
- * with <em><a href="http://wiki.apache.org/solr/SolrQuerySyntax#Differences_From_Lucene_Query_Parser">some minor differences</a></em>.
43
+ * Lucene query syntax</a></em> with some minor differences (solr syntax allows open-ended range queries and pure negative queries).
45
44
  * Also note that a general recommendation is to always use the <em>prefix operators</em> (<code>+</code>/<code>-</code>) instead of the
46
- * <em>boolean keywords</em> (AND/OR/NOT)
47
- * to avoid unexpected behaviour. For deeper understanding, see for example
48
- * <a href="https://lucidworks.com/blog/2011/12/28/why-not-and-or-and-not/">Why Not AND, OR, And NOT?</a>.
45
+ * <em>boolean keywords</em> (AND/OR/NOT) to avoid unexpected behaviour. For deeper understanding, see for example
46
+ * <a href="https://lucidworks.com/post/solr-boolean-operators/" target="_blank">Why Not AND, OR, And NOT?</a>.
49
47
  * </p>
50
48
  *
51
49
  * <p>
@@ -5,6 +5,7 @@ import type { Parser } from "../../types/senselogic/sitevision/api/search/search
5
5
  import type { Sort } from "../../types/senselogic/sitevision/api/search/searcher/component/Sort";
6
6
  import type { SpellCheck } from "../../types/senselogic/sitevision/api/search/searcher/component/SpellCheck";
7
7
  import type { Monitor } from "../../types/senselogic/sitevision/api/search/searcher/component/Monitor";
8
+ import type { PermissionCheck } from "../../types/senselogic/sitevision/api/search/searcher/component/PermissionCheck";
8
9
  import type { Searcher } from "../../types/senselogic/sitevision/api/search/searcher/Searcher";
9
10
  import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder";
10
11
 
@@ -53,6 +54,12 @@ import type { Builder } from "../../types/senselogic/sitevision/api/base/Builder
53
54
  * </em>
54
55
  * Default: <code>null</code> (i.e. no monitoring).
55
56
  * </li>
57
+ * <li>
58
+ * {@link senselogic.sitevision.api.search.searcher.component.PermissionCheck}<em>
59
+ * - how should permission checks be performed? (Note! Only applicable when querying a sv:nodeIndex)
60
+ * </em>
61
+ * Default: <code>null</code> (legacy default permission checking strategy will be used).
62
+ * </li>
56
63
  * </ul>
57
64
  * <p>
58
65
  * What <em>index</em> to query can also be specified. Default is the <em>default node index</em>
@@ -201,6 +208,34 @@ export interface SearcherBuilder extends Builder {
201
208
  */
202
209
  setMonitor(aMonitor: Monitor): SearcherBuilder;
203
210
 
211
+ /**
212
+ * Sets the permission check component.
213
+ *
214
+ * <p>
215
+ * <strong>Note! This component is only applicable when querying a Node index (<code>sv:nodeIndex</code>)!</strong>
216
+ * </p>
217
+ * <p>
218
+ * When querying a Custom Node index that is populated with <em>external data</em>, you should typically set a permission check component
219
+ * that specifies the {@link senselogic.sitevision.api.search.searcher.component.PermissionStrategy#EARLY_CHECK} strategy.
220
+ * </p>
221
+ * <p>
222
+ * <em>
223
+ * Legacy: a <code>Searcher</code> without any <code>PermissionCheck</code> component will use a legacy default strategy when checking
224
+ * permissions. This strategy is a mix of <code>EARLY_CHECK</code> and <code>LATE_CHECK</code> that is kept as-is for legacy reasons only.
225
+ * New search solutions with <code>Searcher</code> should typically specify a <code>PermissionCheck</code> component when querying
226
+ * a <code>sv:nodeIndex</code>.
227
+ * </em>
228
+ * </p>
229
+ * <p>
230
+ * A <code>PermissionCheck</code> instance is created via the {@link PermissionCheckBuilder#build()} method.
231
+ * </p>
232
+ * @param aPermissionCheck the permission check component
233
+ * @return this builder
234
+ * @see PermissionCheck
235
+ * @since Sitevision 2023.09.1
236
+ */
237
+ setPermissionCheck(aPermissionCheck: PermissionCheck): SearcherBuilder;
238
+
204
239
  /**
205
240
  * Creates a Searcher instance using currently specified components.
206
241
  * @return a Searcher instance
@@ -12,6 +12,7 @@ var _default = {
12
12
  setSort: function setSort() {},
13
13
  setSpellCheck: function setSpellCheck() {},
14
14
  setMonitor: function setMonitor() {},
15
+ setPermissionCheck: function setPermissionCheck() {},
15
16
  build: function build() {}
16
17
  };
17
18
  exports["default"] = _default;
@@ -372,6 +372,13 @@ export type NodeTypeUtilConstants = {
372
372
  */
373
373
  getIMAGE_FILTER_TYPE(): string;
374
374
 
375
+ /**
376
+ * Get accessor for {@link senselogic.sitevision.api.node.NodeTypeUtil#IMAGE_FILTER_REPOSITORY_TYPE}.
377
+ * @return {@link senselogic.sitevision.api.node.NodeTypeUtil#IMAGE_FILTER_REPOSITORY_TYPE}
378
+ * @since Sitevision 2023.09.1
379
+ */
380
+ getIMAGE_FILTER_REPOSITORY_TYPE(): string;
381
+
375
382
  /**
376
383
  * Get accessor for {@link senselogic.sitevision.api.node.NodeTypeUtil#IMAGE_REPOSITORY_TYPE}.
377
384
  * @return {@link senselogic.sitevision.api.node.NodeTypeUtil#IMAGE_REPOSITORY_TYPE}
@@ -1240,4 +1247,25 @@ export type NodeTypeUtilConstants = {
1240
1247
  * @since Sitevision 7
1241
1248
  */
1242
1249
  getOAUTH2_CONFIGURATION_TYPE(): string;
1250
+
1251
+ /**
1252
+ * Get accessor for {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TYPE}.
1253
+ * @return {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TYPE}
1254
+ * @since Sitevision 2023.09.2
1255
+ */
1256
+ getWORK_STATUS_TYPE(): string;
1257
+
1258
+ /**
1259
+ * Get accessor for {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TEMPLATE_TYPE}.
1260
+ * @return {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TEMPLATE_TYPE}
1261
+ * @since Sitevision 2023.09.2
1262
+ */
1263
+ getWORK_STATUS_TEMPLATE_TYPE(): string;
1264
+
1265
+ /**
1266
+ * Get accessor for {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TEMPLATE_REPOSITORY_TYPE}.
1267
+ * @return {@link senselogic.sitevision.api.node.NodeTypeUtil#WORK_STATUS_TEMPLATE_REPOSITORY_TYPE}
1268
+ * @since Sitevision 2023.09.2
1269
+ */
1270
+ getWORK_STATUS_TEMPLATE_REPOSITORY_TYPE(): string;
1243
1271
  };
@@ -61,6 +61,7 @@ var _default = {
61
61
  getGRADE_FIELD_TYPE: function getGRADE_FIELD_TYPE() {},
62
62
  getICON_REPOSITORY_TYPE: function getICON_REPOSITORY_TYPE() {},
63
63
  getIMAGE_FILTER_TYPE: function getIMAGE_FILTER_TYPE() {},
64
+ getIMAGE_FILTER_REPOSITORY_TYPE: function getIMAGE_FILTER_REPOSITORY_TYPE() {},
64
65
  getIMAGE_REPOSITORY_TYPE: function getIMAGE_REPOSITORY_TYPE() {},
65
66
  getLAYOUT_REPOSITORY_TYPE: function getLAYOUT_REPOSITORY_TYPE() {},
66
67
  getLIST_STYLE_TYPE: function getLIST_STYLE_TYPE() {},
@@ -184,6 +185,9 @@ var _default = {
184
185
  getEXTERNAL_TOPIC_TIMELINE_ENTRY_TYPE: function getEXTERNAL_TOPIC_TIMELINE_ENTRY_TYPE() {},
185
186
  getEXTERNAL_COMMENT_ENTRY_TYPE: function getEXTERNAL_COMMENT_ENTRY_TYPE() {},
186
187
  getOAUTH2_CONFIGURATION_REPOSITORY_TYPE: function getOAUTH2_CONFIGURATION_REPOSITORY_TYPE() {},
187
- getOAUTH2_CONFIGURATION_TYPE: function getOAUTH2_CONFIGURATION_TYPE() {}
188
+ getOAUTH2_CONFIGURATION_TYPE: function getOAUTH2_CONFIGURATION_TYPE() {},
189
+ getWORK_STATUS_TYPE: function getWORK_STATUS_TYPE() {},
190
+ getWORK_STATUS_TEMPLATE_TYPE: function getWORK_STATUS_TEMPLATE_TYPE() {},
191
+ getWORK_STATUS_TEMPLATE_REPOSITORY_TYPE: function getWORK_STATUS_TEMPLATE_REPOSITORY_TYPE() {}
188
192
  };
189
193
  exports["default"] = _default;
@@ -47,6 +47,11 @@ import type { SearchResult } from "../../SearchResult";
47
47
  * - how should querying be monitored? (e.g. should search query logging mode be on or off?)
48
48
  * </em>
49
49
  * </li>
50
+ * <li>
51
+ * {@link senselogic.sitevision.api.search.searcher.component.PermissionCheck}<em>
52
+ * - how should permission checks be performed? (Note! Only applicable when querying a sv:nodeIndex)
53
+ * </em>
54
+ * </li>
50
55
  * </ul>
51
56
  * <p>
52
57
  * All components are optional and are assembled using a {@link senselogic.sitevision.api.search.searcher.builder.SearcherBuilder}.
@@ -135,11 +140,10 @@ import type { SearchResult } from "../../SearchResult";
135
140
  * <strong>Query syntax note! </strong>Query strings should be expressed according to the <em>Solr query syntax</em>.
136
141
  * The syntax is basically the
137
142
  * <em><a href="http://lucene.apache.org/core/4_10_3/queryparser/org/apache/lucene/queryparser/classic/package-summary.html#package_description">
138
- * Lucene query syntax</a></em>
139
- * with <em><a href="http://wiki.apache.org/solr/SolrQuerySyntax#Differences_From_Lucene_Query_Parser">some minor differences</a></em>.
143
+ * Lucene query syntax</a></em> with some minor differences (solr syntax allows open-ended range queries and pure negative queries).
140
144
  * Also note that a general recommendation is to always use the <em>prefix operators</em> (<code>+</code>/<code>-</code>) instead of the
141
145
  * <em>boolean keywords</em> (AND/OR/NOT) to avoid unexpected behaviour. For deeper understanding, see for example
142
- * <a href="https://lucidworks.com/blog/2011/12/28/why-not-and-or-and-not/">Why Not AND, OR, And NOT?</a>.
146
+ * <a href="https://lucidworks.com/post/solr-boolean-operators/" target="_blank">Why Not AND, OR, And NOT?</a>.
143
147
  * </p>
144
148
  *
145
149
  * <p>
@@ -0,0 +1,27 @@
1
+ /**
2
+ * <p>
3
+ * A permission check component that defines permission checking behaviour for a {@link senselogic.sitevision.api.search.searcher.Searcher}.
4
+ * </p>
5
+ *
6
+ * <p>
7
+ * <strong>Note! This component is only applicable when querying a Node index (<code>sv:nodeIndex</code>)!</strong>
8
+ * </p>
9
+ *
10
+ * <p>
11
+ * The actual behaviour is specified when it is constructed using the
12
+ * {@link senselogic.sitevision.api.search.searcher.builder.PermissionCheckBuilder}.
13
+ * The component is applied to the <code>Searcher</code> via
14
+ * {@link senselogic.sitevision.api.search.searcher.builder.SearcherBuilder#setPermissionCheck(PermissionCheck)}
15
+ * when the <code>Searcher</code> is constructed.
16
+ * </p>
17
+ *
18
+ * <p>
19
+ * An instance of the Sitevision class implementing this interface can be obtained via
20
+ * {@link senselogic.sitevision.api.search.searcher.builder.PermissionCheckBuilder#build()}.
21
+ * See {@link senselogic.sitevision.api.search.searcher.builder.PermissionCheckBuilder} for how to obtain an instance of the
22
+ * <code>PermissionCheck</code> interface.
23
+ * </p>
24
+ * @author Magnus Lövgren
25
+ * @since Sitevision 2023.09.1
26
+ */
27
+ export type PermissionCheck = {};
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {};
8
+ exports["default"] = _default;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Permission strategy, determines how a {@link senselogic.sitevision.api.search.searcher.component.PermissionCheck}
3
+ * component will perform its checks.
4
+ *
5
+ * <p>
6
+ * Example of how to get the {@link #EARLY_CHECK} state:
7
+ * </p>
8
+ * <ul>
9
+ * <li>
10
+ * In a bundled <strong>WebApp/RESTApp</strong>:<pre><code>
11
+ * import EARLY_CHECK from '@sitevision/api/server/PermissionStrategy.EARLY_CHECK';</code></pre>
12
+ * </li>
13
+ * <li>
14
+ * Using server-side <strong>JavaScript</strong> in a Script module:<pre><code>
15
+ * const earlyCheckEnum = require('PermissionStrategy.EARLY_CHECK');</code></pre>
16
+ * </li>
17
+ * <li>
18
+ * Using <strong>Velocity</strong>:<pre><code>
19
+ * #set ($instanceCreatorUtil = $sitevisionUtils.instanceCreatorUtil)
20
+ * #set ($enumClassName = 'senselogic.sitevision.api.search.searcher.component.PermissionStrategy')
21
+ * #set ($earlyCheckEnum = $instanceCreatorUtil.getEnumInstance($enumClassName, 'EARLY_CHECK'))</code></pre>
22
+ * </li>
23
+ * </ul>
24
+ * @author Magnus Lövgren
25
+ * @since Sitevision 2023.09.1
26
+ * @see PermissionCheck
27
+ */
28
+ export type PermissionStrategy = {
29
+ EARLY_CHECK: "EARLY_CHECK";
30
+ LATE_CHECK: "LATE_CHECK";
31
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+ var _default = {
8
+ EARLY_CHECK: "EARLY_CHECK",
9
+ LATE_CHECK: "LATE_CHECK"
10
+ };
11
+ exports["default"] = _default;