From 5cb73e3f601c632aae83581dd47d83d0fc993f20 Mon Sep 17 00:00:00 2001 From: joaolcorreia Date: Tue, 20 Aug 2024 23:11:49 -0700 Subject: [PATCH 1/2] Segment updated schemas --- schemas/com.segment/alias/jsonschema/2-0-0 | 62 ++++++++++++++ schemas/com.segment/event/jsonschema/2-0-0 | 62 ++++++++++++++ schemas/com.segment/group/jsonschema/2-0-0 | 65 ++++++++++++++ schemas/com.segment/page/jsonschema/2-0-0 | 75 +++++++++++++++++ schemas/com.segment/screen/jsonschema/2-0-0 | 65 ++++++++++++++ schemas/com.segment/traits/jsonschema/2-0-0 | 93 +++++++++++++++++++++ 6 files changed, 422 insertions(+) create mode 100644 schemas/com.segment/alias/jsonschema/2-0-0 create mode 100644 schemas/com.segment/event/jsonschema/2-0-0 create mode 100644 schemas/com.segment/group/jsonschema/2-0-0 create mode 100644 schemas/com.segment/page/jsonschema/2-0-0 create mode 100644 schemas/com.segment/screen/jsonschema/2-0-0 create mode 100644 schemas/com.segment/traits/jsonschema/2-0-0 diff --git a/schemas/com.segment/alias/jsonschema/2-0-0 b/schemas/com.segment/alias/jsonschema/2-0-0 new file mode 100644 index 000000000..3b382f051 --- /dev/null +++ b/schemas/com.segment/alias/jsonschema/2-0-0 @@ -0,0 +1,62 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment's Alias API call, https://segment.com/docs/integrations/webhooks/#alias", + "self": { + "vendor": "com.segment", + "name": "alias", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "channel": { + "enum": [ "server", "browser", "mobile" ] + }, + "context": { + "type": "object", + "additionalProperties": true + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "previousId": { + "type": "string", + "maxLength": 100 + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "maxLength": 512 + }, + "userId": { + "description": "Set user id, can be null", + "type": ["string","null"], + "maxLength": 255 + }, + "version": { + "type": ["string"], + "maxLength": 20 + } + }, + "additionalProperties": true +} \ No newline at end of file diff --git a/schemas/com.segment/event/jsonschema/2-0-0 b/schemas/com.segment/event/jsonschema/2-0-0 new file mode 100644 index 000000000..2c549d4a6 --- /dev/null +++ b/schemas/com.segment/event/jsonschema/2-0-0 @@ -0,0 +1,62 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment's Track API call, https://segment.com/docs/connections/spec/track/#example", + "self": { + "vendor": "com.segment", + "name": "event", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "context": { + "type": "object", + "additionalProperties": true + }, + "event": { + "type": "string", + "maxLength": 255 + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "maxLength": 512 + }, + "userId": { + "type": ["string","null"], + "maxLength": 255 + }, + "originalTimestamp": { + "type": "string", + "format": "date-time" + } + }, + "additionalProperties": true +} diff --git a/schemas/com.segment/group/jsonschema/2-0-0 b/schemas/com.segment/group/jsonschema/2-0-0 new file mode 100644 index 000000000..bf2c9a3a7 --- /dev/null +++ b/schemas/com.segment/group/jsonschema/2-0-0 @@ -0,0 +1,65 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment's Group API call, https://segment.com/docs/connections/spec/group/#example", + "self": { + "vendor": "com.segment", + "name": "group", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "channel": { + "enum": [ "server", "browser", "mobile" ] + }, + "context": { + "type": "object", + "additionalProperties": true + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "traits": { + "type": "object", + "additionalProperties": true + }, + "type": { + "type": "string", + "maxLength": 255 + }, + "userId": { + "type": ["string","null"], + "maxLength": 255 + }, + "groupId": { + "type": ["string","null"], + "maxLength": 255 + }, + "version": { + "type": ["string"], + "maxLength": 20 + } + }, + "additionalProperties": true +} diff --git a/schemas/com.segment/page/jsonschema/2-0-0 b/schemas/com.segment/page/jsonschema/2-0-0 new file mode 100644 index 000000000..7bec76026 --- /dev/null +++ b/schemas/com.segment/page/jsonschema/2-0-0 @@ -0,0 +1,75 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment Page API call, https://segment.com/docs/connections/spec/page/#example", + "self": { + "vendor": "com.segment", + "name": "page", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "channel": { + "enum": [ "server", "browser", "mobile" ] + }, + "context": { + "type": "object", + "additionalProperties": true + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "name": { + "type": "string", + "maxLength": 255 + }, + "properties": { + "type": "object", + "properties": { + "title": { + "type": "string", + "maxLength": 255 + }, + "url": { + "type": "string", + "maxLength": 8192 + } + }, + "additionalProperties": true + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "maxLength": 255 + }, + "userId": { + "type": ["string","null"], + "maxLength": 255 + }, + "version": { + "type": ["string"], + "maxLength": 20 + } + }, + "additionalProperties": true +} \ No newline at end of file diff --git a/schemas/com.segment/screen/jsonschema/2-0-0 b/schemas/com.segment/screen/jsonschema/2-0-0 new file mode 100644 index 000000000..da55fd4ad --- /dev/null +++ b/schemas/com.segment/screen/jsonschema/2-0-0 @@ -0,0 +1,65 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment's Screen API call, https://segment.com/docs/connections/spec/screen/#example", + "self": { + "vendor": "com.segment", + "name": "screen", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "channel": { + "enum": [ "server", "browser", "mobile" ] + }, + "context": { + "type": "object", + "additionalProperties": true + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "name": { + "type": "string", + "maxLength": 255 + }, + "properties": { + "type": "object", + "additionalProperties": true + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "type": { + "type": "string", + "maxLength": 255 + }, + "userId": { + "type": ["string","null"], + "maxLength": 255 + }, + "version": { + "type": ["string"], + "maxLength": 20 + } + }, + "additionalProperties": true +} \ No newline at end of file diff --git a/schemas/com.segment/traits/jsonschema/2-0-0 b/schemas/com.segment/traits/jsonschema/2-0-0 new file mode 100644 index 000000000..32697424e --- /dev/null +++ b/schemas/com.segment/traits/jsonschema/2-0-0 @@ -0,0 +1,93 @@ +{ + "$schema": "http://iglucentral.com/schemas/com.snowplowanalytics.self-desc/schema/jsonschema/1-0-0#", + "description": "Schema for Segment's Identify API call, https://segment.com/docs/connections/spec/identify/#example", + "self": { + "vendor": "com.segment", + "name": "traits", + "format": "jsonschema", + "version": "2-0-0" + }, + "type": "object", + "properties": { + "anonymousId": { + "type": "string", + "maxLength": 255 + }, + "channel": { + "enum": [ "server", "browser", "mobile" ] + }, + "integrations": { + "type": "object", + "additionalProperties": true + }, + "messageId": { + "type": "string", + "maxLength": 100 + }, + "receivedAt": { + "type": "string", + "format": "date-time" + }, + "sentAt": { + "type": "string", + "format": "date-time" + }, + "timestamp": { + "type": "string", + "format": "date-time" + }, + "traits": { + "type": "object", + "properties": { + "name": { + "type": "string", + "maxLength": 255 + }, + "email": { + "type": "string", + "maxLength": 512 + }, + "address": { + "type": "object", + "properties": { + "city": { + "type": "string", + "maxLength": 512 + }, + "country": { + "type": "string", + "maxLength": 512 + }, + "postalCode": { + "type": "string", + "maxLength": 512 + }, + "state": { + "type": "string", + "maxLength": 512 + }, + "street": { + "type": "string", + "maxLength": 512 + } + }, + "additionalProperties": true + } + }, + "additionalProperties": true + }, + "type": { + "type": "string", + "maxLength": 255 + }, + "userId": { + "type": ["string","null"], + "maxLength": 255 + }, + "version": { + "type": ["string"], + "maxLength": 20 + } + }, + "additionalProperties": true +} \ No newline at end of file From f3a7653e37cd40eab667bd3400d06b3e9b422d02 Mon Sep 17 00:00:00 2001 From: joaolcorreia Date: Tue, 20 Aug 2024 23:20:57 -0700 Subject: [PATCH 2/2] Identify and Track Schemas --- .../{traits/jsonschema/2-0-0 => identify/jsonschema/1-0-0} | 4 ++-- .../{event/jsonschema/2-0-0 => track/jsonschema/1-0-0} | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename schemas/com.segment/{traits/jsonschema/2-0-0 => identify/jsonschema/1-0-0} (98%) rename schemas/com.segment/{event/jsonschema/2-0-0 => track/jsonschema/1-0-0} (96%) diff --git a/schemas/com.segment/traits/jsonschema/2-0-0 b/schemas/com.segment/identify/jsonschema/1-0-0 similarity index 98% rename from schemas/com.segment/traits/jsonschema/2-0-0 rename to schemas/com.segment/identify/jsonschema/1-0-0 index 32697424e..8413fd950 100644 --- a/schemas/com.segment/traits/jsonschema/2-0-0 +++ b/schemas/com.segment/identify/jsonschema/1-0-0 @@ -3,9 +3,9 @@ "description": "Schema for Segment's Identify API call, https://segment.com/docs/connections/spec/identify/#example", "self": { "vendor": "com.segment", - "name": "traits", + "name": "identify", "format": "jsonschema", - "version": "2-0-0" + "version": "1-0-0" }, "type": "object", "properties": { diff --git a/schemas/com.segment/event/jsonschema/2-0-0 b/schemas/com.segment/track/jsonschema/1-0-0 similarity index 96% rename from schemas/com.segment/event/jsonschema/2-0-0 rename to schemas/com.segment/track/jsonschema/1-0-0 index 2c549d4a6..055e417a7 100644 --- a/schemas/com.segment/event/jsonschema/2-0-0 +++ b/schemas/com.segment/track/jsonschema/1-0-0 @@ -3,9 +3,9 @@ "description": "Schema for Segment's Track API call, https://segment.com/docs/connections/spec/track/#example", "self": { "vendor": "com.segment", - "name": "event", + "name": "track", "format": "jsonschema", - "version": "2-0-0" + "version": "1-0-0" }, "type": "object", "properties": {