airbyte-agent-slack 0.1.0__py3-none-any.whl → 0.1.2__py3-none-any.whl
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.
- airbyte_agent_slack/__init__.py +4 -4
- airbyte_agent_slack/_vendored/connector_sdk/connector_model_loader.py +3 -2
- airbyte_agent_slack/_vendored/connector_sdk/schema/base.py +4 -1
- airbyte_agent_slack/_vendored/connector_sdk/schema/extensions.py +122 -1
- airbyte_agent_slack/models.py +24 -24
- {airbyte_agent_slack-0.1.0.dist-info → airbyte_agent_slack-0.1.2.dist-info}/METADATA +3 -3
- {airbyte_agent_slack-0.1.0.dist-info → airbyte_agent_slack-0.1.2.dist-info}/RECORD +8 -8
- {airbyte_agent_slack-0.1.0.dist-info → airbyte_agent_slack-0.1.2.dist-info}/WHEEL +0 -0
airbyte_agent_slack/__init__.py
CHANGED
|
@@ -17,9 +17,9 @@ from .models import (
|
|
|
17
17
|
ChannelPurpose,
|
|
18
18
|
ChannelsListResponse,
|
|
19
19
|
ChannelResponse,
|
|
20
|
-
File,
|
|
21
|
-
Attachment,
|
|
22
20
|
Reaction,
|
|
21
|
+
Attachment,
|
|
22
|
+
File,
|
|
23
23
|
Message,
|
|
24
24
|
Thread,
|
|
25
25
|
EditedInfo,
|
|
@@ -59,9 +59,9 @@ __all__ = [
|
|
|
59
59
|
"ChannelPurpose",
|
|
60
60
|
"ChannelsListResponse",
|
|
61
61
|
"ChannelResponse",
|
|
62
|
-
"File",
|
|
63
|
-
"Attachment",
|
|
64
62
|
"Reaction",
|
|
63
|
+
"Attachment",
|
|
64
|
+
"File",
|
|
65
65
|
"Message",
|
|
66
66
|
"Thread",
|
|
67
67
|
"EditedInfo",
|
|
@@ -519,13 +519,14 @@ def _parse_oauth2_config(scheme: Any) -> dict[str, str]:
|
|
|
519
519
|
config["refresh_url"] = refresh_url
|
|
520
520
|
|
|
521
521
|
# Extract custom refresh configuration from x-airbyte-token-refresh extension
|
|
522
|
+
# Note: x_token_refresh is a Dict[str, Any], not a Pydantic model, so use .get()
|
|
522
523
|
x_token_refresh = getattr(scheme, "x_token_refresh", None)
|
|
523
524
|
if x_token_refresh:
|
|
524
|
-
auth_style =
|
|
525
|
+
auth_style = x_token_refresh.get("auth_style")
|
|
525
526
|
if auth_style:
|
|
526
527
|
config["auth_style"] = auth_style
|
|
527
528
|
|
|
528
|
-
body_format =
|
|
529
|
+
body_format = x_token_refresh.get("body_format")
|
|
529
530
|
if body_format:
|
|
530
531
|
config["body_format"] = body_format
|
|
531
532
|
|
|
@@ -13,7 +13,7 @@ from uuid import UUID
|
|
|
13
13
|
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
14
14
|
from pydantic_core import Url
|
|
15
15
|
|
|
16
|
-
from .extensions import RetryConfig
|
|
16
|
+
from .extensions import CacheConfig, RetryConfig
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
class ExampleQuestions(BaseModel):
|
|
@@ -105,6 +105,7 @@ class Info(BaseModel):
|
|
|
105
105
|
- x-airbyte-external-documentation-urls: List of external documentation URLs (Airbyte extension)
|
|
106
106
|
- x-airbyte-retry-config: Retry configuration for transient errors (Airbyte extension)
|
|
107
107
|
- x-airbyte-example-questions: Example questions for AI connector README (Airbyte extension)
|
|
108
|
+
- x-airbyte-cache: Cache configuration for field mapping between API and cache schemas (Airbyte extension)
|
|
108
109
|
"""
|
|
109
110
|
|
|
110
111
|
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
@@ -122,6 +123,7 @@ class Info(BaseModel):
|
|
|
122
123
|
x_airbyte_external_documentation_urls: list[DocUrl] = Field(..., alias="x-airbyte-external-documentation-urls")
|
|
123
124
|
x_airbyte_retry_config: RetryConfig | None = Field(None, alias="x-airbyte-retry-config")
|
|
124
125
|
x_airbyte_example_questions: ExampleQuestions | None = Field(None, alias="x-airbyte-example-questions")
|
|
126
|
+
x_airbyte_cache: CacheConfig | None = Field(None, alias="x-airbyte-cache")
|
|
125
127
|
|
|
126
128
|
|
|
127
129
|
class ServerVariable(BaseModel):
|
|
@@ -150,6 +152,7 @@ class Server(BaseModel):
|
|
|
150
152
|
url: str
|
|
151
153
|
description: str | None = None
|
|
152
154
|
variables: Dict[str, ServerVariable] = Field(default_factory=dict)
|
|
155
|
+
x_airbyte_replication_user_config_mapping: Dict[str, str] | None = Field(default=None, alias="x-airbyte-replication-user-config-mapping")
|
|
153
156
|
|
|
154
157
|
@field_validator("url")
|
|
155
158
|
@classmethod
|
|
@@ -14,7 +14,7 @@ are implemented.
|
|
|
14
14
|
|
|
15
15
|
from typing import Literal
|
|
16
16
|
|
|
17
|
-
from pydantic import BaseModel, ConfigDict
|
|
17
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class PaginationConfig(BaseModel):
|
|
@@ -107,3 +107,124 @@ class RetryConfig(BaseModel):
|
|
|
107
107
|
# Header-based delay extraction
|
|
108
108
|
retry_after_header: str = "Retry-After"
|
|
109
109
|
retry_after_format: Literal["seconds", "milliseconds", "unix_timestamp"] = "seconds"
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class CacheFieldProperty(BaseModel):
|
|
113
|
+
"""
|
|
114
|
+
Nested property definition for object-type cache fields.
|
|
115
|
+
|
|
116
|
+
Supports recursive nesting to represent complex nested schemas in cache field definitions.
|
|
117
|
+
Used when a cache field has type 'object' and needs to define its internal structure.
|
|
118
|
+
|
|
119
|
+
Example YAML usage:
|
|
120
|
+
- name: collaboration
|
|
121
|
+
type: ['null', 'object']
|
|
122
|
+
description: "Collaboration data"
|
|
123
|
+
properties:
|
|
124
|
+
brief:
|
|
125
|
+
type: ['null', 'string']
|
|
126
|
+
comments:
|
|
127
|
+
type: ['null', 'array']
|
|
128
|
+
"""
|
|
129
|
+
|
|
130
|
+
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
131
|
+
|
|
132
|
+
type: str | list[str]
|
|
133
|
+
properties: dict[str, "CacheFieldProperty"] | None = None
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class CacheFieldConfig(BaseModel):
|
|
137
|
+
"""
|
|
138
|
+
Field configuration for cache mapping.
|
|
139
|
+
|
|
140
|
+
Defines a single field in a cache entity, with optional name aliasing
|
|
141
|
+
to map between user-facing field names and cache storage names.
|
|
142
|
+
|
|
143
|
+
For object-type fields, supports nested properties to define the internal structure
|
|
144
|
+
of complex nested schemas.
|
|
145
|
+
|
|
146
|
+
Used in x-airbyte-cache extension for api_search operations.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
150
|
+
|
|
151
|
+
name: str
|
|
152
|
+
x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
|
|
153
|
+
type: str | list[str]
|
|
154
|
+
description: str
|
|
155
|
+
properties: dict[str, CacheFieldProperty] | None = None
|
|
156
|
+
|
|
157
|
+
@property
|
|
158
|
+
def cache_name(self) -> str:
|
|
159
|
+
"""Return cache name, falling back to name if alias not specified."""
|
|
160
|
+
return self.x_airbyte_name or self.name
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
class CacheEntityConfig(BaseModel):
|
|
164
|
+
"""
|
|
165
|
+
Entity configuration for cache mapping.
|
|
166
|
+
|
|
167
|
+
Defines a cache-enabled entity with its fields and optional name aliasing
|
|
168
|
+
to map between user-facing entity names and cache storage names.
|
|
169
|
+
|
|
170
|
+
Used in x-airbyte-cache extension for api_search operations.
|
|
171
|
+
"""
|
|
172
|
+
|
|
173
|
+
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
174
|
+
|
|
175
|
+
entity: str
|
|
176
|
+
x_airbyte_name: str | None = Field(default=None, alias="x-airbyte-name")
|
|
177
|
+
fields: list[CacheFieldConfig]
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def cache_name(self) -> str:
|
|
181
|
+
"""Return cache entity name, falling back to entity if alias not specified."""
|
|
182
|
+
return self.x_airbyte_name or self.entity
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class CacheConfig(BaseModel):
|
|
186
|
+
"""
|
|
187
|
+
Cache configuration extension (x-airbyte-cache).
|
|
188
|
+
|
|
189
|
+
Defines cache-enabled entities and their field mappings for api_search operations.
|
|
190
|
+
Supports optional name aliasing via x-airbyte-name for both entities and fields,
|
|
191
|
+
enabling bidirectional mapping between user-facing names and cache storage names.
|
|
192
|
+
|
|
193
|
+
This extension is added to the Info model and provides field-level mapping for
|
|
194
|
+
search operations that use cached data.
|
|
195
|
+
|
|
196
|
+
Example YAML usage:
|
|
197
|
+
info:
|
|
198
|
+
title: Stripe API
|
|
199
|
+
x-airbyte-cache:
|
|
200
|
+
entities:
|
|
201
|
+
- entity: customers
|
|
202
|
+
stream: customers
|
|
203
|
+
fields:
|
|
204
|
+
- name: email
|
|
205
|
+
type: ["null", "string"]
|
|
206
|
+
description: "Customer email address"
|
|
207
|
+
- name: customer_name
|
|
208
|
+
x-airbyte-name: name
|
|
209
|
+
type: ["null", "string"]
|
|
210
|
+
description: "Customer full name"
|
|
211
|
+
"""
|
|
212
|
+
|
|
213
|
+
model_config = ConfigDict(populate_by_name=True, extra="forbid")
|
|
214
|
+
|
|
215
|
+
entities: list[CacheEntityConfig]
|
|
216
|
+
|
|
217
|
+
def get_entity_mapping(self, user_entity: str) -> CacheEntityConfig | None:
|
|
218
|
+
"""
|
|
219
|
+
Get entity config by user-facing name.
|
|
220
|
+
|
|
221
|
+
Args:
|
|
222
|
+
user_entity: User-facing entity name to look up
|
|
223
|
+
|
|
224
|
+
Returns:
|
|
225
|
+
CacheEntityConfig if found, None otherwise
|
|
226
|
+
"""
|
|
227
|
+
for entity in self.entities:
|
|
228
|
+
if entity.entity == user_entity:
|
|
229
|
+
return entity
|
|
230
|
+
return None
|
airbyte_agent_slack/models.py
CHANGED
|
@@ -176,29 +176,13 @@ class ChannelResponse(BaseModel):
|
|
|
176
176
|
ok: Union[bool, Any] = Field(default=None)
|
|
177
177
|
channel: Union[Channel, Any] = Field(default=None)
|
|
178
178
|
|
|
179
|
-
class
|
|
180
|
-
"""
|
|
179
|
+
class Reaction(BaseModel):
|
|
180
|
+
"""Message reaction"""
|
|
181
181
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
182
182
|
|
|
183
|
-
id: Union[str | None, Any] = Field(default=None)
|
|
184
183
|
name: Union[str | None, Any] = Field(default=None)
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
filetype: Union[str | None, Any] = Field(default=None)
|
|
188
|
-
pretty_type: Union[str | None, Any] = Field(default=None)
|
|
189
|
-
user: Union[str | None, Any] = Field(default=None)
|
|
190
|
-
size: Union[int | None, Any] = Field(default=None)
|
|
191
|
-
mode: Union[str | None, Any] = Field(default=None)
|
|
192
|
-
is_external: Union[bool | None, Any] = Field(default=None)
|
|
193
|
-
external_type: Union[str | None, Any] = Field(default=None)
|
|
194
|
-
is_public: Union[bool | None, Any] = Field(default=None)
|
|
195
|
-
public_url_shared: Union[bool | None, Any] = Field(default=None)
|
|
196
|
-
url_private: Union[str | None, Any] = Field(default=None)
|
|
197
|
-
url_private_download: Union[str | None, Any] = Field(default=None)
|
|
198
|
-
permalink: Union[str | None, Any] = Field(default=None)
|
|
199
|
-
permalink_public: Union[str | None, Any] = Field(default=None)
|
|
200
|
-
created: Union[int | None, Any] = Field(default=None)
|
|
201
|
-
timestamp: Union[int | None, Any] = Field(default=None)
|
|
184
|
+
users: Union[list[str] | None, Any] = Field(default=None)
|
|
185
|
+
count: Union[int | None, Any] = Field(default=None)
|
|
202
186
|
|
|
203
187
|
class Attachment(BaseModel):
|
|
204
188
|
"""Message attachment"""
|
|
@@ -221,13 +205,29 @@ class Attachment(BaseModel):
|
|
|
221
205
|
footer_icon: Union[str | None, Any] = Field(default=None)
|
|
222
206
|
ts: Union[Any, Any] = Field(default=None)
|
|
223
207
|
|
|
224
|
-
class
|
|
225
|
-
"""
|
|
208
|
+
class File(BaseModel):
|
|
209
|
+
"""File object"""
|
|
226
210
|
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
227
211
|
|
|
212
|
+
id: Union[str | None, Any] = Field(default=None)
|
|
228
213
|
name: Union[str | None, Any] = Field(default=None)
|
|
229
|
-
|
|
230
|
-
|
|
214
|
+
title: Union[str | None, Any] = Field(default=None)
|
|
215
|
+
mimetype: Union[str | None, Any] = Field(default=None)
|
|
216
|
+
filetype: Union[str | None, Any] = Field(default=None)
|
|
217
|
+
pretty_type: Union[str | None, Any] = Field(default=None)
|
|
218
|
+
user: Union[str | None, Any] = Field(default=None)
|
|
219
|
+
size: Union[int | None, Any] = Field(default=None)
|
|
220
|
+
mode: Union[str | None, Any] = Field(default=None)
|
|
221
|
+
is_external: Union[bool | None, Any] = Field(default=None)
|
|
222
|
+
external_type: Union[str | None, Any] = Field(default=None)
|
|
223
|
+
is_public: Union[bool | None, Any] = Field(default=None)
|
|
224
|
+
public_url_shared: Union[bool | None, Any] = Field(default=None)
|
|
225
|
+
url_private: Union[str | None, Any] = Field(default=None)
|
|
226
|
+
url_private_download: Union[str | None, Any] = Field(default=None)
|
|
227
|
+
permalink: Union[str | None, Any] = Field(default=None)
|
|
228
|
+
permalink_public: Union[str | None, Any] = Field(default=None)
|
|
229
|
+
created: Union[int | None, Any] = Field(default=None)
|
|
230
|
+
timestamp: Union[int | None, Any] = Field(default=None)
|
|
231
231
|
|
|
232
232
|
class Message(BaseModel):
|
|
233
233
|
"""Slack message object"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: airbyte-agent-slack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Airbyte Slack 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/
|
|
@@ -123,6 +123,6 @@ For the service's official API docs, see the [Slack API reference](https://api.s
|
|
|
123
123
|
|
|
124
124
|
## Version information
|
|
125
125
|
|
|
126
|
-
- **Package version:** 0.1.
|
|
126
|
+
- **Package version:** 0.1.2
|
|
127
127
|
- **Connector version:** 0.1.1
|
|
128
|
-
- **Generated with Connector SDK commit SHA:**
|
|
128
|
+
- **Generated with Connector SDK commit SHA:** 61a2e8229a38f13564ef2f85e276dff02f707573
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
airbyte_agent_slack/__init__.py,sha256=
|
|
1
|
+
airbyte_agent_slack/__init__.py,sha256=tODFTz4328M40qrpjD8py7VUMPAgvyCS99SERNkZ2c4,1827
|
|
2
2
|
airbyte_agent_slack/connector.py,sha256=5U0F8qNoT7UDS6MZ0_BidNt7p1wI73YKNqUxMlZZ-Po,20012
|
|
3
3
|
airbyte_agent_slack/connector_model.py,sha256=4s3vSwHde2emQI_kkIhL8JMkQoJlFqUbFKDU6dGUqD8,126566
|
|
4
|
-
airbyte_agent_slack/models.py,sha256=
|
|
4
|
+
airbyte_agent_slack/models.py,sha256=vyc_sR8j4nVYAZlLXmA-9s1vd4yFWB_i-uAJUNQRBzw,17688
|
|
5
5
|
airbyte_agent_slack/types.py,sha256=0B5u0udAnf6wxK8nUpzgk1opmO8dkIaOupJBltqXsVs,1550
|
|
6
6
|
airbyte_agent_slack/_vendored/__init__.py,sha256=ILl7AHXMui__swyrjxrh9yRa4dLiwBvV6axPWFWty80,38
|
|
7
7
|
airbyte_agent_slack/_vendored/connector_sdk/__init__.py,sha256=T5o7roU6NSpH-lCAGZ338sE5dlh4ZU6i6IkeG1zpems,1949
|
|
8
8
|
airbyte_agent_slack/_vendored/connector_sdk/auth_strategies.py,sha256=BdjAzFRTwXCmLFqYWqZ4Dx9RsqtI7pAkw-8NynSK4sQ,39914
|
|
9
9
|
airbyte_agent_slack/_vendored/connector_sdk/auth_template.py,sha256=nju4jqlFC_KI82ILNumNIyiUtRJcy7J94INIZ0QraI4,4454
|
|
10
|
-
airbyte_agent_slack/_vendored/connector_sdk/connector_model_loader.py,sha256=
|
|
10
|
+
airbyte_agent_slack/_vendored/connector_sdk/connector_model_loader.py,sha256=b88aoMynHxtG2dhzclkWrLiJbefTiKMzReyj3lOiwJI,34940
|
|
11
11
|
airbyte_agent_slack/_vendored/connector_sdk/constants.py,sha256=AtzOvhDMWbRJgpsQNWl5tkogHD6mWgEY668PgRmgtOY,2737
|
|
12
12
|
airbyte_agent_slack/_vendored/connector_sdk/exceptions.py,sha256=ss5MGv9eVPmsbLcLWetuu3sDmvturwfo6Pw3M37Oq5k,481
|
|
13
13
|
airbyte_agent_slack/_vendored/connector_sdk/extensions.py,sha256=XWRRoJOOrwUHSKbuQt5DU7CCu8ePzhd_HuP7c_uD77w,21376
|
|
@@ -42,16 +42,16 @@ airbyte_agent_slack/_vendored/connector_sdk/performance/__init__.py,sha256=Sp5fS
|
|
|
42
42
|
airbyte_agent_slack/_vendored/connector_sdk/performance/instrumentation.py,sha256=_dXvNiqdndIBwDjeDKNViWzn_M5FkSUsMmJtFldrmsM,1504
|
|
43
43
|
airbyte_agent_slack/_vendored/connector_sdk/performance/metrics.py,sha256=FRff7dKt4iwt_A7pxV5n9kAGBR756PC7q8-weWygPSM,2817
|
|
44
44
|
airbyte_agent_slack/_vendored/connector_sdk/schema/__init__.py,sha256=Uymu-QuzGJuMxexBagIvUxpVAigIuIhz3KeBl_Vu4Ko,1638
|
|
45
|
-
airbyte_agent_slack/_vendored/connector_sdk/schema/base.py,sha256=
|
|
45
|
+
airbyte_agent_slack/_vendored/connector_sdk/schema/base.py,sha256=4RYTkCWgyS5Z75z9TKj9vXySfO00HJ03QDtbdVYeHYM,5086
|
|
46
46
|
airbyte_agent_slack/_vendored/connector_sdk/schema/components.py,sha256=x3YCM1p2n_xHi50fMeOX0mXUiPqjGlLHs3Go8jXokb0,7895
|
|
47
47
|
airbyte_agent_slack/_vendored/connector_sdk/schema/connector.py,sha256=mSZk1wr2YSdRj9tTRsPAuIlCzd_xZLw-Bzl1sMwE0rE,3731
|
|
48
|
-
airbyte_agent_slack/_vendored/connector_sdk/schema/extensions.py,sha256=
|
|
48
|
+
airbyte_agent_slack/_vendored/connector_sdk/schema/extensions.py,sha256=f7VhHrcIYxaPOJHMc4g0lpy04pZTbx5nlroNzAu5B9Q,7135
|
|
49
49
|
airbyte_agent_slack/_vendored/connector_sdk/schema/operations.py,sha256=RpzGtAI4yvAtMHAfMUMcUwgHv_qJojnKlNb75_agUF8,5729
|
|
50
50
|
airbyte_agent_slack/_vendored/connector_sdk/schema/security.py,sha256=zQ9RRuF3LBgLQi_4cItmjXbG_5WKlmCNM3nCil30H90,8470
|
|
51
51
|
airbyte_agent_slack/_vendored/connector_sdk/telemetry/__init__.py,sha256=RaLgkBU4dfxn1LC5Y0Q9rr2PJbrwjxvPgBLmq8_WafE,211
|
|
52
52
|
airbyte_agent_slack/_vendored/connector_sdk/telemetry/config.py,sha256=tLmQwAFD0kP1WyBGWBS3ysaudN9H3e-3EopKZi6cGKg,885
|
|
53
53
|
airbyte_agent_slack/_vendored/connector_sdk/telemetry/events.py,sha256=8Y1NbXiwISX-V_wRofY7PqcwEXD0dLMnntKkY6XFU2s,1328
|
|
54
54
|
airbyte_agent_slack/_vendored/connector_sdk/telemetry/tracker.py,sha256=Ftrk0_ddfM7dZG8hF9xBuPwhbc9D6JZ7Q9qs5o3LEyA,5579
|
|
55
|
-
airbyte_agent_slack-0.1.
|
|
56
|
-
airbyte_agent_slack-0.1.
|
|
57
|
-
airbyte_agent_slack-0.1.
|
|
55
|
+
airbyte_agent_slack-0.1.2.dist-info/METADATA,sha256=LjAbm4ayysRReA8Y0n1bzFgK5Ubm_3BpvguKgNIBJD8,4158
|
|
56
|
+
airbyte_agent_slack-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
57
|
+
airbyte_agent_slack-0.1.2.dist-info/RECORD,,
|
|
File without changes
|