You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

@opengov/psp-contract

Package Overview
Dependencies
Maintainers
393
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@opengov/psp-contract

Shared contract (types, constants, helpers) for PSP micro-frontend modules

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
0
Maintainers
393
Weekly downloads
 
Created
Source

@opengov/psp-contract

Shared contract for PSP micro-frontend modules — types, constants, and helpers.

Overview

This package is the single source of truth for the interfaces that define how remote micro-frontend modules integrate with the Public Service Platform (PSP) shell. Instead of copy-pasting type definitions, remote teams import them directly from this package.

Installation

bun add @opengov/psp-contract

Usage

import type { MountableApp, ModuleMountOptions } from '@opengov/psp-contract';

export default {
  mount(container: HTMLElement, options: ModuleMountOptions) {
    // options includes: baseRouterPath, auth0Config, activeEntity,
    // hostingEnvironment, registryConfig
  },
  unmount() {
    // Clean up
  },
} satisfies MountableApp;

Exported Types

Core Mount Contract

TypeDescription
MountableAppInterface remote modules must implement (mount/unmount)
ModuleMountOptionsOptions passed to mount() by the PSP shell
Auth0ConfigAuth0 configuration passed to remote modules
EntityBaseBase entity fields (id, friendlyId, name, etc.)
HostingEnvironmentEnum: DEVELOPMENT, INTEGRATION, STAGING, PRODUCTION

Resolver and Context Types

TypeDescription
PspUserInfoUser info (email, sub, name) passed to modules
AppRegistryCallbackContextContext provided to module URL resolvers
ModuleUrlResolverFunction type for resolving module URLs

Development

This package lives in the PSP monorepo at packages/psp-contract/.

# Build the package
bun run build:types

# Or from within the package directory
cd packages/psp-contract && bun run build

The PSP shell re-exports these types via src/types.ts, so existing internal imports (from '@/types') continue to work unchanged.

FAQs

Package last updated on 27 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts