# SHACL Shapes generated by @inferal-relay/rdf-emitter

@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tsps: <https://relay.inferal.com/ontology/typespec/shapes/> .
@prefix tspv: <https://relay.inferal.com/ontology/typespec/versioning/> .
@prefix schema: <https://schema.org/> .
@prefix hyros: <https://relay.inferal.com/ontology/hyros/> .

# Class hierarchy
hyros:Provider rdfs:subClassOf schema:Thing .
hyros:ProviderIntegration rdfs:subClassOf schema:Thing .
hyros:Price rdfs:subClassOf schema:PriceSpecification .
hyros:AdSource rdfs:subClassOf schema:Thing .
hyros:Source rdfs:subClassOf schema:Thing .
hyros:TrafficSource rdfs:subClassOf schema:Thing .
hyros:Goal rdfs:subClassOf schema:Thing .
hyros:Category rdfs:subClassOf schema:CategoryCode .
hyros:AdInventory rdfs:subClassOf schema:Thing .
hyros:SourceLinkAd rdfs:subClassOf schema:Thing .
hyros:Attribution rdfs:subClassOf schema:Thing .
hyros:AttributionReport rdfs:subClassOf schema:Thing .
hyros:AdAccountReport rdfs:subClassOf schema:Thing .
hyros:Lead rdfs:subClassOf schema:Person .
hyros:LeadJourney rdfs:subClassOf schema:Thing .
hyros:Sale rdfs:subClassOf schema:Order .
hyros:Product rdfs:subClassOf schema:Product .
hyros:Call rdfs:subClassOf schema:Event .
hyros:CallQualification rdfs:subClassOf schema:Thing .
hyros:LeadJourneyCartItem rdfs:subClassOf schema:Order .
hyros:CartItem rdfs:subClassOf schema:OrderItem .
hyros:Item rdfs:subClassOf schema:OrderItem .
hyros:Subscription rdfs:subClassOf schema:Order .
hyros:WebhookLeadChild rdfs:subClassOf schema:Person .
hyros:WebhookLead rdfs:subClassOf hyros:WebhookLeadChild, schema:Person .
hyros:WebhookProduct rdfs:subClassOf schema:Product .
hyros:WebhookAttribution rdfs:subClassOf hyros:Attribution .
hyros:WebhookSaleEntity rdfs:subClassOf schema:Order .
hyros:WebhookLeadOptInEntity rdfs:subClassOf schema:SubscribeAction .
hyros:WebhookLeadOriginAssignedEntity rdfs:subClassOf schema:Thing .
hyros:WebhookCallEntity rdfs:subClassOf schema:Event .
hyros:WebhookEventBase rdfs:subClassOf schema:Thing .
hyros:SaleAttributedEvent rdfs:subClassOf hyros:WebhookEventBase .
hyros:LeadOptInEvent rdfs:subClassOf hyros:WebhookEventBase .
hyros:LeadOriginAssignedEvent rdfs:subClassOf hyros:WebhookEventBase .
hyros:CallAttributedEvent rdfs:subClassOf hyros:WebhookEventBase .

<https://relay.inferal.com/ontology/hyros/shapes> a tsps:ShapeGeneration ;
  tsps:shapeReferenceChainLimit 5 ;
  tsps:omittedShapeReferenceCount 0 .

# Shape for Success Response
hyros:SuccessResponseShape a sh:NodeShape ;
  sh:targetClass hyros:SuccessResponse ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.SuccessResponse/request_id> ;
    sh:name "request id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.SuccessResponse/result> ;
    sh:name "result" ;
    sh:description "Literal `\"OK\"` on success." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "OK" ) ;
  ] .

# Shape for Provider
hyros:ProviderShape a sh:NodeShape ;
  sh:targetClass hyros:Provider ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Provider/id> ;
    sh:name "id" ;
    sh:description "ID of lead in external platform." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Provider/integration> ;
    sh:name "integration" ;
    sh:description "Details of the integration that originated the record." ;
    sh:node hyros:ProviderIntegrationShape ;
    sh:class hyros:ProviderIntegration ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Provider Integration
