-- Do not manually edit this file, it was auto-generated by dillonkearns/elm-graphql -- https://github.com/dillonkearns/elm-graphql module Github.Object.MarketplaceListing exposing (LogoUrlOptionalArguments, companyUrl, configurationResourcePath, configurationUrl, documentationUrl, extendedDescription, extendedDescriptionHTML, fullDescription, fullDescriptionHTML, hasApprovalBeenRequested, hasPublishedFreeTrialPlans, hasTermsOfService, howItWorks, howItWorksHTML, id, installationUrl, installedForViewer, isApproved, isDelisted, isDraft, isPaid, isRejected, logoBackgroundColor, logoUrl, name, normalizedShortDescription, pricingUrl, primaryCategory, privacyPolicyUrl, resourcePath, screenshotUrls, secondaryCategory, selection, shortDescription, slug, statusUrl, supportEmail, supportUrl, termsOfServiceUrl, url, viewerCanAddPlans, viewerCanApprove, viewerCanDelist, viewerCanEdit, viewerCanEditCategories, viewerCanEditPlans, viewerCanRedraft, viewerCanReject, viewerCanRequestApproval, viewerHasPurchased, viewerHasPurchasedForAllOrganizations, viewerIsListingAdmin) import Github.InputObject import Github.Interface import Github.Object import Github.Scalar import Github.Union import Graphql.Field as Field exposing (Field) import Graphql.Internal.Builder.Argument as Argument exposing (Argument) import Graphql.Internal.Builder.Object as Object import Graphql.Internal.Encode as Encode exposing (Value) import Graphql.OptionalArgument exposing (OptionalArgument(..)) import Graphql.SelectionSet exposing (SelectionSet) import Json.Decode as Decode {-| Select fields to build up a SelectionSet for this object. -} selection : (a -> constructor) -> SelectionSet (a -> constructor) Github.Object.MarketplaceListing selection constructor = Object.selection constructor {-| URL to the listing owner's company site. -} companyUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing companyUrl = Object.fieldDecoder "companyUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| The HTTP path for configuring access to the listing's integration or OAuth app -} configurationResourcePath : Field Github.Scalar.Uri Github.Object.MarketplaceListing configurationResourcePath = Object.fieldDecoder "configurationResourcePath" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| The HTTP URL for configuring access to the listing's integration or OAuth app -} configurationUrl : Field Github.Scalar.Uri Github.Object.MarketplaceListing configurationUrl = Object.fieldDecoder "configurationUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| URL to the listing's documentation. -} documentationUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing documentationUrl = Object.fieldDecoder "documentationUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| The listing's detailed description. -} extendedDescription : Field (Maybe String) Github.Object.MarketplaceListing extendedDescription = Object.fieldDecoder "extendedDescription" [] (Decode.string |> Decode.nullable) {-| The listing's detailed description rendered to HTML. -} extendedDescriptionHTML : Field Github.Scalar.Html Github.Object.MarketplaceListing extendedDescriptionHTML = Object.fieldDecoder "extendedDescriptionHTML" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Html) {-| The listing's introductory description. -} fullDescription : Field String Github.Object.MarketplaceListing fullDescription = Object.fieldDecoder "fullDescription" [] Decode.string {-| The listing's introductory description rendered to HTML. -} fullDescriptionHTML : Field Github.Scalar.Html Github.Object.MarketplaceListing fullDescriptionHTML = Object.fieldDecoder "fullDescriptionHTML" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Html) {-| Whether this listing has been submitted for review from GitHub for approval to be displayed in the Marketplace. -} hasApprovalBeenRequested : Field Bool Github.Object.MarketplaceListing hasApprovalBeenRequested = Object.fieldDecoder "hasApprovalBeenRequested" [] Decode.bool {-| Does this listing have any plans with a free trial? -} hasPublishedFreeTrialPlans : Field Bool Github.Object.MarketplaceListing hasPublishedFreeTrialPlans = Object.fieldDecoder "hasPublishedFreeTrialPlans" [] Decode.bool {-| Does this listing have a terms of service link? -} hasTermsOfService : Field Bool Github.Object.MarketplaceListing hasTermsOfService = Object.fieldDecoder "hasTermsOfService" [] Decode.bool {-| A technical description of how this app works with GitHub. -} howItWorks : Field (Maybe String) Github.Object.MarketplaceListing howItWorks = Object.fieldDecoder "howItWorks" [] (Decode.string |> Decode.nullable) {-| The listing's technical description rendered to HTML. -} howItWorksHTML : Field Github.Scalar.Html Github.Object.MarketplaceListing howItWorksHTML = Object.fieldDecoder "howItWorksHTML" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Html) id : Field Github.Scalar.Id Github.Object.MarketplaceListing id = Object.fieldDecoder "id" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Id) {-| URL to install the product to the viewer's account or organization. -} installationUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing installationUrl = Object.fieldDecoder "installationUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| Whether this listing's app has been installed for the current viewer -} installedForViewer : Field Bool Github.Object.MarketplaceListing installedForViewer = Object.fieldDecoder "installedForViewer" [] Decode.bool {-| Whether this listing has been approved for display in the Marketplace. -} isApproved : Field Bool Github.Object.MarketplaceListing isApproved = Object.fieldDecoder "isApproved" [] Decode.bool {-| Whether this listing has been removed from the Marketplace. -} isDelisted : Field Bool Github.Object.MarketplaceListing isDelisted = Object.fieldDecoder "isDelisted" [] Decode.bool {-| Whether this listing is still an editable draft that has not been submitted for review and is not publicly visible in the Marketplace. -} isDraft : Field Bool Github.Object.MarketplaceListing isDraft = Object.fieldDecoder "isDraft" [] Decode.bool {-| Whether the product this listing represents is available as part of a paid plan. -} isPaid : Field Bool Github.Object.MarketplaceListing isPaid = Object.fieldDecoder "isPaid" [] Decode.bool {-| Whether this listing has been rejected by GitHub for display in the Marketplace. -} isRejected : Field Bool Github.Object.MarketplaceListing isRejected = Object.fieldDecoder "isRejected" [] Decode.bool {-| The hex color code, without the leading '#', for the logo background. -} logoBackgroundColor : Field String Github.Object.MarketplaceListing logoBackgroundColor = Object.fieldDecoder "logoBackgroundColor" [] Decode.string type alias LogoUrlOptionalArguments = { size : OptionalArgument Int } {-| URL for the listing's logo image. - size - The size in pixels of the resulting square image. -} logoUrl : (LogoUrlOptionalArguments -> LogoUrlOptionalArguments) -> Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing logoUrl fillInOptionals = let filledInOptionals = fillInOptionals { size = Absent } optionalArgs = [ Argument.optional "size" filledInOptionals.size Encode.int ] |> List.filterMap identity in Object.fieldDecoder "logoUrl" optionalArgs (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| The listing's full name. -} name : Field String Github.Object.MarketplaceListing name = Object.fieldDecoder "name" [] Decode.string {-| The listing's very short description without a trailing period or ampersands. -} normalizedShortDescription : Field String Github.Object.MarketplaceListing normalizedShortDescription = Object.fieldDecoder "normalizedShortDescription" [] Decode.string {-| URL to the listing's detailed pricing. -} pricingUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing pricingUrl = Object.fieldDecoder "pricingUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| The category that best describes the listing. -} primaryCategory : SelectionSet decodesTo Github.Object.MarketplaceCategory -> Field decodesTo Github.Object.MarketplaceListing primaryCategory object_ = Object.selectionField "primaryCategory" [] object_ identity {-| URL to the listing's privacy policy. -} privacyPolicyUrl : Field Github.Scalar.Uri Github.Object.MarketplaceListing privacyPolicyUrl = Object.fieldDecoder "privacyPolicyUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| The HTTP path for the Marketplace listing. -} resourcePath : Field Github.Scalar.Uri Github.Object.MarketplaceListing resourcePath = Object.fieldDecoder "resourcePath" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| The URLs for the listing's screenshots. -} screenshotUrls : Field (List (Maybe String)) Github.Object.MarketplaceListing screenshotUrls = Object.fieldDecoder "screenshotUrls" [] (Decode.string |> Decode.nullable |> Decode.list) {-| An alternate category that describes the listing. -} secondaryCategory : SelectionSet decodesTo Github.Object.MarketplaceCategory -> Field (Maybe decodesTo) Github.Object.MarketplaceListing secondaryCategory object_ = Object.selectionField "secondaryCategory" [] object_ (identity >> Decode.nullable) {-| The listing's very short description. -} shortDescription : Field String Github.Object.MarketplaceListing shortDescription = Object.fieldDecoder "shortDescription" [] Decode.string {-| The short name of the listing used in its URL. -} slug : Field String Github.Object.MarketplaceListing slug = Object.fieldDecoder "slug" [] Decode.string {-| URL to the listing's status page. -} statusUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing statusUrl = Object.fieldDecoder "statusUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| An email address for support for this listing's app. -} supportEmail : Field (Maybe String) Github.Object.MarketplaceListing supportEmail = Object.fieldDecoder "supportEmail" [] (Decode.string |> Decode.nullable) {-| Either a URL or an email address for support for this listing's app. -} supportUrl : Field Github.Scalar.Uri Github.Object.MarketplaceListing supportUrl = Object.fieldDecoder "supportUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| URL to the listing's terms of service. -} termsOfServiceUrl : Field (Maybe Github.Scalar.Uri) Github.Object.MarketplaceListing termsOfServiceUrl = Object.fieldDecoder "termsOfServiceUrl" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri |> Decode.nullable) {-| The HTTP URL for the Marketplace listing. -} url : Field Github.Scalar.Uri Github.Object.MarketplaceListing url = Object.fieldDecoder "url" [] (Decode.oneOf [ Decode.string, Decode.float |> Decode.map Debug.toString, Decode.int |> Decode.map Debug.toString, Decode.bool |> Decode.map Debug.toString ] |> Decode.map Github.Scalar.Uri) {-| Can the current viewer add plans for this Marketplace listing. -} viewerCanAddPlans : Field Bool Github.Object.MarketplaceListing viewerCanAddPlans = Object.fieldDecoder "viewerCanAddPlans" [] Decode.bool {-| Can the current viewer approve this Marketplace listing. -} viewerCanApprove : Field Bool Github.Object.MarketplaceListing viewerCanApprove = Object.fieldDecoder "viewerCanApprove" [] Decode.bool {-| Can the current viewer delist this Marketplace listing. -} viewerCanDelist : Field Bool Github.Object.MarketplaceListing viewerCanDelist = Object.fieldDecoder "viewerCanDelist" [] Decode.bool {-| Can the current viewer edit this Marketplace listing. -} viewerCanEdit : Field Bool Github.Object.MarketplaceListing viewerCanEdit = Object.fieldDecoder "viewerCanEdit" [] Decode.bool {-| Can the current viewer edit the primary and secondary category of this Marketplace listing. -} viewerCanEditCategories : Field Bool Github.Object.MarketplaceListing viewerCanEditCategories = Object.fieldDecoder "viewerCanEditCategories" [] Decode.bool {-| Can the current viewer edit the plans for this Marketplace listing. -} viewerCanEditPlans : Field Bool Github.Object.MarketplaceListing viewerCanEditPlans = Object.fieldDecoder "viewerCanEditPlans" [] Decode.bool {-| Can the current viewer return this Marketplace listing to draft state so it becomes editable again. -} viewerCanRedraft : Field Bool Github.Object.MarketplaceListing viewerCanRedraft = Object.fieldDecoder "viewerCanRedraft" [] Decode.bool {-| Can the current viewer reject this Marketplace listing by returning it to an editable draft state or rejecting it entirely. -} viewerCanReject : Field Bool Github.Object.MarketplaceListing viewerCanReject = Object.fieldDecoder "viewerCanReject" [] Decode.bool {-| Can the current viewer request this listing be reviewed for display in the Marketplace. -} viewerCanRequestApproval : Field Bool Github.Object.MarketplaceListing viewerCanRequestApproval = Object.fieldDecoder "viewerCanRequestApproval" [] Decode.bool {-| Indicates whether the current user has an active subscription to this Marketplace listing. -} viewerHasPurchased : Field Bool Github.Object.MarketplaceListing viewerHasPurchased = Object.fieldDecoder "viewerHasPurchased" [] Decode.bool {-| Indicates if the current user has purchased a subscription to this Marketplace listing for all of the organizations the user owns. -} viewerHasPurchasedForAllOrganizations : Field Bool Github.Object.MarketplaceListing viewerHasPurchasedForAllOrganizations = Object.fieldDecoder "viewerHasPurchasedForAllOrganizations" [] Decode.bool {-| Does the current viewer role allow them to administer this Marketplace listing. -} viewerIsListingAdmin : Field Bool Github.Object.MarketplaceListing viewerIsListingAdmin = Object.fieldDecoder "viewerIsListingAdmin" [] Decode.bool