OpenFin Workspace Platform API
    Preparing search index...

    Interface WorkspacePlatformInitConfig

    Configuration for initializing a Workspace platform.

    interface WorkspacePlatformInitConfig {
        analytics?: AnalyticsConfig;
        browser?: BrowserInitConfig;
        customActions?: CustomActionsMap;
        integrations?: WorkflowIntegration[];
        interopOverride?:
            | OverrideCallback<InteropBroker, InteropBroker>
            | ConstructorOverride<InteropBroker>[];
        language?: { initialLanguage?: string; languagePacksApiUrl?: string };
        notifications?: NotificationsCustomManifestOptions;
        overrideCallback?:
            | WorkspacePlatformOverrideCallback
            | ConstructorOverride<WorkspacePlatformProvider>[];
        theme?: CustomThemes;
        workspaceAsar?: WorkspaceAsarPathConfig | WorkspaceAsarAssetConfig;
    }
    Index
    analytics?: AnalyticsConfig

    Config for Workspace Platform analytics

    Config for overriding browser options and behavior. Set to null to initialize the platform without the browser

    customActions?: CustomActionsMap
    integrations?: WorkflowIntegration[]

    Config for Workspace Platform Integrations

    import * as WorkspacePlatform from '@openfin/workspace-platform';
    import { Integrations } from '@openfin/workspace';

    const microsoftIntegration = new Integrations.Microsoft365WorkflowIntegration({
    connect: {
    clientId: '',
    redirectUri: '',
    tenantId: ''
    }
    });

    await WorkspacePlatform.init({
    browser: { },
    integrations: [microsoftIntegration]
    });
    interopOverride?:
        | OverrideCallback<InteropBroker, InteropBroker>
        | ConstructorOverride<InteropBroker>[]
    language?: { initialLanguage?: string; languagePacksApiUrl?: string }

    Set the initial language for the Browser.

    The built-in ISO language codes are 'en-US', 'ja-JP', 'zh-CN', 'ko-KR', 'ru-RU', 'de-DE', and 'zh-Hant'. Any additional language code defined in an external translation-override.json (configured via translationOverridesUrl) is also accepted.

    When languagePacksApiUrl is set, i18next loads packs over HTTP from that i18next-http-backend loadPath (e.g. ${origin}/platform/api/localization/{{lng}}/{{ns}}.json) instead of the bundled locale JSON. Omit it to keep the built-in packs.

    Type Declaration

    • OptionalinitialLanguage?: string
    • OptionallanguagePacksApiUrl?: string

      i18next-http-backend loadPath. When provided, HTTP language packs are used even if the manifest did not inject languagePacksApiUrl.

    await WorkspacePlatform.init({
    browser: {
    title: "My Browser"
    },
    language: {
    initialLanguage: 'ru-RU'
    }
    });
    'en-US'
    
    notifications?: NotificationsCustomManifestOptions

    Config for overriding default notifications behaviour. Leave undefined to use OpenFin hosted Notification Center.

    Notifications config is now part of the platform manifest and is automatically resolved by the notifications API. Do not use this property as it will not have any effect.

    overrideCallback?:
        | WorkspacePlatformOverrideCallback
        | ConstructorOverride<WorkspacePlatformProvider>[]

    Override workspace platform behavior

    theme?: CustomThemes

    Customize the Looks and Feel of the Workspace Platform by providing a custom palette.

    The backgroundPrimary color must be either a hex, rgb, rgba, hsl, or hsla value.

    Two palettes are provided by default: light and dark. The dark palette is used by default.

    import * as WorkspacePlatform from '@openfin/workspace-platform';

    // This is the palette used to create the OpenFin dark theme
    const customPalette: WorkspacePlatform.CustomPaletteSet = {
    brandPrimary: '#504CFF',
    brandSecondary: '#383A40',
    backgroundPrimary: '#000',
    background1: '#111214',
    background2: '#1E1F23',
    background3: '#24262B',
    background4: '#2F3136',
    background5: '#383A40',
    background6: '#53565F',
    statusSuccess: '#35C759',
    statusWarning: '#C93400',
    statusCritical: '#000',
    statusActive: '#0879C4',
    inputBackground: '#53565F',
    inputColor: '#FFFFFF',
    inputPlaceholder: '#C9CBD2',
    inputDisabled: '#7D808A',
    inputFocused: '#C9CBD2',
    textDefault: '#FFFFFF',
    textHelp: '#C9CBD2',
    textInactive: '#7D808A',
    };

    const customTheme: WorkspacePlatform.CustomThemes = [{
    label: "My Custom Theme",
    palette: customPalette
    }];

    await WorkspacePlatform.init({
    browser: {
    title: "My Browser"
    },
    theme: customThemes,
    overrideCallback
    });

    Configuration for self-hosting of workspace assets.