airbyte-cdk 6.33.0.dev0__py3-none-any.whl → 6.33.1__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 (22) hide show
  1. airbyte_cdk/sources/declarative/auth/token.py +3 -8
  2. airbyte_cdk/sources/declarative/concurrent_declarative_source.py +13 -2
  3. airbyte_cdk/sources/declarative/declarative_component_schema.yaml +15 -212
  4. airbyte_cdk/sources/declarative/incremental/datetime_based_cursor.py +7 -6
  5. airbyte_cdk/sources/declarative/manifest_declarative_source.py +0 -4
  6. airbyte_cdk/sources/declarative/models/declarative_component_schema.py +10 -169
  7. airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +34 -171
  8. airbyte_cdk/sources/declarative/partition_routers/list_partition_router.py +4 -2
  9. airbyte_cdk/sources/declarative/partition_routers/substream_partition_router.py +26 -18
  10. airbyte_cdk/sources/declarative/requesters/http_requester.py +5 -4
  11. airbyte_cdk/sources/declarative/requesters/paginators/default_paginator.py +6 -5
  12. airbyte_cdk/sources/declarative/requesters/request_option.py +83 -4
  13. airbyte_cdk/sources/declarative/requesters/request_options/datetime_based_request_options_provider.py +7 -6
  14. airbyte_cdk/sources/declarative/retrievers/simple_retriever.py +4 -1
  15. airbyte_cdk/sources/streams/call_rate.py +71 -84
  16. airbyte_cdk/utils/mapping_helpers.py +86 -27
  17. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/METADATA +1 -1
  18. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/RECORD +22 -22
  19. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/LICENSE.txt +0 -0
  20. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/LICENSE_SHORT +0 -0
  21. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/WHEEL +0 -0
  22. {airbyte_cdk-6.33.0.dev0.dist-info → airbyte_cdk-6.33.1.dist-info}/entry_points.txt +0 -0
@@ -5,7 +5,7 @@
5
5
  import base64
6
6
  import logging
7
7
  from dataclasses import InitVar, dataclass
8
- from typing import Any, Mapping, Union
8
+ from typing import Any, Mapping, MutableMapping, Union
9
9
 
10
10
  import requests
11
11
  from cachetools import TTLCache, cached
@@ -45,11 +45,6 @@ class ApiKeyAuthenticator(DeclarativeAuthenticator):
45
45
  config: Config
46
46
  parameters: InitVar[Mapping[str, Any]]
47
47
 
48
- def __post_init__(self, parameters: Mapping[str, Any]) -> None:
49
- self._field_name = InterpolatedString.create(
50
- self.request_option.field_name, parameters=parameters
51
- )
52
-
53
48
  @property
54
49
  def auth_header(self) -> str:
55
50
  options = self._get_request_options(RequestOptionType.header)
@@ -60,9 +55,9 @@ class ApiKeyAuthenticator(DeclarativeAuthenticator):
60
55
  return self.token_provider.get_token()
61
56
 
62
57
  def _get_request_options(self, option_type: RequestOptionType) -> Mapping[str, Any]:
63
- options = {}
58
+ options: MutableMapping[str, Any] = {}
64
59
  if self.request_option.inject_into == option_type:
65
- options[self._field_name.eval(self.config)] = self.token
60
+ self.request_option.inject_into_request(options, self.token, self.config)
66
61
  return options
67
62
 
68
63
  def get_request_params(self) -> Mapping[str, Any]:
@@ -475,10 +475,21 @@ class ConcurrentDeclarativeSource(ManifestDeclarativeSource, Generic[TState]):
475
475
  # Also a temporary hack. In the legacy Stream implementation, as part of the read,
476
476
  # set_initial_state() is called to instantiate incoming state on the cursor. Although we no
477
477
  # longer rely on the legacy low-code cursor for concurrent checkpointing, low-code components
478
- # like StopConditionPaginationStrategyDecorator and ClientSideIncrementalRecordFilterDecorator
479
- # still rely on a DatetimeBasedCursor that is properly initialized with state.
478
+ # like StopConditionPaginationStrategyDecorator still rely on a DatetimeBasedCursor that is
479
+ # properly initialized with state.
480
480
  if retriever.cursor:
481
481
  retriever.cursor.set_initial_state(stream_state=stream_state)
