airbyte-cdk 6.31.1__py3-none-any.whl → 6.31.2.dev0__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.
Files changed (54) hide show
  1. airbyte_cdk/cli/source_declarative_manifest/_run.py +3 -9
  2. airbyte_cdk/connector_builder/connector_builder_handler.py +2 -3
  3. airbyte_cdk/sources/declarative/async_job/job_orchestrator.py +4 -4
  4. airbyte_cdk/sources/declarative/auth/jwt.py +11 -17
  5. airbyte_cdk/sources/declarative/auth/oauth.py +23 -89
  6. airbyte_cdk/sources/declarative/auth/token.py +3 -8
  7. airbyte_cdk/sources/declarative/auth/token_provider.py +5 -4
  8. airbyte_cdk/sources/declarative/checks/check_dynamic_stream.py +9 -19
  9. airbyte_cdk/sources/declarative/concurrent_declarative_source.py +43 -134
  10. airbyte_cdk/sources/declarative/declarative_component_schema.yaml +16 -55
  11. airbyte_cdk/sources/declarative/declarative_stream.py +1 -3
  12. airbyte_cdk/sources/declarative/extractors/record_filter.py +5 -3
  13. airbyte_cdk/sources/declarative/incremental/__init__.py +0 -6
  14. airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +7 -6
  15. airbyte_cdk/sources/declarative/incremental/global_substream_cursor.py +0 -3
  16. airbyte_cdk/sources/declarative/incremental/per_partition_cursor.py +3 -35
  17. airbyte_cdk/sources/declarative/manifest_declarative_source.py +7 -15
  18. airbyte_cdk/sources/declarative/models/declarative_component_schema.py +15 -45
  19. airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +64 -343
  20. airbyte_cdk/sources/declarative/partition_routers/async_job_partition_router.py +5 -5
  21. airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +4 -2
  22. airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +15 -55
  23. airbyte_cdk/sources/declarative/requesters/error_handlers/composite_error_handler.py +0 -22
  24. airbyte_cdk/sources/declarative/requesters/error_handlers/http_response_filter.py +4 -4
  25. airbyte_cdk/sources/declarative/requesters/http_requester.py +5 -1
  26. airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +6 -5
  27. airbyte_cdk/sources/declarative/requesters/request_option.py +83 -4
  28. airbyte_cdk/sources/declarative/requesters/request_options/datetime_based_request_options_provider.py +7 -6
  29. airbyte_cdk/sources/declarative/retrievers/async_retriever.py +12 -6
  30. airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +5 -2
  31. airbyte_cdk/sources/declarative/schema/__init__.py +0 -2
  32. airbyte_cdk/sources/declarative/schema/dynamic_schema_loader.py +5 -44
  33. airbyte_cdk/sources/http_logger.py +1 -1
  34. airbyte_cdk/sources/streams/concurrent/cursor.py +57 -51
  35. airbyte_cdk/sources/streams/concurrent/state_converters/datetime_stream_state_converter.py +13 -22
  36. airbyte_cdk/sources/streams/core.py +6 -6
  37. airbyte_cdk/sources/streams/http/requests_native_auth/abstract_oauth.py +62 -231
  38. airbyte_cdk/sources/streams/http/requests_native_auth/oauth.py +88 -171
  39. airbyte_cdk/sources/types.py +2 -4
  40. airbyte_cdk/sources/utils/transform.py +2 -23
  41. airbyte_cdk/test/utils/manifest_only_fixtures.py +2 -1
  42. airbyte_cdk/utils/mapping_helpers.py +86 -27
  43. airbyte_cdk/utils/slice_hasher.py +1 -8
  44. {airbyte_cdk-6.31.1.dist-info → airbyte_cdk-6.31.2.dev0.dist-info}/METADATA +6 -6
  45. {airbyte_cdk-6.31.1.dist-info → airbyte_cdk-6.31.2.dev0.dist-info}/RECORD +48 -54
  46. {airbyte_cdk-6.31.1.dist-info → airbyte_cdk-6.31.2.dev0.dist-info}/WHEEL +1 -1
  47. airbyte_cdk/sources/declarative/incremental/concurrent_partition_cursor.py +0 -400
  48. airbyte_cdk/sources/declarative/parsers/custom_code_compiler.py +0 -143
  49. airbyte_cdk/sources/streams/concurrent/clamping.py +0 -99
  50. airbyte_cdk/sources/streams/concurrent/cursor_types.py +0 -32
  51. airbyte_cdk/utils/datetime_helpers.py +0 -499
  52. airbyte_cdk-6.31.1.dist-info/LICENSE_SHORT +0 -1
  53. {airbyte_cdk-6.31.1.dist-info → airbyte_cdk-6.31.2.dev0.dist-info}/LICENSE.txt +0 -0
  54. {airbyte_cdk-6.31.1.dist-info → airbyte_cdk-6.31.2.dev0.dist-info}/entry_points.txt +0 -0
@@ -59,11 +59,6 @@ class CheckDynamicStream(BaseModel):
59
59
  description="Numbers of the streams to try reading from when running a check operation.",
60
60
  title="Stream Count",
61
61
  )
62
- use_check_availability: Optional[bool] = Field(
63
- True,
64
- description="Enables stream check availability. This field is automatically set by the CDK.",
65
- title="Use Check Availability",
66
- )
67
62
 
68
63
 
69
64
  class ConcurrencyLevel(BaseModel):