hyros:ProviderIntegrationShape a sh:NodeShape ;
  sh:targetClass hyros:ProviderIntegration ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.ProviderIntegration/name> ;
    sh:name "name" ;
    sh:description "Human-readable integration name (e.g. \"Stripe\", \"ClickFunnels\")." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.ProviderIntegration/type> ;
    sh:name "type" ;
    sh:description "Integration platform type (provider classification)." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.ProviderIntegration/id> ;
    sh:name "id" ;
    sh:description "Account ID of the integration in the external platform." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Price
hyros:PriceShape a sh:NodeShape ;
  sh:targetClass hyros:Price ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Price/currency> ;
    sh:name "currency" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Price/price> ;
    sh:name "price" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Price/discount> ;
    sh:name "discount" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Price/hardCost> ;
    sh:name "hard cost" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Price/refunded> ;
    sh:name "refunded" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] .

# Shape for Ad Source
hyros:AdSourceShape a sh:NodeShape ;
  sh:targetClass hyros:AdSource ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdSource/adSourceId> ;
    sh:name "ad source id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdSource/adAccountId> ;
    sh:name "ad account id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdSource/platform> ;
    sh:name "platform" ;
    sh:description "Source platform. `AdspendType` is the REST API's enum and includes `BING`,\nbut Hyros's webhook spec omits `BING` from its `AdSource.platform` list —\nwebhook payloads will never carry that value even though the type permits\nit. REST responses can. Live REST inventory also returns versioned Google\nplatform values such as `GOOGLE_V2`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "FACEBOOK" "GOOGLE" "TIKTOK" "SNAPCHAT" "LINKEDIN" "TWITTER" "PINTEREST" "BING" "GOOGLE_V2" ) ;
  ] .

# Shape for Ad List Item Response
hyros:AdListItemResponseShape a sh:NodeShape ;
  sh:targetClass hyros:AdListItemResponse ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdListItemResponse/name> ;
    sh:name "name" ;
    sh:description "Ad or campaign display name returned by `/api/v1.0/ads`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdListItemResponse/adSource> ;
    sh:name "ad source" ;
    sh:description "Raw nested ad source returned by `/api/v1.0/ads`." ;
    sh:node hyros:AdSourceShape ;
    sh:class hyros:AdSource ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdListItemResponse/source> ;
    sh:name "source" ;
    sh:description "Raw nested Hyros source returned by `/api/v1.0/ads`." ;
    sh:node hyros:SourceShape ;
    sh:class hyros:Source ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdListItemResponse/creationDate> ;
    sh:name "creation date" ;
    sh:description "Unix epoch milliseconds returned by `/api/v1.0/ads`." ;
    sh:datatype xsd:integer ;
    sh:maxCount 1 ;
  ] .

# Shape for Source
hyros:SourceShape a sh:NodeShape ;
  sh:targetClass hyros:Source ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/disregarded> ;
    sh:name "disregarded" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/organic> ;
    sh:name "organic" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/adSource> ;
    sh:name "ad source" ;
    sh:node hyros:AdSourceShape ;
    sh:class hyros:AdSource ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/trafficSource> ;
    sh:name "traffic source" ;
    sh:node hyros:TrafficSourceShape ;
    sh:class hyros:TrafficSource ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/goal> ;
    sh:name "goal" ;
    sh:node hyros:GoalShape ;
    sh:class hyros:Goal ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/category> ;
    sh:name "category" ;
    sh:node hyros:CategoryShape ;
    sh:class hyros:Category ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Source/creationEpoch> ;
    sh:name "creation epoch" ;
    sh:description "Unix epoch seconds (per Hyros source spec — NOT ISO 8601 like\n`creationDate` on Lead/Sale/Call/Subscription). Wire field is\n`creationDate`; renamed to `creationEpoch` in TypeSpec so the RDF\npredicate (`hyros:creationEpoch`) is distinct from the string-typed\n`hyros:creationDate` used by other entities. This avoids a SHACL\ndatatype contradiction (xsd:integer on Source vs xsd:string in the\nontology's predicate range declaration)." ;
    sh:datatype xsd:integer ;
    sh:maxCount 1 ;
  ] .

