diff --git a/schema.graphql b/schema.graphql deleted file mode 100644 index db8407d..0000000 --- a/schema.graphql +++ /dev/null @@ -1,105 +0,0 @@ -# This "input" configures a global authorization rule to enable public access to -# all models in this schema. Learn more about authorization rules here: https://docs.amplify.aws/cli/graphql/authorization-rules - -# input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY! -type Mutation { - crawlEngines(search: String, postalCode: String, domainID: String, apexDomain: String): String @function(name: "spiderEngines-${env}") - crawlKeywords(search: String, url: String): String @function(name: "spiderKeywords-${env}") - crawlWebs(url: String): String @function(name: "spiderWebs-${env}") -} - -type WebResult { - data: AWSJSON - parsed: AWSJSON - unstructured: String - type: WEBCRAWLERS -} - -type ParsedEngineResultValue { - key: Int - name: String - score: Float - websiteUrl: String -} - -type ParsedEngineResult { - status: String - reason: AWSJSON - value: ParsedEngineResultValue -} - -type EngineResult { - status: String - reason: AWSJSON - data: AWSJSON # Raw request data - results: [ParsedEngineResult] # parsed results - highScore: Float - foundWebsite: Boolean # Something matched a domain - mostLikely: Int # key in results - exactWebsiteMatch: Int # key in results - exactWebsiteMatchHttp: Int # key in results - exactNameMatch: Int # key in results - rank: Int # where in the searched listings was the listing found - type: ENGINECRAWLERS # Which search engine were the results from -} - -enum ENGINECRAWLERS { - KEYWORD_PLANNER - GOOGLE - FOURSQUARE - FACEBOOK - YELP - INFOGROUP - CITYSEARCH - YELLOW_PAGES -} - -enum WEBCRAWLERS { - NU - LIGHTHOUSE - CUSTOM -} - -type WebCrawl @model @auth( - rules: [ - { allow: owner, ownerField: "owner", operations: [create, update, delete, read] }, - ]) { - id: ID! - url: String - domainID: ID! @index(name: "byDomain") - custom: WebResult - nu: WebResult - lighthouse: WebResult - owner: String -} - -type EngineCrawl @model @auth( - rules: [ - { allow: owner, ownerField: "owner", operations: [create, update, delete, read] }, - ]) { - id: ID! - search: String - domainID: ID! @index(name: "byDomain") - postalCode: String - keywordplanner: EngineResult - citysearch: EngineResult - google: EngineResult - foursquare: EngineResult - facebook: EngineResult - yelp: EngineResult - infogroup: EngineResult - yellowpages: EngineResult - owner: String -} - -type Domain @model @auth( - rules: [ - { allow: owner, ownerField: "owner", operations: [create, update, delete, read] }, - ]) { - id: ID! - name: String - owner: String - EngineCrawls: [EngineCrawl] @hasMany(indexName: "byDomain", fields: ["id"]) - WebCrawls: [WebCrawl] @hasMany(indexName: "byDomain", fields: ["id"]) -} - \ No newline at end of file