WRDInsertType | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Type Alias WRDInsertType<Schema, TypeName>

    WRDInsertType: WRDInsertable<EntityMatchSchema<Schema>[TypeName]>

    The fields you can supply to createEntity (or insert) to create an entity of the specified type.

    Type Parameters

    • Schema extends keyof WRDSchemaLike | AnyWRDSchema

      A schema name registered in WRDSchemaLike, or a schema object type such as typeof usermgmtSchema.

    • TypeName extends keyof EntityMatchSchema<Schema> & string

      An entity type tag in the selected schema.

    const newPerson: WRDInsertType<"system:usermgmt", "wrdPerson"> = { wrdFirstName: "John", wrdLastName: "Doe" };
    await wrd("system:usermgmt").getType("wrdPerson").createEntity(newPerson);