# Shape for Traffic Source
hyros:TrafficSourceShape a sh:NodeShape ;
  sh:targetClass hyros:TrafficSource ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.TrafficSource/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.TrafficSource/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Goal
hyros:GoalShape a sh:NodeShape ;
  sh:targetClass hyros:Goal ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Goal/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Goal/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Category
hyros:CategoryShape a sh:NodeShape ;
  sh:targetClass hyros:Category ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Category/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Category/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Ad Inventory
hyros:AdInventoryShape a sh:NodeShape ;
  sh:targetClass hyros:AdInventory ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdInventory/name> ;
    sh:name "name" ;
    sh:description "Ad or campaign display name derived from `/api/v1.0/ads`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdInventory/adSourceId> ;
    sh:name "ad source id" ;
    sh:description "Ad source id flattened from `adSource.adSourceId`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdInventory/adAccountId> ;
    sh:name "ad account id" ;
    sh:description "Ad account id flattened from `adSource.adAccountId`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdInventory/platform> ;
    sh:name "platform" ;
    sh:description "Platform flattened from `adSource.platform`; live REST can return `GOOGLE_V2`." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "FACEBOOK" "GOOGLE" "TIKTOK" "SNAPCHAT" "LINKEDIN" "TWITTER" "PINTEREST" "BING" "GOOGLE_V2" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdInventory/creationDate> ;
    sh:name "creation date" ;
    sh:description "Unix epoch milliseconds from `/api/v1.0/ads`.\n\nThis wire field remains `creationDate`, but its RDF predicate is mapped to\n`hyros:creationEpoch` to avoid conflicting with ISO/date-like\n`creationDate` fields on other Hyros entities." ;
    sh:datatype xsd:integer ;
    sh:maxCount 1 ;
  ] .

# Shape for Source Link Ad
hyros:SourceLinkAdShape a sh:NodeShape ;
  sh:targetClass hyros:SourceLinkAd ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.SourceLinkAd/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.SourceLinkAd/adSourceId> ;
    sh:name "ad source id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Attribution
hyros:AttributionShape a sh:NodeShape ;
  sh:targetClass hyros:Attribution ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/sourceLinkId> ;
    sh:name "source link id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/disregarded> ;
    sh:name "disregarded" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/organic> ;
    sh:name "organic" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/clickDate> ;
    sh:name "click date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/clickId> ;
    sh:name "click id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/adSource> ;
    sh:name "ad source" ;
    sh:node hyros:AdSourceShape ;
    sh:class hyros:AdSource ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/sourceLinkAd> ;
    sh:name "source link ad" ;
    sh:node hyros:SourceLinkAdShape ;
    sh:class hyros:SourceLinkAd ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/trafficSource> ;
    sh:name "traffic source" ;
    sh:node hyros:TrafficSourceShape ;
    sh:class hyros:TrafficSource ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/goal> ;
    sh:name "goal" ;
    sh:node hyros:GoalShape ;
    sh:class hyros:Goal ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/category> ;
    sh:name "category" ;
    sh:node hyros:CategoryShape ;
    sh:class hyros:Category ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/gclId> ;
    sh:name "gcl id" ;
    sh:description "Only for Google." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/gbraId> ;
    sh:name "gbra id" ;
    sh:description "Only for Google." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Attribution/wbraId> ;
    sh:name "wbra id" ;
    sh:description "Only for Google." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Attribution Report
hyros:AttributionReportShape a sh:NodeShape ;
  sh:targetClass hyros:AttributionReport ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/id> ;
    sh:name "id" ;
    sh:description "Runtime-stable report row id, usually the configured source/ad id." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/campaignId> ;
    sh:name "campaign id" ;
    sh:description "Campaign/source id returned by `/api/v1.0/attribution` when grouped by campaign/source level." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/attributionModel> ;
    sh:name "attribution model" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/date> ;
    sh:name "date" ;
    sh:description "Report period day from the dynamic Hyros row." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/revenue> ;
    sh:name "revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/sales> ;
    sh:name "sales" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/calls> ;
    sh:name "calls" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/cost> ;
    sh:name "cost" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/roas> ;
    sh:name "roas" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/aov> ;
    sh:name "aov" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/cac> ;
    sh:name "cac" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/costPerSale> ;
    sh:name "cost per sale" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/netProfit> ;
    sh:name "net profit" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/uniqueSales> ;
    sh:name "unique sales" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/uniqueCustomers> ;
    sh:name "unique customers" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/totalRevenue> ;
    sh:name "total revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/recurringRevenue> ;
    sh:name "recurring revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/newCustomersPercentage> ;
    sh:name "new customers percentage" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/recurringCustomers> ;
    sh:name "recurring customers" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/refund> ;
    sh:name "refund" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/refundCount> ;
    sh:name "refund count" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AttributionReport/refundSalesPercentage> ;
    sh:name "refund sales percentage" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] .

