From 98478b886ce4e244a3af2e51aa09684364ab772f Mon Sep 17 00:00:00 2001 From: Nick Clarke Date: Thu, 25 Apr 2024 17:14:29 -0700 Subject: [PATCH 1/5] update schema --- tap_klaviyo/schemas/event.json | 37 ++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/tap_klaviyo/schemas/event.json b/tap_klaviyo/schemas/event.json index 39eaf78..1355a8e 100644 --- a/tap_klaviyo/schemas/event.json +++ b/tap_klaviyo/schemas/event.json @@ -1,11 +1,5 @@ { "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, "id": { "description": "The event ID", "type": [ @@ -28,15 +22,21 @@ "null" ] }, - "attributes": { - "properties": { - "metric_id": { - "description": "The metric ID", - "type": [ - "string", - "null" - ] - }, + "relationships": { + "description": "Event relationships", + "type": [ + "null", + "object" + ] + }, + "links": { + "description": "links", + "type": [ + "null", + "object" + ], + "attributes": { + "properties": { "profile_id": { "description": "Profile ID of the associated profile, if available", "type": [ @@ -74,6 +74,13 @@ ] } }, + "included": { + "description": "included", + "type": [ + "null", + "array" + ] + }, "type": [ "object", "null" From 5f5d528a3e4221a2fd0f5f5724462c6aac59b5b6 Mon Sep 17 00:00:00 2001 From: Nick Clarke Date: Thu, 25 Apr 2024 20:07:28 -0700 Subject: [PATCH 2/5] typo --- tap_klaviyo/schemas/event.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tap_klaviyo/schemas/event.json b/tap_klaviyo/schemas/event.json index 1355a8e..8ac9be4 100644 --- a/tap_klaviyo/schemas/event.json +++ b/tap_klaviyo/schemas/event.json @@ -34,9 +34,10 @@ "type": [ "null", "object" - ], - "attributes": { - "properties": { + ] + }, + "attributes": { + "properties": { "profile_id": { "description": "Profile ID of the associated profile, if available", "type": [ From 3d707f95a338fdf7a8891e9f1da3d2b25e092997 Mon Sep 17 00:00:00 2001 From: Nick Clarke Date: Thu, 25 Apr 2024 20:42:11 -0700 Subject: [PATCH 3/5] other missing fields in streams besides event, types may be wrong. --- tap_klaviyo/schemas/campaigns.json | 49 ++++++++++++++++++++++++++++++ tap_klaviyo/schemas/flows.json | 14 +++++++++ tap_klaviyo/schemas/lists.json | 22 +++++++++++++- tap_klaviyo/schemas/metrics.json | 21 +++++++++++++ tap_klaviyo/schemas/profiles.json | 26 ++++++++++++++++ tap_klaviyo/schemas/templates.json | 7 +++++ 6 files changed, 138 insertions(+), 1 deletion(-) diff --git a/tap_klaviyo/schemas/campaigns.json b/tap_klaviyo/schemas/campaigns.json index e5ba60d..be04e23 100644 --- a/tap_klaviyo/schemas/campaigns.json +++ b/tap_klaviyo/schemas/campaigns.json @@ -15,6 +15,27 @@ "null" ] }, + "relationships": { + "description": "The relationships associated with the campaign", + "type": [ + "string", + "null" + ] + }, + "links": { + "description": "The relationships associated with the campaign", + "type": [ + "string", + "null" + ] + }, + "filter": { + "description": "The relationships associated with the campaign", + "type": [ + "string", + "null" + ] + }, "attributes": { "properties": { "name": { @@ -31,6 +52,34 @@ "null" ] }, + "audiences": { + "description": "The audiences associated with the campaign", + "type": [ + "array", + "null" + ] + }, + "send_options": { + "description": "The send options associated with the campaign", + "type": [ + "array", + "null" + ] + }, + "tracking_options": { + "description": "The tracking options associated with the campaign", + "type": [ + "array", + "null" + ] + }, + "send_strategy": { + "description": "The send strategy associated with the campaign", + "type": [ + "array", + "null" + ] + }, "status": { "description": "The current status of the campaign", "type": [ diff --git a/tap_klaviyo/schemas/flows.json b/tap_klaviyo/schemas/flows.json index c37dea4..e2f2356 100644 --- a/tap_klaviyo/schemas/flows.json +++ b/tap_klaviyo/schemas/flows.json @@ -10,6 +10,20 @@ "string" ] }, + "relationships": { + "description": "this", + "type": [ + "null", + "string" + ] + }, + "links": { + "description": "this", + "type": [ + "null", + "string" + ] + }, "attributes": { "properties": { "name": { diff --git a/tap_klaviyo/schemas/lists.json b/tap_klaviyo/schemas/lists.json index c6d4476..df6b598 100644 --- a/tap_klaviyo/schemas/lists.json +++ b/tap_klaviyo/schemas/lists.json @@ -15,6 +15,20 @@ "null" ] }, + "relationships": { + "description": "Relationships to other resources that are related to this list", + "type": [ + "object", + "null" + ] + }, + "links": { + "description": "Relationships to other resources that are related to this list", + "type": [ + "object", + "null" + ] + }, "attributes": { "properties": { "name": { @@ -24,7 +38,13 @@ "null" ] }, - + "opt_in_process": { + "description": "The method by which contacts are added to the list", + "type": [ + "string", + "null" + ] + }, "created": { "description": "Date and time when the list was created, in ISO 8601 format (YYYY-MM-DDTHH:MM:SS.mmmmmm)", "format": "date-time", diff --git a/tap_klaviyo/schemas/metrics.json b/tap_klaviyo/schemas/metrics.json index 5c0bc4b..9737188 100644 --- a/tap_klaviyo/schemas/metrics.json +++ b/tap_klaviyo/schemas/metrics.json @@ -40,6 +40,13 @@ "null" ] }, + "links": { + "description": "Links related to the metric", + "type": [ + "object", + "null" + ] + }, "integration": { "properties": { "id": { @@ -62,6 +69,20 @@ "string", "null" ] + }, + "object": { + "description": "The object of the integration", + "type": [ + "object", + "null" + ] + }, + "key": { + "description": "The object of the integration", + "type": [ + "object", + "null" + ] } }, "type": [ diff --git a/tap_klaviyo/schemas/profiles.json b/tap_klaviyo/schemas/profiles.json index 557e32d..c1c6cbd 100644 --- a/tap_klaviyo/schemas/profiles.json +++ b/tap_klaviyo/schemas/profiles.json @@ -19,8 +19,27 @@ "null" ] }, + "relationships": { + "description": "Relationships to other resources", + "type": [ + "object" + ] + }, + "links": { + "description": "Relationships to other resources", + "type": [ + "object" + ] + }, "attributes": { "properties": { + "anonymous_id": { + "description": "A unique identify set by klaviyo to identify the profile", + "type": [ + "string", + "null" + ] + }, "email": { "description": "Individual's email address", "type": [ @@ -167,6 +186,13 @@ "string", "null" ] + }, + "ip": { + "description": "Location's associated IP address", + "type": [ + "string", + "null" + ] } }, "type": [ diff --git a/tap_klaviyo/schemas/templates.json b/tap_klaviyo/schemas/templates.json index 3b8dbe8..1977eac 100644 --- a/tap_klaviyo/schemas/templates.json +++ b/tap_klaviyo/schemas/templates.json @@ -21,6 +21,13 @@ "null" ] }, + "links": { + "description": "Links", + "type": [ + "object", + "null" + ] + }, "attributes": { "properties": { "company_id": { From 60212b5cda6aafb354936732b8b5a4f8cf381058 Mon Sep 17 00:00:00 2001 From: Nick Clarke Date: Thu, 25 Apr 2024 20:57:09 -0700 Subject: [PATCH 4/5] some cleanup --- tap_klaviyo/schemas/event.json | 10 +--------- tap_klaviyo/schemas/flows.json | 9 ++++----- tap_klaviyo/schemas/metrics.json | 27 +++++++++++++-------------- tap_klaviyo/schemas/profiles.json | 18 ++++++------------ 4 files changed, 24 insertions(+), 40 deletions(-) diff --git a/tap_klaviyo/schemas/event.json b/tap_klaviyo/schemas/event.json index 8ac9be4..b5856ef 100644 --- a/tap_klaviyo/schemas/event.json +++ b/tap_klaviyo/schemas/event.json @@ -32,19 +32,11 @@ "links": { "description": "links", "type": [ - "null", "object" ] }, "attributes": { "properties": { - "profile_id": { - "description": "Profile ID of the associated profile, if available", - "type": [ - "string", - "null" - ] - }, "timestamp": { "description": "Event timestamp in seconds", "type": [ @@ -76,7 +68,7 @@ } }, "included": { - "description": "included", + "description": "", "type": [ "null", "array" diff --git a/tap_klaviyo/schemas/flows.json b/tap_klaviyo/schemas/flows.json index e2f2356..a49dab4 100644 --- a/tap_klaviyo/schemas/flows.json +++ b/tap_klaviyo/schemas/flows.json @@ -11,17 +11,16 @@ ] }, "relationships": { - "description": "this", + "description": "", "type": [ "null", - "string" + "object" ] }, "links": { - "description": "this", + "description": "", "type": [ - "null", - "string" + "object" ] }, "attributes": { diff --git a/tap_klaviyo/schemas/metrics.json b/tap_klaviyo/schemas/metrics.json index 9737188..72d1327 100644 --- a/tap_klaviyo/schemas/metrics.json +++ b/tap_klaviyo/schemas/metrics.json @@ -15,6 +15,19 @@ "null" ] }, + "relationships": { + "description": "Event relationships", + "type": [ + "null", + "object" + ] + }, + "links": { + "description": "links", + "type": [ + "object" + ] + }, "attributes": { "properties": { "name": { @@ -69,20 +82,6 @@ "string", "null" ] - }, - "object": { - "description": "The object of the integration", - "type": [ - "object", - "null" - ] - }, - "key": { - "description": "The object of the integration", - "type": [ - "object", - "null" - ] } }, "type": [ diff --git a/tap_klaviyo/schemas/profiles.json b/tap_klaviyo/schemas/profiles.json index c1c6cbd..d530049 100644 --- a/tap_klaviyo/schemas/profiles.json +++ b/tap_klaviyo/schemas/profiles.json @@ -20,26 +20,20 @@ ] }, "relationships": { - "description": "Relationships to other resources", + "description": "", "type": [ + "null", "object" ] }, "links": { - "description": "Relationships to other resources", + "description": "", "type": [ "object" ] }, "attributes": { "properties": { - "anonymous_id": { - "description": "A unique identify set by klaviyo to identify the profile", - "type": [ - "string", - "null" - ] - }, "email": { "description": "Individual's email address", "type": [ @@ -188,10 +182,10 @@ ] }, "ip": { - "description": "Location's associated IP address", + "description": "IP address", "type": [ - "string", - "null" + "null", + "string" ] } }, From afc17521a40896c0e40bd0f19f2a83a1072658a0 Mon Sep 17 00:00:00 2001 From: Nick Clarke Date: Thu, 25 Apr 2024 21:21:40 -0700 Subject: [PATCH 5/5] some more type fixes, etc. --- tap_klaviyo/schemas/campaigns.json | 34 ++++++++++-------------------- tap_klaviyo/schemas/lists.json | 2 +- tap_klaviyo/schemas/templates.json | 3 +-- 3 files changed, 13 insertions(+), 26 deletions(-) diff --git a/tap_klaviyo/schemas/campaigns.json b/tap_klaviyo/schemas/campaigns.json index be04e23..63aff82 100644 --- a/tap_klaviyo/schemas/campaigns.json +++ b/tap_klaviyo/schemas/campaigns.json @@ -16,24 +16,16 @@ ] }, "relationships": { - "description": "The relationships associated with the campaign", + "description": "", "type": [ - "string", + "object", "null" ] }, "links": { - "description": "The relationships associated with the campaign", + "description": "", "type": [ - "string", - "null" - ] - }, - "filter": { - "description": "The relationships associated with the campaign", - "type": [ - "string", - "null" + "object" ] }, "attributes": { @@ -53,31 +45,27 @@ ] }, "audiences": { - "description": "The audiences associated with the campaign", + "description": "The audiences to be included and/or excluded from the campaign", "type": [ - "array", - "null" + "object" ] }, "send_options": { - "description": "The send options associated with the campaign", + "description": "Options to use when sending a campaign", "type": [ - "array", - "null" + "object" ] }, "tracking_options": { "description": "The tracking options associated with the campaign", "type": [ - "array", - "null" + "object" ] }, "send_strategy": { - "description": "The send strategy associated with the campaign", + "description": "The send strategy the campaign will send with", "type": [ - "array", - "null" + "object" ] }, "status": { diff --git a/tap_klaviyo/schemas/lists.json b/tap_klaviyo/schemas/lists.json index df6b598..63bc6a8 100644 --- a/tap_klaviyo/schemas/lists.json +++ b/tap_klaviyo/schemas/lists.json @@ -39,7 +39,7 @@ ] }, "opt_in_process": { - "description": "The method by which contacts are added to the list", + "description": "The opt-in process for this list. Could be either 'single_opt_in' or 'double_opt_in'.", "type": [ "string", "null" diff --git a/tap_klaviyo/schemas/templates.json b/tap_klaviyo/schemas/templates.json index 1977eac..85d76b3 100644 --- a/tap_klaviyo/schemas/templates.json +++ b/tap_klaviyo/schemas/templates.json @@ -24,8 +24,7 @@ "links": { "description": "Links", "type": [ - "object", - "null" + "object" ] }, "attributes": {