482
+
483
+ # Similar to above, the ClientSideIncrementalRecordFilterDecorator cursor is a separate instance
484
+ # from the one initialized on the SimpleRetriever, so it also must also have state initialized
485
+ # for semi-incremental streams using is_client_side_incremental to filter properly
486
+ if isinstance(retriever.record_selector, RecordSelector) and isinstance(
487
+ retriever.record_selector.record_filter, ClientSideIncrementalRecordFilterDecorator
488
+ ):
489
+ retriever.record_selector.record_filter._cursor.set_initial_state(
490
+ stream_state=stream_state
491
+ ) # type: ignore # After non-concurrent cursors are deprecated we can remove these cursor workarounds
492
+
482
493
  # We zero it out here, but since this is a cursor reference, the state is still properly
483
494
  # instantiated for the other components that reference it
484
495
  retriever.cursor = None
@@ -40,12 +40,6 @@ properties:
40
40
  "$ref": "#/definitions/Spec"
41
41
  concurrency_level:
42
42
  "$ref": "#/definitions/ConcurrencyLevel"
43
- api_budget:
44
- title: API Budget
45
- description: Defines how many requests can be made to the API in a given time frame. This field accepts either a generic APIBudget or an HTTP-specific configuration (HTTPAPIBudget) to be applied across all streams.
46
- anyOf:
47
- - "$ref": "#/definitions/APIBudget"
48
- - "$ref": "#/definitions/HTTPAPIBudget"
49
43
  metadata:
50
44
  type: object
51
45
  description: For internal Airbyte use only - DO NOT modify manually. Used by consumers of declarative manifests for storing related metadata.
@@ -800,7 +794,7 @@ definitions:
800
794
  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)
801
795
  type: object
802
796
  required:
803
- - target
797
+ - target
804
798
  properties:
805
799
  target:
806
800
  title: Target
@@ -1371,207 +1365,6 @@ definitions:
1371
1365
  $parameters:
1372
1366
  type: object
1373
1367
  additional_properties: true
