Skip to content

Commit

Permalink
Source Klaviyo: added new keys to schema (#14947)
Browse files Browse the repository at this point in the history
* feat: added new keys to schema

* Rename Campaigns.json to campaigns.json

* auto-bump connector version [ci skip]

Co-authored-by: Octavia Squidington III <octavia-squidington-iii@users.noreply.github.com>
  • Loading branch information
1 parent 436de26 commit 2960421
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 273 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@
- name: Klaviyo
sourceDefinitionId: 95e8cffd-b8c4-4039-968e-d32fb4a69bde
dockerRepository: airbyte/source-klaviyo
dockerImageTag: 0.1.6
dockerImageTag: 0.1.7
documentationUrl: https://docs.airbyte.io/integrations/sources/klaviyo
icon: klaviyo.svg
sourceType: api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4374,7 +4374,7 @@
supported_destination_sync_modes: []
supported_source_sync_modes:
- "append"
- dockerImage: "airbyte/source-klaviyo:0.1.6"
- dockerImage: "airbyte/source-klaviyo:0.1.7"
spec:
documentationUrl: "https://docs.airbyte.io/integrations/sources/klaviyo"
changelogUrl: "https://docs.airbyte.io/integrations/sources/klaviyo"
Expand Down
36 changes: 29 additions & 7 deletions airbyte-integrations/connectors/source-klaviyo/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,38 @@
FROM python:3.9-slim
FROM python:3.9.11-alpine3.15 as base

# build and load all requirements
FROM base as builder
WORKDIR /airbyte/integration_code

# upgrade pip to the latest version
RUN apk --no-cache upgrade \
&& pip install --upgrade pip \
&& apk --no-cache add tzdata build-base

# Bash is installed for more convenient debugging.
RUN apt-get update && apt-get install -y bash && rm -rf /var/lib/apt/lists/*

COPY setup.py ./
# install necessary packages to a temporary folder
RUN pip install --prefix=/install .

# build a clean environment
FROM base
WORKDIR /airbyte/integration_code
COPY source_klaviyo ./source_klaviyo

# copy all loaded and built libraries to a pure basic image
COPY --from=builder /install /usr/local
# add default timezone settings
COPY --from=builder /usr/share/zoneinfo/Etc/UTC /etc/localtime
RUN echo "Etc/UTC" > /etc/timezone

# bash is installed for more convenient debugging.
RUN apk --no-cache add bash

# copy payload code only
COPY main.py ./
COPY setup.py ./
RUN pip install .
COPY source_klaviyo ./source_klaviyo

ENV AIRBYTE_ENTRYPOINT "python /airbyte/integration_code/main.py"
ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.6
LABEL io.airbyte.version=0.1.7
LABEL io.airbyte.name=airbyte/source-klaviyo

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"created": { "type": ["null", "string"], "format": "date-time" },
"updated": { "type": ["null", "string"], "format": "date-time" },
"status": { "type": "string" },
"status_id": { "type": "integer" },
"status_label": { "type": "string" },
"from_name": { "type": "string" },
"from_email": { "type": "string" },
"num_recipients": { "type": "integer" },
"lists": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"person_count": { "type": "integer" },
"list_type": { "type": "string" },
"folder": { "type": ["null", "string"] }
}
}
},
"excluded_lists": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"person_count": { "type": "integer" },
"list_type": { "type": "string" },
"folder": { "type": ["null", "string"] }
}
}
},
"is_segmented": { "type": "boolean" },
"send_time": { "type": ["null", "string"], "format": "date-time" },
"sent_at": { "type": ["null", "string"], "format": "date-time" },
"campaign_type": { "type": "string" },
"subject": { "type": ["null", "string"] },
"message_type": { "type": "string" },
"template_id": { "type": ["null", "string"] }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"uuid": { "type": "string" },
"event_name": { "type": "string" },
"timestamp": { "type": "integer" },
"datetime": { "type": "string" },
"statistic_id": { "type": "string" },
"event_properties": {
"type": "object",
"properties": {
"$value": { "type": "number" },
"items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"object": { "type": "string" },
"name": { "type": "string" },
"sku": { "type": "string" },
"price": { "type": "integer" },
"quantity": { "type": "integer" }
}
}
}
}
},
"person": {
"type": "object",
"properties": {
"id": { "type": "string" },
"object": { "type": "string" },
"$email": { "type": "string" }
}
},
"flow_id": { "type": ["null", "string"] },
"campaign_id": { "type": ["null", "string"] },
"flow_message_id": { "type": ["null", "string"] }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"status": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"customer_filter": { "type": ["null", "object"] },
"trigger": { "type": "object" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"email": { "type": "string" },
"reason": { "type": "string" },
"timestamp": { "type": "string", "format": "date-time" }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"person_count": { "type": "integer" },
"list_type": { "type": "string" },
"folder": { "type": ["null", "string"] }
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"created": { "type": "string", "format": "date-time" },
"updated": { "type": "string", "format": "date-time" },
"integration": {
"type": "object",
"properties": {
"object": { "type": "string" },
"id": { "type": "string" },
"name": { "type": "string" },
"category": { "type": "string" }
}
}
}
}
Loading

0 comments on commit 2960421

Please sign in to comment.