airbyte-agent-klaviyo 0.1.1__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/CHANGELOG.md +5 -0
  2. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/PKG-INFO +3 -3
  3. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/README.md +2 -2
  4. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/__init__.py +20 -20
  5. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/executor/local_executor.py +4 -3
  6. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/adapters/httpx_adapter.py +10 -1
  7. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/pyproject.toml +1 -1
  8. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/.gitignore +0 -0
  9. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/AUTH.md +0 -0
  10. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/REFERENCE.md +0 -0
  11. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/__init__.py +0 -0
  12. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/__init__.py +0 -0
  13. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/auth_strategies.py +0 -0
  14. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/auth_template.py +0 -0
  15. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/cloud_utils/__init__.py +0 -0
  16. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/cloud_utils/client.py +0 -0
  17. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/connector_model_loader.py +0 -0
  18. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/constants.py +0 -0
  19. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/exceptions.py +0 -0
  20. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/executor/__init__.py +0 -0
  21. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/executor/hosted_executor.py +0 -0
  22. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/executor/models.py +0 -0
  23. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/extensions.py +0 -0
  24. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/__init__.py +0 -0
  25. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/adapters/__init__.py +0 -0
  26. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/config.py +0 -0
  27. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/exceptions.py +0 -0
  28. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/protocols.py +0 -0
  29. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http/response.py +0 -0
  30. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/http_client.py +0 -0
  31. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/introspection.py +0 -0
  32. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/logging/__init__.py +0 -0
  33. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/logging/logger.py +0 -0
  34. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/logging/types.py +0 -0
  35. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/observability/__init__.py +0 -0
  36. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/observability/config.py +0 -0
  37. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/observability/models.py +0 -0
  38. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/observability/redactor.py +0 -0
  39. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/observability/session.py +0 -0
  40. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/performance/__init__.py +0 -0
  41. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/performance/instrumentation.py +0 -0
  42. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/performance/metrics.py +0 -0
  43. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/__init__.py +0 -0
  44. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/base.py +0 -0
  45. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/components.py +0 -0
  46. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/connector.py +0 -0
  47. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/extensions.py +0 -0
  48. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/operations.py +0 -0
  49. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/schema/security.py +0 -0
  50. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/secrets.py +0 -0
  51. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/telemetry/__init__.py +0 -0
  52. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/telemetry/config.py +0 -0
  53. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/telemetry/events.py +0 -0
  54. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/telemetry/tracker.py +0 -0
  55. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/types.py +0 -0
  56. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/utils.py +0 -0
  57. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/_vendored/connector_sdk/validation.py +0 -0
  58. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/connector.py +0 -0
  59. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/connector_model.py +0 -0
  60. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/models.py +60 -60
  61. {airbyte_agent_klaviyo-0.1.1 → airbyte_agent_klaviyo-0.1.2}/airbyte_agent_klaviyo/types.py +0 -0
@@ -1,5 +1,10 @@
1
1
  # Klaviyo changelog
2
2
 
3
+ ## [0.1.2] - 2026-01-30
4
+ - Updated connector definition (YAML version 1.0.0)
5
+ - Source commit: 5b20f488
6
+ - SDK version: 0.1.0
7
+
3
8
  ## [0.1.1] - 2026-01-30
4
9
  - Updated connector definition (YAML version 1.0.0)
5
10
  - Source commit: a3729d85
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: airbyte-agent-klaviyo
3
- Version: 0.1.1
3
+ Version: 0.1.2
4
4
  Summary: Airbyte Klaviyo Connector for AI platforms
5
5
  Project-URL: Homepage, https://github.com/airbytehq/airbyte-agent-connectors
6
6
  Project-URL: Documentation, https://docs.airbyte.com/ai-agents/
@@ -146,7 +146,7 @@ See the official [Klaviyo API reference](https://developers.klaviyo.com/en/refer
146
146
 
147
147
  ## Version information
148
148
 
149
- - **Package version:** 0.1.1
149
+ - **Package version:** 0.1.2
150
150
  - **Connector version:** 1.0.0
151
- - **Generated with Connector SDK commit SHA:** e4eb233f8dd57ad9bc825064625222a988db2cc6
151
+ - **Generated with Connector SDK commit SHA:** 5b20f488dec0e8f29410823753106603c23a4b65
152
152
  - **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/klaviyo/CHANGELOG.md)
