• Creates a valid ProfileMetadata.

    Parameters

    • input: ProfileOptions

      Use your IDE suggestions for an enhanced development experience

    Returns ProfileMetadata

    Example

    Global profile (no appId):

    const metadata = profile({
    name: 'John Doe',
    bio: `
    Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris.

    - Lorem ipsum dolor sit amet, consectetur adipiscing elit.
    - Donec a diam lectus.
    `,
    });

    Example

    App specific profile (with appId):

    const metadata = profile({
    appId: 'com.example.app',
    name: 'John Doe',
    });

    Example

    With attributes:

    const metadata = profile({
    name: 'John Doe',
    picture: 'https://example.com/picture.png',
    attributes: [
    {
    key: 'twitter',
    type: MetadataAttributeType.STRING,
    value: 'https://twitter.com/johndoe',
    },
    {
    key: 'dob',
    type: MetadataAttributeType.DATE,
    value: '1990-01-01T00:00:00Z',
    },
    {
    key: 'enabled',
    type: MetadataAttributeType.BOOLEAN,
    value: 'true',
    },
    {
    key: 'height',
    type: MetadataAttributeType.NUMBER,
    value: '1.8',
    },
    {
    key: 'settings',
    type: MetadataAttributeType.JSON,
    value: '{"theme": "dark"}',
    },
    ],
    });