gate locale behind functional consent
This commit is contained in:
Vendored
-8
@@ -1,8 +0,0 @@
|
||||
/**
|
||||
* Thin wrapper over payload.findGlobal that keeps locale/depth handling in one
|
||||
* place. The plugin never calls getPayload itself — the caller passes the
|
||||
* instance (from getPayload in their app, or req.payload in a hook), matching
|
||||
* the plugin's data-access rule: logic here, instance from outside.
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=getGlobal.d.js.map
|
||||
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["getGlobal.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\n/** Locale argument accepted by the global helpers. */\nexport type GlobalQueryOptions = {\n /** Relationship population depth. Defaults to Payload's config default. */\n depth?: number;\n /** Locale to fetch, or 'all' for every locale's values. Defaults to Payload's default. */\n locale?: string;\n};\n/**\n * Thin wrapper over payload.findGlobal that keeps locale/depth handling in one\n * place. The plugin never calls getPayload itself — the caller passes the\n * instance (from getPayload in their app, or req.payload in a hook), matching\n * the plugin's data-access rule: logic here, instance from outside.\n */\nexport declare function getGlobal<T = Record<string, unknown>>(payload: BasePayload, slug: string, options?: GlobalQueryOptions): Promise<T>;\n"],"names":[],"mappings":"AAQA;;;;;CAKC,GACD,WAA6I"}
|
||||
-18
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Fetches the SiteIntegrations global.
|
||||
*
|
||||
* This global is admin-only through access control, but the Local API bypasses
|
||||
* access control by default (overrideAccess: true), so server-side callers get
|
||||
* the secrets they need (SMTP password, Turnstile secret, R2 keys). Never
|
||||
* expose the raw result to the client — read the specific values you need
|
||||
* server-side and pass only what's safe to the browser.
|
||||
*
|
||||
* Generic over the return type so the client can pass their generated
|
||||
* `SiteIntegration` type.
|
||||
*
|
||||
* @example
|
||||
* import type { SiteIntegration } from '@/payload-types'
|
||||
* const integrations = await getSiteIntegrations<SiteIntegration>(payload)
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=getSiteIntegrations.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["getSiteIntegrations.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { GlobalQueryOptions } from './getGlobal.js';\n/** Slug of the SiteIntegrations global defined by the plugin. */\nexport declare const SITE_INTEGRATIONS_SLUG = \"site-integrations\";\n/**\n * Fetches the SiteIntegrations global.\n *\n * This global is admin-only through access control, but the Local API bypasses\n * access control by default (overrideAccess: true), so server-side callers get\n * the secrets they need (SMTP password, Turnstile secret, R2 keys). Never\n * expose the raw result to the client — read the specific values you need\n * server-side and pass only what's safe to the browser.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteIntegration` type.\n *\n * @example\n * import type { SiteIntegration } from '@/payload-types'\n * const integrations = await getSiteIntegrations<SiteIntegration>(payload)\n */\nexport declare function getSiteIntegrations<T = Record<string, unknown>>(payload: BasePayload, options?: GlobalQueryOptions): Promise<T>;\n"],"names":[],"mappings":"AAIA;;;;;;;;;;;;;;;CAeC,GACD,WAAyI"}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* Fetches the SiteSettings global.
|
||||
*
|
||||
* Generic over the return type so the client can pass their generated
|
||||
* `SiteSetting` type for full type safety, while still working without it.
|
||||
*
|
||||
* @example
|
||||
* import type { SiteSetting } from '@/payload-types'
|
||||
* const settings = await getSiteSettings<SiteSetting>(payload, { locale: 'pl' })
|
||||
*/ export { };
|
||||
|
||||
//# sourceMappingURL=getSiteSettings.d.js.map
|
||||
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["getSiteSettings.d.ts"],"sourcesContent":["import type { BasePayload } from 'payload';\nimport type { GlobalQueryOptions } from './getGlobal.js';\n/** Slug of the SiteSettings global defined by the plugin. */\nexport declare const SITE_SETTINGS_SLUG = \"site-settings\";\n/**\n * Fetches the SiteSettings global.\n *\n * Generic over the return type so the client can pass their generated\n * `SiteSetting` type for full type safety, while still working without it.\n *\n * @example\n * import type { SiteSetting } from '@/payload-types'\n * const settings = await getSiteSettings<SiteSetting>(payload, { locale: 'pl' })\n */\nexport declare function getSiteSettings<T = Record<string, unknown>>(payload: BasePayload, options?: GlobalQueryOptions): Promise<T>;\n"],"names":[],"mappings":"AAIA;;;;;;;;;CASC,GACD,WAAqI"}
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
export { getGlobal } from './getGlobal.js';
|
||||
export { getSiteIntegrations, SITE_INTEGRATIONS_SLUG } from './getSiteIntegrations.js';
|
||||
export { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js';
|
||||
|
||||
//# sourceMappingURL=index.d.js.map
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
{"version":3,"sources":["index.d.ts"],"sourcesContent":["export type { GlobalQueryOptions } from './getGlobal.js';\nexport { getGlobal } from './getGlobal.js';\nexport { getSiteIntegrations, SITE_INTEGRATIONS_SLUG } from './getSiteIntegrations.js';\nexport { getSiteSettings, SITE_SETTINGS_SLUG } from './getSiteSettings.js';\n"],"names":["getGlobal","getSiteIntegrations","SITE_INTEGRATIONS_SLUG","getSiteSettings","SITE_SETTINGS_SLUG"],"mappings":"AACA,SAASA,SAAS,QAAQ,iBAAiB;AAC3C,SAASC,mBAAmB,EAAEC,sBAAsB,QAAQ,2BAA2B;AACvF,SAASC,eAAe,EAAEC,kBAAkB,QAAQ,uBAAuB"}
|
||||
Reference in New Issue
Block a user