diff --git a/.github/workflows/jira.yml b/.github/workflows/jira.yml
deleted file mode 100644
index 250abc7..0000000
--- a/.github/workflows/jira.yml
+++ /dev/null
@@ -1,33 +0,0 @@
-name: Create JIRA ISSUE
-on:
- pull_request:
- types: [opened]
-jobs:
- 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:
- - uses: actions/checkout@v2
- - name: Login into JIRA
- uses: atlassian/gajira-login@master
- env:
- JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
- JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
- JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- - name: Create a JIRA Issue
- id: create
- uses: atlassian/gajira-create@master
- with:
- project: ${{ secrets.JIRA_PROJECT }}
- issuetype: ${{ secrets.JIRA_ISSUE_TYPE }}
- summary: |
- Snyk | Vulnerability | ${{ github.event.repository.name }} | ${{ github.event.pull_request.title }}
- description: |
- 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 }}
diff --git a/.github/workflows/sca-scan.yml b/.github/workflows/sca-scan.yml
deleted file mode 100644
index f09161f..0000000
--- a/.github/workflows/sca-scan.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-name: Source Composition Analysis Scan
-on:
- pull_request:
- types: [opened, synchronize, reopened]
-jobs:
- security-sca:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@master
- - name: Run Snyk to check for vulnerabilities
- uses: snyk/actions/node@master
- env:
- SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- with:
- args: --all-projects --fail-on=all
diff --git a/LICENSE b/LICENSE
index 797fccf..46e3381 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
MIT License
-Copyright (c) 2022-2024 Contentstack
+Copyright (c) 2022-2025 Contentstack
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/README.md b/README.md
index 359ff43..6193f73 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ npm install @contentstack/app-sdk
Alternatively, you can add it inside script tag:
```html
-
+
```
The above command will install the **app-sdk** library in your project which contains the necessary toolkit you need to manage installed apps on specific locations.
@@ -77,6 +77,7 @@ Locations refers to the position or the placement of the app (sidebar widget, cu
- **[SidebarWidget](#SidebarWidget)**: It's an object representing the current Sidebar widget reference in the Contentstack UI.
- **[AppConfigWidget](#AppConfigWidget)**: It's an object representing the current App configuration for the current App in the Contentstack UI.
- **[FieldModifierLocation](#FieldModifierLocation)**: It's an object representing the Field Modifier reference over the field in the Contentstack UI.
+- **[ContentTypeSidebarWidget](#ContentTypeSidebarWidget)**: It's an object representing the Content Type Sidebar Widget in the Contentstack UI.
# External
@@ -701,6 +702,47 @@ ContentstackAppSDK.init().then(async function (appSdk) {
});
```
+## ContentTypeSidebarWidget
+
+It is an object representing the Content Type Sidebar Widget in the Contentstack UI.
+
+**Kind**: The instance property of [ContentTypeSidebarWidget](#supported-locations)
+
+### ContentTypeSidebarWidget.getData() ⇒ [ContentType](#ContentType)
+
+This method retrieves the current content type data of the sidebar widget.
+
+**Kind**: instance method of [ContentTypeSidebarWidget](#ContentTypeSidebarWidget)
+
+**Returns**: [ContentType](#ContentType) - The current content type data.
+
+### ContentTypeSidebarWidget.onSave(callback)
+
+Executes the specified callback function each time the content type is saved. The callback function receives the updated content type data as an argument.
+
+**Kind**: instance method of [ContentTypeSidebarWidget](#ContentTypeSidebarWidget)
+
+| Param | Type | Description |
+| -------- | --------------------- | ---------------------------------------------------------------- |
+| callback | function | Function called with the updated content type data on save event |
+
+**Throws**: Will throw an error if the provided `callback` is not a function.
+
+**Example**
+
+```js
+const sidebarWidget = new ContentTypeSidebarWidget(
+ initData,
+ connection,
+ emitter
+);
+
+// Register onSave callback to execute on each save event.
+sidebarWidget.onSave((updatedContentType) => {
+ console.log("Content type saved:", updatedContentType);
+});
+```
+
## frame
It is a class representing an iframe window from the Contentstack UI. Please note that it is not available for Custom Widgets.