@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
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { SupplyPathRequest, RegistrySupplyPathResult } from '../supply-path/types';
|
|
2
|
+
export * from '../identifiers';
|
|
3
|
+
export type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './types';
|
|
4
|
+
import type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './types';
|
|
2
5
|
import type { ResolvedBrand, LookupBrandOptions, ResolvedProperty, RegistryClientConfig, SaveBrandRequest, SaveBrandResponse, ListBrandLogosOptions, ListBrandLogosResponse, SaveBrandLogoInput, SaveBrandLogoResponse, UploadBrandLogoInput, UploadBrandLogoResponse, SavePropertyRequest, SavePropertyResponse, ResolveIdentifiersRequest, ResolveIdentifiersResponse, FileCatalogDisputeRequest, FileCatalogDisputeResponse, GetCatalogDisputeResponse, ClaimHostedPropertyDomainResponse, VerifyHostedPropertyOriginResponse, PropertyRegistryItem, ValidationResult, DomainLookupResult, ListBrandsOptions, ListBrandsResponse, GetBrandJsonResponse, ListOptions, ListAgentsOptions, ListAgentsResponse, ListPublishersResponse, ValidateAdagentsResponse, CreateAdagentsRequest, CreateAdagentsResponse, CommunityMirrorAdagentsConfig, CreateCommunityMirrorAdagentsConfig, CommunityMirrorAdagentsCatalog, PublishCommunityMirrorAdagentsResponse, ListCommunityMirrorAdagentsResponse, DeleteCommunityMirrorAdagentsResponse, PublisherPropertySelector, FindCompanyResult, FeedQuery, FeedResponse, AgentSearchQuery, AgentSearchResponse, CrawlRequestResponse, ManagerRevalidationResponse, ListPoliciesQuery, ListPoliciesResponse, ResolvePolicyQuery, ResolvePolicyResponse, ResolvePoliciesBulkRequest, ResolvePoliciesBulkResponse, GetPolicyHistoryQuery, GetPolicyHistoryResponse, SavePolicyRequest, SavePolicyResponse, GetBrandHistoryQuery, GetBrandHistoryResponse, GetPropertyHistoryQuery, GetPropertyHistoryResponse, AgentComplianceDetail, OperatorLookupResult, PublisherLookupResult, GetAgentStoryboardStatusResponse, GetAgentStoryboardStatusBulkResponse } from './types';
|
|
3
6
|
import type { FeedStreamQuery, FeedStreamMessage } from './feed-stream';
|
|
4
7
|
export type { ResolvedBrand, LookupBrandOptions, ResolvedProperty, PropertyInfo, RegistryClientConfig, SaveBrandRequest, SaveBrandResponse, BrandLogoReviewStatus, ApprovedBrandLogoAsset, PendingBrandLogoAsset, ReviewedBrandLogoAsset, BrandLogoAsset, ListBrandLogosOptions, ListBrandLogosResponse, SaveBrandLogoInput, SaveBrandLogoResponse, UploadBrandLogoInput, UploadBrandLogoResponse, SavePropertyIdentity, RegistryPropertyIdentity, SavePropertyRequest, SavePropertyResponse, ResolveIdentifiersRequest, ResolveIdentifiersResponse, FileCatalogDisputeRequest, FileCatalogDisputeResponse, GetCatalogDisputeResponse, ClaimHostedPropertyDomainResponse, VerifyHostedPropertyOriginResponse, BrandRegistryItem, PropertyRegistryItem, ValidationResult, FederatedAgentWithDetails, FederatedPublisher, DomainLookupResult, ListBrandsOptions, ListBrandsResponse, GetBrandJsonResponse, ListOptions, ListAgentsOptions, ListAgentsResponse, ListPublishersResponse, ValidateAdagentsRequest, ValidateAdagentsResponse, CreateAdagentsRequest, CreateAdagentsResponse, AdagentsAuthorizedAgent, AdagentsCatalogFormat, AdagentsPlacementDefinition, AdagentsPlacementFormatReference, AdagentsPlacementFormatOption, AdagentsPlacementTag, CreatedAdagentsJson, CommunityMirrorAdagentsConfig, CreateCommunityMirrorAdagentsConfig, CommunityMirrorAdagentsCatalog, PublishCommunityMirrorAdagentsResponse, CommunityMirrorAdagentsSummary, ListCommunityMirrorAdagentsResponse, GetCommunityMirrorAdagentsResponse, PublishCommunityMirrorAdagentsRequest, PublishCommunityMirrorAdagentsError, DeleteCommunityMirrorAdagentsResponse, ValidateProductAuthorizationRequest, ExpandProductIdentifiersRequest, PublisherPropertySelector, CompanySearchResult, FindCompanyResult, FeedQuery, AgentSearchQuery, CrawlRequest, ManagerRevalidationRequest, ManagerRevalidationResponse, ListPoliciesQuery, ListPoliciesResponse, ResolvePolicyQuery, ResolvePolicyResponse, ResolvePoliciesBulkRequest, ResolvePoliciesBulkResponse, GetPolicyHistoryQuery, GetPolicyHistoryResponse, SavePolicyRequest, SavePolicyResponse, GetBrandHistoryQuery, GetBrandHistoryResponse, GetPropertyHistoryQuery, GetPropertyHistoryResponse, AgentComplianceDetail, StoryboardStatus, OperatorLookupResult, PublisherLookupResult, ComplianceChangedPayload, GetAgentStoryboardStatusResponse, GetAgentStoryboardStatusBulkResponse, } from './types';
|
|
@@ -151,6 +154,7 @@ export declare class RegistryClient {
|
|
|
151
154
|
concurrency?: number;
|
|
152
155
|
}): Promise<Record<string, SavePropertyResponse | {
|
|
153
156
|
error: string;
|
|
157
|
+
cause?: Error;
|
|
154
158
|
}>>;
|
|
155
159
|
/**
|
|
156
160
|
* Resolve catalog identifiers to stable property_rids.
|
|
@@ -158,6 +162,14 @@ export declare class RegistryClient {
|
|
|
158
162
|
* contribution; `lookup` mode is read-only.
|
|
159
163
|
*/
|
|
160
164
|
resolveIdentifiers(request: ResolveIdentifiersRequest): Promise<ResolveIdentifiersResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* Bulk catalog registration (`resolve`, the default) or read-only `lookup`.
|
|
167
|
+
* Splits by identifier count and UTF-8 request bytes, bounds concurrency,
|
|
168
|
+
* and honors Retry-After on 429. Results retain input order and duplicates.
|
|
169
|
+
* Network/5xx failures are not retried: resolve contributions have additive
|
|
170
|
+
* activity logs even though identifier-to-RID mapping is idempotent.
|
|
171
|
+
*/
|
|
172
|
+
resolveIdentifiersAll(request: ResolveIdentifiersRequest, options?: ResolveIdentifiersAllOptions): Promise<ResolveIdentifierOutcome[]>;
|
|
161
173
|
/** File a catalog fact dispute. Requires authentication. */
|
|
162
174
|
fileCatalogDispute(request: FileCatalogDisputeRequest): Promise<FileCatalogDisputeResponse>;
|
|
163
175
|
/** Fetch a catalog dispute by id. */
|
|
@@ -15,6 +15,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
15
15
|
}
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
18
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
20
|
var registry_exports = {};
|
|
20
21
|
__export(registry_exports, {
|
|
@@ -37,6 +38,8 @@ __export(registry_exports, {
|
|
|
37
38
|
sanitizeStreamText: () => import_feed_stream2.sanitizeStreamText
|
|
38
39
|
});
|
|
39
40
|
module.exports = __toCommonJS(registry_exports);
|
|
41
|
+
var import_identifiers = require('../identifiers.js');
|
|
42
|
+
__reExport(registry_exports, require('../identifiers.js'), module.exports);
|
|
40
43
|
var import_validation = require('../supply-path/validation.js');
|
|
41
44
|
var import_feed_stream = require('./feed-stream.js');
|
|
42
45
|
var import_sync = require('./sync.js');
|
|
@@ -51,6 +54,9 @@ const ERROR_BODY_PREVIEW_CHARS = 200;
|
|
|
51
54
|
const MAX_BRAND_BULK_DOMAINS = 25;
|
|
52
55
|
const MAX_BULK_DOMAINS = 100;
|
|
53
56
|
const MAX_CHECK_DOMAINS = 1e4;
|
|
57
|
+
const MAX_RESOLVE_IDENTIFIERS = 1e4;
|
|
58
|
+
const DEFAULT_RESOLVE_REQUEST_BYTES = 1024 * 1024;
|
|
59
|
+
const DEFAULT_RESOLVE_RESPONSE_BYTES = 16 * 1024 * 1024;
|
|
54
60
|
const COMMUNITY_MIRROR_PLATFORM_RE = /^[a-z0-9_-]{1,64}$/;
|
|
55
61
|
const MAX_REGISTRY_ERROR_DETAILS_BYTES = 64 * 1024;
|
|
56
62
|
const MAX_RETRY_AFTER_MS = 2147483647;
|
|
@@ -303,7 +309,15 @@ class RegistryClient {
|
|
|
303
309
|
}
|
|
304
310
|
/** Save or update a hosted property. Requires authentication. */
|
|
305
311
|
async saveProperty(property) {
|
|
306
|
-
if (
|
|
312
|
+
if (typeof property?.publisher_domain !== "string" || !property.publisher_domain.trim()) {
|
|
313
|
+
throw new import_identifiers.IdentifierValidationError(
|
|
314
|
+
"invalid_publisher_domain",
|
|
315
|
+
"publisher_domain",
|
|
316
|
+
"publisher_domain is required"
|
|
317
|
+
);
|
|
318
|
+
}
|
|
319
|
+
const domain = (0, import_identifiers.validatePublisherDomain)(property.publisher_domain);
|
|
320
|
+
if (!domain.ok) throw domain.error;
|
|
307
321
|
if (!this.apiKey) throw new Error("apiKey is required for save operations");
|
|
308
322
|
const payload = this.normalizeSavePropertyRequest(property);
|
|
309
323
|
return this.post(`${this.baseUrl}/api/properties/save`, payload);
|
|
@@ -335,17 +349,19 @@ class RegistryClient {
|
|
|
335
349
|
*/
|
|
336
350
|
async saveProperties(properties, options) {
|
|
337
351
|
const concurrency = options?.concurrency ?? 5;
|
|
338
|
-
|
|
352
|
+
if (!Number.isSafeInteger(concurrency) || concurrency < 1)
|
|
353
|
+
throw new RangeError("concurrency must be a positive integer");
|
|
354
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
339
355
|
for (let i = 0; i < properties.length; i += concurrency) {
|
|
340
356
|
const batch = properties.slice(i, i + concurrency);
|
|
341
357
|
const settled = await Promise.allSettled(batch.map((p) => this.saveProperty(p)));
|
|
342
358
|
for (let j = 0; j < batch.length; j++) {
|
|
343
359
|
const domain = batch[j].publisher_domain;
|
|
344
360
|
const s = settled[j];
|
|
345
|
-
results[domain] = s.status === "fulfilled" ? s.value : { error: String(s.reason) };
|
|
361
|
+
results[domain] = s.status === "fulfilled" ? s.value : { error: String(s.reason), ...s.reason instanceof Error ? { cause: s.reason } : {} };
|
|
346
362
|
}
|
|
347
363
|
}
|
|
348
|
-
return results;
|
|
364
|
+
return Object.fromEntries(Object.entries(results));
|
|
349
365
|
}
|
|
350
366
|
/**
|
|
351
367
|
* Resolve catalog identifiers to stable property_rids.
|
|
@@ -354,11 +370,147 @@ class RegistryClient {
|
|
|
354
370
|
*/
|
|
355
371
|
async resolveIdentifiers(request) {
|
|
356
372
|
if (!request?.identifiers?.length) throw new Error("identifiers are required");
|
|
373
|
+
if (request.identifiers.length > MAX_RESOLVE_IDENTIFIERS) {
|
|
374
|
+
throw new RangeError("At most 10,000 identifiers are allowed; use resolveIdentifiersAll for larger lists");
|
|
375
|
+
}
|
|
357
376
|
if ((request.mode ?? "resolve") !== "lookup" && !this.apiKey) {
|
|
358
377
|
throw new Error("apiKey is required for resolveIdentifiers in resolve mode");
|
|
359
378
|
}
|
|
360
379
|
return this.post(`${this.baseUrl}/api/registry/resolve`, request);
|
|
361
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* Bulk catalog registration (`resolve`, the default) or read-only `lookup`.
|
|
383
|
+
* Splits by identifier count and UTF-8 request bytes, bounds concurrency,
|
|
384
|
+
* and honors Retry-After on 429. Results retain input order and duplicates.
|
|
385
|
+
* Network/5xx failures are not retried: resolve contributions have additive
|
|
386
|
+
* activity logs even though identifier-to-RID mapping is idempotent.
|
|
387
|
+
*/
|
|
388
|
+
async resolveIdentifiersAll(request, options = {}) {
|
|
389
|
+
const {
|
|
390
|
+
batchSize = MAX_RESOLVE_IDENTIFIERS,
|
|
391
|
+
maxRequestBytes = DEFAULT_RESOLVE_REQUEST_BYTES,
|
|
392
|
+
concurrency = 2,
|
|
393
|
+
maxRetries = 3,
|
|
394
|
+
maxRetryDelayMs = 6e4
|
|
395
|
+
} = options;
|
|
396
|
+
for (const [name, value, minimum] of [
|
|
397
|
+
["batchSize", batchSize, 1],
|
|
398
|
+
["maxRequestBytes", maxRequestBytes, 1],
|
|
399
|
+
["concurrency", concurrency, 1],
|
|
400
|
+
["maxRetries", maxRetries, 0],
|
|
401
|
+
["maxRetryDelayMs", maxRetryDelayMs, 0]
|
|
402
|
+
]) {
|
|
403
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
404
|
+
throw new RangeError(`${name} must be an integer >= ${minimum}`);
|
|
405
|
+
}
|
|
406
|
+
if (batchSize > MAX_RESOLVE_IDENTIFIERS) throw new RangeError("batchSize must not exceed 10,000");
|
|
407
|
+
if (!Array.isArray(request?.identifiers)) throw new TypeError("identifiers are required");
|
|
408
|
+
if ((request.mode ?? "resolve") !== "lookup" && !this.apiKey)
|
|
409
|
+
throw new Error("apiKey is required for resolveIdentifiers in resolve mode");
|
|
410
|
+
const { identifiers, ...envelope } = request;
|
|
411
|
+
const envelopeBytes = Buffer.byteLength(JSON.stringify({ ...envelope, identifiers: [] }), "utf8");
|
|
412
|
+
const outcomes = new Array(identifiers.length);
|
|
413
|
+
const batches = [];
|
|
414
|
+
let batch = { indexes: [], identifiers: [] };
|
|
415
|
+
let bytes = envelopeBytes;
|
|
416
|
+
for (const [index, identifier] of identifiers.entries()) {
|
|
417
|
+
if (!identifier || typeof identifier !== "object" || typeof identifier.type !== "string" || typeof identifier.value !== "string") {
|
|
418
|
+
outcomes[index] = {
|
|
419
|
+
index,
|
|
420
|
+
identifier,
|
|
421
|
+
success: false,
|
|
422
|
+
error: new TypeError("Identifier must contain string type and value")
|
|
423
|
+
};
|
|
424
|
+
continue;
|
|
425
|
+
}
|
|
426
|
+
const size = Buffer.byteLength(JSON.stringify(identifier), "utf8");
|
|
427
|
+
if (envelopeBytes + size > maxRequestBytes) {
|
|
428
|
+
outcomes[index] = {
|
|
429
|
+
index,
|
|
430
|
+
identifier,
|
|
431
|
+
success: false,
|
|
432
|
+
error: new RangeError("Identifier and provenance exceed maxRequestBytes")
|
|
433
|
+
};
|
|
434
|
+
continue;
|
|
435
|
+
}
|
|
436
|
+
if (batch.indexes.length && (batch.indexes.length >= batchSize || bytes + size + 1 > maxRequestBytes)) {
|
|
437
|
+
batches.push(batch);
|
|
438
|
+
batch = { indexes: [], identifiers: [] };
|
|
439
|
+
bytes = envelopeBytes;
|
|
440
|
+
}
|
|
441
|
+
bytes += size + (batch.indexes.length ? 1 : 0);
|
|
442
|
+
batch.indexes.push(index);
|
|
443
|
+
batch.identifiers.push(identifier);
|
|
444
|
+
}
|
|
445
|
+
if (batch.indexes.length) batches.push(batch);
|
|
446
|
+
let nextBatch = 0;
|
|
447
|
+
let retryNotBefore = 0;
|
|
448
|
+
let rateLimitFailure;
|
|
449
|
+
const worker = async () => {
|
|
450
|
+
while (nextBatch < batches.length) {
|
|
451
|
+
const current = batches[nextBatch++];
|
|
452
|
+
let response;
|
|
453
|
+
let failure;
|
|
454
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
455
|
+
if (rateLimitFailure) {
|
|
456
|
+
failure = rateLimitFailure;
|
|
457
|
+
break;
|
|
458
|
+
}
|
|
459
|
+
while (!rateLimitFailure && retryNotBefore > Date.now())
|
|
460
|
+
await new Promise(
|
|
461
|
+
(resolve) => setTimeout(resolve, Math.min(retryNotBefore - Date.now(), MAX_RETRY_AFTER_MS))
|
|
462
|
+
);
|
|
463
|
+
if (rateLimitFailure) {
|
|
464
|
+
failure = rateLimitFailure;
|
|
465
|
+
break;
|
|
466
|
+
}
|
|
467
|
+
try {
|
|
468
|
+
response = await this.resolveIdentifiers({ ...envelope, identifiers: current.identifiers });
|
|
469
|
+
if (!response || !Array.isArray(response.resolved)) {
|
|
470
|
+
throw new TypeError("Registry returned an invalid identifier resolution response");
|
|
471
|
+
}
|
|
472
|
+
break;
|
|
473
|
+
} catch (error) {
|
|
474
|
+
response = void 0;
|
|
475
|
+
failure = error instanceof Error ? error : new Error("Registry resolution failed");
|
|
476
|
+
if (!isRegistryRequestError(error) || error.status !== 429) break;
|
|
477
|
+
const delay = typeof error.retryAfterMs === "number" && Number.isFinite(error.retryAfterMs) && error.retryAfterMs >= 0 ? error.retryAfterMs : Math.min(1e3 * 2 ** attempt, 3e4);
|
|
478
|
+
if (delay > maxRetryDelayMs) {
|
|
479
|
+
rateLimitFailure = error;
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
retryNotBefore = Math.max(retryNotBefore, Date.now() + delay);
|
|
483
|
+
if (attempt === maxRetries) break;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
const entries = /* @__PURE__ */ new Map();
|
|
487
|
+
let malformedEntries = false;
|
|
488
|
+
for (const entry of response?.resolved ?? []) {
|
|
489
|
+
if (!entry || typeof entry !== "object" || !entry.identifier || typeof entry.identifier.type !== "string" || typeof entry.identifier.value !== "string" || entry.property_rid !== null && typeof entry.property_rid !== "string" || !["existing", "created", "excluded"].includes(entry.status)) {
|
|
490
|
+
malformedEntries = true;
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
const key = JSON.stringify([entry.identifier.type, entry.identifier.value]);
|
|
494
|
+
const group = entries.get(key) ?? [];
|
|
495
|
+
group.push(entry);
|
|
496
|
+
entries.set(key, group);
|
|
497
|
+
}
|
|
498
|
+
for (const index of current.indexes) {
|
|
499
|
+
const identifier = identifiers[index];
|
|
500
|
+
const group = entries.get(JSON.stringify([identifier.type, identifier.value]));
|
|
501
|
+
const entry = group && (group.length > 1 ? group.shift() : group[0]);
|
|
502
|
+
outcomes[index] = entry ? { index, identifier, success: true, result: entry } : {
|
|
503
|
+
index,
|
|
504
|
+
identifier,
|
|
505
|
+
success: false,
|
|
506
|
+
error: response ? malformedEntries ? new TypeError("Registry returned an invalid identifier resolution response") : new Error("Registry response omitted identifier") : failure
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
};
|
|
511
|
+
await Promise.all(Array.from({ length: Math.min(concurrency, batches.length) }, worker));
|
|
512
|
+
return outcomes;
|
|
513
|
+
}
|
|
362
514
|
/** File a catalog fact dispute. Requires authentication. */
|
|
363
515
|
async fileCatalogDispute(request) {
|
|
364
516
|
if (!request?.subject_type?.trim()) throw new Error("subject_type is required");
|
|
@@ -1130,6 +1282,7 @@ class RegistryClient {
|
|
|
1130
1282
|
bodyLimitForUrl(url) {
|
|
1131
1283
|
if (this.hasCustomMaxBodyBytes) return this.maxBodyBytes;
|
|
1132
1284
|
const path = new URL(url).pathname;
|
|
1285
|
+
if (path === "/api/registry/resolve") return DEFAULT_RESOLVE_RESPONSE_BYTES;
|
|
1133
1286
|
if (path === "/api/brands/registry" || path === "/api/brands/resolve/bulk" || path === "/api/properties/registry" || path === "/api/properties/resolve/bulk" || path === "/api/registry/agents" || path === "/api/registry/publishers" || path === "/api/registry/feed" || path === "/api/registry/mirrors" || path === "/api/registry/agents/search" || path === "/api/registry/authorizations" || path === "/api/registry/authorizations/snapshot" || path === "/api/search" || path === "/api/policies/registry" || path === "/api/policies/resolve/bulk" || path === "/api/public/discover-agent" || path === "/api/public/agent-formats" || path === "/api/public/agent-products" || path === "/api/public/validate-publisher" || path === "/api/registry/agents/storyboard-status" || path.startsWith("/api/registry/agents/") && path.endsWith("/storyboard-status") || path.startsWith("/api/registry/mirrors/") || path.startsWith("/api/properties/check")) {
|
|
1134
1287
|
return DEFAULT_LARGE_RESPONSE_MAX_BODY_BYTES;
|
|
1135
1288
|
}
|
|
@@ -1239,5 +1392,6 @@ class RegistryClient {
|
|
|
1239
1392
|
isRegistryRequestError,
|
|
1240
1393
|
openFeedStream,
|
|
1241
1394
|
parseSseStream,
|
|
1242
|
-
sanitizeStreamText
|
|
1395
|
+
sanitizeStreamText,
|
|
1396
|
+
...require('../identifiers.js')
|
|
1243
1397
|
});
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { validatePublisherDomain, IdentifierValidationError } from "../identifiers.mjs";
|
|
2
|
+
export * from "../identifiers.mjs";
|
|
1
3
|
import { validateSupplyPathRequest, assertRegistrySupplyPathResult } from "../supply-path/validation.mjs";
|
|
2
4
|
import { openFeedStream } from "./feed-stream.mjs";
|
|
3
5
|
import { RegistrySync } from "./sync.mjs";
|
|
@@ -22,6 +24,9 @@ const ERROR_BODY_PREVIEW_CHARS = 200;
|
|
|
22
24
|
const MAX_BRAND_BULK_DOMAINS = 25;
|
|
23
25
|
const MAX_BULK_DOMAINS = 100;
|
|
24
26
|
const MAX_CHECK_DOMAINS = 1e4;
|
|
27
|
+
const MAX_RESOLVE_IDENTIFIERS = 1e4;
|
|
28
|
+
const DEFAULT_RESOLVE_REQUEST_BYTES = 1024 * 1024;
|
|
29
|
+
const DEFAULT_RESOLVE_RESPONSE_BYTES = 16 * 1024 * 1024;
|
|
25
30
|
const COMMUNITY_MIRROR_PLATFORM_RE = /^[a-z0-9_-]{1,64}$/;
|
|
26
31
|
const MAX_REGISTRY_ERROR_DETAILS_BYTES = 64 * 1024;
|
|
27
32
|
const MAX_RETRY_AFTER_MS = 2147483647;
|
|
@@ -274,7 +279,15 @@ class RegistryClient {
|
|
|
274
279
|
}
|
|
275
280
|
/** Save or update a hosted property. Requires authentication. */
|
|
276
281
|
async saveProperty(property) {
|
|
277
|
-
if (
|
|
282
|
+
if (typeof property?.publisher_domain !== "string" || !property.publisher_domain.trim()) {
|
|
283
|
+
throw new IdentifierValidationError(
|
|
284
|
+
"invalid_publisher_domain",
|
|
285
|
+
"publisher_domain",
|
|
286
|
+
"publisher_domain is required"
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
const domain = validatePublisherDomain(property.publisher_domain);
|
|
290
|
+
if (!domain.ok) throw domain.error;
|
|
278
291
|
if (!this.apiKey) throw new Error("apiKey is required for save operations");
|
|
279
292
|
const payload = this.normalizeSavePropertyRequest(property);
|
|
280
293
|
return this.post(`${this.baseUrl}/api/properties/save`, payload);
|
|
@@ -306,17 +319,19 @@ class RegistryClient {
|
|
|
306
319
|
*/
|
|
307
320
|
async saveProperties(properties, options) {
|
|
308
321
|
const concurrency = options?.concurrency ?? 5;
|
|
309
|
-
|
|
322
|
+
if (!Number.isSafeInteger(concurrency) || concurrency < 1)
|
|
323
|
+
throw new RangeError("concurrency must be a positive integer");
|
|
324
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
310
325
|
for (let i = 0; i < properties.length; i += concurrency) {
|
|
311
326
|
const batch = properties.slice(i, i + concurrency);
|
|
312
327
|
const settled = await Promise.allSettled(batch.map((p) => this.saveProperty(p)));
|
|
313
328
|
for (let j = 0; j < batch.length; j++) {
|
|
314
329
|
const domain = batch[j].publisher_domain;
|
|
315
330
|
const s = settled[j];
|
|
316
|
-
results[domain] = s.status === "fulfilled" ? s.value : { error: String(s.reason) };
|
|
331
|
+
results[domain] = s.status === "fulfilled" ? s.value : { error: String(s.reason), ...s.reason instanceof Error ? { cause: s.reason } : {} };
|
|
317
332
|
}
|
|
318
333
|
}
|
|
319
|
-
return results;
|
|
334
|
+
return Object.fromEntries(Object.entries(results));
|
|
320
335
|
}
|
|
321
336
|
/**
|
|
322
337
|
* Resolve catalog identifiers to stable property_rids.
|
|
@@ -325,11 +340,147 @@ class RegistryClient {
|
|
|
325
340
|
*/
|
|
326
341
|
async resolveIdentifiers(request) {
|
|
327
342
|
if (!request?.identifiers?.length) throw new Error("identifiers are required");
|
|
343
|
+
if (request.identifiers.length > MAX_RESOLVE_IDENTIFIERS) {
|
|
344
|
+
throw new RangeError("At most 10,000 identifiers are allowed; use resolveIdentifiersAll for larger lists");
|
|
345
|
+
}
|
|
328
346
|
if ((request.mode ?? "resolve") !== "lookup" && !this.apiKey) {
|
|
329
347
|
throw new Error("apiKey is required for resolveIdentifiers in resolve mode");
|
|
330
348
|
}
|
|
331
349
|
return this.post(`${this.baseUrl}/api/registry/resolve`, request);
|
|
332
350
|
}
|
|
351
|
+
/**
|
|
352
|
+
* Bulk catalog registration (`resolve`, the default) or read-only `lookup`.
|
|
353
|
+
* Splits by identifier count and UTF-8 request bytes, bounds concurrency,
|
|
354
|
+
* and honors Retry-After on 429. Results retain input order and duplicates.
|
|
355
|
+
* Network/5xx failures are not retried: resolve contributions have additive
|
|
356
|
+
* activity logs even though identifier-to-RID mapping is idempotent.
|
|
357
|
+
*/
|
|
358
|
+
async resolveIdentifiersAll(request, options = {}) {
|
|
359
|
+
const {
|
|
360
|
+
batchSize = MAX_RESOLVE_IDENTIFIERS,
|
|
361
|
+
maxRequestBytes = DEFAULT_RESOLVE_REQUEST_BYTES,
|
|
362
|
+
concurrency = 2,
|
|
363
|
+
maxRetries = 3,
|
|
364
|
+
maxRetryDelayMs = 6e4
|
|
365
|
+
} = options;
|
|
366
|
+
for (const [name, value, minimum] of [
|
|
367
|
+
["batchSize", batchSize, 1],
|
|
368
|
+
["maxRequestBytes", maxRequestBytes, 1],
|
|
369
|
+
["concurrency", concurrency, 1],
|
|
370
|
+
["maxRetries", maxRetries, 0],
|
|
371
|
+
["maxRetryDelayMs", maxRetryDelayMs, 0]
|
|
372
|
+
]) {
|
|
373
|
+
if (!Number.isSafeInteger(value) || value < minimum)
|
|
374
|
+
throw new RangeError(`${name} must be an integer >= ${minimum}`);
|
|
375
|
+
}
|
|
376
|
+
if (batchSize > MAX_RESOLVE_IDENTIFIERS) throw new RangeError("batchSize must not exceed 10,000");
|
|
377
|
+
if (!Array.isArray(request?.identifiers)) throw new TypeError("identifiers are required");
|
|
378
|
+
if ((request.mode ?? "resolve") !== "lookup" && !this.apiKey)
|
|
379
|
+
throw new Error("apiKey is required for resolveIdentifiers in resolve mode");
|
|
380
|
+
const { identifiers, ...envelope } = request;
|
|
381
|
+
const envelopeBytes = Buffer.byteLength(JSON.stringify({ ...envelope, identifiers: [] }), "utf8");
|
|
382
|
+
const outcomes = new Array(identifiers.length);
|
|
383
|
+
const batches = [];
|
|
384
|
+
let batch = { indexes: [], identifiers: [] };
|
|
385
|
+
let bytes = envelopeBytes;
|
|
386
|
+
for (const [index, identifier] of identifiers.entries()) {
|
|
387
|
+
if (!identifier || typeof identifier !== "object" || typeof identifier.type !== "string" || typeof identifier.value !== "string") {
|
|
388
|
+
outcomes[index] = {
|
|
389
|
+
index,
|
|
390
|
+
identifier,
|
|
391
|
+
success: false,
|
|
392
|
+
error: new TypeError("Identifier must contain string type and value")
|
|
393
|
+
};
|
|
394
|
+
continue;
|
|
395
|
+
}
|
|
396
|
+
const size = Buffer.byteLength(JSON.stringify(identifier), "utf8");
|
|
397
|
+
if (envelopeBytes + size > maxRequestBytes) {
|
|
398
|
+
outcomes[index] = {
|
|
399
|
+
index,
|
|
400
|
+
identifier,
|
|
401
|
+
success: false,
|
|
402
|
+
error: new RangeError("Identifier and provenance exceed maxRequestBytes")
|
|
403
|
+
};
|
|
404
|
+
continue;
|
|
405
|
+
}
|
|
406
|
+
if (batch.indexes.length && (batch.indexes.length >= batchSize || bytes + size + 1 > maxRequestBytes)) {
|
|
407
|
+
batches.push(batch);
|
|
408
|
+
batch = { indexes: [], identifiers: [] };
|
|
409
|
+
bytes = envelopeBytes;
|
|
410
|
+
}
|
|
411
|
+
bytes += size + (batch.indexes.length ? 1 : 0);
|
|
412
|
+
batch.indexes.push(index);
|
|
413
|
+
batch.identifiers.push(identifier);
|
|
414
|
+
}
|
|
415
|
+
if (batch.indexes.length) batches.push(batch);
|
|
416
|
+
let nextBatch = 0;
|
|
417
|
+
let retryNotBefore = 0;
|
|
418
|
+
let rateLimitFailure;
|
|
419
|
+
const worker = async () => {
|
|
420
|
+
while (nextBatch < batches.length) {
|
|
421
|
+
const current = batches[nextBatch++];
|
|
422
|
+
let response;
|
|
423
|
+
let failure;
|
|
424
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
425
|
+
if (rateLimitFailure) {
|
|
426
|
+
failure = rateLimitFailure;
|
|
427
|
+
break;
|
|
428
|
+
}
|
|
429
|
+
while (!rateLimitFailure && retryNotBefore > Date.now())
|
|
430
|
+
await new Promise(
|
|
431
|
+
(resolve) => setTimeout(resolve, Math.min(retryNotBefore - Date.now(), MAX_RETRY_AFTER_MS))
|
|
432
|
+
);
|
|
433
|
+
if (rateLimitFailure) {
|
|
434
|
+
failure = rateLimitFailure;
|
|
435
|
+
break;
|
|
436
|
+
}
|
|
437
|
+
try {
|
|
438
|
+
response = await this.resolveIdentifiers({ ...envelope, identifiers: current.identifiers });
|
|
439
|
+
if (!response || !Array.isArray(response.resolved)) {
|
|
440
|
+
throw new TypeError("Registry returned an invalid identifier resolution response");
|
|
441
|
+
}
|
|
442
|
+
break;
|
|
443
|
+
} catch (error) {
|
|
444
|
+
response = void 0;
|
|
445
|
+
failure = error instanceof Error ? error : new Error("Registry resolution failed");
|
|
446
|
+
if (!isRegistryRequestError(error) || error.status !== 429) break;
|
|
447
|
+
const delay = typeof error.retryAfterMs === "number" && Number.isFinite(error.retryAfterMs) && error.retryAfterMs >= 0 ? error.retryAfterMs : Math.min(1e3 * 2 ** attempt, 3e4);
|
|
448
|
+
if (delay > maxRetryDelayMs) {
|
|
449
|
+
rateLimitFailure = error;
|
|
450
|
+
break;
|
|
451
|
+
}
|
|
452
|
+
retryNotBefore = Math.max(retryNotBefore, Date.now() + delay);
|
|
453
|
+
if (attempt === maxRetries) break;
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
const entries = /* @__PURE__ */ new Map();
|
|
457
|
+
let malformedEntries = false;
|
|
458
|
+
for (const entry of response?.resolved ?? []) {
|
|
459
|
+
if (!entry || typeof entry !== "object" || !entry.identifier || typeof entry.identifier.type !== "string" || typeof entry.identifier.value !== "string" || entry.property_rid !== null && typeof entry.property_rid !== "string" || !["existing", "created", "excluded"].includes(entry.status)) {
|
|
460
|
+
malformedEntries = true;
|
|
461
|
+
continue;
|
|
462
|
+
}
|
|
463
|
+
const key = JSON.stringify([entry.identifier.type, entry.identifier.value]);
|
|
464
|
+
const group = entries.get(key) ?? [];
|
|
465
|
+
group.push(entry);
|
|
466
|
+
entries.set(key, group);
|
|
467
|
+
}
|
|
468
|
+
for (const index of current.indexes) {
|
|
469
|
+
const identifier = identifiers[index];
|
|
470
|
+
const group = entries.get(JSON.stringify([identifier.type, identifier.value]));
|
|
471
|
+
const entry = group && (group.length > 1 ? group.shift() : group[0]);
|
|
472
|
+
outcomes[index] = entry ? { index, identifier, success: true, result: entry } : {
|
|
473
|
+
index,
|
|
474
|
+
identifier,
|
|
475
|
+
success: false,
|
|
476
|
+
error: response ? malformedEntries ? new TypeError("Registry returned an invalid identifier resolution response") : new Error("Registry response omitted identifier") : failure
|
|
477
|
+
};
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
await Promise.all(Array.from({ length: Math.min(concurrency, batches.length) }, worker));
|
|
482
|
+
return outcomes;
|
|
483
|
+
}
|
|
333
484
|
/** File a catalog fact dispute. Requires authentication. */
|
|
334
485
|
async fileCatalogDispute(request) {
|
|
335
486
|
if (!request?.subject_type?.trim()) throw new Error("subject_type is required");
|
|
@@ -1101,6 +1252,7 @@ class RegistryClient {
|
|
|
1101
1252
|
bodyLimitForUrl(url) {
|
|
1102
1253
|
if (this.hasCustomMaxBodyBytes) return this.maxBodyBytes;
|
|
1103
1254
|
const path = new URL(url).pathname;
|
|
1255
|
+
if (path === "/api/registry/resolve") return DEFAULT_RESOLVE_RESPONSE_BYTES;
|
|
1104
1256
|
if (path === "/api/brands/registry" || path === "/api/brands/resolve/bulk" || path === "/api/properties/registry" || path === "/api/properties/resolve/bulk" || path === "/api/registry/agents" || path === "/api/registry/publishers" || path === "/api/registry/feed" || path === "/api/registry/mirrors" || path === "/api/registry/agents/search" || path === "/api/registry/authorizations" || path === "/api/registry/authorizations/snapshot" || path === "/api/search" || path === "/api/policies/registry" || path === "/api/policies/resolve/bulk" || path === "/api/public/discover-agent" || path === "/api/public/agent-formats" || path === "/api/public/agent-products" || path === "/api/public/validate-publisher" || path === "/api/registry/agents/storyboard-status" || path.startsWith("/api/registry/agents/") && path.endsWith("/storyboard-status") || path.startsWith("/api/registry/mirrors/") || path.startsWith("/api/properties/check")) {
|
|
1105
1257
|
return DEFAULT_LARGE_RESPONSE_MAX_BODY_BYTES;
|
|
1106
1258
|
}
|
|
@@ -144,12 +144,36 @@ export type SavePropertyRequest = Omit<RegistrySavePropertyRequest, 'authorized_
|
|
|
144
144
|
/** Response from POST /api/properties/save (200) */
|
|
145
145
|
export type SavePropertyResponse = operations['saveProperty']['responses']['200']['content']['application/json'];
|
|
146
146
|
type RegistryResolveIdentifiersRequest = NonNullable<operations['resolveIdentifiers']['requestBody']>['content']['application/json'];
|
|
147
|
-
/** Request body for POST /api/registry/resolve.
|
|
148
|
-
export type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode'> & {
|
|
147
|
+
/** Request body for POST /api/registry/resolve. Mode and sandbox use the registry's defaults when omitted. */
|
|
148
|
+
export type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode' | 'sandbox'> & {
|
|
149
149
|
mode?: RegistryResolveIdentifiersRequest['mode'];
|
|
150
|
+
sandbox?: RegistryResolveIdentifiersRequest['sandbox'];
|
|
150
151
|
};
|
|
151
152
|
/** Response from POST /api/registry/resolve (200) */
|
|
152
153
|
export type ResolveIdentifiersResponse = operations['resolveIdentifiers']['responses']['200']['content']['application/json'];
|
|
154
|
+
export interface ResolveIdentifiersAllOptions {
|
|
155
|
+
/** Per-request identifier cap, from 1 through the registry limit of 10,000. */
|
|
156
|
+
batchSize?: number;
|
|
157
|
+
/** UTF-8 JSON request cap including provenance and envelope. Default: 1 MiB. */
|
|
158
|
+
maxRequestBytes?: number;
|
|
159
|
+
/** Maximum simultaneous requests. Default: 2. */
|
|
160
|
+
concurrency?: number;
|
|
161
|
+
/** Retries for HTTP 429 only. Other failures are returned without retrying contributions. Default: 3. */
|
|
162
|
+
maxRetries?: number;
|
|
163
|
+
/** Maximum server-requested retry delay. Default: 60 seconds; longer rate limits return errors without early retries. */
|
|
164
|
+
maxRetryDelayMs?: number;
|
|
165
|
+
}
|
|
166
|
+
/** One outcome per input, in input order (including duplicates). */
|
|
167
|
+
export type ResolveIdentifierOutcome = {
|
|
168
|
+
index: number;
|
|
169
|
+
identifier: ResolveIdentifiersRequest['identifiers'][number];
|
|
170
|
+
} & ({
|
|
171
|
+
success: true;
|
|
172
|
+
result: ResolveIdentifiersResponse['resolved'][number];
|
|
173
|
+
} | {
|
|
174
|
+
success: false;
|
|
175
|
+
error: Error;
|
|
176
|
+
});
|
|
153
177
|
/** Request body for POST /api/registry/catalog/disputes */
|
|
154
178
|
export type FileCatalogDisputeRequest = NonNullable<operations['fileCatalogDispute']['requestBody']>['content']['application/json'];
|
|
155
179
|
/** Response from POST /api/registry/catalog/disputes (200) */
|
|
@@ -144,12 +144,36 @@ export type SavePropertyRequest = Omit<RegistrySavePropertyRequest, 'authorized_
|
|
|
144
144
|
/** Response from POST /api/properties/save (200) */
|
|
145
145
|
export type SavePropertyResponse = operations['saveProperty']['responses']['200']['content']['application/json'];
|
|
146
146
|
type RegistryResolveIdentifiersRequest = NonNullable<operations['resolveIdentifiers']['requestBody']>['content']['application/json'];
|
|
147
|
-
/** Request body for POST /api/registry/resolve.
|
|
148
|
-
export type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode'> & {
|
|
147
|
+
/** Request body for POST /api/registry/resolve. Mode and sandbox use the registry's defaults when omitted. */
|
|
148
|
+
export type ResolveIdentifiersRequest = Omit<RegistryResolveIdentifiersRequest, 'mode' | 'sandbox'> & {
|
|
149
149
|
mode?: RegistryResolveIdentifiersRequest['mode'];
|
|
150
|
+
sandbox?: RegistryResolveIdentifiersRequest['sandbox'];
|
|
150
151
|
};
|
|
151
152
|
/** Response from POST /api/registry/resolve (200) */
|
|
152
153
|
export type ResolveIdentifiersResponse = operations['resolveIdentifiers']['responses']['200']['content']['application/json'];
|
|
154
|
+
export interface ResolveIdentifiersAllOptions {
|
|
155
|
+
/** Per-request identifier cap, from 1 through the registry limit of 10,000. */
|
|
156
|
+
batchSize?: number;
|
|
157
|
+
/** UTF-8 JSON request cap including provenance and envelope. Default: 1 MiB. */
|
|
158
|
+
maxRequestBytes?: number;
|
|
159
|
+
/** Maximum simultaneous requests. Default: 2. */
|
|
160
|
+
concurrency?: number;
|
|
161
|
+
/** Retries for HTTP 429 only. Other failures are returned without retrying contributions. Default: 3. */
|
|
162
|
+
maxRetries?: number;
|
|
163
|
+
/** Maximum server-requested retry delay. Default: 60 seconds; longer rate limits return errors without early retries. */
|
|
164
|
+
maxRetryDelayMs?: number;
|
|
165
|
+
}
|
|
166
|
+
/** One outcome per input, in input order (including duplicates). */
|
|
167
|
+
export type ResolveIdentifierOutcome = {
|
|
168
|
+
index: number;
|
|
169
|
+
identifier: ResolveIdentifiersRequest['identifiers'][number];
|
|
170
|
+
} & ({
|
|
171
|
+
success: true;
|
|
172
|
+
result: ResolveIdentifiersResponse['resolved'][number];
|
|
173
|
+
} | {
|
|
174
|
+
success: false;
|
|
175
|
+
error: Error;
|
|
176
|
+
});
|
|
153
177
|
/** Request body for POST /api/registry/catalog/disputes */
|
|
154
178
|
export type FileCatalogDisputeRequest = NonNullable<operations['fileCatalogDispute']['requestBody']>['content']['application/json'];
|
|
155
179
|
/** Response from POST /api/registry/catalog/disputes (200) */
|