@adcp/sdk 16.2.0 → 16.3.0
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/AGENTS.md +2 -0
- package/dist/lib/core/AgentClient.js +17 -1
- package/dist/lib/core/AgentClient.mjs +17 -1
- package/dist/lib/core/SingleAgentClient.js +13 -0
- package/dist/lib/core/SingleAgentClient.mjs +13 -0
- package/dist/lib/core/TaskExecutor.js +88 -13
- package/dist/lib/core/TaskExecutor.mjs +89 -14
- package/dist/lib/errors/index.d.mts +34 -0
- package/dist/lib/errors/index.d.ts +34 -0
- package/dist/lib/errors/index.js +11 -0
- package/dist/lib/errors/index.mjs +10 -0
- package/dist/lib/index.d.mts +1 -1
- package/dist/lib/index.d.ts +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +2 -0
- package/dist/lib/media-buy/compatibility.d.mts +1 -0
- package/dist/lib/media-buy/compatibility.d.ts +1 -0
- package/dist/lib/media-buy/compatibility.js +33 -10
- package/dist/lib/media-buy/compatibility.mjs +32 -14
- package/dist/lib/negotiation/buyer.js +11 -5
- package/dist/lib/negotiation/buyer.mjs +11 -5
- package/dist/lib/negotiation/types.d.mts +4 -2
- package/dist/lib/negotiation/types.d.ts +4 -2
- package/dist/lib/negotiation/verification.d.mts +15 -6
- package/dist/lib/negotiation/verification.d.ts +15 -6
- package/dist/lib/negotiation/verification.js +146 -27
- package/dist/lib/negotiation/verification.mjs +146 -28
- package/dist/lib/negotiation/version.d.mts +6 -0
- package/dist/lib/negotiation/version.d.ts +6 -0
- package/dist/lib/negotiation/version.js +60 -0
- package/dist/lib/negotiation/version.mjs +33 -0
- package/dist/lib/server/create-adcp-server.js +1 -1
- package/dist/lib/server/create-adcp-server.mjs +1 -1
- package/dist/lib/server/error-arm-tools.d.mts +10 -10
- package/dist/lib/server/error-arm-tools.d.ts +10 -10
- package/dist/lib/server/error-arm-tools.js +22 -58
- package/dist/lib/server/error-arm-tools.mjs +30 -65
- package/dist/lib/testing/compliance/comply.js +17 -0
- package/dist/lib/testing/compliance/comply.mjs +17 -0
- package/dist/lib/testing/index.d.mts +3 -0
- package/dist/lib/testing/index.d.ts +3 -0
- package/dist/lib/testing/index.js +44 -2
- package/dist/lib/testing/index.mjs +42 -0
- package/dist/lib/testing/storyboard/collection-selection.d.mts +259 -0
- package/dist/lib/testing/storyboard/collection-selection.d.ts +259 -0
- package/dist/lib/testing/storyboard/collection-selection.js +384 -0
- package/dist/lib/testing/storyboard/collection-selection.mjs +348 -0
- package/dist/lib/testing/storyboard/context.js +12 -6
- package/dist/lib/testing/storyboard/context.mjs +12 -6
- package/dist/lib/testing/storyboard/fixture-resolution.d.mts +39 -1
- package/dist/lib/testing/storyboard/fixture-resolution.d.ts +39 -1
- package/dist/lib/testing/storyboard/fixture-resolution.js +216 -12
- package/dist/lib/testing/storyboard/fixture-resolution.mjs +218 -12
- package/dist/lib/testing/storyboard/index.d.mts +9 -2
- package/dist/lib/testing/storyboard/index.d.ts +9 -2
- package/dist/lib/testing/storyboard/index.js +51 -2
- package/dist/lib/testing/storyboard/index.mjs +49 -1
- package/dist/lib/testing/storyboard/prepared-fixtures.d.mts +471 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.d.ts +471 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.js +434 -0
- package/dist/lib/testing/storyboard/prepared-fixtures.mjs +389 -0
- package/dist/lib/testing/storyboard/protected-context.d.mts +127 -0
- package/dist/lib/testing/storyboard/protected-context.d.ts +127 -0
- package/dist/lib/testing/storyboard/protected-context.js +301 -0
- package/dist/lib/testing/storyboard/protected-context.mjs +267 -0
- package/dist/lib/testing/storyboard/rejection-hints.js +13 -4
- package/dist/lib/testing/storyboard/rejection-hints.mjs +13 -4
- package/dist/lib/testing/storyboard/runner.d.mts +24 -0
- package/dist/lib/testing/storyboard/runner.d.ts +24 -0
- package/dist/lib/testing/storyboard/runner.js +1061 -105
- package/dist/lib/testing/storyboard/runner.mjs +1075 -106
- package/dist/lib/testing/storyboard/seeding.d.mts +15 -1
- package/dist/lib/testing/storyboard/seeding.d.ts +15 -1
- package/dist/lib/testing/storyboard/seeding.js +272 -12
- package/dist/lib/testing/storyboard/seeding.mjs +274 -13
- package/dist/lib/testing/storyboard/types.d.mts +207 -10
- package/dist/lib/testing/storyboard/types.d.ts +207 -10
- package/dist/lib/testing/storyboard/types.js +1 -1
- package/dist/lib/testing/storyboard/types.mjs +1 -1
- package/dist/lib/testing/storyboard/validations.d.mts +1 -1
- package/dist/lib/testing/storyboard/validations.d.ts +1 -1
- package/dist/lib/testing/storyboard/validations.js +95 -0
- package/dist/lib/testing/storyboard/validations.mjs +95 -0
- package/dist/lib/validation/bundled-schema-store.js +5 -0
- package/dist/lib/validation/bundled-schema-store.mjs +4 -0
- package/dist/lib/validation/schema-loader.js +19 -2
- package/dist/lib/validation/schema-loader.mjs +22 -3
- 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/docs/TYPE-SUMMARY.md +1 -1
- package/docs/guides/COLLECTION-FIXTURE-FOUNDATION.md +850 -0
- package/docs/guides/PROPOSAL-TERMS-VERIFICATION.md +66 -0
- package/docs/llms.txt +3 -2
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/package.json +1 -1
|
@@ -537,3 +537,37 @@ export declare function extractErrorInfo(error: unknown): {
|
|
|
537
537
|
details?: unknown;
|
|
538
538
|
stack?: string;
|
|
539
539
|
};
|
|
540
|
+
/**
|
|
541
|
+
* Prepared fixture state was refused by the host authorizer.
|
|
542
|
+
*
|
|
543
|
+
* An authorization failure is an ACCESS-CONTROL error, not a grading
|
|
544
|
+
* outcome, so the refused caller gets this and no `StoryboardResult` —
|
|
545
|
+
* not a partial one, not a redacted one. It carries the machine refusal
|
|
546
|
+
* code and nothing else: no fixture identities, no `seller_ids`, no
|
|
547
|
+
* captures, no binding values, no request/response records, and no
|
|
548
|
+
* results from steps that ran before the grant was revoked.
|
|
549
|
+
*
|
|
550
|
+
* The complete, unredacted record — including the synthesized
|
|
551
|
+
* `prepared_fixtures_authorization` check, `fixture_resolutions` with
|
|
552
|
+
* `seller_ids`, and exact request/response records — is handed to the
|
|
553
|
+
* host's `prepared_fixtures_audit_sink` before this is thrown. Where no
|
|
554
|
+
* sink is configured the record is simply not produced to anyone.
|
|
555
|
+
*
|
|
556
|
+
* Hosted entry points should surface this as a 403-style denial.
|
|
557
|
+
*/
|
|
558
|
+
export declare class PreparedFixturesDeniedError extends ADCPError {
|
|
559
|
+
/**
|
|
560
|
+
* Machine refusal code: `authorizer_required` | `untrusted_state` |
|
|
561
|
+
* `contract_version_mismatch` | `authorizer_denied` |
|
|
562
|
+
* `binding_mismatch` | `unauthorized_metadata`.
|
|
563
|
+
*/
|
|
564
|
+
readonly refusalCode: string;
|
|
565
|
+
readonly code = "PREPARED_FIXTURES_DENIED";
|
|
566
|
+
constructor(
|
|
567
|
+
/**
|
|
568
|
+
* Machine refusal code: `authorizer_required` | `untrusted_state` |
|
|
569
|
+
* `contract_version_mismatch` | `authorizer_denied` |
|
|
570
|
+
* `binding_mismatch` | `unauthorized_metadata`.
|
|
571
|
+
*/
|
|
572
|
+
refusalCode: string);
|
|
573
|
+
}
|
package/dist/lib/errors/index.js
CHANGED
|
@@ -39,6 +39,7 @@ __export(errors_exports, {
|
|
|
39
39
|
InvalidContextError: () => InvalidContextError,
|
|
40
40
|
MaxClarificationError: () => MaxClarificationError,
|
|
41
41
|
MissingInputHandlerError: () => MissingInputHandlerError,
|
|
42
|
+
PreparedFixturesDeniedError: () => PreparedFixturesDeniedError,
|
|
42
43
|
ProtocolError: () => ProtocolError,
|
|
43
44
|
ProtocolFeatureUnsupportedError: () => ProtocolFeatureUnsupportedError,
|
|
44
45
|
ResponseTooLargeError: () => ResponseTooLargeError,
|
|
@@ -655,6 +656,15 @@ function extractErrorInfo(error) {
|
|
|
655
656
|
message: String(error)
|
|
656
657
|
};
|
|
657
658
|
}
|
|
659
|
+
class PreparedFixturesDeniedError extends ADCPError {
|
|
660
|
+
constructor(refusalCode) {
|
|
661
|
+
super(`prepared fixture state was refused by the configured authorizer (${refusalCode})`);
|
|
662
|
+
this.refusalCode = refusalCode;
|
|
663
|
+
this.details = { refusal_code: refusalCode };
|
|
664
|
+
}
|
|
665
|
+
refusalCode;
|
|
666
|
+
code = "PREPARED_FIXTURES_DENIED";
|
|
667
|
+
}
|
|
658
668
|
// Annotate the CommonJS export names for ESM import in node:
|
|
659
669
|
0 && (module.exports = {
|
|
660
670
|
ADCPError,
|
|
@@ -678,6 +688,7 @@ function extractErrorInfo(error) {
|
|
|
678
688
|
InvalidContextError,
|
|
679
689
|
MaxClarificationError,
|
|
680
690
|
MissingInputHandlerError,
|
|
691
|
+
PreparedFixturesDeniedError,
|
|
681
692
|
ProtocolError,
|
|
682
693
|
ProtocolFeatureUnsupportedError,
|
|
683
694
|
ResponseTooLargeError,
|
|
@@ -595,6 +595,15 @@ function extractErrorInfo(error) {
|
|
|
595
595
|
message: String(error)
|
|
596
596
|
};
|
|
597
597
|
}
|
|
598
|
+
class PreparedFixturesDeniedError extends ADCPError {
|
|
599
|
+
constructor(refusalCode) {
|
|
600
|
+
super(`prepared fixture state was refused by the configured authorizer (${refusalCode})`);
|
|
601
|
+
this.refusalCode = refusalCode;
|
|
602
|
+
this.details = { refusal_code: refusalCode };
|
|
603
|
+
}
|
|
604
|
+
refusalCode;
|
|
605
|
+
code = "PREPARED_FIXTURES_DENIED";
|
|
606
|
+
}
|
|
598
607
|
export {
|
|
599
608
|
ADCPError,
|
|
600
609
|
AccountAmbiguousError,
|
|
@@ -617,6 +626,7 @@ export {
|
|
|
617
626
|
InvalidContextError,
|
|
618
627
|
MaxClarificationError,
|
|
619
628
|
MissingInputHandlerError,
|
|
629
|
+
PreparedFixturesDeniedError,
|
|
620
630
|
ProtocolError,
|
|
621
631
|
ProtocolFeatureUnsupportedError,
|
|
622
632
|
ResponseTooLargeError,
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -57,7 +57,7 @@ export * from './handlers/types.mjs';
|
|
|
57
57
|
export type { Storage, AtomicTakeStorage, DeferredTaskStorage, BatchStorage, PatternStorage, AgentCapabilities, ConversationState, DeferredTaskState, StorageConfig, StorageFactory, StorageMiddleware, } from './storage/interfaces.mjs';
|
|
58
58
|
export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from './storage/MemoryStorage.mjs';
|
|
59
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
60
|
-
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors/index.mjs';
|
|
60
|
+
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors/index.mjs';
|
|
61
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors/index.mjs';
|
|
62
62
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPolicyResolvedProperty, ProductPropertyPolicyIdentifier, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy/index.mjs';
|
|
63
63
|
export { ACTIONS_BY_FIELD, LEGACY_COARSE_ACTIONS, STRUCTURED_ONLY_MEDIA_BUY_ACTIONS, UPDATE_FIELDS_BY_ACTION, applyTargetingInput, hasTargetingClears, resolveTargetingInput, canAddPackages, canCancel, canDecreaseBudget, canExtendFlight, canIncreaseBudget, canPause, canReallocateBudget, canRemoveCreative, canRemovePackages, canReplaceCreative, canResume, canShortenFlight, canUpdateCreativeAssignments, canUpdateFlightDates, canUpdateFrequencyCaps, canUpdatePacing, canUpdateTargeting, decomposeUpdateMediaBuy, findAvailableAction, getActionForMutation, getAvailableActions, getRollupParent, ProductPropertyPolicyError, normalizeDomainForPropertyPolicy, preflightUpdateMediaBuy, recoveryForModeMismatch, validateProductsAgainstPropertyPolicy, } from './media-buy/index.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export * from './handlers/types';
|
|
|
57
57
|
export type { Storage, AtomicTakeStorage, DeferredTaskStorage, BatchStorage, PatternStorage, AgentCapabilities, ConversationState, DeferredTaskState, StorageConfig, StorageFactory, StorageMiddleware, } from './storage/interfaces';
|
|
58
58
|
export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from './storage/MemoryStorage';
|
|
59
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
60
|
-
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
60
|
+
MissingInputHandlerError, InvalidContextError, ConfigurationError, AuthenticationCredentialsRejectedError, AuthenticationRequiredError, FeatureUnsupportedError, ProtocolFeatureUnsupportedError, UnsupportedBuyingModeError, AccountRequiredError, AccountPendingApprovalError, AccountAmbiguousError, BuyerSetupError, AccountNotFoundError, AccountSetupRequiredError, AccountPaymentRequiredError, AccountNotProvisionedError, SDK_ERROR_TO_PROTOCOL_ERROR_CODE, VersionUnsupportedError, IdempotencyConflictError, IdempotencyExpiredError, ResponseTooLargeError, ActionNotAllowedError, PreparedFixturesDeniedError, adcpErrorToTypedError, getClientPreflightAdcpError, isADCPError, isErrorOfType, extractErrorInfo, is401Error, mapSdkErrorCodeToProtocolErrorCode, } from './errors';
|
|
61
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors';
|
|
62
62
|
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPolicyResolvedProperty, ProductPropertyPolicyIdentifier, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy';
|
|
63
63
|
export { ACTIONS_BY_FIELD, LEGACY_COARSE_ACTIONS, STRUCTURED_ONLY_MEDIA_BUY_ACTIONS, UPDATE_FIELDS_BY_ACTION, applyTargetingInput, hasTargetingClears, resolveTargetingInput, canAddPackages, canCancel, canDecreaseBudget, canExtendFlight, canIncreaseBudget, canPause, canReallocateBudget, canRemoveCreative, canRemovePackages, canReplaceCreative, canResume, canShortenFlight, canUpdateCreativeAssignments, canUpdateFlightDates, canUpdateFrequencyCaps, canUpdatePacing, canUpdateTargeting, decomposeUpdateMediaBuy, findAvailableAction, getActionForMutation, getAvailableActions, getRollupParent, ProductPropertyPolicyError, normalizeDomainForPropertyPolicy, preflightUpdateMediaBuy, recoveryForModeMismatch, validateProductsAgainstPropertyPolicy, } from './media-buy';
|
package/dist/lib/index.js
CHANGED
|
@@ -153,6 +153,7 @@ __export(index_exports, {
|
|
|
153
153
|
PlacementPresentationReferenceSchema: () => import_schemas.PlacementPresentationReferenceSchema,
|
|
154
154
|
PostgresStateStore: () => import_server.PostgresStateStore,
|
|
155
155
|
PostgresTaskStore: () => import_server.PostgresTaskStore,
|
|
156
|
+
PreparedFixturesDeniedError: () => import_errors.PreparedFixturesDeniedError,
|
|
156
157
|
PreviewFetchError: () => import_substitution.PreviewFetchError,
|
|
157
158
|
ProductCache: () => import_product_cache.ProductCache,
|
|
158
159
|
ProductPropertyPolicyError: () => import_media_buy.ProductPropertyPolicyError,
|
|
@@ -998,6 +999,7 @@ function createAdCPClientFromEnv() {
|
|
|
998
999
|
PlacementPresentationReferenceSchema,
|
|
999
1000
|
PostgresStateStore,
|
|
1000
1001
|
PostgresTaskStore,
|
|
1002
|
+
PreparedFixturesDeniedError,
|
|
1001
1003
|
PreviewFetchError,
|
|
1002
1004
|
ProductCache,
|
|
1003
1005
|
ProductPropertyPolicyError,
|
package/dist/lib/index.mjs
CHANGED
|
@@ -235,6 +235,7 @@ import {
|
|
|
235
235
|
IdempotencyExpiredError,
|
|
236
236
|
ResponseTooLargeError,
|
|
237
237
|
ActionNotAllowedError,
|
|
238
|
+
PreparedFixturesDeniedError,
|
|
238
239
|
adcpErrorToTypedError,
|
|
239
240
|
getClientPreflightAdcpError,
|
|
240
241
|
isADCPError,
|
|
@@ -960,6 +961,7 @@ export {
|
|
|
960
961
|
PlacementPresentationReferenceSchema,
|
|
961
962
|
PostgresStateStore,
|
|
962
963
|
PostgresTaskStore,
|
|
964
|
+
PreparedFixturesDeniedError,
|
|
963
965
|
PreviewFetchError,
|
|
964
966
|
ProductCache,
|
|
965
967
|
ProductPropertyPolicyError,
|
|
@@ -300,6 +300,7 @@ export declare class MediaBuyLifecycleCoordinator {
|
|
|
300
300
|
readonly negotiated_version: string;
|
|
301
301
|
readonly lifecycle: MediaBuyLifecycle;
|
|
302
302
|
readonly tools: ReadonlySet<string>;
|
|
303
|
+
private readonly refinementServedVersion?;
|
|
303
304
|
private readonly allowedLosses;
|
|
304
305
|
private readonly preferredLifecycle;
|
|
305
306
|
private readonly principalScope?;
|
|
@@ -300,6 +300,7 @@ export declare class MediaBuyLifecycleCoordinator {
|
|
|
300
300
|
readonly negotiated_version: string;
|
|
301
301
|
readonly lifecycle: MediaBuyLifecycle;
|
|
302
302
|
readonly tools: ReadonlySet<string>;
|
|
303
|
+
private readonly refinementServedVersion?;
|
|
303
304
|
private readonly allowedLosses;
|
|
304
305
|
private readonly preferredLifecycle;
|
|
305
306
|
private readonly principalScope?;
|
|
@@ -32,10 +32,11 @@ var import_jcs = require('../utils/jcs.js');
|
|
|
32
32
|
var import_error_extraction = require('../utils/error-extraction.js');
|
|
33
33
|
var import_capabilities = require('../utils/capabilities.js');
|
|
34
34
|
var import_tool_request_schemas = require('../utils/tool-request-schemas.js');
|
|
35
|
+
var import_version = require('../negotiation/version.js');
|
|
35
36
|
var import_verification = require('../negotiation/verification.js');
|
|
36
37
|
var import_response_unwrapper = require('../utils/response-unwrapper.js');
|
|
37
38
|
var import_errors = require('../errors/index.js');
|
|
38
|
-
var
|
|
39
|
+
var import_version2 = require('../version.js');
|
|
39
40
|
var import_abort = require('../protocols/abort.js');
|
|
40
41
|
var import_schema_validator = require('../validation/schema-validator.js');
|
|
41
42
|
var import_schema_validator2 = require('../validation/schema-validator.js');
|
|
@@ -755,11 +756,14 @@ function projectRequestProposals(data, lifecycle, negotiatedVersion2) {
|
|
|
755
756
|
Object.defineProperty(projected, PROJECTED_RESPONSE_RAW, { value: source, enumerable: false });
|
|
756
757
|
return projected;
|
|
757
758
|
}
|
|
758
|
-
function projectRefineProposals(data, lifecycle, refinements) {
|
|
759
|
+
function projectRefineProposals(data, lifecycle, refinements, adcpVersion, requestedVersion, servedAdcpVersion, discoveryCeiling) {
|
|
759
760
|
const source = compactWirePayload(data);
|
|
760
761
|
const proposalIds = refinements.map((refinement) => refinement.proposal_id);
|
|
761
762
|
if (lifecycle === "compact") {
|
|
762
|
-
(0, import_verification.assertRefineProposalsResponse)({ refinements }, source
|
|
763
|
+
(0, import_verification.assertRefineProposalsResponse)({ refinements, adcp_version: requestedVersion }, source, {
|
|
764
|
+
adcpVersion,
|
|
765
|
+
servedAdcpVersion: (0, import_version.applicableRefinementServedVersion)(servedAdcpVersion, requestedVersion, discoveryCeiling)
|
|
766
|
+
});
|
|
763
767
|
}
|
|
764
768
|
const base = proposalResponseBase(source);
|
|
765
769
|
const sourceResults = array(source.results);
|
|
@@ -778,10 +782,6 @@ function projectRefineProposals(data, lifecycle, refinements) {
|
|
|
778
782
|
}
|
|
779
783
|
const children = [...array(result.proposals), ...result.proposal === void 0 ? [] : [result.proposal]];
|
|
780
784
|
if (result.outcome === "revised" || result.outcome === "partial" || result.outcome === "finalized") {
|
|
781
|
-
const shape = (0, import_verification.validateRefineProposalsResponseShape)({ results: [result], products: [] });
|
|
782
|
-
if (!shape.ok) {
|
|
783
|
-
throw new TypeError(`refine_proposals result ${index} did not contain complete canonical proposal data.`);
|
|
784
|
-
}
|
|
785
785
|
const expectedStatus = result.outcome === "finalized" ? "committed" : "draft";
|
|
786
786
|
if (children.some((child) => record(child).proposal_status !== expectedStatus)) {
|
|
787
787
|
throw new TypeError(
|
|
@@ -990,6 +990,12 @@ class MediaBuyLifecycleCoordinator {
|
|
|
990
990
|
constructor(agent, capabilities, options) {
|
|
991
991
|
this.agent = agent;
|
|
992
992
|
this.negotiated_version = negotiatedVersion(capabilities, agent.getAdcpVersion());
|
|
993
|
+
if (capabilities._synthetic === false) {
|
|
994
|
+
this.refinementServedVersion = (0, import_version.applicableRefinementServedVersion)(
|
|
995
|
+
capabilities.servedVersion,
|
|
996
|
+
(0, import_version2.toReleasePrecisionVersion)(agent.getWireAdcpVersion())
|
|
997
|
+
);
|
|
998
|
+
}
|
|
993
999
|
this.tools = /* @__PURE__ */ new Set([...capabilities.mediaBuyLifecycleTools ?? [], ...capabilities.discoveredTools ?? []]);
|
|
994
1000
|
this.preferredLifecycle = options.preferredLifecycle ?? "auto";
|
|
995
1001
|
this.allowedLosses = new Set(options.allowedLosses ?? []);
|
|
@@ -1097,6 +1103,7 @@ class MediaBuyLifecycleCoordinator {
|
|
|
1097
1103
|
negotiated_version;
|
|
1098
1104
|
lifecycle;
|
|
1099
1105
|
tools;
|
|
1106
|
+
refinementServedVersion;
|
|
1100
1107
|
allowedLosses;
|
|
1101
1108
|
preferredLifecycle;
|
|
1102
1109
|
principalScope;
|
|
@@ -1938,7 +1945,7 @@ class MediaBuyLifecycleCoordinator {
|
|
|
1938
1945
|
`${operation} requested adcp_major_version ${String(input.adcp_major_version)}, but the negotiated established lane is ${this.negotiated_version}. No request was sent.`
|
|
1939
1946
|
);
|
|
1940
1947
|
}
|
|
1941
|
-
const expectedRelease = (0,
|
|
1948
|
+
const expectedRelease = (0, import_version2.toReleasePrecisionVersion)(this.negotiated_version);
|
|
1942
1949
|
if (input.adcp_version !== void 0 && (compareRelease(this.negotiated_version, "3.1") < 0 || input.adcp_version !== expectedRelease)) {
|
|
1943
1950
|
throw this.unsupported(
|
|
1944
1951
|
operation,
|
|
@@ -6430,7 +6437,15 @@ class MediaBuyLifecycleCoordinator {
|
|
|
6430
6437
|
);
|
|
6431
6438
|
const attemptEpoch2 = pendingRefinement2.attemptEpoch;
|
|
6432
6439
|
const dispatchOptions2 = retry2 ? { ...options, skipIdempotencyAutoInject: retry2.skipIdempotencyAutoInject } : options;
|
|
6433
|
-
const projectOnly2 = (data) => projectRefineProposals(
|
|
6440
|
+
const projectOnly2 = (data) => projectRefineProposals(
|
|
6441
|
+
data,
|
|
6442
|
+
lifecycle,
|
|
6443
|
+
params.refinements,
|
|
6444
|
+
this.agent.getAdcpVersion(),
|
|
6445
|
+
params.adcp_version ?? (0, import_version2.toReleasePrecisionVersion)(this.agent.getWireAdcpVersion()),
|
|
6446
|
+
this.refinementServedVersion,
|
|
6447
|
+
(0, import_version2.toReleasePrecisionVersion)(this.agent.getWireAdcpVersion())
|
|
6448
|
+
);
|
|
6434
6449
|
const projectAndSettle2 = (data) => {
|
|
6435
6450
|
try {
|
|
6436
6451
|
const projected = projectOnly2(data);
|
|
@@ -6608,7 +6623,15 @@ class MediaBuyLifecycleCoordinator {
|
|
|
6608
6623
|
...retry ? { ...options, skipIdempotencyAutoInject: retry.skipIdempotencyAutoInject } : options,
|
|
6609
6624
|
...this.legacyWireTaskOptions()
|
|
6610
6625
|
};
|
|
6611
|
-
const projectOnly = (data) => projectRefineProposals(
|
|
6626
|
+
const projectOnly = (data) => projectRefineProposals(
|
|
6627
|
+
data,
|
|
6628
|
+
lifecycle,
|
|
6629
|
+
params.refinements,
|
|
6630
|
+
this.agent.getAdcpVersion(),
|
|
6631
|
+
params.adcp_version ?? (0, import_version2.toReleasePrecisionVersion)(this.agent.getWireAdcpVersion()),
|
|
6632
|
+
this.refinementServedVersion,
|
|
6633
|
+
(0, import_version2.toReleasePrecisionVersion)(this.agent.getWireAdcpVersion())
|
|
6634
|
+
);
|
|
6612
6635
|
const projectAndSettle = (data) => {
|
|
6613
6636
|
try {
|
|
6614
6637
|
const projected = projectOnly(data);
|
|
@@ -16,12 +16,8 @@ import { canonicalize } from "../utils/jcs.mjs";
|
|
|
16
16
|
import { extractAdcpErrorInfo, extractCorrelationId } from "../utils/error-extraction.mjs";
|
|
17
17
|
import { assertValidIdempotencyReplayTtlSeconds } from "../utils/capabilities.mjs";
|
|
18
18
|
import { TOOL_REQUEST_SCHEMAS } from "../utils/tool-request-schemas.mjs";
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
isStrictDateTime,
|
|
22
|
-
proposalTermsDigest,
|
|
23
|
-
validateRefineProposalsResponseShape
|
|
24
|
-
} from "../negotiation/verification.mjs";
|
|
19
|
+
import { applicableRefinementServedVersion } from "../negotiation/version.mjs";
|
|
20
|
+
import { assertRefineProposalsResponse, isStrictDateTime, proposalTermsDigest } from "../negotiation/verification.mjs";
|
|
25
21
|
import { isAdcpOperationSuccess, isTerminalAdcpError } from "../utils/response-unwrapper.mjs";
|
|
26
22
|
import { ConfigurationError } from "../errors/index.mjs";
|
|
27
23
|
import { toReleasePrecisionVersion } from "../version.mjs";
|
|
@@ -748,11 +744,14 @@ function projectRequestProposals(data, lifecycle, negotiatedVersion2) {
|
|
|
748
744
|
Object.defineProperty(projected, PROJECTED_RESPONSE_RAW, { value: source, enumerable: false });
|
|
749
745
|
return projected;
|
|
750
746
|
}
|
|
751
|
-
function projectRefineProposals(data, lifecycle, refinements) {
|
|
747
|
+
function projectRefineProposals(data, lifecycle, refinements, adcpVersion, requestedVersion, servedAdcpVersion, discoveryCeiling) {
|
|
752
748
|
const source = compactWirePayload(data);
|
|
753
749
|
const proposalIds = refinements.map((refinement) => refinement.proposal_id);
|
|
754
750
|
if (lifecycle === "compact") {
|
|
755
|
-
assertRefineProposalsResponse({ refinements }, source
|
|
751
|
+
assertRefineProposalsResponse({ refinements, adcp_version: requestedVersion }, source, {
|
|
752
|
+
adcpVersion,
|
|
753
|
+
servedAdcpVersion: applicableRefinementServedVersion(servedAdcpVersion, requestedVersion, discoveryCeiling)
|
|
754
|
+
});
|
|
756
755
|
}
|
|
757
756
|
const base = proposalResponseBase(source);
|
|
758
757
|
const sourceResults = array(source.results);
|
|
@@ -771,10 +770,6 @@ function projectRefineProposals(data, lifecycle, refinements) {
|
|
|
771
770
|
}
|
|
772
771
|
const children = [...array(result.proposals), ...result.proposal === void 0 ? [] : [result.proposal]];
|
|
773
772
|
if (result.outcome === "revised" || result.outcome === "partial" || result.outcome === "finalized") {
|
|
774
|
-
const shape = validateRefineProposalsResponseShape({ results: [result], products: [] });
|
|
775
|
-
if (!shape.ok) {
|
|
776
|
-
throw new TypeError(`refine_proposals result ${index} did not contain complete canonical proposal data.`);
|
|
777
|
-
}
|
|
778
773
|
const expectedStatus = result.outcome === "finalized" ? "committed" : "draft";
|
|
779
774
|
if (children.some((child) => record(child).proposal_status !== expectedStatus)) {
|
|
780
775
|
throw new TypeError(
|
|
@@ -983,6 +978,12 @@ class MediaBuyLifecycleCoordinator {
|
|
|
983
978
|
constructor(agent, capabilities, options) {
|
|
984
979
|
this.agent = agent;
|
|
985
980
|
this.negotiated_version = negotiatedVersion(capabilities, agent.getAdcpVersion());
|
|
981
|
+
if (capabilities._synthetic === false) {
|
|
982
|
+
this.refinementServedVersion = applicableRefinementServedVersion(
|
|
983
|
+
capabilities.servedVersion,
|
|
984
|
+
toReleasePrecisionVersion(agent.getWireAdcpVersion())
|
|
985
|
+
);
|
|
986
|
+
}
|
|
986
987
|
this.tools = /* @__PURE__ */ new Set([...capabilities.mediaBuyLifecycleTools ?? [], ...capabilities.discoveredTools ?? []]);
|
|
987
988
|
this.preferredLifecycle = options.preferredLifecycle ?? "auto";
|
|
988
989
|
this.allowedLosses = new Set(options.allowedLosses ?? []);
|
|
@@ -1090,6 +1091,7 @@ class MediaBuyLifecycleCoordinator {
|
|
|
1090
1091
|
negotiated_version;
|
|
1091
1092
|
lifecycle;
|
|
1092
1093
|
tools;
|
|
1094
|
+
refinementServedVersion;
|
|
1093
1095
|
allowedLosses;
|
|
1094
1096
|
preferredLifecycle;
|
|
1095
1097
|
principalScope;
|
|
@@ -6423,7 +6425,15 @@ class MediaBuyLifecycleCoordinator {
|
|
|
6423
6425
|
);
|
|
6424
6426
|
const attemptEpoch2 = pendingRefinement2.attemptEpoch;
|
|
6425
6427
|
const dispatchOptions2 = retry2 ? { ...options, skipIdempotencyAutoInject: retry2.skipIdempotencyAutoInject } : options;
|
|
6426
|
-
const projectOnly2 = (data) => projectRefineProposals(
|
|
6428
|
+
const projectOnly2 = (data) => projectRefineProposals(
|
|
6429
|
+
data,
|
|
6430
|
+
lifecycle,
|
|
6431
|
+
params.refinements,
|
|
6432
|
+
this.agent.getAdcpVersion(),
|
|
6433
|
+
params.adcp_version ?? toReleasePrecisionVersion(this.agent.getWireAdcpVersion()),
|
|
6434
|
+
this.refinementServedVersion,
|
|
6435
|
+
toReleasePrecisionVersion(this.agent.getWireAdcpVersion())
|
|
6436
|
+
);
|
|
6427
6437
|
const projectAndSettle2 = (data) => {
|
|
6428
6438
|
try {
|
|
6429
6439
|
const projected = projectOnly2(data);
|
|
@@ -6601,7 +6611,15 @@ class MediaBuyLifecycleCoordinator {
|
|
|
6601
6611
|
...retry ? { ...options, skipIdempotencyAutoInject: retry.skipIdempotencyAutoInject } : options,
|
|
6602
6612
|
...this.legacyWireTaskOptions()
|
|
6603
6613
|
};
|
|
6604
|
-
const projectOnly = (data) => projectRefineProposals(
|
|
6614
|
+
const projectOnly = (data) => projectRefineProposals(
|
|
6615
|
+
data,
|
|
6616
|
+
lifecycle,
|
|
6617
|
+
params.refinements,
|
|
6618
|
+
this.agent.getAdcpVersion(),
|
|
6619
|
+
params.adcp_version ?? toReleasePrecisionVersion(this.agent.getWireAdcpVersion()),
|
|
6620
|
+
this.refinementServedVersion,
|
|
6621
|
+
toReleasePrecisionVersion(this.agent.getWireAdcpVersion())
|
|
6622
|
+
);
|
|
6605
6623
|
const projectAndSettle = (data) => {
|
|
6606
6624
|
try {
|
|
6607
6625
|
const projected = projectOnly(data);
|
|
@@ -33,9 +33,9 @@ var import_idempotency = require('../utils/idempotency.js');
|
|
|
33
33
|
var import_version = require('../version.js');
|
|
34
34
|
var import_types = require('./types.js');
|
|
35
35
|
var import_verification = require('./verification.js');
|
|
36
|
+
var import_version2 = require('./version.js');
|
|
36
37
|
const MAX_PROPOSAL_REFINEMENTS = 25;
|
|
37
38
|
const MAX_PROPOSAL_ALTERNATIVES = 10;
|
|
38
|
-
const ADCP_32_RELEASE = /^3\.2(?:-[A-Za-z0-9]+(?:[.-][A-Za-z0-9]+)*)?$/;
|
|
39
39
|
function extractProposalRefinementSupport(source) {
|
|
40
40
|
const payload = unwrapCapabilityPayload(source);
|
|
41
41
|
if (!isRecord(payload)) fail("capabilities response must be an object", "capabilities");
|
|
@@ -95,8 +95,11 @@ function refinementDimensions(refinement) {
|
|
|
95
95
|
function validateRefineProposalsRequest(request, capabilities) {
|
|
96
96
|
if (!isRecord(request)) fail("request must be an object");
|
|
97
97
|
assertAllowedKeys(request, REQUEST_KEYS, "request");
|
|
98
|
-
if (
|
|
99
|
-
fail(
|
|
98
|
+
if (!(0, import_version2.isProposalRefinementVersion)(request.adcp_version)) {
|
|
99
|
+
fail(
|
|
100
|
+
`refine_proposals requires a release-precision adcp_version on AdCP 3.2 or 3.3; received ${(0, import_version2.describeRefinementVersion)(request.adcp_version)}`,
|
|
101
|
+
"adcp_version"
|
|
102
|
+
);
|
|
100
103
|
}
|
|
101
104
|
if (request.adcp_major_version !== 3) {
|
|
102
105
|
fail("refine_proposals requires adcp_major_version 3", "adcp_major_version");
|
|
@@ -345,8 +348,11 @@ function validateConstraints(refinement, base) {
|
|
|
345
348
|
}
|
|
346
349
|
function buildRefineProposalsRequest(input, capabilities, defaultAdcpVersion = import_version.ADCP_VERSION) {
|
|
347
350
|
if (!isRecord(input)) fail("request input must be an object");
|
|
348
|
-
if (input.adcp_version !== void 0 && !
|
|
349
|
-
fail(
|
|
351
|
+
if (input.adcp_version !== void 0 && !(0, import_version2.isProposalRefinementVersion)(input.adcp_version)) {
|
|
352
|
+
fail(
|
|
353
|
+
`refine_proposals requires a release-precision adcp_version on AdCP 3.2 or 3.3; received ${(0, import_version2.describeRefinementVersion)(input.adcp_version)}`,
|
|
354
|
+
"adcp_version"
|
|
355
|
+
);
|
|
350
356
|
}
|
|
351
357
|
if (input.adcp_major_version !== void 0 && input.adcp_major_version !== 3) {
|
|
352
358
|
fail("refine_proposals requires adcp_major_version 3", "adcp_major_version");
|
|
@@ -2,9 +2,9 @@ import { generateIdempotencyKey, isValidIdempotencyKey } from "../utils/idempote
|
|
|
2
2
|
import { ADCP_VERSION, toReleasePrecisionVersion } from "../version.mjs";
|
|
3
3
|
import { PROPOSAL_REFINEMENT_DIMENSIONS } from "./types.mjs";
|
|
4
4
|
import { assertRefineProposalsResponse, isStrictDateTime } from "./verification.mjs";
|
|
5
|
+
import { describeRefinementVersion, isProposalRefinementVersion } from "./version.mjs";
|
|
5
6
|
const MAX_PROPOSAL_REFINEMENTS = 25;
|
|
6
7
|
const MAX_PROPOSAL_ALTERNATIVES = 10;
|
|
7
|
-
const ADCP_32_RELEASE = /^3\.2(?:-[A-Za-z0-9]+(?:[.-][A-Za-z0-9]+)*)?$/;
|
|
8
8
|
function extractProposalRefinementSupport(source) {
|
|
9
9
|
const payload = unwrapCapabilityPayload(source);
|
|
10
10
|
if (!isRecord(payload)) fail("capabilities response must be an object", "capabilities");
|
|
@@ -64,8 +64,11 @@ function refinementDimensions(refinement) {
|
|
|
64
64
|
function validateRefineProposalsRequest(request, capabilities) {
|
|
65
65
|
if (!isRecord(request)) fail("request must be an object");
|
|
66
66
|
assertAllowedKeys(request, REQUEST_KEYS, "request");
|
|
67
|
-
if (
|
|
68
|
-
fail(
|
|
67
|
+
if (!isProposalRefinementVersion(request.adcp_version)) {
|
|
68
|
+
fail(
|
|
69
|
+
`refine_proposals requires a release-precision adcp_version on AdCP 3.2 or 3.3; received ${describeRefinementVersion(request.adcp_version)}`,
|
|
70
|
+
"adcp_version"
|
|
71
|
+
);
|
|
69
72
|
}
|
|
70
73
|
if (request.adcp_major_version !== 3) {
|
|
71
74
|
fail("refine_proposals requires adcp_major_version 3", "adcp_major_version");
|
|
@@ -314,8 +317,11 @@ function validateConstraints(refinement, base) {
|
|
|
314
317
|
}
|
|
315
318
|
function buildRefineProposalsRequest(input, capabilities, defaultAdcpVersion = ADCP_VERSION) {
|
|
316
319
|
if (!isRecord(input)) fail("request input must be an object");
|
|
317
|
-
if (input.adcp_version !== void 0 && !
|
|
318
|
-
fail(
|
|
320
|
+
if (input.adcp_version !== void 0 && !isProposalRefinementVersion(input.adcp_version)) {
|
|
321
|
+
fail(
|
|
322
|
+
`refine_proposals requires a release-precision adcp_version on AdCP 3.2 or 3.3; received ${describeRefinementVersion(input.adcp_version)}`,
|
|
323
|
+
"adcp_version"
|
|
324
|
+
);
|
|
319
325
|
}
|
|
320
326
|
if (input.adcp_major_version !== void 0 && input.adcp_major_version !== 3) {
|
|
321
327
|
fail("refine_proposals requires adcp_major_version 3", "adcp_major_version");
|
|
@@ -85,6 +85,8 @@ export interface FinalizeProposalRefinement {
|
|
|
85
85
|
}
|
|
86
86
|
export type ProposalRefinement = ReviseProposalRefinement | FinalizeProposalRefinement;
|
|
87
87
|
export type Adcp32Version = '3.2' | `3.2-${string}`;
|
|
88
|
+
/** Supported proposal-refinement release pins; patches belong to schema pins. */
|
|
89
|
+
export type ProposalRefinementVersion = Adcp32Version | '3.3' | `3.3-${string}`;
|
|
88
90
|
export interface RefineProposalsRequest {
|
|
89
91
|
idempotency_key: string;
|
|
90
92
|
refinements: ProposalRefinement[];
|
|
@@ -92,12 +94,12 @@ export interface RefineProposalsRequest {
|
|
|
92
94
|
context?: Record<string, unknown>;
|
|
93
95
|
governance_context?: string;
|
|
94
96
|
push_notification_config?: Record<string, unknown>;
|
|
95
|
-
adcp_version:
|
|
97
|
+
adcp_version: ProposalRefinementVersion;
|
|
96
98
|
adcp_major_version: 3;
|
|
97
99
|
}
|
|
98
100
|
export type RefineProposalsInput = Omit<RefineProposalsRequest, 'idempotency_key' | 'adcp_version' | 'adcp_major_version'> & {
|
|
99
101
|
idempotency_key?: string;
|
|
100
|
-
adcp_version?:
|
|
102
|
+
adcp_version?: ProposalRefinementVersion;
|
|
101
103
|
adcp_major_version?: 3;
|
|
102
104
|
};
|
|
103
105
|
export interface ProposalResolvedPricing {
|
|
@@ -85,6 +85,8 @@ export interface FinalizeProposalRefinement {
|
|
|
85
85
|
}
|
|
86
86
|
export type ProposalRefinement = ReviseProposalRefinement | FinalizeProposalRefinement;
|
|
87
87
|
export type Adcp32Version = '3.2' | `3.2-${string}`;
|
|
88
|
+
/** Supported proposal-refinement release pins; patches belong to schema pins. */
|
|
89
|
+
export type ProposalRefinementVersion = Adcp32Version | '3.3' | `3.3-${string}`;
|
|
88
90
|
export interface RefineProposalsRequest {
|
|
89
91
|
idempotency_key: string;
|
|
90
92
|
refinements: ProposalRefinement[];
|
|
@@ -92,12 +94,12 @@ export interface RefineProposalsRequest {
|
|
|
92
94
|
context?: Record<string, unknown>;
|
|
93
95
|
governance_context?: string;
|
|
94
96
|
push_notification_config?: Record<string, unknown>;
|
|
95
|
-
adcp_version:
|
|
97
|
+
adcp_version: ProposalRefinementVersion;
|
|
96
98
|
adcp_major_version: 3;
|
|
97
99
|
}
|
|
98
100
|
export type RefineProposalsInput = Omit<RefineProposalsRequest, 'idempotency_key' | 'adcp_version' | 'adcp_major_version'> & {
|
|
99
101
|
idempotency_key?: string;
|
|
100
|
-
adcp_version?:
|
|
102
|
+
adcp_version?: ProposalRefinementVersion;
|
|
101
103
|
adcp_major_version?: 3;
|
|
102
104
|
};
|
|
103
105
|
export interface ProposalResolvedPricing {
|
|
@@ -38,13 +38,22 @@ export declare function verifyProposalCommercialTerms(proposal: unknown, expecte
|
|
|
38
38
|
export declare function assertProposalCommercialTerms(proposal: unknown, expectedCommercialTerms: unknown, options?: VerifyProposalCommercialTermsOptions): void;
|
|
39
39
|
/** Strict RFC 3339 date-time accepted by the AdCP `format: date-time` contract. */
|
|
40
40
|
export declare function isStrictDateTime(value: unknown): value is string;
|
|
41
|
-
export declare function verifyRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'
|
|
41
|
+
export declare function verifyRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'> & Partial<Pick<RefineProposalsRequest, 'adcp_version'>>, response: unknown, options?: {
|
|
42
42
|
now?: Date;
|
|
43
|
+
adcpVersion?: string;
|
|
44
|
+
servedAdcpVersion?: string;
|
|
43
45
|
}): ProposalVerificationResult;
|
|
44
|
-
export declare function assertRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'
|
|
46
|
+
export declare function assertRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'> & Partial<Pick<RefineProposalsRequest, 'adcp_version'>>, response: unknown, options?: {
|
|
45
47
|
now?: Date;
|
|
48
|
+
adcpVersion?: string;
|
|
49
|
+
servedAdcpVersion?: string;
|
|
46
50
|
}): asserts response is RefineProposalsCompletedResponse;
|
|
47
|
-
/** Validate
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
/** Validate a completed or compact-submitted wire shape using the selected bundle.
|
|
52
|
+
* Pass adcpVersion when validating a negotiated contract other than the SDK pin. */
|
|
53
|
+
export declare function validateRefineProposalsResponseShape(response: unknown, options?: {
|
|
54
|
+
adcpVersion?: string;
|
|
55
|
+
}): ProposalVerificationResult;
|
|
56
|
+
/** Assert a selected completed or compact-submitted wire shape without source semantics. */
|
|
57
|
+
export declare function assertRefineProposalsResponseShape(response: unknown, options?: {
|
|
58
|
+
adcpVersion?: string;
|
|
59
|
+
}): asserts response is RefineProposalsResponse;
|
|
@@ -38,13 +38,22 @@ export declare function verifyProposalCommercialTerms(proposal: unknown, expecte
|
|
|
38
38
|
export declare function assertProposalCommercialTerms(proposal: unknown, expectedCommercialTerms: unknown, options?: VerifyProposalCommercialTermsOptions): void;
|
|
39
39
|
/** Strict RFC 3339 date-time accepted by the AdCP `format: date-time` contract. */
|
|
40
40
|
export declare function isStrictDateTime(value: unknown): value is string;
|
|
41
|
-
export declare function verifyRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'
|
|
41
|
+
export declare function verifyRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'> & Partial<Pick<RefineProposalsRequest, 'adcp_version'>>, response: unknown, options?: {
|
|
42
42
|
now?: Date;
|
|
43
|
+
adcpVersion?: string;
|
|
44
|
+
servedAdcpVersion?: string;
|
|
43
45
|
}): ProposalVerificationResult;
|
|
44
|
-
export declare function assertRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'
|
|
46
|
+
export declare function assertRefineProposalsResponse(request: Pick<RefineProposalsRequest, 'refinements'> & Partial<Pick<RefineProposalsRequest, 'adcp_version'>>, response: unknown, options?: {
|
|
45
47
|
now?: Date;
|
|
48
|
+
adcpVersion?: string;
|
|
49
|
+
servedAdcpVersion?: string;
|
|
46
50
|
}): asserts response is RefineProposalsCompletedResponse;
|
|
47
|
-
/** Validate
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
/** Validate a completed or compact-submitted wire shape using the selected bundle.
|
|
52
|
+
* Pass adcpVersion when validating a negotiated contract other than the SDK pin. */
|
|
53
|
+
export declare function validateRefineProposalsResponseShape(response: unknown, options?: {
|
|
54
|
+
adcpVersion?: string;
|
|
55
|
+
}): ProposalVerificationResult;
|
|
56
|
+
/** Assert a selected completed or compact-submitted wire shape without source semantics. */
|
|
57
|
+
export declare function assertRefineProposalsResponseShape(response: unknown, options?: {
|
|
58
|
+
adcpVersion?: string;
|
|
59
|
+
}): asserts response is RefineProposalsResponse;
|