From 67362a73b31b5b2e80c4c827ad1ee4da81f8275a Mon Sep 17 00:00:00 2001 From: mtgriego Date: Thu, 9 May 2024 06:30:44 -0700 Subject: [PATCH] [MBL-1392] Add checkout Id to create payment intent call (#2035) * [no-jira]: Updated schema.json * add the checkout id to the create payment intent mutation * update config to use defined tag instead of default for circle ci --------- Co-authored-by: Yun --- .circleci/config.yml | 2 +- app/src/main/graphql/checkout.graphql | 4 +- app/src/main/graphql/schema.json | 3734 ++++++++++++++--- .../models/CreatePaymentIntentInput.kt | 2 +- .../kickstarter/services/KSApolloClientV2.kt | 2 + .../LatePledgeCheckoutViewModel.kt | 36 +- 6 files changed, 3090 insertions(+), 690 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9fc5dfac00..18da278292 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ base_job: &base_job executor: name: android/android-machine resource-class: xlarge - tag: default #https://circleci.com/developer/images/image/cimg/android + tag: 2024.01.1 #https://circleci.com/developer/images/image/cimg/android working_directory: "~/project" environment: TERM: dumb diff --git a/app/src/main/graphql/checkout.graphql b/app/src/main/graphql/checkout.graphql index 31a64b3839..b79ed4bc5f 100644 --- a/app/src/main/graphql/checkout.graphql +++ b/app/src/main/graphql/checkout.graphql @@ -49,8 +49,8 @@ mutation CreateCheckout($projectId: ID!, $amount: String!, $rewardIds: [ID!], $l } } -mutation CreatePaymentIntent($projectId: ID!, $amount: String!, $paymentIntentContext: StripeIntentContextTypes) { - createPaymentIntent(input: { projectId: $projectId, amount: $amount, paymentIntentContext: $paymentIntentContext } ) { +mutation CreatePaymentIntent($projectId: ID!, $amount: String!, $paymentIntentContext: StripeIntentContextTypes, $checkoutId: ID!) { + createPaymentIntent(input: { projectId: $projectId, amount: $amount, paymentIntentContext: $paymentIntentContext, checkoutId: $checkoutId } ) { clientSecret } } diff --git a/app/src/main/graphql/schema.json b/app/src/main/graphql/schema.json index d66e452d1c..e190fb68ba 100644 --- a/app/src/main/graphql/schema.json +++ b/app/src/main/graphql/schema.json @@ -483,6 +483,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "item", + "description": "Fetches an item given its relay id.", + "args": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "RewardItem", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "ksrFact", "description": "Get a kickstarter fact", @@ -1689,6 +1716,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "cart", + "description": "Contains the backer's item preferences and responses to survey questions", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Cart", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "clientSecret", "description": "If `requires_action` is true, `client_secret` should be used to initiate additional client-side authentication steps", @@ -1713,6 +1752,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "deliveryAddress", + "description": "The delivery address associated with the backing", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "errorReason", "description": "The reason for an errored backing", @@ -1773,6 +1824,38 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "isLatePledge", + "description": "Whether or not the backing is a late pledge", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "isPostCampaign", + "description": "Is this backing a late pledge or did it occur during the crowdfunding campaign?", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "latestSetupIntent", "description": "If present, the most recent setup_intent data from Stripe.", @@ -1797,22 +1880,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "modalUrl", - "description": "URL for loading the backing modal", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "paymentSource", "description": "Payment source used on a backing.", @@ -2040,6 +2107,26 @@ }, "isDeprecated": false, "deprecationReason": null + }, + { + "name": "usableBackerAddresses", + "description": "All of the backer's saved addresses that match the backing country", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Address", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null } ], "inputFields": null, @@ -2768,6 +2855,18 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "hasLatePledgeBackers", + "description": "Whether any has pledged for this reward during the late pledges period", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "id", "description": null, @@ -3199,6 +3298,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "soldOut", + "description": "Whether or not the reward is out of inventory", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "startCondition", "description": "For post-campaign enabled rewards, the conditions under which to start offering the reward.", @@ -3950,6 +4065,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "itemVariants", + "description": "Variants of this item", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ItemVariant", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "maxInventoryCount", "description": "The max amount of this item that may have to be produced based on reward limits.", @@ -3974,6 +4113,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "optionTypes", + "description": "Option types tied to this item", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OptionType", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "project", "description": "The project", @@ -3986,6 +4149,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "questions", + "description": "Questions tied to this item that will be posed to backers", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Question", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "rewards", "description": "The rewards that the item is included in.", @@ -4050,6 +4237,227 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "ItemVariant", + "description": "A unique item variant aka SKU", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "optionValues", + "description": "The option values associated with this variant", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OptionValue", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "sku", + "description": "The sku value (e.g. 'Hoodie-Small-Blue-Checkered')", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OptionValue", + "description": "An option value (e.g. \"red\") associated with an option type (e.g. \"color\")", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "optionType", + "description": "The option type", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OptionType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "value", + "description": "The option value", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "OptionType", + "description": "An option type associated with an item (e.g. \"size\" or \"color\")", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "item", + "description": "The item associated with the option type", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RewardItem", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The option type name (e.g. \"size\" or \"color\")", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "prompt", + "description": "The option type prompt (e.g. \"What size do you want?\")", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "values", + "description": "The associated option values", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "OptionValue", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Project", @@ -4244,6 +4652,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "backerAddressLockoutDatePassed", + "description": "Whether or not the backer address lockout date has passed.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "backers", "description": "Backers of the project", @@ -5482,6 +5906,38 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "latePledgeBackersCount", + "description": "Total backers for the project during late pledge phase", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "latePledgePledged", + "description": "How much money is pledged to the project during late pledge phase.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "launchedAt", "description": "When the project launched", @@ -5900,6 +6356,30 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "questions", + "description": "Survey questions asked of all the project's backers", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Question", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "recommendations", "description": null, @@ -6440,6 +6920,22 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "usedLegacySurveys", + "description": "Whether or not the project has used legacy surveys.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "userFeedback", "description": "The feedback the current user has left for the project", @@ -12252,12 +12748,6 @@ "isDeprecated": false, "deprecationReason": null }, - { - "name": "new_project_build_additional_owners", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "message_archiving", "description": null, @@ -12655,13 +13145,7 @@ "deprecationReason": null }, { - "name": "remove_address_event_sourcing_2024", - "description": null, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "user_settings_upgrade_2024", + "name": "survey_replacement_2024", "description": null, "isDeprecated": false, "deprecationReason": null @@ -12948,6 +13432,26 @@ "name": "Validation", "description": "Validity and associated messages.", "fields": [ + { + "name": "errorTypes", + "description": "Error keys for validation error, if any", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "messages", "description": "Error messages associated with the value", @@ -21079,6 +21583,173 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "OBJECT", + "name": "Question", + "description": "A question associated with one of the following: Project, RewardItem", + "fields": [ + { + "name": "choiceSelectionLimit", + "description": "The question choice selection limit", + "args": [], + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "choices", + "description": "The question choices", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "optional", + "description": "Whether the question is optional", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "prompt", + "description": "The question prompt", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "questionable", + "description": "The object associated with the question", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "Questionable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "type", + "description": "The question type", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionType", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "Questionable", + "description": "An object that can be associated with a question", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "RewardItem", + "ofType": null + } + ] + }, + { + "kind": "ENUM", + "name": "QuestionType", + "description": "Question types", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "text", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "choices", + "description": null, + "isDeprecated": false, + "deprecationReason": null + } + ], + "possibleTypes": null + }, { "kind": "OBJECT", "name": "Recommendations", @@ -25652,76 +26323,464 @@ "deprecationReason": null }, { - "name": "location", - "description": "The shipping location to which the rule pertains.", + "name": "location", + "description": "The shipping location to which the rule pertains.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Location", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "RewardShippingRulesConnection", + "description": "The connection type for ShippingRule.", + "fields": [ + { + "name": "edges", + "description": "A list of edges.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingRuleEdge", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "nodes", + "description": "A list of nodes.", + "args": [], + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "ShippingRule", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "pageInfo", + "description": "Information to aid in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "PageInfo", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "totalCount", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "ShippingRuleEdge", + "description": "An edge in a connection.", + "fields": [ + { + "name": "cursor", + "description": "A cursor for use in pagination.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "node", + "description": "The item at the end of the edge.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "ShippingRule", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SimpleShippingRule", + "description": "Simple shipping rule for a reward", + "fields": [ + { + "name": "cost", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "country", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "currency", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locationId", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "locationName", + "description": null, + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BackingAddon", + "description": "An add-on reward included in a backing.", + "fields": [ + { + "name": "amount", + "description": "Amount the add-on costs.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Money", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "description", + "description": "The add-on description.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "items", + "description": "Items in the add-on.", + "args": [ + { + "name": "first", + "description": "Returns the first _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "after", + "description": "Returns the elements in the list that come after the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "last", + "description": "Returns the last _n_ elements from the list.", + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "before", + "description": "Returns the elements in the list that come before the specified cursor.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "RewardItemsConnection", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "name", + "description": "The add-on name.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "quantity", + "description": "The quantity of the add-on included in a backing.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "Cart", + "description": "A cart associated with a backing", + "fields": [ + { + "name": "answers", + "description": "The answers to project-level survey questions", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Answer", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "finalizedAt", + "description": "When the cart was finalized (i.e., when the backer submitted responses)", + "args": [], + "type": { + "kind": "SCALAR", + "name": "DateTime", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "lineItems", + "description": "The associated line items", "args": [], "type": { - "kind": "OBJECT", - "name": "Location", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "LineItem", + "ofType": null + } + } + } }, "isDeprecated": false, "deprecationReason": null } ], "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - } - ], + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "OBJECT", - "name": "RewardShippingRulesConnection", - "description": "The connection type for ShippingRule.", + "name": "Answer", + "description": "An answer associated with one of the following: LineItem, Project", "fields": [ { - "name": "edges", - "description": "A list of edges.", - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ShippingRuleEdge", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "nodes", - "description": "A list of nodes.", - "args": [], - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "ShippingRule", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "pageInfo", - "description": "Information to aid in pagination.", + "name": "answerable", + "description": "The object associated with the answer (e.g. Item, Project, Reward)", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "PageInfo", + "kind": "UNION", + "name": "Answerable", "ofType": null } }, @@ -25729,7 +26788,7 @@ "deprecationReason": null }, { - "name": "totalCount", + "name": "id", "description": null, "args": [], "type": { @@ -25737,34 +26796,23 @@ "name": null, "ofType": { "kind": "SCALAR", - "name": "Int", + "name": "ID", "ofType": null } }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "ShippingRuleEdge", - "description": "An edge in a connection.", - "fields": [ + }, { - "name": "cursor", - "description": "A cursor for use in pagination.", + "name": "question", + "description": "The associated question", "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "Question", "ofType": null } }, @@ -25772,12 +26820,12 @@ "deprecationReason": null }, { - "name": "node", - "description": "The item at the end of the edge.", + "name": "response", + "description": "The response to the question", "args": [], "type": { - "kind": "OBJECT", - "name": "ShippingRule", + "kind": "SCALAR", + "name": "String", "ofType": null }, "isDeprecated": false, @@ -25790,112 +26838,46 @@ "possibleTypes": null }, { - "kind": "OBJECT", - "name": "SimpleShippingRule", - "description": "Simple shipping rule for a reward", - "fields": [ - { - "name": "cost", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "country", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "currency", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - }, + "kind": "UNION", + "name": "Answerable", + "description": "An object that can be associated with an answer", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ { - "name": "locationId", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + "kind": "OBJECT", + "name": "LineItem", + "ofType": null }, { - "name": "locationName", - "description": null, - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null + "kind": "OBJECT", + "name": "Project", + "ofType": null } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null + ] }, { "kind": "OBJECT", - "name": "BackingAddon", - "description": "An add-on reward included in a backing.", + "name": "LineItem", + "description": "A line item in a cart", "fields": [ { - "name": "amount", - "description": "Amount the add-on costs.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "OBJECT", - "name": "Money", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "description", - "description": "The add-on description.", + "name": "answers", + "description": "The answers associated with the line item", "args": [], "type": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "Answer", + "ofType": null + } } }, "isDeprecated": false, @@ -25918,56 +26900,15 @@ "deprecationReason": null }, { - "name": "items", - "description": "Items in the add-on.", - "args": [ - { - "name": "first", - "description": "Returns the first _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "after", - "description": "Returns the elements in the list that come after the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "last", - "description": "Returns the last _n_ elements from the list.", - "type": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "before", - "description": "Returns the elements in the list that come before the specified cursor.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], + "name": "item", + "description": "The item associated with the line item", + "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "OBJECT", - "name": "RewardItemsConnection", + "name": "RewardItem", "ofType": null } }, @@ -25975,32 +26916,16 @@ "deprecationReason": null }, { - "name": "name", - "description": "The add-on name.", + "name": "itemVariant", + "description": "The item variant the backer selected (unless master variant)", "args": [], "type": { - "kind": "SCALAR", - "name": "String", + "kind": "OBJECT", + "name": "ItemVariant", "ofType": null }, "isDeprecated": false, "deprecationReason": null - }, - { - "name": "quantity", - "description": "The quantity of the add-on included in a backing.", - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null } ], "inputFields": null, @@ -26518,7 +27443,7 @@ }, { "name": "paymentIntentClientSecret", - "description": null, + "description": "the client_secret returned by createPaymentIntent, starts with `pi_` (the same secret passed to stripe)", "type": { "kind": "NON_NULL", "name": null, @@ -32065,6 +32990,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "bulkEditQuestions", + "description": "Bulk edits the entire set of questions for a questionable", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "BulkEditQuestionsInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "BulkEditQuestionsPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "cancelBacking", "description": "Cancel a pledged backing", @@ -32551,6 +33503,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "createOption", + "description": "Creates an option type and values for an item", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateOptionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateOptionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "createOrUpdateBackingAddress", "description": null, @@ -32902,6 +33881,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "createQuestion", + "description": "Creates a question for an object", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateQuestionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "CreateQuestionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "createReward", "description": "create a reward on a Kickstarter project.", @@ -33334,6 +34340,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "deleteOption", + "description": "Deletes an option type and values for an item", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeleteOptionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteOptionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "deletePost", "description": "Delete a project post", @@ -33469,6 +34502,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "deleteQuestion", + "description": "Deletes a question", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DeleteQuestionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "DeleteQuestionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "deleteReward", "description": "Delete a reward from a project", @@ -34171,6 +35231,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "setAddressAsPrimary", + "description": "Sets an address as the primary/default address for the user", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SetAddressAsPrimaryInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SetAddressAsPrimaryPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "setBackingFulfillmentStatuses", "description": "Sets the fulfillment status of multiple backings at once.", @@ -34387,6 +35474,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "submitResponses", + "description": "Associates backing with an address, updates cart with item preference selections, and creates answers to survey questions.", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SubmitResponsesInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "SubmitResponsesPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "submitVatNumber", "description": "Submits the VAT number to rosie", @@ -34981,6 +36095,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "updateOption", + "description": "Updates an option type and values for an item", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateOptionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateOptionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updateOrderState", "description": "Update the state of an order, e.g. draft, submitted, successful, errored, missed.", @@ -35170,6 +36311,33 @@ "isDeprecated": false, "deprecationReason": null }, + { + "name": "updateQuestion", + "description": "Updates a question", + "args": [ + { + "name": "input", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateQuestionInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "type": { + "kind": "OBJECT", + "name": "UpdateQuestionPayload", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, { "name": "updateReward", "description": "Update a reward on a Kickstarter project.", @@ -35827,8 +36995,90 @@ }, { "kind": "OBJECT", - "name": "BatchUpdateSurveyResponseAddressesPayload", - "description": "Autogenerated return type of BatchUpdateSurveyResponseAddresses", + "name": "BatchUpdateSurveyResponseAddressesPayload", + "description": "Autogenerated return type of BatchUpdateSurveyResponseAddresses", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "updatedSurveyResponses", + "description": "List of SurveyResponses that were successfully updated", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "OBJECT", + "name": "SurveyResponse", + "ofType": null + } + } + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BlockUserInput", + "description": "Autogenerated input type of BlockUser", + "fields": null, + "inputFields": [ + { + "name": "blockUserId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "BlockUserPayload", + "description": "Autogenerated return type of BlockUser", "fields": [ { "name": "clientMutationId", @@ -35843,9 +37093,76 @@ "deprecationReason": null }, { - "name": "updatedSurveyResponses", - "description": "List of SurveyResponses that were successfully updated", + "name": "currentUser", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "success", + "description": null, "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "BulkEditQuestionsInput", + "description": "Autogenerated input type of BulkEditQuestions", + "fields": null, + "inputFields": [ + { + "name": "questionableId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "questionableType", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionableType", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "questions", + "description": null, "type": { "kind": "NON_NULL", "name": null, @@ -35856,51 +37173,128 @@ "kind": "NON_NULL", "name": null, "ofType": { - "kind": "OBJECT", - "name": "SurveyResponse", + "kind": "INPUT_OBJECT", + "name": "QuestionInput", "ofType": null } } } }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "ENUM", + "name": "QuestionableType", + "description": "Types that can be associated with a Question", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": [ + { + "name": "Project", + "description": null, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "RewardItem", + "description": null, "isDeprecated": false, "deprecationReason": null } ], - "inputFields": null, - "interfaces": [], - "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "BlockUserInput", - "description": "Autogenerated input type of BlockUser", + "name": "QuestionInput", + "description": "Question associated with a particular questionable.", "fields": null, "inputFields": [ { - "name": "blockUserId", + "name": "type", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionType", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "prompt", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", - "name": "ID", + "name": "String", "ofType": null } }, "defaultValue": null }, { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", + "name": "choices", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "choiceSelectionLimit", + "description": null, "type": { "kind": "SCALAR", - "name": "String", + "name": "Int", "ofType": null }, "defaultValue": null + }, + { + "name": "optional", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null } ], "interfaces": null, @@ -35909,8 +37303,8 @@ }, { "kind": "OBJECT", - "name": "BlockUserPayload", - "description": "Autogenerated return type of BlockUser", + "name": "BulkEditQuestionsPayload", + "description": "Autogenerated return type of BulkEditQuestions", "fields": [ { "name": "clientMutationId", @@ -35925,12 +37319,12 @@ "deprecationReason": null }, { - "name": "currentUser", - "description": null, + "name": "questionable", + "description": "The updated questionable.", "args": [], "type": { - "kind": "OBJECT", - "name": "User", + "kind": "UNION", + "name": "Questionable", "ofType": null }, "isDeprecated": false, @@ -35938,7 +37332,7 @@ }, { "name": "success", - "description": null, + "description": "Succeeds if questions are successfully edited.", "args": [], "type": { "kind": "NON_NULL", @@ -36198,7 +37592,7 @@ "inputFields": [ { "name": "checkoutId", - "description": "The graphql relay id of the checkout", + "description": "The graphql relay id of the checkout (base64 encoded)", "type": { "kind": "NON_NULL", "name": null, @@ -36212,7 +37606,7 @@ }, { "name": "paymentIntentClientSecret", - "description": "The stripe payment intent client secret", + "description": "the client_secret returned by createPaymentIntent, starts with `pi_` (the same secret passed to stripe)", "type": { "kind": "NON_NULL", "name": null, @@ -36226,7 +37620,7 @@ }, { "name": "paymentSourceId", - "description": "The rosie payment source id when using a saved source (optional)", + "description": "Kickstarter internal payment source id. Expects a number (not the stripe id starting with `pm_`). Pass in when using a saved card (optional)", "type": { "kind": "SCALAR", "name": "String", @@ -38879,6 +40273,122 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CreateOptionInput", + "description": "Autogenerated input type of CreateOption", + "fields": null, + "inputFields": [ + { + "name": "itemId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "name", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "prompt", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "values", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateOptionPayload", + "description": "Autogenerated return type of CreateOption", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "optionType", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "OptionType", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CreateOrUpdateBackingAddressInput", @@ -39439,6 +40949,26 @@ }, "defaultValue": null }, + { + "name": "backingId", + "description": "Current backing id for tracking purposes", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "checkoutId", + "description": "Current checkout id for tracking purposes", + "type": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + }, + "defaultValue": null + }, { "name": "clientMutationId", "description": "A unique identifier for the client performing the mutation.", @@ -40480,6 +42010,160 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "CreateQuestionInput", + "description": "Autogenerated input type of CreateQuestion", + "fields": null, + "inputFields": [ + { + "name": "questionableId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "questionableType", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionableType", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionType", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "prompt", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "choices", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "choiceSelectionLimit", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "optional", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "CreateQuestionPayload", + "description": "Autogenerated return type of CreateQuestion", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "question", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Question", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "CreateRewardInput", @@ -41936,8 +43620,248 @@ }, { "kind": "OBJECT", - "name": "DeleteAddressPayload", - "description": "Autogenerated return type of DeleteAddress", + "name": "DeleteAddressPayload", + "description": "Autogenerated return type of DeleteAddress", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "success", + "description": "Success if address was deleted successfully", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteAssetInput", + "description": "Autogenerated input type of DeleteAsset", + "fields": null, + "inputFields": [ + { + "name": "attachable_id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "asset_id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteAssetPayload", + "description": "Autogenerated return type of DeleteAsset", + "fields": [ + { + "name": "attachable", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "UNION", + "name": "Attachable", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "UNION", + "name": "Attachable", + "description": "An object that can be associated with uploaded assets", + "fields": null, + "inputFields": null, + "interfaces": null, + "enumValues": null, + "possibleTypes": [ + { + "kind": "OBJECT", + "name": "Project", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "FreeformPost", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "InterviewAnswer", + "ofType": null + }, + { + "kind": "OBJECT", + "name": "Survey", + "ofType": null + } + ] + }, + { + "kind": "OBJECT", + "name": "Survey", + "description": "A survey", + "fields": [ + { + "name": "id", + "description": null, + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [ + { + "kind": "INTERFACE", + "name": "Node", + "ofType": null + } + ], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteBusinessAddressInput", + "description": "Autogenerated input type of DeleteBusinessAddress", + "fields": null, + "inputFields": [ + { + "name": "addressId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "projectId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteBusinessAddressPayload", + "description": "Autogenerated return type of DeleteBusinessAddress", "fields": [ { "name": "clientMutationId", @@ -41953,16 +43877,12 @@ }, { "name": "success", - "description": "Success if address was deleted successfully", + "description": "Succeeds if address is deleted.", "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } + "kind": "SCALAR", + "name": "Boolean", + "ofType": null }, "isDeprecated": false, "deprecationReason": null @@ -41975,27 +43895,13 @@ }, { "kind": "INPUT_OBJECT", - "name": "DeleteAssetInput", - "description": "Autogenerated input type of DeleteAsset", + "name": "DeleteCommentInput", + "description": "Autogenerated input type of DeleteComment", "fields": null, "inputFields": [ { - "name": "attachable_id", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "asset_id", - "description": null, + "name": "id", + "description": "The comment ID", "type": { "kind": "NON_NULL", "name": null, @@ -42024,25 +43930,9 @@ }, { "kind": "OBJECT", - "name": "DeleteAssetPayload", - "description": "Autogenerated return type of DeleteAsset", + "name": "DeleteCommentPayload", + "description": "Autogenerated return type of DeleteComment", "fields": [ - { - "name": "attachable", - "description": null, - "args": [], - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "UNION", - "name": "Attachable", - "ofType": null - } - }, - "isDeprecated": false, - "deprecationReason": null - }, { "name": "clientMutationId", "description": "A unique identifier for the client performing the mutation.", @@ -42054,85 +43944,33 @@ }, "isDeprecated": false, "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "UNION", - "name": "Attachable", - "description": "An object that can be associated with uploaded assets", - "fields": null, - "inputFields": null, - "interfaces": null, - "enumValues": null, - "possibleTypes": [ - { - "kind": "OBJECT", - "name": "Project", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "FreeformPost", - "ofType": null }, { - "kind": "OBJECT", - "name": "InterviewAnswer", - "ofType": null - }, - { - "kind": "OBJECT", - "name": "Survey", - "ofType": null - } - ] - }, - { - "kind": "OBJECT", - "name": "Survey", - "description": "A survey", - "fields": [ - { - "name": "id", + "name": "commentable", "description": null, "args": [], "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } + "kind": "OBJECT", + "name": "Project", + "ofType": null }, "isDeprecated": false, "deprecationReason": null } ], "inputFields": null, - "interfaces": [ - { - "kind": "INTERFACE", - "name": "Node", - "ofType": null - } - ], + "interfaces": [], "enumValues": null, "possibleTypes": null }, { "kind": "INPUT_OBJECT", - "name": "DeleteBusinessAddressInput", - "description": "Autogenerated input type of DeleteBusinessAddress", + "name": "DeleteNexusInput", + "description": "Autogenerated input type of DeleteNexus", "fields": null, "inputFields": [ { - "name": "addressId", + "name": "nexusId", "description": null, "type": { "kind": "NON_NULL", @@ -42145,20 +43983,6 @@ }, "defaultValue": null }, - { - "name": "projectId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null - } - }, - "defaultValue": null - }, { "name": "clientMutationId", "description": "A unique identifier for the client performing the mutation.", @@ -42176,8 +44000,8 @@ }, { "kind": "OBJECT", - "name": "DeleteBusinessAddressPayload", - "description": "Autogenerated return type of DeleteBusinessAddress", + "name": "DeleteNexusPayload", + "description": "Autogenerated return type of DeleteNexus", "fields": [ { "name": "clientMutationId", @@ -42193,7 +44017,7 @@ }, { "name": "success", - "description": "Succeeds if address is deleted.", + "description": "Succeeds if nexus is deleted.", "args": [], "type": { "kind": "SCALAR", @@ -42211,13 +44035,13 @@ }, { "kind": "INPUT_OBJECT", - "name": "DeleteCommentInput", - "description": "Autogenerated input type of DeleteComment", + "name": "DeleteOptionInput", + "description": "Autogenerated input type of DeleteOption", "fields": null, "inputFields": [ { - "name": "id", - "description": "The comment ID", + "name": "optionTypeId", + "description": null, "type": { "kind": "NON_NULL", "name": null, @@ -42246,8 +44070,8 @@ }, { "kind": "OBJECT", - "name": "DeleteCommentPayload", - "description": "Autogenerated return type of DeleteComment", + "name": "DeleteOptionPayload", + "description": "Autogenerated return type of DeleteOption", "fields": [ { "name": "clientMutationId", @@ -42262,83 +44086,33 @@ "deprecationReason": null }, { - "name": "commentable", - "description": null, + "name": "item", + "description": "The item that the deleted option type was associated with", "args": [], - "type": { - "kind": "OBJECT", - "name": "Project", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "DeleteNexusInput", - "description": "Autogenerated input type of DeleteNexus", - "fields": null, - "inputFields": [ - { - "name": "nexusId", - "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "ID", + "kind": "OBJECT", + "name": "RewardItem", "ofType": null } }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "DeleteNexusPayload", - "description": "Autogenerated return type of DeleteNexus", - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "args": [], - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, "isDeprecated": false, "deprecationReason": null }, { "name": "success", - "description": "Succeeds if nexus is deleted.", + "description": "Succeeds if option_type is deleted.", "args": [], "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } }, "isDeprecated": false, "deprecationReason": null @@ -42713,6 +44487,80 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "DeleteQuestionInput", + "description": "Autogenerated input type of DeleteQuestion", + "fields": null, + "inputFields": [ + { + "name": "questionId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "DeleteQuestionPayload", + "description": "Autogenerated return type of DeleteQuestion", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "success", + "description": "Succeeds if question is deleted.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "DeleteRewardInput", @@ -44769,6 +46617,80 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "SetAddressAsPrimaryInput", + "description": "Autogenerated input type of SetAddressAsPrimary", + "fields": null, + "inputFields": [ + { + "name": "fulfillmentAddressId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SetAddressAsPrimaryPayload", + "description": "Autogenerated return type of SetAddressAsPrimary", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "success", + "description": "Success if address was updated successfully", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "SetBackingFulfillmentStatusesInput", @@ -45597,6 +47519,220 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "SubmitResponsesInput", + "description": "Autogenerated input type of SubmitResponses", + "fields": null, + "inputFields": [ + { + "name": "cartId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "addressId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "lineItemUpdates", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "LineItemInput", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "LineItemInput", + "description": "Line item belonging to a cart", + "fields": null, + "inputFields": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "optionValueIds", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "answers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "AnswerInput", + "ofType": null + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "AnswerInput", + "description": "Answer associated with a particular question and answerable.", + "fields": null, + "inputFields": [ + { + "name": "questionId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "response", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "SubmitResponsesPayload", + "description": "Autogenerated return type of SubmitResponses", + "fields": [ + { + "name": "cart", + "description": "The finalized cart, if submission is successful.", + "args": [], + "type": { + "kind": "OBJECT", + "name": "Cart", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "success", + "description": "Succeeds if cart is finalized.", + "args": [], + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "SubmitVatNumberInput", @@ -47701,8 +49837,295 @@ }, { "kind": "OBJECT", - "name": "UpdateConsentPayload", - "description": "Autogenerated return type of UpdateConsent", + "name": "UpdateConsentPayload", + "description": "Autogenerated return type of UpdateConsent", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "user", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "User", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateCreatorInterviewInput", + "description": "Autogenerated input type of UpdateCreatorInterview", + "fields": null, + "inputFields": [ + { + "name": "id", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "title", + "description": null, + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "public", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "answers", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "INPUT_OBJECT", + "name": "InterviewAnswerInput", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "InterviewAnswerInput", + "description": "Interview answer input for updating creator interviews", + "fields": null, + "inputFields": [ + { + "name": "interviewQuestionId", + "description": "The associated interview question id", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "body", + "description": "The body of the interview answer", + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "skip", + "description": "True if the creator chose to skip the question", + "type": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateCreatorInterviewPayload", + "description": "Autogenerated return type of UpdateCreatorInterview", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "creatorInterview", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "CreatorInterview", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateNexusesInput", + "description": "Autogenerated input type of UpdateNexuses", + "fields": null, + "inputFields": [ + { + "name": "nexusId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "isImporterOfRecord", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "hasPermanentEstablishment", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "regionalAuthorities", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": "[]" + }, + { + "name": "effectiveAt", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateNexusesPayload", + "description": "Autogenerated return type of UpdateNexuses", "fields": [ { "name": "clientMutationId", @@ -47717,12 +50140,12 @@ "deprecationReason": null }, { - "name": "user", + "name": "parentNexus", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "User", + "name": "Nexus", "ofType": null }, "isDeprecated": false, @@ -47736,12 +50159,12 @@ }, { "kind": "INPUT_OBJECT", - "name": "UpdateCreatorInterviewInput", - "description": "Autogenerated input type of UpdateCreatorInterview", + "name": "UpdateOptionInput", + "description": "Autogenerated input type of UpdateOption", "fields": null, "inputFields": [ { - "name": "id", + "name": "optionTypeId", "description": null, "type": { "kind": "NON_NULL", @@ -47755,81 +50178,8 @@ "defaultValue": null }, { - "name": "title", - "description": null, - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "public", - "description": null, - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null - }, - { - "name": "answers", + "name": "name", "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "INPUT_OBJECT", - "name": "InterviewAnswerInput", - "ofType": null - } - } - }, - "defaultValue": null - }, - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "type": { - "kind": "SCALAR", - "name": "String", - "ofType": null - }, - "defaultValue": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "InterviewAnswerInput", - "description": "Interview answer input for updating creator interviews", - "fields": null, - "inputFields": [ - { - "name": "interviewQuestionId", - "description": "The associated interview question id", - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "body", - "description": "The body of the interview answer", "type": { "kind": "NON_NULL", "name": null, @@ -47842,133 +50192,35 @@ "defaultValue": null }, { - "name": "skip", - "description": "True if the creator chose to skip the question", - "type": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - }, - "defaultValue": null - } - ], - "interfaces": null, - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "OBJECT", - "name": "UpdateCreatorInterviewPayload", - "description": "Autogenerated return type of UpdateCreatorInterview", - "fields": [ - { - "name": "clientMutationId", - "description": "A unique identifier for the client performing the mutation.", - "args": [], + "name": "prompt", + "description": null, "type": { "kind": "SCALAR", "name": "String", "ofType": null }, - "isDeprecated": false, - "deprecationReason": null - }, - { - "name": "creatorInterview", - "description": null, - "args": [], - "type": { - "kind": "OBJECT", - "name": "CreatorInterview", - "ofType": null - }, - "isDeprecated": false, - "deprecationReason": null - } - ], - "inputFields": null, - "interfaces": [], - "enumValues": null, - "possibleTypes": null - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateNexusesInput", - "description": "Autogenerated input type of UpdateNexuses", - "fields": null, - "inputFields": [ - { - "name": "nexusId", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "ID", - "ofType": null - } - }, "defaultValue": null }, { - "name": "isImporterOfRecord", + "name": "values", "description": null, "type": { "kind": "NON_NULL", "name": null, "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "hasPermanentEstablishment", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Boolean", - "ofType": null - } - }, - "defaultValue": null - }, - { - "name": "regionalAuthorities", - "description": null, - "type": { - "kind": "LIST", - "name": null, - "ofType": { - "kind": "NON_NULL", + "kind": "LIST", "name": null, "ofType": { - "kind": "SCALAR", - "name": "String", - "ofType": null + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } } } }, - "defaultValue": "[]" - }, - { - "name": "effectiveAt", - "description": null, - "type": { - "kind": "NON_NULL", - "name": null, - "ofType": { - "kind": "SCALAR", - "name": "Int", - "ofType": null - } - }, "defaultValue": null }, { @@ -47988,8 +50240,8 @@ }, { "kind": "OBJECT", - "name": "UpdateNexusesPayload", - "description": "Autogenerated return type of UpdateNexuses", + "name": "UpdateOptionPayload", + "description": "Autogenerated return type of UpdateOption", "fields": [ { "name": "clientMutationId", @@ -48004,12 +50256,12 @@ "deprecationReason": null }, { - "name": "parentNexus", + "name": "optionType", "description": null, "args": [], "type": { "kind": "OBJECT", - "name": "Nexus", + "name": "OptionType", "ofType": null }, "isDeprecated": false, @@ -49133,6 +51385,146 @@ "enumValues": null, "possibleTypes": null }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateQuestionInput", + "description": "Autogenerated input type of UpdateQuestion", + "fields": null, + "inputFields": [ + { + "name": "questionId", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "ID", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "type", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "ENUM", + "name": "QuestionType", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "prompt", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "choices", + "description": null, + "type": { + "kind": "LIST", + "name": null, + "ofType": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "String", + "ofType": null + } + } + }, + "defaultValue": null + }, + { + "name": "choiceSelectionLimit", + "description": null, + "type": { + "kind": "SCALAR", + "name": "Int", + "ofType": null + }, + "defaultValue": null + }, + { + "name": "optional", + "description": null, + "type": { + "kind": "NON_NULL", + "name": null, + "ofType": { + "kind": "SCALAR", + "name": "Boolean", + "ofType": null + } + }, + "defaultValue": null + }, + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "defaultValue": null + } + ], + "interfaces": null, + "enumValues": null, + "possibleTypes": null + }, + { + "kind": "OBJECT", + "name": "UpdateQuestionPayload", + "description": "Autogenerated return type of UpdateQuestion", + "fields": [ + { + "name": "clientMutationId", + "description": "A unique identifier for the client performing the mutation.", + "args": [], + "type": { + "kind": "SCALAR", + "name": "String", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + }, + { + "name": "question", + "description": null, + "args": [], + "type": { + "kind": "OBJECT", + "name": "Question", + "ofType": null + }, + "isDeprecated": false, + "deprecationReason": null + } + ], + "inputFields": null, + "interfaces": [], + "enumValues": null, + "possibleTypes": null + }, { "kind": "INPUT_OBJECT", "name": "UpdateRewardInput", diff --git a/app/src/main/java/com/kickstarter/models/CreatePaymentIntentInput.kt b/app/src/main/java/com/kickstarter/models/CreatePaymentIntentInput.kt index bd611216d3..eae0610450 100644 --- a/app/src/main/java/com/kickstarter/models/CreatePaymentIntentInput.kt +++ b/app/src/main/java/com/kickstarter/models/CreatePaymentIntentInput.kt @@ -1,3 +1,3 @@ package com.kickstarter.models -data class CreatePaymentIntentInput(val project: Project, val amount: String) +data class CreatePaymentIntentInput(val project: Project, val amount: String, val checkoutId: String) diff --git a/app/src/main/java/com/kickstarter/services/KSApolloClientV2.kt b/app/src/main/java/com/kickstarter/services/KSApolloClientV2.kt index 95cd12a5ca..8162a8eb80 100644 --- a/app/src/main/java/com/kickstarter/services/KSApolloClientV2.kt +++ b/app/src/main/java/com/kickstarter/services/KSApolloClientV2.kt @@ -1499,11 +1499,13 @@ class KSApolloClientV2(val service: ApolloClient, val gson: Gson) : ApolloClient return Observable.defer { val ps = PublishSubject.create() + val checkoutId = createPaymentIntentInput.checkoutId this.service.mutate( CreatePaymentIntentMutation.builder() .projectId(encodeRelayId(createPaymentIntentInput.project)) .amount(createPaymentIntentInput.amount) .paymentIntentContext(StripeIntentContextTypes.POST_CAMPAIGN_CHECKOUT) + .checkoutId(Base64Utils.encodeUrlSafe(("Checkout-$checkoutId").toByteArray(Charset.defaultCharset()))) .build() ).enqueue(object : ApolloCall.Callback() { override fun onFailure(e: ApolloException) { diff --git a/app/src/main/java/com/kickstarter/viewmodels/projectpage/LatePledgeCheckoutViewModel.kt b/app/src/main/java/com/kickstarter/viewmodels/projectpage/LatePledgeCheckoutViewModel.kt index 941f927f1a..c4ac9e38b7 100644 --- a/app/src/main/java/com/kickstarter/viewmodels/projectpage/LatePledgeCheckoutViewModel.kt +++ b/app/src/main/java/com/kickstarter/viewmodels/projectpage/LatePledgeCheckoutViewModel.kt @@ -176,29 +176,35 @@ class LatePledgeCheckoutViewModel(val environment: Environment) : ViewModel() { totalAmount: Double ) { viewModelScope.launch { - apolloClient.createPaymentIntent( - CreatePaymentIntentInput( - project = project, - amount = totalAmount.toString() - ) - ).asFlow().onStart { - emitCurrentState(isLoading = true) - }.map { clientSecret -> - selectedCard?.let { - checkoutId?.let { - validateCheckout(clientSecret = clientSecret, selectedCard = selectedCard) + checkoutId?.let { + apolloClient.createPaymentIntent( + CreatePaymentIntentInput( + project = project, + amount = totalAmount.toString(), + checkoutId = it + ) + ).asFlow().onStart { + emitCurrentState(isLoading = true) + }.map { clientSecret -> + selectedCard?.let { + checkoutId?.let { + validateCheckout(clientSecret = clientSecret, selectedCard = selectedCard) + } ?: run { + emitCurrentState() + errorAction.invoke(null) + } } ?: run { emitCurrentState() errorAction.invoke(null) } - } ?: run { + }.catch { emitCurrentState() errorAction.invoke(null) - } - }.catch { + }.collect() + } ?: run { emitCurrentState() errorAction.invoke(null) - }.collect() + } } }