Skip to content

Commit 19c600e

Browse files
authored
feat(sdk): add principal, reporting, and controller support (#1121)
* feat(sdk): complete principal reporting and test controller support * fix(principal): avoid webhook import cycle
1 parent 72f2e33 commit 19c600e

21 files changed

Lines changed: 4904 additions & 122 deletions

src/adcp/__init__.py

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,24 @@ def _resolve_version() -> str:
203203
"discover_oauth_metadata",
204204
"start_oauth_authorization",
205205
),
206+
"adcp.principal": (
207+
"DestinationSetupSnapshot",
208+
"PrincipalClient",
209+
"PrincipalConfigurationError",
210+
"PrincipalManager",
211+
"PrincipalSyncOutcome",
212+
"sync_principal_configuration",
213+
),
214+
"adcp.reporting_inspection": (
215+
"ControlTotalCalculator",
216+
"HttpsReportingResourceReader",
217+
"ManifestReportingInspector",
218+
"ReportingCredentialProvider",
219+
"ReportingInspectionCode",
220+
"ReportingInspectionError",
221+
"ReportingResourceReader",
222+
"ReportingTrustedOriginPolicy",
223+
),
206224
"adcp.exceptions": (
207225
"AdagentsAccessBlockedError",
208226
"AdagentsNotFoundError",
@@ -319,13 +337,32 @@ def _resolve_version() -> str:
319337
"SyncAgentNotificationConfigsResponse",
320338
"GetPrincipalRequest",
321339
"GetPrincipalResponse",
340+
"PrincipalAppliedResult",
341+
"PrincipalChangedWebhook",
342+
"PrincipalConfiguration",
343+
"PrincipalCurrentResult",
344+
"PrincipalDeclarationsState",
345+
"PrincipalKind",
346+
"PrincipalReadFailedResult",
347+
"PrincipalReadResult",
348+
"PrincipalRecognizedResult",
349+
"PrincipalState",
350+
"PrincipalSyncFailedResult",
351+
"PrincipalSyncResult",
352+
"PrincipalUnconfiguredResult",
353+
"PrincipalValidatedResult",
322354
"GetReportingStatusRequest",
323355
"GetReportingStatusResponse",
324356
"SyncPrincipalRequest",
325357
"SyncPrincipalResponse",
326358
"SyncReportingReceiptsRequest",
327359
"SyncReportingReceiptsResponse",
328360
"AccountAuthorization",
361+
"AgentDeclarations",
362+
"AgentNotificationConfig",
363+
"AgentNotificationConfigState",
364+
"AgentReportingDestination",
365+
"AgentReportingDestinationState",
329366
"AccountReference",
330367
"AccountScope",
331368
"AccountWithAuthorization",
@@ -1117,6 +1154,11 @@ def get_adcp_version() -> str:
11171154
"McpWebhookPayload",
11181155
# Account operations
11191156
"AccountAuthorization",
1157+
"AgentDeclarations",
1158+
"AgentNotificationConfig",
1159+
"AgentNotificationConfigState",
1160+
"AgentReportingDestination",
1161+
"AgentReportingDestinationState",
11201162
"AccountReference",
11211163
"AccountWithAuthorization",
11221164
"GetAccountFinancialsRequest",
@@ -1229,6 +1271,34 @@ def get_adcp_version() -> str:
12291271
"SyncAgentNotificationConfigsResponse",
12301272
"GetPrincipalRequest",
12311273
"GetPrincipalResponse",
1274+
"PrincipalAppliedResult",
1275+
"PrincipalChangedWebhook",
1276+
"PrincipalConfiguration",
1277+
"PrincipalCurrentResult",
1278+
"PrincipalDeclarationsState",
1279+
"PrincipalKind",
1280+
"PrincipalReadFailedResult",
1281+
"PrincipalReadResult",
1282+
"PrincipalRecognizedResult",
1283+
"PrincipalState",
1284+
"PrincipalSyncFailedResult",
1285+
"PrincipalSyncResult",
1286+
"PrincipalUnconfiguredResult",
1287+
"PrincipalValidatedResult",
1288+
"DestinationSetupSnapshot",
1289+
"PrincipalClient",
1290+
"PrincipalConfigurationError",
1291+
"PrincipalManager",
1292+
"PrincipalSyncOutcome",
1293+
"sync_principal_configuration",
1294+
"ControlTotalCalculator",
1295+
"HttpsReportingResourceReader",
1296+
"ManifestReportingInspector",
1297+
"ReportingCredentialProvider",
1298+
"ReportingInspectionCode",
1299+
"ReportingInspectionError",
1300+
"ReportingResourceReader",
1301+
"ReportingTrustedOriginPolicy",
12321302
"GetReportingStatusRequest",
12331303
"GetReportingStatusResponse",
12341304
"SyncPrincipalRequest",
@@ -1798,6 +1868,14 @@ def get_adcp_version() -> str:
17981868
start_oauth_authorization,
17991869
)
18001870
from adcp.observability import get_tracer, inject_trace_headers, is_tracing_available
1871+
from adcp.principal import (
1872+
DestinationSetupSnapshot,
1873+
PrincipalClient,
1874+
PrincipalConfigurationError,
1875+
PrincipalManager,
1876+
PrincipalSyncOutcome,
1877+
sync_principal_configuration,
1878+
)
18011879
from adcp.property_registry import PropertyRegistry
18021880
from adcp.registry import RegistryClient
18031881
from adcp.registry_sync import (
@@ -1806,6 +1884,16 @@ def get_adcp_version() -> str:
18061884
FileCursorStore,
18071885
RegistrySync,
18081886
)
1887+
from adcp.reporting_inspection import (
1888+
ControlTotalCalculator,
1889+
HttpsReportingResourceReader,
1890+
ManifestReportingInspector,
1891+
ReportingCredentialProvider,
1892+
ReportingInspectionCode,
1893+
ReportingInspectionError,
1894+
ReportingResourceReader,
1895+
ReportingTrustedOriginPolicy,
1896+
)
18091897
from adcp.substitution import (
18101898
MacroMapping,
18111899
MacroMappingEntry,
@@ -1874,6 +1962,11 @@ def get_adcp_version() -> str:
18741962
ActivateSignalRequest,
18751963
ActivateSignalResponse,
18761964
AdvertiserIndustry,
1965+
AgentDeclarations,
1966+
AgentNotificationConfig,
1967+
AgentNotificationConfigState,
1968+
AgentReportingDestination,
1969+
AgentReportingDestinationState,
18771970
# Creative types
18781971
ArtifactWebhookPayload,
18791972
AssetContentType,
@@ -2096,6 +2189,20 @@ def get_adcp_version() -> str:
20962189
PriceGuidance,
20972190
PricingCurrency,
20982191
PricingModel,
2192+
PrincipalAppliedResult,
2193+
PrincipalChangedWebhook,
2194+
PrincipalConfiguration,
2195+
PrincipalCurrentResult,
2196+
PrincipalDeclarationsState,
2197+
PrincipalKind,
2198+
PrincipalReadFailedResult,
2199+
PrincipalReadResult,
2200+
PrincipalRecognizedResult,
2201+
PrincipalState,
2202+
PrincipalSyncFailedResult,
2203+
PrincipalSyncResult,
2204+
PrincipalUnconfiguredResult,
2205+
PrincipalValidatedResult,
20992206
Product,
21002207
ProductAllowedAction,
21012208
ProductFilters,

0 commit comments

Comments
 (0)