1374
- APIBudget:
1375
- title: API Budget
1376
- description: >
1377
- A generic API budget configuration that defines the policies (rate limiting rules)
1378
- and the maximum number of attempts to acquire a call credit. This budget does not automatically
1379
- update itself based on HTTP response headers.
1380
- type: object
1381
- required:
1382
- - type
1383
- - policies
1384
- properties:
1385
- type:
1386
- type: string
1387
- enum: [APIBudget]
1388
- policies:
1389
- title: Policies
1390
- description: List of call rate policies that define how many calls are allowed.
1391
- type: array
1392
- items:
1393
- anyOf:
1394
- - "$ref": "#/definitions/FixedWindowCallRatePolicy"
1395
- - "$ref": "#/definitions/MovingWindowCallRatePolicy"
1396
- - "$ref": "#/definitions/UnlimitedCallRatePolicy"
1397
- maximum_attempts_to_acquire:
1398
- title: Maximum Attempts to Acquire
1399
- description: The maximum number of attempts to acquire a call before giving up.
1400
- type: integer
1401
- default: 100000
1402
- additionalProperties: true
1403
- HTTPAPIBudget:
1404
- title: HTTP API Budget
1405
- description: >
1406
- An HTTP-specific API budget that extends APIBudget by updating rate limiting information based
1407
- on HTTP response headers. It extracts available calls and the next reset timestamp from the HTTP responses.
1408
- type: object
1409
- required:
1410
- - type
1411
- - policies
1412
- properties:
1413
- type:
1414
- type: string
1415
- enum: [HTTPAPIBudget]
1416
- policies:
1417
- title: Policies
1418
- description: List of call rate policies that define how many calls are allowed.
1419
- type: array
1420
- items:
1421
- anyOf:
1422
- - "$ref": "#/definitions/FixedWindowCallRatePolicy"
1423
- - "$ref": "#/definitions/MovingWindowCallRatePolicy"
1424
- - "$ref": "#/definitions/UnlimitedCallRatePolicy"
1425
- ratelimit_reset_header:
1426
- title: Rate Limit Reset Header
1427
- description: The HTTP response header name that indicates when the rate limit resets.
1428
- type: string
1429
- default: "ratelimit-reset"
1430
- ratelimit_remaining_header:
1431
- title: Rate Limit Remaining Header
1432
- description: The HTTP response header name that indicates the number of remaining allowed calls.
1433
- type: string
1434
- default: "ratelimit-remaining"
1435
- status_codes_for_ratelimit_hit:
1436
- title: Status Codes for Rate Limit Hit
1437
- description: List of HTTP status codes that indicate a rate limit has been hit.
1438
- type: array
1439
- items:
1440
- type: integer
1441
- default: [429]
1442
- maximum_attempts_to_acquire:
1443
- title: Maximum Attempts to Acquire
1444
- description: The maximum number of attempts to acquire a call before giving up.
1445
- type: integer
1446
- default: 100000
1447
- additionalProperties: true
1448
- FixedWindowCallRatePolicy:
1449
- title: Fixed Window Call Rate Policy
1450
- description: A policy that allows a fixed number of calls within a specific time window.
1451
- type: object
1452
- required:
1453
- - type
1454
- - next_reset_ts
1455
- - period
1456
- - call_limit
1457
- - matchers
1458
- properties:
1459
- type:
1460
- type: string
1461
- enum: [FixedWindowCallRatePolicy]
1462
- next_reset_ts:
1463
- title: Next Reset Timestamp
1464
- description: The timestamp when the rate limit will reset.
1465
- type: string
1466
- format: date-time
1467
- period:
1468
- title: Period
1469
- description: The time interval for the rate limit window.
1470
- type: string
1471
- format: duration
1472
- call_limit:
1473
- title: Call Limit
1474
- description: The maximum number of calls allowed within the period.
1475
- type: integer
1476
- matchers:
1477
- title: Matchers
1478
- description: List of matchers that define which requests this policy applies to.
1479
- type: array
1480
- items:
1481
- "$ref": "#/definitions/HttpRequestMatcher"
1482
- additionalProperties: true
1483
- MovingWindowCallRatePolicy:
1484
- title: Moving Window Call Rate Policy
1485
- description: A policy that allows a fixed number of calls within a moving time window.
1486
- type: object
1487
- required:
1488
- - type
1489
- - rates
1490
- - matchers
1491
- properties:
1492
- type:
1493
- type: string
1494
- enum: [MovingWindowCallRatePolicy]
1495
- rates:
1496
- title: Rates
1497
- description: List of rates that define the call limits for different time intervals.
1498
- type: array
1499
- items:
1500
- "$ref": "#/definitions/Rate"
1501
- matchers:
1502
- title: Matchers
1503
- description: List of matchers that define which requests this policy applies to.
1504
- type: array
1505
- items:
1506
- "$ref": "#/definitions/HttpRequestMatcher"
1507
- additionalProperties: true
1508
- UnlimitedCallRatePolicy:
1509
- title: Unlimited Call Rate Policy
1510
- description: A policy that allows unlimited calls for specific requests.
1511
- type: object
1512
- required:
1513
- - type
1514
- - matchers
1515
- properties:
1516
- type:
1517
- type: string
1518
- enum: [UnlimitedCallRatePolicy]
1519
- matchers:
1520
- title: Matchers
1521
- description: List of matchers that define which requests this policy applies to.
1522
- type: array
1523
- items:
1524
- "$ref": "#/definitions/HttpRequestMatcher"
1525
- additionalProperties: true
1526
- Rate:
1527
- title: Rate
1528
- description: Defines a rate limit with a specific number of calls allowed within a time interval.
1529
- type: object
1530
- required:
1531
- - limit
1532
- - interval
1533
- properties:
1534
- limit:
1535
- title: Limit
1536
- description: The maximum number of calls allowed within the interval.
1537
- type: integer
1538
- interval:
1539
- title: Interval
1540
- description: The time interval for the rate limit.
1541
- type: string
1542
- format: duration
1543
- additionalProperties: true
1544
- HttpRequestMatcher:
1545
- title: HTTP Request Matcher
1546
- description: >
1547
- Matches HTTP requests based on method, base URL, URL path pattern, query parameters, and headers.
1548
- Use `url_base` to specify the scheme and host (without trailing slash) and
1549
- `url_path_pattern` to apply a regex to the request path.
1550
- type: object
1551
- properties:
1552
- method:
1553
- title: Method
1554
- description: The HTTP method to match (e.g., GET, POST).
1555
- type: string
1556
- url_base:
1557
- title: URL Base
1558
- description: The base URL (scheme and host, e.g. "https://api.example.com") to match.
1559
- type: string
1560
- url_path_pattern:
1561
- title: URL Path Pattern
1562
- description: A regular expression pattern to match the URL path.
1563
- type: string
1564
- params:
1565
- title: Parameters
1566
- description: The query parameters to match.
1567
- type: object
1568
- additionalProperties: true
1569
- headers:
1570
- title: Headers
1571
- description: The headers to match.
1572
- type: object
1573
- additionalProperties: true
1574
- additionalProperties: true
1575
1368
  DefaultErrorHandler:
