Skip to main content
Glama
AccessPolicyInput.tsx989 B
// SPDX-FileCopyrightText: Copyright Orangebot, Inc. and Medplum contributors // SPDX-License-Identifier: Apache-2.0 import { createReference, isResource } from '@medplum/core'; import type { AccessPolicy, Reference } from '@medplum/fhirtypes'; import { ResourceInput } from '@medplum/react'; import type { JSX } from 'react'; export interface AccessPolicyInputProps { readonly name: string; readonly defaultValue?: AccessPolicy | Reference<AccessPolicy>; readonly onChange: (value: Reference<AccessPolicy> | undefined) => void; } export function AccessPolicyInput(props: AccessPolicyInputProps): JSX.Element { return ( <ResourceInput resourceType="AccessPolicy" name={props.name} defaultValue={props.defaultValue} placeholder="Access Policy" onChange={(newValue) => { if (isResource(newValue)) { props.onChange(createReference(newValue)); } else { props.onChange(undefined); } }} /> ); }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/medplum/medplum'

If you have feedback or need assistance with the MCP directory API, please join our Discord server