add dist
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import { getGlobal } from './getGlobal.js';
|
||||
/** Slug of the SiteIntegrations global defined by the plugin. */ export const SITE_INTEGRATIONS_SLUG = 'site-integrations';
|
||||
/**
|
||||
* 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 function getSiteIntegrations(payload, options) {
|
||||
return getGlobal(payload, SITE_INTEGRATIONS_SLUG, options);
|
||||
}
|
||||
|
||||
//# sourceMappingURL=getSiteIntegrations.js.map
|
||||
Reference in New Issue
Block a user