@@ -333,16 +328,6 @@ class LegacyToPerPartitionStateMigration(BaseModel):
333
328
  type: Optional[Literal["LegacyToPerPartitionStateMigration"]] = None
334
329
 
335
330
 
336
- class Clamping(BaseModel):
337
- target: str = Field(
338
- ...,
339
- description="The period of time that datetime windows will be clamped by",
340
- examples=["DAY", "WEEK", "MONTH", "{{ config['target'] }}"],
341
- title="Target",
342
- )
343
- target_details: Optional[Dict[str, Any]] = None
344
-
345
-
346
331
  class Algorithm(Enum):
347
332
  HS256 = "HS256"
348
333
  HS384 = "HS384"
@@ -511,8 +496,8 @@ class OAuthAuthenticator(BaseModel):
511
496
  examples=["custom_app_id"],
512
497
  title="Client ID Property Name",
513
498
  )
514
- client_id: Optional[str] = Field(
515
- None,
499
+ client_id: str = Field(
500
+ ...,
516
501
  description="The OAuth client ID. Fill it in the user inputs.",
517
502
  examples=["{{ config['client_id }}", "{{ config['credentials']['client_id }}"],
518
503
  title="Client ID",
@@ -523,8 +508,8 @@ class OAuthAuthenticator(BaseModel):
523
508
  examples=["custom_app_secret"],
524
509
  title="Client Secret Property Name",
525
510
  )
526
- client_secret: Optional[str] = Field(
527
- None,
511
+ client_secret: str = Field(
512
+ ...,
528
513
  description="The OAuth client secret. Fill it in the user inputs.",
529
514
  examples=[
530
515
  "{{ config['client_secret }}",
@@ -629,16 +614,6 @@ class OAuthAuthenticator(BaseModel):
629
614
  description="When the token updater is defined, new refresh tokens, access tokens and the access token expiry date are written back from the authentication response to the config object. This is important if the refresh token can only used once.",
630
615
  title="Token Updater",
631
616
  )
632
- profile_assertion: Optional[JwtAuthenticator] = Field(
633
- None,
634
- description="The authenticator being used to authenticate the client authenticator.",
635
- title="Profile Assertion",
636
- )
637
- use_profile_assertion: Optional[bool] = Field(
638
- False,
639
- description="Enable using profile assertion as a flow for OAuth authorization.",
640
- title="Use Profile Assertion",
641
- )
642
617
  parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
643
618
 
644
619
 
@@ -741,13 +716,8 @@ class HttpResponseFilter(BaseModel):
741
716
  parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
742
717
 
743
718
 
744
- class ComplexFieldType(BaseModel):
745
- field_type: str
746
- items: Optional[Union[str, ComplexFieldType]] = None
747
-
748
-
749
719
  class TypesMap(BaseModel):
750
- target_type: Union[str, List[str], ComplexFieldType]
720
+ target_type: Union[str, List[str]]
751
721
  current_type: Union[str, List[str]]
752
722
  condition: Optional[str] = None
753
723
 
@@ -1200,11 +1170,17 @@ class InjectInto(Enum):
1200
1170
 
1201
1171
  class RequestOption(BaseModel):
1202
1172
  type: Literal["RequestOption"]
1203
- field_name: str = Field(
1204
- ...,
1205
- description="Configures which key should be used in the location that the descriptor is being injected into",
1173
+ field_name: Optional[str] = Field(
1174
+ None,
1175
+ description="Configures which key should be used in the location that the descriptor is being injected into. We hope to eventually deprecate this field in favor of `field_path` for all request_options, but must currently maintain it for backwards compatibility in the Builder.",
1206
1176
  examples=["segment_id"],
1207
- title="Request Option",
1177
+ title="Field Name",
1178
+ )
1179
+ field_path: Optional[List[str]] = Field(
1180
+ None,
1181
+ description="Configures a path to be used for nested structures in JSON body requests (e.g. GraphQL queries)",
1182
+ examples=[["data", "viewer", "id"]],
1183
+ title="Field Path",
1208
1184
  )
1209
1185
  inject_into: InjectInto = Field(
1210
1186
  ...,
@@ -1481,11 +1457,6 @@ class AuthFlow(BaseModel):
1481
1457
 
1482
1458
  class DatetimeBasedCursor(BaseModel):
1483
1459
  type: Literal["DatetimeBasedCursor"]
1484
- clamping: Optional[Clamping] = Field(
1485
- None,
1486
- description="This option is used to adjust the upper and lower boundaries of each datetime window to beginning and end of the provided target period (day, week, month)",
1487
- title="Date Range Clamping",
1488
- )
1489
1460
  cursor_field: str = Field(
1490
1461
  ...,
1491
1462
  description="The location of the value on a record that will be used as a bookmark during sync. To ensure no data loss, the API must return records in ascending order based on the cursor field. Nested fields are not supported, so the field must be at the top level of the record. You can use a combination of Add Field and Remove Field transformations to move the nested field to the top.",
@@ -2270,7 +2241,6 @@ class DynamicDeclarativeStream(BaseModel):
2270
2241
  )
2271
2242
 
2272
2243
 
2273
- ComplexFieldType.update_forward_refs()
2274
2244
  CompositeErrorHandler.update_forward_refs()
2275
2245
  DeclarativeSource1.update_forward_refs()
2276
2246
  DeclarativeSource2.update_forward_refs()