# Shape for Ad Account Report
hyros:AdAccountReportShape a sh:NodeShape ;
  sh:targetClass hyros:AdAccountReport ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/id> ;
    sh:name "id" ;
    sh:description "Ad account id used for the `/api/v1.0/attribution/ad-account` request." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/attributionModel> ;
    sh:name "attribution model" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/startDate> ;
    sh:name "start date" ;
    sh:description "Query window lower bound used for this aggregate row." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/endDate> ;
    sh:name "end date" ;
    sh:description "Query window upper bound used for this aggregate row." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/revenue> ;
    sh:name "revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/sales> ;
    sh:name "sales" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/calls> ;
    sh:name "calls" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/cost> ;
    sh:name "cost" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/roas> ;
    sh:name "roas" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/aov> ;
    sh:name "aov" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/cac> ;
    sh:name "cac" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/costPerSale> ;
    sh:name "cost per sale" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/netProfit> ;
    sh:name "net profit" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/uniqueSales> ;
    sh:name "unique sales" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/uniqueCustomers> ;
    sh:name "unique customers" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/totalRevenue> ;
    sh:name "total revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/recurringRevenue> ;
    sh:name "recurring revenue" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/newCustomersPercentage> ;
    sh:name "new customers percentage" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/recurringCustomers> ;
    sh:name "recurring customers" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/refund> ;
    sh:name "refund" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/refundCount> ;
    sh:name "refund count" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.AdAccountReport/refundSalesPercentage> ;
    sh:name "refund sales percentage" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] .

# Shape for Lead
hyros:LeadShape a sh:NodeShape ;
  sh:targetClass hyros:Lead ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/email> ;
    sh:name "email" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/creationDate> ;
    sh:name "creation date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/tags> ;
    sh:name "tags" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/ips> ;
    sh:name "ips" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/phoneNumbers> ;
    sh:name "phone numbers" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/firstName> ;
    sh:name "first name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/lastName> ;
    sh:name "last name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Lead/provider> ;
    sh:name "provider" ;
    sh:node hyros:ProviderShape ;
    sh:class hyros:Provider ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Lead Journey
hyros:LeadJourneyShape a sh:NodeShape ;
  sh:targetClass hyros:LeadJourney ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourney/lead> ;
    sh:name "lead" ;
    sh:node hyros:LeadShape ;
    sh:class hyros:Lead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourney/sales> ;
    sh:name "sales" ;
    sh:node hyros:SaleShape ;
    sh:class hyros:Sale ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourney/calls> ;
    sh:name "calls" ;
    sh:node hyros:CallShape ;
    sh:class hyros:Call ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourney/carts> ;
    sh:name "carts" ;
    sh:node hyros:LeadJourneyCartItemShape ;
    sh:class hyros:LeadJourneyCartItem ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourney/linkedLeads> ;
    sh:name "linked leads" ;
    sh:node hyros:LeadShape ;
    sh:class hyros:Lead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] .