1576
1369
  title: Default Error Handler
1577
1370
  description: Component defining how to handle errors. Default behavior includes only retrying server errors (HTTP 5XX) and too many requests (HTTP 429) with an exponential backoff.
@@ -3054,25 +2847,35 @@ definitions:
3054
2847
  enum: [RequestPath]
3055
2848
  RequestOption:
3056
2849
  title: Request Option
3057
- description: Specifies the key field and where in the request a component's value should be injected.
2850
+ description: Specifies the key field or path and where in the request a component's value should be injected.
3058
2851
  type: object
3059
2852
  required:
3060
2853
  - type
3061
- - field_name
3062
2854
  - inject_into
3063
2855
  properties:
3064
2856
  type:
3065
2857
  type: string
3066
2858
  enum: [RequestOption]
3067
2859
  field_name:
3068
- title: Request Option
3069
- description: Configures which key should be used in the location that the descriptor is being injected into
2860
+ title: Field Name
2861
+ 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.
3070
2862
  type: string
3071
2863
  examples:
3072
2864
  - segment_id
3073
2865
  interpolation_context:
3074
2866
  - config
3075
2867
  - parameters
2868
+ field_path:
2869
+ title: Field Path
2870
+ description: Configures a path to be used for nested structures in JSON body requests (e.g. GraphQL queries)
2871
+ type: array
2872
+ items:
2873
+ type: string
2874
+ examples:
2875
+ - ["data", "viewer", "id"]
2876
+ interpolation_context:
2877
+ - config
2878
+ - parameters
3076
2879
  inject_into:
3077
2880
  title: Inject Into
3078
2881
  description: Configures where the descriptor should be set on the HTTP requests. Note that request parameters that are already encoded in the URL path will not be duplicated.
@@ -365,14 +365,15 @@ class DatetimeBasedCursor(DeclarativeCursor):
365
365
  options: MutableMapping[str, Any] = {}
366
366
  if not stream_slice:
367
367
  return options
368
+
368
369
  if self.start_time_option and self.start_time_option.inject_into == option_type:
369
- options[self.start_time_option.field_name.eval(config=self.config)] = stream_slice.get( # type: ignore # field_name is always casted to an interpolated string
370
- self._partition_field_start.eval(self.config)
371
- )
370
+ start_time_value = stream_slice.get(self._partition_field_start.eval(self.config))
371
+ self.start_time_option.inject_into_request(options, start_time_value, self.config)
372
+
372
373
  if self.end_time_option and self.end_time_option.inject_into == option_type:
373
- options[self.end_time_option.field_name.eval(config=self.config)] = stream_slice.get( # type: ignore [union-attr]
374
- self._partition_field_end.eval(self.config)
375
- )
374
+ end_time_value = stream_slice.get(self._partition_field_end.eval(self.config))
375
+ self.end_time_option.inject_into_request(options, end_time_value, self.config)
376
+
376
377
  return options
377
378
 
378
379
  def should_be_synced(self, record: Record) -> bool:
@@ -137,10 +137,6 @@ class ManifestDeclarativeSource(DeclarativeSource):
137
137
  self._source_config, config
138
138
  )
139
139
 
