From 3eaa56f0306ead818f64c3d99fc6d230d9b970a4 Mon Sep 17 00:00:00 2001 From: Max Nanis Date: Wed, 18 Feb 2026 20:42:03 -0500 Subject: HERE WE GO, HERE WE GO, HERE WE GO --- jb-ui/src/api_fsb/api.ts | 13874 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 13874 insertions(+) create mode 100644 jb-ui/src/api_fsb/api.ts (limited to 'jb-ui/src/api_fsb/api.ts') diff --git a/jb-ui/src/api_fsb/api.ts b/jb-ui/src/api_fsb/api.ts new file mode 100644 index 0000000..6d0acea --- /dev/null +++ b/jb-ui/src/api_fsb/api.ts @@ -0,0 +1,13874 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * General Research Full Service Brokerage API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 1.2.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 } from './common'; +import type { RequestArgs } from './base'; +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError, operationServerMap } from './base'; + +/** + * + * @export + * @enum {string} + */ + +export const AccountType = { + BpCommission: 'bp_commission', + BpWallet: 'bp_wallet', + UserWallet: 'user_wallet', + Cash: 'cash', + Revenue: 'revenue', + Expense: 'expense', + ContestWallet: 'contest_wallet', + CreditLine: 'credit_line', + WaWallet: 'wa_wallet', + WaBudgetPool: 'wa_budget_pool', + WaHeld: 'wa_held', + WaCreditLine: 'wa_credit_line' +} as const; + +export type AccountType = typeof AccountType[keyof typeof AccountType]; + + +/** + * Retrieve sessions which were adjusted after this timestamp. + * @export + * @interface AdjustedAfter + */ +export interface AdjustedAfter { +} +/** + * Retrieve sessions which were adjusted before this timestamp. Default is now. + * @export + * @interface AdjustedBefore + */ +export interface AdjustedBefore { +} +/** + * + * @export + * @interface AdjustedTimestamp + */ +export interface AdjustedTimestamp { +} +/** + * + * @export + * @interface AdjustmentType + */ +export interface AdjustmentType { + /** + * The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period from a specificSource of Tasks. + * @type {number} + * @memberof AdjustmentType + */ + 'amount': number; + /** + * - `ac` = ADJUSTED_TO_COMPLETE - `af` = ADJUSTED_TO_FAIL - `pa` = PAYOUT_ADJUSTMENT + * @type {SessionAdjustedStatus} + * @memberof AdjustmentType + */ + 'adjustment': SessionAdjustedStatus; +} + + +/** + * + * @export + * @interface AggregateBySource + */ +export interface AggregateBySource { + /** + * + * @type {number} + * @memberof AggregateBySource + */ + 'total'?: number; + /** + * + * @type {{ [key: string]: number; }} + * @memberof AggregateBySource + */ + 'by_source'?: { [key: string]: number; }; +} +/** + * + * @export + * @interface AmtCashoutMethodData + */ +export interface AmtCashoutMethodData { + /** + * + * @type {string} + * @memberof AmtCashoutMethodData + */ + 'type'?: AmtCashoutMethodDataTypeEnum; +} + +export const AmtCashoutMethodDataTypeEnum = { + Amt: 'AMT' +} as const; + +export type AmtCashoutMethodDataTypeEnum = typeof AmtCashoutMethodDataTypeEnum[keyof typeof AmtCashoutMethodDataTypeEnum]; + +/** + * Table / Model for logging \"actions\" taken by a user or \"events\" that are related to a User + * @export + * @interface AuditLog + */ +export interface AuditLog { + /** + * + * @type {number} + * @memberof AuditLog + */ + 'id'?: number | null; + /** + * + * @type {number} + * @memberof AuditLog + */ + 'user_id': number; + /** + * When did this event occur + * @type {string} + * @memberof AuditLog + */ + 'created'?: string; + /** + * 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. + * @type {AuditLogLevel} + * @memberof AuditLog + */ + 'level': AuditLogLevel; + /** + * + * @type {string} + * @memberof AuditLog + */ + 'event_type': string; + /** + * + * @type {string} + * @memberof AuditLog + */ + 'event_msg'?: string | null; + /** + * + * @type {number} + * @memberof AuditLog + */ + 'event_value'?: number | null; +} + + +/** + * + * @export + * @enum {number} + */ + +export const AuditLogLevel = { + NUMBER_50: 50, + NUMBER_502: 50, + NUMBER_40: 40, + NUMBER_30: 30, + NUMBER_302: 30, + NUMBER_20: 20, + NUMBER_10: 10, + NUMBER_0: 0 +} as const; + +export type AuditLogLevel = typeof AuditLogLevel[keyof typeof AuditLogLevel]; + + +/** + * @type Body + * @export + */ +export type Body = { type: 'CASH_IN_MAIL' } & CreateCashMailCashoutMethodRequest | { type: 'PAYPAL' } & CreatePayPalCashoutMethodRequest; + +/** + * + * @export + * @interface BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + */ +export interface BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost { + /** + * + * @type {Array} + * @memberof BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + */ + 'answers': Array; +} +/** + * + * @export + * @interface BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + */ +export interface BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost { + /** + * + * @type {Array} + * @memberof BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + */ + 'answers': Array; +} +/** + * + * @export + * @interface BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + */ +export interface BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost { + /** + * + * @type {Array} + * @memberof BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + */ + 'answers': Array; +} +/** + * The amount - created: When the Brokerage Product was paid out + * @export + * @interface BrokerageProductPayoutEvent + */ +export interface BrokerageProductPayoutEvent { + /** + * + * @type {string} + * @memberof BrokerageProductPayoutEvent + */ + 'uuid'?: string; + /** + * The LedgerAccount.uuid that money is being requested from. Thie User or Brokerage Product is retrievable through the LedgerAccount.reference_uuid + * @type {string} + * @memberof BrokerageProductPayoutEvent + */ + 'debit_account_uuid': string; + /** + * 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) + * @type {string} + * @memberof BrokerageProductPayoutEvent + */ + 'cashout_method_uuid': string; + /** + * + * @type {string} + * @memberof BrokerageProductPayoutEvent + */ + 'created'?: string; + /** + * The USDCent amount int. This cannot be 0 or negative + * @type {number} + * @memberof BrokerageProductPayoutEvent + */ + 'amount': number; + /** + * + * @type {PayoutStatus} + * @memberof BrokerageProductPayoutEvent + */ + 'status'?: PayoutStatus | null; + /** + * + * @type {string} + * @memberof 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 + * @type {PayoutType} + * @memberof BrokerageProductPayoutEvent + */ + 'payout_type': PayoutType; + /** + * Stores payout-type-specific information that is used to request this payout from the external provider. + * @type {object} + * @memberof BrokerageProductPayoutEvent + */ + 'request_data'?: object; + /** + * + * @type {OrderData} + * @memberof BrokerageProductPayoutEvent + */ + 'order_data'?: OrderData | null; + /** + * The Brokerage Product that was paid out + * @type {string} + * @memberof 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 + * @type {PayoutType} + * @memberof BrokerageProductPayoutEvent + */ + 'method': PayoutType; + /** + * + * @type {number} + * @memberof BrokerageProductPayoutEvent + */ + 'amount_usd': number; + /** + * + * @type {string} + * @memberof BrokerageProductPayoutEvent + */ + 'amount_usd_str': string; +} + + +/** + * This represents one of the \"tasks\" within a bucket\'s ordered list of tasks. + * @export + * @interface BucketTask + */ +export interface BucketTask { + /** + * The internal task id for this task within the marketplace + * @type {string} + * @memberof BucketTask + */ + 'id': string; + /** + * The namespaced task id for this task within the marketplace + * @type {string} + * @memberof BucketTask + */ + 'id_code': string; + /** + * + * @type {Source} + * @memberof BucketTask + */ + 'source': Source; + /** + * expected loi in seconds + * @type {number} + * @memberof BucketTask + */ + 'loi': number; + /** + * integer cents + * @type {number} + * @memberof BucketTask + */ + 'payout': number; +} + + +/** + * + * @export + * @interface BuyerId + */ +export interface BuyerId { +} +/** + * + * @export + * @enum {string} + */ + +export const Cardinality = { + Star: '*', + QuestionMark: '?' +} as const; + +export type Cardinality = typeof Cardinality[keyof typeof Cardinality]; + + +/** + * + * @export + * @interface CashMailCashoutMethodData + */ +export interface CashMailCashoutMethodData { + /** + * + * @type {string} + * @memberof CashMailCashoutMethodData + */ + 'type'?: CashMailCashoutMethodDataTypeEnum; + /** + * Delivery address where payment should be sent + * @type {USDeliveryAddress} + * @memberof CashMailCashoutMethodData + */ + 'delivery_address': USDeliveryAddress; +} + +export const CashMailCashoutMethodDataTypeEnum = { + CashInMail: 'CASH_IN_MAIL' +} as const; + +export type CashMailCashoutMethodDataTypeEnum = typeof CashMailCashoutMethodDataTypeEnum[keyof typeof CashMailCashoutMethodDataTypeEnum]; + +/** + * + * @export + * @interface CashMailOrderData + */ +export interface CashMailOrderData { + /** + * + * @type {string} + * @memberof CashMailOrderData + */ + 'type'?: CashMailOrderDataTypeEnum; + /** + * + * @type {number} + * @memberof CashMailOrderData + */ + 'shipping_cost': number | null; + /** + * + * @type {string} + * @memberof CashMailOrderData + */ + 'tracking_number'?: string | null; + /** + * + * @type {ShippingMethod} + * @memberof CashMailOrderData + */ + 'shipping_method'?: ShippingMethod | null; + /** + * + * @type {ShippingCarrier} + * @memberof CashMailOrderData + */ + 'carrier'?: ShippingCarrier | null; + /** + * + * @type {string} + * @memberof CashMailOrderData + */ + 'ship_date'?: string | null; + /** + * + * @type {string} + * @memberof CashMailOrderData + */ + 'estimated_delivery_date'?: string | null; + /** + * + * @type {DeliveryStatus} + * @memberof CashMailOrderData + */ + 'delivery_status'?: DeliveryStatus | null; + /** + * + * @type {string} + * @memberof CashMailOrderData + */ + 'last_updated'?: string | null; +} + +export const CashMailOrderDataTypeEnum = { + CashInMail: 'CASH_IN_MAIL' +} as const; + +export type CashMailOrderDataTypeEnum = typeof CashMailOrderDataTypeEnum[keyof typeof CashMailOrderDataTypeEnum]; + +/** + * Shows the expected value of a redemption in a foreign currency. + * @export + * @interface CashoutMethodForeignValue + */ +export interface CashoutMethodForeignValue { + /** + * Value of the redemption in the currency\'s smallest unit. + * @type {number} + * @memberof 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} + * @memberof CashoutMethodForeignValue + */ + 'currency': RedemptionCurrency; + /** + * A string representation of the value in the currency. + * @type {string} + * @memberof CashoutMethodForeignValue + */ + 'value_string': string; +} + + +/** + * + * @export + * @interface CashoutMethodForeignValueResponse + */ +export interface CashoutMethodForeignValueResponse { + /** + * The status of the API response. + * @type {string} + * @memberof CashoutMethodForeignValueResponse + */ + 'status': CashoutMethodForeignValueResponseStatusEnum; + /** + * + * @type {string} + * @memberof CashoutMethodForeignValueResponse + */ + 'msg'?: string | null; + /** + * + * @type {CashoutMethodForeignValue} + * @memberof CashoutMethodForeignValueResponse + */ + 'cashout_method_value': CashoutMethodForeignValue; +} + +export const CashoutMethodForeignValueResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type CashoutMethodForeignValueResponseStatusEnum = typeof CashoutMethodForeignValueResponseStatusEnum[keyof typeof CashoutMethodForeignValueResponseStatusEnum]; + +/** + * + * @export + * @interface CashoutMethodOut + */ +export interface CashoutMethodOut { + /** + * Unique ID for this cashout method + * @type {string} + * @memberof CashoutMethodOut + */ + 'id': string; + /** + * The currency of the cashout. Only USD is supported. + * @type {string} + * @memberof CashoutMethodOut + */ + 'currency'?: CashoutMethodOutCurrencyEnum; + /** + * + * @type {Currency} + * @memberof CashoutMethodOut + */ + 'original_currency'?: Currency | null; + /** + * + * @type {Data} + * @memberof CashoutMethodOut + */ + 'data': Data; + /** + * The description of the cashout method. + * @type {string} + * @memberof CashoutMethodOut + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof CashoutMethodOut + */ + 'image_url'?: string | null; + /** + * (In lowest unit of the original_currency), The maximum amount that can be cashed out in one transaction. + * @type {number} + * @memberof CashoutMethodOut + */ + 'max_value': number; + /** + * (In lowest unit of the original_currency), The minimum amount that can be cashed out in one transaction. + * @type {number} + * @memberof CashoutMethodOut + */ + 'min_value': number; + /** + * A descriptive name for the cashout method. + * @type {string} + * @memberof 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 uut 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 + * @type {PayoutType} + * @memberof CashoutMethodOut + */ + 'type': PayoutType; + /** + * + * @type {string} + * @memberof CashoutMethodOut + */ + 'ext_id'?: string | null; + /** + * + * @type {number} + * @memberof CashoutMethodOut + */ + 'usd_exchange_rate'?: number | null; + /** + * + * @type {number} + * @memberof CashoutMethodOut + */ + 'max_value_usd'?: number | null; + /** + * + * @type {number} + * @memberof CashoutMethodOut + */ + 'min_value_usd'?: number | null; + /** + * + * @type {string} + * @memberof CashoutMethodOut + */ + 'product_id'?: string | null; + /** + * + * @type {string} + * @memberof CashoutMethodOut + */ + 'product_user_id'?: string | null; +} + +export const CashoutMethodOutCurrencyEnum = { + Usd: 'USD' +} as const; + +export type CashoutMethodOutCurrencyEnum = typeof CashoutMethodOutCurrencyEnum[keyof typeof CashoutMethodOutCurrencyEnum]; + +/** + * + * @export + * @interface CashoutMethodResponse + */ +export interface CashoutMethodResponse { + /** + * The status of the API response. + * @type {string} + * @memberof CashoutMethodResponse + */ + 'status': CashoutMethodResponseStatusEnum; + /** + * + * @type {string} + * @memberof CashoutMethodResponse + */ + 'msg'?: string | null; + /** + * + * @type {CashoutMethodOut} + * @memberof CashoutMethodResponse + */ + 'cashout_method': CashoutMethodOut; +} + +export const CashoutMethodResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type CashoutMethodResponseStatusEnum = typeof CashoutMethodResponseStatusEnum[keyof typeof CashoutMethodResponseStatusEnum]; + +/** + * + * @export + * @interface CashoutMethodsResponse + */ +export interface CashoutMethodsResponse { + /** + * The status of the API response. + * @type {string} + * @memberof CashoutMethodsResponse + */ + 'status': CashoutMethodsResponseStatusEnum; + /** + * + * @type {string} + * @memberof CashoutMethodsResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array} + * @memberof CashoutMethodsResponse + */ + 'cashout_methods': Array; +} + +export const CashoutMethodsResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +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 + */ +export interface CashoutRequestInfo { + /** + * + * @type {string} + * @memberof CashoutRequestInfo + */ + 'id': string | null; + /** + * This is the name of the cashout method. + * @type {string} + * @memberof CashoutRequestInfo + */ + 'description': string; + /** + * + * @type {string} + * @memberof CashoutRequestInfo + */ + 'message'?: string | null; + /** + * + * @type {PayoutStatus} + * @memberof CashoutRequestInfo + */ + 'status'?: PayoutStatus | null; + /** + * + * @type {object} + * @memberof CashoutRequestInfo + */ + 'transaction_info'?: object | null; +} + + +/** + * + * @export + * @interface CashoutRequestResponse + */ +export interface CashoutRequestResponse { + /** + * The status of the API response. + * @type {string} + * @memberof CashoutRequestResponse + */ + 'status': CashoutRequestResponseStatusEnum; + /** + * + * @type {string} + * @memberof CashoutRequestResponse + */ + 'msg'?: string | null; + /** + * + * @type {CashoutRequestInfo} + * @memberof CashoutRequestResponse + */ + 'cashout': CashoutRequestInfo; +} + +export const CashoutRequestResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type CashoutRequestResponseStatusEnum = typeof CashoutRequestResponseStatusEnum[keyof typeof CashoutRequestResponseStatusEnum]; + +/** + * + * @export + * @interface Category + */ +export interface Category { + /** + * + * @type {string} + * @memberof Category + */ + 'uuid': string; + /** + * + * @type {string} + * @memberof Category + */ + 'adwords_vertical_id'?: string | null; + /** + * + * @type {string} + * @memberof Category + */ + 'label': string; + /** + * + * @type {string} + * @memberof Category + */ + 'path': string; + /** + * + * @type {string} + * @memberof Category + */ + 'parent_uuid'?: string | null; +} +/** + * Used in an offerwall. Stores the association between a category and a bucket, with a score. + * @export + * @interface CategoryAssociation + */ +export interface CategoryAssociation { + /** + * The category ID + * @type {string} + * @memberof CategoryAssociation + */ + 'id': string; + /** + * The category label + * @type {string} + * @memberof CategoryAssociation + */ + 'label': string; + /** + * + * @type {string} + * @memberof CategoryAssociation + */ + 'adwords_id'?: string | null; + /** + * + * @type {string} + * @memberof CategoryAssociation + */ + 'adwords_label'?: string | null; + /** + * The strength of the association of this bucketwith this category. Will sum to 1 within a bucket. + * @type {number} + * @memberof CategoryAssociation + */ + 'p': number; +} +/** + * Defines the conditions to evaluate to determine when the contest is over. Multiple conditions can be set. The contest is over once ANY conditions are met. + * @export + * @interface ContestEndCondition + */ +export interface ContestEndCondition { + /** + * + * @type {ContestEndConditionTargetEntryAmount} + * @memberof ContestEndCondition + */ + 'target_entry_amount'?: ContestEndConditionTargetEntryAmount | null; + /** + * + * @type {string} + * @memberof ContestEndCondition + */ + 'ends_at'?: string | null; +} +/** + * + * @export + * @interface ContestEndConditionTargetEntryAmount + */ +export interface ContestEndConditionTargetEntryAmount { +} +/** + * Defines why a contest ended + * @export + * @enum {string} + */ + +export const ContestEndReason = { + Cancelled: 'cancelled', + TargetEntryAmount: 'target_entry_amount', + EndsAt: 'ends_at', + MaxWinners: 'max_winners' +} as const; + +export type ContestEndReason = typeof ContestEndReason[keyof typeof ContestEndReason]; + + +/** + * Defines rules the user must meet to be allowed to enter this contest Only applies if the ContestType is ENTRY! + * @export + * @interface ContestEntryRule + */ +export interface ContestEntryRule { + /** + * + * @type {MaxEntryAmountPerUser} + * @memberof ContestEntryRule + */ + 'max_entry_amount_per_user'?: MaxEntryAmountPerUser | null; + /** + * + * @type {number} + * @memberof ContestEntryRule + */ + 'max_daily_entries_per_user'?: number | null; + /** + * + * @type {number} + * @memberof ContestEntryRule + */ + 'min_completes'?: number | null; + /** + * + * @type {number} + * @memberof ContestEntryRule + */ + 'min_membership_level'?: number | null; + /** + * + * @type {boolean} + * @memberof ContestEntryRule + */ + 'id_verified'?: boolean | null; +} +/** + * Defines what action/event triggers a (possible) entry into the contest (automatically). This only is valid on milestone contests + * @export + * @enum {string} + */ + +export const ContestEntryTrigger = { + TaskComplete: 'task_complete', + TaskAttempt: 'task_attempt', + Referral: 'referral' +} as const; + +export type ContestEntryTrigger = typeof ContestEntryTrigger[keyof typeof ContestEntryTrigger]; + + +/** + * + * @export + * @interface ContestPrize + */ +export interface ContestPrize { + /** + * Allowed values: - __physical__ *(PHYSICAL)*: A physical prize (e.g. a iPhone, cash in the mail, dinner with Max) - __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) - __cash__ *(CASH)*: Money is deposited into user\'s virtual wallet + * @type {ContestPrizeKind} + * @memberof ContestPrize + */ + 'kind': ContestPrizeKind; + /** + * + * @type {string} + * @memberof ContestPrize + */ + 'name'?: string | null; + /** + * + * @type {string} + * @memberof ContestPrize + */ + 'description'?: string | null; + /** + * Estimated cash value of prize in USDCents + * @type {number} + * @memberof ContestPrize + */ + 'estimated_cash_value': number; + /** + * + * @type {number} + * @memberof ContestPrize + */ + 'cash_amount'?: number | null; + /** + * + * @type {string} + * @memberof ContestPrize + */ + 'promotion_id'?: string | null; + /** + * + * @type {number} + * @memberof ContestPrize + */ + 'leaderboard_rank'?: number | null; +} + + +/** + * + * @export + * @enum {string} + */ + +export const ContestPrizeKind = { + Physical: 'physical', + Promotion: 'promotion', + Cash: 'cash' +} as const; + +export type ContestPrizeKind = typeof ContestPrizeKind[keyof typeof ContestPrizeKind]; + + +/** + * + * @export + * @enum {string} + */ + +export const ContestStatus = { + Active: 'active', + Completed: 'completed', + Cancelled: 'cancelled' +} as const; + +export type ContestStatus = typeof ContestStatus[keyof typeof ContestStatus]; + + +/** + * In a Raffle, the ContestEntryType can be COUNT or CASH. In the CASH type, the unit of entry is 1 USDCent (one penny). Implicitly, each penny entered buys 1 entry into the raffle, and one entry is randomly selected for each prize. A contest should have as many winners as there are prizes special case 1: there are fewer entries than prizes special case 2: leaderboard contest with ties + * @export + * @interface ContestWinner + */ +export interface ContestWinner { + /** + * + * @type {string} + * @memberof ContestWinner + */ + 'uuid'?: string; + /** + * When this user won this prize + * @type {string} + * @memberof ContestWinner + */ + 'created_at'?: string; + /** + * + * @type {ContestPrize} + * @memberof ContestWinner + */ + 'prize': ContestPrize; + /** + * + * @type {number} + * @memberof ContestWinner + */ + 'awarded_cash_amount'?: number | null; + /** + * + * @type {string} + * @memberof ContestWinner + */ + 'product_user_id': string | null; +} +/** + * + * @export + * @interface CountStat + */ +export interface CountStat { + /** + * The grouping criteria + * @type {{ [key: string]: FacetValue; }} + * @memberof CountStat + */ + 'facet': { [key: string]: FacetValue; }; + /** + * The count value for the given metric and facet + * @type {number} + * @memberof CountStat + */ + 'count': number; +} +/** + * + * @export + * @interface CreateCashMailCashoutMethodRequest + */ +export interface CreateCashMailCashoutMethodRequest { + /** + * (product_user_id) The user to create this cashout method for. + * @type {string} + * @memberof CreateCashMailCashoutMethodRequest + */ + 'bpuid': string; + /** + * + * @type {string} + * @memberof CreateCashMailCashoutMethodRequest + */ + 'type'?: CreateCashMailCashoutMethodRequestTypeEnum; + /** + * Delivery address where payment should be sent + * @type {USDeliveryAddress} + * @memberof CreateCashMailCashoutMethodRequest + */ + 'delivery_address': USDeliveryAddress; +} + +export const CreateCashMailCashoutMethodRequestTypeEnum = { + CashInMail: 'CASH_IN_MAIL' +} as const; + +export type CreateCashMailCashoutMethodRequestTypeEnum = typeof CreateCashMailCashoutMethodRequestTypeEnum[keyof typeof CreateCashMailCashoutMethodRequestTypeEnum]; + +/** + * + * @export + * @interface CreateCashoutRequest + */ +export interface CreateCashoutRequest { + /** + * (product_user_id) The user requesting a cashout. + * @type {string} + * @memberof CreateCashoutRequest + */ + 'bpuid': string; + /** + * (USD cents) The amount requested for the cashout. + * @type {number} + * @memberof CreateCashoutRequest + */ + 'amount': number; + /** + * Unique ID for the cashout method the cashout is being requested with. + * @type {string} + * @memberof CreateCashoutRequest + */ + 'cashout_method_id': string; +} +/** + * + * @export + * @interface CreatePayPalCashoutMethodRequest + */ +export interface CreatePayPalCashoutMethodRequest { + /** + * (product_user_id) The user to create this cashout method for. + * @type {string} + * @memberof CreatePayPalCashoutMethodRequest + */ + 'bpuid': string; + /** + * + * @type {string} + * @memberof CreatePayPalCashoutMethodRequest + */ + 'type'?: CreatePayPalCashoutMethodRequestTypeEnum; + /** + * Email address of the paypal user + * @type {string} + * @memberof CreatePayPalCashoutMethodRequest + */ + 'email': string; +} + +export const CreatePayPalCashoutMethodRequestTypeEnum = { + Paypal: 'PAYPAL' +} as const; + +export type CreatePayPalCashoutMethodRequestTypeEnum = typeof CreatePayPalCashoutMethodRequestTypeEnum[keyof typeof CreatePayPalCashoutMethodRequestTypeEnum]; + +/** + * + * @export + * @enum {string} + */ + +export const Currency = { + Usd: 'USD', + Cad: 'CAD', + Gbp: 'GBP', + Eur: 'EUR', + Inr: 'INR', + Aud: 'AUD', + Pln: 'PLN', + Sek: 'SEK', + Sgd: 'SGD', + Mxn: 'MXN' +} as const; + +export type Currency = typeof Currency[keyof typeof Currency]; + + +/** + * Sum of all entry amounts + * @export + * @interface CurrentAmount + */ +export interface CurrentAmount { +} +/** + * @type Data + * @export + */ +export type Data = { type: 'AMT' } & AmtCashoutMethodData | { type: 'CASH_IN_MAIL' } & CashMailCashoutMethodData | { type: 'PAYPAL' } & PaypalCashoutMethodData | { type: 'TANGO' } & TangoCashoutMethodData; + +/** + * + * @export + * @enum {string} + */ + +export const DeliveryStatus = { + Pending: 'Pending', + Shipped: 'Shipped', + InTransit: 'In Transit', + OutForDelivery: 'Out for Delivery', + Delivered: 'Delivered', + Returned: 'Returned', + Canceled: 'Canceled', + FailedAttempt: 'Failed Attempt', + Lost: 'Lost' +} as const; + +export type DeliveryStatus = typeof DeliveryStatus[keyof typeof DeliveryStatus]; + + +/** + * Entries on the debit side will increase debit normal accounts, while entries on the credit side will decrease them. Conversely, entries on the credit side will increase credit normal accounts, while entries on the debit side will decrease them. By convention (?), the db will store transactions as debit-normal. For a credit-normal account, we should flip the signs. + * @export + * @enum {number} + */ + +export const Direction = { + NUMBER_MINUS_1: -1, + NUMBER_1: 1 +} as const; + +export type Direction = typeof Direction[keyof typeof Direction]; + + +/** + * Durations are in integer seconds. Describes the statistical distribution of expected durations of tasks within this bucket. + * @export + * @interface DurationSummary + */ +export interface DurationSummary { + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'min': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'max': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'mean'?: number | null; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'q1': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'q2': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'q3': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'lower_whisker': number; + /** + * + * @type {number} + * @memberof DurationSummary + */ + 'upper_whisker': number; +} +/** + * + * @export + * @interface EventEnvelope + */ +export interface EventEnvelope { + /** + * + * @type {string} + * @memberof EventEnvelope + */ + 'event_uuid'?: string; + /** + * + * @type {EventType} + * @memberof EventEnvelope + */ + 'event_type': EventType; + /** + * + * @type {string} + * @memberof EventEnvelope + */ + 'timestamp'?: string; + /** + * + * @type {number} + * @memberof EventEnvelope + */ + 'version'?: number; + /** + * + * @type {string} + * @memberof EventEnvelope + */ + 'product_user_id'?: string | null; + /** + * + * @type {string} + * @memberof EventEnvelope + */ + 'product_id': string; + /** + * + * @type {Payload} + * @memberof EventEnvelope + */ + 'payload': Payload; +} + + +/** + * + * @export + * @interface EventMessage + */ +export interface EventMessage { + /** + * + * @type {string} + * @memberof EventMessage + */ + 'kind'?: EventMessageKindEnum; + /** + * + * @type {string} + * @memberof EventMessage + */ + 'timestamp'?: string; + /** + * + * @type {EventEnvelope} + * @memberof EventMessage + */ + 'data': EventEnvelope; +} + +export const EventMessageKindEnum = { + Event: 'event' +} as const; + +export type EventMessageKindEnum = typeof EventMessageKindEnum[keyof typeof EventMessageKindEnum]; + +/** + * + * @export + * @enum {string} + */ + +export const EventType = { + TaskEnter: 'task.enter', + TaskFinish: 'task.finish', + SessionEnter: 'session.enter', + SessionFinish: 'session.finish', + WalletCredit: 'wallet.credit', + WalletDebit: 'wallet.debit', + UserCreated: 'user.created', + UserActive: 'user.active' +} as const; + +export type EventType = typeof EventType[keyof typeof EventType]; + + +/** + * + * @export + * @interface ExtStatusCode1 + */ +export interface ExtStatusCode1 { +} +/** + * + * @export + * @interface ExtStatusCode2 + */ +export interface ExtStatusCode2 { +} +/** + * + * @export + * @interface ExtStatusCode3 + */ +export interface ExtStatusCode3 { +} +/** + * + * @export + * @interface FacetValue + */ +export interface FacetValue { +} +/** + * + * @export + * @interface Finished + */ +export interface Finished { +} +/** + * + * @export + * @interface GeoIPInformation + */ +export interface GeoIPInformation { + /** + * + * @type {number} + * @memberof GeoIPInformation + */ + 'geoname_id'?: number | null; + /** + * + * @type {string} + * @memberof GeoIPInformation + */ + 'continent_code'?: string | null; + /** + * + * @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; + /** + * + * @type {string} + * @memberof GeoIPInformation + */ + 'country_name'?: string | null; + /** + * + * @type {string} + * @memberof GeoIPInformation + */ + 'subdivision_1_iso'?: string | null; + /** + * + * @type {string} + * @memberof 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 + */ + 'autonomous_system_number'?: number | null; + /** + * + * @type {string} + * @memberof 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 {UserType} + * @memberof GeoIPInformation + */ + 'user_type'?: UserType | 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; +} + + +/** + * + * @export + * @interface HTTPValidationError + */ +export interface HTTPValidationError { + /** + * + * @type {Array} + * @memberof HTTPValidationError + */ + 'detail'?: Array; +} +/** + * + * @export + * @enum {string} + */ + +export const IntegrationMode = { + Platform: 'platform', + PassThrough: 'pass_through' +} as const; + +export type IntegrationMode = typeof IntegrationMode[keyof typeof IntegrationMode]; + + +/** + * A leaderboard exists independently for each product_id in each country. Each country is associated with a single timezone. There is a daily, weekly, and monthly leaderboard. + * @export + * @interface Leaderboard + */ +export interface Leaderboard { + /** + * Unique ID for this leaderboard + * @type {string} + * @memberof Leaderboard + */ + 'id'?: string; + /** + * Descriptive name for the leaderboard based on the board_code + * @type {string} + * @memberof Leaderboard + */ + 'name'?: string; + /** + * The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @type {LeaderboardCode} + * @memberof Leaderboard + */ + 'board_code': LeaderboardCode; + /** + * product_id + * @type {string} + * @memberof Leaderboard + */ + 'bpid': string; + /** + * The country this leaderboard is for. + * @type {string} + * @memberof Leaderboard + */ + 'country_iso': string; + /** + * The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @type {LeaderboardFrequency} + * @memberof Leaderboard + */ + 'freq': LeaderboardFrequency; + /** + * The timezone for the requested country + * @type {string} + * @memberof Leaderboard + */ + 'timezone_name'?: string; + /** + * + * @type {string} + * @memberof Leaderboard + */ + 'sort_order'?: LeaderboardSortOrderEnum; + /** + * The total number of rows in the leaderboard. + * @type {number} + * @memberof Leaderboard + */ + 'row_count': number; + /** + * + * @type {Array} + * @memberof Leaderboard + */ + 'rows'?: Array; + /** + * The start of the time period covered by this board in local time, tz-aware + * @type {string} + * @memberof Leaderboard + */ + 'period_start_local': string; + /** + * The end of the time period covered by this board in local time, tz-aware + * @type {string} + * @memberof Leaderboard + */ + 'period_end_local'?: string; + /** + * (unix timestamp) The start time of the time range this leaderboard covers. + * @type {number} + * @memberof Leaderboard + */ + 'start_timestamp': number; + /** + * (unix timestamp) The end time of the time range this leaderboard covers. + * @type {number} + * @memberof Leaderboard + */ + 'end_timestamp': number; + /** + * The UTC offset for the timezone + * @type {string} + * @memberof Leaderboard + */ + 'utc_offset': string; + /** + * The start time of the time range this leaderboard covers (local time, in the leaderboard\'s timezone). + * @type {string} + * @memberof Leaderboard + */ + 'local_start_time': string; + /** + * The end time of the time range this leaderboard covers (local time, in the leaderboard\'s timezone). + * @type {string} + * @memberof Leaderboard + */ + 'local_end_time': string; + /** + * A formatted string for time period covered by this leaderboard. Can be used to display to users. + * @type {string} + * @memberof Leaderboard + */ + 'start_end_str': string; +} + +export const LeaderboardSortOrderEnum = { + Ascending: 'ascending', + Descending: 'descending' +} as const; + +export type LeaderboardSortOrderEnum = typeof LeaderboardSortOrderEnum[keyof typeof LeaderboardSortOrderEnum]; + +/** + * The type of leaderboard. What the \"values\" represent. + * @export + * @enum {string} + */ + +export const LeaderboardCode = { + CompleteCount: 'complete_count', + LargestUserPayout: 'largest_user_payout', + SumUserPayout: 'sum_user_payout' +} as const; + +export type LeaderboardCode = typeof LeaderboardCode[keyof typeof LeaderboardCode]; + + +/** + * + * @export + * @interface LeaderboardContestUserView + */ +export interface LeaderboardContestUserView { + /** + * Name of contest. Can be displayed to user. + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'name': string; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'contest_type'?: LeaderboardContestUserViewContestTypeEnum; + /** + * + * @type {ContestEndCondition} + * @memberof LeaderboardContestUserView + */ + 'end_condition'?: ContestEndCondition; + /** + * + * @type {Array} + * @memberof LeaderboardContestUserView + */ + 'prizes'?: Array; + /** + * When the contest starts + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'starts_at'?: string; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'terms_and_conditions'?: string | null; + /** + * + * @type {ContestStatus} + * @memberof LeaderboardContestUserView + */ + 'status'?: ContestStatus; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'country_isos'?: string | null; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'uuid'?: string; + /** + * Contest applies only to a single BP + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'product_id': string; + /** + * When this contest was created + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'created_at'?: string; + /** + * When this contest was last modified. Does not include entries being created/modified + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'ended_at'?: string | null; + /** + * + * @type {ContestEndReason} + * @memberof LeaderboardContestUserView + */ + 'end_reason'?: ContestEndReason | null; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'product_user_id': string; + /** + * The prizes won in this contest by the requested user + * @type {Array} + * @memberof LeaderboardContestUserView + */ + 'user_winnings'?: Array; + /** + * The specific leaderboard instance this contest is connected to + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'leaderboard_key': string; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'tie_break_strategy'?: LeaderboardContestUserViewTieBreakStrategyEnum; + /** + * + * @type {string} + * @memberof LeaderboardContestUserView + */ + 'country_iso': string; + /** + * + * @type {number} + * @memberof LeaderboardContestUserView + */ + 'user_rank': number | null; +} + +export const LeaderboardContestUserViewContestTypeEnum = { + Leaderboard: 'leaderboard' +} as const; + +export type LeaderboardContestUserViewContestTypeEnum = typeof LeaderboardContestUserViewContestTypeEnum[keyof typeof LeaderboardContestUserViewContestTypeEnum]; +export const LeaderboardContestUserViewTieBreakStrategyEnum = { + SplitPrizePool: 'split_prize_pool' +} as const; + +export type LeaderboardContestUserViewTieBreakStrategyEnum = typeof LeaderboardContestUserViewTieBreakStrategyEnum[keyof typeof LeaderboardContestUserViewTieBreakStrategyEnum]; + +/** + * The time period range for the leaderboard. + * @export + * @enum {string} + */ + +export const LeaderboardFrequency = { + Daily: 'daily', + Weekly: 'weekly', + Monthly: 'monthly' +} as const; + +export type LeaderboardFrequency = typeof LeaderboardFrequency[keyof typeof LeaderboardFrequency]; + + +/** + * + * @export + * @interface LeaderboardResponse + */ +export interface LeaderboardResponse { + /** + * The status of the API response. + * @type {string} + * @memberof LeaderboardResponse + */ + 'status': LeaderboardResponseStatusEnum; + /** + * + * @type {string} + * @memberof LeaderboardResponse + */ + 'msg'?: string | null; + /** + * + * @type {Leaderboard} + * @memberof LeaderboardResponse + */ + 'leaderboard': Leaderboard; +} + +export const LeaderboardResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type LeaderboardResponseStatusEnum = typeof LeaderboardResponseStatusEnum[keyof typeof LeaderboardResponseStatusEnum]; + +/** + * + * @export + * @interface LeaderboardRow + */ +export interface LeaderboardRow { + /** + * product_user_id + * @type {string} + * @memberof LeaderboardRow + */ + 'bpuid': string; + /** + * The numerical data ranks (1 through n) of the values. Ties are ranked using the lowest rank in the group. + * @type {number} + * @memberof LeaderboardRow + */ + 'rank': number; + /** + * The value. The meaning of the value is dependent on the LeaderboardCode. + * @type {number} + * @memberof LeaderboardRow + */ + 'value': number; +} +/** + * + * @export + * @interface LeaderboardWinner + */ +export interface LeaderboardWinner { + /** + * The user\'s final rank in the leaderboard + * @type {number} + * @memberof LeaderboardWinner + */ + 'rank': number; + /** + * The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @type {LeaderboardFrequency} + * @memberof LeaderboardWinner + */ + 'freq': LeaderboardFrequency; + /** + * The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @type {LeaderboardCode} + * @memberof LeaderboardWinner + */ + 'board_code': LeaderboardCode; + /** + * The country this leaderboard is for. + * @type {string} + * @memberof LeaderboardWinner + */ + 'country_iso': string; + /** + * When the prize was issued. + * @type {string} + * @memberof LeaderboardWinner + */ + 'issued': string; + /** + * product_user_id + * @type {string} + * @memberof LeaderboardWinner + */ + 'bpuid': string; + /** + * + * @type {string} + * @memberof LeaderboardWinner + */ + 'description': string; + /** + * (USD cents) The reward amount + * @type {number} + * @memberof LeaderboardWinner + */ + 'amount': number; + /** + * The amount as a formatted string in USD. Can be displayed to the user. + * @type {string} + * @memberof LeaderboardWinner + */ + 'amount_str': string; + /** + * When the leaderboard started + * @type {string} + * @memberof LeaderboardWinner + */ + 'contest_start': string; + /** + * When the leaderboard ended + * @type {string} + * @memberof LeaderboardWinner + */ + 'contest_end': string; +} + + +/** + * + * @export + * @interface LeaderboardWinnerResponse + */ +export interface LeaderboardWinnerResponse { + /** + * The status of the API response. + * @type {string} + * @memberof LeaderboardWinnerResponse + */ + 'status': LeaderboardWinnerResponseStatusEnum; + /** + * + * @type {string} + * @memberof LeaderboardWinnerResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array} + * @memberof LeaderboardWinnerResponse + */ + 'winners'?: Array; +} + +export const LeaderboardWinnerResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type LeaderboardWinnerResponseStatusEnum = typeof LeaderboardWinnerResponseStatusEnum[keyof typeof LeaderboardWinnerResponseStatusEnum]; + +/** + * + * @export + * @interface LedgerAccount + */ +export interface LedgerAccount { + /** + * A unique identifier for this Ledger Account + * @type {string} + * @memberof LedgerAccount + */ + 'uuid'?: string; + /** + * Human-readable description of the Ledger Account + * @type {string} + * @memberof LedgerAccount + */ + 'display_name': string; + /** + * + * @type {string} + * @memberof LedgerAccount + */ + 'qualified_name': string; + /** + * - `bp_commission` = BP_COMMISSION - `bp_wallet` = BP_WALLET - `user_wallet` = USER_WALLET - `cash` = CASH - `revenue` = REVENUE - `expense` = EXPENSE - `contest_wallet` = CONTEST_WALLET - `credit_line` = CREDIT_LINE - `wa_wallet` = WA_WALLET - `wa_budget_pool` = WA_BUDGET_POOL - `wa_held` = WA_HELD - `wa_credit_line` = WA_CREDIT_LINE + * @type {AccountType} + * @memberof LedgerAccount + */ + 'account_type': AccountType; + /** + * - `-1` = CREDIT - `1` = DEBIT + * @type {Direction} + * @memberof LedgerAccount + */ + 'normal_balance': Direction; + /** + * + * @type {string} + * @memberof LedgerAccount + */ + 'reference_type'?: string | null; + /** + * + * @type {string} + * @memberof LedgerAccount + */ + 'reference_uuid'?: string | null; + /** + * 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. + * @type {string} + * @memberof LedgerAccount + */ + 'currency'?: string; +} + + +/** + * + * @export + * @interface LedgerEntry + */ +export interface LedgerEntry { + /** + * + * @type {number} + * @memberof LedgerEntry + */ + 'id'?: number | null; + /** + * + * @type {Direction} + * @memberof LedgerEntry + */ + 'direction': Direction; + /** + * + * @type {string} + * @memberof LedgerEntry + */ + 'account_uuid': string; + /** + * The USDCent amount. A LedgerEntry cannot be made for0 USDCent and it cannot be negative. + * @type {number} + * @memberof LedgerEntry + */ + 'amount': number; + /** + * + * @type {number} + * @memberof LedgerEntry + */ + 'transaction_id'?: number | null; +} + + +/** + * + * @export + * @interface LedgerTransaction + */ +export interface LedgerTransaction { + /** + * + * @type {number} + * @memberof LedgerTransaction + */ + 'id'?: number | null; + /** + * 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 + * @type {string} + * @memberof LedgerTransaction + */ + 'created'?: string; + /** + * + * @type {string} + * @memberof LedgerTransaction + */ + 'ext_description'?: string | null; + /** + * + * @type {string} + * @memberof LedgerTransaction + */ + 'tag'?: string | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof LedgerTransaction + */ + 'metadata'?: { [key: string]: string; }; + /** + * A Transaction (TX) is composed of multiple Entry events. + * @type {Array} + * @memberof LedgerTransaction + */ + 'entries'?: Array; +} +/** + * + * @export + * @interface ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ +export interface ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner { + /** + * Name of contest. Can be displayed to user. + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'name': string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'contest_type'?: ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerContestTypeEnum; + /** + * + * @type {MilestoneContestEndCondition} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'end_condition': MilestoneContestEndCondition; + /** + * + * @type {Array} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'prizes'?: Array; + /** + * When the contest starts + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'starts_at'?: string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'terms_and_conditions'?: string; + /** + * + * @type {ContestStatus} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'status'?: ContestStatus; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'country_isos'?: string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'uuid'?: string; + /** + * Contest applies only to a single BP + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'product_id': string; + /** + * When this contest was created + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'created_at'?: string; + /** + * When this contest was last modified. Does not include entries being created/modified + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'ended_at'?: string; + /** + * + * @type {ContestEndReason} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'end_reason'?: ContestEndReason; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'product_user_id': string; + /** + * The prizes won in this contest by the requested user + * @type {Array} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'user_winnings'?: Array; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'entry_type'?: ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerEntryTypeEnum; + /** + * + * @type {ContestEntryRule} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'entry_rule'?: ContestEntryRule; + /** + * + * @type {CurrentAmount} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'current_amount'?: CurrentAmount; + /** + * Count of unique participants + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'current_participants'?: number; + /** + * The total amount for this user for this contest + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'user_amount': number; + /** + * + * @type {UserAmountToday} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'user_amount_today': UserAmountToday; + /** + * Probability of this user winning 1 or more prizes, if the contestended right now + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'current_win_probability': number; + /** + * + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'projected_win_probability': number; + /** + * The specific leaderboard instance this contest is connected to + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'leaderboard_key': string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'tie_break_strategy'?: ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerTieBreakStrategyEnum; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'country_iso': string; + /** + * + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'user_rank': number; + /** + * Each user \'wins\' (receives prizes) once this target amount is reached. + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'target_amount': number; + /** + * + * @type {ContestEntryTrigger} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'entry_trigger'?: ContestEntryTrigger; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'valid_for'?: string; + /** + * + * @type {string} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'valid_for_event'?: ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum; + /** + * The number of times the milestone has been reached. + * @type {number} + * @memberof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInner + */ + 'win_count'?: number; +} + +export const ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerContestTypeEnum = { + Milestone: 'milestone' +} as const; + +export type ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerContestTypeEnum = typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerContestTypeEnum[keyof typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerContestTypeEnum]; +export const ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerEntryTypeEnum = { + Count: 'count' +} as const; + +export type ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerEntryTypeEnum = typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerEntryTypeEnum[keyof typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerEntryTypeEnum]; +export const ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerTieBreakStrategyEnum = { + SplitPrizePool: 'split_prize_pool' +} as const; + +export type ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerTieBreakStrategyEnum = typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerTieBreakStrategyEnum[keyof typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerTieBreakStrategyEnum]; +export const ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum = { + Signup: 'signup' +} as const; + +export type ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum = typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum[keyof typeof ListContestsUserEnteredProductIdContestUserProductUserIdEnteredGet200ResponseInnerValidForEventEnum]; + +/** + * This is used solely in API responses, so it is simplified. + * @export + * @interface MarketProfileKnowledge + */ +export interface MarketProfileKnowledge { + /** + * Marketplace this question is from + * @type {Source} + * @memberof MarketProfileKnowledge + */ + 'source': Source; + /** + * + * @type {string} + * @memberof MarketProfileKnowledge + */ + 'question_id': string; + /** + * + * @type {Array} + * @memberof MarketProfileKnowledge + */ + 'answer'?: Array; + /** + * When the User submitted this Profiling data + * @type {string} + * @memberof MarketProfileKnowledge + */ + 'created': string; +} + + +/** + * + * @export + * @interface MarketplaceBucket + */ +export interface MarketplaceBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof MarketplaceBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof MarketplaceBucket + */ + 'uri': string; + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * @type {number} + * @memberof MarketplaceBucket + */ + 'x'?: number; + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * @type {number} + * @memberof MarketplaceBucket + */ + 'y'?: number; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof MarketplaceBucket + */ + 'name'?: string; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof MarketplaceBucket + */ + 'description'?: string; + /** + * + * @type {Array} + * @memberof MarketplaceBucket + */ + 'category'?: Array; + /** + * + * @type {Array} + * @memberof MarketplaceBucket + */ + 'contents': Array; + /** + * + * @type {DurationSummary} + * @memberof MarketplaceBucket + */ + 'duration': DurationSummary; + /** + * + * @type {PayoutSummary} + * @memberof MarketplaceBucket + */ + 'payout': PayoutSummary; + /** + * this is the source of the contents + * @type {string} + * @memberof MarketplaceBucket + */ + 'source': MarketplaceBucketSourceEnum; +} + +export const MarketplaceBucketSourceEnum = { + Innovate: 'innovate', + Dynata: 'dynata', + Schlesinger: 'schlesinger', + Purespectrum: 'purespectrum', + Morning: 'morning', + Pollfish: 'pollfish', + Precision: 'precision', + Repdata: 'repdata', + Prodege: 'prodege' +} as const; + +export type MarketplaceBucketSourceEnum = typeof MarketplaceBucketSourceEnum[keyof typeof MarketplaceBucketSourceEnum]; + +/** + * + * @export + * @interface MarketplaceInventorySummary + */ +export interface MarketplaceInventorySummary { + /** + * The count of tasks that are currently live + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'live_tasks'?: Array; + /** + * The count of gen-pop tasks that are currently live + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'live_gen_pop_tasks'?: Array; + /** + * The count of tasks created + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'tasks_created'?: Array; + /** + * Number of finishes needed across all live tasks + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'required_finishes'?: Array; + /** + * The distribution of payouts for all live tasks + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'payout'?: Array; + /** + * The distribution of expected durations for all live tasks + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'expected_duration'?: Array; + /** + * The distribution of required finishes on all live tasks + * @type {Array} + * @memberof MarketplaceInventorySummary + */ + 'required_finishes_per_task'?: Array; +} +/** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. Offerwall code: `5fa23085` + * @export + * @interface MarketplaceOfferwall + */ +export interface MarketplaceOfferwall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof MarketplaceOfferwall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof MarketplaceOfferwall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof MarketplaceOfferwall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof MarketplaceOfferwall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof MarketplaceOfferwall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface MarketplaceOfferwallResponse + */ +export interface MarketplaceOfferwallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof MarketplaceOfferwallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {MarketplaceOfferwall} + * @memberof MarketplaceOfferwallResponse + */ + 'offerwall': MarketplaceOfferwall; +} +/** + * + * @export + * @interface MarketplaceSummary + */ +export interface MarketplaceSummary { + /** + * Inventory of the marketplace + * @type {MarketplaceInventorySummary} + * @memberof MarketplaceSummary + */ + 'inventory': MarketplaceInventorySummary; + /** + * + * @type {string} + * @memberof MarketplaceSummary + */ + 'user_activity'?: string | null; +} +/** + * Maximum total value of entries per user + * @export + * @interface MaxEntryAmountPerUser + */ +export interface MaxEntryAmountPerUser { +} +/** + * + * @export + * @interface MaxGaugeBySource + */ +export interface MaxGaugeBySource { + /** + * + * @type {number} + * @memberof MaxGaugeBySource + */ + 'value'?: number | null; + /** + * + * @type {{ [key: string]: number; }} + * @memberof MaxGaugeBySource + */ + 'by_source'?: { [key: string]: number; }; +} +/** + * Defines the conditions to evaluate to determine when the contest is over. Multiple conditions can be set. The contest is over once ANY conditions are met. + * @export + * @interface MilestoneContestEndCondition + */ +export interface MilestoneContestEndCondition { + /** + * + * @type {number} + * @memberof MilestoneContestEndCondition + */ + 'max_winners'?: number | null; + /** + * + * @type {string} + * @memberof MilestoneContestEndCondition + */ + 'ends_at'?: string | null; +} +/** + * + * @export + * @interface MilestoneUserView + */ +export interface MilestoneUserView { + /** + * Each user \'wins\' (receives prizes) once this target amount is reached. + * @type {number} + * @memberof MilestoneUserView + */ + 'target_amount': number; + /** + * + * @type {ContestEntryTrigger} + * @memberof MilestoneUserView + */ + 'entry_trigger'?: ContestEntryTrigger | null; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'valid_for'?: string | null; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'valid_for_event'?: MilestoneUserViewValidForEventEnum | null; + /** + * Name of contest. Can be displayed to user. + * @type {string} + * @memberof MilestoneUserView + */ + 'name': string; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'contest_type'?: MilestoneUserViewContestTypeEnum; + /** + * + * @type {MilestoneContestEndCondition} + * @memberof MilestoneUserView + */ + 'end_condition': MilestoneContestEndCondition; + /** + * + * @type {Array} + * @memberof MilestoneUserView + */ + 'prizes'?: Array; + /** + * When the contest starts + * @type {string} + * @memberof MilestoneUserView + */ + 'starts_at'?: string; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'terms_and_conditions'?: string | null; + /** + * + * @type {ContestStatus} + * @memberof MilestoneUserView + */ + 'status'?: ContestStatus; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'country_isos'?: string | null; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'uuid'?: string; + /** + * Contest applies only to a single BP + * @type {string} + * @memberof MilestoneUserView + */ + 'product_id': string; + /** + * When this contest was created + * @type {string} + * @memberof MilestoneUserView + */ + 'created_at'?: string; + /** + * When this contest was last modified. Does not include entries being created/modified + * @type {string} + * @memberof MilestoneUserView + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'ended_at'?: string | null; + /** + * + * @type {ContestEndReason} + * @memberof MilestoneUserView + */ + 'end_reason'?: ContestEndReason | null; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'product_user_id': string; + /** + * The prizes won in this contest by the requested user + * @type {Array} + * @memberof MilestoneUserView + */ + 'user_winnings'?: Array; + /** + * + * @type {string} + * @memberof MilestoneUserView + */ + 'entry_type'?: MilestoneUserViewEntryTypeEnum; + /** + * The number of times the milestone has been reached. + * @type {number} + * @memberof MilestoneUserView + */ + 'win_count'?: number; + /** + * The total amount for this user for this contest + * @type {number} + * @memberof MilestoneUserView + */ + 'user_amount': number; +} + +export const MilestoneUserViewValidForEventEnum = { + Signup: 'signup' +} as const; + +export type MilestoneUserViewValidForEventEnum = typeof MilestoneUserViewValidForEventEnum[keyof typeof MilestoneUserViewValidForEventEnum]; +export const MilestoneUserViewContestTypeEnum = { + Milestone: 'milestone' +} as const; + +export type MilestoneUserViewContestTypeEnum = typeof MilestoneUserViewContestTypeEnum[keyof typeof MilestoneUserViewContestTypeEnum]; +export const MilestoneUserViewEntryTypeEnum = { + Count: 'count' +} as const; + +export type MilestoneUserViewEntryTypeEnum = typeof MilestoneUserViewEntryTypeEnum[keyof typeof MilestoneUserViewEntryTypeEnum]; + +/** + * + * @export + * @interface OfferWallCategoryRequest + */ +export interface OfferWallCategoryRequest { + /** + * + * @type {Array} + * @memberof OfferWallCategoryRequest + */ + 'adwords_category'?: Array | null; + /** + * + * @type {Array} + * @memberof OfferWallCategoryRequest + */ + 'category'?: Array | null; + /** + * + * @type {Array} + * @memberof OfferWallCategoryRequest + */ + 'exclude_adwords_category'?: Array | null; + /** + * + * @type {Array} + * @memberof OfferWallCategoryRequest + */ + 'exclude_category'?: Array | null; +} +/** + * + * @export + * @interface OfferWallInfo + */ +export interface OfferWallInfo { + /** + * + * @type {boolean} + * @memberof OfferWallInfo + */ + 'success': boolean; +} +/** + * + * @export + * @interface OfferWallRequestYieldmanParams + */ +export interface OfferWallRequestYieldmanParams { + /** + * Centered around 0. Higher results in higher weight given to conversion (in the scoring function) + * @type {number} + * @memberof OfferWallRequestYieldmanParams + */ + 'conversion_factor_adj'?: number; + /** + * Centered around 0. Higher results in higher penalty given to dropoffs (in the scoring function) + * @type {number} + * @memberof OfferWallRequestYieldmanParams + */ + 'dropoffrate_factor_adj'?: number; + /** + * Centered around 0. Higher results in higher penalty given to long fail (in the scoring function) + * @type {number} + * @memberof OfferWallRequestYieldmanParams + */ + 'longfail_factor_adj'?: number; + /** + * Centered around 0. Higher results in higher penalty given to recons (in the scoring function) + * @type {number} + * @memberof OfferWallRequestYieldmanParams + */ + 'recon_factor_adj'?: number; + /** + * Tolerance for recon likelihood (0 to 1) + * @type {number} + * @memberof OfferWallRequestYieldmanParams + */ + 'recon_likelihood_max'?: number; +} +/** + * + * @export + * @enum {string} + */ + +export const OfferwallReason = { + UserBlocked: 'USER_BLOCKED', + HighReconRate: 'HIGH_RECON_RATE', + UncommonDemographics: 'UNCOMMON_DEMOGRAPHICS', + UnderMinimumAge: 'UNDER_MINIMUM_AGE', + ExhaustedHighValueSupply: 'EXHAUSTED_HIGH_VALUE_SUPPLY', + AllEligibleAttempted: 'ALL_ELIGIBLE_ATTEMPTED', + LowCurrentSupply: 'LOW_CURRENT_SUPPLY' +} as const; + +export type OfferwallReason = typeof OfferwallReason[keyof typeof OfferwallReason]; + + +/** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. Offerwall code: `6f27b1ae` + * @export + * @interface OneShotOfferwall + */ +export interface OneShotOfferwall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof OneShotOfferwall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof OneShotOfferwall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof OneShotOfferwall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof OneShotOfferwall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof OneShotOfferwall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface OneShotOfferwallBucket + */ +export interface OneShotOfferwallBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof OneShotOfferwallBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof OneShotOfferwallBucket + */ + 'uri': string; + /** + * The bucket\'s expected duration, in seconds + * @type {number} + * @memberof OneShotOfferwallBucket + */ + 'duration': number; + /** + * The bucket\'s min payout, in usd cents + * @type {number} + * @memberof OneShotOfferwallBucket + */ + 'min_payout': number; +} +/** + * + * @export + * @interface OneShotOfferwallResponse + */ +export interface OneShotOfferwallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof OneShotOfferwallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {OneShotOfferwall} + * @memberof OneShotOfferwallResponse + */ + 'offerwall': OneShotOfferwall; +} +/** + * Stores payout-type-specific order information that is returned from the external payout provider. + * @export + * @interface OrderData + */ +export interface OrderData { + /** + * + * @type {string} + * @memberof OrderData + */ + 'type'?: OrderDataTypeEnum; + /** + * + * @type {number} + * @memberof OrderData + */ + 'shipping_cost': number; + /** + * + * @type {string} + * @memberof OrderData + */ + 'tracking_number'?: string; + /** + * + * @type {ShippingMethod} + * @memberof OrderData + */ + 'shipping_method'?: ShippingMethod; + /** + * + * @type {ShippingCarrier} + * @memberof OrderData + */ + 'carrier'?: ShippingCarrier; + /** + * + * @type {string} + * @memberof OrderData + */ + 'ship_date'?: string; + /** + * + * @type {string} + * @memberof OrderData + */ + 'estimated_delivery_date'?: string; + /** + * + * @type {DeliveryStatus} + * @memberof OrderData + */ + 'delivery_status'?: DeliveryStatus; + /** + * + * @type {string} + * @memberof OrderData + */ + 'last_updated'?: string; +} + +export const OrderDataTypeEnum = { + CashInMail: 'CASH_IN_MAIL' +} as const; + +export type OrderDataTypeEnum = typeof OrderDataTypeEnum[keyof typeof OrderDataTypeEnum]; + +/** + * 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 + */ +export interface POPFinancial { + /** + * + * @type {string} + * @memberof POPFinancial + */ + 'product_id'?: string | null; + /** + * 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. + * @type {string} + * @memberof POPFinancial + */ + 'time': string; + /** + * The total amount (in USD cents) that the Brokerage Producthas earned within a respective time period. + * @type {number} + * @memberof POPFinancial + */ + 'payout'?: number; + /** + * 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. + * @type {number} + * @memberof POPFinancial + */ + 'adjustment': number; + /** + * + * @type {Array} + * @memberof POPFinancial + */ + 'adjustment_types': Array; + /** + * 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. + * @type {number} + * @memberof POPFinancial + */ + 'expense': number; + /** + * This is the sum of the Payout total, Adjustment and any Expenses total. It can be positive or negative for any specific time period. + * @type {number} + * @memberof POPFinancial + */ + 'net': number; + /** + * Any ACH or Wire amount that was issued between GRL and the Supplier. + * @type {number} + * @memberof POPFinancial + */ + 'payment': number; +} +/** + * + * @export + * @interface PatternValidation + */ +export interface PatternValidation { + /** + * Message to display if validation fails + * @type {string} + * @memberof PatternValidation + */ + 'message': string; + /** + * Regex string to validate. min_length and max_length are checked separately, even if they are part of the regex. + * @type {string} + * @memberof PatternValidation + */ + 'pattern': string; +} +/** + * @type Payload + * @export + */ +export type Payload = { event_type: 'session.enter' } & SessionEnterPayload | { event_type: 'session.finish' } & SessionFinishPayload | { event_type: 'task.enter' } & TaskEnterPayload | { event_type: 'task.finish' } & TaskFinishPayload; + +/** + * Store configuration related to payouts, payout transformation, and user payout formatting. + * @export + * @interface PayoutConfig + */ +export interface PayoutConfig { + /** + * + * @type {string} + * @memberof PayoutConfig + */ + 'payout_format'?: string | null; + /** + * + * @type {PayoutTransformation} + * @memberof PayoutConfig + */ + 'payout_transformation'?: PayoutTransformation | null; +} +/** + * The max size of the db field that holds this value is 20, so please don\'t add new values longer than that! + * @export + * @enum {string} + */ + +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]; + + +/** + * Payouts are in Integer USD Cents + * @export + * @interface PayoutSummary + */ +export interface PayoutSummary { + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'min': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'max': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'mean'?: number | null; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'q1': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'q2': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'q3': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'lower_whisker': number; + /** + * + * @type {number} + * @memberof PayoutSummary + */ + 'upper_whisker': number; +} +/** + * This model describe how the bp_payout is converted to the user_payout. If None, the user_payout is None. If the user_wallet_enabled is `False`, the user_payout is used to 1) know how to transform the expected payouts for offerwall buckets (if min_payout is requested, this is based on the user_payout) 2) show the user (using the payout_format) how much they made (in the Task Status Response). If the user_wallet_enabled is `True`, then in addition to the above, the user_payout is the amount actually paid to the user\'s wallet. + * @export + * @interface PayoutTransformation + */ +export interface PayoutTransformation { + /** + * The name of the transformation function to use. + * @type {string} + * @memberof PayoutTransformation + */ + 'f': PayoutTransformationFEnum; + /** + * + * @type {PayoutTransformationPercentArgs} + * @memberof PayoutTransformation + */ + 'kwargs'?: PayoutTransformationPercentArgs | null; +} + +export const PayoutTransformationFEnum = { + PayoutTransformationPercent: 'payout_transformation_percent', + PayoutTransformationAmt: 'payout_transformation_amt' +} as const; + +export type PayoutTransformationFEnum = typeof PayoutTransformationFEnum[keyof typeof PayoutTransformationFEnum]; + +/** + * + * @export + * @interface PayoutTransformationPercentArgs + */ +export interface PayoutTransformationPercentArgs { + /** + * The percentage of the bp_payout to pay the user + * @type {number} + * @memberof PayoutTransformationPercentArgs + */ + 'pct': number; + /** + * + * @type {string} + * @memberof PayoutTransformationPercentArgs + */ + 'min_payout'?: string | null; + /** + * + * @type {string} + * @memberof PayoutTransformationPercentArgs + */ + 'max_payout'?: string | null; +} +/** + * The method in which the requested payout is delivered. + * @export + * @enum {string} + */ + +export const PayoutType = { + Paypal: 'PAYPAL', + Tango: 'TANGO', + 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]; + + +/** + * + * @export + * @interface PaypalCashoutMethodData + */ +export interface PaypalCashoutMethodData { + /** + * + * @type {string} + * @memberof PaypalCashoutMethodData + */ + 'type'?: PaypalCashoutMethodDataTypeEnum; + /** + * Email address of the paypal user + * @type {string} + * @memberof PaypalCashoutMethodData + */ + 'email': string; +} + +export const PaypalCashoutMethodDataTypeEnum = { + Paypal: 'PAYPAL' +} as const; + +export type PaypalCashoutMethodDataTypeEnum = typeof PaypalCashoutMethodDataTypeEnum[keyof typeof PaypalCashoutMethodDataTypeEnum]; + +/** + * + * @export + * @interface PingMessage + */ +export interface PingMessage { + /** + * + * @type {string} + * @memberof PingMessage + */ + 'kind'?: PingMessageKindEnum; + /** + * + * @type {string} + * @memberof PingMessage + */ + 'timestamp'?: string; +} + +export const PingMessageKindEnum = { + Ping: 'ping' +} as const; + +export type PingMessageKindEnum = typeof PingMessageKindEnum[keyof typeof PingMessageKindEnum]; + +/** + * + * @export + * @interface PongMessage + */ +export interface PongMessage { + /** + * + * @type {string} + * @memberof PongMessage + */ + 'kind'?: PongMessageKindEnum; + /** + * + * @type {string} + * @memberof PongMessage + */ + 'timestamp'?: string; +} + +export const PongMessageKindEnum = { + Pong: 'pong' +} as const; + +export type PongMessageKindEnum = typeof PongMessageKindEnum[keyof typeof PongMessageKindEnum]; + +/** + * + * @export + * @interface Product + */ +export interface Product { + /** + * Unique identifier of the Brokerage Product + * @type {string} + * @memberof Product + */ + 'id'?: string; + /** + * Name of the Brokerage Product. Must be unique within a Team + * @type {string} + * @memberof Product + */ + 'name': string; + /** + * This is only used to hard block a Product in order to immediately & safely protect against fraud entrances. + * @type {boolean} + * @memberof Product + */ + 'enabled'?: boolean; + /** + * This is only to determine if ACH or Wire payments should be made to the Produce. + * @type {boolean} + * @memberof Product + */ + 'payments_enabled'?: boolean; + /** + * + * @type {string} + * @memberof Product + */ + 'created'?: string | null; + /** + * + * @type {string} + * @memberof Product + */ + 'team_id'?: string | null; + /** + * + * @type {string} + * @memberof Product + */ + 'business_id'?: string | null; + /** + * Tags which are used to annotate supplier traffic + * @type {Set} + * @memberof Product + */ + 'tags'?: Set; + /** + * + * @type {string} + * @memberof Product + */ + 'commission_pct'?: string; + /** + * 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\'. + * @type {string} + * @memberof Product + */ + 'redirect_url': string; + /** + * 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). + * @type {string} + * @memberof Product + */ + 'harmonizer_domain'?: string; + /** + * + * @type {SourcesConfig} + * @memberof Product + */ + 'sources_config'?: SourcesConfig; + /** + * + * @type {SessionConfig} + * @memberof Product + */ + 'session_config'?: SessionConfig; + /** + * + * @type {PayoutConfig} + * @memberof Product + */ + 'payout_config'?: PayoutConfig; + /** + * + * @type {UserWalletConfig} + * @memberof Product + */ + 'user_wallet_config'?: UserWalletConfig; + /** + * + * @type {UserCreateConfig} + * @memberof Product + */ + 'user_create_config'?: UserCreateConfig; + /** + * + * @type {object} + * @memberof Product + */ + 'offerwall_config'?: object; + /** + * + * @type {ProfilingConfig} + * @memberof Product + */ + 'profiling_config'?: ProfilingConfig; + /** + * + * @type {UserHealthConfig} + * @memberof Product + */ + 'user_health_config'?: UserHealthConfig; + /** + * + * @type {YieldManConfig} + * @memberof Product + */ + 'yield_man_config'?: YieldManConfig; + /** + * + * @type {ProductBalances} + * @memberof Product + */ + 'balance'?: ProductBalances | null; + /** + * + * @type {string} + * @memberof Product + */ + 'payouts_total_str'?: string | null; + /** + * + * @type {number} + * @memberof Product + */ + 'payouts_total'?: number | null; + /** + * + * @type {Array} + * @memberof Product + */ + 'payouts'?: Array | null; + /** + * + * @type {Array} + * @memberof Product + */ + 'pop_financial'?: Array | null; + /** + * + * @type {LedgerAccount} + * @memberof Product + */ + 'bp_account'?: LedgerAccount | null; + /** + * + * @type {UserWalletConfig} + * @memberof Product + */ + 'user_wallet': UserWalletConfig; +} +/** + * + * @export + * @interface ProductBalances + */ +export interface ProductBalances { + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'product_id'?: string | null; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'last_event'?: string | null; + /** + * The total amount that has been earned by the Task completes, for this Brokerage Product account. + * @type {number} + * @memberof ProductBalances + */ + 'bp_payment_credit'?: number; + /** + * Positive reconciliations issued back to the Brokerage Product account. + * @type {number} + * @memberof ProductBalances + */ + 'adjustment_credit'?: number; + /** + * Negative reconciliations for any Task completes + * @type {number} + * @memberof ProductBalances + */ + 'adjustment_debit'?: number; + /** + * ACH or Wire amounts issued to GRL from a Supplier to recoup for a negative Brokerage Product balance + * @type {number} + * @memberof ProductBalances + */ + 'supplier_credit'?: number; + /** + * ACH or Wire amounts sent to a Supplier + * @type {number} + * @memberof ProductBalances + */ + 'supplier_debit'?: number; + /** + * If a respondent ever pays back an product account. + * @type {number} + * @memberof ProductBalances + */ + 'user_bonus_credit'?: number; + /** + * 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. + * @type {number} + * @memberof ProductBalances + */ + 'user_bonus_debit'?: number; + /** + * 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. + * @type {number} + * @memberof ProductBalances + */ + 'issued_payment'?: number; + /** + * The sum amount of all Task payouts + * @type {number} + * @memberof ProductBalances + */ + 'payout': number; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'payout_usd_str': string; + /** + * The sum amount of all Task Adjustments + * @type {number} + * @memberof ProductBalances + */ + 'adjustment': number; + /** + * The sum amount of any associated Product Expenses (eg: user bonuses) + * @type {number} + * @memberof ProductBalances + */ + 'expense': number; + /** + * 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. + * @type {number} + * @memberof ProductBalances + */ + 'net': number; + /** + * The sum amount of all Supplier Payments (eg ACH or Wire transfers) + * @type {number} + * @memberof ProductBalances + */ + 'payment': number; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'payment_usd_str': string; + /** + * The Product\'s Balance which is equal to the Product\'s Netamount with already issued Supplier Payments deducted. This can be positive or negative. + * @type {number} + * @memberof ProductBalances + */ + 'balance': number; + /** + * 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. + * @type {number} + * @memberof ProductBalances + */ + 'retainer': number; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'retainer_usd_str': string; + /** + * 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. + * @type {number} + * @memberof ProductBalances + */ + 'available_balance': number; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'available_balance_usd_str': string; + /** + * + * @type {number} + * @memberof ProductBalances + */ + 'recoup': number; + /** + * + * @type {string} + * @memberof ProductBalances + */ + 'recoup_usd_str': string; + /** + * The percentage of USDCent value that has been adjustedover all time for this Product. + * @type {number} + * @memberof ProductBalances + */ + 'adjustment_percent': number; +} +/** + * + * @export + * @interface ProfilingConfig + */ +export interface ProfilingConfig { + /** + * If False, the harmonizer/profiling system is not used at all. This should never be False unless special circumstances + * @type {boolean} + * @memberof ProfilingConfig + */ + 'enabled'?: boolean; + /** + * If grs_enabled is False, and is_grs is passed in the profiling-questions call, then don\'t actually return any questions. This allows a client to hit the endpoint with no limit and still get questions. In effect, this means that we\'ll redirect the user through the GRS system but won\'t present them any questions. + * @type {boolean} + * @memberof ProfilingConfig + */ + 'grs_enabled'?: boolean; + /** + * + * @type {number} + * @memberof ProfilingConfig + */ + 'n_questions'?: number | null; + /** + * The max number of questions we would ask in a session + * @type {number} + * @memberof ProfilingConfig + */ + 'max_questions'?: number; + /** + * The average number of questions to ask in a session + * @type {number} + * @memberof ProfilingConfig + */ + 'avg_question_count'?: number; + /** + * Scale how frequently we inject profiling questions, relative to the default.1 is default, 2 is twice as often. 10 means always. 0.5 half as often + * @type {number} + * @memberof ProfilingConfig + */ + 'task_injection_freq_mult'?: number; + /** + * Non-us multiplier, used to increase freq and length of profilers in all non-us countries.This value is multiplied by task_injection_freq_mult and avg_question_count. + * @type {number} + * @memberof ProfilingConfig + */ + 'non_us_mult'?: number; + /** + * How frequently we should refresh hidden questions + * @type {number} + * @memberof ProfilingConfig + */ + 'hidden_questions_expiration_hours'?: number; +} +/** + * + * @export + * @interface ProfilingInfoResponse + */ +export interface ProfilingInfoResponse { + /** + * The status of the API response. + * @type {string} + * @memberof ProfilingInfoResponse + */ + 'status': ProfilingInfoResponseStatusEnum; + /** + * + * @type {string} + * @memberof ProfilingInfoResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array} + * @memberof ProfilingInfoResponse + */ + 'profiling-info': Array; +} + +export const ProfilingInfoResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type ProfilingInfoResponseStatusEnum = typeof ProfilingInfoResponseStatusEnum[keyof typeof ProfilingInfoResponseStatusEnum]; + +/** + * + * @export + * @enum {string} + */ + +export const PropertyType = { + I: 'i', + N: 'n', + X: 'x' +} as const; + +export type PropertyType = typeof PropertyType[keyof typeof PropertyType]; + + +/** + * + * @export + * @interface RaffleUserView + */ +export interface RaffleUserView { + /** + * Name of contest. Can be displayed to user. + * @type {string} + * @memberof RaffleUserView + */ + 'name': string; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'description'?: string | null; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'contest_type'?: RaffleUserViewContestTypeEnum; + /** + * + * @type {ContestEndCondition} + * @memberof RaffleUserView + */ + 'end_condition': ContestEndCondition; + /** + * + * @type {Array} + * @memberof RaffleUserView + */ + 'prizes'?: Array; + /** + * When the contest starts + * @type {string} + * @memberof RaffleUserView + */ + 'starts_at'?: string; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'terms_and_conditions'?: string | null; + /** + * + * @type {ContestStatus} + * @memberof RaffleUserView + */ + 'status'?: ContestStatus; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'country_isos'?: string | null; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'uuid'?: string; + /** + * Contest applies only to a single BP + * @type {string} + * @memberof RaffleUserView + */ + 'product_id': string; + /** + * When this contest was created + * @type {string} + * @memberof RaffleUserView + */ + 'created_at'?: string; + /** + * When this contest was last modified. Does not include entries being created/modified + * @type {string} + * @memberof RaffleUserView + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'ended_at'?: string | null; + /** + * + * @type {ContestEndReason} + * @memberof RaffleUserView + */ + 'end_reason'?: ContestEndReason | null; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'product_user_id': string; + /** + * The prizes won in this contest by the requested user + * @type {Array} + * @memberof RaffleUserView + */ + 'user_winnings'?: Array; + /** + * + * @type {string} + * @memberof RaffleUserView + */ + 'entry_type'?: RaffleUserViewEntryTypeEnum; + /** + * + * @type {ContestEntryRule} + * @memberof RaffleUserView + */ + 'entry_rule'?: ContestEntryRule; + /** + * + * @type {CurrentAmount} + * @memberof RaffleUserView + */ + 'current_amount'?: CurrentAmount; + /** + * Count of unique participants + * @type {number} + * @memberof RaffleUserView + */ + 'current_participants'?: number; + /** + * + * @type {UserAmount} + * @memberof RaffleUserView + */ + 'user_amount': UserAmount; + /** + * + * @type {UserAmountToday} + * @memberof RaffleUserView + */ + 'user_amount_today': UserAmountToday; + /** + * Probability of this user winning 1 or more prizes, if the contestended right now + * @type {number} + * @memberof RaffleUserView + */ + 'current_win_probability': number; + /** + * + * @type {number} + * @memberof RaffleUserView + */ + 'projected_win_probability': number | null; +} + +export const RaffleUserViewContestTypeEnum = { + Raffle: 'raffle' +} as const; + +export type RaffleUserViewContestTypeEnum = typeof RaffleUserViewContestTypeEnum[keyof typeof RaffleUserViewContestTypeEnum]; +export const RaffleUserViewEntryTypeEnum = { + Cash: 'cash' +} as const; + +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 + */ +export interface ReportNotes { +} +/** + * + * @export + * @interface ReportTask + */ +export interface ReportTask { + /** + * The unique identifier for the user, which is set by the Supplier. + * @type {string} + * @memberof ReportTask + */ + 'bpuid': string; + /** + * The reason a user reported a task. Allowed values: - __0__ *(REASON_UNKNOWN)*: Used to indicate the user exited the task without giving feedback - __1__ *(TECHNICAL_ERROR)*: Task is in the wrong language/country, unanswerable question, won\'t proceed to next question, loading forever, error message - __2__ *(NO_REDIRECT)*: Task ended (completed or failed, and showed the user some dialog indicating the task was over), but failed to redirect - __3__ *(PRIVACY_INVASION)*: Asked for full name, home address, identity on another site, cc - __4__ *(UNCOMFORTABLE_TOPICS)*: Asked about children, employer, medical issues, drug use, STDs, etc. - __5__ *(ASKED_FOR_NOT_ALLOWED_ACTION)*: Asked to install software, signup/login to external site, access webcam, promise to pay using external site, etc. - __6__ *(BAD_ON_MOBILE)*: Task doesn\'t work well on a mobile device - __7__ *(DIDNT_LIKE)*: Too long, too boring, confusing, complicated, too many open-ended/free-response questions + * @type {Array} + * @memberof ReportTask + */ + 'reasons'?: Array; + /** + * + * @type {string} + * @memberof ReportTask + */ + 'notes'?: string; +} +/** + * The reason a user reported a task. + * @export + * @enum {number} + */ + +export const ReportValue = { + NUMBER_0: 0, + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, + NUMBER_5: 5, + NUMBER_6: 6, + NUMBER_7: 7 +} as const; + +export type ReportValue = typeof ReportValue[keyof typeof ReportValue]; + + +/** + * + * @export + * @interface ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ +export interface ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet { + /** + * Name of contest. Can be displayed to user. + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'name': string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'description'?: string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'contest_type'?: ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetContestTypeEnum; + /** + * + * @type {MilestoneContestEndCondition} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'end_condition': MilestoneContestEndCondition; + /** + * + * @type {Array} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'prizes'?: Array; + /** + * When the contest starts + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'starts_at'?: string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'terms_and_conditions'?: string; + /** + * + * @type {ContestStatus} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'status'?: ContestStatus; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'country_isos'?: string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'uuid'?: string; + /** + * Contest applies only to a single BP + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'product_id': string; + /** + * When this contest was created + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'created_at'?: string; + /** + * When this contest was last modified. Does not include entries being created/modified + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'updated_at'?: string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'ended_at'?: string; + /** + * + * @type {ContestEndReason} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'end_reason'?: ContestEndReason; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'product_user_id': string; + /** + * The prizes won in this contest by the requested user + * @type {Array} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'user_winnings'?: Array; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'entry_type'?: ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetEntryTypeEnum; + /** + * + * @type {ContestEntryRule} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'entry_rule'?: ContestEntryRule; + /** + * + * @type {CurrentAmount} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'current_amount'?: CurrentAmount; + /** + * Count of unique participants + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'current_participants'?: number; + /** + * The total amount for this user for this contest + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'user_amount': number; + /** + * + * @type {UserAmountToday} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'user_amount_today': UserAmountToday; + /** + * Probability of this user winning 1 or more prizes, if the contestended right now + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'current_win_probability': number; + /** + * + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'projected_win_probability': number; + /** + * The specific leaderboard instance this contest is connected to + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'leaderboard_key': string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'tie_break_strategy'?: ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetTieBreakStrategyEnum; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'country_iso': string; + /** + * + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'user_rank': number; + /** + * Each user \'wins\' (receives prizes) once this target amount is reached. + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'target_amount': number; + /** + * + * @type {ContestEntryTrigger} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'entry_trigger'?: ContestEntryTrigger; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'valid_for'?: string; + /** + * + * @type {string} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'valid_for_event'?: ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetValidForEventEnum; + /** + * The number of times the milestone has been reached. + * @type {number} + * @memberof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGet + */ + 'win_count'?: number; +} + +export const ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetContestTypeEnum = { + Milestone: 'milestone' +} as const; + +export type ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetContestTypeEnum = typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetContestTypeEnum[keyof typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetContestTypeEnum]; +export const ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetEntryTypeEnum = { + Count: 'count' +} as const; + +export type ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetEntryTypeEnum = typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetEntryTypeEnum[keyof typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetEntryTypeEnum]; +export const ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetTieBreakStrategyEnum = { + SplitPrizePool: 'split_prize_pool' +} as const; + +export type ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetTieBreakStrategyEnum = typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetTieBreakStrategyEnum[keyof typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetTieBreakStrategyEnum]; +export const ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetValidForEventEnum = { + Signup: 'signup' +} as const; + +export type ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetValidForEventEnum = typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetValidForEventEnum[keyof typeof ResponseGetContestUserViewProductIdContestContestUuidUserProductUserIdGetValidForEventEnum]; + +/** + * + * @export + * @interface ResponseWebsocketEventsDocsWsEventsDocsGet + */ +export interface ResponseWebsocketEventsDocsWsEventsDocsGet { + /** + * + * @type {string} + * @memberof ResponseWebsocketEventsDocsWsEventsDocsGet + */ + 'kind'?: ResponseWebsocketEventsDocsWsEventsDocsGetKindEnum; + /** + * + * @type {string} + * @memberof ResponseWebsocketEventsDocsWsEventsDocsGet + */ + 'timestamp'?: string; + /** + * + * @type {StatsSnapshot} + * @memberof ResponseWebsocketEventsDocsWsEventsDocsGet + */ + 'data': StatsSnapshot; + /** + * + * @type {string} + * @memberof ResponseWebsocketEventsDocsWsEventsDocsGet + */ + 'country_iso'?: string; + /** + * + * @type {string} + * @memberof ResponseWebsocketEventsDocsWsEventsDocsGet + */ + 'product_id': string; +} + +export const ResponseWebsocketEventsDocsWsEventsDocsGetKindEnum = { + Pong: 'pong' +} as const; + +export type ResponseWebsocketEventsDocsWsEventsDocsGetKindEnum = typeof ResponseWebsocketEventsDocsWsEventsDocsGetKindEnum[keyof typeof ResponseWebsocketEventsDocsWsEventsDocsGetKindEnum]; + +/** + * + * @export + * @enum {string} + */ + +export const Scope = { + Global: 'global', + Team: 'team', + Product: 'product' +} as const; + +export type Scope = typeof Scope[keyof typeof Scope]; + + +/** + * + * @export + * @interface Selector + */ +export interface Selector { +} +/** + * An adjusted_status is set if a session is adjusted by the marketplace after the original return. A session can be adjusted multiple times. This is the most recent status. If a session was originally a complete, was adjusted to incomplete, then back to complete, the adjusted_status will be None, but the adjusted_timestamp will be set to the most recent change. + * @export + * @enum {string} + */ + +export const SessionAdjustedStatus = { + Ac: 'ac', + Af: 'af', + Pa: 'pa' +} as const; + +export type SessionAdjustedStatus = typeof SessionAdjustedStatus[keyof typeof SessionAdjustedStatus]; + + +/** + * Stores configuration related to the Session, a session being a users experience attempting to do work. + * @export + * @interface SessionConfig + */ +export interface SessionConfig { + /** + * 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. + * @type {number} + * @memberof SessionConfig + */ + 'max_session_len'?: number; + /** + * The number of surveys that a respondent may attempt within a session before the session is terminated. + * @type {number} + * @memberof SessionConfig + */ + 'max_session_hard_retry'?: number; + /** + * The minimum amount the user should be paid for a complete. If no payout transformation is defined, the value is based on the BP\'s payout. If a payout transformation is defined, the min_payout is applied on the user\'s payout. Note, this is separate and distinct from the payout transformation\'s min payout. The payout transformation\'s min_payout does not care what the task\'s actual payout was. This min_payout will prevent the user from being show any tasks that would pay below this amount. + * @type {string} + * @memberof SessionConfig + */ + 'min_payout'?: string; +} +/** + * + * @export + * @interface SessionEnterPayload + */ +export interface SessionEnterPayload { + /** + * + * @type {string} + * @memberof SessionEnterPayload + */ + 'event_type'?: SessionEnterPayloadEventTypeEnum; + /** + * + * @type {string} + * @memberof SessionEnterPayload + */ + 'country_iso': string; +} + +export const SessionEnterPayloadEventTypeEnum = { + SessionEnter: 'session.enter' +} as const; + +export type SessionEnterPayloadEventTypeEnum = typeof SessionEnterPayloadEventTypeEnum[keyof typeof SessionEnterPayloadEventTypeEnum]; + +/** + * + * @export + * @interface SessionFinishPayload + */ +export interface SessionFinishPayload { + /** + * + * @type {string} + * @memberof SessionFinishPayload + */ + 'event_type'?: SessionFinishPayloadEventTypeEnum; + /** + * + * @type {string} + * @memberof SessionFinishPayload + */ + 'country_iso': string; + /** + * + * @type {number} + * @memberof SessionFinishPayload + */ + 'duration_sec': number; + /** + * + * @type {Status} + * @memberof SessionFinishPayload + */ + 'status': Status; + /** + * + * @type {StatusCode1} + * @memberof SessionFinishPayload + */ + 'status_code_1'?: StatusCode1 | null; + /** + * + * @type {SessionStatusCode2} + * @memberof SessionFinishPayload + */ + 'status_code_2'?: SessionStatusCode2 | null; + /** + * + * @type {number} + * @memberof SessionFinishPayload + */ + 'user_payout'?: number | null; +} + +export const SessionFinishPayloadEventTypeEnum = { + SessionFinish: 'session.finish' +} as const; + +export type SessionFinishPayloadEventTypeEnum = typeof SessionFinishPayloadEventTypeEnum[keyof typeof SessionFinishPayloadEventTypeEnum]; + +/** + * __Status Detail__ This should be set if the Session.status_code_1 is SESSION_XXX_FAIL + * @export + * @enum {number} + */ + +export const SessionStatusCode2 = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, + NUMBER_5: 5, + NUMBER_6: 6, + NUMBER_7: 7, + NUMBER_8: 8, + NUMBER_9: 9, + NUMBER_10: 10, + NUMBER_11: 11, + NUMBER_12: 12, + NUMBER_13: 13 +} as const; + +export type SessionStatusCode2 = typeof SessionStatusCode2[keyof typeof SessionStatusCode2]; + + +/** + * + * @export + * @enum {string} + */ + +export const ShippingCarrier = { + Usps: 'USPS', + FedEx: 'FedEx', + Ups: 'UPS', + Dhl: 'DHL' +} as const; + +export type ShippingCarrier = typeof ShippingCarrier[keyof typeof ShippingCarrier]; + + +/** + * + * @export + * @enum {string} + */ + +export const ShippingMethod = { + Standard: 'Standard', + Express: 'Express', + TwoDay: 'Two-Day', + Overnight: 'Overnight', + SameDay: 'Same Day' +} as const; + +export type ShippingMethod = typeof ShippingMethod[keyof typeof ShippingMethod]; + + +/** + * + * @export + * @interface SingleEntryBucket + */ +export interface SingleEntryBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof SingleEntryBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof SingleEntryBucket + */ + 'uri': string; +} +/** + * Only returns a single bucket with the top scoring tasks. Offerwall code: `5fl8bpv5` + * @export + * @interface SingleEntryOfferWall + */ +export interface SingleEntryOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof SingleEntryOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof SingleEntryOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof SingleEntryOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof SingleEntryOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof SingleEntryOfferWall + */ + 'offerwall_reasons'?: Array; + /** + * The format describing the str representation of a payout. Typically, this would be displayed to a user. The payout_format is similar to python format string with a subset of functionality supported. Only float with a precision are supported along with an optional comma for a thousands separator. In addition, a mathematical operator can be applied, such as dividing by 100. Examples are shown assuming payout = 100 (one dollar). - \"{payout*10:,.0f} Points\" -> \"1,000 Points\" - \"${payout/100:.2f}\" -> \"$1.00\" + * @type {string} + * @memberof SingleEntryOfferWall + */ + 'payout_format': string; +} +/** + * + * @export + * @interface SingleEntryOfferWallResponse + */ +export interface SingleEntryOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof SingleEntryOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {SingleEntryOfferWall} + * @memberof SingleEntryOfferWallResponse + */ + 'offerwall': SingleEntryOfferWall; +} +/** + * + * @export + * @interface SoftPairBucket + */ +export interface SoftPairBucket { + [key: string]: any; + + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof SoftPairBucket + */ + 'id': string; + /** + * + * @type {Uri} + * @memberof SoftPairBucket + */ + 'uri': Uri; + /** + * + * @type {Array} + * @memberof SoftPairBucket + */ + 'category'?: Array; + /** + * + * @type {Array} + * @memberof SoftPairBucket + */ + 'contents': Array; + /** + * + * @type {string} + * @memberof SoftPairBucket + */ + 'eligibility': SoftPairBucketEligibilityEnum; + /** + * + * @type {Array} + * @memberof SoftPairBucket + */ + 'missing_questions'?: Array; + /** + * this is the max loi of the contents + * @type {number} + * @memberof SoftPairBucket + */ + 'loi': number; + /** + * this is the min payout of the contents + * @type {number} + * @memberof SoftPairBucket + */ + 'payout': number; +} + +export const SoftPairBucketEligibilityEnum = { + Conditional: 'conditional', + Unconditional: 'unconditional', + Ineligible: 'ineligible' +} as const; + +export type SoftPairBucketEligibilityEnum = typeof SoftPairBucketEligibilityEnum[keyof typeof SoftPairBucketEligibilityEnum]; + +/** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. Offerwall code: `37d1da64` + * @export + * @interface SoftPairOfferwall + */ +export interface SoftPairOfferwall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof SoftPairOfferwall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof SoftPairOfferwall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof SoftPairOfferwall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof SoftPairOfferwall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof SoftPairOfferwall + */ + 'offerwall_reasons'?: Array; + /** + * + * @type {{ [key: string]: UpkQuestion; }} + * @memberof SoftPairOfferwall + */ + 'question_info'?: { [key: string]: UpkQuestion; }; +} +/** + * + * @export + * @interface SoftPairOfferwallResponse + */ +export interface SoftPairOfferwallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof SoftPairOfferwallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {SoftPairOfferwall} + * @memberof SoftPairOfferwallResponse + */ + 'offerwall': SoftPairOfferwall; +} +/** + * + * @export + * @enum {string} + */ + +export const Source = { + G: 'g', + C: 'c', + A: 'a', + D: 'd', + Et: 'et', + F: 'f', + I: 'i', + L: 'l', + M: 'm', + N: 'n', + O: 'o', + E: 'e', + R: 'r', + Pr: 'pr', + P: 'p', + Rd: 'rd', + H: 'h', + S: 's', + T: 't', + U: 'u', + W: 'w' +} as const; + +export type Source = typeof Source[keyof typeof Source]; + + +/** + * This could also be named \"BP:Marketplace Config\", as it describes the config for a BP on a single marketplace. + * @export + * @interface SourceConfig + */ +export interface SourceConfig { + /** + * + * @type {Source} + * @memberof SourceConfig + */ + 'name': Source; + /** + * + * @type {boolean} + * @memberof SourceConfig + */ + 'active'?: boolean; + /** + * + * @type {Array} + * @memberof SourceConfig + */ + 'banned_countries'?: Array; + /** + * + * @type {boolean} + * @memberof SourceConfig + */ + 'allow_mobile_ip'?: boolean; + /** + * Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum. + * @type {boolean} + * @memberof SourceConfig + */ + 'allow_pii_only_buyers'?: boolean; + /** + * Return Tasks from Buyers that don\'t have URL hashing enabled. Only supported on Pure Spectrum. + * @type {boolean} + * @memberof SourceConfig + */ + 'allow_unhashed_buyers'?: boolean; + /** + * 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. + * @type {boolean} + * @memberof SourceConfig + */ + 'withhold_profiling'?: boolean; + /** + * Not used at the moment + * @type {boolean} + * @memberof SourceConfig + */ + 'pass_unconditional_eligible_unknowns'?: boolean; +} + + +/** + * + * @export + * @interface SourcesConfig + */ +export interface SourcesConfig { + /** + * + * @type {Array} + * @memberof SourcesConfig + */ + 'user_defined'?: Array; + /** + * + * @type {Array} + * @memberof SourcesConfig + */ + 'policies'?: Array; +} +/** + * Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @export + * @interface StartedAfter + */ +export interface StartedAfter { +} +/** + * Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @export + * @interface StartedBefore + */ +export interface StartedBefore { +} +/** + * An offerwall with buckets that are clustered by setting as seeds the highest scoring surveys for each bin, then the rest are distributed according to their Euclidean distance using the bucket\'s features. Offerwall code: `b59a2d2b` + * @export + * @interface StarwallOfferWall + */ +export interface StarwallOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof StarwallOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof StarwallOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof StarwallOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof StarwallOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof StarwallOfferWall + */ + 'offerwall_reasons'?: Array; + /** + * The format describing the str representation of a payout. Typically, this would be displayed to a user. The payout_format is similar to python format string with a subset of functionality supported. Only float with a precision are supported along with an optional comma for a thousands separator. In addition, a mathematical operator can be applied, such as dividing by 100. Examples are shown assuming payout = 100 (one dollar). - \"{payout*10:,.0f} Points\" -> \"1,000 Points\" - \"${payout/100:.2f}\" -> \"$1.00\" + * @type {string} + * @memberof StarwallOfferWall + */ + 'payout_format': string; +} +/** + * + * @export + * @interface StarwallOfferWallResponse + */ +export interface StarwallOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof StarwallOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {StarwallOfferWall} + * @memberof StarwallOfferWallResponse + */ + 'offerwall': StarwallOfferWall; +} +/** + * Same as the StarwallOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. Offerwall code: `7fa1b3f4` + * @export + * @interface StarwallPlusBlockOfferWall + */ +export interface StarwallPlusBlockOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof StarwallPlusBlockOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof StarwallPlusBlockOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof StarwallPlusBlockOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof StarwallPlusBlockOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof StarwallPlusBlockOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface StarwallPlusBlockOfferWallResponse + */ +export interface StarwallPlusBlockOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof StarwallPlusBlockOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {StarwallPlusBlockOfferWall} + * @memberof StarwallPlusBlockOfferWallResponse + */ + 'offerwall': StarwallPlusBlockOfferWall; +} +/** + * Same as the StarwallOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a recontact key. Offerwall code: `630db2a4` + * @export + * @interface StarwallPlusBlockRecontactOfferWall + */ +export interface StarwallPlusBlockRecontactOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof StarwallPlusBlockRecontactOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface StarwallPlusBlockRecontactOfferWallResponse + */ +export interface StarwallPlusBlockRecontactOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof StarwallPlusBlockRecontactOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {StarwallPlusBlockRecontactOfferWall} + * @memberof StarwallPlusBlockRecontactOfferWallResponse + */ + 'offerwall': StarwallPlusBlockRecontactOfferWall; +} +/** + * Same as the StarwallOfferWall, but the buckets include contents. Offerwall code: `5481f322` + * @export + * @interface StarwallPlusOfferWall + */ +export interface StarwallPlusOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof StarwallPlusOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof StarwallPlusOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof StarwallPlusOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof StarwallPlusOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof StarwallPlusOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface StarwallPlusOfferWallResponse + */ +export interface StarwallPlusOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof StarwallPlusOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {StarwallPlusOfferWall} + * @memberof StarwallPlusOfferWallResponse + */ + 'offerwall': StarwallPlusOfferWall; +} +/** + * + * @export + * @interface StatisticalSummaryStat + */ +export interface StatisticalSummaryStat { + /** + * The grouping criteria + * @type {{ [key: string]: FacetValue; }} + * @memberof StatisticalSummaryStat + */ + 'facet': { [key: string]: FacetValue; }; + /** + * Statistical Summary for the given metric and facet + * @type {StatisticalSummaryValue} + * @memberof StatisticalSummaryStat + */ + 'value': StatisticalSummaryValue; +} +/** + * + * @export + * @interface StatisticalSummaryValue + */ +export interface StatisticalSummaryValue { + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'min': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'max': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'mean': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'q1': number; + /** + * equal to the median + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'q2': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'q3': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'lower_whisker': number; + /** + * + * @type {number} + * @memberof StatisticalSummaryValue + */ + 'upper_whisker': number; +} +/** + * + * @export + * @interface StatsMessage + */ +export interface StatsMessage { + /** + * + * @type {string} + * @memberof StatsMessage + */ + 'kind'?: StatsMessageKindEnum; + /** + * + * @type {string} + * @memberof StatsMessage + */ + 'timestamp'?: string; + /** + * + * @type {string} + * @memberof StatsMessage + */ + 'country_iso'?: string | null; + /** + * + * @type {StatsSnapshot} + * @memberof StatsMessage + */ + 'data': StatsSnapshot; +} + +export const StatsMessageKindEnum = { + Stats: 'stats' +} as const; + +export type StatsMessageKindEnum = typeof StatsMessageKindEnum[keyof typeof StatsMessageKindEnum]; + +/** + * + * @export + * @interface StatsSnapshot + */ +export interface StatsSnapshot { + /** + * + * @type {AggregateBySource} + * @memberof StatsSnapshot + */ + 'live_task_count'?: AggregateBySource; + /** + * + * @type {AggregateBySource} + * @memberof StatsSnapshot + */ + 'task_created_count_last_1h'?: AggregateBySource; + /** + * + * @type {AggregateBySource} + * @memberof StatsSnapshot + */ + 'task_created_count_last_24h'?: AggregateBySource; + /** + * In integer USDCents + * @type {MaxGaugeBySource} + * @memberof StatsSnapshot + */ + 'live_tasks_max_payout'?: MaxGaugeBySource; + /** + * + * @type {string} + * @memberof StatsSnapshot + */ + 'country_iso'?: string | null; + /** + * + * @type {string} + * @memberof StatsSnapshot + */ + 'timestamp'?: string; + /** + * Count of users (in this product_id) that were active in the past 60 minutes. Behaviors that trigger active: - Request an offerwall - Enter an offerwall bucket - Request profiling questions - Submit profiling answers - Update user profile + * @type {number} + * @memberof StatsSnapshot + */ + 'active_users_last_1h'?: number; + /** + * Count of users (in this product_id) that were active in the past 24 hours. + * @type {number} + * @memberof StatsSnapshot + */ + 'active_users_last_24h'?: number; + /** + * Count of users that are currently doing work at this moment + * @type {number} + * @memberof StatsSnapshot + */ + 'in_progress_users': number; + /** + * Count of users created + * @type {number} + * @memberof StatsSnapshot + */ + 'signups_last_24h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_enters_last_1h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_enters_last_24h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_fails_last_1h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_fails_last_24h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_completes_last_1h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_completes_last_24h': number; + /** + * In integer USDCents + * @type {number} + * @memberof StatsSnapshot + */ + 'sum_payouts_last_1h': number; + /** + * In integer USDCents + * @type {number} + * @memberof StatsSnapshot + */ + 'sum_payouts_last_24h': number; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_avg_payout_last_24h': number | null; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_avg_user_payout_last_24h': number | null; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_fail_avg_loi_last_24h': number | null; + /** + * + * @type {number} + * @memberof StatsSnapshot + */ + 'session_complete_avg_loi_last_24h': number | null; +} +/** + * The outcome of a session or wall event. If the session is still in progress, the status will be NULL. + * @export + * @enum {string} + */ + +export const Status = { + C: 'c', + F: 'f', + A: 'a', + T: 't' +} as const; + +export type Status = typeof Status[keyof typeof Status]; + + +/** + * __High level status code for outcome of the session.__ This should only be NULL if the Status is ABANDON or TIMEOUT + * @export + * @enum {number} + */ + +export const StatusCode1 = { + NUMBER_1: 1, + NUMBER_2: 2, + NUMBER_3: 3, + NUMBER_4: 4, + NUMBER_5: 5, + NUMBER_6: 6, + NUMBER_7: 7, + NUMBER_8: 8, + NUMBER_9: 9, + NUMBER_10: 10, + NUMBER_11: 11, + NUMBER_12: 12, + NUMBER_13: 13, + NUMBER_14: 14, + NUMBER_15: 15, + NUMBER_16: 16, + NUMBER_17: 17, + NUMBER_18: 18, + NUMBER_19: 19 +} as const; + +export type StatusCode1 = typeof StatusCode1[keyof typeof StatusCode1]; + + +/** + * + * @export + * @interface StatusInfoResponseFail + */ +export interface StatusInfoResponseFail { + /** + * + * @type {StatusSuccessFail} + * @memberof StatusInfoResponseFail + */ + 'info': StatusSuccessFail; + /** + * An optional message, if success is False + * @type {string} + * @memberof StatusInfoResponseFail + */ + 'msg': string; +} +/** + * + * @export + * @interface StatusResponse + */ +export interface StatusResponse { + /** + * The status of the API response. + * @type {string} + * @memberof StatusResponse + */ + 'status': StatusResponseStatusEnum; + /** + * + * @type {string} + * @memberof StatusResponse + */ + 'msg'?: string | null; +} + +export const StatusResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type StatusResponseStatusEnum = typeof StatusResponseStatusEnum[keyof typeof StatusResponseStatusEnum]; + +/** + * + * @export + * @interface StatusResponseFailure + */ +export interface StatusResponseFailure { + /** + * The status of the API response. + * @type {string} + * @memberof StatusResponseFailure + */ + 'status': StatusResponseFailureStatusEnum; + /** + * An optional message, if the status is failure. + * @type {string} + * @memberof StatusResponseFailure + */ + 'msg': string; +} + +export const StatusResponseFailureStatusEnum = { + Failure: 'failure' +} as const; + +export type StatusResponseFailureStatusEnum = typeof StatusResponseFailureStatusEnum[keyof typeof StatusResponseFailureStatusEnum]; + +/** + * + * @export + * @interface StatusSuccessFail + */ +export interface StatusSuccessFail { + /** + * Whether the API response is successful. + * @type {boolean} + * @memberof StatusSuccessFail + */ + 'success'?: boolean; +} +/** + * What has to happen for a user to fulfill a period for a streak + * @export + * @enum {string} + */ + +export const StreakFulfillment = { + Active: 'active', + Complete: 'complete' +} as const; + +export type StreakFulfillment = typeof StreakFulfillment[keyof typeof StreakFulfillment]; + + +/** + * + * @export + * @enum {string} + */ + +export const StreakPeriod = { + Day: 'day', + Week: 'week', + Month: 'month' +} as const; + +export type StreakPeriod = typeof StreakPeriod[keyof typeof StreakPeriod]; + + +/** + * + * @export + * @enum {string} + */ + +export const StreakState = { + Active: 'active', + AtRisk: 'at_risk', + Broken: 'broken' +} as const; + +export type StreakState = typeof StreakState[keyof typeof StreakState]; + + +/** + * + * @export + * @interface SubscribeMessage + */ +export interface SubscribeMessage { + /** + * + * @type {string} + * @memberof SubscribeMessage + */ + 'kind'?: SubscribeMessageKindEnum; + /** + * + * @type {string} + * @memberof SubscribeMessage + */ + 'product_id': string; +} + +export const SubscribeMessageKindEnum = { + Subscribe: 'subscribe' +} as const; + +export type SubscribeMessageKindEnum = typeof SubscribeMessageKindEnum[keyof typeof SubscribeMessageKindEnum]; + +/** + * Available tags which can be used to annotate supplier traffic Note: should not include commas! + * @export + * @enum {string} + */ + +export const SupplierTag = { + Mobile: 'mobile', + JsOfferwall: 'js-offerwall', + DoubleOptIn: 'double-opt-in', + SingleSignOn: 'single-sign-on', + PhoneNumberVerified: 'phone-number-verified', + TestA: 'test-a', + TestB: 'test-b' +} as const; + +export type SupplierTag = typeof SupplierTag[keyof typeof SupplierTag]; + + +/** + * Describes the set of policies for how GRL can interact with marketplaces. This is only used on the special \"global product\". + * @export + * @interface SupplyConfig + */ +export interface SupplyConfig { + /** + * + * @type {Array} + * @memberof SupplyConfig + */ + 'policies'?: Array; +} +/** + * One policy describing how GRL can interact with a marketplaces in a certain way. This is only used on the special \"global product\", and then internally in grpc logic. + * @export + * @interface SupplyPolicy + */ +export interface SupplyPolicy { + /** + * + * @type {Source} + * @memberof SupplyPolicy + */ + 'name': Source; + /** + * + * @type {boolean} + * @memberof SupplyPolicy + */ + 'active'?: boolean; + /** + * + * @type {Array} + * @memberof SupplyPolicy + */ + 'banned_countries'?: Array; + /** + * + * @type {boolean} + * @memberof SupplyPolicy + */ + 'allow_mobile_ip'?: boolean; + /** + * Allow Tasks from Buyers that want traffic that comes from Suppliers that can identify their users. Only supported on Pure Spectrum. + * @type {boolean} + * @memberof SupplyPolicy + */ + 'allow_pii_only_buyers'?: boolean; + /** + * Return Tasks from Buyers that don\'t have URL hashing enabled. Only supported on Pure Spectrum. + * @type {boolean} + * @memberof SupplyPolicy + */ + 'allow_unhashed_buyers'?: boolean; + /** + * 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. + * @type {boolean} + * @memberof SupplyPolicy + */ + 'withhold_profiling'?: boolean; + /** + * Not used at the moment + * @type {boolean} + * @memberof SupplyPolicy + */ + 'pass_unconditional_eligible_unknowns'?: boolean; + /** + * address for the grpc GetOpps call + * @type {Array} + * @memberof SupplyPolicy + */ + 'address': Array; + /** + * + * @type {boolean} + * @memberof SupplyPolicy + */ + 'allow_vpn'?: boolean; + /** + * + * @type {boolean} + * @memberof SupplyPolicy + */ + 'distribute_harmonizer_active'?: boolean; + /** + * + * @type {string} + * @memberof SupplyPolicy + */ + 'supplier_id'?: string | null; + /** + * + * @type {Array} + * @memberof SupplyPolicy + */ + 'team_ids'?: Array | null; + /** + * + * @type {Array} + * @memberof SupplyPolicy + */ + 'product_ids'?: Array | null; + /** + * + * @type {IntegrationMode} + * @memberof SupplyPolicy + */ + 'integration_mode'?: IntegrationMode; + /** + * There must be only 1 GLOBAL config per Source. We can have more than one TEAM/PRODUCT config per Source. + * @type {Scope} + * @memberof SupplyPolicy + */ + 'scope': Scope; +} + + +/** + * Explanatory record of which question answers contributed to a user\'s eligibility for a survey. This is INSUFFICIENT for determining eligibility to a task as it IGNORES logical operators, dependencies between criteria, and other requirements. It is only intended for the UI. + * @export + * @interface SurveyEligibilityCriterion + */ +export interface SurveyEligibilityCriterion { + /** + * + * @type {string} + * @memberof SurveyEligibilityCriterion + */ + 'question_id': string | null; + /** + * + * @type {string} + * @memberof SurveyEligibilityCriterion + */ + 'property_code': string | null; + /** + * + * @type {string} + * @memberof SurveyEligibilityCriterion + */ + 'question_text': string; + /** + * User answer(s) that satisfied at least one eligibility rule + * @type {Array} + * @memberof SurveyEligibilityCriterion + */ + 'qualifying_answer': Array; + /** + * + * @type {Array} + * @memberof SurveyEligibilityCriterion + */ + 'qualifying_answer_label': Array | null; + /** + * + * @type {string} + * @memberof SurveyEligibilityCriterion + */ + 'explanation'?: string | null; + /** + * + * @type {number} + * @memberof SurveyEligibilityCriterion + */ + 'rank'?: number | null; +} +/** + * + * @export + * @interface SurveyId + */ +export interface SurveyId { +} +/** + * + * @export + * @interface TangoCashoutMethodData + */ +export interface TangoCashoutMethodData { + /** + * + * @type {string} + * @memberof TangoCashoutMethodData + */ + 'type'?: TangoCashoutMethodDataTypeEnum; + /** + * tango utid + * @type {string} + * @memberof TangoCashoutMethodData + */ + 'utid': string; + /** + * + * @type {Array} + * @memberof TangoCashoutMethodData + */ + 'countries': Array; + /** + * + * @type {string} + * @memberof TangoCashoutMethodData + */ + 'value_type': TangoCashoutMethodDataValueTypeEnum; + /** + * + * @type {string} + * @memberof TangoCashoutMethodData + */ + 'disclaimer'?: string; + /** + * + * @type {string} + * @memberof TangoCashoutMethodData + */ + 'terms'?: string; +} + +export const TangoCashoutMethodDataTypeEnum = { + Tango: 'TANGO' +} as const; + +export type TangoCashoutMethodDataTypeEnum = typeof TangoCashoutMethodDataTypeEnum[keyof typeof TangoCashoutMethodDataTypeEnum]; +export const TangoCashoutMethodDataValueTypeEnum = { + Variable: 'variable', + Fixed: 'fixed' +} as const; + +export type TangoCashoutMethodDataValueTypeEnum = typeof TangoCashoutMethodDataValueTypeEnum[keyof typeof TangoCashoutMethodDataValueTypeEnum]; + +/** + * + * @export + * @interface TaskEnterPayload + */ +export interface TaskEnterPayload { + /** + * + * @type {string} + * @memberof TaskEnterPayload + */ + 'event_type'?: TaskEnterPayloadEventTypeEnum; + /** + * + * @type {Source} + * @memberof TaskEnterPayload + */ + 'source': Source; + /** + * + * @type {string} + * @memberof TaskEnterPayload + */ + 'survey_id': string; + /** + * + * @type {string} + * @memberof TaskEnterPayload + */ + 'quota_id'?: string | null; + /** + * + * @type {string} + * @memberof TaskEnterPayload + */ + 'country_iso': string; +} + +export const TaskEnterPayloadEventTypeEnum = { + TaskEnter: 'task.enter' +} as const; + +export type TaskEnterPayloadEventTypeEnum = typeof TaskEnterPayloadEventTypeEnum[keyof typeof TaskEnterPayloadEventTypeEnum]; + +/** + * + * @export + * @interface TaskFinishPayload + */ +export interface TaskFinishPayload { + /** + * + * @type {string} + * @memberof TaskFinishPayload + */ + 'event_type'?: TaskFinishPayloadEventTypeEnum; + /** + * + * @type {Source} + * @memberof TaskFinishPayload + */ + 'source': Source; + /** + * + * @type {string} + * @memberof TaskFinishPayload + */ + 'survey_id': string; + /** + * + * @type {string} + * @memberof TaskFinishPayload + */ + 'quota_id'?: string | null; + /** + * + * @type {string} + * @memberof TaskFinishPayload + */ + 'country_iso': string; + /** + * + * @type {number} + * @memberof TaskFinishPayload + */ + 'duration_sec': number; + /** + * + * @type {Status} + * @memberof TaskFinishPayload + */ + 'status': Status; + /** + * + * @type {StatusCode1} + * @memberof TaskFinishPayload + */ + 'status_code_1'?: StatusCode1 | null; + /** + * + * @type {WallStatusCode2} + * @memberof TaskFinishPayload + */ + 'status_code_2'?: WallStatusCode2 | null; + /** + * + * @type {number} + * @memberof TaskFinishPayload + */ + 'cpi'?: number | null; +} + +export const TaskFinishPayloadEventTypeEnum = { + TaskFinish: 'task.finish' +} as const; + +export type TaskFinishPayloadEventTypeEnum = typeof TaskFinishPayloadEventTypeEnum[keyof typeof TaskFinishPayloadEventTypeEnum]; + +/** + * The status of a session + * @export + * @interface TaskStatusResponse + */ +export interface TaskStatusResponse { + /** + * A unique identifier for the session + * @type {string} + * @memberof TaskStatusResponse + */ + 'tsid': string; + /** + * The BP ID of the associated respondent + * @type {string} + * @memberof TaskStatusResponse + */ + 'product_id': string; + /** + * A unique identifier for each user, which is set by the Supplier + * @type {string} + * @memberof TaskStatusResponse + */ + 'product_user_id': string; + /** + * When the session was started + * @type {string} + * @memberof TaskStatusResponse + */ + 'started': string; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'finished'?: string | null; + /** + * The outcome of a session. - 0 - UNKNOWN - 1 - ENTER (the user has not yet returned) - 2 - INCOMPLETE (the user failed) - 3 - COMPLETE (the user completed the task) + * @type {number} + * @memberof TaskStatusResponse + */ + 'status'?: number; + /** + * + * @type {number} + * @memberof TaskStatusResponse + */ + 'payout'?: number | null; + /** + * + * @type {number} + * @memberof TaskStatusResponse + */ + 'user_payout'?: number | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'payout_format'?: string | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'user_payout_string'?: string | null; + /** + * Any extra url params used in the offerwall request will be passed back here + * @type {{ [key: string]: string; }} + * @memberof TaskStatusResponse + */ + 'kwargs'?: { [key: string]: string; }; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'status_code_1'?: string | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'status_code_2'?: string | null; + /** + * + * @type {SessionAdjustedStatus} + * @memberof TaskStatusResponse + */ + 'adjusted_status'?: SessionAdjustedStatus | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'adjusted_timestamp'?: string | null; + /** + * + * @type {number} + * @memberof TaskStatusResponse + */ + 'adjusted_payout'?: number | null; + /** + * + * @type {number} + * @memberof TaskStatusResponse + */ + 'adjusted_user_payout'?: number | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'adjusted_user_payout_string'?: string | null; + /** + * + * @type {Array} + * @memberof TaskStatusResponse + */ + 'wall_events'?: Array | null; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'currency'?: TaskStatusResponseCurrencyEnum; + /** + * This is deprecated + * @type {number} + * @memberof TaskStatusResponse + */ + 'final_status'?: number; + /** + * + * @type {string} + * @memberof TaskStatusResponse + */ + 'bpuid': string; +} + +export const TaskStatusResponseCurrencyEnum = { + Usd: 'USD' +} as const; + +export type TaskStatusResponseCurrencyEnum = typeof TaskStatusResponseCurrencyEnum[keyof typeof TaskStatusResponseCurrencyEnum]; + +/** + * + * @export + * @interface TasksStatusResponse + */ +export interface TasksStatusResponse { + /** + * Page number + * @type {number} + * @memberof TasksStatusResponse + */ + 'page'?: number; + /** + * Page size + * @type {number} + * @memberof TasksStatusResponse + */ + 'size'?: number; + /** + * + * @type {number} + * @memberof TasksStatusResponse + */ + 'total'?: number | null; + /** + * + * @type {Array} + * @memberof TasksStatusResponse + */ + 'tasks_status'?: Array; + /** + * + * @type {number} + * @memberof TasksStatusResponse + */ + 'pages': number | null; +} +/** + * + * @export + * @interface TopNBucket + */ +export interface TopNBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof TopNBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof TopNBucket + */ + 'uri': string; + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * @type {number} + * @memberof TopNBucket + */ + 'x'?: number; + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * @type {number} + * @memberof TopNBucket + */ + 'y'?: number; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNBucket + */ + 'name'?: string; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNBucket + */ + 'description'?: string; + /** + * + * @type {Array} + * @memberof TopNBucket + */ + 'category'?: Array; + /** + * + * @type {DurationSummary} + * @memberof TopNBucket + */ + 'duration': DurationSummary; + /** + * + * @type {PayoutSummary} + * @memberof TopNBucket + */ + 'payout': PayoutSummary; + /** + * A proprietary score to determine the overall quality of the tasks that are within the bucket. Higher is better. + * @type {number} + * @memberof TopNBucket + */ + 'quality_score': number; +} +/** + * An offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. Offerwall code: `45b7228a7` + * @export + * @interface TopNOfferWall + */ +export interface TopNOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof TopNOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof TopNOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof TopNOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof TopNOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof TopNOfferWall + */ + 'offerwall_reasons'?: Array; + /** + * The format describing the str representation of a payout. Typically, this would be displayed to a user. The payout_format is similar to python format string with a subset of functionality supported. Only float with a precision are supported along with an optional comma for a thousands separator. In addition, a mathematical operator can be applied, such as dividing by 100. Examples are shown assuming payout = 100 (one dollar). - \"{payout*10:,.0f} Points\" -> \"1,000 Points\" - \"${payout/100:.2f}\" -> \"$1.00\" + * @type {string} + * @memberof TopNOfferWall + */ + 'payout_format': string; +} +/** + * + * @export + * @interface TopNOfferWallResponse + */ +export interface TopNOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof TopNOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {TopNOfferWall} + * @memberof TopNOfferWallResponse + */ + 'offerwall': TopNOfferWall; +} +/** + * Same as the TopNOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. Offerwall code: `d48cce47` + * @export + * @interface TopNPlusBlockOfferWall + */ +export interface TopNPlusBlockOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof TopNPlusBlockOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof TopNPlusBlockOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof TopNPlusBlockOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof TopNPlusBlockOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof TopNPlusBlockOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface TopNPlusBlockOfferWallResponse + */ +export interface TopNPlusBlockOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof TopNPlusBlockOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {TopNPlusBlockOfferWall} + * @memberof TopNPlusBlockOfferWallResponse + */ + 'offerwall': TopNPlusBlockOfferWall; +} +/** + * Same as the TopNOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. Offerwall code: `1e5f0af8` + * @export + * @interface TopNPlusBlockRecontactOfferWall + */ +export interface TopNPlusBlockRecontactOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof TopNPlusBlockRecontactOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof TopNPlusBlockRecontactOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof TopNPlusBlockRecontactOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof TopNPlusBlockRecontactOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof TopNPlusBlockRecontactOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface TopNPlusBlockRecontactOfferWallResponse + */ +export interface TopNPlusBlockRecontactOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof TopNPlusBlockRecontactOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {TopNPlusBlockRecontactOfferWall} + * @memberof TopNPlusBlockRecontactOfferWallResponse + */ + 'offerwall': TopNPlusBlockRecontactOfferWall; +} +/** + * + * @export + * @interface TopNPlusBucket + */ +export interface TopNPlusBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof TopNPlusBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof TopNPlusBucket + */ + 'uri': string; + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * @type {number} + * @memberof TopNPlusBucket + */ + 'x'?: number; + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * @type {number} + * @memberof TopNPlusBucket + */ + 'y'?: number; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNPlusBucket + */ + 'name'?: string; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNPlusBucket + */ + 'description'?: string; + /** + * + * @type {Array} + * @memberof TopNPlusBucket + */ + 'category'?: Array; + /** + * + * @type {Array} + * @memberof TopNPlusBucket + */ + 'contents': Array; + /** + * + * @type {DurationSummary} + * @memberof TopNPlusBucket + */ + 'duration': DurationSummary; + /** + * + * @type {PayoutSummary} + * @memberof TopNPlusBucket + */ + 'payout': PayoutSummary; + /** + * + * @type {number} + * @memberof TopNPlusBucket + */ + 'quality_score': number; + /** + * This will always be \'USD\' + * @type {string} + * @memberof TopNPlusBucket + */ + 'currency'?: string; + /** + * The reasons the user is eligible for tasks in this bucket + * @type {Array} + * @memberof TopNPlusBucket + */ + 'eligibility_criteria'?: Array; + /** + * + * @type {string} + * @memberof TopNPlusBucket + */ + 'eligibility_explanation'?: string | null; +} +/** + * Same as the TopNOfferWall, but the buckets include contents. Offerwall code: `b145b803` + * @export + * @interface TopNPlusOfferWall + */ +export interface TopNPlusOfferWall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof TopNPlusOfferWall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof TopNPlusOfferWall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof TopNPlusOfferWall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof TopNPlusOfferWall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof TopNPlusOfferWall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface TopNPlusOfferWallResponse + */ +export interface TopNPlusOfferWallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof TopNPlusOfferWallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {TopNPlusOfferWall} + * @memberof TopNPlusOfferWallResponse + */ + 'offerwall': TopNPlusOfferWall; +} +/** + * + * @export + * @interface TopNPlusRecontactBucket + */ +export interface TopNPlusRecontactBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof TopNPlusRecontactBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof TopNPlusRecontactBucket + */ + 'uri': string; + /** + * For UI. Provides a dimensionality position for the bucket on the x-axis. + * @type {number} + * @memberof TopNPlusRecontactBucket + */ + 'x'?: number; + /** + * For UI. Provides a dimensionality position for the bucket on the y-axis. + * @type {number} + * @memberof TopNPlusRecontactBucket + */ + 'y'?: number; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNPlusRecontactBucket + */ + 'name'?: string; + /** + * Currently unused. Will always return empty string + * @type {string} + * @memberof TopNPlusRecontactBucket + */ + 'description'?: string; + /** + * + * @type {Array} + * @memberof TopNPlusRecontactBucket + */ + 'category'?: Array; + /** + * + * @type {Array} + * @memberof TopNPlusRecontactBucket + */ + 'contents': Array; + /** + * + * @type {DurationSummary} + * @memberof TopNPlusRecontactBucket + */ + 'duration': DurationSummary; + /** + * + * @type {PayoutSummary} + * @memberof TopNPlusRecontactBucket + */ + 'payout': PayoutSummary; + /** + * + * @type {number} + * @memberof TopNPlusRecontactBucket + */ + 'quality_score': number; + /** + * + * @type {boolean} + * @memberof TopNPlusRecontactBucket + */ + 'is_recontact': boolean; + /** + * This will always be \'USD\' + * @type {string} + * @memberof TopNPlusRecontactBucket + */ + 'currency'?: string; +} +/** + * + * @export + * @interface UPKImportance + */ +export interface UPKImportance { + /** + * + * @type {number} + * @memberof UPKImportance + */ + 'task_count'?: number | null; + /** + * + * @type {number} + * @memberof UPKImportance + */ + 'task_score'?: number | null; + /** + * + * @type {{ [key: string]: number; }} + * @memberof UPKImportance + */ + 'marketplace_task_count'?: { [key: string]: number; } | null; +} +/** + * + * @export + * @interface USDeliveryAddress + */ +export interface USDeliveryAddress { + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'name_or_attn': string; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'company'?: string | null; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'phone_number'?: string | null; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'address': string; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'city': string; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'state': string; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'postal_code': string; + /** + * + * @type {string} + * @memberof USDeliveryAddress + */ + 'country'?: string; +} +/** + * + * @export + * @interface UpkItem + */ +export interface UpkItem { + /** + * + * @type {string} + * @memberof UpkItem + */ + 'id': string; + /** + * + * @type {string} + * @memberof UpkItem + */ + 'label': string; + /** + * + * @type {string} + * @memberof UpkItem + */ + 'description'?: string | null; +} +/** + * This used to be called \"QuestionInfo\", which is a bad name, as this describes a UPK Property, like \"educational_attainment\", not the question that asks for your education. + * @export + * @interface UpkProperty + */ +export interface UpkProperty { + /** + * + * @type {string} + * @memberof UpkProperty + */ + 'property_id': string; + /** + * + * @type {string} + * @memberof UpkProperty + */ + 'property_label': string; + /** + * Allowed values: - __i__ *(UPK_ITEM)*: UserProfileKnowledge Item - __n__ *(UPK_NUMERICAL)*: UserProfileKnowledge Numerical - __x__ *(UPK_TEXT)*: UserProfileKnowledge Text + * @type {PropertyType} + * @memberof UpkProperty + */ + 'prop_type'?: PropertyType; + /** + * Allowed values: - __*__ *(ZERO_OR_MORE)*: Zero or More - __?__ *(ZERO_OR_ONE)*: Zero or One + * @type {Cardinality} + * @memberof UpkProperty + */ + 'cardinality'?: Cardinality; + /** + * + * @type {string} + * @memberof UpkProperty + */ + 'country_iso': string; + /** + * 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. + * @type {boolean} + * @memberof UpkProperty + */ + 'gold_standard'?: boolean; + /** + * + * @type {Array} + * @memberof UpkProperty + */ + 'allowed_items'?: Array | null; + /** + * + * @type {Array} + * @memberof UpkProperty + */ + 'categories'?: Array; +} + + +/** + * + * @export + * @interface UpkQuestion + */ +export interface UpkQuestion { + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'question_id'?: string | null; + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'ext_question_id'?: string | null; + /** + * + * @type {UpkQuestionType} + * @memberof UpkQuestion + */ + 'question_type': UpkQuestionType; + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'country_iso': string; + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'language_iso': string; + /** + * The text shown to respondents + * @type {string} + * @memberof UpkQuestion + */ + 'question_text': string; + /** + * + * @type {Array} + * @memberof UpkQuestion + */ + 'choices'?: Array | null; + /** + * + * @type {Selector} + * @memberof UpkQuestion + */ + 'selector'?: Selector; + /** + * + * @type {UpkQuestionConfiguration} + * @memberof UpkQuestion + */ + 'configuration'?: UpkQuestionConfiguration | null; + /** + * + * @type {UpkQuestionValidation} + * @memberof UpkQuestion + */ + 'validation'?: UpkQuestionValidation | null; + /** + * + * @type {UPKImportance} + * @memberof UpkQuestion + */ + 'importance'?: UPKImportance | null; + /** + * Categories associated with this question + * @type {Array} + * @memberof UpkQuestion + */ + 'categories'?: Array; + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'explanation_template'?: string | null; + /** + * + * @type {string} + * @memberof UpkQuestion + */ + 'explanation_fragment_template'?: string | null; +} + + +/** + * + * @export + * @interface UpkQuestionChoice + */ +export interface UpkQuestionChoice { + /** + * The unique identifier for a response to a qualification + * @type {string} + * @memberof UpkQuestionChoice + */ + 'choice_id': string; + /** + * The response text shown to respondents + * @type {string} + * @memberof UpkQuestionChoice + */ + 'choice_text': string; + /** + * + * @type {number} + * @memberof UpkQuestionChoice + */ + 'order': number; + /** + * + * @type {number} + * @memberof UpkQuestionChoice + */ + 'group'?: number | null; + /** + * If answer is exclusive, it can be the only option selected + * @type {boolean} + * @memberof UpkQuestionChoice + */ + 'exclusive'?: boolean; + /** + * + * @type {UPKImportance} + * @memberof UpkQuestionChoice + */ + 'importance'?: UPKImportance | null; +} +/** + * + * @export + * @interface UpkQuestionChoiceOut + */ +export interface UpkQuestionChoiceOut { + /** + * The unique identifier for a response to a qualification + * @type {string} + * @memberof UpkQuestionChoiceOut + */ + 'choice_id': string; + /** + * The response text shown to respondents + * @type {string} + * @memberof UpkQuestionChoiceOut + */ + 'choice_text': string; + /** + * + * @type {number} + * @memberof UpkQuestionChoiceOut + */ + 'order': number; + /** + * + * @type {number} + * @memberof UpkQuestionChoiceOut + */ + 'group'?: number | null; + /** + * If answer is exclusive, it can be the only option selected + * @type {boolean} + * @memberof UpkQuestionChoiceOut + */ + 'exclusive'?: boolean; + /** + * + * @type {UPKImportance} + * @memberof UpkQuestionChoiceOut + */ + 'importance'?: UPKImportance | null; +} +/** + * @type UpkQuestionConfiguration + * @export + */ +export type UpkQuestionConfiguration = { type: 'MC' } & UpkQuestionConfigurationMC | { type: 'SLIDER' } & UpkQuestionConfigurationSLIDER | { type: 'TE' } & UpkQuestionConfigurationTE; + +/** + * + * @export + * @interface UpkQuestionConfigurationMC + */ +export interface UpkQuestionConfigurationMC { + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationMC + */ + 'max_select'?: number | null; +} +/** + * + * @export + * @interface UpkQuestionConfigurationSLIDER + */ +export interface UpkQuestionConfigurationSLIDER { + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationSLIDER + */ + 'slider_min'?: number | null; + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationSLIDER + */ + 'slider_max'?: number | null; + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationSLIDER + */ + 'slider_start'?: number | null; + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationSLIDER + */ + 'slider_step'?: number | null; +} +/** + * + * @export + * @interface UpkQuestionConfigurationTE + */ +export interface UpkQuestionConfigurationTE { + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationTE + */ + 'max_length'?: number | null; + /** + * + * @type {number} + * @memberof UpkQuestionConfigurationTE + */ + 'min_length'?: number | null; +} +/** + * + * @export + * @interface UpkQuestionOut + */ +export interface UpkQuestionOut { + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'question_id'?: string | null; + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'ext_question_id'?: string | null; + /** + * + * @type {UpkQuestionType} + * @memberof UpkQuestionOut + */ + 'question_type': UpkQuestionType; + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'country_iso': string; + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'language_iso': string; + /** + * The text shown to respondents + * @type {string} + * @memberof UpkQuestionOut + */ + 'question_text': string; + /** + * + * @type {Array} + * @memberof UpkQuestionOut + */ + 'choices'?: Array | null; + /** + * + * @type {Selector} + * @memberof UpkQuestionOut + */ + 'selector'?: Selector; + /** + * + * @type {UpkQuestionConfiguration} + * @memberof UpkQuestionOut + */ + 'configuration'?: UpkQuestionConfiguration | null; + /** + * + * @type {UpkQuestionValidation} + * @memberof UpkQuestionOut + */ + 'validation'?: UpkQuestionValidation | null; + /** + * + * @type {UPKImportance} + * @memberof UpkQuestionOut + */ + 'importance'?: UPKImportance | null; + /** + * Categories associated with this question + * @type {Array} + * @memberof UpkQuestionOut + */ + 'categories'?: Array; + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'explanation_template'?: string | null; + /** + * + * @type {string} + * @memberof UpkQuestionOut + */ + 'explanation_fragment_template'?: string | null; + /** + * + * @type {number} + * @memberof UpkQuestionOut + */ + 'task_count'?: number | null; + /** + * + * @type {number} + * @memberof UpkQuestionOut + */ + 'task_score'?: number | null; + /** + * + * @type {{ [key: string]: number; }} + * @memberof UpkQuestionOut + */ + 'marketplace_task_count'?: { [key: string]: number; } | null; +} + + +/** + * + * @export + * @interface UpkQuestionResponse + */ +export interface UpkQuestionResponse { + /** + * The status of the API response. + * @type {string} + * @memberof UpkQuestionResponse + */ + 'status': UpkQuestionResponseStatusEnum; + /** + * + * @type {string} + * @memberof UpkQuestionResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array} + * @memberof UpkQuestionResponse + */ + 'questions': Array; + /** + * For internal use + * @type {Array} + * @memberof UpkQuestionResponse + */ + 'consent_questions'?: Array; + /** + * For internal use + * @type {Array} + * @memberof UpkQuestionResponse + */ + 'special_questions'?: Array; + /** + * The number of questions returned + * @type {number} + * @memberof UpkQuestionResponse + */ + 'count': number; +} + +export const UpkQuestionResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UpkQuestionResponseStatusEnum = typeof UpkQuestionResponseStatusEnum[keyof typeof UpkQuestionResponseStatusEnum]; + +/** + * + * @export + * @enum {string} + */ + +export const UpkQuestionSelectorHIDDEN = { + Hidden: 'HIDDEN' +} as const; + +export type UpkQuestionSelectorHIDDEN = typeof UpkQuestionSelectorHIDDEN[keyof typeof UpkQuestionSelectorHIDDEN]; + + +/** + * + * @export + * @enum {string} + */ + +export const UpkQuestionSelectorMC = { + Sa: 'SA', + Ma: 'MA', + Dl: 'DL', + Sb: 'SB', + Msb: 'MSB' +} as const; + +export type UpkQuestionSelectorMC = typeof UpkQuestionSelectorMC[keyof typeof UpkQuestionSelectorMC]; + + +/** + * + * @export + * @enum {string} + */ + +export const UpkQuestionSelectorSLIDER = { + Hslider: 'HSLIDER', + Vslider: 'VSLIDER' +} as const; + +export type UpkQuestionSelectorSLIDER = typeof UpkQuestionSelectorSLIDER[keyof typeof UpkQuestionSelectorSLIDER]; + + +/** + * + * @export + * @enum {string} + */ + +export const UpkQuestionSelectorTE = { + Sl: 'SL', + Ml: 'ML', + Etb: 'ETB' +} as const; + +export type UpkQuestionSelectorTE = typeof UpkQuestionSelectorTE[keyof typeof UpkQuestionSelectorTE]; + + +/** + * + * @export + * @enum {string} + */ + +export const UpkQuestionType = { + Mc: 'MC', + Te: 'TE', + Slider: 'SLIDER', + Hidden: 'HIDDEN' +} as const; + +export type UpkQuestionType = typeof UpkQuestionType[keyof typeof UpkQuestionType]; + + +/** + * + * @export + * @interface UpkQuestionValidation + */ +export interface UpkQuestionValidation { + /** + * + * @type {Array} + * @memberof UpkQuestionValidation + */ + 'patterns': Array | null; +} +/** + * 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. + * @export + * @interface Uri + */ +export interface Uri { +} +/** + * + * @export + * @interface User + */ +export interface User { + /** + * + * @type {number} + * @memberof User + */ + 'id'?: number | null; + /** + * + * @type {string} + * @memberof User + */ + 'uuid'?: string | null; + /** + * + * @type {Product} + * @memberof User + */ + 'product'?: Product | null; + /** + * + * @type {string} + * @memberof User + */ + 'product_id'?: string | null; + /** + * + * @type {string} + * @memberof User + */ + 'product_user_id'?: string | null; + /** + * + * @type {boolean} + * @memberof User + */ + 'blocked'?: boolean | null; + /** + * + * @type {string} + * @memberof User + */ + 'created'?: string | null; + /** + * + * @type {string} + * @memberof User + */ + 'last_seen'?: string | null; + /** + * + * @type {Array} + * @memberof User + */ + 'audit_log'?: Array | null; + /** + * + * @type {Array} + * @memberof User + */ + 'transactions'?: Array | null; + /** + * + * @type {Array} + * @memberof User + */ + 'location_history'?: Array | null; +} +/** + * The total amount this user has entered + * @export + * @interface UserAmount + */ +export interface UserAmount { +} +/** + * The total amount this user has entered in the past 24 hours + * @export + * @interface UserAmountToday + */ +export interface UserAmountToday { +} +/** + * If a payout transformation is configured on this account, this is the amount to display to the user + * @export + * @interface UserCpiString + */ +export interface UserCpiString { +} +/** + * Stores configuration for the user creation experience. The user creation limit is determined dynamically based on the median daily completion rate. min_hourly_create_limit & max_hourly_create_limit can be used to constrain the dynamically determined rate limit within set values. + * @export + * @interface UserCreateConfig + */ +export interface UserCreateConfig { + /** + * The smallest allowed value for the hourly user create limit. + * @type {number} + * @memberof UserCreateConfig + */ + 'min_hourly_create_limit'?: number; + /** + * + * @type {number} + * @memberof UserCreateConfig + */ + 'max_hourly_create_limit'?: number | null; +} +/** + * + * @export + * @interface UserHealthConfig + */ +export interface UserHealthConfig { + /** + * + * @type {Array} + * @memberof UserHealthConfig + */ + 'banned_countries'?: Array; + /** + * + * @type {boolean} + * @memberof UserHealthConfig + */ + 'allow_ban_iphist'?: boolean; +} +/** + * + * @export + * @interface UserInfo + */ +export interface UserInfo { + /** + * + * @type {Array} + * @memberof UserInfo + */ + 'user_profile_knowledge'?: Array; + /** + * + * @type {Array} + * @memberof UserInfo + */ + 'marketplace_profile_knowledge'?: Array; +} +/** + * + * @export + * @interface UserInfoResponse + */ +export interface UserInfoResponse { + /** + * The status of the API response. + * @type {string} + * @memberof UserInfoResponse + */ + 'status': UserInfoResponseStatusEnum; + /** + * + * @type {string} + * @memberof UserInfoResponse + */ + 'msg'?: string | null; + /** + * + * @type {UserInfo} + * @memberof UserInfoResponse + */ + 'user_profile': UserInfo; +} + +export const UserInfoResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UserInfoResponseStatusEnum = typeof UserInfoResponseStatusEnum[keyof typeof UserInfoResponseStatusEnum]; + +/** + * + * @export + * @interface UserLedgerTransactionTaskAdjustment + */ +export interface UserLedgerTransactionTaskAdjustment { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'created': string; + /** + * External description suitable for UI + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + '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 UserLedgerTransactionTaskAdjustment + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'tx_type'?: UserLedgerTransactionTaskAdjustmentTxTypeEnum; + /** + * A unique identifier for the session + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'tsid': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskAdjustment + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionTaskAdjustmentTxTypeEnum = { + BpAdjustment: 'bp_adjustment' +} as const; + +export type UserLedgerTransactionTaskAdjustmentTxTypeEnum = typeof UserLedgerTransactionTaskAdjustmentTxTypeEnum[keyof typeof UserLedgerTransactionTaskAdjustmentTxTypeEnum]; + +/** + * In a BP with user wallet enabled, the task-complete transaction would have line items for both the credit to the bp_wallet_account and credit to user_account. This is the user-detail, so we\'ve only caring about the user\'s payment. + * @export + * @interface UserLedgerTransactionTaskComplete + */ +export interface UserLedgerTransactionTaskComplete { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + 'created': string; + /** + * External description suitable for UI + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + '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 UserLedgerTransactionTaskComplete + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionTaskComplete + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + 'tx_type'?: UserLedgerTransactionTaskCompleteTxTypeEnum; + /** + * A unique identifier for the session + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + 'tsid': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionTaskComplete + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionTaskCompleteTxTypeEnum = { + BpPayment: 'bp_payment' +} as const; + +export type UserLedgerTransactionTaskCompleteTxTypeEnum = typeof UserLedgerTransactionTaskCompleteTxTypeEnum[keyof typeof UserLedgerTransactionTaskCompleteTxTypeEnum]; + +/** + * + * @export + * @interface UserLedgerTransactionTypeSummary + */ +export interface UserLedgerTransactionTypeSummary { + /** + * + * @type {number} + * @memberof UserLedgerTransactionTypeSummary + */ + 'entry_count'?: number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionTypeSummary + */ + 'min_amount'?: number | null; + /** + * + * @type {number} + * @memberof UserLedgerTransactionTypeSummary + */ + 'max_amount'?: number | null; + /** + * + * @type {number} + * @memberof UserLedgerTransactionTypeSummary + */ + 'total_amount'?: number | null; +} +/** + * + * @export + * @interface UserLedgerTransactionTypesSummary + */ +export interface UserLedgerTransactionTypesSummary { + /** + * + * @type {UserLedgerTransactionTypeSummary} + * @memberof UserLedgerTransactionTypesSummary + */ + 'bp_adjustment'?: UserLedgerTransactionTypeSummary; + /** + * + * @type {UserLedgerTransactionTypeSummary} + * @memberof UserLedgerTransactionTypesSummary + */ + 'bp_payment'?: UserLedgerTransactionTypeSummary; + /** + * + * @type {UserLedgerTransactionTypeSummary} + * @memberof UserLedgerTransactionTypesSummary + */ + 'user_bonus'?: UserLedgerTransactionTypeSummary; + /** + * + * @type {UserLedgerTransactionTypeSummary} + * @memberof UserLedgerTransactionTypesSummary + */ + 'user_payout_request'?: UserLedgerTransactionTypeSummary; +} +/** + * + * @export + * @interface UserLedgerTransactionUserBonus + */ +export interface UserLedgerTransactionUserBonus { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionUserBonus + */ + 'created': string; + /** + * External description suitable for UI + * @type {string} + * @memberof UserLedgerTransactionUserBonus + */ + '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 UserLedgerTransactionUserBonus + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionUserBonus + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserBonus + */ + 'tx_type'?: UserLedgerTransactionUserBonusTxTypeEnum; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserBonus + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserBonus + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionUserBonusTxTypeEnum = { + UserBonus: 'user_bonus' +} as const; + +export type UserLedgerTransactionUserBonusTxTypeEnum = typeof UserLedgerTransactionUserBonusTxTypeEnum[keyof typeof UserLedgerTransactionUserBonusTxTypeEnum]; + +/** + * + * @export + * @interface UserLedgerTransactionUserPayout + */ +export interface UserLedgerTransactionUserPayout { + /** + * When the Transaction was created + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + 'created': string; + /** + * External description suitable for UI + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + '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 UserLedgerTransactionUserPayout + */ + 'amount': number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionUserPayout + */ + 'balance_after'?: number | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + 'tx_type'?: UserLedgerTransactionUserPayoutTxTypeEnum; + /** + * A unique identifier for the payout + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + 'payout_id': string; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + 'url': string | null; + /** + * + * @type {string} + * @memberof UserLedgerTransactionUserPayout + */ + 'amount_string': string | null; +} + +export const UserLedgerTransactionUserPayoutTxTypeEnum = { + UserPayoutRequest: 'user_payout_request' +} as const; + +export type UserLedgerTransactionUserPayoutTxTypeEnum = typeof UserLedgerTransactionUserPayoutTxTypeEnum[keyof typeof UserLedgerTransactionUserPayoutTxTypeEnum]; + +/** + * + * @export + * @interface UserLedgerTransactionsResponse + */ +export interface UserLedgerTransactionsResponse { + /** + * Page number + * @type {number} + * @memberof UserLedgerTransactionsResponse + */ + 'page'?: number; + /** + * Page size + * @type {number} + * @memberof UserLedgerTransactionsResponse + */ + 'size'?: number; + /** + * + * @type {number} + * @memberof UserLedgerTransactionsResponse + */ + 'total'?: number | null; + /** + * + * @type {Array} + * @memberof UserLedgerTransactionsResponse + */ + 'transactions'?: Array; + /** + * + * @type {UserLedgerTransactionTypesSummary} + * @memberof UserLedgerTransactionsResponse + */ + 'summary': UserLedgerTransactionTypesSummary; + /** + * The status of the API response. + * @type {string} + * @memberof UserLedgerTransactionsResponse + */ + 'status': UserLedgerTransactionsResponseStatusEnum; + /** + * + * @type {string} + * @memberof UserLedgerTransactionsResponse + */ + 'msg'?: string | null; + /** + * + * @type {number} + * @memberof UserLedgerTransactionsResponse + */ + 'pages': number | null; +} + +export const UserLedgerTransactionsResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UserLedgerTransactionsResponseStatusEnum = typeof UserLedgerTransactionsResponseStatusEnum[keyof typeof UserLedgerTransactionsResponseStatusEnum]; + +/** + * @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 + * @interface UserProfile + */ +export interface UserProfile { + /** + * + * @type {string} + * @memberof UserProfile + */ + 'email_address'?: string | null; + /** + * + * @type {User} + * @memberof UserProfile + */ + 'user': User; + /** + * User\'s PID in marketplaces + * @type {{ [key: string]: string; }} + * @memberof UserProfile + */ + 'marketplace_pids'?: { [key: string]: string; }; + /** + * + * @type {Array} + * @memberof UserProfile + */ + 'streaks'?: Array; + /** + * + * @type {string} + * @memberof UserProfile + */ + 'email_md5': string | null; + /** + * + * @type {string} + * @memberof UserProfile + */ + 'email_sha1': string | null; + /** + * + * @type {string} + * @memberof UserProfile + */ + 'email_sha256': string | null; +} +/** + * + * @export + * @interface UserProfileKnowledge + */ +export interface UserProfileKnowledge { + /** + * + * @type {string} + * @memberof UserProfileKnowledge + */ + 'property_id': string; + /** + * + * @type {string} + * @memberof UserProfileKnowledge + */ + 'property_label': string; + /** + * + * @type {string} + * @memberof UserProfileKnowledge + */ + 'translation': string; + /** + * + * @type {Array} + * @memberof UserProfileKnowledge + */ + 'answer'?: Array; + /** + * When the User submitted this Profiling data + * @type {string} + * @memberof UserProfileKnowledge + */ + 'created': string; +} +/** + * + * @export + * @interface UserProfileKnowledgeAnswer + */ +export interface UserProfileKnowledgeAnswer { + /** + * + * @type {string} + * @memberof UserProfileKnowledgeAnswer + */ + 'id'?: string | null; + /** + * + * @type {string} + * @memberof UserProfileKnowledgeAnswer + */ + 'label'?: string | null; + /** + * + * @type {string} + * @memberof UserProfileKnowledgeAnswer + */ + 'translation'?: string | null; + /** + * + * @type {string} + * @memberof UserProfileKnowledgeAnswer + */ + 'value'?: string | null; +} +/** + * + * @export + * @interface UserProfileResponse + */ +export interface UserProfileResponse { + /** + * The status of the API response. + * @type {string} + * @memberof UserProfileResponse + */ + 'status': UserProfileResponseStatusEnum; + /** + * + * @type {string} + * @memberof UserProfileResponse + */ + 'msg'?: string | null; + /** + * + * @type {UserProfile} + * @memberof UserProfileResponse + */ + 'user_profile': UserProfile; +} + +export const UserProfileResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UserProfileResponseStatusEnum = typeof UserProfileResponseStatusEnum[keyof typeof UserProfileResponseStatusEnum]; + +/** + * + * @export + * @interface UserProfileUpdateRequest + */ +export interface UserProfileUpdateRequest { + /** + * + * @type {string} + * @memberof UserProfileUpdateRequest + */ + 'email_address': string; +} +/** + * + * @export + * @interface UserProfilesResponse + */ +export interface UserProfilesResponse { + /** + * The status of the API response. + * @type {string} + * @memberof UserProfilesResponse + */ + 'status': UserProfilesResponseStatusEnum; + /** + * + * @type {string} + * @memberof UserProfilesResponse + */ + 'msg'?: string | null; + /** + * + * @type {Array} + * @memberof UserProfilesResponse + */ + 'user_profiles': Array; +} + +export const UserProfilesResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UserProfilesResponseStatusEnum = typeof UserProfilesResponseStatusEnum[keyof typeof UserProfilesResponseStatusEnum]; + +/** + * Send the answers to one or more questions for a user. A question is uniquely specified by the question_id key. The answer is: the choice_id if the question_type is \"MC\" the actual entered text if the question_type is \"TE\" TODO: look up the question_type from the question_id to apply MC or TE specific validation on the answer(s) + * @export + * @interface UserQuestionAnswerIn + */ +export interface UserQuestionAnswerIn { + /** + * + * @type {string} + * @memberof UserQuestionAnswerIn + */ + 'question_id': string; + /** + * 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 + * @type {Array} + * @memberof UserQuestionAnswerIn + */ + 'answer': Array; +} +/** + * + * @export + * @interface UserStreak + */ +export interface UserStreak { + /** + * + * @type {string} + * @memberof UserStreak + */ + 'country_iso': string; + /** + * + * @type {StreakPeriod} + * @memberof UserStreak + */ + 'period': StreakPeriod; + /** + * + * @type {StreakFulfillment} + * @memberof UserStreak + */ + 'fulfillment': StreakFulfillment; + /** + * + * @type {number} + * @memberof UserStreak + */ + 'current_streak': number; + /** + * + * @type {number} + * @memberof UserStreak + */ + 'longest_streak': number; + /** + * + * @type {StreakState} + * @memberof UserStreak + */ + 'state': StreakState; + /** + * + * @type {string} + * @memberof UserStreak + */ + 'last_fulfilled_period_start'?: string | null; + /** + * + * @type {string} + * @memberof UserStreak + */ + 'timezone_name': string; + /** + * + * @type {Array} + * @memberof UserStreak + */ + 'current_period_bounds': Array; + /** + * + * @type {Array} + * @memberof UserStreak + */ + 'last_fulfilled_period_bounds': Array | null; + /** + * + * @type {number} + * @memberof UserStreak + */ + 'time_remaining_in_period': number | null; +} + + +/** + * + * @export + * @enum {string} + */ + +export const UserType = { + Business: 'business', + Cafe: 'cafe', + Cellular: 'cellular', + College: 'college', + ContentDeliveryNetwork: 'content_delivery_network', + ConsumerPrivacyNetwork: 'consumer_privacy_network', + Government: 'government', + Hosting: 'hosting', + Library: 'library', + Military: 'military', + Residential: 'residential', + Router: 'router', + School: 'school', + SearchEngineSpider: 'search_engine_spider', + Traveler: 'traveler' +} as const; + +export type UserType = typeof UserType[keyof typeof UserType]; + + +/** + * + * @export + * @interface UserWalletBalance + */ +export interface UserWalletBalance { + /** + * (USD cents) The amount in the user\'s wallet. + * @type {number} + * @memberof UserWalletBalance + */ + 'amount': number; + /** + * (USD cents) The amount in the user\'s wallet this is currently redeemable. + * @type {number} + * @memberof UserWalletBalance + */ + 'redeemable_amount': number; + /** + * The format describing the str representation of a payout. Typically, this would be displayed to a user. The payout_format is similar to python format string with a subset of functionality supported. Only float with a precision are supported along with an optional comma for a thousands separator. In addition, a mathematical operator can be applied, such as dividing by 100. Examples are shown assuming payout = 100 (one dollar). - \"{payout*10:,.0f} Points\" -> \"1,000 Points\" - \"${payout/100:.2f}\" -> \"$1.00\" + * @type {string} + * @memberof UserWalletBalance + */ + 'payout_format': string; + /** + * The \'amount\' with the payout_format applied. Can be displayed to the user. + * @type {string} + * @memberof UserWalletBalance + */ + 'amount_string': string; + /** + * The \'redeemable_amount\' with the payout_format applied. Can be displayed to the user. + * @type {string} + * @memberof UserWalletBalance + */ + 'redeemable_amount_string': string; +} +/** + * + * @export + * @interface UserWalletBalanceResponse + */ +export interface UserWalletBalanceResponse { + /** + * The status of the API response. + * @type {string} + * @memberof UserWalletBalanceResponse + */ + 'status': UserWalletBalanceResponseStatusEnum; + /** + * + * @type {string} + * @memberof UserWalletBalanceResponse + */ + 'msg'?: string | null; + /** + * + * @type {UserWalletBalance} + * @memberof UserWalletBalanceResponse + */ + 'wallet': UserWalletBalance; +} + +export const UserWalletBalanceResponseStatusEnum = { + Success: 'success', + Error: 'error' +} as const; + +export type UserWalletBalanceResponseStatusEnum = typeof UserWalletBalanceResponseStatusEnum[keyof typeof UserWalletBalanceResponseStatusEnum]; + +/** + * Stores configuration for the user wallet handling + * @export + * @interface UserWalletConfig + */ +export interface UserWalletConfig { + /** + * If enabled, the users\' wallets are managed. + * @type {boolean} + * @memberof UserWalletConfig + */ + 'enabled'?: boolean; + /** + * Uses Amazon Mechanical Turk + * @type {boolean} + * @memberof UserWalletConfig + */ + 'amt'?: boolean; + /** + * + * @type {Set} + * @memberof UserWalletConfig + */ + 'supported_payout_types'?: Set; + /** + * + * @type {string} + * @memberof UserWalletConfig + */ + 'min_cashout'?: string | null; +} +/** + * + * @export + * @interface ValidationError + */ +export interface ValidationError { + /** + * + * @type {Array} + * @memberof ValidationError + */ + 'loc': Array; + /** + * + * @type {string} + * @memberof ValidationError + */ + 'msg': string; + /** + * + * @type {string} + * @memberof ValidationError + */ + 'type': string; +} +/** + * + * @export + * @interface ValidationErrorLocInner + */ +export interface ValidationErrorLocInner { +} +/** + * Returns buckets from WXET as single tasks Offerwall code: `55a4e1a9` + * @export + * @interface WXETOfferwall + */ +export interface WXETOfferwall { + /** + * Unique identifier to reference a generated offerwall + * @type {string} + * @memberof WXETOfferwall + */ + 'id': string; + /** + * 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. + * @type {number} + * @memberof WXETOfferwall + */ + 'availability_count': number; + /** + * 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. + * @type {number} + * @memberof WXETOfferwall + */ + 'attempted_live_eligible_count'?: number; + /** + * + * @type {Array} + * @memberof WXETOfferwall + */ + 'buckets'?: Array; + /** + * Explanations describing why so many or few opportunities are available. + * @type {Array} + * @memberof WXETOfferwall + */ + 'offerwall_reasons'?: Array; +} +/** + * + * @export + * @interface WXETOfferwallBucket + */ +export interface WXETOfferwallBucket { + /** + * Unique identifier this particular bucket + * @type {string} + * @memberof WXETOfferwallBucket + */ + 'id': string; + /** + * The URL to send a respondent into. Must not edit this URL in any way + * @type {string} + * @memberof WXETOfferwallBucket + */ + 'uri': string; + /** + * The bucket\'s expected duration, in seconds + * @type {number} + * @memberof WXETOfferwallBucket + */ + 'duration': number; + /** + * The bucket\'s min payout, in usd cents + * @type {number} + * @memberof WXETOfferwallBucket + */ + 'min_payout': number; +} +/** + * + * @export + * @interface WXETOfferwallResponse + */ +export interface WXETOfferwallResponse { + /** + * + * @type {OfferWallInfo} + * @memberof WXETOfferwallResponse + */ + 'info': OfferWallInfo; + /** + * + * @type {WXETOfferwall} + * @memberof WXETOfferwallResponse + */ + 'offerwall': WXETOfferwall; +} +/** + * + * @export + * @enum {string} + */ + +export const WallAdjustedStatus = { + Ac: 'ac', + Af: 'af', + Ca: 'ca', + Cc: 'cc' +} as const; + +export type WallAdjustedStatus = typeof WallAdjustedStatus[keyof typeof WallAdjustedStatus]; + + +/** + * + * @export + * @interface WallOut + */ +export interface WallOut { + [key: string]: any; + + /** + * + * @type {string} + * @memberof WallOut + */ + 'uuid'?: string; + /** + * + * @type {Source} + * @memberof WallOut + */ + 'source': Source; + /** + * + * @type {BuyerId} + * @memberof WallOut + */ + 'buyer_id'?: BuyerId; + /** + * + * @type {string} + * @memberof WallOut + */ + 'req_survey_id': string; + /** + * + * @type {string} + * @memberof WallOut + */ + 'started'?: string; + /** + * + * @type {SurveyId} + * @memberof WallOut + */ + 'survey_id'?: SurveyId; + /** + * + * @type {Finished} + * @memberof WallOut + */ + 'finished'?: Finished; + /** + * + * @type {WallOutStatus} + * @memberof WallOut + */ + 'status'?: WallOutStatus; + /** + * + * @type {WallOutStatusCode1} + * @memberof WallOut + */ + 'status_code_1'?: WallOutStatusCode1 | null; + /** + * + * @type {WallOutStatusCode2} + * @memberof WallOut + */ + 'status_code_2'?: WallOutStatusCode2; + /** + * + * @type {ExtStatusCode1} + * @memberof WallOut + */ + 'ext_status_code_1'?: ExtStatusCode1; + /** + * + * @type {ExtStatusCode2} + * @memberof WallOut + */ + 'ext_status_code_2'?: ExtStatusCode2; + /** + * + * @type {ExtStatusCode3} + * @memberof WallOut + */ + 'ext_status_code_3'?: ExtStatusCode3; + /** + * + * @type {WallOutReportValue} + * @memberof WallOut + */ + 'report_value'?: WallOutReportValue; + /** + * + * @type {ReportNotes} + * @memberof WallOut + */ + 'report_notes'?: ReportNotes; + /** + * + * @type {WallOutAdjustedStatus} + * @memberof WallOut + */ + 'adjusted_status'?: WallOutAdjustedStatus; + /** + * + * @type {AdjustedTimestamp} + * @memberof WallOut + */ + 'adjusted_timestamp'?: AdjustedTimestamp; + /** + * The amount the user would earn from completing this task, if the status was a complete. If the BP has no payout xform, the user_cpi is None. This is analogous to the session\'s user_payout. + * @type {number} + * @memberof WallOut + */ + 'user_cpi'?: number; + /** + * + * @type {UserCpiString} + * @memberof WallOut + */ + 'user_cpi_string'?: UserCpiString; +} + + +/** + * + * @export + * @interface WallOutAdjustedStatus + */ +export interface WallOutAdjustedStatus { +} +/** + * + * @export + * @interface WallOutReportValue + */ +export interface WallOutReportValue { +} +/** + * + * @export + * @interface WallOutStatus + */ +export interface WallOutStatus { +} +/** + * __High level status code for outcome of the session.__ This should only be NULL if the Status is ABANDON or TIMEOUT Allowed values: - __BUYER_FAIL__: User terminated in buyer survey - __BUYER_QUALITY_FAIL__: User terminated in buyer survey for quality reasons - __PS_FAIL__: User failed in marketplace\'s prescreener - __PS_QUALITY__: User rejected by marketplace for quality reasons - __PS_BLOCKED__: User is explicitly blocked by the marketplace. Note: on some marketplaces, users can have multiple PS_QUALITY terminations and still complete surveys. - __PS_OVERQUOTA__: User rejected by marketplace for over quota - __PS_DUPLICATE__: User rejected by marketplace for duplicate - __GRS_FAIL__: The user failed within the GRS Platform - __GRS_QUALITY_FAIL__: The user failed within the GRS Platform for quality reasons - __GRS_ABANDON__: The user abandoned/timed out within the GRS Platform - __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. - __BUYER_ABANDON__: The user abandoned/timed out within the client survey - __UNKNOWN__: The status code is not documented - __COMPLETE__: The user completed the task successfully - __MARKETPLACE_FAIL__: Something was wrong upon the user redirecting from the marketplace, e.g. no postback received, or url hashing failures. - __SESSION_START_FAIL__: User failed before being sent into a marketplace - __SESSION_CONTINUE_FAIL__: User failed between attempts - __SESSION_START_QUALITY_FAIL__: User failed before being sent into a marketplace for \"security\" reasons - __SESSION_CONTINUE_QUALITY_FAIL__: User failed between attempts for \"security\" reasons + * @export + * @interface WallOutStatusCode1 + */ +export interface WallOutStatusCode1 { +} +/** + * This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL Allowed values: - __URL_HASHING_CHECK_FAILED__: The redirect URL (coming back from the marketplace) failed hashing checks - __BROKEN_REDIRECT__: The redirect URL was missing required query params or was unparseable - __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. - __INVALID_MARKETPLACE_POSTBACK__: The redirect indicated a complete, but no/invalid Postback was received from the marketplace - __NO_MARKETPLACE_POSTBACK__: No/invalid Postback was received from the marketplace. Used in cases where the redirect does not contain a status. - __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. - __INTERNAL_ERROR__: Something happened during the handling of this redirect (on our side) + * @export + * @interface WallOutStatusCode2 + */ +export interface WallOutStatusCode2 { +} +/** + * This should be set if the Wall.status_code_1 is MARKETPLACE_FAIL + * @export + * @enum {number} + */ + +export const WallStatusCode2 = { + NUMBER_12: 12, + NUMBER_16: 16, + NUMBER_17: 17, + NUMBER_13: 13, + NUMBER_18: 18, + NUMBER_14: 14, + NUMBER_15: 15 +} as const; + +export type WallStatusCode2 = typeof WallStatusCode2[keyof typeof WallStatusCode2]; + + +/** + * + * @export + * @interface YieldManConfig + */ +export interface YieldManConfig { + /** + * + * @type {OfferWallCategoryRequest} + * @memberof YieldManConfig + */ + 'category_request'?: OfferWallCategoryRequest; + /** + * + * @type {OfferWallRequestYieldmanParams} + * @memberof YieldManConfig + */ + 'scoring_params'?: OfferWallRequestYieldmanParams; +} + +/** + * ContestApi - axios parameter creator + * @export + */ +export const ContestApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Gets a Contest. Includes several keys that are specific to the requesting user: e.g. user_winnings, user_amount. + * @summary Get Contest User View + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} contestUuid + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContestUserViewProductIdContestContestUuidUserProductUserIdGet: async (productId: string, contestUuid: string, productUserId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getContestUserViewProductIdContestContestUuidUserProductUserIdGet', 'productId', productId) + // verify required parameter 'contestUuid' is not null or undefined + assertParamExists('getContestUserViewProductIdContestContestUuidUserProductUserIdGet', 'contestUuid', contestUuid) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('getContestUserViewProductIdContestContestUuidUserProductUserIdGet', 'productUserId', productUserId) + const localVarPath = `/{product_id}/contest/{contest_uuid}/user/{product_user_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"contest_uuid"}}`, encodeURIComponent(String(contestUuid))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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, + }; + }, + /** + * Get contests the requesting user is eligible for. Contest eligibility may involve the user\'s country, which is determined by the ip address of THIS request. + * @summary List Contests User Eligible + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet: async (productId: string, productUserId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet', 'productId', productId) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet', 'productUserId', productUserId) + const localVarPath = `/{product_id}/contest/user/{product_user_id}/eligible/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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, + }; + }, + /** + * Get contests the requesting user has entered. This includes contests such as milestone contests where the user was automatically entered by having a complete for instance. + * @summary List Contests User Entered + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet: async (productId: string, productUserId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet', 'productId', productId) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet', 'productUserId', productUserId) + const localVarPath = `/{product_id}/contest/user/{product_user_id}/entered/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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, + }; + }, + /** + * Get contests the requesting user has won a prize for. + * @summary List Contests User Winner + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet: async (productId: string, productUserId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet', 'productId', productId) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet', 'productUserId', productUserId) + const localVarPath = `/{product_id}/contest/user/{product_user_id}/winner/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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, + }; + }, + } +}; + +/** + * ContestApi - functional programming interface + * @export + */ +export const ContestApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ContestApiAxiosParamCreator(configuration) + return { + /** + * Gets a Contest. Includes several keys that are specific to the requesting user: e.g. user_winnings, user_amount. + * @summary Get Contest User View + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} contestUuid + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId: string, contestUuid: string, productUserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId, contestUuid, productUserId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContestApi.getContestUserViewProductIdContestContestUuidUserProductUserIdGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get contests the requesting user is eligible for. Contest eligibility may involve the user\'s country, which is determined by the ip address of THIS request. + * @summary List Contests User Eligible + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId, productUserId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContestApi.listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get contests the requesting user has entered. This includes contests such as milestone contests where the user was automatically entered by having a complete for instance. + * @summary List Contests User Entered + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId, productUserId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContestApi.listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get contests the requesting user has won a prize for. + * @summary List Contests User Winner + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId, productUserId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ContestApi.listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ContestApi - factory interface + * @export + */ +export const ContestApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ContestApiFp(configuration) + return { + /** + * Gets a Contest. Includes several keys that are specific to the requesting user: e.g. user_winnings, user_amount. + * @summary Get Contest User View + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} contestUuid + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId: string, contestUuid: string, productUserId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId, contestUuid, productUserId, options).then((request) => request(axios, basePath)); + }, + /** + * Get contests the requesting user is eligible for. Contest eligibility may involve the user\'s country, which is determined by the ip address of THIS request. + * @summary List Contests User Eligible + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId, productUserId, options).then((request) => request(axios, basePath)); + }, + /** + * Get contests the requesting user has entered. This includes contests such as milestone contests where the user was automatically entered by having a complete for instance. + * @summary List Contests User Entered + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId, productUserId, options).then((request) => request(axios, basePath)); + }, + /** + * Get contests the requesting user has won a prize for. + * @summary List Contests User Winner + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): AxiosPromise> { + return localVarFp.listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId, productUserId, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ContestApi - object-oriented interface + * @export + * @class ContestApi + * @extends {BaseAPI} + */ +export class ContestApi extends BaseAPI { + /** + * Gets a Contest. Includes several keys that are specific to the requesting user: e.g. user_winnings, user_amount. + * @summary Get Contest User View + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} contestUuid + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContestApi + */ + public getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId: string, contestUuid: string, productUserId: string, options?: RawAxiosRequestConfig) { + return ContestApiFp(this.configuration).getContestUserViewProductIdContestContestUuidUserProductUserIdGet(productId, contestUuid, productUserId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get contests the requesting user is eligible for. Contest eligibility may involve the user\'s country, which is determined by the ip address of THIS request. + * @summary List Contests User Eligible + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContestApi + */ + public listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig) { + return ContestApiFp(this.configuration).listContestsUserEligibleProductIdContestUserProductUserIdEligibleGet(productId, productUserId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get contests the requesting user has entered. This includes contests such as milestone contests where the user was automatically entered by having a complete for instance. + * @summary List Contests User Entered + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContestApi + */ + public listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig) { + return ContestApiFp(this.configuration).listContestsUserEnteredProductIdContestUserProductUserIdEnteredGet(productId, productUserId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get contests the requesting user has won a prize for. + * @summary List Contests User Winner + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ContestApi + */ + public listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig) { + return ContestApiFp(this.configuration).listContestsUserWinnerProductIdContestUserProductUserIdWinnerGet(productId, productUserId, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * DashboardApi - axios parameter creator + * @export + */ +export const DashboardApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Marketplace Inventory + * @param {MarketplaceInventoryDashboardInventoryGetMarketplaceEnum} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceInventoryDashboardInventoryGet: async (marketplace: MarketplaceInventoryDashboardInventoryGetMarketplaceEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'marketplace' is not null or undefined + assertParamExists('marketplaceInventoryDashboardInventoryGet', 'marketplace', marketplace) + const localVarPath = `/dashboard/inventory/`; + // 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 (marketplace !== undefined) { + localVarQueryParameter['marketplace'] = marketplace; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * DashboardApi - functional programming interface + * @export + */ +export const DashboardApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = DashboardApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Marketplace Inventory + * @param {MarketplaceInventoryDashboardInventoryGetMarketplaceEnum} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceInventoryDashboardInventoryGet(marketplace: MarketplaceInventoryDashboardInventoryGetMarketplaceEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.marketplaceInventoryDashboardInventoryGet(marketplace, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['DashboardApi.marketplaceInventoryDashboardInventoryGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * DashboardApi - factory interface + * @export + */ +export const DashboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = DashboardApiFp(configuration) + return { + /** + * + * @summary Marketplace Inventory + * @param {MarketplaceInventoryDashboardInventoryGetMarketplaceEnum} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceInventoryDashboardInventoryGet(marketplace: MarketplaceInventoryDashboardInventoryGetMarketplaceEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.marketplaceInventoryDashboardInventoryGet(marketplace, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * DashboardApi - object-oriented interface + * @export + * @class DashboardApi + * @extends {BaseAPI} + */ +export class DashboardApi extends BaseAPI { + /** + * + * @summary Marketplace Inventory + * @param {MarketplaceInventoryDashboardInventoryGetMarketplaceEnum} marketplace + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof DashboardApi + */ + public marketplaceInventoryDashboardInventoryGet(marketplace: MarketplaceInventoryDashboardInventoryGetMarketplaceEnum, options?: RawAxiosRequestConfig) { + return DashboardApiFp(this.configuration).marketplaceInventoryDashboardInventoryGet(marketplace, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const MarketplaceInventoryDashboardInventoryGetMarketplaceEnum = { + Wxet: 'WXET' +} as const; +export type MarketplaceInventoryDashboardInventoryGetMarketplaceEnum = typeof MarketplaceInventoryDashboardInventoryGetMarketplaceEnum[keyof typeof MarketplaceInventoryDashboardInventoryGetMarketplaceEnum]; + + +/** + * LeaderboardApi - axios parameter creator + * @export + */ +export const LeaderboardApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet: async (productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet', 'productId', productId) + // verify required parameter 'boardCode' is not null or undefined + assertParamExists('leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet', 'boardCode', boardCode) + // verify required parameter 'freq' is not null or undefined + assertParamExists('leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet', 'freq', freq) + const localVarPath = `/{product_id}/leaderboard/timespan/{board_code}/winners/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"board_code"}}`, encodeURIComponent(String(boardCode))); + // 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 (freq !== undefined) { + localVarQueryParameter['freq'] = freq; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary Timespan Leaderboard + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {string} [bpuid] 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. + * @param {string} [withinTime] Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. + * @param {number} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet: async (productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, bpuid?: string, withinTime?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet', 'productId', productId) + // verify required parameter 'boardCode' is not null or undefined + assertParamExists('timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet', 'boardCode', boardCode) + // verify required parameter 'freq' is not null or undefined + assertParamExists('timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet', 'freq', freq) + const localVarPath = `/{product_id}/leaderboard/timespan/{board_code}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"board_code"}}`, encodeURIComponent(String(boardCode))); + // 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 (freq !== undefined) { + localVarQueryParameter['freq'] = freq; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (withinTime !== undefined) { + localVarQueryParameter['within_time'] = (withinTime as any instanceof Date) ? + (withinTime as any).toISOString() : + withinTime; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * LeaderboardApi - functional programming interface + * @export + */ +export const LeaderboardApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = LeaderboardApiAxiosParamCreator(configuration) + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeaderboardApi.leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary Timespan Leaderboard + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {string} [bpuid] 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. + * @param {string} [withinTime] Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. + * @param {number} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, bpuid?: string, withinTime?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, withinTime, limit, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['LeaderboardApi.timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * LeaderboardApi - factory interface + * @export + */ +export const LeaderboardApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = LeaderboardApiFp(configuration) + return { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary Timespan Leaderboard + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {string} [bpuid] 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. + * @param {string} [withinTime] Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. + * @param {number} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, bpuid?: string, withinTime?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, withinTime, limit, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * LeaderboardApi - object-oriented interface + * @export + * @class LeaderboardApi + * @extends {BaseAPI} + */ +export class LeaderboardApi extends BaseAPI { + /** + * Get the Winners of leaderboard contests + * @summary Leaderboard Winners + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LeaderboardApi + */ + public leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, options?: RawAxiosRequestConfig) { + return LeaderboardApiFp(this.configuration).leaderboardWinnersProductIdLeaderboardTimespanBoardCodeWinnersGet(productId, boardCode, freq, countryIso, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary Timespan Leaderboard + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {LeaderboardCode} boardCode The type of leaderboard. What the \"values\" represent. Allowed values: - __complete_count__ *(COMPLETE_COUNT)*: Number of Completes - __largest_user_payout__ *(LARGEST_PAYOUT)*: Largest Single Payout - __sum_user_payout__ *(SUM_PAYOUTS)*: (Sum of) Total Payouts + * @param {LeaderboardFrequency} freq The time period range for the leaderboard. Allowed values: - __daily__ *(DAILY)*: UTC midnight to UTC midnight - __weekly__ *(WEEKLY)*: Sunday Midnight to Sunday Midnight UTC - __monthly__ *(MONTHLY)*: Jan 1 00:00:00 + * @param {string} [countryIso] 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. + * @param {string} [bpuid] 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. + * @param {string} [withinTime] Any local timestamp falling within the desired leaderboard\'s period. If not passed, uses the country\'s current time period. + * @param {number} [limit] Max number of rows to return + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof LeaderboardApi + */ + public timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId: string, boardCode: LeaderboardCode, freq: LeaderboardFrequency, countryIso?: string, bpuid?: string, withinTime?: string, limit?: number, options?: RawAxiosRequestConfig) { + return LeaderboardApiFp(this.configuration).timespanLeaderboardProductIdLeaderboardTimespanBoardCodeGet(productId, boardCode, freq, countryIso, bpuid, withinTime, limit, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * OfferwallApi - axios parameter creator + * @export + */ +export const OfferwallApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceOfferwallProductIdOfferwall5fa23085Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('marketplaceOfferwallProductIdOfferwall5fa23085Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('marketplaceOfferwallProductIdOfferwall5fa23085Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/5fa23085/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Block Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost} bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost: async (productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost: BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId?: string | null, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost', 'productId', productId) + // verify required parameter 'offerwallId' is not null or undefined + assertParamExists('offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost', 'offerwallId', offerwallId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost', 'bpuid', bpuid) + // verify required parameter 'bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost' is not null or undefined + assertParamExists('offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost', 'bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost', bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost) + const localVarPath = `/{product_id}/offerwall/7a89dcdb/{offerwall_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"offerwall_id"}}`, encodeURIComponent(String(offerwallId))); + // 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; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (sessionId !== undefined) { + localVarQueryParameter['session_id'] = sessionId; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. No buckets are returned if the user is blocked. + * @summary Offerwall Softpair Block + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/7a89dcdb/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (maxOptions !== undefined) { + localVarQueryParameter['max_options'] = maxOptions; + } + + if (maxQuestions !== undefined) { + localVarQueryParameter['max_questions'] = maxQuestions; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: async (productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId?: string | null, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost', 'productId', productId) + // verify required parameter 'offerwallId' is not null or undefined + assertParamExists('offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost', 'offerwallId', offerwallId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost', 'bpuid', bpuid) + // verify required parameter 'bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost' is not null or undefined + assertParamExists('offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost', 'bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost', bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost) + const localVarPath = `/{product_id}/offerwall/37d1da64/{offerwall_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"offerwall_id"}}`, encodeURIComponent(String(offerwallId))); + // 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; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (sessionId !== undefined) { + localVarQueryParameter['session_id'] = sessionId; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. + * @summary Offerwall Softpair + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairProductIdOfferwall37d1da64Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('offerwallSoftpairProductIdOfferwall37d1da64Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('offerwallSoftpairProductIdOfferwall37d1da64Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/37d1da64/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (maxOptions !== undefined) { + localVarQueryParameter['max_options'] = maxOptions; + } + + if (maxQuestions !== undefined) { + localVarQueryParameter['max_questions'] = maxQuestions; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {Set} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oneShotOfferwallProductIdOfferwall6f27b1aeGet: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, sources?: Set, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('oneShotOfferwallProductIdOfferwall6f27b1aeGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('oneShotOfferwallProductIdOfferwall6f27b1aeGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/6f27b1ae/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (sources) { + localVarQueryParameter['sources'] = Array.from(sources); + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + singleOfferwallProductIdOfferwall5fl8bpv5Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('singleOfferwallProductIdOfferwall5fl8bpv5Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('singleOfferwallProductIdOfferwall5fl8bpv5Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/5fl8bpv5/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns an offerwall with buckets that are clustered by setting as seeds the highest scoring surveys for each bin, then the rest are distributed according to their Euclidean distance using the bucket\'s features. + * @summary Starwall Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallOfferwallProductIdOfferwallB59a2d2bGet: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('starwallOfferwallProductIdOfferwallB59a2d2bGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('starwallOfferwallProductIdOfferwallB59a2d2bGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/b59a2d2b/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Starwall Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/7fa1b3f4/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Starwall Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/630db2a4/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusOfferwallProductIdOfferwall5481f322Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('starwallPlusOfferwallProductIdOfferwall5481f322Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('starwallPlusOfferwallProductIdOfferwall5481f322Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/5481f322/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNOfferwallProductIdOfferwall45b7228a7Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('topNOfferwallProductIdOfferwall45b7228a7Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('topNOfferwallProductIdOfferwall45b7228a7Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/45b7228a7/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the TopNOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Topn Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockOfferwallProductIdOfferwallD48cce47Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('topNPlusBlockOfferwallProductIdOfferwallD48cce47Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('topNPlusBlockOfferwallProductIdOfferwallD48cce47Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/d48cce47/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the TopNOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Topn Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/1e5f0af8/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusOfferwallProductIdOfferwallB145b803Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('topNPlusOfferwallProductIdOfferwallB145b803Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('topNPlusOfferwallProductIdOfferwallB145b803Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/b145b803/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + if (minBinSize !== undefined) { + localVarQueryParameter['min_bin_size'] = minBinSize; + } + + if (splitBy !== undefined) { + localVarQueryParameter['split_by'] = splitBy; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + wXETOfferwallProductIdOfferwall55a4e1a9Get: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('wXETOfferwallProductIdOfferwall55a4e1a9Get', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('wXETOfferwallProductIdOfferwall55a4e1a9Get', 'bpuid', bpuid) + const localVarPath = `/{product_id}/offerwall/55a4e1a9/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languages) { + localVarQueryParameter['languages'] = languages; + } + + if (behavior !== undefined) { + localVarQueryParameter['behavior'] = behavior; + } + + if (minPayout !== undefined) { + localVarQueryParameter['min_payout'] = minPayout; + } + + if (duration !== undefined) { + localVarQueryParameter['duration'] = duration; + } + + if (nBins !== undefined) { + localVarQueryParameter['n_bins'] = nBins; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * OfferwallApi - functional programming interface + * @export + */ +export const OfferwallApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = OfferwallApiAxiosParamCreator(configuration) + return { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.marketplaceOfferwallProductIdOfferwall5fa23085Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.marketplaceOfferwallProductIdOfferwall5fa23085Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Block Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost} bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost: BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. No buckets are returned if the user is blocked. + * @summary Offerwall Softpair Block + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. + * @summary Offerwall Softpair + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async offerwallSoftpairProductIdOfferwall37d1da64Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.offerwallSoftpairProductIdOfferwall37d1da64Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.offerwallSoftpairProductIdOfferwall37d1da64Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {Set} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, sources?: Set, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, sources, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.oneShotOfferwallProductIdOfferwall6f27b1aeGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.singleOfferwallProductIdOfferwall5fl8bpv5Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.singleOfferwallProductIdOfferwall5fl8bpv5Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns an offerwall with buckets that are clustered by setting as seeds the highest scoring surveys for each bin, then the rest are distributed according to their Euclidean distance using the bucket\'s features. + * @summary Starwall Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.starwallOfferwallProductIdOfferwallB59a2d2bGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.starwallOfferwallProductIdOfferwallB59a2d2bGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Starwall Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Starwall Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.starwallPlusOfferwallProductIdOfferwall5481f322Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.starwallPlusOfferwallProductIdOfferwall5481f322Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNOfferwallProductIdOfferwall45b7228a7Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.topNOfferwallProductIdOfferwall45b7228a7Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.topNOfferwallProductIdOfferwall45b7228a7Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Topn Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.topNPlusBlockOfferwallProductIdOfferwallD48cce47Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Topn Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async topNPlusOfferwallProductIdOfferwallB145b803Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.topNPlusOfferwallProductIdOfferwallB145b803Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.topNPlusOfferwallProductIdOfferwallB145b803Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async wXETOfferwallProductIdOfferwall55a4e1a9Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.wXETOfferwallProductIdOfferwall55a4e1a9Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['OfferwallApi.wXETOfferwallProductIdOfferwall55a4e1a9Get']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * OfferwallApi - factory interface + * @export + */ +export const OfferwallApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = OfferwallApiFp(configuration) + return { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.marketplaceOfferwallProductIdOfferwall5fa23085Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options).then((request) => request(axios, basePath)); + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Block Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost} bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost: BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId, options).then((request) => request(axios, basePath)); + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. No buckets are returned if the user is blocked. + * @summary Offerwall Softpair Block + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options).then((request) => request(axios, basePath)); + }, + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId, options).then((request) => request(axios, basePath)); + }, + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. + * @summary Offerwall Softpair + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + offerwallSoftpairProductIdOfferwall37d1da64Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.offerwallSoftpairProductIdOfferwall37d1da64Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options).then((request) => request(axios, basePath)); + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {Set} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, sources?: Set, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, sources, options).then((request) => request(axios, basePath)); + }, + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.singleOfferwallProductIdOfferwall5fl8bpv5Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options).then((request) => request(axios, basePath)); + }, + /** + * Returns an offerwall with buckets that are clustered by setting as seeds the highest scoring surveys for each bin, then the rest are distributed according to their Euclidean distance using the bucket\'s features. + * @summary Starwall Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.starwallOfferwallProductIdOfferwallB59a2d2bGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Starwall Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Starwall Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.starwallPlusOfferwallProductIdOfferwall5481f322Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNOfferwallProductIdOfferwall45b7228a7Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.topNOfferwallProductIdOfferwall45b7228a7Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Topn Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Topn Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + topNPlusOfferwallProductIdOfferwallB145b803Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.topNPlusOfferwallProductIdOfferwallB145b803Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(axios, basePath)); + }, + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + wXETOfferwallProductIdOfferwall55a4e1a9Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.wXETOfferwallProductIdOfferwall55a4e1a9Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * OfferwallApi - object-oriented interface + * @export + * @class OfferwallApi + * @extends {BaseAPI} + */ +export class OfferwallApi extends BaseAPI { + /** + * Returns buckets grouped by marketplace, one per marketplace, with the tasks ordered by quality. + * @summary Marketplace Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public marketplaceOfferwallProductIdOfferwall5fa23085Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).marketplaceOfferwallProductIdOfferwall5fa23085Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Block Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost} bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost: BodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).offerwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairBlockPostProductIdOfferwall7a89dcdbOfferwallIdPost, sessionId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. No buckets are returned if the user is blocked. + * @summary Offerwall Softpair Block + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).offerwallSoftpairBlockProductIdOfferwall7a89dcdbGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This is a custom endpoint for a softpair-style offerwall that allows you to update profiling answers and then immediately get back the updated offerwall + * @summary Offerwall Softpair Post + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} offerwallId The offerwall ID the user is interacting with + * @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 {BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost} bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost + * @param {string | null} [sessionId] A session id (uuid4.hex) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId: string, offerwallId: string, bpuid: string, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost: BodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId?: string | null, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).offerwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost(productId, offerwallId, bpuid, bodyOfferwallSoftpairPostProductIdOfferwall37d1da64OfferwallIdPost, sessionId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * This offerwall contains tasks for which the user has a conditional eligibility. The questions that a user must answer to determine the eligibility are included within each bucket. Additionally, the question definitions are included for convenience. + * @summary Offerwall Softpair + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {number} [maxOptions] Max number of options an allowed question can have (allowed to be asked) + * @param {number} [maxQuestions] Max number of missing questions on a single bin + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public offerwallSoftpairProductIdOfferwall37d1da64Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, maxOptions?: number, maxQuestions?: number, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).offerwallSoftpairProductIdOfferwall37d1da64Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, maxOptions, maxQuestions, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary One Shot Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {Set} [sources] Restrict tasks to those from these marketplaces only. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, sources?: Set, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).oneShotOfferwallProductIdOfferwall6f27b1aeGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, sources, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Only returns a single bucket with the top scoring tasks. + * @summary Single Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public singleOfferwallProductIdOfferwall5fl8bpv5Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, minBinSize?: number, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).singleOfferwallProductIdOfferwall5fl8bpv5Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, minBinSize, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns an offerwall with buckets that are clustered by setting as seeds the highest scoring surveys for each bin, then the rest are distributed according to their Euclidean distance using the bucket\'s features. + * @summary Starwall Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public starwallOfferwallProductIdOfferwallB59a2d2bGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).starwallOfferwallProductIdOfferwallB59a2d2bGet(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the StarwallOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Starwall Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).starwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the StarwallOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Starwall Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).starwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the StarwallOfferWall, but the buckets include contents. + * @summary Starwall Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public starwallPlusOfferwallProductIdOfferwall5481f322Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).starwallPlusOfferwallProductIdOfferwall5481f322Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Returns an offerwall with buckets that are clustered by the `split_by` argument using KMeans clustering. + * @summary Topn Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public topNOfferwallProductIdOfferwall45b7228a7Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).topNOfferwallProductIdOfferwall45b7228a7Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the TopNOfferWall, but the buckets include contents and no buckets are returned if the user is blocked. + * @summary Topn Plus Block Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).topNPlusBlockOfferwallProductIdOfferwallD48cce47Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the TopNOfferWall, but the buckets include contents, no buckets are returned if the user is blocked, and each bucket includes a `is_recontact` key. + * @summary Topn Plus Block Recontact Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).topNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Same as the TopNOfferWall, but the buckets include contents. + * @summary Topn Plus Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {number} [minBinSize] Minimum number of tasks that need to be in a bucket + * @param {TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum} [splitBy] Cluster tasks by payout or duration + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public topNPlusOfferwallProductIdOfferwallB145b803Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, minBinSize?: number, splitBy?: TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).topNPlusOfferwallProductIdOfferwallB145b803Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, minBinSize, splitBy, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Each bucket has only 1 single task, and only basic info is returned about each bucket. + * @summary Wxet Offerwall + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {Array} [languages] Respondent\'s desired languages (ISO 639-2/B, lowercase) + * @param {string} [behavior] Allows using custom scoring functions. Please discuss directly with GRL. + * @param {string} [minPayout] Decimal representation of the minimum amount of USD that any of the tasks will pay + * @param {number} [duration] Maximum length of desired task (in seconds). + * @param {number} [nBins] Number of bins requested in the offerwall. If n_bins=1 there is no grouping and you get all duration + payout metrics on across all (as shown by the availability_count). n_bins=0 will return back an empty bucket array, however, the availability_count will still show the total opportunities available for that bpuid + passed in parameter settings. n_bins=∞ (or any positive integer) will return back the total number of bins capable of being uniquely split. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof OfferwallApi + */ + public wXETOfferwallProductIdOfferwall55a4e1a9Get(productId: string, bpuid: string, ip?: string, countryIso?: string, languages?: Array, behavior?: string, minPayout?: string, duration?: number, nBins?: number, options?: RawAxiosRequestConfig) { + return OfferwallApiFp(this.configuration).wXETOfferwallProductIdOfferwall55a4e1a9Get(productId, bpuid, ip, countryIso, languages, behavior, minPayout, duration, nBins, options).then((request) => request(this.axios, this.basePath)); + } +} + +/** + * @export + */ +export const StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum = typeof StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum[keyof typeof StarwallOfferwallProductIdOfferwallB59a2d2bGetSplitByEnum]; +/** + * @export + */ +export const StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum = typeof StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum[keyof typeof StarwallPlusBlockOfferwallProductIdOfferwall7fa1b3f4GetSplitByEnum]; +/** + * @export + */ +export const StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum = typeof StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum[keyof typeof StarwallPlusBlockRecontactOfferwallProductIdOfferwall630db2a4GetSplitByEnum]; +/** + * @export + */ +export const StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum = typeof StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum[keyof typeof StarwallPlusOfferwallProductIdOfferwall5481f322GetSplitByEnum]; +/** + * @export + */ +export const TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum = typeof TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum[keyof typeof TopNOfferwallProductIdOfferwall45b7228a7GetSplitByEnum]; +/** + * @export + */ +export const TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum = typeof TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum[keyof typeof TopNPlusBlockOfferwallProductIdOfferwallD48cce47GetSplitByEnum]; +/** + * @export + */ +export const TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum = typeof TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum[keyof typeof TopNPlusBlockRecontactOfferwallProductIdOfferwall1e5f0af8GetSplitByEnum]; +/** + * @export + */ +export const TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum = { + Payout: 'payout', + Duration: 'duration' +} as const; +export type TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum = typeof TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum[keyof typeof TopNPlusOfferwallProductIdOfferwallB145b803GetSplitByEnum]; + + +/** + * ProductUserApi - axios parameter creator + * @export + */ +export const ProductUserApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary User Profile Filter By Marketplace Pid + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Source} source The marketplace to search + * @param {Array} pid The user\'s marketplace PID. Supports multiple params + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet: async (productId: string, source: Source, pid: Array, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet', 'productId', productId) + // verify required parameter 'source' is not null or undefined + assertParamExists('userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet', 'source', source) + // verify required parameter 'pid' is not null or undefined + assertParamExists('userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet', 'pid', pid) + const localVarPath = `/{product_id}/user/by-marketplace-pid/` + .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 (source !== undefined) { + localVarQueryParameter['source'] = source; + } + + if (pid) { + localVarQueryParameter['pid'] = pid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary User Profile + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileProductIdUserProductUserIdProfileGet: async (productId: string, productUserId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('userProfileProductIdUserProductUserIdProfileGet', 'productId', productId) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('userProfileProductIdUserProductUserIdProfileGet', 'productUserId', productUserId) + const localVarPath = `/{product_id}/user/{product_user_id}/profile/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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, + }; + }, + /** + * + * @summary User Profile Update + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {UserProfileUpdateRequest} userProfileUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileUpdateProductIdUserProductUserIdProfilePatch: async (productId: string, productUserId: string, userProfileUpdateRequest: UserProfileUpdateRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('userProfileUpdateProductIdUserProductUserIdProfilePatch', 'productId', productId) + // verify required parameter 'productUserId' is not null or undefined + assertParamExists('userProfileUpdateProductIdUserProductUserIdProfilePatch', 'productUserId', productUserId) + // verify required parameter 'userProfileUpdateRequest' is not null or undefined + assertParamExists('userProfileUpdateProductIdUserProductUserIdProfilePatch', 'userProfileUpdateRequest', userProfileUpdateRequest) + const localVarPath = `/{product_id}/user/{product_user_id}/profile/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"product_user_id"}}`, encodeURIComponent(String(productUserId))); + // 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: 'PATCH', ...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(userProfileUpdateRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProductUserApi - functional programming interface + * @export + */ +export const ProductUserApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ProductUserApiAxiosParamCreator(configuration) + return { + /** + * + * @summary User Profile Filter By Marketplace Pid + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Source} source The marketplace to search + * @param {Array} pid The user\'s marketplace PID. Supports multiple params + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId: string, source: Source, pid: Array, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId, source, pid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProductUserApi.userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary User Profile + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileProductIdUserProductUserIdProfileGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userProfileProductIdUserProductUserIdProfileGet(productId, productUserId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProductUserApi.userProfileProductIdUserProductUserIdProfileGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary User Profile Update + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {UserProfileUpdateRequest} userProfileUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileUpdateProductIdUserProductUserIdProfilePatch(productId: string, productUserId: string, userProfileUpdateRequest: UserProfileUpdateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userProfileUpdateProductIdUserProductUserIdProfilePatch(productId, productUserId, userProfileUpdateRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProductUserApi.userProfileUpdateProductIdUserProductUserIdProfilePatch']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ProductUserApi - factory interface + * @export + */ +export const ProductUserApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProductUserApiFp(configuration) + return { + /** + * + * @summary User Profile Filter By Marketplace Pid + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Source} source The marketplace to search + * @param {Array} pid The user\'s marketplace PID. Supports multiple params + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId: string, source: Source, pid: Array, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId, source, pid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary User Profile + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileProductIdUserProductUserIdProfileGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userProfileProductIdUserProductUserIdProfileGet(productId, productUserId, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary User Profile Update + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {UserProfileUpdateRequest} userProfileUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileUpdateProductIdUserProductUserIdProfilePatch(productId: string, productUserId: string, userProfileUpdateRequest: UserProfileUpdateRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userProfileUpdateProductIdUserProductUserIdProfilePatch(productId, productUserId, userProfileUpdateRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ProductUserApi - object-oriented interface + * @export + * @class ProductUserApi + * @extends {BaseAPI} + */ +export class ProductUserApi extends BaseAPI { + /** + * + * @summary User Profile Filter By Marketplace Pid + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Source} source The marketplace to search + * @param {Array} pid The user\'s marketplace PID. Supports multiple params + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductUserApi + */ + public userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId: string, source: Source, pid: Array, options?: RawAxiosRequestConfig) { + return ProductUserApiFp(this.configuration).userProfileFilterByMarketplacePidProductIdUserByMarketplacePidGet(productId, source, pid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary User Profile + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductUserApi + */ + public userProfileProductIdUserProductUserIdProfileGet(productId: string, productUserId: string, options?: RawAxiosRequestConfig) { + return ProductUserApiFp(this.configuration).userProfileProductIdUserProductUserIdProfileGet(productId, productUserId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary User Profile Update + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} productUserId 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 {UserProfileUpdateRequest} userProfileUpdateRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProductUserApi + */ + public userProfileUpdateProductIdUserProductUserIdProfilePatch(productId: string, productUserId: string, userProfileUpdateRequest: UserProfileUpdateRequest, options?: RawAxiosRequestConfig) { + return ProductUserApiFp(this.configuration).userProfileUpdateProductIdUserProductUserIdProfilePatch(productId, productUserId, userProfileUpdateRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ProfilingQuestionsApi - axios parameter creator + * @export + */ +export const ProfilingQuestionsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Gets a list of profiling questions to ask this user. These questions are, as of right now, unanswered. Once a question is answered, it (and any other question whose answer is inferred from other answers) is removed from the list. The questions returned are ordered by importance (the key task_score) in descending order. + * @summary Get Profiling Questions + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {number} [limit] 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. + * @param {boolean} [isGrs] If it\'s the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProfilingQuestionsProductIdProfilingQuestionsGet: async (productId: string, bpuid: string, ip?: string, countryIso?: string, languageIso?: string, limit?: number, isGrs?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getProfilingQuestionsProductIdProfilingQuestionsGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('getProfilingQuestionsProductIdProfilingQuestionsGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/profiling-questions/` + .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 (ip !== undefined) { + localVarQueryParameter['ip'] = ip; + } + + if (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languageIso !== undefined) { + localVarQueryParameter['language_iso'] = languageIso; + } + + if (limit !== undefined) { + localVarQueryParameter['limit'] = limit; + } + + if (isGrs !== undefined) { + localVarQueryParameter['is_grs'] = isGrs; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + profilingInfoProductIdProfilingInfoGet: async (productId: string, countryIso: string, languageIso?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('profilingInfoProductIdProfilingInfoGet', 'productId', productId) + // verify required parameter 'countryIso' is not null or undefined + assertParamExists('profilingInfoProductIdProfilingInfoGet', 'countryIso', countryIso) + const localVarPath = `/{product_id}/profiling-info/` + .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 (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languageIso !== undefined) { + localVarQueryParameter['language_iso'] = languageIso; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Send the answers to one or more of these questions for a user. A question is uniquely specified by the question_id key. The answer is: the choice_id if the question_type is \"MC\" the actual entered text if the question_type is \"TE\" + * @summary Submit Profiling Questions + * @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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + * @param {string} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {boolean} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitProfilingQuestionsProductIdProfilingQuestionsPost: async (productId: string, bpuid: string, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId?: string, async?: boolean, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('submitProfilingQuestionsProductIdProfilingQuestionsPost', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('submitProfilingQuestionsProductIdProfilingQuestionsPost', 'bpuid', bpuid) + // verify required parameter 'bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost' is not null or undefined + assertParamExists('submitProfilingQuestionsProductIdProfilingQuestionsPost', 'bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost', bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost) + const localVarPath = `/{product_id}/profiling-questions/` + .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: 'POST', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + if (sessionId !== undefined) { + localVarQueryParameter['session_id'] = sessionId; + } + + if (async !== undefined) { + localVarQueryParameter['async'] = async; + } + + + + localVarHeaderParameter['Content-Type'] = 'application/json'; + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + localVarRequestOptions.data = serializeDataIfNeeded(bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * + * @summary User Profile + * @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} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileProductIdUserProfileGet: async (productId: string, bpuid: string, countryIso: string, languageIso?: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('userProfileProductIdUserProfileGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('userProfileProductIdUserProfileGet', 'bpuid', bpuid) + // verify required parameter 'countryIso' is not null or undefined + assertParamExists('userProfileProductIdUserProfileGet', 'countryIso', countryIso) + const localVarPath = `/{product_id}/user-profile/` + .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 (countryIso !== undefined) { + localVarQueryParameter['country_iso'] = countryIso; + } + + if (languageIso !== undefined) { + localVarQueryParameter['language_iso'] = languageIso; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ProfilingQuestionsApi - functional programming interface + * @export + */ +export const ProfilingQuestionsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ProfilingQuestionsApiAxiosParamCreator(configuration) + return { + /** + * Gets a list of profiling questions to ask this user. These questions are, as of right now, unanswered. Once a question is answered, it (and any other question whose answer is inferred from other answers) is removed from the list. The questions returned are ordered by importance (the key task_score) in descending order. + * @summary Get Profiling Questions + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {number} [limit] 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. + * @param {boolean} [isGrs] If it\'s the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getProfilingQuestionsProductIdProfilingQuestionsGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languageIso?: string, limit?: number, isGrs?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getProfilingQuestionsProductIdProfilingQuestionsGet(productId, bpuid, ip, countryIso, languageIso, limit, isGrs, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProfilingQuestionsApi.getProfilingQuestionsProductIdProfilingQuestionsGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async profilingInfoProductIdProfilingInfoGet(productId: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.profilingInfoProductIdProfilingInfoGet(productId, countryIso, languageIso, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProfilingQuestionsApi.profilingInfoProductIdProfilingInfoGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Send the answers to one or more of these questions for a user. A question is uniquely specified by the question_id key. The answer is: the choice_id if the question_type is \"MC\" the actual entered text if the question_type is \"TE\" + * @summary Submit Profiling Questions + * @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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + * @param {string} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {boolean} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitProfilingQuestionsProductIdProfilingQuestionsPost(productId: string, bpuid: string, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId?: string, async?: boolean, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitProfilingQuestionsProductIdProfilingQuestionsPost(productId, bpuid, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId, async, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProfilingQuestionsApi.submitProfilingQuestionsProductIdProfilingQuestionsPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary User Profile + * @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} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async userProfileProductIdUserProfileGet(productId: string, bpuid: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.userProfileProductIdUserProfileGet(productId, bpuid, countryIso, languageIso, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ProfilingQuestionsApi.userProfileProductIdUserProfileGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ProfilingQuestionsApi - factory interface + * @export + */ +export const ProfilingQuestionsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ProfilingQuestionsApiFp(configuration) + return { + /** + * Gets a list of profiling questions to ask this user. These questions are, as of right now, unanswered. Once a question is answered, it (and any other question whose answer is inferred from other answers) is removed from the list. The questions returned are ordered by importance (the key task_score) in descending order. + * @summary Get Profiling Questions + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {number} [limit] 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. + * @param {boolean} [isGrs] If it\'s the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getProfilingQuestionsProductIdProfilingQuestionsGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languageIso?: string, limit?: number, isGrs?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getProfilingQuestionsProductIdProfilingQuestionsGet(productId, bpuid, ip, countryIso, languageIso, limit, isGrs, options).then((request) => request(axios, basePath)); + }, + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + profilingInfoProductIdProfilingInfoGet(productId: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.profilingInfoProductIdProfilingInfoGet(productId, countryIso, languageIso, options).then((request) => request(axios, basePath)); + }, + /** + * Send the answers to one or more of these questions for a user. A question is uniquely specified by the question_id key. The answer is: the choice_id if the question_type is \"MC\" the actual entered text if the question_type is \"TE\" + * @summary Submit Profiling Questions + * @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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + * @param {string} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {boolean} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitProfilingQuestionsProductIdProfilingQuestionsPost(productId: string, bpuid: string, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId?: string, async?: boolean, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitProfilingQuestionsProductIdProfilingQuestionsPost(productId, bpuid, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId, async, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary User Profile + * @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} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + userProfileProductIdUserProfileGet(productId: string, bpuid: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.userProfileProductIdUserProfileGet(productId, bpuid, countryIso, languageIso, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ProfilingQuestionsApi - object-oriented interface + * @export + * @class ProfilingQuestionsApi + * @extends {BaseAPI} + */ +export class ProfilingQuestionsApi extends BaseAPI { + /** + * Gets a list of profiling questions to ask this user. These questions are, as of right now, unanswered. Once a question is answered, it (and any other question whose answer is inferred from other answers) is removed from the list. The questions returned are ordered by importance (the key task_score) in descending order. + * @summary Get Profiling Questions + * @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} [ip] Respondent\'s IP address (IPv4 or IPv6). Either \'ip\' must be provided, or \'country_iso\' must be provided if \'ip\' is not provided. + * @param {string} [countryIso] Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {number} [limit] 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. + * @param {boolean} [isGrs] If it\'s the GRS system. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public getProfilingQuestionsProductIdProfilingQuestionsGet(productId: string, bpuid: string, ip?: string, countryIso?: string, languageIso?: string, limit?: number, isGrs?: boolean, options?: RawAxiosRequestConfig) { + return ProfilingQuestionsApiFp(this.configuration).getProfilingQuestionsProductIdProfilingQuestionsGet(productId, bpuid, ip, countryIso, languageIso, limit, isGrs, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Get UPK Ontology (list of properties, property info, and allowed values) + * @summary Profiling Info + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public profilingInfoProductIdProfilingInfoGet(productId: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig) { + return ProfilingQuestionsApiFp(this.configuration).profilingInfoProductIdProfilingInfoGet(productId, countryIso, languageIso, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Send the answers to one or more of these questions for a user. A question is uniquely specified by the question_id key. The answer is: the choice_id if the question_type is \"MC\" the actual entered text if the question_type is \"TE\" + * @summary Submit Profiling Questions + * @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 {BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost} bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost + * @param {string} [sessionId] The unique identifier for a session in which these questions were asked. Must be a valid UUID. Optional. + * @param {boolean} [async] For internal use. + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public submitProfilingQuestionsProductIdProfilingQuestionsPost(productId: string, bpuid: string, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost: BodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId?: string, async?: boolean, options?: RawAxiosRequestConfig) { + return ProfilingQuestionsApiFp(this.configuration).submitProfilingQuestionsProductIdProfilingQuestionsPost(productId, bpuid, bodySubmitProfilingQuestionsProductIdProfilingQuestionsPost, sessionId, async, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary User Profile + * @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} countryIso Respondent\'s country code (ISO 3166-1 alpha-2, lowercase) + * @param {string} [languageIso] Respondent\'s desired language (ISO 639-2/B, lowercase) + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ProfilingQuestionsApi + */ + public userProfileProductIdUserProfileGet(productId: string, bpuid: string, countryIso: string, languageIso?: string, options?: RawAxiosRequestConfig) { + return ProfilingQuestionsApiFp(this.configuration).userProfileProductIdUserProfileGet(productId, bpuid, countryIso, languageIso, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * ReportApi - axios parameter creator + * @export + */ +export const ReportApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Send a \"Task Report\" for a respondent\'s latest started survey, regardless of the survey\'s outcome. Task Reports cannot be provided for task attempts by tsid, or through any other method, they must be given immediately after the respondent\'s task attempt. If a latest attempt can\'t be found, a ReportTaskResponse is still returned. If multiple reasons want to be provided, they should be done at the same time. If multiple reports are given for the same latest started task, the note attribute will be overwritten, while the new unique reasons will be appended to the task attempt. Task Report system contributions by client applications are immediately leveraged to aid yield management strategies. For those reasons, it\'s important that the respondent submits a Task Report as soon as possible and applications doesn\'t offload this request for a later time. Task Report timestamps are a critical component of understanding a Task experience for a respondent. For the BP to tell us about a bad survey they want to report The POSTed data looks like: { \'bpuid\': \'1234\', \'reasons\': [2], \'notes\': \"This survey was the worst!\" } Returns {\'status\': \'success\', \'msg\': error_msg} + * @summary Report Task + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {ReportTask} reportTask + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reportTaskProductIdReportPost: async (productId: string, reportTask: ReportTask, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('reportTaskProductIdReportPost', 'productId', productId) + // verify required parameter 'reportTask' is not null or undefined + assertParamExists('reportTaskProductIdReportPost', 'reportTask', reportTask) + const localVarPath = `/{product_id}/report/` + .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: '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(reportTask, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * ReportApi - functional programming interface + * @export + */ +export const ReportApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = ReportApiAxiosParamCreator(configuration) + return { + /** + * Send a \"Task Report\" for a respondent\'s latest started survey, regardless of the survey\'s outcome. Task Reports cannot be provided for task attempts by tsid, or through any other method, they must be given immediately after the respondent\'s task attempt. If a latest attempt can\'t be found, a ReportTaskResponse is still returned. If multiple reasons want to be provided, they should be done at the same time. If multiple reports are given for the same latest started task, the note attribute will be overwritten, while the new unique reasons will be appended to the task attempt. Task Report system contributions by client applications are immediately leveraged to aid yield management strategies. For those reasons, it\'s important that the respondent submits a Task Report as soon as possible and applications doesn\'t offload this request for a later time. Task Report timestamps are a critical component of understanding a Task experience for a respondent. For the BP to tell us about a bad survey they want to report The POSTed data looks like: { \'bpuid\': \'1234\', \'reasons\': [2], \'notes\': \"This survey was the worst!\" } Returns {\'status\': \'success\', \'msg\': error_msg} + * @summary Report Task + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {ReportTask} reportTask + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async reportTaskProductIdReportPost(productId: string, reportTask: ReportTask, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.reportTaskProductIdReportPost(productId, reportTask, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['ReportApi.reportTaskProductIdReportPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * ReportApi - factory interface + * @export + */ +export const ReportApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = ReportApiFp(configuration) + return { + /** + * Send a \"Task Report\" for a respondent\'s latest started survey, regardless of the survey\'s outcome. Task Reports cannot be provided for task attempts by tsid, or through any other method, they must be given immediately after the respondent\'s task attempt. If a latest attempt can\'t be found, a ReportTaskResponse is still returned. If multiple reasons want to be provided, they should be done at the same time. If multiple reports are given for the same latest started task, the note attribute will be overwritten, while the new unique reasons will be appended to the task attempt. Task Report system contributions by client applications are immediately leveraged to aid yield management strategies. For those reasons, it\'s important that the respondent submits a Task Report as soon as possible and applications doesn\'t offload this request for a later time. Task Report timestamps are a critical component of understanding a Task experience for a respondent. For the BP to tell us about a bad survey they want to report The POSTed data looks like: { \'bpuid\': \'1234\', \'reasons\': [2], \'notes\': \"This survey was the worst!\" } Returns {\'status\': \'success\', \'msg\': error_msg} + * @summary Report Task + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {ReportTask} reportTask + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + reportTaskProductIdReportPost(productId: string, reportTask: ReportTask, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.reportTaskProductIdReportPost(productId, reportTask, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * ReportApi - object-oriented interface + * @export + * @class ReportApi + * @extends {BaseAPI} + */ +export class ReportApi extends BaseAPI { + /** + * Send a \"Task Report\" for a respondent\'s latest started survey, regardless of the survey\'s outcome. Task Reports cannot be provided for task attempts by tsid, or through any other method, they must be given immediately after the respondent\'s task attempt. If a latest attempt can\'t be found, a ReportTaskResponse is still returned. If multiple reasons want to be provided, they should be done at the same time. If multiple reports are given for the same latest started task, the note attribute will be overwritten, while the new unique reasons will be appended to the task attempt. Task Report system contributions by client applications are immediately leveraged to aid yield management strategies. For those reasons, it\'s important that the respondent submits a Task Report as soon as possible and applications doesn\'t offload this request for a later time. Task Report timestamps are a critical component of understanding a Task experience for a respondent. For the BP to tell us about a bad survey they want to report The POSTed data looks like: { \'bpuid\': \'1234\', \'reasons\': [2], \'notes\': \"This survey was the worst!\" } Returns {\'status\': \'success\', \'msg\': error_msg} + * @summary Report Task + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {ReportTask} reportTask + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof ReportApi + */ + public reportTaskProductIdReportPost(productId: string, reportTask: ReportTask, options?: RawAxiosRequestConfig) { + return ReportApiFp(this.configuration).reportTaskProductIdReportPost(productId, reportTask, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * StatusApi - axios parameter creator + * @export + */ +export const StatusApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Retrieve the status of a session by a specific Task Status ID (`tsid`) that is provided in the redirect. Given a `tsid`, get back the status of the wall event. This endpoint conflates the idea of a wall event and a session, but for these purposes, the status and payout of the last wall event in a session equals the status and payout for the session. + * @summary Get Task Status + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTaskStatusProductIdStatusTsidGet: async (productId: string, tsid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getTaskStatusProductIdStatusTsidGet', 'productId', productId) + // verify required parameter 'tsid' is not null or undefined + assertParamExists('getTaskStatusProductIdStatusTsidGet', 'tsid', tsid) + const localVarPath = `/{product_id}/status/{tsid}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"tsid"}}`, encodeURIComponent(String(tsid))); + // 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, + }; + }, + /** + * + * @summary List Task Statuses + * @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. Filters the returned task status to only include those done by this user. + * @param {StartedAfter} [startedAfter] Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {StartedBefore} [startedBefore] Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {number} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {boolean} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {AdjustedAfter} [adjustedAfter] Retrieve sessions which were adjusted after this timestamp. + * @param {AdjustedBefore} [adjustedBefore] Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTaskStatusesProductIdStatusGet: async (productId: string, bpuid?: string, startedAfter?: StartedAfter, startedBefore?: StartedBefore, status?: number, reconciled?: boolean, adjustedAfter?: AdjustedAfter, adjustedBefore?: AdjustedBefore, orderBy?: string, page?: number, size?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('listTaskStatusesProductIdStatusGet', 'productId', productId) + const localVarPath = `/{product_id}/status/` + .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 (startedAfter !== undefined) { + for (const [key, value] of Object.entries(startedAfter)) { + localVarQueryParameter[key] = value; + } + } + + if (startedBefore !== undefined) { + for (const [key, value] of Object.entries(startedBefore)) { + localVarQueryParameter[key] = value; + } + } + + if (status !== undefined) { + localVarQueryParameter['status'] = status; + } + + if (reconciled !== undefined) { + localVarQueryParameter['reconciled'] = reconciled; + } + + if (adjustedAfter !== undefined) { + for (const [key, value] of Object.entries(adjustedAfter)) { + localVarQueryParameter[key] = value; + } + } + + if (adjustedBefore !== undefined) { + for (const [key, value] of Object.entries(adjustedBefore)) { + localVarQueryParameter[key] = value; + } + } + + 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, + }; + }, + } +}; + +/** + * StatusApi - functional programming interface + * @export + */ +export const StatusApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StatusApiAxiosParamCreator(configuration) + return { + /** + * Retrieve the status of a session by a specific Task Status ID (`tsid`) that is provided in the redirect. Given a `tsid`, get back the status of the wall event. This endpoint conflates the idea of a wall event and a session, but for these purposes, the status and payout of the last wall event in a session equals the status and payout for the session. + * @summary Get Task Status + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getTaskStatusProductIdStatusTsidGet(productId: string, tsid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getTaskStatusProductIdStatusTsidGet(productId, tsid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatusApi.getTaskStatusProductIdStatusTsidGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * + * @summary List Task Statuses + * @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. Filters the returned task status to only include those done by this user. + * @param {StartedAfter} [startedAfter] Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {StartedBefore} [startedBefore] Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {number} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {boolean} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {AdjustedAfter} [adjustedAfter] Retrieve sessions which were adjusted after this timestamp. + * @param {AdjustedBefore} [adjustedBefore] Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async listTaskStatusesProductIdStatusGet(productId: string, bpuid?: string, startedAfter?: StartedAfter, startedBefore?: StartedBefore, status?: number, reconciled?: boolean, adjustedAfter?: AdjustedAfter, adjustedBefore?: AdjustedBefore, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, orderBy, page, size, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StatusApi.listTaskStatusesProductIdStatusGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * StatusApi - factory interface + * @export + */ +export const StatusApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StatusApiFp(configuration) + return { + /** + * Retrieve the status of a session by a specific Task Status ID (`tsid`) that is provided in the redirect. Given a `tsid`, get back the status of the wall event. This endpoint conflates the idea of a wall event and a session, but for these purposes, the status and payout of the last wall event in a session equals the status and payout for the session. + * @summary Get Task Status + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getTaskStatusProductIdStatusTsidGet(productId: string, tsid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getTaskStatusProductIdStatusTsidGet(productId, tsid, options).then((request) => request(axios, basePath)); + }, + /** + * + * @summary List Task Statuses + * @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. Filters the returned task status to only include those done by this user. + * @param {StartedAfter} [startedAfter] Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {StartedBefore} [startedBefore] Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {number} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {boolean} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {AdjustedAfter} [adjustedAfter] Retrieve sessions which were adjusted after this timestamp. + * @param {AdjustedBefore} [adjustedBefore] Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + listTaskStatusesProductIdStatusGet(productId: string, bpuid?: string, startedAfter?: StartedAfter, startedBefore?: StartedBefore, status?: number, reconciled?: boolean, adjustedAfter?: AdjustedAfter, adjustedBefore?: AdjustedBefore, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, orderBy, page, size, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StatusApi - object-oriented interface + * @export + * @class StatusApi + * @extends {BaseAPI} + */ +export class StatusApi extends BaseAPI { + /** + * Retrieve the status of a session by a specific Task Status ID (`tsid`) that is provided in the redirect. Given a `tsid`, get back the status of the wall event. This endpoint conflates the idea of a wall event and a session, but for these purposes, the status and payout of the last wall event in a session equals the status and payout for the session. + * @summary Get Task Status + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} tsid A unique identifier for the session + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatusApi + */ + public getTaskStatusProductIdStatusTsidGet(productId: string, tsid: string, options?: RawAxiosRequestConfig) { + return StatusApiFp(this.configuration).getTaskStatusProductIdStatusTsidGet(productId, tsid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * + * @summary List Task Statuses + * @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. Filters the returned task status to only include those done by this user. + * @param {StartedAfter} [startedAfter] Retrieve sessions which were started after this timestamp. If `NULL`, default is 10 days ago. + * @param {StartedBefore} [startedBefore] Retrieve sessions which were started before this timestamp. If `NULL`, default is now. + * @param {number} [status] Filter for sessions with this status. See Task Status for description of status. + * @param {boolean} [reconciled] Only retrieve sessions that have been adjusted. If `reconciled` is True, `adjusted_after` is required. + * @param {AdjustedAfter} [adjustedAfter] Retrieve sessions which were adjusted after this timestamp. + * @param {AdjustedBefore} [adjustedBefore] Retrieve sessions which were adjusted before this timestamp. Default is now. + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StatusApi + */ + public listTaskStatusesProductIdStatusGet(productId: string, bpuid?: string, startedAfter?: StartedAfter, startedBefore?: StartedBefore, status?: number, reconciled?: boolean, adjustedAfter?: AdjustedAfter, adjustedBefore?: AdjustedBefore, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig) { + return StatusApiFp(this.configuration).listTaskStatusesProductIdStatusGet(productId, bpuid, startedAfter, startedBefore, status, reconciled, adjustedAfter, adjustedBefore, orderBy, page, size, options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * StreamsApi - axios parameter creator + * @export + */ +export const StreamsApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * + * @summary Websocket Debug Page + * @param {string} productId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + websocketDebugPageWsDebugGet: async (productId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('websocketDebugPageWsDebugGet', 'productId', productId) + const localVarPath = `/ws/debug/`; + // 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 (productId !== undefined) { + localVarQueryParameter['product_id'] = productId; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * WebSocket endpoint: `/ws/events/` Protocol: - Client connects - Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }` - Server sends a PingMessage `{ kind: \"ping\" }` - Client must reply a PongMessage: `{ kind: \"pong\" }` - Other messages are EventMessage or StatsMessage Close on missing pong after 20s. + * @summary Websocket Events Docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + websocketEventsDocsWsEventsDocsGet: async (options: RawAxiosRequestConfig = {}): Promise => { + const localVarPath = `/ws/events/docs/`; + // 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, + }; + }, + } +}; + +/** + * StreamsApi - functional programming interface + * @export + */ +export const StreamsApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = StreamsApiAxiosParamCreator(configuration) + return { + /** + * + * @summary Websocket Debug Page + * @param {string} productId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async websocketDebugPageWsDebugGet(productId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.websocketDebugPageWsDebugGet(productId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StreamsApi.websocketDebugPageWsDebugGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * WebSocket endpoint: `/ws/events/` Protocol: - Client connects - Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }` - Server sends a PingMessage `{ kind: \"ping\" }` - Client must reply a PongMessage: `{ kind: \"pong\" }` - Other messages are EventMessage or StatsMessage Close on missing pong after 20s. + * @summary Websocket Events Docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async websocketEventsDocsWsEventsDocsGet(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.websocketEventsDocsWsEventsDocsGet(options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['StreamsApi.websocketEventsDocsWsEventsDocsGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * StreamsApi - factory interface + * @export + */ +export const StreamsApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = StreamsApiFp(configuration) + return { + /** + * + * @summary Websocket Debug Page + * @param {string} productId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + websocketDebugPageWsDebugGet(productId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.websocketDebugPageWsDebugGet(productId, options).then((request) => request(axios, basePath)); + }, + /** + * WebSocket endpoint: `/ws/events/` Protocol: - Client connects - Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }` - Server sends a PingMessage `{ kind: \"ping\" }` - Client must reply a PongMessage: `{ kind: \"pong\" }` - Other messages are EventMessage or StatsMessage Close on missing pong after 20s. + * @summary Websocket Events Docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + websocketEventsDocsWsEventsDocsGet(options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.websocketEventsDocsWsEventsDocsGet(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * StreamsApi - object-oriented interface + * @export + * @class StreamsApi + * @extends {BaseAPI} + */ +export class StreamsApi extends BaseAPI { + /** + * + * @summary Websocket Debug Page + * @param {string} productId + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StreamsApi + */ + public websocketDebugPageWsDebugGet(productId: string, options?: RawAxiosRequestConfig) { + return StreamsApiFp(this.configuration).websocketDebugPageWsDebugGet(productId, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * WebSocket endpoint: `/ws/events/` Protocol: - Client connects - Client sends a SubscribeMessage `{ kind: \"subscribe\", product_id: \"{product_id}\" }` - Server sends a PingMessage `{ kind: \"ping\" }` - Client must reply a PongMessage: `{ kind: \"pong\" }` - Other messages are EventMessage or StatsMessage Close on missing pong after 20s. + * @summary Websocket Events Docs + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof StreamsApi + */ + public websocketEventsDocsWsEventsDocsGet(options?: RawAxiosRequestConfig) { + return StreamsApiFp(this.configuration).websocketEventsDocsWsEventsDocsGet(options).then((request) => request(this.axios, this.basePath)); + } +} + + + +/** + * WalletApi - axios parameter creator + * @export + */ +export const WalletApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * 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 + * @summary Create Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Body} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCashoutMethodProductIdCashoutMethodsPost: async (productId: string, body: Body, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('createCashoutMethodProductIdCashoutMethodsPost', 'productId', productId) + // verify required parameter 'body' is not null or undefined + assertParamExists('createCashoutMethodProductIdCashoutMethodsPost', 'body', body) + const localVarPath = `/{product_id}/cashout_methods/` + .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: '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(body, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method to delete + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete: async (productId: string, cashoutMethodId: string, bpuid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete', 'productId', productId) + // verify required parameter 'cashoutMethodId' is not null or undefined + assertParamExists('deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete', 'cashoutMethodId', cashoutMethodId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete', 'bpuid', bpuid) + 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: 'DELETE', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + if (bpuid !== undefined) { + localVarQueryParameter['bpuid'] = bpuid; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutDetailProductIdCashoutCashoutIdGet: async (productId: string, cashoutId: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getCashoutDetailProductIdCashoutCashoutIdGet', 'productId', productId) + // verify required parameter 'cashoutId' is not null or undefined + assertParamExists('getCashoutDetailProductIdCashoutCashoutIdGet', 'cashoutId', cashoutId) + const localVarPath = `/{product_id}/cashout/{cashout_id}/` + .replace(`{${"product_id"}}`, encodeURIComponent(String(productId))) + .replace(`{${"cashout_id"}}`, encodeURIComponent(String(cashoutId))); + // 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutMethodsProductIdCashoutMethodsGet: async (productId: string, bpuid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getCashoutMethodsProductIdCashoutMethodsGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('getCashoutMethodsProductIdCashoutMethodsGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/cashout_methods/` + .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; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this cashout_method, for amount (in USD cents). + * @summary Get Expected Redemption Value + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {number} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet: async (productId: string, cashoutMethodId: string, amount: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet', 'productId', productId) + // verify required parameter 'cashoutMethodId' is not null or undefined + assertParamExists('getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet', 'cashoutMethodId', cashoutMethodId) + // verify required parameter 'amount' is not null or undefined + assertParamExists('getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet', 'amount', amount) + const localVarPath = `/{product_id}/cashout_method/{cashout_method_id}/value/` + .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; + + if (amount !== undefined) { + localVarQueryParameter['amount'] = amount; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @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} [createdAfter] Filter transactions created after this timestamp + * @param {string} [createdBefore] Filter transactions created before this timestamp + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserTransactionHistoryProductIdTransactionHistoryGet: async (productId: string, bpuid: string, createdAfter?: string, createdBefore?: string, orderBy?: string, page?: number, size?: number, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getUserTransactionHistoryProductIdTransactionHistoryGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('getUserTransactionHistoryProductIdTransactionHistoryGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/transaction_history/` + .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 (createdAfter !== undefined) { + localVarQueryParameter['created_after'] = (createdAfter as any instanceof Date) ? + (createdAfter as any).toISOString() : + createdAfter; + } + + if (createdBefore !== undefined) { + localVarQueryParameter['created_before'] = (createdBefore as any instanceof Date) ? + (createdBefore as any).toISOString() : + createdBefore; + } + + 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, + }; + }, + /** + * Retrieve the current balance of a respondent\'s wallet balance for display + * @summary Get User Wallet Balance + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserWalletBalanceProductIdWalletGet: async (productId: string, bpuid: string, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('getUserWalletBalanceProductIdWalletGet', 'productId', productId) + // verify required parameter 'bpuid' is not null or undefined + assertParamExists('getUserWalletBalanceProductIdWalletGet', 'bpuid', bpuid) + const localVarPath = `/{product_id}/wallet/` + .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; + } + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Request a cashout taken from a user\'s available wallet balance, to be paid via a particular cashout method. + * @summary Submit User Cashout + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {CreateCashoutRequest} createCashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitUserCashoutProductIdCashoutPost: async (productId: string, createCashoutRequest: CreateCashoutRequest, options: RawAxiosRequestConfig = {}): Promise => { + // verify required parameter 'productId' is not null or undefined + assertParamExists('submitUserCashoutProductIdCashoutPost', 'productId', productId) + // verify required parameter 'createCashoutRequest' is not null or undefined + assertParamExists('submitUserCashoutProductIdCashoutPost', 'createCashoutRequest', createCashoutRequest) + 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: '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(createCashoutRequest, localVarRequestOptions, configuration) + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WalletApi - functional programming interface + * @export + */ +export const WalletApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WalletApiAxiosParamCreator(configuration) + return { + /** + * 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 + * @summary Create Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Body} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async createCashoutMethodProductIdCashoutMethodsPost(productId: string, body: Body, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.createCashoutMethodProductIdCashoutMethodsPost(productId, body, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.createCashoutMethodProductIdCashoutMethodsPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method to delete + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId: string, cashoutMethodId: string, bpuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCashoutDetailProductIdCashoutCashoutIdGet(productId: string, cashoutId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCashoutDetailProductIdCashoutCashoutIdGet(productId, cashoutId, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.getCashoutDetailProductIdCashoutCashoutIdGet']?.[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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, 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); + }, + /** + * Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this cashout_method, for amount (in USD cents). + * @summary Get Expected Redemption Value + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {number} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: string, cashoutMethodId: string, amount: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId, cashoutMethodId, amount, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @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} [createdAfter] Filter transactions created after this timestamp + * @param {string} [createdBefore] Filter transactions created before this timestamp + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserTransactionHistoryProductIdTransactionHistoryGet(productId: string, bpuid: string, createdAfter?: string, createdBefore?: string, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, createdAfter, createdBefore, orderBy, page, size, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.getUserTransactionHistoryProductIdTransactionHistoryGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Retrieve the current balance of a respondent\'s wallet balance for display + * @summary Get User Wallet Balance + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + async getUserWalletBalanceProductIdWalletGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.getUserWalletBalanceProductIdWalletGet(productId, bpuid, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.getUserWalletBalanceProductIdWalletGet']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + /** + * Request a cashout taken from a user\'s available wallet balance, to be paid via a particular cashout method. + * @summary Submit User Cashout + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {CreateCashoutRequest} createCashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async submitUserCashoutProductIdCashoutPost(productId: string, createCashoutRequest: CreateCashoutRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.submitUserCashoutProductIdCashoutPost(productId, createCashoutRequest, options); + const localVarOperationServerIndex = configuration?.serverIndex ?? 0; + const localVarOperationServerBasePath = operationServerMap['WalletApi.submitUserCashoutProductIdCashoutPost']?.[localVarOperationServerIndex]?.url; + return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); + }, + } +}; + +/** + * WalletApi - factory interface + * @export + */ +export const WalletApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WalletApiFp(configuration) + return { + /** + * 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 + * @summary Create Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Body} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + createCashoutMethodProductIdCashoutMethodsPost(productId: string, body: Body, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.createCashoutMethodProductIdCashoutMethodsPost(productId, body, options).then((request) => request(axios, basePath)); + }, + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method to delete + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId: string, cashoutMethodId: string, bpuid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutDetailProductIdCashoutCashoutIdGet(productId: string, cashoutId: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCashoutDetailProductIdCashoutCashoutIdGet(productId, cashoutId, 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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getCashoutMethodsProductIdCashoutMethodsGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getCashoutMethodsProductIdCashoutMethodsGet(productId, bpuid, 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). + * @summary Get Expected Redemption Value + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {number} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: string, cashoutMethodId: string, amount: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId, cashoutMethodId, amount, options).then((request) => request(axios, basePath)); + }, + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @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} [createdAfter] Filter transactions created after this timestamp + * @param {string} [createdBefore] Filter transactions created before this timestamp + * @param {string} [orderBy] Comma-separated fields to order by + * @param {number} [page] + * @param {number} [size] + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserTransactionHistoryProductIdTransactionHistoryGet(productId: string, bpuid: string, createdAfter?: string, createdBefore?: string, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, createdAfter, createdBefore, orderBy, page, size, options).then((request) => request(axios, basePath)); + }, + /** + * Retrieve the current balance of a respondent\'s wallet balance for display + * @summary Get User Wallet Balance + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + */ + getUserWalletBalanceProductIdWalletGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.getUserWalletBalanceProductIdWalletGet(productId, bpuid, options).then((request) => request(axios, basePath)); + }, + /** + * Request a cashout taken from a user\'s available wallet balance, to be paid via a particular cashout method. + * @summary Submit User Cashout + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {CreateCashoutRequest} createCashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + submitUserCashoutProductIdCashoutPost(productId: string, createCashoutRequest: CreateCashoutRequest, options?: RawAxiosRequestConfig): AxiosPromise { + return localVarFp.submitUserCashoutProductIdCashoutPost(productId, createCashoutRequest, options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WalletApi - object-oriented interface + * @export + * @class WalletApi + * @extends {BaseAPI} + */ +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 + * @summary Create Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {Body} body + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public createCashoutMethodProductIdCashoutMethodsPost(productId: string, body: Body, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).createCashoutMethodProductIdCashoutMethodsPost(productId, body, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Delete a cashout method + * @summary Delete Cashout Method + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method to delete + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId: string, cashoutMethodId: string, bpuid: string, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).deleteCashoutMethodProductIdCashoutMethodsCashoutMethodIdDelete(productId, cashoutMethodId, bpuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve the details for a specific Cashout event + * @summary Get Cashout Detail + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutId The cashout event ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public getCashoutDetailProductIdCashoutCashoutIdGet(productId: string, cashoutId: string, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getCashoutDetailProductIdCashoutCashoutIdGet(productId, cashoutId, 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 {*} [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)); + } + + /** + * Use this function to get the \"value\" (in local currency, e.g. CAD, BTC) for this cashout_method, for amount (in USD cents). + * @summary Get Expected Redemption Value + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {string} cashoutMethodId The ID of the cashout method + * @param {number} amount (USD cents) The amount to convert + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId: string, cashoutMethodId: string, amount: number, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getExpectedRedemptionValueProductIdCashoutMethodCashoutMethodIdValueGet(productId, cashoutMethodId, amount, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Return array of user events that altered their wallet balance + * @summary Get User Transaction History + * @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} [createdAfter] Filter transactions created after this timestamp + * @param {string} [createdBefore] Filter transactions created before this timestamp + * @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 getUserTransactionHistoryProductIdTransactionHistoryGet(productId: string, bpuid: string, createdAfter?: string, createdBefore?: string, orderBy?: string, page?: number, size?: number, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getUserTransactionHistoryProductIdTransactionHistoryGet(productId, bpuid, createdAfter, createdBefore, orderBy, page, size, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieve the current balance of a respondent\'s wallet balance for display + * @summary Get User Wallet Balance + * @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 {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public getUserWalletBalanceProductIdWalletGet(productId: string, bpuid: string, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).getUserWalletBalanceProductIdWalletGet(productId, bpuid, options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Request a cashout taken from a user\'s available wallet balance, to be paid via a particular cashout method. + * @summary Submit User Cashout + * @param {string} productId The Brokerage Product ID provided by GRL. + * @param {CreateCashoutRequest} createCashoutRequest + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WalletApi + */ + public submitUserCashoutProductIdCashoutPost(productId: string, createCashoutRequest: CreateCashoutRequest, options?: RawAxiosRequestConfig) { + return WalletApiFp(this.configuration).submitUserCashoutProductIdCashoutPost(productId, createCashoutRequest, options).then((request) => request(this.axios, this.basePath)); + } +} + + + -- cgit v1.2.3