ttd-data 0.2.2__tar.gz → 0.2.3__tar.gz
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.
- {ttd_data-0.2.2/src/ttd_data.egg-info → ttd_data-0.2.3}/PKG-INFO +1 -1
- {ttd_data-0.2.2 → ttd_data-0.2.3}/pyproject.toml +1 -1
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_version.py +3 -3
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/advertiser.py +9 -9
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/deletionoptout.py +19 -19
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/baseadvertiserdataitem.py +5 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/basepartnerdsrdataitem.py +5 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/basethirdpartydataitem.py +5 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/offlineconversion.py +17 -13
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/thirdparty.py +9 -9
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/types/base64fileinput.py +4 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/eventstreaming.py +116 -99
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/forms.py +5 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/retries.py +90 -5
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/serializers.py +84 -3
- {ttd_data-0.2.2 → ttd_data-0.2.3/src/ttd_data.egg-info}/PKG-INFO +1 -1
- {ttd_data-0.2.2 → ttd_data-0.2.3}/LICENSE +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/NOTICES.txt +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/README-PYPI.md +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/README.md +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/setup.cfg +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/data_origins_hook.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/plain_text_error_normalizer.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/registration.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/sdkhooks.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/_hooks/types.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/basesdk.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/client.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/advertiserdataserverresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/advertiserdsrresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/apierror.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/dataerror.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/merchantdsrresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/no_response_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/offlineconversiondataserverresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/responsevalidationerror.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/thirdpartydataserverresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/thirdpartydsrresponse_error.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/ttddataerror.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/errors/uid2serviceerror.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/httpclient.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdata.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdatarequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdataresponseerrorcode.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdataserverresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdataserverresponseline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdsrfailedline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdsrrequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/advertiserdsrresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/baseofflineconversiondataitem.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/dataorigin.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/dataorigintype.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/datasubjectrequestadvertiserdataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/datasubjectrequestmerchantdataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/datasubjectrequestthirdpartydataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/dsrerrorcode.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/httpmetadata.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/ingestadvertiserdataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/ingestofflineconversiondataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/ingestthirdpartydataop.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/merchantdsrfailedline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/merchantdsrrequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/merchantdsrresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/offlineconversiondatarequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/offlineconversiondataresponseerrorcode.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/offlineconversiondataserverresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/offlineconversiondataserverresponseline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/partnerdsrrequesttype.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/realtimeconversioneventlineitem.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/realtimeconversioneventsprivacysetting.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydata.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydatarequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydataresponseerrorcode.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydataserverresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydataserverresponseline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydsrfailedline.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydsrrequest.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/models/thirdpartydsrresponse.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/py.typed +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/sdk.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/sdkconfiguration.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/types/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/types/basemodel.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/uid2/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/uid2/config.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/uid2/models.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/uid2/resolver.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/__init__.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/annotations.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/datetimes.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/dynamic_imports.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/enums.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/headers.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/logger.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/metadata.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/queryparams.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/requestbodies.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/security.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/unmarshal_json_response.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/url.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data/utils/values.py +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data.egg-info/SOURCES.txt +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data.egg-info/dependency_links.txt +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data.egg-info/requires.txt +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data.egg-info/top_level.txt +0 -0
- {ttd_data-0.2.2 → ttd_data-0.2.3}/src/ttd_data_python/_hooks/registration.py +0 -0
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
import importlib.metadata
|
|
5
5
|
|
|
6
6
|
__title__: str = "ttd-data"
|
|
7
|
-
__version__: str = "0.2.
|
|
7
|
+
__version__: str = "0.2.3"
|
|
8
8
|
__openapi_doc_version__: str = "v0.1"
|
|
9
|
-
__gen_version__: str = "2.
|
|
10
|
-
__user_agent__: str = "speakeasy-sdk/python 0.2.
|
|
9
|
+
__gen_version__: str = "2.912.1"
|
|
10
|
+
__user_agent__: str = "speakeasy-sdk/python 0.2.3 2.912.1 v0.1 ttd-data"
|
|
11
11
|
|
|
12
12
|
try:
|
|
13
13
|
if __package__ is not None:
|
|
@@ -6,7 +6,7 @@ from ttd_data import errors, models, utils
|
|
|
6
6
|
from ttd_data._hooks import HookContext
|
|
7
7
|
from ttd_data.types import OptionalNullable, UNSET
|
|
8
8
|
from ttd_data.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, List, Mapping, Optional, Union
|
|
9
|
+
from typing import Any, Iterable, List, Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class Advertiser(BaseSDK):
|
|
@@ -18,13 +18,13 @@ class Advertiser(BaseSDK):
|
|
|
18
18
|
data_provider_id: OptionalNullable[str] = UNSET,
|
|
19
19
|
items: OptionalNullable[
|
|
20
20
|
Union[
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Iterable[models.BaseAdvertiserDataItem],
|
|
22
|
+
Iterable[models.BaseAdvertiserDataItemTypedDict],
|
|
23
23
|
]
|
|
24
24
|
] = UNSET,
|
|
25
25
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
26
26
|
data_origins: OptionalNullable[
|
|
27
|
-
Union[
|
|
27
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
28
28
|
] = UNSET,
|
|
29
29
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
30
30
|
server_url: Optional[str] = None,
|
|
@@ -125,7 +125,7 @@ class Advertiser(BaseSDK):
|
|
|
125
125
|
request=req, response=http_res
|
|
126
126
|
)
|
|
127
127
|
raise errors.AdvertiserDataServerResponseError(response_data, http_res)
|
|
128
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
128
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
129
129
|
http_res_text = utils.stream_to_text(http_res)
|
|
130
130
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
131
131
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -142,13 +142,13 @@ class Advertiser(BaseSDK):
|
|
|
142
142
|
data_provider_id: OptionalNullable[str] = UNSET,
|
|
143
143
|
items: OptionalNullable[
|
|
144
144
|
Union[
|
|
145
|
-
|
|
146
|
-
|
|
145
|
+
Iterable[models.BaseAdvertiserDataItem],
|
|
146
|
+
Iterable[models.BaseAdvertiserDataItemTypedDict],
|
|
147
147
|
]
|
|
148
148
|
] = UNSET,
|
|
149
149
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
150
150
|
data_origins: OptionalNullable[
|
|
151
|
-
Union[
|
|
151
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
152
152
|
] = UNSET,
|
|
153
153
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
154
154
|
server_url: Optional[str] = None,
|
|
@@ -249,7 +249,7 @@ class Advertiser(BaseSDK):
|
|
|
249
249
|
request=req, response=http_res
|
|
250
250
|
)
|
|
251
251
|
raise errors.AdvertiserDataServerResponseError(response_data, http_res)
|
|
252
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
252
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
253
253
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
254
254
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
255
255
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -6,7 +6,7 @@ from ttd_data import errors, models, utils
|
|
|
6
6
|
from ttd_data._hooks import HookContext
|
|
7
7
|
from ttd_data.types import OptionalNullable, UNSET
|
|
8
8
|
from ttd_data.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, List, Mapping, Optional, Union
|
|
9
|
+
from typing import Any, Iterable, List, Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class DeletionOptOut(BaseSDK):
|
|
@@ -18,8 +18,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
18
18
|
data_provider_id: OptionalNullable[str] = UNSET,
|
|
19
19
|
items: OptionalNullable[
|
|
20
20
|
Union[
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
22
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
23
23
|
]
|
|
24
24
|
] = UNSET,
|
|
25
25
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -121,7 +121,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
121
121
|
request=req, response=http_res
|
|
122
122
|
)
|
|
123
123
|
raise errors.AdvertiserDsrResponseError(response_data, http_res)
|
|
124
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
124
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
125
125
|
http_res_text = utils.stream_to_text(http_res)
|
|
126
126
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
127
127
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -138,8 +138,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
138
138
|
data_provider_id: OptionalNullable[str] = UNSET,
|
|
139
139
|
items: OptionalNullable[
|
|
140
140
|
Union[
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
142
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
143
143
|
]
|
|
144
144
|
] = UNSET,
|
|
145
145
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -241,7 +241,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
241
241
|
request=req, response=http_res
|
|
242
242
|
)
|
|
243
243
|
raise errors.AdvertiserDsrResponseError(response_data, http_res)
|
|
244
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
244
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
245
245
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
246
246
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
247
247
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -257,8 +257,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
257
257
|
merchant_id: OptionalNullable[int] = UNSET,
|
|
258
258
|
items: OptionalNullable[
|
|
259
259
|
Union[
|
|
260
|
-
|
|
261
|
-
|
|
260
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
261
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
262
262
|
]
|
|
263
263
|
] = UNSET,
|
|
264
264
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -358,7 +358,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
358
358
|
request=req, response=http_res
|
|
359
359
|
)
|
|
360
360
|
raise errors.MerchantDsrResponseError(response_data, http_res)
|
|
361
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
361
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
362
362
|
http_res_text = utils.stream_to_text(http_res)
|
|
363
363
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
364
364
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -374,8 +374,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
374
374
|
merchant_id: OptionalNullable[int] = UNSET,
|
|
375
375
|
items: OptionalNullable[
|
|
376
376
|
Union[
|
|
377
|
-
|
|
378
|
-
|
|
377
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
378
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
379
379
|
]
|
|
380
380
|
] = UNSET,
|
|
381
381
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -475,7 +475,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
475
475
|
request=req, response=http_res
|
|
476
476
|
)
|
|
477
477
|
raise errors.MerchantDsrResponseError(response_data, http_res)
|
|
478
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
478
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
479
479
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
480
480
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
481
481
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -492,8 +492,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
492
492
|
brand_id: OptionalNullable[str] = UNSET,
|
|
493
493
|
items: OptionalNullable[
|
|
494
494
|
Union[
|
|
495
|
-
|
|
496
|
-
|
|
495
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
496
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
497
497
|
]
|
|
498
498
|
] = UNSET,
|
|
499
499
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -595,7 +595,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
595
595
|
request=req, response=http_res
|
|
596
596
|
)
|
|
597
597
|
raise errors.ThirdPartyDsrResponseError(response_data, http_res)
|
|
598
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
598
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
599
599
|
http_res_text = utils.stream_to_text(http_res)
|
|
600
600
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
601
601
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -612,8 +612,8 @@ class DeletionOptOut(BaseSDK):
|
|
|
612
612
|
brand_id: OptionalNullable[str] = UNSET,
|
|
613
613
|
items: OptionalNullable[
|
|
614
614
|
Union[
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
Iterable[models.BasePartnerDsrDataItem],
|
|
616
|
+
Iterable[models.BasePartnerDsrDataItemTypedDict],
|
|
617
617
|
]
|
|
618
618
|
] = UNSET,
|
|
619
619
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
@@ -715,7 +715,7 @@ class DeletionOptOut(BaseSDK):
|
|
|
715
715
|
request=req, response=http_res
|
|
716
716
|
)
|
|
717
717
|
raise errors.ThirdPartyDsrResponseError(response_data, http_res)
|
|
718
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
718
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
719
719
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
720
720
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
721
721
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -23,6 +23,7 @@ class BaseAdvertiserDataItemTypedDict(TypedDict):
|
|
|
23
23
|
id5: NotRequired[Nullable[str]]
|
|
24
24
|
net_id: NotRequired[Nullable[str]]
|
|
25
25
|
first_id: NotRequired[Nullable[str]]
|
|
26
|
+
utiq_id: NotRequired[Nullable[str]]
|
|
26
27
|
merkury_id: NotRequired[Nullable[str]]
|
|
27
28
|
iqvia_ppid: NotRequired[Nullable[str]]
|
|
28
29
|
cookie_mapping_partner_id: NotRequired[Nullable[str]]
|
|
@@ -57,6 +58,8 @@ class BaseAdvertiserDataItem(BaseModel):
|
|
|
57
58
|
|
|
58
59
|
first_id: Annotated[OptionalNullable[str], pydantic.Field(alias="FirstID")] = UNSET
|
|
59
60
|
|
|
61
|
+
utiq_id: Annotated[OptionalNullable[str], pydantic.Field(alias="UtiqID")] = UNSET
|
|
62
|
+
|
|
60
63
|
merkury_id: Annotated[OptionalNullable[str], pydantic.Field(alias="MerkuryID")] = (
|
|
61
64
|
UNSET
|
|
62
65
|
)
|
|
@@ -84,6 +87,7 @@ class BaseAdvertiserDataItem(BaseModel):
|
|
|
84
87
|
"ID5",
|
|
85
88
|
"NetID",
|
|
86
89
|
"FirstID",
|
|
90
|
+
"UtiqID",
|
|
87
91
|
"MerkuryID",
|
|
88
92
|
"IqviaPPID",
|
|
89
93
|
"CookieMappingPartnerId",
|
|
@@ -102,6 +106,7 @@ class BaseAdvertiserDataItem(BaseModel):
|
|
|
102
106
|
"ID5",
|
|
103
107
|
"NetID",
|
|
104
108
|
"FirstID",
|
|
109
|
+
"UtiqID",
|
|
105
110
|
"MerkuryID",
|
|
106
111
|
"IqviaPPID",
|
|
107
112
|
"CookieMappingPartnerId",
|
|
@@ -20,6 +20,7 @@ class BasePartnerDsrDataItemTypedDict(TypedDict):
|
|
|
20
20
|
id5: NotRequired[Nullable[str]]
|
|
21
21
|
net_id: NotRequired[Nullable[str]]
|
|
22
22
|
first_id: NotRequired[Nullable[str]]
|
|
23
|
+
utiq_id: NotRequired[Nullable[str]]
|
|
23
24
|
merkury_id: NotRequired[Nullable[str]]
|
|
24
25
|
iqvia_ppid: NotRequired[Nullable[str]]
|
|
25
26
|
|
|
@@ -51,6 +52,8 @@ class BasePartnerDsrDataItem(BaseModel):
|
|
|
51
52
|
|
|
52
53
|
first_id: Annotated[OptionalNullable[str], pydantic.Field(alias="FirstID")] = UNSET
|
|
53
54
|
|
|
55
|
+
utiq_id: Annotated[OptionalNullable[str], pydantic.Field(alias="UtiqID")] = UNSET
|
|
56
|
+
|
|
54
57
|
merkury_id: Annotated[OptionalNullable[str], pydantic.Field(alias="MerkuryID")] = (
|
|
55
58
|
UNSET
|
|
56
59
|
)
|
|
@@ -74,6 +77,7 @@ class BasePartnerDsrDataItem(BaseModel):
|
|
|
74
77
|
"ID5",
|
|
75
78
|
"NetID",
|
|
76
79
|
"FirstID",
|
|
80
|
+
"UtiqID",
|
|
77
81
|
"MerkuryID",
|
|
78
82
|
"IqviaPPID",
|
|
79
83
|
]
|
|
@@ -91,6 +95,7 @@ class BasePartnerDsrDataItem(BaseModel):
|
|
|
91
95
|
"ID5",
|
|
92
96
|
"NetID",
|
|
93
97
|
"FirstID",
|
|
98
|
+
"UtiqID",
|
|
94
99
|
"MerkuryID",
|
|
95
100
|
"IqviaPPID",
|
|
96
101
|
]
|
|
@@ -24,6 +24,7 @@ class BaseThirdPartyDataItemTypedDict(TypedDict):
|
|
|
24
24
|
id5: NotRequired[Nullable[str]]
|
|
25
25
|
net_id: NotRequired[Nullable[str]]
|
|
26
26
|
first_id: NotRequired[Nullable[str]]
|
|
27
|
+
utiq_id: NotRequired[Nullable[str]]
|
|
27
28
|
merkury_id: NotRequired[Nullable[str]]
|
|
28
29
|
iqvia_ppid: NotRequired[Nullable[str]]
|
|
29
30
|
cookie_mapping_partner_id: NotRequired[Nullable[str]]
|
|
@@ -62,6 +63,8 @@ class BaseThirdPartyDataItem(BaseModel):
|
|
|
62
63
|
|
|
63
64
|
first_id: Annotated[OptionalNullable[str], pydantic.Field(alias="FirstID")] = UNSET
|
|
64
65
|
|
|
66
|
+
utiq_id: Annotated[OptionalNullable[str], pydantic.Field(alias="UtiqID")] = UNSET
|
|
67
|
+
|
|
65
68
|
merkury_id: Annotated[OptionalNullable[str], pydantic.Field(alias="MerkuryID")] = (
|
|
66
69
|
UNSET
|
|
67
70
|
)
|
|
@@ -90,6 +93,7 @@ class BaseThirdPartyDataItem(BaseModel):
|
|
|
90
93
|
"ID5",
|
|
91
94
|
"NetID",
|
|
92
95
|
"FirstID",
|
|
96
|
+
"UtiqID",
|
|
93
97
|
"MerkuryID",
|
|
94
98
|
"IqviaPPID",
|
|
95
99
|
"CookieMappingPartnerId",
|
|
@@ -109,6 +113,7 @@ class BaseThirdPartyDataItem(BaseModel):
|
|
|
109
113
|
"ID5",
|
|
110
114
|
"NetID",
|
|
111
115
|
"FirstID",
|
|
116
|
+
"UtiqID",
|
|
112
117
|
"MerkuryID",
|
|
113
118
|
"IqviaPPID",
|
|
114
119
|
"CookieMappingPartnerId",
|
|
@@ -6,7 +6,7 @@ from ttd_data import errors, models, utils
|
|
|
6
6
|
from ttd_data._hooks import HookContext
|
|
7
7
|
from ttd_data.types import OptionalNullable, UNSET
|
|
8
8
|
from ttd_data.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, List, Mapping, Optional, Union
|
|
9
|
+
from typing import Any, Iterable, List, Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class OfflineConversion(BaseSDK):
|
|
@@ -15,16 +15,16 @@ class OfflineConversion(BaseSDK):
|
|
|
15
15
|
*,
|
|
16
16
|
ttd_auth: str,
|
|
17
17
|
data_provider_id: str,
|
|
18
|
-
user_id_array_metadata_format: OptionalNullable[
|
|
18
|
+
user_id_array_metadata_format: OptionalNullable[Iterable[str]] = UNSET,
|
|
19
19
|
items: OptionalNullable[
|
|
20
20
|
Union[
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Iterable[models.BaseOfflineConversionDataItem],
|
|
22
|
+
Iterable[models.BaseOfflineConversionDataItemTypedDict],
|
|
23
23
|
]
|
|
24
24
|
] = UNSET,
|
|
25
25
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
26
26
|
data_origins: OptionalNullable[
|
|
27
|
-
Union[
|
|
27
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
28
28
|
] = UNSET,
|
|
29
29
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
30
30
|
server_url: Optional[str] = None,
|
|
@@ -58,7 +58,9 @@ class OfflineConversion(BaseSDK):
|
|
|
58
58
|
ttd_auth=ttd_auth,
|
|
59
59
|
body=models.OfflineConversionDataRequest(
|
|
60
60
|
data_provider_id=data_provider_id,
|
|
61
|
-
user_id_array_metadata_format=
|
|
61
|
+
user_id_array_metadata_format=utils.unmarshal(
|
|
62
|
+
user_id_array_metadata_format, OptionalNullable[List[str]]
|
|
63
|
+
),
|
|
62
64
|
items=utils.get_pydantic_model(
|
|
63
65
|
items, OptionalNullable[List[models.BaseOfflineConversionDataItem]]
|
|
64
66
|
),
|
|
@@ -127,7 +129,7 @@ class OfflineConversion(BaseSDK):
|
|
|
127
129
|
raise errors.OfflineConversionDataServerResponseError(
|
|
128
130
|
response_data, http_res
|
|
129
131
|
)
|
|
130
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
132
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
131
133
|
http_res_text = utils.stream_to_text(http_res)
|
|
132
134
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
133
135
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -141,16 +143,16 @@ class OfflineConversion(BaseSDK):
|
|
|
141
143
|
*,
|
|
142
144
|
ttd_auth: str,
|
|
143
145
|
data_provider_id: str,
|
|
144
|
-
user_id_array_metadata_format: OptionalNullable[
|
|
146
|
+
user_id_array_metadata_format: OptionalNullable[Iterable[str]] = UNSET,
|
|
145
147
|
items: OptionalNullable[
|
|
146
148
|
Union[
|
|
147
|
-
|
|
148
|
-
|
|
149
|
+
Iterable[models.BaseOfflineConversionDataItem],
|
|
150
|
+
Iterable[models.BaseOfflineConversionDataItemTypedDict],
|
|
149
151
|
]
|
|
150
152
|
] = UNSET,
|
|
151
153
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
152
154
|
data_origins: OptionalNullable[
|
|
153
|
-
Union[
|
|
155
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
154
156
|
] = UNSET,
|
|
155
157
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
156
158
|
server_url: Optional[str] = None,
|
|
@@ -184,7 +186,9 @@ class OfflineConversion(BaseSDK):
|
|
|
184
186
|
ttd_auth=ttd_auth,
|
|
185
187
|
body=models.OfflineConversionDataRequest(
|
|
186
188
|
data_provider_id=data_provider_id,
|
|
187
|
-
user_id_array_metadata_format=
|
|
189
|
+
user_id_array_metadata_format=utils.unmarshal(
|
|
190
|
+
user_id_array_metadata_format, OptionalNullable[List[str]]
|
|
191
|
+
),
|
|
188
192
|
items=utils.get_pydantic_model(
|
|
189
193
|
items, OptionalNullable[List[models.BaseOfflineConversionDataItem]]
|
|
190
194
|
),
|
|
@@ -253,7 +257,7 @@ class OfflineConversion(BaseSDK):
|
|
|
253
257
|
raise errors.OfflineConversionDataServerResponseError(
|
|
254
258
|
response_data, http_res
|
|
255
259
|
)
|
|
256
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
260
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
257
261
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
258
262
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
259
263
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -6,7 +6,7 @@ from ttd_data import errors, models, utils
|
|
|
6
6
|
from ttd_data._hooks import HookContext
|
|
7
7
|
from ttd_data.types import OptionalNullable, UNSET
|
|
8
8
|
from ttd_data.utils.unmarshal_json_response import unmarshal_json_response
|
|
9
|
-
from typing import Any, List, Mapping, Optional, Union
|
|
9
|
+
from typing import Any, Iterable, List, Mapping, Optional, Union
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
class ThirdParty(BaseSDK):
|
|
@@ -17,14 +17,14 @@ class ThirdParty(BaseSDK):
|
|
|
17
17
|
data_provider_id: str,
|
|
18
18
|
items: OptionalNullable[
|
|
19
19
|
Union[
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
Iterable[models.BaseThirdPartyDataItem],
|
|
21
|
+
Iterable[models.BaseThirdPartyDataItemTypedDict],
|
|
22
22
|
]
|
|
23
23
|
] = UNSET,
|
|
24
24
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
25
25
|
is_user_id_already_hashed: Optional[bool] = False,
|
|
26
26
|
data_origins: OptionalNullable[
|
|
27
|
-
Union[
|
|
27
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
28
28
|
] = UNSET,
|
|
29
29
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
30
30
|
server_url: Optional[str] = None,
|
|
@@ -125,7 +125,7 @@ class ThirdParty(BaseSDK):
|
|
|
125
125
|
request=req, response=http_res
|
|
126
126
|
)
|
|
127
127
|
raise errors.ThirdPartyDataServerResponseError(response_data, http_res)
|
|
128
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
128
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
129
129
|
http_res_text = utils.stream_to_text(http_res)
|
|
130
130
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
131
131
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -141,14 +141,14 @@ class ThirdParty(BaseSDK):
|
|
|
141
141
|
data_provider_id: str,
|
|
142
142
|
items: OptionalNullable[
|
|
143
143
|
Union[
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
Iterable[models.BaseThirdPartyDataItem],
|
|
145
|
+
Iterable[models.BaseThirdPartyDataItemTypedDict],
|
|
146
146
|
]
|
|
147
147
|
] = UNSET,
|
|
148
148
|
data_load_trace_id: OptionalNullable[str] = UNSET,
|
|
149
149
|
is_user_id_already_hashed: Optional[bool] = False,
|
|
150
150
|
data_origins: OptionalNullable[
|
|
151
|
-
Union[
|
|
151
|
+
Union[Iterable[models.DataOrigin], Iterable[models.DataOriginTypedDict]]
|
|
152
152
|
] = UNSET,
|
|
153
153
|
retries: OptionalNullable[utils.RetryConfig] = UNSET,
|
|
154
154
|
server_url: Optional[str] = None,
|
|
@@ -249,7 +249,7 @@ class ThirdParty(BaseSDK):
|
|
|
249
249
|
request=req, response=http_res
|
|
250
250
|
)
|
|
251
251
|
raise errors.ThirdPartyDataServerResponseError(response_data, http_res)
|
|
252
|
-
if utils.match_response(http_res, ["403", "413", "4XX"], "*"):
|
|
252
|
+
if utils.match_response(http_res, ["401", "403", "413", "4XX"], "*"):
|
|
253
253
|
http_res_text = await utils.stream_to_text_async(http_res)
|
|
254
254
|
raise errors.APIError("API error occurred", http_res, http_res_text)
|
|
255
255
|
if utils.match_response(http_res, ["500", "503", "5XX"], "*"):
|
|
@@ -24,7 +24,11 @@ def encode_base64_file_input(value: Any) -> Any:
|
|
|
24
24
|
with open(value, "rb") as fh:
|
|
25
25
|
binary = fh.read()
|
|
26
26
|
else:
|
|
27
|
+
# Restore position after reading: pydantic may validate the same stream more than once.
|
|
28
|
+
position = value.tell() if value.seekable() else None
|
|
27
29
|
binary = value.read()
|
|
30
|
+
if position is not None:
|
|
31
|
+
value.seek(position)
|
|
28
32
|
if isinstance(binary, str):
|
|
29
33
|
binary = binary.encode()
|
|
30
34
|
if not isinstance(binary, (bytes, bytearray)):
|