From 965e822e1407f831b3a64b8a2a9bfb40e230bd4c Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Tue, 25 Jun 2024 12:57:43 +0530 Subject: [PATCH 01/12] feat : variants implementation --- src/main/java/com/contentstack/sdk/Entry.java | 35 ++++++++++++++ .../java/com/contentstack/sdk/TestEntry.java | 46 +++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/src/main/java/com/contentstack/sdk/Entry.java b/src/main/java/com/contentstack/sdk/Entry.java index bb5faf3b..6a5b1562 100644 --- a/src/main/java/com/contentstack/sdk/Entry.java +++ b/src/main/java/com/contentstack/sdk/Entry.java @@ -1099,4 +1099,39 @@ public Entry includeMetadata() { params.put("include_metadata", true); return this; } + + /** + * @method variants + * @memberof Entry + * @description The variant header will be added to client + * @returns {Entry} + * @example + * import contentstack from '@contentstack/delivery-sdk' + * + * Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment"); + * Entry entry = stack.contentType("user").entry("entry_uid").variant("variant_uid").fetch(); + */ + public Entry variants(@NotNull String variants){ + if (variants != null && variants.length() > 0) { + this.headers.put("x-cs-variant-uid", variants.trim()); + } + return this; + + } + public Entry variants(@NotNull String[] variants){ + if (variants != null && variants.length > 0) { + List variantList = new ArrayList<>(); + for (String variant : variants) { + if(variant != null && !variant.trim().isEmpty()) + variantList.add(variant.trim()); + } + if(!variantList.isEmpty()){ + this.headers.put("x-cs-variant-uid", String.join(", ", variantList)); + } + } + return this; + } + public LinkedHashMap getHeaders() { + return headers; +} } diff --git a/src/test/java/com/contentstack/sdk/TestEntry.java b/src/test/java/com/contentstack/sdk/TestEntry.java index d0fb1089..24117ff8 100644 --- a/src/test/java/com/contentstack/sdk/TestEntry.java +++ b/src/test/java/com/contentstack/sdk/TestEntry.java @@ -7,6 +7,8 @@ import java.util.GregorianCalendar; import java.util.logging.Logger; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.junit.jupiter.api.Assertions.assertTrue; @TestInstance(TestInstance.Lifecycle.PER_CLASS) @@ -62,6 +64,50 @@ public void onCompletion(ResponseType responseType, Error error) { }); logger.info("passed.."); } + @Test + void VariantsTestSingleUid(){ + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(" cs672c33271558d8b0 "); + entry.fetch(new EntryResultCallBack() { + @Override + public void onCompletion(ResponseType responseType, Error error) { + assertEquals("cs672c33271558d8b0", entry.getHeaders().get("x-cs-variant-uid")); + System.out.println(entry.toJSON()); + } + }); + } + @Test + void VariantsTestArray(){ + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(new String[]{" cs672c33271558d8b0"," cs321fbc07ec71861b"," cs321fbc07ec71861b "}); + entry.fetch(new EntryResultCallBack() { + @Override + public void onCompletion(ResponseType responseType, Error error) { + System.out.println(entry.toJSON()); + } + }); + } + + @Test + void VariantsTestArrayWithMixedElements() { + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(new String[]{"", " cs672c33271558d8b0 ", null, " "}); + entry.fetch(new EntryResultCallBack() { + @Override + public void onCompletion(ResponseType responseType, Error error) { + System.out.println(entry.toJSON()); + } + }); + } + + @Test + void VariantsTestNullString() { + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants((String) null); + entry.fetch(new EntryResultCallBack() { + @Override + public void onCompletion(ResponseType responseType, Error error) { + assertNull(entry.getHeaders().get("x-cs-variant-uid")); + System.out.println(entry.toJSON()); + } + }); + } @Test @Order(4) From db126558a2d206fb079e16910e2d2de148eb1627 Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Thu, 27 Jun 2024 12:51:00 +0530 Subject: [PATCH 02/12] Chore : indentation and dummy ids added --- src/main/java/com/contentstack/sdk/Entry.java | 12 ++++++----- .../com/contentstack/sdk/Credentials.java | 12 +++++++++++ .../java/com/contentstack/sdk/TestEntry.java | 21 ++++++------------- 3 files changed, 25 insertions(+), 20 deletions(-) diff --git a/src/main/java/com/contentstack/sdk/Entry.java b/src/main/java/com/contentstack/sdk/Entry.java index 6a5b1562..ee776d1b 100644 --- a/src/main/java/com/contentstack/sdk/Entry.java +++ b/src/main/java/com/contentstack/sdk/Entry.java @@ -1111,14 +1111,15 @@ public Entry includeMetadata() { * Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment"); * Entry entry = stack.contentType("user").entry("entry_uid").variant("variant_uid").fetch(); */ - public Entry variants(@NotNull String variants){ - if (variants != null && variants.length() > 0) { - this.headers.put("x-cs-variant-uid", variants.trim()); + public Entry variants(@NotNull String variants) { + if (variants != null && variants.length() > 0) { + this.headers.put("x-cs-variant-uid", variants.trim()); } return this; } - public Entry variants(@NotNull String[] variants){ + + public Entry variants(@NotNull String[] variants) { if (variants != null && variants.length > 0) { List variantList = new ArrayList<>(); for (String variant : variants) { @@ -1131,7 +1132,8 @@ public Entry variants(@NotNull String[] variants){ } return this; } + public LinkedHashMap getHeaders() { return headers; -} + } } diff --git a/src/test/java/com/contentstack/sdk/Credentials.java b/src/test/java/com/contentstack/sdk/Credentials.java index e2a93451..4da2fa5a 100644 --- a/src/test/java/com/contentstack/sdk/Credentials.java +++ b/src/test/java/com/contentstack/sdk/Credentials.java @@ -2,6 +2,7 @@ import io.github.cdimascio.dotenv.Dotenv; import java.rmi.AccessException; +import java.util.Arrays; public class Credentials { static Dotenv env = getEnv(); @@ -32,7 +33,18 @@ public static Dotenv getEnv() { public final static String ENVIRONMENT = (env.get("ENVIRONMENT") != null) ? env.get("ENVIRONMENT") : "env1"; public final static String CONTENT_TYPE = (env.get("contentType") != null) ? env.get("contentType") : "product"; public final static String ENTRY_UID = (env.get("assetUid") != null) ? env.get("assetUid") : ""; + public final static String VARIANT_UID = (env.get("variantUid") != null) ? env.get("variantUid") : ""; + public final static String[] VARIANTS_UID ; + static { String variantsUidString = env.get("variantsUid"); + if (variantsUidString != null && !variantsUidString.trim().isEmpty()) { + VARIANTS_UID = Arrays.stream(variantsUidString.split(",")) + .map(String::trim) + .toArray(String[]::new); + } else { + VARIANTS_UID = new String[]{}; + } + } private static volatile Stack stack; diff --git a/src/test/java/com/contentstack/sdk/TestEntry.java b/src/test/java/com/contentstack/sdk/TestEntry.java index 24117ff8..cc3b74b4 100644 --- a/src/test/java/com/contentstack/sdk/TestEntry.java +++ b/src/test/java/com/contentstack/sdk/TestEntry.java @@ -20,7 +20,9 @@ class TestEntry { private final Stack stack = Credentials.getStack(); private Entry entry; private final String CONTENT_TYPE = Credentials.CONTENT_TYPE; - + private final String VARIANT_UID = Credentials.VARIANT_UID; + private static final String[] VARIANT_UIDS = Credentials.VARIANTS_UID ; + @Test @Order(1) void entryCallingPrivateModifier() { @@ -66,18 +68,18 @@ public void onCompletion(ResponseType responseType, Error error) { } @Test void VariantsTestSingleUid(){ - entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(" cs672c33271558d8b0 "); + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(VARIANT_UID); entry.fetch(new EntryResultCallBack() { @Override public void onCompletion(ResponseType responseType, Error error) { - assertEquals("cs672c33271558d8b0", entry.getHeaders().get("x-cs-variant-uid")); + assertEquals(VARIANT_UID.trim(), entry.getHeaders().get("x-cs-variant-uid")); System.out.println(entry.toJSON()); } }); } @Test void VariantsTestArray(){ - entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(new String[]{" cs672c33271558d8b0"," cs321fbc07ec71861b"," cs321fbc07ec71861b "}); + entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(VARIANT_UIDS); entry.fetch(new EntryResultCallBack() { @Override public void onCompletion(ResponseType responseType, Error error) { @@ -86,17 +88,6 @@ public void onCompletion(ResponseType responseType, Error error) { }); } - @Test - void VariantsTestArrayWithMixedElements() { - entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(new String[]{"", " cs672c33271558d8b0 ", null, " "}); - entry.fetch(new EntryResultCallBack() { - @Override - public void onCompletion(ResponseType responseType, Error error) { - System.out.println(entry.toJSON()); - } - }); - } - @Test void VariantsTestNullString() { entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants((String) null); From fb5097239766fb3869bb0a704df78d8ea776696a Mon Sep 17 00:00:00 2001 From: reeshika-h Date: Thu, 27 Jun 2024 13:06:45 +0530 Subject: [PATCH 03/12] Chore : Indentation done --- src/main/java/com/contentstack/sdk/Entry.java | 483 +++++++++--------- .../com/contentstack/sdk/Credentials.java | 14 +- .../java/com/contentstack/sdk/TestEntry.java | 32 +- 3 files changed, 278 insertions(+), 251 deletions(-) diff --git a/src/main/java/com/contentstack/sdk/Entry.java b/src/main/java/com/contentstack/sdk/Entry.java index ee776d1b..caae10b9 100644 --- a/src/main/java/com/contentstack/sdk/Entry.java +++ b/src/main/java/com/contentstack/sdk/Entry.java @@ -13,7 +13,9 @@ /** * The Get a single - * Entry request + * Entry + * request * fetches a particular entry of a content type. * * @author Shailesh Mishra @@ -73,14 +75,14 @@ public Entry configure(JSONObject jsonObject) { * Set headers. * * @param key - * custom_header_key + * custom_header_key * @param value - * custom_header_value
- *
- * Example :
+ * custom_header_value
+ *
+ * Example :
* - *
-     *                                                                                         
+ *
+     *              
*/ public void setHeader(String key, String value) { @@ -93,15 +95,15 @@ public void setHeader(String key, String value) { * Remove header key. * * @param key - * custom_header_key
- *
- * Example :
- * - *
-     *                                                                         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
-     *                                                                         Entry entry = stack.contentType("form_name").entry("entry_uid");
-     *                                                                         entry.removeHeader("custom_header_key");
-     *                                                                         
+ * custom_header_key
+ *
+ * Example :
+ * + *
+     *            Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
+     *            Entry entry = stack.contentType("form_name").entry("entry_uid");
+     *            entry.removeHeader("custom_header_key");
+     *            
*/ public void removeHeader(String key) { @@ -114,10 +116,10 @@ public void removeHeader(String key) { * Get title string * * @return String @title
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String title = entry.getTitle();
      *         
*/ @@ -130,10 +132,10 @@ public String getTitle() { * Get url string * * @return String @url
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String url = entry.getURL();
      *         
*/ @@ -146,10 +148,10 @@ public String getURL() { * Get tags. * * @return String @tags
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String[] tags = entry.getURL();
      *         
*/ @@ -166,10 +168,10 @@ protected void setTags(String[] tags) { * Get contentType name. * * @return String @contentTypeName
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String contentType = entry.getFileType();
      *         
*/ @@ -182,10 +184,10 @@ public String getContentType() { * Get uid. * * @return String @uid
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String uid = entry.getUid();
      *         
*/ @@ -204,12 +206,12 @@ public String getLocale() { /** * @param locale - * {@link String} + * {@link String} * @return Entry
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Entry entry = entry.setLanguage();
      *         
*/ @@ -223,10 +225,10 @@ public Entry setLocale(@NotNull String locale) { * Get entry representation in json * * @return resultJson
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         JSONObject json = entry.toJSON();
      *         
*/ @@ -239,13 +241,14 @@ public JSONObject toJSON() { * Get object value for key. * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    Object obj = entry.get("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            Object obj = entry.get("key");
+     *            
+ * * @return Object @resultJson */ public Object get(@NotNull String key) { @@ -256,13 +259,14 @@ public Object get(@NotNull String key) { * Get string value for key. * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    String value = entry.getString("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            String value = entry.getString("key");
+     *            
+ * * @return String @getString */ @@ -278,13 +282,14 @@ public String getString(@NotNull String key) { * Get boolean value for key. * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    Boolean value = entry.getBoolean("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            Boolean value = entry.getBoolean("key");
+     *            
+ * * @return boolean @getBoolean */ @@ -300,13 +305,14 @@ public Boolean getBoolean(@NotNull String key) { * Get {@link JSONArray} value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    JSONArray value = entry.getJSONArray("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            JSONArray value = entry.getJSONArray("key");
+     *            
+ * * @return JSONArray @getJSONArray */ @@ -322,13 +328,14 @@ public JSONArray getJSONArray(@NotNull String key) { * Get {@link JSONObject} value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    JSONObject value = entry.getJSONObject("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            JSONObject value = entry.getJSONObject("key");
+     *            
+ * * @return JSONObject @getJSONObject */ public JSONObject getJSONObject(@NotNull String key) { @@ -343,13 +350,14 @@ public JSONObject getJSONObject(@NotNull String key) { * Get {@link JSONObject} value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    JSONObject value = entry.getJSONObject("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            JSONObject value = entry.getJSONObject("key");
+     *            
+ * * @return Number @getNumber */ @@ -365,13 +373,14 @@ public Number getNumber(@NotNull String key) { * Get integer value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    int value = entry.getInt("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            int value = entry.getInt("key");
+     *            
+ * * @return int @getInt */ @@ -387,12 +396,12 @@ public int getInt(@NotNull String key) { * Get integer value for key * * @param key - * field_uid as key. + * field_uid as key. * @return float @getFloat
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         float value = entry.getFloat("key");
      *         
*/ @@ -409,12 +418,12 @@ public float getFloat(@NotNull String key) { * Get double value for key * * @param key - * field_uid as key. + * field_uid as key. * @return double @getDouble
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         double value = entry.getDouble("key");
      *         
*/ @@ -431,13 +440,14 @@ public double getDouble(@NotNull String key) { * Get long value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                 long value = entry.getLong("key");
-     *                                                                                 
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            long value = entry.getLong("key");
+     *            
+ * * @return long @getLong */ @@ -453,15 +463,16 @@ public long getLong(@NotNull String key) { * Get short value for key * * @param key - * field_uid as key. + * field_uid as key. * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *
-     *                                                                                                                                                                                                                                                                    short value = entry.getShort("key");
-     *                                                                                                                                                                                                                                                                    
+ *
+     *            short value = entry.getShort("key");
+     *            
+ * * @return short @getShort */ public short getShort(@NotNull String key) { @@ -476,13 +487,14 @@ public short getShort(@NotNull String key) { * Get {@link Calendar} value for key * * @param key - * field_uid as key.
- *
- * Example :
- * - *
-     *                                                                                                                                                                                                                                                                    Calendar value = entry.getDate("key");
-     *                                                                                                                                                                                                                                                                    
+ * field_uid as key.
+ *
+ * Example :
+ * + *
+     *            Calendar value = entry.getDate("key");
+     *            
+ * * @return Calendar @getDate */ @@ -500,10 +512,10 @@ public Calendar getDate(@NotNull String key) { * Get {@link Calendar} value of creation time of entry. * * @return Calendar @getCreateAt
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Calendar createdAt = entry.getCreateAt("key");
      *         
*/ @@ -522,10 +534,10 @@ public Calendar getCreateAt() { * Get uid who created this entry. * * @return String @getCreatedBy
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String createdBy_uid = entry.getCreatedBy();
      *         
*/ @@ -537,10 +549,10 @@ public String getCreatedBy() { * Get {@link Calendar} value of updating time of entry. * * @return Calendar @getUpdateAt
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Calendar updatedAt = entry.getUpdateAt("key");
      *         
*/ @@ -559,10 +571,10 @@ public Calendar getUpdateAt() { * Get uid who updated this entry. * * @return String @getString
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String updatedBy_uid = entry.getUpdatedBy();
      *         
*/ @@ -575,11 +587,11 @@ public String getUpdatedBy() { * * @return Calendar * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Calendar updatedAt = entry.getUpdateAt("key");
      *         
*/ @@ -598,10 +610,10 @@ public Calendar getDeleteAt() { * Get uid who deleted this entry. * * @return String
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         String deletedBy_uid = entry.getDeletedBy();
      *         
*/ @@ -613,12 +625,12 @@ public String getDeletedBy() { * Get an asset from the entry * * @param key - * field_uid as key. + * field_uid as key. * @return Asset
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Asset asset = entry.getAsset("key");
      *         
*/ @@ -640,7 +652,7 @@ public Asset getAsset(String key) { *
* * @param key - * This is the String key + * This is the String key * @return ArrayList This returns list of Assets. */ @@ -659,14 +671,15 @@ public List getAssets(String key) { /** * @param key - * field_uid as key.
- *
- * Example :
+ * field_uid as key.
+ *
+ * Example :
* - *
+     *            
      *                                                                                                                                                                                                                                                                     Group innerGroup = entry.getGroup("key");
      *                                                                                                                                                                                                                                                                     return null
-     *                                                                                                                                                                                                                                                                    
+ *
+ * * @return {@link Group} */ public Group getGroup(String key) { @@ -682,12 +695,12 @@ public Group getGroup(String key) { * Note :- This will work when group is multiple true. * * @param key - * field_uid as key. + * field_uid as key. * @return list of group from entry
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Group innerGroup = entry.getGroups("key");
      *         
*/ @@ -708,15 +721,16 @@ public List getGroups(String key) { * Get value for the given reference key. * * @param refKey - * key of a reference field. + * key of a reference field. * @param refContentType - * class uid. - * @return {@link ArrayList} of {@link Entry} instances. Also specified contentType value will be set as class uid - * for all {@link Entry} instance.
- *
- * Example :
+ * class uid. + * @return {@link ArrayList} of {@link Entry} instances. Also specified + * contentType value will be set as class uid + * for all {@link Entry} instance.
+ *
+ * Example :
* - *
+     *         
      *          {@code
      *          Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *          Query csQuery = stack.contentType("contentType_name").query();
@@ -763,10 +777,11 @@ public List getAllEntries(String refKey, String refContentType) {
     }
 
     /**
-     * Specifies list of field ids that would be 'excluded' from the response.
+     * Specifies list of field ids that would be 'excluded' from the
+     * response.
      *
      * @param fieldUid
-     *         field uid which get 'excluded' from the response.
+     *                 field uid which get 'excluded' from the response.
      */
 
     public Entry except(@NotNull String[] fieldUid) {
@@ -785,7 +800,7 @@ public Entry except(@NotNull String[] fieldUid) {
      * Add a constraint that requires a particular reference key details.
      *
      * @param referenceField
-     *         key that to be constrained.
+     *                       key that to be constrained.
      */
     public Entry includeReference(@NotNull String referenceField) {
         if (!referenceField.isEmpty()) {
@@ -802,7 +817,7 @@ public Entry includeReference(@NotNull String referenceField) {
      * Add a constraint that requires a particular reference key details.
      *
      * @param referenceFields
-     *         array key that to be constrained.
+     *                        array key that to be constrained.
      */
     public Entry includeReference(@NotNull String[] referenceFields) {
         if (referenceFields.length > 0) {
@@ -818,15 +833,17 @@ public Entry includeReference(@NotNull String[] referenceFields) {
     }
 
     /**
-     * Specifies an array of 'only' keys in BASE object that would be 'included' in the response.
+     * Specifies an array of 'only' keys in BASE object that would be
+     * 'included' in the response.
      *
      * @param fieldUid
-     *         Array of the 'only' reference keys to be included in response.
+     *                 Array of the 'only' reference keys to be included in
+     *                 response.
      * @return {@link Entry} object, so you can chain this call. 
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *          Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *          Entry entry = stack.contentType("form_name").entry("entry_uid");
* entry.only(new String[]{"name", "description"}); @@ -845,12 +862,14 @@ public Entry only(String[] fieldUid) { } /** - * Specifies an array of 'only' keys that would be 'included' in the response. + * Specifies an array of 'only' keys that would be 'included' in + * the response. * * @param fieldUid - * Array of the 'only' reference keys to be included in response. + * Array of the 'only' reference keys to be + * included in response. * @param referenceFieldUid - * Key who has reference to some other class object. + * Key who has reference to some other class object. */ public Entry onlyWithReferenceUid(@NotNull List fieldUid, @NotNull String referenceFieldUid) { @@ -865,12 +884,14 @@ public Entry onlyWithReferenceUid(@NotNull List fieldUid, @NotNull Strin } /** - * Specifies an array of 'except' keys that would be 'excluded' in the response. + * Specifies an array of 'except' keys that would be 'excluded' + * in the response. * * @param fieldUid - * Array of the 'except' reference keys to be excluded in response. + * Array of the 'except' reference keys to be + * excluded in response. * @param referenceFieldUid - * Key who has reference to some other class object. + * Key who has reference to some other class object. */ public Entry exceptWithReferenceUid(@NotNull List fieldUid, @NotNull String referenceFieldUid) { if (exceptJsonObject == null) { @@ -887,11 +908,12 @@ public Entry exceptWithReferenceUid(@NotNull List fieldUid, @NotNull Str * Fetches the latest version of the entries from Contentstack.com content stack * * @param callback - * {@link EntryResultCallBack} object to notify the application when the request has completed.
- *
- * Example :
+ * {@link EntryResultCallBack} object to notify the application + * when the request has completed.
+ *
+ * Example :
* - *
+     *                 
      *                        {@code
      *                       Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *                       Entry entry = stack.contentType("form_name").entry("entry_uid");
@@ -917,7 +939,6 @@ public void fetch(EntryResultCallBack callback) { fetchFromNetwork(urlString, urlQueries, callback); } - private void fetchFromNetwork(String urlString, JSONObject urlQueries, EntryResultCallBack callBack) { JSONObject mainJson = new JSONObject(); @@ -929,7 +950,6 @@ private void fetchFromNetwork(String urlString, JSONObject urlQueries, EntryResu } - private LinkedHashMap getUrlParams(JSONObject jsonMain) { JSONObject queryJSON = jsonMain.optJSONObject("query"); LinkedHashMap hashMap = new LinkedHashMap<>(); @@ -987,16 +1007,16 @@ private void throwException(@Nullable String errorMsg, Exception e, EntryResultC * This method adds key and value to an Entry. * * @param key - * The key as string which needs to be added to an Entry + * The key as string which needs to be added to an Entry * @param value - * The value as string which needs to be added to an Entry + * The value as string which needs to be added to an Entry * @return {@link Entry} * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         {@code
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         final Entry entry = stack.contentType("user").entry("entryUid"); 
@@ -1016,7 +1036,8 @@ public Entry addParam(@NotNull String key, @NotNull String value) { } /** - * This method also includes the content type UIDs of the referenced entries returned in the response + * This method also includes the content type UIDs of the referenced entries + * returned in the response */ public Entry includeReferenceContentTypeUID() { params.put("include_reference_content_type_uid", "true"); @@ -1034,13 +1055,14 @@ public Entry includeContentType() { } /** - * Retrieve the published content of the fallback locale if an entry is not localized in specified locale + * Retrieve the published content of the fallback locale if an entry is not + * localized in specified locale * * @return {@link Entry} object, so you can chain this call.
- *
- * Example :
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         final Entry entry = stack.contentType("user").entry("entryUid");
      *         entry.includeFallback();
@@ -1052,7 +1074,8 @@ public Entry includeFallback() {
     }
 
     /**
-     * includeEmbeddedItems instance of Entry Include Embedded Objects (Entries and Assets) along with entry/entries
+     * includeEmbeddedItems instance of Entry Include Embedded Objects (Entries and
+     * Assets) along with entry/entries
      * details.
*/ public Entry includeEmbeddedItems() { @@ -1065,11 +1088,11 @@ public Entry includeEmbeddedItems() { * * @return {@link Entry} object, so you can chain this call. * - *
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         final Entry entry = stack.contentType("user").entry("entryUid");
      *         entry.includeBranch();
@@ -1085,11 +1108,11 @@ public Entry includeBranch() {
      *
      * @return {@link Entry} object, so you can chain this call.
      *
-     * 
- *
- * Example :
+ *
+ *
+ * Example :
* - *
+     *         
      *         Stack stack = Contentstack.stack("apiKey", "deliveryToken", "environment");
      *         final Entry entry = stack.contentType("user").entry("entryUid");
      *         entry.includeMetadata();
@@ -1101,39 +1124,41 @@ public Entry includeMetadata() {
     }
 
     /**
-    * @method variants
-    * @memberof Entry
-    * @description The variant header will be added to client
-    * @returns {Entry}
-    * @example
-    * import contentstack from '@contentstack/delivery-sdk'
-    *
-    * Stack stack = contentstack.Stack("apiKey", "deliveryToken", "environment");
-    * Entry entry = stack.contentType("user").entry("entry_uid").variant("variant_uid").fetch();
-    */
-   public Entry variants(@NotNull String variants) {
-    if (variants != null && variants.length() > 0) {
-        this.headers.put("x-cs-variant-uid", variants.trim());
-    }
-    return this;
-  
-  }
-
-  public Entry variants(@NotNull String[] variants) {
-    if (variants != null && variants.length > 0) {
-        List variantList = new ArrayList<>();
-        for (String variant : variants) {
-            if(variant != null && !variant.trim().isEmpty())
-            variantList.add(variant.trim());
+     * @method variants
+     * @memberof Entry
+     * @description The variant header will be added to client
+     * @returns {Entry}
+     * @example
+     *          import contentstack from '@contentstack/delivery-sdk'
+     *
+     *          Stack stack = contentstack.Stack("apiKey", "deliveryToken",
+     *          "environment");
+     *          Entry entry =
+     *          stack.contentType("user").entry("entry_uid").variant("variant_uid").fetch();
+     */
+    public Entry variants(@NotNull String variants) {
+        if (variants != null && variants.length() > 0) {
+            this.headers.put("x-cs-variant-uid", variants.trim());
         }
-        if(!variantList.isEmpty()){
-            this.headers.put("x-cs-variant-uid", String.join(", ", variantList));
+        return this;
+
+    }
+
+    public Entry variants(@NotNull String[] variants) {
+        if (variants != null && variants.length > 0) {
+            List variantList = new ArrayList<>();
+            for (String variant : variants) {
+                if (variant != null && !variant.trim().isEmpty())
+                    variantList.add(variant.trim());
+            }
+            if (!variantList.isEmpty()) {
+                this.headers.put("x-cs-variant-uid", String.join(", ", variantList));
+            }
         }
+        return this;
+    }
+
+    public LinkedHashMap getHeaders() {
+        return headers;
     }
-    return this;
-  }
-  
-  public LinkedHashMap getHeaders() {
-    return headers;
-  }   
 }
diff --git a/src/test/java/com/contentstack/sdk/Credentials.java b/src/test/java/com/contentstack/sdk/Credentials.java
index 4da2fa5a..e513b837 100644
--- a/src/test/java/com/contentstack/sdk/Credentials.java
+++ b/src/test/java/com/contentstack/sdk/Credentials.java
@@ -1,4 +1,5 @@
 package com.contentstack.sdk;
+
 import io.github.cdimascio.dotenv.Dotenv;
 
 import java.rmi.AccessException;
@@ -7,7 +8,6 @@
 public class Credentials {
     static Dotenv env = getEnv();
 
-
     private static String envChecker() {
         String githubActions = System.getenv("GITHUB_ACTIONS");
         if (githubActions != null && githubActions.equals("true")) {
@@ -26,7 +26,6 @@ public static Dotenv getEnv() {
         return Dotenv.load();
     }
 
-
     public final static String HOST = (env.get("HOST") != null) ? env.get("HOST") : "cdn.contentstack.io";
     public final static String API_KEY = (env.get("API_KEY") != null) ? env.get("API_KEY") : "";
     public final static String DELIVERY_TOKEN = (env.get("DELIVERY_TOKEN") != null) ? env.get("DELIVERY_TOKEN") : "";
@@ -34,15 +33,16 @@ public static Dotenv getEnv() {
     public final static String CONTENT_TYPE = (env.get("contentType") != null) ? env.get("contentType") : "product";
     public final static String ENTRY_UID = (env.get("assetUid") != null) ? env.get("assetUid") : "";
     public final static String VARIANT_UID = (env.get("variantUid") != null) ? env.get("variantUid") : "";
-    public final static String[] VARIANTS_UID ;
-   static {  String variantsUidString = env.get("variantsUid");
+    public final static String[] VARIANTS_UID;
+    static {
+        String variantsUidString = env.get("variantsUid");
 
         if (variantsUidString != null && !variantsUidString.trim().isEmpty()) {
             VARIANTS_UID = Arrays.stream(variantsUidString.split(","))
-                                 .map(String::trim)
-                                 .toArray(String[]::new);
+                    .map(String::trim)
+                    .toArray(String[]::new);
         } else {
-            VARIANTS_UID = new String[]{};
+            VARIANTS_UID = new String[] {};
         }
     }
 
diff --git a/src/test/java/com/contentstack/sdk/TestEntry.java b/src/test/java/com/contentstack/sdk/TestEntry.java
index cc3b74b4..7df8c94c 100644
--- a/src/test/java/com/contentstack/sdk/TestEntry.java
+++ b/src/test/java/com/contentstack/sdk/TestEntry.java
@@ -21,8 +21,8 @@ class TestEntry {
     private Entry entry;
     private final String CONTENT_TYPE = Credentials.CONTENT_TYPE;
     private final String VARIANT_UID = Credentials.VARIANT_UID;
-    private static final String[] VARIANT_UIDS = Credentials.VARIANTS_UID ;
-    
+    private static final String[] VARIANT_UIDS = Credentials.VARIANTS_UID;
+
     @Test
     @Order(1)
     void entryCallingPrivateModifier() {
@@ -66,38 +66,40 @@ public void onCompletion(ResponseType responseType, Error error) {
         });
         logger.info("passed..");
     }
+
     @Test
-    void VariantsTestSingleUid(){
+    void VariantsTestSingleUid() {
         entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(VARIANT_UID);
         entry.fetch(new EntryResultCallBack() {
             @Override
             public void onCompletion(ResponseType responseType, Error error) {
                 assertEquals(VARIANT_UID.trim(), entry.getHeaders().get("x-cs-variant-uid"));
-               System.out.println(entry.toJSON());
+                System.out.println(entry.toJSON());
             }
         });
     }
+
     @Test
-    void VariantsTestArray(){
+    void VariantsTestArray() {
         entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants(VARIANT_UIDS);
         entry.fetch(new EntryResultCallBack() {
             @Override
             public void onCompletion(ResponseType responseType, Error error) {
-               System.out.println(entry.toJSON());
+                System.out.println(entry.toJSON());
             }
         });
     }
-    
+
     @Test
     void VariantsTestNullString() {
-    entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants((String) null);
-    entry.fetch(new EntryResultCallBack() {
-        @Override
-        public void onCompletion(ResponseType responseType, Error error) {
-            assertNull(entry.getHeaders().get("x-cs-variant-uid"));
-            System.out.println(entry.toJSON());
-        }
-    });
+        entry = stack.contentType(CONTENT_TYPE).entry(entryUid).variants((String) null);
+        entry.fetch(new EntryResultCallBack() {
+            @Override
+            public void onCompletion(ResponseType responseType, Error error) {
+                assertNull(entry.getHeaders().get("x-cs-variant-uid"));
+                System.out.println(entry.toJSON());
+            }
+        });
     }
 
     @Test

From e45af0c1ea80d28c46c641c97d1dde9aaf453169 Mon Sep 17 00:00:00 2001
From: reeshika-h 
Date: Wed, 10 Jul 2024 15:09:21 +0530
Subject: [PATCH 04/12] fix: removed credentials and resolved semgrep integrity
 issue

---
 src/main/overview.html | 2 +-
 src/main/style.css     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 src/main/style.css

diff --git a/src/main/overview.html b/src/main/overview.html
index 3681c24e..81ed5a6e 100644
--- a/src/main/overview.html
+++ b/src/main/overview.html
@@ -6,7 +6,7 @@
     
     
     Welcome file
-    
+    
 
 
 
diff --git a/src/main/style.css b/src/main/style.css
new file mode 100644
index 00000000..5cf1cf27
--- /dev/null
+++ b/src/main/style.css
@@ -0,0 +1 @@
+@font-face{font-family:KaTeX_AMS;src:url(/static/fonts/KaTeX_AMS-Regular.38a68f7.woff2) format("woff2"),url(/static/fonts/KaTeX_AMS-Regular.7d307e8.woff) format("woff"),url(/static/fonts/KaTeX_AMS-Regular.2dbe16b.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(/static/fonts/KaTeX_Caligraphic-Bold.342b296.woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Bold.9634168.woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Bold.33d2688.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Caligraphic;src:url(/static/fonts/KaTeX_Caligraphic-Regular.b500497.woff2) format("woff2"),url(/static/fonts/KaTeX_Caligraphic-Regular.00029fb.woff) format("woff"),url(/static/fonts/KaTeX_Caligraphic-Regular.5e7940b.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(/static/fonts/KaTeX_Fraktur-Bold.7a3757c.woff2) format("woff2"),url(/static/fonts/KaTeX_Fraktur-Bold.4de87d4.woff) format("woff"),url(/static/fonts/KaTeX_Fraktur-Bold.ed33012.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Fraktur;src:url(/static/fonts/KaTeX_Fraktur-Regular.450cc4d.woff2) format("woff2"),url(/static/fonts/KaTeX_Fraktur-Regular.dc4e330.woff) format("woff"),url(/static/fonts/KaTeX_Fraktur-Regular.82d05fe.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(/static/fonts/KaTeX_Main-Bold.78b0124.woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Bold.62c6975.woff) format("woff"),url(/static/fonts/KaTeX_Main-Bold.2e1915b.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_Main;src:url(/static/fonts/KaTeX_Main-BoldItalic.c7213ce.woff2) format("woff2"),url(/static/fonts/KaTeX_Main-BoldItalic.a2e3dcd.woff) format("woff"),url(/static/fonts/KaTeX_Main-BoldItalic.0d817b4.ttf) format("truetype");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(/static/fonts/KaTeX_Main-Italic.eea3267.woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Italic.081073f.woff) format("woff"),url(/static/fonts/KaTeX_Main-Italic.767e06e.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_Main;src:url(/static/fonts/KaTeX_Main-Regular.f30e3b2.woff2) format("woff2"),url(/static/fonts/KaTeX_Main-Regular.756fad0.woff) format("woff"),url(/static/fonts/KaTeX_Main-Regular.689bbe6.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Math;src:url(/static/fonts/KaTeX_Math-BoldItalic.753ca3d.woff2) format("woff2"),url(/static/fonts/KaTeX_Math-BoldItalic.b3e80ff.woff) format("woff"),url(/static/fonts/KaTeX_Math-BoldItalic.d9377b5.ttf) format("truetype");font-weight:700;font-style:italic}@font-face{font-family:KaTeX_Math;src:url(/static/fonts/KaTeX_Math-Italic.2a39f38.woff2) format("woff2"),url(/static/fonts/KaTeX_Math-Italic.67710bb.woff) format("woff"),url(/static/fonts/KaTeX_Math-Italic.0343f93.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_SansSerif;src:url(/static/fonts/KaTeX_SansSerif-Bold.59b3773.woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Bold.f28c4fa.woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Bold.dfcc59a.ttf) format("truetype");font-weight:700;font-style:normal}@font-face{font-family:KaTeX_SansSerif;src:url(/static/fonts/KaTeX_SansSerif-Italic.99ad93a.woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Italic.9d0fdf5.woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Italic.3ab5188.ttf) format("truetype");font-weight:400;font-style:italic}@font-face{font-family:KaTeX_SansSerif;src:url(/static/fonts/KaTeX_SansSerif-Regular.badf359.woff2) format("woff2"),url(/static/fonts/KaTeX_SansSerif-Regular.6c3bd5b.woff) format("woff"),url(/static/fonts/KaTeX_SansSerif-Regular.d511ebc.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Script;src:url(/static/fonts/KaTeX_Script-Regular.af7bc98.woff2) format("woff2"),url(/static/fonts/KaTeX_Script-Regular.4edf4e0.woff) format("woff"),url(/static/fonts/KaTeX_Script-Regular.082640c.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size1;src:url(/static/fonts/KaTeX_Size1-Regular.10ec8be.woff2) format("woff2"),url(/static/fonts/KaTeX_Size1-Regular.35b9977.woff) format("woff"),url(/static/fonts/KaTeX_Size1-Regular.2c2dc3b.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size2;src:url(/static/fonts/KaTeX_Size2-Regular.96a09bf.woff2) format("woff2"),url(/static/fonts/KaTeX_Size2-Regular.9932a08.woff) format("woff"),url(/static/fonts/KaTeX_Size2-Regular.114ad19.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size3;src:url(/static/fonts/KaTeX_Size3-Regular.2c2f0ef.woff2) format("woff2"),url(/static/fonts/KaTeX_Size3-Regular.2afba15.woff) format("woff"),url(/static/fonts/KaTeX_Size3-Regular.a287c06.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Size4;src:url(/static/fonts/KaTeX_Size4-Regular.d5822f1.woff2) format("woff2"),url(/static/fonts/KaTeX_Size4-Regular.f961545.woff) format("woff"),url(/static/fonts/KaTeX_Size4-Regular.70174da.ttf) format("truetype");font-weight:400;font-style:normal}@font-face{font-family:KaTeX_Typewriter;src:url(/static/fonts/KaTeX_Typewriter-Regular.641339e.woff2) format("woff2"),url(/static/fonts/KaTeX_Typewriter-Regular.53dcf86.woff) format("woff"),url(/static/fonts/KaTeX_Typewriter-Regular.35fe2cc.ttf) format("truetype");font-weight:400;font-style:normal}.katex{font:normal 1.21em KaTeX_Main,Times New Roman,serif;line-height:1.2;text-indent:0;text-rendering:auto;border-color:currentColor}.katex *{-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.13.0"}.katex .katex-mathml{position:absolute;clip:rect(1px,1px,1px,1px);padding:0;border:0;height:1px;width:1px;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{position:relative;white-space:nowrap;width:-webkit-min-content;width:-moz-min-content;width:min-content}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-weight:700;font-style:italic}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{display:inline-table;table-layout:fixed;border-collapse:collapse}.katex .vlist-r{display:table-row}.katex .vlist{display:table-cell;vertical-align:bottom;position:relative}.katex .vlist>span{display:block;height:0;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{overflow:hidden;width:0}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{display:table-cell;vertical-align:bottom;font-size:1px;width:2px;min-width:2px}.katex .vbox{display:inline-flex;flex-direction:column;align-items:baseline}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{display:inline-flex;flex-direction:row}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{display:inline-block;border:0 solid;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{display:inline-block;width:100%;border-bottom-style:solid}.katex .hdashline{display:inline-block;width:100%;border-bottom-style:dashed}.katex .sqrt>.root{margin-left:.27777778em;margin-right:-.55555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.83333333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16666667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66666667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45666667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14666667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.71428571em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.85714286em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14285714em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571429em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857143em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71428571em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714286em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857143em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96285714em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55428571em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.55555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.66666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.77777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.88888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.41666667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.58333333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.66666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.83333333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833333em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.34722222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.41666667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.48611111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.55555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.69444444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.83333333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44027778em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72777778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.28935185em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.34722222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.40509259em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.46296296em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.52083333em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.5787037em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.69444444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.83333333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023148em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981481em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108004em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.28929605em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.33751205em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.38572806em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.43394407em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216008em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.57859209em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.69431051em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.83317261em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961427em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.20096463em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.24115756em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.28135048em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.32154341em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.36173633em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.40192926em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.48231511em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.57877814em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.69453376em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.83360129em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{display:inline-block;width:.12em}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{display:inline-block;min-width:1px}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{display:block;position:absolute;width:100%;height:inherit;fill:currentColor;stroke:currentColor;fill-rule:nonzero;fill-opacity:1;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex svg path{stroke:none}.katex img{border-style:none;min-width:0;min-height:0;max-width:none;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{position:absolute;left:0;width:50.2%;overflow:hidden}.katex .halfarrow-right{position:absolute;right:0;width:50.2%;overflow:hidden}.katex .brace-left{position:absolute;left:0;width:25.1%;overflow:hidden}.katex .brace-center{position:absolute;left:25%;width:50%;overflow:hidden}.katex .brace-right{position:absolute;right:0;width:25.1%;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-content;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{counter-increment:a;content:"(" counter(a) ")"}.katex .mml-eqn-num:before{counter-increment:b;content:"(" counter(b) ")"}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{display:inline-block;position:absolute;right:calc(50% + .3em);text-align:left}.katex .cd-label-right{display:inline-block;position:absolute;left:calc(50% + .3em);text-align:right}.katex-display{display:block;margin:1em 0;text-align:center}.katex-display>.katex{display:block;text-align:center;white-space:nowrap}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:a b}@font-face{font-family:Lato;font-style:normal;font-weight:400;src:url(/static/fonts/lato-normal.27bd77b.woff) format("woff")}@font-face{font-family:Lato;font-style:italic;font-weight:400;src:url(/static/fonts/lato-normal-italic.f28f2d6.woff) format("woff")}@font-face{font-family:Lato;font-style:normal;font-weight:600;src:url(/static/fonts/lato-black.f80bda6.woff) format("woff")}@font-face{font-family:Lato;font-style:italic;font-weight:600;src:url(/static/fonts/lato-black-italic.798eafd.woff) format("woff")}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:400;src:url(/static/fonts/RobotoMono-Regular.0b6a547.woff) format("woff")}@font-face{font-family:Roboto Mono;font-style:normal;font-weight:600;src:url(/static/fonts/RobotoMono-Bold.819f3b2.woff) format("woff")}.prism *,.token.pre.gfm *{font-weight:inherit!important}.prism .token.cdata,.prism .token.comment,.prism .token.doctype,.prism .token.prolog,.token.pre.gfm .token.cdata,.token.pre.gfm .token.comment,.token.pre.gfm .token.doctype,.token.pre.gfm .token.prolog{color:#708090}.prism .token.punctuation,.token.pre.gfm .token.punctuation{color:#999}.prism .namespace,.token.pre.gfm .namespace{opacity:.7}.prism .token.boolean,.prism .token.constant,.prism .token.deleted,.prism .token.number,.prism .token.property,.prism .token.symbol,.prism .token.tag,.token.pre.gfm .token.boolean,.token.pre.gfm .token.constant,.token.pre.gfm .token.deleted,.token.pre.gfm .token.number,.token.pre.gfm .token.property,.token.pre.gfm .token.symbol,.token.pre.gfm .token.tag{color:#905}.prism .token.attr-name,.prism .token.builtin,.prism .token.char,.prism .token.inserted,.prism .token.selector,.prism .token.string,.token.pre.gfm .token.attr-name,.token.pre.gfm .token.builtin,.token.pre.gfm .token.char,.token.pre.gfm .token.inserted,.token.pre.gfm .token.selector,.token.pre.gfm .token.string{color:#690}.prism .language-css .token.string,.prism .style .token.string,.prism .token.entity,.prism .token.operator,.prism .token.url,.token.pre.gfm .language-css .token.string,.token.pre.gfm .style .token.string,.token.pre.gfm .token.entity,.token.pre.gfm .token.operator,.token.pre.gfm .token.url{color:#a67f59}.prism .token.atrule,.prism .token.attr-value,.prism .token.keyword,.token.pre.gfm .token.atrule,.token.pre.gfm .token.attr-value,.token.pre.gfm .token.keyword{color:#07a}.prism .token.function,.token.pre.gfm .token.function{color:#dd4a68}.prism .token.important,.prism .token.regex,.prism .token.variable,.token.pre.gfm .token.important,.token.pre.gfm .token.regex,.token.pre.gfm .token.variable{color:#e90}.prism .token.bold,.prism .token.important,.token.pre.gfm .token.bold,.token.pre.gfm .token.important{font-weight:500}.prism .token.italic,.token.pre.gfm .token.italic{font-style:italic}/*! normalize-scss | MIT/GPLv2 License | bit.ly/normalize-scss */html{line-height:1.15;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,footer,header,nav,section{display:block}h1{font-size:2em;margin:.67em 0}figcaption,figure{display:block}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}main{display:block}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent;-webkit-text-decoration-skip:objects}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}dfn{font-style:italic}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}audio,video{display:inline-block}audio:not([controls]){display:none;height:0}img{border-style:none}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}input{overflow:visible}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;display:table;max-width:100%;padding:0;color:inherit;white-space:normal}progress{display:inline-block;vertical-align:baseline}textarea{overflow:auto}details{display:block}summary{display:list-item}menu{display:block}canvas{display:inline-block}[hidden],template{display:none}body,html{color:rgba(0,0,0,.75);font-size:16px;font-family:Lato,Helvetica Neue,Helvetica,sans-serif;font-variant-ligatures:common-ligatures;line-height:1.67;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.app--dark .layout__panel--editor,.app--dark .layout__panel--preview{color:hsla(0,0%,100%,.75)}blockquote,dl,ol,p,pre,ul{margin:1.2em 0}h1,h2,h3,h4,h5,h6{margin:1.8em 0;line-height:1.33}h1:after,h2:after{content:"";display:block;position:relative;top:.33em;border-bottom:1px solid hsla(0,0%,50%,.33)}ol ol,ol ul,ul ol,ul ul{margin:0}dt{font-weight:700}a{color:#0c93e4;text-decoration:underline;text-decoration-skip:ink}a:focus,a:hover{text-decoration:none}code,pre,samp{font-family:Roboto Mono,Lucida Sans Typewriter,Lucida Console,monaco,Courrier,monospace;font-size:.85em}code *,pre *,samp *{font-size:inherit}blockquote{color:rgba(0,0,0,.5);padding-left:1.5em;border-left:5px solid rgba(0,0,0,.1)}.app--dark .layout__panel--editor blockquote,.app--dark .layout__panel--preview blockquote{color:hsla(0,0%,100%,.4);border-left-color:hsla(0,0%,100%,.1)}code{background-color:rgba(0,0,0,.05);border-radius:3px;padding:2px 4px}hr{border:0;border-top:1px solid hsla(0,0%,50%,.33);margin:2em 0}pre>code{background-color:rgba(0,0,0,.05);display:block;padding:.5em;-webkit-text-size-adjust:none;overflow-x:auto;white-space:pre}.toc ul{list-style-type:none;padding-left:20px}table{background-color:transparent;border-collapse:collapse;border-spacing:0}td,th{border-right:1px solid #dcdcdc;padding:8px 12px}td:last-child,th:last-child{border-right:0}td{border-top:1px solid #dcdcdc}mark{background-color:#f8f840}kbd{font-family:Lato,Helvetica Neue,Helvetica,sans-serif;background-color:#fff;border:1px solid rgba(63,63,63,.25);border-radius:3px;box-shadow:0 1px 0 rgba(63,63,63,.25);color:#333;display:inline-block;font-size:.8em;margin:0 .1em;padding:.1em .6em;white-space:nowrap}abbr[title]{border-bottom:1px dotted #777;cursor:help}img{max-width:100%}.task-list-item{list-style-type:none}.task-list-item-checkbox{margin:0 .2em 0 -1.3em}.footnote{font-size:.8em;position:relative;top:-.25em;vertical-align:top}.page-break-after{page-break-after:always}.abc-notation-block{overflow-x:auto!important}.stackedit__html{margin-bottom:180px;margin-left:auto;margin-right:auto;padding-left:30px;padding-right:30px;max-width:750px}.stackedit__toc ul{padding:0}.stackedit__toc ul a{margin:.5rem 0;padding:.5rem 1rem}.stackedit__toc ul ul{color:#888;font-size:.9em}.stackedit__toc ul ul a{margin:0;padding:.1rem 1rem}.stackedit__toc li{display:block}.stackedit__toc a{display:block;color:inherit;text-decoration:none}.stackedit__toc a:active,.stackedit__toc a:focus,.stackedit__toc a:hover{background-color:rgba(0,0,0,.075);border-radius:3px}.stackedit__left{position:fixed;display:none;width:250px;height:100%;top:0;left:0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:touch;-ms-overflow-style:none}@media (min-width:1060px){.stackedit__left{display:block}}.stackedit__right{position:absolute;right:0;top:0;left:0}@media (min-width:1060px){.stackedit__right{left:250px}}.stackedit--pdf blockquote{border-left-color:#ececec}.stackedit--pdf .katex-mathml,.stackedit--pdf annotation{display:none}.stackedit--pdf .stackedit__html{padding-left:0;padding-right:0;max-width:none}
\ No newline at end of file

From c2c28df6f2c301a5dbb72265224b014b402d8153 Mon Sep 17 00:00:00 2001
From: reeshika-h 
Date: Wed, 17 Jul 2024 15:16:17 +0530
Subject: [PATCH 05/12] feat: added where method in AssetLibrary class

---
 .../java/com/contentstack/sdk/AssetLibrary.java    |  7 +++++++
 .../com/contentstack/sdk/TestAssetLibrary.java     | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/main/java/com/contentstack/sdk/AssetLibrary.java b/src/main/java/com/contentstack/sdk/AssetLibrary.java
index 5bb86ba8..3f54c94a 100644
--- a/src/main/java/com/contentstack/sdk/AssetLibrary.java
+++ b/src/main/java/com/contentstack/sdk/AssetLibrary.java
@@ -208,4 +208,11 @@ public enum ORDERBY {
         ASCENDING, DESCENDING
     }
 
+    public AssetLibrary where(String key, String value) {
+        JSONObject queryParams= new JSONObject();
+        queryParams.put(key,value);
+        urlQueries.put("query", queryParams);
+        return this;
+    }
+ 
 }
diff --git a/src/test/java/com/contentstack/sdk/TestAssetLibrary.java b/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
index 937e82c0..60d7952b 100644
--- a/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
+++ b/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
@@ -2,6 +2,9 @@
 
 import org.junit.jupiter.api.*;
 
+import com.google.gson.JsonObject;
+import org.json.*;
+
 import java.util.List;
 import java.util.logging.Logger;
 
@@ -95,4 +98,15 @@ void testIncludeOwner() {
         AssetLibrary assetLibrary = stack.assetLibrary().includeMetadata();
         Assertions.assertFalse(assetLibrary.headers.containsKey("include_owner"));
     }
+
+    @Test
+    void testAssetQueryOtherThanUID() {
+    AssetLibrary query = stack.assetLibrary().where("tags","tag1");
+    query.fetchAll(new FetchAssetsCallback() {
+        @Override
+        public void onCompletion(ResponseType responseType, List assets, Error error) {
+          System.out.println(assets);
+        }
+    });
+    }
 }

From e53391fd24dc7be2de1598f6907db3eb22575cc7 Mon Sep 17 00:00:00 2001
From: reeshika-h 
Date: Wed, 17 Jul 2024 15:33:17 +0530
Subject: [PATCH 06/12] change: removed unused libraries

---
 src/test/java/com/contentstack/sdk/TestAssetLibrary.java | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/test/java/com/contentstack/sdk/TestAssetLibrary.java b/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
index 60d7952b..48607e83 100644
--- a/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
+++ b/src/test/java/com/contentstack/sdk/TestAssetLibrary.java
@@ -2,8 +2,6 @@
 
 import org.junit.jupiter.api.*;
 
-import com.google.gson.JsonObject;
-import org.json.*;
 
 import java.util.List;
 import java.util.logging.Logger;

From 99b672b69fd61e18c3ba67f42f59bd58feb9d00b Mon Sep 17 00:00:00 2001
From: reeshika-h 
Date: Fri, 19 Jul 2024 13:45:29 +0530
Subject: [PATCH 07/12] Version bump

---
 CHANGELOG.md | 6 ++++++
 pom.xml      | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7e9e080a..deb90119 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # CHANGELOG
 
+## v1.14.2
+
+### Date: 15-July-2024
+
+-Enhancement: Fetch assets using any field uid of assets
+
 ## v1.14.1
 
 ### Date: 17-May-2024
diff --git a/pom.xml b/pom.xml
index 753dc3de..b3cb719c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     4.0.0
     com.contentstack.sdk
     java
-    1.14.1
+    1.14.2
     jar
     contentstack-java
     Java SDK for Contentstack Content Delivery API

From 28fb5910d486795bdb82ca39fae4a174613544c3 Mon Sep 17 00:00:00 2001
From: Aravind Kumar 
Date: Fri, 17 May 2024 20:48:14 +0530
Subject: [PATCH 08/12] sca-scan.yml

---
 .github/workflows/sca-scan.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/sca-scan.yml b/.github/workflows/sca-scan.yml
index a45fd65f..2296ece3 100644
--- a/.github/workflows/sca-scan.yml
+++ b/.github/workflows/sca-scan.yml
@@ -1,9 +1,9 @@
 name: Source Composition Analysis Scan
 on:
   pull_request:
-    types: [ opened, synchronize, reopened ]
+    types: [opened, synchronize, reopened]
 jobs:
-  security:
+  security-sca:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@master

From b6dca0347e93cc814e37bb59df224ad085693d6d Mon Sep 17 00:00:00 2001
From: Aravind Kumar 
Date: Fri, 17 May 2024 20:48:25 +0530
Subject: [PATCH 09/12] jira.yml

---
 .github/workflows/jira.yml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml
index 5ddf87a6..caa4bbdf 100644
--- a/.github/workflows/jira.yml
+++ b/.github/workflows/jira.yml
@@ -3,7 +3,7 @@ on:
   pull_request:
     types: [opened]
 jobs:
-  security:
+  security-jira:
     if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'snyk-bot' || contains(github.event.pull_request.head.ref, 'snyk-fix-')  || contains(github.event.pull_request.head.ref, 'snyk-upgrade-')}}
     runs-on: ubuntu-latest
     steps:
@@ -26,3 +26,8 @@ jobs:
             PR: ${{ github.event.pull_request.html_url }}
 
           fields: "${{ secrets.JIRA_FIELDS }}"
+      - name: Transition issue
+        uses: atlassian/gajira-transition@v3
+        with:
+          issue: ${{ steps.create.outputs.issue }}
+          transition: ${{ secrets.JIRA_TRANSITION }}

From dd229930ac6d02652642dae619e4e11e648aa26d Mon Sep 17 00:00:00 2001
From: Aravind Kumar 
Date: Fri, 17 May 2024 20:48:26 +0530
Subject: [PATCH 10/12] sast-scan.yml

---
 .github/workflows/sast-scan.yml | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 .github/workflows/sast-scan.yml

diff --git a/.github/workflows/sast-scan.yml b/.github/workflows/sast-scan.yml
new file mode 100644
index 00000000..3b9521a5
--- /dev/null
+++ b/.github/workflows/sast-scan.yml
@@ -0,0 +1,11 @@
+name: SAST Scan
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+jobs:
+  security-sast:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+      - name: Semgrep Scan
+        run: docker run -v /var/run/docker.sock:/var/run/docker.sock -v "${PWD}:/src" returntocorp/semgrep semgrep scan --config auto
\ No newline at end of file

From 5a89663d8b32716a54238a9ee71e70f6ac1c19c7 Mon Sep 17 00:00:00 2001
From: Aravind Kumar 
Date: Fri, 17 May 2024 20:48:27 +0530
Subject: [PATCH 11/12] codeql-analysis.yml


From 6808f37cf2bde3a31fdcc22fc75cdc072b3fd626 Mon Sep 17 00:00:00 2001
From: reeshika-h 
Date: Tue, 20 Aug 2024 14:59:52 +0530
Subject: [PATCH 12/12] chore: Version bump

---
 CHANGELOG.md | 6 ++++++
 pom.xml      | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index deb90119..84206a93 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
 # CHANGELOG
 
+## v2.0.0
+
+### Date: 27-August-2024
+
+-Feature: Variants method introduced
+
 ## v1.14.2
 
 ### Date: 15-July-2024
diff --git a/pom.xml b/pom.xml
index b3cb719c..8fa801f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
     4.0.0
     com.contentstack.sdk
     java
-    1.14.2
+    2.0.0
     jar
     contentstack-java
     Java SDK for Contentstack Content Delivery API