@@ -113,7 +113,7 @@ See the official [Klaviyo API reference](https://developers.klaviyo.com/en/refer
113
113
 
114
114
  ## Version information
115
115
 
116
- - **Package version:** 0.1.1
116
+ - **Package version:** 0.1.2
117
117
  - **Connector version:** 1.0.0
118
- - **Generated with Connector SDK commit SHA:** e4eb233f8dd57ad9bc825064625222a988db2cc6
118
+ - **Generated with Connector SDK commit SHA:** 5b20f488dec0e8f29410823753106603c23a4b65
119
119
  - **Changelog:** [View changelog](https://github.com/airbytehq/airbyte-agent-connectors/blob/main/connectors/klaviyo/CHANGELOG.md)
@@ -7,45 +7,45 @@ Auto-generated from OpenAPI specification.
7
7
  from .connector import KlaviyoConnector
8
8
  from .models import (
9
9
  KlaviyoAuthConfig,
10
- ProfileLinks,
11
10
  ProfileAttributesLocation,
12
11
  ProfileAttributes,
12
+ ProfileLinks,
13
13
  Profile,
14
14
  ProfilesListLinks,
15
15
  ProfilesList,
16
- ListAttributes,
17
16
  ListLinks,
17
+ ListAttributes,
18
18
  List,
19
19
  ListsListLinks,
20
20
  ListsList,
21
- CampaignAttributes,
22
21
  CampaignLinks,
22
+ CampaignAttributes,
23
23
  Campaign,
24
24
  CampaignsListLinks,
25
25
  CampaignsList,
26
- EventLinks,
27
- EventAttributes,
28
- EventRelationshipsMetricData,
29
- EventRelationshipsMetric,
30
26
  EventRelationshipsProfileData,
31
27
  EventRelationshipsProfile,
28
+ EventRelationshipsMetricData,
29
+ EventRelationshipsMetric,
32
30
  EventRelationships,
31
+ EventAttributes,
32
+ EventLinks,
33
33
  Event,
34
34
  EventsListLinks,
35
35
  EventsList,
36
+ MetricLinks,
36
37
  MetricAttributesIntegration,
37
38
  MetricAttributes,
38
- MetricLinks,
39
39
  Metric,
40
40
  MetricsListLinks,
41
41
  MetricsList,
42
- FlowAttributes,
43
42
  FlowLinks,
43
+ FlowAttributes,
44
44
  Flow,
45
45
  FlowsListLinks,
46
46
  FlowsList,
47
- TemplateAttributes,
48
47
  TemplateLinks,
48
+ TemplateAttributes,
49
49
  Template,
50
50
  TemplatesListLinks,
51
51
  TemplatesList,
@@ -118,45 +118,45 @@ from .types import (
118
118
  __all__ = [
119
119
  "KlaviyoConnector",
120
120
  "KlaviyoAuthConfig",
121
- "ProfileLinks",
122
121
  "ProfileAttributesLocation",
123
122
  "ProfileAttributes",
123
+ "ProfileLinks",
124
124
  "Profile",
125
125
  "ProfilesListLinks",
126
126
  "ProfilesList",
127
- "ListAttributes",
128
127
  "ListLinks",
128
+ "ListAttributes",
129
129
  "List",
130
130
  "ListsListLinks",
131
131
  "ListsList",
132
- "CampaignAttributes",
133
132
  "CampaignLinks",
133
+ "CampaignAttributes",
134
134
  "Campaign",
135
135
  "CampaignsListLinks",
136
136
  "CampaignsList",
137
- "EventLinks",
138
- "EventAttributes",
139
- "EventRelationshipsMetricData",
140
- "EventRelationshipsMetric",
141
137
  "EventRelationshipsProfileData",
142
138
  "EventRelationshipsProfile",
139
+ "EventRelationshipsMetricData",
140
+ "EventRelationshipsMetric",
143
141
  "EventRelationships",
142
+ "EventAttributes",
143
+ "EventLinks",
144
144
  "Event",
145
145
  "EventsListLinks",
146
146
  "EventsList",
147
+ "MetricLinks",
147
148
  "MetricAttributesIntegration",
148
149
  "MetricAttributes",
149
- "MetricLinks",
150
150
  "Metric",
151
151
  "MetricsListLinks",
152
152
  "MetricsList",
153
- "FlowAttributes",
154
153
  "FlowLinks",
154
+ "FlowAttributes",
155
155
  "Flow",
156
156
  "FlowsListLinks",
157
157
  "FlowsList",
158
- "TemplateAttributes",
159
158
  "TemplateLinks",
159
+ "TemplateAttributes",
160
160
  "Template",
161
161
  "TemplatesListLinks",
162
162
  "TemplatesList",
@@ -584,7 +584,7 @@ class LocalExecutor:
584
584
  return ExecutionResult(
585
585
  success=True,
586
586
  data={
587
- "status": "unhealthy",
587
+ "status": "skipped",
588
588
  "error": "No list operation available for health check",
589
589
  },
590
590
  )
@@ -599,7 +599,7 @@ class LocalExecutor:
599
599
  return ExecutionResult(
600
600
  success=True,
601
601
  data={
602
- "status": "unhealthy",
602
+ "status": "skipped",
603
603
  "error": "No standard handler available",
604
604
  },
605
605
  )
@@ -616,13 +616,14 @@ class LocalExecutor:
616
616
  )
617
617
  except Exception as e:
618
618
  return ExecutionResult(
619
- success=True,
619
+ success=False,
620
620
  data={
621
621
  "status": "unhealthy",
622
622
  "error": str(e),
623
623
  "checked_entity": check_entity,
624
624
  "checked_action": "list",
625
625
  },
626
+ error=str(e),
626
627
  )
627
628
 
628
629
  async def _execute_operation(
@@ -186,7 +186,16 @@ class HTTPXClient:
186
186
  # Try to get error message from response
187
187
  try:
188
188
  error_data = httpx_response.json()
189
- error_message = error_data.get("message") or error_data.get("error") or str(error_data)
189
+ errors_list = error_data.get("errors")
190
+ if isinstance(errors_list, list):
191
+
192
+ def _extract_error(e: object) -> str:
193
+ if isinstance(e, dict):
194
+ return str(e.get("userPresentableMessage") or e.get("message") or e.get("error") or e)
195
+ return str(e)
196
+
197
+ errors_list = ", ".join(_extract_error(e) for e in errors_list)
198
+ error_message = errors_list or error_data.get("message") or error_data.get("error") or str(error_data)
190
199
  except Exception:
191
200
  error_message = httpx_response.text or f"HTTP {status_code} error"
192
201
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "airbyte-agent-klaviyo"
3
- version = "0.1.1"
3
+ version = "0.1.2"
4
4
  description = "Airbyte Klaviyo Connector for AI platforms"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -22,12 +22,6 @@ class KlaviyoAuthConfig(BaseModel):
22
22
 
23
23
  # ===== RESPONSE TYPE DEFINITIONS (PYDANTIC) =====
24
24
 
25
- class ProfileLinks(BaseModel):
26
- """Related links"""
27
- model_config = ConfigDict(extra="allow", populate_by_name=True)
28
-
29
- self: Union[str | None, Any] = Field(default=None)
30
-
31
25
  class ProfileAttributesLocation(BaseModel):
32
26
  """Location information"""
33
27
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -71,6 +65,12 @@ class ProfileAttributes(BaseModel):
71
65
  properties: Union[dict[str, Any] | None, Any] = Field(default=None, description="Custom properties")
72
66
  """Custom properties"""
73
67
 
68
+ class ProfileLinks(BaseModel):
69
+ """Related links"""
70
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
71
+
72
+ self: Union[str | None, Any] = Field(default=None)
73
+
74
74
  class Profile(BaseModel):
75
75
  """A Klaviyo profile representing a contact"""
76
76
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -95,6 +95,12 @@ class ProfilesList(BaseModel):
95
95
  data: Union[list[Profile], Any] = Field(default=None)
96
96
  links: Union[ProfilesListLinks | None, Any] = Field(default=None)
97
97
 
98
+ class ListLinks(BaseModel):
99
+ """Related links"""
100
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
101
+
102
+ self: Union[str | None, Any] = Field(default=None)
103
+
98
104
  class ListAttributes(BaseModel):
99
105
  """List attributes"""
100
106
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -108,12 +114,6 @@ class ListAttributes(BaseModel):
108
114
  opt_in_process: Union[str | None, Any] = Field(default=None, description="Opt-in process type")
109
115
  """Opt-in process type"""
110
116
 
111
- class ListLinks(BaseModel):
112
- """Related links"""
113
- model_config = ConfigDict(extra="allow", populate_by_name=True)
114
-
115
- self: Union[str | None, Any] = Field(default=None)
116
-
117
117
  class List(BaseModel):
118
118
  """A Klaviyo list for organizing profiles"""
119
119
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -138,6 +138,12 @@ class ListsList(BaseModel):
138
138
  data: Union[list[List], Any] = Field(default=None)
139
139
  links: Union[ListsListLinks | None, Any] = Field(default=None)
140
140
 
141
+ class CampaignLinks(BaseModel):
142
+ """Related links"""
143
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
144
+
145
+ self: Union[str | None, Any] = Field(default=None)
146
+
141
147
  class CampaignAttributes(BaseModel):
142
148
  """Campaign attributes"""
143
149
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -165,12 +171,6 @@ class CampaignAttributes(BaseModel):
165
171
  send_time: Union[str | None, Any] = Field(default=None, description="Actual send time")
166
172
  """Actual send time"""
167
173
 
168
- class CampaignLinks(BaseModel):
169
- """Related links"""
170
- model_config = ConfigDict(extra="allow", populate_by_name=True)
171
-
172
- self: Union[str | None, Any] = Field(default=None)
173
-
174
174
  class Campaign(BaseModel):
175
175
  """A Klaviyo campaign"""
176
176
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -195,24 +195,18 @@ class CampaignsList(BaseModel):
195
195
  data: Union[list[Campaign], Any] = Field(default=None)
196
196
  links: Union[CampaignsListLinks | None, Any] = Field(default=None)
197
197
 
198
- class EventLinks(BaseModel):
199
- """Related links"""
198
+ class EventRelationshipsProfileData(BaseModel):
199
+ """Nested schema for EventRelationshipsProfile.data"""
200
200
  model_config = ConfigDict(extra="allow", populate_by_name=True)
201
201
 
202
- self: Union[str | None, Any] = Field(default=None)
202
+ type: Union[str | None, Any] = Field(default=None)
203
+ id: Union[str | None, Any] = Field(default=None)
203
204
 
204
- class EventAttributes(BaseModel):
205
- """Event attributes"""
205
+ class EventRelationshipsProfile(BaseModel):
206
+ """Nested schema for EventRelationships.profile"""
206
207
  model_config = ConfigDict(extra="allow", populate_by_name=True)
207
208
 
208
- timestamp: Union[Any, Any] = Field(default=None, description="Event timestamp (can be ISO string or Unix timestamp)")
209
- """Event timestamp (can be ISO string or Unix timestamp)"""
210
- datetime: Union[str | None, Any] = Field(default=None, description="Event datetime")
211
- """Event datetime"""
212
- uuid: Union[str | None, Any] = Field(default=None, description="Event UUID")
213
- """Event UUID"""
214
- event_properties: Union[dict[str, Any] | None, Any] = Field(default=None, description="Custom event properties")
215
- """Custom event properties"""
209
+ data: Union[EventRelationshipsProfileData | None, Any] = Field(default=None)
216
210
 
217
211
  class EventRelationshipsMetricData(BaseModel):
218
212
  """Nested schema for EventRelationshipsMetric.data"""
@@ -227,25 +221,31 @@ class EventRelationshipsMetric(BaseModel):
227
221
 
228
222
  data: Union[EventRelationshipsMetricData | None, Any] = Field(default=None)
229
223
 
230
- class EventRelationshipsProfileData(BaseModel):
231
- """Nested schema for EventRelationshipsProfile.data"""
224
+ class EventRelationships(BaseModel):
225
+ """Related resources"""
232
226
  model_config = ConfigDict(extra="allow", populate_by_name=True)
233
227
 
234
- type: Union[str | None, Any] = Field(default=None)
235
- id: Union[str | None, Any] = Field(default=None)
228
+ profile: Union[EventRelationshipsProfile | None, Any] = Field(default=None)
229
+ metric: Union[EventRelationshipsMetric | None, Any] = Field(default=None)
236
230
 
237
- class EventRelationshipsProfile(BaseModel):
238
- """Nested schema for EventRelationships.profile"""
231
+ class EventAttributes(BaseModel):
232
+ """Event attributes"""
239
233
  model_config = ConfigDict(extra="allow", populate_by_name=True)
240
234
 
241
- data: Union[EventRelationshipsProfileData | None, Any] = Field(default=None)
235
+ timestamp: Union[Any, Any] = Field(default=None, description="Event timestamp (can be ISO string or Unix timestamp)")
236
+ """Event timestamp (can be ISO string or Unix timestamp)"""
237
+ datetime: Union[str | None, Any] = Field(default=None, description="Event datetime")
238
+ """Event datetime"""
239
+ uuid: Union[str | None, Any] = Field(default=None, description="Event UUID")
240
+ """Event UUID"""
241
+ event_properties: Union[dict[str, Any] | None, Any] = Field(default=None, description="Custom event properties")
242
+ """Custom event properties"""
242
243
 
243
- class EventRelationships(BaseModel):
244
- """Related resources"""
244
+ class EventLinks(BaseModel):
245
+ """Related links"""
245
246
  model_config = ConfigDict(extra="allow", populate_by_name=True)
246
247
 
247
- profile: Union[EventRelationshipsProfile | None, Any] = Field(default=None)
248
- metric: Union[EventRelationshipsMetric | None, Any] = Field(default=None)
248
+ self: Union[str | None, Any] = Field(default=None)
249
249
 
250
250
  class Event(BaseModel):
251
251
  """A Klaviyo event representing an action taken by a profile"""
@@ -272,6 +272,12 @@ class EventsList(BaseModel):
272
272
  data: Union[list[Event], Any] = Field(default=None)
273
273
  links: Union[EventsListLinks | None, Any] = Field(default=None)
274
274
 
275
+ class MetricLinks(BaseModel):
276
+ """Related links"""
277
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
278
+
279
+ self: Union[str | None, Any] = Field(default=None)
280
+
275
281
  class MetricAttributesIntegration(BaseModel):
276
282
  """Integration information"""
277
283
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -293,12 +299,6 @@ class MetricAttributes(BaseModel):
293
299
  integration: Union[MetricAttributesIntegration | None, Any] = Field(default=None, description="Integration information")
294
300
  """Integration information"""
295
301
 
296
- class MetricLinks(BaseModel):
297
- """Related links"""
298
- model_config = ConfigDict(extra="allow", populate_by_name=True)
299
-
300
- self: Union[str | None, Any] = Field(default=None)
301
-
302
302
  class Metric(BaseModel):
303
303
  """A Klaviyo metric (event type)"""
304
304
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -323,6 +323,12 @@ class MetricsList(BaseModel):
323
323
  data: Union[list[Metric], Any] = Field(default=None)
324
324
  links: Union[MetricsListLinks | None, Any] = Field(default=None)
325
325
 
326
+ class FlowLinks(BaseModel):
327
+ """Related links"""
328
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
329
+
330
+ self: Union[str | None, Any] = Field(default=None)
331
+
326
332
  class FlowAttributes(BaseModel):
327
333
  """Flow attributes"""
328
334
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -340,12 +346,6 @@ class FlowAttributes(BaseModel):
340
346
  trigger_type: Union[str | None, Any] = Field(default=None, description="Type of trigger for the flow")
341
347
  """Type of trigger for the flow"""
342
348
 
343
- class FlowLinks(BaseModel):
344
- """Related links"""
345
- model_config = ConfigDict(extra="allow", populate_by_name=True)
346
-
347
- self: Union[str | None, Any] = Field(default=None)
348
-
349
349
  class Flow(BaseModel):
350
350
  """A Klaviyo flow (automated sequence)"""
351
351
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -370,6 +370,12 @@ class FlowsList(BaseModel):
370
370
  data: Union[list[Flow], Any] = Field(default=None)
371
371
  links: Union[FlowsListLinks | None, Any] = Field(default=None)
372
372
 
373
+ class TemplateLinks(BaseModel):
374
+ """Related links"""
375
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
376
+
377
+ self: Union[str | None, Any] = Field(default=None)
378
+
373
379
  class TemplateAttributes(BaseModel):
374
380
  """Template attributes"""
375
381
  model_config = ConfigDict(extra="allow", populate_by_name=True)
@@ -387,12 +393,6 @@ class TemplateAttributes(BaseModel):
387
393
  updated: Union[str | None, Any] = Field(default=None, description="Last update timestamp")
388
394
  """Last update timestamp"""
389
395
 
390
- class TemplateLinks(BaseModel):
391
- """Related links"""
392
- model_config = ConfigDict(extra="allow", populate_by_name=True)
393
-
394
- self: Union[str | None, Any] = Field(default=None)
395
-
396
396
  class Template(BaseModel):
397
397
  """A Klaviyo email template"""
398
398
  model_config = ConfigDict(extra="allow", populate_by_name=True)