@adcp/sdk 17.0.0-beta.1 → 17.0.0-beta.2
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.
- package/dist/lib/adapters/keyed-account-store.js +1 -1
- package/dist/lib/adapters/keyed-account-store.mjs +1 -1
- package/dist/lib/adapters/version/3.0/brand-fields.d.mts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.d.ts +7 -1
- package/dist/lib/adapters/version/3.0/brand-fields.js +139 -3
- package/dist/lib/adapters/version/3.0/brand-fields.mjs +136 -2
- package/dist/lib/adapters/version/3.0/index.js +6 -0
- package/dist/lib/adapters/version/3.0/index.mjs +7 -1
- package/dist/lib/adapters/version/types.d.mts +5 -0
- package/dist/lib/adapters/version/types.d.ts +5 -0
- package/dist/lib/canonical-references/index.js +2 -0
- package/dist/lib/canonical-references/index.mjs +2 -0
- package/dist/lib/client/account-changes.d.mts +3 -1
- package/dist/lib/client/account-changes.d.ts +3 -1
- package/dist/lib/client/account-changes.js +22 -2
- package/dist/lib/client/account-changes.mjs +22 -2
- package/dist/lib/conformance/oracle.js +3 -2
- package/dist/lib/conformance/oracle.mjs +3 -2
- package/dist/lib/core/AgentClient.d.mts +165 -1
- package/dist/lib/core/AgentClient.d.ts +165 -1
- package/dist/lib/core/AgentClient.js +446 -8
- package/dist/lib/core/AgentClient.mjs +446 -8
- package/dist/lib/core/ConversationTypes.d.mts +8 -0
- package/dist/lib/core/ConversationTypes.d.ts +8 -0
- package/dist/lib/core/ProtocolResponseParser.d.mts +1 -1
- package/dist/lib/core/ProtocolResponseParser.d.ts +1 -1
- package/dist/lib/core/ProtocolResponseParser.js +28 -18
- package/dist/lib/core/ProtocolResponseParser.mjs +11 -1
- package/dist/lib/core/SingleAgentClient.d.mts +115 -2
- package/dist/lib/core/SingleAgentClient.d.ts +115 -2
- package/dist/lib/core/SingleAgentClient.js +547 -67
- package/dist/lib/core/SingleAgentClient.mjs +534 -54
- package/dist/lib/core/TaskExecutor.d.mts +7 -0
- package/dist/lib/core/TaskExecutor.d.ts +7 -0
- package/dist/lib/core/TaskExecutor.js +18 -5
- package/dist/lib/core/TaskExecutor.mjs +18 -5
- package/dist/lib/core/task-status.d.mts +2 -0
- package/dist/lib/core/task-status.d.ts +2 -0
- package/dist/lib/core/task-status.js +11 -2
- package/dist/lib/core/task-status.mjs +9 -1
- package/dist/lib/identity-3.3/trust.d.mts +1 -4
- package/dist/lib/identity-3.3/trust.d.ts +1 -4
- package/dist/lib/identity-3.3/trust.js +34 -21
- package/dist/lib/identity-3.3/trust.mjs +34 -21
- package/dist/lib/identity-3.3/validation.js +5 -3
- package/dist/lib/identity-3.3/validation.mjs +6 -4
- package/dist/lib/index.d.mts +6 -52
- package/dist/lib/index.d.ts +6 -52
- package/dist/lib/index.js +11 -0
- package/dist/lib/index.mjs +7 -0
- package/dist/lib/media-buy/compatibility.js +6 -1
- package/dist/lib/media-buy/compatibility.mjs +6 -1
- package/dist/lib/protocols/mcp-scope.d.mts +3 -0
- package/dist/lib/protocols/mcp-scope.d.ts +3 -0
- package/dist/lib/protocols/mcp-scope.js +8 -3
- package/dist/lib/protocols/mcp-scope.mjs +8 -3
- package/dist/lib/reporting/inspection.js +1 -0
- package/dist/lib/reporting/inspection.mjs +1 -0
- package/dist/lib/reporting/ledger/coverage.d.mts +5 -0
- package/dist/lib/reporting/ledger/coverage.d.ts +5 -0
- package/dist/lib/reporting/ledger/coverage.js +37 -3
- package/dist/lib/reporting/ledger/coverage.mjs +36 -3
- package/dist/lib/reporting/ledger/handler.js +7 -4
- package/dist/lib/reporting/ledger/handler.mjs +7 -4
- package/dist/lib/reporting/ledger/producer.js +215 -69
- package/dist/lib/reporting/ledger/producer.mjs +217 -70
- package/dist/lib/reporting/ledger/schedule.d.mts +2 -2
- package/dist/lib/reporting/ledger/schedule.d.ts +2 -2
- package/dist/lib/reporting/ledger/schedule.js +8 -5
- package/dist/lib/reporting/ledger/schedule.mjs +8 -5
- package/dist/lib/reporting/ledger/status-ingest.d.mts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.d.ts +1 -1
- package/dist/lib/reporting/ledger/status-ingest.js +4 -3
- package/dist/lib/reporting/ledger/status-ingest.mjs +4 -3
- package/dist/lib/reporting/ledger/types.d.mts +36 -1
- package/dist/lib/reporting/ledger/types.d.ts +36 -1
- package/dist/lib/reporting/service/index.d.mts +14 -1
- package/dist/lib/reporting/service/index.d.ts +14 -1
- package/dist/lib/reporting/service/index.js +24 -12
- package/dist/lib/reporting/service/index.mjs +24 -12
- package/dist/lib/schemas/browser.d.mts +2 -0
- package/dist/lib/schemas/browser.d.ts +2 -0
- package/dist/lib/schemas/browser.js +3 -0
- package/dist/lib/schemas/browser.mjs +2 -0
- package/dist/lib/schemas/index.d.mts +5 -3
- package/dist/lib/schemas/index.d.ts +5 -3
- package/dist/lib/schemas/index.js +5 -0
- package/dist/lib/schemas/index.mjs +4 -0
- package/dist/lib/server/account-response-identity.d.mts +17 -0
- package/dist/lib/server/account-response-identity.d.ts +17 -0
- package/dist/lib/server/account-response-identity.js +52 -0
- package/dist/lib/server/account-response-identity.mjs +28 -0
- package/dist/lib/server/account-sync-contract.js +2 -2
- package/dist/lib/server/account-sync-contract.mjs +2 -2
- package/dist/lib/server/create-adcp-server.js +33 -20
- package/dist/lib/server/create-adcp-server.mjs +36 -12
- package/dist/lib/server/decisioning/account.d.mts +36 -10
- package/dist/lib/server/decisioning/account.d.ts +36 -10
- package/dist/lib/server/decisioning/account.js +33 -14
- package/dist/lib/server/decisioning/account.mjs +33 -14
- package/dist/lib/server/decisioning/runtime/from-platform.d.mts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.d.ts +5 -5
- package/dist/lib/server/decisioning/runtime/from-platform.js +4 -4
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +4 -4
- package/dist/lib/server/media-buy-store.d.mts +26 -12
- package/dist/lib/server/media-buy-store.d.ts +26 -12
- package/dist/lib/server/media-buy-store.js +69 -21
- package/dist/lib/server/media-buy-store.mjs +69 -21
- package/dist/lib/server/notification-subscriptions/runtime.d.mts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.d.ts +1 -1
- package/dist/lib/server/notification-subscriptions/runtime.js +4 -0
- package/dist/lib/server/notification-subscriptions/runtime.mjs +4 -0
- package/dist/lib/server/responses.js +9 -1
- package/dist/lib/server/responses.mjs +9 -1
- package/dist/lib/signing/agent-fetch.d.mts +1 -1
- package/dist/lib/signing/agent-fetch.d.ts +1 -1
- package/dist/lib/signing/agent-fetch.js +3 -3
- package/dist/lib/signing/agent-fetch.mjs +3 -3
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.js +60 -14
- package/dist/lib/testing/storyboard/canonical-format-satisfaction.mjs +60 -14
- package/dist/lib/testing/storyboard/compliance.d.mts +2 -5
- package/dist/lib/testing/storyboard/compliance.d.ts +2 -5
- package/dist/lib/testing/storyboard/compliance.js +62 -13
- package/dist/lib/testing/storyboard/compliance.mjs +63 -14
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.mts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.d.ts +2 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.js +11 -0
- package/dist/lib/testing/storyboard/request-signing/vector-loader.mjs +10 -0
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/types/accept-proposal.d.ts +20 -28
- package/dist/lib/types/asset-instances.d.mts +1 -1
- package/dist/lib/types/asset-instances.d.ts +1 -1
- package/dist/lib/types/buy-products.d.ts +20 -28
- package/dist/lib/types/check-governance.d.ts +20 -28
- package/dist/lib/types/comply-test-controller.d.ts +20 -28
- package/dist/lib/types/control-media-buy.d.ts +20 -28
- package/dist/lib/types/core.generated.d.mts +273 -184
- package/dist/lib/types/core.generated.d.ts +273 -184
- package/dist/lib/types/create-media-buy.d.ts +20 -28
- package/dist/lib/types/get-media-buys.d.ts +20 -28
- package/dist/lib/types/get-products.d.ts +20 -28
- package/dist/lib/types/index.d.mts +6 -1
- package/dist/lib/types/index.d.ts +6 -1
- package/dist/lib/types/index.js +6 -1
- package/dist/lib/types/index.mjs +4 -1
- package/dist/lib/types/inline-enums.generated.d.mts +30 -4
- package/dist/lib/types/inline-enums.generated.d.ts +30 -4
- package/dist/lib/types/inline-enums.generated.js +41 -2
- package/dist/lib/types/inline-enums.generated.mjs +28 -2
- package/dist/lib/types/list-products.d.ts +20 -28
- package/dist/lib/types/list-proposals.d.ts +20 -28
- package/dist/lib/types/media-buy-delivery-report.d.mts +6 -0
- package/dist/lib/types/media-buy-delivery-report.d.ts +6 -0
- package/dist/lib/types/media-buy-delivery-report.js +16 -0
- package/dist/lib/types/media-buy-delivery-report.mjs +0 -0
- package/dist/lib/types/refine-proposals.d.ts +20 -28
- package/dist/lib/types/request-proposals.d.ts +20 -28
- package/dist/lib/types/schemas.generated.d.ts +63113 -127273
- package/dist/lib/types/schemas.generated.js +759 -770
- package/dist/lib/types/schemas.generated.mjs +759 -770
- package/dist/lib/types/targeting-keys.generated.d.mts +4 -0
- package/dist/lib/types/targeting-keys.generated.d.ts +4 -0
- package/dist/lib/types/targeting-keys.generated.js +109 -0
- package/dist/lib/types/targeting-keys.generated.mjs +84 -0
- package/dist/lib/types/tools.generated.d.mts +2 -68
- package/dist/lib/types/tools.generated.d.ts +2 -68
- package/dist/lib/types/update-media-buy.d.ts +20 -28
- package/dist/lib/utils/adcp-version-config.js +5 -2
- package/dist/lib/utils/adcp-version-config.mjs +5 -2
- package/dist/lib/utils/response-unwrapper.js +6 -1
- package/dist/lib/utils/response-unwrapper.mjs +6 -1
- package/dist/lib/v2/format-schema/resolver.js +1 -1
- package/dist/lib/v2/format-schema/resolver.mjs +1 -1
- package/dist/lib/v2/projection/creative-delivery.js +104 -29
- package/dist/lib/v2/projection/creative-delivery.mjs +108 -29
- package/dist/lib/v2/projection/index.d.mts +1 -0
- package/dist/lib/v2/projection/index.d.ts +1 -0
- package/dist/lib/v2/projection/index.js +3 -0
- package/dist/lib/v2/projection/index.mjs +2 -0
- package/dist/lib/v2/projection/legacy-metadata.d.mts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +19 -0
- package/dist/lib/v2/projection/legacy-metadata.js +91 -0
- package/dist/lib/v2/projection/legacy-metadata.mjs +86 -0
- package/dist/lib/v2/projection/v1-to-v2.d.mts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +12 -9
- package/dist/lib/v2/projection/v1-to-v2.mjs +12 -9
- package/dist/lib/validation/budget-allocation.d.mts +3 -3
- package/dist/lib/validation/budget-allocation.d.ts +3 -3
- package/dist/lib/validation/compact-schema.d.mts +27 -0
- package/dist/lib/validation/compact-schema.d.ts +27 -0
- package/dist/lib/validation/compact-schema.js +276 -0
- package/dist/lib/validation/compact-schema.mjs +250 -0
- package/dist/lib/validation/media-buy-delivery-report.d.mts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.d.ts +8 -0
- package/dist/lib/validation/media-buy-delivery-report.js +31 -0
- package/dist/lib/validation/media-buy-delivery-report.mjs +7 -0
- package/dist/lib/validation/nonempty-array.d.mts +15 -0
- package/dist/lib/validation/nonempty-array.d.ts +15 -0
- package/dist/lib/validation/nonempty-array.js +41 -0
- package/dist/lib/validation/nonempty-array.mjs +7 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.mts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.d.ts +21 -0
- package/dist/lib/validation/schema-diagnostic-origins.js +193 -0
- package/dist/lib/validation/schema-diagnostic-origins.mjs +169 -0
- package/dist/lib/validation/schema-loader.js +86 -16
- package/dist/lib/validation/schema-loader.mjs +82 -16
- package/dist/lib/validation/schema-validator.d.mts +10 -19
- package/dist/lib/validation/schema-validator.d.ts +10 -19
- package/dist/lib/validation/schema-validator.js +135 -42
- package/dist/lib/validation/schema-validator.mjs +139 -43
- package/dist/lib/validation/sync-creatives.d.mts +22 -22
- package/dist/lib/validation/sync-creatives.d.ts +22 -22
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/dist/lib/webhooks/index.d.mts +3 -0
- package/dist/lib/webhooks/index.d.ts +3 -0
- package/dist/lib/webhooks/index.js +3 -0
- package/dist/lib/webhooks/index.mjs +2 -0
- package/dist/lib/webhooks/media-buy-delivery.d.mts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.d.ts +43 -0
- package/dist/lib/webhooks/media-buy-delivery.js +119 -0
- package/dist/lib/webhooks/media-buy-delivery.mjs +94 -0
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/DELIVERY-WEBHOOK-PARSING.md +142 -0
- package/docs/guides/DISCOVERY-CACHE-AND-SESSION-REUSE.md +15 -0
- package/docs/guides/REPORTING-LEDGER.md +93 -0
- package/docs/guides/REPORTING-STABILITY.md +1 -1
- package/docs/guides/TYPED-CLIENT-TOOLS.md +49 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-16-to-17.md +191 -14
- package/docs/migration-6.6-to-6.7.md +14 -0
- package/docs/migration-account-change-feed.md +15 -0
- package/docs/recipes/verifying-inbound-webhooks.md +18 -2
- package/package.json +2 -2
|
@@ -117,6 +117,10 @@ export interface ReportingLedgerConfigurationV1 {
|
|
|
117
117
|
sourceSettings: ReportingSourceSliceRequestV1['sourceSettings'];
|
|
118
118
|
contract: ReportingSourceSliceRequestV1['contract'];
|
|
119
119
|
installedAt: string;
|
|
120
|
+
/** Trusted host ownership boundary, aligned upward to the schedule; absent means installedAt. */
|
|
121
|
+
historyStart?: string;
|
|
122
|
+
/** Frozen ordinal for historyStart, including ordinals before the schedule anchor. */
|
|
123
|
+
historyStartOrdinal?: number;
|
|
120
124
|
supersededAt?: string;
|
|
121
125
|
semanticFingerprint: string;
|
|
122
126
|
}
|
|
@@ -134,6 +138,10 @@ export interface ReportingLedgerObligationV1 {
|
|
|
134
138
|
finalityPolicy?: ReportingLedgerConfigurationV1['finalityPolicy'];
|
|
135
139
|
canonicalization?: ReportingLedgerConfigurationV1['canonicalization'];
|
|
136
140
|
periodOrdinal: number;
|
|
141
|
+
/** Pre-install ownership; runs after live work and under a per-source worker budget. */
|
|
142
|
+
history?: true;
|
|
143
|
+
/** Private backfill retry deadline, frozen durably on its first execution attempt. */
|
|
144
|
+
historyRecoveryDeadlineAt?: string;
|
|
137
145
|
period: {
|
|
138
146
|
start: string;
|
|
139
147
|
end: string;
|
|
@@ -820,11 +828,26 @@ export interface ReportingLedgerStore {
|
|
|
820
828
|
* port, and commit what it returns.
|
|
821
829
|
*/
|
|
822
830
|
resolveTransitionFinalityBaseline?(reporting_obligation_id: string): Promise<ReportingObservedFinalityV1>;
|
|
831
|
+
/**
|
|
832
|
+
* Insert an immutable generation or return its existing identity. History metadata must be persisted
|
|
833
|
+
* with a matching schedule boundary/ordinal. Under the same account fence as extension, reject newly
|
|
834
|
+
* owned history that overlaps another generation; existing handoff overlap may remain unchanged.
|
|
835
|
+
*/
|
|
823
836
|
putConfiguration(configuration: ReportingLedgerConfigurationV1): Promise<{
|
|
824
837
|
inserted: boolean;
|
|
825
838
|
value: ReportingLedgerConfigurationV1;
|
|
826
839
|
}>;
|
|
827
840
|
listConfigurations(account_id?: string): Promise<ReportingLedgerConfigurationV1[]>;
|
|
841
|
+
/**
|
|
842
|
+
* Atomically move ownership earlier, or return an equal boundary unchanged. Refuse later boundaries,
|
|
843
|
+
* unknown configurations and overlap with another generation. Preserve installedAt, fingerprint,
|
|
844
|
+
* calendarRules and all existing obligations. Optional for stores without history extension support.
|
|
845
|
+
*/
|
|
846
|
+
extendConfigurationHistory?(input: {
|
|
847
|
+
configurationId: string;
|
|
848
|
+
historyStart: string;
|
|
849
|
+
historyStartOrdinal: number;
|
|
850
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
828
851
|
putObligation(obligation: ReportingLedgerObligationV1): Promise<{
|
|
829
852
|
inserted: boolean;
|
|
830
853
|
value: ReportingLedgerObligationV1;
|
|
@@ -851,6 +874,8 @@ export interface ReportingLedgerStore {
|
|
|
851
874
|
now: string;
|
|
852
875
|
leaseMilliseconds: number;
|
|
853
876
|
account_id?: string;
|
|
877
|
+
/** Claim live work first; omit history for these source offering IDs once their cycle budget is spent. */
|
|
878
|
+
excludeHistoryOfferingIds?: string[];
|
|
854
879
|
}): Promise<ReportingLedgerLeaseV1 | null>;
|
|
855
880
|
releaseObligationLease(lease: ReportingLedgerLeaseV1): Promise<void>;
|
|
856
881
|
commitRevision(revision: ReportingLedgerRevisionV1, lease: ReportingLedgerLeaseV1): Promise<{
|
|
@@ -1056,15 +1081,25 @@ export interface ReportingProducerContactV1 {
|
|
|
1056
1081
|
url?: string;
|
|
1057
1082
|
}
|
|
1058
1083
|
export interface ReportingProducerV1 {
|
|
1059
|
-
installConfiguration(input: Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules'
|
|
1084
|
+
installConfiguration(input: Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'historyStart' | 'historyStartOrdinal'>, options?: {
|
|
1085
|
+
historyStart?: string;
|
|
1086
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
1087
|
+
/** Trusted host operation. Ownership may only move earlier within the source retention window. */
|
|
1088
|
+
extendConfigurationHistory(input: {
|
|
1089
|
+
configurationId: string;
|
|
1090
|
+
historyStart: string;
|
|
1091
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
1060
1092
|
planObligations(now?: string, options?: {
|
|
1061
1093
|
account_id?: string;
|
|
1062
1094
|
maxObligations?: number;
|
|
1095
|
+
maxHistoryObligationsPerSource?: number;
|
|
1063
1096
|
}): Promise<ReportingLedgerObligationV1[]>;
|
|
1064
1097
|
runWorker(options?: {
|
|
1065
1098
|
signal?: AbortSignal;
|
|
1066
1099
|
now?: () => Date;
|
|
1067
1100
|
maxIterations?: number;
|
|
1101
|
+
/** Maximum history claims per source offering in this worker pass. Defaults to 10; zero pauses history. */
|
|
1102
|
+
maxHistorySlicesPerSource?: number;
|
|
1068
1103
|
retryDelayMilliseconds?: number;
|
|
1069
1104
|
executionDeadlineMilliseconds?: number;
|
|
1070
1105
|
settlementGraceMilliseconds?: number;
|
|
@@ -117,6 +117,10 @@ export interface ReportingLedgerConfigurationV1 {
|
|
|
117
117
|
sourceSettings: ReportingSourceSliceRequestV1['sourceSettings'];
|
|
118
118
|
contract: ReportingSourceSliceRequestV1['contract'];
|
|
119
119
|
installedAt: string;
|
|
120
|
+
/** Trusted host ownership boundary, aligned upward to the schedule; absent means installedAt. */
|
|
121
|
+
historyStart?: string;
|
|
122
|
+
/** Frozen ordinal for historyStart, including ordinals before the schedule anchor. */
|
|
123
|
+
historyStartOrdinal?: number;
|
|
120
124
|
supersededAt?: string;
|
|
121
125
|
semanticFingerprint: string;
|
|
122
126
|
}
|
|
@@ -134,6 +138,10 @@ export interface ReportingLedgerObligationV1 {
|
|
|
134
138
|
finalityPolicy?: ReportingLedgerConfigurationV1['finalityPolicy'];
|
|
135
139
|
canonicalization?: ReportingLedgerConfigurationV1['canonicalization'];
|
|
136
140
|
periodOrdinal: number;
|
|
141
|
+
/** Pre-install ownership; runs after live work and under a per-source worker budget. */
|
|
142
|
+
history?: true;
|
|
143
|
+
/** Private backfill retry deadline, frozen durably on its first execution attempt. */
|
|
144
|
+
historyRecoveryDeadlineAt?: string;
|
|
137
145
|
period: {
|
|
138
146
|
start: string;
|
|
139
147
|
end: string;
|
|
@@ -820,11 +828,26 @@ export interface ReportingLedgerStore {
|
|
|
820
828
|
* port, and commit what it returns.
|
|
821
829
|
*/
|
|
822
830
|
resolveTransitionFinalityBaseline?(reporting_obligation_id: string): Promise<ReportingObservedFinalityV1>;
|
|
831
|
+
/**
|
|
832
|
+
* Insert an immutable generation or return its existing identity. History metadata must be persisted
|
|
833
|
+
* with a matching schedule boundary/ordinal. Under the same account fence as extension, reject newly
|
|
834
|
+
* owned history that overlaps another generation; existing handoff overlap may remain unchanged.
|
|
835
|
+
*/
|
|
823
836
|
putConfiguration(configuration: ReportingLedgerConfigurationV1): Promise<{
|
|
824
837
|
inserted: boolean;
|
|
825
838
|
value: ReportingLedgerConfigurationV1;
|
|
826
839
|
}>;
|
|
827
840
|
listConfigurations(account_id?: string): Promise<ReportingLedgerConfigurationV1[]>;
|
|
841
|
+
/**
|
|
842
|
+
* Atomically move ownership earlier, or return an equal boundary unchanged. Refuse later boundaries,
|
|
843
|
+
* unknown configurations and overlap with another generation. Preserve installedAt, fingerprint,
|
|
844
|
+
* calendarRules and all existing obligations. Optional for stores without history extension support.
|
|
845
|
+
*/
|
|
846
|
+
extendConfigurationHistory?(input: {
|
|
847
|
+
configurationId: string;
|
|
848
|
+
historyStart: string;
|
|
849
|
+
historyStartOrdinal: number;
|
|
850
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
828
851
|
putObligation(obligation: ReportingLedgerObligationV1): Promise<{
|
|
829
852
|
inserted: boolean;
|
|
830
853
|
value: ReportingLedgerObligationV1;
|
|
@@ -851,6 +874,8 @@ export interface ReportingLedgerStore {
|
|
|
851
874
|
now: string;
|
|
852
875
|
leaseMilliseconds: number;
|
|
853
876
|
account_id?: string;
|
|
877
|
+
/** Claim live work first; omit history for these source offering IDs once their cycle budget is spent. */
|
|
878
|
+
excludeHistoryOfferingIds?: string[];
|
|
854
879
|
}): Promise<ReportingLedgerLeaseV1 | null>;
|
|
855
880
|
releaseObligationLease(lease: ReportingLedgerLeaseV1): Promise<void>;
|
|
856
881
|
commitRevision(revision: ReportingLedgerRevisionV1, lease: ReportingLedgerLeaseV1): Promise<{
|
|
@@ -1056,15 +1081,25 @@ export interface ReportingProducerContactV1 {
|
|
|
1056
1081
|
url?: string;
|
|
1057
1082
|
}
|
|
1058
1083
|
export interface ReportingProducerV1 {
|
|
1059
|
-
installConfiguration(input: Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules'
|
|
1084
|
+
installConfiguration(input: Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'historyStart' | 'historyStartOrdinal'>, options?: {
|
|
1085
|
+
historyStart?: string;
|
|
1086
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
1087
|
+
/** Trusted host operation. Ownership may only move earlier within the source retention window. */
|
|
1088
|
+
extendConfigurationHistory(input: {
|
|
1089
|
+
configurationId: string;
|
|
1090
|
+
historyStart: string;
|
|
1091
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
1060
1092
|
planObligations(now?: string, options?: {
|
|
1061
1093
|
account_id?: string;
|
|
1062
1094
|
maxObligations?: number;
|
|
1095
|
+
maxHistoryObligationsPerSource?: number;
|
|
1063
1096
|
}): Promise<ReportingLedgerObligationV1[]>;
|
|
1064
1097
|
runWorker(options?: {
|
|
1065
1098
|
signal?: AbortSignal;
|
|
1066
1099
|
now?: () => Date;
|
|
1067
1100
|
maxIterations?: number;
|
|
1101
|
+
/** Maximum history claims per source offering in this worker pass. Defaults to 10; zero pauses history. */
|
|
1102
|
+
maxHistorySlicesPerSource?: number;
|
|
1068
1103
|
retryDelayMilliseconds?: number;
|
|
1069
1104
|
executionDeadlineMilliseconds?: number;
|
|
1070
1105
|
settlementGraceMilliseconds?: number;
|
|
@@ -61,7 +61,7 @@ export interface ReliableReportingSourceRouteV1 {
|
|
|
61
61
|
/** Trusted upstream reporting clock for this account/scope. */
|
|
62
62
|
sourceTimezone: string;
|
|
63
63
|
}
|
|
64
|
-
type LedgerInstallInput = Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'account' | 'sourceScope' | 'sourceTimezone' | 'sourceSettings' | 'contract' | 'constituents' | 'mediaBuyIds'>;
|
|
64
|
+
type LedgerInstallInput = Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'historyStart' | 'historyStartOrdinal' | 'account' | 'sourceScope' | 'sourceTimezone' | 'sourceSettings' | 'contract' | 'constituents' | 'mediaBuyIds'>;
|
|
65
65
|
/**
|
|
66
66
|
* Seller-resolved configuration facts. `currency`, account identity, source
|
|
67
67
|
* scope, timezone, and source contract are deliberately absent.
|
|
@@ -78,11 +78,15 @@ export interface ReliableReportingConfigurationInputV1 extends LedgerInstallInpu
|
|
|
78
78
|
export interface ReliableReportingInstallContextV1<TCtxMeta = Record<string, unknown>> {
|
|
79
79
|
/** Must be the framework-resolved account from RequestContext. */
|
|
80
80
|
account: Pick<Account<TCtxMeta>, 'id' | 'ctx_metadata'>;
|
|
81
|
+
/** Trusted host history entitlement; never copy from buyer configuration input. */
|
|
82
|
+
historyStart?: string;
|
|
81
83
|
}
|
|
82
84
|
interface ReliableReportingSchedulerBaseOptionsV1 {
|
|
83
85
|
intervalMilliseconds: number;
|
|
84
86
|
maxObligationsPerAccount?: number;
|
|
85
87
|
maxWorkerIterationsPerAccount?: number;
|
|
88
|
+
maxHistoryObligationsPerSource?: number;
|
|
89
|
+
maxHistorySlicesPerSource?: number;
|
|
86
90
|
/** Bounded transactional notification claims per auxiliary pass. Defaults to 25. */
|
|
87
91
|
notificationRecoveryLimit?: number;
|
|
88
92
|
/** Independent notification recovery workers. Defaults to 4. */
|
|
@@ -127,6 +131,10 @@ interface ReliableReportingCycleBaseOptionsV1 {
|
|
|
127
131
|
now?: Date;
|
|
128
132
|
maxObligations?: number;
|
|
129
133
|
maxWorkerIterations?: number;
|
|
134
|
+
/** Per source offering planning budget in this cycle; defaults to maxObligations. Zero pauses planning history. */
|
|
135
|
+
maxHistoryObligationsPerSource?: number;
|
|
136
|
+
/** Per source offering execution budget in this cycle; defaults to 10. Zero pauses executing history. */
|
|
137
|
+
maxHistorySlicesPerSource?: number;
|
|
130
138
|
retryDelayMilliseconds?: number;
|
|
131
139
|
executionDeadlineMilliseconds?: number;
|
|
132
140
|
settlementGraceMilliseconds?: number;
|
|
@@ -261,6 +269,11 @@ export interface ReliableReportingServiceV1<TCtxMeta = Record<string, unknown>>
|
|
|
261
269
|
readonly platform: ReliableReportingPlatform<TCtxMeta>;
|
|
262
270
|
readonly running: boolean;
|
|
263
271
|
installConfiguration(configuration: ReliableReportingConfigurationInputV1, context: ReliableReportingInstallContextV1<TCtxMeta>): Promise<ReportingLedgerConfigurationV1>;
|
|
272
|
+
/** Trusted host operation; does not change the generation version or installedAt. */
|
|
273
|
+
extendConfigurationHistory(input: {
|
|
274
|
+
configurationId: string;
|
|
275
|
+
historyStart: string;
|
|
276
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
264
277
|
/**
|
|
265
278
|
* Returns the same platform object, narrowed to also carry `reporting`.
|
|
266
279
|
* The input type is preserved: widening to `DecisioningPlatform` would erase
|
|
@@ -61,7 +61,7 @@ export interface ReliableReportingSourceRouteV1 {
|
|
|
61
61
|
/** Trusted upstream reporting clock for this account/scope. */
|
|
62
62
|
sourceTimezone: string;
|
|
63
63
|
}
|
|
64
|
-
type LedgerInstallInput = Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'account' | 'sourceScope' | 'sourceTimezone' | 'sourceSettings' | 'contract' | 'constituents' | 'mediaBuyIds'>;
|
|
64
|
+
type LedgerInstallInput = Omit<ReportingLedgerConfigurationV1, 'configurationId' | 'installedAt' | 'semanticFingerprint' | 'calendarRules' | 'historyStart' | 'historyStartOrdinal' | 'account' | 'sourceScope' | 'sourceTimezone' | 'sourceSettings' | 'contract' | 'constituents' | 'mediaBuyIds'>;
|
|
65
65
|
/**
|
|
66
66
|
* Seller-resolved configuration facts. `currency`, account identity, source
|
|
67
67
|
* scope, timezone, and source contract are deliberately absent.
|
|
@@ -78,11 +78,15 @@ export interface ReliableReportingConfigurationInputV1 extends LedgerInstallInpu
|
|
|
78
78
|
export interface ReliableReportingInstallContextV1<TCtxMeta = Record<string, unknown>> {
|
|
79
79
|
/** Must be the framework-resolved account from RequestContext. */
|
|
80
80
|
account: Pick<Account<TCtxMeta>, 'id' | 'ctx_metadata'>;
|
|
81
|
+
/** Trusted host history entitlement; never copy from buyer configuration input. */
|
|
82
|
+
historyStart?: string;
|
|
81
83
|
}
|
|
82
84
|
interface ReliableReportingSchedulerBaseOptionsV1 {
|
|
83
85
|
intervalMilliseconds: number;
|
|
84
86
|
maxObligationsPerAccount?: number;
|
|
85
87
|
maxWorkerIterationsPerAccount?: number;
|
|
88
|
+
maxHistoryObligationsPerSource?: number;
|
|
89
|
+
maxHistorySlicesPerSource?: number;
|
|
86
90
|
/** Bounded transactional notification claims per auxiliary pass. Defaults to 25. */
|
|
87
91
|
notificationRecoveryLimit?: number;
|
|
88
92
|
/** Independent notification recovery workers. Defaults to 4. */
|
|
@@ -127,6 +131,10 @@ interface ReliableReportingCycleBaseOptionsV1 {
|
|
|
127
131
|
now?: Date;
|
|
128
132
|
maxObligations?: number;
|
|
129
133
|
maxWorkerIterations?: number;
|
|
134
|
+
/** Per source offering planning budget in this cycle; defaults to maxObligations. Zero pauses planning history. */
|
|
135
|
+
maxHistoryObligationsPerSource?: number;
|
|
136
|
+
/** Per source offering execution budget in this cycle; defaults to 10. Zero pauses executing history. */
|
|
137
|
+
maxHistorySlicesPerSource?: number;
|
|
130
138
|
retryDelayMilliseconds?: number;
|
|
131
139
|
executionDeadlineMilliseconds?: number;
|
|
132
140
|
settlementGraceMilliseconds?: number;
|
|
@@ -261,6 +269,11 @@ export interface ReliableReportingServiceV1<TCtxMeta = Record<string, unknown>>
|
|
|
261
269
|
readonly platform: ReliableReportingPlatform<TCtxMeta>;
|
|
262
270
|
readonly running: boolean;
|
|
263
271
|
installConfiguration(configuration: ReliableReportingConfigurationInputV1, context: ReliableReportingInstallContextV1<TCtxMeta>): Promise<ReportingLedgerConfigurationV1>;
|
|
272
|
+
/** Trusted host operation; does not change the generation version or installedAt. */
|
|
273
|
+
extendConfigurationHistory(input: {
|
|
274
|
+
configurationId: string;
|
|
275
|
+
historyStart: string;
|
|
276
|
+
}): Promise<ReportingLedgerConfigurationV1>;
|
|
264
277
|
/**
|
|
265
278
|
* Returns the same platform object, narrowed to also carry `reporting`.
|
|
266
279
|
* The input type is preserved: widening to `DecisioningPlatform` would erase
|
|
@@ -248,17 +248,23 @@ function createReliableReportingService(options) {
|
|
|
248
248
|
void _currency;
|
|
249
249
|
void _timezone;
|
|
250
250
|
void _mediaBuyIds;
|
|
251
|
-
return producer.installConfiguration(
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
251
|
+
return producer.installConfiguration(
|
|
252
|
+
{
|
|
253
|
+
...ledgerInput,
|
|
254
|
+
schedule: { ...ledgerInput.schedule, ...scheduleIdentity },
|
|
255
|
+
account: { account_id: context.account.id },
|
|
256
|
+
sourceScope,
|
|
257
|
+
sourceTimezone: normalizedTimezone,
|
|
258
|
+
sourceSettings: { ...sourceSettings, currency: normalizedCurrency },
|
|
259
|
+
contract: structuredClone(offering.contract),
|
|
260
|
+
constituents,
|
|
261
|
+
mediaBuyIds
|
|
262
|
+
},
|
|
263
|
+
{ ...context.historyStart !== void 0 ? { historyStart: context.historyStart } : {} }
|
|
264
|
+
);
|
|
265
|
+
},
|
|
266
|
+
extendConfigurationHistory(input) {
|
|
267
|
+
return producer.extendConfigurationHistory(input);
|
|
262
268
|
},
|
|
263
269
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
264
270
|
install(platform) {
|
|
@@ -286,7 +292,8 @@ function createReliableReportingService(options) {
|
|
|
286
292
|
cycle.signal?.throwIfAborted();
|
|
287
293
|
const planned = await producer.planObligations(planningNow.toISOString(), {
|
|
288
294
|
...accountId !== void 0 ? { account_id: accountId } : {},
|
|
289
|
-
...cycle.maxObligations !== void 0 ? { maxObligations: cycle.maxObligations } : {}
|
|
295
|
+
...cycle.maxObligations !== void 0 ? { maxObligations: cycle.maxObligations } : {},
|
|
296
|
+
...cycle.maxHistoryObligationsPerSource !== void 0 ? { maxHistoryObligationsPerSource: cycle.maxHistoryObligationsPerSource } : {}
|
|
290
297
|
});
|
|
291
298
|
cycle.signal?.throwIfAborted();
|
|
292
299
|
const result = await producer.runWorker({
|
|
@@ -294,6 +301,7 @@ function createReliableReportingService(options) {
|
|
|
294
301
|
...cycle.now ? { now: () => cycle.now } : {},
|
|
295
302
|
...accountId !== void 0 ? { account_id: accountId } : {},
|
|
296
303
|
...cycle.maxWorkerIterations !== void 0 ? { maxIterations: cycle.maxWorkerIterations } : {},
|
|
304
|
+
...cycle.maxHistorySlicesPerSource !== void 0 ? { maxHistorySlicesPerSource: cycle.maxHistorySlicesPerSource } : {},
|
|
297
305
|
...cycle.retryDelayMilliseconds !== void 0 ? { retryDelayMilliseconds: cycle.retryDelayMilliseconds } : {},
|
|
298
306
|
...cycle.executionDeadlineMilliseconds !== void 0 ? { executionDeadlineMilliseconds: cycle.executionDeadlineMilliseconds } : {},
|
|
299
307
|
...cycle.settlementGraceMilliseconds !== void 0 ? { settlementGraceMilliseconds: cycle.settlementGraceMilliseconds } : {}
|
|
@@ -379,6 +387,8 @@ async function schedulerLoop(service, options, signal, store, maintenance) {
|
|
|
379
387
|
await service.runCycle({
|
|
380
388
|
...accountId === void 0 ? { deploymentWide: true } : { accountId },
|
|
381
389
|
signal,
|
|
390
|
+
...options.maxHistoryObligationsPerSource !== void 0 ? { maxHistoryObligationsPerSource: options.maxHistoryObligationsPerSource } : {},
|
|
391
|
+
...options.maxHistorySlicesPerSource !== void 0 ? { maxHistorySlicesPerSource: options.maxHistorySlicesPerSource } : {},
|
|
382
392
|
...options.maxObligationsPerAccount !== void 0 ? { maxObligations: options.maxObligationsPerAccount } : {},
|
|
383
393
|
...options.maxWorkerIterationsPerAccount !== void 0 ? { maxWorkerIterations: options.maxWorkerIterationsPerAccount } : {},
|
|
384
394
|
...options.retryDelayMilliseconds !== void 0 ? { retryDelayMilliseconds: options.retryDelayMilliseconds } : {},
|
|
@@ -755,6 +765,8 @@ function trustedTimezone(value) {
|
|
|
755
765
|
function assertNoUntrustedLineageFields(configuration) {
|
|
756
766
|
for (const field of [
|
|
757
767
|
"account",
|
|
768
|
+
"historyStart",
|
|
769
|
+
"historyStartOrdinal",
|
|
758
770
|
"sourceScope",
|
|
759
771
|
"sourceTimezone",
|
|
760
772
|
"contract",
|
|
@@ -245,17 +245,23 @@ function createReliableReportingService(options) {
|
|
|
245
245
|
void _currency;
|
|
246
246
|
void _timezone;
|
|
247
247
|
void _mediaBuyIds;
|
|
248
|
-
return producer.installConfiguration(
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
248
|
+
return producer.installConfiguration(
|
|
249
|
+
{
|
|
250
|
+
...ledgerInput,
|
|
251
|
+
schedule: { ...ledgerInput.schedule, ...scheduleIdentity },
|
|
252
|
+
account: { account_id: context.account.id },
|
|
253
|
+
sourceScope,
|
|
254
|
+
sourceTimezone: normalizedTimezone,
|
|
255
|
+
sourceSettings: { ...sourceSettings, currency: normalizedCurrency },
|
|
256
|
+
contract: structuredClone(offering.contract),
|
|
257
|
+
constituents,
|
|
258
|
+
mediaBuyIds
|
|
259
|
+
},
|
|
260
|
+
{ ...context.historyStart !== void 0 ? { historyStart: context.historyStart } : {} }
|
|
261
|
+
);
|
|
262
|
+
},
|
|
263
|
+
extendConfigurationHistory(input) {
|
|
264
|
+
return producer.extendConfigurationHistory(input);
|
|
259
265
|
},
|
|
260
266
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
261
267
|
install(platform) {
|
|
@@ -283,7 +289,8 @@ function createReliableReportingService(options) {
|
|
|
283
289
|
cycle.signal?.throwIfAborted();
|
|
284
290
|
const planned = await producer.planObligations(planningNow.toISOString(), {
|
|
285
291
|
...accountId !== void 0 ? { account_id: accountId } : {},
|
|
286
|
-
...cycle.maxObligations !== void 0 ? { maxObligations: cycle.maxObligations } : {}
|
|
292
|
+
...cycle.maxObligations !== void 0 ? { maxObligations: cycle.maxObligations } : {},
|
|
293
|
+
...cycle.maxHistoryObligationsPerSource !== void 0 ? { maxHistoryObligationsPerSource: cycle.maxHistoryObligationsPerSource } : {}
|
|
287
294
|
});
|
|
288
295
|
cycle.signal?.throwIfAborted();
|
|
289
296
|
const result = await producer.runWorker({
|
|
@@ -291,6 +298,7 @@ function createReliableReportingService(options) {
|
|
|
291
298
|
...cycle.now ? { now: () => cycle.now } : {},
|
|
292
299
|
...accountId !== void 0 ? { account_id: accountId } : {},
|
|
293
300
|
...cycle.maxWorkerIterations !== void 0 ? { maxIterations: cycle.maxWorkerIterations } : {},
|
|
301
|
+
...cycle.maxHistorySlicesPerSource !== void 0 ? { maxHistorySlicesPerSource: cycle.maxHistorySlicesPerSource } : {},
|
|
294
302
|
...cycle.retryDelayMilliseconds !== void 0 ? { retryDelayMilliseconds: cycle.retryDelayMilliseconds } : {},
|
|
295
303
|
...cycle.executionDeadlineMilliseconds !== void 0 ? { executionDeadlineMilliseconds: cycle.executionDeadlineMilliseconds } : {},
|
|
296
304
|
...cycle.settlementGraceMilliseconds !== void 0 ? { settlementGraceMilliseconds: cycle.settlementGraceMilliseconds } : {}
|
|
@@ -376,6 +384,8 @@ async function schedulerLoop(service, options, signal, store, maintenance) {
|
|
|
376
384
|
await service.runCycle({
|
|
377
385
|
...accountId === void 0 ? { deploymentWide: true } : { accountId },
|
|
378
386
|
signal,
|
|
387
|
+
...options.maxHistoryObligationsPerSource !== void 0 ? { maxHistoryObligationsPerSource: options.maxHistoryObligationsPerSource } : {},
|
|
388
|
+
...options.maxHistorySlicesPerSource !== void 0 ? { maxHistorySlicesPerSource: options.maxHistorySlicesPerSource } : {},
|
|
379
389
|
...options.maxObligationsPerAccount !== void 0 ? { maxObligations: options.maxObligationsPerAccount } : {},
|
|
380
390
|
...options.maxWorkerIterationsPerAccount !== void 0 ? { maxWorkerIterations: options.maxWorkerIterationsPerAccount } : {},
|
|
381
391
|
...options.retryDelayMilliseconds !== void 0 ? { retryDelayMilliseconds: options.retryDelayMilliseconds } : {},
|
|
@@ -752,6 +762,8 @@ function trustedTimezone(value) {
|
|
|
752
762
|
function assertNoUntrustedLineageFields(configuration) {
|
|
753
763
|
for (const field of [
|
|
754
764
|
"account",
|
|
765
|
+
"historyStart",
|
|
766
|
+
"historyStartOrdinal",
|
|
755
767
|
"sourceScope",
|
|
756
768
|
"sourceTimezone",
|
|
757
769
|
"contract",
|
|
@@ -12,3 +12,5 @@ export { BiddingPolicySchema } from '../validation/bidding-policy.mjs';
|
|
|
12
12
|
export { CanonicalBudgetAllocationSchema } from '../validation/budget-allocation.mjs';
|
|
13
13
|
export { SyncCreativesItemSchema, SyncCreativesSuccessStrictSchema, SyncCreativesResponseStrictSchema, SyncCreativesActionSchema, } from '../validation/sync-creatives.mjs';
|
|
14
14
|
export type { SyncCreativesItem, SyncCreativesSuccessStrict } from '../validation/sync-creatives.mjs';
|
|
15
|
+
export { MediaBuyDeliveryReportSchema } from '../validation/media-buy-delivery-report.mjs';
|
|
16
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report.mjs';
|
|
@@ -12,3 +12,5 @@ export { BiddingPolicySchema } from '../validation/bidding-policy';
|
|
|
12
12
|
export { CanonicalBudgetAllocationSchema } from '../validation/budget-allocation';
|
|
13
13
|
export { SyncCreativesItemSchema, SyncCreativesSuccessStrictSchema, SyncCreativesResponseStrictSchema, SyncCreativesActionSchema, } from '../validation/sync-creatives';
|
|
14
14
|
export type { SyncCreativesItem, SyncCreativesSuccessStrict } from '../validation/sync-creatives';
|
|
15
|
+
export { MediaBuyDeliveryReportSchema } from '../validation/media-buy-delivery-report';
|
|
16
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report';
|
|
@@ -23,6 +23,7 @@ __export(browser_exports, {
|
|
|
23
23
|
CanonicalBudgetAllocationSchema: () => import_budget_allocation.CanonicalBudgetAllocationSchema,
|
|
24
24
|
GetProductsRequestSchema: () => import_get_products_request.GetProductsRequestSchema,
|
|
25
25
|
LegacyGetProductsRequestSchema: () => import_get_products_request.LegacyGetProductsRequestSchema,
|
|
26
|
+
MediaBuyDeliveryReportSchema: () => import_media_buy_delivery_report.MediaBuyDeliveryReportSchema,
|
|
26
27
|
SyncCreativesActionSchema: () => import_sync_creatives.SyncCreativesActionSchema,
|
|
27
28
|
SyncCreativesItemSchema: () => import_sync_creatives.SyncCreativesItemSchema,
|
|
28
29
|
SyncCreativesResponseStrictSchema: () => import_sync_creatives.SyncCreativesResponseStrictSchema,
|
|
@@ -34,12 +35,14 @@ var import_get_products_request = require('../validation/get-products-request.js
|
|
|
34
35
|
var import_bidding_policy = require('../validation/bidding-policy.js');
|
|
35
36
|
var import_budget_allocation = require('../validation/budget-allocation.js');
|
|
36
37
|
var import_sync_creatives = require('../validation/sync-creatives.js');
|
|
38
|
+
var import_media_buy_delivery_report = require('../validation/media-buy-delivery-report.js');
|
|
37
39
|
// Annotate the CommonJS export names for ESM import in node:
|
|
38
40
|
0 && (module.exports = {
|
|
39
41
|
BiddingPolicySchema,
|
|
40
42
|
CanonicalBudgetAllocationSchema,
|
|
41
43
|
GetProductsRequestSchema,
|
|
42
44
|
LegacyGetProductsRequestSchema,
|
|
45
|
+
MediaBuyDeliveryReportSchema,
|
|
43
46
|
SyncCreativesActionSchema,
|
|
44
47
|
SyncCreativesItemSchema,
|
|
45
48
|
SyncCreativesResponseStrictSchema,
|
|
@@ -8,11 +8,13 @@ import {
|
|
|
8
8
|
SyncCreativesResponseStrictSchema,
|
|
9
9
|
SyncCreativesActionSchema
|
|
10
10
|
} from "../validation/sync-creatives.mjs";
|
|
11
|
+
import { MediaBuyDeliveryReportSchema } from "../validation/media-buy-delivery-report.mjs";
|
|
11
12
|
export {
|
|
12
13
|
BiddingPolicySchema,
|
|
13
14
|
CanonicalBudgetAllocationSchema,
|
|
14
15
|
GetProductsRequestSchema,
|
|
15
16
|
LegacyGetProductsRequestSchema,
|
|
17
|
+
MediaBuyDeliveryReportSchema,
|
|
16
18
|
SyncCreativesActionSchema,
|
|
17
19
|
SyncCreativesItemSchema,
|
|
18
20
|
SyncCreativesResponseStrictSchema,
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
import { z } from 'zod';
|
|
43
43
|
import * as schemas from '../types/schemas.generated.mjs';
|
|
44
44
|
import type { KnownToolRequestSchemas } from '../utils/tool-request-schemas.mjs';
|
|
45
|
-
import { getSchemaDocumentByRef, type Direction, type ResolvedToolSchemaDocument, type ResponseVariant } from '../validation/schema-loader.mjs';
|
|
45
|
+
import { getSchemaDocumentByRef, getSchemaValidatorByRef, type Direction, type ResolvedToolSchemaDocument, type ResponseVariant } from '../validation/schema-loader.mjs';
|
|
46
46
|
import type { ValidateFunction } from 'ajv';
|
|
47
47
|
export * from '../types/schemas.generated.mjs';
|
|
48
48
|
export { AgentOAuthClientCredentialsSchema } from '../auth/oauth/client-credentials-schema.mjs';
|
|
49
49
|
export type { AgentOAuthClientCredentials } from '../types/adcp.mjs';
|
|
50
|
-
export type { PlacementPresentationDocument, PlacementPresentationReference } from '../types/core.generated.mjs';
|
|
50
|
+
export type { AssetVariant, PlacementPresentationDocument, PlacementPresentationReference, } from '../types/core.generated.mjs';
|
|
51
51
|
export { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from '../validation/get-products-request.mjs';
|
|
52
52
|
export type { LooseObjectSchemaFor } from '../validation/get-products-request.mjs';
|
|
53
53
|
export { BiddingPolicySchema } from '../validation/bidding-policy.mjs';
|
|
@@ -73,7 +73,7 @@ export type VersionedToolSchema = ResolvedToolSchemaDocument;
|
|
|
73
73
|
* callers should normally prefer {@link getCanonicalToolValidator} so
|
|
74
74
|
* reference registration stays internal.
|
|
75
75
|
*/
|
|
76
|
-
export { getSchemaDocumentByRef };
|
|
76
|
+
export { getSchemaDocumentByRef, getSchemaValidatorByRef };
|
|
77
77
|
/** Retrieve the protocol-authored request JSON Schema for a specific AdCP release. */
|
|
78
78
|
export declare function getToolInputSchema(toolName: string, options?: ToolSchemaLookupOptions): VersionedToolSchema | undefined;
|
|
79
79
|
/** Retrieve a protocol-authored response JSON Schema for a specific AdCP release. */
|
|
@@ -178,3 +178,5 @@ export declare function customToolForSchema<TSchema extends InputSchema>(name: s
|
|
|
178
178
|
inputSchema: TSchema;
|
|
179
179
|
handler: (args: z.input<TSchema>, extra?: unknown) => unknown | Promise<unknown>;
|
|
180
180
|
};
|
|
181
|
+
export { MediaBuyDeliveryReportSchema } from '../validation/media-buy-delivery-report.mjs';
|
|
182
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report.mjs';
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
import { z } from 'zod';
|
|
43
43
|
import * as schemas from '../types/schemas.generated';
|
|
44
44
|
import type { KnownToolRequestSchemas } from '../utils/tool-request-schemas';
|
|
45
|
-
import { getSchemaDocumentByRef, type Direction, type ResolvedToolSchemaDocument, type ResponseVariant } from '../validation/schema-loader';
|
|
45
|
+
import { getSchemaDocumentByRef, getSchemaValidatorByRef, type Direction, type ResolvedToolSchemaDocument, type ResponseVariant } from '../validation/schema-loader';
|
|
46
46
|
import type { ValidateFunction } from 'ajv';
|
|
47
47
|
export * from '../types/schemas.generated';
|
|
48
48
|
export { AgentOAuthClientCredentialsSchema } from '../auth/oauth/client-credentials-schema';
|
|
49
49
|
export type { AgentOAuthClientCredentials } from '../types/adcp';
|
|
50
|
-
export type { PlacementPresentationDocument, PlacementPresentationReference } from '../types/core.generated';
|
|
50
|
+
export type { AssetVariant, PlacementPresentationDocument, PlacementPresentationReference, } from '../types/core.generated';
|
|
51
51
|
export { GetProductsRequestSchema, LegacyGetProductsRequestSchema } from '../validation/get-products-request';
|
|
52
52
|
export type { LooseObjectSchemaFor } from '../validation/get-products-request';
|
|
53
53
|
export { BiddingPolicySchema } from '../validation/bidding-policy';
|
|
@@ -73,7 +73,7 @@ export type VersionedToolSchema = ResolvedToolSchemaDocument;
|
|
|
73
73
|
* callers should normally prefer {@link getCanonicalToolValidator} so
|
|
74
74
|
* reference registration stays internal.
|
|
75
75
|
*/
|
|
76
|
-
export { getSchemaDocumentByRef };
|
|
76
|
+
export { getSchemaDocumentByRef, getSchemaValidatorByRef };
|
|
77
77
|
/** Retrieve the protocol-authored request JSON Schema for a specific AdCP release. */
|
|
78
78
|
export declare function getToolInputSchema(toolName: string, options?: ToolSchemaLookupOptions): VersionedToolSchema | undefined;
|
|
79
79
|
/** Retrieve a protocol-authored response JSON Schema for a specific AdCP release. */
|
|
@@ -178,3 +178,5 @@ export declare function customToolForSchema<TSchema extends InputSchema>(name: s
|
|
|
178
178
|
inputSchema: TSchema;
|
|
179
179
|
handler: (args: z.input<TSchema>, extra?: unknown) => unknown | Promise<unknown>;
|
|
180
180
|
};
|
|
181
|
+
export { MediaBuyDeliveryReportSchema } from '../validation/media-buy-delivery-report';
|
|
182
|
+
export type { MediaBuyDeliveryReport } from '../types/media-buy-delivery-report';
|
|
@@ -34,6 +34,7 @@ __export(schemas_exports, {
|
|
|
34
34
|
CanonicalBudgetAllocationSchema: () => import_budget_allocation.CanonicalBudgetAllocationSchema,
|
|
35
35
|
GetProductsRequestSchema: () => import_get_products_request.GetProductsRequestSchema,
|
|
36
36
|
LegacyGetProductsRequestSchema: () => import_get_products_request.LegacyGetProductsRequestSchema,
|
|
37
|
+
MediaBuyDeliveryReportSchema: () => import_media_buy_delivery_report.MediaBuyDeliveryReportSchema,
|
|
37
38
|
SyncCreativesActionSchema: () => import_sync_creatives.SyncCreativesActionSchema,
|
|
38
39
|
SyncCreativesItemSchema: () => import_sync_creatives.SyncCreativesItemSchema,
|
|
39
40
|
SyncCreativesResponseStrictSchema: () => import_sync_creatives.SyncCreativesResponseStrictSchema,
|
|
@@ -46,6 +47,7 @@ __export(schemas_exports, {
|
|
|
46
47
|
customToolForSchema: () => customToolForSchema,
|
|
47
48
|
getCanonicalToolValidator: () => getCanonicalToolValidator,
|
|
48
49
|
getSchemaDocumentByRef: () => import_schema_loader.getSchemaDocumentByRef,
|
|
50
|
+
getSchemaValidatorByRef: () => import_schema_loader.getSchemaValidatorByRef,
|
|
49
51
|
getToolInputSchema: () => getToolInputSchema,
|
|
50
52
|
getToolResponseSchema: () => getToolResponseSchema
|
|
51
53
|
});
|
|
@@ -62,6 +64,7 @@ var import_budget_allocation = require('../validation/budget-allocation.js');
|
|
|
62
64
|
var import_tool_request_schemas2 = require('../utils/tool-request-schemas.js');
|
|
63
65
|
var import_response_schemas = require('../utils/response-schemas.js');
|
|
64
66
|
var import_sync_creatives = require('../validation/sync-creatives.js');
|
|
67
|
+
var import_media_buy_delivery_report = require('../validation/media-buy-delivery-report.js');
|
|
65
68
|
function getToolInputSchema(toolName, options = {}) {
|
|
66
69
|
return (0, import_schema_loader.getToolSchemaDocument)(toolName, "request", (0, import_adcp_version_config.resolveAdcpVersion)(options.adcpVersion));
|
|
67
70
|
}
|
|
@@ -113,6 +116,7 @@ function customToolForSchema(name, description, inputSchema, handler) {
|
|
|
113
116
|
CanonicalBudgetAllocationSchema,
|
|
114
117
|
GetProductsRequestSchema,
|
|
115
118
|
LegacyGetProductsRequestSchema,
|
|
119
|
+
MediaBuyDeliveryReportSchema,
|
|
116
120
|
SyncCreativesActionSchema,
|
|
117
121
|
SyncCreativesItemSchema,
|
|
118
122
|
SyncCreativesResponseStrictSchema,
|
|
@@ -125,6 +129,7 @@ function customToolForSchema(name, description, inputSchema, handler) {
|
|
|
125
129
|
customToolForSchema,
|
|
126
130
|
getCanonicalToolValidator,
|
|
127
131
|
getSchemaDocumentByRef,
|
|
132
|
+
getSchemaValidatorByRef,
|
|
128
133
|
getToolInputSchema,
|
|
129
134
|
getToolResponseSchema,
|
|
130
135
|
...require('../types/schemas.generated.js')
|
|
@@ -3,6 +3,7 @@ import { TOOL_REQUEST_SCHEMAS } from "../utils/tool-request-schemas.mjs";
|
|
|
3
3
|
import {
|
|
4
4
|
getCanonicalToolValidatorForVersion,
|
|
5
5
|
getSchemaDocumentByRef,
|
|
6
|
+
getSchemaValidatorByRef,
|
|
6
7
|
getToolSchemaDocument
|
|
7
8
|
} from "../validation/schema-loader.mjs";
|
|
8
9
|
import { resolveAdcpVersion } from "../utils/adcp-version-config.mjs";
|
|
@@ -63,12 +64,14 @@ function customToolForSchema(name, description, inputSchema, handler) {
|
|
|
63
64
|
void name;
|
|
64
65
|
return { description, inputSchema, handler };
|
|
65
66
|
}
|
|
67
|
+
import { MediaBuyDeliveryReportSchema } from "../validation/media-buy-delivery-report.mjs";
|
|
66
68
|
export {
|
|
67
69
|
AgentOAuthClientCredentialsSchema,
|
|
68
70
|
BiddingPolicySchema,
|
|
69
71
|
CanonicalBudgetAllocationSchema,
|
|
70
72
|
GetProductsRequestSchema,
|
|
71
73
|
LegacyGetProductsRequestSchema,
|
|
74
|
+
MediaBuyDeliveryReportSchema,
|
|
72
75
|
SyncCreativesActionSchema,
|
|
73
76
|
SyncCreativesItemSchema,
|
|
74
77
|
SyncCreativesResponseStrictSchema,
|
|
@@ -81,6 +84,7 @@ export {
|
|
|
81
84
|
customToolForSchema,
|
|
82
85
|
getCanonicalToolValidator,
|
|
83
86
|
getSchemaDocumentByRef,
|
|
87
|
+
getSchemaValidatorByRef,
|
|
84
88
|
getToolInputSchema,
|
|
85
89
|
getToolResponseSchema
|
|
86
90
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SyncAccountsSuccess } from '../types/tools.generated.mjs';
|
|
2
|
+
declare const IDENTITY_RESPONSE_SCHEMAS: {
|
|
3
|
+
readonly account: "core/account-ref.json";
|
|
4
|
+
readonly operator_unit: "core/operator-unit.json";
|
|
5
|
+
readonly identity_change: "core/account-identity-change.json";
|
|
6
|
+
readonly identity_change_preview: "core/account-identity-change-preview.json";
|
|
7
|
+
};
|
|
8
|
+
type IdentityFields = Pick<SyncAccountsSuccess['accounts'][number], keyof typeof IDENTITY_RESPONSE_SCHEMAS>;
|
|
9
|
+
/**
|
|
10
|
+
* These canonical identity objects have closed schemas, including their nested
|
|
11
|
+
* operator identities. Validate and emit the same detached snapshot so retained
|
|
12
|
+
* DB/request fields or later mutations cannot enter a response or replay cache,
|
|
13
|
+
* even with whole-response validation off. These four core contracts are shared
|
|
14
|
+
* by the maintained 3.2 and 3.3 bundles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function projectAccountResponseIdentityFields(account: object): IdentityFields;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { SyncAccountsSuccess } from '../types/tools.generated';
|
|
2
|
+
declare const IDENTITY_RESPONSE_SCHEMAS: {
|
|
3
|
+
readonly account: "core/account-ref.json";
|
|
4
|
+
readonly operator_unit: "core/operator-unit.json";
|
|
5
|
+
readonly identity_change: "core/account-identity-change.json";
|
|
6
|
+
readonly identity_change_preview: "core/account-identity-change-preview.json";
|
|
7
|
+
};
|
|
8
|
+
type IdentityFields = Pick<SyncAccountsSuccess['accounts'][number], keyof typeof IDENTITY_RESPONSE_SCHEMAS>;
|
|
9
|
+
/**
|
|
10
|
+
* These canonical identity objects have closed schemas, including their nested
|
|
11
|
+
* operator identities. Validate and emit the same detached snapshot so retained
|
|
12
|
+
* DB/request fields or later mutations cannot enter a response or replay cache,
|
|
13
|
+
* even with whole-response validation off. These four core contracts are shared
|
|
14
|
+
* by the maintained 3.2 and 3.3 bundles.
|
|
15
|
+
*/
|
|
16
|
+
export declare function projectAccountResponseIdentityFields(account: object): IdentityFields;
|
|
17
|
+
export {};
|