airbyte-cdk 6.48.7.dev7__py3-none-any.whl → 6.48.7.dev9__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.
@@ -9,6 +9,7 @@ from airbyte_protocol_dataclasses.models import ( # type: ignore[attr-defined]
9
9
  ConfiguredAirbyteCatalog,
10
10
  ConfiguredAirbyteStream,
11
11
  ConnectorSpecification,
12
+ DestinationOperation,
12
13
  )
13
14
  from serpyco_rs import CustomType, Serializer
14
15
 
@@ -25,8 +26,24 @@ class AirbyteStateBlobType(CustomType[AirbyteStateBlob, Dict[str, Any]]):
25
26
  return {"type": "object"}
26
27
 
27
28
 
28
- def custom_type_resolver(t: type) -> CustomType[AirbyteStateBlob, Dict[str, Any]] | None:
29
- return AirbyteStateBlobType() if t is AirbyteStateBlob else None
29
+ class DestinationOperationType(CustomType[DestinationOperation, Dict[str, Any]]):
30
+ def serialize(self, value: DestinationOperation) -> Dict[str, Any]:
31
+ # one field is named `schema` in the DestinationOperation which renders it as `schema_`. We need to reserialize this properly
32
+ return {"schema" if k == "schema_" else k: v for k, v in value.__dict__.items()}
33
+
34
+ def deserialize(self, value: Dict[str, Any]) -> DestinationOperation:
35
+ return DestinationOperation(value)
36
+
37
+ def get_json_schema(self) -> Dict[str, Any]:
38
+ return {"type": "object"}
39
+
40
+
41
+ def custom_type_resolver(t: type) -> CustomType[Any, Dict[str, Any]] | None:
42
+ if t is AirbyteStateBlob:
43
+ return AirbyteStateBlobType()
44
+ elif t is DestinationOperation:
45
+ return DestinationOperationType()
46
+ return None
30
47
 
31
48
 
32
49
  AirbyteStreamStateSerializer = Serializer(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.48.7.dev7
3
+ Version: 6.48.7.dev9
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -23,7 +23,7 @@ Provides-Extra: sql
23
23
  Provides-Extra: vector-db-based
24
24
  Requires-Dist: Jinja2 (>=3.1.2,<3.2.0)
25
25
  Requires-Dist: PyYAML (>=6.0.1,<7.0.0)
26
- Requires-Dist: airbyte-protocol-models-dataclasses (==0.15.0.dev1747930975)
26
+ Requires-Dist: airbyte-protocol-models-dataclasses (==0.15.0.dev1747996344)
27
27
  Requires-Dist: anyascii (>=0.3.2,<0.4.0)
28
28
  Requires-Dist: avro (>=1.11.2,<1.13.0) ; extra == "file-based"
29
29
  Requires-Dist: backoff
@@ -49,7 +49,7 @@ airbyte_cdk/manifest_migrations/migrations/registry.yaml,sha256=K5KBQ2C1T_dWExEJ
49
49
  airbyte_cdk/manifest_migrations/migrations_registry.py,sha256=zly2fwaOxDukqC7eowzrDlvhA2v71FjW74kDzvRXhSY,2619
50
50
  airbyte_cdk/models/__init__.py,sha256=KT-YKQNphQhwqbDoMmiZyUP3tZSmbZpjAETDidCHv0k,2164
51
51
  airbyte_cdk/models/airbyte_protocol.py,sha256=oZdKsZ7yPjUt9hvxdWNpxCtgjSV2RWhf4R9Np03sqyY,3613
52
- airbyte_cdk/models/airbyte_protocol_serializers.py,sha256=07lFuTW5o2YbNvRGy26NaywSTIwhGiywrkAfBZGlgtk,1766
52
+ airbyte_cdk/models/airbyte_protocol_serializers.py,sha256=jnCCC6AxeckASF4-vtgSlN7uKexbBjBN3uibj_WSNic,2453
53
53
  airbyte_cdk/models/connector_metadata.py,sha256=Lwb0JKiWvnqHduXjHHgBBBhTsGoLiNjxbG93W_OjcKQ,2875
54
54
  airbyte_cdk/models/well_known_types.py,sha256=EquepbisGPuCSrs_D7YVVnMR9-ShhUr21wnFz3COiJs,156
55
55
  airbyte_cdk/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -408,9 +408,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
408
408
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
409
409
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
410
410
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
411
- airbyte_cdk-6.48.7.dev7.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
412
- airbyte_cdk-6.48.7.dev7.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
413
- airbyte_cdk-6.48.7.dev7.dist-info/METADATA,sha256=ylVy7mNw8ybunzJi3PyS5d3GiDdnohl9sORvPalu3KE,6358
414
- airbyte_cdk-6.48.7.dev7.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
415
- airbyte_cdk-6.48.7.dev7.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
416
- airbyte_cdk-6.48.7.dev7.dist-info/RECORD,,
411
+ airbyte_cdk-6.48.7.dev9.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
412
+ airbyte_cdk-6.48.7.dev9.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
413
+ airbyte_cdk-6.48.7.dev9.dist-info/METADATA,sha256=8A0GZ1aIkG_ZlfcggFgyrybhRK7hUMISxMoh-8AK6W4,6358
414
+ airbyte_cdk-6.48.7.dev9.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
415
+ airbyte_cdk-6.48.7.dev9.dist-info/entry_points.txt,sha256=AKWbEkHfpzzk9nF9tqBUaw1MbvTM4mGtEzmZQm0ZWvM,139
416
+ airbyte_cdk-6.48.7.dev9.dist-info/RECORD,,