MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / flattenCollectionIds

Method flattenCollectionIds

server/src/validator.ts:688–703  ·  view source on GitHub ↗
(
    selectors: CollectionSelector[] | undefined,
    normalizedDomain: string
  )

Source from the content-addressed store, hash-verified

686 }
687
688 private flattenCollectionIds(
689 selectors: CollectionSelector[] | undefined,
690 normalizedDomain: string
691 ): string[] | undefined {
692 if (!selectors?.length) {
693 return undefined;
694 }
695
696 return [
697 ...new Set(
698 selectors
699 .filter((selector) => this.normalizeDomain(selector.publisher_domain) === normalizedDomain)
700 .flatMap((selector) => selector.collection_ids)
701 ),
702 ];
703 }
704
705 private resolveRequestedPlacements(
706 normalizedDomain: string,

Callers 1

fetchAndValidateMethod · 0.95

Calls 1

normalizeDomainMethod · 0.95

Tested by

no test coverage detected