@prefix rdfc: <https://w3id.org/rdf-connect#>.
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>.
@prefix sh: <http://www.w3.org/ns/shacl#>.
@prefix xsd: <http://www.w3.org/2001/XMLSchema#>.

rdfc:HttpFetch rdfc:jsImplementationOf rdfc:Processor;
  rdfs:label "HTTP Fetch processor";
  rdfs:description "This processor fetches a URL and writes the response to the output channel. It supports various options such as HTTP method, headers, authentication, and scheduling with cron expressions.";
  rdfc:file <./lib/index.js>;
  rdfc:class "HttpFetch";
  rdfc:entrypoint <./>.

[ ] a sh:NodeShape;
  sh:targetClass rdfc:HttpFetchAuth;
  sh:property [
    sh:path rdfc:type;
    sh:name "type";
    sh:datatype xsd:string;
    sh:minCount 1;
    sh:maxCount 1;
  ].

[ ] a sh:NodeShape;
  sh:targetClass rdfc:HttpFetchOptions;
  sh:property [
    sh:path rdfc:method;
    sh:name "method";
    sh:datatype xsd:string;
    sh:maxCount 1;
  ], [
    sh:path rdfc:headers;
    sh:name "headers";
    sh:datatype xsd:string;
  ], [
    sh:path rdfc:acceptStatusCodes;
    sh:name "acceptStatusCodes";
    sh:datatype xsd:string;
  ], [
    sh:path rdfc:closeOnEnd;
    sh:name "closeOnEnd";
    sh:datatype xsd:boolean;
    sh:maxCount 1;
  ], [
    sh:path rdfc:timeOutMilliseconds;
    sh:name "timeOutMilliseconds";
    sh:datatype xsd:integer;
    sh:maxCount 1;
  ], [
    sh:path rdfc:HttpFetchAuth;
    sh:class rdfc:HttpFetchAuth;
    sh:name "auth";
    sh:maxCount 1;
  ], [
    sh:path rdfc:cron;
    sh:name "cron";
    sh:datatype xsd:string;
    sh:maxCount 1;
  ], [
    sh:path rdfc:runOnInit;
    sh:name "runOnInit";
    sh:datatype xsd:boolean;
    sh:maxCount 1;
  ], [
    sh:path rdfc:errorsAreFatal;
    sh:name "errorsAreFatal";
    sh:datatype xsd:boolean;
    sh:maxCount 1;
    sh:minCount 0;
  ], [
    sh:path rdfc:outputAsBuffer;
    sh:name "outputAsBuffer";
    sh:datatype xsd:boolean;
    sh:maxCount 1;
    sh:minCount 0;
  ], [
    sh:path rdfc:outputAsStream;
    sh:name "outputAsStream";
    sh:datatype xsd:boolean;
    sh:maxCount 1;
    sh:minCount 0;
  ].

[ ] a sh:NodeShape;
  sh:targetClass rdfc:HttpFetch;
  sh:property [
    sh:path rdfc:url;
    sh:name "url";
    sh:datatype xsd:string;
    sh:minCount 1;
  ], [
    sh:path rdfc:writer;
    sh:name "writer";
    sh:class rdfc:Writer;
    sh:maxCount 1;
    sh:minCount 1;
  ], [
    sh:path rdfc:options;
    sh:name "options";
    sh:class rdfc:HttpFetchOptions;
    sh:maxCount 1;
  ].

