Skip to content

Commit ac66d0c

Browse files
authored
feat: use latest api version for klaviyo (#190)
* feat: klaviyo v2 - campaigns - flows * feat: klaviyo v2 - events - lists * feat: klaviyo v2 - metrics * feat: klaviyo v2 - profiles - global_exclusions - email_templates * feat: klaviyo v2 - segments - segments profiles * feat: klaviyo v2 - add subscriptions for profiles and global exclusions * feat: klaviyo v2 - fix global_exclusions stream * feat: klaviyo v2 - fix flows archive issue
1 parent db8de24 commit ac66d0c

File tree

12 files changed

+1093
-182
lines changed

12 files changed

+1093
-182
lines changed

airbyte-integrations/connectors/source-klaviyo/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from setuptools import find_packages, setup
77

8-
MAIN_REQUIREMENTS = ["airbyte-cdk~=0.1"]
8+
MAIN_REQUIREMENTS = ["airbyte-cdk==0.67"]
99

1010
TEST_REQUIREMENTS = ["pytest~=6.1", "pytest-mock", "connector-acceptance-test", "requests_mock~=1.8"]
1111

Lines changed: 130 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,140 @@
11
{
22
"type": "object",
33
"properties": {
4-
"object": { "type": "string" },
4+
"type": { "type": "string" },
55
"id": { "type": "string" },
6-
"name": { "type": "string" },
7-
"created": { "type": ["null", "string"], "format": "date-time" },
8-
"updated": { "type": ["null", "string"], "format": "date-time" },
9-
"status": { "type": "string" },
10-
"status_id": { "type": "integer" },
11-
"status_label": { "type": "string" },
12-
"from_name": { "type": "string" },
13-
"from_email": { "type": "string" },
14-
"num_recipients": { "type": "integer" },
15-
"lists": {
16-
"type": "array",
17-
"items": {
18-
"type": "object",
19-
"properties": {
20-
"object": { "type": "string" },
21-
"id": { "type": "string" },
22-
"name": { "type": "string" },
23-
"created": { "type": "string", "format": "date-time" },
24-
"updated": { "type": "string", "format": "date-time" },
25-
"person_count": { "type": "integer" },
26-
"list_type": { "type": "string" },
27-
"folder": { "type": ["null", "string"] }
28-
}
6+
"updated_at": { "type": ["null", "string"], "format": "date-time" },
7+
"attributes": {
8+
"type": ["null", "object"],
9+
"additionalProperties": true,
10+
"properties": {
11+
"name": { "type": "string" },
12+
"status": { "type": "string" },
13+
"archived": { "type": "boolean" },
14+
"channel": { "type": "string" },
15+
"audiences": {
16+
"type": ["null", "object"],
17+
"additionalProperties": true,
18+
"properties": {
19+
"included": {
20+
"type": ["null", "array"],
21+
"items": {
22+
"type": ["null", "string"]
23+
}
24+
},
25+
"excluded": {
26+
"type": ["null", "array"],
27+
"items": {
28+
"type": ["null", "string"]
29+
}
30+
}
31+
}
32+
},
33+
"send_options": {
34+
"type": ["null", "object"],
35+
"properties": {
36+
"ignore_unsubscribes": { "type": ["null", "boolean"] },
37+
"use_smart_sending": { "type": ["null", "boolean"] }
38+
}
39+
},
40+
"message": { "type": "string" },
41+
"tracking_options": {
42+
"type": ["null", "object"],
43+
"additionalProperties": true,
44+
"properties": {
45+
"is_tracking_opens": { "type": ["null", "boolean"] },
46+
"is_tracking_clicks": { "type": ["null", "boolean"] },
47+
"is_add_utm": { "type": ["null", "boolean"] },
48+
"utm_params": {
49+
"type": ["null", "array"],
50+
"items": {
51+
"type": ["null", "object"],
52+
"properties": {
53+
"name": { "type": "string" },
54+
"value": { "type": "string" }
55+
}
56+
}
57+
}
58+
}
59+
},
60+
"send_strategy": {
61+
"type": ["null", "object"],
62+
"additionalProperties": true,
63+
"properties": {
64+
"method": { "type": "string" },
65+
"options_static": {
66+
"type": ["null", "object"],
67+
"properties": {
68+
"datetime": {
69+
"type": "string",
70+
"format": "date-time",
71+
"airbyte_type": "timestamp_without_timezone"
72+
},
73+
"is_local": { "type": ["null", "boolean"] },
74+
"send_past_recipients_immediately": {
75+
"type": ["null", "boolean"]
76+
}
77+
}
78+
},
79+
"options_throttled": {
80+
"type": ["null", "object"],
81+
"properties": {
82+
"datetime": {
83+
"type": "string",
84+
"format": "date-time",
85+
"airbyte_type": "timestamp_without_timezone"
86+
},
87+
"throttle_percentage": { "type": "integer" }
88+
}
89+
},
90+
"options_sto": {
91+
"type": ["null", "object"],
92+
"properties": {
93+
"date": { "type": "string", "format": "date" }
94+
}
95+
}
96+
}
97+
},
98+
"created_at": { "type": ["null", "string"], "format": "date-time" },
99+
"scheduled_at": { "type": ["null", "string"], "format": "date-time" },
100+
"updated_at": { "type": ["null", "string"], "format": "date-time" },
101+
"send_time": { "type": ["null", "string"], "format": "date-time" }
29102
}
30103
},
31-
"excluded_lists": {
32-
"type": "array",
33-
"items": {
34-
"type": "object",
35-
"properties": {
36-
"object": { "type": "string" },
37-
"id": { "type": "string" },
38-
"name": { "type": "string" },
39-
"created": { "type": "string", "format": "date-time" },
40-
"updated": { "type": "string", "format": "date-time" },
41-
"person_count": { "type": "integer" },
42-
"list_type": { "type": "string" },
43-
"folder": { "type": ["null", "string"] }
44-
}
104+
"links": {
105+
"type": ["null", "object"],
106+
"additionalProperties": true,
107+
"properties": {
108+
"self": { "type": "string" }
45109
}
46110
},
47-
"is_segmented": { "type": "boolean" },
48-
"send_time": { "type": ["null", "string"], "format": "date-time" },
49-
"sent_at": { "type": ["null", "string"], "format": "date-time" },
50-
"campaign_type": { "type": "string" },
51-
"subject": { "type": ["null", "string"] },
52-
"message_type": { "type": "string" },
53-
"template_id": { "type": ["null", "string"] }
111+
"relationships": {
112+
"type": ["null", "object"],
113+
"additionalProperties": true,
114+
"properties": {
115+
"tags": {
116+
"type": ["null", "object"],
117+
"properties": {
118+
"data": {
119+
"type": "array",
120+
"items": {
121+
"type": ["null", "object"],
122+
"properties": {
123+
"type": { "type": "string" },
124+
"id": { "type": "string" }
125+
}
126+
}
127+
},
128+
"links": {
129+
"type": ["null", "object"],
130+
"properties": {
131+
"self": { "type": "string" },
132+
"related": { "type": "string" }
133+
}
134+
}
135+
}
136+
}
137+
}
138+
}
54139
}
55140
}
Lines changed: 71 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,79 @@
11
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
23
"type": "object",
34
"additionalProperties": true,
45
"properties": {
5-
"object": {
6+
"type": {
7+
"type": "string"
8+
},
9+
"id": {
10+
"type": "string"
11+
},
12+
"updated": {
13+
"type": [
14+
"null",
15+
"string"
16+
],
17+
"format": "date-time"
18+
},
19+
"attributes": {
20+
"type": [
21+
"null",
22+
"object"
23+
],
24+
"additionalProperties": true,
25+
"properties": {
26+
"name": {
627
"type": "string"
7-
},
8-
"id": {
28+
},
29+
"editor_type": {
30+
"type": [
31+
"null",
32+
"string"
33+
]
34+
},
35+
"html": {
936
"type": "string"
10-
},
11-
"name": {
12-
"type": ["null", "string"]
13-
},
14-
"html": {
15-
"type": ["null", "string"]
16-
},
17-
"is_writeable": {
18-
"type": ["null", "boolean"]
19-
},
20-
"created": {
21-
"type": "string", "format": "date-time"
22-
},
23-
"updated": {
24-
"type": "string", "format": "date-time"
37+
},
38+
"text": {
39+
"type": [
40+
"null",
41+
"string"
42+
]
43+
},
44+
"created": {
45+
"type": [
46+
"null",
47+
"string"
48+
],
49+
"format": "date-time"
50+
},
51+
"updated": {
52+
"type": [
53+
"null",
54+
"string"
55+
],
56+
"format": "date-time"
57+
},
58+
"company_id": {
59+
"type": [
60+
"null",
61+
"string"
62+
]
63+
}
2564
}
65+
},
66+
"links": {
67+
"type": [
68+
"null",
69+
"object"
70+
],
71+
"additionalProperties": true,
72+
"properties": {
73+
"self": {
74+
"type": "string"
75+
}
76+
}
77+
}
2678
}
27-
}
79+
}

0 commit comments

Comments
 (0)