UserProfile
This is the model for a user logged into Pieces.
Properties
Name | Type |
---|---|
schema | EmbeddedModelSchema |
picture | string |
string | |
created | GroupedTimestamp |
updated | GroupedTimestamp |
username | string |
id | string |
name | string |
aesthetics | Aesthetics |
vanityname | string |
allocation | AllocationCloud |
providers | ExternalProviders |
auth0 | Auth0UserMetadata |
Example
import { UserProfile } from '@pieces.app/pieces-os-client'
// TODO: Update the object below with actual values
const example: UserProfile = {
"schema": null,
"picture": https://picsum.photos/200,
"email": user@pieces.app,
"created": null,
"updated": null,
"username": null,
"id": null,
"name": null,
"aesthetics": null,
"vanityname": null,
"allocation": null,
"providers": null,
"auth0": null,
}
console.log(example)
// Convert the instance to a JSON string
const exampleJSON: string = JSON.stringify(example)
console.log(exampleJSON)
// Parse the JSON string back to an object
const exampleParsed = JSON.parse(exampleJSON) as UserProfile
console.log(exampleParsed)