To run tests
`npm link`
`npm link @xtermstack/xterm-core`
`yarn install`
`tsc`
`yarn test`
Usage Examples
Direct Resource URI Creation
The createDirectResourceUri
function provides a streamlined way to create resource URIs without needing to first create a cdecode URI and then convert it:
import { createDirectResourceUri, ConfigCollectionName, ConfigFragmentName } from '@adminide-stack/core';
const teamUri = createDirectResourceUri(
ConfigCollectionName.Teams,
'60a3e1c5f30d3a001c9e8d5e',
'my-organization',
{
tenantId: 'default',
fragment: ConfigFragmentName.Settings,
useOrgNameParam: true,
},
);
const orgUri = createDirectResourceUri(
ConfigCollectionName.Organizations,
'60a3e1c5f30d3a001c9e8d5f',
null,
{
tenantId: 'default',
fragment: ConfigFragmentName.Settings,
},
);
This approach is more efficient than creating and converting cdecode URIs, and it ensures that the parameters are always in the correct order with _id
first.