@adcp/sdk 16.0.0-beta.6 → 16.0.0-beta.8
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/README.md +17 -0
- 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/SingleAgentClient.d.mts +13 -3
- package/dist/lib/core/SingleAgentClient.d.ts +13 -3
- package/dist/lib/core/SingleAgentClient.js +109 -21
- package/dist/lib/core/SingleAgentClient.mjs +112 -22
- package/dist/lib/core/TaskExecutor.d.mts +1 -0
- package/dist/lib/core/TaskExecutor.d.ts +1 -0
- package/dist/lib/core/TaskExecutor.js +48 -34
- package/dist/lib/core/TaskExecutor.mjs +49 -35
- 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/identity-3.3/revocation.js +5 -4
- package/dist/lib/identity-3.3/revocation.mjs +5 -4
- package/dist/lib/index.d.mts +3 -1
- package/dist/lib/index.d.ts +3 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.mjs +1 -0
- 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/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/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 +23 -0
- package/dist/lib/registry/types.d.ts +23 -0
- package/dist/lib/schemas-data/v2.5/_provenance.json +1 -1
- package/dist/lib/server/auth-signature.js +23 -2
- package/dist/lib/server/auth-signature.mjs +26 -2
- package/dist/lib/server/auth.d.mts +6 -0
- package/dist/lib/server/auth.d.ts +6 -0
- package/dist/lib/server/auth.js +6 -0
- package/dist/lib/server/auth.mjs +6 -0
- package/dist/lib/server/create-adcp-server.js +19 -3
- package/dist/lib/server/create-adcp-server.mjs +23 -4
- package/dist/lib/server/decisioning/runtime/from-platform.js +6 -2
- package/dist/lib/server/decisioning/runtime/from-platform.mjs +6 -2
- 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/serve.js +2 -1
- package/dist/lib/server/serve.mjs +2 -1
- 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/server/webhook-emitter.js +1 -0
- package/dist/lib/server/webhook-emitter.mjs +2 -1
- package/dist/lib/signing/crypto.d.mts +1 -1
- package/dist/lib/signing/crypto.d.ts +1 -1
- package/dist/lib/signing/crypto.js +37 -2
- package/dist/lib/signing/crypto.mjs +37 -2
- package/dist/lib/signing/parser.d.mts +6 -0
- package/dist/lib/signing/parser.d.ts +6 -0
- package/dist/lib/signing/parser.js +7 -3
- package/dist/lib/signing/parser.mjs +6 -3
- 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/web-bot-auth.d.mts +61 -22
- package/dist/lib/signing/web-bot-auth.d.ts +61 -22
- package/dist/lib/signing/web-bot-auth.js +286 -266
- package/dist/lib/signing/web-bot-auth.mjs +288 -277
- 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/client.js +3 -5
- package/dist/lib/testing/client.mjs +4 -6
- package/dist/lib/testing/compliance/comply.js +7 -2
- package/dist/lib/testing/compliance/comply.mjs +8 -3
- package/dist/lib/testing/index.d.mts +1 -1
- package/dist/lib/testing/index.d.ts +1 -1
- package/dist/lib/testing/index.js +4 -2
- package/dist/lib/testing/index.mjs +8 -2
- package/dist/lib/testing/storyboard/runner.js +12 -12
- package/dist/lib/testing/storyboard/runner.mjs +14 -13
- 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 +23 -1
- package/dist/lib/testing/storyboard/validations.mjs +28 -2
- package/dist/lib/testing/types.d.mts +39 -0
- package/dist/lib/testing/types.d.ts +39 -0
- package/dist/lib/v2/projection/augment-response.js +6 -3
- package/dist/lib/v2/projection/augment-response.mjs +8 -5
- package/dist/lib/v2/projection/creative-delivery.js +29 -17
- package/dist/lib/v2/projection/creative-delivery.mjs +31 -18
- package/dist/lib/v2/projection/v1-to-v2.d.mts +7 -0
- package/dist/lib/v2/projection/v1-to-v2.d.ts +7 -0
- package/dist/lib/v2/projection/v1-to-v2.js +70 -2
- package/dist/lib/v2/projection/v1-to-v2.mjs +72 -1
- package/dist/lib/validation/index.d.mts +1 -1
- package/dist/lib/validation/index.d.ts +1 -1
- package/dist/lib/validation/index.js +4 -2
- package/dist/lib/validation/index.mjs +4 -2
- package/dist/lib/validation/schema-loader.d.mts +26 -0
- package/dist/lib/validation/schema-loader.d.ts +26 -0
- package/dist/lib/validation/schema-loader.js +98 -14
- package/dist/lib/validation/schema-loader.mjs +95 -13
- package/dist/lib/version.d.mts +3 -3
- package/dist/lib/version.d.ts +3 -3
- package/dist/lib/version.js +3 -3
- package/dist/lib/version.mjs +3 -3
- package/docs/TYPE-SUMMARY.md +2 -2
- package/docs/guides/PROPERTY-LISTS.md +264 -0
- package/docs/guides/SIGNING-GUIDE.md +25 -0
- package/docs/guides/VALIDATE-YOUR-AGENT.md +34 -0
- package/docs/llms.txt +2 -2
- package/docs/migration-14.x-rc-worksheet.md +4 -4
- package/docs/migration-agent-identity-3.3.md +60 -23
- package/package.json +1 -1
|
@@ -19,10 +19,15 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var property_policy_exports = {};
|
|
20
20
|
__export(property_policy_exports, {
|
|
21
21
|
ProductPropertyPolicyError: () => ProductPropertyPolicyError,
|
|
22
|
+
isSupportedPropertyIdentifierType: () => isSupportedPropertyIdentifierType,
|
|
22
23
|
normalizeDomainForPropertyPolicy: () => normalizeDomainForPropertyPolicy,
|
|
23
24
|
validateProductsAgainstPropertyPolicy: () => validateProductsAgainstPropertyPolicy
|
|
24
25
|
});
|
|
25
26
|
module.exports = __toCommonJS(property_policy_exports);
|
|
27
|
+
var import_enums = require('../types/enums.generated.js');
|
|
28
|
+
function isSupportedPropertyIdentifierType(type) {
|
|
29
|
+
return import_enums.PropertyIdentifierTypesValues.includes(type);
|
|
30
|
+
}
|
|
26
31
|
class ProductPropertyPolicyError extends Error {
|
|
27
32
|
constructor(result) {
|
|
28
33
|
super(
|
|
@@ -82,6 +87,8 @@ function compilePolicy(policy) {
|
|
|
82
87
|
}
|
|
83
88
|
return {
|
|
84
89
|
allowedDomains,
|
|
90
|
+
publisherCatalogsConfigured: policy.publisherProperties !== void 0,
|
|
91
|
+
publisherProperties: policy.publisherProperties ?? {},
|
|
85
92
|
allowedPropertyIdentifiers: [...policy.allowedPropertyIdentifiers ?? []],
|
|
86
93
|
requireAllowedPropertyMatch: policy.requireAllowedPropertyMatch ?? Boolean(policy.allowedDomains?.length || policy.allowedPropertyIdentifiers?.length),
|
|
87
94
|
excludedDomainsByComparable,
|
|
@@ -116,6 +123,18 @@ function diagnosticsForProduct(product, productIndex, policy) {
|
|
|
116
123
|
hasEligibleSubsetSelector = true;
|
|
117
124
|
}
|
|
118
125
|
});
|
|
126
|
+
if (requiresSubsetMatch) {
|
|
127
|
+
const scopes = publisherProperties.flatMap(
|
|
128
|
+
(selector) => selector && typeof selector === "object" && !Array.isArray(selector) ? [identifierScopeForSelector(selector, policy)] : []
|
|
129
|
+
);
|
|
130
|
+
if (scopes.some((scope) => scope?.hasNonMatch) && !scopes.some((scope) => scope?.hasMatch))
|
|
131
|
+
hasEligibleSubsetSelector = false;
|
|
132
|
+
}
|
|
133
|
+
if (requiresSubsetMatch && hasEligibleSubsetSelector) {
|
|
134
|
+
for (const diagnostic of diagnostics) {
|
|
135
|
+
if (diagnostic.code === "unresolved_property_identifiers") diagnostic.severity = "flagged";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
119
138
|
if (requiresSubsetMatch && !hasEligibleSubsetSelector) {
|
|
120
139
|
diagnostics.push({
|
|
121
140
|
code: "outside_property_list",
|
|
@@ -141,6 +160,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
141
160
|
});
|
|
142
161
|
}
|
|
143
162
|
const selector = rawSelector;
|
|
163
|
+
const identifierScope = identifierScopeForSelector(selector, policy);
|
|
144
164
|
const selectionType = typeof selector.selection_type === "string" ? selector.selection_type : void 0;
|
|
145
165
|
const domainCandidates = publisherDomainCandidates(selector, path);
|
|
146
166
|
const normalizedDomains = domainCandidates.map((candidate) => ({ candidate, normalized: normalizeDomainForPropertyPolicy(candidate.raw) })).filter(
|
|
@@ -192,7 +212,27 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
192
212
|
}
|
|
193
213
|
for (const { candidate, normalized: normalizedDomain } of normalizedDomains) {
|
|
194
214
|
const matchedAllowedDomain = matchedAllowedDomainForCandidate(normalizedDomain, policy);
|
|
195
|
-
|
|
215
|
+
const needsCatalogForExclusions = policy.publisherCatalogsConfigured && (policy.excludedDomainsByComparable.size > 0 || selectionType !== "by_id" && policy.excludedPropertyIds.size > 0);
|
|
216
|
+
if ((hasAllowedPropertyScope(policy) || selectionType === "by_tag" || needsCatalogForExclusions) && identifierScope?.unknown) {
|
|
217
|
+
diagnostics.push(
|
|
218
|
+
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
219
|
+
code: "unresolved_property_identifiers",
|
|
220
|
+
identifier_types: [
|
|
221
|
+
...new Set(
|
|
222
|
+
policy.allowedPropertyIdentifiers.filter((identifier) => identifier.type !== "domain" && identifier.type !== "subdomain").map((identifier) => identifier.type)
|
|
223
|
+
)
|
|
224
|
+
],
|
|
225
|
+
message: "Publisher property identifiers could not be resolved; property-list membership is unknown.",
|
|
226
|
+
product_index: productIndex,
|
|
227
|
+
product_id: productId,
|
|
228
|
+
path,
|
|
229
|
+
publisher_property_index: selectorIndex,
|
|
230
|
+
selection_type: selectionType,
|
|
231
|
+
publisher_domain: candidate.raw
|
|
232
|
+
})
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
if (options.enforceEveryDomainInAllowedScope && hasAllowedPropertyScope(policy) && (identifierScope ? identifierScope.hasNonMatch : !matchedAllowedDomain)) {
|
|
196
236
|
diagnostics.push({
|
|
197
237
|
code: "outside_property_list",
|
|
198
238
|
severity: "rejected",
|
|
@@ -227,6 +267,19 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
227
267
|
});
|
|
228
268
|
}
|
|
229
269
|
}
|
|
270
|
+
if (options.enforceExclusions && identifierScope?.hasExcludedProperty) {
|
|
271
|
+
diagnostics.push({
|
|
272
|
+
code: "excluded_resolved_property",
|
|
273
|
+
severity: "rejected",
|
|
274
|
+
message: "Resolved publisher properties include a buyer-excluded property.",
|
|
275
|
+
product_index: productIndex,
|
|
276
|
+
product_id: productId,
|
|
277
|
+
path,
|
|
278
|
+
publisher_property_index: selectorIndex,
|
|
279
|
+
selection_type: selectionType,
|
|
280
|
+
publisher_domain: domainCandidates[0]?.raw
|
|
281
|
+
});
|
|
282
|
+
}
|
|
230
283
|
if (selectionType === "by_id") {
|
|
231
284
|
const propertyIds = stringArray(selector.property_ids);
|
|
232
285
|
const matchedPropertyIds = propertyIds.filter((id) => policy.excludedPropertyIds.has(id));
|
|
@@ -248,7 +301,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
248
301
|
matched_property_ids: matchedPropertyIds
|
|
249
302
|
});
|
|
250
303
|
}
|
|
251
|
-
} else if (selectionType === "by_tag") {
|
|
304
|
+
} else if (selectionType === "by_tag" && !identifierScope) {
|
|
252
305
|
diagnostics.push(
|
|
253
306
|
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
254
307
|
code: "unresolved_tag_selector",
|
|
@@ -264,7 +317,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
264
317
|
normalized_domains: normalizedDomains.map((entry) => entry.normalized.host)
|
|
265
318
|
})
|
|
266
319
|
);
|
|
267
|
-
} else if (selectionType !== "all") {
|
|
320
|
+
} else if (selectionType !== "all" && selectionType !== "by_tag") {
|
|
268
321
|
diagnostics.push(
|
|
269
322
|
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
270
323
|
code: "unknown_selector",
|
|
@@ -291,6 +344,14 @@ function selectorIsEligibleForSubsetTargeting(rawSelector, productIndex, selecto
|
|
|
291
344
|
if (!rawSelector || typeof rawSelector !== "object" || Array.isArray(rawSelector)) return false;
|
|
292
345
|
const selector = rawSelector;
|
|
293
346
|
if (selector.publisher_domains !== void 0) return false;
|
|
347
|
+
const identifierScope = identifierScopeForSelector(selector, policy);
|
|
348
|
+
if (identifierScope) {
|
|
349
|
+
const domain = typeof selector.publisher_domain === "string" ? normalizeDomainForPropertyPolicy(selector.publisher_domain) : void 0;
|
|
350
|
+
if (!domain || policy.excludedDomainsByComparable.has(domain.comparable)) return false;
|
|
351
|
+
if (selector.selection_type !== "all" && selector.selection_type !== "by_id" && selector.selection_type !== "by_tag")
|
|
352
|
+
return false;
|
|
353
|
+
return identifierScope.hasMatch || identifierScope.unknown && !identifierScope.hasNonMatch && policy.unknownSelectorBehavior !== "reject";
|
|
354
|
+
}
|
|
294
355
|
if (selector.selection_type === "by_tag") return false;
|
|
295
356
|
if (selector.selection_type !== "all" && selector.selection_type !== "by_id") return false;
|
|
296
357
|
const hasEligibleDomain = publisherDomainCandidates(selector, path).some((candidate) => {
|
|
@@ -317,6 +378,76 @@ function matchedAllowedDomainForCandidate(candidate, policy) {
|
|
|
317
378
|
}
|
|
318
379
|
return void 0;
|
|
319
380
|
}
|
|
381
|
+
function identifierScopeForSelector(selector, policy) {
|
|
382
|
+
if (!policy.allowedPropertyIdentifiers.some((id) => id.type !== "domain" && id.type !== "subdomain") && !policy.publisherCatalogsConfigured)
|
|
383
|
+
return void 0;
|
|
384
|
+
const propertyIds = selector.selection_type === "by_id" ? stringArray(selector.property_ids) : [];
|
|
385
|
+
const hasExcludedId = propertyIds.some((id) => policy.excludedPropertyIds.has(id));
|
|
386
|
+
const allIdsExcluded = propertyIds.length > 0 && propertyIds.every((id) => policy.excludedPropertyIds.has(id));
|
|
387
|
+
if (allIdsExcluded) return { allMatch: false, hasMatch: false, hasNonMatch: true, unknown: false };
|
|
388
|
+
const domain = typeof selector.publisher_domain === "string" ? normalizeDomainForPropertyPolicy(selector.publisher_domain) : void 0;
|
|
389
|
+
if (!domain) return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
390
|
+
if (policy.excludedDomainsByComparable.has(domain.comparable))
|
|
391
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: true, unknown: false };
|
|
392
|
+
const properties = Object.hasOwn(policy.publisherProperties, domain.host) ? policy.publisherProperties[domain.host] : void 0;
|
|
393
|
+
if (!properties && policy.publisherCatalogsConfigured)
|
|
394
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
395
|
+
if (!properties) {
|
|
396
|
+
const matchedDomain = !allIdsExcluded && Boolean(matchedAllowedDomainForCandidate(domain, policy));
|
|
397
|
+
const unknown2 = !matchedDomain && !allIdsExcluded || selector.selection_type === "by_tag";
|
|
398
|
+
return {
|
|
399
|
+
allMatch: matchedDomain && !unknown2 && !hasExcludedId,
|
|
400
|
+
hasMatch: matchedDomain && !unknown2,
|
|
401
|
+
hasNonMatch: hasExcludedId,
|
|
402
|
+
unknown: unknown2
|
|
403
|
+
};
|
|
404
|
+
}
|
|
405
|
+
if (!Array.isArray(properties) || properties.some(
|
|
406
|
+
(property) => !property || typeof property !== "object" || !Array.isArray(property.identifiers) || property.identifiers.some(
|
|
407
|
+
(identifier) => !identifier || typeof identifier.type !== "string" || typeof identifier.value !== "string"
|
|
408
|
+
) || property.tags !== void 0 && (!Array.isArray(property.tags) || property.tags.some((tag) => typeof tag !== "string"))
|
|
409
|
+
)) {
|
|
410
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
411
|
+
}
|
|
412
|
+
let selected = [...properties];
|
|
413
|
+
let missingIds = false;
|
|
414
|
+
if (selector.selection_type === "by_id") {
|
|
415
|
+
const ids = stringArray(selector.property_ids);
|
|
416
|
+
missingIds = !ids.length || ids.some((id) => !properties.some((property) => property.property_id === id));
|
|
417
|
+
selected = selected.filter((property) => property.property_id && ids.includes(property.property_id));
|
|
418
|
+
} else if (selector.selection_type === "by_tag") {
|
|
419
|
+
const tags = stringArray(selector.property_tags);
|
|
420
|
+
if (!tags.length) return { allMatch: false, hasMatch: false, hasNonMatch: false, unknown: true };
|
|
421
|
+
selected = selected.filter((property) => property.tags?.some((tag) => tags.includes(tag)));
|
|
422
|
+
} else if (selector.selection_type !== "all") {
|
|
423
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: false, unknown: true };
|
|
424
|
+
}
|
|
425
|
+
const excluded = selected.map(
|
|
426
|
+
(property) => policy.excludedPropertyIds.has(property.property_id ?? "") || property.identifiers.some(
|
|
427
|
+
(identifier) => (identifier.type === "domain" || identifier.type === "subdomain") && policy.excludedDomainsByComparable.has(normalizeDomainForPropertyPolicy(identifier.value)?.comparable ?? "")
|
|
428
|
+
)
|
|
429
|
+
);
|
|
430
|
+
const matches = selected.map(
|
|
431
|
+
(property, index) => !excluded[index] && (!hasAllowedPropertyScope(policy) || property.identifiers.some(
|
|
432
|
+
(candidate) => policy.allowedPropertyIdentifiers.some(
|
|
433
|
+
(allowed) => allowed.type === "domain" || allowed.type === "subdomain" ? (candidate.type === "domain" || candidate.type === "subdomain") && propertyListDomainMatches(candidate.value, allowed.value, allowed.type) : isSupportedPropertyIdentifierType(allowed.type) && candidate.type === allowed.type && candidate.value === allowed.value
|
|
434
|
+
) || (candidate.type === "domain" || candidate.type === "subdomain") && policy.allowedDomains.some((allowed) => propertyListDomainMatches(candidate.value, allowed.input))
|
|
435
|
+
))
|
|
436
|
+
);
|
|
437
|
+
const undecidable = selected.map(
|
|
438
|
+
(property, index) => !excluded[index] && (property.identifiers.length === 0 || property.identifiers.some(
|
|
439
|
+
(candidate) => !isSupportedPropertyIdentifierType(candidate.type) && policy.allowedPropertyIdentifiers.some((allowed) => allowed.type === candidate.type)
|
|
440
|
+
))
|
|
441
|
+
);
|
|
442
|
+
const unknown = matches.some((match, index) => !match && undecidable[index]);
|
|
443
|
+
return {
|
|
444
|
+
allMatch: matches.length > 0 && matches.every(Boolean) && !unknown,
|
|
445
|
+
hasMatch: matches.some(Boolean),
|
|
446
|
+
hasNonMatch: missingIds || !selected.length || matches.some((match, index) => !match && !undecidable[index]),
|
|
447
|
+
hasExcludedProperty: excluded.some(Boolean),
|
|
448
|
+
unknown
|
|
449
|
+
};
|
|
450
|
+
}
|
|
320
451
|
function publisherDomainCandidates(selector, path) {
|
|
321
452
|
const candidates = [];
|
|
322
453
|
if (typeof selector.publisher_domain === "string") {
|
|
@@ -382,6 +513,7 @@ function isUsableHostname(host) {
|
|
|
382
513
|
// Annotate the CommonJS export names for ESM import in node:
|
|
383
514
|
0 && (module.exports = {
|
|
384
515
|
ProductPropertyPolicyError,
|
|
516
|
+
isSupportedPropertyIdentifierType,
|
|
385
517
|
normalizeDomainForPropertyPolicy,
|
|
386
518
|
validateProductsAgainstPropertyPolicy
|
|
387
519
|
});
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { PropertyIdentifierTypesValues } from "../types/enums.generated.mjs";
|
|
2
|
+
function isSupportedPropertyIdentifierType(type) {
|
|
3
|
+
return PropertyIdentifierTypesValues.includes(type);
|
|
4
|
+
}
|
|
1
5
|
class ProductPropertyPolicyError extends Error {
|
|
2
6
|
constructor(result) {
|
|
3
7
|
super(
|
|
@@ -57,6 +61,8 @@ function compilePolicy(policy) {
|
|
|
57
61
|
}
|
|
58
62
|
return {
|
|
59
63
|
allowedDomains,
|
|
64
|
+
publisherCatalogsConfigured: policy.publisherProperties !== void 0,
|
|
65
|
+
publisherProperties: policy.publisherProperties ?? {},
|
|
60
66
|
allowedPropertyIdentifiers: [...policy.allowedPropertyIdentifiers ?? []],
|
|
61
67
|
requireAllowedPropertyMatch: policy.requireAllowedPropertyMatch ?? Boolean(policy.allowedDomains?.length || policy.allowedPropertyIdentifiers?.length),
|
|
62
68
|
excludedDomainsByComparable,
|
|
@@ -91,6 +97,18 @@ function diagnosticsForProduct(product, productIndex, policy) {
|
|
|
91
97
|
hasEligibleSubsetSelector = true;
|
|
92
98
|
}
|
|
93
99
|
});
|
|
100
|
+
if (requiresSubsetMatch) {
|
|
101
|
+
const scopes = publisherProperties.flatMap(
|
|
102
|
+
(selector) => selector && typeof selector === "object" && !Array.isArray(selector) ? [identifierScopeForSelector(selector, policy)] : []
|
|
103
|
+
);
|
|
104
|
+
if (scopes.some((scope) => scope?.hasNonMatch) && !scopes.some((scope) => scope?.hasMatch))
|
|
105
|
+
hasEligibleSubsetSelector = false;
|
|
106
|
+
}
|
|
107
|
+
if (requiresSubsetMatch && hasEligibleSubsetSelector) {
|
|
108
|
+
for (const diagnostic of diagnostics) {
|
|
109
|
+
if (diagnostic.code === "unresolved_property_identifiers") diagnostic.severity = "flagged";
|
|
110
|
+
}
|
|
111
|
+
}
|
|
94
112
|
if (requiresSubsetMatch && !hasEligibleSubsetSelector) {
|
|
95
113
|
diagnostics.push({
|
|
96
114
|
code: "outside_property_list",
|
|
@@ -116,6 +134,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
116
134
|
});
|
|
117
135
|
}
|
|
118
136
|
const selector = rawSelector;
|
|
137
|
+
const identifierScope = identifierScopeForSelector(selector, policy);
|
|
119
138
|
const selectionType = typeof selector.selection_type === "string" ? selector.selection_type : void 0;
|
|
120
139
|
const domainCandidates = publisherDomainCandidates(selector, path);
|
|
121
140
|
const normalizedDomains = domainCandidates.map((candidate) => ({ candidate, normalized: normalizeDomainForPropertyPolicy(candidate.raw) })).filter(
|
|
@@ -167,7 +186,27 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
167
186
|
}
|
|
168
187
|
for (const { candidate, normalized: normalizedDomain } of normalizedDomains) {
|
|
169
188
|
const matchedAllowedDomain = matchedAllowedDomainForCandidate(normalizedDomain, policy);
|
|
170
|
-
|
|
189
|
+
const needsCatalogForExclusions = policy.publisherCatalogsConfigured && (policy.excludedDomainsByComparable.size > 0 || selectionType !== "by_id" && policy.excludedPropertyIds.size > 0);
|
|
190
|
+
if ((hasAllowedPropertyScope(policy) || selectionType === "by_tag" || needsCatalogForExclusions) && identifierScope?.unknown) {
|
|
191
|
+
diagnostics.push(
|
|
192
|
+
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
193
|
+
code: "unresolved_property_identifiers",
|
|
194
|
+
identifier_types: [
|
|
195
|
+
...new Set(
|
|
196
|
+
policy.allowedPropertyIdentifiers.filter((identifier) => identifier.type !== "domain" && identifier.type !== "subdomain").map((identifier) => identifier.type)
|
|
197
|
+
)
|
|
198
|
+
],
|
|
199
|
+
message: "Publisher property identifiers could not be resolved; property-list membership is unknown.",
|
|
200
|
+
product_index: productIndex,
|
|
201
|
+
product_id: productId,
|
|
202
|
+
path,
|
|
203
|
+
publisher_property_index: selectorIndex,
|
|
204
|
+
selection_type: selectionType,
|
|
205
|
+
publisher_domain: candidate.raw
|
|
206
|
+
})
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
if (options.enforceEveryDomainInAllowedScope && hasAllowedPropertyScope(policy) && (identifierScope ? identifierScope.hasNonMatch : !matchedAllowedDomain)) {
|
|
171
210
|
diagnostics.push({
|
|
172
211
|
code: "outside_property_list",
|
|
173
212
|
severity: "rejected",
|
|
@@ -202,6 +241,19 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
202
241
|
});
|
|
203
242
|
}
|
|
204
243
|
}
|
|
244
|
+
if (options.enforceExclusions && identifierScope?.hasExcludedProperty) {
|
|
245
|
+
diagnostics.push({
|
|
246
|
+
code: "excluded_resolved_property",
|
|
247
|
+
severity: "rejected",
|
|
248
|
+
message: "Resolved publisher properties include a buyer-excluded property.",
|
|
249
|
+
product_index: productIndex,
|
|
250
|
+
product_id: productId,
|
|
251
|
+
path,
|
|
252
|
+
publisher_property_index: selectorIndex,
|
|
253
|
+
selection_type: selectionType,
|
|
254
|
+
publisher_domain: domainCandidates[0]?.raw
|
|
255
|
+
});
|
|
256
|
+
}
|
|
205
257
|
if (selectionType === "by_id") {
|
|
206
258
|
const propertyIds = stringArray(selector.property_ids);
|
|
207
259
|
const matchedPropertyIds = propertyIds.filter((id) => policy.excludedPropertyIds.has(id));
|
|
@@ -223,7 +275,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
223
275
|
matched_property_ids: matchedPropertyIds
|
|
224
276
|
});
|
|
225
277
|
}
|
|
226
|
-
} else if (selectionType === "by_tag") {
|
|
278
|
+
} else if (selectionType === "by_tag" && !identifierScope) {
|
|
227
279
|
diagnostics.push(
|
|
228
280
|
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
229
281
|
code: "unresolved_tag_selector",
|
|
@@ -239,7 +291,7 @@ function diagnosticsForSelector(rawSelector, productIndex, selectorIndex, produc
|
|
|
239
291
|
normalized_domains: normalizedDomains.map((entry) => entry.normalized.host)
|
|
240
292
|
})
|
|
241
293
|
);
|
|
242
|
-
} else if (selectionType !== "all") {
|
|
294
|
+
} else if (selectionType !== "all" && selectionType !== "by_tag") {
|
|
243
295
|
diagnostics.push(
|
|
244
296
|
...diagnosticForBehavior(policy.unknownSelectorBehavior, {
|
|
245
297
|
code: "unknown_selector",
|
|
@@ -266,6 +318,14 @@ function selectorIsEligibleForSubsetTargeting(rawSelector, productIndex, selecto
|
|
|
266
318
|
if (!rawSelector || typeof rawSelector !== "object" || Array.isArray(rawSelector)) return false;
|
|
267
319
|
const selector = rawSelector;
|
|
268
320
|
if (selector.publisher_domains !== void 0) return false;
|
|
321
|
+
const identifierScope = identifierScopeForSelector(selector, policy);
|
|
322
|
+
if (identifierScope) {
|
|
323
|
+
const domain = typeof selector.publisher_domain === "string" ? normalizeDomainForPropertyPolicy(selector.publisher_domain) : void 0;
|
|
324
|
+
if (!domain || policy.excludedDomainsByComparable.has(domain.comparable)) return false;
|
|
325
|
+
if (selector.selection_type !== "all" && selector.selection_type !== "by_id" && selector.selection_type !== "by_tag")
|
|
326
|
+
return false;
|
|
327
|
+
return identifierScope.hasMatch || identifierScope.unknown && !identifierScope.hasNonMatch && policy.unknownSelectorBehavior !== "reject";
|
|
328
|
+
}
|
|
269
329
|
if (selector.selection_type === "by_tag") return false;
|
|
270
330
|
if (selector.selection_type !== "all" && selector.selection_type !== "by_id") return false;
|
|
271
331
|
const hasEligibleDomain = publisherDomainCandidates(selector, path).some((candidate) => {
|
|
@@ -292,6 +352,76 @@ function matchedAllowedDomainForCandidate(candidate, policy) {
|
|
|
292
352
|
}
|
|
293
353
|
return void 0;
|
|
294
354
|
}
|
|
355
|
+
function identifierScopeForSelector(selector, policy) {
|
|
356
|
+
if (!policy.allowedPropertyIdentifiers.some((id) => id.type !== "domain" && id.type !== "subdomain") && !policy.publisherCatalogsConfigured)
|
|
357
|
+
return void 0;
|
|
358
|
+
const propertyIds = selector.selection_type === "by_id" ? stringArray(selector.property_ids) : [];
|
|
359
|
+
const hasExcludedId = propertyIds.some((id) => policy.excludedPropertyIds.has(id));
|
|
360
|
+
const allIdsExcluded = propertyIds.length > 0 && propertyIds.every((id) => policy.excludedPropertyIds.has(id));
|
|
361
|
+
if (allIdsExcluded) return { allMatch: false, hasMatch: false, hasNonMatch: true, unknown: false };
|
|
362
|
+
const domain = typeof selector.publisher_domain === "string" ? normalizeDomainForPropertyPolicy(selector.publisher_domain) : void 0;
|
|
363
|
+
if (!domain) return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
364
|
+
if (policy.excludedDomainsByComparable.has(domain.comparable))
|
|
365
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: true, unknown: false };
|
|
366
|
+
const properties = Object.hasOwn(policy.publisherProperties, domain.host) ? policy.publisherProperties[domain.host] : void 0;
|
|
367
|
+
if (!properties && policy.publisherCatalogsConfigured)
|
|
368
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
369
|
+
if (!properties) {
|
|
370
|
+
const matchedDomain = !allIdsExcluded && Boolean(matchedAllowedDomainForCandidate(domain, policy));
|
|
371
|
+
const unknown2 = !matchedDomain && !allIdsExcluded || selector.selection_type === "by_tag";
|
|
372
|
+
return {
|
|
373
|
+
allMatch: matchedDomain && !unknown2 && !hasExcludedId,
|
|
374
|
+
hasMatch: matchedDomain && !unknown2,
|
|
375
|
+
hasNonMatch: hasExcludedId,
|
|
376
|
+
unknown: unknown2
|
|
377
|
+
};
|
|
378
|
+
}
|
|
379
|
+
if (!Array.isArray(properties) || properties.some(
|
|
380
|
+
(property) => !property || typeof property !== "object" || !Array.isArray(property.identifiers) || property.identifiers.some(
|
|
381
|
+
(identifier) => !identifier || typeof identifier.type !== "string" || typeof identifier.value !== "string"
|
|
382
|
+
) || property.tags !== void 0 && (!Array.isArray(property.tags) || property.tags.some((tag) => typeof tag !== "string"))
|
|
383
|
+
)) {
|
|
384
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: hasExcludedId, unknown: true };
|
|
385
|
+
}
|
|
386
|
+
let selected = [...properties];
|
|
387
|
+
let missingIds = false;
|
|
388
|
+
if (selector.selection_type === "by_id") {
|
|
389
|
+
const ids = stringArray(selector.property_ids);
|
|
390
|
+
missingIds = !ids.length || ids.some((id) => !properties.some((property) => property.property_id === id));
|
|
391
|
+
selected = selected.filter((property) => property.property_id && ids.includes(property.property_id));
|
|
392
|
+
} else if (selector.selection_type === "by_tag") {
|
|
393
|
+
const tags = stringArray(selector.property_tags);
|
|
394
|
+
if (!tags.length) return { allMatch: false, hasMatch: false, hasNonMatch: false, unknown: true };
|
|
395
|
+
selected = selected.filter((property) => property.tags?.some((tag) => tags.includes(tag)));
|
|
396
|
+
} else if (selector.selection_type !== "all") {
|
|
397
|
+
return { allMatch: false, hasMatch: false, hasNonMatch: false, unknown: true };
|
|
398
|
+
}
|
|
399
|
+
const excluded = selected.map(
|
|
400
|
+
(property) => policy.excludedPropertyIds.has(property.property_id ?? "") || property.identifiers.some(
|
|
401
|
+
(identifier) => (identifier.type === "domain" || identifier.type === "subdomain") && policy.excludedDomainsByComparable.has(normalizeDomainForPropertyPolicy(identifier.value)?.comparable ?? "")
|
|
402
|
+
)
|
|
403
|
+
);
|
|
404
|
+
const matches = selected.map(
|
|
405
|
+
(property, index) => !excluded[index] && (!hasAllowedPropertyScope(policy) || property.identifiers.some(
|
|
406
|
+
(candidate) => policy.allowedPropertyIdentifiers.some(
|
|
407
|
+
(allowed) => allowed.type === "domain" || allowed.type === "subdomain" ? (candidate.type === "domain" || candidate.type === "subdomain") && propertyListDomainMatches(candidate.value, allowed.value, allowed.type) : isSupportedPropertyIdentifierType(allowed.type) && candidate.type === allowed.type && candidate.value === allowed.value
|
|
408
|
+
) || (candidate.type === "domain" || candidate.type === "subdomain") && policy.allowedDomains.some((allowed) => propertyListDomainMatches(candidate.value, allowed.input))
|
|
409
|
+
))
|
|
410
|
+
);
|
|
411
|
+
const undecidable = selected.map(
|
|
412
|
+
(property, index) => !excluded[index] && (property.identifiers.length === 0 || property.identifiers.some(
|
|
413
|
+
(candidate) => !isSupportedPropertyIdentifierType(candidate.type) && policy.allowedPropertyIdentifiers.some((allowed) => allowed.type === candidate.type)
|
|
414
|
+
))
|
|
415
|
+
);
|
|
416
|
+
const unknown = matches.some((match, index) => !match && undecidable[index]);
|
|
417
|
+
return {
|
|
418
|
+
allMatch: matches.length > 0 && matches.every(Boolean) && !unknown,
|
|
419
|
+
hasMatch: matches.some(Boolean),
|
|
420
|
+
hasNonMatch: missingIds || !selected.length || matches.some((match, index) => !match && !undecidable[index]),
|
|
421
|
+
hasExcludedProperty: excluded.some(Boolean),
|
|
422
|
+
unknown
|
|
423
|
+
};
|
|
424
|
+
}
|
|
295
425
|
function publisherDomainCandidates(selector, path) {
|
|
296
426
|
const candidates = [];
|
|
297
427
|
if (typeof selector.publisher_domain === "string") {
|
|
@@ -356,6 +486,7 @@ function isUsableHostname(host) {
|
|
|
356
486
|
}
|
|
357
487
|
export {
|
|
358
488
|
ProductPropertyPolicyError,
|
|
489
|
+
isSupportedPropertyIdentifierType,
|
|
359
490
|
normalizeDomainForPropertyPolicy,
|
|
360
491
|
validateProductsAgainstPropertyPolicy
|
|
361
492
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import type { SupplyPathRequest, RegistrySupplyPathResult } from '../supply-path/types.mjs';
|
|
2
|
+
export * from '../identifiers.mjs';
|
|
3
|
+
export type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './types.mjs';
|
|
4
|
+
import type { ResolveIdentifiersAllOptions, ResolveIdentifierOutcome } from './types.mjs';
|
|
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.mjs';
|
|
3
6
|
import type { FeedStreamQuery, FeedStreamMessage } from './feed-stream.mjs';
|
|
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.mjs';
|
|
@@ -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. */
|
|
@@ -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. */
|