SEO.JSONLD.ContactPoint (SEO v0.3.0-rc.0)

View Source

A contact point—for example, a Customer Complaints department.

Helper for building a Schema.org ContactPoint JSON-LD structure.

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "ContactPoint", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

Build a ContactPoint JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:area_served) =>
      SEO.JSONLD.GeoShape.t()
      | map()
      | SEO.JSONLD.AdministrativeArea.t()
      | SEO.JSONLD.Place.t()
      | String.t(),
    optional(:available_language) =>
      String.t() | SEO.JSONLD.Language.t() | map(),
    optional(:contact_option) => :hearing_impaired_supported | :toll_free,
    optional(:contact_type) => String.t(),
    optional(:email) => String.t(),
    optional(:fax_number) => String.t(),
    optional(:hours_available) =>
      SEO.JSONLD.OpeningHoursSpecification.t() | map(),
    optional(:product_supported) => String.t() | SEO.JSONLD.Product.t() | map(),
    optional(:service_area) =>
      SEO.JSONLD.GeoShape.t()
      | map()
      | SEO.JSONLD.AdministrativeArea.t()
      | SEO.JSONLD.Place.t(),
    optional(:telephone) => String.t(),
    optional(:additional_type) => String.t() | URI.t(),
    optional(:alternate_name) => String.t(),
    optional(:description) => SEO.JSONLD.TextObject.t() | map() | String.t(),
    optional(:disambiguating_description) => String.t(),
    optional(:identifier) =>
      String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
    optional(:image) =>
      URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
    optional(:main_entity_of_page) =>
      SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
    optional(:name) => String.t(),
    optional(:owner) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:potential_action) => SEO.JSONLD.Action.t() | map(),
    optional(:same_as) => URI.t() | String.t(),
    optional(:subject_of) =>
      SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
    optional(:url) => URI.t() | String.t()
  }
  | [
      area_served:
        SEO.JSONLD.GeoShape.t()
        | map()
        | SEO.JSONLD.AdministrativeArea.t()
        | SEO.JSONLD.Place.t()
        | String.t(),
      available_language: String.t() | SEO.JSONLD.Language.t() | map(),
      contact_option: :hearing_impaired_supported | :toll_free,
      contact_type: String.t(),
      email: String.t(),
      fax_number: String.t(),
      hours_available: SEO.JSONLD.OpeningHoursSpecification.t() | map(),
      product_supported: String.t() | SEO.JSONLD.Product.t() | map(),
      service_area:
        SEO.JSONLD.GeoShape.t()
        | map()
        | SEO.JSONLD.AdministrativeArea.t()
        | SEO.JSONLD.Place.t(),
      telephone: String.t(),
      additional_type: String.t() | URI.t(),
      alternate_name: String.t(),
      description: SEO.JSONLD.TextObject.t() | map() | String.t(),
      disambiguating_description: String.t(),
      identifier: String.t() | URI.t() | SEO.JSONLD.PropertyValue.t() | map(),
      image: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
      main_entity_of_page:
        SEO.JSONLD.CreativeWork.t() | map() | URI.t() | String.t(),
      name: String.t(),
      owner: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      potential_action: SEO.JSONLD.Action.t() | map(),
      same_as: URI.t() | String.t(),
      subject_of: SEO.JSONLD.Event.t() | map() | SEO.JSONLD.CreativeWork.t(),
      url: URI.t() | String.t()
    ]

t()

@type t() :: %{required(String.t()) => term()}

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "ContactPoint", plus any camelCased field keys the caller provided (see build/1). "@context" is added at render time by SEO.JSONLD.meta/1 on the top-level node only.

Functions

build(attrs)

@spec build(attrs()) :: t()

Build a ContactPoint JSON-LD map.

Fields

  • :area_served - The geographic area where a service or offered item is provided.
  • :available_language - A language someone may use with or at the item, service or place. Please use one of the language codes from the IETF BCP 47 standard. See also inLanguage.
  • :contact_option - An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). One of: :hearing_impaired_supported, :toll_free.
  • :contact_type - A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point.
  • :email - Email address.
  • :fax_number - The fax number.
  • :hours_available - The hours during which this service or contact is available.
  • :product_supported - The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones").
  • :service_area - The geographic area where the service is provided.
  • :telephone - The telephone number.

Inherited properties

Additional properties are available through the inheritance chain. See each ancestor's docs for its properties: