Skip to content

feat: add allByExternalOwnerIdAndExternalSiteId type to SiteCollection#1655

Open
radhikagpt1208 wants to merge 1 commit into
mainfrom
SITES-45215
Open

feat: add allByExternalOwnerIdAndExternalSiteId type to SiteCollection#1655
radhikagpt1208 wants to merge 1 commit into
mainfrom
SITES-45215

Conversation

@radhikagpt1208

Copy link
Copy Markdown
Contributor

Summary

Adds the missing TypeScript type declaration for allByExternalOwnerIdAndExternalSiteId on the SiteCollection interface in spacecat-shared-data-access.

The runtime method already exists — it is auto-generated from the site schema's external owner/site index (the same index that backs findByExternalOwnerIdAndExternalSiteId). This change only declares the corresponding type so it mirrors the existing findBy... declaration directly above it.

What changed

  • src/models/site/index.d.ts — declare allByExternalOwnerIdAndExternalSiteId(externalOwnerId: string, externalSiteId: string): Promise<Site[]> on SiteCollection.

Impact

  • Runtime: none — purely a type-declaration change. No behavior change.
  • Type-checking: TS consumers can now call the method without casting, and editors provide proper autocomplete.

Test plan

  • npm run lint passes.
  • Existing unit tests pass (no runtime change).
  • Verified the singular findByExternalOwnerIdAndExternalSiteId is already declared and that the plural allBy... accessor is generated from the same index.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant