Skip to content

Commit 571fe0e

Browse files
stainless-app[bot]stainless-bot
authored andcommitted
feat(dns): remove delta model (#2242)
1 parent 4b2bf34 commit 571fe0e

File tree

8 files changed

+16
-30
lines changed

8 files changed

+16
-30
lines changed

api.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -998,12 +998,6 @@ Methods:
998998

999999
## Analytics
10001000

1001-
Types:
1002-
1003-
```python
1004-
from cloudflare.types.dns_firewall import Delta
1005-
```
1006-
10071001
### Reports
10081002

10091003
Methods:

src/cloudflare/resources/dns/analytics/reports/bytimes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from typing import Type, Union, Optional, cast
66
from datetime import datetime
7+
from typing_extensions import Literal
78

89
import httpx
910

@@ -22,8 +23,6 @@
2223
)
2324
from ....._wrappers import ResultWrapper
2425
from ....._base_client import make_request_options
25-
from .....types.dns_firewall import Delta
26-
from .....types.dns_firewall.delta import Delta
2726
from .....types.dns.analytics.reports import bytime_get_params
2827
from .....types.dns.analytics.reports.by_time import ByTime
2928

@@ -60,7 +59,8 @@ def get(
6059
metrics: str | NotGiven = NOT_GIVEN,
6160
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
6261
sort: str | NotGiven = NOT_GIVEN,
63-
time_delta: Delta | NotGiven = NOT_GIVEN,
62+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
63+
| NotGiven = NOT_GIVEN,
6464
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
6565
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6666
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -162,7 +162,8 @@ async def get(
162162
metrics: str | NotGiven = NOT_GIVEN,
163163
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
164164
sort: str | NotGiven = NOT_GIVEN,
165-
time_delta: Delta | NotGiven = NOT_GIVEN,
165+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
166+
| NotGiven = NOT_GIVEN,
166167
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
167168
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
168169
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/resources/dns_firewall/analytics/reports/bytimes.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
from typing import Type, Union, Optional, cast
66
from datetime import datetime
7+
from typing_extensions import Literal
78

89
import httpx
910

@@ -22,8 +23,6 @@
2223
)
2324
from ....._wrappers import ResultWrapper
2425
from ....._base_client import make_request_options
25-
from .....types.dns_firewall import Delta
26-
from .....types.dns_firewall.delta import Delta
2726
from .....types.dns.analytics.reports.by_time import ByTime
2827
from .....types.dns_firewall.analytics.reports import bytime_get_params
2928

@@ -61,7 +60,8 @@ def get(
6160
metrics: str | NotGiven = NOT_GIVEN,
6261
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
6362
sort: str | NotGiven = NOT_GIVEN,
64-
time_delta: Delta | NotGiven = NOT_GIVEN,
63+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
64+
| NotGiven = NOT_GIVEN,
6565
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
6666
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
6767
# The extra values given here take precedence over values defined on the client or passed to this method.
@@ -168,7 +168,8 @@ async def get(
168168
metrics: str | NotGiven = NOT_GIVEN,
169169
since: Union[str, datetime] | NotGiven = NOT_GIVEN,
170170
sort: str | NotGiven = NOT_GIVEN,
171-
time_delta: Delta | NotGiven = NOT_GIVEN,
171+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
172+
| NotGiven = NOT_GIVEN,
172173
until: Union[str, datetime] | NotGiven = NOT_GIVEN,
173174
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
174175
# The extra values given here take precedence over values defined on the client or passed to this method.

src/cloudflare/types/dns/analytics/reports/bytime_get_params.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

99
from ....._utils import PropertyInfo
10-
from ....dns_firewall.delta import Delta
1110

1211
__all__ = ["BytimeGetParams"]
1312

@@ -37,7 +36,7 @@ class BytimeGetParams(TypedDict, total=False):
3736
prefixed by - (descending) or + (ascending).
3837
"""
3938

40-
time_delta: Delta
39+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
4140
"""Unit of time to group data by."""
4241

4342
until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

src/cloudflare/types/dns/dns_analytics_query.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
from typing import List, Optional
44
from datetime import datetime
5+
from typing_extensions import Literal
56

67
from ..._models import BaseModel
7-
from ..dns_firewall.delta import Delta
88

99
__all__ = ["DNSAnalyticsQuery"]
1010

@@ -22,7 +22,7 @@ class DNSAnalyticsQuery(BaseModel):
2222
since: datetime
2323
"""Start date and time of requesting data period in ISO 8601 format."""
2424

25-
time_delta: Delta
25+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
2626
"""Unit of time to group data by."""
2727

2828
until: datetime

src/cloudflare/types/dns_firewall/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from __future__ import annotations
44

5-
from .delta import Delta as Delta
65
from .firewall_ips import FirewallIPs as FirewallIPs
76
from .upstream_ips import UpstreamIPs as UpstreamIPs
87
from .attack_mitigation import AttackMitigation as AttackMitigation

src/cloudflare/types/dns_firewall/analytics/reports/bytime_get_params.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
from typing import Union
66
from datetime import datetime
7-
from typing_extensions import Required, Annotated, TypedDict
7+
from typing_extensions import Literal, Required, Annotated, TypedDict
88

9-
from ...delta import Delta
109
from ....._utils import PropertyInfo
1110

1211
__all__ = ["BytimeGetParams"]
@@ -37,7 +36,7 @@ class BytimeGetParams(TypedDict, total=False):
3736
prefixed by - (descending) or + (ascending).
3837
"""
3938

40-
time_delta: Delta
39+
time_delta: Literal["all", "auto", "year", "quarter", "month", "week", "day", "hour", "dekaminute", "minute"]
4140
"""Unit of time to group data by."""
4241

4342
until: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]

src/cloudflare/types/dns_firewall/delta.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)