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

View Source

A service provided by an organization, e.g. delivery service, print services, etc.

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

Summary

Types

t()

A JSON-LD map ready to be nested or rendered. String-keyed, always includes "@type" set to "Service", 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 Service JSON-LD map.

Types

attrs()

@type attrs() ::
  %{
    optional(:aggregate_rating) => SEO.JSONLD.AggregateRating.t() | map(),
    optional(:area_served) =>
      SEO.JSONLD.GeoShape.t()
      | map()
      | SEO.JSONLD.AdministrativeArea.t()
      | SEO.JSONLD.Place.t()
      | String.t(),
    optional(:audience) => SEO.JSONLD.Audience.t() | map(),
    optional(:available_channel) => SEO.JSONLD.ServiceChannel.t() | map(),
    optional(:award) => String.t(),
    optional(:brand) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Brand.t(),
    optional(:broker) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:category) =>
      String.t()
      | URI.t()
      | SEO.JSONLD.Thing.t()
      | map()
      | :aerobic_activity
      | :anaerobic_activity
      | :balance
      | :flexibility
      | :leisure_time_activity
      | :occupational_activity
      | :strength_training
      | SEO.JSONLD.CategoryCode.t(),
    optional(:has_certification) => SEO.JSONLD.Certification.t() | map(),
    optional(:has_offer_catalog) => SEO.JSONLD.OfferCatalog.t() | map(),
    optional(:hours_available) =>
      SEO.JSONLD.OpeningHoursSpecification.t() | map(),
    optional(:is_related_to) => t() | map() | SEO.JSONLD.Product.t(),
    optional(:is_similar_to) => t() | map() | SEO.JSONLD.Product.t(),
    optional(:logo) =>
      URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
    optional(:offers) => SEO.JSONLD.Offer.t() | map() | SEO.JSONLD.Demand.t(),
    optional(:produces) => SEO.JSONLD.Thing.t() | map(),
    optional(:provider) =>
      SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
    optional(:provider_mobility) => String.t(),
    optional(:review) => SEO.JSONLD.Review.t() | map(),
    optional(:service_area) =>
      SEO.JSONLD.GeoShape.t()
      | map()
      | SEO.JSONLD.AdministrativeArea.t()
      | SEO.JSONLD.Place.t(),
    optional(:service_audience) => SEO.JSONLD.Audience.t() | map(),
    optional(:service_output) => SEO.JSONLD.Thing.t() | map(),
    optional(:service_type) =>
      :basic_income
      | :business_support
      | :disability_support
      | :health_care
      | :one_time_payments
      | :paid_leave
      | :parental_support
      | :unemployment_support
      | String.t(),
    optional(:slogan) => String.t(),
    optional(:terms_of_service) => String.t() | URI.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()
  }
  | [
      aggregate_rating: SEO.JSONLD.AggregateRating.t() | map(),
      area_served:
        SEO.JSONLD.GeoShape.t()
        | map()
        | SEO.JSONLD.AdministrativeArea.t()
        | SEO.JSONLD.Place.t()
        | String.t(),
      audience: SEO.JSONLD.Audience.t() | map(),
      available_channel: SEO.JSONLD.ServiceChannel.t() | map(),
      award: String.t(),
      brand: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Brand.t(),
      broker: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      category:
        String.t()
        | URI.t()
        | SEO.JSONLD.Thing.t()
        | map()
        | :aerobic_activity
        | :anaerobic_activity
        | :balance
        | :flexibility
        | :leisure_time_activity
        | :occupational_activity
        | :strength_training
        | SEO.JSONLD.CategoryCode.t(),
      has_certification: SEO.JSONLD.Certification.t() | map(),
      has_offer_catalog: SEO.JSONLD.OfferCatalog.t() | map(),
      hours_available: SEO.JSONLD.OpeningHoursSpecification.t() | map(),
      is_related_to: t() | map() | SEO.JSONLD.Product.t(),
      is_similar_to: t() | map() | SEO.JSONLD.Product.t(),
      logo: URI.t() | String.t() | SEO.JSONLD.ImageObject.t() | map(),
      offers: SEO.JSONLD.Offer.t() | map() | SEO.JSONLD.Demand.t(),
      produces: SEO.JSONLD.Thing.t() | map(),
      provider: SEO.JSONLD.Organization.t() | map() | SEO.JSONLD.Person.t(),
      provider_mobility: String.t(),
      review: SEO.JSONLD.Review.t() | map(),
      service_area:
        SEO.JSONLD.GeoShape.t()
        | map()
        | SEO.JSONLD.AdministrativeArea.t()
        | SEO.JSONLD.Place.t(),
      service_audience: SEO.JSONLD.Audience.t() | map(),
      service_output: SEO.JSONLD.Thing.t() | map(),
      service_type:
        :basic_income
        | :business_support
        | :disability_support
        | :health_care
        | :one_time_payments
        | :paid_leave
        | :parental_support
        | :unemployment_support
        | String.t(),
      slogan: String.t(),
      terms_of_service: String.t() | URI.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 "Service", 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 Service JSON-LD map.

Fields

  • :aggregate_rating - The overall rating, based on a collection of reviews or ratings, of the item.
  • :area_served - The geographic area where a service or offered item is provided.
  • :audience - An intended audience, i.e. a group for whom something was created.
  • :available_channel - A means of accessing the service (e.g. a phone bank, a web site, a location, etc.).
  • :award - An award won by or for this item.
  • :brand - The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person.
  • :broker - An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred.
  • :category - A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. One of: :aerobic_activity, :anaerobic_activity, :balance, :flexibility, :leisure_time_activity, :occupational_activity, :strength_training.
  • :has_certification - Certification information about a product, organization, service, place, or person.
  • :has_offer_catalog - Indicates an OfferCatalog listing for this Organization, Person, or Service.
  • :hours_available - The hours during which this service or contact is available.
  • :is_related_to - A pointer to another, somehow related product (or multiple products).
  • :is_similar_to - A pointer to another, functionally similar product (or multiple products).
  • :logo - An associated logo.
  • :offers - An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, perform a service, or give away tickets to an event. Use businessFunction to indicate the kind of transaction offered, i.e. sell, lease, etc. This property can also be used to describe a SEO.JSONLD.Demand. While this property is listed as expected on a number of common types, it can be used in others. In that case, using a second type, such as Product or a subtype of Product, can clarify the nature of the offer.
  • :produces - The tangible thing generated by the service, e.g. a passport, permit, etc.
  • :provider - The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller.
  • :provider_mobility - Indicates the mobility of a provided service (e.g. 'static', 'dynamic').
  • :review - A review of the item.
  • :service_area - The geographic area where the service is provided.
  • :service_audience - The audience eligible for this service.
  • :service_output - The tangible thing generated by the service, e.g. a passport, permit, etc.
  • :service_type - The type of service being offered, e.g. veterans' benefits, emergency relief, etc. One of: :basic_income, :business_support, :disability_support, :health_care, :one_time_payments, :paid_leave, :parental_support, :unemployment_support.
  • :slogan - A slogan or motto associated with the item.
  • :terms_of_service - Human-readable terms of service documentation.

Inherited properties

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