This repository contains shared code from all of other Kontent.ai Learn repositories.
This repository is published to NPM as the kontent-ai-learn-shared-code package.
To publish a new version of the kontent-ai-learn-shared-code library to the NPM registry:
- Increase the main
version
inproject.json
. - Push your change to the
master
branch.
The NPM Publish GitHub Action will take care of the rest. If you push code changes without increasing the version
in project.json
, the new code will not be published to NPM.
getBlobContainerName - Returns name of a blob container specified in an event grid event.
getBlobFromStorage - Async function that returns content of an Azure blob as a JSON object.
getRootCodenamesOfItem - Traverses structured content from Kontent and returns codenames of found root items. Requires:
item
- data about the item where the traversal startsallItems
- items from the Kontent.ai projectrootItemTypes
- types of the root content items
Contains configuration settings that are shared between the other Kontent.ai Learn repositories:
azureAccountName
azureContainerName
azureStorageKey
searchAdminApiKey
searchAppId
searchIndexName
kenticoProjectId
securedApiKey
previewApiKey
docsWebsiteUrl
Event Grid - Specifies an Azure Event Grid schema, along with the options for passed data in the event's data
property.
Kontent - Contains an IWebhookContentItem
that specifies data sent in a webhook reacting to a change in published content.
Search - Contains a contract for records sent to Index Sync service.
Preprocessed models - Interfaces of preprocessed data models from Kontent. Those models are based on an OpenAPI Specification 3.0.2.
Feel free to open a new issue where you describe your proposed changes, or even create a new pull request from your branch with proposed changes.
All the source codes are published under MIT license.