CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-schema-dts

TypeScript definitions and generator for Schema.org vocabulary with strongly-typed JSON-LD support

Pending
Overview
Eval results
Files

person-organization.mddocs/

Person and Organization Types

Schema.org types representing people and organizations with their properties, relationships, and roles within various contexts.

Capabilities

Person Type

Represents a person, including fictional characters and historical figures.

/**
 * A person, including fictional characters, deceased people, and living people
 */
type Person = PersonLeaf | Patient | string;

interface PersonBase extends ThingBase {
  /** An additional name for a Person, can be used for a middle name */
  additionalName?: SchemaValue<Text, "additionalName">;
  /** A postal address for the person */
  address?: SchemaValue<PostalAddress | Text, "address">;
  /** An organization that this person is affiliated with */
  affiliation?: SchemaValue<Organization, "affiliation">;
  /** An alumni of an educational organization */
  alumniOf?: SchemaValue<EducationalOrganization | Organization, "alumniOf">;
  /** An award won by or for this item */
  award?: SchemaValue<Text, "award">;
  /** Date of birth */
  birthDate?: SchemaValue<Date, "birthDate">;
  /** The place where the person was born */
  birthPlace?: SchemaValue<Place, "birthPlace">;
  /** Date of death */
  deathDate?: SchemaValue<Date, "deathDate">;
  /** The place where the person died */
  deathPlace?: SchemaValue<Place, "deathPlace">;
  /** Email address */
  email?: SchemaValue<Text, "email">;
  /** Family name. In the U.S., the last name of a person */
  familyName?: SchemaValue<Text, "familyName">;
  /** Given name. In the U.S., the first name of a person */
  givenName?: SchemaValue<Text, "givenName">;
  /** A person's most significant accomplishment */
  hasOccupation?: SchemaValue<Occupation, "hasOccupation">;
  /** The person's job title */
  jobTitle?: SchemaValue<DefinedTerm | Text, "jobTitle">;
  /** Of a Person, and less typically of an Organization, to indicate a topic that is known about */
  knowsAbout?: SchemaValue<Text | Thing | URL, "knowsAbout">;
  /** The most generic uni-directional social relation */
  knows?: SchemaValue<Person, "knows">;
  /** A pointer to products or services offered by the organization or person */
  makesOffer?: SchemaValue<Offer, "makesOffer">;
  /** An Organization (or ProgramMembership) to which this Person or Organization belongs */
  memberOf?: SchemaValue<Organization | ProgramMembership, "memberOf">;
  /** Nationality of the person */
  nationality?: SchemaValue<Country, "nationality">;
  /** The telephone number */
  telephone?: SchemaValue<Text, "telephone">;
  /** Organizations that the person works for */
  worksFor?: SchemaValue<Organization, "worksFor">;
}

Usage Examples:

import type { Person } from "schema-dts";

// Basic person information
const author: Person = {
  "@type": "Person",
  name: "Jane Smith",
  givenName: "Jane",
  familyName: "Smith",
  jobTitle: "Software Engineer",
  email: "jane.smith@example.com",
  telephone: "+1-555-0123"
};

// Detailed person with affiliations and background
const scientist: Person = {
  "@type": "Person",
  name: "Dr. Marie Curie",
  givenName: "Marie",
  familyName: "Curie",
  additionalName: "Salomea",
  birthDate: "1867-11-07",
  deathDate: "1934-07-04",
  birthPlace: {
    "@type": "Place",
    name: "Warsaw, Poland"
  },
  nationality: {
    "@type": "Country",
    name: "France"
  },
  hasOccupation: {
    "@type": "Occupation",
    name: "Physicist and Chemist"
  },
  knowsAbout: ["Physics", "Chemistry", "Radioactivity"],
  award: [
    "Nobel Prize in Physics (1903)",
    "Nobel Prize in Chemistry (1911)"
  ],
  affiliation: [
    {
      "@type": "Organization",
      name: "University of Paris"
    }
  ]
};

// Person with work relationships
const employee: Person = {
  "@type": "Person",
  name: "John Doe",
  jobTitle: "Senior Developer",
  worksFor: {
    "@type": "Organization",
    name: "Tech Innovations Inc.",
    url: "https://techinnovations.com"
  },
  memberOf: [
    {
      "@type": "Organization",
      name: "IEEE Computer Society"
    },
    {
      "@type": "Organization", 
      name: "Association for Computing Machinery"
    }
  ]
};

Organization Type

Represents an organization such as a school, NGO, corporation, club, etc.

/**
 * An organization such as a school, NGO, corporation, club, etc.
 */