# Shape for Sale
hyros:SaleShape a sh:NodeShape ;
  sh:targetClass hyros:Sale ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/id> ;
    sh:name "id" ;
    sh:description "Hyros-assigned internal sale ID (prefixed `sle-...`)." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/orderId> ;
    sh:name "order id" ;
    sh:description "Client-supplied stable identifier from the upstream order system\n(typically a Stripe charge ID, payment processor reference, or\ne-commerce order number). Acts as a dedup key on `POST /orders`:\nresubmitting the same `orderId` updates the existing sale rather\nthan creating a duplicate. Use this as the at-least-once retry\nhandle when ingesting from a source system that issues stable IDs." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/creationDate> ;
    sh:name "creation date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/qualified> ;
    sh:name "qualified" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/score> ;
    sh:name "score" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/recurring> ;
    sh:name "recurring" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/quantity> ;
    sh:name "quantity" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/lead> ;
    sh:name "lead" ;
    sh:node hyros:LeadShape ;
    sh:class hyros:Lead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/firstSource> ;
    sh:name "first source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/lastSource> ;
    sh:name "last source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/price> ;
    sh:name "price" ;
    sh:node hyros:PriceShape ;
    sh:class hyros:Price ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/product> ;
    sh:name "product" ;
    sh:node hyros:ProductShape ;
    sh:class hyros:Product ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Sale/provider> ;
    sh:name "provider" ;
    sh:node hyros:ProviderShape ;
    sh:class hyros:Provider ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Product
hyros:ProductShape a sh:NodeShape ;
  sh:targetClass hyros:Product ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/sku> ;
    sh:name "sku" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/category> ;
    sh:name "category" ;
    sh:node hyros:CategoryShape ;
    sh:class hyros:Category ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Product/provider> ;
    sh:name "provider" ;
    sh:node hyros:ProviderShape ;
    sh:class hyros:Provider ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Call
hyros:CallShape a sh:NodeShape ;
  sh:targetClass hyros:Call ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/id> ;
    sh:name "id" ;
    sh:description "Hyros-assigned internal call ID." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/qualified> ;
    sh:name "qualified" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/externalId> ;
    sh:name "external id" ;
    sh:description "Client-supplied stable identifier from the upstream calling system\n(e.g. Calendly event ID). Acts as a dedup key on `POST /calls`:\nresubmitting the same `externalId` updates the existing call rather\nthan creating a duplicate. Use this as the at-least-once retry handle\nwhen ingesting from a source system that issues stable IDs." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/score> ;
    sh:name "score" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/creationDate> ;
    sh:name "creation date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/state> ;
    sh:name "state" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "QUALIFIED" "UNQUALIFIED" "CANCELLED" "NO_SHOW" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/qualification> ;
    sh:name "qualification" ;
    sh:node hyros:CallQualificationShape ;
    sh:class hyros:CallQualification ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/lead> ;
    sh:name "lead" ;
    sh:node hyros:LeadShape ;
    sh:class hyros:Lead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/firstSource> ;
    sh:name "first source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Call/lastSource> ;
    sh:name "last source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Call Qualification
hyros:CallQualificationShape a sh:NodeShape ;
  sh:targetClass hyros:CallQualification ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CallQualification/name> ;
    sh:name "name" ;
    sh:description "Current qualification stage name." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CallQualification/oldName> ;
    sh:name "old name" ;
    sh:description "Previous qualification stage name, if the stage was renamed." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Lead Journey Cart Item
hyros:LeadJourneyCartItemShape a sh:NodeShape ;
  sh:targetClass hyros:LeadJourneyCartItem ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/id> ;
    sh:name "id" ;
    sh:description "Cart identifier in Hyros." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/orderId> ;
    sh:name "order id" ;
    sh:description "Order ID this cart resulted in. Only present if the cart was purchased." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/creationDate> ;
    sh:name "creation date" ;
    sh:description "ISO 8601 cart creation timestamp." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/events> ;
    sh:name "events" ;
    sh:description "Number of cart events (add-to-cart, update) observed for this cart." ;
    sh:datatype xsd:integer ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/provider> ;
    sh:name "provider" ;
    sh:description "Upstream provider that originated the cart record." ;
    sh:node hyros:ProviderShape ;
    sh:class hyros:Provider ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/products> ;
    sh:name "products" ;
    sh:description "Products in the cart at the time of the snapshot." ;
    sh:node hyros:ProductShape ;
    sh:class hyros:Product ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/firstSource> ;
    sh:name "first source" ;
    sh:description "First attribution (first-touch) source for the cart's owning lead." ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.LeadJourneyCartItem/lastSource> ;
    sh:name "last source" ;
    sh:description "Last attribution (last-touch) source for the cart's owning lead." ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Cart Item
