diff options
| author | Max Nanis | 2026-09-29 18:53:10 +0000 |
|---|---|---|
| committer | Max Nanis | 2026-09-29 18:53:10 +0000 |
| commit | 3e7eb6ca784bc062bd1c7129e40b8705543d8469 (patch) | |
| tree | 30bc2883ab3397f290fb494fd38b96d47ac701b9 | |
| parent | d43e82fd2c799410b15706d10dbbcaa838325a4d (diff) | |
| parent | cd173e67e4e0514271371f4a5e5136f7f61d06d1 (diff) | |
| download | amt-jb-3e7eb6ca784bc062bd1c7129e40b8705543d8469.tar.gz amt-jb-3e7eb6ca784bc062bd1c7129e40b8705543d8469.zip | |
Merges pull request #6
Redemption Modal. Redemption Magic flow. User Account Icon
88 files changed, 5642 insertions, 756 deletions
diff --git a/jb-ui/.vscode/launch.json b/jb-ui/.vscode/launch.json index 1feeaca..5d6fc0c 100644 --- a/jb-ui/.vscode/launch.json +++ b/jb-ui/.vscode/launch.json @@ -10,7 +10,8 @@ "run", "dev" ], - "autoAttachChildProcesses": true + "autoAttachChildProcesses": true, + "console": "integratedTerminal" }, { "name": "React: Launch Chrome", @@ -19,7 +20,7 @@ "url": "http://localhost:5173", "webRoot": "${workspaceFolder}/src", "sourceMaps": true, - "preLaunchTask": "npm: dev" + "preLaunchTask": "npm: dev", }, { "name": "React: Attach to Chrome", @@ -27,7 +28,7 @@ "request": "attach", "port": 9222, "url": "http://localhost:5173", - "webRoot": "${workspaceFolder}/src" + "webRoot": "${workspaceFolder}/src", }, { "name": "Jest: Run Tests", diff --git a/jb-ui/src/JBApp.tsx b/jb-ui/src/JBApp.tsx index 67b8dfc..3031a00 100644 --- a/jb-ui/src/JBApp.tsx +++ b/jb-ui/src/JBApp.tsx @@ -14,7 +14,6 @@ import { UserLedgerWallets, UserLedgerWalletAccountTypeEnum, WalletApi, - CashoutMethodsResponse, } from "@/api_fsb"; import Footer from "@/components/Footer"; import { useAppDispatch } from "@/hooks"; @@ -28,13 +27,12 @@ import { setUserAttemptCreditWallet, } from "@/models/appSlice"; -import { addCashoutMethods } from "@/models/cashoutMethodsSlice"; - import { addEvent } from "@/models/grlEventsSlice"; import { addStatsData } from "@/models/grlStatsSlice"; import CashoutConfirmation from "@/pages/CashoutConfirmation"; import MagicLink from "@/pages/MagicLink"; import MagicAMTLink from "@/pages/MagicAMTLink"; +import MagicWallet from "@/pages/MagicWallet"; import Result from "@/pages/Result"; import clsx from "clsx"; @@ -56,8 +54,9 @@ import { useEffect } from "react"; import Wallet from "@/components/Wallet"; import "@/index.css"; import { setTaskStatus, setUserWalletBalance } from "@/models/appSlice"; -import { Profiling } from "./components/Profiling"; -import Redemption from "./components/Redemption"; +import { Profiling } from "@/components/Profiling"; +import Redemption from "@/components/Redemption"; +import UserAccount from "@/components/UserAccount"; type Message = | PingMessage @@ -88,13 +87,6 @@ function QueryParamProcessor() { dispatch(setProductUserID(user.product_user_id)); new WalletApi() - .getCashoutMethodsProductIdCashoutMethodsGet(bpid, user.product_user_id) - .then((res) => { - const response = res.data as CashoutMethodsResponse; - dispatch(addCashoutMethods(response.cashout_methods)); - }); - - new WalletApi() .getUserWalletBalanceProductIdWalletGet( bpid, // productId user.product_user_id, @@ -111,7 +103,9 @@ function QueryParamProcessor() { const response = res.data as UserLedgerWallets; if (response.displayed_balances) { - dispatch(setUserDisplayedWalletBalance(response.displayed_balances[0])); + dispatch( + setUserDisplayedWalletBalance(response.displayed_balances[0]), + ); } const userWallet = response.wallets?.find( @@ -198,6 +192,8 @@ const Layout = () => { <Outlet /> </div> </div> + + <UserAccount /> </main> <footer className="bg-slate-700 text-zinc-200 p-2 text-center font-mono"> @@ -275,8 +271,11 @@ function JBApp() { <Route element={<QueryParamProcessor />}> <Route element={<Layout />}> <Route path="/" element={<Work />} /> + + <Route path="/wallet/cashout/confirm/" element={<MagicWallet />} /> <Route path="/auth/magic-link/" element={<MagicLink />} /> <Route path="/auth/link-amt/" element={<MagicAMTLink />} /> + <Route path="/wallet/cashout/confirm/" element={<CashoutConfirmation />} diff --git a/jb-ui/src/api_fsb/.openapi-generator/FILES b/jb-ui/src/api_fsb/.openapi-generator/FILES index 7416313..4c9beb8 100644 --- a/jb-ui/src/api_fsb/.openapi-generator/FILES +++ b/jb-ui/src/api_fsb/.openapi-generator/FILES @@ -4,6 +4,8 @@ api.ts base.ts common.ts configuration.ts +docs/AccessControlEvent.md +docs/AccessControlEventBody.md docs/AccessType.md docs/AccountType.md docs/AdjustedAfter.md @@ -12,6 +14,7 @@ docs/AdjustedTimestamp.md docs/AdjustmentType.md docs/AggregateBySource.md docs/Amount.md +docs/Amount1.md docs/AmtCashoutMethodData.md docs/AttemptCreditClaimBody.md docs/AttemptCreditClaimResponse.md @@ -32,8 +35,10 @@ docs/CashoutMethodForeignValueResponse.md docs/CashoutMethodOut.md docs/CashoutMethodResponse.md docs/CashoutMethodsResponse.md -docs/CashoutRequestInfo.md +docs/CashoutRequestDetail.md docs/CashoutRequestResponse.md +docs/CashoutRequestSummary.md +docs/CashoutRequestsResponse.md docs/Category.md docs/CategoryAssociation.md docs/ContestApi.md @@ -83,7 +88,6 @@ docs/LedgerAccount.md docs/LedgerEntry.md docs/LedgerTransaction.md docs/ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner.md -docs/ManageCashoutBody.md docs/MarketProfileKnowledge.md docs/MarketplaceBucket.md docs/MarketplaceInventorySummary.md @@ -103,10 +107,10 @@ docs/OneShotOfferwall.md docs/OneShotOfferwallBucket.md docs/OneShotOfferwallResponse.md docs/OrderData.md -docs/OrderData1.md docs/POPFinancial.md docs/PatternValidation.md docs/Payload.md +docs/PayoutCategory.md docs/PayoutConfig.md docs/PayoutStatus.md docs/PayoutSummary.md @@ -124,7 +128,6 @@ docs/ProfilingInfoResponse.md docs/ProfilingQuestionsApi.md docs/PropertyType.md docs/RaffleUserView.md -docs/RedemptionCurrency.md docs/ReportApi.md docs/ReportNotes.md docs/ReportTask.md @@ -177,6 +180,8 @@ docs/SurveyEligibilityCriterion.md docs/SurveyId.md docs/THLApi.md docs/TangoCashoutMethodData.md +docs/TaskAdjustmentEvent.md +docs/TaskAdjustmentEventBody.md docs/TaskEnterPayload.md docs/TaskFinishPayload.md docs/TaskStatusResponse.md @@ -219,17 +224,18 @@ docs/UserDisplayedWalletBalance.md docs/UserHealthConfig.md docs/UserInfo.md docs/UserInfoResponse.md +docs/UserLedgerTransactionAttemptCredit.md docs/UserLedgerTransactionTaskAdjustment.md docs/UserLedgerTransactionTaskComplete.md docs/UserLedgerTransactionTypeSummary.md docs/UserLedgerTransactionTypesSummary.md docs/UserLedgerTransactionUserBonus.md docs/UserLedgerTransactionUserPayout.md +docs/UserLedgerTransactionUserPayoutCancel.md docs/UserLedgerTransactionsResponse.md docs/UserLedgerTransactionsResponseTransactionsInner.md docs/UserLedgerWallet.md docs/UserLedgerWallets.md -docs/UserPayoutEvent.md docs/UserProfile.md docs/UserProfileKnowledge.md docs/UserProfileKnowledgeAnswer.md diff --git a/jb-ui/src/api_fsb/api.ts b/jb-ui/src/api_fsb/api.ts index d819c9c..8b59dd7 100644 --- a/jb-ui/src/api_fsb/api.ts +++ b/jb-ui/src/api_fsb/api.ts @@ -24,6 +24,59 @@ import type { RequestArgs } from './base'; import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; /** + * + * @export + * @interface AccessControlEvent + */ +export interface AccessControlEvent { + /** + * + * @type {string} + * @memberof AccessControlEvent + */ + 'quality_event_type': AccessControlEventQualityEventTypeEnum; + /** + * + * @type {string} + * @memberof AccessControlEvent + */ + 'product_id'?: string | null; + /** + * + * @type {string} + * @memberof AccessControlEvent + */ + 'bpuid'?: string | null; + /** + * + * @type {number} + * @memberof AccessControlEvent + */ + 'user_id'?: number | null; +} + +export const AccessControlEventQualityEventTypeEnum = { + AddToWhitelist: 'add_to_whitelist', + AddToBlacklist: 'add_to_blacklist', + ClearAccessControlList: 'clear_access_control_list' +} as const; + +export type AccessControlEventQualityEventTypeEnum = typeof AccessControlEventQualityEventTypeEnum[keyof typeof AccessControlEventQualityEventTypeEnum]; + +/** + * + * @export + * @interface AccessControlEventBody + */ +export interface AccessControlEventBody { + /** + * + * @type {Array<AccessControlEvent>} + * @memberof AccessControlEventBody + */ + 'events': Array<AccessControlEvent>; +} +/** * How the network is used * @export * @enum {string} @@ -135,6 +188,13 @@ export interface AggregateBySource { export interface Amount { } /** + * If negative, the status should adjusted to incomplete + * @export + * @interface Amount1 + */ +export interface Amount1 { +} +/** * * @export * @interface AmtCashoutMethodData @@ -345,7 +405,7 @@ export interface BrokerageProductPayoutEvent { */ 'ext_ref_id'?: string | null; /** - * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT * @type {PayoutType} * @memberof BrokerageProductPayoutEvent */ @@ -369,7 +429,7 @@ export interface BrokerageProductPayoutEvent { */ 'product_id': string; /** - * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT * @type {PayoutType} * @memberof BrokerageProductPayoutEvent */ @@ -556,11 +616,11 @@ export interface CashoutMethodForeignValue { */ 'value': number; /** - * Supported Currencies for Foreign Redemptions Allowed values: - __USD__ *(USD)*: US Dollars. Smallest Unit: Cents. - __CAD__ *(CAD)*: Canadian Dollars. Smallest Unit: Cents. - __GBP__ *(GBP)*: British Pounds. Smallest Unit: Pence. - __EUR__ *(EUR)*: Euros. Smallest Unit: Cents. - __INR__ *(INR)*: Indian Rupees. Smallest Unit: Paise. - __AUD__ *(AUD)*: Australian Dollars. Smallest Unit: Cents. - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz. - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre. - __SGD__ *(SGD)*: Singapore Dollars. Smallest Unit: Cents. - __MXN__ *(MXN)*: Mexican Pesos. Smallest Unit: Centavos. - * @type {RedemptionCurrency} + * Allowed values: - __USD__ *(USD)*: United States Dollar. Smallest Unit: Cents. - __CAD__ *(CAD)*: Canadian Dollar. Smallest Unit: Cents. - __GBP__ *(GBP)*: British Pound. Smallest Unit: Pence. - __EUR__ *(EUR)*: Euro. Smallest Unit: Cents. - __INR__ *(INR)*: Indian Rupee. Smallest Unit: Paise. - __AUD__ *(AUD)*: Australian Dollar. Smallest Unit: Cents. - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz. - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre. - __SGD__ *(SGD)*: Singapore Dollar. Smallest Unit: Cents. - __MXN__ *(MXN)*: Mexican Peso. Smallest Unit: Centavos. + * @type {Currency} * @memberof CashoutMethodForeignValue */ - 'currency': RedemptionCurrency; + 'currency': Currency; /** * A string representation of the value in the currency. * @type {string} @@ -581,7 +641,7 @@ export interface CashoutMethodForeignValueResponse { * @type {string} * @memberof CashoutMethodForeignValueResponse */ - 'status': CashoutMethodForeignValueResponseStatusEnum; + 'status'?: CashoutMethodForeignValueResponseStatusEnum; /** * * @type {string} @@ -664,7 +724,7 @@ export interface CashoutMethodOut { */ 'name': string; /** - * The method in which the requested payout is delivered. Allowed values: - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card - __DWOLLA__ *(DWOLLA)*: DWOLLA - __ACH__ *(ACH)*: A payment is made to a bank account using ACH - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user. - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT + * The method in which the requested payout is delivered. Allowed values: - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card - __TREMENDOUS__ *(TREMENDOUS)*: Tremendous Gift Card - __DWOLLA__ *(DWOLLA)*: DWOLLA - __ACH__ *(ACH)*: A payment is made to a bank account using ACH - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user. - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT * @type {PayoutType} * @memberof CashoutMethodOut */ @@ -705,6 +765,12 @@ export interface CashoutMethodOut { * @memberof CashoutMethodOut */ 'product_user_id'?: string | null; + /** + * + * @type {PayoutCategory} + * @memberof CashoutMethodOut + */ + 'category': PayoutCategory; } export const CashoutMethodOutCurrencyEnum = { @@ -724,7 +790,7 @@ export interface CashoutMethodResponse { * @type {string} * @memberof CashoutMethodResponse */ - 'status': CashoutMethodResponseStatusEnum; + 'status'?: CashoutMethodResponseStatusEnum; /** * * @type {string} @@ -757,7 +823,7 @@ export interface CashoutMethodsResponse { * @type {string} * @memberof CashoutMethodsResponse */ - 'status': CashoutMethodsResponseStatusEnum; + 'status'?: CashoutMethodsResponseStatusEnum; /** * * @type {string} @@ -780,41 +846,71 @@ export const CashoutMethodsResponseStatusEnum = { export type CashoutMethodsResponseStatusEnum = typeof CashoutMethodsResponseStatusEnum[keyof typeof CashoutMethodsResponseStatusEnum]; /** - * See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + * * @export - * @interface CashoutRequestInfo + * @interface CashoutRequestDetail */ -export interface CashoutRequestInfo { +export interface CashoutRequestDetail { /** - * + * Unique ID for this cashout * @type {string} - * @memberof CashoutRequestInfo + * @memberof CashoutRequestDetail */ - 'id': string | null; + 'id': string; /** * This is the name of the cashout method. * @type {string} - * @memberof CashoutRequestInfo + * @memberof CashoutRequestDetail */ 'description': string; /** * + * @type {PayoutStatus} + * @memberof CashoutRequestDetail + */ + 'status'?: PayoutStatus | null; + /** + * * @type {string} - * @memberof CashoutRequestInfo + * @memberof CashoutRequestDetail */ - 'message'?: string | null; + 'product_id': string; /** * - * @type {PayoutStatus} - * @memberof CashoutRequestInfo + * @type {string} + * @memberof CashoutRequestDetail */ - 'status'?: PayoutStatus | null; + 'product_user_id': string; + /** + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + * @type {PayoutType} + * @memberof CashoutRequestDetail + */ + 'payout_type': PayoutType; + /** + * The amount in USD Cents + * @type {number} + * @memberof CashoutRequestDetail + */ + 'amount': number; + /** + * + * @type {string} + * @memberof CashoutRequestDetail + */ + 'created': string; /** * * @type {object} - * @memberof CashoutRequestInfo + * @memberof CashoutRequestDetail */ 'transaction_info'?: object | null; + /** + * + * @type {PayoutCategory} + * @memberof CashoutRequestDetail + */ + 'category': PayoutCategory; } @@ -829,7 +925,7 @@ export interface CashoutRequestResponse { * @type {string} * @memberof CashoutRequestResponse */ - 'status': CashoutRequestResponseStatusEnum; + 'status'?: CashoutRequestResponseStatusEnum; /** * * @type {string} @@ -838,10 +934,10 @@ export interface CashoutRequestResponse { 'msg'?: string | null; /** * - * @type {CashoutRequestInfo} + * @type {CashoutRequestDetail} * @memberof CashoutRequestResponse */ - 'cashout': CashoutRequestInfo; + 'cashout': CashoutRequestDetail; } export const CashoutRequestResponseStatusEnum = { @@ -852,6 +948,126 @@ export const CashoutRequestResponseStatusEnum = { export type CashoutRequestResponseStatusEnum = typeof CashoutRequestResponseStatusEnum[keyof typeof CashoutRequestResponseStatusEnum]; /** + * See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + * @export + * @interface CashoutRequestSummary + */ +export interface CashoutRequestSummary { + /** + * Unique ID for this cashout + * @type {string} + * @memberof CashoutRequestSummary + */ + 'id': string; + /** + * This is the name of the cashout method. + * @type {string} + * @memberof CashoutRequestSummary + */ + 'description': string; + /** + * + * @type {PayoutStatus} + * @memberof CashoutRequestSummary + */ + 'status'?: PayoutStatus | null; + /** + * + * @type {string} + * @memberof CashoutRequestSummary + */ + 'product_id': string; + /** + * + * @type {string} + * @memberof CashoutRequestSummary + */ + 'product_user_id': string; + /** + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + * @type {PayoutType} + * @memberof CashoutRequestSummary + */ + 'payout_type': PayoutType; + /** + * The amount in USD Cents + * @type {number} + * @memberof CashoutRequestSummary + */ + 'amount': number; + /** + * + * @type {string} + * @memberof CashoutRequestSummary + */ + 'created': string; + /** + * + * @type {PayoutCategory} + * @memberof CashoutRequestSummary + */ + 'category': PayoutCategory; +} + + +/** + * + * @export + * @interface CashoutRequestsResponse + */ +export interface CashoutRequestsResponse { + /** + * Page number + * @type {number} + * @memberof CashoutRequestsResponse + */ + 'page'?: number; + /** + * Page size + * @type {number} + * @memberof CashoutRequestsResponse + */ + 'size'?: number; + /** + * + * @type {number} + * @memberof CashoutRequestsResponse + */ + 'total'?: number | null; + /** + * The status of the API response. + * @type {string} + * @memberof CashoutRequestsResponse + */ + 'status'?: CashoutRequestsResponseStatusEnum; + /** + * + * @type {string} + * @memberof CashoutRequestsResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array<CashoutRequestSummary>} + * @memberof CashoutRequestsResponse + */ + 'cashouts': Array<CashoutRequestSummary>; + /** + * + * @type {number} + * @memberof CashoutRequestsResponse + */ + 'pages': number | null; +} + +export const CashoutRequestsResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type CashoutRequestsResponseStatusEnum = typeof CashoutRequestsResponseStatusEnum[keyof typeof CashoutRequestsResponseStatusEnum]; + +/** * * @export * @interface Category @@ -1574,35 +1790,23 @@ export interface FacetValue { export interface Finished { } /** - * + * Fields we\'ll always pull from GRIP\'s mmdb files at minimum * @export * @interface GeoIPInformation */ export interface GeoIPInformation { /** * - * @type {number} - * @memberof GeoIPInformation - */ - 'geoname_id'?: number | null; - /** - * * @type {string} * @memberof GeoIPInformation */ - 'continent_code'?: string | null; + 'ip': string; /** * * @type {string} * @memberof GeoIPInformation */ - 'continent_name'?: string | null; - /** - * The ISO code of the country associated with the IP address. - * @type {string} - * @memberof GeoIPInformation - */ - 'country_iso': string; + 'country_iso': string | null; /** * * @type {string} @@ -1623,96 +1827,12 @@ export interface GeoIPInformation { 'subdivision_1_name'?: string | null; /** * - * @type {string} - * @memberof GeoIPInformation - */ - 'subdivision_2_iso'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'subdivision_2_name'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'city_name'?: string | null; - /** - * - * @type {number} - * @memberof GeoIPInformation - */ - 'metro_code'?: number | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'time_zone'?: string | null; - /** - * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_in_european_union'?: boolean | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'updated'?: string; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'ip': string; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'registered_country_iso'?: string | null; - /** - * * @type {boolean} * @memberof GeoIPInformation */ 'is_anonymous'?: boolean | null; /** * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_anonymous_vpn'?: boolean | null; - /** - * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_hosting_provider'?: boolean | null; - /** - * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_public_proxy'?: boolean | null; - /** - * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_tor_exit_node'?: boolean | null; - /** - * - * @type {boolean} - * @memberof GeoIPInformation - */ - 'is_residential_proxy'?: boolean | null; - /** - * * @type {number} * @memberof GeoIPInformation */ @@ -1725,76 +1845,10 @@ export interface GeoIPInformation { 'autonomous_system_organization'?: string | null; /** * - * @type {string} - * @memberof GeoIPInformation - */ - 'domain'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'isp'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'mobile_country_code'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'mobile_network_code'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'network'?: string | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'organization'?: string | null; - /** - * - * @type {number} - * @memberof GeoIPInformation - */ - 'static_ip_score'?: number | null; - /** - * * @type {AccessType} * @memberof GeoIPInformation */ - 'user_type'?: AccessType | null; - /** - * - * @type {string} - * @memberof GeoIPInformation - */ - 'postal_code'?: string | null; - /** - * - * @type {number} - * @memberof GeoIPInformation - */ - 'latitude'?: number | null; - /** - * - * @type {number} - * @memberof GeoIPInformation - */ - 'longitude'?: number | null; - /** - * - * @type {number} - * @memberof GeoIPInformation - */ - 'accuracy_radius'?: number | null; + 'access_type'?: AccessType | null; } @@ -2134,7 +2188,7 @@ export interface LeaderboardResponse { * @type {string} * @memberof LeaderboardResponse */ - 'status': LeaderboardResponseStatusEnum; + 'status'?: LeaderboardResponseStatusEnum; /** * * @type {string} @@ -2273,7 +2327,7 @@ export interface LeaderboardWinnerResponse { * @type {string} * @memberof LeaderboardWinnerResponse */ - 'status': LeaderboardWinnerResponseStatusEnum; + 'status'?: LeaderboardWinnerResponseStatusEnum; /** * * @type {string} @@ -2668,27 +2722,6 @@ export const ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet2 export type ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum = typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum[keyof typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum]; /** - * - * @export - * @interface ManageCashoutBody - */ -export interface ManageCashoutBody { - /** - * - * @type {string} - * @memberof ManageCashoutBody - */ - 'payout_id': string; - /** - * - * @type {PayoutStatus} - * @memberof ManageCashoutBody - */ - 'new_status': PayoutStatus; -} - - -/** * This is used solely in API responses, so it is simplified. * @export * @interface MarketProfileKnowledge @@ -3402,74 +3435,6 @@ export const OrderDataTypeEnum = { export type OrderDataTypeEnum = typeof OrderDataTypeEnum[keyof typeof OrderDataTypeEnum]; /** - * Stores payout-type-specific order information that is returned from the external payout provider. - * @export - * @interface OrderData1 - */ -export interface OrderData1 { - /** - * - * @type {string} - * @memberof OrderData1 - */ - 'type'?: OrderData1TypeEnum; - /** - * - * @type {number} - * @memberof OrderData1 - */ - 'shipping_cost': number; - /** - * - * @type {string} - * @memberof OrderData1 - */ - 'tracking_number'?: string; - /** - * - * @type {ShippingMethod} - * @memberof OrderData1 - */ - 'shipping_method'?: ShippingMethod; - /** - * - * @type {ShippingCarrier} - * @memberof OrderData1 - */ - 'carrier'?: ShippingCarrier; - /** - * - * @type {string} - * @memberof OrderData1 - */ - 'ship_date'?: string; - /** - * - * @type {string} - * @memberof OrderData1 - */ - 'estimated_delivery_date'?: string; - /** - * - * @type {DeliveryStatus} - * @memberof OrderData1 - */ - 'delivery_status'?: DeliveryStatus; - /** - * - * @type {string} - * @memberof OrderData1 - */ - 'last_updated'?: string; -} - -export const OrderData1TypeEnum = { - CashInMail: 'CASH_IN_MAIL' -} as const; - -export type OrderData1TypeEnum = typeof OrderData1TypeEnum[keyof typeof OrderData1TypeEnum]; - -/** * We can\'t use our USDCent class in here because aside from it not supporting negative values for our adjustments, FastAPI also complains because it doesn\'t know how to generate documentation for it. - Max 2024-06-25 * @export * @interface POPFinancial @@ -3550,6 +3515,23 @@ export interface PatternValidation { export type Payload = { event_type: 'session.enter' } & SessionEnterPayload | { event_type: 'session.finish' } & SessionFinishPayload | { event_type: 'task.enter' } & TaskEnterPayload | { event_type: 'task.finish' } & TaskFinishPayload; /** + * + * @export + * @enum {string} + */ + +export const PayoutCategory = { + Cash: 'CASH', + GiftCard: 'GIFT_CARD', + Prize: 'PRIZE', + Crypto: 'CRYPTO', + PlatformCredit: 'PLATFORM_CREDIT' +} as const; + +export type PayoutCategory = typeof PayoutCategory[keyof typeof PayoutCategory]; + + +/** * Store configuration related to payouts, payout transformation, and user payout formatting. * @export * @interface PayoutConfig @@ -3702,6 +3684,7 @@ export interface PayoutTransformationPercentArgs { export const PayoutType = { Paypal: 'PAYPAL', Tango: 'TANGO', + Tremendous: 'TREMENDOUS', Dwolla: 'DWOLLA', Ach: 'ACH', Wire: 'WIRE', @@ -4186,7 +4169,7 @@ export interface ProfilingInfoResponse { * @type {string} * @memberof ProfilingInfoResponse */ - 'status': ProfilingInfoResponseStatusEnum; + 'status'?: ProfilingInfoResponseStatusEnum; /** * * @type {string} @@ -4393,28 +4376,6 @@ export const RaffleUserViewEntryTypeEnum = { export type RaffleUserViewEntryTypeEnum = typeof RaffleUserViewEntryTypeEnum[keyof typeof RaffleUserViewEntryTypeEnum]; /** - * Supported Currencies for Foreign Redemptions - * @export - * @enum {string} - */ - -export const RedemptionCurrency = { - Usd: 'USD', - Cad: 'CAD', - Gbp: 'GBP', - Eur: 'EUR', - Inr: 'INR', - Aud: 'AUD', - Pln: 'PLN', - Sek: 'SEK', - Sgd: 'SGD', - Mxn: 'MXN' -} as const; - -export type RedemptionCurrency = typeof RedemptionCurrency[keyof typeof RedemptionCurrency]; - - -/** * * @export * @interface ReportNotes @@ -5692,7 +5653,7 @@ export interface StatusResponse { * @type {string} * @memberof StatusResponse */ - 'status': StatusResponseStatusEnum; + 'status'?: StatusResponseStatusEnum; /** * * @type {string} @@ -6069,6 +6030,99 @@ export type TangoCashoutMethodDataValueTypeEnum = typeof TangoCashoutMethodDataV /** * * @export + * @interface TaskAdjustmentEvent + */ +export interface TaskAdjustmentEvent { + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'mid': string; + /** + * + * @type {Source} + * @memberof TaskAdjustmentEvent + */ + 'source': Source; + /** + * + * @type {WallAdjustedStatus} + * @memberof TaskAdjustmentEvent + */ + 'status': WallAdjustedStatus; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'alert_time'?: string; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'quality_event_type'?: TaskAdjustmentEventQualityEventTypeEnum; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'survey_id'?: string | null; + /** + * + * @type {Amount1} + * @memberof TaskAdjustmentEvent + */ + 'amount'?: Amount1 | null; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'event_time'?: string | null; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'product_id'?: string | null; + /** + * + * @type {string} + * @memberof TaskAdjustmentEvent + */ + 'bpuid'?: string | null; + /** + * + * @type {number} + * @memberof TaskAdjustmentEvent + */ + 'user_id'?: number | null; +} + +export const TaskAdjustmentEventQualityEventTypeEnum = { + TaskAdjustment: 'task_adjustment' +} as const; + +export type TaskAdjustmentEventQualityEventTypeEnum = typeof TaskAdjustmentEventQualityEventTypeEnum[keyof typeof TaskAdjustmentEventQualityEventTypeEnum]; + +/** + * + * @export + * @interface TaskAdjustmentEventBody + */ +export interface TaskAdjustmentEventBody { + /** + * + * @type {Array<TaskAdjustmentEvent>} + * @memberof TaskAdjustmentEventBody + */ + 'events': Array<TaskAdjustmentEvent>; +} +/** + * + * @export * @interface TaskEnterPayload */ export interface TaskEnterPayload { @@ -7243,7 +7297,7 @@ export interface UpkQuestionResponse { * @type {string} * @memberof UpkQuestionResponse */ - 'status': UpkQuestionResponseStatusEnum; + 'status'?: UpkQuestionResponseStatusEnum; /** * * @type {string} @@ -7572,7 +7626,7 @@ export interface UserInfoResponse { * @type {string} * @memberof UserInfoResponse */ - 'status': UserInfoResponseStatusEnum; + 'status'?: UserInfoResponseStatusEnum; /** * * @type {string} @@ -7597,6 +7651,68 @@ export type UserInfoResponseStatusEnum = typeof UserInfoResponseStatusEnum[keyof /** * * @export + * @interface UserLedgerTransactionAttemptCredit + */ +export interface UserLedgerTransactionAttemptCredit { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'created': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'description'?: string; + /** + * The net amount affecting the user\'s wallet, in USDCents. Positive means the user\'s balance increased; negative means it decreased. + * @type {number} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'tx_type'?: UserLedgerTransactionAttemptCreditTxTypeEnum; + /** + * + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'tsid': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionAttemptCredit + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionAttemptCreditTxTypeEnum = { + UserAttemptCredit: 'user_attempt_credit' +} as const; + +export type UserLedgerTransactionAttemptCreditTxTypeEnum = typeof UserLedgerTransactionAttemptCreditTxTypeEnum[keyof typeof UserLedgerTransactionAttemptCreditTxTypeEnum]; + +/** + * + * @export * @interface UserLedgerTransactionTaskAdjustment */ export interface UserLedgerTransactionTaskAdjustment { @@ -7778,6 +7894,12 @@ export interface UserLedgerTransactionTypesSummary { * @type {UserLedgerTransactionTypeSummary} * @memberof UserLedgerTransactionTypesSummary */ + 'user_attempt_credit'?: UserLedgerTransactionTypeSummary; + /** + * + * @type {UserLedgerTransactionTypeSummary} + * @memberof UserLedgerTransactionTypesSummary + */ 'user_payout_request'?: UserLedgerTransactionTypeSummary; } /** @@ -7901,6 +8023,68 @@ export type UserLedgerTransactionUserPayoutTxTypeEnum = typeof UserLedgerTransac /** * * @export + * @interface UserLedgerTransactionUserPayoutCancel + */ +export interface UserLedgerTransactionUserPayoutCancel { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'created': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'description'?: string; + /** + * The net amount affecting the user\'s wallet, in USDCents. Positive means the user\'s balance increased; negative means it decreased. + * @type {number} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'tx_type'?: UserLedgerTransactionUserPayoutCancelTxTypeEnum; + /** + * A unique identifier for the payout + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'payout_id': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayoutCancel + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionUserPayoutCancelTxTypeEnum = { + UserPayoutCancel: 'user_payout_cancel' +} as const; + +export type UserLedgerTransactionUserPayoutCancelTxTypeEnum = typeof UserLedgerTransactionUserPayoutCancelTxTypeEnum[keyof typeof UserLedgerTransactionUserPayoutCancelTxTypeEnum]; + +/** + * + * @export * @interface UserLedgerTransactionsResponse */ export interface UserLedgerTransactionsResponse { @@ -7939,7 +8123,7 @@ export interface UserLedgerTransactionsResponse { * @type {string} * @memberof UserLedgerTransactionsResponse */ - 'status': UserLedgerTransactionsResponseStatusEnum; + 'status'?: UserLedgerTransactionsResponseStatusEnum; /** * * @type {string} @@ -7965,7 +8149,7 @@ export type UserLedgerTransactionsResponseStatusEnum = typeof UserLedgerTransact * @type UserLedgerTransactionsResponseTransactionsInner * @export */ -export type UserLedgerTransactionsResponseTransactionsInner = { tx_type: 'bp_adjustment' } & UserLedgerTransactionTaskAdjustment | { tx_type: 'bp_payment' } & UserLedgerTransactionTaskComplete | { tx_type: 'user_bonus' } & UserLedgerTransactionUserBonus | { tx_type: 'user_payout_request' } & UserLedgerTransactionUserPayout; +export type UserLedgerTransactionsResponseTransactionsInner = { tx_type: 'bp_adjustment' } & UserLedgerTransactionTaskAdjustment | { tx_type: 'bp_payment' } & UserLedgerTransactionTaskComplete | { tx_type: 'user_attempt_credit' } & UserLedgerTransactionAttemptCredit | { tx_type: 'user_bonus' } & UserLedgerTransactionUserBonus | { tx_type: 'user_payout_cancel' } & UserLedgerTransactionUserPayoutCancel | { tx_type: 'user_payout_request' } & UserLedgerTransactionUserPayout; /** * A user-owned ledger account exposed by the wallets endpoint. @@ -8056,93 +8240,6 @@ export interface UserLedgerWallets { 'displayed_balances'?: Array<UserDisplayedWalletBalance>; } /** - * A user has requested to be paid from their wallet balance. - * @export - * @interface UserPayoutEvent - */ -export interface UserPayoutEvent { - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'uuid'?: string; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'debit_account_uuid': string | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'cashout_method_uuid': string | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'created'?: string; - /** - * The USDCent amount int. This cannot be 0 or negative - * @type {number} - * @memberof UserPayoutEvent - */ - 'amount': number; - /** - * - * @type {PayoutStatus} - * @memberof UserPayoutEvent - */ - 'status'?: PayoutStatus | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'ext_ref_id'?: string | null; - /** - * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT - * @type {PayoutType} - * @memberof UserPayoutEvent - */ - 'payout_type': PayoutType; - /** - * - * @type {object} - * @memberof UserPayoutEvent - */ - 'request_data'?: object | null; - /** - * - * @type {OrderData1} - * @memberof UserPayoutEvent - */ - 'order_data'?: OrderData1 | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'account_reference_type'?: string | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'account_reference_uuid'?: string | null; - /** - * - * @type {string} - * @memberof UserPayoutEvent - */ - 'description'?: string | null; -} - - -/** * * @export * @interface UserProfile @@ -8183,6 +8280,12 @@ export interface UserProfile { * @type {string} * @memberof UserProfile */ + 'canonical_email': string | null; + /** + * + * @type {string} + * @memberof UserProfile + */ 'email_md5': string | null; /** * @@ -8276,7 +8379,7 @@ export interface UserProfileResponse { * @type {string} * @memberof UserProfileResponse */ - 'status': UserProfileResponseStatusEnum; + 'status'?: UserProfileResponseStatusEnum; /** * * @type {string} @@ -8322,7 +8425,7 @@ export interface UserProfilesResponse { * @type {string} * @memberof UserProfilesResponse */ - 'status': UserProfilesResponseStatusEnum; + 'status'?: UserProfilesResponseStatusEnum; /** * * @type {string} @@ -8486,7 +8589,7 @@ export interface UserWalletBalanceResponse { * @type {string} * @memberof UserWalletBalanceResponse */ - 'status': UserWalletBalanceResponseStatusEnum; + 'status'?: UserWalletBalanceResponseStatusEnum; /** * * @type {string} @@ -12861,15 +12964,45 @@ export const THLApiAxiosParamCreator = function (configuration?: Configuration) return { /** * - * @summary Manage Cashout - * @param {ManageCashoutBody} manageCashoutBody + * @summary Paypal Webhook * @param {*} [options] Override http request option. * @throws {RequiredError} */ - manageCashoutThlManageCashoutPost: async (manageCashoutBody: ManageCashoutBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { - // verify required parameter 'manageCashoutBody' is not null or undefined - assertParamExists('manageCashoutThlManageCashoutPost', 'manageCashoutBody', manageCashoutBody) - const localVarPath = `/thl/manage_cashout/`; + paypalWebhookThlPaypalWebhookPost: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/thl/paypal_webhook/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Handle user access control adjustment requests. This is to add/remove users from white/black lists (for manual blocking/unblocking). Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Access Control Request + * @param {AccessControlEventBody} accessControlEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post: async (accessControlEventBody: AccessControlEventBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'accessControlEventBody' is not null or undefined + assertParamExists('submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post', 'accessControlEventBody', accessControlEventBody) + const localVarPath = `/thl/9bf111afe03e40719c5cd0de0dc43c31/`; // use dummy base URL string because the URL constructor only accepts absolute URLs. const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); let baseOptions; @@ -12888,7 +13021,43 @@ export const THLApiAxiosParamCreator = function (configuration?: Configuration) setSearchParams(localVarUrlObj, localVarQueryParameter); let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; - localVarRequestOptions.data = serializeDataIfNeeded(manageCashoutBody, localVarRequestOptions, configuration) + localVarRequestOptions.data = serializeDataIfNeeded(accessControlEventBody, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Handle Wall status adjustment requests. Typically, this is a complete -> failure recon or the reverse. Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Task Adjustment + * @param {TaskAdjustmentEventBody} taskAdjustmentEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post: async (taskAdjustmentEventBody: TaskAdjustmentEventBody, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'taskAdjustmentEventBody' is not null or undefined + assertParamExists('submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post', 'taskAdjustmentEventBody', taskAdjustmentEventBody) + const localVarPath = `/thl/f4484dbdf144451ab60cda256ce14266/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(taskAdjustmentEventBody, localVarRequestOptions, configuration) return { url: toPathString(localVarUrlObj), @@ -12907,15 +13076,40 @@ export const THLApiFp = function(configuration?: Configuration) { return { /** * - * @summary Manage Cashout - * @param {ManageCashoutBody} manageCashoutBody + * @summary Paypal Webhook * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async manageCashoutThlManageCashoutPost(manageCashoutBody: ManageCashoutBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<UserPayoutEvent>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.manageCashoutThlManageCashoutPost(manageCashoutBody, options); + async paypalWebhookThlPaypalWebhookPost(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.paypalWebhookThlPaypalWebhookPost(options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; - const localVarOperationServerBasePath = operationServerMap['THLApi.manageCashoutThlManageCashoutPost']?.[localVarOperationServerIndex]?.url; + const localVarOperationServerBasePath = operationServerMap['THLApi.paypalWebhookThlPaypalWebhookPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Handle user access control adjustment requests. This is to add/remove users from white/black lists (for manual blocking/unblocking). Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Access Control Request + * @param {AccessControlEventBody} accessControlEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody: AccessControlEventBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StatusResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['THLApi.submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Handle Wall status adjustment requests. Typically, this is a complete -> failure recon or the reverse. Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Task Adjustment + * @param {TaskAdjustmentEventBody} taskAdjustmentEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody: TaskAdjustmentEventBody, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StatusResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['THLApi.submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, } @@ -12930,13 +13124,32 @@ export const THLApiFactory = function (configuration?: Configuration, basePath?: return { /** * - * @summary Manage Cashout - * @param {ManageCashoutBody} manageCashoutBody + * @summary Paypal Webhook * @param {*} [options] Override http request option. * @throws {RequiredError} */ - manageCashoutThlManageCashoutPost(manageCashoutBody: ManageCashoutBody, options?: RawAxiosRequestConfig): AxiosPromise<UserPayoutEvent> { - return localVarFp.manageCashoutThlManageCashoutPost(manageCashoutBody, options).then((request) => request(axios, basePath)); + paypalWebhookThlPaypalWebhookPost(options?: RawAxiosRequestConfig): AxiosPromise<any> { + return localVarFp.paypalWebhookThlPaypalWebhookPost(options).then((request) => request(axios, basePath)); + }, + /** + * Handle user access control adjustment requests. This is to add/remove users from white/black lists (for manual blocking/unblocking). Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Access Control Request + * @param {AccessControlEventBody} accessControlEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody: AccessControlEventBody, options?: RawAxiosRequestConfig): AxiosPromise<StatusResponse> { + return localVarFp.submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody, options).then((request) => request(axios, basePath)); + }, + /** + * Handle Wall status adjustment requests. Typically, this is a complete -> failure recon or the reverse. Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Task Adjustment + * @param {TaskAdjustmentEventBody} taskAdjustmentEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody: TaskAdjustmentEventBody, options?: RawAxiosRequestConfig): AxiosPromise<StatusResponse> { + return localVarFp.submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody, options).then((request) => request(axios, basePath)); }, }; }; @@ -12950,14 +13163,37 @@ export const THLApiFactory = function (configuration?: Configuration, basePath?: export class THLApi extends BaseAPI { /** * - * @summary Manage Cashout - * @param {ManageCashoutBody} manageCashoutBody + * @summary Paypal Webhook + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof THLApi + */ + public paypalWebhookThlPaypalWebhookPost(options?: RawAxiosRequestConfig) { + return THLApiFp(this.configuration).paypalWebhookThlPaypalWebhookPost(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Handle user access control adjustment requests. This is to add/remove users from white/black lists (for manual blocking/unblocking). Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Access Control Request + * @param {AccessControlEventBody} accessControlEventBody + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof THLApi + */ + public submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody: AccessControlEventBody, options?: RawAxiosRequestConfig) { + return THLApiFp(this.configuration).submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Handle Wall status adjustment requests. Typically, this is a complete -> failure recon or the reverse. Internally, this hits the UserQualityHistory grpc call. + * @summary Submit Task Adjustment + * @param {TaskAdjustmentEventBody} taskAdjustmentEventBody * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof THLApi */ - public manageCashoutThlManageCashoutPost(manageCashoutBody: ManageCashoutBody, options?: RawAxiosRequestConfig) { - return THLApiFp(this.configuration).manageCashoutThlManageCashoutPost(manageCashoutBody, options).then((request) => request(this.axios, this.basePath)); + public submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody: TaskAdjustmentEventBody, options?: RawAxiosRequestConfig) { + return THLApiFp(this.configuration).submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody, options).then((request) => request(this.axios, this.basePath)); } } @@ -13010,7 +13246,7 @@ export const WalletApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** - * A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating paypal or Cash in Mail cashout methods are supported + * A user can only have 1 unique Cashout Method of any type at a time (e.g. they can\'t create multiple PayPal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating PayPal or Cash in Mail cashout methods is supported * @summary Create Cashout Method * @param {string} productId The Brokerage Product ID provided by GRL. * @param {Body} body @@ -13095,6 +13331,72 @@ export const WalletApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** + * + * @summary Filter User Cashouts + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {Array<PayoutStatus> | null} [status] Filter by one or more payout statuses + * @param {Array<PayoutType> | null} [payoutType] Filter by one or more payout types + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + filterUserCashoutsProductIdCashoutGet: async (productId: string, bpuid: string, status?: Array<PayoutStatus> | null, payoutType?: Array<PayoutType> | null, orderBy?: string, page?: number, size?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('filterUserCashoutsProductIdCashoutGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('filterUserCashoutsProductIdCashoutGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/cashout/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (status) { + localVarQueryParameter['status'] = status; + } + + if (payoutType) { + localVarQueryParameter['payout_type'] = payoutType; + } + + if (orderBy !== undefined) { + localVarQueryParameter['order_by'] = orderBy; + } + + if (page !== undefined) { + localVarQueryParameter['page'] = page; + } + + if (size !== undefined) { + localVarQueryParameter['size'] = size; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** * Get an Attempt Credit by a user\'s Session. * @summary Get Attempt Credit * @param {string} productId The Brokerage Product ID provided by GRL. @@ -13171,14 +13473,53 @@ export const WalletApiAxiosParamCreator = function (configuration?: Configuratio }; }, /** + * Retrieve a cashout method + * @summary Get Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet: async (productId: string, cashoutMethodId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet', 'productId', productId) + // verify required parameter 'cashoutMethodId' is not null or undefined + assertParamExists('getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet', 'cashoutMethodId', cashoutMethodId) + const localVarPath = `/{product_id}/cashout_methods/{cashout_method_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"cashout_method_id"}}`, encodeURIComponent(String(cashoutMethodId))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** * Retrieve the current available mechanisms that a user can use to retrieve funds. * @summary Get Cashout Methods * @param {string} productId The Brokerage Product ID provided by GRL. * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {string | null} [ip] The end user\'s public IPv4 or IPv6 address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getCashoutMethodsProductIdCashoutMethodsGet: async (productId: string, bpuid: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + getCashoutMethodsProductIdCashoutMethodsGet: async (productId: string, bpuid: string, ip?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { // verify required parameter 'productId' is not null or undefined assertParamExists('getCashoutMethodsProductIdCashoutMethodsGet', 'productId', productId) // verify required parameter 'bpuid' is not null or undefined @@ -13200,6 +13541,10 @@ export const WalletApiAxiosParamCreator = function (configuration?: Configuratio localVarQueryParameter['bpuid'] = bpuid; } + if (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + setSearchParams(localVarUrlObj, localVarQueryParameter); @@ -13473,7 +13818,7 @@ export const WalletApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** - * A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating paypal or Cash in Mail cashout methods are supported + * A user can only have 1 unique Cashout Method of any type at a time (e.g. they can\'t create multiple PayPal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating PayPal or Cash in Mail cashout methods is supported * @summary Create Cashout Method * @param {string} productId The Brokerage Product ID provided by GRL. * @param {Body} body @@ -13502,6 +13847,25 @@ export const WalletApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** + * + * @summary Filter User Cashouts + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {Array<PayoutStatus> | null} [status] Filter by one or more payout statuses + * @param {Array<PayoutType> | null} [payoutType] Filter by one or more payout types + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async filterUserCashoutsProductIdCashoutGet(productId: string, bpuid: string, status?: Array<PayoutStatus> | null, payoutType?: Array<PayoutType> | null, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutRequestsResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.filterUserCashoutsProductIdCashoutGet(productId, bpuid, status, payoutType, orderBy, page, size, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.filterUserCashoutsProductIdCashoutGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** * Get an Attempt Credit by a user\'s Session. * @summary Get Attempt Credit * @param {string} productId The Brokerage Product ID provided by GRL. @@ -13530,15 +13894,30 @@ export const WalletApiFp = function(configuration?: Configuration) { return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }, /** + * Retrieve a cashout method + * @summary Get Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId: string, cashoutMethodId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutMethodResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId, cashoutMethodId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** * Retrieve the current available mechanisms that a user can use to retrieve funds. * @summary Get Cashout Methods * @param {string} productId The Brokerage Product ID provided by GRL. * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {string | null} [ip] The end user\'s public IPv4 or IPv6 address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - async getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutMethodsResponse>> { - const localVarAxiosArgs = await localVarAxiosParamCreator.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, options); + async getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, ip?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutMethodsResponse>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, ip, options); const localVarOperationServerIndex = configuration?.serverIndex ?? 0; const localVarOperationServerBasePath = operationServerMap['WalletApi.getCashoutMethodsProductIdCashoutMethodsGet']?.[localVarOperationServerIndex]?.url; return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); @@ -13641,7 +14020,7 @@ export const WalletApiFactory = function (configuration?: Configuration, basePat return localVarFp.claimLatestAttemptCreditProductIdWalletAttemptCreditPost(productId, attemptCreditClaimBody, options).then((request) => request(axios, basePath)); }, /** - * A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating paypal or Cash in Mail cashout methods are supported + * A user can only have 1 unique Cashout Method of any type at a time (e.g. they can\'t create multiple PayPal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating PayPal or Cash in Mail cashout methods is supported * @summary Create Cashout Method * @param {string} productId The Brokerage Product ID provided by GRL. * @param {Body} body @@ -13664,6 +14043,22 @@ export const WalletApiFactory = function (configuration?: Configuration, basePat return localVarFp.deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options).then((request) => request(axios, basePath)); }, /** + * + * @summary Filter User Cashouts + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {Array<PayoutStatus> | null} [status] Filter by one or more payout statuses + * @param {Array<PayoutType> | null} [payoutType] Filter by one or more payout types + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + filterUserCashoutsProductIdCashoutGet(productId: string, bpuid: string, status?: Array<PayoutStatus> | null, payoutType?: Array<PayoutType> | null, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): AxiosPromise<CashoutRequestsResponse> { + return localVarFp.filterUserCashoutsProductIdCashoutGet(productId, bpuid, status, payoutType, orderBy, page, size, options).then((request) => request(axios, basePath)); + }, + /** * Get an Attempt Credit by a user\'s Session. * @summary Get Attempt Credit * @param {string} productId The Brokerage Product ID provided by GRL. @@ -13686,15 +14081,27 @@ export const WalletApiFactory = function (configuration?: Configuration, basePat return localVarFp.getCashoutDetailProductIdCashoutCashoutIdGet(productId, cashoutId, options).then((request) => request(axios, basePath)); }, /** + * Retrieve a cashout method + * @summary Get Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId: string, cashoutMethodId: string, options?: RawAxiosRequestConfig): AxiosPromise<CashoutMethodResponse> { + return localVarFp.getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId, cashoutMethodId, options).then((request) => request(axios, basePath)); + }, + /** * Retrieve the current available mechanisms that a user can use to retrieve funds. * @summary Get Cashout Methods * @param {string} productId The Brokerage Product ID provided by GRL. * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {string | null} [ip] The end user\'s public IPv4 or IPv6 address. * @param {*} [options] Override http request option. * @throws {RequiredError} */ - getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): AxiosPromise<CashoutMethodsResponse> { - return localVarFp.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, options).then((request) => request(axios, basePath)); + getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, ip?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<CashoutMethodsResponse> { + return localVarFp.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, ip, options).then((request) => request(axios, basePath)); }, /** * Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this cashout_method, for amount (in USD cents). @@ -13781,7 +14188,7 @@ export class WalletApi extends BaseAPI { } /** - * A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating paypal or Cash in Mail cashout methods are supported + * A user can only have 1 unique Cashout Method of any type at a time (e.g. they can\'t create multiple PayPal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating PayPal or Cash in Mail cashout methods is supported * @summary Create Cashout Method * @param {string} productId The Brokerage Product ID provided by GRL. * @param {Body} body @@ -13808,6 +14215,24 @@ export class WalletApi extends BaseAPI { } /** + * + * @summary Filter User Cashouts + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {Array<PayoutStatus> | null} [status] Filter by one or more payout statuses + * @param {Array<PayoutType> | null} [payoutType] Filter by one or more payout types + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public filterUserCashoutsProductIdCashoutGet(productId: string, bpuid: string, status?: Array<PayoutStatus> | null, payoutType?: Array<PayoutType> | null, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).filterUserCashoutsProductIdCashoutGet(productId, bpuid, status, payoutType, orderBy, page, size, options).then((request) => request(this.axios, this.basePath)); + } + + /** * Get an Attempt Credit by a user\'s Session. * @summary Get Attempt Credit * @param {string} productId The Brokerage Product ID provided by GRL. @@ -13834,16 +14259,30 @@ export class WalletApi extends BaseAPI { } /** + * Retrieve a cashout method + * @summary Get Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId: string, cashoutMethodId: string, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet(productId, cashoutMethodId, options).then((request) => request(this.axios, this.basePath)); + } + + /** * Retrieve the current available mechanisms that a user can use to retrieve funds. * @summary Get Cashout Methods * @param {string} productId The Brokerage Product ID provided by GRL. * @param {string} bpuid A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. + * @param {string | null} [ip] The end user\'s public IPv4 or IPv6 address. * @param {*} [options] Override http request option. * @throws {RequiredError} * @memberof WalletApi */ - public getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig) { - return WalletApiFp(this.configuration).getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, options).then((request) => request(this.axios, this.basePath)); + public getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, ip?: string | null, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, ip, options).then((request) => request(this.axios, this.basePath)); } /** diff --git a/jb-ui/src/api_fsb/docs/AccessControlEvent.md b/jb-ui/src/api_fsb/docs/AccessControlEvent.md new file mode 100644 index 0000000..b977345 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/AccessControlEvent.md @@ -0,0 +1,26 @@ +# AccessControlEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**quality_event_type** | **string** | | [default to undefined] +**product_id** | **string** | | [optional] [default to undefined] +**bpuid** | **string** | | [optional] [default to undefined] +**user_id** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { AccessControlEvent } from './api'; + +const instance: AccessControlEvent = { + quality_event_type, + product_id, + bpuid, + user_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/AccessControlEventBody.md b/jb-ui/src/api_fsb/docs/AccessControlEventBody.md new file mode 100644 index 0000000..f8b6f88 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/AccessControlEventBody.md @@ -0,0 +1,20 @@ +# AccessControlEventBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**Array<AccessControlEvent>**](AccessControlEvent.md) | | [default to undefined] + +## Example + +```typescript +import { AccessControlEventBody } from './api'; + +const instance: AccessControlEventBody = { + events, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/Amount1.md b/jb-ui/src/api_fsb/docs/Amount1.md new file mode 100644 index 0000000..54d2e98 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/Amount1.md @@ -0,0 +1,19 @@ +# Amount1 + +If negative, the status should adjusted to incomplete + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```typescript +import { Amount1 } from './api'; + +const instance: Amount1 = { +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/BrokerageProductPayoutEvent.md b/jb-ui/src/api_fsb/docs/BrokerageProductPayoutEvent.md index 794932f..39a28a4 100644 --- a/jb-ui/src/api_fsb/docs/BrokerageProductPayoutEvent.md +++ b/jb-ui/src/api_fsb/docs/BrokerageProductPayoutEvent.md @@ -13,11 +13,11 @@ Name | Type | Description | Notes **amount** | **number** | The USDCent amount int. This cannot be 0 or negative | [default to undefined] **status** | [**PayoutStatus**](PayoutStatus.md) | | [optional] [default to undefined] **ext_ref_id** | **string** | | [optional] [default to undefined] -**payout_type** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [default to undefined] +**payout_type** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [default to undefined] **request_data** | **object** | | [optional] [default to undefined] **order_data** | [**OrderData**](OrderData.md) | | [optional] [default to undefined] **product_id** | **string** | The Brokerage Product that was paid out | [default to undefined] -**method** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [readonly] [default to undefined] +**method** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [readonly] [default to undefined] **amount_usd** | **number** | | [readonly] [default to undefined] **amount_usd_str** | **string** | | [readonly] [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/CashoutMethodForeignValue.md b/jb-ui/src/api_fsb/docs/CashoutMethodForeignValue.md index e9e4ae4..91159b6 100644 --- a/jb-ui/src/api_fsb/docs/CashoutMethodForeignValue.md +++ b/jb-ui/src/api_fsb/docs/CashoutMethodForeignValue.md @@ -7,7 +7,7 @@ Shows the expected value of a redemption in a foreign currency. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **number** | Value of the redemption in the currency\'s smallest unit. | [default to undefined] -**currency** | [**RedemptionCurrency**](RedemptionCurrency.md) | Supported Currencies for Foreign Redemptions Allowed values: - __USD__ *(USD)*: US Dollars. Smallest Unit: Cents. - __CAD__ *(CAD)*: Canadian Dollars. Smallest Unit: Cents. - __GBP__ *(GBP)*: British Pounds. Smallest Unit: Pence. - __EUR__ *(EUR)*: Euros. Smallest Unit: Cents. - __INR__ *(INR)*: Indian Rupees. Smallest Unit: Paise. - __AUD__ *(AUD)*: Australian Dollars. Smallest Unit: Cents. - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz. - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre. - __SGD__ *(SGD)*: Singapore Dollars. Smallest Unit: Cents. - __MXN__ *(MXN)*: Mexican Pesos. Smallest Unit: Centavos. | [default to undefined] +**currency** | [**Currency**](Currency.md) | Allowed values: - __USD__ *(USD)*: United States Dollar. Smallest Unit: Cents. - __CAD__ *(CAD)*: Canadian Dollar. Smallest Unit: Cents. - __GBP__ *(GBP)*: British Pound. Smallest Unit: Pence. - __EUR__ *(EUR)*: Euro. Smallest Unit: Cents. - __INR__ *(INR)*: Indian Rupee. Smallest Unit: Paise. - __AUD__ *(AUD)*: Australian Dollar. Smallest Unit: Cents. - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz. - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre. - __SGD__ *(SGD)*: Singapore Dollar. Smallest Unit: Cents. - __MXN__ *(MXN)*: Mexican Peso. Smallest Unit: Centavos. | [default to undefined] **value_string** | **string** | A string representation of the value in the currency. | [default to undefined] ## Example diff --git a/jb-ui/src/api_fsb/docs/CashoutMethodForeignValueResponse.md b/jb-ui/src/api_fsb/docs/CashoutMethodForeignValueResponse.md index 5d7345b..45d9d5c 100644 --- a/jb-ui/src/api_fsb/docs/CashoutMethodForeignValueResponse.md +++ b/jb-ui/src/api_fsb/docs/CashoutMethodForeignValueResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **cashout_method_value** | [**CashoutMethodForeignValue**](CashoutMethodForeignValue.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/CashoutMethodOut.md b/jb-ui/src/api_fsb/docs/CashoutMethodOut.md index b8c4b94..90ff61f 100644 --- a/jb-ui/src/api_fsb/docs/CashoutMethodOut.md +++ b/jb-ui/src/api_fsb/docs/CashoutMethodOut.md @@ -14,13 +14,14 @@ Name | Type | Description | Notes **max_value** | **number** | (In lowest unit of the original_currency), The maximum amount that can be cashed out in one transaction. | [default to undefined] **min_value** | **number** | (In lowest unit of the original_currency), The minimum amount that can be cashed out in one transaction. | [default to undefined] **name** | **string** | A descriptive name for the cashout method. | [default to undefined] -**type** | [**PayoutType**](PayoutType.md) | The method in which the requested payout is delivered. Allowed values: - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card - __DWOLLA__ *(DWOLLA)*: DWOLLA - __ACH__ *(ACH)*: A payment is made to a bank account using ACH - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user. - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT | [default to undefined] +**type** | [**PayoutType**](PayoutType.md) | The method in which the requested payout is delivered. Allowed values: - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card - __TREMENDOUS__ *(TREMENDOUS)*: Tremendous Gift Card - __DWOLLA__ *(DWOLLA)*: DWOLLA - __ACH__ *(ACH)*: A payment is made to a bank account using ACH - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user. - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT | [default to undefined] **ext_id** | **string** | | [optional] [default to undefined] **usd_exchange_rate** | **number** | | [optional] [default to undefined] **max_value_usd** | **number** | | [optional] [default to undefined] **min_value_usd** | **number** | | [optional] [default to undefined] **product_id** | **string** | | [optional] [default to undefined] **product_user_id** | **string** | | [optional] [default to undefined] +**category** | [**PayoutCategory**](PayoutCategory.md) | | [readonly] [default to undefined] ## Example @@ -44,6 +45,7 @@ const instance: CashoutMethodOut = { min_value_usd, product_id, product_user_id, + category, }; ``` diff --git a/jb-ui/src/api_fsb/docs/CashoutMethodResponse.md b/jb-ui/src/api_fsb/docs/CashoutMethodResponse.md index 4775d15..3be22af 100644 --- a/jb-ui/src/api_fsb/docs/CashoutMethodResponse.md +++ b/jb-ui/src/api_fsb/docs/CashoutMethodResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **cashout_method** | [**CashoutMethodOut**](CashoutMethodOut.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/CashoutMethodsResponse.md b/jb-ui/src/api_fsb/docs/CashoutMethodsResponse.md index b90d887..b0ac04b 100644 --- a/jb-ui/src/api_fsb/docs/CashoutMethodsResponse.md +++ b/jb-ui/src/api_fsb/docs/CashoutMethodsResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **cashout_methods** | [**Array<CashoutMethodOut>**](CashoutMethodOut.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/CashoutRequestDetail.md b/jb-ui/src/api_fsb/docs/CashoutRequestDetail.md new file mode 100644 index 0000000..27dd7ea --- /dev/null +++ b/jb-ui/src/api_fsb/docs/CashoutRequestDetail.md @@ -0,0 +1,38 @@ +# CashoutRequestDetail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID for this cashout | [default to undefined] +**description** | **string** | This is the name of the cashout method. | [default to undefined] +**status** | [**PayoutStatus**](PayoutStatus.md) | | [optional] [default to undefined] +**product_id** | **string** | | [default to undefined] +**product_user_id** | **string** | | [default to undefined] +**payout_type** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [default to undefined] +**amount** | **number** | The amount in USD Cents | [default to undefined] +**created** | **string** | | [default to undefined] +**transaction_info** | **object** | | [optional] [default to undefined] +**category** | [**PayoutCategory**](PayoutCategory.md) | | [readonly] [default to undefined] + +## Example + +```typescript +import { CashoutRequestDetail } from './api'; + +const instance: CashoutRequestDetail = { + id, + description, + status, + product_id, + product_user_id, + payout_type, + amount, + created, + transaction_info, + category, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/CashoutRequestResponse.md b/jb-ui/src/api_fsb/docs/CashoutRequestResponse.md index a91d277..c04aa89 100644 --- a/jb-ui/src/api_fsb/docs/CashoutRequestResponse.md +++ b/jb-ui/src/api_fsb/docs/CashoutRequestResponse.md @@ -5,9 +5,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] -**cashout** | [**CashoutRequestInfo**](CashoutRequestInfo.md) | | [default to undefined] +**cashout** | [**CashoutRequestDetail**](CashoutRequestDetail.md) | | [default to undefined] ## Example diff --git a/jb-ui/src/api_fsb/docs/CashoutRequestSummary.md b/jb-ui/src/api_fsb/docs/CashoutRequestSummary.md new file mode 100644 index 0000000..f4c60e7 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/CashoutRequestSummary.md @@ -0,0 +1,37 @@ +# CashoutRequestSummary + +See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID for this cashout | [default to undefined] +**description** | **string** | This is the name of the cashout method. | [default to undefined] +**status** | [**PayoutStatus**](PayoutStatus.md) | | [optional] [default to undefined] +**product_id** | **string** | | [default to undefined] +**product_user_id** | **string** | | [default to undefined] +**payout_type** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [default to undefined] +**amount** | **number** | The amount in USD Cents | [default to undefined] +**created** | **string** | | [default to undefined] +**category** | [**PayoutCategory**](PayoutCategory.md) | | [readonly] [default to undefined] + +## Example + +```typescript +import { CashoutRequestSummary } from './api'; + +const instance: CashoutRequestSummary = { + id, + description, + status, + product_id, + product_user_id, + payout_type, + amount, + created, + category, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/CashoutRequestsResponse.md b/jb-ui/src/api_fsb/docs/CashoutRequestsResponse.md new file mode 100644 index 0000000..a6fa5b2 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/CashoutRequestsResponse.md @@ -0,0 +1,32 @@ +# CashoutRequestsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **number** | Page number | [optional] [default to 1] +**size** | **number** | Page size | [optional] [default to 50] +**total** | **number** | | [optional] [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] +**msg** | **string** | | [optional] [default to undefined] +**cashouts** | [**Array<CashoutRequestSummary>**](CashoutRequestSummary.md) | | [default to undefined] +**pages** | **number** | | [default to undefined] + +## Example + +```typescript +import { CashoutRequestsResponse } from './api'; + +const instance: CashoutRequestsResponse = { + page, + size, + total, + status, + msg, + cashouts, + pages, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/GeoIPInformation.md b/jb-ui/src/api_fsb/docs/GeoIPInformation.md index 2066626..ee2b6ff 100644 --- a/jb-ui/src/api_fsb/docs/GeoIPInformation.md +++ b/jb-ui/src/api_fsb/docs/GeoIPInformation.md @@ -1,46 +1,20 @@ # GeoIPInformation +Fields we\'ll always pull from GRIP\'s mmdb files at minimum ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**geoname_id** | **number** | | [optional] [default to undefined] -**continent_code** | **string** | | [optional] [default to undefined] -**continent_name** | **string** | | [optional] [default to undefined] -**country_iso** | **string** | The ISO code of the country associated with the IP address. | [default to undefined] +**ip** | **string** | | [default to undefined] +**country_iso** | **string** | | [default to undefined] **country_name** | **string** | | [optional] [default to undefined] **subdivision_1_iso** | **string** | | [optional] [default to undefined] **subdivision_1_name** | **string** | | [optional] [default to undefined] -**subdivision_2_iso** | **string** | | [optional] [default to undefined] -**subdivision_2_name** | **string** | | [optional] [default to undefined] -**city_name** | **string** | | [optional] [default to undefined] -**metro_code** | **number** | | [optional] [default to undefined] -**time_zone** | **string** | | [optional] [default to undefined] -**is_in_european_union** | **boolean** | | [optional] [default to undefined] -**updated** | **string** | | [optional] [default to undefined] -**ip** | **string** | | [default to undefined] -**registered_country_iso** | **string** | | [optional] [default to undefined] **is_anonymous** | **boolean** | | [optional] [default to undefined] -**is_anonymous_vpn** | **boolean** | | [optional] [default to undefined] -**is_hosting_provider** | **boolean** | | [optional] [default to undefined] -**is_public_proxy** | **boolean** | | [optional] [default to undefined] -**is_tor_exit_node** | **boolean** | | [optional] [default to undefined] -**is_residential_proxy** | **boolean** | | [optional] [default to undefined] **autonomous_system_number** | **number** | | [optional] [default to undefined] **autonomous_system_organization** | **string** | | [optional] [default to undefined] -**domain** | **string** | | [optional] [default to undefined] -**isp** | **string** | | [optional] [default to undefined] -**mobile_country_code** | **string** | | [optional] [default to undefined] -**mobile_network_code** | **string** | | [optional] [default to undefined] -**network** | **string** | | [optional] [default to undefined] -**organization** | **string** | | [optional] [default to undefined] -**static_ip_score** | **number** | | [optional] [default to undefined] -**user_type** | [**AccessType**](AccessType.md) | | [optional] [default to undefined] -**postal_code** | **string** | | [optional] [default to undefined] -**latitude** | **number** | | [optional] [default to undefined] -**longitude** | **number** | | [optional] [default to undefined] -**accuracy_radius** | **number** | | [optional] [default to undefined] +**access_type** | [**AccessType**](AccessType.md) | | [optional] [default to undefined] ## Example @@ -48,42 +22,15 @@ Name | Type | Description | Notes import { GeoIPInformation } from './api'; const instance: GeoIPInformation = { - geoname_id, - continent_code, - continent_name, + ip, country_iso, country_name, subdivision_1_iso, subdivision_1_name, - subdivision_2_iso, - subdivision_2_name, - city_name, - metro_code, - time_zone, - is_in_european_union, - updated, - ip, - registered_country_iso, is_anonymous, - is_anonymous_vpn, - is_hosting_provider, - is_public_proxy, - is_tor_exit_node, - is_residential_proxy, autonomous_system_number, autonomous_system_organization, - domain, - isp, - mobile_country_code, - mobile_network_code, - network, - organization, - static_ip_score, - user_type, - postal_code, - latitude, - longitude, - accuracy_radius, + access_type, }; ``` diff --git a/jb-ui/src/api_fsb/docs/LeaderboardResponse.md b/jb-ui/src/api_fsb/docs/LeaderboardResponse.md index 11d4559..fd066b6 100644 --- a/jb-ui/src/api_fsb/docs/LeaderboardResponse.md +++ b/jb-ui/src/api_fsb/docs/LeaderboardResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **leaderboard** | [**Leaderboard**](Leaderboard.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/LeaderboardWinnerResponse.md b/jb-ui/src/api_fsb/docs/LeaderboardWinnerResponse.md index 1b89707..4366f30 100644 --- a/jb-ui/src/api_fsb/docs/LeaderboardWinnerResponse.md +++ b/jb-ui/src/api_fsb/docs/LeaderboardWinnerResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **winners** | [**Array<LeaderboardWinner>**](LeaderboardWinner.md) | | [optional] [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/PayoutCategory.md b/jb-ui/src/api_fsb/docs/PayoutCategory.md new file mode 100644 index 0000000..3794e2a --- /dev/null +++ b/jb-ui/src/api_fsb/docs/PayoutCategory.md @@ -0,0 +1,16 @@ +# PayoutCategory + + +## Enum + +* `Cash` (value: `'CASH'`) + +* `GiftCard` (value: `'GIFT_CARD'`) + +* `Prize` (value: `'PRIZE'`) + +* `Crypto` (value: `'CRYPTO'`) + +* `PlatformCredit` (value: `'PLATFORM_CREDIT'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/PayoutType.md b/jb-ui/src/api_fsb/docs/PayoutType.md index a918be1..121e3cf 100644 --- a/jb-ui/src/api_fsb/docs/PayoutType.md +++ b/jb-ui/src/api_fsb/docs/PayoutType.md @@ -8,6 +8,8 @@ The method in which the requested payout is delivered. * `Tango` (value: `'TANGO'`) +* `Tremendous` (value: `'TREMENDOUS'`) + * `Dwolla` (value: `'DWOLLA'`) * `Ach` (value: `'ACH'`) diff --git a/jb-ui/src/api_fsb/docs/ProfilingInfoResponse.md b/jb-ui/src/api_fsb/docs/ProfilingInfoResponse.md index 598f68b..5302c43 100644 --- a/jb-ui/src/api_fsb/docs/ProfilingInfoResponse.md +++ b/jb-ui/src/api_fsb/docs/ProfilingInfoResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **profiling_info** | [**Array<UpkProperty>**](UpkProperty.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/StatusResponse.md b/jb-ui/src/api_fsb/docs/StatusResponse.md index 4a9dd73..82f15bd 100644 --- a/jb-ui/src/api_fsb/docs/StatusResponse.md +++ b/jb-ui/src/api_fsb/docs/StatusResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] ## Example diff --git a/jb-ui/src/api_fsb/docs/THLApi.md b/jb-ui/src/api_fsb/docs/THLApi.md index ed20c0a..40cceee 100644 --- a/jb-ui/src/api_fsb/docs/THLApi.md +++ b/jb-ui/src/api_fsb/docs/THLApi.md @@ -4,10 +4,12 @@ All URIs are relative to *https://fsb.generalresearch.com* |Method | HTTP request | Description| |------------- | ------------- | -------------| -|[**manageCashoutThlManageCashoutPost**](#managecashoutthlmanagecashoutpost) | **POST** /thl/manage_cashout/ | Manage Cashout| +|[**paypalWebhookThlPaypalWebhookPost**](#paypalwebhookthlpaypalwebhookpost) | **POST** /thl/paypal_webhook/ | Paypal Webhook| +|[**submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post**](#submitaccesscontrolrequestthl9bf111afe03e40719c5cd0de0dc43c31post) | **POST** /thl/9bf111afe03e40719c5cd0de0dc43c31/ | Submit Access Control Request| +|[**submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post**](#submittaskadjustmentthlf4484dbdf144451ab60cda256ce14266post) | **POST** /thl/f4484dbdf144451ab60cda256ce14266/ | Submit Task Adjustment| -# **manageCashoutThlManageCashoutPost** -> UserPayoutEvent manageCashoutThlManageCashoutPost(manageCashoutBody) +# **paypalWebhookThlPaypalWebhookPost** +> any paypalWebhookThlPaypalWebhookPost() ### Example @@ -15,17 +17,114 @@ All URIs are relative to *https://fsb.generalresearch.com* ```typescript import { THLApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new THLApi(configuration); + +const { status, data } = await apiInstance.paypalWebhookThlPaypalWebhookPost(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**any** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post** +> StatusResponse submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post(accessControlEventBody) + +Handle user access control adjustment requests. This is to add/remove users from white/black lists (for manual blocking/unblocking). Internally, this hits the UserQualityHistory grpc call. + +### Example + +```typescript +import { + THLApi, + Configuration, + AccessControlEventBody +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new THLApi(configuration); + +let accessControlEventBody: AccessControlEventBody; // + +const { status, data } = await apiInstance.submitAccessControlRequestThl9bf111afe03e40719c5cd0de0dc43c31Post( + accessControlEventBody +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **accessControlEventBody** | **AccessControlEventBody**| | | + + +### Return type + +**StatusResponse** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post** +> StatusResponse submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post(taskAdjustmentEventBody) + +Handle Wall status adjustment requests. Typically, this is a complete -> failure recon or the reverse. Internally, this hits the UserQualityHistory grpc call. + +### Example + +```typescript +import { + THLApi, Configuration, - ManageCashoutBody + TaskAdjustmentEventBody } from './api'; const configuration = new Configuration(); const apiInstance = new THLApi(configuration); -let manageCashoutBody: ManageCashoutBody; // +let taskAdjustmentEventBody: TaskAdjustmentEventBody; // -const { status, data } = await apiInstance.manageCashoutThlManageCashoutPost( - manageCashoutBody +const { status, data } = await apiInstance.submitTaskAdjustmentThlF4484dbdf144451ab60cda256ce14266Post( + taskAdjustmentEventBody ); ``` @@ -33,12 +132,12 @@ const { status, data } = await apiInstance.manageCashoutThlManageCashoutPost( |Name | Type | Description | Notes| |------------- | ------------- | ------------- | -------------| -| **manageCashoutBody** | **ManageCashoutBody**| | | +| **taskAdjustmentEventBody** | **TaskAdjustmentEventBody**| | | ### Return type -**UserPayoutEvent** +**StatusResponse** ### Authorization diff --git a/jb-ui/src/api_fsb/docs/TaskAdjustmentEvent.md b/jb-ui/src/api_fsb/docs/TaskAdjustmentEvent.md new file mode 100644 index 0000000..4bf5cf8 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/TaskAdjustmentEvent.md @@ -0,0 +1,40 @@ +# TaskAdjustmentEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mid** | **string** | | [default to undefined] +**source** | [**Source**](Source.md) | | [default to undefined] +**status** | [**WallAdjustedStatus**](WallAdjustedStatus.md) | | [default to undefined] +**alert_time** | **string** | | [optional] [default to undefined] +**quality_event_type** | **string** | | [optional] [default to QualityEventTypeEnum_TaskAdjustment] +**survey_id** | **string** | | [optional] [default to undefined] +**amount** | [**Amount1**](Amount1.md) | | [optional] [default to undefined] +**event_time** | **string** | | [optional] [default to undefined] +**product_id** | **string** | | [optional] [default to undefined] +**bpuid** | **string** | | [optional] [default to undefined] +**user_id** | **number** | | [optional] [default to undefined] + +## Example + +```typescript +import { TaskAdjustmentEvent } from './api'; + +const instance: TaskAdjustmentEvent = { + mid, + source, + status, + alert_time, + quality_event_type, + survey_id, + amount, + event_time, + product_id, + bpuid, + user_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/TaskAdjustmentEventBody.md b/jb-ui/src/api_fsb/docs/TaskAdjustmentEventBody.md new file mode 100644 index 0000000..103ec10 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/TaskAdjustmentEventBody.md @@ -0,0 +1,20 @@ +# TaskAdjustmentEventBody + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**Array<TaskAdjustmentEvent>**](TaskAdjustmentEvent.md) | | [default to undefined] + +## Example + +```typescript +import { TaskAdjustmentEventBody } from './api'; + +const instance: TaskAdjustmentEventBody = { + events, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/UpkQuestionResponse.md b/jb-ui/src/api_fsb/docs/UpkQuestionResponse.md index 455d59f..177fdb8 100644 --- a/jb-ui/src/api_fsb/docs/UpkQuestionResponse.md +++ b/jb-ui/src/api_fsb/docs/UpkQuestionResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **questions** | [**Array<UpkQuestionOut>**](UpkQuestionOut.md) | | [default to undefined] **consent_questions** | **Array<object | null>** | For internal use | [optional] [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/UserInfoResponse.md b/jb-ui/src/api_fsb/docs/UserInfoResponse.md index 9185d35..3445a70 100644 --- a/jb-ui/src/api_fsb/docs/UserInfoResponse.md +++ b/jb-ui/src/api_fsb/docs/UserInfoResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **user_profile** | [**UserInfo**](UserInfo.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/UserLedgerTransactionAttemptCredit.md b/jb-ui/src/api_fsb/docs/UserLedgerTransactionAttemptCredit.md new file mode 100644 index 0000000..5069c29 --- /dev/null +++ b/jb-ui/src/api_fsb/docs/UserLedgerTransactionAttemptCredit.md @@ -0,0 +1,34 @@ +# UserLedgerTransactionAttemptCredit + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **string** | When the Transaction was created | [default to undefined] +**description** | **string** | | [optional] [default to 'Attempt Credit'] +**amount** | **number** | The net amount affecting the user\'s wallet, in USDCents. Positive means the user\'s balance increased; negative means it decreased. | [default to undefined] +**balance_after** | **number** | | [optional] [default to undefined] +**tx_type** | **string** | | [optional] [default to TxTypeEnum_UserAttemptCredit] +**tsid** | **string** | | [default to undefined] +**url** | **string** | | [default to undefined] +**amount_string** | **string** | | [default to undefined] + +## Example + +```typescript +import { UserLedgerTransactionAttemptCredit } from './api'; + +const instance: UserLedgerTransactionAttemptCredit = { + created, + description, + amount, + balance_after, + tx_type, + tsid, + url, + amount_string, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/UserLedgerTransactionTypesSummary.md b/jb-ui/src/api_fsb/docs/UserLedgerTransactionTypesSummary.md index 7a946a3..f1f15ba 100644 --- a/jb-ui/src/api_fsb/docs/UserLedgerTransactionTypesSummary.md +++ b/jb-ui/src/api_fsb/docs/UserLedgerTransactionTypesSummary.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **bp_adjustment** | [**UserLedgerTransactionTypeSummary**](UserLedgerTransactionTypeSummary.md) | | [optional] [default to undefined] **bp_payment** | [**UserLedgerTransactionTypeSummary**](UserLedgerTransactionTypeSummary.md) | | [optional] [default to undefined] **user_bonus** | [**UserLedgerTransactionTypeSummary**](UserLedgerTransactionTypeSummary.md) | | [optional] [default to undefined] +**user_attempt_credit** | [**UserLedgerTransactionTypeSummary**](UserLedgerTransactionTypeSummary.md) | | [optional] [default to undefined] **user_payout_request** | [**UserLedgerTransactionTypeSummary**](UserLedgerTransactionTypeSummary.md) | | [optional] [default to undefined] ## Example @@ -19,6 +20,7 @@ const instance: UserLedgerTransactionTypesSummary = { bp_adjustment, bp_payment, user_bonus, + user_attempt_credit, user_payout_request, }; ``` diff --git a/jb-ui/src/api_fsb/docs/UserLedgerTransactionUserPayoutCancel.md b/jb-ui/src/api_fsb/docs/UserLedgerTransactionUserPayoutCancel.md new file mode 100644 index 0000000..baaba3e --- /dev/null +++ b/jb-ui/src/api_fsb/docs/UserLedgerTransactionUserPayoutCancel.md @@ -0,0 +1,34 @@ +# UserLedgerTransactionUserPayoutCancel + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | **string** | When the Transaction was created | [default to undefined] +**description** | **string** | | [optional] [default to 'Payout Cancelled'] +**amount** | **number** | The net amount affecting the user\'s wallet, in USDCents. Positive means the user\'s balance increased; negative means it decreased. | [default to undefined] +**balance_after** | **number** | | [optional] [default to undefined] +**tx_type** | **string** | | [optional] [default to TxTypeEnum_UserPayoutCancel] +**payout_id** | **string** | A unique identifier for the payout | [default to undefined] +**url** | **string** | | [default to undefined] +**amount_string** | **string** | | [default to undefined] + +## Example + +```typescript +import { UserLedgerTransactionUserPayoutCancel } from './api'; + +const instance: UserLedgerTransactionUserPayoutCancel = { + created, + description, + amount, + balance_after, + tx_type, + payout_id, + url, + amount_string, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponse.md b/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponse.md index 52925b0..f938b82 100644 --- a/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponse.md +++ b/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponse.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **total** | **number** | | [optional] [default to undefined] **transactions** | [**Array<UserLedgerTransactionsResponseTransactionsInner>**](UserLedgerTransactionsResponseTransactionsInner.md) | | [optional] [default to undefined] **summary** | [**UserLedgerTransactionTypesSummary**](UserLedgerTransactionTypesSummary.md) | | [default to undefined] -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **pages** | **number** | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponseTransactionsInner.md b/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponseTransactionsInner.md index 236b56e..74a35fb 100644 --- a/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponseTransactionsInner.md +++ b/jb-ui/src/api_fsb/docs/UserLedgerTransactionsResponseTransactionsInner.md @@ -6,14 +6,14 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **created** | **string** | When the Transaction was created | [default to undefined] -**description** | **string** | External description suitable for UI | [default to 'Task Complete'] +**description** | **string** | | [default to 'Attempt Credit'] **amount** | **number** | The net amount affecting the user\'s wallet, in USDCents. Positive means the user\'s balance increased; negative means it decreased. | [default to undefined] **balance_after** | **number** | | [optional] [default to undefined] -**tx_type** | **string** | | [optional] [default to TxTypeEnum_BpPayment] +**tx_type** | **string** | | [optional] [default to TxTypeEnum_UserAttemptCredit] **payout_id** | **string** | A unique identifier for the payout | [default to undefined] **url** | **string** | | [default to undefined] **amount_string** | **string** | | [default to undefined] -**tsid** | **string** | A unique identifier for the session | [default to undefined] +**tsid** | **string** | | [default to undefined] ## Example diff --git a/jb-ui/src/api_fsb/docs/UserProfile.md b/jb-ui/src/api_fsb/docs/UserProfile.md index 843cb50..a3cdd34 100644 --- a/jb-ui/src/api_fsb/docs/UserProfile.md +++ b/jb-ui/src/api_fsb/docs/UserProfile.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **user** | [**User**](User.md) | | [default to undefined] **marketplace_pids** | **{ [key: string]: string; }** | User\'s PID in marketplaces | [optional] [default to undefined] **streaks** | [**Array<UserStreak>**](UserStreak.md) | | [optional] [default to undefined] +**canonical_email** | **string** | | [default to undefined] **email_md5** | **string** | | [default to undefined] **email_sha1** | **string** | | [default to undefined] **email_sha256** | **string** | | [default to undefined] @@ -25,6 +26,7 @@ const instance: UserProfile = { user, marketplace_pids, streaks, + canonical_email, email_md5, email_sha1, email_sha256, diff --git a/jb-ui/src/api_fsb/docs/UserProfileResponse.md b/jb-ui/src/api_fsb/docs/UserProfileResponse.md index af39b22..ea85cdf 100644 --- a/jb-ui/src/api_fsb/docs/UserProfileResponse.md +++ b/jb-ui/src/api_fsb/docs/UserProfileResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **user_profile** | [**UserProfile**](UserProfile.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/UserProfilesResponse.md b/jb-ui/src/api_fsb/docs/UserProfilesResponse.md index 1b8bfad..c9d231d 100644 --- a/jb-ui/src/api_fsb/docs/UserProfilesResponse.md +++ b/jb-ui/src/api_fsb/docs/UserProfilesResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **user_profiles** | [**Array<UserProfile>**](UserProfile.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/UserWalletBalanceResponse.md b/jb-ui/src/api_fsb/docs/UserWalletBalanceResponse.md index f9cdc80..fa6c177 100644 --- a/jb-ui/src/api_fsb/docs/UserWalletBalanceResponse.md +++ b/jb-ui/src/api_fsb/docs/UserWalletBalanceResponse.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**status** | **string** | The status of the API response. | [default to undefined] +**status** | **string** | The status of the API response. | [optional] [default to StatusEnum_Success] **msg** | **string** | | [optional] [default to undefined] **wallet** | [**UserWalletBalance**](UserWalletBalance.md) | | [default to undefined] diff --git a/jb-ui/src/api_fsb/docs/WalletApi.md b/jb-ui/src/api_fsb/docs/WalletApi.md index a4acfd4..05d0c5a 100644 --- a/jb-ui/src/api_fsb/docs/WalletApi.md +++ b/jb-ui/src/api_fsb/docs/WalletApi.md @@ -7,8 +7,10 @@ All URIs are relative to *https://fsb.generalresearch.com* |[**claimLatestAttemptCreditProductIdWalletAttemptCreditPost**](#claimlatestattemptcreditproductidwalletattemptcreditpost) | **POST** /{product_id}/wallet/attempt-credit/ | Claim Latest Attempt Credit| |[**createCashoutMethodProductIdCashoutMethodsPost**](#createcashoutmethodproductidcashoutmethodspost) | **POST** /{product_id}/cashout_methods/ | Create Cashout Method| |[**deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete**](#deletecashoutmethodproductidcashoutmethodscashoutmethodiddelete) | **DELETE** /{product_id}/cashout_methods/{cashout_method_id}/ | Delete Cashout Method| +|[**filterUserCashoutsProductIdCashoutGet**](#filterusercashoutsproductidcashoutget) | **GET** /{product_id}/cashout/ | Filter User Cashouts| |[**getAttemptCreditProductIdWalletAttemptCreditTsidGet**](#getattemptcreditproductidwalletattemptcredittsidget) | **GET** /{product_id}/wallet/attempt-credit/{tsid}/ | Get Attempt Credit| |[**getCashoutDetailProductIdCashoutCashoutIdGet**](#getcashoutdetailproductidcashoutcashoutidget) | **GET** /{product_id}/cashout/{cashout_id}/ | Get Cashout Detail| +|[**getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet**](#getcashoutmethodproductidcashoutmethodscashoutmethodidget) | **GET** /{product_id}/cashout_methods/{cashout_method_id}/ | Get Cashout Method| |[**getCashoutMethodsProductIdCashoutMethodsGet**](#getcashoutmethodsproductidcashoutmethodsget) | **GET** /{product_id}/cashout_methods/ | Get Cashout Methods| |[**getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet**](#getexpectedredemptionvalueproductidcashoutmethodcashoutmethodidvalueget) | **GET** /{product_id}/cashout_method/{cashout_method_id}/value/ | Get Expected Redemption Value| |[**getUserTransactionHistoryProductIdTransactionHistoryGet**](#getusertransactionhistoryproductidtransactionhistoryget) | **GET** /{product_id}/transaction_history/ | Get User Transaction History| @@ -75,7 +77,7 @@ No authorization required # **createCashoutMethodProductIdCashoutMethodsPost** > CashoutMethodResponse createCashoutMethodProductIdCashoutMethodsPost(body) -A user can only have 1 unique Cashout Method of any type at a time (eg. they can\'t create multiple paypal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating paypal or Cash in Mail cashout methods are supported +A user can only have 1 unique Cashout Method of any type at a time (e.g. they can\'t create multiple PayPal payout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different Cashout Methods will require type-dependent request data attributes in order to be successfully created. Currently only creating PayPal or Cash in Mail cashout methods is supported ### Example @@ -186,6 +188,75 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **filterUserCashoutsProductIdCashoutGet** +> CashoutRequestsResponse filterUserCashoutsProductIdCashoutGet() + + +### Example + +```typescript +import { + WalletApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new WalletApi(configuration); + +let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined) +let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined) +let status: Array<PayoutStatus>; //Filter by one or more payout statuses (optional) (default to undefined) +let payoutType: Array<PayoutType>; //Filter by one or more payout types (optional) (default to undefined) +let orderBy: string; //Comma-separated fields to order by (optional) (default to 'created') +let page: number; // (optional) (default to 1) +let size: number; // (optional) (default to 50) + +const { status, data } = await apiInstance.filterUserCashoutsProductIdCashoutGet( + productId, + bpuid, + status, + payoutType, + orderBy, + page, + size +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined| +| **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined| +| **status** | **Array<PayoutStatus>** | Filter by one or more payout statuses | (optional) defaults to undefined| +| **payoutType** | **Array<PayoutType>** | Filter by one or more payout types | (optional) defaults to undefined| +| **orderBy** | [**string**] | Comma-separated fields to order by | (optional) defaults to 'created'| +| **page** | [**number**] | | (optional) defaults to 1| +| **size** | [**number**] | | (optional) defaults to 50| + + +### Return type + +**CashoutRequestsResponse** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getAttemptCreditProductIdWalletAttemptCreditTsidGet** > AttemptCreditClaimResponse getAttemptCreditProductIdWalletAttemptCreditTsidGet() @@ -296,6 +367,61 @@ No authorization required [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet** +> CashoutMethodResponse getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet() + +Retrieve a cashout method + +### Example + +```typescript +import { + WalletApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new WalletApi(configuration); + +let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined) +let cashoutMethodId: string; //The ID of the cashout method (default to undefined) + +const { status, data } = await apiInstance.getCashoutMethodProductIdCashoutMethodsCashoutMethodIdGet( + productId, + cashoutMethodId +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined| +| **cashoutMethodId** | [**string**] | The ID of the cashout method | defaults to undefined| + + +### Return type + +**CashoutMethodResponse** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **getCashoutMethodsProductIdCashoutMethodsGet** > CashoutMethodsResponse getCashoutMethodsProductIdCashoutMethodsGet() @@ -314,10 +440,12 @@ const apiInstance = new WalletApi(configuration); let productId: string; //The Brokerage Product ID provided by GRL. (default to undefined) let bpuid: string; //A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. (default to undefined) +let ip: string; //The end user\'s public IPv4 or IPv6 address. (optional) (default to undefined) const { status, data } = await apiInstance.getCashoutMethodsProductIdCashoutMethodsGet( productId, - bpuid + bpuid, + ip ); ``` @@ -327,6 +455,7 @@ const { status, data } = await apiInstance.getCashoutMethodsProductIdCashoutMeth |------------- | ------------- | ------------- | -------------| | **productId** | [**string**] | The Brokerage Product ID provided by GRL. | defaults to undefined| | **bpuid** | [**string**] | A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values. | defaults to undefined| +| **ip** | [**string**] | The end user\'s public IPv4 or IPv6 address. | (optional) defaults to undefined| ### Return type diff --git a/jb-ui/src/api_fsb/openapi.json b/jb-ui/src/api_fsb/openapi.json index 318e6cb..bdde4bf 100644 --- a/jb-ui/src/api_fsb/openapi.json +++ b/jb-ui/src/api_fsb/openapi.json @@ -1 +1 @@ -{"openapi":"3.1.0","info":{"title":"General Research Full Service Brokerage API","version":"1.2.0"},"servers":[{"url":"https://fsb.generalresearch.com/","description":"Production environment"}],"paths":{"/{product_id}/offerwall/b145b803/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents.","operationId":"TopN_Plus_Offerwall__product_id__offerwall_b145b803__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/d48cce47/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Block Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.","operationId":"TopN_Plus_Block_Offerwall__product_id__offerwall_d48cce47__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusBlockOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/1e5f0af8/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Block Recontact Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.","operationId":"TopN_Plus_Block_Recontact_Offerwall__product_id__offerwall_1e5f0af8__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusBlockRecontactOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/5481f322/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents.","operationId":"Starwall_Plus_Offerwall__product_id__offerwall_5481f322__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7fa1b3f4/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Block Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.","operationId":"Starwall_Plus_Block_Offerwall__product_id__offerwall_7fa1b3f4__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusBlockOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/630db2a4/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Block Recontact Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.","operationId":"Starwall_Plus_Block_Recontact_Offerwall__product_id__offerwall_630db2a4__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusBlockRecontactOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/5fa23085/":{"get":{"tags":["Offerwall"],"summary":"Marketplace Offerwall","description":"Returns buckets grouped by marketplace, one per marketplace, with the\ntasks ordered by quality.","operationId":"Marketplace_Offerwall__product_id__offerwall_5fa23085__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/6f27b1ae/":{"get":{"tags":["Offerwall"],"summary":"One Shot Offerwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.","operationId":"One_Shot_Offerwall__product_id__offerwall_6f27b1ae__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":8,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"sources","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/Source"},"description":"Restrict tasks to those from these marketplaces only.","title":"Sources"},"description":"Restrict tasks to those from these marketplaces only."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneShotOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/55a4e1a9/":{"get":{"tags":["Offerwall"],"summary":"Wxet Offerwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.","operationId":"WXET_Offerwall__product_id__offerwall_55a4e1a9__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":8,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WXETOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/37d1da64/":{"get":{"tags":["Offerwall"],"summary":"Offerwall Softpair","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.","operationId":"offerwall_softpair__product_id__offerwall_37d1da64__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":12,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":1,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"max_options","in":"query","required":false,"schema":{"type":"integer","description":"Max number of options an allowed question can have (allowed to be asked)","default":40,"title":"Max Options"},"description":"Max number of options an allowed question can have (allowed to be asked)"},{"name":"max_questions","in":"query","required":false,"schema":{"type":"integer","description":"Max number of missing questions on a single bin","default":3,"title":"Max Questions"},"description":"Max number of missing questions on a single bin"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/37d1da64/{offerwall_id}/":{"post":{"tags":["Offerwall"],"summary":"Offerwall Softpair Post","description":"This is a custom endpoint for a softpair-style offerwall that allows\nyou to update profiling answers and then immediately get back the\nupdated offerwall","operationId":"offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"offerwall_id","in":"path","required":true,"schema":{"type":"string","description":"The offerwall ID the user is interacting with","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"],"title":"Offerwall Id"},"description":"The offerwall ID the user is interacting with"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A session id (uuid4.hex)","examples":["dd6aa32cfe834839a80195563f528337"],"title":"Session Id"},"description":"A session id (uuid4.hex)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7a89dcdb/":{"get":{"tags":["Offerwall"],"summary":"Offerwall Softpair Block","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.\nNo buckets are returned if the user is blocked.","operationId":"offerwall_softpair_block__product_id__offerwall_7a89dcdb__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":12,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":1,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"max_options","in":"query","required":false,"schema":{"type":"integer","description":"Max number of options an allowed question can have (allowed to be asked)","default":40,"title":"Max Options"},"description":"Max number of options an allowed question can have (allowed to be asked)"},{"name":"max_questions","in":"query","required":false,"schema":{"type":"integer","description":"Max number of missing questions on a single bin","default":3,"title":"Max Questions"},"description":"Max number of missing questions on a single bin"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7a89dcdb/{offerwall_id}/":{"post":{"tags":["Offerwall"],"summary":"Offerwall Softpair Block Post","description":"This is a custom endpoint for a softpair-style offerwall that allows\nyou to update profiling answers and then immediately get back the\nupdated offerwall","operationId":"offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"offerwall_id","in":"path","required":true,"schema":{"type":"string","description":"The offerwall ID the user is interacting with","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"],"title":"Offerwall Id"},"description":"The offerwall ID the user is interacting with"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A session id (uuid4.hex)","examples":["dd6aa32cfe834839a80195563f528337"],"title":"Session Id"},"description":"A session id (uuid4.hex)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/status/{tsid}/":{"get":{"tags":["Status"],"summary":"Get Task Status","description":"Retrieve the status of a session by a specific Task Status ID (`tsid`)\nthat is provided in the redirect.\n\nGiven a `tsid`, get back the status of the wall event. This endpoint\nconflates the idea of a wall event and a session, but for these\npurposes, the status and payout of the last wall event in a session\nequals the status and payout for the session.","operationId":"Get_Task_Status__product_id__status__tsid___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"tsid","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Task Status ID","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"description":"A unique identifier for the session"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/status/":{"get":{"tags":["Status"],"summary":"List Task Statuses","operationId":"List_Task_Statuses__product_id__status__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Filters the returned task status to only include those done by this user.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Filters the returned task status to only include those done by this user."},{"name":"started_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago.","examples":["2026-09-08T22:12:19.351267Z",1788819139],"title":"Started After"},"description":"Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago."},{"name":"started_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were started before this timestamp. If `NULL`, default is now.","title":"Started Before"},"description":"Retrieve sessions which were started before this timestamp. If `NULL`, default is now."},{"name":"status","in":"query","required":false,"schema":{"type":"integer","description":"Filter for sessions with this status. See Task Status for description of status.","examples":[3],"title":"Status"},"description":"Filter for sessions with this status. See Task Status for description of status."},{"name":"reconciled","in":"query","required":false,"schema":{"type":"boolean","description":"Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required.","default":false,"title":"Reconciled"},"description":"Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required."},{"name":"adjusted_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were adjusted after this timestamp.","title":"Adjusted After"},"description":"Retrieve sessions which were adjusted after this timestamp."},{"name":"adjusted_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were adjusted before this timestamp. Default is now.","title":"Adjusted Before"},"description":"Retrieve sessions which were adjusted before this timestamp. Default is now."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated fields to order by","examples":["-started","started"],"default":"-started","title":"Order By"},"description":"Comma-separated fields to order by"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksStatusResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/report/":{"post":{"tags":["Report"],"summary":"Report Task","description":"Send a \"Task Report\" for a respondent's latest started survey,\nregardless of the survey's outcome. Task Reports cannot be provided for\ntask attempts by tsid, or through any other method, they must be given\nimmediately after the respondent's task attempt.\n\nIf a latest attempt can't be found, a ReportTaskResponse is still returned.\n\nIf multiple reasons want to be provided, they should be done at the\nsame time. If multiple reports are given for the same latest started\ntask, the note attribute will be overwritten, while the new unique\nreasons will be appended to the task attempt.\n\nTask Report system contributions by client applications are immediately\nleveraged to aid yield management strategies. For those reasons, it's\nimportant that the respondent submits a Task Report as soon as possible\nand applications doesn't offload this request for a later time. Task\nReport timestamps are a critical component of understanding a Task\nexperience for a respondent.\n\nFor the BP to tell us about a bad survey they want to report\nThe POSTed data looks like:\n {\n 'bpuid': '1234',\n 'reasons': [2],\n 'notes': \"This survey was the worst!\"\n }\nReturns {'status': 'success', 'msg': error_msg}","operationId":"report_task__product_id__report__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTask"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/profiling-questions/":{"get":{"tags":["Profiling Questions"],"summary":"Get Profiling Questions","description":"Gets a list of profiling questions to ask this user. These questions\nare, as of right now, unanswered. Once a question is answered, it\n(and any other question whose answer is inferred from other answers) is\nremoved from the list. The questions returned are ordered by\nimportance (the key task_score) in descending order.","operationId":"get_profiling_questions__product_id__profiling_questions__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Number of questions to return. Questions are ordered, so, selects the N most important. If no limit is passed, then the number of questions returned is dynamically calculated by the questions' importance.","title":"Limit"},"description":"Number of questions to return. Questions are ordered, so, selects the N most important. If no limit is passed, then the number of questions returned is dynamically calculated by the questions' importance."},{"name":"is_grs","in":"query","required":false,"schema":{"type":"boolean","description":"If it's the GRS system.","default":false,"title":"Is Grs"},"description":"If it's the GRS system."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpkQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Profiling Questions"],"summary":"Submit Profiling Questions","description":"Send the answers to one or more of these questions for a user. A\nquestion is uniquely specified by the question_id key. The answer is:\nthe choice_id if the question_type is \"MC\" the actual entered text if\nthe question_type is \"TE\"","operationId":"submit_profiling_questions__product_id__profiling_questions__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","description":"The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional.","title":"Session Id"},"description":"The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional."},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","description":"For internal use.","default":true,"title":"Async"},"description":"For internal use."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_submit_profiling_questions__product_id__profiling_questions__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/profiling-info/":{"get":{"tags":["Profiling Questions"],"summary":"Profiling Info","description":"Get UPK Ontology (list of properties, property info, and allowed values)","operationId":"profiling_info__product_id__profiling_info__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"country_iso","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilingInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user-profile/":{"get":{"tags":["Profiling Questions"],"summary":"User Profile","operationId":"user_profile__product_id__user_profile__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"country_iso","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user/{product_user_id}/profile/":{"get":{"tags":["Product User"],"summary":"User Profile","operationId":"user_profile__product_id__user__product_user_id__profile__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Product User"],"summary":"User Profile Update","operationId":"user_profile_update__product_id__user__product_user_id__profile__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user/by-marketplace-pid/":{"get":{"tags":["Product User"],"summary":"User Profile Filter By Marketplace Pid","operationId":"user_profile_filter_by_marketplace_pid__product_id__user_by_marketplace_pid__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"source","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Source","description":"The marketplace to search"},"description":"The marketplace to search"},{"name":"pid","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","minLength":32,"maxLength":32},"description":"The user's marketplace PID. Supports multiple params","title":"Pid"},"description":"The user's marketplace PID. Supports multiple params"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/leaderboard/timespan/{board_code}/":{"get":{"tags":["Leaderboard"],"summary":"Timespan Leaderboard","operationId":"Timespan_Leaderboard__product_id__leaderboard_timespan__board_code___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"board_code","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},"description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},{"name":"freq","in":"query","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},"description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},{"name":"country_iso","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}],"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request.","examples":["us"],"title":"Country Iso"},"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request."},{"name":"bpuid","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":128,"description":"Brokerage Product User ID. If passed, this results in the filtering of rows to include this user's row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned.","examples":["app-user-9329ebd"],"title":"Bpuid"},"description":"Brokerage Product User ID. If passed, this results in the filtering of rows to include this user's row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned."},{"name":"within_time","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Any local timestamp falling within the desired leaderboard's period. If not passed, uses the country's current time period.","examples":["2024-02-27","2024-02-27T15:30:00"],"title":"Within Time"},"description":"Any local timestamp falling within the desired leaderboard's period. If not passed, uses the country's current time period."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMaximum":5000,"exclusiveMinimum":0,"description":"Max number of rows to return","default":50,"title":"Limit"},"description":"Max number of rows to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/leaderboard/timespan/{board_code}/winners/":{"get":{"tags":["Leaderboard"],"summary":"Leaderboard Winners","description":"Get the Winners of leaderboard contests","operationId":"Leaderboard_Winners__product_id__leaderboard_timespan__board_code__winners__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"board_code","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},"description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},{"name":"freq","in":"query","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},"description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},{"name":"country_iso","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}],"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request.","examples":["us"],"title":"Country Iso"},"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardWinnerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/{contest_uuid}/user/{product_user_id}/":{"get":{"tags":["Contest"],"summary":"Get Contest User View","description":"Gets a Contest. Includes several keys that are specific to the requesting user:\n e.g. user_winnings, user_amount.","operationId":"Get_Contest_User_View__product_id__contest__contest_uuid__user__product_user_id___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"contest_uuid","in":"path","required":true,"schema":{"type":"string","title":"Contest Uuid"}},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}],"title":"Response Get Contest User View Product Id Contest Contest Uuid User Product User Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/entered/":{"get":{"tags":["Contest"],"summary":"List Contests User Entered","description":"Get contests the requesting user has entered. This includes contests such as milestone\n contests where the user was automatically entered by having a complete for instance.","operationId":"List_Contests_User_Entered__product_id__contest_user__product_user_id__entered__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Entered Product Id Contest User Product User Id Entered Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/eligible/":{"get":{"tags":["Contest"],"summary":"List Contests User Eligible","description":"Get contests the requesting user is eligible for.\nContest eligibility may involve the user's country, which is determined by the ip address\n of THIS request.","operationId":"List_Contests_User_Eligible__product_id__contest_user__product_user_id__eligible__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Eligible Product Id Contest User Product User Id Eligible Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/winner/":{"get":{"tags":["Contest"],"summary":"List Contests User Winner","description":"Get contests the requesting user has won a prize for.","operationId":"List_Contests_User_Winner__product_id__contest_user__product_user_id__winner__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Winner Product Id Contest User Product User Id Winner Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/":{"get":{"tags":["Wallet"],"summary":"Get User Wallet Balance","description":"Retrieve the current balance of a respondent's wallet balance for display","operationId":"get_user_wallet_balance__product_id__wallet__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWalletBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallets/":{"get":{"tags":["Wallet"],"summary":"Get User Wallets","description":"Retrieve a respondent's wallets and balances for display","operationId":"get_user_wallets__product_id__wallets__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLedgerWallets"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_methods/":{"get":{"tags":["Wallet"],"summary":"Get Cashout Methods","description":"Retrieve the current available mechanisms that a user can use to retrieve funds.","operationId":"get_cashout_methods__product_id__cashout_methods__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Wallet"],"summary":"Create Cashout Method","description":"A user can only have 1 unique Cashout Method of any type at a time (eg. they can't create multiple paypal\npayout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different\nCashout Methods will require type-dependent request data attributes in order to be successfully created.\n\nCurrently only creating paypal or Cash in Mail cashout methods are supported","operationId":"create_cashout_method__product_id__cashout_methods__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreatePayPalCashoutMethodRequest"},{"$ref":"#/components/schemas/CreateCashMailCashoutMethodRequest"}],"discriminator":{"propertyName":"type","mapping":{"PAYPAL":"#/components/schemas/CreatePayPalCashoutMethodRequest","CASH_IN_MAIL":"#/components/schemas/CreateCashMailCashoutMethodRequest"}},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_methods/{cashout_method_id}/":{"delete":{"tags":["Wallet"],"summary":"Delete Cashout Method","description":"Delete a cashout method","operationId":"delete_cashout_method__product_id__cashout_methods__cashout_method_id___delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_method_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The ID of the cashout method to delete","title":"Cashout Method Id"},"description":"The ID of the cashout method to delete"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout/":{"post":{"tags":["Wallet"],"summary":"Submit User Cashout","description":"Request a cashout taken from a user's available wallet balance, to be paid via a particular\ncashout method.","operationId":"submit_user_cashout__product_id__cashout__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout/{cashout_id}/":{"get":{"tags":["Wallet"],"summary":"Get Cashout Detail","description":"Retrieve the details for a specific Cashout event","operationId":"get_cashout_detail__product_id__cashout__cashout_id___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The cashout event ID","title":"Cashout Id"},"description":"The cashout event ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/transaction_history/":{"get":{"tags":["Wallet"],"summary":"Get User Transaction History","description":"Return array of user events that altered their wallet balance","operationId":"get_user_transaction_history__product_id__transaction_history__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Filter transactions created after this timestamp","examples":["2025-01-01T04:20:00.000000Z"],"title":"Created After"},"description":"Filter transactions created after this timestamp"},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Filter transactions created before this timestamp","examples":["2026-09-08T22:12:19.380546Z"],"title":"Created Before"},"description":"Filter transactions created before this timestamp"},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated fields to order by","examples":["-created","created"],"default":"created","title":"Order By"},"description":"Comma-separated fields to order by"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLedgerTransactionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_method/{cashout_method_id}/value/":{"get":{"tags":["Wallet"],"summary":"Get Expected Redemption Value","description":"Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this\n cashout_method, for amount (in USD cents).","operationId":"get_expected_redemption_value__product_id__cashout_method__cashout_method_id__value__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_method_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The ID of the cashout method","examples":["0d363971792249b1a34586f092819e4b"],"title":"Cashout Method Id"},"description":"The ID of the cashout method"},{"name":"amount","in":"query","required":true,"schema":{"type":"integer","description":"(USD cents) The amount to convert","examples":[100],"title":"Amount"},"description":"(USD cents) The amount to convert"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodForeignValueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/attempt-credit/":{"post":{"tags":["Wallet"],"summary":"Claim Latest Attempt Credit","description":"Attempt to claim an Attempt Credit from the user's latest Session.","operationId":"claim_latest_attempt_credit__product_id__wallet_attempt_credit__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/attempt-credit/{tsid}/":{"get":{"tags":["Wallet"],"summary":"Get Attempt Credit","description":"Get an Attempt Credit by a user's Session.","operationId":"get_attempt_credit__product_id__wallet_attempt_credit__tsid___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"tsid","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Task Status ID","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"description":"A unique identifier for the session"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thl/manage_cashout/":{"post":{"tags":["THL"],"summary":"Manage Cashout","operationId":"manage_cashout_thl_manage_cashout__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ManageCashoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPayoutEvent"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dashboard/inventory/":{"get":{"tags":["Dashboard"],"summary":"Marketplace Inventory","operationId":"marketplace_inventory_dashboard_inventory__get","parameters":[{"name":"marketplace","in":"query","required":true,"schema":{"const":"WXET","type":"string","examples":["WXET"],"title":"Marketplace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ws/debug/":{"get":{"tags":["Streams"],"summary":"Websocket Debug Page","operationId":"websocket_debug_page_ws_debug__get","parameters":[{"name":"product_id","in":"query","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ws/events/docs/":{"get":{"tags":["Streams"],"summary":"Websocket Events Docs","description":"WebSocket endpoint: `/ws/events/`\n\nProtocol:\n- Client connects\n- Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }`\n- Server sends a PingMessage `{ kind: \"ping\" }`\n- Client must reply a PongMessage: `{ kind: \"pong\" }`\n- Other messages are EventMessage or StatsMessage\n\nClose on missing pong after 20s.","operationId":"websocket_events_docs_ws_events_docs__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EventMessage"},{"$ref":"#/components/schemas/StatsMessage"},{"$ref":"#/components/schemas/PingMessage"},{"$ref":"#/components/schemas/SubscribeMessage"},{"$ref":"#/components/schemas/PongMessage"}],"title":"Response Websocket Events Docs Ws Events Docs Get"}}}}}}}},"components":{"schemas":{"AccessType":{"type":"string","enum":["residential","mobile","satellite","datacenter","enterprise","unknown"],"title":"AccessType","description":"How the network is used"},"AccountType":{"type":"string","enum":["bp_commission","bp_wallet","user_wallet","user_attempt_credit","cash","revenue","expense","contest_wallet","credit_line","wa_wallet","wa_budget_pool","wa_held","wa_credit_line"],"title":"AccountType"},"AdjustmentType":{"properties":{"amount":{"type":"integer","title":"Amount","description":"The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period from a specificSource of Tasks."},"adjustment":{"$ref":"#/components/schemas/SessionAdjustedStatus","description":" - `ac` = ADJUSTED_TO_COMPLETE\n - `af` = ADJUSTED_TO_FAIL\n - `pa` = PAYOUT_ADJUSTMENT","examples":["af"]}},"type":"object","required":["amount","adjustment"],"title":"AdjustmentType"},"AggregateBySource":{"properties":{"total":{"type":"integer","minimum":0.0,"title":"Total","default":0},"by_source":{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"By Source"}},"type":"object","title":"AggregateBySource"},"AmtCashoutMethodData":{"properties":{"type":{"type":"string","const":"AMT","title":"Type","default":"AMT"}},"type":"object","title":"AmtCashoutMethodData"},"AttemptCreditClaimBody":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user requesting the claim","examples":["app-user-9329ebd"]}},"type":"object","required":["bpuid"],"title":"AttemptCreditClaimBody"},"AttemptCreditClaimResponse":{"properties":{"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"(USD cents) The amount given to the user as an attempt credit."}},"type":"object","required":["amount"],"title":"AttemptCreditClaimResponse"},"AuditLog":{"properties":{"id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Id"},"user_id":{"type":"integer","exclusiveMinimum":0.0,"title":"User Id"},"created":{"type":"string","format":"date-time","title":"Created","description":"When did this event occur","examples":["2026-09-08T22:12:17.882731Z"]},"level":{"$ref":"#/components/schemas/AuditLogLevel","description":"The level of importance for this event. Works the same as python logging levels. It is an integer 0 - 50, and implementers of this field could map it to the predefined levels: (`CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`).This is NOT the same concept as the 'strength' of whatever event happened; it is just for sorting, filtering and display purposes. For e.g. multiple level 20 events != the 'importance' of one level 40 event.","examples":[30]},"event_type":{"type":"string","maxLength":64,"title":"Event Type","examples":["entrance-limit"]},"event_msg":{"anyOf":[{"type":"string","maxLength":256,"minLength":3},{"type":"null"}],"title":"Event Msg","description":"The event message. Could be displayed on user's page"},"event_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Event Value","description":"Optionally store a numeric value associated with this event. For e.g. if we recalculate the user's normalized recon rate, and it is 'high', we could store an event like (event_type='recon-rate', event_msg='higher than allowed recon rate' event_value=0.42)","examples":[0.42]}},"type":"object","required":["user_id","level","event_type"],"title":"AuditLog","description":"Table / Model for logging \"actions\" taken by a user or \"events\" that\nare related to a User"},"AuditLogLevel":{"type":"integer","enum":[50,50,40,30,30,20,10,0],"title":"AuditLogLevel"},"Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post"},"Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post"},"Body_submit_profiling_questions__product_id__profiling_questions__post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_submit_profiling_questions__product_id__profiling_questions__post"},"BrokerageProductPayoutEvent":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Event Unique Identifier","examples":["9453cd076713426cb68d05591c7145aa"]},"debit_account_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Debit Account Uuid","description":"The LedgerAccount.uuid that money is being requested from. Thie User or Brokerage Product is retrievable through the LedgerAccount.reference_uuid","examples":["18298cb1583846fbb06e4747b5310693"]},"cashout_method_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Cashout Method Uuid","description":"References a row in the account_cashoutmethod table. This is the cashout method that was used to request this payout. (A cashout is the same thing as a payout)","examples":["a6dc1fc1bf934557b952f253dee12813"]},"created":{"type":"string","format":"date-time","title":"Created"},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount int. This cannot be 0 or negative","examples":[531]},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["COMPLETE"]},"ext_ref_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Ref Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"request_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Data","description":"Stores payout-type-specific information that is used to request this payout from the external provider."},"order_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/CashMailOrderData"},{"type":"null"}],"title":"Order Data","description":"Stores payout-type-specific order information that is returned from the external payout provider."},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"The Brokerage Product that was paid out","examples":["1108d053e4fa47c5b0dbdcd03a7981e7"]},"method":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","readOnly":true,"examples":["ACH"]},"amount_usd":{"type":"integer","minimum":0.0,"title":"Amount Usd","readOnly":true,"examples":["$10,000.000"]},"amount_usd_str":{"type":"string","title":"Amount Usd Str","readOnly":true,"examples":["$10,000.000"]}},"type":"object","required":["debit_account_uuid","cashout_method_uuid","amount","payout_type","product_id","method","amount_usd","amount_usd_str"],"title":"BrokerageProductPayoutEvent","description":"The amount\n\n- created: When the Brokerage Product was paid out"},"BucketTask":{"properties":{"id":{"type":"string","maxLength":32,"minLength":1,"title":"Id","description":"The internal task id for this task within the marketplace","examples":["6ov9jz3"]},"id_code":{"type":"string","maxLength":35,"minLength":3,"pattern":"^[a-z]{1,2}\\:.*","title":"Id Code","description":"The namespaced task id for this task within the marketplace","examples":["o:6ov9jz3"]},"source":{"$ref":"#/components/schemas/Source","examples":["o"]},"loi":{"type":"integer","maximum":5400.0,"exclusiveMinimum":1.0,"title":"Loi","description":"expected loi in seconds","examples":[612]},"payout":{"type":"integer","exclusiveMinimum":1.0,"title":"Payout","description":"integer cents","examples":[123]}},"type":"object","required":["id","id_code","source","loi","payout"],"title":"BucketTask","description":"This represents one of the \"tasks\" within a bucket's ordered list of tasks."},"Cardinality":{"type":"string","enum":["*","?"],"title":"Cardinality"},"CashMailCashoutMethodData":{"properties":{"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"delivery_address":{"$ref":"#/components/schemas/USDeliveryAddress","description":"Delivery address where payment should be sent"}},"type":"object","required":["delivery_address"],"title":"CashMailCashoutMethodData"},"CashMailOrderData":{"properties":{"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"shipping_cost":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Shipping Cost","description":"(USD cents) The shipping cost. This amount get charged to the BP."},"tracking_number":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Tracking Number"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/ShippingMethod","maxLength":50,"minLength":1},{"type":"null"}],"description":"Standard, express, etc."},"carrier":{"anyOf":[{"$ref":"#/components/schemas/ShippingCarrier","maxLength":50,"minLength":1},{"type":"null"}],"description":"Name of the shipping company, e.g., USPS, FedEx, DHL"},"ship_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ship Date"},"estimated_delivery_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Delivery Date"},"delivery_status":{"anyOf":[{"$ref":"#/components/schemas/DeliveryStatus","maxLength":50,"minLength":1},{"type":"null"}],"description":"Current status of delivery, e.g., pending, in transit, delivered"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated","description":"Timestamp of the last status update"}},"type":"object","required":["shipping_cost"],"title":"CashMailOrderData"},"CashoutMethodForeignValue":{"properties":{"value":{"type":"integer","minimum":0.0,"title":"Value","description":"Value of the redemption in the currency's smallest unit."},"currency":{"$ref":"#/components/schemas/RedemptionCurrency","description":"Supported Currencies for Foreign Redemptions\n\nAllowed values: \n - __USD__ *(USD)*: US Dollars. Smallest Unit: Cents.\n - __CAD__ *(CAD)*: Canadian Dollars. Smallest Unit: Cents.\n - __GBP__ *(GBP)*: British Pounds. Smallest Unit: Pence.\n - __EUR__ *(EUR)*: Euros. Smallest Unit: Cents.\n - __INR__ *(INR)*: Indian Rupees. Smallest Unit: Paise.\n - __AUD__ *(AUD)*: Australian Dollars. Smallest Unit: Cents.\n - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz.\n - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre.\n - __SGD__ *(SGD)*: Singapore Dollars. Smallest Unit: Cents.\n - __MXN__ *(MXN)*: Mexican Pesos. Smallest Unit: Centavos."},"value_string":{"type":"string","title":"Value String","description":"A string representation of the value in the currency."}},"type":"object","required":["value","currency","value_string"],"title":"CashoutMethodForeignValue","description":"Shows the expected value of a redemption in a foreign currency.","example":{"currency":"CAD","value":"138","value_string":"$1.38 CAD"}},"CashoutMethodForeignValueResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_method_value":{"$ref":"#/components/schemas/CashoutMethodForeignValue"}},"type":"object","required":["status","cashout_method_value"],"title":"CashoutMethodForeignValueResponse"},"CashoutMethodOut":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique ID for this cashout method"},"currency":{"type":"string","const":"USD","title":"Currency","description":"The currency of the cashout. Only USD is supported.","default":"USD"},"original_currency":{"anyOf":[{"$ref":"#/components/schemas/Currency"},{"type":"null"}],"description":"The base currency of the money paid out. This is used for e.g. sending an Amazon UK gift card"},"data":{"oneOf":[{"$ref":"#/components/schemas/PaypalCashoutMethodData"},{"$ref":"#/components/schemas/TangoCashoutMethodData"},{"$ref":"#/components/schemas/CashMailCashoutMethodData"},{"$ref":"#/components/schemas/AmtCashoutMethodData"}],"title":"Data","discriminator":{"propertyName":"type","mapping":{"AMT":"#/components/schemas/AmtCashoutMethodData","CASH_IN_MAIL":"#/components/schemas/CashMailCashoutMethodData","PAYPAL":"#/components/schemas/PaypalCashoutMethodData","TANGO":"#/components/schemas/TangoCashoutMethodData"}}},"description":{"type":"string","title":"Description","description":"The description of the cashout method.","default":""},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url","description":"Link to an image to display"},"max_value":{"type":"integer","exclusiveMinimum":0.0,"title":"Max Value","description":"(In lowest unit of the original_currency), The maximum amount that can be cashed out in one transaction."},"min_value":{"type":"integer","minimum":0.0,"title":"Min Value","description":"(In lowest unit of the original_currency), The minimum amount that can be cashed out in one transaction."},"name":{"type":"string","title":"Name","description":"A descriptive name for the cashout method."},"type":{"$ref":"#/components/schemas/PayoutType","description":"The method in which the requested payout is delivered.\n\nAllowed values: \n - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address\n - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card\n - __DWOLLA__ *(DWOLLA)*: DWOLLA\n - __ACH__ *(ACH)*: A payment is made to a bank account using ACH\n - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH\n - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user.\n - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value\n - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT\n - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus\n - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT"},"ext_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Id","description":"An external ID. Can be shown to a user to disambiguate a user's possibly multiple methods"},"usd_exchange_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd Exchange Rate"},"max_value_usd":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Value Usd","description":"(In lowest unit of USD), The maximum amount that can be cashed out in one transaction."},"min_value_usd":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Value Usd","description":"(In lowest unit of USD), The minimum amount that can be cashed out in one transaction."},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier. It should not contain any sensitive informationlike email or names, and should avoid using anyincrementing values.","examples":["app-user-9329ebd"]}},"type":"object","required":["id","data","max_value","min_value","name","type"],"title":"CashoutMethodOut","example":{"bpid":"6a3ddfb747344bbc93efadf1c3a16e1a","currency":"USD","data":{"disclaimer":"...","terms":"..."},"description":"...","id":"941d489c3ce04eb39a0ddb7f8f75db74","image_url":"https://d30s7yzk2az89n.cloudfront.net/images/brands/b238587-1200w-326ppi.png","max_value":25000,"min_value":500,"name":"Visa® Prepaid Card USD","type":"TANGO"}},"CashoutMethodResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_method":{"$ref":"#/components/schemas/CashoutMethodOut"}},"type":"object","required":["status","cashout_method"],"title":"CashoutMethodResponse"},"CashoutMethodsResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_methods":{"items":{"$ref":"#/components/schemas/CashoutMethodOut"},"type":"array","title":"Cashout Methods"}},"type":"object","required":["status","cashout_methods"],"title":"CashoutMethodsResponse"},"CashoutRequestInfo":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Id","description":"Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid.","examples":["3ceb847aaf9f40f4bd15b2b5e083abf6"]},"description":{"type":"string","title":"Description","description":"This is the name of the cashout method.","examples":["Visa® Prepaid Card USD"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["PENDING"]},"transaction_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transaction Info"}},"type":"object","required":["id","description"],"title":"CashoutRequestInfo","description":"See models.thl.payout: PayoutEvent. We've confused a CashOut and a\nPayout. This is used only in the API response."},"CashoutRequestResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout":{"$ref":"#/components/schemas/CashoutRequestInfo"}},"type":"object","required":["status","cashout"],"title":"CashoutRequestResponse"},"Category":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid","examples":["c109fbcaddac48cf88d5957c088ad446"]},"adwords_vertical_id":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Adwords Vertical Id"},"label":{"type":"string","maxLength":255,"title":"Label","examples":["Hair Loss"]},"path":{"type":"string","pattern":"^\\/.*[^\\/]$","title":"Path","examples":["/Beauty & Fitness/Hair Care/Hair Loss"]},"parent_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Parent Uuid","examples":["2a3e09d812ac41458c84def5b25e4364"]}},"type":"object","required":["uuid","label","path"],"title":"Category"},"CategoryAssociation":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"The category ID","examples":["c8642a1b86d9460cbe8f7e8ae6e56ee4"]},"label":{"type":"string","maxLength":255,"title":"Label","description":"The category label","examples":["People & Society"]},"adwords_id":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Adwords Id","examples":["14"]},"adwords_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Adwords Label","examples":["People & Society"]},"p":{"type":"number","maximum":1.0,"minimum":0.0,"title":"P","description":"The strength of the association of this bucketwith this category. Will sum to 1 within a bucket.","examples":[1.0]}},"type":"object","required":["id","label","p"],"title":"CategoryAssociation","description":"Used in an offerwall. Stores the association between a category\nand a bucket, with a score."},"ContestEndCondition":{"properties":{"target_entry_amount":{"anyOf":[{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"ge":1},{"type":"null"}],"title":"Target Entry Amount","description":"The contest is over once this amount is reached. (sum of all entry amount)"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The contest is over at this time."}},"type":"object","title":"ContestEndCondition","description":"Defines the conditions to evaluate to determine when the contest\nis over. Multiple conditions can be set. The contest is over\nonce ANY conditions are met."},"ContestEndReason":{"type":"string","enum":["cancelled","target_entry_amount","ends_at","max_winners"],"title":"ContestEndReason","description":"Defines why a contest ended"},"ContestEntry":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"entry_type":{"$ref":"#/components/schemas/ContestEntryType"},"amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer"}],"title":"Amount","description":"The amount of the entry in integer counts or USD Cents","gt":0},"amount_str":{"type":"string","title":"Amount Str","readOnly":true},"censored_product_user_id":{"type":"string","title":"Censored Product User Id","readOnly":true}},"type":"object","required":["entry_type","amount","amount_str","censored_product_user_id"],"title":"ContestEntry"},"ContestEntryRule":{"properties":{"max_entry_amount_per_user":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Entry Amount Per User","description":"Maximum total value of entries per user"},"max_daily_entries_per_user":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Daily Entries Per User","description":"Maximum entries per user allowed per day for this contest"},"min_completes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Completes"},"min_membership_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Membership Level"},"id_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Id Verified"}},"type":"object","title":"ContestEntryRule","description":"Defines rules the user must meet to be allowed to enter this contest\nOnly applies if the ContestType is ENTRY!"},"ContestEntryTrigger":{"type":"string","enum":["task_complete","task_attempt","referral"],"title":"ContestEntryTrigger","description":"Defines what action/event triggers a (possible) entry into the contest (automatically).\nThis only is valid on milestone contests"},"ContestEntryType":{"type":"string","enum":["count","cash"],"title":"ContestEntryType","description":"All entries into a contest must be of the same type, and match\nthe entry_type of the Contest itself."},"ContestPrize":{"properties":{"kind":{"$ref":"#/components/schemas/ContestPrizeKind","description":"\nAllowed values: \n - __physical__ *(PHYSICAL)*: A physical prize (e.g. a iPhone, cash in the mail, dinner with Max)\n - __promotion__ *(PROMOTION)*: A promotion is a temporary or special offer that provides extra value or benefits (e.g. 20% bonus on completes for the next 7 days)\n - __cash__ *(CASH)*: Money is deposited into user's virtual wallet"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"estimated_cash_value":{"type":"integer","minimum":0.0,"title":"Estimated Cash Value","description":"Estimated cash value of prize in USDCents"},"cash_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cash Amount","description":"If the kind=ContestPrizeKind.CASH, this is the amount of the prize"},"promotion_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Promotion Id","description":"If the kind=ContestPrizeKind.PROMOTION, this is the promotion ID"},"leaderboard_rank":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Leaderboard Rank","description":"The prize is for achieving this rank in the associated leaderboard. The highest rank is 1."}},"type":"object","required":["kind","estimated_cash_value"],"title":"ContestPrize"},"ContestPrizeKind":{"type":"string","enum":["physical","promotion","cash"],"title":"ContestPrizeKind"},"ContestStatus":{"type":"string","enum":["active","completed","cancelled"],"title":"ContestStatus"},"ContestWinner":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this user won this prize"},"prize":{"$ref":"#/components/schemas/ContestPrize"},"awarded_cash_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Awarded Cash Amount","description":"The actual amount this user receives. For cash prizes, if there was a tie, this could be different from the prize amount."},"product_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product User Id","readOnly":true}},"type":"object","required":["prize","product_user_id"],"title":"ContestWinner","description":"In a Raffle, the ContestEntryType can be COUNT or CASH. In the CASH type,\nthe unit of entry is 1 USDCent (one penny). Implicitly, each penny entered\nbuys 1 entry into the raffle, and one entry is randomly selected for\neach prize.\n\nA contest should have as many winners as there are prizes\nspecial case 1: there are fewer entries than prizes\nspecial case 2: leaderboard contest with ties"},"CountStat":{"properties":{"facet":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"propertyNames":{"enum":["country_iso","day","month"]},"type":"object","title":"Facet","description":"The grouping criteria","examples":[{"country_iso":"us"}]},"count":{"type":"integer","title":"Count","description":"The count value for the given metric and facet"}},"type":"object","required":["facet","count"],"title":"CountStat"},"CreateCashMailCashoutMethodRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user to create this cashout method for.","examples":["app-user-9329ebd"]},"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"delivery_address":{"$ref":"#/components/schemas/USDeliveryAddress","description":"Delivery address where payment should be sent"}},"type":"object","required":["bpuid","delivery_address"],"title":"CreateCashMailCashoutMethodRequest"},"CreateCashoutRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user requesting a cashout.","examples":["app-user-9329ebd"]},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount","description":"(USD cents) The amount requested for the cashout.","examples":[531]},"cashout_method_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Method Id","description":"Unique ID for the cashout method the cashout is being requested with.","examples":["941d489c3ce04eb39a0ddb7f8f75db74"]}},"type":"object","required":["bpuid","amount","cashout_method_id"],"title":"CreateCashoutRequest"},"CreatePayPalCashoutMethodRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user to create this cashout method for.","examples":["app-user-9329ebd"]},"type":{"type":"string","const":"PAYPAL","title":"Type","default":"PAYPAL"},"email":{"type":"string","format":"email","title":"Email","description":"Email address of the paypal user","examples":["test@example.com"]}},"type":"object","required":["bpuid","email"],"title":"CreatePayPalCashoutMethodRequest"},"Currency":{"type":"string","enum":["USD","CAD","GBP","EUR","INR","AUD","PLN","SEK","SGD","MXN"],"title":"Currency"},"DeliveryStatus":{"type":"string","enum":["Pending","Shipped","In Transit","Out for Delivery","Delivered","Returned","Canceled","Failed Attempt","Lost"],"title":"DeliveryStatus"},"Direction":{"type":"integer","enum":[-1,1],"title":"Direction","description":"Entries on the debit side will increase debit normal accounts, while\nentries on the credit side will decrease them. Conversely, entries on\nthe credit side will increase credit normal accounts, while entries on\nthe debit side will decrease them.\n\nBy convention (?), the db will store transactions as debit-normal. For\na credit-normal account, we should flip the signs."},"DurationSummary":{"properties":{"min":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Min"},"max":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Max"},"mean":{"anyOf":[{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Mean"},"q1":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q1"},"q2":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q2"},"q3":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q3"},"lower_whisker":{"type":"integer","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"integer","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","q1","q2","q3","lower_whisker","upper_whisker"],"title":"DurationSummary","description":"Durations are in integer seconds.\nDescribes the statistical distribution of expected durations of tasks within this bucket.","examples":[{"max":1180,"mean":660,"min":112,"q1":457,"q2":650,"q3":1103}]},"EventEnvelope":{"properties":{"event_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Event Uuid"},"event_type":{"$ref":"#/components/schemas/EventType"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"version":{"type":"integer","title":"Version","default":1},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user. This is hidden unlessthe event is for the requesting user.","examples":["app-user-9329ebd"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"payload":{"oneOf":[{"$ref":"#/components/schemas/TaskEnterPayload"},{"$ref":"#/components/schemas/TaskFinishPayload"},{"$ref":"#/components/schemas/SessionEnterPayload"},{"$ref":"#/components/schemas/SessionFinishPayload"}],"title":"Payload","discriminator":{"propertyName":"event_type","mapping":{"session.enter":"#/components/schemas/SessionEnterPayload","session.finish":"#/components/schemas/SessionFinishPayload","task.enter":"#/components/schemas/TaskEnterPayload","task.finish":"#/components/schemas/TaskFinishPayload"}}}},"type":"object","required":["event_type","product_id","payload"],"title":"EventEnvelope"},"EventMessage":{"properties":{"kind":{"type":"string","const":"event","title":"Kind","default":"event"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"data":{"$ref":"#/components/schemas/EventEnvelope"}},"type":"object","required":["data"],"title":"EventMessage"},"EventType":{"type":"string","enum":["task.enter","task.finish","session.enter","session.finish","wallet.credit","wallet.debit","user.created","user.active"],"title":"EventType"},"GeoIPInformation":{"properties":{"geoname_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Geoname Id"},"continent_code":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Continent Code"},"continent_name":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Continent Name"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso","description":"The ISO code of the country associated with the IP address.","examples":["bj"]},"country_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Country Name"},"subdivision_1_iso":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Subdivision 1 Iso","description":"The ISO code of the primary subdivision (e.g., state or province)."},"subdivision_1_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subdivision 1 Name","description":"The name of the primary subdivision (e.g., state or province)."},"subdivision_2_iso":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Subdivision 2 Iso","description":"The ISO code of the secondary subdivision (if applicable)."},"subdivision_2_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subdivision 2 Name","description":"The name of the secondary subdivision (if applicable)."},"city_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"City Name","description":"The name of the city associated with the IP address.","examples":["Jasonland"]},"metro_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Metro Code"},"time_zone":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}],"title":"Time Zone","description":"The time zone associated with the geographical location.","examples":["America/St_Lucia"]},"is_in_european_union":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is In European Union"},"updated":{"type":"string","format":"date-time","title":"Updated"},"ip":{"type":"string","title":"Ip"},"registered_country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Registered Country Iso","description":"The ISO code of the country where the IP address is registered.","examples":["bd"]},"is_anonymous":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Anonymous","description":"Indicates whether the IP address is associated with an anonymous source (e.g., VPN, proxy).","examples":[false]},"is_anonymous_vpn":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Anonymous Vpn"},"is_hosting_provider":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Hosting Provider"},"is_public_proxy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Public Proxy"},"is_tor_exit_node":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Tor Exit Node"},"is_residential_proxy":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Residential Proxy"},"autonomous_system_number":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Autonomous System Number"},"autonomous_system_organization":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Autonomous System Organization"},"domain":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Domain"},"isp":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Isp","description":"The Internet Service Provider associated with the IP address.","examples":["Comcast"]},"mobile_country_code":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Mobile Country Code"},"mobile_network_code":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Mobile Network Code"},"network":{"anyOf":[{"type":"string","maxLength":56},{"type":"null"}],"title":"Network"},"organization":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Organization"},"static_ip_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Static Ip Score","description":"A score indicating the likelihood that the IP address is static."},"user_type":{"anyOf":[{"$ref":"#/components/schemas/AccessType"},{"type":"null"}],"description":"The type of user associated with the IP address (e.g., 'residential', 'business').","examples":["residential"]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postal Code","description":"The postal code associated with the IP address.","examples":["85242"]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude","description":"The latitude coordinate of the IP address location.","examples":[-67.093362]},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude","description":"The longitude coordinate of the IP address location.","examples":[-66.51243]},"accuracy_radius":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy Radius","description":"The approximate radius of accuracy for the latitude and longitude, in kilometers.","examples":[73]}},"type":"object","required":["country_iso","ip"],"title":"GeoIPInformation"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationMode":{"type":"string","enum":["platform","pass_through"],"title":"IntegrationMode"},"Leaderboard":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Id","description":"Unique ID for this leaderboard","examples":["845b0074ad533df580ebb9c80cc3bce1"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Descriptive name for the leaderboard based on the board_code","examples":["Number of Completes"]},"board_code":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts","examples":["complete_count"]},"bpid":{"type":"string","maxLength":32,"minLength":32,"title":"Bpid","description":"product_id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"country_iso":{"type":"string","title":"Country Iso","description":"The country this leaderboard is for.","examples":["us"]},"freq":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00","examples":["daily"]},"timezone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone Name","description":"The timezone for the requested country","examples":["America/New_York"]},"sort_order":{"type":"string","enum":["ascending","descending"],"title":"Sort Order","default":"descending"},"row_count":{"type":"integer","minimum":0.0,"title":"Row Count","description":"The total number of rows in the leaderboard.","examples":[2]},"rows":{"items":{"$ref":"#/components/schemas/LeaderboardRow"},"type":"array","title":"Rows","examples":[[{"bpuid":"app-user-9329ebd","rank":1,"value":4},{"bpuid":"app-user-7923skw","rank":2,"value":3}]]},"period_start_local":{"type":"string","format":"date-time","title":"Period Start Local","description":"The start of the time period covered by this board in local time, tz-aware","examples":["2024-07-12T00:00:00-04:00"]},"period_end_local":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End Local","description":"The end of the time period covered by this board in local time, tz-aware","examples":["2024-07-12T23:59:59.999999-04:00"]},"start_timestamp":{"type":"integer","title":"Start Timestamp","description":"(unix timestamp) The start time of the time range this leaderboard covers.","readOnly":true,"examples":[1720756800]},"end_timestamp":{"type":"integer","title":"End Timestamp","description":"(unix timestamp) The end time of the time range this leaderboard covers.","readOnly":true,"examples":[1720843199]},"utc_offset":{"type":"string","title":"Utc Offset","description":"The UTC offset for the timezone","readOnly":true,"examples":["-0400"]},"local_start_time":{"type":"string","title":"Local Start Time","description":"The start time of the time range this leaderboard covers (local time, in the leaderboard's timezone).","readOnly":true,"examples":["2024-07-12T00:00:00-04:00"]},"local_end_time":{"type":"string","title":"Local End Time","description":"The end time of the time range this leaderboard covers (local time, in the leaderboard's timezone).","readOnly":true,"examples":["2024-07-12T23:59:59.999999-04:00"]},"start_end_str":{"type":"string","title":"Start End Str","description":"A formatted string for time period covered by this leaderboard. Can be used to display to users.","readOnly":true,"examples":["2024-02-07 to 2024-02-08"]}},"type":"object","required":["board_code","bpid","country_iso","freq","row_count","period_start_local","start_timestamp","end_timestamp","utc_offset","local_start_time","local_end_time","start_end_str"],"title":"Leaderboard","description":"A leaderboard exists independently for each product_id in each country.\nEach country is associated with a single timezone. There is a daily,\nweekly, and monthly leaderboard."},"LeaderboardCode":{"type":"string","enum":["complete_count","largest_user_payout","sum_user_payout"],"title":"LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent."},"LeaderboardContestUserView":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"leaderboard","title":"Contest Type","default":"leaderboard"},"end_condition":{"$ref":"#/components/schemas/ContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"leaderboard_key":{"type":"string","title":"Leaderboard Key","description":"The specific leaderboard instance this contest is connected to","examples":["leaderboard:7a9d8d02334449ceb105764f77e1ba97:us:weekly:2025-05-26:complete_count"]},"tie_break_strategy":{"type":"string","const":"split_prize_pool","title":"Tie Break Strategy","default":"split_prize_pool"},"country_iso":{"type":"string","title":"Country Iso","readOnly":true},"user_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Rank","description":"The current rank of this user in this contest","readOnly":true}},"additionalProperties":false,"type":"object","required":["name","product_id","product_user_id","leaderboard_key","country_iso","user_rank"],"title":"LeaderboardContestUserView"},"LeaderboardFrequency":{"type":"string","enum":["daily","weekly","monthly"],"title":"LeaderboardFrequency","description":"The time period range for the leaderboard."},"LeaderboardResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"leaderboard":{"$ref":"#/components/schemas/Leaderboard"}},"type":"object","required":["status","leaderboard"],"title":"LeaderboardResponse"},"LeaderboardRow":{"properties":{"bpuid":{"type":"string","title":"Bpuid","description":"product_user_id","examples":["app-user-9329ebd"]},"rank":{"type":"integer","title":"Rank","description":"The numerical data ranks (1 through n) of the values. Ties are ranked using the lowest rank in the group.","examples":[1]},"value":{"type":"integer","title":"Value","description":"The value. The meaning of the value is dependent on the LeaderboardCode.","examples":[7]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Optional public name chosen by the user"}},"type":"object","required":["bpuid","rank","value"],"title":"LeaderboardRow"},"LeaderboardWinner":{"properties":{"rank":{"type":"integer","title":"Rank","description":"The user's final rank in the leaderboard","examples":[1]},"freq":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00","examples":["daily"]},"board_code":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts","examples":["complete_count"]},"country_iso":{"type":"string","title":"Country Iso","description":"The country this leaderboard is for.","examples":["us"]},"issued":{"type":"string","format":"date-time","title":"Issued","description":"When the prize was issued.","examples":["2022-10-17T05:59:14.570231Z"]},"bpuid":{"type":"string","title":"Bpuid","description":"product_user_id","examples":["app-user-9329ebd"]},"description":{"type":"string","title":"Description","examples":["Bonus for daily contest"]},"amount":{"type":"integer","title":"Amount","description":"(USD cents) The reward amount","examples":[1000]},"amount_str":{"type":"string","title":"Amount Str","description":"The amount as a formatted string in USD. Can be displayed to the user.","examples":["$10.00"]},"contest_start":{"type":"string","format":"date-time","title":"Contest Start","description":"When the leaderboard started","examples":["2022-10-16T04:00:00Z"]},"contest_end":{"type":"string","format":"date-time","title":"Contest End","description":"When the leaderboard ended","examples":["2022-10-17T04:00:00Z"]}},"type":"object","required":["rank","freq","board_code","country_iso","issued","bpuid","description","amount","amount_str","contest_start","contest_end"],"title":"LeaderboardWinner"},"LeaderboardWinnerResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"winners":{"items":{"$ref":"#/components/schemas/LeaderboardWinner"},"type":"array","title":"Winners"}},"type":"object","required":["status"],"title":"LeaderboardWinnerResponse"},"LedgerAccount":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid","description":"A unique identifier for this Ledger Account","examples":["c3c3566b5b1b4961b63a5670a2dc923d"]},"display_name":{"type":"string","maxLength":64,"title":"Display Name","description":"Human-readable description of the Ledger Account","examples":["BP Wallet c3c3566b5b1b4961b63a5670a2dc923d"]},"qualified_name":{"type":"string","maxLength":255,"title":"Qualified Name"},"account_type":{"$ref":"#/components/schemas/AccountType","description":" - `bp_commission` = BP_COMMISSION\n - `bp_wallet` = BP_WALLET\n - `user_wallet` = USER_WALLET\n - `user_attempt_credit` = USER_ATTEMPT_CREDIT\n - `cash` = CASH\n - `revenue` = REVENUE\n - `expense` = EXPENSE\n - `contest_wallet` = CONTEST_WALLET\n - `credit_line` = CREDIT_LINE\n - `wa_wallet` = WA_WALLET\n - `wa_budget_pool` = WA_BUDGET_POOL\n - `wa_held` = WA_HELD\n - `wa_credit_line` = WA_CREDIT_LINE","examples":["bp_wallet"]},"normal_balance":{"$ref":"#/components/schemas/Direction","description":" - `-1` = CREDIT\n - `1` = DEBIT"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Reference Uuid","description":"The associated Product ID or other parent account thatthis Ledger Account is intended to track transactions for.If Wallet mode is enabled, this can also handle trackingindividual users.","examples":["61dd0b086fd048518762757612b4a6d3"]},"currency":{"type":"string","maxLength":32,"title":"Currency","description":"GRL's Ledger system allows tracking of transactions inany currency possible. This is useful for trackingpoints, stars, coins, or any other currency that may beused in a Supplier's platform.","default":"USD"}},"type":"object","required":["display_name","qualified_name","account_type","normal_balance"],"title":"LedgerAccount"},"LedgerEntry":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"direction":{"$ref":"#/components/schemas/Direction"},"account_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Account Uuid"},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount. A LedgerEntry cannot be made for0 USDCent and it cannot be negative.","examples":[531]},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transaction Id"}},"type":"object","required":["direction","account_uuid","amount"],"title":"LedgerEntry"},"LedgerTransaction":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction (TX) was created into the database.This does not represent the exact time for any actionwhich may be responsible for this Transaction (TX), and TX timestamps will likely be a few milliseconds delayed"},"ext_description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ext Description"},"tag":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Tag"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"entries":{"items":{"$ref":"#/components/schemas/LedgerEntry"},"type":"array","title":"Entries","description":"A Transaction (TX) is composed of multiple Entry events."}},"additionalProperties":false,"type":"object","title":"LedgerTransaction"},"ManageCashoutBody":{"properties":{"payout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Id"},"new_status":{"$ref":"#/components/schemas/PayoutStatus"}},"type":"object","required":["payout_id","new_status"],"title":"ManageCashoutBody"},"MarketProfileKnowledge":{"properties":{"source":{"$ref":"#/components/schemas/Source","maxLength":16,"description":"Marketplace this question is from"},"question_id":{"type":"string","title":"Question Id","examples":["gender","1843","gender_plus"]},"answer":{"items":{"type":"string"},"type":"array","title":"Answer","examples":[["male"],["7657644"],["1"]]},"created":{"type":"string","format":"date-time","title":"Created","description":"When the User submitted this Profiling data"}},"type":"object","required":["source","question_id","created"],"title":"MarketProfileKnowledge","description":"This is used solely in API responses, so it is simplified."},"MarketplaceBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"source":{"type":"string","enum":["innovate","dynata","schlesinger","purespectrum","morning","pollfish","precision","repdata","prodege"],"title":"Source","description":"this is the source of the contents","examples":["pollfish"]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","source"],"title":"MarketplaceBucket"},"MarketplaceInventorySummary":{"properties":{"live_tasks":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Live Tasks","description":"The count of tasks that are currently live"},"live_gen_pop_tasks":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Live Gen Pop Tasks","description":"The count of gen-pop tasks that are currently live"},"tasks_created":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Tasks Created","description":"The count of tasks created"},"required_finishes":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Required Finishes","description":"Number of finishes needed across all live tasks"},"payout":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Payout","description":"The distribution of payouts for all live tasks"},"expected_duration":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Expected Duration","description":"The distribution of expected durations for all live tasks"},"required_finishes_per_task":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Required Finishes Per Task","description":"The distribution of required finishes on all live tasks"}},"type":"object","title":"MarketplaceInventorySummary"},"MarketplaceOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/MarketplaceBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"MarketplaceOfferwall","description":"Returns buckets grouped by marketplace, one per marketplace, with the\ntasks ordered by quality.\n\nOfferwall code: `5fa23085`"},"MarketplaceOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/MarketplaceOfferwall"}},"type":"object","required":["info","offerwall"],"title":"MarketplaceOfferwallResponse"},"MarketplaceSummary":{"properties":{"inventory":{"$ref":"#/components/schemas/MarketplaceInventorySummary","description":"Inventory of the marketplace"},"user_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Activity","description":"User activity of the marketplace"}},"type":"object","required":["inventory"],"title":"MarketplaceSummary"},"MaxGaugeBySource":{"properties":{"value":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Value"},"by_source":{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"By Source"}},"type":"object","title":"MaxGaugeBySource"},"MilestoneContestEndCondition":{"properties":{"max_winners":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Winners","description":"The contest will end once this many users have won (i.e. reachedthe milestone)."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The Contest is over at the ends_at time."}},"type":"object","title":"MilestoneContestEndCondition","description":"Defines the conditions to evaluate to determine when the contest is over.\nMultiple conditions can be set. The contest is over once ANY conditions are met."},"MilestoneUserView":{"properties":{"target_amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Target Amount","description":"Each user 'wins' (receives prizes) once this target amount is reached."},"entry_trigger":{"anyOf":[{"$ref":"#/components/schemas/ContestEntryTrigger"},{"type":"null"}],"description":"What user action triggers an entry automatically."},"valid_for":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Valid For","description":"The time after valid_for_event for which the contest is open"},"valid_for_event":{"anyOf":[{"type":"string","const":"signup"},{"type":"null"}],"title":"Valid For Event"},"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"milestone","title":"Contest Type","default":"milestone"},"end_condition":{"$ref":"#/components/schemas/MilestoneContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"entry_type":{"type":"string","const":"count","title":"Entry Type","default":"count"},"win_count":{"type":"integer","title":"Win Count","description":"The number of times the milestone has been reached.","default":0},"user_amount":{"type":"integer","title":"User Amount","description":"The total amount for this user for this contest"}},"additionalProperties":false,"type":"object","required":["target_amount","name","end_condition","product_id","product_user_id","user_amount"],"title":"MilestoneUserView"},"OfferWallCategoryRequest":{"properties":{"adwords_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Adwords Category","examples":[["45","65"]]},"category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category","examples":[["98c137e4e90a4d92ac6c00e523eb1b50"]]},"exclude_adwords_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Adwords Category","examples":[["1558"]]},"exclude_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Category","examples":[["21536f160f784189be6194ca894f3a65","7aa8bf4e71a84dc3b2035f93f9f9c77e"]]}},"type":"object","title":"OfferWallCategoryRequest"},"OfferWallInfo":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"OfferWallInfo"},"OfferWallRequestYieldmanParams":{"properties":{"conversion_factor_adj":{"type":"number","title":"Conversion Factor Adj","description":"Centered around 0. Higher results in higher weight given to conversion (in the scoring function)","default":0.0},"dropoffrate_factor_adj":{"type":"number","title":"Dropoffrate Factor Adj","description":"Centered around 0. Higher results in higher penalty given to dropoffs (in the scoring function)","default":0.0},"longfail_factor_adj":{"type":"number","title":"Longfail Factor Adj","description":"Centered around 0. Higher results in higher penalty given to long fail (in the scoring function)","default":0.0},"recon_factor_adj":{"type":"number","title":"Recon Factor Adj","description":"Centered around 0. Higher results in higher penalty given to recons (in the scoring function)","default":0.0},"recon_likelihood_max":{"type":"number","title":"Recon Likelihood Max","description":"Tolerance for recon likelihood (0 to 1)","default":0.8}},"type":"object","title":"OfferWallRequestYieldmanParams"},"OfferwallConfig":{"properties":{},"type":"object","title":"OfferwallConfig"},"OfferwallReason":{"type":"string","enum":["USER_BLOCKED","HIGH_RECON_RATE","UNCOMMON_DEMOGRAPHICS","UNDER_MINIMUM_AGE","EXHAUSTED_HIGH_VALUE_SUPPLY","ALL_ELIGIBLE_ATTEMPTED","LOW_CURRENT_SUPPLY"],"title":"OfferwallReason"},"OneShotOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/OneShotOfferwallBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"OneShotOfferwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.\n\nOfferwall code: `6f27b1ae`"},"OneShotOfferwallBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"duration":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Duration","description":"The bucket's expected duration, in seconds"},"min_payout":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min Payout","description":"The bucket's min payout, in usd cents"}},"additionalProperties":false,"type":"object","required":["id","uri","duration","min_payout"],"title":"OneShotOfferwallBucket"},"OneShotOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/OneShotOfferwall"}},"type":"object","required":["info","offerwall"],"title":"OneShotOfferwallResponse"},"POPFinancial":{"properties":{"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["acdb85c0874547659084ac88049e1bb1"]},"time":{"type":"string","format":"date-time","title":"Time","description":"The starting time block for the respective 'Period' thatthis grouping is on. The `time` could be the start of a 1 minute or 1 hour block for example."},"payout":{"type":"integer","minimum":0.0,"title":"Payout","description":"The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period.","default":0,"examples":[59050]},"adjustment":{"type":"integer","title":"Adjustment","description":"The total amount (in USD cents) that the Brokerage Producthas had adjusted within a respective time period. Most ofthe time, this will be negative due to Complete to Incomplete reconciliations. However, it can also be positive due to Incomplete to Complete adjustments.","examples":[464]},"adjustment_types":{"items":{"$ref":"#/components/schemas/AdjustmentType"},"type":"array","title":"Adjustment Types"},"expense":{"type":"integer","title":"Expense","description":"For Product accounts that are setup with Respondent payouts,competitions, user bonuses, or other associated 'costs', thoseexpenses are accounted for here. This will be negative forthose types of costs."},"net":{"type":"integer","title":"Net","description":"This is the sum of the Payout total, Adjustment and any Expenses total. It can be positive or negative for any specific time period.","examples":[59514]},"payment":{"type":"integer","title":"Payment","description":"Any ACH or Wire amount that was issued between GRL and the Supplier.","examples":[3408288]}},"type":"object","required":["time","adjustment","adjustment_types","expense","net","payment"],"title":"POPFinancial","description":"We can't use our USDCent class in here because aside from it not\n supporting negative values for our adjustments, FastAPI also\n complains because it doesn't know how to generate documentation\n for it. - Max 2024-06-25"},"PatternValidation":{"properties":{"message":{"type":"string","title":"Message","description":"Message to display if validation fails"},"pattern":{"type":"string","title":"Pattern","description":"Regex string to validate. min_length and max_length are checked separately, even if they are part of the regex."}},"type":"object","required":["message","pattern"],"title":"PatternValidation"},"PayoutConfig":{"properties":{"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"payout_transformation":{"anyOf":[{"$ref":"#/components/schemas/PayoutTransformation"},{"type":"null"}],"description":"How the BP's payout is converted to the User's payout"}},"type":"object","title":"PayoutConfig","description":"Store configuration related to payouts, payout transformation, and user\npayout formatting."},"PayoutStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","CANCELLED","FAILED","COMPLETE"],"title":"PayoutStatus","description":"The max size of the db field that holds this value is 20, so please\ndon't add new values longer than that!"},"PayoutSummary":{"properties":{"min":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min"},"max":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Max"},"mean":{"anyOf":[{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Mean"},"q1":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q1"},"q2":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q2"},"q3":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q3"},"lower_whisker":{"type":"integer","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"integer","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","q1","q2","q3","lower_whisker","upper_whisker"],"title":"PayoutSummary","description":"Payouts are in Integer USD Cents","examples":[{"max":132,"min":14,"q1":45,"q2":68,"q3":124}]},"PayoutTransformation":{"properties":{"f":{"type":"string","enum":["payout_transformation_percent","payout_transformation_amt"],"title":"F","description":"The name of the transformation function to use."},"kwargs":{"anyOf":[{"$ref":"#/components/schemas/PayoutTransformationPercentArgs"},{"type":"null"}],"description":"The kwargs to pass to the transformation function.","examples":[{"max_payout":"5.00","pct":0.5}]}},"type":"object","required":["f"],"title":"PayoutTransformation","description":"This model describe how the bp_payout is converted to the user_payout.\nIf None, the user_payout is None.\n\nIf the user_wallet_enabled is `False`, the user_payout is used to\n 1) know how to transform the expected payouts for offerwall buckets\n (if min_payout is requested, this is based on the user_payout)\n 2) show the user (using the payout_format) how much they made (in\n the Task Status Response).\n\nIf the user_wallet_enabled is `True`, then in addition to the above, the\n user_payout is the amount actually paid to the user's wallet."},"PayoutTransformationPercentArgs":{"properties":{"pct":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Pct","description":"The percentage of the bp_payout to pay the user","examples":[0.5]},"min_payout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Payout","description":"The minimum amount paid for a complete. Note: This does not check that the actual payout was at least this amount.","examples":["0.50"]},"max_payout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Payout","description":"The maximum amount paid for a complete","examples":["5.00"]}},"type":"object","required":["pct"],"title":"PayoutTransformationPercentArgs"},"PayoutType":{"type":"string","enum":["PAYPAL","TANGO","DWOLLA","ACH","WIRE","CASH_IN_MAIL","PRIZE","AMT","AMT_BONUS","AMT_ASSIGNMENT","AMT_ASSIGNMENT"],"title":"PayoutType","description":"The method in which the requested payout is delivered."},"PaypalCashoutMethodData":{"properties":{"type":{"type":"string","const":"PAYPAL","title":"Type","default":"PAYPAL"},"email":{"type":"string","format":"email","title":"Email","description":"Email address of the paypal user","examples":["test@example.com"]}},"type":"object","required":["email"],"title":"PaypalCashoutMethodData"},"PingMessage":{"properties":{"kind":{"type":"string","const":"ping","title":"Kind","default":"ping"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"PingMessage"},"PongMessage":{"properties":{"kind":{"type":"string","const":"pong","title":"Kind","default":"pong"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"PongMessage"},"Product":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier of the Brokerage Product","examples":["1108d053e4fa47c5b0dbdcd03a7981e7"]},"name":{"type":"string","maxLength":255,"minLength":3,"title":"Name","description":"Name of the Brokerage Product. Must be unique within a Team","examples":["Website ABC"]},"enabled":{"type":"boolean","title":"Enabled","description":"This is only used to hard block a Product in order to immediately & safely protect against fraud entrances.","default":true},"payments_enabled":{"type":"boolean","title":"Payments Enabled","description":"This is only to determine if ACH or Wire payments should be made to the Product.","default":true},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the Product was created, this does necessarily mean it started to retrieve traffic at that time."},"team_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Team Id","description":"The organization (group of generalresearch.com admin accounts) that is allowed to modify and manage thisProduct","examples":["b96c1209cf4a4baaa27d38082421a039"]},"business_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Business Id","description":"The legal business entity or individual that is responsible for this account, and that receive SupplierPayments for this Product's activity.","examples":["26bac7a8244b4c0da0c31384e3789fe3"]},"tags":{"items":{"$ref":"#/components/schemas/SupplierTag"},"type":"array","uniqueItems":true,"title":"Tags","description":"Tags which are used to annotate supplier traffic"},"commission_pct":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,1}|(?=[\\d.]{1,7}0*$)\\d{0,1}\\.\\d{0,5}0*$)","title":"Commission Pct","default":"0.05"},"redirect_url":{"type":"string","title":"Redirect Url","description":"Where to redirect the user after finishing a session. When a user get redirected back to the supplier, a query param will be added with the name 'tsid', and the value of the TSID for the session. For example: callback_uri: 'https://www.example.com/test/?a=1&b=2' might result in the user getting redirected to: 'https://www.example.com/grl-callback/?a=1&b=2&tsid=c6ab6ba1e75b44e2bf5aab00fc68e3b7'.","examples":["https://www.example.com/grl-callback/?a=1&b=2"]},"harmonizer_domain":{"type":"string","title":"Harmonizer Domain","description":"This is the domain that is used for the GRS (General Research Survey) platform. This is a simple javascript application which may profile the respondent for anyprofiling questions, along with collecting any browserbased security information. The value is a scheme+domain only (no path).","default":"https://profile.generalresearch.com/"},"sources_config":{"anyOf":[{"$ref":"#/components/schemas/SourcesConfig"},{"$ref":"#/components/schemas/SupplyConfig"}],"title":"Sources Config"},"session_config":{"$ref":"#/components/schemas/SessionConfig"},"payout_config":{"$ref":"#/components/schemas/PayoutConfig"},"user_wallet_config":{"$ref":"#/components/schemas/UserWalletConfig"},"user_create_config":{"$ref":"#/components/schemas/UserCreateConfig"},"offerwall_config":{"$ref":"#/components/schemas/OfferwallConfig"},"profiling_config":{"$ref":"#/components/schemas/ProfilingConfig"},"user_health_config":{"$ref":"#/components/schemas/UserHealthConfig"},"yield_man_config":{"$ref":"#/components/schemas/YieldManConfig"},"balance":{"anyOf":[{"$ref":"#/components/schemas/ProductBalances"},{"type":"null"}],"description":"Product Balance"},"payouts_total_str":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payouts Total Str"},"payouts_total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Payouts Total"},"payouts":{"anyOf":[{"items":{"$ref":"#/components/schemas/BrokerageProductPayoutEvent"},"type":"array"},{"type":"null"}],"title":"Payouts","description":"Product Payouts. These are the ACH or Wire payments that were sent to theBusiness on behalf of this specific Product"},"pop_financial":{"anyOf":[{"items":{"$ref":"#/components/schemas/POPFinancial"},"type":"array"},{"type":"null"}],"title":"Pop Financial"},"bp_account":{"anyOf":[{"$ref":"#/components/schemas/LedgerAccount"},{"type":"null"}]},"user_wallet":{"$ref":"#/components/schemas/UserWalletConfig","readOnly":true}},"type":"object","required":["name","redirect_url","user_wallet"],"title":"Product"},"ProductBalances":{"properties":{"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["7e94ebe63bbc4509876c4914cc61a984"]},"last_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event"},"bp_payment_credit":{"type":"integer","minimum":0.0,"title":"Bp Payment Credit","description":"The total amount that has been earned by the Task completes, for this Brokerage Product account.","default":0,"examples":[18837]},"adjustment_credit":{"type":"integer","minimum":0.0,"title":"Adjustment Credit","description":"Positive reconciliations issued back to the Brokerage Product account.","default":0,"examples":[2]},"adjustment_debit":{"type":"integer","minimum":0.0,"title":"Adjustment Debit","description":"Negative reconciliations for any Task completes","default":0,"examples":[753]},"supplier_credit":{"type":"integer","minimum":0.0,"title":"Supplier Credit","description":"ACH or Wire amounts issued to GRL from a Supplier to recoup for a negative Brokerage Product balance","default":0,"examples":[0]},"supplier_debit":{"type":"integer","minimum":0.0,"title":"Supplier Debit","description":"ACH or Wire amounts sent to a Supplier","default":0,"examples":[10000]},"user_bonus_credit":{"type":"integer","minimum":0.0,"title":"User Bonus Credit","description":"If a respondent ever pays back an product account.","default":0,"examples":[0]},"user_bonus_debit":{"type":"integer","minimum":0.0,"title":"User Bonus Debit","description":"Pay a user into their wallet balance. There is no fee here. There is only a fee when the user requests a payout.The bonus could be as a bribe, winnings for a contest, leaderboard, etc.","default":0,"examples":[2745]},"issued_payment":{"type":"integer","minimum":0.0,"title":"Issued Payment","description":"This is the amount that we decide to credit as havingtaken from this Product. If there is any amount not issuedit is summed up over the Business to offset any negativebalances elsewhere.","default":0},"payout":{"type":"integer","title":"Task Payouts","description":"The sum amount of all Task payouts","readOnly":true,"examples":[18837]},"payout_usd_str":{"type":"string","title":"Task Payouts USD Str","readOnly":true,"examples":["$18,837.00"]},"adjustment":{"type":"integer","title":"Task Adjustments","description":"The sum amount of all Task Adjustments","readOnly":true,"examples":[-751]},"expense":{"type":"integer","title":"Product Expenses","description":"The sum amount of any associated Product Expenses (eg: user bonuses)","readOnly":true,"examples":[-2745]},"net":{"type":"integer","title":"Net Earnings","description":"The Product's Net Earnings which is equal to the totalamount of Task Payouts, with Task Adjustments and anyProduct Expenses deducted. This can be positive ornegative.","readOnly":true,"examples":[15341]},"payment":{"type":"integer","minimum":0.0,"title":"Supplier Payments","description":"The sum amount of all Supplier Payments (eg ACH or Wire transfers)","readOnly":true,"examples":[10000]},"payment_usd_str":{"type":"string","title":"Supplier Payments","readOnly":true,"examples":["$10,000"]},"balance":{"type":"integer","title":"Product Balance","description":"The Product's Balance which is equal to the Product's Netamount with already issued Supplier Payments deducted. This can be positive or negative.","readOnly":true,"examples":[5341]},"retainer":{"type":"integer","minimum":0.0,"title":"Smart Retainer","description":"The Smart Retainer is an about of money that is held byGRL to account for any Task Adjustments that may occurin the future. The amount will always be positive, andif the Product's balance is negative, the retainer will be $0.00 as the Product is not eligible for any SupplierPayments either way.","readOnly":true,"examples":[1335]},"retainer_usd_str":{"type":"string","title":"Smart Retainer USD Str","readOnly":true,"examples":["$1,335.00"]},"available_balance":{"type":"integer","minimum":0.0,"title":"Available Balance","description":"The Available Balance is the amount that is currently, andimmediately available for withdraw from the Supplier'sbalance. Supplier Payments are made every Friday for Businesses with an ACH connected Bank Account to GRL, while a Business that requires an International Wire are issued on the last Friday of every Month.","readOnly":true,"examples":[4006]},"available_balance_usd_str":{"type":"string","title":"Available Balance USD Str","readOnly":true,"examples":["$4,006.00"]},"recoup":{"type":"integer","minimum":0.0,"title":"Recoup","description":"The amount that must be held back to recover a negative Product balance. This is $0.00 when the Product balance is positive or zero; otherwise it is the absolute value of the negative balance. Business-level payout calculations use this amount to offset deficits from one Product against available funds from other Products before issuing Supplier Payments.","readOnly":true,"examples":[282]},"recoup_usd_str":{"type":"string","title":"Recoup Str","readOnly":true,"examples":["$2.04"]},"adjustment_percent":{"type":"number","title":"Adjustment Percentage","description":"The percentage of USDCent value that has been adjustedover all time for this Product.","readOnly":true,"examples":[0.064938]}},"type":"object","required":["payout","payout_usd_str","adjustment","expense","net","payment","payment_usd_str","balance","retainer","retainer_usd_str","available_balance","available_balance_usd_str","recoup","recoup_usd_str","adjustment_percent"],"title":"ProductBalances"},"ProfilingConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"If False, the harmonizer/profiling system is not used at all. This should never be False unless special circumstances","default":true},"grs_enabled":{"type":"boolean","title":"Grs Enabled","description":"If grs_enabled is False, and is_grs is passed in the \n profiling-questions call, then don't actually return any questions. \n This allows a client to hit the endpoint with no limit and still get \n questions. In effect, this means that we'll redirect the user through \n the GRS system but won't present them any questions.","default":true},"n_questions":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"N Questions","description":"Use to hard code the number of questions to ask. None means use default algorithm."},"max_questions":{"type":"integer","exclusiveMinimum":0.0,"title":"Max Questions","description":"The max number of questions we would ask in a session","default":10},"avg_question_count":{"type":"number","exclusiveMinimum":0.0,"title":"Avg Question Count","description":"The average number of questions to ask in a session","default":5},"task_injection_freq_mult":{"type":"number","exclusiveMinimum":0.0,"title":"Task Injection Freq Mult","description":"Scale how frequently we inject profiling questions, \n relative to the default. 1 is default, 2 is twice as often. 10 means \n always. 0.5 half as often","default":1},"non_us_mult":{"type":"number","exclusiveMinimum":0.0,"title":"Non Us Mult","description":"Non-us multiplier, used to increase freq and length of \n profilers in all non-us countries. This value is multiplied by \n task_injection_freq_mult and avg_question_count.","default":2},"hidden_questions_expiration_hours":{"type":"integer","exclusiveMinimum":0.0,"title":"Hidden Questions Expiration Hours","description":"How frequently we should refresh hidden questions","default":168}},"type":"object","title":"ProfilingConfig"},"ProfilingInfoResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"profiling-info":{"items":{"$ref":"#/components/schemas/UpkProperty"},"type":"array","title":"Profiling-Info"}},"type":"object","required":["status","profiling-info"],"title":"ProfilingInfoResponse"},"PropertyType":{"type":"string","enum":["i","n","x"],"title":"PropertyType"},"RaffleUserView":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"raffle","title":"Contest Type","default":"raffle"},"end_condition":{"$ref":"#/components/schemas/ContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"entry_type":{"type":"string","const":"cash","title":"Entry Type","default":"cash"},"entry_rule":{"$ref":"#/components/schemas/ContestEntryRule"},"current_amount":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"Current Amount","description":"Sum of all entry amounts","default":0},"current_participants":{"type":"integer","title":"Current Participants","description":"Count of unique participants","default":0},"user_amount":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"User Amount","description":"The total amount this user has entered"},"user_amount_today":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"User Amount Today","description":"The total amount this user has entered in the past 24 hours"},"current_win_probability":{"type":"number","title":"Current Win Probability","description":"Probability of this user winning 1 or more prizes, if the contestended right now","readOnly":true},"projected_win_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Win Probability","description":"Probability of this user winning 1 or more prizes, once the contestis projected to end. This value is only calculated if the contest has a target_entry_amountend condition.","readOnly":true}},"additionalProperties":false,"type":"object","required":["name","end_condition","product_id","product_user_id","user_amount","user_amount_today","current_win_probability","projected_win_probability"],"title":"RaffleUserView"},"RedemptionCurrency":{"type":"string","enum":["USD","CAD","GBP","EUR","INR","AUD","PLN","SEK","SGD","MXN"],"title":"RedemptionCurrency","description":"Supported Currencies for Foreign Redemptions"},"ReportTask":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"product_user_id","description":"The unique identifier for the user, which is set by the Supplier.","examples":["app-user-9329ebd"]},"reasons":{"items":{"$ref":"#/components/schemas/ReportValue"},"type":"array","title":"Reasons","description":"The reason a user reported a task.\n\nAllowed values: \n - __0__ *(REASON_UNKNOWN)*: Used to indicate the user exited the task without giving feedback\n - __1__ *(TECHNICAL_ERROR)*: Task is in the wrong language/country, unanswerable question, won't proceed to next question, loading forever, error message\n - __2__ *(NO_REDIRECT)*: Task ended (completed or failed, and showed the user some dialog indicating the task was over), but failed to redirect\n - __3__ *(PRIVACY_INVASION)*: Asked for full name, home address, identity on another site, cc\n - __4__ *(UNCOMFORTABLE_TOPICS)*: Asked about children, employer, medical issues, drug use, STDs, etc.\n - __5__ *(ASKED_FOR_NOT_ALLOWED_ACTION)*: Asked to install software, signup/login to external site, access webcam, promise to pay using external site, etc.\n - __6__ *(BAD_ON_MOBILE)*: Task doesn't work well on a mobile device\n - __7__ *(DIDNT_LIKE)*: Too long, too boring, confusing, complicated, too many open-ended/free-response questions","examples":[[3,4]]},"notes":{"type":"string","title":"Notes","default":"","examples":["The survey wanted to watch me eat Haejang-guk"]}},"additionalProperties":false,"type":"object","required":["bpuid"],"title":"ReportTask"},"ReportValue":{"type":"integer","enum":[0,1,2,3,4,5,6,7],"title":"ReportValue","description":"The reason a user reported a task."},"Scope":{"type":"string","enum":["global","team","product"],"title":"Scope"},"SessionAdjustedStatus":{"type":"string","enum":["ac","af","pa"],"title":"SessionAdjustedStatus","description":"An adjusted_status is set if a session is adjusted by the marketplace\nafter the original return. A session can be adjusted multiple times.\nThis is the most recent status. If a session was originally a complete,\nwas adjusted to incomplete, then back to complete, the adjusted_status\nwill be None, but the adjusted_timestamp will be set to the most recent\nchange."},"SessionConfig":{"properties":{"max_session_len":{"type":"integer","maximum":5400.0,"minimum":60.0,"title":"Max Session Len","description":"The amount of time (in seconds) that a respondent may spend attempting to get into a survey within a session.If NULL, there is no limit.","default":600},"max_session_hard_retry":{"type":"integer","minimum":0.0,"title":"Max Session Hard Retry","description":"The number of surveys that a respondent may attempt within a session before the session is terminated.","default":5},"min_payout":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Min Payout","description":"The minimum amount the user should be paid for a complete. If \n no payout transformation is defined, the value is based on the BP's payout. \n If a payout transformation is defined, the min_payout is applied on the \n user's payout. Note, this is separate and distinct from the payout \n transformation's min payout. The payout transformation's min_payout does not \n care what the task's actual payout was. This min_payout will prevent\n the user from being show any tasks that would pay below this amount.","default":"0.14","examples":["0.50"]}},"type":"object","title":"SessionConfig","description":"Stores configuration related to the Session, a session being a users\nexperience attempting to do work."},"SessionEnterPayload":{"properties":{"event_type":{"type":"string","const":"session.enter","title":"Event Type","default":"session.enter"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"}},"type":"object","required":["country_iso"],"title":"SessionEnterPayload"},"SessionFinishPayload":{"properties":{"event_type":{"type":"string","const":"session.finish","title":"Event Type","default":"session.finish"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"duration_sec":{"type":"number","exclusiveMinimum":0.0,"title":"Duration Sec"},"status":{"$ref":"#/components/schemas/Status"},"status_code_1":{"anyOf":[{"$ref":"#/components/schemas/StatusCode1"},{"type":"null"}]},"status_code_2":{"anyOf":[{"$ref":"#/components/schemas/SessionStatusCode2"},{"type":"null"}]},"user_payout":{"anyOf":[{"type":"integer","maximum":4000.0,"minimum":0.0},{"type":"null"}],"title":"User Payout"}},"type":"object","required":["country_iso","duration_sec","status"],"title":"SessionFinishPayload"},"SessionStatusCode2":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13],"title":"SessionStatusCode2","description":"__Status Detail__\nThis should be set if the Session.status_code_1 is SESSION_XXX_FAIL"},"ShippingCarrier":{"type":"string","enum":["USPS","FedEx","UPS","DHL"],"title":"ShippingCarrier"},"ShippingMethod":{"type":"string","enum":["Standard","Express","Two-Day","Overnight","Same Day"],"title":"ShippingMethod"},"SoftPairBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way. If the eligibility is conditional or ineligible, the uri will be null.","examples":[null]},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"eligibility":{"type":"string","enum":["conditional","unconditional","ineligible"],"title":"Eligibility","examples":["conditional"]},"missing_questions":{"items":{"type":"string"},"type":"array","title":"Missing Questions","examples":[["fb20fd4773304500b39c4f6de0012a5a"]]},"loi":{"type":"integer","title":"Loi","description":"this is the max loi of the contents","examples":[612]},"payout":{"type":"integer","title":"Payout","description":"this is the min payout of the contents","examples":[123]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","eligibility","loi","payout"],"title":"SoftPairBucket"},"SoftPairOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/SoftPairBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]},"question_info":{"additionalProperties":{"$ref":"#/components/schemas/UpkQuestion"},"type":"object","title":"Question Info","examples":[]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"SoftPairOfferwall","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.\n\nOfferwall code: `37d1da64`"},"SoftPairOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/SoftPairOfferwall"}},"type":"object","required":["info","offerwall"],"title":"SoftPairOfferwallResponse"},"Source":{"type":"string","enum":["g","c","a","d","et","f","i","l","m","n","o","e","r","pr","p","rd","h","s","t","u","w"],"title":"Source"},"SourceConfig":{"properties":{"name":{"$ref":"#/components/schemas/Source"},"active":{"type":"boolean","title":"Active","default":true},"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_mobile_ip":{"type":"boolean","title":"Allow Mobile Ip","default":true},"allow_pii_only_buyers":{"type":"boolean","title":"Allow Pii Only Buyers","description":"Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum.","default":false},"allow_unhashed_buyers":{"type":"boolean","title":"Allow Unhashed Buyers","description":"Return Tasks from Buyers that don't have URL hashing enabled. Only supported on Pure Spectrum.","default":false},"withhold_profiling":{"type":"boolean","title":"Withhold Profiling","description":"For some Products, we may have privacy agreements prohibiting us from sharing information with the inventorySource. If True, don't add MRPQ (Market Research ProfilingQuestion) onto the entry link.","default":false},"pass_unconditional_eligible_unknowns":{"type":"boolean","title":"Pass Unconditional Eligible Unknowns","description":"Not used at the moment","default":true}},"type":"object","required":["name"],"title":"SourceConfig","description":"This could also be named \"BP:Marketplace Config\", as it describes the\nconfig for a BP on a single marketplace."},"SourcesConfig":{"properties":{"user_defined":{"items":{"$ref":"#/components/schemas/SourceConfig"},"type":"array","title":"User Defined"}},"type":"object","title":"SourcesConfig","description":"Describes the marketplaces or sources that a BP can access and their\nrespective configs,\naka 'BP:Marketplace Configs'"},"StarwallPlusBlockOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusBlockOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.\n\nOfferwall code: `7fa1b3f4`"},"StarwallPlusBlockOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusBlockOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusBlockOfferWallResponse"},"StarwallPlusBlockRecontactOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusRecontactBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusBlockRecontactOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents, no\nbuckets are returned if the user is blocked, and each bucket includes\na recontact key.\n\nOfferwall code: `630db2a4`"},"StarwallPlusBlockRecontactOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusBlockRecontactOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusBlockRecontactOfferWallResponse"},"StarwallPlusOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents.\n\nOfferwall code: `5481f322`"},"StarwallPlusOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusOfferWallResponse"},"StatisticalSummaryStat":{"properties":{"facet":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"propertyNames":{"enum":["country_iso","day","month"]},"type":"object","title":"Facet","description":"The grouping criteria","examples":[{"country_iso":"us"}]},"value":{"$ref":"#/components/schemas/StatisticalSummaryValue","description":"Statistical Summary for the given metric and facet"}},"type":"object","required":["facet","value"],"title":"StatisticalSummaryStat"},"StatisticalSummaryValue":{"properties":{"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"mean":{"type":"number","title":"Mean"},"q1":{"type":"number","title":"Q1"},"q2":{"type":"number","title":"Q2","description":"equal to the median"},"q3":{"type":"number","title":"Q3"},"lower_whisker":{"type":"number","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"number","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","mean","q1","q2","q3","lower_whisker","upper_whisker"],"title":"StatisticalSummaryValue"},"StatsMessage":{"properties":{"kind":{"type":"string","const":"stats","title":"Kind","default":"stats"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Country Iso"},"data":{"$ref":"#/components/schemas/StatsSnapshot"}},"type":"object","required":["data"],"title":"StatsMessage"},"StatsSnapshot":{"properties":{"live_task_count":{"$ref":"#/components/schemas/AggregateBySource"},"task_created_count_last_1h":{"$ref":"#/components/schemas/AggregateBySource"},"task_created_count_last_24h":{"$ref":"#/components/schemas/AggregateBySource"},"live_tasks_max_payout":{"$ref":"#/components/schemas/MaxGaugeBySource","description":"In integer USDCents"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Country Iso"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"active_users_last_1h":{"type":"integer","minimum":0.0,"title":"Active Users Last 1H","description":"Count of users (in this product_id) that were active in the past 60 minutes.\n Behaviors that trigger active:\n - Request an offerwall\n - Enter an offerwall bucket\n - Request profiling questions\n - Submit profiling answers\n - Update user profile\n ","default":0},"active_users_last_24h":{"type":"integer","minimum":0.0,"title":"Active Users Last 24H","description":"Count of users (in this product_id) that were active in the past 24 hours.","default":0},"in_progress_users":{"type":"integer","minimum":0.0,"title":"In Progress Users","description":"Count of users that are currently doing work at this moment"},"signups_last_24h":{"type":"integer","minimum":0.0,"title":"Signups Last 24H","description":"Count of users created"},"session_enters_last_1h":{"type":"integer","minimum":0.0,"title":"Session Enters Last 1H"},"session_enters_last_24h":{"type":"integer","minimum":0.0,"title":"Session Enters Last 24H"},"session_fails_last_1h":{"type":"integer","minimum":0.0,"title":"Session Fails Last 1H"},"session_fails_last_24h":{"type":"integer","minimum":0.0,"title":"Session Fails Last 24H"},"session_completes_last_1h":{"type":"integer","minimum":0.0,"title":"Session Completes Last 1H"},"session_completes_last_24h":{"type":"integer","minimum":0.0,"title":"Session Completes Last 24H"},"sum_payouts_last_1h":{"type":"integer","minimum":0.0,"title":"Sum Payouts Last 1H","description":"In integer USDCents"},"sum_payouts_last_24h":{"type":"integer","minimum":0.0,"title":"Sum Payouts Last 24H","description":"In integer USDCents"},"session_avg_payout_last_24h":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Session Avg Payout Last 24H","description":"Average (actual) payout of all tasks completed in the past 24 hrs"},"session_avg_user_payout_last_24h":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Session Avg User Payout Last 24H","description":"Average (actual) user payout of all tasks completed in the past 24 hrs"},"session_fail_avg_loi_last_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Session Fail Avg Loi Last 24H","description":"Average LOI of all tasks terminated in the past 24 hrs (excludes abandons)"},"session_complete_avg_loi_last_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Session Complete Avg Loi Last 24H","description":"Average LOI of all tasks completed in the past 24 hrs"}},"type":"object","required":["in_progress_users","signups_last_24h","session_enters_last_1h","session_enters_last_24h","session_fails_last_1h","session_fails_last_24h","session_completes_last_1h","session_completes_last_24h","sum_payouts_last_1h","sum_payouts_last_24h","session_avg_payout_last_24h","session_avg_user_payout_last_24h","session_fail_avg_loi_last_24h","session_complete_avg_loi_last_24h"],"title":"StatsSnapshot"},"Status":{"type":"string","enum":["c","f","a","t"],"title":"Status","description":"The outcome of a session or wall event. If the session is still in\nprogress, the status will be NULL."},"StatusCode1":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],"title":"StatusCode1","description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT"},"StatusInfoResponseFail":{"properties":{"info":{"$ref":"#/components/schemas/StatusSuccessFail"},"msg":{"type":"string","title":"Msg","description":"An optional message, if success is False","examples":["An error has occurred"]}},"type":"object","required":["info","msg"],"title":"StatusInfoResponseFail"},"StatusResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]}},"type":"object","required":["status"],"title":"StatusResponse"},"StatusResponseFailure":{"properties":{"status":{"type":"string","const":"failure","title":"Status","description":"The status of the API response.","examples":["failure"]},"msg":{"type":"string","title":"Msg","description":"An optional message, if the status is failure.","examples":["An error has occurred"]}},"type":"object","required":["status","msg"],"title":"StatusResponseFailure"},"StatusSuccessFail":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the API response is successful.","default":false}},"type":"object","title":"StatusSuccessFail"},"StreakFulfillment":{"type":"string","enum":["active","complete"],"title":"StreakFulfillment","description":"What has to happen for a user to fulfill a period for a streak"},"StreakPeriod":{"type":"string","enum":["day","week","month"],"title":"StreakPeriod"},"StreakState":{"type":"string","enum":["active","at_risk","broken"],"title":"StreakState"},"SubscribeMessage":{"properties":{"kind":{"type":"string","const":"subscribe","title":"Kind","default":"subscribe"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]}},"type":"object","required":["product_id"],"title":"SubscribeMessage"},"SupplierTag":{"type":"string","enum":["mobile","js-offerwall","double-opt-in","single-sign-on","phone-number-verified","test-a","test-b"],"title":"SupplierTag","description":"Available tags which can be used to annotate supplier traffic\n\nNote: should not include commas!"},"SupplyConfig":{"properties":{"policies":{"items":{"$ref":"#/components/schemas/SupplyPolicy"},"type":"array","title":"Policies"}},"type":"object","title":"SupplyConfig","description":"Describes the set of policies for how GRL can interact with marketplaces.\nThis is only used on the special \"global product\"."},"SupplyPolicy":{"properties":{"name":{"$ref":"#/components/schemas/Source"},"active":{"type":"boolean","title":"Active","default":true},"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_mobile_ip":{"type":"boolean","title":"Allow Mobile Ip","default":true},"allow_pii_only_buyers":{"type":"boolean","title":"Allow Pii Only Buyers","description":"Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum.","default":false},"allow_unhashed_buyers":{"type":"boolean","title":"Allow Unhashed Buyers","description":"Return Tasks from Buyers that don't have URL hashing enabled. Only supported on Pure Spectrum.","default":false},"withhold_profiling":{"type":"boolean","title":"Withhold Profiling","description":"For some Products, we may have privacy agreements prohibiting us from sharing information with the inventorySource. If True, don't add MRPQ (Market Research ProfilingQuestion) onto the entry link.","default":false},"pass_unconditional_eligible_unknowns":{"type":"boolean","title":"Pass Unconditional Eligible Unknowns","description":"Not used at the moment","default":true},"address":{"items":{"type":"string"},"type":"array","title":"Address","description":"address for the grpc GetOpps call"},"allow_vpn":{"type":"boolean","title":"Allow Vpn","default":false},"distribute_harmonizer_active":{"type":"boolean","title":"Distribute Harmonizer Active","default":true},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id","description":"For some inventory Sources, we may partition traffic using different supplier accounts instead"},"team_ids":{"anyOf":[{"items":{"type":"string","maxLength":32,"minLength":32},"type":"array"},{"type":"null"}],"title":"Team Ids"},"product_ids":{"anyOf":[{"items":{"type":"string","maxLength":32,"minLength":32},"type":"array"},{"type":"null"}],"title":"Product Ids"},"integration_mode":{"$ref":"#/components/schemas/IntegrationMode","default":"platform"},"scope":{"$ref":"#/components/schemas/Scope","description":"There must be only 1 GLOBAL config per Source. We can have more than one TEAM/PRODUCT config per Source.","readOnly":true}},"type":"object","required":["name","address","scope"],"title":"SupplyPolicy","description":"One policy describing how GRL can interact with a marketplaces in a\ncertain way. This is only used on the special \"global product\", and then\ninternally in grpc logic."},"SurveyEligibilityCriterion":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id","examples":["71a367fb71b243dc89f0012e0ec91749"]},"property_code":{"anyOf":[{"type":"string","maxLength":64,"minLength":3,"pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Property Code","examples":["c:73629"]},"question_text":{"type":"string","title":"Question Text","examples":["What company administers the retirement plan for your current employer?"]},"qualifying_answer":{"items":{"type":"string"},"type":"array","title":"Qualifying Answer","description":"User answer(s) that satisfied at least one eligibility rule","examples":["121"]},"qualifying_answer_label":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Qualifying Answer Label","examples":["Fidelity Investments"]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation","description":"Human-readable text explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is **Fidelity Investments**."]},"rank":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rank","description":"Lower values are shown more prominently in the UI"}},"type":"object","required":["question_id","property_code","question_text","qualifying_answer","qualifying_answer_label"],"title":"SurveyEligibilityCriterion","description":"Explanatory record of which question answers contributed\n to a user's eligibility for a survey.\nThis is INSUFFICIENT for determining eligibility to a task\n as it IGNORES logical operators, dependencies between criteria,\n and other requirements. It is only intended for the UI."},"TangoCashoutMethodData":{"properties":{"type":{"type":"string","const":"TANGO","title":"Type","default":"TANGO"},"utid":{"type":"string","title":"Utid","description":"tango utid"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"value_type":{"type":"string","enum":["variable","fixed"],"title":"Value Type"},"disclaimer":{"type":"string","title":"Disclaimer","default":""},"terms":{"type":"string","title":"Terms","default":""}},"type":"object","required":["utid","countries","value_type"],"title":"TangoCashoutMethodData"},"TaskEnterPayload":{"properties":{"event_type":{"type":"string","const":"task.enter","title":"Event Type","default":"task.enter"},"source":{"$ref":"#/components/schemas/Source"},"survey_id":{"type":"string","maxLength":32,"minLength":1,"title":"Survey Id","examples":["127492892"]},"quota_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Quota Id","description":"The marketplace's internal quota id"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"}},"type":"object","required":["source","survey_id","country_iso"],"title":"TaskEnterPayload"},"TaskFinishPayload":{"properties":{"event_type":{"type":"string","const":"task.finish","title":"Event Type","default":"task.finish"},"source":{"$ref":"#/components/schemas/Source"},"survey_id":{"type":"string","maxLength":32,"minLength":1,"title":"Survey Id","examples":["127492892"]},"quota_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Quota Id","description":"The marketplace's internal quota id"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"duration_sec":{"type":"number","exclusiveMinimum":0.0,"title":"Duration Sec"},"status":{"$ref":"#/components/schemas/Status"},"status_code_1":{"anyOf":[{"$ref":"#/components/schemas/StatusCode1"},{"type":"null"}]},"status_code_2":{"anyOf":[{"$ref":"#/components/schemas/WallStatusCode2"},{"type":"null"}]},"cpi":{"anyOf":[{"type":"integer","maximum":4000.0,"minimum":0.0},{"type":"null"}],"title":"Cpi"}},"type":"object","required":["source","survey_id","country_iso","duration_sec","status"],"title":"TaskFinishPayload"},"TaskStatusResponse":{"properties":{"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"The BP ID of the associated respondent","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier","examples":["app-user-9329ebd"]},"started":{"type":"string","format":"date-time","title":"Started","description":"When the session was started"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished","description":"When the session was finished"},"status":{"type":"integer","description":"The outcome of a session.\n - 0 - UNKNOWN\n - 1 - ENTER (the user has not yet returned)\n - 2 - INCOMPLETE (the user failed)\n - 3 - COMPLETE (the user completed the task)","examples":[3]},"payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Payout","description":"The amount paid to the supplier, in integer USD cents","examples":[500]},"user_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"User Payout","description":"If a payout transformation is configured on this account, this is the amount the user should earn, in integer USD cents","examples":[337]},"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"user_payout_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Payout String","description":"If a payout transformation is configured on this account, this is the amount to display to the user","examples":["3370 Points"]},"kwargs":{"additionalProperties":{"type":"string"},"type":"object","title":"Kwargs","description":"Any extra url params used in the offerwall request will be passed back here"},"status_code_1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT\n\nAllowed values: \n - __BUYER_FAIL__: User terminated in buyer survey\n - __BUYER_QUALITY_FAIL__: User terminated in buyer survey for quality reasons\n - __PS_FAIL__: User failed in marketplace's prescreener\n - __PS_QUALITY__: User rejected by marketplace for quality reasons\n - __PS_BLOCKED__: User is explicitly blocked by the marketplace. Note: on some marketplaces, users can have multiple PS_QUALITY terminations and still complete surveys.\n - __PS_OVERQUOTA__: User rejected by marketplace for over quota\n - __PS_DUPLICATE__: User rejected by marketplace for duplicate\n - __GRS_FAIL__: The user failed within the GRS Platform\n - __GRS_QUALITY_FAIL__: The user failed within the GRS Platform for quality reasons\n - __GRS_ABANDON__: The user abandoned/timed out within the GRS Platform\n - __PS_ABANDON__: The user abandoned/timed out within the marketplace's pre-screen system. Note: On most marketplaces, we have no way of distinguishing between this and BUYER_ABANDON. BUYER_ABANDON is used as the default, unless we know it is PS_ABANDON.\n - __BUYER_ABANDON__: The user abandoned/timed out within the client survey\n - __UNKNOWN__: The status code is not documented\n - __COMPLETE__: The user completed the task successfully\n - __MARKETPLACE_FAIL__: Something was wrong upon the user redirecting from the marketplace, e.g. no postback received, or url hashing failures.\n - __SESSION_START_FAIL__: User failed before being sent into a marketplace\n - __SESSION_CONTINUE_FAIL__: User failed between attempts\n - __SESSION_START_QUALITY_FAIL__: User failed before being sent into a marketplace for \"security\" reasons\n - __SESSION_CONTINUE_QUALITY_FAIL__: User failed between attempts for \"security\" reasons","examples":["COMPLETE"]},"status_code_2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__Status Detail__\nThis should be set if the Session.status_code_1 is SESSION_XXX_FAIL\n\nAllowed values: \n - __ENTRY_URL_MODIFICATION__: Unable to parse either the bucket_id, request_id, or nudge_id from the url\n - __UNRECOGNIZED_IP__: The client's IP failed GRIP lookup, or we failed to store it for some reason\n - __USER_IS_ANONYMOUS__: User is using an anonymous IP\n - __USER_IS_BLOCKED__: User is blocked\n - __USER_IS_RATE_LIMITED__: User is rate limited\n - __UNRECOGNIZED_DEVICE__: The client's useragent was not categorized as desktop, mobile, or tablet\n - __OFFERWALL_EXPIRED__: The user clicked after 5 min\n - __INTERNAL_ERROR__: Something unexpected happened\n - __OFFERWALL_COUNTRY_MISMATCH__: The user requested the offerwall for a different country than their IP address indicates\n - __INVALID_BUCKET_ID__: The bucket id indicated in the url does not exist. This is likely due to the user clicking on a bucket for an offerwall that has already been refreshed.\n - __NO_TASKS_AVAILABLE__: Not necessarily the user's fault. We thought we had surveys, but due to for e.g. the user entering on a different device than we thought, there really are none. If we get a lot of these, then that might indicate something is wrong.\n - __ATTEMPT_IS_SUSPICIOUS__: The entrance attempt was flagged by GRLIQ as suspicious\n - __GRLIQ_MISSING__: No GRLIQ forensics post was received","examples":[null]},"adjusted_status":{"anyOf":[{"$ref":"#/components/schemas/SessionAdjustedStatus"},{"type":"null"}],"description":"An adjusted_status is set if a session is adjusted by the marketplace\nafter the original return. A session can be adjusted multiple times.\nThis is the most recent status. If a session was originally a complete,\nwas adjusted to incomplete, then back to complete, the adjusted_status\nwill be None, but the adjusted_timestamp will be set to the most recent\nchange.\n\nAllowed values: \n - __ac__ *(ADJUSTED_TO_COMPLETE)*: Task was reconciled to complete\n - __af__ *(ADJUSTED_TO_FAIL)*: Task was reconciled to incomplete\n - __pa__ *(PAYOUT_ADJUSTMENT)*: The payout was changed. This applies to Sessions ONLY.","examples":[null]},"adjusted_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Adjusted Timestamp","description":"When the adjusted status was last set.","examples":[null]},"adjusted_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Adjusted Payout","description":"The new payout after adjustment.","examples":[null]},"adjusted_user_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Adjusted User Payout","description":"The new user_payout after adjustment.","examples":[null]},"adjusted_user_payout_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adjusted User Payout String","description":"The new user_payout_string after adjustment.","examples":[null]},"wall_events":{"anyOf":[{"items":{"$ref":"#/components/schemas/WallOut"},"type":"array"},{"type":"null"}],"title":"Wall Events"},"currency":{"type":"string","const":"USD","title":"Currency","default":"USD"},"final_status":{"type":"integer","title":"Final Status","description":"This is deprecated","default":0},"bpuid":{"type":"string","title":"Bpuid","readOnly":true}},"type":"object","required":["tsid","product_id","product_user_id","started","bpuid"],"title":"TaskStatusResponse","description":"The status of a session"},"TasksStatusResponse":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total","description":"Total number of results"},"tasks_status":{"items":{"$ref":"#/components/schemas/TaskStatusResponse"},"type":"array","title":"Tasks Status"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages","description":"Total number of pages","readOnly":true}},"type":"object","required":["pages"],"title":"TasksStatusResponse"},"TopNPlusBlockOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusBlockOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.\n\nOfferwall code: `d48cce47`"},"TopNPlusBlockOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusBlockOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusBlockOfferWallResponse"},"TopNPlusBlockRecontactOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusRecontactBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusBlockRecontactOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.\n\nOfferwall code: `1e5f0af8`"},"TopNPlusBlockRecontactOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusBlockRecontactOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusBlockRecontactOfferWallResponse"},"TopNPlusBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"quality_score":{"type":"number","title":"Quality Score"},"currency":{"type":"string","title":"Currency","description":"This will always be 'USD'","default":"USD","examples":["USD"]},"eligibility_criteria":{"items":{"$ref":"#/components/schemas/SurveyEligibilityCriterion"},"type":"array","title":"Eligibility Criteria","description":"The reasons the user is eligible for tasks in this bucket"},"eligibility_explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eligibility Explanation","description":"Human-readable text explaining a user's eligibility for tasks in this bucket","examples":["You are a **47-year-old** **white** **male** with a *college degree*, who's employer's retirement plan is **Fidelity Investments**."]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","quality_score"],"title":"TopNPlusBucket"},"TopNPlusOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents.\n\nOfferwall code: `b145b803`"},"TopNPlusOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusOfferWallResponse"},"TopNPlusRecontactBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"quality_score":{"type":"number","title":"Quality Score"},"is_recontact":{"type":"boolean","title":"Is Recontact"},"currency":{"type":"string","title":"Currency","description":"This will always be 'USD'","default":"USD","examples":["USD"]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","quality_score","is_recontact"],"title":"TopNPlusRecontactBucket"},"UPKImportance":{"properties":{"task_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Task Count","description":"The number of live Tasks that use this UPK Question","examples":[47]},"task_score":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Task Score","description":"GRL's internal ranked score for the UPK Question","examples":[0.11175522477414712]},"marketplace_task_count":{"anyOf":[{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object"},{"type":"null"}],"title":"Marketplace Task Count","description":"The number of live Tasks that use this UPK Question per marketplace","examples":[{"d":23,"s":24}]}},"type":"object","title":"UPKImportance"},"USDeliveryAddress":{"properties":{"name_or_attn":{"type":"string","maxLength":50,"minLength":1,"title":"Name Or Attn"},"company":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Company"},"phone_number":{"anyOf":[{"type":"string","maxLength":10,"minLength":10,"pattern":"^[0-9]+$"},{"type":"null"}],"title":"Phone Number"},"address":{"type":"string","maxLength":100,"minLength":1,"title":"Address"},"city":{"type":"string","maxLength":100,"minLength":1,"title":"City"},"state":{"type":"string","maxLength":2,"minLength":1,"title":"State"},"postal_code":{"type":"string","maxLength":10,"minLength":1,"title":"Postal Code"},"country":{"type":"string","title":"Country","default":"us"}},"type":"object","required":["name_or_attn","address","city","state","postal_code"],"title":"USDeliveryAddress"},"UpkItem":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","examples":["497b1fedec464151b063cd5367643ffa"]},"label":{"type":"string","maxLength":255,"title":"Label","examples":["high_school_completion"]},"description":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Description","examples":["Completed high school"]}},"type":"object","required":["id","label"],"title":"UpkItem"},"UpkProperty":{"properties":{"property_id":{"type":"string","maxLength":32,"minLength":32,"title":"Property Id","examples":["7a0635061fa64c98b43c6a3d15459f36"]},"property_label":{"type":"string","maxLength":255,"title":"Property Label","examples":["educational_attainment"]},"prop_type":{"$ref":"#/components/schemas/PropertyType","description":"\nAllowed values: \n - __i__ *(UPK_ITEM)*: UserProfileKnowledge Item\n - __n__ *(UPK_NUMERICAL)*: UserProfileKnowledge Numerical\n - __x__ *(UPK_TEXT)*: UserProfileKnowledge Text","default":"i"},"cardinality":{"$ref":"#/components/schemas/Cardinality","description":"\nAllowed values: \n - __*__ *(ZERO_OR_MORE)*: Zero or More\n - __?__ *(ZERO_OR_ONE)*: Zero or One","default":"?"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"gold_standard":{"type":"boolean","title":"Gold Standard","description":"A Gold-Standard question has been enumerated for all possible values (per country) as best as possible by GRL,allowing it to be mapped across inventory sources. A property not marked as Gold-Standard may have: 1) marketplace qid associations & 2) category associations, but doesn't have a defined 'range' (list of allowed itemsin a multiple choice question). This is used for exposing a user's profiling data & forthe Nudge API.","default":false},"allowed_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkItem"},"type":"array"},{"type":"null"}],"title":"Allowed Items"},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories"}},"type":"object","required":["property_id","property_label","country_iso"],"title":"UpkProperty","description":"This used to be called \"QuestionInfo\", which is a bad name,\n as this describes a UPK Property, like \"educational_attainment\",\n not the question that asks for your education."},"UpkQuestion":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id"},"ext_question_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Ext Question Id","description":"what marketplace question this question links to"},"question_type":{"$ref":"#/components/schemas/UpkQuestionType"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"language_iso":{"type":"string","maxLength":3,"minLength":3,"pattern":"^[a-z]{3}$","title":"Language Iso"},"question_text":{"type":"string","minLength":1,"title":"Question Text","description":"The text shown to respondents"},"choices":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkQuestionChoice"},"type":"array"},{"type":"null"}],"title":"Choices"},"selector":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionSelectorMC"},{"$ref":"#/components/schemas/UpkQuestionSelectorTE"},{"$ref":"#/components/schemas/UpkQuestionSelectorSLIDER"},{"$ref":"#/components/schemas/UpkQuestionSelectorHIDDEN"}],"title":"Selector"},"configuration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/UpkQuestionConfigurationMC"},{"$ref":"#/components/schemas/UpkQuestionConfigurationTE"},{"$ref":"#/components/schemas/UpkQuestionConfigurationSLIDER"}],"discriminator":{"propertyName":"type","mapping":{"MC":"#/components/schemas/UpkQuestionConfigurationMC","SLIDER":"#/components/schemas/UpkQuestionConfigurationSLIDER","TE":"#/components/schemas/UpkQuestionConfigurationTE"}}},{"type":"null"}],"title":"Configuration"},"validation":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionValidation"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories","description":"Categories associated with this question"},"explanation_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Template","description":"Human-readable template for explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is {answer}."]},"explanation_fragment_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Fragment Template","description":"A very short, natural-language explanation fragment that can be combined with others into a single sentence","examples":["whose employer's retirement plan is {answer}"]}},"type":"object","required":["question_type","country_iso","language_iso","question_text","selector"],"title":"UpkQuestion","example":{"categories":[{"adwords_vertical_id":"396","label":"Politics","parent_uuid":"f66dddba61424ce5be2a38731450a0e1","path":"/News/Politics","uuid":"87b6d819f3ca4815bf1f135b1e829cc6"}],"choices":[{"choice_id":"1","choice_text":"Yes","exclusive":false,"order":0},{"choice_id":"2","choice_text":"No","exclusive":false,"order":1}],"country_iso":"us","importance":{"marketplace_task_count":{"d":9,"s":20,"w":20},"task_count":49,"task_score":3.3401743283265684},"language_iso":"eng","marketplace_task_count":{"d":9,"s":20,"w":20},"question_id":"fb20fd4773304500b39c4f6de0012a5a","question_text":"Are you registered to vote at your present address, or not?","question_type":"MC","selector":"SA","task_count":49,"task_score":3.3401743283265684}},"UpkQuestionChoice":{"properties":{"choice_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\w\\s\\.\\-]+$","title":"Choice Id","description":"The unique identifier for a response to a qualification"},"choice_text":{"type":"string","minLength":1,"title":"Choice Text","description":"The response text shown to respondents"},"order":{"type":"integer","minimum":0.0,"title":"Order"},"group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group"},"exclusive":{"type":"boolean","title":"Exclusive","description":"If answer is exclusive, it can be the only option selected","default":false},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]}},"type":"object","required":["choice_id","choice_text","order"],"title":"UpkQuestionChoice"},"UpkQuestionChoiceOut":{"properties":{"choice_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\w\\s\\.\\-]+$","title":"Choice Id","description":"The unique identifier for a response to a qualification"},"choice_text":{"type":"string","minLength":1,"title":"Choice Text","description":"The response text shown to respondents"},"order":{"type":"integer","minimum":0.0,"title":"Order"},"group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group"},"exclusive":{"type":"boolean","title":"Exclusive","description":"If answer is exclusive, it can be the only option selected","default":false},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]}},"type":"object","required":["choice_id","choice_text","order"],"title":"UpkQuestionChoiceOut"},"UpkQuestionConfigurationMC":{"properties":{"max_select":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Select"}},"additionalProperties":false,"type":"object","title":"UpkQuestionConfigurationMC"},"UpkQuestionConfigurationSLIDER":{"properties":{"slider_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Min"},"slider_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Max"},"slider_start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Start"},"slider_step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Step"}},"type":"object","title":"UpkQuestionConfigurationSLIDER"},"UpkQuestionConfigurationTE":{"properties":{"max_length":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Length","description":"Maximum str length of any input. Meant as an easy, nonregex based check."},"min_length":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Min Length","description":"Minimum str length of any input. Meant as an easy, nonregex based check."}},"additionalProperties":false,"type":"object","title":"UpkQuestionConfigurationTE"},"UpkQuestionOut":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id"},"ext_question_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Ext Question Id","description":"what marketplace question this question links to"},"question_type":{"$ref":"#/components/schemas/UpkQuestionType"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"language_iso":{"type":"string","maxLength":3,"minLength":3,"pattern":"^[a-z]{3}$","title":"Language Iso"},"question_text":{"type":"string","minLength":1,"title":"Question Text","description":"The text shown to respondents"},"choices":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkQuestionChoiceOut"},"type":"array"},{"type":"null"}],"title":"Choices"},"selector":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionSelectorMC"},{"$ref":"#/components/schemas/UpkQuestionSelectorTE"},{"$ref":"#/components/schemas/UpkQuestionSelectorSLIDER"},{"$ref":"#/components/schemas/UpkQuestionSelectorHIDDEN"}],"title":"Selector"},"configuration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/UpkQuestionConfigurationMC"},{"$ref":"#/components/schemas/UpkQuestionConfigurationTE"},{"$ref":"#/components/schemas/UpkQuestionConfigurationSLIDER"}],"discriminator":{"propertyName":"type","mapping":{"MC":"#/components/schemas/UpkQuestionConfigurationMC","SLIDER":"#/components/schemas/UpkQuestionConfigurationSLIDER","TE":"#/components/schemas/UpkQuestionConfigurationTE"}}},{"type":"null"}],"title":"Configuration"},"validation":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionValidation"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories","description":"Categories associated with this question"},"explanation_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Template","description":"Human-readable template for explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is {answer}."]},"explanation_fragment_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Fragment Template","description":"A very short, natural-language explanation fragment that can be combined with others into a single sentence","examples":["whose employer's retirement plan is {answer}"]},"task_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Task Count","description":"The number of live Tasks that use this UPK Question","examples":[47]},"task_score":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Task Score","description":"GRL's internal ranked score for the UPK Question","examples":[0.11175522477414712]},"marketplace_task_count":{"anyOf":[{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object"},{"type":"null"}],"title":"Marketplace Task Count","description":"The number of live Tasks that use this UPK Question per marketplace","examples":[{"d":23,"s":24}]}},"type":"object","required":["question_type","country_iso","language_iso","question_text","selector"],"title":"UpkQuestionOut","example":{"categories":[{"adwords_vertical_id":"396","label":"Politics","parent_uuid":"f66dddba61424ce5be2a38731450a0e1","path":"/News/Politics","uuid":"87b6d819f3ca4815bf1f135b1e829cc6"}],"choices":[{"choice_id":"1","choice_text":"Yes","exclusive":false,"order":0},{"choice_id":"2","choice_text":"No","exclusive":false,"order":1}],"country_iso":"us","importance":{"marketplace_task_count":{"d":9,"s":20,"w":20},"task_count":49,"task_score":3.3401743283265684},"language_iso":"eng","marketplace_task_count":{"d":9,"s":20,"w":20},"question_id":"fb20fd4773304500b39c4f6de0012a5a","question_text":"Are you registered to vote at your present address, or not?","question_type":"MC","selector":"SA","task_count":49,"task_score":3.3401743283265684}},"UpkQuestionResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"questions":{"items":{"$ref":"#/components/schemas/UpkQuestionOut"},"type":"array","title":"Questions"},"consent_questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Consent Questions","description":"For internal use"},"special_questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Special Questions","description":"For internal use"},"count":{"type":"integer","minimum":0.0,"title":"Count","description":"The number of questions returned"}},"type":"object","required":["status","questions","count"],"title":"UpkQuestionResponse"},"UpkQuestionSelectorHIDDEN":{"type":"string","enum":["HIDDEN"],"title":"UpkQuestionSelectorHIDDEN"},"UpkQuestionSelectorMC":{"type":"string","enum":["SA","MA","DL","SB","MSB"],"title":"UpkQuestionSelectorMC"},"UpkQuestionSelectorSLIDER":{"type":"string","enum":["HSLIDER","VSLIDER"],"title":"UpkQuestionSelectorSLIDER"},"UpkQuestionSelectorTE":{"type":"string","enum":["SL","ML","ETB"],"title":"UpkQuestionSelectorTE"},"UpkQuestionType":{"type":"string","enum":["MC","TE","SLIDER","HIDDEN"],"title":"UpkQuestionType"},"UpkQuestionValidation":{"properties":{"patterns":{"anyOf":[{"items":{"$ref":"#/components/schemas/PatternValidation"},"type":"array","minItems":1},{"type":"null"}],"title":"Patterns"}},"type":"object","required":["patterns"],"title":"UpkQuestionValidation"},"User":{"properties":{"id":{"anyOf":[{"type":"integer","exclusiveMaximum":2147483648.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Id"},"uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Uuid","examples":["0f85f1ec17f14621a06c687de5ddafca"]},"product":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"type":"null"}]},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier. It should not contain any sensitive informationlike email or names, and should avoid using anyincrementing values.","examples":["app-user-9329ebd"]},"blocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blocked","default":false},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the user was created on the GRL platform."},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen","description":"When the user was last seen on, or acting on anypart of the GRL platform."},"audit_log":{"anyOf":[{"items":{"$ref":"#/components/schemas/AuditLog"},"type":"array"},{"type":"null"}],"title":"Audit Log"},"transactions":{"anyOf":[{"items":{"$ref":"#/components/schemas/LedgerTransaction"},"type":"array"},{"type":"null"}],"title":"Transactions"},"location_history":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeoIPInformation"},"type":"array"},{"type":"null"}],"title":"Location History"}},"additionalProperties":false,"type":"object","title":"User"},"UserCreateConfig":{"properties":{"min_hourly_create_limit":{"type":"integer","minimum":0.0,"title":"Min Hourly Create Limit","description":"The smallest allowed value for the hourly user create limit.","default":0},"max_hourly_create_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Hourly Create Limit","description":"The largest allowed value for the hourly user create limit. If None, the hourly create limit is unconstrained."}},"type":"object","title":"UserCreateConfig","description":"Stores configuration for the user creation experience.\n\nThe user creation limit is determined dynamically based on the median\n daily completion rate. min_hourly_create_limit &\n max_hourly_create_limit can be used to constrain the dynamically\n determined rate limit within set values."},"UserDisplayedWalletBalance":{"properties":{"currency":{"type":"string","maxLength":32,"title":"Currency"},"amount":{"type":"integer","title":"Amount","description":"Displayed balance in the currency's smallest ledger unit."},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String"}},"type":"object","required":["currency","amount"],"title":"UserDisplayedWalletBalance","description":"Combined user-visible balance for one ledger currency."},"UserHealthConfig":{"properties":{"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_ban_iphist":{"type":"boolean","title":"Allow Ban Iphist","default":true}},"type":"object","title":"UserHealthConfig"},"UserInfo":{"properties":{"user_profile_knowledge":{"items":{"$ref":"#/components/schemas/UserProfileKnowledge"},"type":"array","title":"User Profile Knowledge"},"marketplace_profile_knowledge":{"items":{"$ref":"#/components/schemas/MarketProfileKnowledge"},"type":"array","title":"Marketplace Profile Knowledge"}},"type":"object","title":"UserInfo"},"UserInfoResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profile":{"$ref":"#/components/schemas/UserInfo"}},"type":"object","required":["status","user_profile"],"title":"UserInfoResponse"},"UserLedgerTransactionTaskAdjustment":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Task Adjustment"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"bp_adjustment","title":"Tx Type","default":"bp_adjustment"},"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","tsid","url","amount_string"],"title":"UserLedgerTransactionTaskAdjustment","example":{"amount":-38,"amount_string":"$-0.38","created":"2026-09-09T18:52:57.514390Z","description":"Task Adjustment","tsid":"f9830cbc0fe345c394726265f15f9638","tx_type":"bp_adjustment","url":"https://fsb.generalresearch.com/4c1a9fb5bc8d46a8a5a07900662483bc/status/f9830cbc0fe345c394726265f15f9638/"}},"UserLedgerTransactionTaskComplete":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Task Complete"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"bp_payment","title":"Tx Type","default":"bp_payment"},"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","tsid","url","amount_string"],"title":"UserLedgerTransactionTaskComplete","description":"In a BP with user wallet enabled, the task-complete transaction would have\nline items for both the credit to the bp_wallet_account and credit to\nuser_account. This is the user-detail, so we've only caring about the\nuser's payment.","example":{"amount":38,"amount_string":"$0.38","created":"2026-09-09T18:52:57.514841Z","description":"Task Complete","tsid":"423f5ae084304bbbbc1f6ffda1b1c21b","tx_type":"bp_payment","url":"https://fsb.generalresearch.com/1d00ab8d467646f39d142b4b7145db17/status/423f5ae084304bbbbc1f6ffda1b1c21b/"}},"UserLedgerTransactionTypeSummary":{"properties":{"entry_count":{"type":"integer","minimum":0.0,"title":"Entry Count","default":0},"min_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Amount","description":"positive or negative USDCent"},"max_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Amount","description":"positive or negative USDCent"},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"positive or negative USDCent"}},"type":"object","title":"UserLedgerTransactionTypeSummary"},"UserLedgerTransactionTypesSummary":{"properties":{"bp_adjustment":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"bp_payment":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"user_bonus":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"user_payout_request":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"}},"type":"object","title":"UserLedgerTransactionTypesSummary"},"UserLedgerTransactionUserBonus":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Compensation Bonus"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_bonus","title":"Tx Type","default":"user_bonus"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","url","amount_string"],"title":"UserLedgerTransactionUserBonus","example":{"amount":100,"amount_string":"$1.00","created":"2026-09-09T18:52:57.513921Z","description":"Compensation Bonus","tx_type":"user_bonus"}},"UserLedgerTransactionUserPayout":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_payout_request","title":"Tx Type","default":"user_payout_request"},"payout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Id","description":"A unique identifier for the payout","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","description","amount","payout_id","url","amount_string"],"title":"UserLedgerTransactionUserPayout","example":{"amount":-5,"amount_string":"$-0.05","created":"2026-09-09T18:52:57.513399Z","description":"HIT Reward","payout_id":"af49e7a108c54c5b926ff97c0e177369","tx_type":"user_payout_request","url":"https://fsb.generalresearch.com/5ad58af0af3f49f39b8f480dfac856f3/cashout/af49e7a108c54c5b926ff97c0e177369/"}},"UserLedgerTransactionsResponse":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total","description":"Total number of results"},"transactions":{"items":{"oneOf":[{"$ref":"#/components/schemas/UserLedgerTransactionUserPayout"},{"$ref":"#/components/schemas/UserLedgerTransactionUserBonus"},{"$ref":"#/components/schemas/UserLedgerTransactionTaskAdjustment"},{"$ref":"#/components/schemas/UserLedgerTransactionTaskComplete"}],"discriminator":{"propertyName":"tx_type","mapping":{"bp_adjustment":"#/components/schemas/UserLedgerTransactionTaskAdjustment","bp_payment":"#/components/schemas/UserLedgerTransactionTaskComplete","user_bonus":"#/components/schemas/UserLedgerTransactionUserBonus","user_payout_request":"#/components/schemas/UserLedgerTransactionUserPayout"}}},"type":"array","title":"Transactions"},"summary":{"$ref":"#/components/schemas/UserLedgerTransactionTypesSummary"},"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages","description":"Total number of pages","readOnly":true}},"type":"object","required":["summary","status","pages"],"title":"UserLedgerTransactionsResponse"},"UserLedgerWallet":{"properties":{"amount":{"type":"integer","title":"Amount","description":"(USD cents) The amount in the user's wallet."},"redeemable_amount":{"type":"integer","minimum":0.0,"title":"Redeemable Amount","description":"(USD cents) The amount in the user's wallet this is currently redeemable."},"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format"},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String"},"redeemable_amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redeemable Amount String"},"account_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Account Uuid","description":"A unique identifier for this Ledger Account","examples":["c3c3566b5b1b4961b63a5670a2dc923d"]},"account_type":{"type":"string","enum":["user_wallet","user_attempt_credit"],"title":"Account Type"},"currency":{"type":"string","maxLength":32,"title":"Currency","default":"USD"},"display_name":{"type":"string","maxLength":64,"title":"Display Name","description":"Human-readable description of the Ledger Account"}},"type":"object","required":["amount","redeemable_amount","account_uuid","account_type","display_name"],"title":"UserLedgerWallet","description":"A user-owned ledger account exposed by the wallets endpoint.","example":{"amount":123,"amount_string":"1230 Points","payout_format":"{payout*10:,.0f} Points","redeemable_amount":100,"redeemable_amount_string":"1000 Points"}},"UserLedgerWallets":{"properties":{"wallets":{"items":{"$ref":"#/components/schemas/UserLedgerWallet"},"type":"array","title":"Wallets"},"displayed_balances":{"items":{"$ref":"#/components/schemas/UserDisplayedWalletBalance"},"type":"array","title":"Displayed Balances"}},"type":"object","title":"UserLedgerWallets"},"UserPayoutEvent":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Event Unique Identifier","examples":["9453cd076713426cb68d05591c7145aa"]},"debit_account_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Debit Account Uuid","description":"The LedgerAccount.uuid that money is being requested from. Thie User or Brokerage Product is retrievable through the LedgerAccount.reference_uuid","examples":["18298cb1583846fbb06e4747b5310693"]},"cashout_method_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Cashout Method Uuid","description":"References a row in the account_cashoutmethod table. This is the cashout method that was used to request this payout. (A cashout is the same thing as a payout)","examples":["a6dc1fc1bf934557b952f253dee12813"]},"created":{"type":"string","format":"date-time","title":"Created"},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount int. This cannot be 0 or negative","examples":[531]},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["COMPLETE"]},"ext_ref_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Ref Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"request_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Data","description":"Stores payout-type-specific information that is used to request this payout from the external provider."},"order_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/CashMailOrderData"},{"type":"null"}],"title":"Order Data","description":"Stores payout-type-specific order information that is returned from the external payout provider."},"account_reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Reference Type"},"account_reference_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Account Reference Uuid"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["debit_account_uuid","cashout_method_uuid","amount","payout_type"],"title":"UserPayoutEvent","description":"A user has requested to be paid from their wallet balance."},"UserProfile":{"properties":{"email_address":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Address","examples":["contact@mail.com"]},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name","description":"A public name chosen by the user. Can be used in leaderboards or event stream."},"user":{"$ref":"#/components/schemas/User"},"marketplace_pids":{"additionalProperties":{"type":"string","maxLength":32,"minLength":32},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"Marketplace Pids","description":"User's PID in marketplaces","examples":[{"c":"b507a2c00c3e481fb82f23655d142198","d":"deffe922063e4b9980206a62c3df2fba","i":"1dd9bd986794444eb97cb921aee5663f"}]},"streaks":{"items":{"$ref":"#/components/schemas/UserStreak"},"type":"array","title":"Streaks"},"email_md5":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Email Md5","description":"MD5 hash of the email address","readOnly":true,"examples":["053fc3d5575362159e0c782abec83ffa"]},"email_sha1":{"anyOf":[{"type":"string","maxLength":40,"minLength":40},{"type":"null"}],"title":"Email Sha1","description":"SHA1 hash of the email address","readOnly":true,"examples":["6280fb76135b3585c0c5403be04844a0f0bae726"]},"email_sha256":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Email Sha256","description":"SHA256 hash of the email address","readOnly":true,"examples":["8a098233e750f08de87d6053c06a58724287f34372368b6dc28b7ad4a77f3d39"]}},"additionalProperties":false,"type":"object","required":["user","email_md5","email_sha1","email_sha256"],"title":"UserProfile"},"UserProfileKnowledge":{"properties":{"property_id":{"type":"string","title":"Property Id"},"property_label":{"type":"string","title":"Property Label"},"translation":{"type":"string","title":"Translation"},"answer":{"items":{"$ref":"#/components/schemas/UserProfileKnowledgeAnswer"},"type":"array","title":"Answer"},"created":{"type":"string","format":"date-time","title":"Created","description":"When the User submitted this Profiling data"}},"type":"object","required":["property_id","property_label","translation","created"],"title":"UserProfileKnowledge"},"UserProfileKnowledgeAnswer":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"translation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","title":"UserProfileKnowledgeAnswer"},"UserProfileResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profile":{"$ref":"#/components/schemas/UserProfile"}},"type":"object","required":["status","user_profile"],"title":"UserProfileResponse"},"UserProfileUpdateRequest":{"properties":{"email_address":{"type":"string","format":"email","title":"Email Address","examples":["contact@mail.com"]}},"additionalProperties":false,"type":"object","required":["email_address"],"title":"UserProfileUpdateRequest"},"UserProfilesResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profiles":{"items":{"$ref":"#/components/schemas/UserProfile"},"type":"array","title":"User Profiles"}},"type":"object","required":["status","user_profiles"],"title":"UserProfilesResponse"},"UserQuestionAnswerIn":{"properties":{"question_id":{"type":"string","maxLength":32,"minLength":32,"title":"Question Id","examples":["fb20fd4773304500b39c4f6de0012a5a"]},"answer":{"items":{"type":"string","maxLength":5000,"minLength":1},"type":"array","maxItems":10,"minItems":1,"title":"Answer","description":"The user's answers to this question. Must pass the choice_id if the question is a Multiple Choice, or the actual text if the question is Text Entry","examples":[["1"]]}},"additionalProperties":false,"type":"object","required":["question_id","answer"],"title":"UserQuestionAnswerIn","description":"Send the answers to one or more questions for a user. A question is\nuniquely specified by the question_id key. The answer is: the choice_id\nif the question_type is \"MC\" the actual entered text if the\nquestion_type is \"TE\"\n\nTODO: look up the question_type from the question_id to apply MC or\n TE specific validation on the answer(s)"},"UserStreak":{"properties":{"country_iso":{"type":"string","title":"Country Iso"},"period":{"$ref":"#/components/schemas/StreakPeriod"},"fulfillment":{"$ref":"#/components/schemas/StreakFulfillment"},"current_streak":{"type":"integer","minimum":0.0,"title":"Current Streak"},"longest_streak":{"type":"integer","minimum":0.0,"title":"Longest Streak"},"state":{"$ref":"#/components/schemas/StreakState"},"last_fulfilled_period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Fulfilled Period Start"},"timezone_name":{"type":"string","title":"Timezone Name","readOnly":true},"current_period_bounds":{"prefixItems":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}],"type":"array","maxItems":2,"minItems":2,"title":"Current Period Bounds","readOnly":true},"last_fulfilled_period_bounds":{"anyOf":[{"prefixItems":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Last Fulfilled Period Bounds","readOnly":true},"time_remaining_in_period":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time Remaining In Period","readOnly":true}},"additionalProperties":false,"type":"object","required":["country_iso","period","fulfillment","current_streak","longest_streak","state","timezone_name","current_period_bounds","last_fulfilled_period_bounds","time_remaining_in_period"],"title":"UserStreak"},"UserWalletBalance":{"properties":{"amount":{"type":"integer","title":"Amount","description":"(USD cents) The amount in the user's wallet."},"redeemable_amount":{"type":"integer","minimum":0.0,"title":"Redeemable Amount","description":"(USD cents) The amount in the user's wallet this is currently redeemable."},"payout_format":{"type":"string","title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"amount_string":{"type":"string","title":"Amount String","description":"The 'amount' with the payout_format applied. Can be displayed to the user."},"redeemable_amount_string":{"type":"string","title":"Redeemable Amount String","description":"The 'redeemable_amount' with the payout_format applied. Can be displayed to the user."}},"type":"object","required":["amount","redeemable_amount","payout_format","amount_string","redeemable_amount_string"],"title":"UserWalletBalance","example":{"amount":123,"amount_string":"1230 Points","payout_format":"{payout*10:,.0f} Points","redeemable_amount":100,"redeemable_amount_string":"1000 Points"}},"UserWalletBalanceResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"wallet":{"$ref":"#/components/schemas/UserWalletBalance"}},"type":"object","required":["status","wallet"],"title":"UserWalletBalanceResponse"},"UserWalletConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"If enabled, the users' wallets are managed.","default":false},"balance_type":{"type":"string","enum":["wallet_balance","redeemable_balance"],"title":"Balance Type","description":"The balance used as the user's displayed balance.","default":"wallet_balance"},"amt":{"type":"boolean","title":"Amt","description":"Uses Amazon Mechanical Turk","default":false},"supported_payout_types":{"items":{"$ref":"#/components/schemas/PayoutType"},"type":"array","title":"Supported Payout Types"},"min_cashout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Cashout","description":"Minimum cashout amount. If enabled is True and no min_cashout is set, will default to $0.01.","examples":["10.00"]},"failed_attempt_credit":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Failed Attempt Credit","description":"Conditional credit awarded for an eligible failed attempt. None disables failed-attempt credits.","examples":["0.05",null]}},"type":"object","title":"UserWalletConfig","description":"Stores configuration for the user wallet handling"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WXETOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/WXETOfferwallBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"WXETOfferwall","description":"Returns buckets from WXET as single tasks\nOfferwall code: `55a4e1a9`"},"WXETOfferwallBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"duration":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Duration","description":"The bucket's expected duration, in seconds"},"min_payout":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min Payout","description":"The bucket's min payout, in usd cents"}},"additionalProperties":false,"type":"object","required":["id","uri","duration","min_payout"],"title":"WXETOfferwallBucket"},"WXETOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/WXETOfferwall"}},"type":"object","required":["info","offerwall"],"title":"WXETOfferwallResponse"},"WallAdjustedStatus":{"type":"string","enum":["ac","af","ca","cc"],"title":"WallAdjustedStatus"},"WallOut":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"source":{"$ref":"#/components/schemas/Source"},"buyer_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Buyer Id"},"req_survey_id":{"type":"string","maxLength":32,"title":"Req Survey Id"},"started":{"type":"string","format":"date-time","title":"Started"},"survey_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Survey Id"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"status_code_1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT\n\nAllowed values: \n - __BUYER_FAIL__: User terminated in buyer survey\n - __BUYER_QUALITY_FAIL__: User terminated in buyer survey for quality reasons\n - __PS_FAIL__: User failed in marketplace's prescreener\n - __PS_QUALITY__: User rejected by marketplace for quality reasons\n - __PS_BLOCKED__: User is explicitly blocked by the marketplace. Note: on some marketplaces, users can have multiple PS_QUALITY terminations and still complete surveys.\n - __PS_OVERQUOTA__: User rejected by marketplace for over quota\n - __PS_DUPLICATE__: User rejected by marketplace for duplicate\n - __GRS_FAIL__: The user failed within the GRS Platform\n - __GRS_QUALITY_FAIL__: The user failed within the GRS Platform for quality reasons\n - __GRS_ABANDON__: The user abandoned/timed out within the GRS Platform\n - __PS_ABANDON__: The user abandoned/timed out within the marketplace's pre-screen system. Note: On most marketplaces, we have no way of distinguishing between this and BUYER_ABANDON. BUYER_ABANDON is used as the default, unless we know it is PS_ABANDON.\n - __BUYER_ABANDON__: The user abandoned/timed out within the client survey\n - __UNKNOWN__: The status code is not documented\n - __COMPLETE__: The user completed the task successfully\n - __MARKETPLACE_FAIL__: Something was wrong upon the user redirecting from the marketplace, e.g. no postback received, or url hashing failures.\n - __SESSION_START_FAIL__: User failed before being sent into a marketplace\n - __SESSION_CONTINUE_FAIL__: User failed between attempts\n - __SESSION_START_QUALITY_FAIL__: User failed before being sent into a marketplace for \"security\" reasons\n - __SESSION_CONTINUE_QUALITY_FAIL__: User failed between attempts for \"security\" reasons","examples":["COMPLETE"]},"status_code_2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL\n\nAllowed values: \n - __URL_HASHING_CHECK_FAILED__: The redirect URL (coming back from the marketplace) failed hashing checks\n - __BROKEN_REDIRECT__: The redirect URL was missing required query params or was unparseable\n - __INVALID_REDIRECT__: The redirect URL was invalid or inconsistent in some way and as a result we could not determine the outcome. This could be if a redirect received did not match the user's most recent attempt.\n - __INVALID_MARKETPLACE_POSTBACK__: The redirect indicated a complete, but no/invalid Postback was received from the marketplace\n - __NO_MARKETPLACE_POSTBACK__: No/invalid Postback was received from the marketplace. Used in cases where the redirect does not contain a status.\n - __COMPLETE_TOO_FAST__: The marketplace indicates the user completed the survey, but we don't think this is valid due to speeding. Generally this cutoff is the 95th percentile of our calculated CompletionTime survey stat.\n - __INTERNAL_ERROR__: Something happened during the handling of this redirect (on our side)","examples":[null]},"ext_status_code_1":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 1"},"ext_status_code_2":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 2"},"ext_status_code_3":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 3"},"report_value":{"anyOf":[{"$ref":"#/components/schemas/ReportValue"},{"type":"null"}]},"report_notes":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Report Notes"},"adjusted_status":{"anyOf":[{"$ref":"#/components/schemas/WallAdjustedStatus"},{"type":"null"}]},"adjusted_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Adjusted Timestamp"},"user_cpi":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Cpi","description":"\n The amount the user would earn from completing this task, if the status was a complete.\n If the BP has no payout xform, the user_cpi is None. This is analogous to the session's\n user_payout.\n ","examples":[123]},"user_cpi_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cpi String","description":"If a payout transformation is configured on this account, this is the amount to display to the user","examples":["123 Points"]}},"additionalProperties":false,"type":"object","required":["source","req_survey_id"],"title":"WallOut"},"WallStatusCode2":{"type":"integer","enum":[12,16,17,13,18,14,15],"title":"WallStatusCode2","description":"This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL"},"YieldManConfig":{"properties":{"category_request":{"$ref":"#/components/schemas/OfferWallCategoryRequest"},"scoring_params":{"$ref":"#/components/schemas/OfferWallRequestYieldmanParams"}},"type":"object","title":"YieldManConfig"}}},"tags":[{"name":"Offerwall","description":"Generate and retrieve various offerwall groupings. These results should be called \"on the \n fly\" just before presenting the results to a respondent. Results greater than 3 minutes old should not be \n presented to the respondent. When a respondent takes any action on a generated offerwall (they go into a \n bucket), the offerwall should be discarded. Any subsequent bucket entrances will fail. The following reserved \n are reserved keywords. However, any additional query parameter that is provided, will be returned back in the \n TaskResponse response in the kwargs attribute.\n\n {'b', 'bp_user_id', 'bpuid', 'country_codes', 'country', 'cpi', 'currency', \n 'description', 'duration', 'entry_link', 'i', 'idx', 'info', 'ip', 'kwargs',\n 'l', 'lang_codes', 'languages', 'loi', 'name', 'payout', 'product_id', \n 'quality', 'quality_category', 'req_loi', 'status', 'task_uri', 'tasks', \n 'tsid', 'uri', 'url', 'country_iso', 'format', 'behavior'}"},{"name":"Status","description":"Retrieving the status of respondent attempts, either by brokerage account filtering, or a specific Task Status ID (TSID) that is provided in the redirect."}]}
\ No newline at end of file +{"openapi":"3.1.0","info":{"title":"General Research Full Service Brokerage API","version":"1.2.0"},"servers":[{"url":"https://fsb.generalresearch.com/","description":"Production environment"}],"paths":{"/{product_id}/offerwall/b145b803/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents.","operationId":"TopN_Plus_Offerwall__product_id__offerwall_b145b803__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/d48cce47/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Block Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.","operationId":"TopN_Plus_Block_Offerwall__product_id__offerwall_d48cce47__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusBlockOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/1e5f0af8/":{"get":{"tags":["Offerwall"],"summary":"Topn Plus Block Recontact Offerwall","description":"Same as the TopNOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.","operationId":"TopN_Plus_Block_Recontact_Offerwall__product_id__offerwall_1e5f0af8__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopNPlusBlockRecontactOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/5481f322/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents.","operationId":"Starwall_Plus_Offerwall__product_id__offerwall_5481f322__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7fa1b3f4/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Block Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.","operationId":"Starwall_Plus_Block_Offerwall__product_id__offerwall_7fa1b3f4__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusBlockOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/630db2a4/":{"get":{"tags":["Offerwall"],"summary":"Starwall Plus Block Recontact Offerwall","description":"Same as the StarwallOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.","operationId":"Starwall_Plus_Block_Recontact_Offerwall__product_id__offerwall_630db2a4__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":3,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"split_by","in":"query","required":false,"schema":{"enum":["payout","duration"],"type":"string","description":"Cluster tasks by payout or duration","default":"payout","title":"Split By"},"description":"Cluster tasks by payout or duration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StarwallPlusBlockRecontactOfferWallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/5fa23085/":{"get":{"tags":["Offerwall"],"summary":"Marketplace Offerwall","description":"Returns buckets grouped by marketplace, one per marketplace, with the\ntasks ordered by quality.","operationId":"Marketplace_Offerwall__product_id__offerwall_5fa23085__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":3,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/6f27b1ae/":{"get":{"tags":["Offerwall"],"summary":"One Shot Offerwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.","operationId":"One_Shot_Offerwall__product_id__offerwall_6f27b1ae__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":8,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"sources","in":"query","required":false,"schema":{"type":"array","uniqueItems":true,"items":{"$ref":"#/components/schemas/Source"},"description":"Restrict tasks to those from these marketplaces only.","title":"Sources"},"description":"Restrict tasks to those from these marketplaces only."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OneShotOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/55a4e1a9/":{"get":{"tags":["Offerwall"],"summary":"Wxet Offerwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.","operationId":"WXET_Offerwall__product_id__offerwall_55a4e1a9__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":8,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WXETOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/37d1da64/":{"get":{"tags":["Offerwall"],"summary":"Offerwall Softpair","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.","operationId":"offerwall_softpair__product_id__offerwall_37d1da64__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":12,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":1,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"max_options","in":"query","required":false,"schema":{"type":"integer","description":"Max number of options an allowed question can have (allowed to be asked)","default":40,"title":"Max Options"},"description":"Max number of options an allowed question can have (allowed to be asked)"},{"name":"max_questions","in":"query","required":false,"schema":{"type":"integer","description":"Max number of missing questions on a single bin","default":3,"title":"Max Questions"},"description":"Max number of missing questions on a single bin"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/37d1da64/{offerwall_id}/":{"post":{"tags":["Offerwall"],"summary":"Offerwall Softpair Post","description":"This is a custom endpoint for a softpair-style offerwall that allows\nyou to update profiling answers and then immediately get back the\nupdated offerwall","operationId":"offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"offerwall_id","in":"path","required":true,"schema":{"type":"string","description":"The offerwall ID the user is interacting with","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"],"title":"Offerwall Id"},"description":"The offerwall ID the user is interacting with"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A session id (uuid4.hex)","examples":["dd6aa32cfe834839a80195563f528337"],"title":"Session Id"},"description":"A session id (uuid4.hex)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7a89dcdb/":{"get":{"tags":["Offerwall"],"summary":"Offerwall Softpair Block","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.\nNo buckets are returned if the user is blocked.","operationId":"offerwall_softpair_block__product_id__offerwall_7a89dcdb__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"languages","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)","title":"Languages"},"description":"Respondent's desired languages (ISO 639-2/B, lowercase)"},{"name":"behavior","in":"query","required":false,"schema":{"type":"string","maxLength":12,"description":"Allows using custom scoring functions. Please discuss directly with GRL.","title":"Behavior"},"description":"Allows using custom scoring functions. Please discuss directly with GRL."},{"name":"min_payout","in":"query","required":false,"schema":{"type":"string","description":"Decimal representation of the minimum amount of USD that any of the tasks will pay","examples":["1.23"],"title":"Min Payout"},"description":"Decimal representation of the minimum amount of USD that any of the tasks will pay"},{"name":"duration","in":"query","required":false,"schema":{"type":"integer","description":"Maximum length of desired task (in seconds).","title":"Duration"},"description":"Maximum length of desired task (in seconds)."},{"name":"n_bins","in":"query","required":false,"schema":{"type":"integer","description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split.","default":12,"title":"N Bins"},"description":"Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all \n duration + payout metrics on across all (as shown by the availability_count).\n n_bins=0 will return back an empty bucket array, however, the availability_count will still show \n the total opportunities available for that bpuid + passed in parameter settings.\n n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split."},{"name":"min_bin_size","in":"query","required":false,"schema":{"type":"integer","description":"Minimum number of tasks that need to be in a bucket","default":1,"title":"Min Bin Size"},"description":"Minimum number of tasks that need to be in a bucket"},{"name":"max_options","in":"query","required":false,"schema":{"type":"integer","description":"Max number of options an allowed question can have (allowed to be asked)","default":40,"title":"Max Options"},"description":"Max number of options an allowed question can have (allowed to be asked)"},{"name":"max_questions","in":"query","required":false,"schema":{"type":"integer","description":"Max number of missing questions on a single bin","default":3,"title":"Max Questions"},"description":"Max number of missing questions on a single bin"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/offerwall/7a89dcdb/{offerwall_id}/":{"post":{"tags":["Offerwall"],"summary":"Offerwall Softpair Block Post","description":"This is a custom endpoint for a softpair-style offerwall that allows\nyou to update profiling answers and then immediately get back the\nupdated offerwall","operationId":"offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"offerwall_id","in":"path","required":true,"schema":{"type":"string","description":"The offerwall ID the user is interacting with","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"],"title":"Offerwall Id"},"description":"The offerwall ID the user is interacting with"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A session id (uuid4.hex)","examples":["dd6aa32cfe834839a80195563f528337"],"title":"Session Id"},"description":"A session id (uuid4.hex)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SoftPairOfferwallResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/status/{tsid}/":{"get":{"tags":["Status"],"summary":"Get Task Status","description":"Retrieve the status of a session by a specific Task Status ID (`tsid`)\nthat is provided in the redirect.\n\nGiven a `tsid`, get back the status of the wall event. This endpoint\nconflates the idea of a wall event and a session, but for these\npurposes, the status and payout of the last wall event in a session\nequals the status and payout for the session.","operationId":"Get_Task_Status__product_id__status__tsid___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"tsid","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Task Status ID","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"description":"A unique identifier for the session"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStatusResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusInfoResponseFail"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/status/":{"get":{"tags":["Status"],"summary":"List Task Statuses","operationId":"List_Task_Statuses__product_id__status__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Filters the returned task status to only include those done by this user.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Filters the returned task status to only include those done by this user."},{"name":"started_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago.","examples":["2026-09-28T21:56:18.627910Z",1790546179],"title":"Started After"},"description":"Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago."},{"name":"started_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were started before this timestamp. If `NULL`, default is now.","title":"Started Before"},"description":"Retrieve sessions which were started before this timestamp. If `NULL`, default is now."},{"name":"status","in":"query","required":false,"schema":{"type":"integer","description":"Filter for sessions with this status. See Task Status for description of status.","examples":[3],"title":"Status"},"description":"Filter for sessions with this status. See Task Status for description of status."},{"name":"reconciled","in":"query","required":false,"schema":{"type":"boolean","description":"Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required.","default":false,"title":"Reconciled"},"description":"Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required."},{"name":"adjusted_after","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were adjusted after this timestamp.","title":"Adjusted After"},"description":"Retrieve sessions which were adjusted after this timestamp."},{"name":"adjusted_before","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"string","format":"date-time"}],"description":"Retrieve sessions which were adjusted before this timestamp. Default is now.","title":"Adjusted Before"},"description":"Retrieve sessions which were adjusted before this timestamp. Default is now."},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated fields to order by","examples":["-started","started"],"default":"-started","title":"Order By"},"description":"Comma-separated fields to order by"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TasksStatusResponse"}}}},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponseFailure"}}},"description":"Internal Server Error"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/report/":{"post":{"tags":["Report"],"summary":"Report Task","description":"Send a \"Task Report\" for a respondent's latest started survey,\nregardless of the survey's outcome. Task Reports cannot be provided for\ntask attempts by tsid, or through any other method, they must be given\nimmediately after the respondent's task attempt.\n\nIf a latest attempt can't be found, a ReportTaskResponse is still returned.\n\nIf multiple reasons want to be provided, they should be done at the\nsame time. If multiple reports are given for the same latest started\ntask, the note attribute will be overwritten, while the new unique\nreasons will be appended to the task attempt.\n\nTask Report system contributions by client applications are immediately\nleveraged to aid yield management strategies. For those reasons, it's\nimportant that the respondent submits a Task Report as soon as possible\nand applications doesn't offload this request for a later time. Task\nReport timestamps are a critical component of understanding a Task\nexperience for a respondent.\n\nFor the BP to tell us about a bad survey they want to report\nThe POSTed data looks like:\n {\n 'bpuid': '1234',\n 'reasons': [2],\n 'notes': \"This survey was the worst!\"\n }\nReturns {'status': 'success', 'msg': error_msg}","operationId":"report_task__product_id__report__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportTask"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/profiling-questions/":{"get":{"tags":["Profiling Questions"],"summary":"Get Profiling Questions","description":"Gets a list of profiling questions to ask this user. These questions\nare, as of right now, unanswered. Once a question is answered, it\n(and any other question whose answer is inferred from other answers) is\nremoved from the list. The questions returned are ordered by\nimportance (the key task_score) in descending order.","operationId":"get_profiling_questions__product_id__profiling_questions__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"type":"string","description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided.","title":"Ip"},"description":"Respondent's IP address (IPv4 or IPv6). Either 'ip' must be provided, or 'country_iso' must be provided if 'ip' is not provided."},{"name":"country_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"description":"Number of questions to return. Questions are ordered, so, selects the N most important. If no limit is passed, then the number of questions returned is dynamically calculated by the questions' importance.","title":"Limit"},"description":"Number of questions to return. Questions are ordered, so, selects the N most important. If no limit is passed, then the number of questions returned is dynamically calculated by the questions' importance."},{"name":"is_grs","in":"query","required":false,"schema":{"type":"boolean","description":"If it's the GRS system.","default":false,"title":"Is Grs"},"description":"If it's the GRS system."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpkQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Profiling Questions"],"summary":"Submit Profiling Questions","description":"Send the answers to one or more of these questions for a user. A\nquestion is uniquely specified by the question_id key. The answer is:\nthe choice_id if the question_type is \"MC\" the actual entered text if\nthe question_type is \"TE\"","operationId":"submit_profiling_questions__product_id__profiling_questions__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"session_id","in":"query","required":false,"schema":{"type":"string","description":"The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional.","title":"Session Id"},"description":"The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional."},{"name":"async","in":"query","required":false,"schema":{"type":"boolean","description":"For internal use.","default":true,"title":"Async"},"description":"For internal use."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_submit_profiling_questions__product_id__profiling_questions__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/profiling-info/":{"get":{"tags":["Profiling Questions"],"summary":"Profiling Info","description":"Get UPK Ontology (list of properties, property info, and allowed values)","operationId":"profiling_info__product_id__profiling_info__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"country_iso","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfilingInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user-profile/":{"get":{"tags":["Profiling Questions"],"summary":"User Profile","operationId":"user_profile__product_id__user_profile__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"country_iso","in":"query","required":true,"schema":{"type":"string","pattern":"^[a-z]{2}$","description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)","examples":["us"],"title":"Country Iso"},"description":"Respondent's country code (ISO 3166-1 alpha-2, lowercase)"},{"name":"language_iso","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]{3}$","description":"Respondent's desired language (ISO 639-2/B, lowercase)","examples":["eng"],"title":"Language Iso"},"description":"Respondent's desired language (ISO 639-2/B, lowercase)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user/{product_user_id}/profile/":{"get":{"tags":["Product User"],"summary":"User Profile","operationId":"user_profile__product_id__user__product_user_id__profile__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Product User"],"summary":"User Profile Update","operationId":"user_profile_update__product_id__user__product_user_id__profile__patch","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/user/by-marketplace-pid/":{"get":{"tags":["Product User"],"summary":"User Profile Filter By Marketplace Pid","operationId":"user_profile_filter_by_marketplace_pid__product_id__user_by_marketplace_pid__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"source","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Source","description":"The marketplace to search"},"description":"The marketplace to search"},{"name":"pid","in":"query","required":true,"schema":{"type":"array","items":{"type":"string","minLength":32,"maxLength":32},"description":"The user's marketplace PID. Supports multiple params","title":"Pid"},"description":"The user's marketplace PID. Supports multiple params"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfilesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/leaderboard/timespan/{board_code}/":{"get":{"tags":["Leaderboard"],"summary":"Timespan Leaderboard","operationId":"Timespan_Leaderboard__product_id__leaderboard_timespan__board_code___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"board_code","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},"description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},{"name":"freq","in":"query","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},"description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},{"name":"country_iso","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}],"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request.","examples":["us"],"title":"Country Iso"},"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request."},{"name":"bpuid","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":128,"description":"Brokerage Product User ID. If passed, this results in the filtering of rows to include this user's row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned.","examples":["app-user-9329ebd"],"title":"Bpuid"},"description":"Brokerage Product User ID. If passed, this results in the filtering of rows to include this user's row, plus rows above and below in rank (up to `limit` rows). Otherwise, the top `limit` rows are returned."},{"name":"within_time","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Any local timestamp falling within the desired leaderboard's period. If not passed, uses the country's current time period.","examples":["2024-02-27","2024-02-27T15:30:00"],"title":"Within Time"},"description":"Any local timestamp falling within the desired leaderboard's period. If not passed, uses the country's current time period."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","exclusiveMaximum":5000,"exclusiveMinimum":0,"description":"Max number of rows to return","default":50,"title":"Limit"},"description":"Max number of rows to return"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/leaderboard/timespan/{board_code}/winners/":{"get":{"tags":["Leaderboard"],"summary":"Leaderboard Winners","description":"Get the Winners of leaderboard contests","operationId":"Leaderboard_Winners__product_id__leaderboard_timespan__board_code__winners__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"board_code","in":"path","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},"description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts"},{"name":"freq","in":"query","required":true,"schema":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},"description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00"},{"name":"country_iso","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}$"},{"type":"null"}],"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request.","examples":["us"],"title":"Country Iso"},"description":"Country ISO Code (ISO 3166-1 alpha-2, lowercase) of the requested leaderboard. If not passed, thecountry is determined from the IP address of the HTTP request."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeaderboardWinnerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/{contest_uuid}/user/{product_user_id}/":{"get":{"tags":["Contest"],"summary":"Get Contest User View","description":"Gets a Contest. Includes several keys that are specific to the requesting user:\n e.g. user_winnings, user_amount.","operationId":"Get_Contest_User_View__product_id__contest__contest_uuid__user__product_user_id___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"contest_uuid","in":"path","required":true,"schema":{"type":"string","title":"Contest Uuid"}},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}],"title":"Response Get Contest User View Product Id Contest Contest Uuid User Product User Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/entered/":{"get":{"tags":["Contest"],"summary":"List Contests User Entered","description":"Get contests the requesting user has entered. This includes contests such as milestone\n contests where the user was automatically entered by having a complete for instance.","operationId":"List_Contests_User_Entered__product_id__contest_user__product_user_id__entered__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Entered Product Id Contest User Product User Id Entered Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/eligible/":{"get":{"tags":["Contest"],"summary":"List Contests User Eligible","description":"Get contests the requesting user is eligible for.\nContest eligibility may involve the user's country, which is determined by the ip address\n of THIS request.","operationId":"List_Contests_User_Eligible__product_id__contest_user__product_user_id__eligible__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Eligible Product Id Contest User Product User Id Eligible Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/contest/user/{product_user_id}/winner/":{"get":{"tags":["Contest"],"summary":"List Contests User Winner","description":"Get contests the requesting user has won a prize for.","operationId":"List_Contests_User_Winner__product_id__contest_user__product_user_id__winner__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"product_user_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"anyOf":[{"$ref":"#/components/schemas/RaffleUserView"},{"$ref":"#/components/schemas/LeaderboardContestUserView"},{"$ref":"#/components/schemas/MilestoneUserView"}]},"title":"Response List Contests User Winner Product Id Contest User Product User Id Winner Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/":{"get":{"tags":["Wallet"],"summary":"Get User Wallet Balance","description":"Retrieve the current balance of a respondent's wallet balance for display","operationId":"get_user_wallet_balance__product_id__wallet__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWalletBalanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallets/":{"get":{"tags":["Wallet"],"summary":"Get User Wallets","description":"Retrieve a respondent's wallets and balances for display","operationId":"get_user_wallets__product_id__wallets__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLedgerWallets"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_methods/":{"get":{"tags":["Wallet"],"summary":"Get Cashout Methods","description":"Retrieve the current available mechanisms that a user can use to retrieve funds.","operationId":"get_cashout_methods__product_id__cashout_methods__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"ip","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"ipvanyaddress"},{"type":"null"}],"description":"The end user's public IPv4 or IPv6 address.","title":"Ip"},"description":"The end user's public IPv4 or IPv6 address."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Wallet"],"summary":"Create Cashout Method","description":"A user can only have 1 unique Cashout Method of any type at a time (e.g. they can't create multiple PayPal\npayout methods). Cashout Methods cannot be edited, they can only be created or deleted. Creating different\nCashout Methods will require type-dependent request data attributes in order to be successfully created.\n\nCurrently only creating PayPal or Cash in Mail cashout methods is supported","operationId":"create_cashout_method__product_id__cashout_methods__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CreatePayPalCashoutMethodRequest"},{"$ref":"#/components/schemas/CreateCashMailCashoutMethodRequest"}],"discriminator":{"propertyName":"type","mapping":{"PAYPAL":"#/components/schemas/CreatePayPalCashoutMethodRequest","CASH_IN_MAIL":"#/components/schemas/CreateCashMailCashoutMethodRequest"}},"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_methods/{cashout_method_id}/":{"get":{"tags":["Wallet"],"summary":"Get Cashout Method","description":"Retrieve a cashout method","operationId":"get_cashout_method__product_id__cashout_methods__cashout_method_id___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_method_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The ID of the cashout method","title":"Cashout Method Id"},"description":"The ID of the cashout method"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Wallet"],"summary":"Delete Cashout Method","description":"Delete a cashout method","operationId":"delete_cashout_method__product_id__cashout_methods__cashout_method_id___delete","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_method_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The ID of the cashout method to delete","title":"Cashout Method Id"},"description":"The ID of the cashout method to delete"},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout/":{"get":{"tags":["Wallet"],"summary":"Filter User Cashouts","operationId":"filter_user_cashouts__product_id__cashout__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/PayoutStatus"}},{"type":"null"}],"description":"Filter by one or more payout statuses","title":"Status"},"description":"Filter by one or more payout statuses"},{"name":"payout_type","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/PayoutType"}},{"type":"null"}],"description":"Filter by one or more payout types","title":"Payout Type"},"description":"Filter by one or more payout types"},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated fields to order by","examples":["-created","created"],"default":"created","title":"Order By"},"description":"Comma-separated fields to order by"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Wallet"],"summary":"Submit User Cashout","description":"Request a cashout taken from a user's available wallet balance, to be paid via a particular\ncashout method.","operationId":"submit_user_cashout__product_id__cashout__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCashoutRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout/{cashout_id}/":{"get":{"tags":["Wallet"],"summary":"Get Cashout Detail","description":"Retrieve the details for a specific Cashout event","operationId":"get_cashout_detail__product_id__cashout__cashout_id___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The cashout event ID","title":"Cashout Id"},"description":"The cashout event ID"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/transaction_history/":{"get":{"tags":["Wallet"],"summary":"Get User Transaction History","description":"Return array of user events that altered their wallet balance","operationId":"get_user_transaction_history__product_id__transaction_history__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"bpuid","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":128,"title":"Brokerage Product User ID","description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values.","examples":["app-user-9329ebd"]},"description":"A unique identifier for each user, which is set by the Supplier. Must be consistent across respondent entrances and unique to the platform. It should not contain any sensitive information like email or names, and should avoid using any incrementing values."},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Filter transactions created after this timestamp","examples":["2025-01-01T04:20:00.000000Z"],"title":"Created After"},"description":"Filter transactions created after this timestamp"},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","description":"Filter transactions created before this timestamp","examples":["2026-09-28T21:56:18.660853Z"],"title":"Created Before"},"description":"Filter transactions created before this timestamp"},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated fields to order by","examples":["-created","created"],"default":"created","title":"Order By"},"description":"Comma-separated fields to order by"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLedgerTransactionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/cashout_method/{cashout_method_id}/value/":{"get":{"tags":["Wallet"],"summary":"Get Expected Redemption Value","description":"Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this\n cashout_method, for amount (in USD cents).","operationId":"get_expected_redemption_value__product_id__cashout_method__cashout_method_id__value__get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"cashout_method_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"description":"The ID of the cashout method","examples":["0d363971792249b1a34586f092819e4b"],"title":"Cashout Method Id"},"description":"The ID of the cashout method"},{"name":"amount","in":"query","required":true,"schema":{"type":"integer","description":"(USD cents) The amount to convert","examples":[100],"title":"Amount"},"description":"(USD cents) The amount to convert"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutMethodForeignValueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/attempt-credit/":{"post":{"tags":["Wallet"],"summary":"Claim Latest Attempt Credit","description":"Attempt to claim an Attempt Credit from the user's latest Session.","operationId":"claim_latest_attempt_credit__product_id__wallet_attempt_credit__post","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimBody"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/{product_id}/wallet/attempt-credit/{tsid}/":{"get":{"tags":["Wallet"],"summary":"Get Attempt Credit","description":"Get an Attempt Credit by a user's Session.","operationId":"get_attempt_credit__product_id__wallet_attempt_credit__tsid___get","parameters":[{"name":"product_id","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Brokerage Product ID","description":"The Brokerage Product ID provided by GRL.","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"description":"The Brokerage Product ID provided by GRL."},{"name":"tsid","in":"path","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Task Status ID","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"description":"A unique identifier for the session"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptCreditClaimResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thl/f4484dbdf144451ab60cda256ce14266/":{"post":{"tags":["THL"],"summary":"Submit Task Adjustment","description":"Handle Wall status adjustment requests. Typically, this is a complete -> failure recon\n or the reverse.\nInternally, this hits the UserQualityHistory grpc call.","operationId":"submit_task_adjustment_thl_f4484dbdf144451ab60cda256ce14266__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskAdjustmentEventBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thl/9bf111afe03e40719c5cd0de0dc43c31/":{"post":{"tags":["THL"],"summary":"Submit Access Control Request","description":"Handle user access control adjustment requests. This is to add/remove users\n from white/black lists (for manual blocking/unblocking).\nInternally, this hits the UserQualityHistory grpc call.","operationId":"submit_access_control_request_thl_9bf111afe03e40719c5cd0de0dc43c31__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccessControlEventBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/thl/paypal_webhook/":{"post":{"tags":["THL"],"summary":"Paypal Webhook","operationId":"paypal_webhook_thl_paypal_webhook__post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/dashboard/inventory/":{"get":{"tags":["Dashboard"],"summary":"Marketplace Inventory","operationId":"marketplace_inventory_dashboard_inventory__get","parameters":[{"name":"marketplace","in":"query","required":true,"schema":{"const":"WXET","type":"string","examples":["WXET"],"title":"Marketplace"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarketplaceSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ws/debug/":{"get":{"tags":["Streams"],"summary":"Websocket Debug Page","operationId":"websocket_debug_page_ws_debug__get","parameters":[{"name":"product_id","in":"query","required":true,"schema":{"type":"string","minLength":32,"maxLength":32,"title":"Product Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/ws/events/docs/":{"get":{"tags":["Streams"],"summary":"Websocket Events Docs","description":"WebSocket endpoint: `/ws/events/`\n\nProtocol:\n- Client connects\n- Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }`\n- Server sends a PingMessage `{ kind: \"ping\" }`\n- Client must reply a PongMessage: `{ kind: \"pong\" }`\n- Other messages are EventMessage or StatsMessage\n\nClose on missing pong after 20s.","operationId":"websocket_events_docs_ws_events_docs__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EventMessage"},{"$ref":"#/components/schemas/StatsMessage"},{"$ref":"#/components/schemas/PingMessage"},{"$ref":"#/components/schemas/SubscribeMessage"},{"$ref":"#/components/schemas/PongMessage"}],"title":"Response Websocket Events Docs Ws Events Docs Get"}}}}}}}},"components":{"schemas":{"AccessControlEvent":{"properties":{"quality_event_type":{"type":"string","enum":["add_to_whitelist","add_to_blacklist","clear_access_control_list"],"title":"Quality Event Type"},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"bpuid":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Bpuid","examples":["app-user-9329ebd"]},"user_id":{"anyOf":[{"type":"integer","exclusiveMaximum":2147483648.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"User Id"}},"type":"object","required":["quality_event_type"],"title":"AccessControlEvent"},"AccessControlEventBody":{"properties":{"events":{"items":{"$ref":"#/components/schemas/AccessControlEvent"},"type":"array","maxItems":100,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"AccessControlEventBody"},"AccessType":{"type":"string","enum":["residential","mobile","satellite","datacenter","enterprise","unknown"],"title":"AccessType","description":"How the network is used"},"AccountType":{"type":"string","enum":["bp_commission","bp_wallet","user_wallet","user_attempt_credit","cash","revenue","expense","contest_wallet","credit_line","wa_wallet","wa_budget_pool","wa_held","wa_credit_line"],"title":"AccountType"},"AdjustmentType":{"properties":{"amount":{"type":"integer","title":"Amount","description":"The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period from a specificSource of Tasks."},"adjustment":{"$ref":"#/components/schemas/SessionAdjustedStatus","description":" - `ac` = ADJUSTED_TO_COMPLETE\n - `af` = ADJUSTED_TO_FAIL\n - `pa` = PAYOUT_ADJUSTMENT","examples":["af"]}},"type":"object","required":["amount","adjustment"],"title":"AdjustmentType"},"AggregateBySource":{"properties":{"total":{"type":"integer","minimum":0.0,"title":"Total","default":0},"by_source":{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"By Source"}},"type":"object","title":"AggregateBySource"},"AmtCashoutMethodData":{"properties":{"type":{"type":"string","const":"AMT","title":"Type","default":"AMT"}},"type":"object","title":"AmtCashoutMethodData"},"AttemptCreditClaimBody":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user requesting the claim","examples":["app-user-9329ebd"]}},"type":"object","required":["bpuid"],"title":"AttemptCreditClaimBody"},"AttemptCreditClaimResponse":{"properties":{"amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount","description":"(USD cents) The amount given to the user as an attempt credit."}},"type":"object","required":["amount"],"title":"AttemptCreditClaimResponse"},"AuditLog":{"properties":{"id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Id"},"user_id":{"type":"integer","exclusiveMinimum":0.0,"title":"User Id"},"created":{"type":"string","format":"date-time","title":"Created","description":"When did this event occur","examples":["2026-09-28T21:56:17.463856Z"]},"level":{"$ref":"#/components/schemas/AuditLogLevel","description":"The level of importance for this event. Works the same as python logging levels. It is an integer 0 - 50, and implementers of this field could map it to the predefined levels: (`CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`).This is NOT the same concept as the 'strength' of whatever event happened; it is just for sorting, filtering and display purposes. For e.g. multiple level 20 events != the 'importance' of one level 40 event.","examples":[30]},"event_type":{"type":"string","maxLength":64,"title":"Event Type","examples":["entrance-limit"]},"event_msg":{"anyOf":[{"type":"string","maxLength":256,"minLength":3},{"type":"null"}],"title":"Event Msg","description":"The event message. Could be displayed on user's page"},"event_value":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Event Value","description":"Optionally store a numeric value associated with this event. For e.g. if we recalculate the user's normalized recon rate, and it is 'high', we could store an event like (event_type='recon-rate', event_msg='higher than allowed recon rate' event_value=0.42)","examples":[0.42]}},"type":"object","required":["user_id","level","event_type"],"title":"AuditLog","description":"Table / Model for logging \"actions\" taken by a user or \"events\" that\nare related to a User"},"AuditLogLevel":{"type":"integer","enum":[50,50,40,30,30,20,10,0],"title":"AuditLogLevel"},"Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_offerwall_softpair_block_post__product_id__offerwall_7a89dcdb__offerwall_id___post"},"Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_offerwall_softpair_post__product_id__offerwall_37d1da64__offerwall_id___post"},"Body_submit_profiling_questions__product_id__profiling_questions__post":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/UserQuestionAnswerIn"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"Body_submit_profiling_questions__product_id__profiling_questions__post"},"BrokerageProductPayoutEvent":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Event Unique Identifier","examples":["9453cd076713426cb68d05591c7145aa"]},"debit_account_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Debit Account Uuid","description":"The LedgerAccount.uuid that money is being requested from. Thie User or Brokerage Product is retrievable through the LedgerAccount.reference_uuid","examples":["18298cb1583846fbb06e4747b5310693"]},"cashout_method_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Cashout Method Uuid","description":"References a row in the account_cashoutmethod table. This is the cashout method that was used to request this payout. (A cashout is the same thing as a payout)","examples":["a6dc1fc1bf934557b952f253dee12813"]},"created":{"type":"string","format":"date-time","title":"Created"},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount int. This cannot be 0 or negative","examples":[531]},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["COMPLETE"]},"ext_ref_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Ref Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"request_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Data","description":"Stores payout-type-specific information that is used to request this payout from the external provider."},"order_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"$ref":"#/components/schemas/CashMailOrderData"},{"type":"null"}],"title":"Order Data","description":"Stores payout-type-specific order information that is returned from the external payout provider."},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"The Brokerage Product that was paid out","examples":["1108d053e4fa47c5b0dbdcd03a7981e7"]},"method":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","readOnly":true,"examples":["ACH"]},"amount_usd":{"type":"integer","minimum":0.0,"title":"Amount Usd","readOnly":true,"examples":["$10,000.000"]},"amount_usd_str":{"type":"string","title":"Amount Usd Str","readOnly":true,"examples":["$10,000.000"]}},"type":"object","required":["debit_account_uuid","cashout_method_uuid","amount","payout_type","product_id","method","amount_usd","amount_usd_str"],"title":"BrokerageProductPayoutEvent","description":"The amount\n\n- created: When the Brokerage Product was paid out"},"BucketTask":{"properties":{"id":{"type":"string","maxLength":32,"minLength":1,"title":"Id","description":"The internal task id for this task within the marketplace","examples":["6ov9jz3"]},"id_code":{"type":"string","maxLength":35,"minLength":3,"pattern":"^[a-z]{1,2}\\:.*","title":"Id Code","description":"The namespaced task id for this task within the marketplace","examples":["o:6ov9jz3"]},"source":{"$ref":"#/components/schemas/Source","examples":["o"]},"loi":{"type":"integer","maximum":5400.0,"exclusiveMinimum":1.0,"title":"Loi","description":"expected loi in seconds","examples":[612]},"payout":{"type":"integer","exclusiveMinimum":1.0,"title":"Payout","description":"integer cents","examples":[123]}},"type":"object","required":["id","id_code","source","loi","payout"],"title":"BucketTask","description":"This represents one of the \"tasks\" within a bucket's ordered list of tasks."},"Cardinality":{"type":"string","enum":["*","?"],"title":"Cardinality"},"CashMailCashoutMethodData":{"properties":{"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"delivery_address":{"$ref":"#/components/schemas/USDeliveryAddress","description":"Delivery address where payment should be sent"}},"type":"object","required":["delivery_address"],"title":"CashMailCashoutMethodData"},"CashMailOrderData":{"properties":{"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"shipping_cost":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Shipping Cost","description":"(USD cents) The shipping cost. This amount get charged to the BP."},"tracking_number":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Tracking Number"},"shipping_method":{"anyOf":[{"$ref":"#/components/schemas/ShippingMethod","maxLength":50,"minLength":1},{"type":"null"}],"description":"Standard, express, etc."},"carrier":{"anyOf":[{"$ref":"#/components/schemas/ShippingCarrier","maxLength":50,"minLength":1},{"type":"null"}],"description":"Name of the shipping company, e.g., USPS, FedEx, DHL"},"ship_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ship Date"},"estimated_delivery_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Estimated Delivery Date"},"delivery_status":{"anyOf":[{"$ref":"#/components/schemas/DeliveryStatus","maxLength":50,"minLength":1},{"type":"null"}],"description":"Current status of delivery, e.g., pending, in transit, delivered"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated","description":"Timestamp of the last status update"}},"type":"object","required":["shipping_cost"],"title":"CashMailOrderData"},"CashoutMethodForeignValue":{"properties":{"value":{"type":"integer","minimum":0.0,"title":"Value","description":"Value of the redemption in the currency's smallest unit."},"currency":{"$ref":"#/components/schemas/Currency","description":"\nAllowed values: \n - __USD__ *(USD)*: United States Dollar. Smallest Unit: Cents.\n - __CAD__ *(CAD)*: Canadian Dollar. Smallest Unit: Cents.\n - __GBP__ *(GBP)*: British Pound. Smallest Unit: Pence.\n - __EUR__ *(EUR)*: Euro. Smallest Unit: Cents.\n - __INR__ *(INR)*: Indian Rupee. Smallest Unit: Paise.\n - __AUD__ *(AUD)*: Australian Dollar. Smallest Unit: Cents.\n - __PLN__ *(PLN)*: Polish Zloty. Smallest Unit: Grosz.\n - __SEK__ *(SEK)*: Swedish Krona. Smallest Unit: Öre.\n - __SGD__ *(SGD)*: Singapore Dollar. Smallest Unit: Cents.\n - __MXN__ *(MXN)*: Mexican Peso. Smallest Unit: Centavos."},"value_string":{"type":"string","title":"Value String","description":"A string representation of the value in the currency."}},"type":"object","required":["value","currency","value_string"],"title":"CashoutMethodForeignValue","description":"Shows the expected value of a redemption in a foreign currency.","example":{"currency":"CAD","value":"138","value_string":"$1.38 CAD"}},"CashoutMethodForeignValueResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_method_value":{"$ref":"#/components/schemas/CashoutMethodForeignValue"}},"type":"object","required":["cashout_method_value"],"title":"CashoutMethodForeignValueResponse"},"CashoutMethodOut":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique ID for this cashout method"},"currency":{"type":"string","const":"USD","title":"Currency","description":"The currency of the cashout. Only USD is supported.","default":"USD"},"original_currency":{"anyOf":[{"$ref":"#/components/schemas/Currency"},{"type":"null"}],"description":"The base currency of the money paid out. This is used for e.g. sending an Amazon UK gift card"},"data":{"oneOf":[{"$ref":"#/components/schemas/PaypalCashoutMethodData"},{"$ref":"#/components/schemas/TangoCashoutMethodData"},{"$ref":"#/components/schemas/CashMailCashoutMethodData"},{"$ref":"#/components/schemas/AmtCashoutMethodData"}],"title":"Data","discriminator":{"propertyName":"type","mapping":{"AMT":"#/components/schemas/AmtCashoutMethodData","CASH_IN_MAIL":"#/components/schemas/CashMailCashoutMethodData","PAYPAL":"#/components/schemas/PaypalCashoutMethodData","TANGO":"#/components/schemas/TangoCashoutMethodData"}}},"description":{"type":"string","title":"Description","description":"The description of the cashout method.","default":""},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url","description":"Link to an image to display"},"max_value":{"type":"integer","exclusiveMinimum":0.0,"title":"Max Value","description":"(In lowest unit of the original_currency), The maximum amount that can be cashed out in one transaction."},"min_value":{"type":"integer","minimum":0.0,"title":"Min Value","description":"(In lowest unit of the original_currency), The minimum amount that can be cashed out in one transaction."},"name":{"type":"string","title":"Name","description":"A descriptive name for the cashout method."},"type":{"$ref":"#/components/schemas/PayoutType","description":"The method in which the requested payout is delivered.\n\nAllowed values: \n - __PAYPAL__ *(PAYPAL)*: User is paid out to their personal PayPal email address\n - __TANGO__ *(TANGO)*: User is paid out via a Tango Gift Card\n - __TREMENDOUS__ *(TREMENDOUS)*: Tremendous Gift Card\n - __DWOLLA__ *(DWOLLA)*: DWOLLA\n - __ACH__ *(ACH)*: A payment is made to a bank account using ACH\n - __WIRE__ *(WIRE)*: A payment is made to a bank account using ACH\n - __CASH_IN_MAIL__ *(CASH_IN_MAIL)*: A payment is made in cash and mailed to the user.\n - __PRIZE__ *(PRIZE)*: A payment is made as a prize with some monetary value\n - __AMT__ *(AMT)*: This is used to designate either AMT_BONUS or AMT_HIT\n - __AMT_BONUS__ *(AMT_BONUS)*: Amazon Mechanical Turk as a Bonus\n - __AMT_ASSIGNMENT__ *(AMT_HIT)*: Amazon Mechanical Turk for a HIT"},"ext_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ext Id","description":"An external ID. Can be shown to a user to disambiguate a user's possibly multiple methods"},"usd_exchange_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Usd Exchange Rate"},"max_value_usd":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Value Usd","description":"(In lowest unit of USD), The maximum amount that can be cashed out in one transaction."},"min_value_usd":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Min Value Usd","description":"(In lowest unit of USD), The minimum amount that can be cashed out in one transaction."},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier. It should not contain any sensitive informationlike email or names, and should avoid using anyincrementing values.","examples":["app-user-9329ebd"]},"category":{"$ref":"#/components/schemas/PayoutCategory","readOnly":true}},"type":"object","required":["id","data","max_value","min_value","name","type","category"],"title":"CashoutMethodOut","example":{"bpid":"6a3ddfb747344bbc93efadf1c3a16e1a","currency":"USD","data":{"disclaimer":"...","terms":"..."},"description":"...","id":"941d489c3ce04eb39a0ddb7f8f75db74","image_url":"https://d30s7yzk2az89n.cloudfront.net/images/brands/b238587-1200w-326ppi.png","max_value":25000,"min_value":500,"name":"Visa® Prepaid Card USD","type":"TANGO"}},"CashoutMethodResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_method":{"$ref":"#/components/schemas/CashoutMethodOut"}},"type":"object","required":["cashout_method"],"title":"CashoutMethodResponse"},"CashoutMethodsResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout_methods":{"items":{"$ref":"#/components/schemas/CashoutMethodOut"},"type":"array","title":"Cashout Methods"}},"type":"object","required":["cashout_methods"],"title":"CashoutMethodsResponse"},"CashoutRequestDetail":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique ID for this cashout","examples":["3ceb847aaf9f40f4bd15b2b5e083abf6"]},"description":{"type":"string","title":"Description","description":"This is the name of the cashout method.","examples":["Visa® Prepaid Card USD"]},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["PENDING"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id"},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"The amount in USD Cents","examples":[531]},"created":{"type":"string","format":"date-time","title":"Created"},"transaction_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transaction Info"},"category":{"$ref":"#/components/schemas/PayoutCategory","readOnly":true}},"type":"object","required":["id","description","product_id","product_user_id","payout_type","amount","created","category"],"title":"CashoutRequestDetail"},"CashoutRequestResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashout":{"$ref":"#/components/schemas/CashoutRequestDetail"}},"type":"object","required":["cashout"],"title":"CashoutRequestResponse"},"CashoutRequestSummary":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique ID for this cashout","examples":["3ceb847aaf9f40f4bd15b2b5e083abf6"]},"description":{"type":"string","title":"Description","description":"This is the name of the cashout method.","examples":["Visa® Prepaid Card USD"]},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["PENDING"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id"},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"The amount in USD Cents","examples":[531]},"created":{"type":"string","format":"date-time","title":"Created"},"category":{"$ref":"#/components/schemas/PayoutCategory","readOnly":true}},"type":"object","required":["id","description","product_id","product_user_id","payout_type","amount","created","category"],"title":"CashoutRequestSummary","description":"See models.thl.payout: PayoutEvent. We've confused a CashOut and a\nPayout. This is used only in the API response."},"CashoutRequestsResponse":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total","description":"Total number of results"},"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"cashouts":{"items":{"$ref":"#/components/schemas/CashoutRequestSummary"},"type":"array","title":"Cashouts"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages","description":"Total number of pages","readOnly":true}},"type":"object","required":["cashouts","pages"],"title":"CashoutRequestsResponse"},"Category":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid","examples":["2d40062f1b564959a1afb1d1a09a1894"]},"adwords_vertical_id":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Adwords Vertical Id"},"label":{"type":"string","maxLength":255,"title":"Label","examples":["Hair Loss"]},"path":{"type":"string","pattern":"^\\/.*[^\\/]$","title":"Path","examples":["/Beauty & Fitness/Hair Care/Hair Loss"]},"parent_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Parent Uuid","examples":["00f57c739bcc4b17b688868b9135fd55"]}},"type":"object","required":["uuid","label","path"],"title":"Category"},"CategoryAssociation":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"The category ID","examples":["c8642a1b86d9460cbe8f7e8ae6e56ee4"]},"label":{"type":"string","maxLength":255,"title":"Label","description":"The category label","examples":["People & Society"]},"adwords_id":{"anyOf":[{"type":"string","maxLength":8},{"type":"null"}],"title":"Adwords Id","examples":["14"]},"adwords_label":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Adwords Label","examples":["People & Society"]},"p":{"type":"number","maximum":1.0,"minimum":0.0,"title":"P","description":"The strength of the association of this bucketwith this category. Will sum to 1 within a bucket.","examples":[1.0]}},"type":"object","required":["id","label","p"],"title":"CategoryAssociation","description":"Used in an offerwall. Stores the association between a category\nand a bucket, with a score."},"ContestEndCondition":{"properties":{"target_entry_amount":{"anyOf":[{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer","exclusiveMinimum":0.0}],"ge":1},{"type":"null"}],"title":"Target Entry Amount","description":"The contest is over once this amount is reached. (sum of all entry amount)"},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The contest is over at this time."}},"type":"object","title":"ContestEndCondition","description":"Defines the conditions to evaluate to determine when the contest\nis over. Multiple conditions can be set. The contest is over\nonce ANY conditions are met."},"ContestEndReason":{"type":"string","enum":["cancelled","target_entry_amount","ends_at","max_winners"],"title":"ContestEndReason","description":"Defines why a contest ended"},"ContestEntry":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"entry_type":{"$ref":"#/components/schemas/ContestEntryType"},"amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer"}],"title":"Amount","description":"The amount of the entry in integer counts or USD Cents","gt":0},"amount_str":{"type":"string","title":"Amount Str","readOnly":true},"censored_product_user_id":{"type":"string","title":"Censored Product User Id","readOnly":true}},"type":"object","required":["entry_type","amount","amount_str","censored_product_user_id"],"title":"ContestEntry"},"ContestEntryRule":{"properties":{"max_entry_amount_per_user":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Entry Amount Per User","description":"Maximum total value of entries per user"},"max_daily_entries_per_user":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Daily Entries Per User","description":"Maximum entries per user allowed per day for this contest"},"min_completes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Completes"},"min_membership_level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Membership Level"},"id_verified":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Id Verified"}},"type":"object","title":"ContestEntryRule","description":"Defines rules the user must meet to be allowed to enter this contest\nOnly applies if the ContestType is ENTRY!"},"ContestEntryTrigger":{"type":"string","enum":["task_complete","task_attempt","referral"],"title":"ContestEntryTrigger","description":"Defines what action/event triggers a (possible) entry into the contest (automatically).\nThis only is valid on milestone contests"},"ContestEntryType":{"type":"string","enum":["count","cash"],"title":"ContestEntryType","description":"All entries into a contest must be of the same type, and match\nthe entry_type of the Contest itself."},"ContestPrize":{"properties":{"kind":{"$ref":"#/components/schemas/ContestPrizeKind","description":"\nAllowed values: \n - __physical__ *(PHYSICAL)*: A physical prize (e.g. a iPhone, cash in the mail, dinner with Max)\n - __promotion__ *(PROMOTION)*: A promotion is a temporary or special offer that provides extra value or benefits (e.g. 20% bonus on completes for the next 7 days)\n - __cash__ *(CASH)*: Money is deposited into user's virtual wallet"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"estimated_cash_value":{"type":"integer","minimum":0.0,"title":"Estimated Cash Value","description":"Estimated cash value of prize in USDCents"},"cash_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Cash Amount","description":"If the kind=ContestPrizeKind.CASH, this is the amount of the prize"},"promotion_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Promotion Id","description":"If the kind=ContestPrizeKind.PROMOTION, this is the promotion ID"},"leaderboard_rank":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Leaderboard Rank","description":"The prize is for achieving this rank in the associated leaderboard. The highest rank is 1."}},"type":"object","required":["kind","estimated_cash_value"],"title":"ContestPrize"},"ContestPrizeKind":{"type":"string","enum":["physical","promotion","cash"],"title":"ContestPrizeKind"},"ContestStatus":{"type":"string","enum":["active","completed","cancelled"],"title":"ContestStatus"},"ContestWinner":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this user won this prize"},"prize":{"$ref":"#/components/schemas/ContestPrize"},"awarded_cash_amount":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Awarded Cash Amount","description":"The actual amount this user receives. For cash prizes, if there was a tie, this could be different from the prize amount."},"product_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product User Id","readOnly":true}},"type":"object","required":["prize","product_user_id"],"title":"ContestWinner","description":"In a Raffle, the ContestEntryType can be COUNT or CASH. In the CASH type,\nthe unit of entry is 1 USDCent (one penny). Implicitly, each penny entered\nbuys 1 entry into the raffle, and one entry is randomly selected for\neach prize.\n\nA contest should have as many winners as there are prizes\nspecial case 1: there are fewer entries than prizes\nspecial case 2: leaderboard contest with ties"},"CountStat":{"properties":{"facet":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"propertyNames":{"enum":["country_iso","day","month"]},"type":"object","title":"Facet","description":"The grouping criteria","examples":[{"country_iso":"us"}]},"count":{"type":"integer","title":"Count","description":"The count value for the given metric and facet"}},"type":"object","required":["facet","count"],"title":"CountStat"},"CreateCashMailCashoutMethodRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user to create this cashout method for.","examples":["app-user-9329ebd"]},"type":{"type":"string","const":"CASH_IN_MAIL","title":"Type","default":"CASH_IN_MAIL"},"delivery_address":{"$ref":"#/components/schemas/USDeliveryAddress","description":"Delivery address where payment should be sent"}},"type":"object","required":["bpuid","delivery_address"],"title":"CreateCashMailCashoutMethodRequest"},"CreateCashoutRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user requesting a cashout.","examples":["app-user-9329ebd"]},"amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Amount","description":"(USD cents) The amount requested for the cashout.","examples":[531]},"cashout_method_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Method Id","description":"Unique ID for the cashout method the cashout is being requested with.","examples":["941d489c3ce04eb39a0ddb7f8f75db74"]}},"type":"object","required":["bpuid","amount","cashout_method_id"],"title":"CreateCashoutRequest"},"CreatePayPalCashoutMethodRequest":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"Bpuid","description":"(product_user_id) The user to create this cashout method for.","examples":["app-user-9329ebd"]},"type":{"type":"string","const":"PAYPAL","title":"Type","default":"PAYPAL"},"email":{"type":"string","format":"email","title":"Email","description":"Email address of the paypal user","examples":["test@example.com"]}},"type":"object","required":["bpuid","email"],"title":"CreatePayPalCashoutMethodRequest"},"Currency":{"type":"string","enum":["USD","CAD","GBP","EUR","INR","AUD","PLN","SEK","SGD","MXN"],"title":"Currency"},"DeliveryStatus":{"type":"string","enum":["Pending","Shipped","In Transit","Out for Delivery","Delivered","Returned","Canceled","Failed Attempt","Lost"],"title":"DeliveryStatus"},"Direction":{"type":"integer","enum":[-1,1],"title":"Direction","description":"Entries on the debit side will increase debit normal accounts, while\nentries on the credit side will decrease them. Conversely, entries on\nthe credit side will increase credit normal accounts, while entries on\nthe debit side will decrease them.\n\nBy convention (?), the db will store transactions as debit-normal. For\na credit-normal account, we should flip the signs."},"DurationSummary":{"properties":{"min":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Min"},"max":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Max"},"mean":{"anyOf":[{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Mean"},"q1":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q1"},"q2":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q2"},"q3":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Q3"},"lower_whisker":{"type":"integer","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"integer","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","q1","q2","q3","lower_whisker","upper_whisker"],"title":"DurationSummary","description":"Durations are in integer seconds.\nDescribes the statistical distribution of expected durations of tasks within this bucket.","examples":[{"max":1180,"mean":660,"min":112,"q1":457,"q2":650,"q3":1103}]},"EventEnvelope":{"properties":{"event_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Event Uuid"},"event_type":{"$ref":"#/components/schemas/EventType"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"version":{"type":"integer","title":"Version","default":1},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user. This is hidden unlessthe event is for the requesting user.","examples":["app-user-9329ebd"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"payload":{"oneOf":[{"$ref":"#/components/schemas/TaskEnterPayload"},{"$ref":"#/components/schemas/TaskFinishPayload"},{"$ref":"#/components/schemas/SessionEnterPayload"},{"$ref":"#/components/schemas/SessionFinishPayload"}],"title":"Payload","discriminator":{"propertyName":"event_type","mapping":{"session.enter":"#/components/schemas/SessionEnterPayload","session.finish":"#/components/schemas/SessionFinishPayload","task.enter":"#/components/schemas/TaskEnterPayload","task.finish":"#/components/schemas/TaskFinishPayload"}}}},"type":"object","required":["event_type","product_id","payload"],"title":"EventEnvelope"},"EventMessage":{"properties":{"kind":{"type":"string","const":"event","title":"Kind","default":"event"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"data":{"$ref":"#/components/schemas/EventEnvelope"}},"type":"object","required":["data"],"title":"EventMessage"},"EventType":{"type":"string","enum":["task.enter","task.finish","session.enter","session.finish","wallet.credit","wallet.debit","user.created","user.active"],"title":"EventType"},"GeoIPInformation":{"properties":{"ip":{"type":"string","title":"Ip"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Country Iso","description":"The ISO code of the country associated with the IP address.","examples":["ca"]},"country_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Country Name"},"subdivision_1_iso":{"anyOf":[{"type":"string","maxLength":3},{"type":"null"}],"title":"Subdivision 1 Iso","description":"The ISO code of the primary subdivision (e.g., state or province)."},"subdivision_1_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Subdivision 1 Name","description":"The name of the primary subdivision (e.g., state or province)."},"is_anonymous":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Anonymous","description":"Indicates whether the IP address is associated with an anonymous source (e.g., VPN, proxy).","examples":[false]},"autonomous_system_number":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Autonomous System Number"},"autonomous_system_organization":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Autonomous System Organization"},"access_type":{"anyOf":[{"$ref":"#/components/schemas/AccessType"},{"type":"null"}],"description":"The type of user associated with the IP address (e.g., 'residential', 'business').","examples":["residential"]}},"type":"object","required":["ip","country_iso"],"title":"GeoIPInformation","description":"Fields we'll always pull from GRIP's mmdb files at minimum"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IntegrationMode":{"type":"string","enum":["platform","pass_through"],"title":"IntegrationMode"},"Leaderboard":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Id","description":"Unique ID for this leaderboard","examples":["845b0074ad533df580ebb9c80cc3bce1"]},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Descriptive name for the leaderboard based on the board_code","examples":["Number of Completes"]},"board_code":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts","examples":["complete_count"]},"bpid":{"type":"string","maxLength":32,"minLength":32,"title":"Bpid","description":"product_id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"country_iso":{"type":"string","title":"Country Iso","description":"The country this leaderboard is for.","examples":["us"]},"freq":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00","examples":["daily"]},"timezone_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone Name","description":"The timezone for the requested country","examples":["America/New_York"]},"sort_order":{"type":"string","enum":["ascending","descending"],"title":"Sort Order","default":"descending"},"row_count":{"type":"integer","minimum":0.0,"title":"Row Count","description":"The total number of rows in the leaderboard.","examples":[2]},"rows":{"items":{"$ref":"#/components/schemas/LeaderboardRow"},"type":"array","title":"Rows","examples":[[{"bpuid":"app-user-9329ebd","rank":1,"value":4},{"bpuid":"app-user-7923skw","rank":2,"value":3}]]},"period_start_local":{"type":"string","format":"date-time","title":"Period Start Local","description":"The start of the time period covered by this board in local time, tz-aware","examples":["2024-07-12T00:00:00-04:00"]},"period_end_local":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Period End Local","description":"The end of the time period covered by this board in local time, tz-aware","examples":["2024-07-12T23:59:59.999999-04:00"]},"start_timestamp":{"type":"integer","title":"Start Timestamp","description":"(unix timestamp) The start time of the time range this leaderboard covers.","readOnly":true,"examples":[1720756800]},"end_timestamp":{"type":"integer","title":"End Timestamp","description":"(unix timestamp) The end time of the time range this leaderboard covers.","readOnly":true,"examples":[1720843199]},"utc_offset":{"type":"string","title":"Utc Offset","description":"The UTC offset for the timezone","readOnly":true,"examples":["-0400"]},"local_start_time":{"type":"string","title":"Local Start Time","description":"The start time of the time range this leaderboard covers (local time, in the leaderboard's timezone).","readOnly":true,"examples":["2024-07-12T00:00:00-04:00"]},"local_end_time":{"type":"string","title":"Local End Time","description":"The end time of the time range this leaderboard covers (local time, in the leaderboard's timezone).","readOnly":true,"examples":["2024-07-12T23:59:59.999999-04:00"]},"start_end_str":{"type":"string","title":"Start End Str","description":"A formatted string for time period covered by this leaderboard. Can be used to display to users.","readOnly":true,"examples":["2024-02-07 to 2024-02-08"]}},"type":"object","required":["board_code","bpid","country_iso","freq","row_count","period_start_local","start_timestamp","end_timestamp","utc_offset","local_start_time","local_end_time","start_end_str"],"title":"Leaderboard","description":"A leaderboard exists independently for each product_id in each country.\nEach country is associated with a single timezone. There is a daily,\nweekly, and monthly leaderboard."},"LeaderboardCode":{"type":"string","enum":["complete_count","largest_user_payout","sum_user_payout"],"title":"LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent."},"LeaderboardContestUserView":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"leaderboard","title":"Contest Type","default":"leaderboard"},"end_condition":{"$ref":"#/components/schemas/ContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"leaderboard_key":{"type":"string","title":"Leaderboard Key","description":"The specific leaderboard instance this contest is connected to","examples":["leaderboard:7a9d8d02334449ceb105764f77e1ba97:us:weekly:2025-05-26:complete_count"]},"tie_break_strategy":{"type":"string","const":"split_prize_pool","title":"Tie Break Strategy","default":"split_prize_pool"},"country_iso":{"type":"string","title":"Country Iso","readOnly":true},"user_rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Rank","description":"The current rank of this user in this contest","readOnly":true}},"additionalProperties":false,"type":"object","required":["name","product_id","product_user_id","leaderboard_key","country_iso","user_rank"],"title":"LeaderboardContestUserView"},"LeaderboardFrequency":{"type":"string","enum":["daily","weekly","monthly"],"title":"LeaderboardFrequency","description":"The time period range for the leaderboard."},"LeaderboardResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"leaderboard":{"$ref":"#/components/schemas/Leaderboard"}},"type":"object","required":["leaderboard"],"title":"LeaderboardResponse"},"LeaderboardRow":{"properties":{"bpuid":{"type":"string","title":"Bpuid","description":"product_user_id","examples":["app-user-9329ebd"]},"rank":{"type":"integer","title":"Rank","description":"The numerical data ranks (1 through n) of the values. Ties are ranked using the lowest rank in the group.","examples":[1]},"value":{"type":"integer","title":"Value","description":"The value. The meaning of the value is dependent on the LeaderboardCode.","examples":[7]},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Optional public name chosen by the user"}},"type":"object","required":["bpuid","rank","value"],"title":"LeaderboardRow"},"LeaderboardWinner":{"properties":{"rank":{"type":"integer","title":"Rank","description":"The user's final rank in the leaderboard","examples":[1]},"freq":{"$ref":"#/components/schemas/LeaderboardFrequency","description":"The time period range for the leaderboard.\n\nAllowed values: \n - __daily__ *(DAILY)*: UTC midnight to UTC midnight\n - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC\n - __monthly__ *(MONTHLY)*: Jan 1 00:00:00","examples":["daily"]},"board_code":{"$ref":"#/components/schemas/LeaderboardCode","description":"The type of leaderboard. What the \"values\" represent.\n\nAllowed values: \n - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes\n - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout\n - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts","examples":["complete_count"]},"country_iso":{"type":"string","title":"Country Iso","description":"The country this leaderboard is for.","examples":["us"]},"issued":{"type":"string","format":"date-time","title":"Issued","description":"When the prize was issued.","examples":["2022-10-17T05:59:14.570231Z"]},"bpuid":{"type":"string","title":"Bpuid","description":"product_user_id","examples":["app-user-9329ebd"]},"description":{"type":"string","title":"Description","examples":["Bonus for daily contest"]},"amount":{"type":"integer","title":"Amount","description":"(USD cents) The reward amount","examples":[1000]},"amount_str":{"type":"string","title":"Amount Str","description":"The amount as a formatted string in USD. Can be displayed to the user.","examples":["$10.00"]},"contest_start":{"type":"string","format":"date-time","title":"Contest Start","description":"When the leaderboard started","examples":["2022-10-16T04:00:00Z"]},"contest_end":{"type":"string","format":"date-time","title":"Contest End","description":"When the leaderboard ended","examples":["2022-10-17T04:00:00Z"]}},"type":"object","required":["rank","freq","board_code","country_iso","issued","bpuid","description","amount","amount_str","contest_start","contest_end"],"title":"LeaderboardWinner"},"LeaderboardWinnerResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"winners":{"items":{"$ref":"#/components/schemas/LeaderboardWinner"},"type":"array","title":"Winners"}},"type":"object","title":"LeaderboardWinnerResponse"},"LedgerAccount":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid","description":"A unique identifier for this Ledger Account","examples":["c3c3566b5b1b4961b63a5670a2dc923d"]},"display_name":{"type":"string","maxLength":64,"title":"Display Name","description":"Human-readable description of the Ledger Account","examples":["BP Wallet c3c3566b5b1b4961b63a5670a2dc923d"]},"qualified_name":{"type":"string","maxLength":255,"title":"Qualified Name"},"account_type":{"$ref":"#/components/schemas/AccountType","description":" - `bp_commission` = BP_COMMISSION\n - `bp_wallet` = BP_WALLET\n - `user_wallet` = USER_WALLET\n - `user_attempt_credit` = USER_ATTEMPT_CREDIT\n - `cash` = CASH\n - `revenue` = REVENUE\n - `expense` = EXPENSE\n - `contest_wallet` = CONTEST_WALLET\n - `credit_line` = CREDIT_LINE\n - `wa_wallet` = WA_WALLET\n - `wa_budget_pool` = WA_BUDGET_POOL\n - `wa_held` = WA_HELD\n - `wa_credit_line` = WA_CREDIT_LINE","examples":["bp_wallet"]},"normal_balance":{"$ref":"#/components/schemas/Direction","description":" - `-1` = CREDIT\n - `1` = DEBIT"},"reference_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reference Type"},"reference_uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Reference Uuid","description":"The associated Product ID or other parent account thatthis Ledger Account is intended to track transactions for.If Wallet mode is enabled, this can also handle trackingindividual users.","examples":["61dd0b086fd048518762757612b4a6d3"]},"currency":{"type":"string","maxLength":32,"title":"Currency","description":"GRL's Ledger system allows tracking of transactions inany currency possible. This is useful for trackingpoints, stars, coins, or any other currency that may beused in a Supplier's platform.","default":"USD"}},"type":"object","required":["display_name","qualified_name","account_type","normal_balance"],"title":"LedgerAccount"},"LedgerEntry":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"direction":{"$ref":"#/components/schemas/Direction"},"account_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Account Uuid"},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount. A LedgerEntry cannot be made for0 USDCent and it cannot be negative.","examples":[531]},"transaction_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Transaction Id"}},"type":"object","required":["direction","account_uuid","amount"],"title":"LedgerEntry"},"LedgerTransaction":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id"},"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction (TX) was created into the database.This does not represent the exact time for any actionwhich may be responsible for this Transaction (TX), and TX timestamps will likely be a few milliseconds delayed"},"ext_description":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Ext Description"},"tag":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Tag"},"metadata":{"additionalProperties":{"type":"string"},"type":"object","title":"Metadata"},"entries":{"items":{"$ref":"#/components/schemas/LedgerEntry"},"type":"array","title":"Entries","description":"A Transaction (TX) is composed of multiple Entry events."}},"additionalProperties":false,"type":"object","title":"LedgerTransaction"},"MarketProfileKnowledge":{"properties":{"source":{"$ref":"#/components/schemas/Source","maxLength":16,"description":"Marketplace this question is from"},"question_id":{"type":"string","title":"Question Id","examples":["gender","1843","gender_plus"]},"answer":{"items":{"type":"string"},"type":"array","title":"Answer","examples":[["male"],["7657644"],["1"]]},"created":{"type":"string","format":"date-time","title":"Created","description":"When the User submitted this Profiling data"}},"type":"object","required":["source","question_id","created"],"title":"MarketProfileKnowledge","description":"This is used solely in API responses, so it is simplified."},"MarketplaceBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"source":{"type":"string","enum":["innovate","dynata","schlesinger","purespectrum","morning","pollfish","precision","repdata","prodege"],"title":"Source","description":"this is the source of the contents","examples":["pollfish"]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","source"],"title":"MarketplaceBucket"},"MarketplaceInventorySummary":{"properties":{"live_tasks":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Live Tasks","description":"The count of tasks that are currently live"},"live_gen_pop_tasks":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Live Gen Pop Tasks","description":"The count of gen-pop tasks that are currently live"},"tasks_created":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Tasks Created","description":"The count of tasks created"},"required_finishes":{"items":{"$ref":"#/components/schemas/CountStat"},"type":"array","title":"Required Finishes","description":"Number of finishes needed across all live tasks"},"payout":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Payout","description":"The distribution of payouts for all live tasks"},"expected_duration":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Expected Duration","description":"The distribution of expected durations for all live tasks"},"required_finishes_per_task":{"items":{"$ref":"#/components/schemas/StatisticalSummaryStat"},"type":"array","title":"Required Finishes Per Task","description":"The distribution of required finishes on all live tasks"}},"type":"object","title":"MarketplaceInventorySummary"},"MarketplaceOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/MarketplaceBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"MarketplaceOfferwall","description":"Returns buckets grouped by marketplace, one per marketplace, with the\ntasks ordered by quality.\n\nOfferwall code: `5fa23085`"},"MarketplaceOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/MarketplaceOfferwall"}},"type":"object","required":["info","offerwall"],"title":"MarketplaceOfferwallResponse"},"MarketplaceSummary":{"properties":{"inventory":{"$ref":"#/components/schemas/MarketplaceInventorySummary","description":"Inventory of the marketplace"},"user_activity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Activity","description":"User activity of the marketplace"}},"type":"object","required":["inventory"],"title":"MarketplaceSummary"},"MaxGaugeBySource":{"properties":{"value":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Value"},"by_source":{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"By Source"}},"type":"object","title":"MaxGaugeBySource"},"MilestoneContestEndCondition":{"properties":{"max_winners":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Winners","description":"The contest will end once this many users have won (i.e. reachedthe milestone)."},"ends_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ends At","description":"The Contest is over at the ends_at time."}},"type":"object","title":"MilestoneContestEndCondition","description":"Defines the conditions to evaluate to determine when the contest is over.\nMultiple conditions can be set. The contest is over once ANY conditions are met."},"MilestoneUserView":{"properties":{"target_amount":{"type":"integer","exclusiveMinimum":0.0,"title":"Target Amount","description":"Each user 'wins' (receives prizes) once this target amount is reached."},"entry_trigger":{"anyOf":[{"$ref":"#/components/schemas/ContestEntryTrigger"},{"type":"null"}],"description":"What user action triggers an entry automatically."},"valid_for":{"anyOf":[{"type":"string","format":"duration"},{"type":"null"}],"title":"Valid For","description":"The time after valid_for_event for which the contest is open"},"valid_for_event":{"anyOf":[{"type":"string","const":"signup"},{"type":"null"}],"title":"Valid For Event"},"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"milestone","title":"Contest Type","default":"milestone"},"end_condition":{"$ref":"#/components/schemas/MilestoneContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"entry_type":{"type":"string","const":"count","title":"Entry Type","default":"count"},"win_count":{"type":"integer","title":"Win Count","description":"The number of times the milestone has been reached.","default":0},"user_amount":{"type":"integer","title":"User Amount","description":"The total amount for this user for this contest"}},"additionalProperties":false,"type":"object","required":["target_amount","name","end_condition","product_id","product_user_id","user_amount"],"title":"MilestoneUserView"},"OfferWallCategoryRequest":{"properties":{"adwords_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Adwords Category","examples":[["45","65"]]},"category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Category","examples":[["98c137e4e90a4d92ac6c00e523eb1b50"]]},"exclude_adwords_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Adwords Category","examples":[["1558"]]},"exclude_category":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Exclude Category","examples":[["21536f160f784189be6194ca894f3a65","7aa8bf4e71a84dc3b2035f93f9f9c77e"]]}},"type":"object","title":"OfferWallCategoryRequest"},"OfferWallInfo":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"OfferWallInfo"},"OfferWallRequestYieldmanParams":{"properties":{"conversion_factor_adj":{"type":"number","title":"Conversion Factor Adj","description":"Centered around 0. Higher results in higher weight given to conversion (in the scoring function)","default":0.0},"dropoffrate_factor_adj":{"type":"number","title":"Dropoffrate Factor Adj","description":"Centered around 0. Higher results in higher penalty given to dropoffs (in the scoring function)","default":0.0},"longfail_factor_adj":{"type":"number","title":"Longfail Factor Adj","description":"Centered around 0. Higher results in higher penalty given to long fail (in the scoring function)","default":0.0},"recon_factor_adj":{"type":"number","title":"Recon Factor Adj","description":"Centered around 0. Higher results in higher penalty given to recons (in the scoring function)","default":0.0},"recon_likelihood_max":{"type":"number","title":"Recon Likelihood Max","description":"Tolerance for recon likelihood (0 to 1)","default":0.8}},"type":"object","title":"OfferWallRequestYieldmanParams"},"OfferwallConfig":{"properties":{},"type":"object","title":"OfferwallConfig"},"OfferwallReason":{"type":"string","enum":["USER_BLOCKED","HIGH_RECON_RATE","UNCOMMON_DEMOGRAPHICS","UNDER_MINIMUM_AGE","EXHAUSTED_HIGH_VALUE_SUPPLY","ALL_ELIGIBLE_ATTEMPTED","LOW_CURRENT_SUPPLY"],"title":"OfferwallReason"},"OneShotOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/OneShotOfferwallBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"OneShotOfferwall","description":"Each bucket has only 1 single task, and only basic info is returned\n about each bucket.\n\nOfferwall code: `6f27b1ae`"},"OneShotOfferwallBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"duration":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Duration","description":"The bucket's expected duration, in seconds"},"min_payout":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min Payout","description":"The bucket's min payout, in usd cents"}},"additionalProperties":false,"type":"object","required":["id","uri","duration","min_payout"],"title":"OneShotOfferwallBucket"},"OneShotOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/OneShotOfferwall"}},"type":"object","required":["info","offerwall"],"title":"OneShotOfferwallResponse"},"POPFinancial":{"properties":{"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["94c747c2ca5c48009d97a3c709677f5d"]},"time":{"type":"string","format":"date-time","title":"Time","description":"The starting time block for the respective 'Period' thatthis grouping is on. The `time` could be the start of a 1 minute or 1 hour block for example."},"payout":{"type":"integer","minimum":0.0,"title":"Payout","description":"The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period.","default":0,"examples":[54976]},"adjustment":{"type":"integer","title":"Adjustment","description":"The total amount (in USD cents) that the Brokerage Producthas had adjusted within a respective time period. Most ofthe time, this will be negative due to Complete to Incomplete reconciliations. However, it can also be positive due to Incomplete to Complete adjustments.","examples":[4929]},"adjustment_types":{"items":{"$ref":"#/components/schemas/AdjustmentType"},"type":"array","title":"Adjustment Types"},"expense":{"type":"integer","title":"Expense","description":"For Product accounts that are setup with Respondent payouts,competitions, user bonuses, or other associated 'costs', thoseexpenses are accounted for here. This will be negative forthose types of costs."},"net":{"type":"integer","title":"Net","description":"This is the sum of the Payout total, Adjustment and any Expenses total. It can be positive or negative for any specific time period.","examples":[59905]},"payment":{"type":"integer","title":"Payment","description":"Any ACH or Wire amount that was issued between GRL and the Supplier.","examples":[3408288]}},"type":"object","required":["time","adjustment","adjustment_types","expense","net","payment"],"title":"POPFinancial","description":"We can't use our USDCent class in here because aside from it not\n supporting negative values for our adjustments, FastAPI also\n complains because it doesn't know how to generate documentation\n for it. - Max 2024-06-25"},"PatternValidation":{"properties":{"message":{"type":"string","title":"Message","description":"Message to display if validation fails"},"pattern":{"type":"string","title":"Pattern","description":"Regex string to validate. min_length and max_length are checked separately, even if they are part of the regex."}},"type":"object","required":["message","pattern"],"title":"PatternValidation"},"PayoutCategory":{"type":"string","enum":["CASH","GIFT_CARD","PRIZE","CRYPTO","PLATFORM_CREDIT"],"title":"PayoutCategory"},"PayoutConfig":{"properties":{"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"payout_transformation":{"anyOf":[{"$ref":"#/components/schemas/PayoutTransformation"},{"type":"null"}],"description":"How the BP's payout is converted to the User's payout"}},"type":"object","title":"PayoutConfig","description":"Store configuration related to payouts, payout transformation, and user\npayout formatting."},"PayoutStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","CANCELLED","FAILED","COMPLETE"],"title":"PayoutStatus","description":"The max size of the db field that holds this value is 20, so please\ndon't add new values longer than that!"},"PayoutSummary":{"properties":{"min":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min"},"max":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Max"},"mean":{"anyOf":[{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Mean"},"q1":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q1"},"q2":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q2"},"q3":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Q3"},"lower_whisker":{"type":"integer","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"integer","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","q1","q2","q3","lower_whisker","upper_whisker"],"title":"PayoutSummary","description":"Payouts are in Integer USD Cents","examples":[{"max":132,"min":14,"q1":45,"q2":68,"q3":124}]},"PayoutTransformation":{"properties":{"f":{"type":"string","enum":["payout_transformation_percent","payout_transformation_amt"],"title":"F","description":"The name of the transformation function to use."},"kwargs":{"anyOf":[{"$ref":"#/components/schemas/PayoutTransformationPercentArgs"},{"type":"null"}],"description":"The kwargs to pass to the transformation function.","examples":[{"max_payout":"5.00","pct":0.5}]}},"type":"object","required":["f"],"title":"PayoutTransformation","description":"This model describe how the bp_payout is converted to the user_payout.\nIf None, the user_payout is None.\n\nIf the user_wallet_enabled is `False`, the user_payout is used to\n 1) know how to transform the expected payouts for offerwall buckets\n (if min_payout is requested, this is based on the user_payout)\n 2) show the user (using the payout_format) how much they made (in\n the Task Status Response).\n\nIf the user_wallet_enabled is `True`, then in addition to the above, the\n user_payout is the amount actually paid to the user's wallet."},"PayoutTransformationPercentArgs":{"properties":{"pct":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Pct","description":"The percentage of the bp_payout to pay the user","examples":[0.5]},"min_payout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Payout","description":"The minimum amount paid for a complete. Note: This does not check that the actual payout was at least this amount.","examples":["0.50"]},"max_payout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Max Payout","description":"The maximum amount paid for a complete","examples":["5.00"]}},"type":"object","required":["pct"],"title":"PayoutTransformationPercentArgs"},"PayoutType":{"type":"string","enum":["PAYPAL","TANGO","TREMENDOUS","DWOLLA","ACH","WIRE","CASH_IN_MAIL","PRIZE","AMT","AMT_BONUS","AMT_ASSIGNMENT","AMT_ASSIGNMENT"],"title":"PayoutType","description":"The method in which the requested payout is delivered."},"PaypalCashoutMethodData":{"properties":{"type":{"type":"string","const":"PAYPAL","title":"Type","default":"PAYPAL"},"email":{"type":"string","format":"email","title":"Email","description":"Email address of the paypal user","examples":["test@example.com"]}},"type":"object","required":["email"],"title":"PaypalCashoutMethodData"},"PingMessage":{"properties":{"kind":{"type":"string","const":"ping","title":"Kind","default":"ping"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"PingMessage"},"PongMessage":{"properties":{"kind":{"type":"string","const":"pong","title":"Kind","default":"pong"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"PongMessage"},"Product":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier of the Brokerage Product","examples":["1108d053e4fa47c5b0dbdcd03a7981e7"]},"name":{"type":"string","maxLength":255,"minLength":3,"title":"Name","description":"Name of the Brokerage Product. Must be unique within a Team","examples":["Website ABC"]},"enabled":{"type":"boolean","title":"Enabled","description":"This is only used to hard block a Product in order to immediately & safely protect against fraud entrances.","default":true},"payments_enabled":{"type":"boolean","title":"Payments Enabled","description":"This is only to determine if ACH or Wire payments should be made to the Product.","default":true},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the Product was created, this does necessarily mean it started to retrieve traffic at that time."},"team_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Team Id","description":"The organization (group of generalresearch.com admin accounts) that is allowed to modify and manage thisProduct","examples":["b96c1209cf4a4baaa27d38082421a039"]},"business_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Business Id","description":"The legal business entity or individual that is responsible for this account, and that receive SupplierPayments for this Product's activity.","examples":["aa34a2c689174cdf9cafdcd0580c3930"]},"tags":{"items":{"$ref":"#/components/schemas/SupplierTag"},"type":"array","uniqueItems":true,"title":"Tags","description":"Tags which are used to annotate supplier traffic"},"commission_pct":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,1}|(?=[\\d.]{1,7}0*$)\\d{0,1}\\.\\d{0,5}0*$)","title":"Commission Pct","default":"0.05"},"redirect_url":{"type":"string","title":"Redirect Url","description":"Where to redirect the user after finishing a session. When a user get redirected back to the supplier, a query param will be added with the name 'tsid', and the value of the TSID for the session. For example: callback_uri: 'https://www.example.com/test/?a=1&b=2' might result in the user getting redirected to: 'https://www.example.com/grl-callback/?a=1&b=2&tsid=c6ab6ba1e75b44e2bf5aab00fc68e3b7'.","examples":["https://www.example.com/grl-callback/?a=1&b=2"]},"harmonizer_domain":{"type":"string","title":"Harmonizer Domain","description":"This is the domain that is used for the GRS (General Research Survey) platform. This is a simple javascript application which may profile the respondent for anyprofiling questions, along with collecting any browserbased security information. The value is a scheme+domain only (no path).","default":"https://profile.generalresearch.com/"},"sources_config":{"anyOf":[{"$ref":"#/components/schemas/SourcesConfig"},{"$ref":"#/components/schemas/SupplyConfig"}],"title":"Sources Config"},"session_config":{"$ref":"#/components/schemas/SessionConfig"},"payout_config":{"$ref":"#/components/schemas/PayoutConfig"},"user_wallet_config":{"$ref":"#/components/schemas/UserWalletConfig"},"user_create_config":{"$ref":"#/components/schemas/UserCreateConfig"},"offerwall_config":{"$ref":"#/components/schemas/OfferwallConfig"},"profiling_config":{"$ref":"#/components/schemas/ProfilingConfig"},"user_health_config":{"$ref":"#/components/schemas/UserHealthConfig"},"yield_man_config":{"$ref":"#/components/schemas/YieldManConfig"},"balance":{"anyOf":[{"$ref":"#/components/schemas/ProductBalances"},{"type":"null"}],"description":"Product Balance"},"payouts_total_str":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payouts Total Str"},"payouts_total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Payouts Total"},"payouts":{"anyOf":[{"items":{"$ref":"#/components/schemas/BrokerageProductPayoutEvent"},"type":"array"},{"type":"null"}],"title":"Payouts","description":"Product Payouts. These are the ACH or Wire payments that were sent to theBusiness on behalf of this specific Product"},"pop_financial":{"anyOf":[{"items":{"$ref":"#/components/schemas/POPFinancial"},"type":"array"},{"type":"null"}],"title":"Pop Financial"},"bp_account":{"anyOf":[{"$ref":"#/components/schemas/LedgerAccount"},{"type":"null"}]},"user_wallet":{"$ref":"#/components/schemas/UserWalletConfig","readOnly":true}},"type":"object","required":["name","redirect_url","user_wallet"],"title":"Product"},"ProductBalances":{"properties":{"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["279e623d5b184caf879ca08d16434a2e"]},"last_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Event"},"bp_payment_credit":{"type":"integer","minimum":0.0,"title":"Bp Payment Credit","description":"The total amount that has been earned by the Task completes, for this Brokerage Product account.","default":0,"examples":[18837]},"adjustment_credit":{"type":"integer","minimum":0.0,"title":"Adjustment Credit","description":"Positive reconciliations issued back to the Brokerage Product account.","default":0,"examples":[2]},"adjustment_debit":{"type":"integer","minimum":0.0,"title":"Adjustment Debit","description":"Negative reconciliations for any Task completes","default":0,"examples":[753]},"supplier_credit":{"type":"integer","minimum":0.0,"title":"Supplier Credit","description":"ACH or Wire amounts issued to GRL from a Supplier to recoup for a negative Brokerage Product balance","default":0,"examples":[0]},"supplier_debit":{"type":"integer","minimum":0.0,"title":"Supplier Debit","description":"ACH or Wire amounts sent to a Supplier","default":0,"examples":[10000]},"user_bonus_credit":{"type":"integer","minimum":0.0,"title":"User Bonus Credit","description":"If a respondent ever pays back an product account.","default":0,"examples":[0]},"user_bonus_debit":{"type":"integer","minimum":0.0,"title":"User Bonus Debit","description":"Pay a user into their wallet balance. There is no fee here. There is only a fee when the user requests a payout.The bonus could be as a bribe, winnings for a contest, leaderboard, etc.","default":0,"examples":[2745]},"issued_payment":{"type":"integer","minimum":0.0,"title":"Issued Payment","description":"This is the amount that we decide to credit as havingtaken from this Product. If there is any amount not issuedit is summed up over the Business to offset any negativebalances elsewhere.","default":0},"payout":{"type":"integer","title":"Task Payouts","description":"The sum amount of all Task payouts","readOnly":true,"examples":[18837]},"payout_usd_str":{"type":"string","title":"Task Payouts USD Str","readOnly":true,"examples":["$18,837.00"]},"adjustment":{"type":"integer","title":"Task Adjustments","description":"The sum amount of all Task Adjustments","readOnly":true,"examples":[-751]},"expense":{"type":"integer","title":"Product Expenses","description":"The sum amount of any associated Product Expenses (eg: user bonuses)","readOnly":true,"examples":[-2745]},"net":{"type":"integer","title":"Net Earnings","description":"The Product's Net Earnings which is equal to the totalamount of Task Payouts, with Task Adjustments and anyProduct Expenses deducted. This can be positive ornegative.","readOnly":true,"examples":[15341]},"payment":{"type":"integer","minimum":0.0,"title":"Supplier Payments","description":"The sum amount of all Supplier Payments (eg ACH or Wire transfers)","readOnly":true,"examples":[10000]},"payment_usd_str":{"type":"string","title":"Supplier Payments","readOnly":true,"examples":["$10,000"]},"balance":{"type":"integer","title":"Product Balance","description":"The Product's Balance which is equal to the Product's Netamount with already issued Supplier Payments deducted. This can be positive or negative.","readOnly":true,"examples":[5341]},"retainer":{"type":"integer","minimum":0.0,"title":"Smart Retainer","description":"The Smart Retainer is an about of money that is held byGRL to account for any Task Adjustments that may occurin the future. The amount will always be positive, andif the Product's balance is negative, the retainer will be $0.00 as the Product is not eligible for any SupplierPayments either way.","readOnly":true,"examples":[1335]},"retainer_usd_str":{"type":"string","title":"Smart Retainer USD Str","readOnly":true,"examples":["$1,335.00"]},"available_balance":{"type":"integer","minimum":0.0,"title":"Available Balance","description":"The Available Balance is the amount that is currently, andimmediately available for withdraw from the Supplier'sbalance. Supplier Payments are made every Friday for Businesses with an ACH connected Bank Account to GRL, while a Business that requires an International Wire are issued on the last Friday of every Month.","readOnly":true,"examples":[4006]},"available_balance_usd_str":{"type":"string","title":"Available Balance USD Str","readOnly":true,"examples":["$4,006.00"]},"recoup":{"type":"integer","minimum":0.0,"title":"Recoup","description":"The amount that must be held back to recover a negative Product balance. This is $0.00 when the Product balance is positive or zero; otherwise it is the absolute value of the negative balance. Business-level payout calculations use this amount to offset deficits from one Product against available funds from other Products before issuing Supplier Payments.","readOnly":true,"examples":[282]},"recoup_usd_str":{"type":"string","title":"Recoup Str","readOnly":true,"examples":["$2.04"]},"adjustment_percent":{"type":"number","title":"Adjustment Percentage","description":"The percentage of USDCent value that has been adjustedover all time for this Product.","readOnly":true,"examples":[0.064938]}},"type":"object","required":["payout","payout_usd_str","adjustment","expense","net","payment","payment_usd_str","balance","retainer","retainer_usd_str","available_balance","available_balance_usd_str","recoup","recoup_usd_str","adjustment_percent"],"title":"ProductBalances"},"ProfilingConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"If False, the harmonizer/profiling system is not used at all. This should never be False unless special circumstances","default":true},"grs_enabled":{"type":"boolean","title":"Grs Enabled","description":"If grs_enabled is False, and is_grs is passed in the \n profiling-questions call, then don't actually return any questions. \n This allows a client to hit the endpoint with no limit and still get \n questions. In effect, this means that we'll redirect the user through \n the GRS system but won't present them any questions.","default":true},"n_questions":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"N Questions","description":"Use to hard code the number of questions to ask. None means use default algorithm."},"max_questions":{"type":"integer","exclusiveMinimum":0.0,"title":"Max Questions","description":"The max number of questions we would ask in a session","default":10},"avg_question_count":{"type":"number","exclusiveMinimum":0.0,"title":"Avg Question Count","description":"The average number of questions to ask in a session","default":5},"task_injection_freq_mult":{"type":"number","exclusiveMinimum":0.0,"title":"Task Injection Freq Mult","description":"Scale how frequently we inject profiling questions, \n relative to the default. 1 is default, 2 is twice as often. 10 means \n always. 0.5 half as often","default":1},"non_us_mult":{"type":"number","exclusiveMinimum":0.0,"title":"Non Us Mult","description":"Non-us multiplier, used to increase freq and length of \n profilers in all non-us countries. This value is multiplied by \n task_injection_freq_mult and avg_question_count.","default":2},"hidden_questions_expiration_hours":{"type":"integer","exclusiveMinimum":0.0,"title":"Hidden Questions Expiration Hours","description":"How frequently we should refresh hidden questions","default":168}},"type":"object","title":"ProfilingConfig"},"ProfilingInfoResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"profiling-info":{"items":{"$ref":"#/components/schemas/UpkProperty"},"type":"array","title":"Profiling-Info"}},"type":"object","required":["profiling-info"],"title":"ProfilingInfoResponse"},"PropertyType":{"type":"string","enum":["i","n","x"],"title":"PropertyType"},"RaffleUserView":{"properties":{"name":{"type":"string","maxLength":128,"title":"Name","description":"Name of contest. Can be displayed to user."},"description":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Description","description":"Description of contest. Can be displayed to user."},"contest_type":{"type":"string","const":"raffle","title":"Contest Type","default":"raffle"},"end_condition":{"$ref":"#/components/schemas/ContestEndCondition"},"prizes":{"items":{"$ref":"#/components/schemas/ContestPrize"},"type":"array","minItems":1,"title":"Prizes"},"starts_at":{"type":"string","format":"date-time","title":"Starts At","description":"When the contest starts"},"terms_and_conditions":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Terms And Conditions"},"status":{"$ref":"#/components/schemas/ContestStatus","default":"active"},"country_isos":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Isos","description":"Contest is restricted to these countries. If null, all countries are allowed"},"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"Contest applies only to a single BP"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When this contest was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When this contest was last modified. Does not include entries being created/modified"},"ended_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Ended At","description":"When the contest ended"},"end_reason":{"anyOf":[{"$ref":"#/components/schemas/ContestEndReason"},{"type":"null"}],"description":"The reason the contest ended"},"product_user_id":{"type":"string","title":"Product User Id"},"user_winnings":{"items":{"$ref":"#/components/schemas/ContestWinner"},"type":"array","title":"User Winnings","description":"The prizes won in this contest by the requested user"},"entry_type":{"type":"string","const":"cash","title":"Entry Type","default":"cash"},"entry_rule":{"$ref":"#/components/schemas/ContestEntryRule"},"current_amount":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"Current Amount","description":"Sum of all entry amounts","default":0},"current_participants":{"type":"integer","title":"Current Participants","description":"Count of unique participants","default":0},"user_amount":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"User Amount","description":"The total amount this user has entered"},"user_amount_today":{"anyOf":[{"type":"integer"},{"type":"integer","minimum":0.0}],"title":"User Amount Today","description":"The total amount this user has entered in the past 24 hours"},"current_win_probability":{"type":"number","title":"Current Win Probability","description":"Probability of this user winning 1 or more prizes, if the contestended right now","readOnly":true},"projected_win_probability":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Projected Win Probability","description":"Probability of this user winning 1 or more prizes, once the contestis projected to end. This value is only calculated if the contest has a target_entry_amountend condition.","readOnly":true}},"additionalProperties":false,"type":"object","required":["name","end_condition","product_id","product_user_id","user_amount","user_amount_today","current_win_probability","projected_win_probability"],"title":"RaffleUserView"},"ReportTask":{"properties":{"bpuid":{"type":"string","maxLength":128,"minLength":3,"title":"product_user_id","description":"The unique identifier for the user, which is set by the Supplier.","examples":["app-user-9329ebd"]},"reasons":{"items":{"$ref":"#/components/schemas/ReportValue"},"type":"array","title":"Reasons","description":"The reason a user reported a task.\n\nAllowed values: \n - __0__ *(REASON_UNKNOWN)*: Used to indicate the user exited the task without giving feedback\n - __1__ *(TECHNICAL_ERROR)*: Task is in the wrong language/country, unanswerable question, won't proceed to next question, loading forever, error message\n - __2__ *(NO_REDIRECT)*: Task ended (completed or failed, and showed the user some dialog indicating the task was over), but failed to redirect\n - __3__ *(PRIVACY_INVASION)*: Asked for full name, home address, identity on another site, cc\n - __4__ *(UNCOMFORTABLE_TOPICS)*: Asked about children, employer, medical issues, drug use, STDs, etc.\n - __5__ *(ASKED_FOR_NOT_ALLOWED_ACTION)*: Asked to install software, signup/login to external site, access webcam, promise to pay using external site, etc.\n - __6__ *(BAD_ON_MOBILE)*: Task doesn't work well on a mobile device\n - __7__ *(DIDNT_LIKE)*: Too long, too boring, confusing, complicated, too many open-ended/free-response questions","examples":[[3,4]]},"notes":{"type":"string","title":"Notes","default":"","examples":["The survey wanted to watch me eat Haejang-guk"]}},"additionalProperties":false,"type":"object","required":["bpuid"],"title":"ReportTask"},"ReportValue":{"type":"integer","enum":[0,1,2,3,4,5,6,7],"title":"ReportValue","description":"The reason a user reported a task."},"Scope":{"type":"string","enum":["global","team","product"],"title":"Scope"},"SessionAdjustedStatus":{"type":"string","enum":["ac","af","pa"],"title":"SessionAdjustedStatus","description":"An adjusted_status is set if a session is adjusted by the marketplace\nafter the original return. A session can be adjusted multiple times.\nThis is the most recent status. If a session was originally a complete,\nwas adjusted to incomplete, then back to complete, the adjusted_status\nwill be None, but the adjusted_timestamp will be set to the most recent\nchange."},"SessionConfig":{"properties":{"max_session_len":{"type":"integer","maximum":5400.0,"minimum":60.0,"title":"Max Session Len","description":"The amount of time (in seconds) that a respondent may spend attempting to get into a survey within a session.If NULL, there is no limit.","default":600},"max_session_hard_retry":{"type":"integer","minimum":0.0,"title":"Max Session Hard Retry","description":"The number of surveys that a respondent may attempt within a session before the session is terminated.","default":5},"min_payout":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Min Payout","description":"The minimum amount the user should be paid for a complete. If \n no payout transformation is defined, the value is based on the BP's payout. \n If a payout transformation is defined, the min_payout is applied on the \n user's payout. Note, this is separate and distinct from the payout \n transformation's min payout. The payout transformation's min_payout does not \n care what the task's actual payout was. This min_payout will prevent\n the user from being show any tasks that would pay below this amount.","default":"0.14","examples":["0.50"]}},"type":"object","title":"SessionConfig","description":"Stores configuration related to the Session, a session being a users\nexperience attempting to do work."},"SessionEnterPayload":{"properties":{"event_type":{"type":"string","const":"session.enter","title":"Event Type","default":"session.enter"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"}},"type":"object","required":["country_iso"],"title":"SessionEnterPayload"},"SessionFinishPayload":{"properties":{"event_type":{"type":"string","const":"session.finish","title":"Event Type","default":"session.finish"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"duration_sec":{"type":"number","exclusiveMinimum":0.0,"title":"Duration Sec"},"status":{"$ref":"#/components/schemas/Status"},"status_code_1":{"anyOf":[{"$ref":"#/components/schemas/StatusCode1"},{"type":"null"}]},"status_code_2":{"anyOf":[{"$ref":"#/components/schemas/SessionStatusCode2"},{"type":"null"}]},"user_payout":{"anyOf":[{"type":"integer","maximum":4000.0,"minimum":0.0},{"type":"null"}],"title":"User Payout"}},"type":"object","required":["country_iso","duration_sec","status"],"title":"SessionFinishPayload"},"SessionStatusCode2":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13],"title":"SessionStatusCode2","description":"__Status Detail__\nThis should be set if the Session.status_code_1 is SESSION_XXX_FAIL"},"ShippingCarrier":{"type":"string","enum":["USPS","FedEx","UPS","DHL"],"title":"ShippingCarrier"},"ShippingMethod":{"type":"string","enum":["Standard","Express","Two-Day","Overnight","Same Day"],"title":"ShippingMethod"},"SoftPairBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"anyOf":[{"type":"string","maxLength":2083,"minLength":1,"format":"uri"},{"type":"null"}],"title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way. If the eligibility is conditional or ineligible, the uri will be null.","examples":[null]},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"eligibility":{"type":"string","enum":["conditional","unconditional","ineligible"],"title":"Eligibility","examples":["conditional"]},"missing_questions":{"items":{"type":"string"},"type":"array","title":"Missing Questions","examples":[["fb20fd4773304500b39c4f6de0012a5a"]]},"loi":{"type":"integer","title":"Loi","description":"this is the max loi of the contents","examples":[612]},"payout":{"type":"integer","title":"Payout","description":"this is the min payout of the contents","examples":[123]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","eligibility","loi","payout"],"title":"SoftPairBucket"},"SoftPairOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/SoftPairBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]},"question_info":{"additionalProperties":{"$ref":"#/components/schemas/UpkQuestion"},"type":"object","title":"Question Info","examples":[]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"SoftPairOfferwall","description":"This offerwall contains tasks for which the user has a conditional\neligibility. The questions that a user must answer to determine the\neligibility are included within each bucket. Additionally, the question\ndefinitions are included for convenience.\n\nOfferwall code: `37d1da64`"},"SoftPairOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/SoftPairOfferwall"}},"type":"object","required":["info","offerwall"],"title":"SoftPairOfferwallResponse"},"Source":{"type":"string","enum":["g","c","a","d","et","f","i","l","m","n","o","e","r","pr","p","rd","h","s","t","u","w"],"title":"Source"},"SourceConfig":{"properties":{"name":{"$ref":"#/components/schemas/Source"},"active":{"type":"boolean","title":"Active","default":true},"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_mobile_ip":{"type":"boolean","title":"Allow Mobile Ip","default":true},"allow_pii_only_buyers":{"type":"boolean","title":"Allow Pii Only Buyers","description":"Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum.","default":false},"allow_unhashed_buyers":{"type":"boolean","title":"Allow Unhashed Buyers","description":"Return Tasks from Buyers that don't have URL hashing enabled. Only supported on Pure Spectrum.","default":false},"withhold_profiling":{"type":"boolean","title":"Withhold Profiling","description":"For some Products, we may have privacy agreements prohibiting us from sharing information with the inventorySource. If True, don't add MRPQ (Market Research ProfilingQuestion) onto the entry link.","default":false},"pass_unconditional_eligible_unknowns":{"type":"boolean","title":"Pass Unconditional Eligible Unknowns","description":"Not used at the moment","default":true}},"type":"object","required":["name"],"title":"SourceConfig","description":"This could also be named \"BP:Marketplace Config\", as it describes the\nconfig for a BP on a single marketplace."},"SourcesConfig":{"properties":{"user_defined":{"items":{"$ref":"#/components/schemas/SourceConfig"},"type":"array","title":"User Defined"}},"type":"object","title":"SourcesConfig","description":"Describes the marketplaces or sources that a BP can access and their\nrespective configs,\naka 'BP:Marketplace Configs'"},"StarwallPlusBlockOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusBlockOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.\n\nOfferwall code: `7fa1b3f4`"},"StarwallPlusBlockOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusBlockOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusBlockOfferWallResponse"},"StarwallPlusBlockRecontactOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusRecontactBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusBlockRecontactOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents, no\nbuckets are returned if the user is blocked, and each bucket includes\na recontact key.\n\nOfferwall code: `630db2a4`"},"StarwallPlusBlockRecontactOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusBlockRecontactOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusBlockRecontactOfferWallResponse"},"StarwallPlusOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"StarwallPlusOfferWall","description":"Same as the StarwallOfferWall, but the buckets include contents.\n\nOfferwall code: `5481f322`"},"StarwallPlusOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/StarwallPlusOfferWall"}},"type":"object","required":["info","offerwall"],"title":"StarwallPlusOfferWallResponse"},"StatisticalSummaryStat":{"properties":{"facet":{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"number"}]},"propertyNames":{"enum":["country_iso","day","month"]},"type":"object","title":"Facet","description":"The grouping criteria","examples":[{"country_iso":"us"}]},"value":{"$ref":"#/components/schemas/StatisticalSummaryValue","description":"Statistical Summary for the given metric and facet"}},"type":"object","required":["facet","value"],"title":"StatisticalSummaryStat"},"StatisticalSummaryValue":{"properties":{"min":{"type":"number","title":"Min"},"max":{"type":"number","title":"Max"},"mean":{"type":"number","title":"Mean"},"q1":{"type":"number","title":"Q1"},"q2":{"type":"number","title":"Q2","description":"equal to the median"},"q3":{"type":"number","title":"Q3"},"lower_whisker":{"type":"number","title":"Lower Whisker","readOnly":true},"upper_whisker":{"type":"number","title":"Upper Whisker","readOnly":true}},"type":"object","required":["min","max","mean","q1","q2","q3","lower_whisker","upper_whisker"],"title":"StatisticalSummaryValue"},"StatsMessage":{"properties":{"kind":{"type":"string","const":"stats","title":"Kind","default":"stats"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Country Iso"},"data":{"$ref":"#/components/schemas/StatsSnapshot"}},"type":"object","required":["data"],"title":"StatsMessage"},"StatsSnapshot":{"properties":{"live_task_count":{"$ref":"#/components/schemas/AggregateBySource"},"task_created_count_last_1h":{"$ref":"#/components/schemas/AggregateBySource"},"task_created_count_last_24h":{"$ref":"#/components/schemas/AggregateBySource"},"live_tasks_max_payout":{"$ref":"#/components/schemas/MaxGaugeBySource","description":"In integer USDCents"},"country_iso":{"anyOf":[{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},{"type":"null"}],"title":"Country Iso"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"},"active_users_last_1h":{"type":"integer","minimum":0.0,"title":"Active Users Last 1H","description":"Count of users (in this product_id) that were active in the past 60 minutes.\n Behaviors that trigger active:\n - Request an offerwall\n - Enter an offerwall bucket\n - Request profiling questions\n - Submit profiling answers\n - Update user profile\n ","default":0},"active_users_last_24h":{"type":"integer","minimum":0.0,"title":"Active Users Last 24H","description":"Count of users (in this product_id) that were active in the past 24 hours.","default":0},"in_progress_users":{"type":"integer","minimum":0.0,"title":"In Progress Users","description":"Count of users that are currently doing work at this moment"},"signups_last_24h":{"type":"integer","minimum":0.0,"title":"Signups Last 24H","description":"Count of users created"},"session_enters_last_1h":{"type":"integer","minimum":0.0,"title":"Session Enters Last 1H"},"session_enters_last_24h":{"type":"integer","minimum":0.0,"title":"Session Enters Last 24H"},"session_fails_last_1h":{"type":"integer","minimum":0.0,"title":"Session Fails Last 1H"},"session_fails_last_24h":{"type":"integer","minimum":0.0,"title":"Session Fails Last 24H"},"session_completes_last_1h":{"type":"integer","minimum":0.0,"title":"Session Completes Last 1H"},"session_completes_last_24h":{"type":"integer","minimum":0.0,"title":"Session Completes Last 24H"},"sum_payouts_last_1h":{"type":"integer","minimum":0.0,"title":"Sum Payouts Last 1H","description":"In integer USDCents"},"sum_payouts_last_24h":{"type":"integer","minimum":0.0,"title":"Sum Payouts Last 24H","description":"In integer USDCents"},"session_avg_payout_last_24h":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Session Avg Payout Last 24H","description":"Average (actual) payout of all tasks completed in the past 24 hrs"},"session_avg_user_payout_last_24h":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Session Avg User Payout Last 24H","description":"Average (actual) user payout of all tasks completed in the past 24 hrs"},"session_fail_avg_loi_last_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Session Fail Avg Loi Last 24H","description":"Average LOI of all tasks terminated in the past 24 hrs (excludes abandons)"},"session_complete_avg_loi_last_24h":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Session Complete Avg Loi Last 24H","description":"Average LOI of all tasks completed in the past 24 hrs"}},"type":"object","required":["in_progress_users","signups_last_24h","session_enters_last_1h","session_enters_last_24h","session_fails_last_1h","session_fails_last_24h","session_completes_last_1h","session_completes_last_24h","sum_payouts_last_1h","sum_payouts_last_24h","session_avg_payout_last_24h","session_avg_user_payout_last_24h","session_fail_avg_loi_last_24h","session_complete_avg_loi_last_24h"],"title":"StatsSnapshot"},"Status":{"type":"string","enum":["c","f","a","t"],"title":"Status","description":"The outcome of a session or wall event. If the session is still in\nprogress, the status will be NULL."},"StatusCode1":{"type":"integer","enum":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19],"title":"StatusCode1","description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT"},"StatusInfoResponseFail":{"properties":{"info":{"$ref":"#/components/schemas/StatusSuccessFail"},"msg":{"type":"string","title":"Msg","description":"An optional message, if success is False","examples":["An error has occurred"]}},"type":"object","required":["info","msg"],"title":"StatusInfoResponseFail"},"StatusResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]}},"type":"object","title":"StatusResponse"},"StatusResponseFailure":{"properties":{"status":{"type":"string","const":"failure","title":"Status","description":"The status of the API response.","examples":["failure"]},"msg":{"type":"string","title":"Msg","description":"An optional message, if the status is failure.","examples":["An error has occurred"]}},"type":"object","required":["status","msg"],"title":"StatusResponseFailure"},"StatusSuccessFail":{"properties":{"success":{"type":"boolean","title":"Success","description":"Whether the API response is successful.","default":false}},"type":"object","title":"StatusSuccessFail"},"StreakFulfillment":{"type":"string","enum":["active","complete"],"title":"StreakFulfillment","description":"What has to happen for a user to fulfill a period for a streak"},"StreakPeriod":{"type":"string","enum":["day","week","month"],"title":"StreakPeriod"},"StreakState":{"type":"string","enum":["active","at_risk","broken"],"title":"StreakState"},"SubscribeMessage":{"properties":{"kind":{"type":"string","const":"subscribe","title":"Kind","default":"subscribe"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]}},"type":"object","required":["product_id"],"title":"SubscribeMessage"},"SupplierTag":{"type":"string","enum":["mobile","js-offerwall","double-opt-in","single-sign-on","phone-number-verified","test-a","test-b"],"title":"SupplierTag","description":"Available tags which can be used to annotate supplier traffic\n\nNote: should not include commas!"},"SupplyConfig":{"properties":{"policies":{"items":{"$ref":"#/components/schemas/SupplyPolicy"},"type":"array","title":"Policies"}},"type":"object","title":"SupplyConfig","description":"Describes the set of policies for how GRL can interact with marketplaces.\nThis is only used on the special \"global product\"."},"SupplyPolicy":{"properties":{"name":{"$ref":"#/components/schemas/Source"},"active":{"type":"boolean","title":"Active","default":true},"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_mobile_ip":{"type":"boolean","title":"Allow Mobile Ip","default":true},"allow_pii_only_buyers":{"type":"boolean","title":"Allow Pii Only Buyers","description":"Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum.","default":false},"allow_unhashed_buyers":{"type":"boolean","title":"Allow Unhashed Buyers","description":"Return Tasks from Buyers that don't have URL hashing enabled. Only supported on Pure Spectrum.","default":false},"withhold_profiling":{"type":"boolean","title":"Withhold Profiling","description":"For some Products, we may have privacy agreements prohibiting us from sharing information with the inventorySource. If True, don't add MRPQ (Market Research ProfilingQuestion) onto the entry link.","default":false},"pass_unconditional_eligible_unknowns":{"type":"boolean","title":"Pass Unconditional Eligible Unknowns","description":"Not used at the moment","default":true},"address":{"items":{"type":"string"},"type":"array","title":"Address","description":"address for the grpc GetOpps call"},"allow_vpn":{"type":"boolean","title":"Allow Vpn","default":false},"distribute_harmonizer_active":{"type":"boolean","title":"Distribute Harmonizer Active","default":true},"supplier_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Supplier Id","description":"For some inventory Sources, we may partition traffic using different supplier accounts instead"},"team_ids":{"anyOf":[{"items":{"type":"string","maxLength":32,"minLength":32},"type":"array"},{"type":"null"}],"title":"Team Ids"},"product_ids":{"anyOf":[{"items":{"type":"string","maxLength":32,"minLength":32},"type":"array"},{"type":"null"}],"title":"Product Ids"},"integration_mode":{"$ref":"#/components/schemas/IntegrationMode","default":"platform"},"scope":{"$ref":"#/components/schemas/Scope","description":"There must be only 1 GLOBAL config per Source. We can have more than one TEAM/PRODUCT config per Source.","readOnly":true}},"type":"object","required":["name","address","scope"],"title":"SupplyPolicy","description":"One policy describing how GRL can interact with a marketplaces in a\ncertain way. This is only used on the special \"global product\", and then\ninternally in grpc logic."},"SurveyEligibilityCriterion":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id","examples":["71a367fb71b243dc89f0012e0ec91749"]},"property_code":{"anyOf":[{"type":"string","maxLength":64,"minLength":3,"pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Property Code","examples":["c:73629"]},"question_text":{"type":"string","title":"Question Text","examples":["What company administers the retirement plan for your current employer?"]},"qualifying_answer":{"items":{"type":"string"},"type":"array","title":"Qualifying Answer","description":"User answer(s) that satisfied at least one eligibility rule","examples":["121"]},"qualifying_answer_label":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Qualifying Answer Label","examples":["Fidelity Investments"]},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation","description":"Human-readable text explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is **Fidelity Investments**."]},"rank":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rank","description":"Lower values are shown more prominently in the UI"}},"type":"object","required":["question_id","property_code","question_text","qualifying_answer","qualifying_answer_label"],"title":"SurveyEligibilityCriterion","description":"Explanatory record of which question answers contributed\n to a user's eligibility for a survey.\nThis is INSUFFICIENT for determining eligibility to a task\n as it IGNORES logical operators, dependencies between criteria,\n and other requirements. It is only intended for the UI."},"TangoCashoutMethodData":{"properties":{"type":{"type":"string","const":"TANGO","title":"Type","default":"TANGO"},"utid":{"type":"string","title":"Utid","description":"tango utid"},"countries":{"items":{"type":"string"},"type":"array","title":"Countries"},"value_type":{"type":"string","enum":["variable","fixed"],"title":"Value Type"},"disclaimer":{"type":"string","title":"Disclaimer","default":""},"terms":{"type":"string","title":"Terms","default":""}},"type":"object","required":["utid","countries","value_type"],"title":"TangoCashoutMethodData"},"TaskAdjustmentEvent":{"properties":{"mid":{"type":"string","maxLength":32,"minLength":32,"title":"Mid"},"source":{"$ref":"#/components/schemas/Source"},"status":{"$ref":"#/components/schemas/WallAdjustedStatus"},"alert_time":{"type":"string","format":"date-time","title":"Alert Time"},"quality_event_type":{"type":"string","const":"task_adjustment","title":"Quality Event Type","default":"task_adjustment"},"survey_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Survey Id"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"If negative, the status should adjusted to incomplete"},"event_time":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Event Time","description":"This is when the original wall event was started"},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"bpuid":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Bpuid","examples":["app-user-9329ebd"]},"user_id":{"anyOf":[{"type":"integer","exclusiveMaximum":2147483648.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"User Id"}},"type":"object","required":["mid","source","status"],"title":"TaskAdjustmentEvent"},"TaskAdjustmentEventBody":{"properties":{"events":{"items":{"$ref":"#/components/schemas/TaskAdjustmentEvent"},"type":"array","maxItems":100,"minItems":1,"title":"Events"}},"type":"object","required":["events"],"title":"TaskAdjustmentEventBody"},"TaskEnterPayload":{"properties":{"event_type":{"type":"string","const":"task.enter","title":"Event Type","default":"task.enter"},"source":{"$ref":"#/components/schemas/Source"},"survey_id":{"type":"string","maxLength":32,"minLength":1,"title":"Survey Id","examples":["127492892"]},"quota_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Quota Id","description":"The marketplace's internal quota id"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"}},"type":"object","required":["source","survey_id","country_iso"],"title":"TaskEnterPayload"},"TaskFinishPayload":{"properties":{"event_type":{"type":"string","const":"task.finish","title":"Event Type","default":"task.finish"},"source":{"$ref":"#/components/schemas/Source"},"survey_id":{"type":"string","maxLength":32,"minLength":1,"title":"Survey Id","examples":["127492892"]},"quota_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Quota Id","description":"The marketplace's internal quota id"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"duration_sec":{"type":"number","exclusiveMinimum":0.0,"title":"Duration Sec"},"status":{"$ref":"#/components/schemas/Status"},"status_code_1":{"anyOf":[{"$ref":"#/components/schemas/StatusCode1"},{"type":"null"}]},"status_code_2":{"anyOf":[{"$ref":"#/components/schemas/WallStatusCode2"},{"type":"null"}]},"cpi":{"anyOf":[{"type":"integer","maximum":4000.0,"minimum":0.0},{"type":"null"}],"title":"Cpi"}},"type":"object","required":["source","survey_id","country_iso","duration_sec","status"],"title":"TaskFinishPayload"},"TaskStatusResponse":{"properties":{"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id","description":"The BP ID of the associated respondent","examples":["1188cb21cb6741d79f614f6d02e9bc2a"]},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier","examples":["app-user-9329ebd"]},"started":{"type":"string","format":"date-time","title":"Started","description":"When the session was started"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished","description":"When the session was finished"},"status":{"type":"integer","description":"The outcome of a session.\n - 0 - UNKNOWN\n - 1 - ENTER (the user has not yet returned)\n - 2 - INCOMPLETE (the user failed)\n - 3 - COMPLETE (the user completed the task)","examples":[3]},"payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Payout","description":"The amount paid to the supplier, in integer USD cents","examples":[500]},"user_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"User Payout","description":"If a payout transformation is configured on this account, this is the amount the user should earn, in integer USD cents","examples":[337]},"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"user_payout_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Payout String","description":"If a payout transformation is configured on this account, this is the amount to display to the user","examples":["3370 Points"]},"kwargs":{"additionalProperties":{"type":"string"},"type":"object","title":"Kwargs","description":"Any extra url params used in the offerwall request will be passed back here"},"status_code_1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT\n\nAllowed values: \n - __BUYER_FAIL__: User terminated in buyer survey\n - __BUYER_QUALITY_FAIL__: User terminated in buyer survey for quality reasons\n - __PS_FAIL__: User failed in marketplace's prescreener\n - __PS_QUALITY__: User rejected by marketplace for quality reasons\n - __PS_BLOCKED__: User is explicitly blocked by the marketplace. Note: on some marketplaces, users can have multiple PS_QUALITY terminations and still complete surveys.\n - __PS_OVERQUOTA__: User rejected by marketplace for over quota\n - __PS_DUPLICATE__: User rejected by marketplace for duplicate\n - __GRS_FAIL__: The user failed within the GRS Platform\n - __GRS_QUALITY_FAIL__: The user failed within the GRS Platform for quality reasons\n - __GRS_ABANDON__: The user abandoned/timed out within the GRS Platform\n - __PS_ABANDON__: The user abandoned/timed out within the marketplace's pre-screen system. Note: On most marketplaces, we have no way of distinguishing between this and BUYER_ABANDON. BUYER_ABANDON is used as the default, unless we know it is PS_ABANDON.\n - __BUYER_ABANDON__: The user abandoned/timed out within the client survey\n - __UNKNOWN__: The status code is not documented\n - __COMPLETE__: The user completed the task successfully\n - __MARKETPLACE_FAIL__: Something was wrong upon the user redirecting from the marketplace, e.g. no postback received, or url hashing failures.\n - __SESSION_START_FAIL__: User failed before being sent into a marketplace\n - __SESSION_CONTINUE_FAIL__: User failed between attempts\n - __SESSION_START_QUALITY_FAIL__: User failed before being sent into a marketplace for \"security\" reasons\n - __SESSION_CONTINUE_QUALITY_FAIL__: User failed between attempts for \"security\" reasons","examples":["COMPLETE"]},"status_code_2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__Status Detail__\nThis should be set if the Session.status_code_1 is SESSION_XXX_FAIL\n\nAllowed values: \n - __ENTRY_URL_MODIFICATION__: Unable to parse either the bucket_id, request_id, or nudge_id from the url\n - __UNRECOGNIZED_IP__: The client's IP failed GRIP lookup, or we failed to store it for some reason\n - __USER_IS_ANONYMOUS__: User is using an anonymous IP\n - __USER_IS_BLOCKED__: User is blocked\n - __USER_IS_RATE_LIMITED__: User is rate limited\n - __UNRECOGNIZED_DEVICE__: The client's useragent was not categorized as desktop, mobile, or tablet\n - __OFFERWALL_EXPIRED__: The user clicked after 5 min\n - __INTERNAL_ERROR__: Something unexpected happened\n - __OFFERWALL_COUNTRY_MISMATCH__: The user requested the offerwall for a different country than their IP address indicates\n - __INVALID_BUCKET_ID__: The bucket id indicated in the url does not exist. This is likely due to the user clicking on a bucket for an offerwall that has already been refreshed.\n - __NO_TASKS_AVAILABLE__: Not necessarily the user's fault. We thought we had surveys, but due to for e.g. the user entering on a different device than we thought, there really are none. If we get a lot of these, then that might indicate something is wrong.\n - __ATTEMPT_IS_SUSPICIOUS__: The entrance attempt was flagged by GRLIQ as suspicious\n - __GRLIQ_MISSING__: No GRLIQ forensics post was received","examples":[null]},"adjusted_status":{"anyOf":[{"$ref":"#/components/schemas/SessionAdjustedStatus"},{"type":"null"}],"description":"An adjusted_status is set if a session is adjusted by the marketplace\nafter the original return. A session can be adjusted multiple times.\nThis is the most recent status. If a session was originally a complete,\nwas adjusted to incomplete, then back to complete, the adjusted_status\nwill be None, but the adjusted_timestamp will be set to the most recent\nchange.\n\nAllowed values: \n - __ac__ *(ADJUSTED_TO_COMPLETE)*: Task was reconciled to complete\n - __af__ *(ADJUSTED_TO_FAIL)*: Task was reconciled to incomplete\n - __pa__ *(PAYOUT_ADJUSTMENT)*: The payout was changed. This applies to Sessions ONLY.","examples":[null]},"adjusted_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Adjusted Timestamp","description":"When the adjusted status was last set.","examples":[null]},"adjusted_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Adjusted Payout","description":"The new payout after adjustment.","examples":[null]},"adjusted_user_payout":{"anyOf":[{"type":"integer","exclusiveMaximum":100000.0,"minimum":0.0},{"type":"null"}],"title":"Adjusted User Payout","description":"The new user_payout after adjustment.","examples":[null]},"adjusted_user_payout_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Adjusted User Payout String","description":"The new user_payout_string after adjustment.","examples":[null]},"wall_events":{"anyOf":[{"items":{"$ref":"#/components/schemas/WallOut"},"type":"array"},{"type":"null"}],"title":"Wall Events"},"currency":{"type":"string","const":"USD","title":"Currency","default":"USD"},"final_status":{"type":"integer","title":"Final Status","description":"This is deprecated","default":0},"bpuid":{"type":"string","title":"Bpuid","readOnly":true}},"type":"object","required":["tsid","product_id","product_user_id","started","bpuid"],"title":"TaskStatusResponse","description":"The status of a session"},"TasksStatusResponse":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total","description":"Total number of results"},"tasks_status":{"items":{"$ref":"#/components/schemas/TaskStatusResponse"},"type":"array","title":"Tasks Status"},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages","description":"Total number of pages","readOnly":true}},"type":"object","required":["pages"],"title":"TasksStatusResponse"},"TopNPlusBlockOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusBlockOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents and no\nbuckets are returned if the user is blocked.\n\nOfferwall code: `d48cce47`"},"TopNPlusBlockOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusBlockOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusBlockOfferWallResponse"},"TopNPlusBlockRecontactOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusRecontactBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusBlockRecontactOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents, no buckets\nare returned if the user is blocked, and each bucket includes a\n`is_recontact` key.\n\nOfferwall code: `1e5f0af8`"},"TopNPlusBlockRecontactOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusBlockRecontactOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusBlockRecontactOfferWallResponse"},"TopNPlusBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"quality_score":{"type":"number","title":"Quality Score"},"currency":{"type":"string","title":"Currency","description":"This will always be 'USD'","default":"USD","examples":["USD"]},"eligibility_criteria":{"items":{"$ref":"#/components/schemas/SurveyEligibilityCriterion"},"type":"array","title":"Eligibility Criteria","description":"The reasons the user is eligible for tasks in this bucket"},"eligibility_explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Eligibility Explanation","description":"Human-readable text explaining a user's eligibility for tasks in this bucket","examples":["You are a **47-year-old** **white** **male** with a *college degree*, who's employer's retirement plan is **Fidelity Investments**."]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","quality_score"],"title":"TopNPlusBucket"},"TopNPlusOfferWall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/TopNPlusBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"TopNPlusOfferWall","description":"Same as the TopNOfferWall, but the buckets include contents.\n\nOfferwall code: `b145b803`"},"TopNPlusOfferWallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/TopNPlusOfferWall"}},"type":"object","required":["info","offerwall"],"title":"TopNPlusOfferWallResponse"},"TopNPlusRecontactBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"x":{"type":"integer","minimum":0.0,"title":"X","description":"For UI. Provides a dimensionality position for the bucket on the x-axis.","default":0,"examples":[0,1,2]},"y":{"type":"integer","minimum":0.0,"title":"Y","description":"For UI. Provides a dimensionality position for the bucket on the y-axis.","default":0,"examples":[0,1,2]},"name":{"type":"string","title":"Name","description":"Currently unused. Will always return empty string","default":""},"description":{"type":"string","title":"Description","description":"Currently unused. Will always return empty string","default":""},"category":{"items":{"$ref":"#/components/schemas/CategoryAssociation"},"type":"array","title":"Category"},"contents":{"items":{"$ref":"#/components/schemas/BucketTask"},"type":"array","title":"Contents"},"duration":{"$ref":"#/components/schemas/DurationSummary"},"payout":{"$ref":"#/components/schemas/PayoutSummary"},"quality_score":{"type":"number","title":"Quality Score"},"is_recontact":{"type":"boolean","title":"Is Recontact"},"currency":{"type":"string","title":"Currency","description":"This will always be 'USD'","default":"USD","examples":["USD"]}},"additionalProperties":false,"type":"object","required":["id","uri","contents","duration","payout","quality_score","is_recontact"],"title":"TopNPlusRecontactBucket"},"UPKImportance":{"properties":{"task_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Task Count","description":"The number of live Tasks that use this UPK Question","examples":[47]},"task_score":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Task Score","description":"GRL's internal ranked score for the UPK Question","examples":[0.11175522477414712]},"marketplace_task_count":{"anyOf":[{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object"},{"type":"null"}],"title":"Marketplace Task Count","description":"The number of live Tasks that use this UPK Question per marketplace","examples":[{"d":23,"s":24}]}},"type":"object","title":"UPKImportance"},"USDeliveryAddress":{"properties":{"name_or_attn":{"type":"string","maxLength":50,"minLength":1,"title":"Name Or Attn"},"company":{"anyOf":[{"type":"string","maxLength":50,"minLength":1},{"type":"null"}],"title":"Company"},"phone_number":{"anyOf":[{"type":"string","maxLength":10,"minLength":10,"pattern":"^[0-9]+$"},{"type":"null"}],"title":"Phone Number"},"address":{"type":"string","maxLength":100,"minLength":1,"title":"Address"},"city":{"type":"string","maxLength":100,"minLength":1,"title":"City"},"state":{"type":"string","maxLength":2,"minLength":1,"title":"State"},"postal_code":{"type":"string","maxLength":10,"minLength":1,"title":"Postal Code"},"country":{"type":"string","title":"Country","default":"us"}},"type":"object","required":["name_or_attn","address","city","state","postal_code"],"title":"USDeliveryAddress"},"UpkItem":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","examples":["497b1fedec464151b063cd5367643ffa"]},"label":{"type":"string","maxLength":255,"title":"Label","examples":["high_school_completion"]},"description":{"anyOf":[{"type":"string","maxLength":1024},{"type":"null"}],"title":"Description","examples":["Completed high school"]}},"type":"object","required":["id","label"],"title":"UpkItem"},"UpkProperty":{"properties":{"property_id":{"type":"string","maxLength":32,"minLength":32,"title":"Property Id","examples":["3a8273f60c9d48f59852a5f593932698"]},"property_label":{"type":"string","maxLength":255,"title":"Property Label","examples":["educational_attainment"]},"prop_type":{"$ref":"#/components/schemas/PropertyType","description":"\nAllowed values: \n - __i__ *(UPK_ITEM)*: UserProfileKnowledge Item\n - __n__ *(UPK_NUMERICAL)*: UserProfileKnowledge Numerical\n - __x__ *(UPK_TEXT)*: UserProfileKnowledge Text","default":"i"},"cardinality":{"$ref":"#/components/schemas/Cardinality","description":"\nAllowed values: \n - __*__ *(ZERO_OR_MORE)*: Zero or More\n - __?__ *(ZERO_OR_ONE)*: Zero or One","default":"?"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"gold_standard":{"type":"boolean","title":"Gold Standard","description":"A Gold-Standard question has been enumerated for all possible values (per country) as best as possible by GRL,allowing it to be mapped across inventory sources. A property not marked as Gold-Standard may have: 1) marketplace qid associations & 2) category associations, but doesn't have a defined 'range' (list of allowed itemsin a multiple choice question). This is used for exposing a user's profiling data & forthe Nudge API.","default":false},"allowed_items":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkItem"},"type":"array"},{"type":"null"}],"title":"Allowed Items"},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories"}},"type":"object","required":["property_id","property_label","country_iso"],"title":"UpkProperty","description":"This used to be called \"QuestionInfo\", which is a bad name,\n as this describes a UPK Property, like \"educational_attainment\",\n not the question that asks for your education."},"UpkQuestion":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id"},"ext_question_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Ext Question Id","description":"what marketplace question this question links to"},"question_type":{"$ref":"#/components/schemas/UpkQuestionType"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"language_iso":{"type":"string","maxLength":3,"minLength":3,"pattern":"^[a-z]{3}$","title":"Language Iso"},"question_text":{"type":"string","minLength":1,"title":"Question Text","description":"The text shown to respondents"},"choices":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkQuestionChoice"},"type":"array"},{"type":"null"}],"title":"Choices"},"selector":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionSelectorMC"},{"$ref":"#/components/schemas/UpkQuestionSelectorTE"},{"$ref":"#/components/schemas/UpkQuestionSelectorSLIDER"},{"$ref":"#/components/schemas/UpkQuestionSelectorHIDDEN"}],"title":"Selector"},"configuration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/UpkQuestionConfigurationMC"},{"$ref":"#/components/schemas/UpkQuestionConfigurationTE"},{"$ref":"#/components/schemas/UpkQuestionConfigurationSLIDER"}],"discriminator":{"propertyName":"type","mapping":{"MC":"#/components/schemas/UpkQuestionConfigurationMC","SLIDER":"#/components/schemas/UpkQuestionConfigurationSLIDER","TE":"#/components/schemas/UpkQuestionConfigurationTE"}}},{"type":"null"}],"title":"Configuration"},"validation":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionValidation"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories","description":"Categories associated with this question"},"explanation_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Template","description":"Human-readable template for explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is {answer}."]},"explanation_fragment_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Fragment Template","description":"A very short, natural-language explanation fragment that can be combined with others into a single sentence","examples":["whose employer's retirement plan is {answer}"]}},"type":"object","required":["question_type","country_iso","language_iso","question_text","selector"],"title":"UpkQuestion","example":{"categories":[{"adwords_vertical_id":"396","label":"Politics","parent_uuid":"f66dddba61424ce5be2a38731450a0e1","path":"/News/Politics","uuid":"87b6d819f3ca4815bf1f135b1e829cc6"}],"choices":[{"choice_id":"1","choice_text":"Yes","exclusive":false,"order":0},{"choice_id":"2","choice_text":"No","exclusive":false,"order":1}],"country_iso":"us","importance":{"marketplace_task_count":{"d":9,"s":20,"w":20},"task_count":49,"task_score":3.3401743283265684},"language_iso":"eng","marketplace_task_count":{"d":9,"s":20,"w":20},"question_id":"fb20fd4773304500b39c4f6de0012a5a","question_text":"Are you registered to vote at your present address, or not?","question_type":"MC","selector":"SA","task_count":49,"task_score":3.3401743283265684}},"UpkQuestionChoice":{"properties":{"choice_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\w\\s\\.\\-]+$","title":"Choice Id","description":"The unique identifier for a response to a qualification"},"choice_text":{"type":"string","minLength":1,"title":"Choice Text","description":"The response text shown to respondents"},"order":{"type":"integer","minimum":0.0,"title":"Order"},"group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group"},"exclusive":{"type":"boolean","title":"Exclusive","description":"If answer is exclusive, it can be the only option selected","default":false},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]}},"type":"object","required":["choice_id","choice_text","order"],"title":"UpkQuestionChoice"},"UpkQuestionChoiceOut":{"properties":{"choice_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[\\w\\s\\.\\-]+$","title":"Choice Id","description":"The unique identifier for a response to a qualification"},"choice_text":{"type":"string","minLength":1,"title":"Choice Text","description":"The response text shown to respondents"},"order":{"type":"integer","minimum":0.0,"title":"Order"},"group":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group"},"exclusive":{"type":"boolean","title":"Exclusive","description":"If answer is exclusive, it can be the only option selected","default":false},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]}},"type":"object","required":["choice_id","choice_text","order"],"title":"UpkQuestionChoiceOut"},"UpkQuestionConfigurationMC":{"properties":{"max_select":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Select"}},"additionalProperties":false,"type":"object","title":"UpkQuestionConfigurationMC"},"UpkQuestionConfigurationSLIDER":{"properties":{"slider_min":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Min"},"slider_max":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Max"},"slider_start":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Start"},"slider_step":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Slider Step"}},"type":"object","title":"UpkQuestionConfigurationSLIDER"},"UpkQuestionConfigurationTE":{"properties":{"max_length":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Max Length","description":"Maximum str length of any input. Meant as an easy, nonregex based check."},"min_length":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Min Length","description":"Minimum str length of any input. Meant as an easy, nonregex based check."}},"additionalProperties":false,"type":"object","title":"UpkQuestionConfigurationTE"},"UpkQuestionOut":{"properties":{"question_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Question Id"},"ext_question_id":{"anyOf":[{"type":"string","pattern":"^[a-z]{1,2}\\:.*"},{"type":"null"}],"title":"Ext Question Id","description":"what marketplace question this question links to"},"question_type":{"$ref":"#/components/schemas/UpkQuestionType"},"country_iso":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$","title":"Country Iso"},"language_iso":{"type":"string","maxLength":3,"minLength":3,"pattern":"^[a-z]{3}$","title":"Language Iso"},"question_text":{"type":"string","minLength":1,"title":"Question Text","description":"The text shown to respondents"},"choices":{"anyOf":[{"items":{"$ref":"#/components/schemas/UpkQuestionChoiceOut"},"type":"array"},{"type":"null"}],"title":"Choices"},"selector":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionSelectorMC"},{"$ref":"#/components/schemas/UpkQuestionSelectorTE"},{"$ref":"#/components/schemas/UpkQuestionSelectorSLIDER"},{"$ref":"#/components/schemas/UpkQuestionSelectorHIDDEN"}],"title":"Selector"},"configuration":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/UpkQuestionConfigurationMC"},{"$ref":"#/components/schemas/UpkQuestionConfigurationTE"},{"$ref":"#/components/schemas/UpkQuestionConfigurationSLIDER"}],"discriminator":{"propertyName":"type","mapping":{"MC":"#/components/schemas/UpkQuestionConfigurationMC","SLIDER":"#/components/schemas/UpkQuestionConfigurationSLIDER","TE":"#/components/schemas/UpkQuestionConfigurationTE"}}},{"type":"null"}],"title":"Configuration"},"validation":{"anyOf":[{"$ref":"#/components/schemas/UpkQuestionValidation"},{"type":"null"}]},"importance":{"anyOf":[{"$ref":"#/components/schemas/UPKImportance"},{"type":"null"}]},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":"array","title":"Categories","description":"Categories associated with this question"},"explanation_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Template","description":"Human-readable template for explaining how a user's answer to this question affects eligibility","examples":["The company that administers your employer's retirement plan is {answer}."]},"explanation_fragment_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation Fragment Template","description":"A very short, natural-language explanation fragment that can be combined with others into a single sentence","examples":["whose employer's retirement plan is {answer}"]},"task_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Task Count","description":"The number of live Tasks that use this UPK Question","examples":[47]},"task_score":{"anyOf":[{"type":"number","minimum":0.0},{"type":"null"}],"title":"Task Score","description":"GRL's internal ranked score for the UPK Question","examples":[0.11175522477414712]},"marketplace_task_count":{"anyOf":[{"additionalProperties":{"type":"integer","minimum":0.0},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object"},{"type":"null"}],"title":"Marketplace Task Count","description":"The number of live Tasks that use this UPK Question per marketplace","examples":[{"d":23,"s":24}]}},"type":"object","required":["question_type","country_iso","language_iso","question_text","selector"],"title":"UpkQuestionOut","example":{"categories":[{"adwords_vertical_id":"396","label":"Politics","parent_uuid":"f66dddba61424ce5be2a38731450a0e1","path":"/News/Politics","uuid":"87b6d819f3ca4815bf1f135b1e829cc6"}],"choices":[{"choice_id":"1","choice_text":"Yes","exclusive":false,"order":0},{"choice_id":"2","choice_text":"No","exclusive":false,"order":1}],"country_iso":"us","importance":{"marketplace_task_count":{"d":9,"s":20,"w":20},"task_count":49,"task_score":3.3401743283265684},"language_iso":"eng","marketplace_task_count":{"d":9,"s":20,"w":20},"question_id":"fb20fd4773304500b39c4f6de0012a5a","question_text":"Are you registered to vote at your present address, or not?","question_type":"MC","selector":"SA","task_count":49,"task_score":3.3401743283265684}},"UpkQuestionResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"questions":{"items":{"$ref":"#/components/schemas/UpkQuestionOut"},"type":"array","title":"Questions"},"consent_questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Consent Questions","description":"For internal use"},"special_questions":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Special Questions","description":"For internal use"},"count":{"type":"integer","minimum":0.0,"title":"Count","description":"The number of questions returned"}},"type":"object","required":["questions","count"],"title":"UpkQuestionResponse"},"UpkQuestionSelectorHIDDEN":{"type":"string","enum":["HIDDEN"],"title":"UpkQuestionSelectorHIDDEN"},"UpkQuestionSelectorMC":{"type":"string","enum":["SA","MA","DL","SB","MSB"],"title":"UpkQuestionSelectorMC"},"UpkQuestionSelectorSLIDER":{"type":"string","enum":["HSLIDER","VSLIDER"],"title":"UpkQuestionSelectorSLIDER"},"UpkQuestionSelectorTE":{"type":"string","enum":["SL","ML","ETB"],"title":"UpkQuestionSelectorTE"},"UpkQuestionType":{"type":"string","enum":["MC","TE","SLIDER","HIDDEN"],"title":"UpkQuestionType"},"UpkQuestionValidation":{"properties":{"patterns":{"anyOf":[{"items":{"$ref":"#/components/schemas/PatternValidation"},"type":"array","minItems":1},{"type":"null"}],"title":"Patterns"}},"type":"object","required":["patterns"],"title":"UpkQuestionValidation"},"User":{"properties":{"id":{"anyOf":[{"type":"integer","exclusiveMaximum":2147483648.0,"exclusiveMinimum":0.0},{"type":"null"}],"title":"Id"},"uuid":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Uuid","examples":["972de0f390d44522bdee1824387cf1f7"]},"product":{"anyOf":[{"$ref":"#/components/schemas/Product"},{"type":"null"}]},"product_id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Product Id","examples":["4fe381fb7186416cb443a38fa66c6557"]},"product_user_id":{"anyOf":[{"type":"string","maxLength":128,"minLength":3},{"type":"null"}],"title":"Product User Id","description":"A unique identifier for each user, which is set by the Supplier. It should not contain any sensitive informationlike email or names, and should avoid using anyincrementing values.","examples":["app-user-9329ebd"]},"blocked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Blocked","default":false},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the user was created on the GRL platform."},"last_seen":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Seen","description":"When the user was last seen on, or acting on anypart of the GRL platform."},"audit_log":{"anyOf":[{"items":{"$ref":"#/components/schemas/AuditLog"},"type":"array"},{"type":"null"}],"title":"Audit Log"},"transactions":{"anyOf":[{"items":{"$ref":"#/components/schemas/LedgerTransaction"},"type":"array"},{"type":"null"}],"title":"Transactions"},"location_history":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeoIPInformation"},"type":"array"},{"type":"null"}],"title":"Location History"}},"additionalProperties":false,"type":"object","title":"User"},"UserCreateConfig":{"properties":{"min_hourly_create_limit":{"type":"integer","minimum":0.0,"title":"Min Hourly Create Limit","description":"The smallest allowed value for the hourly user create limit.","default":0},"max_hourly_create_limit":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Max Hourly Create Limit","description":"The largest allowed value for the hourly user create limit. If None, the hourly create limit is unconstrained."}},"type":"object","title":"UserCreateConfig","description":"Stores configuration for the user creation experience.\n\nThe user creation limit is determined dynamically based on the median\n daily completion rate. min_hourly_create_limit &\n max_hourly_create_limit can be used to constrain the dynamically\n determined rate limit within set values."},"UserDisplayedWalletBalance":{"properties":{"currency":{"type":"string","maxLength":32,"title":"Currency"},"amount":{"type":"integer","title":"Amount","description":"Displayed balance in the currency's smallest ledger unit."},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String"}},"type":"object","required":["currency","amount"],"title":"UserDisplayedWalletBalance","description":"Combined user-visible balance for one ledger currency."},"UserHealthConfig":{"properties":{"banned_countries":{"items":{"type":"string","maxLength":2,"minLength":2,"pattern":"^[a-z]{2}$"},"type":"array","title":"Banned Countries"},"allow_ban_iphist":{"type":"boolean","title":"Allow Ban Iphist","default":true}},"type":"object","title":"UserHealthConfig"},"UserInfo":{"properties":{"user_profile_knowledge":{"items":{"$ref":"#/components/schemas/UserProfileKnowledge"},"type":"array","title":"User Profile Knowledge"},"marketplace_profile_knowledge":{"items":{"$ref":"#/components/schemas/MarketProfileKnowledge"},"type":"array","title":"Marketplace Profile Knowledge"}},"type":"object","title":"UserInfo"},"UserInfoResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profile":{"$ref":"#/components/schemas/UserInfo"}},"type":"object","required":["user_profile"],"title":"UserInfoResponse"},"UserLedgerTransactionAttemptCredit":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","default":"Attempt Credit"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_attempt_credit","title":"Tx Type","default":"user_attempt_credit"},"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","tsid","url","amount_string"],"title":"UserLedgerTransactionAttemptCredit"},"UserLedgerTransactionTaskAdjustment":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Task Adjustment"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"bp_adjustment","title":"Tx Type","default":"bp_adjustment"},"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","tsid","url","amount_string"],"title":"UserLedgerTransactionTaskAdjustment","example":{"amount":-38,"amount_string":"$-0.38","created":"2026-09-28T21:57:31.132533Z","description":"Task Adjustment","tsid":"5e9e9d879fd74a4cbf77764df0fbfd03","tx_type":"bp_adjustment","url":"https://fsb.generalresearch.com/8359e86c50234214ac51129e98cbb62f/status/5e9e9d879fd74a4cbf77764df0fbfd03/"}},"UserLedgerTransactionTaskComplete":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Task Complete"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"bp_payment","title":"Tx Type","default":"bp_payment"},"tsid":{"type":"string","maxLength":32,"minLength":32,"title":"Tsid","description":"A unique identifier for the session","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","tsid","url","amount_string"],"title":"UserLedgerTransactionTaskComplete","description":"In a BP with user wallet enabled, the task-complete transaction would have\nline items for both the credit to the bp_wallet_account and credit to\nuser_account. This is the user-detail, so we've only caring about the\nuser's payment.","example":{"amount":38,"amount_string":"$0.38","created":"2026-09-28T21:57:31.132967Z","description":"Task Complete","tsid":"1b0f11edbb9d435cac5484b8bf953414","tx_type":"bp_payment","url":"https://fsb.generalresearch.com/7a8c5e33cc10487bb11e1eab495cff42/status/1b0f11edbb9d435cac5484b8bf953414/"}},"UserLedgerTransactionTypeSummary":{"properties":{"entry_count":{"type":"integer","minimum":0.0,"title":"Entry Count","default":0},"min_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Amount","description":"positive or negative USDCent"},"max_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Amount","description":"positive or negative USDCent"},"total_amount":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Amount","description":"positive or negative USDCent"}},"type":"object","title":"UserLedgerTransactionTypeSummary"},"UserLedgerTransactionTypesSummary":{"properties":{"bp_adjustment":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"bp_payment":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"user_bonus":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"user_attempt_credit":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"},"user_payout_request":{"$ref":"#/components/schemas/UserLedgerTransactionTypeSummary"}},"type":"object","title":"UserLedgerTransactionTypesSummary"},"UserLedgerTransactionUserBonus":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI","default":"Compensation Bonus"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_bonus","title":"Tx Type","default":"user_bonus"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","url","amount_string"],"title":"UserLedgerTransactionUserBonus","example":{"amount":100,"amount_string":"$1.00","created":"2026-09-28T21:57:31.132111Z","description":"Compensation Bonus","tx_type":"user_bonus"}},"UserLedgerTransactionUserPayout":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","description":"External description suitable for UI"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_payout_request","title":"Tx Type","default":"user_payout_request"},"payout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Id","description":"A unique identifier for the payout","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","description","amount","payout_id","url","amount_string"],"title":"UserLedgerTransactionUserPayout","example":{"amount":-5,"amount_string":"$-0.05","created":"2026-09-28T21:57:31.131284Z","description":"HIT Reward","payout_id":"64f05ec9749c4c07abd25252673fe809","tx_type":"user_payout_request","url":"https://fsb.generalresearch.com/112a105b26774aba8800699bdaec684d/cashout/64f05ec9749c4c07abd25252673fe809/"}},"UserLedgerTransactionUserPayoutCancel":{"properties":{"created":{"type":"string","format":"date-time","title":"Created","description":"When the Transaction was created"},"description":{"type":"string","maxLength":255,"title":"Description","default":"Payout Cancelled"},"amount":{"type":"integer","title":"Amount","description":"The net amount affecting the user's wallet, in USDCents. Positive means the user's balance increased; negative means it decreased.","examples":[500,-250]},"balance_after":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Balance After"},"tx_type":{"type":"string","const":"user_payout_cancel","title":"Tx Type","default":"user_payout_cancel"},"payout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Payout Id","description":"A unique identifier for the payout","examples":["a3848e0a53d64f68a74ced5f61b6eb68"]},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"A link to where the user can get more details about this transaction","readOnly":true},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String","description":"The 'amount' with the payout_format applied.","readOnly":true}},"additionalProperties":false,"type":"object","required":["created","amount","payout_id","url","amount_string"],"title":"UserLedgerTransactionUserPayoutCancel"},"UserLedgerTransactionsResponse":{"properties":{"page":{"type":"integer","minimum":1.0,"title":"Page","description":"Page number","default":1},"size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Size","description":"Page size","default":50},"total":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total","description":"Total number of results"},"transactions":{"items":{"oneOf":[{"$ref":"#/components/schemas/UserLedgerTransactionUserPayout"},{"$ref":"#/components/schemas/UserLedgerTransactionUserPayoutCancel"},{"$ref":"#/components/schemas/UserLedgerTransactionUserBonus"},{"$ref":"#/components/schemas/UserLedgerTransactionTaskAdjustment"},{"$ref":"#/components/schemas/UserLedgerTransactionTaskComplete"},{"$ref":"#/components/schemas/UserLedgerTransactionAttemptCredit"}],"discriminator":{"propertyName":"tx_type","mapping":{"bp_adjustment":"#/components/schemas/UserLedgerTransactionTaskAdjustment","bp_payment":"#/components/schemas/UserLedgerTransactionTaskComplete","user_attempt_credit":"#/components/schemas/UserLedgerTransactionAttemptCredit","user_bonus":"#/components/schemas/UserLedgerTransactionUserBonus","user_payout_cancel":"#/components/schemas/UserLedgerTransactionUserPayoutCancel","user_payout_request":"#/components/schemas/UserLedgerTransactionUserPayout"}}},"type":"array","title":"Transactions"},"summary":{"$ref":"#/components/schemas/UserLedgerTransactionTypesSummary"},"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"pages":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pages","description":"Total number of pages","readOnly":true}},"type":"object","required":["summary","pages"],"title":"UserLedgerTransactionsResponse"},"UserLedgerWallet":{"properties":{"amount":{"type":"integer","title":"Amount","description":"(USD cents) The amount in the user's wallet."},"redeemable_amount":{"type":"integer","minimum":0.0,"title":"Redeemable Amount","description":"(USD cents) The amount in the user's wallet this is currently redeemable."},"payout_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payout Format"},"amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount String"},"redeemable_amount_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redeemable Amount String"},"account_uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Account Uuid","description":"A unique identifier for this Ledger Account","examples":["c3c3566b5b1b4961b63a5670a2dc923d"]},"account_type":{"type":"string","enum":["user_wallet","user_attempt_credit"],"title":"Account Type"},"currency":{"type":"string","maxLength":32,"title":"Currency","default":"USD"},"display_name":{"type":"string","maxLength":64,"title":"Display Name","description":"Human-readable description of the Ledger Account"}},"type":"object","required":["amount","redeemable_amount","account_uuid","account_type","display_name"],"title":"UserLedgerWallet","description":"A user-owned ledger account exposed by the wallets endpoint.","example":{"amount":123,"amount_string":"1230 Points","payout_format":"{payout*10:,.0f} Points","redeemable_amount":100,"redeemable_amount_string":"1000 Points"}},"UserLedgerWallets":{"properties":{"wallets":{"items":{"$ref":"#/components/schemas/UserLedgerWallet"},"type":"array","title":"Wallets"},"displayed_balances":{"items":{"$ref":"#/components/schemas/UserDisplayedWalletBalance"},"type":"array","title":"Displayed Balances"}},"type":"object","title":"UserLedgerWallets"},"UserProfile":{"properties":{"email_address":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Address","examples":["Donald.Duck+123@googlemail.com"]},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name","description":"A public name chosen by the user. Can be used in leaderboards or event stream."},"user":{"$ref":"#/components/schemas/User"},"marketplace_pids":{"additionalProperties":{"type":"string","maxLength":32,"minLength":32},"propertyNames":{"$ref":"#/components/schemas/Source"},"type":"object","title":"Marketplace Pids","description":"User's PID in marketplaces","examples":[{"c":"b507a2c00c3e481fb82f23655d142198","d":"deffe922063e4b9980206a62c3df2fba","i":"1dd9bd986794444eb97cb921aee5663f"}]},"streaks":{"items":{"$ref":"#/components/schemas/UserStreak"},"type":"array","title":"Streaks"},"canonical_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Canonical Email","description":"Normalized email address by stripping mailbox-provider-specific behaviors such as plus addressing and period ignoring","readOnly":true,"examples":["donaldduck@gmail.com"]},"email_md5":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Email Md5","description":"MD5 hash of the email address","readOnly":true,"examples":["053fc3d5575362159e0c782abec83ffa"]},"email_sha1":{"anyOf":[{"type":"string","maxLength":40,"minLength":40},{"type":"null"}],"title":"Email Sha1","description":"SHA1 hash of the email address","readOnly":true,"examples":["6280fb76135b3585c0c5403be04844a0f0bae726"]},"email_sha256":{"anyOf":[{"type":"string","maxLength":64,"minLength":64},{"type":"null"}],"title":"Email Sha256","description":"SHA256 hash of the email address","readOnly":true,"examples":["8a098233e750f08de87d6053c06a58724287f34372368b6dc28b7ad4a77f3d39"]}},"additionalProperties":false,"type":"object","required":["user","canonical_email","email_md5","email_sha1","email_sha256"],"title":"UserProfile"},"UserProfileKnowledge":{"properties":{"property_id":{"type":"string","title":"Property Id"},"property_label":{"type":"string","title":"Property Label"},"translation":{"type":"string","title":"Translation"},"answer":{"items":{"$ref":"#/components/schemas/UserProfileKnowledgeAnswer"},"type":"array","title":"Answer"},"created":{"type":"string","format":"date-time","title":"Created","description":"When the User submitted this Profiling data"}},"type":"object","required":["property_id","property_label","translation","created"],"title":"UserProfileKnowledge"},"UserProfileKnowledgeAnswer":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"translation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Translation"},"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"}},"type":"object","title":"UserProfileKnowledgeAnswer"},"UserProfileResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profile":{"$ref":"#/components/schemas/UserProfile"}},"type":"object","required":["user_profile"],"title":"UserProfileResponse"},"UserProfileUpdateRequest":{"properties":{"email_address":{"type":"string","format":"email","title":"Email Address","examples":["contact@mail.com"]}},"additionalProperties":false,"type":"object","required":["email_address"],"title":"UserProfileUpdateRequest"},"UserProfilesResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"user_profiles":{"items":{"$ref":"#/components/schemas/UserProfile"},"type":"array","title":"User Profiles"}},"type":"object","required":["user_profiles"],"title":"UserProfilesResponse"},"UserQuestionAnswerIn":{"properties":{"question_id":{"type":"string","maxLength":32,"minLength":32,"title":"Question Id","examples":["fb20fd4773304500b39c4f6de0012a5a"]},"answer":{"items":{"type":"string","maxLength":5000,"minLength":1},"type":"array","maxItems":10,"minItems":1,"title":"Answer","description":"The user's answers to this question. Must pass the choice_id if the question is a Multiple Choice, or the actual text if the question is Text Entry","examples":[["1"]]}},"additionalProperties":false,"type":"object","required":["question_id","answer"],"title":"UserQuestionAnswerIn","description":"Send the answers to one or more questions for a user. A question is\nuniquely specified by the question_id key. The answer is: the choice_id\nif the question_type is \"MC\" the actual entered text if the\nquestion_type is \"TE\"\n\nTODO: look up the question_type from the question_id to apply MC or\n TE specific validation on the answer(s)"},"UserStreak":{"properties":{"country_iso":{"type":"string","title":"Country Iso"},"period":{"$ref":"#/components/schemas/StreakPeriod"},"fulfillment":{"$ref":"#/components/schemas/StreakFulfillment"},"current_streak":{"type":"integer","minimum":0.0,"title":"Current Streak"},"longest_streak":{"type":"integer","minimum":0.0,"title":"Longest Streak"},"state":{"$ref":"#/components/schemas/StreakState"},"last_fulfilled_period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Last Fulfilled Period Start"},"timezone_name":{"type":"string","title":"Timezone Name","readOnly":true},"current_period_bounds":{"prefixItems":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}],"type":"array","maxItems":2,"minItems":2,"title":"Current Period Bounds","readOnly":true},"last_fulfilled_period_bounds":{"anyOf":[{"prefixItems":[{"type":"string","format":"date-time"},{"type":"string","format":"date-time"}],"type":"array","maxItems":2,"minItems":2},{"type":"null"}],"title":"Last Fulfilled Period Bounds","readOnly":true},"time_remaining_in_period":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Time Remaining In Period","readOnly":true}},"additionalProperties":false,"type":"object","required":["country_iso","period","fulfillment","current_streak","longest_streak","state","timezone_name","current_period_bounds","last_fulfilled_period_bounds","time_remaining_in_period"],"title":"UserStreak"},"UserWalletBalance":{"properties":{"amount":{"type":"integer","title":"Amount","description":"(USD cents) The amount in the user's wallet."},"redeemable_amount":{"type":"integer","minimum":0.0,"title":"Redeemable Amount","description":"(USD cents) The amount in the user's wallet this is currently redeemable."},"payout_format":{"type":"string","title":"Payout Format","description":"\nThe format describing the str representation of a payout. Typically, this would be displayed to a user.\nThe payout_format is similar to python format string with a subset of functionality supported.\nOnly float with a precision are supported along with an optional comma for a thousands separator.\nIn addition, a mathematical operator can be applied, such as dividing by 100. \nExamples are shown assuming payout = 100 (one dollar).\n- \"{payout*10:,.0f} Points\" -> \"1,000 Points\"\n- \"${payout/100:.2f}\" -> \"$1.00\"\n","examples":["{payout*10:,.0f} Points","${payout/100:.2f}","{payout:.0f}"]},"amount_string":{"type":"string","title":"Amount String","description":"The 'amount' with the payout_format applied. Can be displayed to the user."},"redeemable_amount_string":{"type":"string","title":"Redeemable Amount String","description":"The 'redeemable_amount' with the payout_format applied. Can be displayed to the user."}},"type":"object","required":["amount","redeemable_amount","payout_format","amount_string","redeemable_amount_string"],"title":"UserWalletBalance","example":{"amount":123,"amount_string":"1230 Points","payout_format":"{payout*10:,.0f} Points","redeemable_amount":100,"redeemable_amount_string":"1000 Points"}},"UserWalletBalanceResponse":{"properties":{"status":{"type":"string","enum":["success","error"],"title":"Status","description":"The status of the API response.","default":"success","examples":["success"]},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Msg","description":"An optional message, if the status is error.","examples":[""]},"wallet":{"$ref":"#/components/schemas/UserWalletBalance"}},"type":"object","required":["wallet"],"title":"UserWalletBalanceResponse"},"UserWalletConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","description":"If enabled, the users' wallets are managed.","default":false},"balance_type":{"type":"string","enum":["wallet_balance","redeemable_balance"],"title":"Balance Type","description":"The balance used as the user's displayed balance.","default":"wallet_balance"},"amt":{"type":"boolean","title":"Amt","description":"Uses Amazon Mechanical Turk","default":false},"supported_payout_types":{"items":{"$ref":"#/components/schemas/PayoutType"},"type":"array","title":"Supported Payout Types"},"min_cashout":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Min Cashout","description":"Minimum cashout amount. If enabled is True and no min_cashout is set, will default to $0.01.","examples":["10.00"]},"failed_attempt_credit":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Failed Attempt Credit","description":"Conditional credit awarded for an eligible failed attempt. None disables failed-attempt credits.","examples":["0.05",null]}},"type":"object","title":"UserWalletConfig","description":"Stores configuration for the user wallet handling"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WXETOfferwall":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier to reference a generated offerwall","examples":["7dc1d3aeb4844a6fab17ecd370b8bf1e"]},"availability_count":{"type":"integer","minimum":0.0,"title":"Availability Count","description":"Total opportunities available for specific bpuid respondent and parameters. This value changes frequently and can be used to determine if a respondent has potential tasks available, regardless of the offerwall type being requested. If the value is 0, no buckets will be generated.","examples":[42]},"attempted_live_eligible_count":{"type":"integer","minimum":0.0,"title":"Attempted Live Eligible Count","description":"Number of currently live opportunities for which the respondent meets all eligibility criteria but is excluded due to a prior attempt. Only includes surveys that are still live and otherwise eligible; does not include previously attempted surveys that are no longer available.","default":0,"examples":[7]},"buckets":{"items":{"$ref":"#/components/schemas/WXETOfferwallBucket"},"type":"array","title":"Buckets"},"offerwall_reasons":{"items":{"$ref":"#/components/schemas/OfferwallReason"},"type":"array","title":"Offerwall Reasons","description":"Explanations describing why so many or few opportunities are available.","examples":[["USER_BLOCKED","UNDER_MINIMUM_AGE"]]}},"additionalProperties":false,"type":"object","required":["id","availability_count"],"title":"WXETOfferwall","description":"Returns buckets from WXET as single tasks\nOfferwall code: `55a4e1a9`"},"WXETOfferwallBucket":{"properties":{"id":{"type":"string","maxLength":32,"minLength":32,"title":"Id","description":"Unique identifier this particular bucket","examples":["5ba2fe5010cc4d078fc3cc0b0cc264c3"]},"uri":{"type":"string","maxLength":2083,"minLength":1,"format":"uri","title":"Uri","description":"The URL to send a respondent into. Must not edit this URL in any way","examples":["https://task.generalresearch.com/api/v1/52d3f63b2709/797df4136c604a6c8599818296aae6d1/?i=5ba2fe5010cc4d078fc3cc0b0cc264c3&b=test&66482fb=e7baf5e"]},"duration":{"type":"integer","maximum":5400.0,"exclusiveMinimum":0.0,"title":"Duration","description":"The bucket's expected duration, in seconds"},"min_payout":{"type":"integer","maximum":10000.0,"exclusiveMinimum":0.0,"title":"Min Payout","description":"The bucket's min payout, in usd cents"}},"additionalProperties":false,"type":"object","required":["id","uri","duration","min_payout"],"title":"WXETOfferwallBucket"},"WXETOfferwallResponse":{"properties":{"info":{"$ref":"#/components/schemas/OfferWallInfo"},"offerwall":{"$ref":"#/components/schemas/WXETOfferwall"}},"type":"object","required":["info","offerwall"],"title":"WXETOfferwallResponse"},"WallAdjustedStatus":{"type":"string","enum":["ac","af","ca","cc"],"title":"WallAdjustedStatus"},"WallOut":{"properties":{"uuid":{"type":"string","maxLength":32,"minLength":32,"title":"Uuid"},"source":{"$ref":"#/components/schemas/Source"},"buyer_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Buyer Id"},"req_survey_id":{"type":"string","maxLength":32,"title":"Req Survey Id"},"started":{"type":"string","format":"date-time","title":"Started"},"survey_id":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Survey Id"},"finished":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished"},"status":{"anyOf":[{"$ref":"#/components/schemas/Status"},{"type":"null"}]},"status_code_1":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"__High level status code for outcome of the session.__\nThis should only be NULL if the Status is ABANDON or TIMEOUT\n\nAllowed values: \n - __BUYER_FAIL__: User terminated in buyer survey\n - __BUYER_QUALITY_FAIL__: User terminated in buyer survey for quality reasons\n - __PS_FAIL__: User failed in marketplace's prescreener\n - __PS_QUALITY__: User rejected by marketplace for quality reasons\n - __PS_BLOCKED__: User is explicitly blocked by the marketplace. Note: on some marketplaces, users can have multiple PS_QUALITY terminations and still complete surveys.\n - __PS_OVERQUOTA__: User rejected by marketplace for over quota\n - __PS_DUPLICATE__: User rejected by marketplace for duplicate\n - __GRS_FAIL__: The user failed within the GRS Platform\n - __GRS_QUALITY_FAIL__: The user failed within the GRS Platform for quality reasons\n - __GRS_ABANDON__: The user abandoned/timed out within the GRS Platform\n - __PS_ABANDON__: The user abandoned/timed out within the marketplace's pre-screen system. Note: On most marketplaces, we have no way of distinguishing between this and BUYER_ABANDON. BUYER_ABANDON is used as the default, unless we know it is PS_ABANDON.\n - __BUYER_ABANDON__: The user abandoned/timed out within the client survey\n - __UNKNOWN__: The status code is not documented\n - __COMPLETE__: The user completed the task successfully\n - __MARKETPLACE_FAIL__: Something was wrong upon the user redirecting from the marketplace, e.g. no postback received, or url hashing failures.\n - __SESSION_START_FAIL__: User failed before being sent into a marketplace\n - __SESSION_CONTINUE_FAIL__: User failed between attempts\n - __SESSION_START_QUALITY_FAIL__: User failed before being sent into a marketplace for \"security\" reasons\n - __SESSION_CONTINUE_QUALITY_FAIL__: User failed between attempts for \"security\" reasons","examples":["COMPLETE"]},"status_code_2":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL\n\nAllowed values: \n - __URL_HASHING_CHECK_FAILED__: The redirect URL (coming back from the marketplace) failed hashing checks\n - __BROKEN_REDIRECT__: The redirect URL was missing required query params or was unparseable\n - __INVALID_REDIRECT__: The redirect URL was invalid or inconsistent in some way and as a result we could not determine the outcome. This could be if a redirect received did not match the user's most recent attempt.\n - __INVALID_MARKETPLACE_POSTBACK__: The redirect indicated a complete, but no/invalid Postback was received from the marketplace\n - __NO_MARKETPLACE_POSTBACK__: No/invalid Postback was received from the marketplace. Used in cases where the redirect does not contain a status.\n - __COMPLETE_TOO_FAST__: The marketplace indicates the user completed the survey, but we don't think this is valid due to speeding. Generally this cutoff is the 95th percentile of our calculated CompletionTime survey stat.\n - __INTERNAL_ERROR__: Something happened during the handling of this redirect (on our side)","examples":[null]},"ext_status_code_1":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 1"},"ext_status_code_2":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 2"},"ext_status_code_3":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Ext Status Code 3"},"report_value":{"anyOf":[{"$ref":"#/components/schemas/ReportValue"},{"type":"null"}]},"report_notes":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Report Notes"},"adjusted_status":{"anyOf":[{"$ref":"#/components/schemas/WallAdjustedStatus"},{"type":"null"}]},"adjusted_timestamp":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Adjusted Timestamp"},"user_cpi":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Cpi","description":"\n The amount the user would earn from completing this task, if the status was a complete.\n If the BP has no payout xform, the user_cpi is None. This is analogous to the session's\n user_payout.\n ","examples":[123]},"user_cpi_string":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Cpi String","description":"If a payout transformation is configured on this account, this is the amount to display to the user","examples":["123 Points"]}},"additionalProperties":false,"type":"object","required":["source","req_survey_id"],"title":"WallOut"},"WallStatusCode2":{"type":"integer","enum":[12,16,17,13,18,14,15],"title":"WallStatusCode2","description":"This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL"},"YieldManConfig":{"properties":{"category_request":{"$ref":"#/components/schemas/OfferWallCategoryRequest"},"scoring_params":{"$ref":"#/components/schemas/OfferWallRequestYieldmanParams"}},"type":"object","title":"YieldManConfig"}}},"tags":[{"name":"Offerwall","description":"Generate and retrieve various offerwall groupings. These results should be called \"on the \n fly\" just before presenting the results to a respondent. Results greater than 3 minutes old should not be \n presented to the respondent. When a respondent takes any action on a generated offerwall (they go into a \n bucket), the offerwall should be discarded. Any subsequent bucket entrances will fail. The following reserved \n are reserved keywords. However, any additional query parameter that is provided, will be returned back in the \n TaskResponse response in the kwargs attribute.\n\n {'b', 'bp_user_id', 'bpuid', 'country_codes', 'country', 'cpi', 'currency', \n 'description', 'duration', 'entry_link', 'i', 'idx', 'info', 'ip', 'kwargs',\n 'l', 'lang_codes', 'languages', 'loi', 'name', 'payout', 'product_id', \n 'quality', 'quality_category', 'req_loi', 'status', 'task_uri', 'tasks', \n 'tsid', 'uri', 'url', 'country_iso', 'format', 'behavior'}"},{"name":"Status","description":"Retrieving the status of respondent attempts, either by brokerage account filtering, or a specific Task Status ID (TSID) that is provided in the redirect."}]}
\ No newline at end of file diff --git a/jb-ui/src/api_jb/.gitignore b/jb-ui/src/api_jb/.gitignore new file mode 100644 index 0000000..149b576 --- /dev/null +++ b/jb-ui/src/api_jb/.gitignore @@ -0,0 +1,4 @@ +wwwroot/*.js +node_modules +typings +dist diff --git a/jb-ui/src/api_jb/.npmignore b/jb-ui/src/api_jb/.npmignore new file mode 100644 index 0000000..999d88d --- /dev/null +++ b/jb-ui/src/api_jb/.npmignore @@ -0,0 +1 @@ +# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
\ No newline at end of file diff --git a/jb-ui/src/api_jb/.openapi-generator-ignore b/jb-ui/src/api_jb/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/jb-ui/src/api_jb/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/jb-ui/src/api_jb/.openapi-generator/FILES b/jb-ui/src/api_jb/.openapi-generator/FILES new file mode 100644 index 0000000..bc75ea2 --- /dev/null +++ b/jb-ui/src/api_jb/.openapi-generator/FILES @@ -0,0 +1,26 @@ +.gitignore +.npmignore +.openapi-generator-ignore +api.ts +base.ts +common.ts +configuration.ts +docs/APIApi.md +docs/AccountLogin.md +docs/AmtAccountLink.md +docs/AuthApi.md +docs/CashoutConfirmation.md +docs/CashoutPostback.md +docs/CashoutRequest.md +docs/CashoutRequestInfo.md +docs/DefaultApi.md +docs/HTTPValidationError.md +docs/LocationInner.md +docs/MagicLinkExchangeRequest.md +docs/PayoutStatus.md +docs/PayoutType.md +docs/User.md +docs/ValidationError.md +docs/WalletApi.md +git_push.sh +index.ts diff --git a/jb-ui/src/api_jb/.openapi-generator/VERSION b/jb-ui/src/api_jb/.openapi-generator/VERSION new file mode 100644 index 0000000..bc34d81 --- /dev/null +++ b/jb-ui/src/api_jb/.openapi-generator/VERSION @@ -0,0 +1 @@ +7.25.0 diff --git a/jb-ui/src/api_jb/README.md b/jb-ui/src/api_jb/README.md new file mode 100644 index 0000000..1678d5d --- /dev/null +++ b/jb-ui/src/api_jb/README.md @@ -0,0 +1,11 @@ +# Panel UI OpenAPI Definitions + +```bash +apt install default-jdk +java -version + +npm install -g @openapitools/openapi-generator-cli + +wget https://jamesbillings67.com/openapi.json +openapi-generator-cli generate -i ./openapi.json -g typescript-axios -o ./ +``` diff --git a/jb-ui/src/api_jb/api.ts b/jb-ui/src/api_jb/api.ts new file mode 100644 index 0000000..89a4bac --- /dev/null +++ b/jb-ui/src/api_jb/api.ts @@ -0,0 +1,1341 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; +// Some imports not used depending on template conditions +// @ts-ignore +import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +export interface AccountLogin { + 'email': string; +} +export interface AmtAccountLink { + 'email': string; + 'amt_worker_id': string; +} +export interface CashoutConfirmation { + 'token': string; +} +export interface CashoutPostback { + 'cashout_id': string; +} +export interface CashoutRequest { + /** + * Amount in USD cents + */ + 'amount': number; + /** + * Cashout method ID + */ + 'cashout_method_id': string; +} +/** + * See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + */ +export interface CashoutRequestInfo { + /** + * Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid. + */ + 'id': string | null; + /** + * This is the name of the cashout method. + */ + 'description': string; + 'message'?: string | null; + /** + * - `PENDING` = PENDING - `APPROVED` = APPROVED - `REJECTED` = REJECTED - `CANCELLED` = CANCELLED - `FAILED` = FAILED - `COMPLETE` = COMPLETE + */ + 'status'?: PayoutStatus | null; + 'transaction_info'?: { [key: string]: any; } | null; + 'product_id': string; + 'product_user_id': string; + /** + * - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT + */ + 'payout_type': PayoutType; + /** + * The USDCent amount int. This cannot be 0 or negative + */ + 'amount': number; +} + + +export interface HTTPValidationError { + 'detail'?: Array<ValidationError>; +} +export interface LocationInner { +} +export interface MagicLinkExchangeRequest { + 'token': string; +} +/** + * The max size of the db field that holds this value is 20, so please don\'t add new values longer than that! + */ + +export const PayoutStatus = { + Pending: 'PENDING', + Approved: 'APPROVED', + Rejected: 'REJECTED', + Cancelled: 'CANCELLED', + Failed: 'FAILED', + Complete: 'COMPLETE', +} as const; + +export type PayoutStatus = typeof PayoutStatus[keyof typeof PayoutStatus]; + + +/** + * The method in which the requested payout is delivered. + */ + +export const PayoutType = { + Paypal: 'PAYPAL', + Tango: 'TANGO', + Tremendous: 'TREMENDOUS', + Dwolla: 'DWOLLA', + Ach: 'ACH', + Wire: 'WIRE', + CashInMail: 'CASH_IN_MAIL', + Prize: 'PRIZE', + Amt: 'AMT', + AmtBonus: 'AMT_BONUS', + AmtAssignment: 'AMT_ASSIGNMENT', + AmtAssignment2: 'AMT_ASSIGNMENT', +} as const; + +export type PayoutType = typeof PayoutType[keyof typeof PayoutType]; + + +/** + * A user that has been authenticated and exists in THL + */ +export interface User { + 'email': string; + 'display_name'?: string | null; + 'blocked'?: boolean; + 'product_user_id': string; +} +export interface ValidationError { + 'loc': Array<LocationInner>; + 'msg': string; + 'type': string; +} + +/** + * APIApi - axios parameter creator + */ +export const APIApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workDirectWorkDirectGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/work/direct/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Accept'] = 'text/html'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workWorkGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/work/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'text/html'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * APIApi - functional programming interface + */ +export const APIApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = APIApiAxiosParamCreator(configuration) + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async workDirectWorkDirectGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.workDirectWorkDirectGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APIApi.workDirectWorkDirectGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async workWorkGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<string>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.workWorkGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['APIApi.workWorkGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * APIApi - factory interface + */ +export const APIApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = APIApiFp(configuration) + return { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workDirectWorkDirectGet(options?: RawAxiosRequestConfig): AxiosPromise<string> { + return localVarFp.workDirectWorkDirectGet(options).then((request) => request(axios, basePath)); + }, + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + workWorkGet(options?: RawAxiosRequestConfig): AxiosPromise<string> { + return localVarFp.workWorkGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * APIApi - object-oriented interface + */ +export class APIApi extends BaseAPI { + /** + * View for direct work (not on AMT). Makes sure user is authenticated. + * @summary Work Direct + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public workDirectWorkDirectGet(options?: RawAxiosRequestConfig) { + return APIApiFp(this.configuration).workDirectWorkDirectGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + * @summary Work + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public workWorkGet(options?: RawAxiosRequestConfig) { + return APIApiFp(this.configuration).workWorkGet(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * AuthApi - axios parameter creator + */ +export const AuthApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSessionAuthSessionDelete: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/auth/session/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeAmtAccountLinkAuthLinkAmtExchangePost: async (magicLinkExchangeRequest: MagicLinkExchangeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'magicLinkExchangeRequest' is not null or undefined + assertParamExists('exchangeAmtAccountLinkAuthLinkAmtExchangePost', 'magicLinkExchangeRequest', magicLinkExchangeRequest) + const localVarPath = `/auth/link-amt/exchange/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(magicLinkExchangeRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeMagicLinkAuthMagicLinkExchangePost: async (magicLinkExchangeRequest: MagicLinkExchangeRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'magicLinkExchangeRequest' is not null or undefined + assertParamExists('exchangeMagicLinkAuthMagicLinkExchangePost', 'magicLinkExchangeRequest', magicLinkExchangeRequest) + const localVarPath = `/auth/magic-link/exchange/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(magicLinkExchangeRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionAuthSessionGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/auth/session/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteAmtAccountLinkAuthLinkAmtInvitePost: async (amtAccountLink: AmtAccountLink, authorization?: string | null, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'amtAccountLink' is not null or undefined + assertParamExists('inviteAmtAccountLinkAuthLinkAmtInvitePost', 'amtAccountLink', amtAccountLink) + const localVarPath = `/auth/link-amt/invite/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + if (authorization != null) { + localVarHeaderParameter['authorization'] = String(authorization); + } + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(amtAccountLink, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + linkAmtAccountAuthLinkAmtRequestPost: async (amtAccountLink: AmtAccountLink, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'amtAccountLink' is not null or undefined + assertParamExists('linkAmtAccountAuthLinkAmtRequestPost', 'amtAccountLink', amtAccountLink) + const localVarPath = `/auth/link-amt/request/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(amtAccountLink, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestMagicLinkAuthMagicLinkRequestPost: async (accountLogin: AccountLogin, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'accountLogin' is not null or undefined + assertParamExists('requestMagicLinkAuthMagicLinkRequestPost', 'accountLogin', accountLogin) + const localVarPath = `/auth/magic-link/request/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(accountLogin, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * AuthApi - functional programming interface + */ +export const AuthApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = AuthApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSessionAuthSessionDelete(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.deleteSessionAuthSessionDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.exchangeAmtAccountLinkAuthLinkAmtExchangePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.exchangeMagicLinkAuthMagicLinkExchangePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getSessionAuthSessionGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<User>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getSessionAuthSessionGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.getSessionAuthSessionGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.inviteAmtAccountLinkAuthLinkAmtInvitePost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.linkAmtAccountAuthLinkAmtRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['AuthApi.requestMagicLinkAuthMagicLinkRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * AuthApi - factory interface + */ +export const AuthApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = AuthApiFp(configuration) + return { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.deleteSessionAuthSessionDelete(options).then((request) => request(axios, basePath)); + }, + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getSessionAuthSessionGet(options?: RawAxiosRequestConfig): AxiosPromise<User> { + return localVarFp.getSessionAuthSessionGet(options).then((request) => request(axios, basePath)); + }, + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options).then((request) => request(axios, basePath)); + }, + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options).then((request) => request(axios, basePath)); + }, + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * AuthApi - object-oriented interface + */ +export class AuthApi extends BaseAPI { + /** + * + * @summary Delete Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public deleteSessionAuthSessionDelete(options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).deleteSessionAuthSessionDelete(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Validate the email link, then transition the bound AMT account. + * @summary Exchange Amt Account Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Exchange a magic link only after its landing page makes an explicit POST. + * @summary Exchange Magic Link + * @param {MagicLinkExchangeRequest} magicLinkExchangeRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest: MagicLinkExchangeRequest, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Get Session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public getSessionAuthSessionGet(options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).getSessionAuthSessionGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a long-lived AMT account-link URL without sending an email. + * @summary Invite Amt Account Link + * @param {AmtAccountLink} amtAccountLink + * @param {string | null} [authorization] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink: AmtAccountLink, authorization?: string | null, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink, authorization, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Link an AMT account and login. + * @summary Link Amt Account + * @param {AmtAccountLink} amtAccountLink + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink: AmtAccountLink, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Create a magic link. + * @summary Request Magic Link + * @param {AccountLogin} accountLogin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public requestMagicLinkAuthMagicLinkRequestPost(accountLogin: AccountLogin, options?: RawAxiosRequestConfig) { + return AuthApiFp(this.configuration).requestMagicLinkAuthMagicLinkRequestPost(accountLogin, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DefaultApi - axios parameter creator + */ +export const DefaultApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingFaviconIcoGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/favicon.ico`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingRobotsTxtGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/robots.txt`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingSitemapXmlGet: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + const localVarPath = `/sitemap.xml`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + serveReactAppFullPathGet: async (fullPath: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'fullPath' is not null or undefined + assertParamExists('serveReactAppFullPathGet', 'fullPath', fullPath) + const localVarPath = `/{full_path}` + .replace('{full_path}', encodeURIComponent(String(fullPath))); + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DefaultApi - functional programming interface + */ +export const DefaultApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DefaultApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingFaviconIcoGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingFaviconIcoGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingRobotsTxtGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingRobotsTxtGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: any | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.returnNothingSitemapXmlGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.returnNothingSitemapXmlGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.serveReactAppFullPathGet(fullPath, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DefaultApi.serveReactAppFullPathGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DefaultApi - factory interface + */ +export const DefaultApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DefaultApiFp(configuration) + return { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingFaviconIcoGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingRobotsTxtGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: any | null; }> { + return localVarFp.returnNothingSitemapXmlGet(options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig): AxiosPromise<any> { + return localVarFp.serveReactAppFullPathGet(fullPath, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DefaultApi - object-oriented interface + */ +export class DefaultApi extends BaseAPI { + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingFaviconIcoGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingFaviconIcoGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingRobotsTxtGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingRobotsTxtGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Return Nothing + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public returnNothingSitemapXmlGet(options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).returnNothingSitemapXmlGet(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Serve React App + * @param {string} fullPath + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public serveReactAppFullPathGet(fullPath: string, options?: RawAxiosRequestConfig) { + return DefaultApiFp(this.configuration).serveReactAppFullPathGet(fullPath, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WalletApi - axios parameter creator + */ +export const WalletApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cashoutPostbackWalletCashoutPostbackPost: async (cashoutPostback: CashoutPostback, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutPostback' is not null or undefined + assertParamExists('cashoutPostbackWalletCashoutPostbackPost', 'cashoutPostback', cashoutPostback) + const localVarPath = `/wallet/cashout/postback/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutPostback, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCashoutWalletCashoutConfirmPost: async (cashoutConfirmation: CashoutConfirmation, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutConfirmation' is not null or undefined + assertParamExists('confirmCashoutWalletCashoutConfirmPost', 'cashoutConfirmation', cashoutConfirmation) + const localVarPath = `/wallet/cashout/confirm/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutConfirmation, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestCashoutWalletCashoutRequestPost: async (cashoutRequest: CashoutRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => { + // verify required parameter 'cashoutRequest' is not null or undefined + assertParamExists('requestCashoutWalletCashoutRequestPost', 'cashoutRequest', cashoutRequest) + const localVarPath = `/wallet/cashout/request/`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication HTTPBearer required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + localVarHeaderParameter['Content-Type'] = 'application/json'; + localVarHeaderParameter['Accept'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(cashoutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WalletApi - functional programming interface + */ +export const WalletApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.cashoutPostbackWalletCashoutPostbackPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CashoutRequestInfo>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.confirmCashoutWalletCashoutConfirmPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<{ [key: string]: string | null; }>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.requestCashoutWalletCashoutRequestPost(cashoutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.requestCashoutWalletCashoutRequestPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * WalletApi - factory interface + */ +export const WalletApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WalletApiFp(configuration) + return { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig): AxiosPromise<void> { + return localVarFp.cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig): AxiosPromise<CashoutRequestInfo> { + return localVarFp.confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options).then((request) => request(axios, basePath)); + }, + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig): AxiosPromise<{ [key: string]: string | null; }> { + return localVarFp.requestCashoutWalletCashoutRequestPost(cashoutRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WalletApi - object-oriented interface + */ +export class WalletApi extends BaseAPI { + /** + * + * @summary Cashout Postback + * @param {CashoutPostback} cashoutPostback + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public cashoutPostbackWalletCashoutPostbackPost(cashoutPostback: CashoutPostback, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).cashoutPostbackWalletCashoutPostbackPost(cashoutPostback, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Confirm Cashout + * @param {CashoutConfirmation} cashoutConfirmation + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation: CashoutConfirmation, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Email the authenticated user a link confirming the requested amount. + * @summary Request Cashout + * @param {CashoutRequest} cashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + public requestCashoutWalletCashoutRequestPost(cashoutRequest: CashoutRequest, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).requestCashoutWalletCashoutRequestPost(cashoutRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + diff --git a/jb-ui/src/api_jb/base.ts b/jb-ui/src/api_jb/base.ts new file mode 100644 index 0000000..28b4484 --- /dev/null +++ b/jb-ui/src/api_jb/base.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +import type { Configuration } from './configuration'; +// Some imports not used depending on template conditions +// @ts-ignore +import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios'; +import globalAxios from 'axios'; + +export const BASE_PATH = "https://jamesbillings67.com".replace(/\/+$/, ""); + +export const COLLECTION_FORMATS = { + csv: ",", + ssv: " ", + tsv: "\t", + pipes: "|", +}; + +export interface RequestArgs { + url: string; + options: RawAxiosRequestConfig; +} + +export class BaseAPI { + protected configuration: Configuration | undefined; + + constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) { + if (configuration) { + this.configuration = configuration; + this.basePath = configuration.basePath ?? basePath; + } + } +}; + +export class RequiredError extends Error { + constructor(public field: string, msg?: string) { + super(msg); + this.name = "RequiredError" + } +} + +interface ServerMap { + [key: string]: { + url: string, + description: string, + }[]; +} + +export const operationServerMap: ServerMap = { +} diff --git a/jb-ui/src/api_jb/common.ts b/jb-ui/src/api_jb/common.ts new file mode 100644 index 0000000..30b51fe --- /dev/null +++ b/jb-ui/src/api_jb/common.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { Configuration } from "./configuration"; +import type { RequestArgs } from "./base"; +import type { AxiosInstance, AxiosResponse } from 'axios'; +import { RequiredError } from "./base"; + +export const DUMMY_BASE_URL = 'https://example.com' + +/** + * + * @throws {RequiredError} + */ +export const assertParamExists = function (functionName: string, paramName: string, paramValue: unknown) { + if (paramValue === null || paramValue === undefined) { + throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`); + } +} + +export const setApiKeyToObject = async function (object: any, keyParamName: string, configuration?: Configuration) { + if (configuration && configuration.apiKey) { + const localVarApiKeyValue = typeof configuration.apiKey === 'function' + ? await configuration.apiKey(keyParamName) + : await configuration.apiKey; + object[keyParamName] = localVarApiKeyValue; + } +} + +export const setBasicAuthToObject = function (object: any, configuration?: Configuration) { + if (configuration && (configuration.username || configuration.password)) { + object["auth"] = { username: configuration.username, password: configuration.password }; + } +} + +export const setBearerAuthToObject = async function (object: any, configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const accessToken = typeof configuration.accessToken === 'function' + ? await configuration.accessToken() + : await configuration.accessToken; + object["Authorization"] = "Bearer " + accessToken; + } +} + +export const setOAuthToObject = async function (object: any, name: string, scopes: string[], configuration?: Configuration) { + if (configuration && configuration.accessToken) { + const localVarAccessTokenValue = typeof configuration.accessToken === 'function' + ? await configuration.accessToken(name, scopes) + : await configuration.accessToken; + object["Authorization"] = "Bearer " + localVarAccessTokenValue; + } +} + + +function setFlattenedQueryParams(urlSearchParams: URLSearchParams, parameter: any, key: string = ""): void { + if (parameter == null) return; + if (typeof parameter === "object") { + if (Array.isArray(parameter) || parameter instanceof Set) { + (parameter as any[]).forEach(item => setFlattenedQueryParams(urlSearchParams, item, key)); + } + else { + Object.keys(parameter).forEach(currentKey => + setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`) + ); + } + } + else { + if (urlSearchParams.has(key)) { + urlSearchParams.append(key, parameter); + } + else { + urlSearchParams.set(key, parameter); + } + } +} + +export const setSearchParams = function (url: URL, ...objects: any[]) { + const searchParams = new URLSearchParams(url.search); + setFlattenedQueryParams(searchParams, objects); + url.search = searchParams.toString(); +} + +/** + * JSON serialization helper function which replaces instances of unserializable types with serializable ones. + * This function will run for every key-value pair encountered by JSON.stringify while traversing an object. + * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required. + */ +// @ts-ignore +export const replaceWithSerializableTypeIfNeeded = function(key: string, value: any) { + if (value instanceof Set) { + return Array.from(value); + } else { + return value; + } +} + +export const serializeDataIfNeeded = function (value: any, requestOptions: any, configuration?: Configuration) { + const nonString = typeof value !== 'string'; + const needsSerialization = nonString && configuration && configuration.isJsonMime + ? configuration.isJsonMime(requestOptions.headers['Content-Type']) + : nonString; + return needsSerialization + ? JSON.stringify(value !== undefined ? value : {}, replaceWithSerializableTypeIfNeeded) + : (value || ""); +} + +export const toPathString = function (url: URL) { + return url.pathname + url.search + url.hash +} + +export const createRequestFunction = function (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) { + return <T = unknown, R = AxiosResponse<T>>(axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH): Promise<R> => { + const axiosRequestArgs = {...axiosArgs.options, url: (axios.defaults.baseURL ? '' : configuration?.basePath ?? basePath) + axiosArgs.url}; + return axios.request<T, R>(axiosRequestArgs) as Promise<R>; + }; +} diff --git a/jb-ui/src/api_jb/configuration.ts b/jb-ui/src/api_jb/configuration.ts new file mode 100644 index 0000000..e9555ba --- /dev/null +++ b/jb-ui/src/api_jb/configuration.ts @@ -0,0 +1,121 @@ +/* tslint:disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +interface AWSv4Configuration { + options?: { + region?: string + service?: string + } + credentials?: { + accessKeyId?: string + secretAccessKey?: string, + sessionToken?: string + } +} + +export interface ConfigurationParameters { + apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>); + username?: string; + password?: string; + accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>); + awsv4?: AWSv4Configuration; + basePath?: string; + serverIndex?: number; + baseOptions?: any; + formDataCtor?: new () => any; +} + +export class Configuration { + /** + * parameter for apiKey security + * @param name security name + */ + apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>); + /** + * parameter for basic security + */ + username?: string; + /** + * parameter for basic security + */ + password?: string; + /** + * parameter for oauth2 security + * @param name security name + * @param scopes oauth2 scope + */ + accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>); + /** + * parameter for aws4 signature security + * @param {Object} AWS4Signature - AWS4 Signature security + * @param {string} options.region - aws region + * @param {string} options.service - name of the service. + * @param {string} credentials.accessKeyId - aws access key id + * @param {string} credentials.secretAccessKey - aws access key + * @param {string} credentials.sessionToken - aws session token + * @memberof Configuration + */ + awsv4?: AWSv4Configuration; + /** + * override base path + */ + basePath?: string; + /** + * override server index + */ + serverIndex?: number; + /** + * base options for axios calls + */ + baseOptions?: any; + /** + * The FormData constructor that will be used to create multipart form data + * requests. You can inject this here so that execution environments that + * do not support the FormData class can still run the generated client. + * + * @type {new () => FormData} + */ + formDataCtor?: new () => any; + + constructor(param: ConfigurationParameters = {}) { + this.apiKey = param.apiKey; + this.username = param.username; + this.password = param.password; + this.accessToken = param.accessToken; + this.awsv4 = param.awsv4; + this.basePath = param.basePath; + this.serverIndex = param.serverIndex; + this.baseOptions = { + ...param.baseOptions, + headers: { + ...param.baseOptions?.headers, + }, + }; + this.formDataCtor = param.formDataCtor; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i; + return mime !== null && jsonMime.test(mime); + } +} diff --git a/jb-ui/src/api_jb/docs/APIApi.md b/jb-ui/src/api_jb/docs/APIApi.md new file mode 100644 index 0000000..50d5065 --- /dev/null +++ b/jb-ui/src/api_jb/docs/APIApi.md @@ -0,0 +1,97 @@ +# APIApi + +All URIs are relative to *https://jamesbillings67.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**workDirectWorkDirectGet**](#workdirectworkdirectget) | **GET** /work/direct/ | Work Direct| +|[**workWorkGet**](#workworkget) | **GET** /work/ | Work| + +# **workDirectWorkDirectGet** +> string workDirectWorkDirectGet() + +View for direct work (not on AMT). Makes sure user is authenticated. + +### Example + +```typescript +import { + APIApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new APIApi(configuration); + +const { status, data } = await apiInstance.workDirectWorkDirectGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**string** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **workWorkGet** +> string workWorkGet() + +HTML Page that the worker lands on in an iFrame. They can either be previewing the HIT, or have already accepted it. + +### Example + +```typescript +import { + APIApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new APIApi(configuration); + +const { status, data } = await apiInstance.workWorkGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**string** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: text/html + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/jb-ui/src/api_jb/docs/AccountLogin.md b/jb-ui/src/api_jb/docs/AccountLogin.md new file mode 100644 index 0000000..35e1404 --- /dev/null +++ b/jb-ui/src/api_jb/docs/AccountLogin.md @@ -0,0 +1,20 @@ +# AccountLogin + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [default to undefined] + +## Example + +```typescript +import { AccountLogin } from './api'; + +const instance: AccountLogin = { + email, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/AmtAccountLink.md b/jb-ui/src/api_jb/docs/AmtAccountLink.md new file mode 100644 index 0000000..58ced8b --- /dev/null +++ b/jb-ui/src/api_jb/docs/AmtAccountLink.md @@ -0,0 +1,22 @@ +# AmtAccountLink + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [default to undefined] +**amt_worker_id** | **string** | | [default to undefined] + +## Example + +```typescript +import { AmtAccountLink } from './api'; + +const instance: AmtAccountLink = { + email, + amt_worker_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/AuthApi.md b/jb-ui/src/api_jb/docs/AuthApi.md new file mode 100644 index 0000000..c483415 --- /dev/null +++ b/jb-ui/src/api_jb/docs/AuthApi.md @@ -0,0 +1,368 @@ +# AuthApi + +All URIs are relative to *https://jamesbillings67.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**deleteSessionAuthSessionDelete**](#deletesessionauthsessiondelete) | **DELETE** /auth/session/ | Delete Session| +|[**exchangeAmtAccountLinkAuthLinkAmtExchangePost**](#exchangeamtaccountlinkauthlinkamtexchangepost) | **POST** /auth/link-amt/exchange/ | Exchange Amt Account Link| +|[**exchangeMagicLinkAuthMagicLinkExchangePost**](#exchangemagiclinkauthmagiclinkexchangepost) | **POST** /auth/magic-link/exchange/ | Exchange Magic Link| +|[**getSessionAuthSessionGet**](#getsessionauthsessionget) | **GET** /auth/session/ | Get Session| +|[**inviteAmtAccountLinkAuthLinkAmtInvitePost**](#inviteamtaccountlinkauthlinkamtinvitepost) | **POST** /auth/link-amt/invite/ | Invite Amt Account Link| +|[**linkAmtAccountAuthLinkAmtRequestPost**](#linkamtaccountauthlinkamtrequestpost) | **POST** /auth/link-amt/request/ | Link Amt Account| +|[**requestMagicLinkAuthMagicLinkRequestPost**](#requestmagiclinkauthmagiclinkrequestpost) | **POST** /auth/magic-link/request/ | Request Magic Link| + +# **deleteSessionAuthSessionDelete** +> deleteSessionAuthSessionDelete() + + +### Example + +```typescript +import { + AuthApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +const { status, data } = await apiInstance.deleteSessionAuthSessionDelete(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: Not defined + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **exchangeAmtAccountLinkAuthLinkAmtExchangePost** +> exchangeAmtAccountLinkAuthLinkAmtExchangePost(magicLinkExchangeRequest) + +Validate the email link, then transition the bound AMT account. + +### Example + +```typescript +import { + AuthApi, + Configuration, + MagicLinkExchangeRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let magicLinkExchangeRequest: MagicLinkExchangeRequest; // + +const { status, data } = await apiInstance.exchangeAmtAccountLinkAuthLinkAmtExchangePost( + magicLinkExchangeRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **magicLinkExchangeRequest** | **MagicLinkExchangeRequest**| | | + + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **exchangeMagicLinkAuthMagicLinkExchangePost** +> exchangeMagicLinkAuthMagicLinkExchangePost(magicLinkExchangeRequest) + +Exchange a magic link only after its landing page makes an explicit POST. + +### Example + +```typescript +import { + AuthApi, + Configuration, + MagicLinkExchangeRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let magicLinkExchangeRequest: MagicLinkExchangeRequest; // + +const { status, data } = await apiInstance.exchangeMagicLinkAuthMagicLinkExchangePost( + magicLinkExchangeRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **magicLinkExchangeRequest** | **MagicLinkExchangeRequest**| | | + + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **getSessionAuthSessionGet** +> User getSessionAuthSessionGet() + + +### Example + +```typescript +import { + AuthApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +const { status, data } = await apiInstance.getSessionAuthSessionGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**User** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **inviteAmtAccountLinkAuthLinkAmtInvitePost** +> { [key: string]: string | null; } inviteAmtAccountLinkAuthLinkAmtInvitePost(amtAccountLink) + +Create a long-lived AMT account-link URL without sending an email. + +### Example + +```typescript +import { + AuthApi, + Configuration, + AmtAccountLink +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let amtAccountLink: AmtAccountLink; // +let authorization: string; // (optional) (default to undefined) + +const { status, data } = await apiInstance.inviteAmtAccountLinkAuthLinkAmtInvitePost( + amtAccountLink, + authorization +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **amtAccountLink** | **AmtAccountLink**| | | +| **authorization** | [**string**] | | (optional) defaults to undefined| + + +### Return type + +**{ [key: string]: string | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **linkAmtAccountAuthLinkAmtRequestPost** +> { [key: string]: string | null; } linkAmtAccountAuthLinkAmtRequestPost(amtAccountLink) + +Link an AMT account and login. + +### Example + +```typescript +import { + AuthApi, + Configuration, + AmtAccountLink +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let amtAccountLink: AmtAccountLink; // + +const { status, data } = await apiInstance.linkAmtAccountAuthLinkAmtRequestPost( + amtAccountLink +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **amtAccountLink** | **AmtAccountLink**| | | + + +### Return type + +**{ [key: string]: string | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **requestMagicLinkAuthMagicLinkRequestPost** +> { [key: string]: string | null; } requestMagicLinkAuthMagicLinkRequestPost(accountLogin) + +Create a magic link. + +### Example + +```typescript +import { + AuthApi, + Configuration, + AccountLogin +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new AuthApi(configuration); + +let accountLogin: AccountLogin; // + +const { status, data } = await apiInstance.requestMagicLinkAuthMagicLinkRequestPost( + accountLogin +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **accountLogin** | **AccountLogin**| | | + + +### Return type + +**{ [key: string]: string | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/jb-ui/src/api_jb/docs/CashoutConfirmation.md b/jb-ui/src/api_jb/docs/CashoutConfirmation.md new file mode 100644 index 0000000..19d0027 --- /dev/null +++ b/jb-ui/src/api_jb/docs/CashoutConfirmation.md @@ -0,0 +1,20 @@ +# CashoutConfirmation + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | | [default to undefined] + +## Example + +```typescript +import { CashoutConfirmation } from './api'; + +const instance: CashoutConfirmation = { + token, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/CashoutPostback.md b/jb-ui/src/api_jb/docs/CashoutPostback.md new file mode 100644 index 0000000..f090447 --- /dev/null +++ b/jb-ui/src/api_jb/docs/CashoutPostback.md @@ -0,0 +1,20 @@ +# CashoutPostback + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**cashout_id** | **string** | | [default to undefined] + +## Example + +```typescript +import { CashoutPostback } from './api'; + +const instance: CashoutPostback = { + cashout_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/CashoutRequest.md b/jb-ui/src/api_jb/docs/CashoutRequest.md new file mode 100644 index 0000000..1d63727 --- /dev/null +++ b/jb-ui/src/api_jb/docs/CashoutRequest.md @@ -0,0 +1,22 @@ +# CashoutRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**amount** | **number** | Amount in USD cents | [default to undefined] +**cashout_method_id** | **string** | Cashout method ID | [default to undefined] + +## Example + +```typescript +import { CashoutRequest } from './api'; + +const instance: CashoutRequest = { + amount, + cashout_method_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/CashoutRequestInfo.md b/jb-ui/src/api_jb/docs/CashoutRequestInfo.md new file mode 100644 index 0000000..fd3f0a3 --- /dev/null +++ b/jb-ui/src/api_jb/docs/CashoutRequestInfo.md @@ -0,0 +1,37 @@ +# CashoutRequestInfo + +See models.thl.payout: PayoutEvent. We\'ve confused a CashOut and a Payout. This is used only in the API response. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **string** | Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid. | [default to undefined] +**description** | **string** | This is the name of the cashout method. | [default to undefined] +**message** | **string** | | [optional] [default to undefined] +**status** | [**PayoutStatus**](PayoutStatus.md) | - `PENDING` = PENDING - `APPROVED` = APPROVED - `REJECTED` = REJECTED - `CANCELLED` = CANCELLED - `FAILED` = FAILED - `COMPLETE` = COMPLETE | [optional] [default to undefined] +**transaction_info** | **{ [key: string]: any; }** | | [optional] [default to undefined] +**product_id** | **string** | | [default to undefined] +**product_user_id** | **string** | | [default to undefined] +**payout_type** | [**PayoutType**](PayoutType.md) | - `PAYPAL` = PAYPAL - `TANGO` = TANGO - `TREMENDOUS` = TREMENDOUS - `DWOLLA` = DWOLLA - `ACH` = ACH - `WIRE` = WIRE - `CASH_IN_MAIL` = CASH_IN_MAIL - `PRIZE` = PRIZE - `AMT` = AMT - `AMT_BONUS` = AMT_BONUS - `AMT_ASSIGNMENT` = AMT_HIT | [default to undefined] +**amount** | **number** | The USDCent amount int. This cannot be 0 or negative | [default to undefined] + +## Example + +```typescript +import { CashoutRequestInfo } from './api'; + +const instance: CashoutRequestInfo = { + id, + description, + message, + status, + transaction_info, + product_id, + product_user_id, + payout_type, + amount, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/DefaultApi.md b/jb-ui/src/api_jb/docs/DefaultApi.md new file mode 100644 index 0000000..eb8cf7e --- /dev/null +++ b/jb-ui/src/api_jb/docs/DefaultApi.md @@ -0,0 +1,191 @@ +# DefaultApi + +All URIs are relative to *https://jamesbillings67.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**returnNothingFaviconIcoGet**](#returnnothingfaviconicoget) | **GET** /favicon.ico | Return Nothing| +|[**returnNothingRobotsTxtGet**](#returnnothingrobotstxtget) | **GET** /robots.txt | Return Nothing| +|[**returnNothingSitemapXmlGet**](#returnnothingsitemapxmlget) | **GET** /sitemap.xml | Return Nothing| +|[**serveReactAppFullPathGet**](#servereactappfullpathget) | **GET** /{full_path} | Serve React App| + +# **returnNothingFaviconIcoGet** +> { [key: string]: any | null; } returnNothingFaviconIcoGet() + + +### Example + +```typescript +import { + DefaultApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DefaultApi(configuration); + +const { status, data } = await apiInstance.returnNothingFaviconIcoGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: any | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **returnNothingRobotsTxtGet** +> { [key: string]: any | null; } returnNothingRobotsTxtGet() + + +### Example + +```typescript +import { + DefaultApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DefaultApi(configuration); + +const { status, data } = await apiInstance.returnNothingRobotsTxtGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: any | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **returnNothingSitemapXmlGet** +> { [key: string]: any | null; } returnNothingSitemapXmlGet() + + +### Example + +```typescript +import { + DefaultApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DefaultApi(configuration); + +const { status, data } = await apiInstance.returnNothingSitemapXmlGet(); +``` + +### Parameters +This endpoint does not have any parameters. + + +### Return type + +**{ [key: string]: any | null; }** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **serveReactAppFullPathGet** +> any serveReactAppFullPathGet() + + +### Example + +```typescript +import { + DefaultApi, + Configuration +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new DefaultApi(configuration); + +let fullPath: string; // (default to undefined) + +const { status, data } = await apiInstance.serveReactAppFullPathGet( + fullPath +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **fullPath** | [**string**] | | defaults to undefined| + + +### Return type + +**any** + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/jb-ui/src/api_jb/docs/HTTPValidationError.md b/jb-ui/src/api_jb/docs/HTTPValidationError.md new file mode 100644 index 0000000..7fe160d --- /dev/null +++ b/jb-ui/src/api_jb/docs/HTTPValidationError.md @@ -0,0 +1,20 @@ +# HTTPValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**detail** | [**Array<ValidationError>**](ValidationError.md) | | [optional] [default to undefined] + +## Example + +```typescript +import { HTTPValidationError } from './api'; + +const instance: HTTPValidationError = { + detail, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/LocationInner.md b/jb-ui/src/api_jb/docs/LocationInner.md new file mode 100644 index 0000000..5ef335b --- /dev/null +++ b/jb-ui/src/api_jb/docs/LocationInner.md @@ -0,0 +1,18 @@ +# LocationInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +## Example + +```typescript +import { LocationInner } from './api'; + +const instance: LocationInner = { +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/MagicLinkExchangeRequest.md b/jb-ui/src/api_jb/docs/MagicLinkExchangeRequest.md new file mode 100644 index 0000000..82d5b3f --- /dev/null +++ b/jb-ui/src/api_jb/docs/MagicLinkExchangeRequest.md @@ -0,0 +1,20 @@ +# MagicLinkExchangeRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**token** | **string** | | [default to undefined] + +## Example + +```typescript +import { MagicLinkExchangeRequest } from './api'; + +const instance: MagicLinkExchangeRequest = { + token, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/PayoutStatus.md b/jb-ui/src/api_jb/docs/PayoutStatus.md new file mode 100644 index 0000000..c3259a6 --- /dev/null +++ b/jb-ui/src/api_jb/docs/PayoutStatus.md @@ -0,0 +1,19 @@ +# PayoutStatus + +The max size of the db field that holds this value is 20, so please don\'t add new values longer than that! + +## Enum + +* `Pending` (value: `'PENDING'`) + +* `Approved` (value: `'APPROVED'`) + +* `Rejected` (value: `'REJECTED'`) + +* `Cancelled` (value: `'CANCELLED'`) + +* `Failed` (value: `'FAILED'`) + +* `Complete` (value: `'COMPLETE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/PayoutType.md b/jb-ui/src/api_jb/docs/PayoutType.md new file mode 100644 index 0000000..121e3cf --- /dev/null +++ b/jb-ui/src/api_jb/docs/PayoutType.md @@ -0,0 +1,31 @@ +# PayoutType + +The method in which the requested payout is delivered. + +## Enum + +* `Paypal` (value: `'PAYPAL'`) + +* `Tango` (value: `'TANGO'`) + +* `Tremendous` (value: `'TREMENDOUS'`) + +* `Dwolla` (value: `'DWOLLA'`) + +* `Ach` (value: `'ACH'`) + +* `Wire` (value: `'WIRE'`) + +* `CashInMail` (value: `'CASH_IN_MAIL'`) + +* `Prize` (value: `'PRIZE'`) + +* `Amt` (value: `'AMT'`) + +* `AmtBonus` (value: `'AMT_BONUS'`) + +* `AmtAssignment` (value: `'AMT_ASSIGNMENT'`) + +* `AmtAssignment2` (value: `'AMT_ASSIGNMENT'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/User.md b/jb-ui/src/api_jb/docs/User.md new file mode 100644 index 0000000..b35e0b7 --- /dev/null +++ b/jb-ui/src/api_jb/docs/User.md @@ -0,0 +1,27 @@ +# User + +A user that has been authenticated and exists in THL + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **string** | | [default to undefined] +**display_name** | **string** | | [optional] [default to undefined] +**blocked** | **boolean** | | [optional] [default to false] +**product_user_id** | **string** | | [readonly] [default to undefined] + +## Example + +```typescript +import { User } from './api'; + +const instance: User = { + email, + display_name, + blocked, + product_user_id, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/ValidationError.md b/jb-ui/src/api_jb/docs/ValidationError.md new file mode 100644 index 0000000..7ab752a --- /dev/null +++ b/jb-ui/src/api_jb/docs/ValidationError.md @@ -0,0 +1,24 @@ +# ValidationError + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**loc** | [**Array<LocationInner>**](LocationInner.md) | | [default to undefined] +**msg** | **string** | | [default to undefined] +**type** | **string** | | [default to undefined] + +## Example + +```typescript +import { ValidationError } from './api'; + +const instance: ValidationError = { + loc, + msg, + type, +}; +``` + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/jb-ui/src/api_jb/docs/WalletApi.md b/jb-ui/src/api_jb/docs/WalletApi.md new file mode 100644 index 0000000..4fd7389 --- /dev/null +++ b/jb-ui/src/api_jb/docs/WalletApi.md @@ -0,0 +1,167 @@ +# WalletApi + +All URIs are relative to *https://jamesbillings67.com* + +|Method | HTTP request | Description| +|------------- | ------------- | -------------| +|[**cashoutPostbackWalletCashoutPostbackPost**](#cashoutpostbackwalletcashoutpostbackpost) | **POST** /wallet/cashout/postback/ | Cashout Postback| +|[**confirmCashoutWalletCashoutConfirmPost**](#confirmcashoutwalletcashoutconfirmpost) | **POST** /wallet/cashout/confirm/ | Confirm Cashout| +|[**requestCashoutWalletCashoutRequestPost**](#requestcashoutwalletcashoutrequestpost) | **POST** /wallet/cashout/request/ | Request Cashout| + +# **cashoutPostbackWalletCashoutPostbackPost** +> cashoutPostbackWalletCashoutPostbackPost(cashoutPostback) + + +### Example + +```typescript +import { + WalletApi, + Configuration, + CashoutPostback +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new WalletApi(configuration); + +let cashoutPostback: CashoutPostback; // + +const { status, data } = await apiInstance.cashoutPostbackWalletCashoutPostbackPost( + cashoutPostback +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cashoutPostback** | **CashoutPostback**| | | + + +### Return type + +void (empty response body) + +### Authorization + +No authorization required + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**204** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **confirmCashoutWalletCashoutConfirmPost** +> CashoutRequestInfo confirmCashoutWalletCashoutConfirmPost(cashoutConfirmation) + + +### Example + +```typescript +import { + WalletApi, + Configuration, + CashoutConfirmation +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new WalletApi(configuration); + +let cashoutConfirmation: CashoutConfirmation; // + +const { status, data } = await apiInstance.confirmCashoutWalletCashoutConfirmPost( + cashoutConfirmation +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cashoutConfirmation** | **CashoutConfirmation**| | | + + +### Return type + +**CashoutRequestInfo** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **requestCashoutWalletCashoutRequestPost** +> { [key: string]: string | null; } requestCashoutWalletCashoutRequestPost(cashoutRequest) + +Email the authenticated user a link confirming the requested amount. + +### Example + +```typescript +import { + WalletApi, + Configuration, + CashoutRequest +} from './api'; + +const configuration = new Configuration(); +const apiInstance = new WalletApi(configuration); + +let cashoutRequest: CashoutRequest; // + +const { status, data } = await apiInstance.requestCashoutWalletCashoutRequestPost( + cashoutRequest +); +``` + +### Parameters + +|Name | Type | Description | Notes| +|------------- | ------------- | ------------- | -------------| +| **cashoutRequest** | **CashoutRequest**| | | + + +### Return type + +**{ [key: string]: string | null; }** + +### Authorization + +[HTTPBearer](../README.md#HTTPBearer) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +|**200** | Successful Response | - | +|**422** | Validation Error | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/jb-ui/src/api_jb/git_push.sh b/jb-ui/src/api_jb/git_push.sh new file mode 100644 index 0000000..a35991c --- /dev/null +++ b/jb-ui/src/api_jb/git_push.sh @@ -0,0 +1,54 @@ +#!/bin/sh +# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ +# +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" + +git_user_id=$1 +git_repo_id=$2 +release_note=$3 +git_host=$4 + +if [ -z "${git_host}" ]; then + git_host="github.com" + echo "[INFO] No command line input provided. Set \${git_host} to ${git_host}" +fi + +if [ -z "${git_user_id}" ]; then + git_user_id="GIT_USER_ID" + echo "[INFO] No command line input provided. Set \${git_user_id} to ${git_user_id}" +fi + +if [ -z "${git_repo_id}" ]; then + git_repo_id="GIT_REPO_ID" + echo "[INFO] No command line input provided. Set \${git_repo_id} to ${git_repo_id}" +fi + +if [ -z "${release_note}" ]; then + release_note="Minor update" + echo "[INFO] No command line input provided. Set \${release_note} to ${release_note}" +fi + +# Initialize the local directory as a Git repository +git init + +# Adds the files in the local repository and stages them for commit. +git add . + +# Commits the tracked changes and prepares them to be pushed to a remote repository. +git commit -m "${release_note}" + +# Sets the new remote +if [ -z "$(git remote)" ]; then # git remote not defined + if [ -z "${GIT_TOKEN:-}" ]; then + echo "[INFO] \${GIT_TOKEN} (environment variable) is not set. Using the git credential in your environment." + git remote add origin "https://${git_host}/${git_user_id}/${git_repo_id}.git" + else + git remote add origin "https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git" + fi +fi + +git pull origin master + +# Pushes (Forces) the changes in the local repository up to the remote repository +echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" +git push origin master 2>&1 | grep -v 'To https' diff --git a/jb-ui/src/api_jb/index.ts b/jb-ui/src/api_jb/index.ts new file mode 100644 index 0000000..5ec9b6e --- /dev/null +++ b/jb-ui/src/api_jb/index.ts @@ -0,0 +1,18 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * jb + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export * from "./api"; +export * from "./configuration"; + diff --git a/jb-ui/src/api_jb/openapi.json b/jb-ui/src/api_jb/openapi.json new file mode 100644 index 0000000..6133ec2 --- /dev/null +++ b/jb-ui/src/api_jb/openapi.json @@ -0,0 +1 @@ +{"openapi":"3.1.0","info":{"title":"jb","version":"1.0.0"},"servers":[{"url":"https://jamesbillings67.com/","description":"Production environment"}],"paths":{"/work/":{"get":{"tags":["API"],"summary":"Work","description":"HTML Page that the worker lands on in an iFrame.\nThey can either be previewing the HIT, or have already accepted it.","operationId":"work_work__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}}}},"/work/direct/":{"get":{"tags":["API"],"summary":"Work Direct","description":"View for direct work (not on AMT).\nMakes sure user is authenticated.","operationId":"work_direct_work_direct__get","responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}}},"security":[{"HTTPBearer":[]}]}},"/auth/magic-link/request/":{"post":{"tags":["Auth"],"summary":"Request Magic Link","description":"Create a magic link.","operationId":"request_magic_link_auth_magic_link_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Request Magic Link Auth Magic Link Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/magic-link/exchange/":{"post":{"tags":["Auth"],"summary":"Exchange Magic Link","description":"Exchange a magic link only after its landing page makes an explicit POST.","operationId":"exchange_magic_link_auth_magic_link_exchange__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkExchangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/request/":{"post":{"tags":["Auth"],"summary":"Link Amt Account","description":"Link an AMT account and login.","operationId":"link_amt_account_auth_link_amt_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmtAccountLink"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Link Amt Account Auth Link Amt Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/invite/":{"post":{"tags":["Auth"],"summary":"Invite Amt Account Link","description":"Create a long-lived AMT account-link URL without sending an email.","operationId":"invite_amt_account_link_auth_link_amt_invite__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmtAccountLink"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Invite Amt Account Link Auth Link Amt Invite Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/link-amt/exchange/":{"post":{"tags":["Auth"],"summary":"Exchange Amt Account Link","description":"Validate the email link, then transition the bound AMT account.","operationId":"exchange_amt_account_link_auth_link_amt_exchange__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagicLinkExchangeRequest"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/auth/session/":{"get":{"tags":["Auth"],"summary":"Get Session","operationId":"get_session_auth_session__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}},"security":[{"HTTPBearer":[]}]},"delete":{"tags":["Auth"],"summary":"Delete Session","operationId":"delete_session_auth_session__delete","responses":{"204":{"description":"Successful Response"}}}},"/wallet/cashout/request/":{"post":{"tags":["Wallet"],"summary":"Request Cashout","description":"Email the authenticated user a link confirming the requested amount.","operationId":"request_cashout_wallet_cashout_request__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Request Cashout Wallet Cashout Request Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/wallet/cashout/confirm/":{"post":{"tags":["Wallet"],"summary":"Confirm Cashout","operationId":"confirm_cashout_wallet_cashout_confirm__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutConfirmation"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutRequestInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/wallet/cashout/postback/":{"post":{"tags":["Wallet"],"summary":"Cashout Postback","operationId":"cashout_postback_wallet_cashout_postback__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutPostback"}}},"required":true},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/favicon.ico":{"get":{"summary":"Return Nothing","operationId":"return_nothing_favicon_ico_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Favicon Ico Get"}}}}}}},"/sitemap.xml":{"get":{"summary":"Return Nothing","operationId":"return_nothing_sitemap_xml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Sitemap Xml Get"}}}}}}},"/robots.txt":{"get":{"summary":"Return Nothing","operationId":"return_nothing_robots_txt_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Return Nothing Robots Txt Get"}}}}}}},"/{full_path}":{"get":{"summary":"Serve React App","operationId":"serve_react_app__full_path__get","parameters":[{"name":"full_path","in":"path","required":true,"schema":{"type":"string","title":"Full Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"AccountLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"AccountLogin"},"AmtAccountLink":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"amt_worker_id":{"type":"string","maxLength":50,"minLength":3,"title":"Amt Worker Id"}},"additionalProperties":false,"type":"object","required":["email","amt_worker_id"],"title":"AmtAccountLink"},"CashoutConfirmation":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"CashoutConfirmation"},"CashoutPostback":{"properties":{"cashout_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Id"}},"additionalProperties":false,"type":"object","required":["cashout_id"],"title":"CashoutPostback"},"CashoutRequest":{"properties":{"amount":{"type":"integer","minimum":0.0,"title":"Amount","description":"Amount in USD cents","gt":0,"le":10000},"cashout_method_id":{"type":"string","maxLength":32,"minLength":32,"title":"Cashout Method Id","description":"Cashout method ID"}},"additionalProperties":false,"type":"object","required":["amount","cashout_method_id"],"title":"CashoutRequest"},"CashoutRequestInfo":{"properties":{"id":{"anyOf":[{"type":"string","maxLength":32,"minLength":32},{"type":"null"}],"title":"Id","description":"Unique ID for this cashout. This may be NULL if the status is REJECTED or FAILED, which may happen if the request is invalid.","examples":["3ceb847aaf9f40f4bd15b2b5e083abf6"]},"description":{"type":"string","title":"Description","description":"This is the name of the cashout method.","examples":["Visa® Prepaid Card USD"]},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"status":{"anyOf":[{"$ref":"#/components/schemas/PayoutStatus"},{"type":"null"}],"description":" - `PENDING` = PENDING\n - `APPROVED` = APPROVED\n - `REJECTED` = REJECTED\n - `CANCELLED` = CANCELLED\n - `FAILED` = FAILED\n - `COMPLETE` = COMPLETE","default":"PENDING","examples":["PENDING"]},"transaction_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Transaction Info"},"product_id":{"type":"string","maxLength":32,"minLength":32,"title":"Product Id"},"product_user_id":{"type":"string","maxLength":128,"minLength":3,"title":"Product User Id"},"payout_type":{"$ref":"#/components/schemas/PayoutType","description":" - `PAYPAL` = PAYPAL\n - `TANGO` = TANGO\n - `TREMENDOUS` = TREMENDOUS\n - `DWOLLA` = DWOLLA\n - `ACH` = ACH\n - `WIRE` = WIRE\n - `CASH_IN_MAIL` = CASH_IN_MAIL\n - `PRIZE` = PRIZE\n - `AMT` = AMT\n - `AMT_BONUS` = AMT_BONUS\n - `AMT_ASSIGNMENT` = AMT_HIT","examples":["ACH"]},"amount":{"type":"integer","exclusiveMaximum":9.223372036854776e+18,"exclusiveMinimum":0.0,"title":"Amount","description":"The USDCent amount int. This cannot be 0 or negative","examples":[531]}},"type":"object","required":["id","description","product_id","product_user_id","payout_type","amount"],"title":"CashoutRequestInfo","description":"See models.thl.payout: PayoutEvent. We've confused a CashOut and a\nPayout. This is used only in the API response."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"MagicLinkExchangeRequest":{"properties":{"token":{"type":"string","minLength":1,"title":"Token"}},"additionalProperties":false,"type":"object","required":["token"],"title":"MagicLinkExchangeRequest"},"PayoutStatus":{"type":"string","enum":["PENDING","APPROVED","REJECTED","CANCELLED","FAILED","COMPLETE"],"title":"PayoutStatus","description":"The max size of the db field that holds this value is 20, so please\ndon't add new values longer than that!"},"PayoutType":{"type":"string","enum":["PAYPAL","TANGO","TREMENDOUS","DWOLLA","ACH","WIRE","CASH_IN_MAIL","PRIZE","AMT","AMT_BONUS","AMT_ASSIGNMENT","AMT_ASSIGNMENT"],"title":"PayoutType","description":"The method in which the requested payout is delivered."},"User":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"blocked":{"type":"boolean","title":"Blocked","default":false},"product_user_id":{"type":"string","title":"Product User Id","readOnly":true}},"type":"object","required":["email","product_user_id"],"title":"User","description":"A user that has been authenticated and exists in THL"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}
\ No newline at end of file diff --git a/jb-ui/src/api_jb/openapitools.json b/jb-ui/src/api_jb/openapitools.json new file mode 100644 index 0000000..8dd0d74 --- /dev/null +++ b/jb-ui/src/api_jb/openapitools.json @@ -0,0 +1,7 @@ +{ + "$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json", + "spaces": 2, + "generator-cli": { + "version": "7.25.0" + } +} diff --git a/jb-ui/src/components/Redemption.tsx b/jb-ui/src/components/Redemption.tsx index 1d76f17..2d0380e 100644 --- a/jb-ui/src/components/Redemption.tsx +++ b/jb-ui/src/components/Redemption.tsx @@ -1,42 +1,990 @@ import { clsx } from "clsx"; -import { useState } from "react"; -// import { useSelector } from "react-redux"; -// import { cashoutMethodsSelectors } from "@/models/cashoutMethodsSlice"; +import { + bpid, + formatCentsToUSD, + truncate, + stripPriceFromTitle, +} from "@/lib/utils"; +import moment from "moment"; +import { useAppDispatch, useAppSelector } from "@/hooks"; +import { useState, useEffect } from "react"; +import { useGetMeQuery } from "@/models/authAPI"; +import { + CashoutMethodOut, + CashoutMethodsResponse, + WalletApi, + CashoutRequestResponse, + CashoutRequestSummary, +} from "@/api_fsb"; +import { WalletApi as JBApi, CashoutRequest } from "@/api_jb"; +import { List, IdCard, PackageCheck } from "lucide-react"; +import { + addCashoutMethods, + selectAllCashoutMethods, +} from "@/models/cashoutMethodsSlice"; +import { setCmSelected, setCmShowHistory } from "@/models/appSlice"; +import { + createColumnHelper, + getCoreRowModel, + getPaginationRowModel, + useReactTable, + getFilteredRowModel, + getSortedRowModel, + flexRender, + RowSelectionState, + FilterFn, +} from "@tanstack/react-table"; +import { useSelector } from "react-redux"; +import type { Row } from "@tanstack/react-table"; + +import { useGetUserCashoutsQuery } from "@/models/cashoutRequests"; const RedemptionHeader = () => { - // const cashout_methods = useSelector(cashoutMethodsSelectors.selectAll); + const userCashoutMethods = useSelector(selectAllCashoutMethods) || []; return ( <> <h2 className="text-xs font-mono font-bold p-0 m-0"> - {/* {cashout_methods.length} Redemption Methods */} - 30+ Redemption Methods + {userCashoutMethods.length} + {userCashoutMethods.length != null ? "+" : ""} Redemption Methods </h2> </> ); }; -const RedemptionModalBody = () => { +interface CashoutMethodListItemDescriptionProps { + description?: string; +} + +function CashoutMethodListItemDescription({ + description, +}: CashoutMethodListItemDescriptionProps) { + return ( + <div + className=" + text-[8px] text-left + bg-blue-600 + max-h-24 overflow-y-auto + [&::-webkit-scrollbar]:h-1 + [&::-webkit-scrollbar]:w-1 + [&::-webkit-scrollbar-track]:bg-blue-100 + [&::-webkit-scrollbar-thumb]:bg-blue-300 + " + dangerouslySetInnerHTML={{ __html: description! }} + /> + ); +} + +interface CashoutMethodListItemProps { + row: Row<CashoutMethodOut>; +} + +interface CashoutMethodItemAmountProps { + cm: CashoutMethodOut; +} + +const CashoutMethodItemAmount = ({ cm }: CashoutMethodItemAmountProps) => { + const cardRange = cm.min_value !== cm.max_value; + + if (cardRange) { + return ( + <> + <div className="label text-left">Min Amount:</div> + <div className="value text-right"> + {formatCentsToUSD(cm.min_value_usd || 0)} + </div> + + <div className="label text-left">Max Amount:</div> + <div className="value text-right"> + {formatCentsToUSD(cm.max_value_usd || 0)} + </div> + </> + ); + } else { + return ( + <> + <div className="label text-left">Amount:</div> + <div className="value text-right"> + {formatCentsToUSD(cm.min_value_usd || 0)} + </div> + </> + ); + } +}; + +function CashoutMethodListItem({ row }: CashoutMethodListItemProps) { + const [showDescription, setShowDescription] = useState(false); + + return ( + <div + key={row.original.id} + className={clsx( + "transition-colors my-1", + row.getIsSelected() ? "border-red-500" : "border-blue-50", + )} + > + <div + className="cm-item-body grid grid-cols-2 px-2" + style={{ + gap: 2, + padding: 2, + }} + > + <div> + <h2 + className="cm-item-head text-xs font-semibold rounded flex justify-between + py-1 px-0" + > + {stripPriceFromTitle(row.original.name)} + </h2> + <div + className="grid grid-cols-[auto_1fr] + text-xs font-mono + px-2" + > + <CashoutMethodItemAmount cm={row.original} /> + </div> + + <button + className="cursor-pointer + text-blue-200 text-sm px-3 py-1/2 + + bg-blue-600 + hover:bg-blue-700 hover:text-blue-50 hover:border-transparent + rounded + " + onClick={() => row.toggleSelected()} + > + Redeem + </button> + </div> + + <div + className="group relative inline-flex items-center justify-center + p-3 rounded-sm + bg-gradient-from-center + transition-all duration-300 + " + > + {/* animated glow blob behind the image */} + <div + className=" + absolute inset-0 rounded-2xl + opacity-0 group-hover:opacity-20 + blur-xl transition-opacity duration-300" + /> + + <img + src={row.original.image_url!} + alt={row.original.name} + style={{ height: 60 }} + className="relative z-10 drop-shadow-md + text-center align-middle + group-hover:drop-shadow-lg transition-all duration-300 group-hover:scale-105" + /> + </div> + </div> + + {/* Not every CashoutMethod has a Description */} + {row.original.description && ( + <div + className="cm-item-bottom + m-2 px-2 py-1 + bg-blue-600" + > + <p + className=" + text-[8px] font-semibold + cursor-pointer text-right + hover:underline" + onClick={() => setShowDescription(!showDescription)} + > + Show Description + </p> + + {showDescription && ( + <CashoutMethodListItemDescription + description={row.original.description} + /> + )} + </div> + )} + </div> + ); +} + +interface CashoutAmountInputProps { + reqAmount: number; // cents + setRequestAmount: (cents: number) => void; + maxCents: number; // max withdrawable, in cents +} + +const RedemptionDetailAmountEnter = ({ + reqAmount, + setRequestAmount, + maxCents, +}: CashoutAmountInputProps) => { + // Local text state so users can type freely (e.g. "12.", "0.5") + // without fighting a reformatted value every keystroke. + const [displayValue, setDisplayValue] = useState( + reqAmount ? (reqAmount / 100).toString() : "", + ); + + const overLimit = reqAmount > maxCents; + + const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => { + const raw = e.target.value; + + // Allow only digits and a single decimal point with up to 2 decimals + if (!/^\d*\.?\d{0,2}$/.test(raw)) return; + + setDisplayValue(raw); + + const dollars = parseFloat(raw); + setRequestAmount(isNaN(dollars) ? 0 : Math.round(dollars * 100)); + }; + return ( - <div className="grid grid-cols-[auto_1fr] text-xs"> - <div className="label text-center p-2"> - Paypal, Visa, Giftcards will be available. Finishing processing the - transfer from Amazon. + <div className="px-4 "> + <label + className=" + flex items-center + text-xs text-blue-50 border-b + " + htmlFor="amount-input" + > + Amount:{" "} + </label> + + <div className="flex items-left gap-2 min-w-0"> + <span>$</span> + <input + id="amount-input" + className="flex-1 min-w-0 w-full" + type="text" + inputMode="decimal" + value={displayValue} + onChange={handleChange} + placeholder="0.00" + aria-invalid={overLimit} + /> </div> + + {!overLimit && ( + <div className="text-[8px] text-emerald-50"> + Max: ${(maxCents / 100).toFixed(2)} + </div> + )} + + {overLimit && ( + <div + role="alert" + className=" + text-red-400 text-[8px] + font-semibold + " + > + Amount exceeds your available balance of $ + {(maxCents / 100).toFixed(2)}. + </div> + )} </div> ); }; +const RedemptionDetails = () => { + // res = session.post(JB_BASE_URL + 'wallet/cashout/request/', json={ + // 'amount': 10_00, + // 'cashout_method_id': paypal_cm['id'], + // }) + // res.raise_for_status() + // print(res.json()) + const selected = useAppSelector((state) => state.app.cmSelected); + if (!selected) return null; + const dispatch = useAppDispatch(); + + const [reqAmount, setRequestAmount] = useState(selected.min_value); + const [errorMsg, setErrorMesg] = useState(""); + + const { data: user } = useGetMeQuery(); + if (!user?.product_user_id) return; + + const submitCashOut = () => { + const ccr = { + cashout_method_id: selected.id, + amount: reqAmount, + } as CashoutRequest; + + // const config = new Configuration({ basePath: "http://localhost:5174" }); + new JBApi() + .requestCashoutWalletCashoutRequestPost(ccr) + .then(() => { + // TODO: will `res.data.cashout_method` & `res.data.confirmation_link` + // TODO: always be available in this response? + dispatch(setCmSelected(undefined)); + dispatch(setCmShowHistory(true)); + }) + .catch((err) => { + console.log("ERR", err); + const response = err?.response?.data as + | CashoutRequestResponse + | undefined; + setErrorMesg(response?.msg ?? err.message); + }); + }; + + return ( + <> + <div> + <h2 className="text-center cm-item-head text-sm font-semibold py-1"> + {selected.type === "PAYPAL" + ? `${selected.name} (${selected.ext_id})` + : selected.name} + </h2> + </div> + + <div + className=" + cm-item-body grid grid-cols-2 + border-b border-blue-900 + py-2 + " + > + <RedemptionDetailAmountEnter + reqAmount={reqAmount} + setRequestAmount={setRequestAmount} + maxCents={selected.max_value} + /> + + <div className="flex items-center "> + <button + className=" + flex items-center + px-4 py-1 font-semibold text-white bg-blue-600 + cursor-pointer + rounded-lg shadow-md hover:bg-blue-700" + onClick={submitCashOut} + > + Submit + </button> + </div> + </div> + + {errorMsg && ( + <div + className=" + font-mono text-xs + py-1 bg-orange-700 text-red-200" + > + <h3>{errorMsg}</h3> + </div> + )} + + <div className=""> + <p + className=" + text-[8px] white-blue-200 font-mono + px-6 py-1 + " + > + You will recieve an email with confirmation deatils when requesting + the Cashout Method + </p> + </div> + + <div + className="group relative inline-flex items-center justify-center + p-3 rounded-sm + bg-gradient-from-center + transition-all duration-300 + " + > + {/* animated glow blob behind the image */} + <div + className=" + absolute inset-0 rounded-2xl + opacity-0 group-hover:opacity-20 + blur-xl transition-opacity duration-300" + /> + + <img + src={selected.image_url!} + alt={selected.name} + style={{ height: 120 }} + className="relative z-10 drop-shadow-md + text-center align-middle + group-hover:drop-shadow-lg transition-all duration-300 group-hover:scale-105" + /> + </div> + + <div + className="cm-item-bottom + m-2 px-2 py-1 + bg-blue-600" + > + <CashoutMethodListItemDescription description={selected.description} /> + </div> + </> + ); +}; + +const RedemptionBrowser = () => { + // Don't show the browser if a CashoutMethod is already selected + const selected = useAppSelector((state) => state.app.cmSelected); + if (selected) return; + + const dispatch = useAppDispatch(); + const userCashoutMethods = useSelector(selectAllCashoutMethods); + + const [rowSelection, setRowSelection] = useState<RowSelectionState>({}); + const [globalFilter, setGlobalFilter] = useState("CASH"); + const [pagination, setPagination] = useState({ + pageIndex: 0, + pageSize: 10, + }); + + const { data: user } = useGetMeQuery(); + + useEffect(() => { + if (!user?.product_user_id) return; + + new WalletApi() + .getCashoutMethodsProductIdCashoutMethodsGet(bpid, user.product_user_id) + .then((res) => { + const response = res.data as CashoutMethodsResponse; + dispatch(addCashoutMethods(response.cashout_methods)); + }); + }, [bpid, user?.product_user_id]); + + const columnHelper = createColumnHelper<CashoutMethodOut>(); + const columns = [ + columnHelper.accessor("name", { + header: () => "Name", + }), + columnHelper.accessor("image_url", { + header: () => "Image", + }), + columnHelper.accessor("description", { + header: () => "Desc", + }), + ]; + + useEffect(() => { + const selectedRows = table + .getSelectedRowModel() + .rows.map((r) => r.original); + const cm = selectedRows[0] as CashoutMethodOut; + dispatch(setCmSelected(cm)); + }, [rowSelection]); + + const categoryFilter: FilterFn<CashoutMethodOut> = ( + row, + _columnId, + filterValue, + ) => row.original.category === filterValue; + + const table = useReactTable({ + data: userCashoutMethods || [], + columns: columns, + getCoreRowModel: getCoreRowModel(), + getRowId: (row) => row.id, + + enableRowSelection: true, + enableMultiRowSelection: false, + + state: { + pagination, + rowSelection, + globalFilter, + }, + + onPaginationChange: setPagination, + onRowSelectionChange: setRowSelection, + globalFilterFn: categoryFilter, + onGlobalFilterChange: setGlobalFilter, + getPaginationRowModel: getPaginationRowModel(), + getSortedRowModel: getSortedRowModel(), + getFilteredRowModel: getFilteredRowModel(), + }); + + return ( + <div> + <div + className=" + flex justify-center items-center + gap-2 my-2" + > + <div + className={clsx( + "rounded-md", + "bg-blue-600 hover:bg-blue-700", + "py-0.5 px-2.5", + "font-mono text-[8px]", + "text-white cursor-pointer", + globalFilter == "CASH" ? "bg-blue-800" : "bg-blue-600", + )} + onClick={() => setGlobalFilter("CASH")} + > + Cash + </div> + + <div + className=" + rounded-md + bg-blue-700 hover:bg-blue-800 + py-0.5 px-2 + font-mono text-[8px] + text-white cursor-not-allowed" + // onClick={() => setGlobalFilter("GIFT_CARD")} + > + Gift Card + </div> + </div> + + <div + className=" + max-h-96 overflow-y-auto + [&::-webkit-scrollbar]:h-1 + [&::-webkit-scrollbar]:w-1 + [&::-webkit-scrollbar-track]:bg-blue-100 + [&::-webkit-scrollbar-thumb]:bg-blue-300 + " + > + {table.getRowModel().rows.map((row) => ( + <CashoutMethodListItem + key={row.original.id} + row={row} + // setRowSelection={setRowSelection} + /> + ))} + </div> + + <div + className=" + px-2 py-1 + flex items-center justify-between text-xs" + > + {/* Page info */} + <div className="text-blue-50"> + Page {table.getState().pagination.pageIndex + 1} of{" "} + {table.getPageCount()} + </div> + + {/* Navigation buttons */} + <div className="flex gap-8 text-xs"> + <button + onClick={() => table.previousPage()} + disabled={!table.getCanPreviousPage()} + className="px-3 py-1 border border-blue-200 rounded + font-variant-emoji-text + hover:cursor-pointer hover:bg-blue-700 + disabled:opacity-50 disabled:cursor-not-allowed" + > + {"⬅\uFE0E"} + </button> + <button + onClick={() => table.nextPage()} + disabled={!table.getCanNextPage()} + className="px-3 py-1 border border-blue-200 rounded + font-variant-emoji-text + hover:cursor-pointer hover:bg-blue-700 + disabled:opacity-50 disabled:cursor-not-allowed" + > + {"⮕\uFE0E"} + </button> + </div> + + {/* Page size selector */} + <select + value={table.getState().pagination.pageSize} + onChange={(e) => table.setPageSize(Number(e.target.value))} + className="px-2 py-1 border border-blue-200 rounded + hover:cursor-pointer hover:bg-blue-700" + > + {[10, 20, 30, 40].map((pageSize) => ( + <option key={pageSize} value={pageSize}> + Show {pageSize} + </option> + ))} + </select> + </div> + </div> + ); +}; + +const RedemptionModalSteps = () => { + const dispatch = useAppDispatch(); + const selected = useAppSelector((state) => state.app.cmSelected); + const showHistory = useAppSelector((state) => state.app.cmShowHistory); + + return ( + <div + className=" + flex justify-center items-center + border-b border-blue-700 + " + > + <ol + className=" + flex items-center w-1/2 + my-1 + " + > + <li + className={clsx( + "flex w-full items-center cursor-pointer", + "hover:text-blue-50", + !selected ? "text-white" : "text-blue-200", + )} + onClick={() => { + dispatch(setCmSelected(undefined)); + dispatch(setCmShowHistory(false)); + }} + > + <span + className=" + flex items-center justify-center + w-6 h-6 + " + > + <List /> + </span> + </li> + + <li + className={clsx( + "flex w-full items-center", + selected ? "text-white" : "text-blue-400 cursor-not-allowed", + )} + > + <span + className=" + flex items-center justify-center + w-6 h-6 + " + > + <IdCard /> + </span> + </li> + + <li + className={clsx( + "flex items-center", + showHistory ? "text-white" : "text-blue-400", + )} + onClick={() => { + dispatch(setCmSelected(undefined)); + dispatch(setCmShowHistory(true)); + }} + > + <span + className=" + flex items-center justify-center + w-6 h-6 + ml-8 + hover:text-white cursor-pointer + " + > + <PackageCheck /> + </span> + </li> + </ol> + </div> + ); +}; + +const RedemptionHistory = () => { + const { data: user } = useGetMeQuery(); + if (!user?.product_user_id) return; + + const { data: cashout_requests } = useGetUserCashoutsQuery( + { bpid, productUserId: user.product_user_id }, + { skip: !user.product_user_id }, + ); + + // --- Table work now --- + + // const [rowSelection, setRowSelection] = useState<RowSelectionState>({}); + const [globalFilter, setGlobalFilter] = useState(""); + // const [pagination, setPagination] = useState({ + // pageIndex: 0, + // pageSize: 10, + // }); + + const columnHelper = createColumnHelper<CashoutRequestSummary>(); + const columns = [ + columnHelper.accessor("created", { + header: () => "Created", + cell: (info) => moment(info.getValue()).format("M/D/YY"), + size: 60, + meta: { + align: "left", + }, + }), + columnHelper.accessor("description", { + header: () => "Description", + cell: (info) => truncate(info.getValue(), 12), + size: 100, + meta: { + align: "left", + }, + }), + columnHelper.accessor("amount", { + header: () => "Amount", + cell: (info) => formatCentsToUSD(info.getValue()), + size: 80, + meta: { + align: "center", + }, + }), + columnHelper.accessor("status", { + header: () => "Status", + cell: (props) => { + const desc = props.getValue(); + switch (desc) { + case "PENDING": + return "Pending 🤞"; + + case "APPROVED": + return "Approved 👍"; + + case "REJECTED": + return "Rejected 🚫"; + + case "CANCELLED": + return "Cancelled 🚫"; + + case "FAILED": + return "Failed ❌"; + + case "COMPLETE": + return "Complete ✅"; + + default: + return desc; + } + }, + size: 80, + meta: { + align: "left", + }, + }), + ]; + + let table = useReactTable({ + data: cashout_requests || [], + columns: columns, + getCoreRowModel: getCoreRowModel(), + getRowId: (row) => row.id, + + // enableRowSelection: true, + // enableMultiRowSelection: false, + state: { + // pagination, + // rowSelection, + globalFilter, + }, + // onPaginationChange: setPagination, + // onRowSelectionChange: setRowSelection, + onGlobalFilterChange: setGlobalFilter, + getPaginationRowModel: getPaginationRowModel(), + getSortedRowModel: getSortedRowModel(), + getFilteredRowModel: getFilteredRowModel(), + }); + const STATUSES = ["PENDING", "APPROVED", "REJECTED", "COMPLETE"]; + + return ( + <div> + <div + className=" + flex justify-center items-center + gap-2 my-2" + > + {STATUSES.map((status) => { + const isActive = globalFilter === status; + + return ( + <div + key={status} + className={clsx( + "rounded-md", + "py-0.5 px-2.5", + "font-mono text-[8px]", + "text-white cursor-pointer", + isActive ? "bg-blue-800" : "bg-blue-600 hover:bg-blue-700", + )} + onClick={() => setGlobalFilter(status)} + > + {status} + </div> + ); + })} + </div> + + <div className="w-full border-t border-blue-800 p-2"> + <table className="text-xs table-fixed border-collapse"> + <thead className="font-bold"> + {table.getHeaderGroups().map((headerGroup) => ( + <tr key={headerGroup.id}> + {headerGroup.headers.map((header) => { + const align = header.column.columnDef.meta?.align || "left"; + const alignClass = + align === "center" + ? "text-center" + : align === "right" + ? "text-right" + : "text-left"; + + return ( + <th + key={header.id} + className={`p-0 m-0 ${alignClass}`} + style={{ + width: `${header.column.getSize()}px`, + }} + > + {flexRender( + header.column.columnDef.header, + header.getContext(), + )} + </th> + ); + })} + </tr> + ))} + </thead> + <tbody> + {table.getRowModel().rows.map((row) => ( + <tr key={row.id}> + {row.getVisibleCells().map((cell) => { + const align = cell.column.columnDef.meta?.align || "left"; + const alignClass = + align === "center" + ? "text-center" + : align === "right" + ? "text-right" + : "text-left"; + + return ( + <td + key={cell.id} + className={`p-0 ${alignClass}`} + style={{ + width: `${cell.column.getSize()}px`, + }} + > + {flexRender( + cell.column.columnDef.cell, + cell.getContext(), + )} + </td> + ); + })} + </tr> + ))} + </tbody> + + <tfoot> + <tr> + <td colSpan={columns.length} className="p-2"> + <div className="flex items-center justify-between text-xs"> + {/* Page info */} + <div className="text-blue-50"> + Page {table.getState().pagination.pageIndex + 1} of{" "} + {table.getPageCount()} + </div> + + {/* Navigation buttons */} + <div className="flex gap-8 text-xs"> + <button + onClick={() => table.previousPage()} + disabled={!table.getCanPreviousPage()} + className="px-3 py-1 border border-blue-200 rounded + font-variant-emoji-text + hover:cursor-pointer hover:bg-blue-700 + disabled:opacity-50 disabled:cursor-not-allowed" + > + {"⬅\uFE0E"} + </button> + <button + onClick={() => table.nextPage()} + disabled={!table.getCanNextPage()} + className="px-3 py-1 border border-blue-200 rounded + font-variant-emoji-text + hover:cursor-pointer hover:bg-blue-700 + disabled:opacity-50 disabled:cursor-not-allowed" + > + {"⮕\uFE0E"} + </button> + </div> + + {/* Page size selector */} + <select + value={table.getState().pagination.pageSize} + onChange={(e) => table.setPageSize(Number(e.target.value))} + className="px-2 py-1 border border-blue-200 rounded + hover:cursor-pointer hover:bg-blue-700" + > + {[10, 20, 30, 40].map((pageSize) => ( + <option key={pageSize} value={pageSize}> + Show {pageSize} + </option> + ))} + </select> + </div> + </td> + </tr> + </tfoot> + </table> + </div> + </div> + ); +}; + +const RedemptionModalBody = () => { + // Show (1) Selection, (2) Amount Application, (3) Confirmation + const selected = useAppSelector((state) => state.app.cmSelected); + const showHistory = useAppSelector((state) => state.app.cmShowHistory); + + if (showHistory) { + return ( + <> + <RedemptionModalSteps /> + <RedemptionHistory /> + </> + ); + } + + if (selected) { + return ( + <> + <RedemptionModalSteps /> + <RedemptionDetails /> + </> + ); + } else { + return ( + <> + <RedemptionModalSteps /> + <RedemptionBrowser /> + </> + ); + } +}; + const Redemption = () => { - const [showRedemption, setShowRedemption] = useState(false); + const [showRedemption, setShowRedemption] = useState(true); + + const { data: user } = useGetMeQuery(); + if (!user?.product_user_id) return null; return ( <div className={clsx( "fixed rounded bg-blue-500 text-white shadow-lg z-60 \ - top-1 sm:top-6 \ + top-2 \ right-1 sm:right-2", - showRedemption ? "w-[98vw] sm:w-[400px]" : "w-[220px]", + showRedemption ? "w-[98vw] sm:w-[320px]" : "w-[220px]", )} > <div @@ -47,9 +995,8 @@ const Redemption = () => { > <RedemptionHeader /> - <h4 className="text-[10px] text-center italic text-white-300 py-0"> - {/* (Click to {showRedemption ? "hide" : "show"}) */} - Details within 24hr. + <h4 className="text-[10px] text-center italic text-blue-300 py-0"> + (Click to {showRedemption ? "hide" : "show"}) </h4> </div> diff --git a/jb-ui/src/components/UserAccount.tsx b/jb-ui/src/components/UserAccount.tsx new file mode 100644 index 0000000..5aef031 --- /dev/null +++ b/jb-ui/src/components/UserAccount.tsx @@ -0,0 +1,25 @@ +import { useGetMeQuery } from "@/models/authAPI"; + +const UserAccount = () => { + const { data: user } = useGetMeQuery(); + + if (!user?.product_user_id) return null; + + return ( + <div + className="fixed bottom-21 right-0 p-2 + bg-slate-700 text-zinc-200 z-50 + font-mono + " + > + <div className="grid grid-cols-[auto_1fr] text-xs"> + <div className="label text-left pr-2">Email:</div> + <div className="value text-left">{user.email} </div> + <div className="label text-left pr-2">Name:</div> + <div className="value text-left">{user.display_name ?? "___"}</div>{" "} + </div> + </div> + ); +}; + +export default UserAccount; diff --git a/jb-ui/src/lib/utils.ts b/jb-ui/src/lib/utils.ts index 1aa59c6..d20703b 100644 --- a/jb-ui/src/lib/utils.ts +++ b/jb-ui/src/lib/utils.ts @@ -117,3 +117,7 @@ export function titleCase(str: string): string { .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) .join(" "); } + +export function stripPriceFromTitle(title: string): string { + return title.replace(/\s*\$\d+(\.\d{1,2})?\s*$/, "").trim(); +} diff --git a/jb-ui/src/models/app.ts b/jb-ui/src/models/app.ts index db54e0d..508afa6 100644 --- a/jb-ui/src/models/app.ts +++ b/jb-ui/src/models/app.ts @@ -7,6 +7,7 @@ import { OfferwallReason, UserLedgerWallet, UserDisplayedWalletBalance, + CashoutMethodOut, } from "@/api_fsb"; import { PaginationState } from "@tanstack/react-table"; @@ -41,7 +42,16 @@ export interface App { userAttemptCreditWallet?: UserLedgerWallet; // --- + // -- Transaction Component --- txPagination: PaginationState; txTotalItems?: number; txTotalPages?: number; + + // -- CashoutMethods Component --- + // cmPagination: PaginationState; + // cmTotalItems?: number; + // cmTotalPages?: number; + + cmSelected?: CashoutMethodOut; + cmShowHistory?: boolean; } diff --git a/jb-ui/src/models/appSlice.ts b/jb-ui/src/models/appSlice.ts index 42a776e..6cb7fc0 100644 --- a/jb-ui/src/models/appSlice.ts +++ b/jb-ui/src/models/appSlice.ts @@ -7,6 +7,7 @@ import { UserDisplayedWalletBalance, UserLedgerWallet, OfferwallReason, + CashoutMethodOut, } from "@/api_fsb"; import { App } from "@/models/app"; import { RootState } from "@/store"; @@ -37,6 +38,12 @@ const initialState: App = { txPagination: { pageIndex: 0, pageSize: 10 }, txTotalItems: undefined, txTotalPages: undefined, + + // cmPagination: { pageIndex: 0, pageSize: 10 }, + // cmTotalItems: undefined, + // cmTotalPages: undefined, + cmSelected: undefined, + cmShowHistory: false, } as App; const appSlice = createSlice({ @@ -144,6 +151,27 @@ const appSlice = createSlice({ setTxTotalPages(state, action: PayloadAction<number>) { state.txTotalPages = action.payload; }, + + // setCmPagination(state, action: PayloadAction<PaginationState>) { + // console.log("setCmPagination:payload=", action.payload); + // state.cmPagination = action.payload; + // }, + + // setCmTotalItems(state, action: PayloadAction<number>) { + // state.cmTotalItems = action.payload; + // }, + + // setCmTotalPages(state, action: PayloadAction<number>) { + // state.cmTotalPages = action.payload; + // }, + + setCmSelected(state, action: PayloadAction<CashoutMethodOut | undefined>) { + state.cmSelected = action.payload; + }, + + setCmShowHistory(state, action: PayloadAction<boolean>) { + state.cmShowHistory = action.payload; + }, }, }); @@ -171,6 +199,12 @@ export const { setTxPagination, setTxTotalItems, setTxTotalPages, + + // setCmPagination, + // setCmTotalItems, + // setCmTotalPages, + setCmSelected, + setCmShowHistory, } = appSlice.actions; export default appSlice.reducer; diff --git a/jb-ui/src/models/authAPI.ts b/jb-ui/src/models/authAPI.ts index 2964d55..a3efbcb 100644 --- a/jb-ui/src/models/authAPI.ts +++ b/jb-ui/src/models/authAPI.ts @@ -1,5 +1,13 @@ import { createApi, fetchBaseQuery } from "@reduxjs/toolkit/query/react"; import type { User } from "@/types/authApi"; +export const bpuid = import.meta.env.VITE_BPUID; + +// const DEV_USER: User = { +// blocked: false, +// display_name: null, +// email: "demo@jamesbillings67.com", +// product_user_id: import.meta.env.VITE_BPUID, +// }; export const authApi = createApi({ reducerPath: "authApi", @@ -10,7 +18,16 @@ export const authApi = createApi({ tagTypes: ["User"], endpoints: (builder) => ({ getMe: builder.query<User, void>({ - query: () => "/session/", + queryFn: async (_arg, _api, _extra, baseQuery) => { + // if (import.meta.env.DEV) { + // return { data: DEV_USER }; + // } + const result = await baseQuery("/session/"); + return result.data + ? { data: result.data as User } + : { error: result.error! }; + }, + providesTags: ["User"], }), // logout: builder.mutation({ @@ -22,3 +39,5 @@ export const authApi = createApi({ // export const { useGetMeQuery, useLogoutMutation } = authApi; export const { useGetMeQuery } = authApi; + +// diff --git a/jb-ui/src/models/cashoutMethodsSlice.ts b/jb-ui/src/models/cashoutMethodsSlice.ts index 92c03da..080cb04 100644 --- a/jb-ui/src/models/cashoutMethodsSlice.ts +++ b/jb-ui/src/models/cashoutMethodsSlice.ts @@ -1,23 +1,69 @@ -import { CashoutMethodOut } from "@/api_fsb"; +import { WalletApi, CashoutMethodOut } from "@/api_fsb"; import type { RootState } from "@/store"; -import { createSlice, createEntityAdapter } from "@reduxjs/toolkit"; +import { + PayloadAction, + createSlice, + createEntityAdapter, +} from "@reduxjs/toolkit"; +import { bpid } from "@/lib/utils"; +import { createAsyncThunk } from "@reduxjs/toolkit"; // Entity adapter for normalized storage const cashoutMethodsAdapter = createEntityAdapter({ selectId: (model: CashoutMethodOut) => model.id!, sortComparer: (a, b) => { - return (b.min_value ?? 0) - (a.min_value ?? 0); + return (a.min_value ?? 0) - (b.min_value ?? 0); }, }); +export const fetchCashoutMethods = createAsyncThunk( + "cashoutMethodsSlice/fetchCashoutMethods", + async (bpuid: string) => { + console.log("cashoutMethodsSlice/fetchCashoutMethods"); + const res = + await new WalletApi().getCashoutMethodsProductIdCashoutMethodsGet( + bpid, + bpuid, + ); + return res.data.cashout_methods as CashoutMethodOut[]; + }, +); + +interface CashoutMethodClientState { + is_active?: boolean; + is_expanded?: boolean; +} + +const withClientDefaults = (method: CashoutMethodOut): CashoutMethodEntity => ({ + ...method, + is_active: false, + is_expanded: false, +}); + +type CashoutMethodEntity = CashoutMethodOut & CashoutMethodClientState; + const cashoutMethodsSlice = createSlice({ name: "cashoutMethods", initialState: cashoutMethodsAdapter.getInitialState(), reducers: { - addCashoutMethod: cashoutMethodsAdapter.addOne, - addCashoutMethods: cashoutMethodsAdapter.addMany, - upsertCashoutMethod: cashoutMethodsAdapter.upsertOne, // Add or Update + addCashoutMethod: (state, action: PayloadAction<CashoutMethodOut>) => { + cashoutMethodsAdapter.addOne(state, withClientDefaults(action.payload)); + }, + + addCashoutMethods: (state, action: PayloadAction<CashoutMethodOut[]>) => { + cashoutMethodsAdapter.addMany( + state, + action.payload.map(withClientDefaults), + ); + }, + + upsertCashoutMethod: (state, action: PayloadAction<CashoutMethodOut>) => { + cashoutMethodsAdapter.upsertOne( + state, + withClientDefaults(action.payload), + ); + }, }, }); diff --git a/jb-ui/src/models/cashoutRequests.ts b/jb-ui/src/models/cashoutRequests.ts new file mode 100644 index 0000000..985b949 --- /dev/null +++ b/jb-ui/src/models/cashoutRequests.ts @@ -0,0 +1,32 @@ +import { createApi, fakeBaseQuery } from "@reduxjs/toolkit/query/react"; +import { WalletApi } from "@/api_fsb"; +import type { CashoutRequestSummary } from "@/api_fsb"; + +const walletApi = new WalletApi(); + +// /<product-id>/cashout/ + +export const cashoutRequests = createApi({ + reducerPath: "cashoutRequests", + baseQuery: fakeBaseQuery<string>(), + endpoints: (builder) => ({ + getUserCashouts: builder.query< + CashoutRequestSummary[], + { bpid: string; productUserId: string } + >({ + queryFn: async ({ bpid, productUserId }) => { + try { + const res = await walletApi.filterUserCashoutsProductIdCashoutGet( + bpid, + productUserId, + ); + return { data: res.data.cashouts as CashoutRequestSummary[] }; + } catch (e) { + return { error: e instanceof Error ? e.message : "Request failed" }; + } + }, + }), + }), +}); + +export const { useGetUserCashoutsQuery } = cashoutRequests; diff --git a/jb-ui/src/pages/MagicLink.tsx b/jb-ui/src/pages/MagicLink.tsx index 48d7dc5..e85bac3 100644 --- a/jb-ui/src/pages/MagicLink.tsx +++ b/jb-ui/src/pages/MagicLink.tsx @@ -5,6 +5,7 @@ type ExchangeState = "working" | "failed" | "missing"; const MagicLink = function () { const started = useRef(false); const [state, setState] = useState<ExchangeState>("working"); + const [errorMsg, setErrorMesg] = useState(""); useEffect(() => { // React Strict Mode runs effects twice in development. Never redeem twice. @@ -31,14 +32,19 @@ const MagicLink = function () { if (!response.ok) throw new Error("Magic-link exchange failed"); window.location.replace("/"); }) - .catch(() => setState("failed")); + .catch((err) => { + const response = err?.response?.data; + setErrorMesg(response?.detail ?? err.message); + setState("failed"); + }); }, []); if (state === "missing") { return <p>This login link is missing its token.</p>; } if (state === "failed") { - return <p>This login link is invalid or has expired.</p>; + return <p>{errorMsg}</p>; + // return <p>This login link is invalid or has expired.</p>; } return <p>Signing you in…</p>; }; diff --git a/jb-ui/src/pages/MagicWallet.tsx b/jb-ui/src/pages/MagicWallet.tsx new file mode 100644 index 0000000..21331f9 --- /dev/null +++ b/jb-ui/src/pages/MagicWallet.tsx @@ -0,0 +1,58 @@ +import { + WalletApi as JBApi, + CashoutConfirmation, + Configuration, +} from "@/api_jb"; +import { useEffect, useRef, useState } from "react"; + +type ExchangeState = "working" | "failed" | "missing"; + +const MagicWallet = function () { + const started = useRef(false); + const [state, setState] = useState<ExchangeState>("working"); + const [errorMsg, setErrorMesg] = useState(""); + + useEffect(() => { + // React Strict Mode runs effects twice in development. Never redeem twice. + if (started.current) return; + started.current = true; + + const params = new URLSearchParams(window.location.search); + const token = params.get("token"); + if (!token) { + setState("missing"); + return; + } + + // Keep the credential out of browser history and subsequent Referer headers. + window.history.replaceState({}, "", window.location.pathname); + + const cc = { + token: token, + } as CashoutConfirmation; + + const config = new Configuration({ basePath: "http://localhost:5174" }); + new JBApi(config) + .confirmCashoutWalletCashoutConfirmPost(cc) + .then((res) => { + console.log("confirmCashoutWalletCashoutConfirmPost", res.data); + // if (!res.ok) throw new Error("Magic-link exchange failed"); + window.location.replace("/"); + }) + .catch((err) => { + const response = err?.response?.data; + setErrorMesg(response?.detail ?? err.message); + setState("failed"); + }); + }, []); + + if (state === "missing") { + return <p>This login link is missing its token.</p>; + } + if (state === "failed") { + return <p>{errorMsg}</p>; + } + return <p>Signing you in…</p>; +}; + +export default MagicWallet; diff --git a/jb-ui/src/pages/Work.tsx b/jb-ui/src/pages/Work.tsx index 6d0b1c1..c039436 100644 --- a/jb-ui/src/pages/Work.tsx +++ b/jb-ui/src/pages/Work.tsx @@ -782,10 +782,13 @@ const SurveyEnter = () => { </div> <BucketDetails /> - <div className="border-2 border-emerald-200 rounded py-2 m-0"> - <p className="text-emerald-700 text-sm text-center font-medium px-2 m-0"> - <Markdown>{bucket.eligibility_explanation}</Markdown> - </p> + <div + className=" + border-2 border-emerald-200 rounded py-2 m-0 + text-emerald-700 text-sm text-center font-medium px-2 + " + > + <Markdown>{bucket.eligibility_explanation}</Markdown> </div> </> ); diff --git a/jb-ui/src/store.ts b/jb-ui/src/store.ts index 081de9f..c143999 100644 --- a/jb-ui/src/store.ts +++ b/jb-ui/src/store.ts @@ -7,6 +7,7 @@ import profilingQuestionsReducers from "@/models/profilingQuestionsSlice"; import cashoutMethodReducers from "@/models/cashoutMethodsSlice"; import type { Action, ThunkAction } from "@reduxjs/toolkit"; import { configureStore } from "@reduxjs/toolkit"; +import { cashoutRequests } from "@/models/cashoutRequests"; export const store = configureStore({ reducer: { @@ -17,8 +18,10 @@ export const store = configureStore({ events: grlEventsReducers, profilingQuestions: profilingQuestionsReducers, cashoutMethods: cashoutMethodReducers, + cashoutRequests: cashoutRequests.reducer, }, - middleware: (getDefault) => getDefault().concat(authApi.middleware), + middleware: (getDefault) => + getDefault().concat(authApi.middleware).concat(cashoutRequests.middleware), }); // Infer the type of `store` diff --git a/jb-ui/src/vite-env.d.ts b/jb-ui/src/vite-env.d.ts index 93dc3cc..2e257f0 100644 --- a/jb-ui/src/vite-env.d.ts +++ b/jb-ui/src/vite-env.d.ts @@ -9,6 +9,7 @@ interface ViteTypeOptions { interface ImportMetaEnv { readonly VITE_BASENAME: string; readonly VITE_BPID: string; + readonly VITE_BPUID: string; readonly VITE_TAG_MANAGER: string; } diff --git a/jb-ui/vite.config.ts b/jb-ui/vite.config.ts index 41f1d9e..b8bc20d 100644 --- a/jb-ui/vite.config.ts +++ b/jb-ui/vite.config.ts @@ -28,10 +28,23 @@ export default defineConfig({ // This forwards requests to the FastAPI development server // that must also be running proxy: { - "^/(auth|status|statuses|report|survey)(/|$)": { + "^/(wallet/cashout/request|auth|status|statuses|report|survey)(/|$)": { target: "http://localhost:8000", changeOrigin: true, }, + + // GET -> React, everything else -> FastAPI + "^/wallet/cashout/confirm(/|$)": { + target: "http://localhost:8000", + changeOrigin: true, + bypass(req) { + if (req.method === "GET") { + return "/index.html"; + } + + return undefined; + }, + }, }, }, diff --git a/scripts/__init__.py b/scripts/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/scripts/__init__.py +++ /dev/null diff --git a/scripts/unreject.py b/scripts/unreject.py deleted file mode 100644 index 298561f..0000000 --- a/scripts/unreject.py +++ /dev/null @@ -1,26 +0,0 @@ -from jb.decorators import AMTM, AM -from jb.flow.assignment_tasks import approve_assignment -from jb.managers.amt import APPROVAL_MESSAGE - -res = AM.pg_config.execute_sql_query( - """ -SELECT amt_assignment_id, submit_time, h.amt_hit_id, ht.amt_hit_type_id -FROM mtwerk_assignment AS a -LEFT JOIN mtwerk_hit AS h ON h.id = a.hit_id -LEFT JOIN mtwerk_hittype AS ht ON h.hit_type_id = ht.id -WHERE amt_worker_id='A1FMSKDAIK80PQ' -and a.status = 2 -AND a.created_at>'2026-04-21 00:20:54.709322' -ORDER BY a.created_at; -""" -) - -for x in res: - approve_assignment( - amtm=AMTM, - am=AM, - amt_assignment_id=x['amt_assignment_id'], - msg=APPROVAL_MESSAGE, - amt_hit_type_id=x['amt_hit_type_id'], - override_rejection=True - ) diff --git a/scripts/wallet.ipynb b/scripts/wallet.ipynb deleted file mode 100644 index 12a90be..0000000 --- a/scripts/wallet.ipynb +++ /dev/null @@ -1,153 +0,0 @@ -{ - "cells": [ - { - "metadata": {}, - "cell_type": "code", - "source": [ - "import uuid\n", - "\n", - "import requests\n", - "from collections import Counter\n", - "\n", - "FSB_BASE_URL = \"https://fsb.generalresearch.com/\"\n", - "JB_BASE_URL = \"https://jamesbillings67.com/\"\n", - "product_id = \"888dbc589987425fa846d6e2a8daed04\"\n", - "bpuid = uuid.uuid4().hex" - ], - "id": "initial_id", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Check their balance\n", - "url = FSB_BASE_URL + f\"{product_id}/wallets/?bpuid={bpuid}\"\n", - "print(f\"{url=}\")\n", - "res = requests.get(url).json()\n", - "print(res['displayed_balances'][0])" - ], - "id": "74a8d7f3452c2372", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Get user cashout methods\n", - "url = FSB_BASE_URL + f\"{product_id}/cashout_methods/?bpuid={bpuid}\"\n", - "print(f\"{url=}\")\n", - "res = requests.get(url).json()\n", - "cms = res['cashout_methods']\n", - "print(dict(Counter(x['type'] for x in cms)))\n", - "\n", - "# Get the paypal method\n", - "paypal_cm = next(filter(lambda x: x['type'] == 'PAYPAL', cms))\n", - "print(paypal_cm['id'])" - ], - "id": "e5c4e61b4727912d", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Log in and retain the jb_session cookie for later requests\n", - "from urllib.parse import parse_qs, urlparse\n", - "\n", - "session = requests.Session()\n", - "email = 'your-email@gmail.com'\n", - "\n", - "res = session.post(\n", - " JB_BASE_URL + 'auth/magic-link/request/',\n", - " json={'email': email},\n", - ")\n", - "res.raise_for_status()\n", - "print(res.json())" - ], - "id": "38c7d77b3abf9948", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Paste the link from the login email. Exchanging it sets jb_session on `session`.\n", - "magic_link = \"https://jamesbillings67.com/auth/magic-link/?token=XXXX\"\n", - "token = parse_qs(urlparse(magic_link).query)['token'][0]\n", - "res = session.post(\n", - " JB_BASE_URL + 'auth/magic-link/exchange/',\n", - " json={'token': token},\n", - ")\n", - "res.raise_for_status()\n", - "\n", - "session_token = session.cookies['jb_session']\n", - "print(f'Logged in; captured jb_session ({len(session_token)} characters)')" - ], - "id": "db3caa6e440619fe", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Request a PayPal cashout using the authenticated session.\n", - "# The response confirms that the cashout confirmation email was sent;\n", - "# the payout event is created only after that email link is confirmed.\n", - "res = session.post(JB_BASE_URL + 'wallet/cashout/request/', json={\n", - " 'amount': 10_00,\n", - " 'cashout_method_id': paypal_cm['id'],\n", - "})\n", - "res.raise_for_status()\n", - "print(res.json())" - ], - "id": "774a00c08ab54d4f", - "outputs": [], - "execution_count": null - }, - { - "metadata": {}, - "cell_type": "code", - "source": [ - "# Paste link from email\n", - "magic_link = \"https://jamesbillings67.com/wallet/cashout/confirm/?token=XXXX\"\n", - "token = parse_qs(urlparse(magic_link).query)['token'][0]\n", - "res = session.post(\n", - " JB_BASE_URL + 'wallet/cashout/confirm/',\n", - " json={'token': token},\n", - ")\n", - "print(res.json())\n", - "res.raise_for_status()" - ], - "id": "894887ddc479eb1a", - "outputs": [], - "execution_count": null - } - ], - "metadata": { - "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 2 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython2", - "version": "2.7.6" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} |