type Organization = OrganizationLeaf | Airline | Consortium | Cooperative |
  Corporation | EducationalOrganization | FundingScheme | GovernmentOrganization |
  LibrarySystem | LocalBusiness | MedicalOrganization | NewsMediaOrganization |
  NGO | OnlineBusiness | PerformingGroup | PoliticalParty | Project |
  ResearchOrganization | SearchRescueOrganization | SportsOrganization |
  WorkersUnion | string;

interface OrganizationBase extends ThingBase {
  /** A postal address for the organization */
  address?: SchemaValue<PostalAddress | Text, "address">;
  /** Alumni of an organization */
  alumni?: SchemaValue<Person, "alumni">;
  /** An award won by or for this item */
  award?: SchemaValue<Text, "award">;
  /** The brand(s) associated with a product or service */
  brand?: SchemaValue<Brand | Organization, "brand">;
  /** A contact point for a person or organization */
  contactPoint?: SchemaValue<ContactPoint, "contactPoint">;
  /** The date that this organization was dissolved */
  dissolutionDate?: SchemaValue<Date, "dissolutionDate">;
  /** Email address */
  email?: SchemaValue<Text, "email">;
  /** Someone working for this organization */
  employee?: SchemaValue<Person, "employee">;
  /** The date that this organization was founded */
  foundingDate?: SchemaValue<Date, "foundingDate">;
  /** The location where the organization was founded */
  foundingLocation?: SchemaValue<Place, "foundingLocation">;
  /** A person who founded this organization */
  founder?: SchemaValue<Person, "founder">;
  /** The official name of the organization */
  legalName?: SchemaValue<Text, "legalName">;
  /** The location of, for example, where an event is happening */
  location?: SchemaValue<Place | PostalAddress | Text | VirtualLocation, "location">;
  /** An organization identifier as defined in ISO 6523 */
  leiCode?: SchemaValue<Text, "leiCode">;
  /** A logo associated with an organization */
  logo?: SchemaValue<ImageObject | URL, "logo">;
  /** A pointer to products or services offered by the organization or person */
  makesOffer?: SchemaValue<Offer, "makesOffer">;
  /** A member of an Organization or a ProgramMembership */
  member?: SchemaValue<Organization | Person, "member">;
  /** An Organization (or ProgramMembership) to which this Person or Organization belongs */
  memberOf?: SchemaValue<Organization | ProgramMembership, "memberOf">;
  /** The number of employees in an organization, including part-time employees */
  numberOfEmployees?: SchemaValue<QuantitativeValue, "numberOfEmployees">;
  /** A relationship between an organization and a department of that organization */
  parentOrganization?: SchemaValue<Organization, "parentOrganization">;
  /** A relationship between two organizations where the first includes the second */
  subOrganization?: SchemaValue<Organization, "subOrganization">;
  /** The Tax / Fiscal ID of the organization */
  taxID?: SchemaValue<Text, "taxID">;
  /** The telephone number */
  telephone?: SchemaValue<Text, "telephone">;
  /** The Value-added Tax ID of the organization */
  vatID?: SchemaValue<Text, "vatID">;
}

Usage Examples:

import type { Organization, EducationalOrganization, Corporation } from "schema-dts";

// Basic organization
const company: Organization = {
  "@type": "Organization",
  name: "Acme Corporation",
  legalName: "Acme Corporation Ltd.",
  url: "https://acme.com",
  logo: "https://acme.com/logo.png",
  address: {
    "@type": "PostalAddress",
    streetAddress: "123 Business Ave",
    addressLocality: "New York",
    addressRegion: "NY",
    postalCode: "10001",
    addressCountry: "US"
  },
  telephone: "+1-555-0100",
  email: "info@acme.com"
};

// Educational organization
const university: EducationalOrganization = {
  "@type": "CollegeOrUniversity",
  name: "Massachusetts Institute of Technology",
  alternateName: "MIT", 
  foundingDate: "1861-04-10",
  address: {
    "@type": "PostalAddress",
    streetAddress: "77 Massachusetts Avenue",
    addressLocality: "Cambridge",
    addressRegion: "MA",
    postalCode: "02139",
    addressCountry: "US"
  },
  url: "https://mit.edu",
  alumni: [
    {
      "@type": "Person",
      name: "Tim Berners-Lee"
    }
  ]
};

// Corporation with detailed information
const techCorp: Corporation = {
  "@type": "Corporation",
  name: "Tech Solutions Inc.",
  foundingDate: "2010-03-15",
  founder: [
    {
      "@type": "Person",
      name: "Alice Johnson",
      jobTitle: "CEO"
    },
    {
      "@type": "Person", 
      name: "Bob Wilson",
      jobTitle: "CTO"
    }
  ],
  employee: [
    {
      "@type": "Person",
      name: "Carol Smith",
      jobTitle: "Senior Developer"
    }
  ],
  numberOfEmployees: {
    "@type": "QuantitativeValue",
    value: 150
  },
  subOrganization: [
    {
      "@type": "Organization",
      name: "R&D Department"
    },
    {
      "@type": "Organization",
      name: "Sales Department"
    }
  ]
};

