diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2db444625..a24ff53305 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,9 +57,7 @@ jobs: - name: Upload airy binary to S3 if: startsWith(github.ref, 'refs/heads/release') || startsWith(github.ref, 'refs/heads/main') run: | - aws s3 cp bazel-bin/infrastructure/cli/airy_linux_bin s3://airy-core-binaries/`cat ./VERSION`/linux/amd64/airy - aws s3 cp bazel-bin/infrastructure/cli/airy_darwin_bin s3://airy-core-binaries/`cat ./VERSION`/darwin/amd64/airy - aws s3 cp bazel-bin/infrastructure/cli/airy_windows_bin s3://airy-core-binaries/`cat ./VERSION`/windows/amd64/airy.exe + ./scripts/upload-cli-binaries.sh env: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} diff --git a/.prettierignore b/.prettierignore index 907ba57d12..5f0516bbca 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,2 +1,2 @@ -docs/docs/cli/*.md +docs/docs/cli/reference.md build/ diff --git a/README.md b/README.md index c91aef3136..85bf486b97 100644 --- a/README.md +++ b/README.md @@ -8,17 +8,17 @@ -# Airy Core Platform +# Airy Core [![Join the chat on Airy community](https://img.shields.io/badge/forum-join%20discussions-brightgreen.svg)](https://airy.co/community/?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Documentation Status](https://img.shields.io/badge/docs-stable-brightgreen.svg)](https://docs.airy.co/) [![CI](https://github.com/airyhq/airy/workflows/CI/badge.svg)](https://github.com/airyhq/airy/actions?query=workflow%3ACI) -[![Commit Frequency](https://img.shields.io/github/commit-activity/m/airyhq/airy)](https://docs.airy.co/) -[![License](https://img.shields.io/github/license/airyhq/airy)](https://docs.airy.co/) +[![Commit Frequency](https://img.shields.io/github/commit-activity/m/airyhq/airy)](https://github.com/airyhq/airy/pulse) +[![License](https://img.shields.io/github/license/airyhq/airy)](https://github.com/airyhq/airy/blob/develop/LICENSE) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/airyhq/airy/projects) -The Airy Core Platform is an open source, fully-featured, production ready +Airy Core is an open source, fully-featured, production ready messaging platform. With Airy you can process conversational data from a variety of sources: @@ -73,7 +73,7 @@ Learn more about what we open-sourced in the ## Getting started -You can run the Airy Core Platform locally by running the following commands: +You can run Airy Core locally by running the following commands: ```sh $ git clone https://github.com/airyhq/airy @@ -89,7 +89,7 @@ deployment guide](/docs/docs/getting-started/deployment/test-environment.md) for ## Components -The Airy Core Platform contains the following components: +Airy Core contains the following components: - An ingestion platform that heavily relies on [Apache Kafka](https://kafka.apache.org) to process incoming webhook data from @@ -110,7 +110,7 @@ The Airy Core Platform contains the following components: ## Organization of the Repository This [monorepo](https://en.wikipedia.org/wiki/Monorepo) contains all the -code and tooling required to run the Airy Core Platform. +code and tooling required to run Airy Core. Here is a quick overview of how the repository is organized: @@ -147,7 +147,7 @@ If you wish to learn more about a specific project, refer to the ## Design Principles -The Airy Core Platform is built using a few guiding principles. An introduction +Airy Core is built using a few guiding principles. An introduction to these principles is essential to navigate the code base with ease. You can read more about it [here](/docs/docs/guidelines/design-principles.md) @@ -168,7 +168,7 @@ started. ## Code of Conduct -To ensure a safe experience and a welcoming community, the Airy Core Platform +To ensure a safe experience and a welcoming community, Airy Core project adheres to the [contributor convenant](https://www.contributor-covenant.org/) [code of conduct](/code_of_conduct.md). diff --git a/VERSION b/VERSION index 6f4eebdf6f..ac39a106c4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.1 +0.9.0 diff --git a/backend/api/admin/BUILD b/backend/api/admin/BUILD index 7c0ad31647..def2b60c67 100644 --- a/backend/api/admin/BUILD +++ b/backend/api/admin/BUILD @@ -9,6 +9,7 @@ app_deps = [ "//backend:tag", "//backend:webhook", "//backend/model/metadata", + "//backend/model/template", "//lib/java/uuid", "//lib/java/spring/auth:spring-auth", "//lib/java/spring/web:spring-web", diff --git a/backend/api/admin/src/main/java/co/airy/core/api/admin/Stores.java b/backend/api/admin/src/main/java/co/airy/core/api/admin/Stores.java index a7f79ce65e..0f712873ce 100644 --- a/backend/api/admin/src/main/java/co/airy/core/api/admin/Stores.java +++ b/backend/api/admin/src/main/java/co/airy/core/api/admin/Stores.java @@ -4,10 +4,12 @@ import co.airy.avro.communication.ChannelConnectionState; import co.airy.avro.communication.Metadata; import co.airy.avro.communication.Tag; +import co.airy.avro.communication.Template; import co.airy.avro.communication.Webhook; import co.airy.kafka.schema.application.ApplicationCommunicationChannels; import co.airy.kafka.schema.application.ApplicationCommunicationMetadata; import co.airy.kafka.schema.application.ApplicationCommunicationTags; +import co.airy.kafka.schema.application.ApplicationCommunicationTemplates; import co.airy.kafka.schema.application.ApplicationCommunicationWebhooks; import co.airy.kafka.streams.KafkaStreamsWrapper; import co.airy.model.channel.dto.ChannelContainer; @@ -46,6 +48,7 @@ public class Stores implements HealthIndicator, ApplicationListener producer) { this.streams = streams; @@ -81,6 +85,8 @@ public void onApplicationEvent(ApplicationStartedEvent event) { builder.table(applicationCommunicationTags, Materialized.as(tagsStore)); + builder.table(applicationCommunicationTemplates, Materialized.as(templatesStore)); + streams.start(builder.build(), appId); } @@ -120,15 +126,32 @@ public void deleteTag(Tag tag) { producer.send(new ProducerRecord<>(applicationCommunicationTags, tag.getId(), null)); } + public void storeTemplate(Template template) throws ExecutionException, InterruptedException { + producer.send(new ProducerRecord<>(applicationCommunicationTemplates, template.getId(), template)).get(); + } + + public void deleteTemplate(Template template) { + producer.send(new ProducerRecord<>(applicationCommunicationTemplates, template.getId(), null)); + } + public ReadOnlyKeyValueStore getConnectedChannelsStore() { return streams.acquireLocalStore(connectedChannelsStore); } + public ReadOnlyKeyValueStore getTemplatesStore() { + return streams.acquireLocalStore(templatesStore); + } + public ChannelContainer getChannel(String channelId) { final ReadOnlyKeyValueStore store = getConnectedChannelsStore(); return store.get(channelId); } + public Template getTemplate(String templateId) { + final ReadOnlyKeyValueStore store = getTemplatesStore(); + return store.get(templateId); + } + public List getChannels() { final ReadOnlyKeyValueStore store = getConnectedChannelsStore(); @@ -140,9 +163,17 @@ public List getChannels() { return channels; } + public List