@adcp/sdk 16.0.0-beta.7 → 16.0.0-beta.9
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 +3 -3
- package/README.md +20 -0
- package/bin/adcp.js +10 -13
- package/dist/lib/conformance/index.d.mts +2 -0
- package/dist/lib/conformance/index.d.ts +2 -0
- package/dist/lib/conformance/index.js +3 -0
- package/dist/lib/conformance/index.mjs +2 -0
- package/dist/lib/conformance/property-lists.d.mts +14 -0
- package/dist/lib/conformance/property-lists.d.ts +14 -0
- package/dist/lib/conformance/property-lists.js +45 -0
- package/dist/lib/conformance/property-lists.mjs +21 -0
- package/dist/lib/conformance/runConformance.js +20 -1
- package/dist/lib/conformance/runConformance.mjs +20 -1
- package/dist/lib/conformance/types.d.mts +3 -0
- package/dist/lib/conformance/types.d.ts +3 -0
- package/dist/lib/core/AgentClient.d.mts +8 -5
- package/dist/lib/core/AgentClient.d.ts +8 -5
- package/dist/lib/core/AgentClient.js +9 -4
- package/dist/lib/core/AgentClient.mjs +9 -4
- package/dist/lib/core/SingleAgentClient.d.mts +32 -115
- package/dist/lib/core/SingleAgentClient.d.ts +32 -115
- package/dist/lib/core/SingleAgentClient.js +379 -273
- package/dist/lib/core/SingleAgentClient.mjs +387 -275
- package/dist/lib/core/TaskExecutor.d.mts +1 -16
- package/dist/lib/core/TaskExecutor.d.ts +1 -16
- package/dist/lib/core/TaskExecutor.js +34 -51
- package/dist/lib/core/TaskExecutor.mjs +12 -29
- package/dist/lib/core/product-cache.d.mts +3 -1
- package/dist/lib/core/product-cache.d.ts +3 -1
- package/dist/lib/core/product-cache.js +2 -1
- package/dist/lib/core/product-cache.mjs +2 -1
- package/dist/lib/errors/index.d.mts +2 -8
- package/dist/lib/errors/index.d.ts +2 -8
- package/dist/lib/errors/index.js +4 -4
- package/dist/lib/errors/index.mjs +4 -4
- package/dist/lib/identifiers.d.mts +53 -0
- package/dist/lib/identifiers.d.ts +53 -0
- package/dist/lib/identifiers.js +212 -0
- package/dist/lib/identifiers.mjs +163 -0
- package/dist/lib/index.d.mts +7 -5
- package/dist/lib/index.d.ts +7 -5
- package/dist/lib/index.js +2 -14
- package/dist/lib/index.mjs +1 -14
- package/dist/lib/media-buy/compatibility.d.mts +1 -1
- package/dist/lib/media-buy/compatibility.d.ts +1 -1
- package/dist/lib/media-buy/compatibility.js +26 -45
- package/dist/lib/media-buy/compatibility.mjs +26 -45
- package/dist/lib/media-buy/index.d.mts +1 -1
- package/dist/lib/media-buy/index.d.ts +1 -1
- package/dist/lib/media-buy/legacy-purchase-continuation.d.mts +2 -2
- package/dist/lib/media-buy/legacy-purchase-continuation.d.ts +2 -2
- package/dist/lib/media-buy/property-policy.d.mts +15 -1
- package/dist/lib/media-buy/property-policy.d.ts +15 -1
- package/dist/lib/media-buy/property-policy.js +135 -3
- package/dist/lib/media-buy/property-policy.mjs +134 -3
- package/dist/lib/protocols/index.js +14 -22
- package/dist/lib/protocols/index.mjs +5 -13
- package/dist/lib/registry/index.d.mts +12 -0
- package/dist/lib/registry/index.d.ts +12 -0
- package/dist/lib/registry/index.js +159 -5
- package/dist/lib/registry/index.mjs +156 -4
- package/dist/lib/registry/types.d.mts +26 -2
- package/dist/lib/registry/types.d.ts +26 -2
- package/dist/lib/registry/types.generated.d.mts +51 -11
- package/dist/lib/registry/types.generated.d.ts +51 -11
- package/dist/lib/reporting/source/conformance.d.mts +8 -8
- package/dist/lib/reporting/source/conformance.d.ts +8 -8
- package/dist/lib/reporting/source/manifest.d.mts +27 -27
- package/dist/lib/reporting/source/manifest.d.ts +27 -27
- package/dist/lib/server/create-adcp-server.js +6 -0
- package/dist/lib/server/create-adcp-server.mjs +6 -0
- package/dist/lib/server/decisioning/specialisms/lists.d.mts +4 -4
- package/dist/lib/server/decisioning/specialisms/lists.d.ts +4 -4
- package/dist/lib/server/index.d.mts +3 -0
- package/dist/lib/server/index.d.ts +3 -0
- package/dist/lib/server/index.js +8 -1
- package/dist/lib/server/index.mjs +4 -0
- package/dist/lib/server/property-lists.d.mts +36 -0
- package/dist/lib/server/property-lists.d.ts +36 -0
- package/dist/lib/server/property-lists.js +154 -0
- package/dist/lib/server/property-lists.mjs +129 -0
- package/dist/lib/server/targeting-helpers.d.mts +2 -0
- package/dist/lib/server/targeting-helpers.d.ts +2 -0
- package/dist/lib/server/targeting-helpers.js +28 -1
- package/dist/lib/server/targeting-helpers.mjs +18 -1
- package/dist/lib/signing/parser.js +2 -2
- package/dist/lib/signing/parser.mjs +2 -2
- package/dist/lib/signing/server.d.mts +1 -1
- package/dist/lib/signing/server.d.ts +1 -1
- package/dist/lib/signing/server.mjs +5 -1
- package/dist/lib/signing/webhook-verifier.d.mts +11 -0
- package/dist/lib/signing/webhook-verifier.d.ts +11 -0
- package/dist/lib/signing/webhook-verifier.js +11 -3
- package/dist/lib/signing/webhook-verifier.mjs +11 -3
- package/dist/lib/supply-path/verify.js +12 -2
- package/dist/lib/supply-path/verify.mjs +2 -2
- package/dist/lib/testing/compliance/comply.js +0 -8
- package/dist/lib/testing/compliance/comply.mjs +0 -8
- package/dist/lib/testing/compliance/storyboard-tracks.js +11 -0
- package/dist/lib/testing/compliance/storyboard-tracks.mjs +11 -0
- package/dist/lib/testing/index.d.mts +2 -0
- package/dist/lib/testing/index.d.ts +2 -0
- package/dist/lib/testing/index.js +5 -0
- package/dist/lib/testing/index.mjs +3 -0
- package/dist/lib/testing/scenarios/capabilities.d.mts +2 -2
- package/dist/lib/testing/scenarios/capabilities.d.ts +2 -2
- package/dist/lib/testing/scenarios/capabilities.js +8 -41
- package/dist/lib/testing/scenarios/capabilities.mjs +9 -42
- package/dist/lib/testing/storyboard/creative-build-probe.d.mts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.d.ts +34 -0
- package/dist/lib/testing/storyboard/creative-build-probe.js +395 -0
- package/dist/lib/testing/storyboard/creative-build-probe.mjs +373 -0
- package/dist/lib/testing/storyboard/index.d.mts +2 -0
- package/dist/lib/testing/storyboard/index.d.ts +2 -0
- package/dist/lib/testing/storyboard/index.js +5 -0
- package/dist/lib/testing/storyboard/index.mjs +3 -0
- package/dist/lib/testing/storyboard/loader.js +12 -0
- package/dist/lib/testing/storyboard/loader.mjs +12 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.mts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.d.ts +15 -0
- package/dist/lib/testing/storyboard/property-list-reference.js +514 -0
- package/dist/lib/testing/storyboard/property-list-reference.mjs +487 -0
- package/dist/lib/testing/storyboard/runner.js +318 -58
- package/dist/lib/testing/storyboard/runner.mjs +322 -58
- package/dist/lib/testing/storyboard/types.d.mts +38 -16
- package/dist/lib/testing/storyboard/types.d.ts +38 -16
- package/dist/lib/testing/storyboard/types.js +1 -0
- package/dist/lib/testing/storyboard/types.mjs +1 -0
- 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 +64 -0
- package/dist/lib/testing/storyboard/validations.mjs +67 -1
- package/dist/lib/testing/types.d.mts +15 -1
- package/dist/lib/testing/types.d.ts +15 -1
- package/dist/lib/types/schemas.generated.d.ts +65 -65
- package/dist/lib/types/wellknown-schemas.generated.d.mts +21 -21
- package/dist/lib/types/wellknown-schemas.generated.d.ts +21 -21
- package/dist/lib/utils/adcp-version-config.js +6 -0
- package/dist/lib/utils/adcp-version-config.mjs +6 -0
- package/dist/lib/utils/capabilities.d.mts +7 -9
- package/dist/lib/utils/capabilities.d.ts +7 -9
- package/dist/lib/utils/capabilities.js +14 -28
- package/dist/lib/utils/capabilities.mjs +14 -27
- package/dist/lib/utils/creative-adapter.d.mts +15 -113
- package/dist/lib/utils/creative-adapter.d.ts +15 -113
- package/dist/lib/utils/creative-adapter.js +7 -106
- package/dist/lib/utils/creative-adapter.mjs +7 -102
- package/dist/lib/utils/format-renders.d.mts +20 -80
- package/dist/lib/utils/format-renders.d.ts +20 -80
- package/dist/lib/utils/format-renders.js +7 -67
- package/dist/lib/utils/format-renders.mjs +7 -66
- package/dist/lib/utils/index.d.mts +1 -2
- package/dist/lib/utils/index.d.ts +1 -2
- package/dist/lib/utils/index.js +0 -7
- package/dist/lib/utils/index.mjs +0 -6
- package/dist/lib/utils/preview-normalizer.d.mts +31 -80
- package/dist/lib/utils/preview-normalizer.d.ts +31 -80
- package/dist/lib/utils/preview-normalizer.js +5 -50
- package/dist/lib/utils/preview-normalizer.mjs +5 -49
- package/dist/lib/utils/pricing-adapter.d.mts +2 -36
- package/dist/lib/utils/pricing-adapter.d.ts +2 -36
- package/dist/lib/utils/pricing-adapter.js +0 -105
- package/dist/lib/utils/pricing-adapter.mjs +0 -100
- package/dist/lib/utils/request-normalizer.d.mts +1 -2
- package/dist/lib/utils/request-normalizer.d.ts +1 -2
- package/dist/lib/v2/projection/creative-delivery.d.mts +2 -0
- package/dist/lib/v2/projection/creative-delivery.d.ts +2 -0
- package/dist/lib/v2/projection/creative-delivery.js +7 -0
- package/dist/lib/v2/projection/creative-delivery.mjs +6 -0
- package/dist/lib/v2/projection/legacy-metadata.d.mts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.d.ts +12 -0
- package/dist/lib/v2/projection/legacy-metadata.js +41 -1
- package/dist/lib/v2/projection/legacy-metadata.mjs +37 -1
- package/dist/lib/v2/projection/legacy-normalization.d.mts +1 -1
- package/dist/lib/v2/projection/legacy-normalization.d.ts +1 -1
- package/dist/lib/v2/projection/v1-to-v2.js +13 -0
- package/dist/lib/v2/projection/v1-to-v2.mjs +14 -0
- package/dist/lib/validation/client-hooks.d.mts +1 -4
- package/dist/lib/validation/client-hooks.d.ts +1 -4
- package/dist/lib/validation/get-products-request.d.mts +1 -1
- package/dist/lib/validation/get-products-request.d.ts +1 -1
- package/dist/lib/validation/schema-loader.js +6 -0
- package/dist/lib/validation/schema-loader.mjs +6 -0
- package/dist/lib/validation/schema-validator.js +1 -26
- package/dist/lib/validation/schema-validator.mjs +1 -26
- package/dist/lib/version.d.mts +5 -5
- package/dist/lib/version.d.ts +5 -5
- package/dist/lib/version.js +3 -5
- package/dist/lib/version.mjs +3 -5
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/development/PROTOCOL_DIFFERENCES.md +1 -1
- package/docs/guides/CONFORMANCE.md +25 -0
- package/docs/guides/CREATIVE-BUILD-PROBE.md +156 -0
- package/docs/guides/CREATIVE-DELIVERY.md +45 -6
- package/docs/guides/MEDIA-BUY-3.2-COMPATIBILITY.md +15 -18
- package/docs/guides/PROPERTY-LISTS.md +264 -0
- package/docs/guides/SIGNING-GUIDE.md +25 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +5 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-13-to-14.md +20 -16
- package/docs/migration-14.x-rc-worksheet.md +5 -5
- package/docs/migration-4.x-to-5.x.md +12 -7
- package/docs/migration-drop-adcp-2.md +25 -0
- package/package.json +3 -18
- package/skills/call-adcp-agent/SKILL.md +23 -25
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/create_media_buy.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/get_products.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/get_products.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/get_products.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/index.d.mts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.d.ts +0 -34
- package/dist/lib/adapters/legacy/v2-5/index.js +0 -50
- package/dist/lib/adapters/legacy/v2-5/index.mjs +0 -25
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.mts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.d.ts +0 -8
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/list_creative_formats.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/preview_creative.js +0 -33
- package/dist/lib/adapters/legacy/v2-5/preview_creative.mjs +0 -9
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.mts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.d.ts +0 -11
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.js +0 -32
- package/dist/lib/adapters/legacy/v2-5/sync_creatives.mjs +0 -8
- package/dist/lib/adapters/legacy/v2-5/types.d.mts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.d.ts +0 -39
- package/dist/lib/adapters/legacy/v2-5/types.js +0 -16
- package/dist/lib/adapters/legacy/v2-5/types.mjs +0 -0
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.mts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.d.ts +0 -3
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.js +0 -35
- package/dist/lib/adapters/legacy/v2-5/update_media_buy.mjs +0 -11
- package/dist/lib/schemas-data/v2.5/_provenance.json +0 -8
- package/dist/lib/schemas-data/v2.5/adagents.json +0 -494
- package/dist/lib/schemas-data/v2.5/core/activation-key.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/assets/audio-asset.json +0 -32
- package/dist/lib/schemas-data/v2.5/core/assets/css-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/daast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/html-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/image-asset.json +0 -38
- package/dist/lib/schemas-data/v2.5/core/assets/javascript-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/markdown-asset.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/assets/text-asset.json +0 -21
- package/dist/lib/schemas-data/v2.5/core/assets/url-asset.json +0 -26
- package/dist/lib/schemas-data/v2.5/core/assets/vast-asset.json +0 -87
- package/dist/lib/schemas-data/v2.5/core/assets/video-asset.json +0 -44
- package/dist/lib/schemas-data/v2.5/core/assets/webhook-asset.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/async-response-data.json +0 -88
- package/dist/lib/schemas-data/v2.5/core/brand-manifest-ref.json +0 -33
- package/dist/lib/schemas-data/v2.5/core/brand-manifest.json +0 -409
- package/dist/lib/schemas-data/v2.5/core/context.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/creative-asset.json +0 -125
- package/dist/lib/schemas-data/v2.5/core/creative-assignment.json +0 -31
- package/dist/lib/schemas-data/v2.5/core/creative-filters.json +0 -111
- package/dist/lib/schemas-data/v2.5/core/creative-manifest.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/creative-policy.json +0 -27
- package/dist/lib/schemas-data/v2.5/core/delivery-metrics.json +0 -171
- package/dist/lib/schemas-data/v2.5/core/deployment.json +0 -93
- package/dist/lib/schemas-data/v2.5/core/destination.json +0 -53
- package/dist/lib/schemas-data/v2.5/core/error.json +0 -40
- package/dist/lib/schemas-data/v2.5/core/ext.json +0 -8
- package/dist/lib/schemas-data/v2.5/core/format-id.json +0 -47
- package/dist/lib/schemas-data/v2.5/core/format.json +0 -324
- package/dist/lib/schemas-data/v2.5/core/frequency-cap.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/mcp-webhook-payload.json +0 -152
- package/dist/lib/schemas-data/v2.5/core/measurement.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/media-buy.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/package.json +0 -72
- package/dist/lib/schemas-data/v2.5/core/performance-feedback.json +0 -90
- package/dist/lib/schemas-data/v2.5/core/placement.json +0 -34
- package/dist/lib/schemas-data/v2.5/core/pricing-option.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/product-filters.json +0 -102
- package/dist/lib/schemas-data/v2.5/core/product.json +0 -153
- package/dist/lib/schemas-data/v2.5/core/promoted-offerings.json +0 -115
- package/dist/lib/schemas-data/v2.5/core/promoted-products.json +0 -67
- package/dist/lib/schemas-data/v2.5/core/property-id.json +0 -14
- package/dist/lib/schemas-data/v2.5/core/property-tag.json +0 -16
- package/dist/lib/schemas-data/v2.5/core/property.json +0 -62
- package/dist/lib/schemas-data/v2.5/core/protocol-envelope.json +0 -146
- package/dist/lib/schemas-data/v2.5/core/publisher-property-selector.json +0 -92
- package/dist/lib/schemas-data/v2.5/core/push-notification-config.json +0 -48
- package/dist/lib/schemas-data/v2.5/core/reporting-capabilities.json +0 -71
- package/dist/lib/schemas-data/v2.5/core/response.json +0 -24
- package/dist/lib/schemas-data/v2.5/core/signal-filters.json +0 -35
- package/dist/lib/schemas-data/v2.5/core/start-timing.json +0 -18
- package/dist/lib/schemas-data/v2.5/core/sub-asset.json +0 -79
- package/dist/lib/schemas-data/v2.5/core/targeting.json +0 -50
- package/dist/lib/schemas-data/v2.5/core/tasks-get-request.json +0 -43
- package/dist/lib/schemas-data/v2.5/core/tasks-get-response.json +0 -166
- package/dist/lib/schemas-data/v2.5/core/tasks-list-request.json +0 -192
- package/dist/lib/schemas-data/v2.5/core/tasks-list-response.json +0 -183
- package/dist/lib/schemas-data/v2.5/creative/asset-types/index.json +0 -101
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-request.json +0 -73
- package/dist/lib/schemas-data/v2.5/creative/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-request.json +0 -164
- package/dist/lib/schemas-data/v2.5/creative/preview-creative-response.json +0 -245
- package/dist/lib/schemas-data/v2.5/creative/preview-render.json +0 -225
- package/dist/lib/schemas-data/v2.5/enums/adcp-domain.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/asset-content-type.json +0 -22
- package/dist/lib/schemas-data/v2.5/enums/auth-scheme.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/available-metric.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/channels.json +0 -18
- package/dist/lib/schemas-data/v2.5/enums/co-branding-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/creative-action.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/creative-agent-capability.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/creative-sort-field.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/creative-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/daast-tracking-event.json +0 -20
- package/dist/lib/schemas-data/v2.5/enums/daast-version.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/delivery-type.json +0 -15
- package/dist/lib/schemas-data/v2.5/enums/dimension-unit.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/feed-format.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/feedback-source.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/format-category.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/format-id-parameter.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/frequency-cap-scope.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/history-entry-type.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/http-method.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/identifier-types.json +0 -34
- package/dist/lib/schemas-data/v2.5/enums/javascript-module-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/landing-page-requirement.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/markdown-flavor.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/media-buy-status.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/metric-type.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/notification-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/pacing.json +0 -17
- package/dist/lib/schemas-data/v2.5/enums/preview-output-format.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/pricing-model.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/property-type.json +0 -16
- package/dist/lib/schemas-data/v2.5/enums/publisher-identifier-types.json +0 -19
- package/dist/lib/schemas-data/v2.5/enums/reporting-frequency.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/signal-catalog-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/sort-direction.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/standard-format-ids.json +0 -103
- package/dist/lib/schemas-data/v2.5/enums/task-status.json +0 -29
- package/dist/lib/schemas-data/v2.5/enums/task-type.json +0 -27
- package/dist/lib/schemas-data/v2.5/enums/update-frequency.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/url-asset-type.json +0 -12
- package/dist/lib/schemas-data/v2.5/enums/validation-mode.json +0 -11
- package/dist/lib/schemas-data/v2.5/enums/vast-tracking-event.json +0 -25
- package/dist/lib/schemas-data/v2.5/enums/vast-version.json +0 -14
- package/dist/lib/schemas-data/v2.5/enums/webhook-response-type.json +0 -13
- package/dist/lib/schemas-data/v2.5/enums/webhook-security-method.json +0 -12
- package/dist/lib/schemas-data/v2.5/index.json +0 -604
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-request.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/build-creative-response.json +0 -65
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-input-required.json +0 -31
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-request.json +0 -126
- package/dist/lib/schemas-data/v2.5/media-buy/create-media-buy-response.json +0 -97
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-request.json +0 -54
- package/dist/lib/schemas-data/v2.5/media-buy/get-media-buy-delivery-response.json +0 -285
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-input-required.json +0 -38
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-submitted.json +0 -21
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-async-response-working.json +0 -34
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-request.json +0 -28
- package/dist/lib/schemas-data/v2.5/media-buy/get-products-response.json +0 -33
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-request.json +0 -26
- package/dist/lib/schemas-data/v2.5/media-buy/list-authorized-properties-response.json +0 -70
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-request.json +0 -58
- package/dist/lib/schemas-data/v2.5/media-buy/list-creative-formats-response.json +0 -61
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-request.json +0 -137
- package/dist/lib/schemas-data/v2.5/media-buy/list-creatives-response.json +0 -437
- package/dist/lib/schemas-data/v2.5/media-buy/package-request.json +0 -80
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-request.json +0 -88
- package/dist/lib/schemas-data/v2.5/media-buy/provide-performance-feedback-response.json +0 -66
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-input-required.json +0 -25
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-async-response-working.json +0 -46
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-request.json +0 -178
- package/dist/lib/schemas-data/v2.5/media-buy/sync-creatives-response.json +0 -149
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-input-required.json +0 -24
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-submitted.json +0 -16
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-async-response-working.json +0 -36
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-request.json +0 -129
- package/dist/lib/schemas-data/v2.5/media-buy/update-media-buy-response.json +0 -99
- package/dist/lib/schemas-data/v2.5/pricing-options/cpc-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpcv-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/cpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/pricing-options/cpp-option.json +0 -73
- package/dist/lib/schemas-data/v2.5/pricing-options/cpv-option.json +0 -88
- package/dist/lib/schemas-data/v2.5/pricing-options/flat-rate-option.json +0 -93
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-auction-option.json +0 -81
- package/dist/lib/schemas-data/v2.5/pricing-options/vcpm-fixed-option.json +0 -52
- package/dist/lib/schemas-data/v2.5/protocols/adcp-extension.json +0 -33
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-request.json +0 -32
- package/dist/lib/schemas-data/v2.5/signals/activate-signal-response.json +0 -68
- package/dist/lib/schemas-data/v2.5/signals/get-signals-request.json +0 -59
- package/dist/lib/schemas-data/v2.5/signals/get-signals-response.json +0 -100
- package/dist/lib/types/v2-5/index.d.mts +0 -1
- package/dist/lib/types/v2-5/index.d.ts +0 -1
- package/dist/lib/types/v2-5/index.js +0 -22
- package/dist/lib/types/v2-5/index.mjs +0 -1
- package/dist/lib/types/v2-5/tools.generated.d.mts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.d.ts +0 -3568
- package/dist/lib/types/v2-5/tools.generated.js +0 -16
- package/dist/lib/types/v2-5/tools.generated.mjs +0 -0
- package/dist/lib/utils/sync-creatives-adapter.d.mts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.d.ts +0 -33
- package/dist/lib/utils/sync-creatives-adapter.js +0 -83
- package/dist/lib/utils/sync-creatives-adapter.mjs +0 -59
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { PropertyIdentifierTypes } from './types/core.generated.mjs';
|
|
2
|
+
export type IdentifierValidationErrorCode = 'invalid_identifier' | 'unsupported_identifier_type' | 'invalid_publisher_domain';
|
|
3
|
+
export declare class IdentifierValidationError extends TypeError {
|
|
4
|
+
readonly code: IdentifierValidationErrorCode;
|
|
5
|
+
readonly identifierType: string;
|
|
6
|
+
readonly name = "IdentifierValidationError";
|
|
7
|
+
constructor(code: IdentifierValidationErrorCode, identifierType: string, message: string);
|
|
8
|
+
}
|
|
9
|
+
export interface IdentifierRewrite {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
}
|
|
13
|
+
export type IdentifierValidationResult = {
|
|
14
|
+
ok: true;
|
|
15
|
+
value: string;
|
|
16
|
+
rewrite?: IdentifierRewrite;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
error: IdentifierValidationError;
|
|
20
|
+
};
|
|
21
|
+
/** Validate a registration hostname as supplied. This deliberately does not repair URLs or wildcards. */
|
|
22
|
+
export declare function validatePublisherDomain(value: string): IdentifierValidationResult;
|
|
23
|
+
export declare const normalizeDomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
24
|
+
export declare const normalizeSubdomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
25
|
+
/** Bundle identifiers are case-sensitive; normalization preserves their case. */
|
|
26
|
+
export declare const normalizeIosBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
27
|
+
export declare const normalizeAndroidPackageIdentifier: (value: string) => IdentifierValidationResult;
|
|
28
|
+
export declare const normalizeAppleAppStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
29
|
+
export declare const normalizeGooglePlayIdentifier: (value: string) => IdentifierValidationResult;
|
|
30
|
+
export declare const normalizeRokuStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
31
|
+
export declare const normalizeFireTvAsinIdentifier: (value: string) => IdentifierValidationResult;
|
|
32
|
+
export declare const normalizeSamsungAppIdentifier: (value: string) => IdentifierValidationResult;
|
|
33
|
+
export declare const normalizeAppleTvBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
34
|
+
export declare const normalizeBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
35
|
+
/**
|
|
36
|
+
* Validate and canonicalize an AdCP identifier. Opaque identifier families keep
|
|
37
|
+
* their spelling and case; only surrounding whitespace is removed. No network
|
|
38
|
+
* lookup or existence/ownership assertion is performed.
|
|
39
|
+
*/
|
|
40
|
+
export declare function normalizePropertyIdentifier(type: PropertyIdentifierTypes | string, value: string): IdentifierValidationResult;
|
|
41
|
+
/** Validation includes the same explicit rewrite report as normalization. */
|
|
42
|
+
export declare const validatePropertyIdentifier: typeof normalizePropertyIdentifier;
|
|
43
|
+
export declare const validateDomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
44
|
+
export declare const validateSubdomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
45
|
+
export declare const validateIosBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
46
|
+
export declare const validateAndroidPackageIdentifier: (value: string) => IdentifierValidationResult;
|
|
47
|
+
export declare const validateAppleAppStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
48
|
+
export declare const validateGooglePlayIdentifier: (value: string) => IdentifierValidationResult;
|
|
49
|
+
export declare const validateRokuStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
50
|
+
export declare const validateFireTvAsinIdentifier: (value: string) => IdentifierValidationResult;
|
|
51
|
+
export declare const validateSamsungAppIdentifier: (value: string) => IdentifierValidationResult;
|
|
52
|
+
export declare const validateAppleTvBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
53
|
+
export declare const validateBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { PropertyIdentifierTypes } from './types/core.generated';
|
|
2
|
+
export type IdentifierValidationErrorCode = 'invalid_identifier' | 'unsupported_identifier_type' | 'invalid_publisher_domain';
|
|
3
|
+
export declare class IdentifierValidationError extends TypeError {
|
|
4
|
+
readonly code: IdentifierValidationErrorCode;
|
|
5
|
+
readonly identifierType: string;
|
|
6
|
+
readonly name = "IdentifierValidationError";
|
|
7
|
+
constructor(code: IdentifierValidationErrorCode, identifierType: string, message: string);
|
|
8
|
+
}
|
|
9
|
+
export interface IdentifierRewrite {
|
|
10
|
+
from: string;
|
|
11
|
+
to: string;
|
|
12
|
+
}
|
|
13
|
+
export type IdentifierValidationResult = {
|
|
14
|
+
ok: true;
|
|
15
|
+
value: string;
|
|
16
|
+
rewrite?: IdentifierRewrite;
|
|
17
|
+
} | {
|
|
18
|
+
ok: false;
|
|
19
|
+
error: IdentifierValidationError;
|
|
20
|
+
};
|
|
21
|
+
/** Validate a registration hostname as supplied. This deliberately does not repair URLs or wildcards. */
|
|
22
|
+
export declare function validatePublisherDomain(value: string): IdentifierValidationResult;
|
|
23
|
+
export declare const normalizeDomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
24
|
+
export declare const normalizeSubdomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
25
|
+
/** Bundle identifiers are case-sensitive; normalization preserves their case. */
|
|
26
|
+
export declare const normalizeIosBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
27
|
+
export declare const normalizeAndroidPackageIdentifier: (value: string) => IdentifierValidationResult;
|
|
28
|
+
export declare const normalizeAppleAppStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
29
|
+
export declare const normalizeGooglePlayIdentifier: (value: string) => IdentifierValidationResult;
|
|
30
|
+
export declare const normalizeRokuStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
31
|
+
export declare const normalizeFireTvAsinIdentifier: (value: string) => IdentifierValidationResult;
|
|
32
|
+
export declare const normalizeSamsungAppIdentifier: (value: string) => IdentifierValidationResult;
|
|
33
|
+
export declare const normalizeAppleTvBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
34
|
+
export declare const normalizeBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
35
|
+
/**
|
|
36
|
+
* Validate and canonicalize an AdCP identifier. Opaque identifier families keep
|
|
37
|
+
* their spelling and case; only surrounding whitespace is removed. No network
|
|
38
|
+
* lookup or existence/ownership assertion is performed.
|
|
39
|
+
*/
|
|
40
|
+
export declare function normalizePropertyIdentifier(type: PropertyIdentifierTypes | string, value: string): IdentifierValidationResult;
|
|
41
|
+
/** Validation includes the same explicit rewrite report as normalization. */
|
|
42
|
+
export declare const validatePropertyIdentifier: typeof normalizePropertyIdentifier;
|
|
43
|
+
export declare const validateDomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
44
|
+
export declare const validateSubdomainIdentifier: (value: string) => IdentifierValidationResult;
|
|
45
|
+
export declare const validateIosBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
46
|
+
export declare const validateAndroidPackageIdentifier: (value: string) => IdentifierValidationResult;
|
|
47
|
+
export declare const validateAppleAppStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
48
|
+
export declare const validateGooglePlayIdentifier: (value: string) => IdentifierValidationResult;
|
|
49
|
+
export declare const validateRokuStoreIdentifier: (value: string) => IdentifierValidationResult;
|
|
50
|
+
export declare const validateFireTvAsinIdentifier: (value: string) => IdentifierValidationResult;
|
|
51
|
+
export declare const validateSamsungAppIdentifier: (value: string) => IdentifierValidationResult;
|
|
52
|
+
export declare const validateAppleTvBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
53
|
+
export declare const validateBundleIdentifier: (value: string) => IdentifierValidationResult;
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var identifiers_exports = {};
|
|
20
|
+
__export(identifiers_exports, {
|
|
21
|
+
IdentifierValidationError: () => IdentifierValidationError,
|
|
22
|
+
normalizeAndroidPackageIdentifier: () => normalizeAndroidPackageIdentifier,
|
|
23
|
+
normalizeAppleAppStoreIdentifier: () => normalizeAppleAppStoreIdentifier,
|
|
24
|
+
normalizeAppleTvBundleIdentifier: () => normalizeAppleTvBundleIdentifier,
|
|
25
|
+
normalizeBundleIdentifier: () => normalizeBundleIdentifier,
|
|
26
|
+
normalizeDomainIdentifier: () => normalizeDomainIdentifier,
|
|
27
|
+
normalizeFireTvAsinIdentifier: () => normalizeFireTvAsinIdentifier,
|
|
28
|
+
normalizeGooglePlayIdentifier: () => normalizeGooglePlayIdentifier,
|
|
29
|
+
normalizeIosBundleIdentifier: () => normalizeIosBundleIdentifier,
|
|
30
|
+
normalizePropertyIdentifier: () => normalizePropertyIdentifier,
|
|
31
|
+
normalizeRokuStoreIdentifier: () => normalizeRokuStoreIdentifier,
|
|
32
|
+
normalizeSamsungAppIdentifier: () => normalizeSamsungAppIdentifier,
|
|
33
|
+
normalizeSubdomainIdentifier: () => normalizeSubdomainIdentifier,
|
|
34
|
+
validateAndroidPackageIdentifier: () => validateAndroidPackageIdentifier,
|
|
35
|
+
validateAppleAppStoreIdentifier: () => validateAppleAppStoreIdentifier,
|
|
36
|
+
validateAppleTvBundleIdentifier: () => validateAppleTvBundleIdentifier,
|
|
37
|
+
validateBundleIdentifier: () => validateBundleIdentifier,
|
|
38
|
+
validateDomainIdentifier: () => validateDomainIdentifier,
|
|
39
|
+
validateFireTvAsinIdentifier: () => validateFireTvAsinIdentifier,
|
|
40
|
+
validateGooglePlayIdentifier: () => validateGooglePlayIdentifier,
|
|
41
|
+
validateIosBundleIdentifier: () => validateIosBundleIdentifier,
|
|
42
|
+
validatePropertyIdentifier: () => validatePropertyIdentifier,
|
|
43
|
+
validatePublisherDomain: () => validatePublisherDomain,
|
|
44
|
+
validateRokuStoreIdentifier: () => validateRokuStoreIdentifier,
|
|
45
|
+
validateSamsungAppIdentifier: () => validateSamsungAppIdentifier,
|
|
46
|
+
validateSubdomainIdentifier: () => validateSubdomainIdentifier
|
|
47
|
+
});
|
|
48
|
+
module.exports = __toCommonJS(identifiers_exports);
|
|
49
|
+
var import_node_net = require("node:net");
|
|
50
|
+
var import_node_url = require("node:url");
|
|
51
|
+
class IdentifierValidationError extends TypeError {
|
|
52
|
+
constructor(code, identifierType, message) {
|
|
53
|
+
super(message);
|
|
54
|
+
this.code = code;
|
|
55
|
+
this.identifierType = identifierType;
|
|
56
|
+
}
|
|
57
|
+
code;
|
|
58
|
+
identifierType;
|
|
59
|
+
name = "IdentifierValidationError";
|
|
60
|
+
}
|
|
61
|
+
const PUBLISHER_DOMAIN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;
|
|
62
|
+
function isDomain(value) {
|
|
63
|
+
if (value.length > 253 || !PUBLISHER_DOMAIN.test(value) || value.split(".").some((label) => label.length > 63) || (0, import_node_net.isIP)(value))
|
|
64
|
+
return false;
|
|
65
|
+
try {
|
|
66
|
+
return !(0, import_node_net.isIP)(new URL(`https://${value}`).hostname);
|
|
67
|
+
} catch {
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function accepted(input, value) {
|
|
72
|
+
return { ok: true, value, ...input === value ? {} : { rewrite: { from: input, to: value } } };
|
|
73
|
+
}
|
|
74
|
+
function rejected(type, code = "invalid_identifier") {
|
|
75
|
+
return {
|
|
76
|
+
ok: false,
|
|
77
|
+
error: new IdentifierValidationError(
|
|
78
|
+
code,
|
|
79
|
+
type,
|
|
80
|
+
code === "invalid_publisher_domain" ? "publisher_domain must be a canonical lowercase hostname without wildcards, URLs, or IP addresses" : `Invalid ${type} identifier`
|
|
81
|
+
)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
function validatePublisherDomain(value) {
|
|
85
|
+
return typeof value === "string" && isDomain(value) ? accepted(value, value) : rejected("publisher_domain", "invalid_publisher_domain");
|
|
86
|
+
}
|
|
87
|
+
function normalizeHostname(input, type) {
|
|
88
|
+
if (typeof input !== "string") return rejected(type);
|
|
89
|
+
let value = input.trim();
|
|
90
|
+
if (/^https?:\/\//i.test(value)) {
|
|
91
|
+
try {
|
|
92
|
+
const url = new URL(value);
|
|
93
|
+
if (url.username || url.password) return rejected(type);
|
|
94
|
+
value = url.hostname;
|
|
95
|
+
} catch {
|
|
96
|
+
return rejected(type);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
const wildcard = value.startsWith("*.");
|
|
100
|
+
if (wildcard && type !== "domain") return rejected(type);
|
|
101
|
+
if (/[\s/\\:@?#%]/.test(wildcard ? value.slice(2) : value)) return rejected(type);
|
|
102
|
+
const host = (0, import_node_url.domainToASCII)((wildcard ? value.slice(2) : value).toLowerCase().replace(/\.$/, ""));
|
|
103
|
+
if (!isDomain(host)) return rejected(type);
|
|
104
|
+
return accepted(input, `${wildcard ? "*." : ""}${host}`);
|
|
105
|
+
}
|
|
106
|
+
const normalizeDomainIdentifier = (value) => normalizeHostname(value, "domain");
|
|
107
|
+
const normalizeSubdomainIdentifier = (value) => normalizeHostname(value, "subdomain");
|
|
108
|
+
function normalizePattern(type, input, pattern, uppercase = false) {
|
|
109
|
+
if (typeof input !== "string") return rejected(type);
|
|
110
|
+
const value = uppercase ? input.trim().toUpperCase() : input.trim();
|
|
111
|
+
return pattern.test(value) ? accepted(input, value) : rejected(type);
|
|
112
|
+
}
|
|
113
|
+
const normalizeIosBundleIdentifier = (value) => normalizePattern("ios_bundle", value, /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/);
|
|
114
|
+
const normalizeAndroidPackageIdentifier = (value) => normalizePattern("android_package", value, /^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)+$/);
|
|
115
|
+
const normalizeAppleAppStoreIdentifier = (value) => normalizePattern("apple_app_store_id", value, /^[1-9][0-9]*$/);
|
|
116
|
+
const normalizeGooglePlayIdentifier = (value) => normalizePattern("google_play_id", value, /^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)+$/);
|
|
117
|
+
const normalizeRokuStoreIdentifier = (value) => normalizePattern("roku_store_id", value, /^[1-9][0-9]*$/);
|
|
118
|
+
const normalizeFireTvAsinIdentifier = (value) => normalizePattern("fire_tv_asin", value, /^[A-Z0-9]{10}$/, true);
|
|
119
|
+
const normalizeSamsungAppIdentifier = (value) => normalizePattern("samsung_app_id", value, /^[A-Za-z0-9._-]+$/);
|
|
120
|
+
const normalizeAppleTvBundleIdentifier = (value) => normalizePattern("apple_tv_bundle", value, /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/);
|
|
121
|
+
const normalizeBundleIdentifier = (value) => normalizePattern("bundle_id", value, /^[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)+$/);
|
|
122
|
+
function normalizePropertyIdentifier(type, value) {
|
|
123
|
+
switch (type) {
|
|
124
|
+
case "domain":
|
|
125
|
+
return normalizeDomainIdentifier(value);
|
|
126
|
+
case "subdomain":
|
|
127
|
+
return normalizeSubdomainIdentifier(value);
|
|
128
|
+
case "ios_bundle":
|
|
129
|
+
return normalizeIosBundleIdentifier(value);
|
|
130
|
+
case "android_package":
|
|
131
|
+
return normalizeAndroidPackageIdentifier(value);
|
|
132
|
+
case "apple_app_store_id":
|
|
133
|
+
return normalizeAppleAppStoreIdentifier(value);
|
|
134
|
+
case "google_play_id":
|
|
135
|
+
return normalizeGooglePlayIdentifier(value);
|
|
136
|
+
case "roku_store_id":
|
|
137
|
+
return normalizeRokuStoreIdentifier(value);
|
|
138
|
+
case "fire_tv_asin":
|
|
139
|
+
return normalizeFireTvAsinIdentifier(value);
|
|
140
|
+
case "samsung_app_id":
|
|
141
|
+
return normalizeSamsungAppIdentifier(value);
|
|
142
|
+
case "apple_tv_bundle":
|
|
143
|
+
return normalizeAppleTvBundleIdentifier(value);
|
|
144
|
+
case "bundle_id":
|
|
145
|
+
return normalizeBundleIdentifier(value);
|
|
146
|
+
case "apple_podcast_id":
|
|
147
|
+
return normalizePattern(type, value, /^[1-9][0-9]*$/);
|
|
148
|
+
case "rss_url": {
|
|
149
|
+
if (typeof value !== "string") return rejected(type);
|
|
150
|
+
try {
|
|
151
|
+
const url = new URL(value.trim());
|
|
152
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || !isDomain(url.hostname))
|
|
153
|
+
return rejected(type);
|
|
154
|
+
return accepted(value, url.toString());
|
|
155
|
+
} catch {
|
|
156
|
+
return rejected(type);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
case "network_id":
|
|
160
|
+
case "venue_id":
|
|
161
|
+
case "screen_id":
|
|
162
|
+
case "openooh_venue_type":
|
|
163
|
+
case "spotify_collection_id":
|
|
164
|
+
case "podcast_guid":
|
|
165
|
+
case "station_id":
|
|
166
|
+
case "facility_id":
|
|
167
|
+
return normalizePattern(type, value, /^[^\x00-\x1f\x7f]+$/);
|
|
168
|
+
default:
|
|
169
|
+
return rejected(type, "unsupported_identifier_type");
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const validatePropertyIdentifier = normalizePropertyIdentifier;
|
|
173
|
+
const validateDomainIdentifier = normalizeDomainIdentifier;
|
|
174
|
+
const validateSubdomainIdentifier = normalizeSubdomainIdentifier;
|
|
175
|
+
const validateIosBundleIdentifier = normalizeIosBundleIdentifier;
|
|
176
|
+
const validateAndroidPackageIdentifier = normalizeAndroidPackageIdentifier;
|
|
177
|
+
const validateAppleAppStoreIdentifier = normalizeAppleAppStoreIdentifier;
|
|
178
|
+
const validateGooglePlayIdentifier = normalizeGooglePlayIdentifier;
|
|
179
|
+
const validateRokuStoreIdentifier = normalizeRokuStoreIdentifier;
|
|
180
|
+
const validateFireTvAsinIdentifier = normalizeFireTvAsinIdentifier;
|
|
181
|
+
const validateSamsungAppIdentifier = normalizeSamsungAppIdentifier;
|
|
182
|
+
const validateAppleTvBundleIdentifier = normalizeAppleTvBundleIdentifier;
|
|
183
|
+
const validateBundleIdentifier = normalizeBundleIdentifier;
|
|
184
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
+
0 && (module.exports = {
|
|
186
|
+
IdentifierValidationError,
|
|
187
|
+
normalizeAndroidPackageIdentifier,
|
|
188
|
+
normalizeAppleAppStoreIdentifier,
|
|
189
|
+
normalizeAppleTvBundleIdentifier,
|
|
190
|
+
normalizeBundleIdentifier,
|
|
191
|
+
normalizeDomainIdentifier,
|
|
192
|
+
normalizeFireTvAsinIdentifier,
|
|
193
|
+
normalizeGooglePlayIdentifier,
|
|
194
|
+
normalizeIosBundleIdentifier,
|
|
195
|
+
normalizePropertyIdentifier,
|
|
196
|
+
normalizeRokuStoreIdentifier,
|
|
197
|
+
normalizeSamsungAppIdentifier,
|
|
198
|
+
normalizeSubdomainIdentifier,
|
|
199
|
+
validateAndroidPackageIdentifier,
|
|
200
|
+
validateAppleAppStoreIdentifier,
|
|
201
|
+
validateAppleTvBundleIdentifier,
|
|
202
|
+
validateBundleIdentifier,
|
|
203
|
+
validateDomainIdentifier,
|
|
204
|
+
validateFireTvAsinIdentifier,
|
|
205
|
+
validateGooglePlayIdentifier,
|
|
206
|
+
validateIosBundleIdentifier,
|
|
207
|
+
validatePropertyIdentifier,
|
|
208
|
+
validatePublisherDomain,
|
|
209
|
+
validateRokuStoreIdentifier,
|
|
210
|
+
validateSamsungAppIdentifier,
|
|
211
|
+
validateSubdomainIdentifier
|
|
212
|
+
});
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { isIP } from "node:net";
|
|
2
|
+
import { domainToASCII } from "node:url";
|
|
3
|
+
class IdentifierValidationError extends TypeError {
|
|
4
|
+
constructor(code, identifierType, message) {
|
|
5
|
+
super(message);
|
|
6
|
+
this.code = code;
|
|
7
|
+
this.identifierType = identifierType;
|
|
8
|
+
}
|
|
9
|
+
code;
|
|
10
|
+
identifierType;
|
|
11
|
+
name = "IdentifierValidationError";
|
|
12
|
+
}
|
|
13
|
+
const PUBLISHER_DOMAIN = /^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/;
|
|
14
|
+
function isDomain(value) {
|
|
15
|
+
if (value.length > 253 || !PUBLISHER_DOMAIN.test(value) || value.split(".").some((label) => label.length > 63) || isIP(value))
|
|
16
|
+
return false;
|
|
17
|
+
try {
|
|
18
|
+
return !isIP(new URL(`https://${value}`).hostname);
|
|
19
|
+
} catch {
|
|
20
|
+
return false;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function accepted(input, value) {
|
|
24
|
+
return { ok: true, value, ...input === value ? {} : { rewrite: { from: input, to: value } } };
|
|
25
|
+
}
|
|
26
|
+
function rejected(type, code = "invalid_identifier") {
|
|
27
|
+
return {
|
|
28
|
+
ok: false,
|
|
29
|
+
error: new IdentifierValidationError(
|
|
30
|
+
code,
|
|
31
|
+
type,
|
|
32
|
+
code === "invalid_publisher_domain" ? "publisher_domain must be a canonical lowercase hostname without wildcards, URLs, or IP addresses" : `Invalid ${type} identifier`
|
|
33
|
+
)
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function validatePublisherDomain(value) {
|
|
37
|
+
return typeof value === "string" && isDomain(value) ? accepted(value, value) : rejected("publisher_domain", "invalid_publisher_domain");
|
|
38
|
+
}
|
|
39
|
+
function normalizeHostname(input, type) {
|
|
40
|
+
if (typeof input !== "string") return rejected(type);
|
|
41
|
+
let value = input.trim();
|
|
42
|
+
if (/^https?:\/\//i.test(value)) {
|
|
43
|
+
try {
|
|
44
|
+
const url = new URL(value);
|
|
45
|
+
if (url.username || url.password) return rejected(type);
|
|
46
|
+
value = url.hostname;
|
|
47
|
+
} catch {
|
|
48
|
+
return rejected(type);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const wildcard = value.startsWith("*.");
|
|
52
|
+
if (wildcard && type !== "domain") return rejected(type);
|
|
53
|
+
if (/[\s/\\:@?#%]/.test(wildcard ? value.slice(2) : value)) return rejected(type);
|
|
54
|
+
const host = domainToASCII((wildcard ? value.slice(2) : value).toLowerCase().replace(/\.$/, ""));
|
|
55
|
+
if (!isDomain(host)) return rejected(type);
|
|
56
|
+
return accepted(input, `${wildcard ? "*." : ""}${host}`);
|
|
57
|
+
}
|
|
58
|
+
const normalizeDomainIdentifier = (value) => normalizeHostname(value, "domain");
|
|
59
|
+
const normalizeSubdomainIdentifier = (value) => normalizeHostname(value, "subdomain");
|
|
60
|
+
function normalizePattern(type, input, pattern, uppercase = false) {
|
|
61
|
+
if (typeof input !== "string") return rejected(type);
|
|
62
|
+
const value = uppercase ? input.trim().toUpperCase() : input.trim();
|
|
63
|
+
return pattern.test(value) ? accepted(input, value) : rejected(type);
|
|
64
|
+
}
|
|
65
|
+
const normalizeIosBundleIdentifier = (value) => normalizePattern("ios_bundle", value, /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/);
|
|
66
|
+
const normalizeAndroidPackageIdentifier = (value) => normalizePattern("android_package", value, /^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)+$/);
|
|
67
|
+
const normalizeAppleAppStoreIdentifier = (value) => normalizePattern("apple_app_store_id", value, /^[1-9][0-9]*$/);
|
|
68
|
+
const normalizeGooglePlayIdentifier = (value) => normalizePattern("google_play_id", value, /^[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)+$/);
|
|
69
|
+
const normalizeRokuStoreIdentifier = (value) => normalizePattern("roku_store_id", value, /^[1-9][0-9]*$/);
|
|
70
|
+
const normalizeFireTvAsinIdentifier = (value) => normalizePattern("fire_tv_asin", value, /^[A-Z0-9]{10}$/, true);
|
|
71
|
+
const normalizeSamsungAppIdentifier = (value) => normalizePattern("samsung_app_id", value, /^[A-Za-z0-9._-]+$/);
|
|
72
|
+
const normalizeAppleTvBundleIdentifier = (value) => normalizePattern("apple_tv_bundle", value, /^[A-Za-z0-9-]+(?:\.[A-Za-z0-9-]+)+$/);
|
|
73
|
+
const normalizeBundleIdentifier = (value) => normalizePattern("bundle_id", value, /^[A-Za-z0-9_-]+(?:\.[A-Za-z0-9_-]+)+$/);
|
|
74
|
+
function normalizePropertyIdentifier(type, value) {
|
|
75
|
+
switch (type) {
|
|
76
|
+
case "domain":
|
|
77
|
+
return normalizeDomainIdentifier(value);
|
|
78
|
+
case "subdomain":
|
|
79
|
+
return normalizeSubdomainIdentifier(value);
|
|
80
|
+
case "ios_bundle":
|
|
81
|
+
return normalizeIosBundleIdentifier(value);
|
|
82
|
+
case "android_package":
|
|
83
|
+
return normalizeAndroidPackageIdentifier(value);
|
|
84
|
+
case "apple_app_store_id":
|
|
85
|
+
return normalizeAppleAppStoreIdentifier(value);
|
|
86
|
+
case "google_play_id":
|
|
87
|
+
return normalizeGooglePlayIdentifier(value);
|
|
88
|
+
case "roku_store_id":
|
|
89
|
+
return normalizeRokuStoreIdentifier(value);
|
|
90
|
+
case "fire_tv_asin":
|
|
91
|
+
return normalizeFireTvAsinIdentifier(value);
|
|
92
|
+
case "samsung_app_id":
|
|
93
|
+
return normalizeSamsungAppIdentifier(value);
|
|
94
|
+
case "apple_tv_bundle":
|
|
95
|
+
return normalizeAppleTvBundleIdentifier(value);
|
|
96
|
+
case "bundle_id":
|
|
97
|
+
return normalizeBundleIdentifier(value);
|
|
98
|
+
case "apple_podcast_id":
|
|
99
|
+
return normalizePattern(type, value, /^[1-9][0-9]*$/);
|
|
100
|
+
case "rss_url": {
|
|
101
|
+
if (typeof value !== "string") return rejected(type);
|
|
102
|
+
try {
|
|
103
|
+
const url = new URL(value.trim());
|
|
104
|
+
if (!["http:", "https:"].includes(url.protocol) || url.username || url.password || !isDomain(url.hostname))
|
|
105
|
+
return rejected(type);
|
|
106
|
+
return accepted(value, url.toString());
|
|
107
|
+
} catch {
|
|
108
|
+
return rejected(type);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
case "network_id":
|
|
112
|
+
case "venue_id":
|
|
113
|
+
case "screen_id":
|
|
114
|
+
case "openooh_venue_type":
|
|
115
|
+
case "spotify_collection_id":
|
|
116
|
+
case "podcast_guid":
|
|
117
|
+
case "station_id":
|
|
118
|
+
case "facility_id":
|
|
119
|
+
return normalizePattern(type, value, /^[^\x00-\x1f\x7f]+$/);
|
|
120
|
+
default:
|
|
121
|
+
return rejected(type, "unsupported_identifier_type");
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
const validatePropertyIdentifier = normalizePropertyIdentifier;
|
|
125
|
+
const validateDomainIdentifier = normalizeDomainIdentifier;
|
|
126
|
+
const validateSubdomainIdentifier = normalizeSubdomainIdentifier;
|
|
127
|
+
const validateIosBundleIdentifier = normalizeIosBundleIdentifier;
|
|
128
|
+
const validateAndroidPackageIdentifier = normalizeAndroidPackageIdentifier;
|
|
129
|
+
const validateAppleAppStoreIdentifier = normalizeAppleAppStoreIdentifier;
|
|
130
|
+
const validateGooglePlayIdentifier = normalizeGooglePlayIdentifier;
|
|
131
|
+
const validateRokuStoreIdentifier = normalizeRokuStoreIdentifier;
|
|
132
|
+
const validateFireTvAsinIdentifier = normalizeFireTvAsinIdentifier;
|
|
133
|
+
const validateSamsungAppIdentifier = normalizeSamsungAppIdentifier;
|
|
134
|
+
const validateAppleTvBundleIdentifier = normalizeAppleTvBundleIdentifier;
|
|
135
|
+
const validateBundleIdentifier = normalizeBundleIdentifier;
|
|
136
|
+
export {
|
|
137
|
+
IdentifierValidationError,
|
|
138
|
+
normalizeAndroidPackageIdentifier,
|
|
139
|
+
normalizeAppleAppStoreIdentifier,
|
|
140
|
+
normalizeAppleTvBundleIdentifier,
|
|
141
|
+
normalizeBundleIdentifier,
|
|
142
|
+
normalizeDomainIdentifier,
|
|
143
|
+
normalizeFireTvAsinIdentifier,
|
|
144
|
+
normalizeGooglePlayIdentifier,
|
|
145
|
+
normalizeIosBundleIdentifier,
|
|
146
|
+
normalizePropertyIdentifier,
|
|
147
|
+
normalizeRokuStoreIdentifier,
|
|
148
|
+
normalizeSamsungAppIdentifier,
|
|
149
|
+
normalizeSubdomainIdentifier,
|
|
150
|
+
validateAndroidPackageIdentifier,
|
|
151
|
+
validateAppleAppStoreIdentifier,
|
|
152
|
+
validateAppleTvBundleIdentifier,
|
|
153
|
+
validateBundleIdentifier,
|
|
154
|
+
validateDomainIdentifier,
|
|
155
|
+
validateFireTvAsinIdentifier,
|
|
156
|
+
validateGooglePlayIdentifier,
|
|
157
|
+
validateIosBundleIdentifier,
|
|
158
|
+
validatePropertyIdentifier,
|
|
159
|
+
validatePublisherDomain,
|
|
160
|
+
validateRokuStoreIdentifier,
|
|
161
|
+
validateSamsungAppIdentifier,
|
|
162
|
+
validateSubdomainIdentifier
|
|
163
|
+
};
|
package/dist/lib/index.d.mts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './identifiers.mjs';
|
|
2
|
+
export type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './registry/index.mjs';
|
|
1
3
|
export { RegistryClient, RegistryRequestError, isRegistryRequestError, RegistrySync, PropertyRegistry, InMemoryCursorStore, FileCursorStore, buildCommunityMirrorAdagents, } from './registry/index.mjs';
|
|
2
4
|
export type { RegistrySyncConfig, RegistrySyncState, RegistrySyncTransport, RegistrySyncEvents, AgentFilter, RegistrySyncProperty, CursorStore, PropertyRegistryConfig, FeedStreamQuery, FeedStreamMessage, FeedHeartbeat, FeedStreamErrorData, OpenFeedStreamOptions, FeedFreshness, } from './registry/index.mjs';
|
|
3
5
|
export { openFeedStream, parseSseStream, sanitizeStreamText, DEFAULT_MAX_SSE_FRAME_BYTES, FeedStreamError, FeedStreamUnsupportedError, FeedStreamCursorExpiredError, FeedStreamHttpError, FeedStreamParseError, } from './registry/index.mjs';
|
|
@@ -57,7 +59,7 @@ export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from '.
|
|
|
57
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
58
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';
|
|
59
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors/index.mjs';
|
|
60
|
-
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy/index.mjs';
|
|
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';
|
|
61
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';
|
|
62
64
|
export { InputRequiredError } from './core/TaskExecutor.mjs';
|
|
63
65
|
export { generateIdempotencyKey, isMutatingTask, requestUsesIdempotency, isValidIdempotencyKey, useIdempotencyKey, redactIdempotencyKey, IDEMPOTENCY_KEY_PATTERN, MUTATING_TASKS, } from './utils/idempotency.mjs';
|
|
@@ -224,16 +226,16 @@ export type { BuildActivateSignalRequestOptions, DiscoveredSignal, NormalizedDis
|
|
|
224
226
|
export { buildCreativeReturn, singleBuildCreativeReturn, multiBuildCreativeReturn, singleEnvelopedBuildCreativeReturn, multiEnvelopedBuildCreativeReturn, variantEnvelopedBuildCreativeReturn, } from './utils/build-creative-return-builders.mjs';
|
|
225
227
|
export { previewCreative, singlePreviewCreativeResponse, batchPreviewCreativeResponse, variantPreviewCreativeResponse, } from './utils/preview-creative-builders.mjs';
|
|
226
228
|
export { mediaBuyDeliveryNotification, scheduledMediaBuyDeliveryNotification, finalMediaBuyDeliveryNotification, delayedMediaBuyDeliveryNotification, adjustedMediaBuyDeliveryNotification, windowUpdateMediaBuyDeliveryNotification, } from './utils/media-buy-delivery-notification-builders.mjs';
|
|
227
|
-
export {
|
|
229
|
+
export { buildSyntheticV3Capabilities, parseCapabilitiesResponse, supportsV3, supportsProtocol, supportsPropertyListFiltering, supportsContentStandards, supportsSyncCreatives, supportsBuyingMode, requiresOperatorAuth, requiresAccountForProducts, supportsSandbox, supportsExperimentalFeature, resolveFeature, listDeclaredFeatures, MEDIA_BUY_TOOLS, SIGNALS_TOOLS, GOVERNANCE_TOOLS, CREATIVE_TOOLS, EVENT_TRACKING_TOOLS, ACCOUNT_TOOLS, PROTOCOL_TOOLS, BRAND_RIGHTS_TOOLS, TASK_FEATURE_MAP, } from './utils/capabilities.mjs';
|
|
228
230
|
export type { AdcpCapabilities, AdcpMajorVersion, AdcpProtocol, AccountCapabilities, BuyingMode, MediaBuyFeatures, ToolInfo, FeatureName, } from './utils/capabilities.mjs';
|
|
229
231
|
export type { ResolveAccountOptions, ResolveAccountResult, ListedAccount } from './core/account-resolution.mjs';
|
|
230
232
|
export { inlineCreativesForPackages, inlineCreativesForPackagesLegacy } from './utils/creative-delivery.mjs';
|
|
231
233
|
export type { InlineCreativeAssignment, InlineCreativePackage, InlineCreativePackagePatch, InlineCreativesForPackagesOptions, InlineCreativesForPackagesLegacyOptions, LegacyInlineCreativePackage, } from './utils/creative-delivery.mjs';
|
|
232
|
-
export {
|
|
234
|
+
export { normalizePackageResponse, normalizeMediaBuyResponse, usesV3CreativeAssignments, getCreativeIds, getCreativeAssignments, } from './utils/creative-adapter.mjs';
|
|
233
235
|
export type { CreativeAssignment } from './utils/creative-adapter.mjs';
|
|
234
|
-
export { normalizeFormatRenders, normalizeFormatsResponse, getFormatRenders, getPrimaryRender, getCompanionRenders, isMultiRenderFormat,
|
|
236
|
+
export { normalizeFormatRenders, normalizeFormatsResponse, getFormatRenders, getPrimaryRender, getCompanionRenders, isMultiRenderFormat, usesV3Renders, getFormatDimensions, } from './utils/format-renders.mjs';
|
|
235
237
|
export type { FormatRenderEntry, RenderDimensions } from './utils/format-renders.mjs';
|
|
236
|
-
export { normalizePreviewRender, normalizePreview, normalizePreviewCreativeResponse,
|
|
238
|
+
export { normalizePreviewRender, normalizePreview, normalizePreviewCreativeResponse, usesV3RenderFields, getRenderId, getRenderRole, getPrimaryPreviewRender, getPreviewUrl, getPreviewHtml, } from './utils/preview-normalizer.mjs';
|
|
237
239
|
export type { PreviewRendererMetadata, PreviewRenderV3 } from './utils/preview-normalizer.mjs';
|
|
238
240
|
export { resolvePreviewAuthority, type PlacementPreviewCandidate, type PreviewAuthorityInput, type PreviewAuthorityResolution, type PreviewFidelity, type SelectedPreviewAuthority, type SellerPreviewCandidate, } from './utils/preview-authority.mjs';
|
|
239
241
|
export { isStatusCompleted, isStatusWorking, isStatusInputRequired, isStatusSubmitted, isStatusFailed, isStatusRejected, isGetProductsCompleted, isGetProductsWorking, isGetProductsInputRequired, isGetProductsSubmitted, isGetProductsFailed, isCreateMediaBuyCompleted, isCreateMediaBuyWorking, isCreateMediaBuyInputRequired, isCreateMediaBuySubmitted, isCreateMediaBuyFailed, isUpdateMediaBuyCompleted, isUpdateMediaBuyWorking, isUpdateMediaBuyInputRequired, isUpdateMediaBuySubmitted, isUpdateMediaBuyFailed, isSyncCreativesCompleted, isSyncCreativesWorking, isSyncCreativesInputRequired, isSyncCreativesSubmitted, isSyncCreativesFailed, } from './utils/typeGuards.mjs';
|
package/dist/lib/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './identifiers';
|
|
2
|
+
export type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './registry';
|
|
1
3
|
export { RegistryClient, RegistryRequestError, isRegistryRequestError, RegistrySync, PropertyRegistry, InMemoryCursorStore, FileCursorStore, buildCommunityMirrorAdagents, } from './registry';
|
|
2
4
|
export type { RegistrySyncConfig, RegistrySyncState, RegistrySyncTransport, RegistrySyncEvents, AgentFilter, RegistrySyncProperty, CursorStore, PropertyRegistryConfig, FeedStreamQuery, FeedStreamMessage, FeedHeartbeat, FeedStreamErrorData, OpenFeedStreamOptions, FeedFreshness, } from './registry';
|
|
3
5
|
export { openFeedStream, parseSseStream, sanitizeStreamText, DEFAULT_MAX_SSE_FRAME_BYTES, FeedStreamError, FeedStreamUnsupportedError, FeedStreamCursorExpiredError, FeedStreamHttpError, FeedStreamParseError, } from './registry';
|
|
@@ -57,7 +59,7 @@ export { MemoryStorage, createMemoryStorage, createMemoryStorageConfig } from '.
|
|
|
57
59
|
export { ADCPError, TaskTimeoutError, MaxClarificationError, DeferredTaskError, TaskAbortedError, AgentNotFoundError, UnsupportedTaskError, ProtocolError, ValidationError as ADCPValidationError, // Rename to avoid conflict
|
|
58
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';
|
|
59
61
|
export type { OAuthMetadataInfo, ClientPreflightAdcpErrorInfo, ClientPreflightAdcpErrorRecovery, FeatureUnsupportedErrorOptions, ProtocolFeatureUnsupportedErrorOptions, ActionNotAllowedErrorDetails, ActionNotAllowedReasonValue, ActionNotAllowedAttemptedAction, ActionNotAllowedAvailableAction, ActionNotAllowedRecovery, } from './errors';
|
|
60
|
-
export type { ActionNotAllowedDetails, ActionNotAllowedReason, AvailableActionsResult, AvailableActionsSource, DecomposedUpdateMediaBuy, DecomposedUpdateMediaBuyMutation, LegacyCoarseAction, MediaBuyActionContext, MediaBuyActionId, MediaBuyActionMode, MediaBuyAvailableAction, MediaBuyMutationDirection, MediaBuyMutationScope, MediaBuyUpdateFieldAction, MediaBuyValidAction, ModeMismatchRecovery, PreflightAllowed, PreflightDenial, PreflightDenied, BuyerPropertyPolicy, NormalizedPolicyDomain, ProductPolicyProductLike, ProductPropertyPolicyDiagnostic, ProductPropertyPolicyDiagnosticCode, ProductPropertyPolicyDiagnosticSeverity, ProductPropertyPolicyMode, ProductPropertyPolicySelectorBehavior, ProductPropertyPolicyValidationResult, PreflightResult, ResolvedAction, SLAWindow, SlaWindow, StructuredOnlyMediaBuyAction, ResolvedTargetingInput, TargetingInputFor, ValidateProductsAgainstPropertyPolicyOptions, UpdateFieldEntry, UpdateMediaBuyRequestLike, } from './media-buy';
|
|
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';
|
|
61
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';
|
|
62
64
|
export { InputRequiredError } from './core/TaskExecutor';
|
|
63
65
|
export { generateIdempotencyKey, isMutatingTask, requestUsesIdempotency, isValidIdempotencyKey, useIdempotencyKey, redactIdempotencyKey, IDEMPOTENCY_KEY_PATTERN, MUTATING_TASKS, } from './utils/idempotency';
|
|
@@ -224,16 +226,16 @@ export type { BuildActivateSignalRequestOptions, DiscoveredSignal, NormalizedDis
|
|
|
224
226
|
export { buildCreativeReturn, singleBuildCreativeReturn, multiBuildCreativeReturn, singleEnvelopedBuildCreativeReturn, multiEnvelopedBuildCreativeReturn, variantEnvelopedBuildCreativeReturn, } from './utils/build-creative-return-builders';
|
|
225
227
|
export { previewCreative, singlePreviewCreativeResponse, batchPreviewCreativeResponse, variantPreviewCreativeResponse, } from './utils/preview-creative-builders';
|
|
226
228
|
export { mediaBuyDeliveryNotification, scheduledMediaBuyDeliveryNotification, finalMediaBuyDeliveryNotification, delayedMediaBuyDeliveryNotification, adjustedMediaBuyDeliveryNotification, windowUpdateMediaBuyDeliveryNotification, } from './utils/media-buy-delivery-notification-builders';
|
|
227
|
-
export {
|
|
229
|
+
export { buildSyntheticV3Capabilities, parseCapabilitiesResponse, supportsV3, supportsProtocol, supportsPropertyListFiltering, supportsContentStandards, supportsSyncCreatives, supportsBuyingMode, requiresOperatorAuth, requiresAccountForProducts, supportsSandbox, supportsExperimentalFeature, resolveFeature, listDeclaredFeatures, MEDIA_BUY_TOOLS, SIGNALS_TOOLS, GOVERNANCE_TOOLS, CREATIVE_TOOLS, EVENT_TRACKING_TOOLS, ACCOUNT_TOOLS, PROTOCOL_TOOLS, BRAND_RIGHTS_TOOLS, TASK_FEATURE_MAP, } from './utils/capabilities';
|
|
228
230
|
export type { AdcpCapabilities, AdcpMajorVersion, AdcpProtocol, AccountCapabilities, BuyingMode, MediaBuyFeatures, ToolInfo, FeatureName, } from './utils/capabilities';
|
|
229
231
|
export type { ResolveAccountOptions, ResolveAccountResult, ListedAccount } from './core/account-resolution';
|
|
230
232
|
export { inlineCreativesForPackages, inlineCreativesForPackagesLegacy } from './utils/creative-delivery';
|
|
231
233
|
export type { InlineCreativeAssignment, InlineCreativePackage, InlineCreativePackagePatch, InlineCreativesForPackagesOptions, InlineCreativesForPackagesLegacyOptions, LegacyInlineCreativePackage, } from './utils/creative-delivery';
|
|
232
|
-
export {
|
|
234
|
+
export { normalizePackageResponse, normalizeMediaBuyResponse, usesV3CreativeAssignments, getCreativeIds, getCreativeAssignments, } from './utils/creative-adapter';
|
|
233
235
|
export type { CreativeAssignment } from './utils/creative-adapter';
|
|
234
|
-
export { normalizeFormatRenders, normalizeFormatsResponse, getFormatRenders, getPrimaryRender, getCompanionRenders, isMultiRenderFormat,
|
|
236
|
+
export { normalizeFormatRenders, normalizeFormatsResponse, getFormatRenders, getPrimaryRender, getCompanionRenders, isMultiRenderFormat, usesV3Renders, getFormatDimensions, } from './utils/format-renders';
|
|
235
237
|
export type { FormatRenderEntry, RenderDimensions } from './utils/format-renders';
|
|
236
|
-
export { normalizePreviewRender, normalizePreview, normalizePreviewCreativeResponse,
|
|
238
|
+
export { normalizePreviewRender, normalizePreview, normalizePreviewCreativeResponse, usesV3RenderFields, getRenderId, getRenderRole, getPrimaryPreviewRender, getPreviewUrl, getPreviewHtml, } from './utils/preview-normalizer';
|
|
237
239
|
export type { PreviewRendererMetadata, PreviewRenderV3 } from './utils/preview-normalizer';
|
|
238
240
|
export { resolvePreviewAuthority, type PlacementPreviewCandidate, type PreviewAuthorityInput, type PreviewAuthorityResolution, type PreviewFidelity, type SelectedPreviewAuthority, type SellerPreviewCandidate, } from './utils/preview-authority';
|
|
239
241
|
export { isStatusCompleted, isStatusWorking, isStatusInputRequired, isStatusSubmitted, isStatusFailed, isStatusRejected, isGetProductsCompleted, isGetProductsWorking, isGetProductsInputRequired, isGetProductsSubmitted, isGetProductsFailed, isCreateMediaBuyCompleted, isCreateMediaBuyWorking, isCreateMediaBuyInputRequired, isCreateMediaBuySubmitted, isCreateMediaBuyFailed, isUpdateMediaBuyCompleted, isUpdateMediaBuyWorking, isUpdateMediaBuyInputRequired, isUpdateMediaBuySubmitted, isUpdateMediaBuyFailed, isSyncCreativesCompleted, isSyncCreativesWorking, isSyncCreativesInputRequired, isSyncCreativesSubmitted, isSyncCreativesFailed, } from './utils/typeGuards';
|