hyros:CartItemShape a sh:NodeShape ;
  sh:targetClass hyros:CartItem ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CartItem/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CartItem/price> ;
    sh:name "price" ;
    sh:datatype xsd:double ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CartItem/externalId> ;
    sh:name "external id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CartItem/quantity> ;
    sh:name "quantity" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.CartItem/sku> ;
    sh:name "sku" ;
    sh:description "Unique product reference code." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Item
hyros:ItemShape a sh:NodeShape ;
  sh:targetClass hyros:Item ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/name> ;
    sh:name "name" ;
    sh:description "Name of the product." ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/price> ;
    sh:name "price" ;
    sh:description "Product price per unit (costOfGoods included)." ;
    sh:datatype xsd:double ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/externalId> ;
    sh:name "external id" ;
    sh:description "Unique identifier from the external integration." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/quantity> ;
    sh:name "quantity" ;
    sh:description "Number of copies purchased. Defaults to 1." ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/costOfGoods> ;
    sh:name "cost of goods" ;
    sh:description "Cost per unit of manufacture. Must be included in the price. Defaults to 0." ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/taxes> ;
    sh:name "taxes" ;
    sh:description "Taxes applied to the item per unit. Defaults to 0." ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/itemDiscount> ;
    sh:name "item discount" ;
    sh:description "Discount applied to this specific line item." ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/packages> ;
    sh:name "packages" ;
    sh:description "Product packages this item belongs to (used for recurring sales attribution)." ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/tag> ;
    sh:name "tag" ;
    sh:description "Tag to create for the sale item." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Item/categoryName> ;
    sh:name "category name" ;
    sh:description "Links the sale to a product category." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Subscription
