virtuals/sdk/modules/notificationSettings
此内容尚不支持你的语言。
Classes
Section titled “Classes”SDKCore_NotificationSettings
Section titled “SDKCore_NotificationSettings”Defined in: studiocms/packages/studiocms/src/virtuals/sdk/modules/notificationSettings.ts:32^
Extends
Section titled “Extends”any
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SDKCore_NotificationSettings(): SDKCore_NotificationSettings;
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”Effect.Service<SDKCore_NotificationSettings>()( 'studiocms/sdk/SDKCore/modules/notificationSettings', { dependencies: [AstroDB.Default, SDKCore_CONFIG.Default], effect: genLogger('studiocms/sdk/SDKCore/modules/notificationSettings/effect')(function () { const { notificationConfig } = yield SDKCore_CONFIG;
const notificationSettings = { site: { / Retrieves the site-wide notification settings. @returns An Effect that resolves to the current notification settings. @throws SDKCoreError when a database error occurs. / get: () => Effect.gen(function () { const data = yield notificationConfig.get();
if (!data) return yield notificationConfig.init(NotificationSettingsDefaults);
return data; }).pipe( Effect.catchTags({ LibSQLClientError: (cause) => Effect.fail( new SDKCoreError({ type: 'LibSQLDatabaseError', cause: new StudioCMS_SDK_Error( notificationSettings.site.get Error: ${cause} ), }) ), }) ),
/ Updates the site-wide notification settings. @param settings - The new notification settings to be updated. @returns An Effect that resolves to the updated settings. @throws SDKCoreError when a database error occurs. / update: (settings: Omit<StudioCMSNotificationSettings, '_config_version'>) => notificationConfig.update(settings), }, };
return notificationSettings; }), }).constructor