mirror of
https://github.com/complexcaresolutions/payload-contracts.git
synced 2026-03-17 15:13:48 +00:00
fix: export SeoSetting type and fix getSeoSettings return type
getSeoSettings() was returning Record<string, unknown> which prevented TypeScript from seeing metaDefaults properties. Now properly returns SeoSetting type with full type safety. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a0eea9649d
commit
d8e16db535
2 changed files with 5 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* Settings & Globals API functions
|
||||
*/
|
||||
import type { SiteSetting, CookieConfiguration } from '../types/collections'
|
||||
import type { SiteSetting, SeoSetting, CookieConfiguration } from '../types/collections'
|
||||
import type { PaginatedResponse, CollectionQueryParams, GlobalQueryParams } from '../types/api'
|
||||
import type { PayloadClient } from './client'
|
||||
|
||||
|
|
@ -21,8 +21,8 @@ export function createSettingsApi(client: PayloadClient) {
|
|||
/**
|
||||
* Get SEO global settings
|
||||
*/
|
||||
async getSeoSettings(options?: GlobalQueryParams): Promise<Record<string, unknown>> {
|
||||
return client.getGlobal('seo-settings', options)
|
||||
async getSeoSettings(options?: GlobalQueryParams): Promise<SeoSetting> {
|
||||
return client.getGlobal('seo-settings', options) as Promise<SeoSetting>
|
||||
},
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ import type {
|
|||
MonitoringAlertRule,
|
||||
MonitoringAlertHistory,
|
||||
SiteSetting,
|
||||
SeoSetting,
|
||||
Navigation,
|
||||
Form,
|
||||
} from './payload-types'
|
||||
|
|
@ -91,6 +92,7 @@ export type {
|
|||
MonitoringAlertRule,
|
||||
MonitoringAlertHistory,
|
||||
SiteSetting,
|
||||
SeoSetting,
|
||||
Navigation,
|
||||
Form,
|
||||
} from './payload-types'
|
||||
|
|
|
|||
Loading…
Reference in a new issue