hyros:SubscriptionShape a sh:NodeShape ;
  sh:targetClass hyros:Subscription ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/subscriptionId> ;
    sh:name "subscription id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/startDate> ;
    sh:name "start date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/endDate> ;
    sh:name "end date" ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/cancelAtDate> ;
    sh:name "cancel at date" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/trialStartDate> ;
    sh:name "trial start date" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/trialEndDate> ;
    sh:name "trial end date" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/price> ;
    sh:name "price" ;
    sh:description "Faithful to the source spec: scalar number on Subscription (unlike\nSale.price which is a Price object). Hyros treats subscription pricing\nas a single recurring amount rather than a multi-field breakdown." ;
    sh:datatype xsd:decimal ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/status> ;
    sh:name "status" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "ACTIVE" "TRIALING" "CANCELED" "PAST_DUE" "INCOMPLETE" "INCOMPLETE_EXPIRED" "UNPAID" "COMPLETED" "PAUSED" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/periodicity> ;
    sh:name "periodicity" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/planId> ;
    sh:name "plan id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/lead> ;
    sh:name "lead" ;
    sh:node hyros:LeadShape ;
    sh:class hyros:Lead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/firstSource> ;
    sh:name "first source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/lastSource> ;
    sh:name "last source" ;
    sh:or (
      [ sh:node hyros:AttributionShape ; sh:class hyros:Attribution ]
      [ sh:node hyros:WebhookAttributionShape ; sh:class hyros:WebhookAttribution ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/category> ;
    sh:name "category" ;
    sh:node hyros:CategoryShape ;
    sh:class hyros:Category ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Subscription/provider> ;
    sh:name "provider" ;
    sh:node hyros:ProviderShape ;
    sh:class hyros:Provider ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Lead Child
hyros:WebhookLeadChildShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookLeadChild ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadChild/email> ;
    sh:name "email" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadChild/joinDate> ;
    sh:name "join date" ;
    sh:description "Join date in the user's timezone." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadChild/UTCJoinDate> ;
    sh:name "utcjoin date" ;
    sh:description "Join date in UTC." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Lead
hyros:WebhookLeadShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookLead ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLead/ips> ;
    sh:name "ips" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLead/tags> ;
    sh:name "tags" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLead/phoneNumbers> ;
    sh:name "phone numbers" ;
    sh:datatype xsd:string ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLead/firstName> ;
    sh:name "first name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLead/lastName> ;
    sh:name "last name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Product
hyros:WebhookProductShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookProduct ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/quantity> ;
    sh:name "quantity" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/name> ;
    sh:name "name" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/category> ;
    sh:name "category" ;
    sh:node hyros:CategoryShape ;
    sh:class hyros:Category ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/price> ;
    sh:name "price" ;
    sh:description "Price in the outbound currency configured in Hyros." ;
    sh:node hyros:PriceShape ;
    sh:class hyros:Price ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookProduct/USDPrice> ;
    sh:name "usdprice" ;
    sh:description "Price in USD." ;
    sh:node hyros:PriceShape ;
    sh:class hyros:Price ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Attribution
hyros:WebhookAttributionShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookAttribution ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookAttribution/UTCClickDate> ;
    sh:name "utcclick date" ;
    sh:description "Click date in UTC. Only present on webhook payloads." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Sale Entity
hyros:WebhookSaleEntityShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookSaleEntity ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "SALE" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/date> ;
    sh:name "date" ;
    sh:description "Date of the sale in the user's timezone." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/UTCDate> ;
    sh:name "utcdate" ;
    sh:description "Date of the sale in UTC." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/qualified> ;
    sh:name "qualified" ;
    sh:description "True if the sale score is 1." ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/score> ;
    sh:name "score" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/orderId> ;
    sh:name "order id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/recurring> ;
    sh:name "recurring" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/attribution> ;
    sh:name "attribution" ;
    sh:node hyros:WebhookAttributionShape ;
    sh:class hyros:WebhookAttribution ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/lead> ;
    sh:name "lead" ;
    sh:node hyros:WebhookLeadShape ;
    sh:class hyros:WebhookLead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookSaleEntity/product> ;
    sh:name "product" ;
    sh:node hyros:WebhookProductShape ;
    sh:class hyros:WebhookProduct ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Lead Opt In Entity
hyros:WebhookLeadOptInEntityShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookLeadOptInEntity ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/firstOptin> ;
    sh:name "first optin" ;
    sh:description "Identifies whether this is the first opt-in for the lead." ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/date> ;
    sh:name "date" ;
    sh:description "Opt-in date in the user's timezone." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/UTCDate> ;
    sh:name "utcdate" ;
    sh:description "Opt-in date in UTC." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/referrerUrl> ;
    sh:name "referrer url" ;
    sh:description "Referrer URL from which the lead opted in." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/lead> ;
    sh:name "lead" ;
    sh:node hyros:WebhookLeadShape ;
    sh:class hyros:WebhookLead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/attribution> ;
    sh:name "attribution" ;
    sh:description "All attributions the lead has." ;
    sh:node hyros:WebhookAttributionShape ;
    sh:class hyros:WebhookAttribution ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/firstSource> ;
    sh:name "first source" ;
    sh:node hyros:WebhookAttributionShape ;
    sh:class hyros:WebhookAttribution ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOptInEntity/lastSource> ;
    sh:name "last source" ;
    sh:node hyros:WebhookAttributionShape ;
    sh:class hyros:WebhookAttribution ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Lead Origin Assigned Entity
hyros:WebhookLeadOriginAssignedEntityShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookLeadOriginAssignedEntity ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/mechanism> ;
    sh:name "mechanism" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "SESSION_ID" "PHONE_NUMBER" "IP" "MANUAL" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/childLead> ;
    sh:name "child lead" ;
    sh:description "The lead assigned as child. Wire field is `lead`; renamed to\n`childLead` in TypeSpec to disambiguate from `originLead` and to make\nthe predicate-name match for `hyros:childLead`." ;
    sh:or (
      [ sh:node hyros:WebhookLeadShape ; sh:class hyros:WebhookLead ]
      [ sh:node hyros:WebhookLeadChildShape ; sh:class hyros:WebhookLeadChild ]
    ) ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/originLead> ;
    sh:name "origin lead" ;
    sh:description "The lead assigned as origin." ;
    sh:node hyros:WebhookLeadShape ;
    sh:class hyros:WebhookLead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/date> ;
    sh:name "date" ;
    sh:description "Origin-assignment time in the user's timezone." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/UTCDate> ;
    sh:name "utcdate" ;
    sh:description "Origin-assignment time in UTC." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookLeadOriginAssignedEntity/matchingValues> ;
    sh:name "matching values" ;
    sh:description "Values on which the two leads were matched." ;
    sh:datatype xsd:string ;
  ] .

# Shape for Webhook Call Entity
hyros:WebhookCallEntityShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookCallEntity ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/id> ;
    sh:name "id" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
    sh:in ( "CALL" ) ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/date> ;
    sh:name "date" ;
    sh:description "Call date in the user's timezone." ;
    sh:datatype xsd:dateTime ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/UTCDate> ;
    sh:name "utcdate" ;
    sh:description "Call date in UTC." ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/qualified> ;
    sh:name "qualified" ;
    sh:datatype xsd:boolean ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/score> ;
    sh:name "score" ;
    sh:datatype xsd:double ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/tag> ;
    sh:name "tag" ;
    sh:datatype xsd:string ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/attribution> ;
    sh:name "attribution" ;
    sh:node hyros:WebhookAttributionShape ;
    sh:class hyros:WebhookAttribution ;
    sh:nodeKind sh:BlankNodeOrIRI ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookCallEntity/lead> ;
    sh:name "lead" ;
    sh:node hyros:WebhookLeadShape ;
    sh:class hyros:WebhookLead ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:maxCount 1 ;
  ] .