Local Business Type

A particular physical business or branch of an organization.

/**
 * A particular physical business or branch of an organization
 */
type LocalBusiness = LocalBusinessLeaf | AnimalShelter | ArchiveOrganization |
  AutomotiveBusiness | ChildCare | Dentist | DryCleaningOrLaundry |
  EmergencyService | EmploymentAgency | EntertainmentBusiness |
  FinancialService | FoodEstablishment | GovernmentOffice |
  HealthAndBeautyBusiness | HomeAndConstructionBusiness | InternetCafe |
  LegalService | Library | LodgingBusiness | MedicalBusiness |
  ProfessionalService | RadioStation | RealEstateAgent | RecyclingCenter |
  SelfStorage | ShoppingCenter | SportsActivityLocation | Store |
  TelevisionStation | TouristInformationCenter | TravelAgency | string;

interface LocalBusinessBase extends OrganizationBase, PlaceBase {
  /** The currency accepted */
  currenciesAccepted?: SchemaValue<Text, "currenciesAccepted">;
  /** The opening hours of a certain place */
  openingHours?: SchemaValue<Text, "openingHours">;
  /** Cash, Credit Card, Cryptocurrency, Local Exchange Tradings System, etc. */
  paymentAccepted?: SchemaValue<Text, "paymentAccepted">;
  /** The price range of the business */
  priceRange?: SchemaValue<Text, "priceRange">;
}

Usage Examples:

import type { LocalBusiness, Restaurant, Store } from "schema-dts";

// Local restaurant
const restaurant: Restaurant = {
  "@type": "Restaurant",
  name: "Mario's Italian Kitchen",
  address: {
    "@type": "PostalAddress",
    streetAddress: "456 Main Street",
    addressLocality: "Springfield",
    addressRegion: "IL",  
    postalCode: "62701",
    addressCountry: "US"
  },
  telephone: "+1-555-0200",
  openingHours: [
    "Mo-Th 11:00-22:00",
    "Fr-Sa 11:00-23:00", 
    "Su 12:00-21:00"
  ],
  priceRange: "$$",
  paymentAccepted: "Cash, Credit Card",
  currenciesAccepted: "USD",
  servesCuisine: "Italian"
};

// Retail store
const bookstore: Store = {
  "@type": "BookStore",
  name: "Pages & More Bookstore",
  address: {
    "@type": "PostalAddress",
    streetAddress: "789 Literary Lane",
    addressLocality: "Boston",
    addressRegion: "MA",
    postalCode: "02101", 
    addressCountry: "US"
  },
  openingHours: [
    "Mo-Sa 09:00-21:00",
    "Su 10:00-18:00"
  ],
  paymentAccepted: "Cash, Credit Card, Digital Wallet",
  telephone: "+1-555-0300"
};

Organization Role Types

Specialized role types for describing relationships within organizations.

/**
 * A subclass of Role used to describe roles within organizations
 */
type OrganizationRole<TContent = never, TProperty extends string = never> = 
  OrganizationRoleLeaf<TContent, TProperty> | EmployeeRole<TContent, TProperty>;

interface OrganizationRoleBase extends RoleBase {
  /** A number associated with a role in an organization */
  numberedPosition?: SchemaValue<Number, "numberedPosition">;
}

/**
 * A subclass of OrganizationRole used to describe employee relationships
 */
type EmployeeRole<TContent = never, TProperty extends string = never> = 
  EmployeeRoleLeaf<TContent, TProperty>;

interface EmployeeRoleBase extends OrganizationRoleBase {
  /** The base salary of the job or of an employee in an EmployeeRole */
  baseSalary?: SchemaValue<MonetaryAmount | Number | PriceSpecification, "baseSalary">;
  /** The currency used for the main salary information */
  salaryCurrency?: SchemaValue<Text, "salaryCurrency">;
}

Usage Examples:

// Employee with role details
const employeeRole: Person = {
  "@type": "Person",
  name: "Sarah Connor",
  worksFor: {
    "@type": "Role",
    "@id": "employee-role-123",
    worksFor: {
      "@type": "Organization",
      name: "Cyberdyne Systems"
    },
    roleName: "Senior Software Engineer",
    startDate: "2020-01-15",
    baseSalary: {
      "@type": "MonetaryAmount",
      currency: "USD",
      value: 120000
    },
    numberedPosition: 001
  }
};

Install with Tessl CLI

npx tessl i tessl/npm-schema-dts

docs

core-types.md

creative-work.md

events.md

index.md

person-organization.md

place-location.md

products-commerce.md

roles-relationships.md

schema-generation.md

tile.json