diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-api/.lfrbuild-portal b/modules/apps/headless/headless-admin-site/headless-admin-site-api/.lfrbuild-portal new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-api/bnd.bnd b/modules/apps/headless/headless-admin-site/headless-admin-site-api/bnd.bnd new file mode 100644 index 00000000000000..6a7e5b5bc3ed0f --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-api/bnd.bnd @@ -0,0 +1,6 @@ +Bundle-Name: Liferay Headless Admin Site API +Bundle-SymbolicName: com.liferay.headless.admin.site.api +Bundle-Version: 1.0.0 +Export-Package:\ + com.liferay.headless.admin.site.dto.v1_0,\ + com.liferay.headless.admin.site.resource.v1_0 \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-api/build.gradle b/modules/apps/headless/headless-admin-site/headless-admin-site-api/build.gradle new file mode 100644 index 00000000000000..057228be30d503 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-api/build.gradle @@ -0,0 +1,15 @@ +dependencies { + compileOnly group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: "2.16.1" + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "default" + compileOnly group: "io.swagger.core.v3", name: "swagger-annotations", version: "2.0.5" + compileOnly group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" + compileOnly group: "javax.validation", name: "validation-api", version: "2.0.1.Final" + compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api", version: "2.1" + compileOnly group: "javax.xml.bind", name: "jaxb-api", version: "2.3.0" + compileOnly group: "org.apache.felix", name: "org.apache.felix.http.servlet-api", version: "1.1.2" + compileOnly group: "org.osgi", name: "org.osgi.annotation.versioning", version: "1.1.0" + compileOnly project(":apps:portal-odata:portal-odata-api") + compileOnly project(":apps:portal-vulcan:portal-vulcan-api") + compileOnly project(":core:petra:petra-function") + compileOnly project(":core:petra:petra-string") +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/.lfrbuild-portal b/modules/apps/headless/headless-admin-site/headless-admin-site-client/.lfrbuild-portal new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/bnd.bnd b/modules/apps/headless/headless-admin-site/headless-admin-site-client/bnd.bnd new file mode 100644 index 00000000000000..70f4e4c04e6647 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/bnd.bnd @@ -0,0 +1,3 @@ +Bundle-Name: Liferay Headless Admin Site Client +Bundle-SymbolicName: com.liferay.headless.admin.site.client +Bundle-Version: 1.0.0 \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/build.gradle b/modules/apps/headless/headless-admin-site/headless-admin-site-client/build.gradle new file mode 100644 index 00000000000000..b802e77531117e --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/build.gradle @@ -0,0 +1,3 @@ +dependencies { + compileOnly group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Aggregation.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Aggregation.java new file mode 100644 index 00000000000000..c29c4991c8b716 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Aggregation.java @@ -0,0 +1,30 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.aggregation; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Aggregation { + + public Map getAggregationTerms() { + return _aggregationTerms; + } + + public void setAggregationTerms(Map aggregationTerms) { + _aggregationTerms = aggregationTerms; + } + + private Map _aggregationTerms = new HashMap<>(); + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Facet.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Facet.java new file mode 100644 index 00000000000000..6cd322d49d9926 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/aggregation/Facet.java @@ -0,0 +1,70 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.aggregation; + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Facet { + + public Facet() { + } + + public Facet(String facetCriteria, List facetValues) { + _facetCriteria = facetCriteria; + _facetValues = facetValues; + } + + public String getFacetCriteria() { + return _facetCriteria; + } + + public List getFacetValues() { + return _facetValues; + } + + public void setFacetCriteria(String facetCriteria) { + _facetCriteria = facetCriteria; + } + + public void setFacetValues(List facetValues) { + _facetValues = facetValues; + } + + public static class FacetValue { + + public FacetValue() { + } + + public FacetValue(Integer numberOfOccurrences, String term) { + _numberOfOccurrences = numberOfOccurrences; + _term = term; + } + + public Integer getNumberOfOccurrences() { + return _numberOfOccurrences; + } + + public String getTerm() { + return _term; + } + + private Integer _numberOfOccurrences; + private String _term; + + } + + private String _facetCriteria; + private List _facetValues = new ArrayList<>(); + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/function/UnsafeSupplier.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/function/UnsafeSupplier.java new file mode 100644 index 00000000000000..08816addd66d38 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/function/UnsafeSupplier.java @@ -0,0 +1,20 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.function; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@FunctionalInterface +@Generated("") +public interface UnsafeSupplier { + + public T get() throws E; + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/http/HttpInvoker.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/http/HttpInvoker.java new file mode 100644 index 00000000000000..abaf5684727ba9 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/http/HttpInvoker.java @@ -0,0 +1,461 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.http; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.PrintWriter; + +import java.lang.reflect.Field; + +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLEncoder; + +import java.util.Base64; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Set; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class HttpInvoker { + + public static HttpInvoker newHttpInvoker() { + return new HttpInvoker(); + } + + public HttpInvoker body(String body, String contentType) { + _body = body; + _contentType = contentType; + + return this; + } + + public HttpInvoker header(String name, String value) { + _headers.put(name, value); + + return this; + } + + public HttpInvoker httpMethod(HttpMethod httpMethod) { + _httpMethod = httpMethod; + + return this; + } + + public HttpResponse invoke() throws IOException { + HttpResponse httpResponse = new HttpResponse(); + + HttpURLConnection httpURLConnection = _openHttpURLConnection(); + + byte[] binaryContent = _readResponse(httpURLConnection); + + httpResponse.setBinaryContent(binaryContent); + httpResponse.setContent(new String(binaryContent)); + + httpResponse.setContentType( + httpURLConnection.getHeaderField("Content-Type")); + httpResponse.setMessage(httpURLConnection.getResponseMessage()); + httpResponse.setStatusCode(httpURLConnection.getResponseCode()); + + httpURLConnection.disconnect(); + + return httpResponse; + } + + public HttpInvoker multipart() { + _contentType = + "multipart/form-data; charset=utf-8; boundary=__MULTIPART_BOUNDARY__"; + _multipartBoundary = "__MULTIPART_BOUNDARY__"; + + return this; + } + + public HttpInvoker parameter(String name, String value) { + return parameter(name, new String[] {value}); + } + + public HttpInvoker parameter(String name, String[] values) { + String[] oldValues = _parameters.get(name); + + if (oldValues != null) { + String[] newValues = new String[oldValues.length + values.length]; + + System.arraycopy(oldValues, 0, newValues, 0, oldValues.length); + System.arraycopy( + values, 0, newValues, oldValues.length, values.length); + + _parameters.put(name, newValues); + } + else { + _parameters.put(name, values); + } + + return this; + } + + public HttpInvoker part(String name, File file) { + _files.put(name, file); + + return this; + } + + public HttpInvoker part(String name, String value) { + _parts.put(name, value); + + return this; + } + + public HttpInvoker path(String path) { + _path = path; + + return this; + } + + public HttpInvoker path(String name, Object value) { + _path = _path.replaceFirst("\\{" + name + "\\}", String.valueOf(value)); + + return this; + } + + public HttpInvoker userNameAndPassword(String userNameAndPassword) + throws IOException { + + Base64.Encoder encoder = Base64.getEncoder(); + + _encodedUserNameAndPassword = new String( + encoder.encode(userNameAndPassword.getBytes("UTF-8")), "UTF-8"); + + return this; + } + + public enum HttpMethod { + + DELETE, GET, PATCH, POST, PUT + + } + + public class HttpResponse { + + public byte[] getBinaryContent() { + return _binaryContent; + } + + public String getContent() { + return _content; + } + + public String getContentType() { + return _contentType; + } + + public String getMessage() { + return _message; + } + + public int getStatusCode() { + return _statusCode; + } + + public void setBinaryContent(byte[] binaryContent) { + _binaryContent = binaryContent; + } + + public void setContent(String content) { + _content = content; + } + + public void setContentType(String contentType) { + _contentType = contentType; + } + + public void setMessage(String message) { + _message = message; + } + + public void setStatusCode(int statusCode) { + _statusCode = statusCode; + } + + private byte[] _binaryContent; + private String _content; + private String _contentType; + private String _message; + private int _statusCode; + + } + + private HttpInvoker() { + } + + private void _appendPart( + OutputStream outputStream, PrintWriter printWriter, String key, + Object value) + throws IOException { + + printWriter.append("\r\n--"); + printWriter.append(_multipartBoundary); + printWriter.append("\r\nContent-Disposition: form-data; name=\""); + printWriter.append(key); + printWriter.append("\";"); + + if (value instanceof File) { + File file = (File)value; + + printWriter.append(" filename=\""); + printWriter.append(_filter(file.getName())); + printWriter.append("\"\r\nContent-Type: "); + printWriter.append( + URLConnection.guessContentTypeFromName(file.getName())); + printWriter.append("\r\n\r\n"); + + printWriter.flush(); + + byte[] buffer = new byte[4096]; + FileInputStream fileInputStream = new FileInputStream(file); + int read = -1; + + while ((read = fileInputStream.read(buffer)) != -1) { + outputStream.write(buffer, 0, read); + } + + outputStream.flush(); + + fileInputStream.close(); + } + else { + printWriter.append("\r\n\r\n"); + printWriter.append(value.toString()); + } + + printWriter.append("\r\n"); + } + + private String _filter(String fileName) { + fileName = fileName.replaceAll("\"", ""); + fileName = fileName.replaceAll("\n", ""); + fileName = fileName.replaceAll("\r", ""); + + return fileName; + } + + private HttpURLConnection _getHttpURLConnection( + HttpMethod httpMethod, String urlString) + throws IOException { + + URL url = new URL(urlString); + + HttpURLConnection httpURLConnection = + (HttpURLConnection)url.openConnection(); + + try { + HttpURLConnection methodHttpURLConnection = httpURLConnection; + + if (Objects.equals(url.getProtocol(), "https")) { + Class clazz = httpURLConnection.getClass(); + + Field field = clazz.getDeclaredField("delegate"); + + field.setAccessible(true); + + methodHttpURLConnection = (HttpURLConnection)field.get( + httpURLConnection); + } + + _methodField.set(methodHttpURLConnection, httpMethod.name()); + } + catch (ReflectiveOperationException reflectiveOperationException) { + throw new IOException(reflectiveOperationException); + } + + return httpURLConnection; + } + + private String _getQueryString() throws IOException { + StringBuilder sb = new StringBuilder(); + + Set> set = _parameters.entrySet(); + + Iterator> iterator = set.iterator(); + + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + + String[] values = entry.getValue(); + + for (int i = 0; i < values.length; i++) { + String name = URLEncoder.encode(entry.getKey(), "UTF-8"); + + sb.append(name); + + sb.append("="); + + String value = URLEncoder.encode(values[i], "UTF-8"); + + sb.append(value); + + if ((i + 1) < values.length) { + sb.append("&"); + } + } + + if (iterator.hasNext()) { + sb.append("&"); + } + } + + return sb.toString(); + } + + private HttpURLConnection _openHttpURLConnection() throws IOException { + String urlString = _path; + + String queryString = _getQueryString(); + + if (queryString.length() > 0) { + if (!urlString.contains("?")) { + urlString += "?"; + } + + urlString += queryString; + } + + HttpURLConnection httpURLConnection = _getHttpURLConnection( + _httpMethod, urlString); + + if (_encodedUserNameAndPassword != null) { + httpURLConnection.setRequestProperty( + "Authorization", "Basic " + _encodedUserNameAndPassword); + } + + if (_contentType != null) { + httpURLConnection.setRequestProperty("Content-Type", _contentType); + } + + for (Map.Entry header : _headers.entrySet()) { + httpURLConnection.setRequestProperty( + header.getKey(), header.getValue()); + } + + _writeBody(httpURLConnection); + + return httpURLConnection; + } + + private byte[] _readResponse(HttpURLConnection httpURLConnection) + throws IOException { + + ByteArrayOutputStream byteArrayOutputStream = + new ByteArrayOutputStream(); + + InputStream inputStream = null; + + int responseCode = httpURLConnection.getResponseCode(); + + if (responseCode > 299) { + inputStream = httpURLConnection.getErrorStream(); + } + else { + inputStream = httpURLConnection.getInputStream(); + } + + byte[] bytes = new byte[8192]; + + while (true) { + int read = inputStream.read(bytes, 0, bytes.length); + + if (read == -1) { + break; + } + + byteArrayOutputStream.write(bytes, 0, read); + } + + byteArrayOutputStream.flush(); + + return byteArrayOutputStream.toByteArray(); + } + + private void _writeBody(HttpURLConnection httpURLConnection) + throws IOException { + + if ((_body == null) && _files.isEmpty() && _parts.isEmpty()) { + return; + } + + httpURLConnection.setDoOutput(true); + + OutputStream outputStream = httpURLConnection.getOutputStream(); + + try (PrintWriter printWriter = new PrintWriter( + new OutputStreamWriter(outputStream, "UTF-8"), true)) { + + if (_contentType.startsWith("multipart/form-data")) { + for (Map.Entry entry : _parts.entrySet()) { + _appendPart( + outputStream, printWriter, entry.getKey(), + entry.getValue()); + } + + for (Map.Entry entry : _files.entrySet()) { + _appendPart( + outputStream, printWriter, entry.getKey(), + entry.getValue()); + } + + printWriter.append("--" + _multipartBoundary + "--"); + + printWriter.flush(); + + outputStream.flush(); + } + else { + printWriter.append(_body); + + printWriter.flush(); + } + } + } + + private static final Field _methodField; + + static { + try { + _methodField = HttpURLConnection.class.getDeclaredField("method"); + + _methodField.setAccessible(true); + } + catch (Exception exception) { + throw new ExceptionInInitializerError(exception); + } + } + + private String _body; + private String _contentType; + private String _encodedUserNameAndPassword; + private final Map _files = new LinkedHashMap<>(); + private final Map _headers = new LinkedHashMap<>(); + private HttpMethod _httpMethod = HttpMethod.GET; + private String _multipartBoundary; + private final Map _parameters = new LinkedHashMap<>(); + private final Map _parts = new LinkedHashMap<>(); + private String _path; + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/json/BaseJSONParser.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/json/BaseJSONParser.java new file mode 100644 index 00000000000000..5b653c7f7e49ff --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/json/BaseJSONParser.java @@ -0,0 +1,646 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.json; + +import java.math.BigDecimal; + +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Stack; +import java.util.TreeMap; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public abstract class BaseJSONParser { + + public static final String[][] JSON_ESCAPE_STRINGS = new String[][] { + {"\\", "\\\\"}, {"\"", "\\\""}, {"\b", "\\b"}, {"\f", "\\f"}, + {"\n", "\\n"}, {"\r", "\\r"}, {"\t", "\\t"} + }; + + public T parseToDTO(String json) { + if (json == null) { + throw new IllegalArgumentException("JSON is null"); + } + + _init(json); + + _assertStartsWithAndEndsWith("{", "}"); + + T dto = createDTO(); + + if (_isEmpty()) { + return dto; + } + + _readNextChar(); + + _readWhileLastCharIsWhiteSpace(); + + _readNextChar(); + + if (_isLastChar('}')) { + _readWhileLastCharIsWhiteSpace(); + + if (!_isEndOfJSON()) { + _readNextChar(); + + throw new IllegalArgumentException( + "Expected end of JSON, but found '" + _lastChar + "'"); + } + + return dto; + } + + do { + _readWhileLastCharIsWhiteSpace(); + + String fieldName = _readValueAsString(); + + _readWhileLastCharIsWhiteSpace(); + + _assertLastChar(':'); + + _readNextChar(); + + _readWhileLastCharIsWhiteSpace(); + + setField(dto, fieldName, _readValue()); + + _readWhileLastCharIsWhiteSpace(); + } + while (_ifLastCharMatchesThenRead(',')); + + return dto; + } + + public T[] parseToDTOs(String json) { + if (json == null) { + throw new IllegalArgumentException("JSON is null"); + } + + _init(json); + + _assertStartsWithAndEndsWith("[", "]"); + + if (_isEmpty()) { + return createDTOArray(0); + } + + _readNextChar(); + + _readWhileLastCharIsWhiteSpace(); + + if (_isLastChar(']')) { + _readNextChar(); + + return createDTOArray(0); + } + + _readWhileLastCharIsWhiteSpace(); + + Object[] objects = (Object[])_readValue(); + + T[] dtos = createDTOArray(objects.length); + + for (int i = 0; i < dtos.length; i++) { + dtos[i] = parseToDTO((String)objects[i]); + } + + return dtos; + } + + public Map parseToMap(String json) { + if (json == null) { + throw new IllegalArgumentException("JSON is null"); + } + + _init(json); + + _assertStartsWithAndEndsWith("{", "}"); + + Map map = new TreeMap<>(); + + _setCaptureStart(); + + _readNextChar(); + + _readNextChar(); + + _readWhileLastCharIsWhiteSpace(); + + if (_isLastChar('}')) { + return map; + } + + do { + _readWhileLastCharIsWhiteSpace(); + + String key = _readValueAsString(); + + _readWhileLastCharIsWhiteSpace(); + + if (!_ifLastCharMatchesThenRead(':')) { + throw new IllegalArgumentException("Expected ':'"); + } + + _readWhileLastCharIsWhiteSpace(); + + map.put(key, _readValue(true)); + + _readWhileLastCharIsWhiteSpace(); + } + while (_ifLastCharMatchesThenRead(',')); + + _readWhileLastCharIsWhiteSpace(); + + if (!_ifLastCharMatchesThenRead('}')) { + throw new IllegalArgumentException( + "Expected either ',' or '}', but found '" + _lastChar + "'"); + } + + return map; + } + + protected abstract T createDTO(); + + protected abstract T[] createDTOArray(int size); + + protected abstract void setField( + T dto, String jsonParserFieldName, Object jsonParserFieldValue); + + protected BigDecimal[] toBigDecimals(Object[] objects) { + BigDecimal[] bigdecimals = new BigDecimal[objects.length]; + + for (int i = 0; i < bigdecimals.length; i++) { + bigdecimals[i] = new BigDecimal(objects[i].toString()); + } + + return bigdecimals; + } + + protected Date toDate(String string) { + try { + return _dateFormat.parse(string); + } + catch (ParseException pe) { + throw new IllegalArgumentException( + "Unable to parse date from " + string, pe); + } + } + + protected Date[] toDates(Object[] objects) { + Date[] dates = new Date[objects.length]; + + for (int i = 0; i < dates.length; i++) { + dates[i] = toDate((String)objects[i]); + } + + return dates; + } + + protected Integer[] toIntegers(Object[] objects) { + Integer[] integers = new Integer[objects.length]; + + for (int i = 0; i < integers.length; i++) { + integers[i] = Integer.valueOf(objects[i].toString()); + } + + return integers; + } + + protected Long[] toLongs(Object[] objects) { + Long[] longs = new Long[objects.length]; + + for (int i = 0; i < longs.length; i++) { + longs[i] = Long.valueOf(objects[i].toString()); + } + + return longs; + } + + protected String toString(Date date) { + return _dateFormat.format(date); + } + + protected String[] toStrings(Object[] objects) { + String[] strings = new String[objects.length]; + + for (int i = 0; i < strings.length; i++) { + strings[i] = (String)objects[i]; + } + + return strings; + } + + private void _assertLastChar(char c) { + if (_lastChar != c) { + throw new IllegalArgumentException( + String.format( + "Expected last char '%s', but found '%s'", c, _lastChar)); + } + } + + private void _assertStartsWithAndEndsWith(String prefix, String sufix) { + if (!_json.startsWith(prefix)) { + throw new IllegalArgumentException( + String.format( + "Expected starts with '%s', but found '%s' in '%s'", prefix, + _json.charAt(0), _json)); + } + + if (!_json.endsWith(sufix)) { + throw new IllegalArgumentException( + String.format( + "Expected ends with '%s', but found '%s' in '%s'", sufix, + _json.charAt(_json.length() - 1), _json)); + } + } + + private String _getCapturedJSONSubstring() { + return _json.substring(_captureStartStack.pop(), _index - 1); + } + + private String _getCapturedSubstring() { + return _unescape(_getCapturedJSONSubstring()); + } + + private boolean _ifLastCharMatchesThenRead(char ch) { + if (_lastChar != ch) { + return false; + } + + _readNextChar(); + + return true; + } + + private void _init(String json) { + _captureStartStack = new Stack<>(); + _dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXX"); + _index = 0; + _json = json.trim(); + _lastChar = 0; + } + + private boolean _isCharEscaped(String string, int index) { + int backslashCount = 0; + + while (((index - 1 - backslashCount) >= 0) && + (string.charAt(index - 1 - backslashCount) == '\\')) { + + backslashCount++; + } + + if ((backslashCount % 2) == 0) { + return false; + } + + return true; + } + + private boolean _isEmpty() { + String substring = _json.substring(1, _json.length() - 1); + + substring = substring.trim(); + + return substring.isEmpty(); + } + + private boolean _isEndOfJSON() { + if (_index == _json.length()) { + return true; + } + + return false; + } + + private boolean _isLastChar(char c) { + if (_lastChar == c) { + return true; + } + + return false; + } + + private boolean _isLastCharDecimalSeparator() { + if (_lastChar == '.') { + return true; + } + + return false; + } + + private boolean _isLastCharDigit() { + if ((_lastChar >= '0') && (_lastChar <= '9')) { + return true; + } + + return false; + } + + private boolean _isLastCharNegative() { + if (_lastChar == '-') { + return true; + } + + return false; + } + + private boolean _isLastCharPositive() { + if (_lastChar == '+') { + return true; + } + + return false; + } + + private boolean _isLastCharScientificNotation() { + if (_lastChar == 'E') { + return true; + } + + return false; + } + + private void _readNextChar() { + if (!_isEndOfJSON()) { + _lastChar = _json.charAt(_index++); + } + } + + private Object _readValue() { + return _readValue(false); + } + + private Object _readValue(boolean parseMaps) { + if (_lastChar == '[') { + return _readValueAsArray(); + } + else if (_lastChar == 'f') { + return _readValueAsBooleanFalse(); + } + else if (_lastChar == 't') { + return _readValueAsBooleanTrue(); + } + else if (_lastChar == 'n') { + return _readValueAsObjectNull(); + } + else if (_lastChar == '"') { + return _readValueAsString(); + } + else if (parseMaps && (_lastChar == '{')) { + try { + Class clazz = getClass(); + + BaseJSONParser baseJSONParser = clazz.newInstance(); + + return baseJSONParser.parseToMap(_readValueAsStringJSON()); + } + catch (Exception e) { + throw new IllegalArgumentException( + "Expected JSON object or map"); + } + } + else if (_lastChar == '{') { + return _readValueAsStringJSON(); + } + else if ((_lastChar == '-') || (_lastChar == '0') || + (_lastChar == '1') || (_lastChar == '2') || + (_lastChar == '3') || (_lastChar == '4') || + (_lastChar == '5') || (_lastChar == '6') || + (_lastChar == '7') || (_lastChar == '8') || + (_lastChar == '9')) { + + return _readValueAsStringNumber(); + } + else { + throw new IllegalArgumentException(); + } + } + + private Object[] _readValueAsArray() { + List objects = new ArrayList<>(); + + _readNextChar(); + + _readWhileLastCharIsWhiteSpace(); + + if (_isLastChar(']')) { + _readNextChar(); + + return objects.toArray(); + } + + do { + _readWhileLastCharIsWhiteSpace(); + + objects.add(_readValue()); + + _readWhileLastCharIsWhiteSpace(); + } + while (_ifLastCharMatchesThenRead(',')); + + if (!_isLastChar(']')) { + throw new IllegalArgumentException( + "Expected ']', but found '" + _lastChar + "'"); + } + + _readNextChar(); + + return objects.toArray(); + } + + private boolean _readValueAsBooleanFalse() { + _readNextChar(); + + _assertLastChar('a'); + + _readNextChar(); + + _assertLastChar('l'); + + _readNextChar(); + + _assertLastChar('s'); + + _readNextChar(); + + _assertLastChar('e'); + + _readNextChar(); + + return false; + } + + private boolean _readValueAsBooleanTrue() { + _readNextChar(); + + _assertLastChar('r'); + + _readNextChar(); + + _assertLastChar('u'); + + _readNextChar(); + + _assertLastChar('e'); + + _readNextChar(); + + return true; + } + + private Object _readValueAsObjectNull() { + _readNextChar(); + + _assertLastChar('u'); + + _readNextChar(); + + _assertLastChar('l'); + + _readNextChar(); + + _assertLastChar('l'); + + _readNextChar(); + + return null; + } + + private String _readValueAsString() { + _readNextChar(); + + _setCaptureStart(); + + while ((_lastChar != '"') || _isCharEscaped(_json, _index - 1)) { + _readNextChar(); + } + + String string = _getCapturedSubstring(); + + _readNextChar(); + + return string; + } + + private String _readValueAsStringJSON() { + _setCaptureStart(); + + _readNextChar(); + + if (_isLastChar('}')) { + _readNextChar(); + + return _getCapturedJSONSubstring(); + } + + _readWhileLastCharIsWhiteSpace(); + + if (_isLastChar('}')) { + _readNextChar(); + + return _getCapturedJSONSubstring(); + } + + do { + _readWhileLastCharIsWhiteSpace(); + + _readValueAsString(); + + _readWhileLastCharIsWhiteSpace(); + + if (!_ifLastCharMatchesThenRead(':')) { + throw new IllegalArgumentException("Expected ':'"); + } + + _readWhileLastCharIsWhiteSpace(); + + _readValue(); + + _readWhileLastCharIsWhiteSpace(); + } + while (_ifLastCharMatchesThenRead(',')); + + _readWhileLastCharIsWhiteSpace(); + + if (!_ifLastCharMatchesThenRead('}')) { + throw new IllegalArgumentException( + "Expected either ',' or '}', but found '" + _lastChar + "'"); + } + + return _getCapturedJSONSubstring(); + } + + private String _readValueAsStringNumber() { + _setCaptureStart(); + + do { + _readNextChar(); + } + while (_isLastCharDigit() || _isLastCharDecimalSeparator() || + _isLastCharNegative() || _isLastCharPositive() || + _isLastCharScientificNotation()); + + return _getCapturedSubstring(); + } + + private void _readWhileLastCharIsWhiteSpace() { + while ((_lastChar == ' ') || (_lastChar == '\n') || + (_lastChar == '\r') || (_lastChar == '\t')) { + + _readNextChar(); + } + } + + private void _setCaptureStart() { + _captureStartStack.push(_index - 1); + } + + private String _unescape(String string) { + for (int i = JSON_ESCAPE_STRINGS.length - 1; i >= 0; i--) { + String[] escapeStrings = JSON_ESCAPE_STRINGS[i]; + + int index = string.indexOf(escapeStrings[1]); + + while (index != -1) { + if (!_isCharEscaped(string, index)) { + string = + string.substring(0, index) + escapeStrings[0] + + string.substring(index + escapeStrings[1].length()); + + index = string.indexOf( + escapeStrings[1], index + escapeStrings[0].length()); + } + else { + index = string.indexOf( + escapeStrings[1], index + escapeStrings[1].length()); + } + } + } + + return string; + } + + private Stack _captureStartStack; + private DateFormat _dateFormat; + private int _index; + private String _json; + private char _lastChar; + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Page.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Page.java new file mode 100644 index 00000000000000..c40bbaf64a70ca --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Page.java @@ -0,0 +1,301 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.pagination; + +import com.liferay.headless.admin.site.client.aggregation.Facet; +import com.liferay.headless.admin.site.client.json.BaseJSONParser; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.function.Function; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Page { + + public static Page of( + String json, Function toDTOFunction) { + + PageJSONParser pageJSONParser = new PageJSONParser(toDTOFunction); + + return (Page)pageJSONParser.parseToDTO(json); + } + + public T fetchFirstItem() { + Iterator iterator = _items.iterator(); + + if (iterator.hasNext()) { + return iterator.next(); + } + + return null; + } + + public Map> getActions() { + return _actions; + } + + public List getFacets() { + return _facets; + } + + public Collection getItems() { + return _items; + } + + public long getLastPage() { + if (_totalCount == 0) { + return 1; + } + + return -Math.floorDiv(-_totalCount, _pageSize); + } + + public long getPage() { + return _page; + } + + public long getPageSize() { + return _pageSize; + } + + public long getTotalCount() { + return _totalCount; + } + + public boolean hasNext() { + if (getLastPage() > _page) { + return true; + } + + return false; + } + + public boolean hasPrevious() { + if (_page > 1) { + return true; + } + + return false; + } + + public void setActions(Map> actions) { + _actions = actions; + } + + public void setFacets(List facets) { + _facets = facets; + } + + public void setItems(Collection items) { + _items = items; + } + + public void setPage(long page) { + _page = page; + } + + public void setPageSize(long pageSize) { + _pageSize = pageSize; + } + + public void setTotalCount(long totalCount) { + _totalCount = totalCount; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("{\"actions\": "); + + sb.append(_toString((Map)_actions)); + sb.append(", \"items\": ["); + + Iterator iterator = _items.iterator(); + + while (iterator.hasNext()) { + sb.append(iterator.next()); + + if (iterator.hasNext()) { + sb.append(", "); + } + } + + sb.append("], \"page\": "); + sb.append(_page); + sb.append(", \"pageSize\": "); + sb.append(_pageSize); + sb.append(", \"totalCount\": "); + sb.append(_totalCount); + sb.append("}"); + + return sb.toString(); + } + + public static class PageJSONParser extends BaseJSONParser { + + public PageJSONParser() { + _toDTOFunction = null; + } + + public PageJSONParser(Function toDTOFunction) { + _toDTOFunction = toDTOFunction; + } + + @Override + protected Page createDTO() { + return new Page(); + } + + @Override + protected Page[] createDTOArray(int size) { + return new Page[size]; + } + + @Override + protected void setField( + Page page, String jsonParserFieldName, + Object jsonParserFieldValue) { + + if (Objects.equals(jsonParserFieldName, "actions")) { + if (jsonParserFieldValue != null) { + PageJSONParser pageJSONParser = new PageJSONParser( + _toDTOFunction); + + page.setActions( + pageJSONParser.parseToMap( + (String)jsonParserFieldValue)); + } + } + else if (Objects.equals(jsonParserFieldName, "facets")) { + if (jsonParserFieldValue == null) { + return; + } + + List facets = new ArrayList<>(); + + for (Object object1 : (Object[])jsonParserFieldValue) { + List facetValues = new ArrayList<>(); + + Map jsonParserFieldValuesMap = + this.parseToMap((String)object1); + + for (Object object2 : + (Object[])jsonParserFieldValuesMap.get( + "facetValues")) { + + Map facetValueMap = this.parseToMap( + (String)object2); + + facetValues.add( + new Facet.FacetValue( + Integer.valueOf( + (String)facetValueMap.get( + "numberOfOccurrences")), + (String)facetValueMap.get("term"))); + } + + facets.add( + new Facet( + (String)jsonParserFieldValuesMap.get( + "facetCriteria"), + facetValues)); + } + + page.setFacets(facets); + } + else if (Objects.equals(jsonParserFieldName, "items")) { + if (jsonParserFieldValue != null) { + List items = new ArrayList<>(); + + for (Object object : (Object[])jsonParserFieldValue) { + items.add(_toDTOFunction.apply((String)object)); + } + + page.setItems(items); + } + } + else if (Objects.equals(jsonParserFieldName, "lastPage")) { + } + else if (Objects.equals(jsonParserFieldName, "page")) { + if (jsonParserFieldValue != null) { + page.setPage(Long.valueOf((String)jsonParserFieldValue)); + } + } + else if (Objects.equals(jsonParserFieldName, "pageSize")) { + if (jsonParserFieldValue != null) { + page.setPageSize( + Long.valueOf((String)jsonParserFieldValue)); + } + } + else if (Objects.equals(jsonParserFieldName, "totalCount")) { + if (jsonParserFieldValue != null) { + page.setTotalCount( + Long.valueOf((String)jsonParserFieldValue)); + } + } + else { + throw new IllegalArgumentException( + "Unsupported field name " + jsonParserFieldName); + } + } + + private final Function _toDTOFunction; + + } + + private String _toString(Map map) { + StringBuilder sb = new StringBuilder("{"); + + Set> entries = map.entrySet(); + + Iterator> iterator = entries.iterator(); + + while (iterator.hasNext()) { + Map.Entry entry = iterator.next(); + + sb.append("\""); + sb.append(entry.getKey()); + sb.append("\": "); + + Object value = entry.getValue(); + + if (value instanceof Map) { + sb.append(_toString((Map)value)); + } + else { + sb.append("\""); + sb.append(value); + sb.append("\""); + } + + if (iterator.hasNext()) { + sb.append(", "); + } + } + + sb.append("}"); + + return sb.toString(); + } + + private Map> _actions; + private List _facets = new ArrayList<>(); + private Collection _items; + private long _page; + private long _pageSize; + private long _totalCount; + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Pagination.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Pagination.java new file mode 100644 index 00000000000000..31534fb1a8f308 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/pagination/Pagination.java @@ -0,0 +1,65 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.pagination; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Pagination { + + public static Pagination of(int page, int pageSize) { + return new Pagination(page, pageSize); + } + + public int getEndPosition() { + if ((_page < 0) || (_pageSize < 0)) { + return -1; + } + + return _page * _pageSize; + } + + public int getPage() { + return _page; + } + + public int getPageSize() { + return _pageSize; + } + + public int getStartPosition() { + if ((_page < 0) || (_pageSize < 0)) { + return -1; + } + + return (_page - 1) * _pageSize; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder("{\"page\": "); + + sb.append(_page); + sb.append(", \"pageSize\": "); + sb.append(_pageSize); + sb.append("}"); + + return sb.toString(); + } + + private Pagination(int page, int pageSize) { + _page = page; + _pageSize = pageSize; + } + + private final int _page; + private final int _pageSize; + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/permission/Permission.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/permission/Permission.java new file mode 100644 index 00000000000000..99751ae23c4710 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/permission/Permission.java @@ -0,0 +1,120 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.permission; + +import com.liferay.headless.admin.site.client.json.BaseJSONParser; + +import java.util.Objects; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Permission { + + public static Permission toDTO(String json) { + PermissionJSONParser permissionJSONParser = + new PermissionJSONParser(); + + return permissionJSONParser.parseToDTO(json); + } + + public Object[] getActionIds() { + return actionIds; + } + + public String getRoleName() { + return roleName; + } + + public void setActionIds(Object[] actionIds) { + this.actionIds = actionIds; + } + + public void setRoleName(String roleName) { + this.roleName = roleName; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + + sb.append("{"); + + if (actionIds != null) { + sb.append("\"actionIds\": ["); + + for (int i = 0; i < actionIds.length; i++) { + sb.append("\""); + sb.append(actionIds[i]); + sb.append("\""); + + if ((i + 1) < actionIds.length) { + sb.append(", "); + } + } + + sb.append("]"); + } + + if (roleName != null) { + if (sb.length() > 1) { + sb.append(", "); + } + + sb.append("\"roleName\": \""); + sb.append(roleName); + sb.append("\""); + } + + sb.append("}"); + + return sb.toString(); + } + + protected Object[] actionIds; + protected String roleName; + + private static class PermissionJSONParser + extends BaseJSONParser { + + @Override + protected Permission createDTO() { + return new Permission(); + } + + @Override + protected Permission[] createDTOArray(int size) { + return new Permission[size]; + } + + @Override + protected void setField( + Permission permission, String jsonParserFieldName, + Object jsonParserFieldValue) { + + if (Objects.equals(jsonParserFieldName, "actionIds")) { + if (jsonParserFieldValue != null) { + permission.setActionIds((Object[])jsonParserFieldValue); + } + } + else if (Objects.equals(jsonParserFieldName, "roleName")) { + if (jsonParserFieldValue != null) { + permission.setRoleName((String)jsonParserFieldValue); + } + } + else { + throw new IllegalArgumentException( + "Unsupported field name " + jsonParserFieldName); + } + } + + } + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/problem/Problem.java b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/problem/Problem.java new file mode 100644 index 00000000000000..e3bda07cd77c6e --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-client/src/main/java/com/liferay/headless/admin/site/client/problem/Problem.java @@ -0,0 +1,176 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.client.problem; + +import com.liferay.headless.admin.site.client.json.BaseJSONParser; + +import java.util.Objects; + +import javax.annotation.Generated; + +/** + * @author Rubén Pulido + * @generated + */ +@Generated("") +public class Problem { + + public static Problem toDTO(String json) { + ProblemJSONParser problemJSONParser = new ProblemJSONParser(); + + return problemJSONParser.parseToDTO(json); + } + + public static class ProblemException extends Exception { + + private Problem _problem; + + public Problem getProblem() { + return _problem; + } + + public ProblemException(Problem problem) { + super(problem.getTitle()); + + _problem = problem; + } + + } + + public String getDetail() { + return detail; + } + + public String getStatus() { + return status; + } + + public String getTitle() { + return title; + } + + public String getType() { + return type; + } + + public void setDetail(String detail) { + this.detail = detail; + } + + public void setStatus(String status) { + this.status = status; + } + + public void setTitle(String title) { + this.title = title; + } + + public void setType(String type) { + this.type = type; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + + sb.append("{"); + + if (detail != null) { + if (sb.length() > 1) { + sb.append(", "); + } + + sb.append("\"detail\": \""); + sb.append(detail); + sb.append("\""); + } + + if (status != null) { + if (sb.length() > 1) { + sb.append(", "); + } + + sb.append("\"status\": \""); + sb.append(status); + sb.append("\""); + } + + if (title != null) { + if (sb.length() > 1) { + sb.append(", "); + } + + sb.append("\"title\": \""); + sb.append(title); + sb.append("\""); + } + + if (type != null) { + if (sb.length() > 1) { + sb.append(", "); + } + + sb.append("\"type\": \""); + sb.append(type); + sb.append("\""); + } + + sb.append("}"); + + return sb.toString(); + } + + protected String detail; + protected String status; + protected String title; + protected String type; + + private static class ProblemJSONParser extends BaseJSONParser { + + @Override + protected Problem createDTO() { + return new Problem(); + } + + @Override + protected Problem[] createDTOArray(int size) { + return new Problem[size]; + } + + @Override + protected void setField( + Problem problem, String jsonParserFieldName, + Object jsonParserFieldValue) { + + if (Objects.equals(jsonParserFieldName, "detail")) { + if (jsonParserFieldValue != null) { + problem.setDetail((String)jsonParserFieldValue); + } + } + else if (Objects.equals(jsonParserFieldName, "status")) { + if (jsonParserFieldValue != null) { + problem.setStatus((String)jsonParserFieldValue); + } + } + else if (Objects.equals(jsonParserFieldName, "title")) { + if (jsonParserFieldValue != null) { + problem.setTitle((String)jsonParserFieldValue); + } + } + else if (Objects.equals(jsonParserFieldName, "type")) { + if (jsonParserFieldValue != null) { + problem.setType((String)jsonParserFieldValue); + } + } + else { + throw new IllegalArgumentException( + "Unsupported field name " + jsonParserFieldName); + } + } + + } + +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/.lfrbuild-portal b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/.lfrbuild-portal new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/bnd.bnd b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/bnd.bnd new file mode 100644 index 00000000000000..c13ab3055503c7 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/bnd.bnd @@ -0,0 +1,3 @@ +Bundle-Name: Liferay Headless Admin Site Implementation +Bundle-SymbolicName: com.liferay.headless.admin.site.impl +Bundle-Version: 1.0.0 \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/build.gradle b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/build.gradle new file mode 100644 index 00000000000000..8cec50070146a2 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/build.gradle @@ -0,0 +1,20 @@ +dependencies { + compileOnly group: "com.fasterxml.jackson.core", name: "jackson-annotations", version: "2.16.1" + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default" + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "default" + compileOnly group: "io.swagger.core.v3", name: "swagger-annotations", version: "2.0.5" + compileOnly group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" + compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.1" + compileOnly group: "javax.validation", name: "validation-api", version: "2.0.1.Final" + compileOnly group: "javax.ws.rs", name: "javax.ws.rs-api", version: "2.1" + compileOnly group: "org.apache.felix", name: "org.apache.felix.http.servlet-api", version: "1.1.2" + compileOnly group: "org.osgi", name: "org.osgi.service.component", version: "1.4.0" + compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.4.0" + compileOnly group: "org.osgi", name: "osgi.core", version: "6.0.0" + compileOnly project(":apps:headless:headless-admin-site:headless-admin-site-api") + compileOnly project(":apps:portal-odata:portal-odata-api") + compileOnly project(":apps:portal-vulcan:portal-vulcan-api") + compileOnly project(":apps:site:site-api") + compileOnly project(":core:petra:petra-function") + compileOnly project(":core:petra:petra-string") +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-config.yaml b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-config.yaml new file mode 100644 index 00000000000000..122ccaf682be3a --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-config.yaml @@ -0,0 +1,13 @@ +apiDir: "../headless-admin-site-api/src/main/java" +apiPackagePath: "com.liferay.headless.admin.site" +application: + baseURI: "/headless-admin-site" + className: "HeadlessAdminSiteApplication" + name: "Liferay.Headless.Admin.Site" +author: "Rubén Pulido" +clientDir: "../headless-admin-site-client/src/main/java" +compatibilityVersion: 6 +forcePredictableOperationId: true +generateBatch: false +generateGraphQL: false +testDir: "../headless-admin-site-test/src/testIntegration/java" \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-openapi.yaml b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-openapi.yaml new file mode 100644 index 00000000000000..d7e711c05357be --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/rest-openapi.yaml @@ -0,0 +1,8257 @@ +components: + schemas: + ActionExecutionResult: + # @review + description: + The result of an action execution. + properties: + type: + # @review + description: + The type of result. + enum: [DisplayPage, None, Notification, Page, URL] + type: + string + value: + oneOf: + - $ref: "#/components/schemas/DisplayPageActionExecutionResult" + - $ref: "#/components/schemas/NoneActionExecutionResult" + - $ref: "#/components/schemas/NotificationActionExecutionResult" + - $ref: "#/components/schemas/SitePageActionExecutionResult" + - $ref: "#/components/schemas/URLActionExecutionResult" + type: object + BasePageSettings: + # @review + description: + The base settings of a page, shared by both a content page and a widget page. + properties: + customMetaTags: + # @review + description: + A list of custom meta tags this page has. + items: + $ref: "#/components/schemas/CustomMetaTag" + type: array + hiddenFromNavigation: + # @review + description: + A flag that indicates whether the page is hidden from navigation. + type: boolean + navigationMenuSettings: + $ref: "#/components/schemas/NavigationMenuSettings" + # @review + description: + The page's site navigation menu settings. + openGraphSettings: + $ref: "#/components/schemas/OpenGraphSettings" + # @review + description: + The page's Open Graph settings. + seoSettings: + $ref: "#/components/schemas/SEOSettings" + # @review + description: + The page's SEO settings. + type: object + BasePageSpecification: + # @review + description: + A base page specification, containing the common properties of both a content page page specification + and a widget page page specification. It should only be referenced as part of an allOf clause. + properties: + externalReferenceCode: + description: + The page specification's external reference code, unique per site. + type: string + settings: + $ref: "#/components/schemas/Settings" + type: + # @review + description: + The type of the page specification. + enum: + - ContentPageSpecification + - WidgetPageSpecification + type: string + type: object + BasePageTemplate: + # @review + description: + A base page template, containing the common properties of both a content page template and a widget page + template. It should only be referenced as part of an allOf clause. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The page template's creator. It is not returned by default. It can be embedded via nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The page's creator external reference code. + type: string + dateCreated: + # @review + description: + The page template's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time the page template changed. + format: date-time + type: string + datePublished: + # @review + description: + The last time the page template was published. + format: date-time + type: string + externalReferenceCode: + # @review + description: + The page template's external reference code. + type: string + key: + # @review + description: + The page template's key. + type: string + keywordItemExternalReferences: + description: + The external references to the associated keywords. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + keywords: + description: + The associated keywords. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#Keyword" + readOnly: true + type: array + name: + # @review + description: + The page template's name. + type: string + pageSpecifications: + # @review + description: + The page template's specifications. A page template of type content may contain 0 or 1 page + specifications in draft status and 0 or 1 page specifications in published status. A page + template of type widget contains only 1 page specification in published status. + items: + $ref: "#/components/schemas/PageSpecification" + type: array + pageTemplateSet: + $ref: "#/components/schemas/PageTemplateSet" + # @review + description: + The page template's set. + pageTemplateSettings: + # @review + description: + The settings of the page template. + discriminator: + propertyName: type + mapping: + ContentPageTemplate: "#/components/schemas/ContentPageTemplateSettings" + WidgetPageTemplate: "#/components/schemas/WidgetPageTemplateSettings" + oneOf: + - $ref: "#/components/schemas/ContentPageTemplateSettings" + - $ref: "#/components/schemas/WidgetPageTemplateSettings" + taxonomyCategories: + # @review + description: + The associated categories. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#TaxonomyCategory" + readOnly: true + type: array + taxonomyCategoryItemExternalReferences: + # @review + description: + The external references to the associated categories. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + type: + # @review + description: + The type of the page template. + enum: + - ContentPageTemplate + - WidgetPageTemplate + type: string + uuid: + # @review + description: + A valid external identifier to reference this page template. + type: string + type: object + BaseWidgetInstance: + # @review + description: + A base page widget instance, containing the common properties of both a content page widget instance and + a widget page widget instance. It should only be referenced as part of an allOf clause. + properties: + widgetConfig: + additionalProperties: + type: object + # @review + description: + The configuration keys and values of the widget instance. + type: object + widgetInstanceId: + # @review + description: + The widget instance's ID. + type: string + widgetName: + # @review + description: + The widget instance's name. + type: string + widgetPermissions: + # @review + description: + The widget instance's permissions. + items: + properties: + actionIds: + # @review + description: + The IDs of the actions the role has permission for. + items: + type: string + type: array + roleName: + # @review + description: + The role's name. + type: string + type: object + type: array + type: object + ClassNameReference: + # @review + description: + A reference specifying the class name. + properties: + className: + type: string + required: + - className + ClassSubtypeReference: + # @review + description: + A reference specifying the class name and an optional subtype. + properties: + className: + type: string + subTypeExternalReference: + $ref: "#/components/schemas/ItemExternalReference" + required: + - className + type: object + ClientExtension: + # @review + description: + A reference to a client extension along with its configuration values. + properties: + clientExtensionConfig: + additionalProperties: + type: string + # @review + description: + The configuration keys and values of the client extension. + type: object + externalReferenceCode: + # @review + description: + The client extension's external reference code. + type: string + type: object + CollectionConfig: + properties: + collectionReference: + # @review + description: + The page collection's reference. + discriminator: + propertyName: collectionType + mapping: + Collection: "#/components/schemas/ItemExternalReference" + CollectionProvider: "#/components/schemas/ClassNameReference" + oneOf: + - $ref: "#/components/schemas/ClassNameReference" + - $ref: "#/components/schemas/ItemExternalReference" + collectionType: + # @review + description: + The collection's type (Collection, CollectionProvider). + enum: [Collection, CollectionProvider] + type: string + CollectionPageSettings: + allOf: + - $ref: "#/components/schemas/BasePageSettings" + - properties: + collectionConfig: + $ref: "#/components/schemas/CollectionConfig" + writeOnly: true + required: + - collectionConfig + # @review + description: + The settings of a collection page. + type: object + CollectionViewport: + # @review + description: + A collection viewport. + properties: + collectionViewportDefinition: + # @review + description: + The definition of the collection viewport. + properties: + numberOfColumns: + # @review + description: + The number of columns of the collection viewport. + type: integer + type: object + id: + # @review + description: + The collection viewport's ID. + type: string + required: + - id + - collectionViewportDefinition + type: object + ColumnViewport: + # @review + description: + A column in a viewport. + properties: + columnViewportDefinition: + properties: + size: + maximum: 12 + minimum: 1 + type: integer + type: object + id: + type: string + required: + - columnViewportDefinition + - id + type: object + ContentPageSettings: + allOf: + - $ref: "#/components/schemas/BasePageSettings" + # @review + description: + The settings of a content page. + type: object + ContentPageSpecification: + allOf: + - $ref: "#/components/schemas/BasePageSpecification" + - properties: + pageExperiences: + items: + $ref: "#/components/schemas/PageExperience" + type: array + # @review + description: + A page specification of a content page. A content page may contain 0 or 1 page specifications in draft + status and 0 or 1 page specifications in published status. + type: object + ContentPageTemplate: + allOf: + - $ref: "#/components/schemas/BasePageTemplate" + # @review + description: + A content page template. + type: object + ContentPageTemplateSettings: + # @review + description: + The settings of a content page. + type: object + ContentPageWidgetInstance: + allOf: + - $ref: "#/components/schemas/BaseWidgetInstance" + ContextReference: + # @review + description: + A reference of type context, used in collection display fragments and display page templates. + properties: + contextSource: + enum: [CollectionItem, DisplayPageItem] + type: string + required: + - contextSource + type: object + CustomCSSViewport: + # @review + description: + A custom CSS viewport. + properties: + customCSS: + # @review + description: + The definition of the custom CSS viewport. + type: string + id: + # @review + description: + The custom CSS viewport's ID. + type: string + required: + - id + - customCSS + type: object + CustomField: + # @review + description: + The value of each custom field. Fields can contain different information types (e.g., geolocation, + strings, etc.). + properties: + customValue: + $ref: "#/components/schemas/CustomValue" + description: + The field's value. + dataType: + description: + The field type (e.g., image, text, etc.). + readOnly: true + type: string + name: + description: + The field's internal name. This is valid for comparisons and unique in the structured content. + type: string + CustomMetaTag: + # @review + description: + A custom meta tag. + properties: + key: + # @review + description: + The custom meta tag's key. + type: string + value_i18n: + additionalProperties: + type: string + # @review + description: + The localized custom meta tag's values. + type: object + type: object + CustomValue: + # @review + description: + A custom value. + properties: + data_i18n: + additionalProperties: + type: string + # @review + description: + The localized field's content values for simple types. + type: object + geo: + $ref: "#/components/schemas/Geo" + description: + A point determined by latitude and longitude. + type: object + DefaultFragmentReference: + # @review + description: + A reference to a default fragment (provided out-of-the-box). + properties: + defaultFragmentKey: + # @review + description: + The key of the default fragment. + type: string + type: object + DisplayPageActionExecutionResult: + # @review + description: + The definition of an action execution of type display page. + properties: + mapping: + # @review + description: + The mapping of the display page action result. + properties: + fieldKey: + # @review + description: + The mapping's field key. + type: string + type: object + type: object + DisplayPageTemplate: + # @review + description: + A display page template. + properties: + contentTypeReference: + $ref: "#/components/schemas/ClassSubtypeReference" + description: + The content type (and optionally subtype) associated to the display page template. + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The display page template's creator. It is not returned by default. It can be embedded via + nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The display page template's creator external reference code. + type: string + dateCreated: + # @review + description: + The display page template's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time any field of the display page template was changed. + format: date-time + type: string + datePublished: + # @review + description: + The display page template's most recent publication date. + format: date-time + type: string + default: + # @review + description: + Whether the display page template is the default one for the given content type/subtype. + type: boolean + displayPageTemplateSettings: + $ref: "#/components/schemas/DisplayPageTemplateSettings" + # @review + description: + Settings of the display page template, such as SEO or OpenGraph. + externalReferenceCode: + # @review + description: + The display page template's external reference code. + type: string + friendlyUrlPath_i18n: + additionalProperties: + type: string + # @review + description: + The localized relative URLs to the display page template's rendered content. + type: object + key: + # @review + description: + The display page template's key. + type: string + name: + # @review + description: + The display page template's name. + type: string + pageSpecifications: + # @review + description: + The display page template's specifications. A display page template may contain 0 or 1 page + specifications in draft status and 0 or 1 page specifications in published status. + items: + $ref: "#/components/schemas/PageSpecification" + type: array + parentFolder: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + # @review + description: + The display page template's parent folder. + thumbnail: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The display page template's thumbnail. + uuid: + # @review + description: + A valid external identifier to reference this display page template. + type: string + type: object + DisplayPageTemplateFolder: + # @review + description: + A display page template folder. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The display page template folder's creator. It is not returned by default. It can be embedded + via nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The display page template folder's creator external reference code. + type: string + dateCreated: + # @review + description: + The display page template folder's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time any field of the display page template folder was changed. + format: date-time + type: string + description: + # @review + description: + The display page template folder's description. + type: string + externalReferenceCode: + # @review + description: + The display page template folder's external reference code. + type: string + key: + # @review + description: + The display page template folder's key. + type: string + name: + # @review + description: + The display page template folder's name. + type: string + uuid: + # @review + description: + A valid external identifier to reference this page template folder. + type: string + type: object + DisplayPageTemplateSettings: + # @review + description: + The settings of a Display Page Template. + properties: + openGraphSettings: + $ref: "#/components/schemas/OpenGraphSettings" + # @review + description: + The display page template's Open Graph settings. + seoSettings: + $ref: "#/components/schemas/SEOSettings" + # @review + description: + The display page template's SEO settings. + type: object + FragmentComposition: + # @review + description: + A composition of fragments that can be added to a site page. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The fragment composition's creator. It is not returned by default. It can be embedded via + nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The page's creator external reference code. + type: string + dateCreated: + description: + The structured content's creation date. + format: date-time + type: string + dateModified: + description: + The last time any field of the structured content was changed. + format: date-time + type: string + datePublished: + description: + The structured content's most recent publication date. + format: date-time + type: string + description: + # @review + description: + The description of this fragment composition. + type: string + externalReferenceCode: + # @review + description: + The external reference code of this fragment composition. + type: string + fragmentSetExternalReferenceCode: + # @review + description: + The external reference code of the fragment set this fragment composition belongs to. + type: string + key: + # @review + description: + The fragment composition's key. + type: string + name: + # @review + description: + The fragment composition's name. + type: string + pageElement: + $ref: "#/components/schemas/PageElement" + # @review + description: + The fragment composition's page element, whose definition must be of type PageSectionDefinition. + thumbnail: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The fragment composition's thumbnail. + type: object + FragmentField: + # @review + description: + A fragment field. + properties: + id: + # @review + description: + The fragment field's ID. + type: string + value: + anyOf: + - $ref: "#/components/schemas/FragmentFieldAction" + - $ref: "#/components/schemas/FragmentFieldBackgroundImage" + - $ref: "#/components/schemas/FragmentFieldHTML" + - $ref: "#/components/schemas/FragmentFieldImage" + - $ref: "#/components/schemas/FragmentFieldText" + # @review + description: + The fragment field's value. + type: object + FragmentFieldAction: + # @review + description: + A fragment field with an action. + properties: + action: + # @review + description: + The fragment field's action. Must be mapped to an external value. + oneOf: + - $ref: "#/components/schemas/FragmentMappedValue" + onError: + $ref: "#/components/schemas/ActionExecutionResult" + # @review + description: + The action execution result in case the action fails. + onSuccess: + $ref: "#/components/schemas/ActionExecutionResult" + # @review + description: + The action execution result in case the action succeeds. + text: + # @review + description: + The fragment field's text. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + - $ref: "#/components/schemas/FragmentMappedValue" + type: object + FragmentFieldBackgroundImage: + # @review + description: + A fragment field with a background image. + properties: + backgroundFragmentImage: + $ref: "#/components/schemas/FragmentImage" + # @review + description: + The fragment field's background image. + type: object + FragmentFieldHTML: + # @review + description: + A fragment field with HTML. + properties: + html: + # @review + description: + The fragment field's HTML. Can be inline or mapped to an external value. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + - $ref: "#/components/schemas/FragmentMappedValue" + type: object + FragmentFieldImage: + # @review + description: + A fragment field with an image. + properties: + fragmentImage: + $ref: "#/components/schemas/FragmentImage" + # @review + description: + The fragment field's image. + fragmentLink: + $ref: "#/components/schemas/FragmentLink" + # @review + description: + A link to a fragment. + type: object + FragmentFieldText: + # @review + description: + A fragment field with text. + properties: + fragmentLink: + $ref: "#/components/schemas/FragmentLink" + # @review + description: + A link to a fragment. + text: + # @review + description: + The fragment field's text. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + - $ref: "#/components/schemas/FragmentMappedValue" + type: object + FragmentImage: + # @review + description: + A fragment image. + properties: + config: + # @review + description: + Represents the Adaptive Media fragment image configuration for different viewports. + properties: + landscapeMobile: + # @review + description: + The landscape mobile configuration of the fragment image. + type: string + portraitMobile: + # @review + description: + The portrait mobile configuration of the fragment image. + type: string + tablet: + # @review + description: + The tablet configuration of the fragment image. + type: string + type: object + description: + # @review + description: + The fragment image's description. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + itemExternalReference: + $ref: "#/components/schemas/ItemExternalReference" + title: + # @review + description: + The fragment image's title. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + url: + # @review + description: + The fragment image's url. Can be inline or mapped to an external value. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + - $ref: "#/components/schemas/FragmentMappedValue" + type: object + FragmentInlineValue: + # @review + description: + A fragment inline value. + properties: + value_i18n: + additionalProperties: + type: string + # @review + description: + The localized fragment's inline values. + type: object + type: object + FragmentLink: + # @review + description: + A fragment link. + properties: + value_i18n: + additionalProperties: + $ref: "#/components/schemas/FragmentLinkValue" + # @review + description: + The localized fragment link's values. + type: object + FragmentLinkValue: + # @review + description: + A fragment link value. + properties: + href: + # @review + description: + The fragment link value's hypertext reference. Can be an inline value or mapped to an external + value. + oneOf: + - $ref: "#/components/schemas/FragmentInlineValue" + - $ref: "#/components/schemas/FragmentMappedValue" + target: + # @review + description: + The fragment link value's target (blank, parent, self, top). + enum: [Blank, Parent, Self, Top] + type: string + FragmentMappedValue: + # @review + description: + A fragment mapped value. + properties: + mapping: + # @review + description: + The mapping of the fragment mapped value. + properties: + fieldKey: + # @review + description: + The mapping's field key. + type: string + itemReference: + # @review + description: + The mapping's item reference. + oneOf: + - $ref: "#/components/schemas/ItemExternalReference" + - $ref: "#/components/schemas/ContextReference" + type: object + type: object + FragmentSettingsAllowed: + # @review + description: + Represents the settings of allowed fragments in a page drop zone. + properties: + allowedFragments: + # @review + description: + A list of allowed fragments. + items: + $ref: "#/components/schemas/ItemExternalReference" + type: array + type: object + FragmentSettingsUnallowed: + # @review + description: + Represents the settings of unallowed fragments in a page drop zone. + properties: + unallowedFragments: + items: + $ref: "#/components/schemas/ItemExternalReference" + type: array + type: object + FragmentSnapshot: + # @review + description: + Represents the snapshot of a fragment at the time it was added or propagated to a page or page template. + properties: + configuration: + additionalProperties: + type: object + # @review + description: + The fragment's configuration at the time the fragment was added or propagated to the page or + page template. + type: object + css: + # @review + description: + The fragment's css at the time the fragment was added or propagated to the page or page + template. + type: string + html: + # @review + description: + The fragment's html at the time the fragment was added or propagated to the page or page + template. + type: string + js: + # @review + description: + The fragment's js at the time the fragment was added or propagated to the page or page template. + type: string + type: + # @review + description: + The fragment's type. + enum: [Component, Input, React] + type: string + type: object + FragmentStyle: + # @review + description: + A fragment style. + properties: + backgroundColor: + # @review + description: + The fragment's background color. + type: string + backgroundFragmentImage: + $ref: "#/components/schemas/FragmentImage" + # @review + description: + The fragment's background image. + borderColor: + # @review + description: + The fragment's border color. + type: string + borderRadius: + # @review + description: + The fragment's background radius. + type: string + borderWidth: + # @review + description: + The fragment's border width. + type: string + fontFamily: + # @review + description: + The fragment's font family. + type: string + fontSize: + # @review + description: + The fragment's font size. + type: string + fontWeight: + # @review + description: + The fragment's font weight. + type: string + height: + # @review + description: + The fragment's height. + type: string + hidden: + # @review + description: + Specifies if the fragment is hidden to the user. + type: boolean + marginBottom: + # @review + description: + The fragment's margin bottom. + type: string + marginLeft: + # @review + description: + The fragment's margin left. + type: string + marginRight: + # @review + description: + The fragment's margin right. + type: string + marginTop: + # @review + description: + The fragment's margin top. + type: string + maxHeight: + # @review + description: + The fragment's max height. + type: string + maxWidth: + # @review + description: + The fragment's max width. + type: string + minHeight: + # @review + description: + The fragment's min height. + type: string + minWidth: + # @review + description: + The fragment's min width. + type: string + opacity: + # @review + description: + The fragment's opacity. + type: string + overflow: + # @review + description: + The fragment's overflow behavior. + type: string + paddingBottom: + # @review + description: + The fragment's padding bottom. + type: string + paddingLeft: + # @review + description: + The fragment's padding left. + type: string + paddingRight: + # @review + description: + The fragment's padding right. + type: string + paddingTop: + # @review + description: + The fragment's padding top. + type: string + shadow: + # @review + description: + The fragment's shadow effect. + type: string + textAlign: + # @review + description: + The fragment's text align. + type: string + textColor: + # @review + description: + The fragment's text color. + type: string + width: + # @review + description: + The fragment's width. + type: string + type: object + FragmentViewport: + # @review + description: + A fragment viewport. + properties: + fragmentViewportStyle: + # @review + description: + The fragment's viewport style. + properties: + backgroundColor: + # @review + description: + The fragment viewport's background color. + type: string + borderColor: + # @review + description: + The fragment viewport's border color. + type: string + borderRadius: + # @review + description: + The fragment viewport's background radius. + type: string + borderWidth: + # @review + description: + The fragment viewport's border width. + type: string + fontFamily: + # @review + description: + The fragment viewport's font family. + type: string + fontSize: + # @review + description: + The fragment viewport's font size. + type: string + fontWeight: + # @review + description: + The fragment viewport's font weight. + type: string + height: + # @review + description: + The fragment viewport's height. + type: string + hidden: + # @review + description: + Specifies if the fragment's viewport is hidden to the user. + type: boolean + marginBottom: + # @review + description: + The fragment viewport's margin bottom. + type: string + marginLeft: + # @review + description: + The fragment viewport's margin left. + type: string + marginRight: + # @review + description: + The fragment viewport's margin right. + type: string + marginTop: + # @review + description: + The fragment viewport's margin top. + type: string + maxHeight: + # @review + description: + The fragment viewport's max height. + type: string + maxWidth: + # @review + description: + The fragment viewport's max width. + type: string + minHeight: + # @review + description: + The fragment viewport's min height. + type: string + minWidth: + # @review + description: + The fragment viewport's min width. + type: string + opacity: + # @review + description: + The fragment viewport's opacity. + type: string + overflow: + # @review + description: + The fragment viewport's overflow behavior. + type: string + paddingBottom: + # @review + description: + The fragment viewport's padding bottom. + type: string + paddingLeft: + # @review + description: + The fragment viewport's padding left. + type: string + paddingRight: + # @review + description: + The fragment viewport's padding right. + type: string + paddingTop: + # @review + description: + The fragment viewport's padding top. + type: string + shadow: + # @review + description: + The fragment viewport's shadow effect. + type: string + textAlign: + # @review + description: + The fragment viewport's text align. + type: string + textColor: + # @review + description: + The fragment viewport's text color. + type: string + width: + # @review + description: + The fragment viewport's width. + type: string + type: object + id: + # @review + description: + The fragment viewport's ID. + type: string + required: + - fragmentViewportStyle + - id + type: object + FriendlyUrlHistory: + # @review + description: + Represents the history of previously used URLs for a page to prevent broken links and provide an easy + way to revert changes. + properties: + friendlyUrlPath_i18n: + additionalProperties: + items: + type: string + type: array + # @review + description: + The old localized relative URLs to the page's rendered content. + type: object + type: object + Geo: + description: + A point determined by latitude and longitude. + properties: + latitude: + description: + The latitude of a point in space. + format: double + type: number + longitude: + description: + The longitude of a point in space. + format: double + type: number + type: object + ItemExternalReference: + # @review + description: + A unique reference to an entity which remains constant across environments. + properties: + className: + type: string + externalReferenceCode: + type: string + scope: + properties: + externalReferenceCode: + type: string + type: + enum: [AssetLibrary, Site] + type: string + required: + - externalReferenceCode + - type + type: object + required: + - externalReferenceCode + type: object + MasterPage: + # @review + description: + A page with common elements (header, footer, ...) used for all or several pages of a site. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The master page's creator. It is not returned by default. It can be embedded via nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The page's creator external reference code. + type: string + dateCreated: + # @review + description: + The master page's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time any field of the master page was changed. + format: date-time + type: string + datePublished: + # @review + description: + The master page's most recent publication date. + format: date-time + type: string + default: + # @review + description: + Whether the master page is the default one. + type: boolean + key: + # @review + description: + The master page's key. + type: string + keywordItemExternalReferences: + description: + The external references to the associated keywords. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + keywords: + description: + The associated keywords. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#Keyword" + readOnly: true + type: array + name: + # @review + description: + The master page's name. + type: string + pageSpecifications: + # @review + description: + The master page's specifications. A master page may contain 0 or 1 page specifications in draft + status and 0 or 1 page specifications in published status. + items: + $ref: "#/components/schemas/PageSpecification" + type: array + taxonomyCategories: + # @review + description: + The associated categories. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#TaxonomyCategory" + readOnly: true + type: array + taxonomyCategoryItemExternalReferences: + # @review + description: + The external references to the associated categories. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + thumbnail: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The master page's thumbnail. + uuid: + # @review + description: + A valid external identifier to reference this page. + type: string + type: object + MessageFormSubmissionResult: + # @review + description: + The definition of a submission result of type message. + properties: + message: + $ref: "#/components/schemas/FragmentInlineValue" + # @review + description: + The localized submission of message type. + messageType: + # @review + description: + The message form submission type (embedded, none). + enum: [Embedded, None] + type: string + showNotification: + type: boolean + type: object + NavigationMenuSettings: + # @review + description: + Represents settings related with the site navigation menu of a page. + properties: + queryString: + # @review + description: + The default parameter for a page. + type: string + target: + # @review + description: + The page's description to be used as summary for search engines. + type: string + targetType: + # @review + description: + The target's type (specific frame or new tab). + enum: [SpecificFrame, NewTab] + type: string + type: object + NoneActionExecutionResult: + # @review + description: + The definition of an action execution result of type none. + properties: + reload: + # @review + description: + Whether to reload the page after the action is executed. + type: boolean + type: object + NotificationActionExecutionResult: + # @review + description: + The definition of an action execution result of type notification. + properties: + reload: + # @review + description: + Whether to reload the page after the action is executed. + type: boolean + text: + $ref: "#/components/schemas/FragmentInlineValue" + # @review + description: + The localized text to display when an action is executed. + type: object + OpenGraphSettings: + # @review + description: + Represents settings related with Open Graph protocol. + properties: + description_i18n: + additionalProperties: + type: string + # @review + description: + The localized Open Graph's descriptions. + type: object + image: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The Open Graph's image. + imageAlt_i18n: + additionalProperties: + type: string + # @review + description: + The localized Open Graph's image alts. + type: object + title_i18n: + additionalProperties: + type: string + # @review + description: + The localized Open Graph's titles. + type: object + type: object + PageCollectionDefinition: + # @review + description: + The definition of a Page Collection. + properties: + collectionConfig: + $ref: "#/components/schemas/CollectionConfig" + collectionViewports: + # @review + description: + A list of viewports of the page collection. + items: + $ref: "#/components/schemas/CollectionViewport" + type: array + displayAllItems: + # @review + description: + Whether to show all items when pagination is disabled. + type: boolean + displayAllPages: + # @review + description: + Whether to show all pages when pagination is enabled. + type: boolean + emptyCollectionConfig: + properties: + displayMessage: + # @review + description: + Whether to display a message when the collection is empty or no results match the + applied filters (true by default). + type: boolean + message_i18n: + additionalProperties: + type: string + # @review + description: + The localized message to display when the collection is empty or no results match the + applied filters ('No Results Found' by default). + type: object + type: object + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of the page collection. + fragmentViewports: + # @review + description: + The fragment viewports of the page collection. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + layout: + # @review + description: + the page section's layout. + properties: + align: + enum: [Baseline, Center, End, None, Start, Stretch] + type: string + flexWrap: + enum: [NoWrap, Wrap, WrapReverse] + type: string + justify: + enum: [Center, End, None, SpaceAround, SpaceBetween, Start] + type: string + type: object + listItemStyle: + # @review + description: + The style of a list of items in the page collection. + type: string + listStyle: + # @review + description: + The style of a list in the page collection. + type: string + name: + # @review + description: + The custom name of a Page Collection. + type: string + numberOfColumns: + # @review + description: + The number of columns in the page collection. + type: integer + numberOfItems: + # @review + description: + The maximum number of items to display in the page collection when pagination is disabled. + type: integer + numberOfItemsPerPage: + # @review + description: + The number of items per page in the page collection. + type: integer + numberOfPages: + # @review + description: + The maximum number of pages to show when pagination is enabled. + type: integer + paginationType: + # @review + description: + The type of pagination. + enum: [ + None, + Numeric, + Simple] + type: string + templateKey: + # @review + description: + The page collection's template key. + type: string + type: object + PageCollectionItemDefinition: + # @review + description: + The definition of a Page Collection Item. + properties: + collectionItemConfig: + # @review + description: + The page collection item's configuration. + type: object + type: object + PageColumnDefinition: + # @review + description: + The definition of a Page Column. + properties: + columnViewports: + # @review + description: + A list of column viewports of the page column definition. + items: + $ref: "#/components/schemas/ColumnViewport" + type: array + size: + # @review + description: + The page column's size. + maximum: 12 + minimum: 1 + type: integer + type: object + PageContainerDefinition: + # @review + description: + The definition of a Page section. + properties: + backgroundFragmentImage: + $ref: "#/components/schemas/FragmentImage" + # @review + description: + The background fragment image of the page section. + contentVisibility: + # @review + description: + Defines the content visibility of the container. + type: string + cssClasses: + # @review + description: + A list of CSS Classes that are applied to the element. + items: + type: string + type: array + customCSS: + # @review + description: + Custom CSS that is applied on the fragment. + type: string + customCSSViewports: + # @review + description: + The custom CSS viewports of the page collection. + items: + $ref: "#/components/schemas/CustomCSSViewport" + type: array + fragmentLink: + $ref: "#/components/schemas/FragmentLink" + # @review + description: + The fragment link of the page section. + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of the page section. + fragmentViewports: + # @review + description: + A list of fragment viewports of the page section. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + htmlProperties: + # @review + description: + The page section's html properties + properties: + htmlTag: + enum: [Article, Aside, Div, Footer, Header, Main, Nav, Section] + type: string + type: object + indexed: + # @review + description: + A flag that indicates whether the page section is indexed or not. + type: boolean + layout: + # @review + description: + the page section's layout. + properties: + containerType: + # @review + description: + The container's type (fixed or fluid). + enum: [Fixed, Fluid] + type: string + flexWrap: + enum: [NoWrap, Wrap, WrapReverse] + type: string + widthType: + # @review + description: + The width's type (fixed or fluid). + enum: [Fixed, Fluid] + type: string + type: object + name: + # @review + description: + The custom name of a Page section. + type: string + type: object + PageDefinition: + # @review + description: + Represent a definition of a Page. + properties: + pageElement: + $ref: "#/components/schemas/PageElement" + # @review + description: + The page's page element. + pageRules: + # @review + description: + A list of the page rules this page has. + items: + $ref: "#/components/schemas/PageRule" + type: array + settings: + $ref: "#/components/schemas/Settings" + # @review + description: + The page's settings. + version: + # @review + description: + The version of the JSON generated by page definition. + format: double + type: number + type: object + PageDropZoneDefinition: + # @review + description: + Represent a definition of a Page drop zone. + properties: + fragmentSettings: + # @review + description: + The page drop zone's allowed or unallowed fragments. + oneOf: + - $ref: "#/components/schemas/FragmentSettingsAllowed" + - $ref: "#/components/schemas/FragmentSettingsUnallowed" + type: object + PageElement: + # @review + description: + A page element. + properties: + definition: + # @review + description: + The page element's definition. + oneOf: + - $ref: "#/components/schemas/PageCollectionDefinition" + - $ref: "#/components/schemas/PageCollectionItemDefinition" + - $ref: "#/components/schemas/PageColumnDefinition" + - $ref: "#/components/schemas/PageContainerDefinition" + - $ref: "#/components/schemas/PageDropZoneDefinition" + - $ref: "#/components/schemas/PageFormDefinition" + - $ref: "#/components/schemas/PageFragmentCompositionInstanceDefinition" + - $ref: "#/components/schemas/PageFragmentDropZoneDefinition" + - $ref: "#/components/schemas/PageFragmentInstanceDefinition" + - $ref: "#/components/schemas/PageRowDefinition" + - $ref: "#/components/schemas/PageWidgetInstanceDefinition" + externalReferenceCode: + description: + The page element's external reference code. Unique within the site. + type: string + pageElements: + # @review + description: + A list of the page elements this page element has. + items: + $ref: "#/components/schemas/PageElement" + type: array + parentExternalReferenceCode: + description: + The parent's page element's external reference code. Unique within the site. + type: string + position: + description: + The 0-based position this page element occupies with respect to its siblings (0 for first child, + 1 for second child, ...). If not specified when creating a page element the page element will be + added at the last valid position. + minimum: 0 + type: integer + type: + # @review + description: + The page element's type (collection, collection item, column, container, drop zone, form, + fragment, fragment composition, fragment drop zone, row, widget or widget section). + enum: [Collection, CollectionItem, Column, Container, DropZone, Form, Fragment, FragmentComposition, FragmentDropZone, Row, Widget] + type: string + PageExperience: + description: + # @review + A customized experience for a given page specification. + properties: + externalReferenceCode: + description: + The experience's external reference code, unique per site. + type: string + key: + # @review + description: + The experience's key. + type: string + name_i18n: + additionalProperties: + type: string + # @review + description: + The localized experience's names. + type: object + pageElements: + # @review + description: + The page elements in the experience. + items: + $ref: "#/components/schemas/PageElement" + type: array + pageRules: + # @review + description: + The page rules in the experience. + items: + $ref: "#/components/schemas/PageRule" + type: array + priority: + # @review + description: + the experience's priority. It must be a unique value within the page specification. The default + experience will always be assigned priority 0. A priority higher than 0 will result in an + experience being active and a priority lower than 0 will result in an experience being inactive. + type: integer + segments: + # @review + description: + A list of external references to the segments the experience is used for. + items: + $ref: "#/components/schemas/ItemExternalReference" + type: array + type: object + PageFormDefinition: + # @review + description: + The definition of a page form. + properties: + cssClasses: + # @review + description: + A list of CSS classes that are applied to the page element. + items: + type: string + type: array + customCSS: + # @review + description: + Custom CSS that is applied on the page element. + type: string + customCSSViewports: + # @review + description: + The custom CSS viewports of the page form. + items: + $ref: "#/components/schemas/CustomCSSViewport" + type: array + formConfig: + # @review + description: + The page form's configuration. + properties: + formReference: + # @review + description: + The form reference. + oneOf: + - $ref: "#/components/schemas/ClassSubtypeReference" + - $ref: "#/components/schemas/ContextReference" + formSuccessSubmissionResult: + # @review + description: + The definition for the success message of the form. + oneOf: + - $ref: "#/components/schemas/MessageFormSubmissionResult" + - $ref: "#/components/schemas/SitePageFormSubmissionResult" + - $ref: "#/components/schemas/URLFormSubmissionResult" + type: object + type: object + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of a page form. + fragmentViewports: + # @review + description: + A list of fragment viewports of a page form. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + indexed: + # @review + description: + A flag that indicates whether the page fragment instance is indexed or not. + type: boolean + layout: + # @review + description: + The page section's layout. + properties: + align: + enum: [Baseline, Center, End, None, Start, Stretch] + type: string + contentDisplay: + enum: [Block, FlexColumn, FlexRow] + type: string + flexWrap: + enum: [NoWrap, Wrap, WrapReverse] + type: string + justify: + enum: [Center, End, None, SpaceAround, SpaceBetween, Start] + type: string + widthType: + # @review + description: + The width's type (fixed or fluid). + enum: [Fixed, Fluid] + type: string + type: object + name: + # @review + description: + The custom name of of a page form. + type: string + type: object + PageFragmentCompositionInstanceDefinition: + # @review + description: + The definition of a page fragment composition instance. + properties: + fragmentComposition: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The reference to the fragment composition that will be used to generate the page elment of type + section that will be added. + type: object + PageFragmentDropZoneDefinition: + # @review + description: + The definition of a page fragment drop zone. + properties: + fragmentDropZoneId: + # @review + description: + The id of the fragment drop zone + type: string + type: object + PageFragmentInstanceDefinition: + # @review + description: + A definition of a page fragment instance. + properties: + cssClasses: + # @review + description: + A list of CSS classes that are applied to the fragment instance. + items: + type: string + type: array + customCSS: + # @review + description: + Custom CSS that is applied on the fragment instance. + type: string + customCSSViewports: + # @review + description: + The custom CSS viewports of the fragment instance. + items: + $ref: "#/components/schemas/CustomCSSViewport" + type: array + datePropagated: + description: + The fragment instance's most recent propagation date. + format: date-time + type: string + datePublished: + description: + The fragment instance's most recent publication date. + format: date-time + type: string + draftPageElementExternalReferenceCode: + # @review + description: + The external reference code of the corresponding page element in the draft of the page. + Available only in the published page specification. + type: string + fragmentConfig: + additionalProperties: + type: object + # @review + description: + The configuration values of the fragment instance. + type: object + fragmentFields: + # @review + description: + The fragment field values of the the fragment instance. + items: + $ref: "#/components/schemas/FragmentField" + type: array + fragmentReference: + # @review + description: + An external reference to the fragment. + oneOf: + - $ref: "#/components/schemas/DefaultFragmentReference" + - $ref: "#/components/schemas/ItemExternalReference" + fragmentSnapshot: + $ref: "#/components/schemas/FragmentSnapshot" + # @review + description: + A snapshot of a fragment at the time it was added or propagated to a page or page template. + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of the page fragment instance. + fragmentViewports: + # @review + description: + A list of fragment viewports of the page fragment instance. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + indexed: + # @review + description: + A flag that indicates whether the page fragment instance is indexed or not. + type: boolean + name: + # @review + description: + The custom name of a fragment instance. + type: string + namespace: + # @review + description: + The fragment instance's namespace. + type: string + uuid: + # @review + description: + A valid external identifier to reference this fragment instance. + type: string + widgetInstances: + # @review + description: + A list of widget instances within the fragment instance. + items: + $ref: "#/components/schemas/WidgetInstance" + type: array + type: object + PageRowDefinition: + # @review + description: + The definition of a page row. + properties: + cssClasses: + # @review + description: + A list of CSS classes that are applied to the page row. + items: + type: string + type: array + customCSS: + # @review + description: + Custom CSS that is applied on the page row. + type: string + customCSSViewports: + # @review + description: + The custom CSS viewports of the page row. + items: + $ref: "#/components/schemas/CustomCSSViewport" + type: array + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of the page row. + fragmentViewports: + # @review + description: + A list of fragment viewports of a page row. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + gutters: + # @review + description: + A flag that indicates whether the page row has gutters. + type: boolean + indexed: + # @review + description: + A flag that indicates whether the page row is indexed or not. + type: boolean + modulesPerRow: + # @review + description: + The page row's modules per row. + type: integer + name: + # @review + description: + The custom name of a page row. + type: string + numberOfColumns: + # @review + description: + The page row's number of columns. + type: integer + reverseOrder: + # @review + description: + A flag that indicates whether the page row has reverse order. + type: boolean + rowViewports: + # @review + description: + A list of viewports of the page row. + items: + $ref: "#/components/schemas/RowViewport" + type: array + verticalAlignment: + # @review + description: + The vertical alignment property of the page row. + type: string + type: object + PageRule: + # @review + description: + The definition of a page rule. + properties: + conditionType: + # @review + description: + The custom name of a Page rule. + enum: [All, Any] + type: string + externalReferenceCode: + # @review + description: + The page rule external reference code. + type: string + name: + # @review + description: + The custom name of a page rule. + type: string + pageRuleActions: + # @review + description: + A list of actions of a page rule. + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + pageRuleConditions: + # @review + description: + A list of conditions of a page rule. + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + type: object + PageRuleAction: + # @review + description: + The definition of a page rule action. + properties: + action: + # @review + description: + The page rule action's action. + type: string + externalReferenceCode: + # @review + description: + The page rule action's external reference code. + type: string + itemId: + # @review + description: + The page rule action's item ID. + type: string + type: + # @review + description: + The page rule action's type. + type: string + type: object + PageRuleCondition: + # @review + description: + The definition of a Page Rule Condition. + properties: + condition: + # @review + description: + The page rule condition's description. + type: string + externalReferenceCode: + # @review + description: + The page rule condition's external reference code. + type: string + type: + # @review + description: + The page rule condition's type. + type: string + value: + # @review + description: + The page rule condition's value. + type: string + type: object + PageSpecification: + # @review + description: + A page specification of a content page, content page template, widget page, or widget page template. A + content page may contain 0 or 1 page specifications in draft status and 0 or 1 page specifications in + published status. A widget page contains only 1 page specification in published status. + discriminator: + propertyName: type + mapping: + ContentPageSpecification: "#/components/schemas/ContentPageSpecification" + WidgetPageSpecification: "#/components/schemas/WidgetPageSpecification" + oneOf: + - $ref: "#/components/schemas/ContentPageSpecification" + - $ref: "#/components/schemas/WidgetPageSpecification" + type: object + PageTemplate: + discriminator: + propertyName: type + mapping: + ContentPageTemplate: "#/components/schemas/ContentPageTemplate" + WidgetPageTemplate: "#/components/schemas/WidgetPageTemplate" + oneOf: + - $ref: "#/components/schemas/ContentPageTemplate" + - $ref: "#/components/schemas/WidgetPageTemplate" + type: object + PageTemplateSet: + # @review + description: + A page template set. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The page template set's creator. It is not returned by default. It can be embedded via + nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The page template set's creator external reference code. + type: string + dateCreated: + # @review + description: + The page template set's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time the page template set changed. + format: date-time + type: string + description: + # @review + description: + The page template set's description. + type: string + externalReferenceCode: + # @review + description: + The page template set's external reference code. + type: string + key: + # @review + description: + The page template set's key. + type: string + name: + # @review + description: + The page template set's name. + type: string + uuid: + description: + A valid external identifier to reference this page template set. + type: string + type: object + PageWidgetInstanceDefinition: + # @review + description: + The definition of a page widget instance. + properties: + cssClasses: + # @review + description: + A list of CSS classes that are applied to the element. + items: + type: string + type: array + customCSS: + # @review + description: + Custom CSS that is applied on the fragment. + type: string + customCSSViewports: + # @review + description: + The custom CSS viewports of the page collection. + items: + $ref: "#/components/schemas/CustomCSSViewport" + type: array + fragmentStyle: + $ref: "#/components/schemas/FragmentStyle" + # @review + description: + The fragment style of the page widget instance. + fragmentViewports: + # @review + description: + A list of fragment viewports of the page widget instance. + items: + $ref: "#/components/schemas/FragmentViewport" + type: array + name: + # @review + description: + The custom name of a page widget instance. + type: string + widgetInstance: + $ref: "#/components/schemas/ContentPageWidgetInstance" + # @review + description: + The widget instance of the page widget instance. + type: object + RowViewport: + # @review + description: + A row viewport. + properties: + id: + # @review + description: + The row viewport's ID. + type: string + rowViewportDefinition: + # @review + description: + The definition of the row viewport. + properties: + modulesPerRow: + # @review + description: + The number of modules per row. + type: integer + reverseOrder: + # @review + description: + A flag that indicates whether the row viewport has reverse order. + type: boolean + verticalAlignment: + # @review + description: + The vertical alignment property of the row viewport. + type: string + type: object + required: + - id + - rowViewportDefinition + type: object + SEOSettings: + # @review + description: + Settings related with SEO. + properties: + customCanonicalURL_i18n: + additionalProperties: + type: string + # @review + description: + The localized canonical URL of the page, if it exists. + type: object + description_i18n: + additionalProperties: + type: string + # @review + description: + The localized descriptions of the page to be used as summary for search engines. + type: object + htmlTitle_i18n: + additionalProperties: + type: string + # @review + description: + The localized main titles of the page to be used by search engines. + type: object + robots_i18n: + additionalProperties: + type: string + # @review + description: + A localized tag telling search engines if and how they should crawl the page. + type: object + seoKeywords_i18n: + additionalProperties: + type: string + # @review + description: + A list of localized target keywords of the page to be used by search engines. + type: object + siteMapSettings: + # @review + description: + Represents settings related with the site map. + properties: + changeFrequency: + description: + Indicates how often a page is updated. + enum: + - Always + - Hourly + - Daily + - Weekly + - Monthly + - Yearly + - Never + type: string + include: + description: + Whether search engines should crawl and index the page. + type: boolean + includeChildSitePages: + # @review + description: + Whether search engines should crawl and index the child pages. + type: boolean + pagePriority: + description: + How the page should be prioritized relative to other pages. + format: double + maximum: 1 + minimum: 0 + type: number + type: object + type: object + Settings: + # @review + description: + Represents the settings of a page specification. + properties: + colorSchemeName: + # @review + description: + The page specification's color scheme name. + type: string + css: + # @review + description: + The page specification's CSS. + type: string + favIcon: + # @review + description: + The FavIcon of the page specification. + oneOf: + - $ref: "#/components/schemas/ClientExtension" + - $ref: "#/components/schemas/ItemExternalReference" + globalCSSClientExtensions: + description: + The client extensions for global CSS associated to the page. + items: + $ref: "#/components/schemas/ClientExtension" + type: array + globalJSClientExtensions: + description: + The client extensions for global JS associated to the page. + items: + $ref: "#/components/schemas/ClientExtension" + type: array + javascript: + # @review + description: + The page specification's JavaScript. + type: string + masterPage: + $ref: "#/components/schemas/MasterPage" + # @review + description: + The page specification's master page. This property is not applied if the page specification + belongs to a master page. + styleBook: + # @review + description: + The style book that is applied to the page specification. + properties: + key: + # @review + description: + The style book's key. + type: string + name: + # @review + description: + The style book's name. + type: string + type: object + themeCSSClientExtension: + $ref: "#/components/schemas/ClientExtension" + # @review + description: + The client extension for the theme CSS of a page specification. + themeName: + # @review + description: + The page specification's theme name. + type: string + themeSettings: + # @review + description: + The page specification's theme settings. + type: object + themeSpritemapClientExtension: + $ref: "#/components/schemas/ClientExtension" + # @review + description: + The client extension for the theme spritemap of a page specification. + type: object + SitePage: + # @review + description: + A page on a site, which can be of type content or widget. + properties: + availableLanguages: + # @review + description: + The list of languages the page has a translation for. + items: + type: string + readOnly: true + type: array + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The page's creator. It is not returned by default. It can be embedded via nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The page's creator external reference code. + type: string + customFields: + # @review + description: + Custom fields associated with the page. + items: + $ref: "#/components/schemas/CustomField" + type: array + dateCreated: + # @review + description: + The page's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time any field of the page was changed. + format: date-time + type: string + datePublished: + # @review + description: + The page's most recent publication date. + format: date-time + type: string + externalReferenceCode: + description: + The page's external reference code. + type: string + friendlyUrlHistory: + $ref: "#/components/schemas/FriendlyUrlHistory" + # @review + description: + The history of previously used URLs to the page's rendered content. This field is not returned + by default. It can be requested via nestedFields. + friendlyUrlPath_i18n: + additionalProperties: + type: string + # @review + description: + The localized relative URLs to the page's rendered content. + type: object + keywordItemExternalReferences: + description: + The external references to the associated keywords. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + keywords: + # @review + description: + The associated keywords. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#Keyword" + readOnly: true + type: array + pageSettings: + # @review + description: + Settings of the page, such as SEO or OpenGraph. + discriminator: + propertyName: type + mapping: + CollectionPage: "#/components/schemas/CollectionPageSettings" + ContentPage: "#/components/schemas/ContentPageSettings" + WidgetPage: "#/components/schemas/WidgetPageSettings" + oneOf: + - $ref: "#/components/schemas/CollectionPageSettings" + - $ref: "#/components/schemas/ContentPageSettings" + - $ref: "#/components/schemas/WidgetPageSettings" + pageSpecifications: + # @review + description: + The page's specifications. A page may contain 0 or 1 page specifications in draft status and 0 + or 1 page specifications in published status. + items: + $ref: "#/components/schemas/PageSpecification" + type: array + parentSitePageExternalReferenceCode: + # @review + description: + The parent page external reference code or null if it is a top level page. + type: string + siteExternalReferenceCode: + # @review + description: + The external reference code of the site to which this page is scoped. + readOnly: true + type: string + taxonomyCategories: + # @review + description: + The associated categories. They are not returned by default. They can be embedded via + nestedFields. + items: + $ref: "../../headless-admin-taxonomy/headless-admin-taxonomy-impl/rest-openapi.yaml#TaxonomyCategory" + readOnly: true + type: array + taxonomyCategoryItemExternalReferences: + # @review + description: + The external references to the associated categories. + items: + "$ref": "#/components/schemas/ItemExternalReference" + type: array + title_i18n: + additionalProperties: + type: string + # @review + description: + The localized page's titles. + type: object + type: + enum: + - CollectionPage + - ContentPage + - WidgetPage + type: string + uuid: + # @review + description: + A valid external identifier to reference this page. + type: string + viewableBy: + description: + A write-only property that specifies the default permissions. + enum: + - Anyone + - Members + - Owner + type: string + writeOnly: true + required: + - title + type: object + SitePageActionExecutionResult: + # @review + description: + The definition of an action execution of type page. + properties: + itemReference: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The reference to a page. + type: object + SitePageFormSubmissionResult: + # @review + description: + The definition of a submission result of type page. + properties: + itemReference: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The localized submission of page type. + type: object + URLActionExecutionResult: + # @review + description: + The definition of an action execution result of type URL. + properties: + url: + $ref: "#/components/schemas/FragmentInlineValue" + # @review + description: + The localized action execution result of type URL. + type: object + URLFormSubmissionResult: + # @review + description: + The definition of a submission result of type URL. + properties: + url: + $ref: "#/components/schemas/FragmentInlineValue" + # @review + description: + The localized submission of URL type. + type: object + UtilityPage: + description: + The definition of a Utility Page. + properties: + creator: + $ref: "../../headless-admin-user/headless-admin-user-impl/rest-openapi.yaml#Creator" + # @review + description: + The utility page's creator. It is not returned by default. It can be embedded via nestedFields. + readOnly: true + creatorExternalReferenceCode: + # @review + description: + The utility page's creator external reference code. + type: string + dateCreated: + # @review + description: + The utility page's creation date. + format: date-time + type: string + dateModified: + # @review + description: + The last time the utility page changed. + format: date-time + type: string + datePublished: + # @review + description: + The last time the utility page changed. + format: date-time + type: string + default: + # @review + description: + Specifies if the utility page should be the default for the given type. + type: boolean + externalReferenceCode: + # @review + description: + The utility page's external reference code. + type: string + name: + # @review + description: + The utility page's name. + type: string + pageSpecifications: + # @review + description: + The utility page's specifications. A utility page may contain 0 or 1 page specifications in + draft status and 0 or 1 page specifications in published status. + items: + $ref: "#/components/schemas/PageSpecification" + type: array + thumbnail: + $ref: "#/components/schemas/ItemExternalReference" + # @review + description: + The utility page's thumbnail. + type: + # @review + description: + The utility page's type. + enum: [CookiePolicy, CreateAccount, Error, ErrorCode404, ErrorCode500, ForgotPassword, Login, TermsOfUse] + type: string + utilityPageSettings: + $ref: "#/components/schemas/UtilityPageSettings" + # @review + description: + Settings of the utility page. + uuid: + description: + A valid external identifier to reference this utility page. + type: string + type: object + UtilityPageSEOSettings: + # @review + description: + Settings related with SEO of an utility page. + properties: + description_i18n: + additionalProperties: + type: string + # @review + description: + The localized descriptions of the utility page to be used as summary for search engines. + type: object + htmlTitle_i18n: + additionalProperties: + type: string + # @review + description: + The localized main titles of the utility page to be used by search engines. + type: object + type: object + UtilityPageSettings: + # @review + description: + The settings of an utility page. + properties: + seoSettings: + $ref: "#/components/schemas/UtilityPageSEOSettings" + # @review + description: + The utility page's SEO settings. + type: object + WidgetPageSection: + # @review + description: + A widget page section. + properties: + customizable: + # @review + description: + A flag that indicates whether the widget page section is customizable or not. + type: boolean + id: + description: + The widget page section's id. + type: string + widgetInstances: + # @review + description: + A list of the widget instances within this page section. + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + WidgetPageSettings: + allOf: + - $ref: "#/components/schemas/BasePageSettings" + - properties: + customizable: + # @review + description: + A flag that indicates whether the widget page is customizable. + type: boolean + customizableSectionIds: + # @review + description: + The IDs of the customizable sections. + items: + type: string + type: array + inheritChanges: + # @review + description: + Whether this widget page will inherit changes made to the associated widget page template. + type: boolean + layoutTemplateId: + # @review + description: + The ID of the layout template. + type: string + widgetPageTemplateReference: + $ref: "#/components/schemas/ItemExternalReference" + required: + - layoutPageTemplateId + # @review + description: + The settings of a widget page. + type: object + WidgetPageSpecification: + allOf: + - $ref: "#/components/schemas/BasePageSpecification" + - properties: + widgetPageSections: + # @review + description: + The sections of a widget page. + items: + $ref: "#/components/schemas/WidgetPageSection" + type: array + # @review + description: + A page specification of a widget page. A widget page contains always 1 page specification in published + status. + type: object + WidgetPageTemplate: + allOf: + - $ref: "#/components/schemas/BasePageTemplate" + - properties: + active: + # @review + description: + A flag that indicates whether the widget page template is active. + type: boolean + description_i18n: + additionalProperties: + type: string + # @review + description: + The localized descriptions of the widget page template. + type: object + friendlyUrlPath_i18n: + additionalProperties: + type: string + # @review + description: + The localized relative URLs to the page's rendered content. + type: object + hiddenFromNavigation: + # @review + description: + A flag that indicates whether the page created based on this page template is hidden from + navigation. + type: boolean + name_i18n: + additionalProperties: + type: string + # @review + description: + The localized names of the widget page template. + # @review + description: + A widget page template. + type: object + WidgetPageTemplateSettings: + # @review + description: + The settings of a widget page template. + properties: + layoutTemplateId: + # @review + description: + The identifier of the layout template. + type: string + navigationMenuSettings: + # @review + description: + The widget page template's site navigation menu settings. + properties: + target: + # @review + description: + The page's description to be used as summary for search engines. + type: string + targetType: + # @review + description: + The target's type (specific frame or new tab). + enum: [SpecificFrame, NewTab] + type: string + type: object + type: object + WidgetPageWidgetInstance: + allOf: + - $ref: "#/components/schemas/BaseWidgetInstance" + - properties: + externalReferenceCode: + description: + The external reference code of the widget instance. + type: string + parentSectionId: + description: + The section's ID of the widget page or the nested application widget instance this widget + belongs to. + type: string + parentWidgetInstanceExternalReferenceCode: + description: + The external reference code of the parent widget instance. Only available if this widget + instance is within a nested applications widget instance. + type: string + position: + description: + The 0-based position this widget instance occupies with respect to its siblings (0 for + first child, 1 for second child, ...). If not specified when creating a widget instance + the widget instance will be added at the last valid position. + minimum: 0 + type: integer + widgetLookAndFeelConfig: + # @review + description: + The widget instance's look and feel configuration. + items: + properties: + advancedStylingConfig: + properties: + customCSS: + type: string + customCSSClassNames: + type: string + backgroundStylesConfig: + properties: + backgroundColor: + example: "#FF0D0D" + type: string + type: object + borderStylesConfig: + properties: + borderColor: + properties: + bottom: + example: "#FF0D0D" + type: string + left: + example: "#FF0D0D" + type: string + right: + example: "#FF0D0D" + type: string + sameForAll: + type: boolean + top: + example: "#FF0D0D" + type: string + type: object + borderStyle: + properties: + bottom: + enum: + - Dashed + - Doubled + - Dotted + - Groove + - Hidden + - Dotted + - Inset + - Outset + - Ridge + - Solid + type: string + left: + enum: + - Dashed + - Doubled + - Dotted + - Groove + - Hidden + - Dotted + - Inset + - Outset + - Ridge + - Solid + type: string + right: + enum: + - Dashed + - Doubled + - Dotted + - Groove + - Hidden + - Dotted + - Inset + - Outset + - Ridge + - Solid + type: string + sameForAll: + type: boolean + top: + enum: + - Dashed + - Doubled + - Dotted + - Groove + - Hidden + - Dotted + - Inset + - Outset + - Ridge + - Solid + type: string + type: object + borderWidth: + properties: + bottom: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + left: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + right: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + sameForAll: + type: boolean + top: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + generalConfig: + properties: + applicationDecorator: + enum: [Barebone, Borderless, Decorate] + type: string + customTitle_i18n: + additionalProperties: + type: string + # @review + description: + The localized custom titles. + type: object + useCustomTitle: + # @review + description: + Whether to use a custom title. + type: boolean + type: object + marginAndPaddingConfig: + properties: + margin: + properties: + bottom: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + left: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + right: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + sameForAll: + type: boolean + top: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + padding: + properties: + bottom: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + left: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + right: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + sameForAll: + type: boolean + top: + properties: + unit: + enum: + - Emphasis + - Percentage + - Pixel + type: string + value: + type: string + type: object + textStylesConfig: + properties: + alignment: + enum: [Center, Justify, Left, Right] + type: string + bold: + type: boolean + color: + example: "#FF0D0D" + type: string + font: + enum: [Arial, Georgia, Tahoma, TimesNewRoman, TrebuchetMS, Verdana] + type: string + italic: + type: boolean + letterSpacing: + enum: + [-10px, -9px, -8px, -7px, -6px, -5px, -4px, -3px, -2px, -1px, 0px, 1px, 2px, 3px, 4px, 5px, 6px, 7px, 8px, 9px, 10px, 11px, 12px, 13px, 14px, 15px, 16px, 17px, 18px, 19px, 20px, 21px, 22px, 23px, 24px, 25px, 26px, 27px, 28px, 29px, 30px, 31px, 32px, 33px, 34px, 35px, 36px, 37px, 38px, 39px, 40px, 41px, 42px, 43px, 44px, 45px, 46px, 47px, 48px, 49px, 50px] + type: string + lineHeight: + enum: [0.1em, 0.2em, 0.3em, 0.4em, 0.5em, 0.6em, 0.7em, 0.8em, 0.9em, 1em, 1.1em, 1.2em, 1.3em, 1.4em, 1.5em, 1.6em, 1.7em, 1.8em, 1.9em, 2em, 2.1em, 2.2em, 2.3em, 2.4em, 2.5em, 2.6em, 2.7em, 2.8em, 2.9em, 3em, 3.1em, 3.2em, 3.3em, 3.4em, 3.5em, 3.6em, 3.7em, 3.8em, 3.9em, 4em, 4.1em, 4.2em, 4.3em, 4.4em, 4.5em, 4.6em, 4.7em, 4.8em, 4.9em, 5em, 5.1em, 5.2em, 5.3em, 5.4em, 5.5em, 5.6em, 5.7em, 5.8em, 5.9em, 6em, 6.1em, 6.2em, 6.3em, 6.4em, 6.5em, 6.6em, 6.7em, 6.8em, 6.9em, 7em, 7.1em, 7.2em, 7.3em, 7.4em, 7.5em, 7.6em, 7.7em, 7.8em, 7.9em, 8em, 8.1em, 8.2em, 8.3em, 8.4em, 8.5em, 8.6em, 8.7em, 8.8em, 8.9em, 9em, 9.1em, 9.2em, 9.3em, 9.4em, 9.5em, 9.6em, 9.7em, 9.8em, 9.9em, 10em, 10.1em, 10.2em, 10.3em, 10.4em, 10.5em, 10.6em, 10.7em, 10.8em, 10.9em, 11em, 11.1em, 11.2em, 11.3em, 11.4em, 11.5em, 11.6em, 11.7em, 11.8em, 11.9em, 12em] + type: string + size: + enum: + - 0.1em + - 0.2em + - 0.3em + - 0.4em + - 0.5em + - 0.6em + - 0.7em + - 0.8em + - 0.9em + - 1em + - 1.1em + - 1.2em + - 1.3em + - 1.4em + - 1.5em + - 1.6em + - 1.7em + - 1.8em + - 1.9em + - 2em + - 2.1em + - 2.2em + - 2.3em + - 2.4em + - 2.5em + - 2.6em + - 2.7em + - 2.8em + - 2.9em + - 3em + - 3.1em + - 3.2em + - 3.3em + - 3.4em + - 3.5em + - 3.6em + - 3.7em + - 3.8em + - 3.9em + - 4em + - 4.1em + - 4.2em + - 4.3em + - 4.4em + - 4.5em + - 4.6em + - 4.7em + - 4.8em + - 4.9em + - 5em + - 5.1em + - 5.2em + - 5.3em + - 5.4em + - 5.5em + - 5.6em + - 5.7em + - 5.8em + - 5.9em + - 6em + - 6.1em + - 6.2em + - 6.3em + - 6.4em + - 6.5em + - 6.6em + - 6.7em + - 6.8em + - 6.9em + - 7em + - 7.1em + - 7.2em + - 7.3em + - 7.4em + - 7.5em + - 7.6em + - 7.7em + - 7.8em + - 7.9em + - 8em + - 8.1em + - 8.2em + - 8.3em + - 8.4em + - 8.5em + - 8.6em + - 8.7em + - 8.8em + - 8.9em + - 9em + - 9.1em + - 9.2em + - 9.3em + - 9.4em + - 9.5em + - 9.6em + - 9.7em + - 9.8em + - 9.9em + - 10em + - 10.1em + - 10.2em + - 10.3em + - 10.4em + - 10.5em + - 10.6em + - 10.7em + - 10.8em + - 10.9em + - 11em + - 11.1em + - 11.2em + - 11.3em + - 11.4em + - 11.5em + - 11.6em + - 11.7em + - 11.8em + - 11.9em + - 12em + type: string + textDecoration: + enum: [None, Overline, Strikethrough, Underline] + type: string + wordSpacing: + enum: [-1em, -0.95em, -0.9em, -0.85em, -0.8em, -0.75em, -0.7em, -0.45em, -0.4em, -0.65em, -0.6em, -0.55em, -0.5em, -0.35em, -0.3em, -0.25em, -0.2em, -0.15em, -0.1em, -0.05em, Normal, 0.1em, 0.15em, 0.2em, 0.25em, 0.3em, 0.35em, 0.4em, 0.45em, 0.5em, 0.55em, 0.6em, 0.65em, 0.7em, 0.75em, 0.8em, 0.85em, 0.9em, 0.95em] + type: string + type: object + type: object + type: array + # @review + description: + A widget instance in a widget page. + type: object +info: + description: + "A Java client JAR is available for use with the group ID 'com.liferay', artifact ID + 'com.liferay.headless.admin.site.client', and version '1.0.0'." + license: + name: Apache 2.0 + url: http://www.apache.org/licenses/LICENSE-2.0.html + title: Liferay Admin Sites Headless API + version: v1.0 +openapi: 3.0.1 +paths: + "/sites/{siteExternalReferenceCode}/display-page-template-folders": + get: + # @review + description: + Retrieves the display page template folders of the site. + operationId: getSiteDisplayPageTemplateFoldersPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + type: array + tags: ["DisplayPageTemplateFolder"] + post: + # @review + description: + Adds a new display page template folder. + operationId: postSiteDisplayPageTemplateFolder + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + description: + default response + # @review + tags: ["DisplayPageTemplateFolder"] + "/sites/{siteExternalReferenceCode}/display-page-template-folders/permissions": + get: + operationId: getSiteDisplayPageTemplateFolderPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplateFolder"] + put: + operationId: putSiteDisplayPageTemplateFolderPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplateFolder"] + "/sites/{siteExternalReferenceCode}/display-page-template-folders/{displayPageTemplateFolderExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific display page template folder of a site. + operationId: deleteSiteDisplayPageTemplateFolder + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplateFolder"] + get: + # @review + description: + Retrieves a specific display page template folder of a site. + operationId: getSiteDisplayPageTemplateFolder + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + description: + default response + tags: ["DisplayPageTemplateFolder"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSiteDisplayPageTemplateFolder + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + description: + default response + tags: ["DisplayPageTemplateFolder"] + put: + # @review + description: + Updates the display page template folder with the given external reference code, or creates it if it + does not exist. + operationId: putSiteDisplayPageTemplateFolder + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplateFolder" + description: + default response + tags: ["DisplayPageTemplateFolder"] + "/sites/{siteExternalReferenceCode}/display-page-template-folders/{displayPageTemplateFolderExternalReferenceCode}/display-page-templates": + get: + # @review + description: + Retrieves all the display page templates within a display page template folder of a site page. + operationId: getSiteDisplayPageTemplateFolderDisplayPageTemplatesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplate" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplate" + type: array + # @review + tags: ["DisplayPageTemplateFolder"] + post: + # @review + description: + Adds a new display page template in draft status to a display page template folder. + operationId: postSiteDisplayPageTemplateFolderDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + description: + default response + # @review + tags: ["DisplayPageTemplateFolder"] + "/sites/{siteExternalReferenceCode}/display-page-template-folders/{displayPageTemplateFolderExternalReferenceCode}/permissions": + get: + operationId: getDisplayPageTemplateFolderPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplateFolder"] + put: + operationId: putDisplayPageTemplateFolderPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateFolderExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplateFolder"] + "/sites/{siteExternalReferenceCode}/display-page-templates": + get: + # @review + description: + Retrieves the display page templates of the site + operationId: getSiteDisplayPageTemplatesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplate" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/DisplayPageTemplate" + type: array + tags: ["DisplayPageTemplate"] + post: + # @review + description: + Adds a new display page template + operationId: postSiteDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + description: + default response + # @review + tags: ["DisplayPageTemplate"] + "/sites/{siteExternalReferenceCode}/display-page-templates/permissions": + get: + operationId: getSiteDisplayPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplate"] + put: + operationId: putSiteDisplayPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplate"] + "/sites/{siteExternalReferenceCode}/display-page-templates/{displayPageTemplateExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific display page template of a site. + operationId: deleteSiteDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplate"] + get: + # @review + description: + Retrieves a specific display page template of a site. + operationId: getSiteDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + description: + default response + tags: ["DisplayPageTemplate"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSiteDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + description: + default response + tags: ["DisplayPageTemplate"] + put: + # @review + description: + Updates the display page template with the given external reference code, or creates it if it does not + exist. + operationId: putSiteDisplayPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/DisplayPageTemplate" + description: + default response + tags: ["DisplayPageTemplate"] + "/sites/{siteExternalReferenceCode}/display-page-templates/{displayPageTemplateExternalReferenceCode}/page-specifications": + post: + # @review + description: + Adds a new page specification in draft status to a display page template. + operationId: postSiteDisplayPageTemplatePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + description: + default response + # @review + tags: ["DisplayPageTemplate"] + "/sites/{siteExternalReferenceCode}/display-page-templates/{displayPageTemplateExternalReferenceCode}/permissions": + get: + operationId: getDisplayPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplate"] + put: + operationId: putDisplayPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: displayPageTemplateExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["DisplayPageTemplate"] + "/sites/{siteExternalReferenceCode}/fragment-compositions": + get: + # @review + description: + Retrieves the fragment compositions of the site. + operationId: getSiteFragmentCompositionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FragmentComposition" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/FragmentComposition" + type: array + tags: ["FragmentComposition"] + post: + # @review + description: + Adds a new fragment composition. If the page element of the fragment composition does not contain a + definition property and contains an external reference code, the page element will be retrieved based on + the externalReferenceCode and used for creating the fragment composition. + operationId: postSiteFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: saveInlineContent + required: true + schema: + default: false + type: boolean + - in: query + name: saveMapping + required: true + schema: + default: false + type: boolean + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + description: + default response + # @review + tags: ["FragmentComposition"] + "/sites/{siteExternalReferenceCode}/fragment-compositions/{fragmentCompositionExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific fragment composition of a site. + operationId: deleteSiteFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: fragmentCompositionExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["FragmentComposition"] + get: + # @review + description: + Retrieves a specific fragment composition of a site. + operationId: getSiteFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: fragmentCompositionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + description: + default response + tags: ["FragmentComposition"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSiteFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: fragmentCompositionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + description: + default response + tags: ["FragmentComposition"] + put: + # @review + description: + Updates the fragment composition with the given external reference code, or creates it if it does not + exist. + operationId: putSiteFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: fragmentCompositionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + description: + default response + tags: ["FragmentComposition"] + "/sites/{siteExternalReferenceCode}/master-pages": + get: + # @review + description: + Retrieves the master pages of the site. + operationId: getSiteMasterPagesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/MasterPage" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/MasterPage" + type: array + tags: ["MasterPage"] + post: + # @review + description: + Adds a new master page. + operationId: postSiteMasterPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + description: + default response + # @review + tags: ["MasterPage"] + "/sites/{siteExternalReferenceCode}/master-pages/permissions": + get: + operationId: getSiteMasterPagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["MasterPage"] + put: + operationId: putSiteMasterPagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["MasterPage"] + "/sites/{siteExternalReferenceCode}/master-pages/{masterPageExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific master page of a site. + operationId: deleteSiteMasterPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["MasterPage"] + get: + # @review + description: + Retrieves a specific master page of a site. + operationId: getSiteMasterPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + description: + default response + tags: ["MasterPage"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSiteMasterPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + description: + default response + tags: ["MasterPage"] + put: + # @review + description: + Updates the master page with the given external reference code, or creates it if it does not exist. + operationId: putSiteMasterPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/MasterPage" + application/xml: + schema: + $ref: "#/components/schemas/MasterPage" + description: + default response + tags: ["MasterPage"] + "/sites/{siteExternalReferenceCode}/master-pages/{masterPageExternalReferenceCode}/page-specifications": + post: + # @review + description: + Adds a new page specification in draft status to a master page. + operationId: postSiteMasterPagePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + description: + default response + # @review + tags: ["MasterPage"] + "/sites/{siteExternalReferenceCode}/master-pages/{masterPageExternalReferenceCode}/permissions": + get: + operationId: getMasterPagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["MasterPage"] + put: + operationId: putMasterPagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: masterPageExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["MasterPage"] + "/sites/{siteExternalReferenceCode}/page-elements/{pageElementExternalReferenceCode}": + delete: + # @review + description: + Deletes a page element within an experience of a specific page specification of a site page within a + site. + operationId: deleteSitePageElement + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageElement"] + get: + # @review + description: + Retrieves a page element within an experience of a specific page specification of a site page within a + site. + operationId: getSitePageElement + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + tags: ["PageElement"] + patch: + # @review + description: + Updates a page element within an experience of a specific page specification of a site page within a + site. Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSitePageElement + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + tags: ["PageElement"] + put: + # @review + description: + Updates a page element within an experience of a specific page specification of a site page within a + site. + operationId: putSitePageElement + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + tags: ["PageElement"] + "/sites/{siteExternalReferenceCode}/page-elements/{pageElementExternalReferenceCode}/fragment-compositions": + post: + # @review + description: + Adds a new fragment composition under a page element of an experience in a page specification of a site + page. If successful, the response will contain the page element in which the fragment composition is + converted. + operationId: postSitePageElementFragmentComposition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + description: + The 0-based position with respect to the page element's children where the fragment composition + will be added (0 for before the first child, 1 for before the second child, ...). If not specified + when adding a fragment composition the fragment composition will be added at the last valid + position. + name: position + schema: + minimum: 0 + type: integer + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/FragmentComposition" + application/xml: + schema: + $ref: "#/components/schemas/FragmentComposition" + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + # @review + tags: ["PageElement"] + "/sites/{siteExternalReferenceCode}/page-elements/{pageElementExternalReferenceCode}/page-elements": + get: + # @review + description: + Retrieves all the descendant page elements of a page element within an experience in a page + specification of a site page. + operationId: getSitePageElementPageElementsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageElementExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + # @review + tags: ["PageElement"] + "/sites/{siteExternalReferenceCode}/page-experiences/{pageExperienceExternalReferenceCode}": + delete: + # @review + description: + Deletes an experience of a specific page specification of a site page within a site. The default + experience cannot be deleted. + operationId: deleteSitePageExperience + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageExperience"] + get: + # @review + description: + Retrieves an experience of a specific page specification of a site page within a site. + operationId: getSitePageExperience + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageExperience" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageExperience" + tags: ["PageExperience"] + patch: + # @review + description: + Updates an experience of a specific page specification of a site page within a site. Updates only the + fields received in the request body, leaving any other fields untouched. + operationId: patchSitePageExperience + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageExperience" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageExperience" + tags: ["PageExperience"] + put: + # @review + description: + Updates an experience of a specific page specification of a site page within a site. + operationId: putSitePageExperience + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageExperience" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageExperience" + tags: ["PageExperience"] + "/sites/{siteExternalReferenceCode}/page-experiences/{pageExperienceExternalReferenceCode}/page-elements": + get: + # @review + description: + Retrieves all the page elements within an experience in a page specification of a site page. + operationId: getSitePageExperiencePageElementsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageElement" + type: array + # @review + tags: ["PageExperience"] + post: + # @review + description: + Adds a new page element to an experience in a page specification in draft status of a site page. + operationId: postSitePageExperiencePageElement + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageElement" + application/xml: + schema: + $ref: "#/components/schemas/PageElement" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageElement" + application/xml: + schema: + $ref: "#/components/schemas/PageElement" + description: + default response + # @review + tags: ["PageExperience"] + "/sites/{siteExternalReferenceCode}/page-experiences/{pageExperienceExternalReferenceCode}/page-rules": + get: + # @review + description: + Retrieves all the page rules within an experience in a page specification of a site page. + operationId: getSitePageExperiencePageRulesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRule" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRule" + type: array + # @review + tags: ["PageExperience"] + post: + # @review + description: + Adds a new page rule to an experience in a page specification in draft status of a site page. + operationId: postSitePageExperiencePageRule + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageExperienceExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRule" + application/xml: + schema: + $ref: "#/components/schemas/PageRule" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRule" + application/xml: + schema: + $ref: "#/components/schemas/PageRule" + description: + default response + # @review + tags: ["PageExperience"] + "/sites/{siteExternalReferenceCode}/page-rule-actions/{pageRuleActionExternalReferenceCode}": + delete: + # @review + description: + Deletes a page rule action within a page rule of an experience of a specific page specification of a + site page within a site. + operationId: deleteSitePageRuleAction + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleActionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageRuleAction"] + get: + # @review + description: + Retrieves a page rule action within a page rule of an experience of a specific page specification of a + site page within a site. + operationId: getSitePageRuleAction + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleActionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + tags: ["PageRuleAction"] + patch: + # @review + description: + Updates a page rule action within a page rule of an experience of a specific page specification of a + site page within a site. Updates only the fields received in the request body, leaving any other fields + untouched. + operationId: patchSitePageRuleAction + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleActionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + tags: ["PageRuleAction"] + put: + # @review + description: + Updates a page rule action within a page rule of an experience of a specific page specification of a + site page within a site. + operationId: putSitePageRuleAction + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleActionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + tags: ["PageRuleAction"] + "/sites/{siteExternalReferenceCode}/page-rule-conditions/{pageRuleConditionExternalReferenceCode}": + delete: + # @review + description: + Deletes a page rule condition within a page rule of an experience of a specific page specification of a + site page within a site. + operationId: deleteSitePageRuleCondition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleConditionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageRuleCondition"] + get: + # @review + description: + Retrieves a page rule condition within a page rule of an experience of a specific page specification of + a site page within a site. + operationId: getSitePageRuleCondition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleConditionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + tags: ["PageRuleCondition"] + patch: + # @review + description: + Updates a page rule condition within a page rule of an experience of a specific page specification of a + site page within a site. Updates only the fields received in the request body, leaving any other fields + untouched. + operationId: patchSitePageRuleCondition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleConditionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + tags: ["PageRuleCondition"] + put: + # @review + description: + Updates a page rule condition within a page rule of an experience of a specific page specification of a + site page within a site. + operationId: putSitePageRuleCondition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleConditionExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + tags: ["PageRuleCondition"] + "/sites/{siteExternalReferenceCode}/page-rules/{pageRuleExternalReferenceCode}": + delete: + # @review + description: + Deletes a page rule within an experience of a specific page specification of a site page within a site. + operationId: deleteSitePageRule + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageRule"] + get: + # @review + description: + Retrieves page rule within an experience of a specific page specification of a site page within a site. + operationId: getSitePageRule + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRule" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRule" + tags: ["PageRule"] + patch: + # @review + description: + Updates a page rule within an experience of a specific page specification of a site page within a site. + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSitePageRule + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRule" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRule" + tags: ["PageRule"] + put: + # @review + description: + Updates a page rule within an experience of a specific page specification of a site page within a site. + operationId: putSitePageRule + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRule" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRule" + tags: ["PageRule"] + "/sites/{siteExternalReferenceCode}/page-rules/{pageRuleExternalReferenceCode}/page-rule-actions": + get: + # @review + description: + Retrieves all the page rule action actions within an experience in a page specification of a site page. + operationId: getSitePageRulePageRuleActionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleAction" + type: array + # @review + tags: ["PageRule"] + post: + # @review + description: + Adds a new page rule action to a page rule in an experience in a page specification in draft status of a + site page. + operationId: postSitePageRulePageRuleAction + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRuleAction" + application/xml: + schema: + $ref: "#/components/schemas/PageRuleAction" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRuleAction" + application/xml: + schema: + $ref: "#/components/schemas/PageRuleAction" + description: + default response + # @review + tags: ["PageRule"] + "/sites/{siteExternalReferenceCode}/page-rules/{pageRuleExternalReferenceCode}/page-rule-conditions": + get: + # @review + description: + Retrieves all the page rule condition conditions within an experience in a page specification of a site + page. + operationId: getSitePageRulePageRuleConditionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageRuleCondition" + type: array + # @review + tags: ["PageRule"] + post: + # @review + description: + Adds a new page rule condition to a page rule in an experience in a page specification in draft status + of a site page. + operationId: postSitePageRulePageRuleCondition + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageRuleExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRuleCondition" + application/xml: + schema: + $ref: "#/components/schemas/PageRuleCondition" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageRuleCondition" + application/xml: + schema: + $ref: "#/components/schemas/PageRuleCondition" + description: + default response + # @review + tags: ["PageRule"] + "/sites/{siteExternalReferenceCode}/page-specifications/{pageSpecificationExternalReferenceCode}": + delete: + # @review + description: + Deletes a page specification of a site page. + operationId: deleteSitePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageSpecification"] + get: + # @review + description: + Retrieves a page specification of a site page. + operationId: getSitePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + tags: ["PageSpecification"] + patch: + # @review + description: + Updates a page specification of a site page. Updates only the fields received in the request body, + leaving any other fields untouched. + operationId: patchSitePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + tags: ["PageSpecification"] + put: + # @review + description: + Updates a page specification of a site page. + operationId: putSitePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + tags: ["PageSpecification"] + "/sites/{siteExternalReferenceCode}/page-specifications/{pageSpecificationExternalReferenceCode}/page-experiences": + get: + # @review + description: + Retrieves all the experiences of a page specification. + operationId: getSitePageSpecificationPageExperiencesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageExperience" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageExperience" + type: array + # @review + tags: ["PageSpecification"] + post: + # @review + description: + Adds a new experience to a page specification of a site page. + operationId: postSitePageSpecificationPageExperience + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageExperience" + application/xml: + schema: + $ref: "#/components/schemas/PageExperience" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageExperience" + application/xml: + schema: + $ref: "#/components/schemas/PageExperience" + description: + default response + # @review + tags: ["PageSpecification"] + "/sites/{siteExternalReferenceCode}/page-specifications/{pageSpecificationExternalReferenceCode}/publish": + post: + # @review + description: + Publishes a page specification in draft status of a site page. + operationId: postSitePageSpecificationPublish + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageSpecificationExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/PageSpecification" + description: + default response + # @review + tags: ["PageSpecification"] + "/sites/{siteExternalReferenceCode}/page-template-sets": + get: + # @review + description: + Retrieves the page template sets of the site + operationId: getSitePageTemplateSetsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageTemplateSet" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageTemplateSet" + type: array + tags: ["PageTemplateSet"] + post: + # @review + description: + Adds a new page template set + operationId: postSitePageTemplateSet + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + description: + default response + # @review + tags: ["PageTemplateSet"] + "/sites/{siteExternalReferenceCode}/page-template-sets/permissions": + get: + operationId: getSitePageTemplateSetPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplateSet"] + put: + operationId: putSitePageTemplateSetPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplateSet"] + "/sites/{siteExternalReferenceCode}/page-template-sets/{pageTemplateSetExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific page template set of a site. + operationId: deleteSitePageTemplateSet + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplateSet"] + get: + # @review + description: + Retrieves a specific page template set of a site. + operationId: getSitePageTemplateSet + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + description: + default response + tags: ["PageTemplateSet"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSitePageTemplateSet + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + description: + default response + tags: ["PageTemplateSet"] + put: + # @review + description: + Updates the page template set with the given external reference code, or creates it if it does not + exist. + operationId: putSitePageTemplateSet + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplateSet" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplateSet" + description: + default response + tags: ["PageTemplateSet"] + "/sites/{siteExternalReferenceCode}/page-template-sets/{pageTemplateSetExternalReferenceCode}/page-templates": + get: + # @review + description: + Retrieves all the page templates within a page template set of a site page. + operationId: getSitePageTemplateSetPageTemplatesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: flatten + schema: + type: boolean + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageTemplate" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageTemplate" + type: array + # @review + tags: ["PageTemplateSet"] + post: + # @review + description: + Adds a new page template in draft status to a page template set. + operationId: postSitePageTemplateSetPageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + description: + default response + # @review + tags: ["PageTemplateSet"] + "/sites/{siteExternalReferenceCode}/page-template-sets/{pageTemplateSetExternalReferenceCode}/permissions": + get: + operationId: getPageTemplateSetPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplateSet"] + put: + operationId: putPageTemplateSetPermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateSetExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplateSet"] + "/sites/{siteExternalReferenceCode}/page-templates": + get: + # @review + description: + Retrieves the page templates of the site + operationId: getSitePageTemplatesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageTemplate" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageTemplate" + type: array + tags: ["PageTemplate"] + post: + # @review + description: + Adds a new page template + operationId: postSitePageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + description: + default response + # @review + tags: ["PageTemplate"] + "/sites/{siteExternalReferenceCode}/page-templates/permissions": + get: + operationId: getSitePageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplate"] + put: + operationId: putSitePageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplate"] + "/sites/{siteExternalReferenceCode}/page-templates/{pageTemplateExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific page template of a site. + operationId: deleteSitePageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplate"] + get: + # @review + description: + Retrieves a specific page template of a site. + operationId: getSitePageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + description: + default response + tags: ["PageTemplate"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSitePageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + description: + default response + tags: ["PageTemplate"] + put: + # @review + description: + Updates the page template with the given external reference code, or creates it if it does not exist. + operationId: putSitePageTemplate + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/PageTemplate" + application/xml: + schema: + $ref: "#/components/schemas/PageTemplate" + description: + default response + tags: ["PageTemplate"] + "/sites/{siteExternalReferenceCode}/page-templates/{pageTemplateExternalReferenceCode}/page-specifications": + post: + # @review + description: + Adds a new page specification in draft status to a page template. + operationId: postSitePageTemplatePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + description: + default response + # @review + tags: ["PageTemplate"] + "/sites/{siteExternalReferenceCode}/page-templates/{pageTemplateExternalReferenceCode}/permissions": + get: + operationId: getPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplate"] + put: + operationId: putPageTemplatePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: pageTemplateExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["PageTemplate"] + "/sites/{siteExternalReferenceCode}/site-pages": + get: + # @review + description: + Retrieves the public pages of the site + operationId: getSiteSitePagesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: aggregationTerms + schema: + items: + type: string + type: array + - in: query + name: fields + schema: + type: string + - in: query + name: filter + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: page + schema: + type: integer + - in: query + name: pageSize + schema: + type: integer + - in: query + name: restrictFields + schema: + type: string + - in: query + name: search + schema: + type: string + - in: query + name: sort + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/SitePage" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/SitePage" + type: array + tags: ["SitePage"] + post: + # @review + description: + Adds a new site page + operationId: postSiteSitePage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + description: + default response + # @review + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/permissions": + get: + operationId: getSiteSitePagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["SitePage"] + put: + operationId: putSiteSitePagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/{sitePageExternalReferenceCode}": + delete: + # @review + description: + Deletes a specific public page of a site. + operationId: deleteSiteSitePage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["SitePage"] + get: + # @review + description: + Retrieves a specific public page of a site. + operationId: getSiteSitePage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + description: + default response + tags: ["SitePage"] + patch: + # @review + description: + Updates only the fields received in the request body, leaving any other fields untouched. + operationId: patchSiteSitePage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + description: + default response + tags: ["SitePage"] + put: + # @review + description: + Updates the site page with the given external reference code, or creates it if it does not exist. + operationId: putSiteSitePage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + responses: + default: + content: + application/json: + schema: + $ref: "#/components/schemas/SitePage" + application/xml: + schema: + $ref: "#/components/schemas/SitePage" + description: + default response + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/{sitePageExternalReferenceCode}/friendly-url-history": + get: + # @review + description: + Retrieves the history of previously used URLs for a page. + operationId: getSiteSitePageFriendlyUrlHistory + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/FriendlyUrlHistory" + application/xml: + schema: + items: + $ref: "#/components/schemas/FriendlyUrlHistory" + # @review + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/{sitePageExternalReferenceCode}/page-specifications": + get: + # @review + description: + Retrieves all the page specifications of a site page. + operationId: getSiteSitePagePageSpecificationsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/PageSpecification" + type: array + # @review + tags: ["SitePage"] + post: + # @review + description: + Adds a new page specification to a site page. + operationId: postSiteSitePagePageSpecification + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + application/xml: + schema: + $ref: "#/components/schemas/ContentPageSpecification" + description: + default response + # @review + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/{sitePageExternalReferenceCode}/permissions": + get: + operationId: getSitePagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + - in: query + name: roleNames + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["SitePage"] + put: + operationId: putSitePagePermissionsPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + requestBody: + content: + application/json: {} + application/xml: {} + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/site-pages/{sitePageExternalReferenceCode}/widget-instances": + get: + # @review + description: + Retrieves all the widget instances of a widget page. + operationId: getSiteSitePageWidgetInstancesPage + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + # @review + tags: ["SitePage"] + post: + # @review + description: + Adds a new widget instance to a widget page. + operationId: postSiteSitePageWidgetInstance + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: sitePageExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + application/xml: + schema: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + responses: + 200: + content: + application/json: + schema: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + application/xml: + schema: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + description: + default response + # @review + tags: ["SitePage"] + "/sites/{siteExternalReferenceCode}/widget-instances/{widgetInstanceExternalReferenceCode}": + delete: + # @review + description: + Deletes a widget instance of a specific widget page or widget page template within a site. + operationId: deleteSiteWidgetInstance + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: widgetInstanceExternalReferenceCode + required: true + schema: + type: string + responses: + 204: + content: + application/json: {} + application/xml: {} + tags: ["WidgetInstance"] + get: + # @review + description: + Retrieves a widget instance of a widget page or widget page template within a site. + operationId: getSiteWidgetInstance + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: widgetInstanceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + tags: ["WidgetInstance"] + patch: + # @review + description: + Updates a widget instance of a widget page or widget page template within a site. Updates only the + fields received in the request body, leaving any other fields untouched. + operationId: patchSiteWidgetInstance + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: widgetInstanceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + tags: ["WidgetInstance"] + put: + # @review + description: + Updates a widget instance of a widget page or widget page template within a site. + operationId: putSiteWidgetInstance + parameters: + - in: path + name: siteExternalReferenceCode + required: true + schema: + type: string + - in: path + name: widgetInstanceExternalReferenceCode + required: true + schema: + type: string + - in: query + name: fields + schema: + type: string + - in: query + name: nestedFields + schema: + type: string + - in: query + name: restrictFields + schema: + type: string + responses: + 200: + content: + application/json: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + type: array + application/xml: + schema: + items: + $ref: "#/components/schemas/WidgetPageWidgetInstance" + tags: ["WidgetInstance"] \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-impl/src/main/java/com/liferay/headless/admin/site/internal/jaxrs/application/HeadlessAdminSiteApplication.java b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/src/main/java/com/liferay/headless/admin/site/internal/jaxrs/application/HeadlessAdminSiteApplication.java new file mode 100644 index 00000000000000..2e0c1f0e0b06a9 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-impl/src/main/java/com/liferay/headless/admin/site/internal/jaxrs/application/HeadlessAdminSiteApplication.java @@ -0,0 +1,29 @@ +/** + * SPDX-FileCopyrightText: (c) 2024 Liferay, Inc. https://liferay.com + * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 + */ + +package com.liferay.headless.admin.site.internal.jaxrs.application; + +import javax.annotation.Generated; + +import javax.ws.rs.core.Application; + +import org.osgi.service.component.annotations.Component; + +/** + * @author Rubén Pulido + * @generated + */ +@Component( + property = { + "liferay.jackson=false", + "osgi.jaxrs.application.base=/headless-admin-site", + "osgi.jaxrs.extension.select=(osgi.jaxrs.name=Liferay.Vulcan)", + "osgi.jaxrs.name=Liferay.Headless.Admin.Site" + }, + service = Application.class +) +@Generated("") +public class HeadlessAdminSiteApplication extends Application { +} \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-test/bnd.bnd b/modules/apps/headless/headless-admin-site/headless-admin-site-test/bnd.bnd new file mode 100644 index 00000000000000..ac76db60c11928 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-test/bnd.bnd @@ -0,0 +1,4 @@ +Bundle-Name: Liferay Headless Admin Site Test +Bundle-SymbolicName: com.liferay.headless.admin.site.test +Bundle-Version: 1.0.0 +-includeresource: com.liferay.headless.admin.site.client.jar=com.liferay.headless.admin.site.client-*.jar;lib:=true \ No newline at end of file diff --git a/modules/apps/headless/headless-admin-site/headless-admin-site-test/build.gradle b/modules/apps/headless/headless-admin-site/headless-admin-site-test/build.gradle new file mode 100644 index 00000000000000..1476a82c09d716 --- /dev/null +++ b/modules/apps/headless/headless-admin-site/headless-admin-site-test/build.gradle @@ -0,0 +1,10 @@ +dependencies { + testIntegrationImplementation group: "com.fasterxml.jackson.core", name: "jackson-databind", version: "2.16.1" + testIntegrationImplementation group: "javax.annotation", name: "javax.annotation-api", version: "1.3.2" + testIntegrationImplementation group: "javax.ws.rs", name: "javax.ws.rs-api", version: "2.1" + testIntegrationImplementation project(":apps:headless:headless-admin-site:headless-admin-site-api") + testIntegrationImplementation project(":apps:headless:headless-admin-site:headless-admin-site-client") + testIntegrationImplementation project(":apps:portal-odata:portal-odata-api") + testIntegrationImplementation project(":apps:portal-vulcan:portal-vulcan-api") + testIntegrationImplementation project(":test:arquillian-extension-junit-bridge") +} \ No newline at end of file