# Shape for Webhook Event Base
hyros:WebhookEventBaseShape a sh:NodeShape ;
  sh:targetClass hyros:WebhookEventBase ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookEventBase/subscriptionId> ;
    sh:name "subscription id" ;
    sh:description "ID of the subscription that triggered delivery." ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookEventBase/eventId> ;
    sh:name "event id" ;
    sh:description "Unique event ID, suitable for consumer-side deduplication." ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookEventBase/type> ;
    sh:name "type" ;
    sh:description "Event type discriminator." ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.WebhookEventBase/timestamp> ;
    sh:name "timestamp" ;
    sh:description "ISO 8601 timestamp when the event was sent." ;
    sh:datatype xsd:dateTime ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] .

# Shape for Sale Attributed Event
hyros:SaleAttributedEventShape a sh:NodeShape ;
  sh:targetClass hyros:SaleAttributedEvent ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.SaleAttributedEvent/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:hasValue "sale.attributed" ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.SaleAttributedEvent/body> ;
    sh:name "body" ;
    sh:node hyros:WebhookSaleEntityShape ;
    sh:class hyros:WebhookSaleEntity ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] .

# Shape for Lead Opt In Event
hyros:LeadOptInEventShape a sh:NodeShape ;
  sh:targetClass hyros:LeadOptInEvent ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.LeadOptInEvent/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:hasValue "lead.opted.in" ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.LeadOptInEvent/body> ;
    sh:name "body" ;
    sh:node hyros:WebhookLeadOptInEntityShape ;
    sh:class hyros:WebhookLeadOptInEntity ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] .

# Shape for Lead Origin Assigned Event
hyros:LeadOriginAssignedEventShape a sh:NodeShape ;
  sh:targetClass hyros:LeadOriginAssignedEvent ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.LeadOriginAssignedEvent/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:hasValue "lead.origin.assigned" ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.LeadOriginAssignedEvent/body> ;
    sh:name "body" ;
    sh:node hyros:WebhookLeadOriginAssignedEntityShape ;
    sh:class hyros:WebhookLeadOriginAssignedEntity ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] .

# Shape for Call Attributed Event
hyros:CallAttributedEventShape a sh:NodeShape ;
  sh:targetClass hyros:CallAttributedEvent ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.CallAttributedEvent/type> ;
    sh:name "type" ;
    sh:datatype xsd:string ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
    sh:hasValue "call.attributed" ;
  ] ;
  sh:property [
    sh:path <https://relay.inferal.com/ontology/hyros/property/Hyros.Events.CallAttributedEvent/body> ;
    sh:name "body" ;
    sh:node hyros:WebhookCallEntityShape ;
    sh:class hyros:WebhookCallEntity ;
    sh:nodeKind sh:BlankNodeOrIRI ;
    sh:minCount 1 ;
    sh:maxCount 1 ;
  ] .