140
- api_budget_model = self._source_config.get("api_budget")
141
- if api_budget_model:
142
- self._constructor.set_api_budget(api_budget_model, config)
143
-
144
140
  source_streams = [
145
141
  self._constructor.create_component(
146
142
  DeclarativeStreamModel,
@@ -3,7 +3,6 @@
3
3
 
4
4
  from __future__ import annotations
5
5
 
6
- from datetime import datetime, timedelta
7
6
  from enum import Enum
8
7
  from typing import Any, Dict, List, Literal, Optional, Union
9
8
 
@@ -643,45 +642,6 @@ class OAuthAuthenticator(BaseModel):
643
642
  parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
644
643
 
645
644
 
646
- class Rate(BaseModel):
647
- class Config:
648
- extra = Extra.allow
649
-
650
- limit: int = Field(
651
- ...,
652
- description="The maximum number of calls allowed within the interval.",
653
- title="Limit",
654
- )
655
- interval: timedelta = Field(
656
- ..., description="The time interval for the rate limit.", title="Interval"
657
- )
658
-
659
-
660
- class HttpRequestMatcher(BaseModel):
661
- class Config:
662
- extra = Extra.allow
663
-
664
- method: Optional[str] = Field(
665
- None, description="The HTTP method to match (e.g., GET, POST).", title="Method"
666
- )
667
- url_base: Optional[str] = Field(
668
- None,
669
- description='The base URL (scheme and host, e.g. "https://api.example.com") to match.',
670
- title="URL Base",
671
- )
672
- url_path_pattern: Optional[str] = Field(
673
- None,
674
- description="A regular expression pattern to match the URL path.",
675
- title="URL Path Pattern",
676
- )
677
- params: Optional[Dict[str, Any]] = Field(
678
- None, description="The query parameters to match.", title="Parameters"
679
- )
680
- headers: Optional[Dict[str, Any]] = Field(
681
- None, description="The headers to match.", title="Headers"
682
- )
683
-
684
-
685
645
  class DpathExtractor(BaseModel):
686
646
  type: Literal["DpathExtractor"]
687
647
  field_path: List[str] = Field(
@@ -1240,11 +1200,17 @@ class InjectInto(Enum):
1240
1200
 
1241
1201
  class RequestOption(BaseModel):
1242
1202
  type: Literal["RequestOption"]
1243
- field_name: str = Field(
1244
- ...,
1245
- description="Configures which key should be used in the location that the descriptor is being injected into",
1203
+ field_name: Optional[str] = Field(
1204
+ None,
1205
+ 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.",
1246
1206
  examples=["segment_id"],
1247
- title="Request Option",
1207
+ title="Field Name",
1208
+ )
1209
+ field_path: Optional[List[str]] = Field(
1210
+ None,
1211
+ description="Configures a path to be used for nested structures in JSON body requests (e.g. GraphQL queries)",
1212
+ examples=[["data", "viewer", "id"]],
1213
+ title="Field Path",
1248
1214
  )
1249
1215
  inject_into: InjectInto = Field(
1250
1216
  ...,
@@ -1618,60 +1584,6 @@ class DatetimeBasedCursor(BaseModel):
1618
1584
  parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
1619
1585
 
1620
1586
 
1621
- class FixedWindowCallRatePolicy(BaseModel):
1622
- class Config:
1623
- extra = Extra.allow
1624
-
1625
- type: Literal["FixedWindowCallRatePolicy"]
1626
- next_reset_ts: datetime = Field(
1627
- ...,
1628
- description="The timestamp when the rate limit will reset.",
1629
- title="Next Reset Timestamp",
1630
- )
1631
- period: timedelta = Field(
1632
- ..., description="The time interval for the rate limit window.", title="Period"
1633
- )
1634
- call_limit: int = Field(
1635
- ...,
1636
- description="The maximum number of calls allowed within the period.",
1637
- title="Call Limit",
1638
- )
1639
- matchers: List[HttpRequestMatcher] = Field(
1640
- ...,
1641
- description="List of matchers that define which requests this policy applies to.",
1642
- title="Matchers",
1643
- )
1644
-
1645
-
1646
- class MovingWindowCallRatePolicy(BaseModel):
1647
- class Config:
1648
- extra = Extra.allow
1649
-
1650
- type: Literal["MovingWindowCallRatePolicy"]
1651
- rates: List[Rate] = Field(
1652
- ...,
1653
- description="List of rates that define the call limits for different time intervals.",
1654
- title="Rates",
1655
- )
1656
- matchers: List[HttpRequestMatcher] = Field(
1657
- ...,
1658
- description="List of matchers that define which requests this policy applies to.",
1659
- title="Matchers",
1660
- )
1661
-
1662
-
1663
- class UnlimitedCallRatePolicy(BaseModel):
1664
- class Config:
1665
- extra = Extra.allow
1666
-
1667
- type: Literal["UnlimitedCallRatePolicy"]
1668
- matchers: List[HttpRequestMatcher] = Field(
1669
- ...,
1670
- description="List of matchers that define which requests this policy applies to.",
1671
- title="Matchers",
1672
- )
1673
-
1674
-
1675
1587
  class DefaultErrorHandler(BaseModel):
1676
1588
  type: Literal["DefaultErrorHandler"]
1677
1589
  backoff_strategies: Optional[
@@ -1803,67 +1715,6 @@ class CompositeErrorHandler(BaseModel):
1803
1715
  parameters: Optional[Dict[str, Any]] = Field(None, alias="$parameters")
1804
1716
 
1805
1717
 
1806
- class APIBudget(BaseModel):
1807
- class Config:
1808
- extra = Extra.allow
1809
-
1810
- type: Literal["APIBudget"]
1811
- policies: List[
1812
- Union[
1813
- FixedWindowCallRatePolicy,
1814
- MovingWindowCallRatePolicy,
1815
- UnlimitedCallRatePolicy,
1816
- ]
1817
- ] = Field(
1818
- ...,
1819
- description="List of call rate policies that define how many calls are allowed.",
1820
- title="Policies",
1821
- )
1822
- maximum_attempts_to_acquire: Optional[int] = Field(
1823
- 100000,
1824
- description="The maximum number of attempts to acquire a call before giving up.",
1825
- title="Maximum Attempts to Acquire",
1826
- )
1827
-
1828
-
1829
- class HTTPAPIBudget(BaseModel):
1830
- class Config:
1831
- extra = Extra.allow
1832
-
1833
- type: Literal["HTTPAPIBudget"]
1834
- policies: List[
1835
- Union[
1836
- FixedWindowCallRatePolicy,
1837
- MovingWindowCallRatePolicy,
1838
- UnlimitedCallRatePolicy,
1839
- ]
1840
- ] = Field(
1841
- ...,
1842
- description="List of call rate policies that define how many calls are allowed.",
1843
- title="Policies",
1844
- )
1845
- ratelimit_reset_header: Optional[str] = Field(
1846
- "ratelimit-reset",
1847
- description="The HTTP response header name that indicates when the rate limit resets.",
1848
- title="Rate Limit Reset Header",
1849
- )
1850
- ratelimit_remaining_header: Optional[str] = Field(
1851
- "ratelimit-remaining",
1852
- description="The HTTP response header name that indicates the number of remaining allowed calls.",
1853
- title="Rate Limit Remaining Header",
1854
- )
1855
- status_codes_for_ratelimit_hit: Optional[List[int]] = Field(
1856
- [429],
1857
- description="List of HTTP status codes that indicate a rate limit has been hit.",
1858
- title="Status Codes for Rate Limit Hit",
1859
- )
1860
- maximum_attempts_to_acquire: Optional[int] = Field(
1861
- 100000,
1862
- description="The maximum number of attempts to acquire a call before giving up.",
1863
- title="Maximum Attempts to Acquire",
1864
- )
1865
-
1866
-
1867
1718
  class ZipfileDecoder(BaseModel):
1868
1719
  class Config:
1869
1720
  extra = Extra.allow
@@ -1897,11 +1748,6 @@ class DeclarativeSource1(BaseModel):
1897
1748
  definitions: Optional[Dict[str, Any]] = None
1898
1749
  spec: Optional[Spec] = None
1899
1750
  concurrency_level: Optional[ConcurrencyLevel] = None
1900
- api_budget: Optional[Union[APIBudget, HTTPAPIBudget]] = Field(
1901
- None,
1902
- description="Defines how many requests can be made to the API in a given time frame. This field accepts either a generic APIBudget or an HTTP-specific configuration (HTTPAPIBudget) to be applied across all streams.",
1903
- title="API Budget",
1904
- )
1905
1751
  metadata: Optional[Dict[str, Any]] = Field(
1906
1752
  None,
1907
1753
  description="For internal Airbyte use only - DO NOT modify manually. Used by consumers of declarative manifests for storing related metadata.",
@@ -1928,11 +1774,6 @@ class DeclarativeSource2(BaseModel):
1928
1774
  definitions: Optional[Dict[str, Any]] = None
1929
1775
  spec: Optional[Spec] = None
1930
1776
  concurrency_level: Optional[ConcurrencyLevel] = None
1931
- api_budget: Optional[Union[APIBudget, HTTPAPIBudget]] = Field(
1932
- None,
1933
- description="Defines how many requests can be made to the API in a given time frame. This field accepts either a generic APIBudget or an HTTP-specific configuration (HTTPAPIBudget) to be applied across all streams.",
1934
- title="API Budget",
1935
- )
1936
1777
  metadata: Optional[Dict[str, Any]] = Field(
1937
1778
  None,
1938
1779
  description="For internal Airbyte use only - DO NOT modify manually. Used by consumers of declarative manifests for storing related metadata.",