diff --git a/data/schema.graphql b/data/schema.graphql index 0f707393d86..9171566287d 100644 --- a/data/schema.graphql +++ b/data/schema.graphql @@ -9,20 +9,20 @@ type AccountRequest { notes: String } +# Autogenerated input type of AddAssetToConsignmentSubmission input AddAssetToConsignmentSubmissionInput { - # The type of the asset - assetType: String! - - # The token provided by Gemini for your asset - geminiToken: String! - - # The id of the submission you want to attach an asset to - submissionID: String! + # A unique identifier for the client performing the mutation. clientMutationId: String + submissionID: ID! + geminiToken: String! + assetType: String } +# Autogenerated return type of AddAssetToConsignmentSubmission type AddAssetToConsignmentSubmissionPayload { - asset: Asset + asset: ConsignmentSubmissionCategoryAsset + + # A unique identifier for the client performing the mutation. clientMutationId: String } @@ -567,6 +567,15 @@ type Artist implements Node & Searchable & EntityWithFilterArtworksConnectionInt auctionResultsConnection( sort: AuctionResultSorts + # Filter auction results by organizations + organizations: [String] + + # Filter auction results by Artwork sizes + sizes: [ArtworkSizes] + + # Filter auction results by category (medium) + categories: [String] + # When true, will only return records for allowed artists. recordsTrusted: Boolean = false after: String @@ -999,6 +1008,9 @@ type Artwork implements Node & Searchable & Sellable { # Is this artwork part of an auction that is currently running? isBiddable: Boolean + # Can a user request a lot conditions report for this artwork? + canRequestLotConditionsReport: Boolean + # When in an auction, can the work be bought immediately isBuyNowable: Boolean isComparableWithAuctionResults: Boolean @@ -1054,6 +1066,9 @@ type Artwork implements Node & Searchable & Sellable { # Minimal location information describing from where artwork will be shipped. shippingOrigin: String + # Flags if artwork located in one of EU local shipping countries. + euShippingOrigin: Boolean + # The country an artwork will be shipped from. shippingCountry: String provenance(format: Format): String @@ -1219,6 +1234,12 @@ type ArtworksAggregationResults { slice: ArtworkAggregation } +enum ArtworkSizes { + SMALL + MEDIUM + LARGE +} + enum ArtworkSorts { AVAILABILITY_ASC CREATED_AT_ASC @@ -1257,24 +1278,6 @@ type ArtworkVersion { image: Image } -# An asset which is assigned to a consignment submission -type Asset { - # A globally unique ID. - id: ID! - - # A type-specific ID likely used as a database ID. - internalID: ID! - - # The convection submission ID - submissionID: String - - # The gemini token for the asset - geminiToken: String - - # The type of the asset - assetType: String -} - # Fields of an attachment (currently from Radiation) type Attachment { # A globally unique ID. @@ -1288,6 +1291,8 @@ type Attachment { # File name. fileName: String! + + # URL of attachment. downloadURL: String! } @@ -1368,6 +1373,7 @@ type AuctionResult implements Node { currency: String description: String externalURL: String + boughtIn: Boolean images: AuctionLotImages estimate: AuctionLotEstimate priceRealized: AuctionResultPriceRealized @@ -3008,80 +3014,78 @@ type ConditionReportRequest { userID: ID } -# A work to be consigned to the user +# Consignment Submission type ConsignmentSubmission { - # An optional type-specific ID. - internalID: ID - - # The gravity ID for an Artist - artistID: String! - - # Does the artwork come with an certificate of authenticity? - authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + additional_info: String + artist_id: String! + assets: [ConsignmentSubmissionCategoryAsset] + authenticity_certificate: Boolean + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition - edition: Boolean - - # The number of the individual work if in a set - editionNumber: String - - # The whole size of the set of works - editionSize: Int - - # The height of the work + dimensions_metric: String + edition: String + edition_number: String + edition_size: Int height: String - # The city where the work currently resides - locationCity: String - - # The country where the work currently resides - locationCountry: String - - # The state where the work currently resides - locationState: String - - # The materials in which the work is created + # Uniq ID for this submission + id: ID! + internalID: ID + location_city: String + location_country: String + location_state: String medium: String - - # The history of an work + minimum_price_dollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String + user_id: String! + width: String + year: String + artist: Artist +} - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation +enum ConsignmentSubmissionCategoryAggregation { + PAINTING + SCULPTURE + PHOTOGRAPHY + PRINT + DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER + MIXED_MEDIA + PERFORMANCE_ART + INSTALLATION + VIDEO_FILM_ANIMATION + ARCHITECTURE + FASHION_DESIGN_AND_WEARABLE_ART + JEWELRY + DESIGN_DECORATIVE_ART + TEXTILE_ARTS + OTHER +} - # The width of the work - width: String +# Submission Asset +type ConsignmentSubmissionCategoryAsset { + # type of this Asset + asset_type: String! - # The year the work was created - year: String + # gemini token for asset + gemini_token: String - # The user who submitted the work - userID: ID - artist: Artist + # Uniq ID for this asset + id: ID! + submissionID: ID + submission_id: ID! } -# A connection to a list of items. +# The connection type for Submission. type ConsignmentSubmissionConnection { + # A list of edges. + edges: [SubmissionEdge] + # Information to aid in pagination. pageInfo: PageInfo! - - # A list of edges. - edges: [ConsignmentSubmissionEdge] } # An edge in a connection. @@ -3093,6 +3097,13 @@ type ConsignmentSubmissionEdge { cursor: String! } +enum ConsignmentSubmissionStateAggregation { + DRAFT + SUBMITTED + APPROVED + REJECTED +} + type ConvectionService { geminiTemplateKey: String! } @@ -3282,72 +3293,39 @@ type CreateGeminiEntryForAssetPayload { clientMutationId: String } +# Autogenerated input type of CreateSubmissionMutation input CreateSubmissionMutationInput { - # The gravity ID for an Artist + # A unique identifier for the client performing the mutation. + clientMutationId: String + additionalInfo: String artistID: String! - - # Does the artwork come with an certificate of authenticity? authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set editionNumber: String - - # The whole size of the set of works editionSize: Int - - # The height of the work height: String - - # The city where the work currently resides locationCity: String - - # The country where the work currently resides locationCountry: String - - # The state where the work currently resides locationState: String - - # The materials in which the work is created medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - userID: ID - clientMutationId: String } +# Autogenerated return type of CreateSubmissionMutation type CreateSubmissionMutationPayload { - consignmentSubmission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } # An asset which is assigned to a consignment submission @@ -4620,6 +4598,26 @@ type HomePageRelatedArtistArtworkModule { basedOn: Artist } +type IdentityVerification { + # A globally unique ID. + id: ID! + + # A type-specific ID likely used as a database ID. + internalID: ID! + + # Where the identity verification is in its lifecycle + state: String! + + # User ID of the identity verification's owner + userID: String! + invitationExpiresAt( + format: String + + # A tz database time zone, otherwise falls back to `X-TIMEZONE` header + timezone: String + ): String +} + type Image { # An optional type-specific ID. internalID: ID @@ -4893,7 +4891,8 @@ type MarketingCollection { # IDs of artists that should be excluded from Featured Artists for this collection featuredArtistExclusionIds: [String!] - relatedCollections: [MarketingCollection!]! + relatedCollections(size: Int = 10): [MarketingCollection!]! + isDepartment: Boolean! artworksConnection( acquireable: Boolean offerable: Boolean @@ -5085,6 +5084,12 @@ type Me implements Node { invoiceId: String! ): Invoice + # An identity verification that the user has access to + identityVerification( + # ID of the IdentityVerification + id: String! + ): IdentityVerification + # Sale Artworks search results lotsByFollowedArtistsConnection( aggregations: [SaleArtworkAggregation] @@ -5126,6 +5131,19 @@ type Me implements Node { # A list of the current user’s recently viewed artworks. recentlyViewedArtworksConnection(after: String, first: Int, before: String, last: Int): ArtworkConnection type: String + + # A count of unread notifications. + unreadNotificationsCount: Int! + orders( + first: Int + last: Int + after: String + before: String + mode: CommerceOrderModeEnum + sellerId: String + sort: CommerceOrderConnectionSortEnum + state: CommerceOrderStateEnum + ): CommerceOrderConnectionWithTotalCount } # A message in a conversation. @@ -5268,14 +5286,8 @@ type Mutation { # Attach an gemini asset to a consignment submission createGeminiEntryForAsset(input: CreateGeminiEntryForAssetInput!): CreateGeminiEntryForAssetPayload - # Create a new consignment submission using Convection - createConsignmentSubmission(input: CreateSubmissionMutationInput!): CreateSubmissionMutationPayload - - # Update a consignment using Convection - updateConsignmentSubmission(input: UpdateSubmissionMutationInput!): UpdateSubmissionMutationPayload - - # Attach an gemini asset to a consignment submission - addAssetToConsignmentSubmission(input: AddAssetToConsignmentSubmissionInput!): AddAssetToConsignmentSubmissionPayload + # Start an identity verification flow for a pending identity verification + startIdentityVerification(input: startIdentityVerificationMutationInput!): startIdentityVerificationMutationPayload captureHold(input: CaptureHoldInput!): CaptureHoldPayload holdInventory(input: HoldInventoryInput!): HoldInventoryPayload recordArtworkView(input: RecordArtworkViewInput!): RecordArtworkViewPayload @@ -5304,6 +5316,11 @@ type Mutation { commerceSubmitOrder(input: CommerceSubmitOrderInput!): CommerceSubmitOrderPayload commerceSubmitOrderWithOffer(input: CommerceSubmitOrderWithOfferInput!): CommerceSubmitOrderWithOfferPayload commerceSubmitPendingOffer(input: CommerceSubmitPendingOfferInput!): CommerceSubmitPendingOfferPayload + + # Create an asset + addAssetToConsignmentSubmission(input: AddAssetToConsignmentSubmissionInput): AddAssetToConsignmentSubmissionPayload + createConsignmentSubmission(input: CreateSubmissionMutationInput): CreateSubmissionMutationPayload + updateConsignmentSubmission(input: UpdateSubmissionMutationInput): UpdateSubmissionMutationPayload } input Near { @@ -5903,7 +5920,6 @@ type Query { # A wildcard used to support complex root queries in Relay viewer: Viewer - @deprecated(reason: "Viewer has been deprecated in V2. Rely on root fields instead. [Will be removed in v2]") # Autocomplete resolvers. _unused_gravity_matchPartners(matchType: String, page: Int = 1, size: Int = 5, term: String!): [DoNotUseThisPartner!] @@ -5995,6 +6011,33 @@ type Query { state: CommerceOrderStateEnum ): CommerceOrderConnectionWithTotalCount + # Get a Submission + submission(id: ID): ConsignmentSubmission + + # Filter all submission + submissions( + # Returns the first _n_ elements from the list. + first: Int + + # Returns the elements in the list that come after the specified cursor. + after: String + + # Returns the last _n_ elements from the list. + last: Int + + # Returns the elements in the list that come before the specified cursor. + before: String + + # Get all submissions with these IDs + ids: [ID] + + # Only get submission by this user_id + user_id: [ID] + + # If present return either completed or not completed submissions + completed: Boolean + ): ConsignmentSubmissionConnection + # Find PartnerStats analyticsPartnerStats(partnerId: String!): AnalyticsPartnerStats marketingCollections( @@ -6170,6 +6213,7 @@ type Sale implements Node { isPreliminary: Boolean isRegistrationClosed: Boolean isWithBuyersPremium: Boolean + isLotConditionsReportEnabled: Boolean liveStartAt( format: String @@ -6986,6 +7030,31 @@ enum sort { ASC } +type StartIdentityVerificationFailure { + mutationError: GravityMutationError +} + +input startIdentityVerificationMutationInput { + # Primary ID of the identity verification to be started + identityVerificationId: String! + clientMutationId: String +} + +type startIdentityVerificationMutationPayload { + startIdentityVerificationResponseOrError: StartIdentityVerificationResponseOrError + clientMutationId: String +} + +union StartIdentityVerificationResponseOrError = StartIdentityVerificationSuccess | StartIdentityVerificationFailure + +type StartIdentityVerificationSuccess { + # Primary ID of the started identity verification + identityVerificationId: String + + # URL that hosts the user-facing identity verification flow (Jumio) + identityVerificationFlowUrl: String +} + type StaticContent { # A globally unique ID. id: ID! @@ -7022,6 +7091,15 @@ enum SubmissionDimensionAggregation { IN } +# An edge in a connection. +type SubmissionEdge { + # A cursor for use in pagination. + cursor: String! + + # The item at the end of the edge. + node: ConsignmentSubmission +} + enum SubmissionStateAggregation { DRAFT SUBMITTED @@ -7212,75 +7290,40 @@ type UpdateMyProfilePayload { clientMutationId: String } +# Autogenerated input type of UpdateSubmissionMutation input UpdateSubmissionMutationInput { - # The GUID for the submission - id: String! - - # The gravity ID for an Artist - artistID: String! - - # Does the artwork come with an certificate of authenticity? + # A unique identifier for the client performing the mutation. + clientMutationId: String + id: ID! + additionalInfo: String + artistID: String authenticityCertificate: Boolean - - # The set in which to put the work - category: SubmissionCategoryAggregation - - # The depth of the work + category: ConsignmentSubmissionCategoryAggregation + currency: String depth: String - - # A string, either CM or IN - dimensionsMetric: SubmissionDimensionAggregation - - # Is the work a part of an edition + dimensionsMetric: String edition: Boolean - - # The number of the individual work if in a set editionNumber: String - - # The whole size of the set of works editionSize: Int - - # The height of the work height: String - - # The city where the work currently resides locationCity: String - - # The country where the work currently resides locationCountry: String - - # The state where the work currently resides locationState: String - - # The materials in which the work is created medium: String - - # The history of an work + minimumPriceDollars: Int provenance: String - - # Is this work signed? signature: Boolean - - # The name of the work + state: ConsignmentSubmissionStateAggregation title: String - - # The internal state of the work, e.g. draft/submitted - state: SubmissionStateAggregation - - # The width of the work width: String - - # The year the work was created year: String - - # The user who submitted the work - userID: ID - clientMutationId: String } +# Autogenerated return type of UpdateSubmissionMutation type UpdateSubmissionMutationPayload { - consignmentSubmission: ConsignmentSubmission + # A unique identifier for the client performing the mutation. clientMutationId: String + consignmentSubmission: ConsignmentSubmission } type User { diff --git a/src/__generated__/addAssetToConsignmentMutation.graphql.ts b/src/__generated__/addAssetToConsignmentMutation.graphql.ts index f2ee15482d3..188a67cdbb7 100644 --- a/src/__generated__/addAssetToConsignmentMutation.graphql.ts +++ b/src/__generated__/addAssetToConsignmentMutation.graphql.ts @@ -2,10 +2,10 @@ import { ConcreteRequest } from "relay-runtime"; export type AddAssetToConsignmentSubmissionInput = { - readonly assetType: string; - readonly geminiToken: string; - readonly submissionID: string; readonly clientMutationId?: string | null; + readonly submissionID: string; + readonly geminiToken: string; + readonly assetType?: string | null; }; export type addAssetToConsignmentMutationVariables = { input: AddAssetToConsignmentSubmissionInput; @@ -84,7 +84,7 @@ return { "name": "asset", "storageKey": null, "args": null, - "concreteType": "Asset", + "concreteType": "ConsignmentSubmissionCategoryAsset", "plural": false, "selections": [ (v2/*: any*/) @@ -114,7 +114,7 @@ return { "name": "asset", "storageKey": null, "args": null, - "concreteType": "Asset", + "concreteType": "ConsignmentSubmissionCategoryAsset", "plural": false, "selections": [ (v2/*: any*/), diff --git a/src/__generated__/createConsignmentSubmissionMutation.graphql.ts b/src/__generated__/createConsignmentSubmissionMutation.graphql.ts index 628aafedc23..474b7e628ec 100644 --- a/src/__generated__/createConsignmentSubmissionMutation.graphql.ts +++ b/src/__generated__/createConsignmentSubmissionMutation.graphql.ts @@ -1,15 +1,17 @@ /* tslint:disable */ import { ConcreteRequest } from "relay-runtime"; -export type SubmissionCategoryAggregation = "ARCHITECTURE" | "DESIGN_DECORATIVE_ART" | "DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER" | "FASHION_DESIGN_AND_WEARABLE_ART" | "INSTALLATION" | "JEWELRY" | "MIXED_MEDIA" | "OTHER" | "PAINTING" | "PERFORMANCE_ART" | "PHOTOGRAPHY" | "PRINT" | "SCULPTURE" | "TEXTILE_ARTS" | "VIDEO_FILM_ANIMATION" | "%future added value"; -export type SubmissionDimensionAggregation = "CM" | "IN" | "%future added value"; -export type SubmissionStateAggregation = "APPROVED" | "DRAFT" | "REJECTED" | "SUBMITTED" | "%future added value"; +export type ConsignmentSubmissionCategoryAggregation = "ARCHITECTURE" | "DESIGN_DECORATIVE_ART" | "DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER" | "FASHION_DESIGN_AND_WEARABLE_ART" | "INSTALLATION" | "JEWELRY" | "MIXED_MEDIA" | "OTHER" | "PAINTING" | "PERFORMANCE_ART" | "PHOTOGRAPHY" | "PRINT" | "SCULPTURE" | "TEXTILE_ARTS" | "VIDEO_FILM_ANIMATION" | "%future added value"; +export type ConsignmentSubmissionStateAggregation = "APPROVED" | "DRAFT" | "REJECTED" | "SUBMITTED" | "%future added value"; export type CreateSubmissionMutationInput = { + readonly clientMutationId?: string | null; + readonly additionalInfo?: string | null; readonly artistID: string; readonly authenticityCertificate?: boolean | null; - readonly category?: SubmissionCategoryAggregation | null; + readonly category?: ConsignmentSubmissionCategoryAggregation | null; + readonly currency?: string | null; readonly depth?: string | null; - readonly dimensionsMetric?: SubmissionDimensionAggregation | null; + readonly dimensionsMetric?: string | null; readonly edition?: boolean | null; readonly editionNumber?: string | null; readonly editionSize?: number | null; @@ -18,14 +20,13 @@ export type CreateSubmissionMutationInput = { readonly locationCountry?: string | null; readonly locationState?: string | null; readonly medium?: string | null; + readonly minimumPriceDollars?: number | null; readonly provenance?: string | null; readonly signature?: boolean | null; + readonly state?: ConsignmentSubmissionStateAggregation | null; readonly title?: string | null; - readonly state?: SubmissionStateAggregation | null; readonly width?: string | null; readonly year?: string | null; - readonly userID?: string | null; - readonly clientMutationId?: string | null; }; export type createConsignmentSubmissionMutationVariables = { input: CreateSubmissionMutationInput; @@ -51,6 +52,7 @@ mutation createConsignmentSubmissionMutation( createConsignmentSubmission(input: $input) { consignmentSubmission { internalID + id } } } @@ -67,61 +69,93 @@ var v0 = [ ], v1 = [ { - "kind": "LinkedField", - "alias": null, - "name": "createConsignmentSubmission", - "storageKey": null, - "args": [ - { - "kind": "Variable", - "name": "input", - "variableName": "input" - } - ], - "concreteType": "CreateSubmissionMutationPayload", - "plural": false, + "kind": "Variable", + "name": "input", + "variableName": "input" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "internalID", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "createConsignmentSubmissionMutation", + "type": "Mutation", + "metadata": null, + "argumentDefinitions": (v0/*: any*/), "selections": [ { "kind": "LinkedField", "alias": null, - "name": "consignmentSubmission", + "name": "createConsignmentSubmission", "storageKey": null, - "args": null, - "concreteType": "ConsignmentSubmission", + "args": (v1/*: any*/), + "concreteType": "CreateSubmissionMutationPayload", "plural": false, "selections": [ { - "kind": "ScalarField", + "kind": "LinkedField", "alias": null, - "name": "internalID", + "name": "consignmentSubmission", + "storageKey": null, "args": null, - "storageKey": null + "concreteType": "ConsignmentSubmission", + "plural": false, + "selections": [ + (v2/*: any*/) + ] } ] } ] - } -]; -return { - "kind": "Request", - "fragment": { - "kind": "Fragment", - "name": "createConsignmentSubmissionMutation", - "type": "Mutation", - "metadata": null, - "argumentDefinitions": (v0/*: any*/), - "selections": (v1/*: any*/) }, "operation": { "kind": "Operation", "name": "createConsignmentSubmissionMutation", "argumentDefinitions": (v0/*: any*/), - "selections": (v1/*: any*/) + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "createConsignmentSubmission", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": "CreateSubmissionMutationPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "consignmentSubmission", + "storageKey": null, + "args": null, + "concreteType": "ConsignmentSubmission", + "plural": false, + "selections": [ + (v2/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] }, "params": { "operationKind": "mutation", "name": "createConsignmentSubmissionMutation", - "id": "1193f18a6f5e42b6136f4502f4479ccb", + "id": "fd4f1ff25cf937f269558e95330ce314", "text": null, "metadata": {} } diff --git a/src/__generated__/updateConsignmentSubmissionMutation.graphql.ts b/src/__generated__/updateConsignmentSubmissionMutation.graphql.ts index 7ae92fbbd51..a1888bd014c 100644 --- a/src/__generated__/updateConsignmentSubmissionMutation.graphql.ts +++ b/src/__generated__/updateConsignmentSubmissionMutation.graphql.ts @@ -1,16 +1,18 @@ /* tslint:disable */ import { ConcreteRequest } from "relay-runtime"; -export type SubmissionCategoryAggregation = "ARCHITECTURE" | "DESIGN_DECORATIVE_ART" | "DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER" | "FASHION_DESIGN_AND_WEARABLE_ART" | "INSTALLATION" | "JEWELRY" | "MIXED_MEDIA" | "OTHER" | "PAINTING" | "PERFORMANCE_ART" | "PHOTOGRAPHY" | "PRINT" | "SCULPTURE" | "TEXTILE_ARTS" | "VIDEO_FILM_ANIMATION" | "%future added value"; -export type SubmissionDimensionAggregation = "CM" | "IN" | "%future added value"; -export type SubmissionStateAggregation = "APPROVED" | "DRAFT" | "REJECTED" | "SUBMITTED" | "%future added value"; +export type ConsignmentSubmissionCategoryAggregation = "ARCHITECTURE" | "DESIGN_DECORATIVE_ART" | "DRAWING_COLLAGE_OR_OTHER_WORK_ON_PAPER" | "FASHION_DESIGN_AND_WEARABLE_ART" | "INSTALLATION" | "JEWELRY" | "MIXED_MEDIA" | "OTHER" | "PAINTING" | "PERFORMANCE_ART" | "PHOTOGRAPHY" | "PRINT" | "SCULPTURE" | "TEXTILE_ARTS" | "VIDEO_FILM_ANIMATION" | "%future added value"; +export type ConsignmentSubmissionStateAggregation = "APPROVED" | "DRAFT" | "REJECTED" | "SUBMITTED" | "%future added value"; export type UpdateSubmissionMutationInput = { + readonly clientMutationId?: string | null; readonly id: string; - readonly artistID: string; + readonly additionalInfo?: string | null; + readonly artistID?: string | null; readonly authenticityCertificate?: boolean | null; - readonly category?: SubmissionCategoryAggregation | null; + readonly category?: ConsignmentSubmissionCategoryAggregation | null; + readonly currency?: string | null; readonly depth?: string | null; - readonly dimensionsMetric?: SubmissionDimensionAggregation | null; + readonly dimensionsMetric?: string | null; readonly edition?: boolean | null; readonly editionNumber?: string | null; readonly editionSize?: number | null; @@ -19,14 +21,13 @@ export type UpdateSubmissionMutationInput = { readonly locationCountry?: string | null; readonly locationState?: string | null; readonly medium?: string | null; + readonly minimumPriceDollars?: number | null; readonly provenance?: string | null; readonly signature?: boolean | null; + readonly state?: ConsignmentSubmissionStateAggregation | null; readonly title?: string | null; - readonly state?: SubmissionStateAggregation | null; readonly width?: string | null; readonly year?: string | null; - readonly userID?: string | null; - readonly clientMutationId?: string | null; }; export type updateConsignmentSubmissionMutationVariables = { input: UpdateSubmissionMutationInput; @@ -52,6 +53,7 @@ mutation updateConsignmentSubmissionMutation( updateConsignmentSubmission(input: $input) { consignmentSubmission { internalID + id } } } @@ -68,61 +70,93 @@ var v0 = [ ], v1 = [ { - "kind": "LinkedField", - "alias": null, - "name": "updateConsignmentSubmission", - "storageKey": null, - "args": [ - { - "kind": "Variable", - "name": "input", - "variableName": "input" - } - ], - "concreteType": "UpdateSubmissionMutationPayload", - "plural": false, + "kind": "Variable", + "name": "input", + "variableName": "input" + } +], +v2 = { + "kind": "ScalarField", + "alias": null, + "name": "internalID", + "args": null, + "storageKey": null +}; +return { + "kind": "Request", + "fragment": { + "kind": "Fragment", + "name": "updateConsignmentSubmissionMutation", + "type": "Mutation", + "metadata": null, + "argumentDefinitions": (v0/*: any*/), "selections": [ { "kind": "LinkedField", "alias": null, - "name": "consignmentSubmission", + "name": "updateConsignmentSubmission", "storageKey": null, - "args": null, - "concreteType": "ConsignmentSubmission", + "args": (v1/*: any*/), + "concreteType": "UpdateSubmissionMutationPayload", "plural": false, "selections": [ { - "kind": "ScalarField", + "kind": "LinkedField", "alias": null, - "name": "internalID", + "name": "consignmentSubmission", + "storageKey": null, "args": null, - "storageKey": null + "concreteType": "ConsignmentSubmission", + "plural": false, + "selections": [ + (v2/*: any*/) + ] } ] } ] - } -]; -return { - "kind": "Request", - "fragment": { - "kind": "Fragment", - "name": "updateConsignmentSubmissionMutation", - "type": "Mutation", - "metadata": null, - "argumentDefinitions": (v0/*: any*/), - "selections": (v1/*: any*/) }, "operation": { "kind": "Operation", "name": "updateConsignmentSubmissionMutation", "argumentDefinitions": (v0/*: any*/), - "selections": (v1/*: any*/) + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "updateConsignmentSubmission", + "storageKey": null, + "args": (v1/*: any*/), + "concreteType": "UpdateSubmissionMutationPayload", + "plural": false, + "selections": [ + { + "kind": "LinkedField", + "alias": null, + "name": "consignmentSubmission", + "storageKey": null, + "args": null, + "concreteType": "ConsignmentSubmission", + "plural": false, + "selections": [ + (v2/*: any*/), + { + "kind": "ScalarField", + "alias": null, + "name": "id", + "args": null, + "storageKey": null + } + ] + } + ] + } + ] }, "params": { "operationKind": "mutation", "name": "updateConsignmentSubmissionMutation", - "id": "15aa0a85a06807f72c1b64cbb3c312e8", + "id": "27f3c226b08051fc14a0ffbdb4c96b5c", "text": null, "metadata": {} } diff --git a/src/lib/Components/Consignments/Screens/Metadata.tsx b/src/lib/Components/Consignments/Screens/Metadata.tsx index 93198d632c1..c98a69d9440 100644 --- a/src/lib/Components/Consignments/Screens/Metadata.tsx +++ b/src/lib/Components/Consignments/Screens/Metadata.tsx @@ -13,7 +13,7 @@ import { import NavigatorIOS from "react-native-navigator-ios" import { Serif, Theme } from "@artsy/palette" -import { SubmissionCategoryAggregation } from "__generated__/createConsignmentSubmissionMutation.graphql" +import { ConsignmentSubmissionCategoryAggregation } from "__generated__/createConsignmentSubmissionMutation.graphql" import { ConsignmentMetadata } from "../" import { BottomAlignedButton } from "../Components/BottomAlignedButton" import { Row } from "../Components/FormElements" @@ -44,7 +44,7 @@ const categoryOptions = [ { name: "Design/Decorative Art", value: "DESIGN_DECORATIVE_ART" }, { name: "Textile Arts", value: "TEXTILE_ARTS" }, { name: "Other", value: "OTHER" }, -] as Array<{ name: string; value: SubmissionCategoryAggregation }> +] as Array<{ name: string; value: ConsignmentSubmissionCategoryAggregation }> interface State extends ConsignmentMetadata { showPicker?: boolean diff --git a/src/lib/Components/Consignments/index.tsx b/src/lib/Components/Consignments/index.tsx index 7ad07c6e5a0..60a92922de3 100644 --- a/src/lib/Components/Consignments/index.tsx +++ b/src/lib/Components/Consignments/index.tsx @@ -1,7 +1,7 @@ import React from "react" import Welcome from "./Screens/Welcome" -import { SubmissionCategoryAggregation } from "__generated__/createConsignmentSubmissionMutation.graphql" +import { ConsignmentSubmissionCategoryAggregation } from "__generated__/createConsignmentSubmissionMutation.graphql" import { ViewProperties } from "react-native" import NavigatorIOS from "react-native-navigator-ios" @@ -9,7 +9,7 @@ import NavigatorIOS from "react-native-navigator-ios" export interface ConsignmentMetadata { title: string | null year: string | null - category: SubmissionCategoryAggregation | null + category: ConsignmentSubmissionCategoryAggregation | null categoryName: string | null medium: string | null width: string | null